Fix and enable SA1133, SA1134 style rules.
This commit is contained in:
@@ -21,8 +21,9 @@ namespace OpenRA.Mods.Common.Traits
|
||||
[Desc("Delay for the end game notification in milliseconds.")]
|
||||
public readonly int NotificationDelay = 1500;
|
||||
|
||||
[Translate]
|
||||
[Desc("Description of the objective.")]
|
||||
[Translate] public readonly string Objective = "Destroy all opposition!";
|
||||
public readonly string Objective = "Destroy all opposition!";
|
||||
|
||||
[Desc("Disable the win/loss messages and audio notifications?")]
|
||||
public readonly bool SuppressNotifications = false;
|
||||
|
||||
@@ -76,13 +76,26 @@ namespace OpenRA.Mods.Common.Traits
|
||||
readonly DeveloperModeInfo info;
|
||||
public bool Enabled { get; private set; }
|
||||
|
||||
[Sync] bool fastCharge;
|
||||
[Sync] bool allTech;
|
||||
[Sync] bool fastBuild;
|
||||
[Sync] bool disableShroud;
|
||||
[Sync] bool pathDebug;
|
||||
[Sync] bool unlimitedPower;
|
||||
[Sync] bool buildAnywhere;
|
||||
[Sync]
|
||||
bool fastCharge;
|
||||
|
||||
[Sync]
|
||||
bool allTech;
|
||||
|
||||
[Sync]
|
||||
bool fastBuild;
|
||||
|
||||
[Sync]
|
||||
bool disableShroud;
|
||||
|
||||
[Sync]
|
||||
bool pathDebug;
|
||||
|
||||
[Sync]
|
||||
bool unlimitedPower;
|
||||
|
||||
[Sync]
|
||||
bool buildAnywhere;
|
||||
|
||||
public bool FastCharge { get { return Enabled && fastCharge; } }
|
||||
public bool AllTech { get { return Enabled && allTech; } }
|
||||
|
||||
@@ -25,12 +25,20 @@ namespace OpenRA.Mods.Common.Traits
|
||||
public readonly string Notification = "Beacon";
|
||||
|
||||
public readonly bool IsPlayerPalette = true;
|
||||
[PaletteReference("IsPlayerPalette")] public readonly string Palette = "player";
|
||||
|
||||
[PaletteReference("IsPlayerPalette")]
|
||||
public readonly string Palette = "player";
|
||||
|
||||
public readonly string BeaconImage = "beacon";
|
||||
[SequenceReference("BeaconImage")] public readonly string BeaconSequence = null;
|
||||
[SequenceReference("BeaconImage")] public readonly string ArrowSequence = "arrow";
|
||||
[SequenceReference("BeaconImage")] public readonly string CircleSequence = "circles";
|
||||
|
||||
[SequenceReference("BeaconImage")]
|
||||
public readonly string BeaconSequence = null;
|
||||
|
||||
[SequenceReference("BeaconImage")]
|
||||
public readonly string ArrowSequence = "arrow";
|
||||
|
||||
[SequenceReference("BeaconImage")]
|
||||
public readonly string CircleSequence = "circles";
|
||||
|
||||
public object Create(ActorInitializer init) { return new PlaceBeacon(init.Self, this); }
|
||||
}
|
||||
|
||||
@@ -21,11 +21,13 @@ namespace OpenRA.Mods.Common.Traits
|
||||
[Desc("Allows the player to execute build orders.", " Attach this to the player actor.")]
|
||||
public class PlaceBuildingInfo : ITraitInfo
|
||||
{
|
||||
[PaletteReference]
|
||||
[Desc("Palette to use for rendering the placement sprite.")]
|
||||
[PaletteReference] public readonly string Palette = TileSet.TerrainPaletteInternalName;
|
||||
public readonly string Palette = TileSet.TerrainPaletteInternalName;
|
||||
|
||||
[PaletteReference]
|
||||
[Desc("Palette to use for rendering the placement sprite for line build segments.")]
|
||||
[PaletteReference] public readonly string LineBuildSegmentPalette = TileSet.TerrainPaletteInternalName;
|
||||
public readonly string LineBuildSegmentPalette = TileSet.TerrainPaletteInternalName;
|
||||
|
||||
[Desc("Play NewOptionsNotification this many ticks after building placement.")]
|
||||
public readonly int NewOptionsNotificationDelay = 10;
|
||||
|
||||
@@ -23,7 +23,8 @@ namespace OpenRA.Mods.Common.Traits
|
||||
|
||||
public class PlayerExperience : ISync
|
||||
{
|
||||
[Sync] public int Experience { get; private set; }
|
||||
[Sync]
|
||||
public int Experience { get; private set; }
|
||||
|
||||
public void GiveExperience(int num)
|
||||
{
|
||||
|
||||
@@ -83,10 +83,14 @@ namespace OpenRA.Mods.Common.Traits
|
||||
Cash = info.DefaultCash;
|
||||
}
|
||||
|
||||
[Sync] public int Cash;
|
||||
[Sync]
|
||||
public int Cash;
|
||||
|
||||
[Sync] public int Resources;
|
||||
[Sync] public int ResourceCapacity;
|
||||
[Sync]
|
||||
public int Resources;
|
||||
|
||||
[Sync]
|
||||
public int ResourceCapacity;
|
||||
|
||||
public int Earned;
|
||||
public int Spent;
|
||||
|
||||
@@ -115,10 +115,13 @@ namespace OpenRA.Mods.Common.Traits
|
||||
|
||||
public Actor Actor { get { return self; } }
|
||||
|
||||
[Sync] public bool Enabled { get; protected set; }
|
||||
[Sync]
|
||||
public bool Enabled { get; protected set; }
|
||||
|
||||
public string Faction { get; private set; }
|
||||
[Sync] public bool IsValidFaction { get; private set; }
|
||||
|
||||
[Sync]
|
||||
public bool IsValidFaction { get; private set; }
|
||||
|
||||
public ProductionQueue(ActorInitializer init, Actor playerActor, ProductionQueueInfo info)
|
||||
{
|
||||
|
||||
@@ -36,8 +36,9 @@ namespace OpenRA.Mods.Common.Traits
|
||||
[Desc("Delay for the end game notification in milliseconds.")]
|
||||
public readonly int NotificationDelay = 1500;
|
||||
|
||||
[Translate]
|
||||
[Desc("Description of the objective")]
|
||||
[Translate] public readonly string Objective = "Hold all the strategic positions!";
|
||||
public readonly string Objective = "Hold all the strategic positions!";
|
||||
|
||||
[Desc("Disable the win/loss messages and audio notifications?")]
|
||||
public readonly bool SuppressNotifications = false;
|
||||
@@ -49,7 +50,9 @@ namespace OpenRA.Mods.Common.Traits
|
||||
{
|
||||
readonly StrategicVictoryConditionsInfo info;
|
||||
|
||||
[Sync] public int TicksLeft;
|
||||
[Sync]
|
||||
public int TicksLeft;
|
||||
|
||||
readonly Player player;
|
||||
readonly MissionObjectives mo;
|
||||
readonly bool shortGame;
|
||||
|
||||
Reference in New Issue
Block a user