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

@@ -12,7 +12,7 @@ namespace Content.Shared.Chemistry.Components
/// <see cref="Dispenser.SharedReagentDispenserComponent"/>
[RegisterComponent]
[NetworkedComponent] // only needed for white-lists. Client doesn't actually need Solution data;
public class FitsInDispenserComponent : Component
public sealed class FitsInDispenserComponent : Component
{
/// <summary>
/// Solution name that will interact with ReagentDispenserComponent.

View File

@@ -34,7 +34,7 @@ namespace Content.Shared.Chemistry.Components
}
[Serializable, NetSerializable]
public class MovespeedModifierMetabolismComponentState : ComponentState
public sealed class MovespeedModifierMetabolismComponentState : ComponentState
{
public float WalkSpeedModifier { get; }
public float SprintSpeedModifier { get; }

View File

@@ -13,6 +13,7 @@ namespace Content.Shared.Chemistry.Components
/// <summary>
/// Shared class for <c>ChemMasterComponent</c>. Provides a way for entities to split reagents from a beaker and produce pills and bottles via a user interface.
/// </summary>
[Virtual]
public class SharedChemMasterComponent : Component
{
[DataField("beakerSlot")]
@@ -20,7 +21,7 @@ namespace Content.Shared.Chemistry.Components
public const string SolutionName = "buffer";
[Serializable, NetSerializable]
public class ChemMasterBoundUserInterfaceState : BoundUserInterfaceState
public sealed class ChemMasterBoundUserInterfaceState : BoundUserInterfaceState
{
public readonly bool HasPower;
public readonly bool HasBeaker;
@@ -66,7 +67,7 @@ namespace Content.Shared.Chemistry.Components
/// Message data sent from client to server when a ChemMaster ui button is pressed.
/// </summary>
[Serializable, NetSerializable]
public class UiActionMessage : BoundUserInterfaceMessage
public sealed class UiActionMessage : BoundUserInterfaceMessage
{
public readonly UiAction Action;
public readonly FixedPoint2 Amount;

View File

@@ -7,7 +7,7 @@ using Robust.Shared.ViewVariables;
namespace Content.Shared.Chemistry.Components
{
public partial class Solution
public sealed partial class Solution
{
/// <summary>

View File

@@ -22,7 +22,7 @@ namespace Content.Shared.Chemistry.Components
/// </summary>
[Serializable, NetSerializable]
[DataDefinition]
public partial class Solution : IEnumerable<Solution.ReagentQuantity>, ISerializationHooks
public sealed partial class Solution : IEnumerable<Solution.ReagentQuantity>, ISerializationHooks
{
// Most objects on the station hold only 1 or 2 reagents
[ViewVariables]

View File

@@ -16,7 +16,7 @@ namespace Content.Shared.Chemistry.Dispenser
/// machines define their inventory.
/// </summary>
[Serializable, NetSerializable, Prototype("reagentDispenserInventory")]
public class ReagentDispenserInventoryPrototype : IPrototype
public sealed class ReagentDispenserInventoryPrototype : IPrototype
{
[DataField("inventory", customTypeSerializer: typeof(PrototypeIdListSerializer<ReagentPrototype>))]
private List<string> _inventory = new();

View File

@@ -15,6 +15,7 @@ namespace Content.Shared.Chemistry.Dispenser
/// <para>This is useful for machines such as the chemical dispensers, booze dispensers, or soda dispensers.</para>
/// <para>The chemicals which may be dispensed are defined by specifying a reagent pack. See <see cref="ReagentDispenserInventoryPrototype"/> for more information on that.</para>
/// </summary>
[Virtual]
public class SharedReagentDispenserComponent : Component
{
[DataField("beakerSlot")]
@@ -26,7 +27,7 @@ namespace Content.Shared.Chemistry.Dispenser
protected readonly List<ReagentDispenserInventoryEntry> Inventory = new();
[Serializable, NetSerializable]
public class ReagentDispenserBoundUserInterfaceState : BoundUserInterfaceState
public sealed class ReagentDispenserBoundUserInterfaceState : BoundUserInterfaceState
{
public readonly bool HasPower;
public readonly bool HasBeaker;
@@ -63,7 +64,7 @@ namespace Content.Shared.Chemistry.Dispenser
/// Message data sent from client to server when a dispenser ui button is pressed.
/// </summary>
[Serializable, NetSerializable]
public class UiButtonPressedMessage : BoundUserInterfaceMessage
public sealed class UiButtonPressedMessage : BoundUserInterfaceMessage
{
public readonly UiButton Button;
public readonly int DispenseIndex; //Index of dispense button / reagent being pressed. Only used when a dispense button is pressed.

View File

@@ -12,7 +12,7 @@ using static Content.Shared.Chemistry.Components.MovespeedModifierMetabolismComp
namespace Content.Shared.Chemistry
{
// TODO CONVERT THIS TO A STATUS EFFECT!!!!!!!!!!!!!!!!!!!!!!!!
public class MetabolismMovespeedModifierSystem : EntitySystem
public sealed class MetabolismMovespeedModifierSystem : EntitySystem
{
[Dependency] private readonly IGameTiming _gameTiming = default!;
[Dependency] private readonly MovementSpeedModifierSystem _movespeed = default!;

View File

@@ -15,7 +15,7 @@ namespace Content.Shared.Chemistry.Reaction
/// Prototype for chemical reaction definitions
/// </summary>
[Prototype("reaction")]
public class ReactionPrototype : IPrototype
public sealed class ReactionPrototype : IPrototype
{
[ViewVariables]
[DataField("id", required: true)]
@@ -73,7 +73,7 @@ namespace Content.Shared.Chemistry.Reaction
/// Prototype for chemical reaction reactants.
/// </summary>
[DataDefinition]
public class ReactantPrototype
public sealed class ReactantPrototype
{
[DataField("amount")]
private FixedPoint2 _amount = FixedPoint2.New(1);

View File

@@ -8,7 +8,7 @@ using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototy
namespace Content.Shared.Chemistry.Reaction;
[RegisterComponent]
public class ReactiveComponent : Component
public sealed class ReactiveComponent : Component
{
/// <summary>
/// A dictionary of reactive groups -> methods that work on them.
@@ -27,7 +27,7 @@ public class ReactiveComponent : Component
}
[DataDefinition]
public class ReactiveReagentEffectEntry
public sealed class ReactiveReagentEffectEntry
{
[DataField("methods")]
public HashSet<ReactionMethod> Methods = default!;

View File

@@ -4,7 +4,7 @@ using Robust.Shared.Serialization.Manager.Attributes;
namespace Content.Shared.Chemistry.Reaction;
[Prototype("reactiveGroup")]
public class ReactiveGroupPrototype : IPrototype
public sealed class ReactiveGroupPrototype : IPrototype
{
[DataField("id", required: true)]
public string ID { get; } = default!;

View File

@@ -13,7 +13,7 @@ using Robust.Shared.Random;
namespace Content.Shared.Chemistry
{
[UsedImplicitly]
public class ReactiveSystem : EntitySystem
public sealed class ReactiveSystem : EntitySystem
{
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;
[Dependency] private readonly IRobustRandom _robustRandom = default!;

View File

@@ -22,7 +22,7 @@ namespace Content.Shared.Chemistry.Reagent
{
[Prototype("reagent")]
[DataDefinition]
public class ReagentPrototype : IPrototype, IInheritingPrototype
public sealed class ReagentPrototype : IPrototype, IInheritingPrototype
{
[ViewVariables]
[DataField("id", required: true)]
@@ -143,7 +143,7 @@ namespace Content.Shared.Chemistry.Reagent
}
[DataDefinition]
public class ReagentEffectsEntry
public sealed class ReagentEffectsEntry
{
/// <summary>
/// Amount of reagent to metabolize, per metabolism cycle.
@@ -161,7 +161,7 @@ namespace Content.Shared.Chemistry.Reagent
}
[DataDefinition]
public class ReactiveReagentEffectEntry
public sealed class ReactiveReagentEffectEntry
{
[DataField("methods", required: true)]
public HashSet<ReactionMethod> Methods = default!;

View File

@@ -7,7 +7,7 @@ using Robust.Shared.Serialization;
namespace Content.Shared.Chemistry
{
[Serializable, NetSerializable]
public class TransferAmountBoundInterfaceState : BoundUserInterfaceState
public sealed class TransferAmountBoundInterfaceState : BoundUserInterfaceState
{
public FixedPoint2 Max;
public FixedPoint2 Min;
@@ -20,7 +20,7 @@ namespace Content.Shared.Chemistry
}
[Serializable, NetSerializable]
public class TransferAmountSetValueMessage : BoundUserInterfaceMessage
public sealed class TransferAmountSetValueMessage : BoundUserInterfaceMessage
{
public FixedPoint2 Value;