Seal/abstract/virtual everything (#6739)
This commit is contained in:
@@ -12,7 +12,7 @@ using Robust.Shared.Prototypes;
|
||||
|
||||
namespace Content.Server.GuideGenerator;
|
||||
|
||||
public class ChemistryJsonGenerator
|
||||
public sealed class ChemistryJsonGenerator
|
||||
{
|
||||
public static void PublishJson(StreamWriter file)
|
||||
{
|
||||
@@ -53,7 +53,7 @@ public class ChemistryJsonGenerator
|
||||
file.Write(JsonSerializer.Serialize(prototypes, serializeOptions));
|
||||
}
|
||||
|
||||
public class FixedPointJsonConverter : JsonConverter<FixedPoint2>
|
||||
public sealed class FixedPointJsonConverter : JsonConverter<FixedPoint2>
|
||||
{
|
||||
public override void Write(Utf8JsonWriter writer, FixedPoint2 value, JsonSerializerOptions options)
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@ using Robust.Shared.Prototypes;
|
||||
|
||||
namespace Content.Server.GuideGenerator;
|
||||
|
||||
public class ReactionJsonGenerator
|
||||
public sealed class ReactionJsonGenerator
|
||||
{
|
||||
public static void PublishJson(StreamWriter file)
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@ using Robust.Shared.Serialization.Manager.Attributes;
|
||||
|
||||
namespace Content.Server.GuideGenerator;
|
||||
|
||||
public class ReagentEntry
|
||||
public sealed class ReagentEntry
|
||||
{
|
||||
[JsonPropertyName("id")]
|
||||
public string Id { get; }
|
||||
@@ -47,7 +47,7 @@ public class ReagentEntry
|
||||
}
|
||||
}
|
||||
|
||||
public class ReactionEntry
|
||||
public sealed class ReactionEntry
|
||||
{
|
||||
[JsonPropertyName("id")]
|
||||
public string Id { get; }
|
||||
@@ -80,7 +80,7 @@ public class ReactionEntry
|
||||
}
|
||||
}
|
||||
|
||||
public class ReactantEntry
|
||||
public sealed class ReactantEntry
|
||||
{
|
||||
[JsonPropertyName("amount")]
|
||||
public float Amount { get; }
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace Content.Server.GuideGenerator
|
||||
// (serializing objects that inherit abstract base classes or interfaces) since
|
||||
// System.Text.Json (our new JSON solution) doesn't support that while Newtonsoft.Json (our old
|
||||
// solution) does.
|
||||
public class UniversalJsonConverter<T> : JsonConverter<T>
|
||||
public sealed class UniversalJsonConverter<T> : JsonConverter<T>
|
||||
{
|
||||
|
||||
// This converter can only convert types that are T or descend from T.
|
||||
|
||||
Reference in New Issue
Block a user