Seal/abstract/virtual everything (#6739)

This commit is contained in:
mirrorcult
2022-02-16 00:23:23 -07:00
committed by GitHub
parent 4dfcacb86a
commit ec4d4688c7
1771 changed files with 2216 additions and 2164 deletions

View File

@@ -11,7 +11,7 @@ using Robust.Shared.ViewVariables;
namespace Content.Server.Atmos.Components
{
[RegisterComponent]
public class AirtightComponent : Component
public sealed class AirtightComponent : Component
{
public (GridId Grid, Vector2i Tile) LastPosition { get; set; }

View File

@@ -7,7 +7,7 @@ namespace Content.Server.Atmos.Components
/// Represents that entity can be exposed to Atmos
/// </summary>
[RegisterComponent]
public class AtmosExposedComponent : Component
public sealed class AtmosExposedComponent : Component
{
}
}

View File

@@ -7,7 +7,7 @@ namespace Content.Server.Atmos.Components
/// Used by FixGridAtmos. Entities with this may get magically auto-deleted on map initialization in future.
/// </summary>
[RegisterComponent]
public class AtmosFixMarkerComponent : Component
public sealed class AtmosFixMarkerComponent : Component
{
// See FixGridAtmos for more details
[DataField("mode")]

View File

@@ -10,7 +10,7 @@ namespace Content.Server.Atmos.Components
/// Barotrauma: injury because of changes in air pressure.
/// </summary>
[RegisterComponent]
public class BarotraumaComponent : Component
public sealed class BarotraumaComponent : Component
{
[DataField("damage", required: true)]
[ViewVariables(VVAccess.ReadWrite)]

View File

@@ -13,7 +13,7 @@ namespace Content.Server.Atmos.Components
/// </summary>
[RegisterComponent]
[ComponentProtoName("BreathMask")]
public class BreathToolComponent : Component
public sealed class BreathToolComponent : Component
{
[Dependency] private readonly IEntityManager _entities = default!;

View File

@@ -8,7 +8,7 @@ using Robust.Shared.ViewVariables;
namespace Content.Server.Atmos.Components
{
[RegisterComponent]
public class FlammableComponent : Component
public sealed class FlammableComponent : Component
{
[ViewVariables]
public bool Resisting = false;

View File

@@ -20,7 +20,7 @@ namespace Content.Server.Atmos.Components
[RegisterComponent]
[ComponentReference(typeof(IActivate))]
[ComponentReference(typeof(SharedGasAnalyzerComponent))]
public class GasAnalyzerComponent : SharedGasAnalyzerComponent, IAfterInteract, IDropped, IActivate
public sealed class GasAnalyzerComponent : SharedGasAnalyzerComponent, IAfterInteract, IDropped, IActivate
{
[Dependency] private readonly IEntityManager _entities = default!;

View File

@@ -5,7 +5,7 @@ using Robust.Shared.ViewVariables;
namespace Content.Server.Atmos.Components
{
[RegisterComponent]
public class GasMixtureHolderComponent : Component, IGasMixtureHolder
public sealed class GasMixtureHolderComponent : Component, IGasMixtureHolder
{
[ViewVariables] [DataField("air")] public GasMixture Air { get; set; } = new GasMixture();
}

View File

@@ -31,7 +31,7 @@ namespace Content.Server.Atmos.Components
[RegisterComponent]
[ComponentReference(typeof(IActivate))]
#pragma warning disable 618
public class GasTankComponent : Component, IExamine, IGasMixtureHolder, IDropped, IActivate
public sealed class GasTankComponent : Component, IExamine, IGasMixtureHolder, IDropped, IActivate
#pragma warning restore 618
{
[Dependency] private readonly IEntityManager _entMan = default!;
@@ -312,7 +312,7 @@ namespace Content.Server.Atmos.Components
[UsedImplicitly]
[DataDefinition]
public class ToggleInternalsAction : IToggleItemAction
public sealed class ToggleInternalsAction : IToggleItemAction
{
public bool DoToggleAction(ToggleItemActionEventArgs args)
{

View File

@@ -18,6 +18,7 @@ namespace Content.Server.Atmos.Components
/// </summary>
[ComponentReference(typeof(IAtmosphereComponent))]
[RegisterComponent, Serializable]
[Virtual]
public class GridAtmosphereComponent : Component, IAtmosphereComponent, ISerializationHooks
{
public virtual bool Simulated => true;

View File

@@ -9,7 +9,7 @@ using System.Threading.Tasks;
namespace Content.Server.Atmos.Components
{
[RegisterComponent]
public class IgniteOnCollideComponent : Component
public sealed class IgniteOnCollideComponent : Component
{
[DataField("fireStacks")]
public float FireStacks { get; set; }

View File

@@ -15,7 +15,7 @@ using Robust.Shared.ViewVariables;
namespace Content.Server.Atmos.Components
{
[RegisterComponent]
public class MovedByPressureComponent : Component
public sealed class MovedByPressureComponent : Component
{
[Dependency] private readonly IRobustRandom _robustRandom = default!;
[Dependency] private readonly IEntityManager _entMan = default!;

View File

@@ -5,7 +5,7 @@ using Robust.Shared.ViewVariables;
namespace Content.Server.Atmos.Components
{
[RegisterComponent]
public class PressureProtectionComponent : Component
public sealed class PressureProtectionComponent : Component
{
[DataField("highPressureMultiplier")]
public float HighPressureMultiplier { get; } = 1f;

View File

@@ -4,7 +4,7 @@ namespace Content.Server.Atmos.Components
{
[RegisterComponent]
[ComponentReference(typeof(IAtmosphereComponent))]
public class SpaceAtmosphereComponent : Component, IAtmosphereComponent
public sealed class SpaceAtmosphereComponent : Component, IAtmosphereComponent
{
public bool Simulated => false;
}

View File

@@ -5,7 +5,7 @@ using Robust.Shared.Serialization.Manager.Attributes;
namespace Content.Server.Atmos.Components;
[RegisterComponent]
public class TemperatureProtectionComponent : Component
public sealed class TemperatureProtectionComponent : Component
{
/// <summary>
/// How much to multiply temperature deltas by.

View File

@@ -10,7 +10,7 @@ namespace Content.Server.Atmos.Components
[RegisterComponent]
[ComponentReference(typeof(IAtmosphereComponent))]
[Serializable]
public class UnsimulatedGridAtmosphereComponent : GridAtmosphereComponent
public sealed class UnsimulatedGridAtmosphereComponent : GridAtmosphereComponent
{
public override bool Simulated => false;
}