Fix and enable SA1133, SA1134 style rules.
This commit is contained in:
@@ -20,7 +20,8 @@ namespace OpenRA.Traits
|
||||
public class DebugPauseState : ISync
|
||||
{
|
||||
readonly World world;
|
||||
[Sync] public bool Paused { get { return world.Paused; } }
|
||||
[Sync]
|
||||
public bool Paused { get { return world.Paused; } }
|
||||
public DebugPauseState(World world) { this.world = world; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,11 +17,13 @@ namespace OpenRA.Traits
|
||||
[Desc("Add this to the World actor definition.")]
|
||||
public class FixedColorPaletteInfo : ITraitInfo
|
||||
{
|
||||
[PaletteReference]
|
||||
[Desc("The name of the palette to base off.")]
|
||||
[PaletteReference] public readonly string Base = TileSet.TerrainPaletteInternalName;
|
||||
public readonly string Base = TileSet.TerrainPaletteInternalName;
|
||||
|
||||
[PaletteDefinition]
|
||||
[Desc("The name of the resulting palette")]
|
||||
[PaletteDefinition] public readonly string Name = "resources";
|
||||
public readonly string Name = "resources";
|
||||
|
||||
[Desc("Remap these indices to pre-defined colors.")]
|
||||
public readonly int[] RemapIndex = { };
|
||||
|
||||
@@ -204,8 +204,11 @@ namespace OpenRA.Traits
|
||||
|
||||
public class FrozenActorLayer : IRender, ITick, ISync
|
||||
{
|
||||
[Sync] public int VisibilityHash;
|
||||
[Sync] public int FrozenHash;
|
||||
[Sync]
|
||||
public int VisibilityHash;
|
||||
|
||||
[Sync]
|
||||
public int FrozenHash;
|
||||
|
||||
readonly int binSize;
|
||||
readonly World world;
|
||||
|
||||
@@ -19,11 +19,13 @@ namespace OpenRA.Traits
|
||||
[Desc("Define a player palette by swapping palette indices.")]
|
||||
public class IndexedPlayerPaletteInfo : ITraitInfo, IRulesetLoaded
|
||||
{
|
||||
[PaletteReference]
|
||||
[Desc("The name of the palette to base off.")]
|
||||
[PaletteReference] public readonly string BasePalette = null;
|
||||
public readonly string BasePalette = null;
|
||||
|
||||
[PaletteDefinition(true)]
|
||||
[Desc("The prefix for the resulting player palettes")]
|
||||
[PaletteDefinition(true)] public readonly string BaseName = "player";
|
||||
public readonly string BaseName = "player";
|
||||
|
||||
[Desc("Remap these indices to player colors.")]
|
||||
public readonly int[] RemapIndex = { };
|
||||
|
||||
@@ -17,11 +17,13 @@ namespace OpenRA.Traits
|
||||
[Desc("Add this to the Player actor definition.")]
|
||||
public class PlayerColorPaletteInfo : ITraitInfo
|
||||
{
|
||||
[PaletteReference]
|
||||
[Desc("The name of the palette to base off.")]
|
||||
[PaletteReference] public readonly string BasePalette = null;
|
||||
public readonly string BasePalette = null;
|
||||
|
||||
[PaletteDefinition(true)]
|
||||
[Desc("The prefix for the resulting player palettes")]
|
||||
[PaletteDefinition(true)] public readonly string BaseName = "player";
|
||||
public readonly string BaseName = "player";
|
||||
|
||||
[Desc("Remap these indices to player colors.")]
|
||||
public readonly int[] RemapIndex = { };
|
||||
|
||||
@@ -18,8 +18,9 @@ namespace OpenRA.Traits
|
||||
[Desc("Add this to the Player actor definition.")]
|
||||
public class PlayerHighlightPaletteInfo : ITraitInfo
|
||||
{
|
||||
[PaletteDefinition(true)]
|
||||
[Desc("The prefix for the resulting player palettes")]
|
||||
[PaletteDefinition(true)] public readonly string BaseName = "highlight";
|
||||
public readonly string BaseName = "highlight";
|
||||
|
||||
public object Create(ActorInitializer init) { return new PlayerHighlightPalette(this); }
|
||||
}
|
||||
|
||||
@@ -102,7 +102,8 @@ namespace OpenRA.Traits
|
||||
// Per-cell cache of the resolved cell type (shroud/fog/visible)
|
||||
readonly CellLayer<ShroudCellType> resolvedType;
|
||||
|
||||
[Sync] bool disabled;
|
||||
[Sync]
|
||||
bool disabled;
|
||||
public bool Disabled
|
||||
{
|
||||
get
|
||||
|
||||
@@ -20,7 +20,8 @@ namespace OpenRA.Traits
|
||||
+ "Defaults to the actor name when not defined or inherited.")]
|
||||
public readonly string Class = null;
|
||||
|
||||
[VoiceReference] public readonly string Voice = "Select";
|
||||
[VoiceReference]
|
||||
public readonly string Voice = "Select";
|
||||
|
||||
public override object Create(ActorInitializer init) { return new Selectable(init.Self, this); }
|
||||
}
|
||||
|
||||
@@ -154,7 +154,8 @@ namespace OpenRA.Traits
|
||||
Order IssueOrder(Actor self, IOrderTargeter order, Target target, bool queued);
|
||||
}
|
||||
|
||||
[Flags] public enum TargetModifiers { None = 0, ForceAttack = 1, ForceQueue = 2, ForceMove = 4 }
|
||||
[Flags]
|
||||
public enum TargetModifiers { None = 0, ForceAttack = 1, ForceQueue = 2, ForceMove = 4 }
|
||||
|
||||
public static class TargetModifiersExts
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user