Fix CA1852

This commit is contained in:
RoosterDragon
2023-03-13 18:49:21 +00:00
committed by Pavel Penev
parent 277699cbd5
commit f4af5c1764
310 changed files with 510 additions and 507 deletions

View File

@@ -18,7 +18,7 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Cnc.Activities
{
class Infiltrate : Enter
sealed class Infiltrate : Enter
{
readonly Infiltrates infiltrates;
readonly INotifyInfiltration[] notifiers;

View File

@@ -19,7 +19,7 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Cnc.Effects
{
class GpsDotEffect : IEffect, IEffectAnnotation
sealed class GpsDotEffect : IEffect, IEffectAnnotation
{
readonly Actor actor;
readonly GpsDotInfo info;
@@ -28,7 +28,7 @@ namespace OpenRA.Mods.Cnc.Effects
readonly PlayerDictionary<DotState> dotStates;
readonly IVisibilityModifier[] visibilityModifiers;
class DotState
sealed class DotState
{
public readonly GpsWatcher Watcher;
public readonly bool FrozenActorWithRenderables;

View File

@@ -16,7 +16,7 @@ using OpenRA.Mods.Cnc.Traits;
namespace OpenRA.Mods.Cnc.Effects
{
class GpsSatellite : IEffect, ISpatiallyPartitionable
sealed class GpsSatellite : IEffect, ISpatiallyPartitionable
{
readonly Player launcher;
readonly Animation anim;

View File

@@ -16,7 +16,7 @@ using OpenRA.Mods.Cnc.Traits;
namespace OpenRA.Mods.Cnc.Effects
{
class SatelliteLaunch : IEffect, ISpatiallyPartitionable
sealed class SatelliteLaunch : IEffect, ISpatiallyPartitionable
{
readonly GpsPowerInfo info;
readonly Actor launcher;

View File

@@ -11,7 +11,7 @@
namespace OpenRA.Mods.Cnc.FileFormats
{
class Blowfish
sealed class Blowfish
{
public Blowfish(byte[] key)
{

View File

@@ -16,11 +16,11 @@ namespace OpenRA.Mods.Cnc.FileFormats
{
/* TODO: Convert this direct C port into readable code. */
class BlowfishKeyProvider
sealed class BlowfishKeyProvider
{
const string PublicKeyString = "AihRvNoIbTn85FZRYNZRcT+i6KpU+maCsEqr3Q5q+LDB5tH7Tz2qQ38V";
class PublicKey
sealed class PublicKey
{
public readonly uint[] KeyOne = new uint[64];
public readonly uint[] KeyTwo = new uint[64];

View File

@@ -61,7 +61,7 @@ namespace OpenRA.Mods.Cnc.FileSystem
}
}
class Entry
sealed class Entry
{
public readonly uint Offset;
public readonly uint Size;

View File

@@ -17,7 +17,7 @@ using OpenRA.Primitives;
namespace OpenRA.Mods.Cnc.Graphics
{
class TeslaZapRenderable : IPalettedRenderable, IFinalizedRenderable
sealed class TeslaZapRenderable : IPalettedRenderable, IFinalizedRenderable
{
static readonly int[][] Steps = new[]
{

View File

@@ -28,7 +28,7 @@ namespace OpenRA.Mods.Cnc.SpriteLoaders
VariableLengthTable = 4
}
class ShpD2Frame : ISpriteFrame
sealed class ShpD2Frame : ISpriteFrame
{
public SpriteFrameType Type => SpriteFrameType.Indexed8;
public Size Size { get; }

View File

@@ -75,7 +75,7 @@ namespace OpenRA.Mods.Cnc.SpriteLoaders
{
enum Format { XORPrev = 0x20, XORLCW = 0x40, LCW = 0x80 }
class ImageHeader : ISpriteFrame
sealed class ImageHeader : ISpriteFrame
{
public SpriteFrameType Type => SpriteFrameType.Indexed8;
public Size Size => reader.Size;

View File

@@ -18,7 +18,7 @@ namespace OpenRA.Mods.Cnc.SpriteLoaders
{
public class TmpRALoader : ISpriteLoader
{
class TmpRAFrame : ISpriteFrame
sealed class TmpRAFrame : ISpriteFrame
{
public SpriteFrameType Type => SpriteFrameType.Indexed8;
public Size Size { get; }

View File

@@ -18,7 +18,7 @@ namespace OpenRA.Mods.Cnc.SpriteLoaders
{
public class TmpTDLoader : ISpriteLoader
{
class TmpTDFrame : ISpriteFrame
sealed class TmpTDFrame : ISpriteFrame
{
public SpriteFrameType Type => SpriteFrameType.Indexed8;
public Size Size { get; }

View File

@@ -18,7 +18,7 @@ namespace OpenRA.Mods.Cnc.SpriteLoaders
{
public class TmpTSLoader : ISpriteLoader
{
class TmpTSDepthFrame : ISpriteFrame
sealed class TmpTSDepthFrame : ISpriteFrame
{
readonly TmpTSFrame parent;
@@ -35,7 +35,7 @@ namespace OpenRA.Mods.Cnc.SpriteLoaders
}
}
class TmpTSFrame : ISpriteFrame
sealed class TmpTSFrame : ISpriteFrame
{
public SpriteFrameType Type => SpriteFrameType.Indexed8;
public Size Size { get; }

View File

@@ -18,7 +18,7 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Cnc.Traits
{
[Desc("Actor's turret rises from the ground before attacking.")]
class AttackPopupTurretedInfo : AttackTurretedInfo, Requires<BuildingInfo>, Requires<WithEmbeddedTurretSpriteBodyInfo>
sealed class AttackPopupTurretedInfo : AttackTurretedInfo, Requires<BuildingInfo>, Requires<WithEmbeddedTurretSpriteBodyInfo>
{
[Desc("How many game ticks should pass before closing the actor's turret.")]
public readonly int CloseDelay = 125;
@@ -46,7 +46,7 @@ namespace OpenRA.Mods.Cnc.Traits
public override object Create(ActorInitializer init) { return new AttackPopupTurreted(init, this); }
}
class AttackPopupTurreted : AttackTurreted, INotifyIdle, IDamageModifier
sealed class AttackPopupTurreted : AttackTurreted, INotifyIdle, IDamageModifier
{
enum PopupState { Open, Rotating, Transitioning, Closed }

View File

@@ -34,7 +34,7 @@ namespace OpenRA.Mods.Cnc.Traits
return new AttackTDGunboatTurretedActivity(self, newTarget, forceAttack, targetLineColor);
}
class AttackTDGunboatTurretedActivity : Activity
sealed class AttackTDGunboatTurretedActivity : Activity
{
readonly AttackTDGunboatTurreted attack;
readonly Target target;

View File

@@ -19,7 +19,7 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Cnc.Traits
{
[Desc("Implements the charge-then-burst attack logic specific to the RA tesla coil.")]
class AttackTeslaInfo : AttackBaseInfo
sealed class AttackTeslaInfo : AttackBaseInfo
{
[Desc("How many charges this actor has to attack with, once charged.")]
public readonly int MaxCharges = 1;
@@ -39,7 +39,7 @@ namespace OpenRA.Mods.Cnc.Traits
public override object Create(ActorInitializer init) { return new AttackTesla(init.Self, this); }
}
class AttackTesla : AttackBase, ITick, INotifyAttack
sealed class AttackTesla : AttackBase, ITick, INotifyAttack
{
readonly AttackTeslaInfo info;
@@ -83,7 +83,7 @@ namespace OpenRA.Mods.Cnc.Traits
return new ChargeAttack(this, newTarget, forceAttack, targetLineColor);
}
class ChargeAttack : Activity, IActivityNotifyStanceChanged
sealed class ChargeAttack : Activity, IActivityNotifyStanceChanged
{
readonly AttackTesla attack;
readonly Target target;
@@ -144,7 +144,7 @@ namespace OpenRA.Mods.Cnc.Traits
}
}
class ChargeFire : Activity
sealed class ChargeFire : Activity
{
readonly AttackTesla attack;
readonly Target target;

View File

@@ -20,12 +20,12 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Cnc.Traits
{
[Desc("Overrides the default Tooltip when this actor is disguised (aids in deceiving enemy players).")]
class DisguiseTooltipInfo : TooltipInfo, Requires<DisguiseInfo>
sealed class DisguiseTooltipInfo : TooltipInfo, Requires<DisguiseInfo>
{
public override object Create(ActorInitializer init) { return new DisguiseTooltip(init.Self, this); }
}
class DisguiseTooltip : ConditionalTrait<DisguiseTooltipInfo>, ITooltip
sealed class DisguiseTooltip : ConditionalTrait<DisguiseTooltipInfo>, ITooltip
{
readonly Actor self;
readonly Disguise disguise;
@@ -64,7 +64,7 @@ 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 : TraitInfo
sealed class DisguiseInfo : TraitInfo
{
[VoiceReference]
public readonly string Voice = "Action";
@@ -98,7 +98,7 @@ namespace OpenRA.Mods.Cnc.Traits
public override object Create(ActorInitializer init) { return new Disguise(init.Self, this); }
}
class Disguise : IEffectiveOwner, IIssueOrder, IResolveOrder, IOrderVoice, IRadarColorModifier, INotifyAttack,
sealed class Disguise : IEffectiveOwner, IIssueOrder, IResolveOrder, IOrderVoice, IRadarColorModifier, INotifyAttack,
INotifyDamage, INotifyUnload, INotifyDemolition, INotifyInfiltration, ITick
{
public ActorInfo AsActor { get; private set; }
@@ -280,7 +280,7 @@ namespace OpenRA.Mods.Cnc.Traits
}
}
class DisguiseOrderTargeter : UnitOrderTargeter
sealed class DisguiseOrderTargeter : UnitOrderTargeter
{
readonly DisguiseInfo info;

View File

@@ -44,7 +44,7 @@ namespace OpenRA.Mods.Cnc.Traits
gps.UnregisterForOnGpsRefreshed(fufubg.self, fufubg);
};
class Traits
sealed class Traits
{
public readonly FrozenActorLayer FrozenActorLayer;
public readonly GpsWatcher GpsWatcher;

View File

@@ -15,7 +15,7 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Cnc.Traits
{
[Desc("Show an indicator revealing the actor underneath the fog when a GPSWatcher is activated.")]
class GpsDotInfo : TraitInfo
sealed class GpsDotInfo : TraitInfo
{
[Desc("Sprite collection for symbols.")]
public readonly string Image = "gpsdot";
@@ -30,7 +30,7 @@ namespace OpenRA.Mods.Cnc.Traits
public override object Create(ActorInitializer init) { return new GpsDot(this); }
}
class GpsDot : INotifyCreated, INotifyAddedToWorld, INotifyRemovedFromWorld
sealed class GpsDot : INotifyCreated, INotifyAddedToWorld, INotifyRemovedFromWorld
{
readonly GpsDotInfo info;
GpsDotEffect effect;

View File

@@ -18,14 +18,14 @@ namespace OpenRA.Mods.Cnc.Traits
{
[TraitLocation(SystemActors.Player)]
[Desc("Required for `GpsPower`. Attach this to the player actor.")]
class GpsWatcherInfo : TraitInfo
sealed class GpsWatcherInfo : TraitInfo
{
public override object Create(ActorInitializer init) { return new GpsWatcher(init.Self.Owner); }
}
interface IOnGpsRefreshed { void OnGpsRefresh(Actor self, Player player); }
class GpsWatcher : ISync, IPreventsShroudReset
sealed class GpsWatcher : ISync, IPreventsShroudReset
{
[Sync]
public bool Launched { get; private set; }

View File

@@ -18,7 +18,7 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Cnc.Traits
{
[Desc("Funds are transferred from the owner to the infiltrator.")]
class InfiltrateForCashInfo : TraitInfo
sealed class InfiltrateForCashInfo : TraitInfo
{
[Desc("The `TargetTypes` from `Targetable` that are allowed to enter.")]
public readonly BitSet<TargetableType> Types = default;
@@ -53,7 +53,7 @@ namespace OpenRA.Mods.Cnc.Traits
public override object Create(ActorInitializer init) { return new InfiltrateForCash(this); }
}
class InfiltrateForCash : INotifyInfiltrated
sealed class InfiltrateForCash : INotifyInfiltrated
{
readonly InfiltrateForCashInfo info;

View File

@@ -19,7 +19,7 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Cnc.Traits
{
[Desc("Reveals a decoration sprite to the indicated players when infiltrated.")]
class InfiltrateForDecorationInfo : WithDecorationInfo
sealed class InfiltrateForDecorationInfo : WithDecorationInfo
{
[Desc("The `TargetTypes` from `Targetable` that are allowed to enter.")]
public readonly BitSet<TargetableType> Types = default;
@@ -27,7 +27,7 @@ namespace OpenRA.Mods.Cnc.Traits
public override object Create(ActorInitializer init) { return new InfiltrateForDecoration(init.Self, this); }
}
class InfiltrateForDecoration : WithDecoration, INotifyInfiltrated
sealed class InfiltrateForDecoration : WithDecoration, INotifyInfiltrated
{
readonly HashSet<Player> infiltrators = new();
readonly InfiltrateForDecorationInfo info;

View File

@@ -17,7 +17,7 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Cnc.Traits
{
[Desc("Steal and reset the owner's exploration.")]
class InfiltrateForExplorationInfo : TraitInfo
sealed class InfiltrateForExplorationInfo : TraitInfo
{
[Desc("The `TargetTypes` from `Targetable` that are allowed to enter.")]
public readonly BitSet<TargetableType> Types = default;
@@ -39,7 +39,7 @@ namespace OpenRA.Mods.Cnc.Traits
public override object Create(ActorInitializer init) { return new InfiltrateForExploration(this); }
}
class InfiltrateForExploration : INotifyInfiltrated
sealed class InfiltrateForExploration : INotifyInfiltrated
{
readonly InfiltrateForExplorationInfo info;

View File

@@ -15,7 +15,7 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Cnc.Traits
{
class InfiltrateForPowerOutageInfo : TraitInfo
sealed class InfiltrateForPowerOutageInfo : TraitInfo
{
[Desc("The `TargetTypes` from `Targetable` that are allowed to enter.")]
public readonly BitSet<TargetableType> Types = default;
@@ -40,7 +40,7 @@ namespace OpenRA.Mods.Cnc.Traits
public override object Create(ActorInitializer init) { return new InfiltrateForPowerOutage(init.Self, this); }
}
class InfiltrateForPowerOutage : INotifyOwnerChanged, INotifyInfiltrated
sealed class InfiltrateForPowerOutage : INotifyOwnerChanged, INotifyInfiltrated
{
readonly InfiltrateForPowerOutageInfo info;
PowerManager playerPower;

View File

@@ -15,7 +15,7 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Cnc.Traits
{
class InfiltrateForSupportPowerInfo : TraitInfo
sealed class InfiltrateForSupportPowerInfo : TraitInfo
{
[ActorReference]
[FieldLoader.Require]
@@ -41,7 +41,7 @@ namespace OpenRA.Mods.Cnc.Traits
public override object Create(ActorInitializer init) { return new InfiltrateForSupportPower(this); }
}
class InfiltrateForSupportPower : INotifyInfiltrated
sealed class InfiltrateForSupportPower : INotifyInfiltrated
{
readonly InfiltrateForSupportPowerInfo info;

View File

@@ -16,7 +16,7 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Cnc.Traits
{
class InfiltrateForSupportPowerResetInfo : TraitInfo
sealed class InfiltrateForSupportPowerResetInfo : TraitInfo
{
[Desc("The `TargetTypes` from `Targetable` that are allowed to enter.")]
public readonly BitSet<TargetableType> Types = default;
@@ -38,7 +38,7 @@ namespace OpenRA.Mods.Cnc.Traits
public override object Create(ActorInitializer init) { return new InfiltrateForSupportPowerReset(this); }
}
class InfiltrateForSupportPowerReset : INotifyInfiltrated
sealed class InfiltrateForSupportPowerReset : INotifyInfiltrated
{
readonly InfiltrateForSupportPowerResetInfo info;

View File

@@ -18,7 +18,7 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Cnc.Traits
{
[Desc("Transform into a different actor type.")]
class InfiltrateForTransformInfo : TraitInfo
sealed class InfiltrateForTransformInfo : TraitInfo
{
[ActorReference]
[FieldLoader.Require]
@@ -34,7 +34,7 @@ namespace OpenRA.Mods.Cnc.Traits
public override object Create(ActorInitializer init) { return new InfiltrateForTransform(init, this); }
}
class InfiltrateForTransform : INotifyInfiltrated
sealed class InfiltrateForTransform : INotifyInfiltrated
{
readonly InfiltrateForTransformInfo info;
readonly string faction;

View File

@@ -127,7 +127,7 @@ namespace OpenRA.Mods.Cnc.Traits
}
}
class InfiltrationOrderTargeter : UnitOrderTargeter
sealed class InfiltrationOrderTargeter : UnitOrderTargeter
{
readonly InfiltratesInfo info;

View File

@@ -21,7 +21,7 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Cnc.Traits
{
class MadTankInfo : TraitInfo, IRulesetLoaded, Requires<ExplodesInfo>, Requires<WithFacingSpriteBodyInfo>
sealed class MadTankInfo : TraitInfo, IRulesetLoaded, Requires<ExplodesInfo>, Requires<WithFacingSpriteBodyInfo>
{
[SequenceReference]
public readonly string ThumpSequence = "piston";
@@ -87,7 +87,7 @@ namespace OpenRA.Mods.Cnc.Traits
}
}
class MadTank : IIssueOrder, IResolveOrder, IOrderVoice, IIssueDeployOrder
sealed class MadTank : IIssueOrder, IResolveOrder, IOrderVoice, IIssueDeployOrder
{
readonly MadTankInfo info;
@@ -143,7 +143,7 @@ namespace OpenRA.Mods.Cnc.Traits
self.QueueActivity(order.Queued, new DetonationSequence(self, this));
}
class DetonationSequence : Activity
sealed class DetonationSequence : Activity
{
readonly Actor self;
readonly MadTank mad;

View File

@@ -15,7 +15,7 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Cnc.Traits
{
class MineInfo : TraitInfo
sealed class MineInfo : TraitInfo
{
public readonly BitSet<CrushClass> CrushClasses = default;
public readonly bool AvoidFriendly = true;
@@ -25,7 +25,7 @@ namespace OpenRA.Mods.Cnc.Traits
public override object Create(ActorInitializer init) { return new Mine(this); }
}
class Mine : ICrushable, INotifyCrushed
sealed class Mine : ICrushable, INotifyCrushed
{
readonly MineInfo info;
@@ -70,6 +70,6 @@ namespace OpenRA.Mods.Cnc.Traits
}
[Desc("Tag trait for stuff that should not trigger mines.")]
class MineImmuneInfo : TraitInfo<MineImmune> { }
class MineImmune { }
sealed class MineImmuneInfo : TraitInfo<MineImmune> { }
sealed class MineImmune { }
}

View File

@@ -204,7 +204,7 @@ namespace OpenRA.Mods.Cnc.Traits
return Info.TerrainTypes.Contains(terrainType);
}
class MinefieldOrderGenerator : OrderGenerator
sealed class MinefieldOrderGenerator : OrderGenerator
{
readonly List<Actor> minelayers;
readonly Minelayer minelayer;
@@ -347,7 +347,7 @@ namespace OpenRA.Mods.Cnc.Traits
}
}
class BeginMinefieldOrderTargeter : IOrderTargeter
sealed class BeginMinefieldOrderTargeter : IOrderTargeter
{
public string OrderID => "BeginMinefield";
public int OrderPriority => 5;
@@ -377,7 +377,7 @@ namespace OpenRA.Mods.Cnc.Traits
return modifiers.HasModifier(TargetModifiers.ForceAttack);
}
public bool IsQueued { get; protected set; }
public bool IsQueued { get; private set; }
}
}
}

View File

@@ -17,7 +17,7 @@ namespace OpenRA.Mods.Cnc.Traits
{
[TraitLocation(SystemActors.World | SystemActors.EditorWorld)]
[Desc("Palette effect used for blinking \"animations\" on actors.")]
class LightPaletteRotatorInfo : TraitInfo
sealed class LightPaletteRotatorInfo : TraitInfo
{
[Desc("Palettes this effect should not apply to.")]
public readonly HashSet<string> ExcludePalettes = new();
@@ -34,7 +34,7 @@ namespace OpenRA.Mods.Cnc.Traits
public override object Create(ActorInitializer init) { return new LightPaletteRotator(this); }
}
class LightPaletteRotator : ITick, IPaletteModifier
sealed class LightPaletteRotator : ITick, IPaletteModifier
{
readonly LightPaletteRotatorInfo info;
float t = 0;

View File

@@ -21,7 +21,7 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Cnc.Traits
{
class PortableChronoInfo : PausableConditionalTraitInfo, Requires<IMoveInfo>
sealed class PortableChronoInfo : PausableConditionalTraitInfo, Requires<IMoveInfo>
{
[Desc("Cooldown in ticks until the unit can teleport.")]
public readonly int ChargeDelay = 500;
@@ -78,7 +78,7 @@ namespace OpenRA.Mods.Cnc.Traits
public override object Create(ActorInitializer init) { return new PortableChrono(init.Self, this); }
}
class PortableChrono : PausableConditionalTrait<PortableChronoInfo>, IIssueOrder, IResolveOrder, ITick, ISelectionBar, IOrderVoice, ISync
sealed class PortableChrono : PausableConditionalTrait<PortableChronoInfo>, IIssueOrder, IResolveOrder, ITick, ISelectionBar, IOrderVoice, ISync
{
readonly IMove move;
[Sync]
@@ -177,7 +177,7 @@ namespace OpenRA.Mods.Cnc.Traits
}
}
class PortableChronoOrderTargeter : IOrderTargeter
sealed class PortableChronoOrderTargeter : IOrderTargeter
{
readonly string targetCursor;
@@ -188,7 +188,7 @@ namespace OpenRA.Mods.Cnc.Traits
public string OrderID => "PortableChronoTeleport";
public int OrderPriority => 5;
public bool IsQueued { get; protected set; }
public bool IsQueued { get; private set; }
public bool TargetOverridesSelection(Actor self, in Target target, List<Actor> actorsAt, CPos xy, TargetModifiers modifiers) { return true; }
public bool CanTarget(Actor self, in Target target, ref TargetModifiers modifiers, ref string cursor)
@@ -212,7 +212,7 @@ namespace OpenRA.Mods.Cnc.Traits
}
}
class PortableChronoOrderGenerator : OrderGenerator
sealed class PortableChronoOrderGenerator : OrderGenerator
{
readonly Actor self;
readonly PortableChrono portableChrono;

View File

@@ -133,5 +133,5 @@ namespace OpenRA.Mods.Cnc.Traits
}
}
class HideBibPreviewInit : RuntimeFlagInit { }
sealed class HideBibPreviewInit : RuntimeFlagInit { }
}

View File

@@ -15,12 +15,12 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Cnc.Traits.Render
{
class WithDisguisingInfantryBodyInfo : WithInfantryBodyInfo, Requires<DisguiseInfo>
sealed class WithDisguisingInfantryBodyInfo : WithInfantryBodyInfo, Requires<DisguiseInfo>
{
public override object Create(ActorInitializer init) { return new WithDisguisingInfantryBody(init, this); }
}
class WithDisguisingInfantryBody : WithInfantryBody
sealed class WithDisguisingInfantryBody : WithInfantryBody
{
readonly Disguise disguise;
readonly RenderSprites rs;

View File

@@ -18,7 +18,7 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Cnc.Traits.Render
{
class WithGunboatBodyInfo : WithSpriteBodyInfo, Requires<BodyOrientationInfo>, Requires<IFacingInfo>, Requires<TurretedInfo>
sealed class WithGunboatBodyInfo : WithSpriteBodyInfo, Requires<BodyOrientationInfo>, Requires<IFacingInfo>, Requires<TurretedInfo>
{
[Desc("Turreted 'Turret' key to display")]
public readonly string Turret = "primary";
@@ -38,7 +38,7 @@ namespace OpenRA.Mods.Cnc.Traits.Render
public override object Create(ActorInitializer init) { return new WithGunboatBody(init, this); }
}
class WithGunboatBody : WithSpriteBody, ITick
sealed class WithGunboatBody : WithSpriteBody, ITick
{
readonly WithGunboatBodyInfo info;
readonly Animation wake;

View File

@@ -16,7 +16,7 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Cnc.Traits.Render
{
class WithSplitAttackPaletteInfantryBodyInfo : WithInfantryBodyInfo
sealed class WithSplitAttackPaletteInfantryBodyInfo : WithInfantryBodyInfo
{
[PaletteReference]
[Desc("Palette to use for the split attack rendering.")]
@@ -28,7 +28,7 @@ namespace OpenRA.Mods.Cnc.Traits.Render
public override object Create(ActorInitializer init) { return new WithSplitAttackPaletteInfantryBody(init, this); }
}
class WithSplitAttackPaletteInfantryBody : WithInfantryBody
sealed class WithSplitAttackPaletteInfantryBody : WithInfantryBody
{
readonly WithSplitAttackPaletteInfantryBodyInfo info;
readonly Animation splitAnimation;

View File

@@ -20,7 +20,7 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Cnc.Traits
{
class AttackOrderPowerInfo : SupportPowerInfo, Requires<AttackBaseInfo>
sealed class AttackOrderPowerInfo : SupportPowerInfo, Requires<AttackBaseInfo>
{
[Desc("Range circle color.")]
public readonly Color CircleColor = Color.Red;
@@ -37,7 +37,7 @@ namespace OpenRA.Mods.Cnc.Traits
public override object Create(ActorInitializer init) { return new AttackOrderPower(init.Self, this); }
}
class AttackOrderPower : SupportPower, INotifyCreated, INotifyBurstComplete
sealed class AttackOrderPower : SupportPower, INotifyCreated, INotifyBurstComplete
{
readonly AttackOrderPowerInfo info;
AttackBase attack;

View File

@@ -19,7 +19,7 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Cnc.Traits
{
class ChronoshiftPowerInfo : SupportPowerInfo
sealed class ChronoshiftPowerInfo : SupportPowerInfo
{
[FieldLoader.Require]
[Desc("Size of the footprint of the affected area.")]
@@ -63,7 +63,7 @@ namespace OpenRA.Mods.Cnc.Traits
public override object Create(ActorInitializer init) { return new ChronoshiftPower(init.Self, this); }
}
class ChronoshiftPower : SupportPower
sealed class ChronoshiftPower : SupportPower
{
readonly char[] footprint;
readonly CVec dimensions;
@@ -140,7 +140,7 @@ namespace OpenRA.Mods.Cnc.Traits
return true;
}
class SelectChronoshiftTarget : OrderGenerator
sealed class SelectChronoshiftTarget : OrderGenerator
{
readonly ChronoshiftPower power;
readonly char[] footprint;
@@ -218,7 +218,7 @@ namespace OpenRA.Mods.Cnc.Traits
}
}
class SelectDestination : OrderGenerator
sealed class SelectDestination : OrderGenerator
{
readonly ChronoshiftPower power;
readonly CPos sourceLocation;

View File

@@ -18,7 +18,7 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Cnc.Traits
{
[Desc("Requires `GpsWatcher` on the player actor.")]
class GpsPowerInfo : SupportPowerInfo
sealed class GpsPowerInfo : SupportPowerInfo
{
[Desc("Delay in ticks between launching and revealing the map.")]
public readonly int RevealDelay = 0;
@@ -53,7 +53,7 @@ namespace OpenRA.Mods.Cnc.Traits
public override object Create(ActorInitializer init) { return new GpsPower(init.Self, this); }
}
class GpsPower : SupportPower, INotifyKilled, INotifySold, INotifyOwnerChanged, ITick
sealed class GpsPower : SupportPower, INotifyKilled, INotifySold, INotifyOwnerChanged, ITick
{
readonly Actor self;
readonly GpsPowerInfo info;

View File

@@ -18,7 +18,7 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Cnc.Traits
{
class IonCannonPowerInfo : SupportPowerInfo, IRulesetLoaded
sealed class IonCannonPowerInfo : SupportPowerInfo, IRulesetLoaded
{
[ActorReference]
[Desc("Actor to spawn when the attack starts")]
@@ -62,7 +62,7 @@ namespace OpenRA.Mods.Cnc.Traits
}
}
class IonCannonPower : SupportPower
sealed class IonCannonPower : SupportPower
{
readonly IonCannonPowerInfo info;

View File

@@ -20,7 +20,7 @@ namespace OpenRA.Mods.Cnc.Traits
{
[TraitLocation(SystemActors.World | SystemActors.EditorWorld)]
[Desc("Adds the hard-coded shroud palette to the game")]
class ShroudPaletteInfo : TraitInfo
sealed class ShroudPaletteInfo : TraitInfo
{
[PaletteDefinition]
[FieldLoader.Require]
@@ -33,7 +33,7 @@ namespace OpenRA.Mods.Cnc.Traits
public override object Create(ActorInitializer init) { return new ShroudPalette(this); }
}
class ShroudPalette : ILoadsPalettes, IProvidesAssetBrowserPalettes
sealed class ShroudPalette : ILoadsPalettes, IProvidesAssetBrowserPalettes
{
readonly ShroudPaletteInfo info;

View File

@@ -17,7 +17,7 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Cnc.Traits
{
[TraitLocation(SystemActors.EditorWorld)]
class TSEditorResourceLayerInfo : EditorResourceLayerInfo, Requires<EditorActorLayerInfo>
sealed class TSEditorResourceLayerInfo : EditorResourceLayerInfo, Requires<EditorActorLayerInfo>
{
public readonly string VeinType = "Veins";
@@ -28,7 +28,7 @@ namespace OpenRA.Mods.Cnc.Traits
public override object Create(ActorInitializer init) { return new TSEditorResourceLayer(init.Self, this); }
}
class TSEditorResourceLayer : EditorResourceLayer
sealed class TSEditorResourceLayer : EditorResourceLayer
{
readonly TSEditorResourceLayerInfo info;
readonly EditorActorLayer actorLayer;

View File

@@ -19,7 +19,7 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Cnc.Traits
{
[TraitLocation(SystemActors.World)]
class TSResourceLayerInfo : ResourceLayerInfo
sealed class TSResourceLayerInfo : ResourceLayerInfo
{
public readonly string VeinType = "Veins";
@@ -30,7 +30,7 @@ namespace OpenRA.Mods.Cnc.Traits
public override object Create(ActorInitializer init) { return new TSResourceLayer(init.Self, this); }
}
class TSResourceLayer : ResourceLayer, INotifyActorDisposing
sealed class TSResourceLayer : ResourceLayer, INotifyActorDisposing
{
readonly TSResourceLayerInfo info;
readonly HashSet<CPos> veinholeCells = new();

View File

@@ -19,7 +19,7 @@ namespace OpenRA.Mods.Cnc.Traits
{
[TraitLocation(SystemActors.World | SystemActors.EditorWorld)]
[Desc("Adds the hard-coded shroud palette to the game")]
class TSShroudPaletteInfo : TraitInfo
sealed class TSShroudPaletteInfo : TraitInfo
{
[PaletteDefinition]
[FieldLoader.Require]
@@ -29,7 +29,7 @@ namespace OpenRA.Mods.Cnc.Traits
public override object Create(ActorInitializer init) { return new TSShroudPalette(this); }
}
class TSShroudPalette : ILoadsPalettes, IProvidesAssetBrowserPalettes
sealed class TSShroudPalette : ILoadsPalettes, IProvidesAssetBrowserPalettes
{
readonly TSShroudPaletteInfo info;

View File

@@ -20,7 +20,7 @@ using OpenRA.Primitives;
namespace OpenRA.Mods.Cnc.UtilityCommands
{
class ConvertPngToShpCommand : IUtilityCommand
sealed class ConvertPngToShpCommand : IUtilityCommand
{
string IUtilityCommand.Name => "--shp";

View File

@@ -19,7 +19,7 @@ using OpenRA.Mods.Common.FileFormats;
namespace OpenRA.Mods.Cnc.UtilityCommands
{
class ImportRedAlertMapCommand : ImportGen1MapCommand, IUtilityCommand
sealed class ImportRedAlertMapCommand : ImportGen1MapCommand, IUtilityCommand
{
// TODO: 128x128 is probably not true for "mega maps" from the expansions.
public ImportRedAlertMapCommand()

View File

@@ -17,7 +17,7 @@ using OpenRA.Mods.Common.FileFormats;
namespace OpenRA.Mods.Cnc.UtilityCommands
{
class ImportTiberianDawnMapCommand : ImportGen1MapCommand, IUtilityCommand
sealed class ImportTiberianDawnMapCommand : ImportGen1MapCommand, IUtilityCommand
{
// NOTE: 64x64 map size is a C&C95 engine limitation
public ImportTiberianDawnMapCommand()

View File

@@ -15,7 +15,7 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Cnc.UtilityCommands
{
class ImportTiberianSunMapCommand : ImportGen2MapCommand, IUtilityCommand
sealed class ImportTiberianSunMapCommand : ImportGen2MapCommand, IUtilityCommand
{
string IUtilityCommand.Name => "--import-ts-map";

View File

@@ -17,7 +17,7 @@ using OpenRA.Mods.Common.FileFormats;
namespace OpenRA.Mods.Cnc.UtilityCommands
{
class LegacyRulesImporter : IUtilityCommand
sealed class LegacyRulesImporter : IUtilityCommand
{
bool IUtilityCommand.ValidateArguments(string[] args)
{

View File

@@ -16,7 +16,7 @@ using OpenRA.Mods.Common.FileFormats;
namespace OpenRA.Mods.Cnc.UtilityCommands
{
class ImportLegacySequenceCommand : IUtilityCommand
sealed class ImportLegacySequenceCommand : IUtilityCommand
{
bool IUtilityCommand.ValidateArguments(string[] args)
{

View File

@@ -18,7 +18,7 @@ using OpenRA.Mods.Common.FileFormats;
namespace OpenRA.Mods.Cnc.UtilityCommands
{
class ImportLegacyTilesetCommand : IUtilityCommand
sealed class ImportLegacyTilesetCommand : IUtilityCommand
{
string IUtilityCommand.Name => "--tileset-import";

View File

@@ -20,7 +20,7 @@ using OpenRA.Primitives;
namespace OpenRA.Mods.Cnc.UtilityCommands
{
class RemapShpCommand : IUtilityCommand
sealed class RemapShpCommand : IUtilityCommand
{
string IUtilityCommand.Name => "--remap";