Add TargetableOffsets to HitShape

And remove ITargetablePositions from Building.
Also, added UseFootprintOffsets to replicate the old Building behavior for easier setup of TargetablePositions for buildings.
This commit is contained in:
reaperrr
2017-05-23 22:51:04 +02:00
parent 7fd0a3aa58
commit 82758a8bef
9 changed files with 63 additions and 19 deletions

View File

@@ -699,6 +699,15 @@ namespace OpenRA.Mods.Common.UtilityCommands
else
node.Value.Nodes.Add(hitShapeNode);
}
// Moved ITargetablePositions from Building to HitShape
var building = node.Value.Nodes.FirstOrDefault(n => n.Key == "Building");
var hitShape = node.Value.Nodes.FirstOrDefault(n => n.Key == "HitShape");
if (building != null && hitShape == null)
{
hitShapeNode.Value.Nodes.Add(new MiniYamlNode("UseOccupiedCellsOffsets", "true"));
node.Value.Nodes.Add(hitShapeNode);
}
}
UpgradeActorRules(modData, engineVersion, ref node.Value.Nodes, node, depth + 1);