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

@@ -772,6 +772,9 @@ dotnet_diagnostic.CA1849.severity = warning
# Prefer static HashData method over ComputeHash. (Not available on mono)
dotnet_diagnostic.CA1850.severity = none
# Seal internal types.
dotnet_diagnostic.CA1852.severity = warning
# Unnecessary call to 'Dictionary.ContainsKey(key)'.
dotnet_diagnostic.CA1853.severity = warning

View File

@@ -81,7 +81,7 @@ namespace OpenRA
/// <summary>Value used to represent an invalid token.</summary>
public static readonly int InvalidConditionToken = -1;
class ConditionState
sealed class ConditionState
{
/// <summary>Delegates that have registered to be notified when this condition changes.</summary>
public readonly List<VariableObserverNotifier> Notifiers = new();

View File

@@ -190,7 +190,7 @@ namespace OpenRA.FileSystem
public void Dispose() { /* nothing to do */ }
}
class StaticStreamDataSource : IStaticDataSource
sealed class StaticStreamDataSource : IStaticDataSource
{
readonly Stream s;
public StaticStreamDataSource(Stream s)

View File

@@ -17,7 +17,7 @@ namespace OpenRA.Graphics
{
public sealed class CursorManager
{
class Cursor
sealed class Cursor
{
public string Name;
public int2 PaddedSize;

View File

@@ -62,7 +62,7 @@ namespace OpenRA.Graphics
{
public Action<string> OnMissingModelError { get; set; }
class PlaceholderModelCache : IModelCache
sealed class PlaceholderModelCache : IModelCache
{
public IVertexBuffer<Vertex> VertexBuffer => throw new NotImplementedException();

View File

@@ -40,7 +40,7 @@ namespace OpenRA.Graphics
return new ReadOnlyPalette(palette);
}
class ReadOnlyPalette : IPalette
sealed class ReadOnlyPalette : IPalette
{
readonly IPalette palette;
public ReadOnlyPalette(IPalette palette) { this.palette = palette; }

View File

@@ -427,7 +427,7 @@ namespace OpenRA.Graphics
}
}
class GlyphInfo
sealed class GlyphInfo
{
public float Advance;
public int2 Offset;

View File

@@ -65,7 +65,7 @@ namespace OpenRA
MissionSelector = 4
}
class MapField
sealed class MapField
{
enum Type { Normal, NodeList, MiniYaml }
readonly FieldInfo field;

View File

@@ -64,7 +64,7 @@ namespace OpenRA
public class MapPreview : IDisposable, IReadOnlyFileSystem
{
/// <summary>Wrapper that enables map data to be replaced in an atomic fashion.</summary>
class InnerData
sealed class InnerData
{
public int MapFormat;
public string Title;

View File

@@ -21,7 +21,7 @@ namespace OpenRA.Network
{
public class GeoIP
{
class IP2LocationReader
sealed class IP2LocationReader
{
public readonly DateTime Date;
readonly Stream stream;

View File

@@ -18,7 +18,7 @@ namespace OpenRA.Network
{
public sealed class ReplayConnection : IConnection
{
class Chunk
sealed class Chunk
{
public int Frame;
public (int ClientId, byte[] Packet)[] Packets;

View File

@@ -19,7 +19,7 @@ using OpenRA.Primitives;
namespace OpenRA.Network
{
class SyncReport
sealed class SyncReport
{
const int NumSyncReports = 7;
static readonly Cache<Type, TypeInfo> TypeInfoCache = new(t => new TypeInfo(t));
@@ -161,7 +161,7 @@ namespace OpenRA.Network
Log.Write("sync", $"Recorded frames do not contain the frame {frame}. No sync report available!");
}
class Report
sealed class Report
{
public int Frame;
public int SyncedRandom;

View File

@@ -14,7 +14,7 @@ using System.Collections.Generic;
namespace OpenRA.Server
{
class PlayerMessageTracker
sealed class PlayerMessageTracker
{
[TranslationReference("remaining")]
const string ChatTemporaryDisabled = "notification-chat-temp-disabled";

View File

@@ -1441,7 +1441,7 @@ namespace OpenRA.Server
interface IServerEvent { void Invoke(Server server); }
class ConnectionConnectEvent : IServerEvent
sealed class ConnectionConnectEvent : IServerEvent
{
readonly Socket socket;
public ConnectionConnectEvent(Socket socket)
@@ -1455,7 +1455,7 @@ namespace OpenRA.Server
}
}
class ConnectionDisconnectEvent : IServerEvent
sealed class ConnectionDisconnectEvent : IServerEvent
{
readonly Connection connection;
public ConnectionDisconnectEvent(Connection connection)
@@ -1469,7 +1469,7 @@ namespace OpenRA.Server
}
}
class ConnectionPacketEvent : IServerEvent
sealed class ConnectionPacketEvent : IServerEvent
{
readonly Connection connection;
readonly int frame;
@@ -1488,7 +1488,7 @@ namespace OpenRA.Server
}
}
class ConnectionPingEvent : IServerEvent
sealed class ConnectionPingEvent : IServerEvent
{
readonly Connection connection;
readonly int[] pingHistory;
@@ -1511,7 +1511,7 @@ namespace OpenRA.Server
}
}
class CallbackEvent : IServerEvent
sealed class CallbackEvent : IServerEvent
{
readonly Action action;

View File

@@ -97,7 +97,7 @@ namespace OpenRA.Support
}
}
class ManagedLoadContext : AssemblyLoadContext
sealed class ManagedLoadContext : AssemblyLoadContext
{
readonly string basePath;
readonly Dictionary<string, ManagedLibrary> managedAssemblies;

View File

@@ -14,7 +14,7 @@ using System.Globalization;
namespace OpenRA.Support
{
class Benchmark
sealed class Benchmark
{
readonly string prefix;
readonly Dictionary<string, List<BenchmarkPoint>> samples = new();
@@ -30,7 +30,7 @@ namespace OpenRA.Support
samples.GetOrAdd(item.Key).Add(new BenchmarkPoint(localTick, item.Value.LastValue));
}
class BenchmarkPoint
sealed class BenchmarkPoint
{
public int Tick { get; }
public double Value { get; }

View File

@@ -551,7 +551,7 @@ namespace OpenRA.Support
}
}
class VariableToken : Token
sealed class VariableToken : Token
{
public readonly string Name;
@@ -561,7 +561,7 @@ namespace OpenRA.Support
: base(TokenType.Variable, index) { Name = symbol; }
}
class NumberToken : Token
sealed class NumberToken : Token
{
public readonly int Value;
readonly string symbol;
@@ -714,7 +714,7 @@ namespace OpenRA.Support
return Expressions.Expression.Condition(test, ifTrue, ifFalse);
}
class AstStack
sealed class AstStack
{
readonly List<Expression> expressions = new();
readonly List<ExpressionType> types = new();
@@ -772,7 +772,7 @@ namespace OpenRA.Support
}
}
class Compiler
sealed class Compiler
{
readonly AstStack ast = new();

View File

@@ -39,7 +39,7 @@ namespace OpenRA
/// <summary>
/// Provides efficient ways to query a set of actors by their traits.
/// </summary>
class TraitDictionary
sealed class TraitDictionary
{
static readonly Func<Type, ITraitContainer> CreateTraitContainer = t =>
(ITraitContainer)typeof(TraitContainer<>).MakeGenericType(t).GetConstructor(Type.EmptyTypes).Invoke(null);
@@ -141,7 +141,7 @@ namespace OpenRA
int Queries { get; }
}
class TraitContainer<T> : ITraitContainer
sealed class TraitContainer<T> : ITraitContainer
{
readonly List<Actor> actors = new();
readonly List<T> traits = new();
@@ -185,7 +185,7 @@ namespace OpenRA
return new MultipleEnumerable(this, actor);
}
class MultipleEnumerable : IEnumerable<T>
sealed class MultipleEnumerable : IEnumerable<T>
{
readonly TraitContainer<T> container;
readonly uint actor;

View File

@@ -76,7 +76,7 @@ namespace OpenRA.Traits
public int RevealedCells { get; private set; }
enum ShroudCellType : byte { Shroud, Fog, Visible }
class ShroudSource
sealed class ShroudSource
{
public readonly SourceType Type;
public readonly PPos[] ProjectedCells;

View File

@@ -13,7 +13,7 @@ using System.Linq;
namespace OpenRA.UtilityCommands
{
class ClearInvalidModRegistrationsCommand : IUtilityCommand
sealed class ClearInvalidModRegistrationsCommand : IUtilityCommand
{
string IUtilityCommand.Name => "--clear-invalid-mod-registrations";

View File

@@ -13,7 +13,7 @@ using System.Linq;
namespace OpenRA.UtilityCommands
{
class RegisterModCommand : IUtilityCommand
sealed class RegisterModCommand : IUtilityCommand
{
string IUtilityCommand.Name => "--register-mod";

View File

@@ -13,7 +13,7 @@ using System.Linq;
namespace OpenRA.UtilityCommands
{
class UnregisterModCommand : IUtilityCommand
sealed class UnregisterModCommand : IUtilityCommand
{
string IUtilityCommand.Name => "--unregister-mod";

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";

View File

@@ -212,7 +212,7 @@ namespace OpenRA.Mods.Common.Activities
}
}
class FlyAttackRun : Activity
sealed class FlyAttackRun : Activity
{
readonly AttackAircraft attack;
readonly WDist exitRange;
@@ -261,7 +261,7 @@ namespace OpenRA.Mods.Common.Activities
}
}
class StrafeAttackRun : Activity
sealed class StrafeAttackRun : Activity
{
readonly AttackAircraft attackAircraft;
readonly Aircraft aircraft;

View File

@@ -64,7 +64,7 @@ namespace OpenRA.Mods.Common.Activities
yield return new TargetLineNode(destination, targetLineColor.Value);
}
class ReleaseUnit : Activity
sealed class ReleaseUnit : Activity
{
readonly Carryall carryall;
readonly BodyOrientation body;

View File

@@ -17,7 +17,7 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Common.Activities
{
class Demolish : Enter
sealed class Demolish : Enter
{
readonly int delay;
readonly int flashes;

View File

@@ -16,7 +16,7 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Common.Activities
{
class DonateCash : Enter
sealed class DonateCash : Enter
{
readonly int payload;
readonly int playerExperience;

View File

@@ -15,7 +15,7 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Common.Activities
{
class DonateExperience : Enter
sealed class DonateExperience : Enter
{
readonly int level;
readonly int playerExperience;

View File

@@ -14,7 +14,7 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Common.Activities
{
class InstantRepair : Enter
sealed class InstantRepair : Enter
{
readonly InstantlyRepairsInfo info;

View File

@@ -486,7 +486,7 @@ namespace OpenRA.Mods.Common.Activities
}
}
class MoveFirstHalf : MovePart
sealed class MoveFirstHalf : MovePart
{
public MoveFirstHalf(Move move, WPos from, WPos to, WAngle fromFacing, WAngle toFacing,
WRot? fromTerrainOrientation, WRot? toTerrainOrientation, int terrainOrientationMargin, int carryoverProgress, bool shouldArc, bool movingOnGroundLayer)
@@ -569,7 +569,7 @@ namespace OpenRA.Mods.Common.Activities
}
}
class MoveSecondHalf : MovePart
sealed class MoveSecondHalf : MovePart
{
public MoveSecondHalf(Move move, WPos from, WPos to, WAngle fromFacing, WAngle toFacing,
WRot? fromTerrainOrientation, WRot? toTerrainOrientation, int terrainOrientationMargin, int carryoverProgress, bool shouldArc, bool movingOnGroundLayer)

View File

@@ -135,7 +135,7 @@ namespace OpenRA.Mods.Common.Activities
yield return new TargetLineNode(Target.FromActor(cargo), targetLineColor.Value);
}
class AttachUnit : Activity
sealed class AttachUnit : Activity
{
readonly Actor cargo;
readonly Carryable carryable;

View File

@@ -15,7 +15,7 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Common.Activities
{
class RepairBridge : Enter
sealed class RepairBridge : Enter
{
readonly EnterBehaviour enterBehaviour;
readonly string speechNotification;

View File

@@ -15,7 +15,7 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Common.Activities
{
class RideTransport : Enter
sealed class RideTransport : Enter
{
readonly Passenger passenger;

View File

@@ -16,7 +16,7 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Common.Activities
{
class Sell : Activity
sealed class Sell : Activity
{
readonly IHealth health;
readonly SellableInfo sellableInfo;

View File

@@ -162,7 +162,7 @@ namespace OpenRA.Mods.Common.Activities
}
}
class IssueOrderAfterTransform : Activity
sealed class IssueOrderAfterTransform : Activity
{
readonly string orderString;
readonly Target target;

View File

@@ -83,7 +83,7 @@ namespace OpenRA.Mods.Common
: base(value) { }
}
class ActorInitLoader : TypeConverter
sealed class ActorInitLoader : TypeConverter
{
public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType)
{

View File

@@ -77,7 +77,7 @@ namespace OpenRA.Mods.Common.Widgets
}
}
class AddActorAction : IEditorAction
sealed class AddActorAction : IEditorAction
{
public string Text { get; private set; }

View File

@@ -174,7 +174,7 @@ namespace OpenRA.Mods.Common.Widgets
}
}
class CopyPasteEditorAction : IEditorAction
sealed class CopyPasteEditorAction : IEditorAction
{
[TranslationReference("amount")]
const string CopiedTiles = "notification-copied-tiles";
@@ -271,7 +271,7 @@ namespace OpenRA.Mods.Common.Widgets
}
}
class UndoCopyPaste
sealed class UndoCopyPaste
{
public CPos Cell { get; }
public TerrainTile MapTile { get; }

View File

@@ -108,7 +108,7 @@ namespace OpenRA.Mods.Common.Widgets
public void Dispose() { }
}
class RemoveActorAction : IEditorAction
sealed class RemoveActorAction : IEditorAction
{
[TranslationReference("name", "id")]
const string RemovedActor = "notification-removed-actor";
@@ -143,7 +143,7 @@ namespace OpenRA.Mods.Common.Widgets
}
}
class RemoveResourceAction : IEditorAction
sealed class RemoveResourceAction : IEditorAction
{
[TranslationReference("type")]
const string RemovedResource = "notification-removed-resource";

View File

@@ -103,7 +103,7 @@ namespace OpenRA.Mods.Common.Widgets
}
}
class AddResourcesEditorAction : IEditorAction
sealed class AddResourcesEditorAction : IEditorAction
{
[TranslationReference("amount", "type")]
const string AddedResource = "notification-added-resource";

View File

@@ -153,7 +153,7 @@ namespace OpenRA.Mods.Common.Widgets
}
}
class PaintTileEditorAction : IEditorAction
sealed class PaintTileEditorAction : IEditorAction
{
[TranslationReference("id")]
const string AddedTile = "notification-added-tile";
@@ -225,7 +225,7 @@ namespace OpenRA.Mods.Common.Widgets
}
}
class FloodFillEditorAction : IEditorAction
sealed class FloodFillEditorAction : IEditorAction
{
[TranslationReference("id")]
const string FilledTile = "notification-filled-tile";
@@ -363,7 +363,7 @@ namespace OpenRA.Mods.Common.Widgets
}
}
class UndoTile
sealed class UndoTile
{
public CPos Cell { get; }
public TerrainTile MapTile { get; }

View File

@@ -15,7 +15,7 @@ using OpenRA.Graphics;
namespace OpenRA.Mods.Common.Effects
{
class FloatingSprite : IEffect, ISpatiallyPartitionable
sealed class FloatingSprite : IEffect, ISpatiallyPartitionable
{
readonly WDist[] speed;
readonly WDist[] gravity;

View File

@@ -200,7 +200,7 @@ namespace OpenRA.Mods.Common.FileFormats
}
}
class BitReader
sealed class BitReader
{
readonly Stream stream;
byte bitBuffer = 0;
@@ -242,7 +242,7 @@ namespace OpenRA.Mods.Common.FileFormats
* codes. Those tables are the number of codes of each length, and the symbols
* sorted by length, retaining their original order within each length.
*/
class Huffman
sealed class Huffman
{
public short[] Count; // number of symbols of each length
public short[] Symbol; // canonically ordered symbols

View File

@@ -242,7 +242,7 @@ namespace OpenRA.Mods.Common.FileFormats
}
}
class CabExtracter
sealed class CabExtracter
{
readonly FileDescriptor file;
readonly Dictionary<int, Stream> volumes;

View File

@@ -20,7 +20,7 @@ namespace OpenRA.Mods.Common.FileFormats
{
public sealed class MSCabCompression
{
class CabFolder
sealed class CabFolder
{
public readonly uint BlockOffset;
public readonly ushort BlockCount;
@@ -34,7 +34,7 @@ namespace OpenRA.Mods.Common.FileFormats
}
}
class CabFile
sealed class CabFile
{
public readonly string FileName;
public readonly uint DecompressedLength;

View File

@@ -115,7 +115,7 @@ namespace OpenRA.Mods.Common.Graphics
return new FinalizedModelRenderable(wr, this);
}
class FinalizedModelRenderable : IFinalizedRenderable
sealed class FinalizedModelRenderable : IFinalizedRenderable
{
readonly ModelRenderable model;
readonly ModelRenderProxy renderProxy;

View File

@@ -70,7 +70,7 @@ namespace OpenRA.Mods.Common.Graphics
return new FinalizedUIModelRenderable(wr, this);
}
class FinalizedUIModelRenderable : IFinalizedRenderable
sealed class FinalizedUIModelRenderable : IFinalizedRenderable
{
readonly UIModelRenderable model;
readonly ModelRenderProxy renderProxy;

View File

@@ -15,7 +15,7 @@ using OpenRA.Server;
namespace OpenRA.Mods.Common.Lint
{
class CheckAngle : ILintRulesPass, ILintServerMapPass
sealed class CheckAngle : ILintRulesPass, ILintServerMapPass
{
void ILintRulesPass.Run(Action<string> emitError, Action<string> emitWarning, ModData modData, Ruleset rules)
{

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