Fix prototypes and datadefs so they pass analyzer checks (again) (#37485)

Fix prototypes so they pass analyzer checks (again)
This commit is contained in:
Tayrtahn
2025-05-15 14:30:50 -04:00
committed by GitHub
parent 625115d78a
commit b9337693d3
9 changed files with 16 additions and 16 deletions

View File

@@ -444,7 +444,7 @@ public abstract class SharedAnomalySystem : EntitySystem
} }
[DataRecord] [DataRecord]
public record struct AnomalySpawnSettings() public partial record struct AnomalySpawnSettings()
{ {
/// <summary> /// <summary>
/// should entities block spawning? /// should entities block spawning?

View File

@@ -11,7 +11,7 @@ public sealed partial class CargoAccountPrototype : IPrototype
{ {
/// <inheritdoc/> /// <inheritdoc/>
[IdDataField] [IdDataField]
public string ID { get; } = default!; public string ID { get; private set; } = default!;
/// <summary> /// <summary>
/// Full IC name of the account. /// Full IC name of the account.

View File

@@ -13,7 +13,7 @@ public interface INanoTaskUiMessagePayload
/// Dispatched when a new task is created /// Dispatched when a new task is created
/// </summary> /// </summary>
[Serializable, NetSerializable, DataRecord] [Serializable, NetSerializable, DataRecord]
public sealed class NanoTaskAddTask : INanoTaskUiMessagePayload public sealed partial class NanoTaskAddTask : INanoTaskUiMessagePayload
{ {
/// <summary> /// <summary>
/// The newly created task /// The newly created task
@@ -30,7 +30,7 @@ public sealed class NanoTaskAddTask : INanoTaskUiMessagePayload
/// Dispatched when an existing task is modified /// Dispatched when an existing task is modified
/// </summary> /// </summary>
[Serializable, NetSerializable, DataRecord] [Serializable, NetSerializable, DataRecord]
public sealed class NanoTaskUpdateTask : INanoTaskUiMessagePayload public sealed partial class NanoTaskUpdateTask : INanoTaskUiMessagePayload
{ {
/// <summary> /// <summary>
/// The task that was updated and its ID /// The task that was updated and its ID
@@ -47,7 +47,7 @@ public sealed class NanoTaskUpdateTask : INanoTaskUiMessagePayload
/// Dispatched when an existing task is deleted /// Dispatched when an existing task is deleted
/// </summary> /// </summary>
[Serializable, NetSerializable, DataRecord] [Serializable, NetSerializable, DataRecord]
public sealed class NanoTaskDeleteTask : INanoTaskUiMessagePayload public sealed partial class NanoTaskDeleteTask : INanoTaskUiMessagePayload
{ {
/// <summary> /// <summary>
/// The ID of the task to delete /// 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 /// Dispatched when a task is requested to be printed
/// </summary> /// </summary>
[Serializable, NetSerializable, DataRecord] [Serializable, NetSerializable, DataRecord]
public sealed class NanoTaskPrintTask : INanoTaskUiMessagePayload public sealed partial class NanoTaskPrintTask : INanoTaskUiMessagePayload
{ {
/// <summary> /// <summary>
/// The NanoTask to print /// The NanoTask to print

View File

@@ -17,7 +17,7 @@ public enum NanoTaskPriority : byte
/// The data relating to a single NanoTask item, but not its identifier /// The data relating to a single NanoTask item, but not its identifier
/// </summary> /// </summary>
[Serializable, NetSerializable, DataRecord] [Serializable, NetSerializable, DataRecord]
public sealed class NanoTaskItem public sealed partial class NanoTaskItem
{ {
/// <summary> /// <summary>
/// The maximum length of the Description and TaskIsFor fields /// The maximum length of the Description and TaskIsFor fields
@@ -61,7 +61,7 @@ public sealed class NanoTaskItem
/// Pairs a NanoTask item and its identifier /// Pairs a NanoTask item and its identifier
/// </summary> /// </summary>
[Serializable, NetSerializable, DataRecord] [Serializable, NetSerializable, DataRecord]
public sealed class NanoTaskItemAndId public sealed partial class NanoTaskItemAndId
{ {
public readonly int Id; public readonly int Id;
public readonly NanoTaskItem Data; public readonly NanoTaskItem Data;

View File

@@ -19,11 +19,11 @@ public sealed partial class CloningSettingsPrototype : IPrototype, IInheritingPr
public string ID { get; private set; } = default!; public string ID { get; private set; } = default!;
[ParentDataField(typeof(PrototypeIdArraySerializer<CloningSettingsPrototype>))] [ParentDataField(typeof(PrototypeIdArraySerializer<CloningSettingsPrototype>))]
public string[]? Parents { get; } public string[]? Parents { get; private set; }
[AbstractDataField] [AbstractDataField]
[NeverPushInheritance] [NeverPushInheritance]
public bool Abstract { get; } public bool Abstract { get; private set; }
/// <summary> /// <summary>
/// Determines if cloning can be prevented by traits etc. /// Determines if cloning can be prevented by traits etc.

View File

@@ -9,7 +9,7 @@ namespace Content.Shared.RCD;
/// Contains the parameters for an RCD construction / operation /// Contains the parameters for an RCD construction / operation
/// </summary> /// </summary>
[Prototype("rcd")] [Prototype("rcd")]
public sealed class RCDPrototype : IPrototype public sealed partial class RCDPrototype : IPrototype
{ {
[IdDataField] [IdDataField]
public string ID { get; private set; } = default!; public string ID { get; private set; } = default!;

View File

@@ -9,7 +9,7 @@ namespace Content.Shared.Silicons.StationAi;
public sealed partial class StationAiCustomizationGroupPrototype : IPrototype public sealed partial class StationAiCustomizationGroupPrototype : IPrototype
{ {
[IdDataField] [IdDataField]
public string ID { get; } = string.Empty; public string ID { get; private set; } = string.Empty;
/// <summary> /// <summary>
/// The localized name of the customization. /// The localized name of the customization.

View File

@@ -11,7 +11,7 @@ namespace Content.Shared.Silicons.StationAi;
public sealed partial class StationAiCustomizationPrototype : IPrototype, IInheritingPrototype public sealed partial class StationAiCustomizationPrototype : IPrototype, IInheritingPrototype
{ {
[IdDataField] [IdDataField]
public string ID { get; } = string.Empty; public string ID { get; private set; } = string.Empty;
/// <summary> /// <summary>
/// The (unlocalized) name of the customization. /// The (unlocalized) name of the customization.
@@ -42,7 +42,7 @@ public sealed partial class StationAiCustomizationPrototype : IPrototype, IInher
/// </summary> /// </summary>
[ViewVariables] [ViewVariables]
[ParentDataFieldAttribute(typeof(AbstractPrototypeIdArraySerializer<StationAiCustomizationPrototype>))] [ParentDataFieldAttribute(typeof(AbstractPrototypeIdArraySerializer<StationAiCustomizationPrototype>))]
public string[]? Parents { get; } public string[]? Parents { get; private set; }
/// <summary> /// <summary>
/// Specifies whether the prototype is abstract. /// Specifies whether the prototype is abstract.
@@ -50,5 +50,5 @@ public sealed partial class StationAiCustomizationPrototype : IPrototype, IInher
[ViewVariables] [ViewVariables]
[NeverPushInheritance] [NeverPushInheritance]
[AbstractDataField] [AbstractDataField]
public bool Abstract { get; } public bool Abstract { get; private set; }
} }

View File

@@ -11,7 +11,7 @@ public sealed partial class XenoArchTriggerPrototype : IPrototype
{ {
/// <inheritdoc/> /// <inheritdoc/>
[IdDataField] [IdDataField]
public string ID { get; } = default!; public string ID { get; private set; } = default!;
/// <summary> /// <summary>
/// Tip for user on how to activate this trigger. /// Tip for user on how to activate this trigger.