Remove LoadUsing where FieldLoader.GetValue works for the dictionaries

This commit is contained in:
atlimit8
2017-04-19 09:51:06 -05:00
parent 843ac85c92
commit 4767b91037
3 changed files with 1 additions and 30 deletions

View File

@@ -41,7 +41,6 @@ namespace OpenRA.Mods.Common.Traits.Render
[Desc("Custom crushed animation palette is a player palette BaseName")]
public readonly bool CrushedPaletteIsPlayerPalette = false;
[FieldLoader.LoadUsing("LoadDeathTypes")]
[Desc("Death animations to use for each damage type (defined on the warheads).",
"Is only used if UseDeathTypeSuffix is `True`.")]
public readonly Dictionary<string, string[]> DeathTypes = new Dictionary<string, string[]>();
@@ -49,15 +48,6 @@ namespace OpenRA.Mods.Common.Traits.Render
[Desc("Sequence to use when the actor is killed by some non-standard means (e.g. suicide).")]
[SequenceReference] public readonly string FallbackSequence = null;
public static object LoadDeathTypes(MiniYaml yaml)
{
var md = yaml.ToDictionary();
return md.ContainsKey("DeathTypes")
? md["DeathTypes"].ToDictionary(my => FieldLoader.GetValue<string[]>("(value)", my.Value))
: new Dictionary<string, string[]>();
}
public override object Create(ActorInitializer init) { return new WithDeathAnimation(init.Self, this); }
}