Change SoundOnDamageTransition to randomly select

from a string[] instead of a single string.
This commit is contained in:
Taryn Hill
2015-03-11 09:29:21 -05:00
parent 32edeccb56
commit 1e0612ddf0
2 changed files with 28 additions and 4 deletions

View File

@@ -707,6 +707,18 @@ namespace OpenRA.Mods.Common.UtilityCommands
node.Key = "Refinery";
}
// Append an 's' as the fields were changed from string to string[]
if (engineVersion < 20150311)
{
if (depth == 2 && parentKey == "SoundOnDamageTransition")
{
if (node.Key == "DamagedSound")
node.Key = "DamagedSounds";
else if (node.Key == "DestroyedSound")
node.Key = "DestroyedSounds";
}
}
UpgradeActorRules(engineVersion, ref node.Value.Nodes, node, depth + 1);
}
}