]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Fix prototypes and datadefs so they pass analyzer checks (again) (#37485)
authorTayrtahn <tayrtahn@gmail.com>
Thu, 15 May 2025 18:30:50 +0000 (14:30 -0400)
committerGitHub <noreply@github.com>
Thu, 15 May 2025 18:30:50 +0000 (20:30 +0200)
Fix prototypes so they pass analyzer checks (again)

Content.Shared/Anomaly/SharedAnomalySystem.cs
Content.Shared/Cargo/Prototypes/CargoAccountPrototype.cs
Content.Shared/CartridgeLoader/Cartridges/NanoTaskUiMessageEvent.cs
Content.Shared/CartridgeLoader/Cartridges/NanoTaskUiState.cs
Content.Shared/Cloning/CloningSettingsPrototype.cs
Content.Shared/RCD/RCDPrototype.cs
Content.Shared/Silicons/StationAi/StationAiCustomizationGroupPrototype.cs
Content.Shared/Silicons/StationAi/StationAiCustomizationPrototype.cs
Content.Shared/Xenoarchaeology/Artifact/Prototypes/XenoArchTriggerPrototype.cs

index b36fec7a02fbae4a0866df8dea1a5d3258ceb727..3d00d43f413f214ef4b916ce01f65fee0ae23912 100644 (file)
@@ -444,7 +444,7 @@ public abstract class SharedAnomalySystem : EntitySystem
 }
 
 [DataRecord]
