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

@@ -10,6 +10,7 @@ using Robust.Shared.Serialization;
namespace Content.Shared.Lathe
{
[NetworkedComponent()]
[Virtual]
public class SharedLatheComponent : Component
{
[Dependency] private readonly IEntityManager _entMan = default!;
@@ -38,7 +39,7 @@ namespace Content.Shared.Lathe
/// Sent to the server to sync material storage and the recipe queue.
/// </summary>
[Serializable, NetSerializable]
public class LatheSyncRequestMessage : BoundUserInterfaceMessage
public sealed class LatheSyncRequestMessage : BoundUserInterfaceMessage
{
public LatheSyncRequestMessage()
{
@@ -51,7 +52,7 @@ namespace Content.Shared.Lathe
/// Sent to the server to sync the lathe's technology database with the research server.
/// </summary>
[Serializable, NetSerializable]
public class LatheServerSyncMessage : BoundUserInterfaceMessage
public sealed class LatheServerSyncMessage : BoundUserInterfaceMessage
{
public LatheServerSyncMessage()
{
@@ -62,7 +63,7 @@ namespace Content.Shared.Lathe
/// Sent to the server to open the ResearchClient UI.
/// </summary>
[Serializable, NetSerializable]
public class LatheServerSelectionMessage : BoundUserInterfaceMessage
public sealed class LatheServerSelectionMessage : BoundUserInterfaceMessage
{
public LatheServerSelectionMessage()
{
@@ -73,7 +74,7 @@ namespace Content.Shared.Lathe
/// Sent to the client when the lathe is producing a recipe.
/// </summary>
[Serializable, NetSerializable]
public class LatheProducingRecipeMessage : BoundUserInterfaceMessage
public sealed class LatheProducingRecipeMessage : BoundUserInterfaceMessage
{
public readonly string ID;
public LatheProducingRecipeMessage(string id)
@@ -86,7 +87,7 @@ namespace Content.Shared.Lathe
/// Sent to the client when the lathe stopped/finished producing a recipe.
/// </summary>
[Serializable, NetSerializable]
public class LatheStoppedProducingRecipeMessage : BoundUserInterfaceMessage
public sealed class LatheStoppedProducingRecipeMessage : BoundUserInterfaceMessage
{
public LatheStoppedProducingRecipeMessage()
{
@@ -97,7 +98,7 @@ namespace Content.Shared.Lathe
/// Sent to the client to let it know about the recipe queue.
/// </summary>
[Serializable, NetSerializable]
public class LatheFullQueueMessage : BoundUserInterfaceMessage
public sealed class LatheFullQueueMessage : BoundUserInterfaceMessage
{
public readonly Queue<string> Recipes;
public LatheFullQueueMessage(Queue<string> recipes)
@@ -110,7 +111,7 @@ namespace Content.Shared.Lathe
/// Sent to the server when a client queues a new recipe.
/// </summary>
[Serializable, NetSerializable]
public class LatheQueueRecipeMessage : BoundUserInterfaceMessage
public sealed class LatheQueueRecipeMessage : BoundUserInterfaceMessage
{
public readonly string ID;
public readonly int Quantity;

View File

@@ -13,7 +13,7 @@ using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototy
namespace Content.Shared.Lathe
{
[NetworkedComponent()]
public class SharedLatheDatabaseComponent : Component, IEnumerable<LatheRecipePrototype>, ISerializationHooks
public abstract class SharedLatheDatabaseComponent : Component, IEnumerable<LatheRecipePrototype>, ISerializationHooks
{
[DataField("recipes", customTypeSerializer: typeof(PrototypeIdListSerializer<LatheRecipePrototype>))] private List<string> _recipeIds = new();
@@ -122,7 +122,7 @@ namespace Content.Shared.Lathe
}
[NetSerializable, Serializable]
public class LatheDatabaseState : ComponentState
public sealed class LatheDatabaseState : ComponentState
{
public readonly List<string> Recipes;
public LatheDatabaseState(List<string> recipes)

View File

@@ -10,7 +10,7 @@ using Robust.Shared.ViewVariables;
namespace Content.Shared.Lathe
{
[NetworkedComponent()]
public class SharedMaterialStorageComponent : Component, IEnumerable<KeyValuePair<string, int>>
public abstract class SharedMaterialStorageComponent : Component, IEnumerable<KeyValuePair<string, int>>
{
[ViewVariables]
protected virtual Dictionary<string, int> Storage { get; set; } = new();
@@ -66,7 +66,7 @@ namespace Content.Shared.Lathe
}
[NetSerializable, Serializable]
public class MaterialStorageState : ComponentState
public sealed class MaterialStorageState : ComponentState
{
public readonly Dictionary<string, int> Storage;
public MaterialStorageState(Dictionary<string, int> storage)

View File

@@ -13,7 +13,7 @@ namespace Content.Shared.Lathe
{
[ComponentReference(typeof(SharedLatheDatabaseComponent))]
[NetworkedComponent()]
public class SharedProtolatheDatabaseComponent : SharedLatheDatabaseComponent, ISerializationHooks
public abstract class SharedProtolatheDatabaseComponent : SharedLatheDatabaseComponent, ISerializationHooks
{
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;
@@ -36,7 +36,7 @@ namespace Content.Shared.Lathe
}
[NetSerializable, Serializable]
public class ProtolatheDatabaseState : ComponentState
public sealed class ProtolatheDatabaseState : ComponentState
{
public readonly List<string> Recipes;
public ProtolatheDatabaseState(List<string> recipes)