Use nameof() to reference image fields.
This commit is contained in:
@@ -25,11 +25,11 @@ namespace OpenRA.Mods.Common.Traits
|
||||
[Desc("Sequence image where the selection overlay types are defined.")]
|
||||
public readonly string Image = "editor-overlay";
|
||||
|
||||
[SequenceReference("Image")]
|
||||
[SequenceReference(nameof(Image))]
|
||||
[Desc("Sequence to use for the copy overlay.")]
|
||||
public readonly string CopySequence = "copy";
|
||||
|
||||
[SequenceReference("Image")]
|
||||
[SequenceReference(nameof(Image))]
|
||||
[Desc("Sequence to use for the paste overlay.")]
|
||||
public readonly string PasteSequence = "paste";
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
public readonly string Image = "resources";
|
||||
|
||||
[FieldLoader.Require]
|
||||
[SequenceReference("Image")]
|
||||
[SequenceReference(nameof(Image))]
|
||||
[Desc("Randomly chosen image sequences.")]
|
||||
public readonly string[] Sequences = { };
|
||||
|
||||
|
||||
@@ -21,10 +21,10 @@ namespace OpenRA.Mods.Common.Traits
|
||||
public class ShroudRendererInfo : TraitInfo
|
||||
{
|
||||
public readonly string Sequence = "shroud";
|
||||
[SequenceReference("Sequence")]
|
||||
[SequenceReference(nameof(Sequence))]
|
||||
public readonly string[] ShroudVariants = { "shroud" };
|
||||
|
||||
[SequenceReference("Sequence")]
|
||||
[SequenceReference(nameof(Sequence))]
|
||||
public readonly string[] FogVariants = { "fog" };
|
||||
|
||||
[PaletteReference]
|
||||
@@ -40,13 +40,13 @@ namespace OpenRA.Mods.Common.Traits
|
||||
[Desc("Use the upper four bits when calculating frame")]
|
||||
public readonly bool UseExtendedIndex = false;
|
||||
|
||||
[SequenceReference("Sequence")]
|
||||
[SequenceReference(nameof(Sequence))]
|
||||
[Desc("Override for source art that doesn't define a fully shrouded tile")]
|
||||
public readonly string OverrideFullShroud = null;
|
||||
|
||||
public readonly int OverrideShroudIndex = 15;
|
||||
|
||||
[SequenceReference("Sequence")]
|
||||
[SequenceReference(nameof(Sequence))]
|
||||
[Desc("Override for source art that doesn't define a fully fogged tile")]
|
||||
public readonly string OverrideFullFog = null;
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
[Desc("Sprite sequence name")]
|
||||
public readonly string SmokeType = "smoke_m";
|
||||
|
||||
[SequenceReference("SmokeType")]
|
||||
[SequenceReference(nameof(SmokeType))]
|
||||
public readonly string SmokeSequence = "idle";
|
||||
|
||||
[PaletteReference]
|
||||
|
||||
Reference in New Issue
Block a user