-public record struct AnomalySpawnSettings()
+public partial record struct AnomalySpawnSettings()
 {
     /// <summary>
     /// should entities block spawning?
index c1c474abf8f5257d374933d52b8bbe06060e3805..6d5fc3ebfc473458b3badea9aae9a69731667aaa 100644 (file)
@@ -11,7 +11,7 @@ public sealed partial class CargoAccountPrototype : IPrototype
 {
     /// <inheritdoc/>
     [IdDataField]
-    public string ID { get; } = default!;
+    public string ID { get; private set; } = default!;
 
     /// <summary>
     /// Full IC name of the account.
index 51a34aaa75196350dcf4ba99c411b4fac5aa0d51..b78525bd7f64a605c67e0dc434e73bb9fcd518fc 100644 (file)
@@ -13,7 +13,7 @@ public interface INanoTaskUiMessagePayload
 ///     Dispatched when a new task is created
 /// </summary>
 [Serializable, NetSerializable, DataRecord]
-public sealed class NanoTaskAddTask : INanoTaskUiMessagePayload
+public sealed partial class NanoTaskAddTask : INanoTaskUiMessagePayload
 {
     /// <summary>
     ///     The newly created task
@@ -30,7 +30,7 @@ public sealed class NanoTaskAddTask : INanoTaskUiMessagePayload
 ///     Dispatched when an existing task is modified
 /// </summary>
 [Serializable, NetSerializable, DataRecord]
-public sealed class NanoTaskUpdateTask : INanoTaskUiMessagePayload
+public sealed partial class NanoTaskUpdateTask : INanoTaskUiMessagePayload
 {
     /// <summary>
     ///     The task that was updated and its ID
@@ -47,7 +47,7 @@ public sealed class NanoTaskUpdateTask : INanoTaskUiMessagePayload
 ///     Dispatched when an existing task is deleted
 /// </summary>
 [Serializable, NetSerializable, DataRecord]
-public sealed class NanoTaskDeleteTask : INanoTaskUiMessagePayload
+public sealed partial class NanoTaskDeleteTask : INanoTaskUiMessagePayload
 {
     /// <summary>
     ///     The ID of the task to delete
@@ -64,7 +64,7 @@ public sealed class NanoTaskDeleteTask : INanoTaskUiMessagePayload
 ///     Dispatched when a task is requested to be printed
 /// </summary>
 [Serializable, NetSerializable, DataRecord]
-public sealed class NanoTaskPrintTask : INanoTaskUiMessagePayload
+public sealed partial class NanoTaskPrintTask : INanoTaskUiMessagePayload
 {
     /// <summary>
     ///     The NanoTask to print
index 9f270671e30a2241ba506e99915a3dc5f5bb0bf2..3c65adac65cf240d61aef3604f97da83f85b6bba 100644 (file)
@@ -17,7 +17,7 @@ public enum NanoTaskPriority : byte
 ///     The data relating to a single NanoTask item, but not its identifier
 /// </summary>
 [Serializable, NetSerializable, DataRecord]
-public sealed class NanoTaskItem
+public sealed partial class NanoTaskItem
 {
     /// <summary>
     ///     The maximum length of the Description and TaskIsFor fields
@@ -61,7 +61,7 @@ public sealed class NanoTaskItem
 ///     Pairs a NanoTask item and its identifier
 /// </summary>
 [Serializable, NetSerializable, DataRecord]
-public sealed class NanoTaskItemAndId
+public sealed partial class NanoTaskItemAndId
 {
     public readonly int Id;
     public readonly NanoTaskItem Data;
index 8cd22f116795717d2a2ff1d76faf4be16f855827..b422f7188b94f2e105f9ae7e2268dc3620aaee89 100644 (file)
@@ -19,11 +19,11 @@ public sealed partial class CloningSettingsPrototype : IPrototype, IInheritingPr
     public string ID { get; private set; } = default!;
 
     [ParentDataField(typeof(PrototypeIdArraySerializer<CloningSettingsPrototype>))]
-    public string[]? Parents { get; }
+    public string[]? Parents { get; private set; }
 
     [AbstractDataField]
     [NeverPushInheritance]
-    public bool Abstract { get; }
+    public bool Abstract { get; private set; }
 
     /// <summary>
     ///     Determines if cloning can be prevented by traits etc.
index b00f59f049ff142f3a5c7a84b6620656ec5e1671..2be5e1c7767c11c755bb425fd14b2d34fd3372d3 100644 (file)
@@ -9,7 +9,7 @@ namespace Content.Shared.RCD;
 /// Contains the parameters for an RCD construction / operation
 /// </summary>
 [Prototype("rcd")]
-public sealed class RCDPrototype : IPrototype
+public sealed partial class RCDPrototype : IPrototype
 {
     [IdDataField]
     public string ID { get; private set; } = default!;
index bbb687e636500c6dfb854d72e8689a37131ff228..590043e2711efef81f43467833354a55a6853db1 100644 (file)
@@ -9,7 +9,7 @@ namespace Content.Shared.Silicons.StationAi;
 public sealed partial class StationAiCustomizationGroupPrototype : IPrototype
 {
     [IdDataField]
-    public string ID { get; } = string.Empty;
+    public string ID { get; private set; } = string.Empty;
 
     /// <summary>
     /// The localized name of the customization.
index 5fe3891b0d2af78dc1e2ca67156e92efbabc28d1..eae6f514778ff5ca147126e0fec804b2e8342608 100644 (file)
@@ -11,7 +11,7 @@ namespace Content.Shared.Silicons.StationAi;
 public sealed partial class StationAiCustomizationPrototype : IPrototype, IInheritingPrototype
 {
     [IdDataField]
-    public string ID { get; } = string.Empty;
+    public string ID { get; private set; } = string.Empty;
 
     /// <summary>
     /// The (unlocalized) name of the customization.
@@ -42,7 +42,7 @@ public sealed partial class StationAiCustomizationPrototype : IPrototype, IInher
     /// </summary>
     [ViewVariables]
     [ParentDataFieldAttribute(typeof(AbstractPrototypeIdArraySerializer<StationAiCustomizationPrototype>))]
-    public string[]? Parents { get; }
+    public string[]? Parents { get; private set; }
 
     /// <summary>
     /// Specifies whether the prototype is abstract.
@@ -50,5 +50,5 @@ public sealed partial class StationAiCustomizationPrototype : IPrototype, IInher
     [ViewVariables]
     [NeverPushInheritance]
     [AbstractDataField]
-    public bool Abstract { get; }
+    public bool Abstract { get; private set; }
 }
index 74d3895234b95b7875221465b73b79fafd0bc94d..fc59b966aa33d9a3a6f142f2e89c4672c2a5a2aa 100644 (file)
@@ -11,7 +11,7 @@ public sealed partial class XenoArchTriggerPrototype : IPrototype
 {
     /// <inheritdoc/>
     [IdDataField]
-    public string ID { get; } = default!;
+    public string ID { get; private set; } = default!;
 
     /// <summary>
     /// Tip for user on how to activate this trigger.