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

@@ -23,7 +23,7 @@ namespace OpenRA.Mods.D2k.Activities
{
enum AttackState { Uninitialized, Burrowed, Attacking }
class SwallowActor : Activity
sealed class SwallowActor : Activity
{
const int NearEnough = 1;

View File

@@ -19,7 +19,7 @@ namespace OpenRA.Mods.D2k.SpriteLoaders
{
public class R8Loader : ISpriteLoader
{
class R8Frame : ISpriteFrame
sealed class R8Frame : ISpriteFrame
{
public SpriteFrameType Type => SpriteFrameType.Indexed8;
public Size Size { get; }

View File

@@ -21,7 +21,7 @@ using OpenRA.Traits;
namespace OpenRA.Mods.D2k.Traits
{
[Desc("Sandworms use this attack model.")]
class AttackSwallowInfo : AttackFrontalInfo
sealed class AttackSwallowInfo : AttackFrontalInfo
{
[Desc("The number of ticks it takes to return underground.")]
public readonly int ReturnDelay = 60;
@@ -43,7 +43,7 @@ namespace OpenRA.Mods.D2k.Traits
public override object Create(ActorInitializer init) { return new AttackSwallow(init.Self, this); }
}
class AttackSwallow : AttackFrontal
sealed class AttackSwallow : AttackFrontal
{
public new readonly AttackSwallowInfo Info;
@@ -77,7 +77,7 @@ namespace OpenRA.Mods.D2k.Traits
return new SwallowTarget(self, newTarget, allowMove, forceAttack);
}
public class SwallowTarget : Attack
public sealed class SwallowTarget : Attack
{
public SwallowTarget(Actor self, in Target target, bool allowMovement, bool forceAttack)
: base(self, target, allowMovement, forceAttack) { }

View File

@@ -58,7 +58,7 @@ namespace OpenRA.Mods.D2k.Traits
public class D2kActorPreviewPlaceBuildingPreview { }
class D2kActorPreviewPlaceBuildingPreviewPreview : ActorPreviewPlaceBuildingPreviewPreview
sealed class D2kActorPreviewPlaceBuildingPreviewPreview : ActorPreviewPlaceBuildingPreviewPreview
{
readonly D2kActorPreviewPlaceBuildingPreviewInfo info;
readonly bool checkUnsafeTiles;

View File

@@ -16,7 +16,7 @@ using OpenRA.Traits;
namespace OpenRA.Mods.D2k.Traits
{
class SandwormInfo : WandersInfo, Requires<MobileInfo>, Requires<AttackBaseInfo>
sealed class SandwormInfo : WandersInfo, Requires<MobileInfo>, Requires<AttackBaseInfo>
{
[Desc("Time between rescanning for targets (in ticks).")]
public readonly int TargetRescanInterval = 125;
@@ -33,7 +33,7 @@ namespace OpenRA.Mods.D2k.Traits
public override object Create(ActorInitializer init) { return new Sandworm(init.Self, this); }
}
class Sandworm : Wanders, ITick, INotifyActorDisposing
sealed class Sandworm : Wanders, ITick, INotifyActorDisposing
{
public readonly SandwormInfo WormInfo;

View File

@@ -17,7 +17,7 @@ using OpenRA.Traits;
namespace OpenRA.Mods.D2k.Traits
{
[TraitLocation(SystemActors.World | SystemActors.EditorWorld)]
class D2kFogPaletteInfo : TraitInfo
sealed class D2kFogPaletteInfo : TraitInfo
{
[PaletteDefinition]
[FieldLoader.Require]
@@ -35,7 +35,7 @@ namespace OpenRA.Mods.D2k.Traits
public override object Create(ActorInitializer init) { return new D2kFogPalette(this); }
}
class D2kFogPalette : ILoadsPalettes, IProvidesAssetBrowserPalettes
sealed class D2kFogPalette : ILoadsPalettes, IProvidesAssetBrowserPalettes
{
readonly D2kFogPaletteInfo info;
public D2kFogPalette(D2kFogPaletteInfo info) { this.info = info; }

View File

@@ -19,7 +19,7 @@ namespace OpenRA.Mods.D2k.Traits
{
[TraitLocation(SystemActors.World | SystemActors.EditorWorld)]
[Desc("Create a palette by applying a scale and offset to the colors in another palette.")]
class PaletteFromScaledPaletteInfo : TraitInfo
sealed class PaletteFromScaledPaletteInfo : TraitInfo
{
[PaletteDefinition]
[FieldLoader.Require]
@@ -43,7 +43,7 @@ namespace OpenRA.Mods.D2k.Traits
public override object Create(ActorInitializer init) { return new PaletteFromScaledPalette(this); }
}
class PaletteFromScaledPalette : ILoadsPalettes, IProvidesAssetBrowserPalettes
sealed class PaletteFromScaledPalette : ILoadsPalettes, IProvidesAssetBrowserPalettes
{
readonly PaletteFromScaledPaletteInfo info;
public PaletteFromScaledPalette(PaletteFromScaledPaletteInfo info) { this.info = info; }
@@ -57,7 +57,7 @@ namespace OpenRA.Mods.D2k.Traits
public IEnumerable<string> PaletteNames { get { yield return info.Name; } }
}
class ScaledPaletteRemap : IPaletteRemap
sealed class ScaledPaletteRemap : IPaletteRemap
{
readonly float scale;
readonly int offset;

View File

@@ -15,7 +15,7 @@ using OpenRA.FileSystem;
namespace OpenRA.Mods.D2k.UtilityCommands
{
class ImportD2kMapCommand : IUtilityCommand
sealed class ImportD2kMapCommand : IUtilityCommand
{
string IUtilityCommand.Name => "--import-d2k-map";