Analyzer to enforce classes to be either [Virtual], abstract, or sealed. (#2469)

Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
This commit is contained in:
Pieter-Jan Briers
2022-02-05 19:31:58 +01:00
committed by GitHub
parent ec768c563f
commit de4d255841
593 changed files with 1165 additions and 829 deletions

View File

@@ -19,7 +19,7 @@ namespace Robust.Shared.Prototypes
/// Prototype that represents game entities.
/// </summary>
[Prototype("entity", -1)]
public class EntityPrototype : IPrototype, IInheritingPrototype, ISerializationHooks
public sealed class EntityPrototype : IPrototype, IInheritingPrototype, ISerializationHooks
{
private ILocalizationManager _loc = default!;
@@ -132,7 +132,7 @@ namespace Robust.Shared.Prototypes
/// </summary>
[ViewVariables]
[DataField("save")]
public bool MapSavable { get; protected set; } = true;
public bool MapSavable { get; set; } = true;
/// <summary>
/// The prototype we inherit from.
@@ -294,7 +294,7 @@ namespace Robust.Shared.Prototypes
return $"EntityPrototype({ID})";
}
public class ComponentRegistry : Dictionary<string, IComponent>
public sealed class ComponentRegistry : Dictionary<string, IComponent>
{
public ComponentRegistry()
{
@@ -306,7 +306,7 @@ namespace Robust.Shared.Prototypes
}
[DataDefinition]
public class EntityPlacementProperties
public sealed class EntityPlacementProperties
{
public bool PlacementOverriden { get; private set; }
public bool SnapOverriden { get; private set; }