Fix and enable SA1133, SA1134 style rules.
This commit is contained in:
@@ -79,8 +79,11 @@ namespace OpenRA.Mods.Common.Traits
|
||||
readonly CrateInfo info;
|
||||
bool collected;
|
||||
|
||||
[Sync] int ticks;
|
||||
[Sync] public CPos Location;
|
||||
[Sync]
|
||||
int ticks;
|
||||
|
||||
[Sync]
|
||||
public CPos Location;
|
||||
|
||||
public Crate(ActorInitializer init, CrateInfo info)
|
||||
{
|
||||
|
||||
@@ -23,17 +23,20 @@ namespace OpenRA.Mods.Common.Traits
|
||||
[Desc("Image containing the crate effect animation sequence.")]
|
||||
public readonly string Image = "crate-effects";
|
||||
|
||||
[SequenceReference("Image")]
|
||||
[Desc("Animation sequence played when collected. Leave empty for no effect.")]
|
||||
[SequenceReference("Image")] public readonly string Sequence = null;
|
||||
public readonly string Sequence = null;
|
||||
|
||||
[PaletteReference]
|
||||
[Desc("Palette to draw the animation in.")]
|
||||
[PaletteReference] public readonly string Palette = "effect";
|
||||
public readonly string Palette = "effect";
|
||||
|
||||
[Desc("Audio clip to play when the crate is collected.")]
|
||||
public readonly string Sound = null;
|
||||
|
||||
[NotificationReference("Speech")]
|
||||
[Desc("Notification to play when the crate is collected.")]
|
||||
[NotificationReference("Speech")] public readonly string Notification = null;
|
||||
public readonly string Notification = null;
|
||||
|
||||
[Desc("The earliest time (in ticks) that this crate action can occur on.")]
|
||||
public readonly int TimeDelay = 0;
|
||||
@@ -41,8 +44,9 @@ namespace OpenRA.Mods.Common.Traits
|
||||
[Desc("Only allow this crate action when the collector has these prerequisites")]
|
||||
public readonly string[] Prerequisites = { };
|
||||
|
||||
[ActorReference]
|
||||
[Desc("Actor types that this crate action will not occur for.")]
|
||||
[ActorReference] public string[] ExcludedActorTypes = { };
|
||||
public string[] ExcludedActorTypes = { };
|
||||
|
||||
public override object Create(ActorInitializer init) { return new CrateAction(init.Self, this); }
|
||||
}
|
||||
|
||||
@@ -17,8 +17,10 @@ namespace OpenRA.Mods.Common.Traits
|
||||
[Desc("Fires a weapon at the location when collected.")]
|
||||
class ExplodeCrateActionInfo : CrateActionInfo
|
||||
{
|
||||
[WeaponReference]
|
||||
[FieldLoader.Require]
|
||||
[Desc("The weapon to fire upon collection.")]
|
||||
[WeaponReference, FieldLoader.Require] public string Weapon = null;
|
||||
public string Weapon = null;
|
||||
|
||||
public override object Create(ActorInitializer init) { return new ExplodeCrateAction(init.Self, this); }
|
||||
}
|
||||
|
||||
@@ -19,8 +19,9 @@ namespace OpenRA.Mods.Common.Traits
|
||||
[Desc("Spawns units when collected.")]
|
||||
class GiveUnitCrateActionInfo : CrateActionInfo
|
||||
{
|
||||
[ActorReference]
|
||||
[FieldLoader.Require]
|
||||
[Desc("The list of units to spawn.")]
|
||||
[ActorReference, FieldLoader.Require]
|
||||
public readonly string[] Units = { };
|
||||
|
||||
[Desc("Factions that are allowed to trigger this action.")]
|
||||
|
||||
@@ -17,8 +17,10 @@ namespace OpenRA.Mods.Common.Traits
|
||||
[Desc("Gives a supportpower to the collector.")]
|
||||
class SupportPowerCrateActionInfo : CrateActionInfo
|
||||
{
|
||||
[ActorReference]
|
||||
[FieldLoader.Require]
|
||||
[Desc("Which proxy actor, which grants the support power, to spawn.")]
|
||||
[ActorReference, FieldLoader.Require] public readonly string Proxy = null;
|
||||
public readonly string Proxy = null;
|
||||
|
||||
public override object Create(ActorInitializer init) { return new SupportPowerCrateAction(init.Self, this); }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user