HitShape Upgrade Rules
Radius is now a sub-property of Shape.Circle.
This commit is contained in:
@@ -2788,6 +2788,25 @@ namespace OpenRA.Mods.Common.UtilityCommands
|
||||
}
|
||||
}
|
||||
|
||||
// Refactored Health.Radius to HitShapes
|
||||
if (engineVersion < 20151227)
|
||||
{
|
||||
if (node.Key.StartsWith("Health"))
|
||||
{
|
||||
var radius = node.Value.Nodes.FirstOrDefault(x => x.Key == "Radius");
|
||||
if (radius != null)
|
||||
{
|
||||
var radiusValue = FieldLoader.GetValue<string>("Radius", radius.Value.Value);
|
||||
node.Value.Nodes.Add(new MiniYamlNode("Shape", "Circle"));
|
||||
|
||||
var shape = node.Value.Nodes.First(x => x.Key == "Shape");
|
||||
shape.Value.Nodes.Add(new MiniYamlNode("Radius", radiusValue));
|
||||
|
||||
node.Value.Nodes.Remove(radius);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
UpgradeActorRules(engineVersion, ref node.Value.Nodes, node, depth + 1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -163,7 +163,8 @@
|
||||
Inherits@2: ^GainsExperience
|
||||
Inherits@3: ^SpriteActor
|
||||
Health:
|
||||
Radius: 128
|
||||
Shape: Circle
|
||||
Radius: 128
|
||||
Armor:
|
||||
Type: None
|
||||
RevealsShroud:
|
||||
@@ -286,8 +287,9 @@
|
||||
Inherits@1: ^ExistsInWorld
|
||||
Inherits@2: ^SpriteActor
|
||||
Health:
|
||||
Radius: 128
|
||||
HP: 1000
|
||||
Shape: Circle
|
||||
Radius: 128
|
||||
Armor:
|
||||
Type: Wood
|
||||
Buildable:
|
||||
@@ -339,8 +341,9 @@
|
||||
Inherits@1: ^ExistsInWorld
|
||||
Inherits@2: ^SpriteActor
|
||||
Health:
|
||||
Radius: 427
|
||||
HP: 300
|
||||
Shape: Circle
|
||||
Radius: 427
|
||||
Armor:
|
||||
Type: Wood
|
||||
RevealsShroud:
|
||||
|
||||
@@ -160,7 +160,8 @@
|
||||
Inherits@2: ^GainsExperience
|
||||
Inherits@3: ^SpriteActor
|
||||
Health:
|
||||
Radius: 96
|
||||
Shape: Circle
|
||||
Radius: 96
|
||||
Armor:
|
||||
Type: none
|
||||
RevealsShroud:
|
||||
|
||||
@@ -165,8 +165,9 @@
|
||||
Inherits@3: ^SpriteActor
|
||||
DrawLineToTarget:
|
||||
Health:
|
||||
Radius: 128
|
||||
HP: 25
|
||||
Shape: Circle
|
||||
Radius: 128
|
||||
Armor:
|
||||
Type: None
|
||||
RevealsShroud:
|
||||
|
||||
@@ -591,7 +591,8 @@ Ant:
|
||||
VisualBounds: 30,30,0,-2
|
||||
Health:
|
||||
HP: 750
|
||||
Radius: 469
|
||||
Shape: Circle
|
||||
Radius: 469
|
||||
Mobile:
|
||||
Speed: 99
|
||||
ROT: 12
|
||||
|
||||
@@ -211,8 +211,9 @@ DOGGIE:
|
||||
Tooltip:
|
||||
Name: Tiberian Fiend
|
||||
Health:
|
||||
Radius: 213
|
||||
HP: 250
|
||||
Shape: Circle
|
||||
Radius: 213
|
||||
PoisonedByTiberium:
|
||||
Weapon: TiberiumHeal
|
||||
Valued:
|
||||
|
||||
@@ -231,8 +231,9 @@
|
||||
Inherits@3: ^SpriteActor
|
||||
DrawLineToTarget:
|
||||
Health:
|
||||
Radius: 128
|
||||
HP: 50
|
||||
Shape: Circle
|
||||
Radius: 128
|
||||
Armor:
|
||||
Type: None
|
||||
Valued:
|
||||
@@ -518,7 +519,8 @@
|
||||
Inherits@2: ^SpriteActor
|
||||
DrawLineToTarget:
|
||||
Health:
|
||||
Radius: 256
|
||||
Shape: Circle
|
||||
Radius: 256
|
||||
Armor:
|
||||
Type: Light
|
||||
Mobile:
|
||||
|
||||
Reference in New Issue
Block a user