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

@@ -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)
{