Fix prototypes so they pass analyzer checks (#35435)

This commit is contained in:
Tayrtahn
2025-02-23 23:21:59 -05:00
committed by GitHub
parent 0d84d25067
commit 6f925dd610
84 changed files with 121 additions and 121 deletions

View File

@@ -6,7 +6,7 @@ namespace Content.Server.AlertLevel;
[Prototype("alertLevels")] [Prototype("alertLevels")]
public sealed partial class AlertLevelPrototype : IPrototype public sealed partial class AlertLevelPrototype : IPrototype
{ {
[IdDataField] public string ID { get; } = default!; [IdDataField] public string ID { get; private set; } = default!;
/// <summary> /// <summary>
/// Dictionary of alert levels. Keyed by string - the string key is the most important /// Dictionary of alert levels. Keyed by string - the string key is the most important

View File

@@ -28,7 +28,7 @@ public sealed partial class AntagRandomObjectivesComponent : Component
/// Difficulty is checked over all sets, but each set has its own probability and pick count. /// Difficulty is checked over all sets, but each set has its own probability and pick count.
/// </summary> /// </summary>
[DataRecord] [DataRecord]
public record struct AntagObjectiveSet() public partial record struct AntagObjectiveSet()
{ {
/// <summary> /// <summary>
/// The grouping used by the objective system to pick random objectives. /// The grouping used by the objective system to pick random objectives.

View File

@@ -14,7 +14,7 @@ namespace Content.Server.Botany;
[Prototype("seed")] [Prototype("seed")]
public sealed partial class SeedPrototype : SeedData, IPrototype public sealed partial class SeedPrototype : SeedData, IPrototype
{ {
[IdDataField] public string ID { get; private init; } = default!; [IdDataField] public string ID { get; private set; } = default!;
} }
public enum HarvestType : byte public enum HarvestType : byte

View File

@@ -18,25 +18,25 @@ namespace Content.Server.Connection.Whitelist;
/// If the condition doesn't match, the next condition is checked. /// If the condition doesn't match, the next condition is checked.
/// </summary> /// </summary>
[Prototype("playerConnectionWhitelist")] [Prototype("playerConnectionWhitelist")]
public sealed class PlayerConnectionWhitelistPrototype : IPrototype public sealed partial class PlayerConnectionWhitelistPrototype : IPrototype
{ {
[IdDataField] [IdDataField]
public string ID { get; } = default!; public string ID { get; private set; } = default!;
/// <summary> /// <summary>
/// Minimum number of players required for this whitelist to be active. /// Minimum number of players required for this whitelist to be active.
/// If there are less players than this, the whitelist will be ignored and the next one in the list will be used. /// If there are less players than this, the whitelist will be ignored and the next one in the list will be used.
/// </summary> /// </summary>
[DataField] [DataField]
public int MinimumPlayers { get; } = 0; public int MinimumPlayers = 0;
/// <summary> /// <summary>
/// Maximum number of players allowed for this whitelist to be active. /// Maximum number of players allowed for this whitelist to be active.
/// If there are more players than this, the whitelist will be ignored and the next one in the list will be used. /// If there are more players than this, the whitelist will be ignored and the next one in the list will be used.
/// </summary> /// </summary>
[DataField] [DataField]
public int MaximumPlayers { get; } = int.MaxValue; public int MaximumPlayers = int.MaxValue;
[DataField] [DataField]
public WhitelistCondition[] Conditions { get; } = default!; public WhitelistCondition[] Conditions = default!;
} }

View File

@@ -6,7 +6,7 @@ namespace Content.Server.Ghost.Roles.Raffles;
/// Allows getting a <see cref="IGhostRoleRaffleDecider"/> as prototype. /// Allows getting a <see cref="IGhostRoleRaffleDecider"/> as prototype.
/// </summary> /// </summary>
[Prototype("ghostRoleRaffleDecider")] [Prototype("ghostRoleRaffleDecider")]
public sealed class GhostRoleRaffleDeciderPrototype : IPrototype public sealed partial class GhostRoleRaffleDeciderPrototype : IPrototype
{ {
/// <inheritdoc /> /// <inheritdoc />
[IdDataField] [IdDataField]

View File

@@ -8,7 +8,7 @@ namespace Content.Server.NPC.HTN;
[Prototype("htnCompound")] [Prototype("htnCompound")]
public sealed partial class HTNCompoundPrototype : IPrototype public sealed partial class HTNCompoundPrototype : IPrototype
{ {
[IdDataField] public string ID { get; } = string.Empty; [IdDataField] public string ID { get; private set; } = string.Empty;
[DataField("branches", required: true)] [DataField("branches", required: true)]
public List<HTNBranch> Branches = new(); public List<HTNBranch> Branches = new();

View File

@@ -5,7 +5,7 @@ namespace Content.Server.NPC.Queries.Curves;
[Prototype("utilityCurvePreset")] [Prototype("utilityCurvePreset")]
public sealed partial class UtilityCurvePresetPrototype : IPrototype public sealed partial class UtilityCurvePresetPrototype : IPrototype
{ {
[IdDataField] public string ID { get; } = string.Empty; [IdDataField] public string ID { get; private set; } = string.Empty;
[DataField("curve", required: true)] public IUtilityCurve Curve = default!; [DataField("curve", required: true)] public IUtilityCurve Curve = default!;
} }

View File

@@ -62,7 +62,7 @@ public interface IGridSpawnGroup
} }
[DataRecord] [DataRecord]
public sealed class DungeonSpawnGroup : IGridSpawnGroup public sealed partial class DungeonSpawnGroup : IGridSpawnGroup
{ {
/// <summary> /// <summary>
/// Prototypes we can choose from to spawn. /// Prototypes we can choose from to spawn.
@@ -97,7 +97,7 @@ public sealed class DungeonSpawnGroup : IGridSpawnGroup
} }
[DataRecord] [DataRecord]
public sealed class GridSpawnGroup : IGridSpawnGroup public sealed partial class GridSpawnGroup : IGridSpawnGroup
{ {
public List<ResPath> Paths = new(); public List<ResPath> Paths = new();

View File

@@ -20,7 +20,7 @@ public sealed partial class WireLayoutPrototype : IPrototype, IInheritingPrototy
public string[]? Parents { get; private set; } public string[]? Parents { get; private set; }
[AbstractDataField] [AbstractDataField]
public bool Abstract { get; } public bool Abstract { get; private set; }
/// <summary> /// <summary>
/// How many wires in this layout will do /// How many wires in this layout will do

View File

@@ -14,12 +14,12 @@ public sealed partial class BiomePrototype : IPrototype, IInheritingPrototype
{ {
/// <inheritdoc /> /// <inheritdoc />
[ParentDataField(typeof(AbstractPrototypeIdArraySerializer<EntityPrototype>))] [ParentDataField(typeof(AbstractPrototypeIdArraySerializer<EntityPrototype>))]
public string[]? Parents { get; } public string[]? Parents { get; private set; }
/// <inheritdoc /> /// <inheritdoc />
[NeverPushInheritance] [NeverPushInheritance]
[AbstractDataField] [AbstractDataField]
public bool Abstract { get; } public bool Abstract { get; private set; }
/// <inheritdoc /> /// <inheritdoc />
[IdDataField] [IdDataField]
@@ -42,7 +42,7 @@ public sealed partial class BiomePrototype : IPrototype, IInheritingPrototype
/// </summary> /// </summary>
[DataField("chunkComponents")] [DataField("chunkComponents")]
[AlwaysPushInheritance] [AlwaysPushInheritance]
public ComponentRegistry ChunkComponents { get; } = new(); public ComponentRegistry ChunkComponents = new();
//TODO: Get someone to make this a method on componentregistry that does it Correctly. //TODO: Get someone to make this a method on componentregistry that does it Correctly.
/// <summary> /// <summary>

View File

@@ -84,12 +84,12 @@ public sealed partial class NoiseChannelPrototype : NoiseChannelConfig, IPrototy
{ {
/// <inheritdoc /> /// <inheritdoc />
[ParentDataField(typeof(AbstractPrototypeIdArraySerializer<EntityPrototype>))] [ParentDataField(typeof(AbstractPrototypeIdArraySerializer<EntityPrototype>))]
public string[]? Parents { get; } public string[]? Parents { get; private set; }
/// <inheritdoc /> /// <inheritdoc />
[NeverPushInheritance] [NeverPushInheritance]
[AbstractDataField] [AbstractDataField]
public bool Abstract { get; } public bool Abstract { get; private set; }
/// <inheritdoc /> /// <inheritdoc />
[IdDataField] [IdDataField]

View File

@@ -10,5 +10,5 @@ public sealed partial class AlertCategoryPrototype : IPrototype
{ {
/// <inheritdoc/> /// <inheritdoc/>
[IdDataField] [IdDataField]
public string ID { get; } = default!; public string ID { get; private set; } = default!;
} }

View File

@@ -12,7 +12,7 @@ namespace Content.Shared.Audio;
[Prototype("ambientMusic")] [Prototype("ambientMusic")]
public sealed partial class AmbientMusicPrototype : IPrototype public sealed partial class AmbientMusicPrototype : IPrototype
{ {
[IdDataField] public string ID { get; } = string.Empty; [IdDataField] public string ID { get; private set; } = string.Empty;
/// <summary> /// <summary>
/// Traditionally you'd prioritise most rules to least as priority but in our case we'll just be explicit. /// Traditionally you'd prioritise most rules to least as priority but in our case we'll just be explicit.

View File

@@ -10,7 +10,7 @@ namespace Content.Shared.Audio.Jukebox;
public sealed partial class JukeboxPrototype : IPrototype public sealed partial class JukeboxPrototype : IPrototype
{ {
[IdDataField] [IdDataField]
public string ID { get; } = string.Empty; public string ID { get; private set; } = string.Empty;
/// <summary> /// <summary>
/// User friendly name to use in UI. /// User friendly name to use in UI.

View File

@@ -5,7 +5,7 @@ namespace Content.Shared.Body.Prototypes;
[Prototype("body")] [Prototype("body")]
public sealed partial class BodyPrototype : IPrototype public sealed partial class BodyPrototype : IPrototype
{ {
[IdDataField] public string ID { get; } = default!; [IdDataField] public string ID { get; private set; } = default!;
[DataField("name")] [DataField("name")]
public string Name { get; private set; } = ""; public string Name { get; private set; } = "";
@@ -26,4 +26,4 @@ public sealed partial class BodyPrototype : IPrototype
} }
[DataRecord] [DataRecord]
public sealed record BodyPrototypeSlot(EntProtoId? Part, HashSet<string> Connections, Dictionary<string, string> Organs); public sealed partial record BodyPrototypeSlot(EntProtoId? Part, HashSet<string> Connections, Dictionary<string, string> Organs);

View File

@@ -10,12 +10,12 @@ namespace Content.Shared.Cargo.Prototypes
{ {
/// <inheritdoc /> /// <inheritdoc />
[ParentDataField(typeof(AbstractPrototypeIdArraySerializer<CargoProductPrototype>))] [ParentDataField(typeof(AbstractPrototypeIdArraySerializer<CargoProductPrototype>))]
public string[]? Parents { get; } public string[]? Parents { get; private set; }
/// <inheritdoc /> /// <inheritdoc />
[NeverPushInheritance] [NeverPushInheritance]
[AbstractDataField] [AbstractDataField]
public bool Abstract { get; } public bool Abstract { get; private set; }
[DataField("name")] private string _name = string.Empty; [DataField("name")] private string _name = string.Empty;

View File

@@ -17,7 +17,7 @@ public sealed class LogProbeUiState : BoundUserInterfaceState
} }
[Serializable, NetSerializable, DataRecord] [Serializable, NetSerializable, DataRecord]
public sealed class PulledAccessLog public sealed partial class PulledAccessLog
{ {
public readonly TimeSpan Time; public readonly TimeSpan Time;
public readonly string Accessor; public readonly string Accessor;

View File

@@ -17,7 +17,7 @@ public sealed class NetProbeUiState : BoundUserInterfaceState
} }
[Serializable, NetSerializable, DataRecord] [Serializable, NetSerializable, DataRecord]
public sealed class ProbedNetworkDevice public sealed partial class ProbedNetworkDevice
{ {
public readonly string Name; public readonly string Name;
public readonly string Address; public readonly string Address;

View File

@@ -10,7 +10,7 @@ namespace Content.Shared.Chat.Prototypes;
/// Different entities may use different sounds collections. /// Different entities may use different sounds collections.
/// </summary> /// </summary>
[Prototype("emoteSounds"), Serializable, NetSerializable] [Prototype("emoteSounds"), Serializable, NetSerializable]
public sealed class EmoteSoundsPrototype : IPrototype public sealed partial class EmoteSoundsPrototype : IPrototype
{ {
[IdDataField] [IdDataField]
public string ID { get; private set; } = default!; public string ID { get; private set; } = default!;

View File

@@ -18,6 +18,6 @@ namespace Content.Shared.Chemistry.Dispenser
public List<string> Inventory = new(); public List<string> Inventory = new();
[ViewVariables, IdDataField] [ViewVariables, IdDataField]
public string ID { get; } = default!; public string ID { get; private set; } = default!;
} }
} }

View File

@@ -11,7 +11,7 @@ public sealed partial class MixingCategoryPrototype : IPrototype
{ {
/// <inheritdoc/> /// <inheritdoc/>
[IdDataField] [IdDataField]
public string ID { get; } = default!; public string ID { get; private set; } = default!;
/// <summary> /// <summary>
/// A locale string used in the guidebook to describe this mixing category. /// A locale string used in the guidebook to describe this mixing category.

View File

@@ -10,7 +10,7 @@ public sealed partial class ContrabandSeverityPrototype : IPrototype
{ {
/// <inheritdoc/> /// <inheritdoc/>
[IdDataField] [IdDataField]
public string ID { get; } = default!; public string ID { get; private set; } = default!;
/// <summary> /// <summary>
/// Text shown for this severity level when the contraband is examined. /// Text shown for this severity level when the contraband is examined.

View File

@@ -8,7 +8,7 @@ namespace Content.Shared.CriminalRecords;
/// Can be viewed and edited in a criminal records console by security. /// Can be viewed and edited in a criminal records console by security.
/// </summary> /// </summary>
[Serializable, NetSerializable, DataRecord] [Serializable, NetSerializable, DataRecord]
public sealed record CriminalRecord public sealed partial record CriminalRecord
{ {
/// <summary> /// <summary>
/// Status of the person (None, Wanted, Detained). /// Status of the person (None, Wanted, Detained).

View File

@@ -15,7 +15,7 @@ namespace Content.Shared.Damage.Prototypes
[Serializable, NetSerializable] [Serializable, NetSerializable]
public sealed partial class DamageGroupPrototype : IPrototype public sealed partial class DamageGroupPrototype : IPrototype
{ {
[IdDataField] public string ID { get; } = default!; [IdDataField] public string ID { get; private set; } = default!;
[DataField(required: true)] [DataField(required: true)]
private LocId Name { get; set; } private LocId Name { get; set; }

View File

@@ -5,7 +5,7 @@ namespace Content.Shared.Decals;
[Prototype("palette")] [Prototype("palette")]
public sealed partial class ColorPalettePrototype : IPrototype public sealed partial class ColorPalettePrototype : IPrototype
{ {
[IdDataField] public string ID { get; } = null!; [IdDataField] public string ID { get; private set; } = null!;
[DataField("name")] public string Name { get; private set; } = null!; [DataField("name")] public string Name { get; private set; } = null!;
[DataField("colors")] public Dictionary<string, Color> Colors { get; private set; } = null!; [DataField("colors")] public Dictionary<string, Color> Colors { get; private set; } = null!;
} }

View File

@@ -55,7 +55,7 @@ namespace Content.Shared.Decals
} }
[DataRecord, Serializable, NetSerializable] [DataRecord, Serializable, NetSerializable]
public record DecalGridChunkCollection(Dictionary<Vector2i, DecalChunk> ChunkCollection) public partial record DecalGridChunkCollection(Dictionary<Vector2i, DecalChunk> ChunkCollection)
{ {
public uint NextDecalId; public uint NextDecalId;
} }

View File

@@ -7,7 +7,7 @@ namespace Content.Shared.Decals
[Prototype("decal")] [Prototype("decal")]
public sealed partial class DecalPrototype : IPrototype, IInheritingPrototype public sealed partial class DecalPrototype : IPrototype, IInheritingPrototype
{ {
[IdDataField] public string ID { get; } = null!; [IdDataField] public string ID { get; private set; } = null!;
[DataField("sprite")] public SpriteSpecifier Sprite { get; private set; } = SpriteSpecifier.Invalid; [DataField("sprite")] public SpriteSpecifier Sprite { get; private set; } = SpriteSpecifier.Invalid;
[DataField("tags")] public List<string> Tags = new(); [DataField("tags")] public List<string> Tags = new();
[DataField("showMenu")] public bool ShowMenu = true; [DataField("showMenu")] public bool ShowMenu = true;
@@ -36,11 +36,11 @@ namespace Content.Shared.Decals
public bool DefaultSnap = true; public bool DefaultSnap = true;
[ParentDataField(typeof(AbstractPrototypeIdArraySerializer<DecalPrototype>))] [ParentDataField(typeof(AbstractPrototypeIdArraySerializer<DecalPrototype>))]
public string[]? Parents { get; } public string[]? Parents { get; private set; }
[NeverPushInheritance] [NeverPushInheritance]
[AbstractDataField] [AbstractDataField]
public bool Abstract { get; } public bool Abstract { get; private set; }
} }
} }

View File

@@ -11,7 +11,7 @@ public sealed partial class EntityTablePrototype : IPrototype
{ {
/// <inheritdoc/> /// <inheritdoc/>
[IdDataField] [IdDataField]
public string ID { get; } = default!; public string ID { get; private set; } = default!;
[DataField(required: true)] [DataField(required: true)]
public EntityTableSelector Table = default!; public EntityTableSelector Table = default!;

View File

@@ -7,7 +7,7 @@ namespace Content.Shared.Ghost.Roles.Raffles;
/// Allows specifying the settings for a ghost role raffle as a prototype. /// Allows specifying the settings for a ghost role raffle as a prototype.
/// </summary> /// </summary>
[Prototype("ghostRoleRaffleSettings")] [Prototype("ghostRoleRaffleSettings")]
public sealed class GhostRoleRaffleSettingsPrototype : IPrototype public sealed partial class GhostRoleRaffleSettingsPrototype : IPrototype
{ {
/// <inheritdoc /> /// <inheritdoc />
[IdDataField] [IdDataField]

View File

@@ -11,7 +11,7 @@ namespace Content.Shared.GridPreloader.Prototypes;
[Prototype("preloadedGrid")] [Prototype("preloadedGrid")]
public sealed partial class PreloadedGridPrototype : IPrototype public sealed partial class PreloadedGridPrototype : IPrototype
{ {
[IdDataField] public string ID { get; } = string.Empty; [IdDataField] public string ID { get; private set; } = string.Empty;
[DataField(required: true)] [DataField(required: true)]
public ResPath Path; public ResPath Path;

View File

@@ -37,7 +37,7 @@ public sealed partial class MarkingPoints
[Prototype("markingPoints")] [Prototype("markingPoints")]
public sealed partial class MarkingPointsPrototype : IPrototype public sealed partial class MarkingPointsPrototype : IPrototype
{ {
[IdDataField] public string ID { get; } = default!; [IdDataField] public string ID { get; private set; } = default!;
/// <summary> /// <summary>
/// If the user of this marking point set is only allowed to /// If the user of this marking point set is only allowed to

View File

@@ -9,14 +9,14 @@ namespace Content.Shared.Humanoid.Prototypes;
[Prototype("randomHumanoidSettings")] [Prototype("randomHumanoidSettings")]
public sealed partial class RandomHumanoidSettingsPrototype : IPrototype, IInheritingPrototype public sealed partial class RandomHumanoidSettingsPrototype : IPrototype, IInheritingPrototype
{ {
[IdDataField] public string ID { get; } = default!; [IdDataField] public string ID { get; private set; } = default!;
[ParentDataField(typeof(PrototypeIdArraySerializer<RandomHumanoidSettingsPrototype>))] [ParentDataField(typeof(PrototypeIdArraySerializer<RandomHumanoidSettingsPrototype>))]
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>
/// Whether the humanoid's name should take from the randomized profile or not. /// Whether the humanoid's name should take from the randomized profile or not.

View File

@@ -8,7 +8,7 @@ namespace Content.Shared.Inventory;
[Prototype("inventoryTemplate")] [Prototype("inventoryTemplate")]
public sealed partial class InventoryTemplatePrototype : IPrototype public sealed partial class InventoryTemplatePrototype : IPrototype
{ {
[IdDataField] public string ID { get; } = string.Empty; [IdDataField] public string ID { get; private set; } = string.Empty;
[DataField("slots")] public SlotDefinition[] Slots { get; private set; } = Array.Empty<SlotDefinition>(); [DataField("slots")] public SlotDefinition[] Slots { get; private set; } = Array.Empty<SlotDefinition>();
} }

View File

@@ -10,19 +10,19 @@ public sealed partial class ItemSizePrototype : IPrototype, IComparable<ItemSize
{ {
/// <inheritdoc/> /// <inheritdoc/>
[IdDataField] [IdDataField]
public string ID { get; } = default!; public string ID { get; private set; } = default!;
/// <summary> /// <summary>
/// The amount of space in a bag an item of this size takes. /// The amount of space in a bag an item of this size takes.
/// </summary> /// </summary>
[DataField] [DataField]
public readonly int Weight = 1; public int Weight = 1;
/// <summary> /// <summary>
/// A player-facing name used to describe this size. /// A player-facing name used to describe this size.
/// </summary> /// </summary>
[DataField] [DataField]
public readonly LocId Name; public LocId Name;
/// <summary> /// <summary>
/// The default inventory shape associated with this item size. /// The default inventory shape associated with this item size.

View File

@@ -11,7 +11,7 @@ public sealed partial class LatheCategoryPrototype : IPrototype
{ {
/// <inheritdoc/> /// <inheritdoc/>
[IdDataField] [IdDataField]
public string ID { get; } = default!; public string ID { get; private set; } = default!;
/// <summary> /// <summary>
/// A localized string used in the UI /// A localized string used in the UI

View File

@@ -16,11 +16,11 @@ public sealed partial class LatheRecipePackPrototype : IPrototype, IInheritingPr
public string ID { get; private set; } = default!; public string ID { get; private set; } = default!;
[ParentDataField(typeof(AbstractPrototypeIdArraySerializer<LatheRecipePackPrototype>))] [ParentDataField(typeof(AbstractPrototypeIdArraySerializer<LatheRecipePackPrototype>))]
public string[]? Parents { get; } public string[]? Parents { get; private set; }
[NeverPushInheritance] [NeverPushInheritance]
[AbstractDataField] [AbstractDataField]
public bool Abstract { get; } public bool Abstract { get; private set; }
/// <summary> /// <summary>
/// The lathe recipes contained by this pack. /// The lathe recipes contained by this pack.

View File

@@ -27,7 +27,7 @@ namespace Content.Shared.Maps
[AbstractDataFieldAttribute] [AbstractDataFieldAttribute]
public bool Abstract { get; private set; } public bool Abstract { get; private set; }
[IdDataField] public string ID { get; } = string.Empty; [IdDataField] public string ID { get; private set; } = string.Empty;
public ushort TileId { get; private set; } public ushort TileId { get; private set; }

View File

@@ -13,11 +13,11 @@ namespace Content.Shared.Materials
{ {
[ViewVariables] [ViewVariables]
[ParentDataField(typeof(AbstractPrototypeIdArraySerializer<MaterialPrototype>))] [ParentDataField(typeof(AbstractPrototypeIdArraySerializer<MaterialPrototype>))]
public string[]? Parents { get; } public string[]? Parents { get; private set; }
[ViewVariables] [ViewVariables]
[AbstractDataField] [AbstractDataField]
public bool Abstract { get; } = false; public bool Abstract { get; private set; } = false;
[ViewVariables] [ViewVariables]
[IdDataField] [IdDataField]

View File

@@ -6,7 +6,7 @@ namespace Content.Shared.Mind;
/// The core properties of Role Types /// The core properties of Role Types
/// </summary> /// </summary>
[Prototype, Serializable] [Prototype, Serializable]
public sealed class RoleTypePrototype : IPrototype public sealed partial class RoleTypePrototype : IPrototype
{ {
[IdDataField] [IdDataField]
public string ID { get; private set; } = default!; public string ID { get; private set; } = default!;

View File

@@ -33,7 +33,7 @@ public sealed partial class NinjaGlovesComponent : Component
/// An ability that adds components to the user when the gloves are enabled. /// An ability that adds components to the user when the gloves are enabled.
/// </summary> /// </summary>
[DataRecord] [DataRecord]
public record struct NinjaGloveAbility() public partial record struct NinjaGloveAbility()
{ {
/// <summary> /// <summary>
/// If not null, checks if an objective with this prototype has been completed. /// If not null, checks if an objective with this prototype has been completed.

View File

@@ -124,7 +124,7 @@ public sealed partial class FoodSequenceStartPointComponent : Component
/// Stores all the necessary information for rendering the FoodSequence element /// Stores all the necessary information for rendering the FoodSequence element
/// </summary> /// </summary>
[DataRecord, Serializable, NetSerializable] [DataRecord, Serializable, NetSerializable]
public record struct FoodSequenceVisualLayer public partial record struct FoodSequenceVisualLayer
{ {
/// <summary> /// <summary>
/// reference to the original prototype of the layer. Used to edit visual layers. /// reference to the original prototype of the layer. Used to edit visual layers.

View File

@@ -9,7 +9,7 @@ namespace Content.Shared.Parallax.Biomes;
[Prototype("biomeTemplate")] [Prototype("biomeTemplate")]
public sealed partial class BiomeTemplatePrototype : IPrototype public sealed partial class BiomeTemplatePrototype : IPrototype
{ {
[IdDataField] public string ID { get; } = default!; [IdDataField] public string ID { get; private set; } = default!;
[DataField("layers")] [DataField("layers")]
public List<IBiomeLayer> Layers = new(); public List<IBiomeLayer> Layers = new();

View File

@@ -7,9 +7,9 @@ namespace Content.Shared.Parallax.Biomes.Markers;
/// Spawns entities inside of the specified area with the minimum specified radius. /// Spawns entities inside of the specified area with the minimum specified radius.
/// </summary> /// </summary>
[Prototype("biomeMarkerLayer")] [Prototype("biomeMarkerLayer")]
public sealed class BiomeMarkerLayerPrototype : IBiomeMarkerLayer public sealed partial class BiomeMarkerLayerPrototype : IBiomeMarkerLayer
{ {
[IdDataField] public string ID { get; } = default!; [IdDataField] public string ID { get; private set; } = default!;
/// <summary> /// <summary>
/// Checks for the relevant entity for the tile before spawning. Useful for substituting walls with ore veins for example. /// Checks for the relevant entity for the tile before spawning. Useful for substituting walls with ore veins for example.
@@ -21,7 +21,7 @@ public sealed class BiomeMarkerLayerPrototype : IBiomeMarkerLayer
/// Default prototype to spawn. If null will fall back to entity mask. /// Default prototype to spawn. If null will fall back to entity mask.
/// </summary> /// </summary>
[DataField] [DataField]
public string? Prototype { get; } public string? Prototype { get; private set; }
/// <summary> /// <summary>
/// Minimum radius between 2 points /// Minimum radius between 2 points

View File

@@ -8,5 +8,5 @@ namespace Content.Shared.Players.PlayTimeTracking;
[Prototype("playTimeTracker")] [Prototype("playTimeTracker")]
public sealed partial class PlayTimeTrackerPrototype : IPrototype public sealed partial class PlayTimeTrackerPrototype : IPrototype
{ {
[IdDataField] public string ID { get; } = default!; [IdDataField] public string ID { get; private set; } = default!;
} }

View File

@@ -9,7 +9,7 @@ namespace Content.Shared.Preferences.Loadouts.Effects;
public sealed partial class LoadoutEffectGroupPrototype : IPrototype public sealed partial class LoadoutEffectGroupPrototype : IPrototype
{ {
[IdDataField] [IdDataField]
public string ID { get; } = string.Empty; public string ID { get; private set; } = string.Empty;
[DataField(required: true)] [DataField(required: true)]
public List<LoadoutEffect> Effects = new(); public List<LoadoutEffect> Effects = new();

View File

@@ -9,7 +9,7 @@ namespace Content.Shared.Preferences.Loadouts;
public sealed partial class LoadoutGroupPrototype : IPrototype public sealed partial class LoadoutGroupPrototype : IPrototype
{ {
[IdDataField] [IdDataField]
public string ID { get; } = string.Empty; public string ID { get; private set; } = string.Empty;
/// <summary> /// <summary>
/// User-friendly name for the group. /// User-friendly name for the group.

View File

@@ -11,7 +11,7 @@ namespace Content.Shared.Preferences.Loadouts;
public sealed partial class LoadoutPrototype : IPrototype, IEquipmentLoadout public sealed partial class LoadoutPrototype : IPrototype, IEquipmentLoadout
{ {
[IdDataField] [IdDataField]
public string ID { get; } = string.Empty; public string ID { get; private set; } = string.Empty;
/* /*
* You can either use an existing StartingGearPrototype or specify it inline to avoid bloating yaml. * You can either use an existing StartingGearPrototype or specify it inline to avoid bloating yaml.

View File

@@ -14,7 +14,7 @@ public sealed partial class RoleLoadoutPrototype : IPrototype
*/ */
[IdDataField] [IdDataField]
public string ID { get; } = string.Empty; public string ID { get; private set; } = string.Empty;
/// <summary> /// <summary>
/// Can the user edit their entity name for this role loadout? /// Can the user edit their entity name for this role loadout?

View File

@@ -49,7 +49,7 @@ public partial class DungeonConfig
} }
[Prototype] [Prototype]
public sealed class DungeonConfigPrototype : DungeonConfig, IPrototype public sealed partial class DungeonConfigPrototype : DungeonConfig, IPrototype
{ {
[IdDataField] [IdDataField]
public string ID { get; private set; } = default!; public string ID { get; private set; } = default!;

View File

@@ -14,7 +14,7 @@ namespace Content.Shared.Procedural;
/// This lets us share data between different dungeon configs without having to repeat entire configs. /// This lets us share data between different dungeon configs without having to repeat entire configs.
/// </remarks> /// </remarks>
[DataRecord] [DataRecord]
public sealed class DungeonData public sealed partial class DungeonData
{ {
// I hate this but it also significantly reduces yaml bloat if we add like 10 variations on the same set of layers // I hate this but it also significantly reduces yaml bloat if we add like 10 variations on the same set of layers
// e.g. science rooms, engi rooms, cargo rooms all under PlanetBase for example. // e.g. science rooms, engi rooms, cargo rooms all under PlanetBase for example.

View File

@@ -39,7 +39,7 @@ public sealed partial class NoiseDunGen : IDunGenLayer
} }
[DataRecord] [DataRecord]
public record struct NoiseDunGenLayer public partial record struct NoiseDunGenLayer
{ {
/// <summary> /// <summary>
/// If the noise value is above this then it gets output. /// If the noise value is above this then it gets output.

View File

@@ -20,7 +20,7 @@ public sealed partial class ReplaceTileDunGen : IDunGenLayer
} }
[DataRecord] [DataRecord]
public record struct ReplaceTileLayer public partial record struct ReplaceTileLayer
{ {
public ProtoId<ContentTileDefinition> Tile; public ProtoId<ContentTileDefinition> Tile;

View File

@@ -5,7 +5,7 @@ namespace Content.Shared.Procedural;
[Prototype("dungeonPreset")] [Prototype("dungeonPreset")]
public sealed partial class DungeonPresetPrototype : IPrototype public sealed partial class DungeonPresetPrototype : IPrototype
{ {
[IdDataField] public string ID { get; } = default!; [IdDataField] public string ID { get; private set; } = default!;
/// <summary> /// <summary>
/// The room pack bounds we need to fill. /// The room pack bounds we need to fill.

View File

@@ -8,7 +8,7 @@ namespace Content.Shared.Procedural;
[Prototype("dungeonRoom")] [Prototype("dungeonRoom")]
public sealed partial class DungeonRoomPrototype : IPrototype public sealed partial class DungeonRoomPrototype : IPrototype
{ {
[IdDataField] public string ID { get; } = string.Empty; [IdDataField] public string ID { get; private set; } = string.Empty;
[ViewVariables(VVAccess.ReadWrite), DataField] [ViewVariables(VVAccess.ReadWrite), DataField]
public List<ProtoId<TagPrototype>> Tags = new(); public List<ProtoId<TagPrototype>> Tags = new();

View File

@@ -8,7 +8,7 @@ namespace Content.Shared.Procedural.Loot;
[Prototype("salvageLoot")] [Prototype("salvageLoot")]
public sealed partial class SalvageLootPrototype : IPrototype public sealed partial class SalvageLootPrototype : IPrototype
{ {
[IdDataField] public string ID { get; } = default!; [IdDataField] public string ID { get; private set; } = default!;
/// <summary> /// <summary>
/// Should this loot always spawn if possible. Used for stuff such as ore. /// Should this loot always spawn if possible. Used for stuff such as ore.

View File

@@ -5,7 +5,7 @@ namespace Content.Shared.Procedural;
[Prototype("salvageDifficulty")] [Prototype("salvageDifficulty")]
public sealed partial class SalvageDifficultyPrototype : IPrototype public sealed partial class SalvageDifficultyPrototype : IPrototype
{ {
[IdDataField] public string ID { get; } = string.Empty; [IdDataField] public string ID { get; private set; } = string.Empty;
/// <summary> /// <summary>
/// Color to be used in UI. /// Color to be used in UI.

View File

@@ -27,7 +27,7 @@ public sealed partial class RadioChannelPrototype : IPrototype
public Color Color { get; private set; } = Color.Lime; public Color Color { get; private set; } = Color.Lime;
[IdDataField, ViewVariables] [IdDataField, ViewVariables]
public string ID { get; } = default!; public string ID { get; private set; } = default!;
/// <summary> /// <summary>
/// If channel is long range it doesn't require telecommunication server /// If channel is long range it doesn't require telecommunication server

View File

@@ -8,7 +8,7 @@ namespace Content.Shared.Random;
[Prototype("RandomPlantMutationList")] [Prototype("RandomPlantMutationList")]
public sealed partial class RandomPlantMutationListPrototype : IPrototype public sealed partial class RandomPlantMutationListPrototype : IPrototype
{ {
[IdDataField] public string ID { get; } = default!; [IdDataField] public string ID { get; private set; } = default!;
/// <summary> /// <summary>
/// List of RandomFills that can be picked from. /// List of RandomFills that can be picked from.

View File

@@ -10,7 +10,7 @@ namespace Content.Shared.Random.Rules;
[Prototype("rules")] [Prototype("rules")]
public sealed partial class RulesPrototype : IPrototype public sealed partial class RulesPrototype : IPrototype
{ {
[IdDataField] public string ID { get; } = string.Empty; [IdDataField] public string ID { get; private set; } = string.Empty;
[DataField("rules", required: true)] [DataField("rules", required: true)]
public List<RulesRule> Rules = new(); public List<RulesRule> Rules = new();

View File

@@ -7,7 +7,7 @@ namespace Content.Shared.Random;
/// Linter-friendly version of weightedRandom for Entity prototypes. /// Linter-friendly version of weightedRandom for Entity prototypes.
/// </summary> /// </summary>
[Prototype("weightedRandomEntity")] [Prototype("weightedRandomEntity")]
public sealed class WeightedRandomEntityPrototype : IWeightedRandomPrototype public sealed partial class WeightedRandomEntityPrototype : IWeightedRandomPrototype
{ {
[IdDataField] [IdDataField]
public string ID { get; private set; } = default!; public string ID { get; private set; } = default!;

View File

@@ -8,7 +8,7 @@ namespace Content.Shared.Random;
[Prototype("weightedRandomFillSolution")] [Prototype("weightedRandomFillSolution")]
public sealed partial class WeightedRandomFillSolutionPrototype : IPrototype public sealed partial class WeightedRandomFillSolutionPrototype : IPrototype
{ {
[IdDataField] public string ID { get; } = default!; [IdDataField] public string ID { get; private set; } = default!;
/// <summary> /// <summary>
/// List of RandomFills that can be picked from. /// List of RandomFills that can be picked from.

View File

@@ -8,7 +8,7 @@ namespace Content.Shared.Random;
/// Linter-friendly version of weightedRandom for Ore prototypes. /// Linter-friendly version of weightedRandom for Ore prototypes.
/// </summary> /// </summary>
[Prototype("weightedRandomOre")] [Prototype("weightedRandomOre")]
public sealed class WeightedRandomOrePrototype : IWeightedRandomPrototype public sealed partial class WeightedRandomOrePrototype : IWeightedRandomPrototype
{ {
[IdDataField] [IdDataField]
public string ID { get; private set; } = default!; public string ID { get; private set; } = default!;

View File

@@ -6,7 +6,7 @@ namespace Content.Shared.Random;
/// Generic random weighting dataset to use. /// Generic random weighting dataset to use.
/// </summary> /// </summary>
[Prototype("weightedRandom")] [Prototype("weightedRandom")]
public sealed class WeightedRandomPrototype : IWeightedRandomPrototype public sealed partial class WeightedRandomPrototype : IWeightedRandomPrototype
{ {
[IdDataField] [IdDataField]
public string ID { get; private set; } = default!; public string ID { get; private set; } = default!;

View File

@@ -8,7 +8,7 @@ namespace Content.Shared.Random;
/// Linter-friendly version of weightedRandom for Species prototypes. /// Linter-friendly version of weightedRandom for Species prototypes.
/// </summary> /// </summary>
[Prototype("weightedRandomSpecies")] [Prototype("weightedRandomSpecies")]
public sealed class WeightedRandomSpeciesPrototype : IWeightedRandomPrototype public sealed partial class WeightedRandomSpeciesPrototype : IWeightedRandomPrototype
{ {
[IdDataField] [IdDataField]
public string ID { get; private set; } = default!; public string ID { get; private set; } = default!;

View File

@@ -18,12 +18,12 @@ namespace Content.Shared.Research.Prototypes
/// <inheritdoc/> /// <inheritdoc/>
[ParentDataField(typeof(AbstractPrototypeIdArraySerializer<LatheRecipePrototype>))] [ParentDataField(typeof(AbstractPrototypeIdArraySerializer<LatheRecipePrototype>))]
public string[]? Parents { get; } public string[]? Parents { get; private set; }
/// <inheritdoc /> /// <inheritdoc />
[NeverPushInheritance] [NeverPushInheritance]
[AbstractDataField] [AbstractDataField]
public bool Abstract { get; } public bool Abstract { get; private set; }
/// <summary> /// <summary>
/// Name displayed in the lathe GUI. /// Name displayed in the lathe GUI.

View File

@@ -58,7 +58,7 @@ public sealed class RoboticsConsoleDestroyMessage : BoundUserInterfaceMessage
/// Created by <c>BorgTransponderComponent</c> and sent to clients by <c>RoboticsConsoleComponent</c>. /// Created by <c>BorgTransponderComponent</c> and sent to clients by <c>RoboticsConsoleComponent</c>.
/// </summary> /// </summary>
[DataRecord, Serializable, NetSerializable] [DataRecord, Serializable, NetSerializable]
public record struct CyborgControlData public partial record struct CyborgControlData
{ {
/// <summary> /// <summary>
/// Texture of the borg chassis. /// Texture of the borg chassis.

View File

@@ -6,7 +6,7 @@ namespace Content.Shared.Roles;
public sealed partial class DepartmentPrototype : IPrototype public sealed partial class DepartmentPrototype : IPrototype
{ {
[IdDataField] [IdDataField]
public string ID { get; } = string.Empty; public string ID { get; private set; } = string.Empty;
/// <summary> /// <summary>
/// The name LocId of the department that will be displayed in the various menus. /// The name LocId of the department that will be displayed in the various menus.

View File

@@ -17,7 +17,7 @@ public sealed partial class StartingGearPrototype : IPrototype, IInheritingProto
/// <inheritdoc/> /// <inheritdoc/>
[AbstractDataField] [AbstractDataField]
public bool Abstract { get; } public bool Abstract { get; private set; }
/// <inheritdoc /> /// <inheritdoc />
[DataField] [DataField]

View File

@@ -10,7 +10,7 @@ namespace Content.Shared.Salvage.Expeditions.Modifiers;
[Prototype("salvageBiomeMod")] [Prototype("salvageBiomeMod")]
public sealed partial class SalvageBiomeModPrototype : IPrototype, ISalvageMod public sealed partial class SalvageBiomeModPrototype : IPrototype, ISalvageMod
{ {
[IdDataField] public string ID { get; } = default!; [IdDataField] public string ID { get; private set; } = default!;
[DataField("desc")] public LocId Description { get; private set; } = string.Empty; [DataField("desc")] public LocId Description { get; private set; } = string.Empty;

View File

@@ -8,7 +8,7 @@ namespace Content.Shared.Salvage.Expeditions.Modifiers;
[Prototype("salvageDungeonMod")] [Prototype("salvageDungeonMod")]
public sealed partial class SalvageDungeonModPrototype : IPrototype, IBiomeSpecificMod public sealed partial class SalvageDungeonModPrototype : IPrototype, IBiomeSpecificMod
{ {
[IdDataField] public string ID { get; } = default!; [IdDataField] public string ID { get; private set; } = default!;
[DataField("desc")] public LocId Description { get; private set; } = string.Empty; [DataField("desc")] public LocId Description { get; private set; } = string.Empty;

View File

@@ -6,7 +6,7 @@ namespace Content.Shared.Salvage.Expeditions.Modifiers;
[Prototype("salvageLightMod")] [Prototype("salvageLightMod")]
public sealed partial class SalvageLightMod : IPrototype, IBiomeSpecificMod public sealed partial class SalvageLightMod : IPrototype, IBiomeSpecificMod
{ {
[IdDataField] public string ID { get; } = default!; [IdDataField] public string ID { get; private set; } = default!;
[DataField("desc")] public LocId Description { get; private set; } = string.Empty; [DataField("desc")] public LocId Description { get; private set; } = string.Empty;

View File

@@ -8,7 +8,7 @@ namespace Content.Shared.Salvage.Expeditions.Modifiers;
[Prototype("salvageMod")] [Prototype("salvageMod")]
public sealed partial class SalvageMod : IPrototype, ISalvageMod public sealed partial class SalvageMod : IPrototype, ISalvageMod
{ {
[IdDataField] public string ID { get; } = default!; [IdDataField] public string ID { get; private set; } = default!;
[DataField("desc")] public LocId Description { get; private set; } = string.Empty; [DataField("desc")] public LocId Description { get; private set; } = string.Empty;

View File

@@ -6,7 +6,7 @@ namespace Content.Shared.Salvage.Expeditions.Modifiers;
[Prototype("salvageTemperatureMod")] [Prototype("salvageTemperatureMod")]
public sealed partial class SalvageTemperatureMod : IPrototype, IBiomeSpecificMod public sealed partial class SalvageTemperatureMod : IPrototype, IBiomeSpecificMod
{ {
[IdDataField] public string ID { get; } = default!; [IdDataField] public string ID { get; private set; } = default!;
[DataField("desc")] public LocId Description { get; private set; } = string.Empty; [DataField("desc")] public LocId Description { get; private set; } = string.Empty;

View File

@@ -8,7 +8,7 @@ namespace Content.Shared.Salvage.Expeditions.Modifiers;
[Prototype("salvageWeatherMod")] [Prototype("salvageWeatherMod")]
public sealed partial class SalvageWeatherMod : IPrototype, IBiomeSpecificMod public sealed partial class SalvageWeatherMod : IPrototype, IBiomeSpecificMod
{ {
[IdDataField] public string ID { get; } = default!; [IdDataField] public string ID { get; private set; } = default!;
[DataField("desc")] public LocId Description { get; private set; } = string.Empty; [DataField("desc")] public LocId Description { get; private set; } = string.Empty;

View File

@@ -5,7 +5,7 @@ namespace Content.Shared.Salvage.Expeditions;
[Prototype("salvageFaction")] [Prototype("salvageFaction")]
public sealed partial class SalvageFactionPrototype : IPrototype public sealed partial class SalvageFactionPrototype : IPrototype
{ {
[IdDataField] public string ID { get; } = default!; [IdDataField] public string ID { get; private set; } = default!;
[DataField("desc")] public LocId Description { get; private set; } = string.Empty; [DataField("desc")] public LocId Description { get; private set; } = string.Empty;

View File

@@ -6,7 +6,7 @@ namespace Content.Shared.Salvage;
[Prototype] [Prototype]
public sealed partial class SalvageMapPrototype : IPrototype public sealed partial class SalvageMapPrototype : IPrototype
{ {
[ViewVariables] [IdDataField] public string ID { get; } = default!; [ViewVariables] [IdDataField] public string ID { get; private set; } = default!;
/// <summary> /// <summary>
/// Relative directory path to the given map, i.e. `Maps/Salvage/template.yml` /// Relative directory path to the given map, i.e. `Maps/Salvage/template.yml`

View File

@@ -19,7 +19,7 @@ public sealed partial class BorgTypePrototype : IPrototype
private static readonly ProtoId<SoundCollectionPrototype> DefaultFootsteps = new("FootstepBorg"); private static readonly ProtoId<SoundCollectionPrototype> DefaultFootsteps = new("FootstepBorg");
[IdDataField] [IdDataField]
public required string ID { get; init; } public required string ID { get; set; }
// //
// Description info (name/desc) is configured via localization strings directly. // Description info (name/desc) is configured via localization strings directly.
@@ -29,7 +29,7 @@ public sealed partial class BorgTypePrototype : IPrototype
/// The prototype displayed in the selection menu for this type. /// The prototype displayed in the selection menu for this type.
/// </summary> /// </summary>
[DataField] [DataField]
public required EntProtoId DummyPrototype { get; init; } public required EntProtoId DummyPrototype;
// //
// Functional information // Functional information

View File

@@ -9,7 +9,7 @@ namespace Content.Shared.Speech;
[Prototype("speechVerb")] [Prototype("speechVerb")]
public sealed partial class SpeechVerbPrototype : IPrototype public sealed partial class SpeechVerbPrototype : IPrototype
{ {
[IdDataField] public string ID { get; } = default!; [IdDataField] public string ID { get; private set; } = default!;
/// <summary> /// <summary>
/// Loc strings to be passed to the chat wrapper. 'says', 'states', etc. /// Loc strings to be passed to the chat wrapper. 'says', 'states', etc.

View File

@@ -8,7 +8,7 @@ namespace Content.Shared.Spreader;
[Prototype("edgeSpreader")] [Prototype("edgeSpreader")]
public sealed partial class EdgeSpreaderPrototype : IPrototype public sealed partial class EdgeSpreaderPrototype : IPrototype
{ {
[IdDataField] public string ID { get; } = string.Empty; [IdDataField] public string ID { get; private set; } = string.Empty;
[DataField(required:true)] public int UpdatesPerSecond; [DataField(required:true)] public int UpdatesPerSecond;
/// <summary> /// <summary>

View File

@@ -97,12 +97,12 @@ public sealed partial class JobIconPrototype : StatusIconPrototype, IInheritingP
{ {
/// <inheritdoc /> /// <inheritdoc />
[ParentDataField(typeof(AbstractPrototypeIdArraySerializer<JobIconPrototype>))] [ParentDataField(typeof(AbstractPrototypeIdArraySerializer<JobIconPrototype>))]
public string[]? Parents { get; } public string[]? Parents { get; private set; }
/// <inheritdoc /> /// <inheritdoc />
[NeverPushInheritance] [NeverPushInheritance]
[AbstractDataField] [AbstractDataField]
public bool Abstract { get; } public bool Abstract { get; private set; }
/// <summary> /// <summary>
/// Name of the icon used for menu tooltips. /// Name of the icon used for menu tooltips.
@@ -128,12 +128,12 @@ public sealed partial class HealthIconPrototype : StatusIconPrototype, IInheriti
{ {
/// <inheritdoc /> /// <inheritdoc />
[ParentDataField(typeof(AbstractPrototypeIdArraySerializer<HealthIconPrototype>))] [ParentDataField(typeof(AbstractPrototypeIdArraySerializer<HealthIconPrototype>))]
public string[]? Parents { get; } public string[]? Parents { get; private set; }
/// <inheritdoc /> /// <inheritdoc />
[NeverPushInheritance] [NeverPushInheritance]
[AbstractDataField] [AbstractDataField]
public bool Abstract { get; } public bool Abstract { get; private set; }
} }
/// <summary> /// <summary>
@@ -144,12 +144,12 @@ public sealed partial class SatiationIconPrototype : StatusIconPrototype, IInher
{ {
/// <inheritdoc /> /// <inheritdoc />
[ParentDataField(typeof(AbstractPrototypeIdArraySerializer<SatiationIconPrototype>))] [ParentDataField(typeof(AbstractPrototypeIdArraySerializer<SatiationIconPrototype>))]
public string[]? Parents { get; } public string[]? Parents { get; private set; }
/// <inheritdoc /> /// <inheritdoc />
[NeverPushInheritance] [NeverPushInheritance]
[AbstractDataField] [AbstractDataField]
public bool Abstract { get; } public bool Abstract { get; private set; }
} }
/// <summary> /// <summary>
@@ -160,12 +160,12 @@ public sealed partial class SecurityIconPrototype : StatusIconPrototype, IInheri
{ {
/// <inheritdoc /> /// <inheritdoc />
[ParentDataField(typeof(AbstractPrototypeIdArraySerializer<SecurityIconPrototype>))] [ParentDataField(typeof(AbstractPrototypeIdArraySerializer<SecurityIconPrototype>))]
public string[]? Parents { get; } public string[]? Parents { get; private set; }
/// <inheritdoc /> /// <inheritdoc />
[NeverPushInheritance] [NeverPushInheritance]
[AbstractDataField] [AbstractDataField]
public bool Abstract { get; } public bool Abstract { get; private set; }
} }
/// <summary> /// <summary>
@@ -176,12 +176,12 @@ public sealed partial class FactionIconPrototype : StatusIconPrototype, IInherit
{ {
/// <inheritdoc /> /// <inheritdoc />
[ParentDataField(typeof(AbstractPrototypeIdArraySerializer<FactionIconPrototype>))] [ParentDataField(typeof(AbstractPrototypeIdArraySerializer<FactionIconPrototype>))]
public string[]? Parents { get; } public string[]? Parents { get; private set; }
/// <inheritdoc /> /// <inheritdoc />
[NeverPushInheritance] [NeverPushInheritance]
[AbstractDataField] [AbstractDataField]
public bool Abstract { get; } public bool Abstract { get; private set; }
} }
/// <summary> /// <summary>
@@ -192,12 +192,12 @@ public sealed partial class DebugIconPrototype : StatusIconPrototype, IInheritin
{ {
/// <inheritdoc /> /// <inheritdoc />
[ParentDataField(typeof(AbstractPrototypeIdArraySerializer<DebugIconPrototype>))] [ParentDataField(typeof(AbstractPrototypeIdArraySerializer<DebugIconPrototype>))]
public string[]? Parents { get; } public string[]? Parents { get; private set; }
/// <inheritdoc /> /// <inheritdoc />
[NeverPushInheritance] [NeverPushInheritance]
[AbstractDataField] [AbstractDataField]
public bool Abstract { get; } public bool Abstract { get; private set; }
} }
/// <summary> /// <summary>
@@ -208,12 +208,12 @@ public sealed partial class SsdIconPrototype : StatusIconPrototype, IInheritingP
{ {
/// <inheritdoc /> /// <inheritdoc />
[ParentDataField(typeof(AbstractPrototypeIdArraySerializer<SsdIconPrototype>))] [ParentDataField(typeof(AbstractPrototypeIdArraySerializer<SsdIconPrototype>))]
public string[]? Parents { get; } public string[]? Parents { get; private set; }
/// <inheritdoc /> /// <inheritdoc />
[NeverPushInheritance] [NeverPushInheritance]
[AbstractDataField] [AbstractDataField]
public bool Abstract { get; } public bool Abstract { get; private set; }
} }
[Serializable, NetSerializable] [Serializable, NetSerializable]

View File

@@ -9,10 +9,10 @@ namespace Content.Shared.Storage;
/// Prototype wrapper around <see cref="EntitySpawnEntry"/> /// Prototype wrapper around <see cref="EntitySpawnEntry"/>
/// </summary> /// </summary>
[Prototype] [Prototype]
public sealed class EntitySpawnEntryPrototype : IPrototype public sealed partial class EntitySpawnEntryPrototype : IPrototype
{ {
[IdDataField] [IdDataField]
public string ID { get; } = string.Empty; public string ID { get; private set; } = string.Empty;
[DataField] [DataField]
public List<EntitySpawnEntry> Entries = new(); public List<EntitySpawnEntry> Entries = new();

View File

@@ -20,7 +20,7 @@ public sealed partial class StoryTemplatePrototype : IPrototype
/// Localization ID of the Fluent string that forms the structure of this story. /// Localization ID of the Fluent string that forms the structure of this story.
/// </summary> /// </summary>
[DataField(required: true)] [DataField(required: true)]
public LocId LocId { get; } = default!; public LocId LocId;
/// <summary> /// <summary>
/// Dictionary containing the name of each variable to pass to the template and the ID of the /// Dictionary containing the name of each variable to pass to the template and the ID of the
@@ -29,5 +29,5 @@ public sealed partial class StoryTemplatePrototype : IPrototype
/// dataset which can then be used in the template by <c>{$name}</c>. /// dataset which can then be used in the template by <c>{$name}</c>.
/// </summary> /// </summary>
[DataField] [DataField]
public Dictionary<string, ProtoId<LocalizedDatasetPrototype>> Variables { get; } = default!; public Dictionary<string, ProtoId<LocalizedDatasetPrototype>> Variables = [];
} }

View File

@@ -11,5 +11,5 @@ namespace Content.Shared.Tag;
public sealed partial class TagPrototype : IPrototype public sealed partial class TagPrototype : IPrototype
{ {
[IdDataField, ViewVariables] [IdDataField, ViewVariables]
public string ID { get; } = string.Empty; public string ID { get; private set; } = string.Empty;
} }

View File

@@ -7,7 +7,7 @@ namespace Content.Shared.Weather;
[Prototype("weather")] [Prototype("weather")]
public sealed partial class WeatherPrototype : IPrototype public sealed partial class WeatherPrototype : IPrototype
{ {
[IdDataField] public string ID { get; } = default!; [IdDataField] public string ID { get; private set; } = default!;
[ViewVariables(VVAccess.ReadWrite), DataField("sprite", required: true)] [ViewVariables(VVAccess.ReadWrite), DataField("sprite", required: true)]
public SpriteSpecifier Sprite = default!; public SpriteSpecifier Sprite = default!;