Fix and enable SA1133, SA1134 style rules.

This commit is contained in:
Paul Chote
2019-05-23 18:43:21 +00:00
committed by abcdefg30
parent fbf9461890
commit 78a70be0d4
214 changed files with 1012 additions and 432 deletions

View File

@@ -25,7 +25,8 @@ namespace OpenRA.Mods.Common.Traits
[Desc("Chance (out of 100) the unit has to enter panic mode when attacked.")]
public readonly int AttackPanicChance = 20;
[SequenceReference(null, true)] public readonly string PanicSequencePrefix = "panic-";
[SequenceReference(null, true)]
public readonly string PanicSequencePrefix = "panic-";
public object Create(ActorInitializer init) { return new ScaredyCat(init.Self, this); }
}
@@ -34,8 +35,10 @@ namespace OpenRA.Mods.Common.Traits
{
readonly ScaredyCatInfo info;
readonly Mobile mobile;
[Sync] readonly Actor self;
[Sync] int panicStartedTick;
readonly Actor self;
[Sync]
int panicStartedTick;
bool Panicking { get { return panicStartedTick > 0; } }
bool IRenderInfantrySequenceModifier.IsModifyingSequence { get { return Panicking; } }

View File

@@ -34,7 +34,8 @@ namespace OpenRA.Mods.Common.Traits
public readonly WVec ProneOffset = new WVec(500, 0, 0);
[SequenceReference(null, true)] public readonly string ProneSequencePrefix = "prone-";
[SequenceReference(null, true)]
public readonly string ProneSequencePrefix = "prone-";
public override object Create(ActorInitializer init) { return new TakeCover(init, this); }
}
@@ -42,7 +43,9 @@ namespace OpenRA.Mods.Common.Traits
public class TakeCover : Turreted, INotifyDamage, IDamageModifier, ISpeedModifier, ISync, IRenderInfantrySequenceModifier
{
readonly TakeCoverInfo info;
[Sync] int remainingProneTime = 0;
[Sync]
int remainingProneTime = 0;
bool IsProne { get { return remainingProneTime > 0; } }
bool IRenderInfantrySequenceModifier.IsModifyingSequence { get { return IsProne; } }