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

@@ -1230,7 +1230,7 @@ namespace OpenRA.Mods.Common.Traits
return new AssociateWithAirfieldActivity(self, creationActivityDelay);
}
class AssociateWithAirfieldActivity : Activity
sealed class AssociateWithAirfieldActivity : Activity
{
readonly Aircraft aircraft;
readonly int delay;

View File

@@ -411,7 +411,7 @@ namespace OpenRA.Mods.Common.Traits
return stances;
}
class AttackOrderTargeter : IOrderTargeter
sealed class AttackOrderTargeter : IOrderTargeter
{
readonly AttackBase ab;
@@ -514,7 +514,7 @@ namespace OpenRA.Mods.Common.Traits
}
}
public bool IsQueued { get; protected set; }
public bool IsQueued { get; private set; }
}
}
}

View File

@@ -226,7 +226,7 @@ namespace OpenRA.Mods.Common.Traits
}
}
class AttackActivity : Activity, IActivityNotifyStanceChanged
sealed class AttackActivity : Activity, IActivityNotifyStanceChanged
{
readonly AttackFollow attack;
readonly RevealsShroud[] revealsShroud;

View File

@@ -19,7 +19,7 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Common.Traits
{
[Desc("Provides access to the attack-move command, which will make the actor automatically engage viable targets while moving to the destination.")]
class AttackMoveInfo : TraitInfo, Requires<IMoveInfo>
sealed class AttackMoveInfo : TraitInfo, Requires<IMoveInfo>
{
[VoiceReference]
public readonly string Voice = "Action";
@@ -53,7 +53,7 @@ namespace OpenRA.Mods.Common.Traits
public override object Create(ActorInitializer init) { return new AttackMove(init.Self, this); }
}
class AttackMove : IResolveOrder, IOrderVoice
sealed class AttackMove : IResolveOrder, IOrderVoice
{
public readonly AttackMoveInfo Info;
readonly IMove move;

View File

@@ -16,12 +16,12 @@ namespace OpenRA.Mods.Common.Traits
{
[Desc("Will AttackMove to a random location within MoveRadius when idle.",
"This conflicts with player orders and should only be added to animal creeps.")]
class AttackWanderInfo : WandersInfo, Requires<AttackMoveInfo>
sealed class AttackWanderInfo : WandersInfo, Requires<AttackMoveInfo>
{
public override object Create(ActorInitializer init) { return new AttackWander(init.Self, this); }
}
class AttackWander : Wanders
sealed class AttackWander : Wanders
{
readonly AttackMove attackMove;

View File

@@ -102,7 +102,7 @@ namespace OpenRA.Mods.Common.Traits
}
}
class FerryUnit : Activity
sealed class FerryUnit : Activity
{
readonly Actor cargo;
readonly Carryable carryable;

View File

@@ -16,7 +16,7 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Common.Traits
{
class AutoCrusherInfo : PausableConditionalTraitInfo, Requires<IMoveInfo>
sealed class AutoCrusherInfo : PausableConditionalTraitInfo, Requires<IMoveInfo>
{
[Desc("Maximum range to scan for targets.")]
public readonly WDist ScanRadius = WDist.FromCells(5);
@@ -36,20 +36,20 @@ namespace OpenRA.Mods.Common.Traits
public override object Create(ActorInitializer init) { return new AutoCrusher(init.Self, this); }
}
class AutoCrusher : PausableConditionalTrait<AutoCrusherInfo>, INotifyIdle
sealed class AutoCrusher : PausableConditionalTrait<AutoCrusherInfo>, INotifyIdle
{
int nextScanTime;
readonly IMoveInfo moveInfo;
readonly bool isAircraft;
protected readonly IMove Move;
readonly IMove move;
public AutoCrusher(Actor self, AutoCrusherInfo info)
: base(info)
{
Move = self.Trait<IMove>();
move = self.Trait<IMove>();
moveInfo = self.Info.TraitInfo<IMoveInfo>();
nextScanTime = self.World.SharedRandom.Next(Info.MinimumScanTimeInterval, Info.MaximumScanTimeInterval);
isAircraft = Move is Aircraft;
isAircraft = move is Aircraft;
}
void INotifyIdle.TickIdle(Actor self)
@@ -71,7 +71,7 @@ namespace OpenRA.Mods.Common.Traits
if (isAircraft)
self.QueueActivity(new Land(self, Target.FromActor(crushableActor), targetLineColor: moveInfo.GetTargetLineColor()));
else
self.QueueActivity(Move.MoveTo(crushableActor.Location, targetLineColor: moveInfo.GetTargetLineColor()));
self.QueueActivity(move.MoveTo(crushableActor.Location, targetLineColor: moveInfo.GetTargetLineColor()));
nextScanTime = self.World.SharedRandom.Next(Info.MinimumScanTimeInterval, Info.MaximumScanTimeInterval);
}

View File

@@ -16,7 +16,7 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Common.Traits
{
class BaseBuilderQueueManager
sealed class BaseBuilderQueueManager
{
readonly string category;

View File

@@ -38,7 +38,7 @@ namespace OpenRA.Mods.Common.Traits
public class HarvesterBotModule : ConditionalTrait<HarvesterBotModuleInfo>, IBotTick
{
class HarvesterTraitWrapper
sealed class HarvesterTraitWrapper
{
public readonly Actor Actor;
public readonly Harvester Harvester;

View File

@@ -11,7 +11,7 @@
namespace OpenRA.Mods.Common.Traits.BotModules.Squads
{
class StateMachine
sealed class StateMachine
{
IState currentState;
IState previousState;

View File

@@ -115,7 +115,7 @@ namespace OpenRA.Mods.Common.Traits.BotModules.Squads
}
}
class AirIdleState : AirStateBase, IState
sealed class AirIdleState : AirStateBase, IState
{
public void Activate(Squad owner) { }
@@ -141,7 +141,7 @@ namespace OpenRA.Mods.Common.Traits.BotModules.Squads
public void Deactivate(Squad owner) { }
}
class AirAttackState : AirStateBase, IState
sealed class AirAttackState : AirStateBase, IState
{
public void Activate(Squad owner) { }
@@ -195,7 +195,7 @@ namespace OpenRA.Mods.Common.Traits.BotModules.Squads
public void Deactivate(Squad owner) { }
}
class AirFleeState : AirStateBase, IState
sealed class AirFleeState : AirStateBase, IState
{
public void Activate(Squad owner) { }

View File

@@ -27,7 +27,7 @@ namespace OpenRA.Mods.Common.Traits.BotModules.Squads
}
}
class GroundUnitsIdleState : GroundStateBase, IState
sealed class GroundUnitsIdleState : GroundStateBase, IState
{
public void Activate(Squad owner) { }
@@ -65,7 +65,7 @@ namespace OpenRA.Mods.Common.Traits.BotModules.Squads
public void Deactivate(Squad owner) { }
}
class GroundUnitsAttackMoveState : GroundStateBase, IState
sealed class GroundUnitsAttackMoveState : GroundStateBase, IState
{
int lastUpdatedTick;
CPos? lastLeaderLocation;
@@ -148,7 +148,7 @@ namespace OpenRA.Mods.Common.Traits.BotModules.Squads
public void Deactivate(Squad owner) { }
}
class GroundUnitsAttackState : GroundStateBase, IState
sealed class GroundUnitsAttackState : GroundStateBase, IState
{
int lastUpdatedTick;
CPos? lastLeaderLocation;
@@ -206,7 +206,7 @@ namespace OpenRA.Mods.Common.Traits.BotModules.Squads
public void Deactivate(Squad owner) { }
}
class GroundUnitsFleeState : GroundStateBase, IState
sealed class GroundUnitsFleeState : GroundStateBase, IState
{
public void Activate(Squad owner) { }

View File

@@ -51,7 +51,7 @@ namespace OpenRA.Mods.Common.Traits.BotModules.Squads
}
}
class NavyUnitsIdleState : NavyStateBase, IState
sealed class NavyUnitsIdleState : NavyStateBase, IState
{
public void Activate(Squad owner) { }
@@ -89,7 +89,7 @@ namespace OpenRA.Mods.Common.Traits.BotModules.Squads
public void Deactivate(Squad owner) { }
}
class NavyUnitsAttackMoveState : NavyStateBase, IState
sealed class NavyUnitsAttackMoveState : NavyStateBase, IState
{
int lastUpdatedTick;
CPos? lastLeaderLocation;
@@ -172,7 +172,7 @@ namespace OpenRA.Mods.Common.Traits.BotModules.Squads
public void Deactivate(Squad owner) { }
}
class NavyUnitsAttackState : NavyStateBase, IState
sealed class NavyUnitsAttackState : NavyStateBase, IState
{
int lastUpdatedTick;
CPos? lastLeaderLocation;
@@ -230,7 +230,7 @@ namespace OpenRA.Mods.Common.Traits.BotModules.Squads
public void Deactivate(Squad owner) { }
}
class NavyUnitsFleeState : NavyStateBase, IState
sealed class NavyUnitsFleeState : NavyStateBase, IState
{
public void Activate(Squad owner) { }

View File

@@ -13,14 +13,14 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Common.Traits.BotModules.Squads
{
class UnitsForProtectionIdleState : GroundStateBase, IState
sealed class UnitsForProtectionIdleState : GroundStateBase, IState
{
public void Activate(Squad owner) { }
public void Tick(Squad owner) { owner.FuzzyStateMachine.ChangeState(owner, new UnitsForProtectionAttackState(), true); }
public void Deactivate(Squad owner) { }
}
class UnitsForProtectionAttackState : GroundStateBase, IState
sealed class UnitsForProtectionAttackState : GroundStateBase, IState
{
public const int BackoffTicks = 4;
internal int Backoff = BackoffTicks;
@@ -61,7 +61,7 @@ namespace OpenRA.Mods.Common.Traits.BotModules.Squads
public void Deactivate(Squad owner) { }
}
class UnitsForProtectionFleeState : GroundStateBase, IState
sealed class UnitsForProtectionFleeState : GroundStateBase, IState
{
public void Activate(Squad owner) { }

View File

@@ -16,7 +16,7 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Common.Traits
{
[Desc("Placeholder actor used for dead segments and bridge end ramps.")]
class BridgePlaceholderInfo : TraitInfo
sealed class BridgePlaceholderInfo : TraitInfo
{
public readonly string Type = "GroundLevelBridge";
@@ -31,7 +31,7 @@ namespace OpenRA.Mods.Common.Traits
public override object Create(ActorInitializer init) { return new BridgePlaceholder(init.Self, this); }
}
class BridgePlaceholder : IBridgeSegment, INotifyAddedToWorld, INotifyRemovedFromWorld
sealed class BridgePlaceholder : IBridgeSegment, INotifyAddedToWorld, INotifyRemovedFromWorld
{
public readonly BridgePlaceholderInfo Info;
readonly Actor self;

View File

@@ -23,7 +23,7 @@ namespace OpenRA.Mods.Common.Traits
public class BuildingInfluence
{
class InfluenceNode
sealed class InfluenceNode
{
public InfluenceNode Next;
public Actor Actor;

View File

@@ -18,7 +18,7 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Common.Traits
{
[Desc("Bridge actor that can't be passed underneath.")]
class GroundLevelBridgeInfo : TraitInfo, IRulesetLoaded, Requires<BuildingInfo>, Requires<IHealthInfo>
sealed class GroundLevelBridgeInfo : TraitInfo, IRulesetLoaded, Requires<BuildingInfo>, Requires<IHealthInfo>
{
public readonly string TerrainType = "Bridge";
@@ -47,7 +47,7 @@ namespace OpenRA.Mods.Common.Traits
public override object Create(ActorInitializer init) { return new GroundLevelBridge(init.Self, this); }
}
class GroundLevelBridge : IBridgeSegment, INotifyAddedToWorld, INotifyRemovedFromWorld
sealed class GroundLevelBridge : IBridgeSegment, INotifyAddedToWorld, INotifyRemovedFromWorld
{
public readonly GroundLevelBridgeInfo Info;
readonly Actor self;

View File

@@ -41,7 +41,7 @@ namespace OpenRA.Mods.Common.Traits
public override object Create(ActorInitializer init) { return new ProductionAirdrop(init, this); }
}
class ProductionAirdrop : Production
sealed class ProductionAirdrop : Production
{
public ProductionAirdrop(ActorInitializer init, ProductionAirdropInfo info)
: base(init, info) { }

View File

@@ -138,7 +138,7 @@ namespace OpenRA.Mods.Common.Traits
return order.OrderString == OrderID && order.ExtraData == ForceSet;
}
class RallyPointOrderTargeter : IOrderTargeter
sealed class RallyPointOrderTargeter : IOrderTargeter
{
readonly RallyPointInfo info;
@@ -151,7 +151,7 @@ namespace OpenRA.Mods.Common.Traits
public int OrderPriority => 0;
public bool TargetOverridesSelection(Actor self, in Target target, List<Actor> actorsAt, CPos xy, TargetModifiers modifiers) { return true; }
public bool ForceSet { get; private set; }
public bool IsQueued { get; protected set; }
public bool IsQueued { get; private set; }
public bool CanTarget(Actor self, in Target target, ref TargetModifiers modifiers, ref string cursor)
{

View File

@@ -17,7 +17,7 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Common.Traits
{
[Desc("Reserve landing places for aircraft.")]
class ReservableInfo : TraitInfo<Reservable> { }
sealed class ReservableInfo : TraitInfo<Reservable> { }
public class Reservable : ITick, INotifyOwnerChanged, INotifySold, INotifyActorDisposing, INotifyCreated
{

View File

@@ -47,7 +47,7 @@ namespace OpenRA.Mods.Common.Traits
public class SequencePlaceBuildingPreview { }
class SequencePlaceBuildingPreviewPreview : FootprintPlaceBuildingPreviewPreview
sealed class SequencePlaceBuildingPreviewPreview : FootprintPlaceBuildingPreviewPreview
{
readonly SequencePlaceBuildingPreviewInfo info;
readonly Animation preview;

View File

@@ -178,7 +178,7 @@ namespace OpenRA.Mods.Common.Traits
}
}
class AircraftMoveOrderTargeter : IOrderTargeter
sealed class AircraftMoveOrderTargeter : IOrderTargeter
{
readonly TransformsIntoAircraft aircraft;
@@ -198,7 +198,7 @@ namespace OpenRA.Mods.Common.Traits
public string OrderID => "Move";
public int OrderPriority => 4;
public bool IsQueued { get; protected set; }
public bool IsQueued { get; private set; }
public bool CanTarget(Actor self, in Target target, ref TargetModifiers modifiers, ref string cursor)
{

View File

@@ -166,7 +166,7 @@ namespace OpenRA.Mods.Common.Traits
}
}
class MoveOrderTargeter : IOrderTargeter
sealed class MoveOrderTargeter : IOrderTargeter
{
readonly TransformsIntoMobile mobile;
readonly bool rejectMove;
@@ -187,7 +187,7 @@ namespace OpenRA.Mods.Common.Traits
public string OrderID => "Move";
public int OrderPriority => 4;
public bool IsQueued { get; protected set; }
public bool IsQueued { get; private set; }
public bool CanTarget(Actor self, in Target target, ref TargetModifiers modifiers, ref string cursor)
{

View File

@@ -17,14 +17,14 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Common.Traits
{
[Desc("Visualize capture progress.")]
class CapturableProgressBarInfo : ConditionalTraitInfo, Requires<CapturableInfo>
sealed class CapturableProgressBarInfo : ConditionalTraitInfo, Requires<CapturableInfo>
{
public readonly Color Color = Color.Orange;
public override object Create(ActorInitializer init) { return new CapturableProgressBar(this); }
}
class CapturableProgressBar : ConditionalTrait<CapturableProgressBarInfo>, ISelectionBar, ICaptureProgressWatcher
sealed class CapturableProgressBar : ConditionalTrait<CapturableProgressBarInfo>, ISelectionBar, ICaptureProgressWatcher
{
readonly Dictionary<Actor, (int Current, int Total)> progress = new();

View File

@@ -17,7 +17,7 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Common.Traits
{
[Desc("Blinks the actor and captor when it is being captured.")]
class CapturableProgressBlinkInfo : ConditionalTraitInfo, Requires<CapturableInfo>
sealed class CapturableProgressBlinkInfo : ConditionalTraitInfo, Requires<CapturableInfo>
{
[Desc("Number of ticks to wait between repeating blinks.")]
public readonly int Interval = 50;
@@ -25,7 +25,7 @@ namespace OpenRA.Mods.Common.Traits
public override object Create(ActorInitializer init) { return new CapturableProgressBlink(this); }
}
class CapturableProgressBlink : ConditionalTrait<CapturableProgressBlinkInfo>, ITick, ICaptureProgressWatcher
sealed class CapturableProgressBlink : ConditionalTrait<CapturableProgressBlinkInfo>, ITick, ICaptureProgressWatcher
{
readonly List<Player> captorOwners = new();
readonly HashSet<Actor> captors = new();

View File

@@ -15,14 +15,14 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Common.Traits
{
[Desc("Visualize the progress of this actor being captured.")]
class CaptureProgressBarInfo : ConditionalTraitInfo, Requires<CapturesInfo>
sealed class CaptureProgressBarInfo : ConditionalTraitInfo, Requires<CapturesInfo>
{
public readonly Color Color = Color.Orange;
public override object Create(ActorInitializer init) { return new CaptureProgressBar(this); }
}
class CaptureProgressBar : ConditionalTrait<CaptureProgressBarInfo>, ISelectionBar, ICaptureProgressWatcher
sealed class CaptureProgressBar : ConditionalTrait<CaptureProgressBarInfo>, ISelectionBar, ICaptureProgressWatcher
{
int current;
int total;

View File

@@ -113,7 +113,7 @@ namespace OpenRA.Mods.Common.Traits
protected override void TraitEnabled(Actor self) { captureManager.RefreshCaptures(); }
protected override void TraitDisabled(Actor self) { captureManager.RefreshCaptures(); }
class CaptureOrderTargeter : UnitOrderTargeter
sealed class CaptureOrderTargeter : UnitOrderTargeter
{
readonly Captures captures;

View File

@@ -378,7 +378,7 @@ namespace OpenRA.Mods.Common.Traits
}
}
class CarryallPickupOrderTargeter : UnitOrderTargeter
sealed class CarryallPickupOrderTargeter : UnitOrderTargeter
{
public CarryallPickupOrderTargeter(CarryallInfo info)
: base("PickupUnit", 5, info.PickUpCursor, false, true)
@@ -411,14 +411,14 @@ namespace OpenRA.Mods.Common.Traits
}
}
class CarryallDeliverUnitTargeter : IOrderTargeter
sealed class CarryallDeliverUnitTargeter : IOrderTargeter
{
readonly AircraftInfo aircraftInfo;
readonly CarryallInfo info;
public string OrderID => "DeliverUnit";
public int OrderPriority => 6;
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 CarryallDeliverUnitTargeter(AircraftInfo aircraftInfo, CarryallInfo info)

View File

@@ -15,7 +15,7 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Common.Traits
{
[Desc("Attach this to actors which should regenerate or lose health points over time.")]
class ChangesHealthInfo : ConditionalTraitInfo, Requires<IHealthInfo>
sealed class ChangesHealthInfo : ConditionalTraitInfo, Requires<IHealthInfo>
{
[Desc("Absolute amount of health points added in each step.",
"Use negative values to apply damage.")]
@@ -41,7 +41,7 @@ namespace OpenRA.Mods.Common.Traits
public override object Create(ActorInitializer init) { return new ChangesHealth(init.Self, this); }
}
class ChangesHealth : ConditionalTrait<ChangesHealthInfo>, ITick, INotifyDamage, ISync
sealed class ChangesHealth : ConditionalTrait<ChangesHealthInfo>, ITick, INotifyDamage, ISync
{
readonly IHealth health;

View File

@@ -14,7 +14,7 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Common.Traits
{
[Desc("Modifies the terrain type underneath the actors location.")]
class ChangesTerrainInfo : TraitInfo, Requires<ImmobileInfo>
sealed class ChangesTerrainInfo : TraitInfo, Requires<ImmobileInfo>
{
[FieldLoader.Require]
public readonly string TerrainType = null;
@@ -22,7 +22,7 @@ namespace OpenRA.Mods.Common.Traits
public override object Create(ActorInitializer init) { return new ChangesTerrain(this); }
}
class ChangesTerrain : INotifyAddedToWorld, INotifyRemovedFromWorld
sealed class ChangesTerrain : INotifyAddedToWorld, INotifyRemovedFromWorld
{
readonly ChangesTerrainInfo info;
byte previousTerrain;

View File

@@ -14,7 +14,7 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Common.Traits
{
[Desc("Grants a condition while the trait is active.")]
class GrantConditionInfo : ConditionalTraitInfo
sealed class GrantConditionInfo : ConditionalTraitInfo
{
[FieldLoader.Require]
[GrantedConditionReference]
@@ -27,7 +27,7 @@ namespace OpenRA.Mods.Common.Traits
public override object Create(ActorInitializer init) { return new GrantCondition(this); }
}
class GrantCondition : ConditionalTrait<GrantConditionInfo>
sealed class GrantCondition : ConditionalTrait<GrantConditionInfo>
{
int conditionToken = Actor.InvalidConditionToken;

View File

@@ -15,7 +15,7 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Common.Traits
{
[Desc("Grants a condition while the trait is active.")]
class GrantConditionOnFactionInfo : ConditionalTraitInfo
sealed class GrantConditionOnFactionInfo : ConditionalTraitInfo
{
[FieldLoader.Require]
[GrantedConditionReference]
@@ -31,7 +31,7 @@ namespace OpenRA.Mods.Common.Traits
public override object Create(ActorInitializer init) { return new GrantConditionOnFaction(init, this); }
}
class GrantConditionOnFaction : ConditionalTrait<GrantConditionOnFactionInfo>, INotifyOwnerChanged
sealed class GrantConditionOnFaction : ConditionalTrait<GrantConditionOnFactionInfo>, INotifyOwnerChanged
{
int conditionToken = Actor.InvalidConditionToken;
string faction;

View File

@@ -18,7 +18,7 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Common.Traits
{
[Desc("Creates duplicates of the actor that collects the crate.")]
class DuplicateUnitCrateActionInfo : CrateActionInfo
sealed class DuplicateUnitCrateActionInfo : CrateActionInfo
{
[Desc("The maximum number of duplicates to make.")]
public readonly int MaxAmount = 2;
@@ -44,7 +44,7 @@ namespace OpenRA.Mods.Common.Traits
public override object Create(ActorInitializer init) { return new DuplicateUnitCrateAction(init.Self, this); }
}
class DuplicateUnitCrateAction : CrateAction
sealed class DuplicateUnitCrateAction : CrateAction
{
readonly DuplicateUnitCrateActionInfo info;

View File

@@ -14,7 +14,7 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Common.Traits
{
[Desc("Fires a weapon at the location when collected.")]
class ExplodeCrateActionInfo : CrateActionInfo
sealed class ExplodeCrateActionInfo : CrateActionInfo
{
[WeaponReference]
[FieldLoader.Require]
@@ -24,7 +24,7 @@ namespace OpenRA.Mods.Common.Traits
public override object Create(ActorInitializer init) { return new ExplodeCrateAction(init.Self, this); }
}
class ExplodeCrateAction : CrateAction
sealed class ExplodeCrateAction : CrateAction
{
readonly ExplodeCrateActionInfo info;

View File

@@ -14,7 +14,7 @@ using OpenRA.Mods.Common.Effects;
namespace OpenRA.Mods.Common.Traits
{
[Desc("Gives cash to the collector.")]
class GiveCashCrateActionInfo : CrateActionInfo
sealed class GiveCashCrateActionInfo : CrateActionInfo
{
[Desc("Amount of cash to give.")]
public readonly int Amount = 2000;
@@ -25,7 +25,7 @@ namespace OpenRA.Mods.Common.Traits
public override object Create(ActorInitializer init) { return new GiveCashCrateAction(init.Self, this); }
}
class GiveCashCrateAction : CrateAction
sealed class GiveCashCrateAction : CrateAction
{
readonly GiveCashCrateActionInfo info;
public GiveCashCrateAction(Actor self, GiveCashCrateActionInfo info)

View File

@@ -14,7 +14,7 @@ using System.Linq;
namespace OpenRA.Mods.Common.Traits
{
[Desc("Spawns units when collected.", "Adjust selection shares when player has no base.")]
class GiveBaseBuilderCrateActionInfo : GiveUnitCrateActionInfo
sealed class GiveBaseBuilderCrateActionInfo : GiveUnitCrateActionInfo
{
[Desc("The selection shares to use if the collector has no actor with `" + nameof(BaseBuilding) + ".")]
public readonly int NoBaseSelectionShares = 1000;
@@ -22,7 +22,7 @@ namespace OpenRA.Mods.Common.Traits
public override object Create(ActorInitializer init) { return new GiveBaseBuilderCrateAction(init.Self, this); }
}
class GiveBaseBuilderCrateAction : GiveUnitCrateAction
sealed class GiveBaseBuilderCrateAction : GiveUnitCrateAction
{
readonly GiveBaseBuilderCrateActionInfo info;
public GiveBaseBuilderCrateAction(Actor self, GiveBaseBuilderCrateActionInfo info)

View File

@@ -16,7 +16,7 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Common.Traits
{
[Desc("Heals all actors that belong to the owner of the collector.")]
class HealActorsCrateActionInfo : CrateActionInfo
sealed class HealActorsCrateActionInfo : CrateActionInfo
{
[Desc("The target type(s) of the actors this crate action will heal. Leave empty to heal all actors.")]
public readonly BitSet<TargetableType> TargetTypes = default;
@@ -24,7 +24,7 @@ namespace OpenRA.Mods.Common.Traits
public override object Create(ActorInitializer init) { return new HealActorsCrateAction(init.Self, this); }
}
class HealActorsCrateAction : CrateAction
sealed class HealActorsCrateAction : CrateAction
{
readonly HealActorsCrateActionInfo info;

View File

@@ -14,7 +14,7 @@ using System.Linq;
namespace OpenRA.Mods.Common.Traits
{
[Desc("Hides the entire map in shroud.")]
class HideMapCrateActionInfo : CrateActionInfo
sealed class HideMapCrateActionInfo : CrateActionInfo
{
[Desc("Should the map also be hidden for the allies of the collector's owner?")]
public readonly bool IncludeAllies = false;
@@ -22,7 +22,7 @@ namespace OpenRA.Mods.Common.Traits
public override object Create(ActorInitializer init) { return new HideMapCrateAction(init.Self, this); }
}
class HideMapCrateAction : CrateAction
sealed class HideMapCrateAction : CrateAction
{
readonly HideMapCrateActionInfo info;

View File

@@ -14,7 +14,7 @@ using System.Linq;
namespace OpenRA.Mods.Common.Traits
{
[Desc("Gives experience levels to the collector.")]
class LevelUpCrateActionInfo : CrateActionInfo
sealed class LevelUpCrateActionInfo : CrateActionInfo
{
[Desc("Number of experience levels to give.")]
public readonly int Levels = 1;
@@ -28,7 +28,7 @@ namespace OpenRA.Mods.Common.Traits
public override object Create(ActorInitializer init) { return new LevelUpCrateAction(init.Self, this); }
}
class LevelUpCrateAction : CrateAction
sealed class LevelUpCrateAction : CrateAction
{
readonly Actor self;
readonly LevelUpCrateActionInfo info;

View File

@@ -12,7 +12,7 @@
namespace OpenRA.Mods.Common.Traits
{
[Desc("Reveals the entire map.")]
class RevealMapCrateActionInfo : CrateActionInfo
sealed class RevealMapCrateActionInfo : CrateActionInfo
{
[Desc("Should the map also be revealed for the allies of the collector's owner?")]
public readonly bool IncludeAllies = false;
@@ -20,7 +20,7 @@ namespace OpenRA.Mods.Common.Traits
public override object Create(ActorInitializer init) { return new RevealMapCrateAction(init.Self, this); }
}
class RevealMapCrateAction : CrateAction
sealed class RevealMapCrateAction : CrateAction
{
readonly RevealMapCrateActionInfo info;

View File

@@ -15,7 +15,7 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Common.Traits
{
[Desc("Gives a supportpower to the collector.")]
class SupportPowerCrateActionInfo : CrateActionInfo
sealed class SupportPowerCrateActionInfo : CrateActionInfo
{
[ActorReference]
[FieldLoader.Require]
@@ -25,7 +25,7 @@ namespace OpenRA.Mods.Common.Traits
public override object Create(ActorInitializer init) { return new SupportPowerCrateAction(init.Self, this); }
}
class SupportPowerCrateAction : CrateAction
sealed class SupportPowerCrateAction : CrateAction
{
readonly SupportPowerCrateActionInfo info;
public SupportPowerCrateAction(Actor self, SupportPowerCrateActionInfo info)

View File

@@ -14,7 +14,7 @@ using OpenRA.Primitives;
namespace OpenRA.Mods.Common.Traits
{
[Desc("This actor is crushable.")]
class CrushableInfo : ConditionalTraitInfo
sealed class CrushableInfo : ConditionalTraitInfo
{
[Desc("Sound to play when being crushed.")]
public readonly string CrushSound = null;
@@ -28,7 +28,7 @@ namespace OpenRA.Mods.Common.Traits
public override object Create(ActorInitializer init) { return new Crushable(init.Self, this); }
}
class Crushable : ConditionalTrait<CrushableInfo>, ICrushable, INotifyCrushed
sealed class Crushable : ConditionalTrait<CrushableInfo>, ICrushable, INotifyCrushed
{
readonly Actor self;

View File

@@ -19,7 +19,7 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Common.Traits
{
[Desc("Donate money to actors with the `" + nameof(AcceptsDeliveredCash) + "` trait.")]
class DeliversCashInfo : TraitInfo
sealed class DeliversCashInfo : TraitInfo
{
[Desc("The amount of cash the owner receives.")]
public readonly int Payload = 500;
@@ -46,7 +46,7 @@ namespace OpenRA.Mods.Common.Traits
public override object Create(ActorInitializer init) { return new DeliversCash(this); }
}
class DeliversCash : IIssueOrder, IResolveOrder, IOrderVoice, INotifyCashTransfer
sealed class DeliversCash : IIssueOrder, IResolveOrder, IOrderVoice, INotifyCashTransfer
{
readonly DeliversCashInfo info;
@@ -93,7 +93,7 @@ namespace OpenRA.Mods.Common.Traits
Game.Sound.Play(SoundType.World, info.Sounds, self.World, self.CenterPosition);
}
public class DeliversCashOrderTargeter : UnitOrderTargeter
public sealed class DeliversCashOrderTargeter : UnitOrderTargeter
{
public DeliversCashOrderTargeter(DeliversCashInfo info)
: base("DeliverCash", 5, info.Cursor, false, true) { }

View File

@@ -18,7 +18,7 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Common.Traits
{
[Desc("This actor can grant experience levels equal to it's own current level via entering to other actors with the `" + nameof(AcceptsDeliveredExperience) + "` trait.")]
class DeliversExperienceInfo : TraitInfo, Requires<GainsExperienceInfo>
sealed class DeliversExperienceInfo : TraitInfo, Requires<GainsExperienceInfo>
{
[Desc("The amount of experience the donating player receives.")]
public readonly int PlayerExperience = 0;
@@ -39,7 +39,7 @@ namespace OpenRA.Mods.Common.Traits
public override object Create(ActorInitializer init) { return new DeliversExperience(init, this); }
}
class DeliversExperience : IIssueOrder, IResolveOrder, IOrderVoice
sealed class DeliversExperience : IIssueOrder, IResolveOrder, IOrderVoice
{
readonly DeliversExperienceInfo info;
readonly Actor self;
@@ -95,7 +95,7 @@ namespace OpenRA.Mods.Common.Traits
self.ShowTargetLines();
}
public class DeliversExperienceOrderTargeter : UnitOrderTargeter
public sealed class DeliversExperienceOrderTargeter : UnitOrderTargeter
{
public DeliversExperienceOrderTargeter(DeliversExperienceInfo info)
: base("DeliverExperience", 5, info.Cursor, true, true) { }

View File

@@ -30,7 +30,7 @@ namespace OpenRA.Mods.Common.Traits
public class Demolishable : ConditionalTrait<DemolishableInfo>, IDemolishable, ITick, INotifyOwnerChanged
{
class DemolishAction
sealed class DemolishAction
{
public readonly Actor Saboteur;
public readonly int Token;

View File

@@ -18,7 +18,7 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Common.Traits
{
class DemolitionInfo : ConditionalTraitInfo
sealed class DemolitionInfo : ConditionalTraitInfo
{
[Desc("Delay to demolish the target once the explosive device is planted. " +
"Measured in game ticks. Default is 1.8 seconds.")]
@@ -57,7 +57,7 @@ namespace OpenRA.Mods.Common.Traits
public override object Create(ActorInitializer init) { return new Demolition(this); }
}
class Demolition : ConditionalTrait<DemolitionInfo>, IIssueOrder, IResolveOrder, IOrderVoice
sealed class Demolition : ConditionalTrait<DemolitionInfo>, IIssueOrder, IResolveOrder, IOrderVoice
{
public Demolition(DemolitionInfo info)
: base(info) { }
@@ -111,7 +111,7 @@ namespace OpenRA.Mods.Common.Traits
return order.OrderString == "C4" ? Info.Voice : null;
}
class DemolitionOrderTargeter : UnitOrderTargeter
sealed class DemolitionOrderTargeter : UnitOrderTargeter
{
readonly DemolitionInfo info;

View File

@@ -150,7 +150,7 @@ namespace OpenRA.Mods.Common.Traits
}
}
class ExperienceInit : ValueActorInit<int>
sealed class ExperienceInit : ValueActorInit<int>
{
public ExperienceInit(TraitInfo info, int value)
: base(info, value) { }

View File

@@ -18,7 +18,7 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Common.Traits
{
[Desc("When killed, this actor causes the attacking player to receive money.")]
class GivesBountyInfo : ConditionalTraitInfo
sealed class GivesBountyInfo : ConditionalTraitInfo
{
[Desc("Percentage of the killed actor's Cost or CustomSellValue to be given.")]
public readonly int Percentage = 10;
@@ -36,7 +36,7 @@ namespace OpenRA.Mods.Common.Traits
public override object Create(ActorInitializer init) { return new GivesBounty(this); }
}
class GivesBounty : ConditionalTrait<GivesBountyInfo>, INotifyKilled, INotifyPassengerEntered, INotifyPassengerExited
sealed class GivesBounty : ConditionalTrait<GivesBountyInfo>, INotifyKilled, INotifyPassengerEntered, INotifyPassengerExited
{
readonly Dictionary<Actor, GivesBounty[]> passengerBounties = new();

View File

@@ -16,7 +16,7 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Common.Traits
{
[Desc("This actor gives experience to a GainsExperience actor when they are killed.")]
class GivesExperienceInfo : TraitInfo
sealed class GivesExperienceInfo : TraitInfo
{
[Desc("If -1, use the value of the unit cost.")]
public readonly int Experience = -1;
@@ -33,7 +33,7 @@ namespace OpenRA.Mods.Common.Traits
public override object Create(ActorInitializer init) { return new GivesExperience(this); }
}
class GivesExperience : INotifyKilled, INotifyCreated
sealed class GivesExperience : INotifyKilled, INotifyCreated
{
readonly GivesExperienceInfo info;

View File

@@ -381,11 +381,11 @@ namespace OpenRA.Mods.Common.Traits
conditionToken = self.RevokeCondition(conditionToken);
}
class HarvestOrderTargeter : IOrderTargeter
sealed class HarvestOrderTargeter : IOrderTargeter
{
public string OrderID => "Harvest";
public int OrderPriority => 10;
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)

View File

@@ -14,6 +14,6 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Common.Traits
{
[Desc("This actor does not care about any type of cloak its targets might have, regardless of distance.")]
class IgnoresCloakInfo : TraitInfo<IgnoresCloak> { }
class IgnoresCloak { }
sealed class IgnoresCloakInfo : TraitInfo<IgnoresCloak> { }
sealed class IgnoresCloak { }
}

View File

@@ -14,7 +14,7 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Common.Traits
{
[Desc("Allows automatic targeting of disguised actors.")]
class IgnoresDisguiseInfo : TraitInfo<IgnoresDisguise> { }
sealed class IgnoresDisguiseInfo : TraitInfo<IgnoresDisguise> { }
class IgnoresDisguise { }
sealed class IgnoresDisguise { }
}

View File

@@ -15,7 +15,7 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Common.Traits
{
class ImmobileInfo : TraitInfo, IOccupySpaceInfo
sealed class ImmobileInfo : TraitInfo, IOccupySpaceInfo
{
public readonly bool OccupiesSpace = true;
public override object Create(ActorInitializer init) { return new Immobile(init, this); }
@@ -29,7 +29,7 @@ namespace OpenRA.Mods.Common.Traits
bool IOccupySpaceInfo.SharesCell => false;
}
class Immobile : IOccupySpace, ISync, INotifyAddedToWorld, INotifyRemovedFromWorld
sealed class Immobile : IOccupySpace, ISync, INotifyAddedToWorld, INotifyRemovedFromWorld
{
[Sync]
readonly CPos location;

View File

@@ -16,7 +16,7 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Common.Traits
{
[Desc("Makes the unit automatically run around when taking damage.")]
class ScaredyCatInfo : TraitInfo, Requires<MobileInfo>
sealed class ScaredyCatInfo : TraitInfo, Requires<MobileInfo>
{
[Desc("Chance (out of 100) the unit has to enter panic mode when attacked.")]
public readonly int PanicChance = 100;
@@ -39,7 +39,7 @@ namespace OpenRA.Mods.Common.Traits
public override object Create(ActorInitializer init) { return new ScaredyCat(init.Self, this); }
}
class ScaredyCat : ITick, INotifyIdle, INotifyDamage, INotifyAttack, ISpeedModifier, ISync, IRenderInfantrySequenceModifier
sealed class ScaredyCat : ITick, INotifyIdle, INotifyDamage, INotifyAttack, ISpeedModifier, ISync, IRenderInfantrySequenceModifier
{
readonly ScaredyCatInfo info;
readonly Mobile mobile;

View File

@@ -100,7 +100,7 @@ namespace OpenRA.Mods.Common.Traits
self.ShowTargetLines();
}
class InstantRepairOrderTargeter : UnitOrderTargeter
sealed class InstantRepairOrderTargeter : UnitOrderTargeter
{
readonly InstantlyRepairsInfo info;

View File

@@ -14,7 +14,7 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Common.Traits
{
class KillsSelfInfo : ConditionalTraitInfo
sealed class KillsSelfInfo : ConditionalTraitInfo
{
[Desc("Remove the actor from the world (and destroy it) instead of killing it.")]
public readonly bool RemoveInstead = false;
@@ -32,7 +32,7 @@ namespace OpenRA.Mods.Common.Traits
public override object Create(ActorInitializer init) { return new KillsSelf(init.Self, this); }
}
class KillsSelf : ConditionalTrait<KillsSelfInfo>, INotifyAddedToWorld, ITick
sealed class KillsSelf : ConditionalTrait<KillsSelfInfo>, INotifyAddedToWorld, ITick
{
int lifetime;

View File

@@ -969,7 +969,7 @@ namespace OpenRA.Mods.Common.Traits
return returnToCellOnCreation ? new ReturnToCellActivity(self, creationActivityDelay, returnToCellOnCreationRecalculateSubCell) : null;
}
class MoveOrderTargeter : IOrderTargeter
sealed class MoveOrderTargeter : IOrderTargeter
{
readonly Mobile mobile;
readonly LocomotorInfo locomotorInfo;
@@ -992,7 +992,7 @@ namespace OpenRA.Mods.Common.Traits
public string OrderID => "Move";
public int OrderPriority => 4;
public bool IsQueued { get; protected set; }
public bool IsQueued { get; private set; }
public bool CanTarget(Actor self, in Target target, ref TargetModifiers modifiers, ref string cursor)
{

View File

@@ -39,7 +39,7 @@ namespace OpenRA.Mods.Common.Traits
bool isRendering;
bool created;
class FrozenState
sealed class FrozenState
{
public readonly FrozenActor FrozenActor;
public bool IsVisible;

View File

@@ -17,7 +17,7 @@ namespace OpenRA.Mods.Common.Traits
{
[TraitLocation(SystemActors.World | SystemActors.EditorWorld)]
[Desc("Palette effect used for sprinkle \"animations\".")]
class RotationPaletteEffectInfo : TraitInfo
sealed class RotationPaletteEffectInfo : TraitInfo
{
[Desc("Defines to which palettes this effect should be applied to.",
"If none specified, it applies to all palettes not explicitly excluded.")]
@@ -45,7 +45,7 @@ namespace OpenRA.Mods.Common.Traits
public override object Create(ActorInitializer init) { return new RotationPaletteEffect(init.World, this); }
}
class RotationPaletteEffect : ITick, IPaletteModifier
sealed class RotationPaletteEffect : ITick, IPaletteModifier
{
readonly RotationPaletteEffectInfo info;
readonly uint[] rotationBuffer;

View File

@@ -20,7 +20,7 @@ namespace OpenRA.Mods.Common.Traits
{
[TraitLocation(SystemActors.World | SystemActors.EditorWorld)]
[Desc("Create a color picker palette from another palette.")]
class ColorPickerPaletteInfo : TraitInfo
sealed class ColorPickerPaletteInfo : TraitInfo
{
[PaletteDefinition]
[FieldLoader.Require]
@@ -41,7 +41,7 @@ namespace OpenRA.Mods.Common.Traits
public override object Create(ActorInitializer init) { return new ColorPickerPalette(this); }
}
class ColorPickerPalette : ILoadsPalettes, IProvidesAssetBrowserColorPickerPalettes, ITickRender
sealed class ColorPickerPalette : ILoadsPalettes, IProvidesAssetBrowserColorPickerPalettes, ITickRender
{
readonly ColorPickerPaletteInfo info;
Color color;

View File

@@ -19,7 +19,7 @@ namespace OpenRA.Mods.Common.Traits
{
[TraitLocation(SystemActors.World | SystemActors.EditorWorld)]
[Desc("Load VGA palette (.pal) registers.")]
class PaletteFromFileInfo : TraitInfo, ITilesetSpecificPaletteInfo, IProvidesCursorPaletteInfo
sealed class PaletteFromFileInfo : TraitInfo, ITilesetSpecificPaletteInfo, IProvidesCursorPaletteInfo
{
[PaletteDefinition]
[FieldLoader.Require]
@@ -56,7 +56,7 @@ namespace OpenRA.Mods.Common.Traits
}
}
class PaletteFromFile : ILoadsPalettes, IProvidesAssetBrowserPalettes
sealed class PaletteFromFile : ILoadsPalettes, IProvidesAssetBrowserPalettes
{
readonly World world;
readonly PaletteFromFileInfo info;

View File

@@ -21,7 +21,7 @@ namespace OpenRA.Mods.Common.Traits
{
[TraitLocation(SystemActors.World | SystemActors.EditorWorld)]
[Desc("Load a GIMP .gpl or JASC .pal palette file. Supports per-color alpha.")]
class PaletteFromGimpOrJascFileInfo : TraitInfo, IProvidesCursorPaletteInfo
sealed class PaletteFromGimpOrJascFileInfo : TraitInfo, IProvidesCursorPaletteInfo
{
[PaletteDefinition]
[FieldLoader.Require]
@@ -110,7 +110,7 @@ namespace OpenRA.Mods.Common.Traits
}
}
class PaletteFromGimpOrJascFile : ILoadsPalettes, IProvidesAssetBrowserPalettes
sealed class PaletteFromGimpOrJascFile : ILoadsPalettes, IProvidesAssetBrowserPalettes
{
readonly World world;
readonly PaletteFromGimpOrJascFileInfo info;

View File

@@ -19,7 +19,7 @@ namespace OpenRA.Mods.Common.Traits
{
[TraitLocation(SystemActors.World | SystemActors.EditorWorld)]
[Desc("Creates a greyscale palette without any base palette file.")]
class PaletteFromGrayscaleInfo : TraitInfo, ITilesetSpecificPaletteInfo
sealed class PaletteFromGrayscaleInfo : TraitInfo, ITilesetSpecificPaletteInfo
{
[PaletteDefinition]
[FieldLoader.Require]
@@ -39,7 +39,7 @@ namespace OpenRA.Mods.Common.Traits
public override object Create(ActorInitializer init) { return new PaletteFromGrayscale(init.World, this); }
}
class PaletteFromGrayscale : ILoadsPalettes
sealed class PaletteFromGrayscale : ILoadsPalettes
{
readonly World world;
readonly PaletteFromGrayscaleInfo info;

View File

@@ -18,7 +18,7 @@ namespace OpenRA.Mods.Common.Traits
{
[TraitLocation(SystemActors.World | SystemActors.EditorWorld)]
[Desc("Create a palette by applying alpha transparency to another palette.")]
class PaletteFromPaletteWithAlphaInfo : TraitInfo
sealed class PaletteFromPaletteWithAlphaInfo : TraitInfo
{
[PaletteDefinition]
[FieldLoader.Require]
@@ -42,7 +42,7 @@ namespace OpenRA.Mods.Common.Traits
public override object Create(ActorInitializer init) { return new PaletteFromPaletteWithAlpha(this); }
}
class PaletteFromPaletteWithAlpha : ILoadsPalettes, IProvidesAssetBrowserPalettes
sealed class PaletteFromPaletteWithAlpha : ILoadsPalettes, IProvidesAssetBrowserPalettes
{
readonly PaletteFromPaletteWithAlphaInfo info;
@@ -57,7 +57,7 @@ namespace OpenRA.Mods.Common.Traits
public IEnumerable<string> PaletteNames { get { yield return info.Name; } }
}
class AlphaPaletteRemap : IPaletteRemap
sealed class AlphaPaletteRemap : IPaletteRemap
{
readonly float alpha;
readonly bool premultiply;

View File

@@ -17,7 +17,7 @@ namespace OpenRA.Mods.Common.Traits
{
[TraitLocation(SystemActors.World | SystemActors.EditorWorld)]
[Desc("Create player palettes by applying alpha transparency to another player palette.")]
class PaletteFromPlayerPaletteWithAlphaInfo : TraitInfo
sealed class PaletteFromPlayerPaletteWithAlphaInfo : TraitInfo
{
[FieldLoader.Require]
[PaletteDefinition(true)]
@@ -41,7 +41,7 @@ namespace OpenRA.Mods.Common.Traits
public override object Create(ActorInitializer init) { return new PaletteFromPlayerPaletteWithAlpha(this); }
}
class PaletteFromPlayerPaletteWithAlpha : ILoadsPlayerPalettes
sealed class PaletteFromPlayerPaletteWithAlpha : ILoadsPlayerPalettes
{
readonly PaletteFromPlayerPaletteWithAlphaInfo info;

View File

@@ -20,7 +20,7 @@ namespace OpenRA.Mods.Common.Traits
{
[TraitLocation(SystemActors.World | SystemActors.EditorWorld)]
[Desc("Load a PNG and use its embedded palette.")]
class PaletteFromPngInfo : TraitInfo, ITilesetSpecificPaletteInfo, IProvidesCursorPaletteInfo
sealed class PaletteFromPngInfo : TraitInfo, ITilesetSpecificPaletteInfo, IProvidesCursorPaletteInfo
{
[PaletteDefinition]
[FieldLoader.Require]
@@ -64,7 +64,7 @@ namespace OpenRA.Mods.Common.Traits
}
}
class PaletteFromPng : ILoadsPalettes, IProvidesAssetBrowserPalettes
sealed class PaletteFromPng : ILoadsPalettes, IProvidesAssetBrowserPalettes
{
readonly World world;
readonly PaletteFromPngInfo info;

View File

@@ -19,7 +19,7 @@ namespace OpenRA.Mods.Common.Traits
{
[TraitLocation(SystemActors.World | SystemActors.EditorWorld)]
[Desc("Creates a single color palette without any base palette file.")]
class PaletteFromRGBAInfo : TraitInfo, ITilesetSpecificPaletteInfo
sealed class PaletteFromRGBAInfo : TraitInfo, ITilesetSpecificPaletteInfo
{
[PaletteDefinition]
[FieldLoader.Require]
@@ -51,7 +51,7 @@ namespace OpenRA.Mods.Common.Traits
public override object Create(ActorInitializer init) { return new PaletteFromRGBA(init.World, this); }
}
class PaletteFromRGBA : ILoadsPalettes
sealed class PaletteFromRGBA : ILoadsPalettes
{
readonly World world;
readonly PaletteFromRGBAInfo info;

View File

@@ -15,9 +15,9 @@ namespace OpenRA.Mods.Common.Traits
{
[TraitLocation(SystemActors.Player)]
[Desc("Attach this to the player actor to allow building repair by team mates.")]
class AllyRepairInfo : TraitInfo<AllyRepair> { }
sealed class AllyRepairInfo : TraitInfo<AllyRepair> { }
class AllyRepair : IResolveOrder
sealed class AllyRepair : IResolveOrder
{
public void ResolveOrder(Actor self, Order order)
{

View File

@@ -18,7 +18,7 @@ namespace OpenRA.Mods.Common.Traits
[TraitLocation(SystemActors.Player)]
[Desc("Tracks neutral and enemy actors' visibility and notifies the player.",
"Attach this to the player actor. The actors to track need the 'AnnounceOnSeen' trait.")]
class EnemyWatcherInfo : TraitInfo
sealed class EnemyWatcherInfo : TraitInfo
{
[Desc("Interval in ticks between scanning for enemies.")]
public readonly int ScanInterval = 25;
@@ -29,7 +29,7 @@ namespace OpenRA.Mods.Common.Traits
public override object Create(ActorInitializer init) { return new EnemyWatcher(this); }
}
class EnemyWatcher : ITick
sealed class EnemyWatcher : ITick
{
readonly EnemyWatcherInfo info;
readonly HashSet<Player> discoveredPlayers;

View File

@@ -114,7 +114,7 @@ namespace OpenRA.Mods.Common.Traits
public Player Owner { get; }
class Watcher
sealed class Watcher
{
public readonly string Key;
public ITechTreeElement RegisteredBy { get; }

View File

@@ -17,12 +17,12 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Common.Traits
{
[Desc("Produce a unit on the closest map edge cell and move into the world.")]
class ProductionFromMapEdgeInfo : ProductionInfo
sealed class ProductionFromMapEdgeInfo : ProductionInfo
{
public override object Create(ActorInitializer init) { return new ProductionFromMapEdge(init, this); }
}
class ProductionFromMapEdge : Production
sealed class ProductionFromMapEdge : Production
{
readonly CPos? spawnLocation;
readonly IPathFinder pathFinder;

View File

@@ -38,7 +38,7 @@ namespace OpenRA.Mods.Common.Traits
public override object Create(ActorInitializer init) { return new ProductionParadrop(init, this); }
}
class ProductionParadrop : Production
sealed class ProductionParadrop : Production
{
readonly Lazy<RallyPoint> rp;

View File

@@ -18,7 +18,7 @@ using OpenRA.Widgets;
namespace OpenRA.Mods.Common.Traits
{
[TraitLocation(SystemActors.World)]
class ProductionQueueFromSelectionInfo : TraitInfo
sealed class ProductionQueueFromSelectionInfo : TraitInfo
{
public readonly string ProductionTabsWidget = null;
public readonly string ProductionPaletteWidget = null;
@@ -26,7 +26,7 @@ namespace OpenRA.Mods.Common.Traits
public override object Create(ActorInitializer init) { return new ProductionQueueFromSelection(init.World, this); }
}
class ProductionQueueFromSelection : INotifySelection
sealed class ProductionQueueFromSelection : INotifySelection
{
readonly World world;
readonly Lazy<ProductionTabsWidget> tabsWidget;

View File

@@ -17,7 +17,7 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Common.Traits.Render
{
[Desc("Display the time remaining until the next cash is given by actor's CashTrickler trait.")]
class CashTricklerBarInfo : TraitInfo, Requires<CashTricklerInfo>
sealed class CashTricklerBarInfo : TraitInfo, Requires<CashTricklerInfo>
{
[Desc("Defines to which players the bar is to be shown.")]
public readonly PlayerRelationship DisplayRelationships = PlayerRelationship.Ally;
@@ -27,7 +27,7 @@ namespace OpenRA.Mods.Common.Traits.Render
public override object Create(ActorInitializer init) { return new CashTricklerBar(init.Self, this); }
}
class CashTricklerBar : ISelectionBar
sealed class CashTricklerBar : ISelectionBar
{
readonly Actor self;
readonly CashTricklerBarInfo info;

View File

@@ -19,14 +19,14 @@ namespace OpenRA.Mods.Common.Traits
{
[TraitLocation(SystemActors.World)]
[Desc("Displays custom terrain types.")]
class CustomTerrainDebugOverlayInfo : TraitInfo
sealed class CustomTerrainDebugOverlayInfo : TraitInfo
{
public readonly string Font = "TinyBold";
public override object Create(ActorInitializer init) { return new CustomTerrainDebugOverlay(this); }
}
class CustomTerrainDebugOverlay : IWorldLoaded, IChatCommand, IRenderAnnotations
sealed class CustomTerrainDebugOverlay : IWorldLoaded, IChatCommand, IRenderAnnotations
{
const string CommandName = "custom-terrain";

View File

@@ -16,7 +16,7 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Common.Traits.Render
{
[Desc("Visualizes the remaining build time of actor produced here.")]
class ProductionBarInfo : ConditionalTraitInfo, Requires<ProductionInfo>, IRulesetLoaded
sealed class ProductionBarInfo : ConditionalTraitInfo, Requires<ProductionInfo>, IRulesetLoaded
{
[FieldLoader.Require]
[Desc("Production queue type, for actors with multiple queues.")]
@@ -41,7 +41,7 @@ namespace OpenRA.Mods.Common.Traits.Render
public override object Create(ActorInitializer init) { return new ProductionBar(init.Self, this); }
}
class ProductionBar : ConditionalTrait<ProductionBarInfo>, ISelectionBar, ITick, INotifyOwnerChanged
sealed class ProductionBar : ConditionalTrait<ProductionBarInfo>, ISelectionBar, ITick, INotifyOwnerChanged
{
readonly Actor self;
ProductionQueue queue;

View File

@@ -17,7 +17,7 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Common.Traits.Render
{
[Desc("Visualizes the minimum remaining time for reloading the armaments.")]
class ReloadArmamentsBarInfo : TraitInfo
sealed class ReloadArmamentsBarInfo : TraitInfo
{
[Desc("Armament names")]
public readonly string[] Armaments = { "primary", "secondary" };
@@ -27,7 +27,7 @@ namespace OpenRA.Mods.Common.Traits.Render
public override object Create(ActorInitializer init) { return new ReloadArmamentsBar(init.Self, this); }
}
class ReloadArmamentsBar : ISelectionBar, INotifyCreated
sealed class ReloadArmamentsBar : ISelectionBar, INotifyCreated
{
readonly ReloadArmamentsBarInfo info;
readonly Actor self;

View File

@@ -19,14 +19,14 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Common.Traits.Render
{
[Desc("Displays the actor's type and ID above the actor.")]
class RenderDebugStateInfo : TraitInfo
sealed class RenderDebugStateInfo : TraitInfo
{
public readonly string Font = "TinyBold";
public override object Create(ActorInitializer init) { return new RenderDebugState(init.Self, this); }
}
class RenderDebugState : INotifyAddedToWorld, INotifyOwnerChanged, INotifyCreated, IRenderAnnotationsWhenSelected
sealed class RenderDebugState : INotifyAddedToWorld, INotifyOwnerChanged, INotifyCreated, IRenderAnnotationsWhenSelected
{
readonly DebugVisualizations debugVis;
readonly SpriteFont font;

View File

@@ -18,7 +18,7 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Common.Traits
{
// TODO: remove all the Render*Circle duplication
class RenderJammerCircleInfo : ConditionalTraitInfo, IPlaceBuildingDecorationInfo
sealed class RenderJammerCircleInfo : ConditionalTraitInfo, IPlaceBuildingDecorationInfo
{
[Desc("Range circle color.")]
public readonly Color Color = Color.FromArgb(128, Color.Red);
@@ -59,7 +59,7 @@ namespace OpenRA.Mods.Common.Traits
public override object Create(ActorInitializer init) { return new RenderJammerCircle(this); }
}
class RenderJammerCircle : ConditionalTrait<RenderJammerCircleInfo>, IRenderAnnotationsWhenSelected
sealed class RenderJammerCircle : ConditionalTrait<RenderJammerCircleInfo>, IRenderAnnotationsWhenSelected
{
readonly RenderJammerCircleInfo info;

View File

@@ -22,7 +22,7 @@ namespace OpenRA.Mods.Common.Traits.Render
public enum RangeCircleMode { Maximum, Minimum }
[Desc("Draw a circle indicating my weapon's range.")]
class RenderRangeCircleInfo : TraitInfo, IPlaceBuildingDecorationInfo, IRulesetLoaded, Requires<AttackBaseInfo>
sealed class RenderRangeCircleInfo : TraitInfo, IPlaceBuildingDecorationInfo, IRulesetLoaded, Requires<AttackBaseInfo>
{
public readonly string RangeCircleType = null;
@@ -85,7 +85,7 @@ namespace OpenRA.Mods.Common.Traits.Render
}
}
class RenderRangeCircle : IRenderAnnotationsWhenSelected
sealed class RenderRangeCircle : IRenderAnnotationsWhenSelected
{
public readonly RenderRangeCircleInfo Info;
readonly Actor self;

View File

@@ -18,7 +18,7 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Common.Traits
{
class RenderShroudCircleInfo : ConditionalTraitInfo, IPlaceBuildingDecorationInfo
sealed class RenderShroudCircleInfo : ConditionalTraitInfo, IPlaceBuildingDecorationInfo
{
[Desc("Color of the circle.")]
public readonly Color Color = Color.FromArgb(128, Color.Cyan);
@@ -61,7 +61,7 @@ namespace OpenRA.Mods.Common.Traits
public override object Create(ActorInitializer init) { return new RenderShroudCircle(this); }
}
class RenderShroudCircle : ConditionalTrait<RenderShroudCircleInfo>, INotifyCreated, IRenderAnnotationsWhenSelected
sealed class RenderShroudCircle : ConditionalTrait<RenderShroudCircleInfo>, INotifyCreated, IRenderAnnotationsWhenSelected
{
readonly RenderShroudCircleInfo info;
WDist range;

View File

@@ -88,7 +88,7 @@ namespace OpenRA.Mods.Common.Traits.Render
(DamageState.Light, "scuffed-")
};
class AnimationWrapper
sealed class AnimationWrapper
{
public readonly AnimationWithOffset Animation;
public readonly string Palette;

View File

@@ -15,12 +15,12 @@ using OpenRA.Graphics;
namespace OpenRA.Mods.Common.Traits.Render
{
[Desc("Invisible during games.")]
class RenderSpritesEditorOnlyInfo : RenderSpritesInfo
sealed class RenderSpritesEditorOnlyInfo : RenderSpritesInfo
{
public override object Create(ActorInitializer init) { return new RenderSpritesEditorOnly(init, this); }
}
class RenderSpritesEditorOnly : RenderSprites
sealed class RenderSpritesEditorOnly : RenderSprites
{
public RenderSpritesEditorOnly(ActorInitializer init, RenderSpritesEditorOnlyInfo info)
: base(init, info) { }

View File

@@ -78,7 +78,7 @@ namespace OpenRA.Mods.Common.Traits.Render
public class RenderVoxels : IRender, ITick, INotifyOwnerChanged
{
class AnimationWrapper
sealed class AnimationWrapper
{
readonly ModelAnimation model;
bool cachedVisible;

View File

@@ -16,7 +16,7 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Common.Traits.Render
{
[Desc("Display the time remaining until the super weapon attached to the actor is ready.")]
class SupportPowerChargeBarInfo : ConditionalTraitInfo
sealed class SupportPowerChargeBarInfo : ConditionalTraitInfo
{
[Desc("Defines to which players the bar is to be shown.")]
public readonly PlayerRelationship DisplayRelationships = PlayerRelationship.Ally;
@@ -26,7 +26,7 @@ namespace OpenRA.Mods.Common.Traits.Render
public override object Create(ActorInitializer init) { return new SupportPowerChargeBar(init.Self, this); }
}
class SupportPowerChargeBar : ConditionalTrait<SupportPowerChargeBarInfo>, ISelectionBar, INotifyOwnerChanged
sealed class SupportPowerChargeBar : ConditionalTrait<SupportPowerChargeBarInfo>, ISelectionBar, INotifyOwnerChanged
{
readonly Actor self;
SupportPowerManager spm;

View File

@@ -15,7 +15,7 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Common.Traits.Render
{
[Desc("Visualizes the remaining time for a condition.")]
class TimedConditionBarInfo : TraitInfo
sealed class TimedConditionBarInfo : TraitInfo
{
[FieldLoader.Require]
[Desc("Condition that this bar corresponds to")]
@@ -26,7 +26,7 @@ namespace OpenRA.Mods.Common.Traits.Render
public override object Create(ActorInitializer init) { return new TimedConditionBar(init.Self, this); }
}
class TimedConditionBar : ISelectionBar, IConditionTimerWatcher
sealed class TimedConditionBar : ISelectionBar, IConditionTimerWatcher
{
readonly TimedConditionBarInfo info;
readonly Actor self;

View File

@@ -17,7 +17,7 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Common.Traits.Render
{
class WithBridgeSpriteBodyInfo : WithSpriteBodyInfo
sealed class WithBridgeSpriteBodyInfo : WithSpriteBodyInfo
{
public readonly string Type = "GroundLevelBridge";
@@ -54,7 +54,7 @@ namespace OpenRA.Mods.Common.Traits.Render
}
}
class WithBridgeSpriteBody : WithSpriteBody, INotifyRemovedFromWorld
sealed class WithBridgeSpriteBody : WithSpriteBody, INotifyRemovedFromWorld
{
readonly WithBridgeSpriteBodyInfo bridgeInfo;
readonly BridgeLayer bridgeLayer;

View File

@@ -15,7 +15,7 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Common.Traits.Render
{
[Desc("Render overlay that varies the animation frame based on the AttackCharges trait's charge level.")]
class WithChargeOverlayInfo : PausableConditionalTraitInfo, Requires<WithSpriteBodyInfo>, Requires<RenderSpritesInfo>
sealed class WithChargeOverlayInfo : PausableConditionalTraitInfo, Requires<WithSpriteBodyInfo>, Requires<RenderSpritesInfo>
{
[SequenceReference]
[Desc("Sequence to use for the charge levels.")]
@@ -31,7 +31,7 @@ namespace OpenRA.Mods.Common.Traits.Render
public override object Create(ActorInitializer init) { return new WithChargeOverlay(init.Self, this); }
}
class WithChargeOverlay : PausableConditionalTrait<WithChargeOverlayInfo>, INotifyDamageStateChanged
sealed class WithChargeOverlay : PausableConditionalTrait<WithChargeOverlayInfo>, INotifyDamageStateChanged
{
readonly Animation overlay;

View File

@@ -18,7 +18,7 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Common.Traits.Render
{
[Desc("Renders crates with both water and land variants.")]
class WithCrateBodyInfo : TraitInfo, Requires<RenderSpritesInfo>, IRenderActorPreviewSpritesInfo
sealed class WithCrateBodyInfo : TraitInfo, Requires<RenderSpritesInfo>, IRenderActorPreviewSpritesInfo
{
[Desc("Easteregg sequences to use in December.")]
public readonly string[] XmasImages = Array.Empty<string>();
@@ -45,7 +45,7 @@ namespace OpenRA.Mods.Common.Traits.Render
}
}
class WithCrateBody : INotifyParachute, INotifyAddedToWorld
sealed class WithCrateBody : INotifyParachute, INotifyAddedToWorld
{
readonly Actor self;
readonly Animation anim;

View File

@@ -18,7 +18,7 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Common.Traits.Render
{
class WithDeadBridgeSpriteBodyInfo : WithSpriteBodyInfo
sealed class WithDeadBridgeSpriteBodyInfo : WithSpriteBodyInfo
{
[ActorReference]
public readonly string[] RampActors = Array.Empty<string>();
@@ -61,7 +61,7 @@ namespace OpenRA.Mods.Common.Traits.Render
}
}
class WithDeadBridgeSpriteBody : WithSpriteBody
sealed class WithDeadBridgeSpriteBody : WithSpriteBody
{
readonly WithDeadBridgeSpriteBodyInfo bridgeInfo;
readonly BridgeLayer bridgeLayer;

View File

@@ -19,7 +19,7 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Common.Traits.Render
{
[Desc("This actor visually connects to walls and changes appearance when actors walk through it.")]
class WithGateSpriteBodyInfo : WithSpriteBodyInfo, IWallConnectorInfo, Requires<GateInfo>
sealed class WithGateSpriteBodyInfo : WithSpriteBodyInfo, IWallConnectorInfo, Requires<GateInfo>
{
[Desc("Cells (outside the gate footprint) that contain wall cells that can connect to the gate")]
public readonly CVec[] WallConnections = Array.Empty<CVec>();
@@ -50,7 +50,7 @@ namespace OpenRA.Mods.Common.Traits.Render
}
}
class WithGateSpriteBody : WithSpriteBody, INotifyRemovedFromWorld, IWallConnector, ITick
sealed class WithGateSpriteBody : WithSpriteBody, INotifyRemovedFromWorld, IWallConnector, ITick
{
readonly WithGateSpriteBodyInfo gateBodyInfo;
readonly Gate gate;

View File

@@ -15,7 +15,7 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Common.Traits.Render
{
[Desc("Displays an overlay whenever resources are harvested by the actor.")]
class WithHarvestOverlayInfo : TraitInfo, Requires<RenderSpritesInfo>, Requires<BodyOrientationInfo>
sealed class WithHarvestOverlayInfo : TraitInfo, Requires<RenderSpritesInfo>, Requires<BodyOrientationInfo>
{
[SequenceReference]
[Desc("Sequence name to use")]
@@ -30,7 +30,7 @@ namespace OpenRA.Mods.Common.Traits.Render
public override object Create(ActorInitializer init) { return new WithHarvestOverlay(init.Self, this); }
}
class WithHarvestOverlay : INotifyHarvesterAction
sealed class WithHarvestOverlay : INotifyHarvesterAction
{
readonly WithHarvestOverlayInfo info;
readonly Animation anim;

View File

@@ -19,7 +19,7 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Common.Traits.Render
{
[Desc("Renders the MuzzleSequence from the Armament trait.")]
class WithMuzzleOverlayInfo : ConditionalTraitInfo, Requires<RenderSpritesInfo>, Requires<AttackBaseInfo>, Requires<ArmamentInfo>
sealed class WithMuzzleOverlayInfo : ConditionalTraitInfo, Requires<RenderSpritesInfo>, Requires<AttackBaseInfo>, Requires<ArmamentInfo>
{
[Desc("Ignore the weapon position, and always draw relative to the center of the actor")]
public readonly bool IgnoreOffset = false;
@@ -27,7 +27,7 @@ namespace OpenRA.Mods.Common.Traits.Render
public override object Create(ActorInitializer init) { return new WithMuzzleOverlay(init.Self, this); }
}
class WithMuzzleOverlay : ConditionalTrait<WithMuzzleOverlayInfo>, INotifyAttack, IRender, ITick
sealed class WithMuzzleOverlay : ConditionalTrait<WithMuzzleOverlayInfo>, INotifyAttack, IRender, ITick
{
readonly Dictionary<Barrel, bool> visible = new();
readonly Dictionary<Barrel, AnimationWithOffset> anims = new();

View File

@@ -17,7 +17,7 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Common.Traits.Render
{
[Desc("Play an animation when a unit exits or blocks the exit after production finished.")]
class WithProductionDoorOverlayInfo : ConditionalTraitInfo, IRenderActorPreviewSpritesInfo, Requires<RenderSpritesInfo>, Requires<BodyOrientationInfo>, Requires<BuildingInfo>
sealed class WithProductionDoorOverlayInfo : ConditionalTraitInfo, IRenderActorPreviewSpritesInfo, Requires<RenderSpritesInfo>, Requires<BodyOrientationInfo>, Requires<BuildingInfo>
{
[SequenceReference]
public readonly string Sequence = "build-door";
@@ -35,7 +35,7 @@ namespace OpenRA.Mods.Common.Traits.Render
public override object Create(ActorInitializer init) { return new WithProductionDoorOverlay(init.Self, this); }
}
class WithProductionDoorOverlay : ConditionalTrait<WithProductionDoorOverlayInfo>, ITick, INotifyProduction, INotifyDamageStateChanged
sealed class WithProductionDoorOverlay : ConditionalTrait<WithProductionDoorOverlayInfo>, ITick, INotifyProduction, INotifyDamageStateChanged
{
readonly Animation door;
int desiredFrame;

View File

@@ -20,7 +20,7 @@ namespace OpenRA.Mods.Common.Traits.Render
public enum RangeCircleVisibility { Always, WhenSelected }
[Desc("Renders an arbitrary circle when selected or placing a structure")]
class WithRangeCircleInfo : ConditionalTraitInfo, IPlaceBuildingDecorationInfo
sealed class WithRangeCircleInfo : ConditionalTraitInfo, IPlaceBuildingDecorationInfo
{
[Desc("Type of range circle. used to decide which circles to draw on other structures during building placement.")]
public readonly string Type = null;
@@ -73,7 +73,7 @@ namespace OpenRA.Mods.Common.Traits.Render
public override object Create(ActorInitializer init) { return new WithRangeCircle(init.Self, this); }
}
class WithRangeCircle : ConditionalTrait<WithRangeCircleInfo>, IRenderAnnotationsWhenSelected, IRenderAnnotations
sealed class WithRangeCircle : ConditionalTrait<WithRangeCircleInfo>, IRenderAnnotationsWhenSelected, IRenderAnnotations
{
readonly Actor self;

View File

@@ -15,7 +15,7 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Common.Traits.Render
{
[Desc("Displays the fill status of PlayerResources with an extra sprite overlay on the actor.")]
class WithResourceLevelOverlayInfo : ConditionalTraitInfo, Requires<WithSpriteBodyInfo>, Requires<RenderSpritesInfo>
sealed class WithResourceLevelOverlayInfo : ConditionalTraitInfo, Requires<WithSpriteBodyInfo>, Requires<RenderSpritesInfo>
{
[SequenceReference]
[Desc("Sequence name to use")]
@@ -31,7 +31,7 @@ namespace OpenRA.Mods.Common.Traits.Render
public override object Create(ActorInitializer init) { return new WithResourceLevelOverlay(init.Self, this); }
}
class WithResourceLevelOverlay : ConditionalTrait<WithResourceLevelOverlayInfo>, INotifyOwnerChanged, INotifyDamageStateChanged
sealed class WithResourceLevelOverlay : ConditionalTrait<WithResourceLevelOverlayInfo>, INotifyOwnerChanged, INotifyDamageStateChanged
{
readonly AnimationWithOffset anim;
readonly RenderSprites rs;

View File

@@ -25,7 +25,7 @@ namespace OpenRA.Mods.Common.Traits.Render
}
[Desc("Render trait for actors that change sprites if neighbors with the same trait are present.")]
class WithWallSpriteBodyInfo : WithSpriteBodyInfo, IWallConnectorInfo, Requires<BuildingInfo>
sealed class WithWallSpriteBodyInfo : WithSpriteBodyInfo, IWallConnectorInfo, Requires<BuildingInfo>
{
public readonly string Type = "wall";
@@ -82,7 +82,7 @@ namespace OpenRA.Mods.Common.Traits.Render
}
}
class WithWallSpriteBody : WithSpriteBody, INotifyRemovedFromWorld, IWallConnector, ITick
sealed class WithWallSpriteBody : WithSpriteBody, INotifyRemovedFromWorld, IWallConnector, ITick
{
readonly WithWallSpriteBodyInfo wallInfo;
int adjacent = 0;

View File

@@ -115,7 +115,7 @@ namespace OpenRA.Mods.Common.Traits
}
}
class RepairBridgeOrderTargeter : UnitOrderTargeter
sealed class RepairBridgeOrderTargeter : UnitOrderTargeter
{
readonly RepairsBridgesInfo info;

View File

@@ -15,7 +15,7 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Common.Traits
{
[Desc("Lets the actor spread resources around it in a circle.")]
class SeedsResourceInfo : ConditionalTraitInfo
sealed class SeedsResourceInfo : ConditionalTraitInfo
{
public readonly int Interval = 75;
public readonly string ResourceType = "Ore";
@@ -24,7 +24,7 @@ namespace OpenRA.Mods.Common.Traits
public override object Create(ActorInitializer init) { return new SeedsResource(init.Self, this); }
}
class SeedsResource : ConditionalTrait<SeedsResourceInfo>, ITick, ISeedableResource
sealed class SeedsResource : ConditionalTrait<SeedsResourceInfo>, ITick, ISeedableResource
{
readonly SeedsResourceInfo info;
readonly IResourceLayer resourceLayer;

View File

@@ -13,7 +13,7 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Common.Traits.Sound
{
class ActorLostNotificationInfo : ConditionalTraitInfo
sealed class ActorLostNotificationInfo : ConditionalTraitInfo
{
[NotificationReference("Speech")]
[Desc("Speech notification to play.")]
@@ -27,7 +27,7 @@ namespace OpenRA.Mods.Common.Traits.Sound
public override object Create(ActorInitializer init) { return new ActorLostNotification(this); }
}
class ActorLostNotification : ConditionalTrait<ActorLostNotificationInfo>, INotifyKilled
sealed class ActorLostNotification : ConditionalTrait<ActorLostNotificationInfo>, INotifyKilled
{
public ActorLostNotification(ActorLostNotificationInfo info)
: base(info) { }

Some files were not shown because too many files have changed in this diff Show More