diff --git a/OpenRA.Mods.Common/Traits/Render/WithDeathAnimation.cs b/OpenRA.Mods.Common/Traits/Render/WithDeathAnimation.cs index b5588cbdf5..af9b2cec74 100644 --- a/OpenRA.Mods.Common/Traits/Render/WithDeathAnimation.cs +++ b/OpenRA.Mods.Common/Traits/Render/WithDeathAnimation.cs @@ -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 DeathTypes = new Dictionary(); @@ -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("(value)", my.Value)) - : new Dictionary(); - } - public override object Create(ActorInitializer init) { return new WithDeathAnimation(init.Self, this); } } diff --git a/OpenRA.Mods.Common/Traits/Render/WithInfantryBody.cs b/OpenRA.Mods.Common/Traits/Render/WithInfantryBody.cs index 4305b312d4..c21950c123 100644 --- a/OpenRA.Mods.Common/Traits/Render/WithInfantryBody.cs +++ b/OpenRA.Mods.Common/Traits/Render/WithInfantryBody.cs @@ -28,20 +28,10 @@ namespace OpenRA.Mods.Common.Traits.Render // TODO: [SequenceReference] isn't smart enough to use Dictionaries. [Desc("Attack sequence to use for each armament.")] - [FieldLoader.LoadUsing("LoadWeaponSequences")] public readonly Dictionary AttackSequences = new Dictionary(); [SequenceReference] public readonly string[] IdleSequences = { }; [SequenceReference] public readonly string[] StandSequences = { "stand" }; - public static object LoadWeaponSequences(MiniYaml yaml) - { - var md = yaml.ToDictionary(); - - return md.ContainsKey("AttackSequences") - ? md["AttackSequences"].ToDictionary(my => FieldLoader.GetValue("(value)", my.Value)) - : new Dictionary(); - } - public override object Create(ActorInitializer init) { return new WithInfantryBody(init, this); } public IEnumerable RenderPreviewSprites(ActorPreviewInitializer init, RenderSpritesInfo rs, string image, int facings, PaletteReference p) diff --git a/OpenRA.Mods.Common/Warheads/DamageWarhead.cs b/OpenRA.Mods.Common/Warheads/DamageWarhead.cs index 910848571a..9c6f4bcfa6 100644 --- a/OpenRA.Mods.Common/Warheads/DamageWarhead.cs +++ b/OpenRA.Mods.Common/Warheads/DamageWarhead.cs @@ -24,9 +24,8 @@ namespace OpenRA.Mods.Common.Warheads [Desc("Types of damage that this warhead causes. Leave empty for no damage.")] public readonly HashSet DamageTypes = new HashSet(); - [FieldLoader.LoadUsing("LoadVersus")] [Desc("Damage percentage versus each armortype.")] - public readonly Dictionary Versus; + public readonly Dictionary Versus = new Dictionary(); public override bool IsValidAgainst(Actor victim, Actor firedBy) { @@ -36,14 +35,6 @@ namespace OpenRA.Mods.Common.Warheads return base.IsValidAgainst(victim, firedBy); } - public static object LoadVersus(MiniYaml yaml) - { - var nd = yaml.ToDictionary(); - return nd.ContainsKey("Versus") - ? nd["Versus"].ToDictionary(my => FieldLoader.GetValue("(value)", my.Value)) - : new Dictionary(); - } - public int DamageVersus(Actor victim) { var armor = victim.TraitsImplementing()