Fix and enable SA1133, SA1134 style rules.
This commit is contained in:
@@ -40,8 +40,9 @@ namespace OpenRA.Mods.Common.Traits
|
||||
public readonly int[] NorthOffset = null;
|
||||
public readonly int[] SouthOffset = null;
|
||||
|
||||
[WeaponReference]
|
||||
[Desc("The name of the weapon to use when demolishing the bridge")]
|
||||
[WeaponReference] public readonly string DemolishWeapon = "Demolish";
|
||||
public readonly string DemolishWeapon = "Demolish";
|
||||
|
||||
public WeaponInfo DemolishWeaponInfo { get; private set; }
|
||||
|
||||
|
||||
@@ -21,8 +21,9 @@ namespace OpenRA.Mods.Common.Traits
|
||||
|
||||
public readonly DamageState DamageState = DamageState.Undamaged;
|
||||
|
||||
[ActorReference]
|
||||
[Desc("Actor type to replace with on repair.")]
|
||||
[ActorReference] public readonly string ReplaceWithActor = null;
|
||||
public readonly string ReplaceWithActor = null;
|
||||
|
||||
public readonly CVec[] NeighbourOffsets = { };
|
||||
|
||||
|
||||
@@ -247,7 +247,9 @@ namespace OpenRA.Mods.Common.Traits
|
||||
{
|
||||
public readonly BuildingInfo Info;
|
||||
|
||||
[Sync] readonly CPos topLeft;
|
||||
[Sync]
|
||||
readonly CPos topLeft;
|
||||
|
||||
readonly Actor self;
|
||||
readonly BuildingInfluence influence;
|
||||
|
||||
|
||||
@@ -18,7 +18,8 @@ namespace OpenRA.Mods.Common.Traits
|
||||
"If you want more than one unit to appear copy this section and assign IDs like FreeActor@2, ...")]
|
||||
public class FreeActorInfo : ConditionalTraitInfo
|
||||
{
|
||||
[ActorReference, FieldLoader.Require]
|
||||
[ActorReference]
|
||||
[FieldLoader.Require]
|
||||
[Desc("Name of the actor.")]
|
||||
public readonly string Actor = null;
|
||||
|
||||
|
||||
@@ -19,7 +19,8 @@ namespace OpenRA.Mods.Common.Traits
|
||||
"If you want more than one unit to be delivered, copy this section and assign IDs like FreeActorWithDelivery@2, ...")]
|
||||
public class FreeActorWithDeliveryInfo : FreeActorInfo
|
||||
{
|
||||
[ActorReference, FieldLoader.Require]
|
||||
[ActorReference]
|
||||
[FieldLoader.Require]
|
||||
[Desc("Name of the delivering actor. This actor must have the `Carryall` trait")]
|
||||
public readonly string DeliveringActor = null;
|
||||
|
||||
|
||||
@@ -42,7 +42,10 @@ namespace OpenRA.Mods.Common.Traits
|
||||
public readonly IEnumerable<CPos> Footprint;
|
||||
|
||||
public readonly int OpenPosition;
|
||||
[Sync] public int Position { get; private set; }
|
||||
|
||||
[Sync]
|
||||
public int Position { get; private set; }
|
||||
|
||||
int desiredPosition;
|
||||
int remainingOpenTime;
|
||||
|
||||
|
||||
@@ -26,8 +26,9 @@ namespace OpenRA.Mods.Common.Traits
|
||||
|
||||
public readonly CVec[] NeighbourOffsets = { };
|
||||
|
||||
[WeaponReference]
|
||||
[Desc("The name of the weapon to use when demolishing the bridge")]
|
||||
[WeaponReference] public readonly string DemolishWeapon = "Demolish";
|
||||
public readonly string DemolishWeapon = "Demolish";
|
||||
|
||||
public WeaponInfo DemolishWeaponInfo { get; private set; }
|
||||
|
||||
|
||||
@@ -18,7 +18,9 @@ namespace OpenRA.Mods.Common.Traits
|
||||
public enum LineBuildDirection { Unset, X, Y }
|
||||
public class LineBuildDirectionInit : IActorInit<LineBuildDirection>
|
||||
{
|
||||
[FieldFromYamlKey] readonly LineBuildDirection value = LineBuildDirection.Unset;
|
||||
[FieldFromYamlKey]
|
||||
readonly LineBuildDirection value = LineBuildDirection.Unset;
|
||||
|
||||
public LineBuildDirectionInit() { }
|
||||
public LineBuildDirectionInit(LineBuildDirection init) { value = init; }
|
||||
public LineBuildDirection Value(World world) { return value; }
|
||||
@@ -26,7 +28,9 @@ namespace OpenRA.Mods.Common.Traits
|
||||
|
||||
public class LineBuildParentInit : IActorInit<Actor[]>
|
||||
{
|
||||
[FieldFromYamlKey] public readonly string[] ParentNames = new string[0];
|
||||
[FieldFromYamlKey]
|
||||
public readonly string[] ParentNames = new string[0];
|
||||
|
||||
readonly Actor[] parents = null;
|
||||
|
||||
public LineBuildParentInit() { }
|
||||
|
||||
@@ -20,13 +20,18 @@ namespace OpenRA.Mods.Common.Traits
|
||||
public class RallyPointInfo : ITraitInfo
|
||||
{
|
||||
public readonly string Image = "rallypoint";
|
||||
[SequenceReference("Image")] public readonly string FlagSequence = "flag";
|
||||
[SequenceReference("Image")] public readonly string CirclesSequence = "circles";
|
||||
|
||||
[SequenceReference("Image")]
|
||||
public readonly string FlagSequence = "flag";
|
||||
|
||||
[SequenceReference("Image")]
|
||||
public readonly string CirclesSequence = "circles";
|
||||
|
||||
public readonly string Cursor = "ability";
|
||||
|
||||
[PaletteReference("IsPlayerPalette")]
|
||||
[Desc("Custom indicator palette name")]
|
||||
[PaletteReference("IsPlayerPalette")] public readonly string Palette = "player";
|
||||
public readonly string Palette = "player";
|
||||
|
||||
[Desc("Custom palette is a player palette BaseName")]
|
||||
public readonly bool IsPlayerPalette = true;
|
||||
@@ -40,7 +45,9 @@ namespace OpenRA.Mods.Common.Traits
|
||||
{
|
||||
const string OrderID = "SetRallyPoint";
|
||||
|
||||
[Sync] public CPos Location;
|
||||
[Sync]
|
||||
public CPos Location;
|
||||
|
||||
public RallyPointInfo Info;
|
||||
public string PaletteName { get; private set; }
|
||||
|
||||
|
||||
@@ -63,8 +63,11 @@ namespace OpenRA.Mods.Common.Traits
|
||||
int currentDisplayTick = 0;
|
||||
int currentDisplayValue = 0;
|
||||
|
||||
[Sync] Actor dockedHarv = null;
|
||||
[Sync] bool preventDock = false;
|
||||
[Sync]
|
||||
Actor dockedHarv = null;
|
||||
|
||||
[Sync]
|
||||
bool preventDock = false;
|
||||
|
||||
public bool AllowDocking { get { return !preventDock; } }
|
||||
public CVec DeliveryOffset { get { return info.DockOffset; } }
|
||||
|
||||
Reference in New Issue
Block a user