Change FieldLoader.LoadUsing to use nameof
This commit is contained in:
@@ -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>();
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user