Fix and enable SA1133, SA1134 style rules.
This commit is contained in:
@@ -21,10 +21,14 @@ namespace OpenRA.Mods.Cnc.Projectiles
|
||||
{
|
||||
public readonly string Image = "litning";
|
||||
|
||||
[SequenceReference("Image")] public readonly string BrightSequence = "bright";
|
||||
[SequenceReference("Image")] public readonly string DimSequence = "dim";
|
||||
[SequenceReference("Image")]
|
||||
public readonly string BrightSequence = "bright";
|
||||
|
||||
[PaletteReference] public readonly string Palette = "effect";
|
||||
[SequenceReference("Image")]
|
||||
public readonly string DimSequence = "dim";
|
||||
|
||||
[PaletteReference]
|
||||
public readonly string Palette = "effect";
|
||||
|
||||
public readonly int BrightZaps = 1;
|
||||
public readonly int DimZaps = 2;
|
||||
@@ -45,7 +49,9 @@ namespace OpenRA.Mods.Cnc.Projectiles
|
||||
TeslaZapRenderable zap;
|
||||
int ticksUntilRemove;
|
||||
int damageDuration;
|
||||
[Sync] WPos target;
|
||||
|
||||
[Sync]
|
||||
WPos target;
|
||||
|
||||
public TeslaZap(TeslaZapInfo info, ProjectileArgs args)
|
||||
{
|
||||
|
||||
@@ -28,14 +28,17 @@ namespace OpenRA.Mods.Cnc.Traits
|
||||
[Desc("The percentage of damage that is received while this actor is closed.")]
|
||||
public readonly int ClosedDamageMultiplier = 50;
|
||||
|
||||
[SequenceReference]
|
||||
[Desc("Sequence to play when opening.")]
|
||||
[SequenceReference] public readonly string OpeningSequence = "opening";
|
||||
public readonly string OpeningSequence = "opening";
|
||||
|
||||
[SequenceReference]
|
||||
[Desc("Sequence to play when closing.")]
|
||||
[SequenceReference] public readonly string ClosingSequence = "closing";
|
||||
public readonly string ClosingSequence = "closing";
|
||||
|
||||
[SequenceReference]
|
||||
[Desc("Idle sequence to play when closed.")]
|
||||
[SequenceReference] public readonly string ClosedIdleSequence = "closed-idle";
|
||||
public readonly string ClosedIdleSequence = "closed-idle";
|
||||
|
||||
[Desc("Which sprite body to play the animation on.")]
|
||||
public readonly string Body = "body";
|
||||
|
||||
@@ -41,8 +41,11 @@ namespace OpenRA.Mods.Cnc.Traits
|
||||
{
|
||||
readonly AttackTeslaInfo info;
|
||||
|
||||
[Sync] int charges;
|
||||
[Sync] int timeToRecharge;
|
||||
[Sync]
|
||||
int charges;
|
||||
|
||||
[Sync]
|
||||
int timeToRecharge;
|
||||
|
||||
public AttackTesla(Actor self, AttackTeslaInfo info)
|
||||
: base(self, info)
|
||||
|
||||
@@ -25,8 +25,9 @@ namespace OpenRA.Mods.Cnc.Traits
|
||||
[NotificationReference("Speech")]
|
||||
public readonly string ReadyAudio = "Reinforce";
|
||||
|
||||
[ActorReference(typeof(AircraftInfo))]
|
||||
[Desc("Cargo aircraft used for delivery. Must have the `Aircraft` trait.")]
|
||||
[ActorReference(typeof(AircraftInfo))] public readonly string ActorType = "c17";
|
||||
public readonly string ActorType = "c17";
|
||||
|
||||
public override object Create(ActorInitializer init) { return new ProductionAirdrop(init, this); }
|
||||
}
|
||||
|
||||
@@ -48,8 +48,11 @@ namespace OpenRA.Mods.Cnc.Traits
|
||||
IPositionable iPositionable;
|
||||
|
||||
// Return-to-origin logic
|
||||
[Sync] public CPos Origin;
|
||||
[Sync] public int ReturnTicks = 0;
|
||||
[Sync]
|
||||
public CPos Origin;
|
||||
|
||||
[Sync]
|
||||
public int ReturnTicks = 0;
|
||||
|
||||
public Chronoshiftable(ActorInitializer init, ChronoshiftableInfo info)
|
||||
: base(info)
|
||||
@@ -180,7 +183,9 @@ namespace OpenRA.Mods.Cnc.Traits
|
||||
|
||||
public class ChronoshiftReturnInit : IActorInit<int>
|
||||
{
|
||||
[FieldFromYamlKey] readonly int value = 0;
|
||||
[FieldFromYamlKey]
|
||||
readonly int value = 0;
|
||||
|
||||
public ChronoshiftReturnInit() { }
|
||||
public ChronoshiftReturnInit(int init) { value = init; }
|
||||
public int Value(World world) { return value; }
|
||||
@@ -188,7 +193,9 @@ namespace OpenRA.Mods.Cnc.Traits
|
||||
|
||||
public class ChronoshiftDurationInit : IActorInit<int>
|
||||
{
|
||||
[FieldFromYamlKey] readonly int value = 0;
|
||||
[FieldFromYamlKey]
|
||||
readonly int value = 0;
|
||||
|
||||
public ChronoshiftDurationInit() { }
|
||||
public ChronoshiftDurationInit(int init) { value = init; }
|
||||
public int Value(World world) { return value; }
|
||||
@@ -196,7 +203,9 @@ namespace OpenRA.Mods.Cnc.Traits
|
||||
|
||||
public class ChronoshiftOriginInit : IActorInit<CPos>
|
||||
{
|
||||
[FieldFromYamlKey] readonly CPos value;
|
||||
[FieldFromYamlKey]
|
||||
readonly CPos value;
|
||||
|
||||
public ChronoshiftOriginInit(CPos init) { value = init; }
|
||||
public CPos Value(World world) { return value; }
|
||||
}
|
||||
|
||||
@@ -25,7 +25,8 @@ namespace OpenRA.Mods.Cnc.Traits
|
||||
"Otherwise, a vortex animation is played and damage is dealt each tick, ignoring modifiers.")]
|
||||
public class ConyardChronoReturnInfo : IObservesVariablesInfo, Requires<HealthInfo>, Requires<WithSpriteBodyInfo>
|
||||
{
|
||||
[Desc("Sequence name with the baked-in vortex animation"), SequenceReference]
|
||||
[SequenceReference]
|
||||
[Desc("Sequence name with the baked-in vortex animation")]
|
||||
public readonly string Sequence = "pdox";
|
||||
|
||||
[Desc("Sprite body to play the vortex animation on.")]
|
||||
|
||||
@@ -73,7 +73,8 @@ namespace OpenRA.Mods.Cnc.Traits
|
||||
[Desc("Provides access to the disguise command, which makes the actor appear to be another player's actor.")]
|
||||
class DisguiseInfo : ITraitInfo
|
||||
{
|
||||
[VoiceReference] public readonly string Voice = "Action";
|
||||
[VoiceReference]
|
||||
public readonly string Voice = "Action";
|
||||
|
||||
[GrantedConditionReference]
|
||||
[Desc("The condition to grant to self while disguised.")]
|
||||
|
||||
@@ -20,10 +20,12 @@ namespace OpenRA.Mods.Cnc.Traits
|
||||
[Desc("Sprite collection for symbols.")]
|
||||
public readonly string Image = "gpsdot";
|
||||
|
||||
[SequenceReference("Image")]
|
||||
[Desc("Sprite used for this actor.")]
|
||||
[SequenceReference("Image")] public readonly string String = "Infantry";
|
||||
public readonly string String = "Infantry";
|
||||
|
||||
[PaletteReference(true)] public readonly string IndicatorPalettePrefix = "player";
|
||||
[PaletteReference(true)]
|
||||
public readonly string IndicatorPalettePrefix = "player";
|
||||
|
||||
public object Create(ActorInitializer init) { return new GpsDot(this); }
|
||||
}
|
||||
|
||||
@@ -26,12 +26,18 @@ namespace OpenRA.Mods.Cnc.Traits
|
||||
|
||||
class GpsWatcher : ISync, IPreventsShroudReset
|
||||
{
|
||||
[Sync] public bool Launched { get; private set; }
|
||||
[Sync] public bool GrantedAllies { get; private set; }
|
||||
[Sync] public bool Granted { get; private set; }
|
||||
[Sync]
|
||||
public bool Launched { get; private set; }
|
||||
|
||||
[Sync]
|
||||
public bool GrantedAllies { get; private set; }
|
||||
|
||||
[Sync]
|
||||
public bool Granted { get; private set; }
|
||||
|
||||
// Whether this watcher has explored the terrain (by becoming Launched, or an ally becoming Launched)
|
||||
[Sync] bool explored;
|
||||
[Sync]
|
||||
bool explored;
|
||||
|
||||
readonly Player owner;
|
||||
|
||||
|
||||
@@ -17,7 +17,9 @@ namespace OpenRA.Mods.Cnc.Traits
|
||||
{
|
||||
class InfiltrateForSupportPowerInfo : ITraitInfo
|
||||
{
|
||||
[ActorReference, FieldLoader.Require] public readonly string Proxy = null;
|
||||
[ActorReference]
|
||||
[FieldLoader.Require]
|
||||
public readonly string Proxy = null;
|
||||
|
||||
public readonly BitSet<TargetableType> Types = default(BitSet<TargetableType>);
|
||||
|
||||
|
||||
@@ -21,7 +21,8 @@ namespace OpenRA.Mods.Cnc.Traits
|
||||
[Desc("Transform into a different actor type.")]
|
||||
class InfiltrateForTransformInfo : ITraitInfo
|
||||
{
|
||||
[ActorReference, FieldLoader.Require]
|
||||
[ActorReference]
|
||||
[FieldLoader.Require]
|
||||
public readonly string IntoActor = null;
|
||||
|
||||
public readonly int ForceHealthPercentage = 0;
|
||||
|
||||
@@ -25,40 +25,52 @@ namespace OpenRA.Mods.Cnc.Traits
|
||||
{
|
||||
class MadTankInfo : ITraitInfo, IRulesetLoaded, Requires<ExplodesInfo>, Requires<WithFacingSpriteBodyInfo>
|
||||
{
|
||||
[SequenceReference] public readonly string ThumpSequence = "piston";
|
||||
[SequenceReference]
|
||||
public readonly string ThumpSequence = "piston";
|
||||
|
||||
public readonly int ThumpInterval = 8;
|
||||
|
||||
[WeaponReference]
|
||||
public readonly string ThumpDamageWeapon = "MADTankThump";
|
||||
|
||||
public readonly int ThumpShakeIntensity = 3;
|
||||
|
||||
public readonly float2 ThumpShakeMultiplier = new float2(1, 0);
|
||||
|
||||
public readonly int ThumpShakeTime = 10;
|
||||
|
||||
[Desc("Measured in ticks.")]
|
||||
public readonly int ChargeDelay = 96;
|
||||
|
||||
public readonly string ChargeSound = "madchrg2.aud";
|
||||
|
||||
[Desc("Measured in ticks.")]
|
||||
public readonly int DetonationDelay = 42;
|
||||
|
||||
public readonly string DetonationSound = "madexplo.aud";
|
||||
|
||||
[WeaponReference]
|
||||
public readonly string DetonationWeapon = "MADTankDetonate";
|
||||
|
||||
[ActorReference]
|
||||
public readonly string DriverActor = "e1";
|
||||
|
||||
[VoiceReference] public readonly string Voice = "Action";
|
||||
[VoiceReference]
|
||||
public readonly string Voice = "Action";
|
||||
|
||||
[GrantedConditionReference]
|
||||
[Desc("The condition to grant to self while deployed.")]
|
||||
public readonly string DeployedCondition = null;
|
||||
|
||||
public WeaponInfo ThumpDamageWeaponInfo { get; private set; }
|
||||
|
||||
public WeaponInfo DetonationWeaponInfo { get; private set; }
|
||||
|
||||
[Desc("Types of damage that this trait causes to self while self-destructing. Leave empty for no damage types.")]
|
||||
public readonly BitSet<DamageType> DamageTypes = default(BitSet<DamageType>);
|
||||
|
||||
public object Create(ActorInitializer init) { return new MadTank(init.Self, this); }
|
||||
|
||||
public void RulesetLoaded(Ruleset rules, ActorInfo ai)
|
||||
{
|
||||
WeaponInfo thumpDamageWeapon;
|
||||
|
||||
@@ -23,14 +23,16 @@ namespace OpenRA.Mods.Cnc.Traits
|
||||
{
|
||||
public class MinelayerInfo : ITraitInfo, Requires<RearmableInfo>
|
||||
{
|
||||
[ActorReference] public readonly string Mine = "minv";
|
||||
[ActorReference]
|
||||
public readonly string Mine = "minv";
|
||||
|
||||
public readonly string AmmoPoolName = "primary";
|
||||
|
||||
public readonly WDist MinefieldDepth = new WDist(1536);
|
||||
|
||||
[VoiceReference]
|
||||
[Desc("Voice to use when ordered to lay a minefield.")]
|
||||
[VoiceReference] public readonly string Voice = "Action";
|
||||
public readonly string Voice = "Action";
|
||||
|
||||
public object Create(ActorInitializer init) { return new Minelayer(init.Self, this); }
|
||||
}
|
||||
@@ -39,10 +41,13 @@ namespace OpenRA.Mods.Cnc.Traits
|
||||
{
|
||||
readonly MinelayerInfo info;
|
||||
|
||||
/* TODO: [Sync] when sync can cope with arrays! */
|
||||
// TODO: [Sync] when sync can cope with arrays!
|
||||
public CPos[] Minefield = null;
|
||||
|
||||
readonly Sprite tile;
|
||||
[Sync] CPos minefieldStart;
|
||||
|
||||
[Sync]
|
||||
CPos minefieldStart;
|
||||
|
||||
public Minelayer(Actor self, MinelayerInfo info)
|
||||
{
|
||||
|
||||
@@ -52,7 +52,8 @@ namespace OpenRA.Mods.Cnc.Traits
|
||||
[Desc("Flash the screen on teleporting.")]
|
||||
public readonly bool FlashScreen = false;
|
||||
|
||||
[VoiceReference] public readonly string Voice = "Action";
|
||||
[VoiceReference]
|
||||
public readonly string Voice = "Action";
|
||||
|
||||
public object Create(ActorInitializer init) { return new PortableChrono(init.Self, this); }
|
||||
}
|
||||
@@ -61,7 +62,8 @@ namespace OpenRA.Mods.Cnc.Traits
|
||||
{
|
||||
public readonly PortableChronoInfo Info;
|
||||
readonly IMove move;
|
||||
[Sync] int chargeTick = 0;
|
||||
[Sync]
|
||||
int chargeTick = 0;
|
||||
|
||||
public PortableChrono(Actor self, PortableChronoInfo info)
|
||||
{
|
||||
|
||||
@@ -20,9 +20,11 @@ namespace OpenRA.Mods.Cnc.Traits
|
||||
{
|
||||
public class WithBuildingBibInfo : ITraitInfo, Requires<BuildingInfo>, IRenderActorPreviewSpritesInfo, IActorPreviewInitInfo, Requires<RenderSpritesInfo>
|
||||
{
|
||||
[SequenceReference] public readonly string Sequence = "bib";
|
||||
[SequenceReference]
|
||||
public readonly string Sequence = "bib";
|
||||
|
||||
[PaletteReference] public readonly string Palette = TileSet.TerrainPaletteInternalName;
|
||||
[PaletteReference]
|
||||
public readonly string Palette = TileSet.TerrainPaletteInternalName;
|
||||
|
||||
public readonly bool HasMinibib = false;
|
||||
|
||||
@@ -130,7 +132,9 @@ namespace OpenRA.Mods.Cnc.Traits
|
||||
|
||||
class HideBibPreviewInit : IActorInit<bool>, ISuppressInitExport
|
||||
{
|
||||
[FieldFromYamlKey] readonly bool value = true;
|
||||
[FieldFromYamlKey]
|
||||
readonly bool value = true;
|
||||
|
||||
public HideBibPreviewInit() { }
|
||||
public HideBibPreviewInit(bool init) { value = init; }
|
||||
public bool Value(World world) { return value; }
|
||||
|
||||
@@ -19,7 +19,8 @@ namespace OpenRA.Mods.Cnc.Traits.Render
|
||||
[Desc("Building animation to play when ProductionAirdrop is used to deliver units.")]
|
||||
public class WithDeliveryAnimationInfo : ConditionalTraitInfo, Requires<WithSpriteBodyInfo>
|
||||
{
|
||||
[SequenceReference] public readonly string ActiveSequence = "active";
|
||||
[SequenceReference]
|
||||
public readonly string ActiveSequence = "active";
|
||||
|
||||
[Desc("Which sprite body to play the animation on.")]
|
||||
public readonly string Body = "body";
|
||||
|
||||
@@ -19,14 +19,16 @@ namespace OpenRA.Mods.Cnc.Traits.Render
|
||||
[Desc("Rendered on the refinery when a voxel harvester is docking and undocking.")]
|
||||
public class WithDockingOverlayInfo : PausableConditionalTraitInfo, Requires<RenderSpritesInfo>, Requires<BodyOrientationInfo>
|
||||
{
|
||||
[SequenceReference]
|
||||
[Desc("Sequence name to use")]
|
||||
[SequenceReference] public readonly string Sequence = "unload-overlay";
|
||||
public readonly string Sequence = "unload-overlay";
|
||||
|
||||
[Desc("Position relative to body")]
|
||||
public readonly WVec Offset = WVec.Zero;
|
||||
|
||||
[PaletteReference("IsPlayerPalette")]
|
||||
[Desc("Custom palette name")]
|
||||
[PaletteReference("IsPlayerPalette")] public readonly string Palette = null;
|
||||
public readonly string Palette = null;
|
||||
|
||||
[Desc("Custom palette is a player palette BaseName")]
|
||||
public readonly bool IsPlayerPalette = false;
|
||||
|
||||
@@ -23,10 +23,17 @@ namespace OpenRA.Mods.Cnc.Traits.Render
|
||||
[Desc("Turreted 'Turret' key to display")]
|
||||
public readonly string Turret = "primary";
|
||||
|
||||
[SequenceReference] public readonly string LeftSequence = "left";
|
||||
[SequenceReference] public readonly string RightSequence = "right";
|
||||
[SequenceReference] public readonly string WakeLeftSequence = "wake-left";
|
||||
[SequenceReference] public readonly string WakeRightSequence = "wake-right";
|
||||
[SequenceReference]
|
||||
public readonly string LeftSequence = "left";
|
||||
|
||||
[SequenceReference]
|
||||
public readonly string RightSequence = "right";
|
||||
|
||||
[SequenceReference]
|
||||
public readonly string WakeLeftSequence = "wake-left";
|
||||
|
||||
[SequenceReference]
|
||||
public readonly string WakeRightSequence = "wake-right";
|
||||
|
||||
public override object Create(ActorInitializer init) { return new WithGunboatBody(init, this); }
|
||||
}
|
||||
|
||||
@@ -20,9 +20,15 @@ namespace OpenRA.Mods.Cnc.Traits.Render
|
||||
public class WithLandingCraftAnimationInfo : ITraitInfo, Requires<IMoveInfo>, Requires<WithSpriteBodyInfo>, Requires<CargoInfo>
|
||||
{
|
||||
public readonly HashSet<string> OpenTerrainTypes = new HashSet<string> { "Clear" };
|
||||
[SequenceReference] public readonly string OpenSequence = "open";
|
||||
[SequenceReference] public readonly string CloseSequence = "close";
|
||||
[SequenceReference] public readonly string UnloadSequence = "unload";
|
||||
|
||||
[SequenceReference]
|
||||
public readonly string OpenSequence = "open";
|
||||
|
||||
[SequenceReference]
|
||||
public readonly string CloseSequence = "close";
|
||||
|
||||
[SequenceReference]
|
||||
public readonly string UnloadSequence = "unload";
|
||||
|
||||
[Desc("Which sprite body to play the animation on.")]
|
||||
public readonly string Body = "body";
|
||||
|
||||
@@ -18,7 +18,8 @@ namespace OpenRA.Mods.Cnc.Traits.Render
|
||||
[Desc("Provides an overlay for the Tiberian Dawn hover craft.")]
|
||||
public class WithRoofInfo : ITraitInfo, Requires<RenderSpritesInfo>
|
||||
{
|
||||
[SequenceReference] public readonly string Sequence = "roof";
|
||||
[SequenceReference]
|
||||
public readonly string Sequence = "roof";
|
||||
|
||||
public object Create(ActorInitializer init) { return new WithRoof(init.Self, this); }
|
||||
}
|
||||
|
||||
@@ -18,8 +18,9 @@ namespace OpenRA.Mods.Cnc.Traits.Render
|
||||
[Desc("This actor displays a charge-up animation before firing.")]
|
||||
public class WithTeslaChargeAnimationInfo : ITraitInfo, Requires<WithSpriteBodyInfo>, Requires<RenderSpritesInfo>
|
||||
{
|
||||
[SequenceReference]
|
||||
[Desc("Sequence to use for charge animation.")]
|
||||
[SequenceReference] public readonly string ChargeSequence = "active";
|
||||
public readonly string ChargeSequence = "active";
|
||||
|
||||
[Desc("Which sprite body to play the animation on.")]
|
||||
public readonly string Body = "body";
|
||||
|
||||
@@ -19,11 +19,13 @@ namespace OpenRA.Mods.Cnc.Traits.Render
|
||||
[Desc("Rendered together with AttackCharge.")]
|
||||
public class WithTeslaChargeOverlayInfo : ITraitInfo, Requires<RenderSpritesInfo>
|
||||
{
|
||||
[SequenceReference]
|
||||
[Desc("Sequence name to use")]
|
||||
[SequenceReference] public readonly string Sequence = "active";
|
||||
public readonly string Sequence = "active";
|
||||
|
||||
[PaletteReference("IsPlayerPalette")]
|
||||
[Desc("Custom palette name")]
|
||||
[PaletteReference("IsPlayerPalette")] public readonly string Palette = null;
|
||||
public readonly string Palette = null;
|
||||
|
||||
[Desc("Custom palette is a player palette BaseName")]
|
||||
public readonly bool IsPlayerPalette = false;
|
||||
|
||||
@@ -97,7 +97,9 @@ namespace OpenRA.Mods.Cnc.Traits.Render
|
||||
|
||||
public class BodyAnimationFrameInit : IActorInit<uint>
|
||||
{
|
||||
[FieldFromYamlKey] readonly uint value = 0;
|
||||
[FieldFromYamlKey]
|
||||
readonly uint value = 0;
|
||||
|
||||
public BodyAnimationFrameInit() { }
|
||||
public BodyAnimationFrameInit(uint init) { value = init; }
|
||||
public uint Value(World world) { return value; }
|
||||
|
||||
@@ -28,12 +28,19 @@ namespace OpenRA.Mods.Cnc.Traits
|
||||
[Desc("Ticks until returning after teleportation.")]
|
||||
public readonly int Duration = 750;
|
||||
|
||||
[PaletteReference] public readonly string TargetOverlayPalette = TileSet.TerrainPaletteInternalName;
|
||||
[PaletteReference]
|
||||
public readonly string TargetOverlayPalette = TileSet.TerrainPaletteInternalName;
|
||||
|
||||
public readonly string OverlaySpriteGroup = "overlay";
|
||||
[SequenceReference("OverlaySpriteGroup", true)] public readonly string ValidTileSequencePrefix = "target-valid-";
|
||||
[SequenceReference("OverlaySpriteGroup")] public readonly string InvalidTileSequence = "target-invalid";
|
||||
[SequenceReference("OverlaySpriteGroup")] public readonly string SourceTileSequence = "target-select";
|
||||
|
||||
[SequenceReference("OverlaySpriteGroup", true)]
|
||||
public readonly string ValidTileSequencePrefix = "target-valid-";
|
||||
|
||||
[SequenceReference("OverlaySpriteGroup")]
|
||||
public readonly string InvalidTileSequence = "target-invalid";
|
||||
|
||||
[SequenceReference("OverlaySpriteGroup")]
|
||||
public readonly string SourceTileSequence = "target-select";
|
||||
|
||||
public readonly bool KillCargo = true;
|
||||
|
||||
|
||||
@@ -24,19 +24,25 @@ namespace OpenRA.Mods.Cnc.Traits
|
||||
public readonly int RevealDelay = 0;
|
||||
|
||||
public readonly string DoorImage = "atek";
|
||||
[SequenceReference("DoorImage")] public readonly string DoorSequence = "active";
|
||||
|
||||
[SequenceReference("DoorImage")]
|
||||
public readonly string DoorSequence = "active";
|
||||
|
||||
[PaletteReference("DoorPaletteIsPlayerPalette")]
|
||||
[Desc("Palette to use for rendering the launch animation")]
|
||||
[PaletteReference("DoorPaletteIsPlayerPalette")] public readonly string DoorPalette = "player";
|
||||
public readonly string DoorPalette = "player";
|
||||
|
||||
[Desc("Custom palette is a player palette BaseName")]
|
||||
public readonly bool DoorPaletteIsPlayerPalette = true;
|
||||
|
||||
public readonly string SatelliteImage = "sputnik";
|
||||
[SequenceReference("SatelliteImage")] public readonly string SatelliteSequence = "idle";
|
||||
|
||||
[SequenceReference("SatelliteImage")]
|
||||
public readonly string SatelliteSequence = "idle";
|
||||
|
||||
[PaletteReference("SatellitePaletteIsPlayerPalette")]
|
||||
[Desc("Palette to use for rendering the satellite projectile")]
|
||||
[PaletteReference("SatellitePaletteIsPlayerPalette")] public readonly string SatellitePalette = "player";
|
||||
public readonly string SatellitePalette = "player";
|
||||
|
||||
[Desc("Custom palette is a player palette BaseName")]
|
||||
public readonly bool SatellitePaletteIsPlayerPalette = true;
|
||||
|
||||
@@ -30,12 +30,15 @@ namespace OpenRA.Mods.Cnc.Traits
|
||||
[Desc("Effect sequence sprite image")]
|
||||
public readonly string Effect = "ionsfx";
|
||||
|
||||
[SequenceReference("Effect")]
|
||||
[Desc("Effect sequence to display")]
|
||||
[SequenceReference("Effect")] public readonly string EffectSequence = "idle";
|
||||
public readonly string EffectSequence = "idle";
|
||||
|
||||
[PaletteReference] public readonly string EffectPalette = "effect";
|
||||
[PaletteReference]
|
||||
public readonly string EffectPalette = "effect";
|
||||
|
||||
[Desc("Which weapon to fire"), WeaponReference]
|
||||
[WeaponReference]
|
||||
[Desc("Which weapon to fire")]
|
||||
public readonly string Weapon = "IonCannon";
|
||||
|
||||
public WeaponInfo WeaponInfo { get; private set; }
|
||||
|
||||
@@ -64,8 +64,12 @@ namespace OpenRA.Mods.Cnc.Traits
|
||||
|
||||
IEnumerable<int> speedModifiers;
|
||||
|
||||
[Sync] public int Facing { get; set; }
|
||||
[Sync] public WPos CenterPosition { get; private set; }
|
||||
[Sync]
|
||||
public int Facing { get; set; }
|
||||
|
||||
[Sync]
|
||||
public WPos CenterPosition { get; private set; }
|
||||
|
||||
public CPos TopLeft { get { return self.World.Map.CellContaining(CenterPosition); } }
|
||||
|
||||
// Isn't used anyway
|
||||
|
||||
@@ -21,7 +21,8 @@ namespace OpenRA.Mods.Cnc.Traits
|
||||
[Desc("Adds the hard-coded shroud palette to the game")]
|
||||
class TSShroudPaletteInfo : ITraitInfo
|
||||
{
|
||||
[FieldLoader.Require, PaletteDefinition]
|
||||
[PaletteDefinition]
|
||||
[FieldLoader.Require]
|
||||
[Desc("Internal palette name")]
|
||||
public readonly string Name = "shroud";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user