Refactor more power and infiltration stuff. Create new power sabotage ability for spies in ra and ts.

This commit is contained in:
ScottNZ
2014-08-07 00:52:23 +12:00
parent 4fa199fb10
commit b70395e27c
31 changed files with 292 additions and 109 deletions

View File

@@ -334,8 +334,8 @@ namespace OpenRA.Utility
node.Key = "Units";
}
// Power from Building was moved out into its own trait
if (engineVersion < 20140802)
// Power from Building was moved out into Power and ScalePowerWithHealth traits
if (engineVersion < 20140823)
{
if (depth == 0)
{
@@ -350,11 +350,10 @@ namespace OpenRA.Utility
buildingFields.Remove(power);
var powerFields = new List<MiniYamlNode> { new MiniYamlNode("Amount", power.Value) };
if (FieldLoader.GetValue<int>("Power", power.Value.Value) > 0)
powerFields.Add(new MiniYamlNode("ScaleWithHealth", "True"));
actorTraits.Add(new MiniYamlNode("Power", new MiniYaml("", powerFields)));
if (FieldLoader.GetValue<int>("Power", power.Value.Value) > 0)
actorTraits.Add(new MiniYamlNode("ScaleWithHealth", ""));
}
}
}