Change FieldLoader.LoadUsing to use nameof

This commit is contained in:
teinarss
2021-02-28 17:31:18 +01:00
committed by abcdefg30
parent 6b794ba3e5
commit 53b781960c
12 changed files with 15 additions and 15 deletions

View File

@@ -30,7 +30,7 @@ namespace OpenRA.Mods.Common.Traits
[Desc("What is the fine scan radius of this power?", "For doing a detailed scan in the general target area.", "Minimum is 1")]
public readonly int FineScanRadius = 2;
[FieldLoader.LoadUsing("LoadConsiderations")]
[FieldLoader.LoadUsing(nameof(LoadConsiderations))]
[Desc("The decisions associated with this power")]
public readonly List<Consideration> Considerations = new List<Consideration>();

View File

@@ -19,7 +19,7 @@ namespace OpenRA.Mods.Common.Traits
public class SupportPowerBotModuleInfo : ConditionalTraitInfo, Requires<SupportPowerManagerInfo>
{
[Desc("Tells the AI how to use its support powers.")]
[FieldLoader.LoadUsing("LoadDecisions")]
[FieldLoader.LoadUsing(nameof(LoadDecisions))]
public readonly List<SupportPowerDecision> Decisions = new List<SupportPowerDecision>();
static object LoadDecisions(MiniYaml yaml)

View File

@@ -33,7 +33,7 @@ namespace OpenRA.Mods.Common.Traits
[Desc("x means cell is blocked, capital X means blocked but not counting as targetable, ",
"= means part of the footprint but passable, _ means completely empty.")]
[FieldLoader.LoadUsing("LoadFootprint")]
[FieldLoader.LoadUsing(nameof(LoadFootprint))]
public readonly Dictionary<CVec, FootprintCellType> Footprint;
public readonly CVec Dimensions = new CVec(1, 1);

View File

@@ -34,7 +34,7 @@ namespace OpenRA.Mods.Common.Traits
"If none specified, all armor types the actor has are valid.")]
public readonly BitSet<ArmorType> ArmorTypes = default(BitSet<ArmorType>);
[FieldLoader.LoadUsing("LoadShape")]
[FieldLoader.LoadUsing(nameof(LoadShape))]
[Desc("Engine comes with support for `Circle`, `Capsule`, `Polygon` and `Rectangle`. Defaults to `Circle` when left empty.")]
public readonly IHitShape Type;

View File

@@ -76,7 +76,7 @@ namespace OpenRA.Mods.Common.Traits
[Desc("Types of damage that are caused while crushing. Leave empty for no damage types.")]
public readonly BitSet<DamageType> CrushDamageTypes = default(BitSet<DamageType>);
[FieldLoader.LoadUsing("LoadSpeeds", true)]
[FieldLoader.LoadUsing(nameof(LoadSpeeds), true)]
[Desc("Lower the value on rough terrain. Leave out entries for impassable terrain.")]
public readonly Dictionary<string, TerrainInfo> TerrainSpeeds;

View File

@@ -49,7 +49,7 @@ namespace OpenRA.Mods.Common.Traits
[PaletteReference]
public readonly string Palette = TileSet.TerrainPaletteInternalName;
[FieldLoader.LoadUsing("LoadInitialSmudges")]
[FieldLoader.LoadUsing(nameof(LoadInitialSmudges))]
public readonly Dictionary<CPos, MapSmudge> InitialSmudges;
public static object LoadInitialSmudges(MiniYaml yaml)