diff --git a/Content.Client/Changelog/ChangelogManager.cs b/Content.Client/Changelog/ChangelogManager.cs index 172ee32ca9..d0a34a5e23 100644 --- a/Content.Client/Changelog/ChangelogManager.cs +++ b/Content.Client/Changelog/ChangelogManager.cs @@ -93,14 +93,14 @@ namespace Content.Client.Changelog [DataField("id")] public int Id { get; private set; } - [field: DataField("author")] + [DataField("author")] public string Author { get; } = ""; [DataField("time")] private string _time = default!; public DateTime Time { get; private set; } - [field: DataField("changes")] + [DataField("changes")] public List Changes { get; } = default!; void ISerializationHooks.AfterDeserialization() diff --git a/Content.Client/GameObjects/Components/Atmos/AtmosPlaqueVisualizer.cs b/Content.Client/GameObjects/Components/Atmos/AtmosPlaqueVisualizer.cs index 93c0413f5a..3f33dda9e0 100644 --- a/Content.Client/GameObjects/Components/Atmos/AtmosPlaqueVisualizer.cs +++ b/Content.Client/GameObjects/Components/Atmos/AtmosPlaqueVisualizer.cs @@ -9,7 +9,7 @@ namespace Content.Client.GameObjects.Components.Atmos [UsedImplicitly] public class AtmosPlaqueVisualizer : AppearanceVisualizer { - [field: DataField("layer")] + [DataField("layer")] private int Layer { get; } public override void InitializeEntity(IEntity entity) diff --git a/Content.Client/GameObjects/Components/IconSmoothing/IconSmoothComponent.cs b/Content.Client/GameObjects/Components/IconSmoothing/IconSmoothComponent.cs index f11819d931..7e1ba7932a 100644 --- a/Content.Client/GameObjects/Components/IconSmoothing/IconSmoothComponent.cs +++ b/Content.Client/GameObjects/Components/IconSmoothing/IconSmoothComponent.cs @@ -41,13 +41,13 @@ namespace Content.Client.GameObjects.Components.IconSmoothing /// /// We will smooth with other objects with the same key. /// - [field: DataField("key")] + [DataField("key")] public string? SmoothKey { get; } /// /// Prepended to the RSI state. /// - [field: DataField("base")] + [DataField("base")] public string StateBase { get; } = string.Empty; /// diff --git a/Content.Client/GameObjects/Components/MachineLinking/SignalSwitchVisualizer.cs b/Content.Client/GameObjects/Components/MachineLinking/SignalSwitchVisualizer.cs index bbec78b277..4dbc9ed83a 100644 --- a/Content.Client/GameObjects/Components/MachineLinking/SignalSwitchVisualizer.cs +++ b/Content.Client/GameObjects/Components/MachineLinking/SignalSwitchVisualizer.cs @@ -9,7 +9,7 @@ namespace Content.Client.GameObjects.Components.MachineLinking [UsedImplicitly] public class SignalSwitchVisualizer : AppearanceVisualizer { - [field: DataField("layer")] + [DataField("layer")] private int Layer { get; } public override void InitializeEntity(IEntity entity) diff --git a/Content.Client/GameObjects/Components/Mining/AsteroidRockVisualizer.cs b/Content.Client/GameObjects/Components/Mining/AsteroidRockVisualizer.cs index fa2cc59db7..7eeec49a68 100644 --- a/Content.Client/GameObjects/Components/Mining/AsteroidRockVisualizer.cs +++ b/Content.Client/GameObjects/Components/Mining/AsteroidRockVisualizer.cs @@ -9,7 +9,7 @@ namespace Content.Client.GameObjects.Components.Mining [UsedImplicitly] public class AsteroidRockVisualizer : AppearanceVisualizer { - [field: DataField("layer")] + [DataField("layer")] private int Layer { get; } = 0; public override void InitializeEntity(IEntity entity) diff --git a/Content.Client/GameObjects/Components/Singularity/SingularityVisualizer.cs b/Content.Client/GameObjects/Components/Singularity/SingularityVisualizer.cs index ffa7115bdb..af70cf1da3 100644 --- a/Content.Client/GameObjects/Components/Singularity/SingularityVisualizer.cs +++ b/Content.Client/GameObjects/Components/Singularity/SingularityVisualizer.cs @@ -9,7 +9,7 @@ namespace Content.Client.GameObjects.Components.Singularity [UsedImplicitly] public class SingularityVisualizer : AppearanceVisualizer { - [field: DataField("layer")] + [DataField("layer")] private int Layer { get; } = 0; public override void InitializeEntity(IEntity entity) diff --git a/Content.Server/AI/Utility/AiLogic/UtilityAI.cs b/Content.Server/AI/Utility/AiLogic/UtilityAI.cs index be14607c5a..617cdb2ea0 100644 --- a/Content.Server/AI/Utility/AiLogic/UtilityAI.cs +++ b/Content.Server/AI/Utility/AiLogic/UtilityAI.cs @@ -35,7 +35,7 @@ namespace Content.Server.AI.Utility.AiLogic /// /// The sum of all BehaviorSets gives us what actions the AI can take /// - [field: DataField("behaviorSets")] + [DataField("behaviorSets")] public HashSet BehaviorSets { get; } = new(); public List AvailableActions { get; set; } = new(); diff --git a/Content.Server/AI/Utility/BehaviorSetPrototype.cs b/Content.Server/AI/Utility/BehaviorSetPrototype.cs index 5519552e8b..a6b0dc3e66 100644 --- a/Content.Server/AI/Utility/BehaviorSetPrototype.cs +++ b/Content.Server/AI/Utility/BehaviorSetPrototype.cs @@ -13,7 +13,7 @@ namespace Content.Server.AI.Utility /// Name of the BehaviorSet. /// [ViewVariables] - [field: DataField("id", required: true)] + [DataField("id", required: true)] public string ID { get; } = default!; /// diff --git a/Content.Server/Advertisements/AdvertisementsPackPrototype.cs b/Content.Server/Advertisements/AdvertisementsPackPrototype.cs index e627f5564d..3f9a02d6e9 100644 --- a/Content.Server/Advertisements/AdvertisementsPackPrototype.cs +++ b/Content.Server/Advertisements/AdvertisementsPackPrototype.cs @@ -10,10 +10,10 @@ namespace Content.Server.Advertisements public class AdvertisementsPackPrototype : IPrototype { [ViewVariables] - [field: DataField("id", required: true)] + [DataField("id", required: true)] public string ID { get; } = default!; - [field: DataField("advertisements")] + [DataField("advertisements")] public List Advertisements { get; } = new(); } } diff --git a/Content.Server/Atmos/Reactions/GasReactionPrototype.cs b/Content.Server/Atmos/Reactions/GasReactionPrototype.cs index 48e43a12f4..776d1fe059 100644 --- a/Content.Server/Atmos/Reactions/GasReactionPrototype.cs +++ b/Content.Server/Atmos/Reactions/GasReactionPrototype.cs @@ -27,38 +27,38 @@ namespace Content.Server.Atmos.Reactions public class GasReactionPrototype : IPrototype { [ViewVariables] - [field: DataField("id", required: true)] + [DataField("id", required: true)] public string ID { get; } = default!; /// /// Minimum gas amount requirements. /// - [field: DataField("minimumRequirements")] + [DataField("minimumRequirements")] public float[] MinimumRequirements { get; } = new float[Atmospherics.TotalNumberOfGases]; /// /// Maximum temperature requirement. /// - [field: DataField("maximumTemperature")] + [DataField("maximumTemperature")] public float MaximumTemperatureRequirement { get; } = float.MaxValue; /// /// Minimum temperature requirement. /// - [field: DataField("minimumTemperature")] + [DataField("minimumTemperature")] public float MinimumTemperatureRequirement { get; } = Atmospherics.TCMB; /// /// Minimum energy requirement. /// - [field: DataField("minimumEnergy")] + [DataField("minimumEnergy")] public float MinimumEnergyRequirement { get; } = 0f; /// /// Lower numbers are checked/react later than higher numbers. /// If two reactions have the same priority, they may happen in either order. /// - [field: DataField("priority")] + [DataField("priority")] public int Priority { get; } = int.MinValue; /// diff --git a/Content.Server/Atmos/Reactions/WaterVaporReaction.cs b/Content.Server/Atmos/Reactions/WaterVaporReaction.cs index d8d47ae226..c2838e3964 100644 --- a/Content.Server/Atmos/Reactions/WaterVaporReaction.cs +++ b/Content.Server/Atmos/Reactions/WaterVaporReaction.cs @@ -5,7 +5,6 @@ using Content.Shared.Chemistry; using Content.Shared.Maps; using JetBrains.Annotations; using Robust.Server.GameObjects; -using Robust.Shared.Serialization; using Robust.Shared.Serialization.Manager.Attributes; namespace Content.Server.Atmos.Reactions @@ -14,13 +13,13 @@ namespace Content.Server.Atmos.Reactions [DataDefinition] public class WaterVaporReaction : IGasReactionEffect { - [field: DataField("reagent")] public string? Reagent { get; } = null; + [DataField("reagent")] public string? Reagent { get; } = null; - [field: DataField("gas")] public int GasId { get; } = 0; + [DataField("gas")] public int GasId { get; } = 0; - [field: DataField("molesPerUnit")] public float MolesPerUnit { get; } = 1; + [DataField("molesPerUnit")] public float MolesPerUnit { get; } = 1; - [field: DataField("puddlePrototype")] public string? PuddlePrototype { get; } = "PuddleSmear"; + [DataField("puddlePrototype")] public string? PuddlePrototype { get; } = "PuddleSmear"; public ReactionResult React(GasMixture mixture, IGasMixtureHolder? holder, GridTileLookupSystem gridTileLookup) { diff --git a/Content.Server/Botany/Seed.cs b/Content.Server/Botany/Seed.cs index 59c80e7f11..173e98e387 100644 --- a/Content.Server/Botany/Seed.cs +++ b/Content.Server/Botany/Seed.cs @@ -76,7 +76,7 @@ namespace Content.Server.Botany private const string SeedPrototype = "SeedBase"; [ViewVariables] - [field: DataField("id", required: true)] + [DataField("id", required: true)] public string ID { get; private init; } = default!; /// diff --git a/Content.Server/Construction/Completions/ConditionalAction.cs b/Content.Server/Construction/Completions/ConditionalAction.cs index 9884eb7ecf..da7fd719dd 100644 --- a/Content.Server/Construction/Completions/ConditionalAction.cs +++ b/Content.Server/Construction/Completions/ConditionalAction.cs @@ -11,13 +11,13 @@ namespace Content.Server.Construction.Completions [DataDefinition] public class ConditionalAction : IGraphAction { - [field: DataField("passUser")] public bool PassUser { get; } = false; + [DataField("passUser")] public bool PassUser { get; } = false; - [field: DataField("condition", required:true)] public IGraphCondition? Condition { get; } = null; + [DataField("condition", required:true)] public IGraphCondition? Condition { get; } = null; - [field: DataField("action", required:true)] public IGraphAction? Action { get; } = null; + [DataField("action", required:true)] public IGraphAction? Action { get; } = null; - [field: DataField("else")] public IGraphAction? Else { get; } = null; + [DataField("else")] public IGraphAction? Else { get; } = null; public async Task PerformAction(IEntity entity, IEntity? user) { diff --git a/Content.Server/Construction/Completions/DeleteEntitiesInContainer.cs b/Content.Server/Construction/Completions/DeleteEntitiesInContainer.cs index ed220ff884..e45bd8ccfa 100644 --- a/Content.Server/Construction/Completions/DeleteEntitiesInContainer.cs +++ b/Content.Server/Construction/Completions/DeleteEntitiesInContainer.cs @@ -11,7 +11,7 @@ namespace Content.Server.Construction.Completions [DataDefinition] public class DeleteEntitiesInContainer : IGraphAction { - [field: DataField("container")] public string Container { get; } = string.Empty; + [DataField("container")] public string Container { get; } = string.Empty; public async Task PerformAction(IEntity entity, IEntity? user) { diff --git a/Content.Server/Construction/Completions/MoveContainer.cs b/Content.Server/Construction/Completions/MoveContainer.cs index a0df7c0c7a..9676273bc8 100644 --- a/Content.Server/Construction/Completions/MoveContainer.cs +++ b/Content.Server/Construction/Completions/MoveContainer.cs @@ -13,8 +13,8 @@ namespace Content.Server.Construction.Completions [DataDefinition] public class MoveContainer : IGraphAction { - [field: DataField("from")] public string? FromContainer { get; } = null; - [field: DataField("to")] public string? ToContainer { get; } = null; + [DataField("from")] public string? FromContainer { get; } = null; + [DataField("to")] public string? ToContainer { get; } = null; public async Task PerformAction(IEntity entity, IEntity? user) { diff --git a/Content.Server/Construction/Completions/PopupEveryone.cs b/Content.Server/Construction/Completions/PopupEveryone.cs index 5a8bcd03f7..580fe65773 100644 --- a/Content.Server/Construction/Completions/PopupEveryone.cs +++ b/Content.Server/Construction/Completions/PopupEveryone.cs @@ -10,7 +10,7 @@ namespace Content.Server.Construction.Completions [DataDefinition] public class PopupEveryone : IGraphAction { - [field: DataField("text")] public string Text { get; } = string.Empty; + [DataField("text")] public string Text { get; } = string.Empty; public async Task PerformAction(IEntity entity, IEntity? user) { diff --git a/Content.Server/Construction/Completions/PopupUser.cs b/Content.Server/Construction/Completions/PopupUser.cs index f487d72dec..6723324024 100644 --- a/Content.Server/Construction/Completions/PopupUser.cs +++ b/Content.Server/Construction/Completions/PopupUser.cs @@ -12,8 +12,8 @@ namespace Content.Server.Construction.Completions [DataDefinition] public class PopupUser : IGraphAction { - [field: DataField("cursor")] public bool Cursor { get; } = false; - [field: DataField("text")] public string Text { get; } = string.Empty; + [DataField("cursor")] public bool Cursor { get; } = false; + [DataField("text")] public string Text { get; } = string.Empty; public async Task PerformAction(IEntity entity, IEntity? user) { diff --git a/Content.Server/Construction/Completions/SpawnPrototypeAtContainer.cs b/Content.Server/Construction/Completions/SpawnPrototypeAtContainer.cs index 62c89169f2..489c4e7b77 100644 --- a/Content.Server/Construction/Completions/SpawnPrototypeAtContainer.cs +++ b/Content.Server/Construction/Completions/SpawnPrototypeAtContainer.cs @@ -1,5 +1,4 @@ #nullable enable -using System; using System.Threading.Tasks; using Content.Shared.Construction; using JetBrains.Annotations; @@ -13,9 +12,9 @@ namespace Content.Server.Construction.Completions [DataDefinition] public class SpawnPrototypeAtContainer : IGraphAction { - [field: DataField("prototype")] public string Prototype { get; } = string.Empty; - [field: DataField("container")] public string Container { get; } = string.Empty; - [field: DataField("amount")] public int Amount { get; } = 1; + [DataField("prototype")] public string Prototype { get; } = string.Empty; + [DataField("container")] public string Container { get; } = string.Empty; + [DataField("amount")] public int Amount { get; } = 1; public async Task PerformAction(IEntity entity, IEntity? user) { diff --git a/Content.Server/Construction/Conditions/AllConditions.cs b/Content.Server/Construction/Conditions/AllConditions.cs index a39f4fc5ef..21db036f0f 100644 --- a/Content.Server/Construction/Conditions/AllConditions.cs +++ b/Content.Server/Construction/Conditions/AllConditions.cs @@ -11,7 +11,7 @@ namespace Content.Server.Construction.Conditions [DataDefinition] public class AllConditions : IGraphCondition { - [field: DataField("conditions")] + [DataField("conditions")] public IGraphCondition[] Conditions { get; } = Array.Empty(); public async Task Condition(IEntity entity) diff --git a/Content.Server/Construction/Conditions/AnyConditions.cs b/Content.Server/Construction/Conditions/AnyConditions.cs index d9cc373fe1..b8fe9a51f2 100644 --- a/Content.Server/Construction/Conditions/AnyConditions.cs +++ b/Content.Server/Construction/Conditions/AnyConditions.cs @@ -11,7 +11,7 @@ namespace Content.Server.Construction.Conditions [DataDefinition] public class AnyConditions : IGraphCondition { - [field: DataField("conditions")] + [DataField("conditions")] public IGraphCondition[] Conditions { get; } = Array.Empty(); public async Task Condition(IEntity entity) diff --git a/Content.Server/GameObjects/Components/AI/AiFactionPrototype.cs b/Content.Server/GameObjects/Components/AI/AiFactionPrototype.cs index e0b0e35204..d00e48be4c 100644 --- a/Content.Server/GameObjects/Components/AI/AiFactionPrototype.cs +++ b/Content.Server/GameObjects/Components/AI/AiFactionPrototype.cs @@ -12,7 +12,7 @@ namespace Content.Server.GameObjects.Components.AI // These are immutable so any dynamic changes aren't saved back over. // AiFactionSystem will just read these and then store them. [ViewVariables] - [field: DataField("id", required: true)] + [DataField("id", required: true)] public string ID { get; } = default!; [DataField("hostile")] diff --git a/Content.Server/GameObjects/Components/Access/AccessReaderComponent.cs b/Content.Server/GameObjects/Components/Access/AccessReaderComponent.cs index dd147f9cde..b9ea14bb90 100644 --- a/Content.Server/GameObjects/Components/Access/AccessReaderComponent.cs +++ b/Content.Server/GameObjects/Components/Access/AccessReaderComponent.cs @@ -34,7 +34,7 @@ namespace Content.Server.GameObjects.Components.Access /// List of access lists to check allowed against. For an access check to pass /// there has to be an access list that is a subset of the access in the checking list. /// - [field: DataField("access")] + [DataField("access")] [ViewVariables] public List> AccessLists { get; } = new(); diff --git a/Content.Server/GameObjects/Components/AdvertiseComponent.cs b/Content.Server/GameObjects/Components/AdvertiseComponent.cs index 2685bd20c9..836e1e9c51 100644 --- a/Content.Server/GameObjects/Components/AdvertiseComponent.cs +++ b/Content.Server/GameObjects/Components/AdvertiseComponent.cs @@ -24,7 +24,7 @@ namespace Content.Server.GameObjects.Components /// Minimum time to wait before saying a new ad, in seconds. Has to be larger than or equal to 1. /// [ViewVariables] - [field: DataField("minWait")] + [DataField("minWait")] private int MinWait { get; } = 480; // 8 minutes /// @@ -32,10 +32,10 @@ namespace Content.Server.GameObjects.Components /// to /// [ViewVariables] - [field: DataField("maxWait")] + [DataField("maxWait")] private int MaxWait { get; } = 600; // 10 minutes - [field: DataField("pack")] + [DataField("pack")] private string PackPrototypeId { get; } = string.Empty; private List _advertisements = new(); diff --git a/Content.Server/GameObjects/Components/Atmos/AirtightComponent.cs b/Content.Server/GameObjects/Components/Atmos/AirtightComponent.cs index cfaf5a0d21..86658270f7 100644 --- a/Content.Server/GameObjects/Components/Atmos/AirtightComponent.cs +++ b/Content.Server/GameObjects/Components/Atmos/AirtightComponent.cs @@ -1,7 +1,6 @@ #nullable enable using Content.Server.GameObjects.EntitySystems; using Content.Shared.Atmos; -using Robust.Server.GameObjects; using Robust.Shared.GameObjects; using Robust.Shared.IoC; using Robust.Shared.Log; @@ -45,7 +44,7 @@ namespace Content.Server.GameObjects.Components.Atmos private bool _fixAirBlockedDirectionInitialize = true; [ViewVariables] - [field: DataField("noAirWhenFullyAirBlocked")] + [DataField("noAirWhenFullyAirBlocked")] public bool NoAirWhenFullyAirBlocked { get; } = true; [ViewVariables(VVAccess.ReadWrite)] diff --git a/Content.Server/GameObjects/Components/BarSign/BarSignPrototype.cs b/Content.Server/GameObjects/Components/BarSign/BarSignPrototype.cs index 29101018ca..bf48b6a10f 100644 --- a/Content.Server/GameObjects/Components/BarSign/BarSignPrototype.cs +++ b/Content.Server/GameObjects/Components/BarSign/BarSignPrototype.cs @@ -13,7 +13,7 @@ namespace Content.Server.GameObjects.Components.BarSign private string _name = ""; [ViewVariables] - [field: DataField("id", required: true)] + [DataField("id", required: true)] public string ID { get; } = default!; diff --git a/Content.Server/GameObjects/Components/CrayonComponent.cs b/Content.Server/GameObjects/Components/CrayonComponent.cs index 3e6764cbb6..fea47acd26 100644 --- a/Content.Server/GameObjects/Components/CrayonComponent.cs +++ b/Content.Server/GameObjects/Components/CrayonComponent.cs @@ -17,8 +17,8 @@ using Robust.Shared.Player; using Robust.Shared.Players; using Robust.Shared.Prototypes; using Robust.Shared.Serialization; -using Robust.Shared.ViewVariables; using Robust.Shared.Serialization.Manager.Attributes; +using Robust.Shared.ViewVariables; namespace Content.Server.GameObjects.Components { @@ -38,7 +38,7 @@ namespace Content.Server.GameObjects.Components public int Charges { get; set; } [ViewVariables(VVAccess.ReadWrite)] - [field: DataField("capacity")] + [DataField("capacity")] public int Capacity { get; set; } = 30; [ViewVariables] private BoundUserInterface? UserInterface => Owner.GetUIOrNull(CrayonUiKey.Key); diff --git a/Content.Server/GameObjects/Components/Destructible/Thresholds/Triggers/OrTrigger.cs b/Content.Server/GameObjects/Components/Destructible/Thresholds/Triggers/OrTrigger.cs index bf40183577..0c58f12db9 100644 --- a/Content.Server/GameObjects/Components/Destructible/Thresholds/Triggers/OrTrigger.cs +++ b/Content.Server/GameObjects/Components/Destructible/Thresholds/Triggers/OrTrigger.cs @@ -14,7 +14,7 @@ namespace Content.Server.GameObjects.Components.Destructible.Thresholds.Triggers [DataDefinition] public class OrTrigger : IThresholdTrigger { - [field: DataField("triggers")] + [DataField("triggers")] public List Triggers { get; } = new(); public bool Reached(IDamageableComponent damageable, DestructibleSystem system) diff --git a/Content.Server/GameObjects/Components/Engineering/DisassembleOnActivateComponent.cs b/Content.Server/GameObjects/Components/Engineering/DisassembleOnActivateComponent.cs index 708d9c16db..bedd06c5ef 100644 --- a/Content.Server/GameObjects/Components/Engineering/DisassembleOnActivateComponent.cs +++ b/Content.Server/GameObjects/Components/Engineering/DisassembleOnActivateComponent.cs @@ -1,11 +1,11 @@ #nullable enable +using System.Threading; using Content.Shared.GameObjects; using Robust.Shared.GameObjects; using Robust.Shared.Prototypes; using Robust.Shared.Serialization.Manager.Attributes; using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype; using Robust.Shared.ViewVariables; -using System.Threading; namespace Content.Server.GameObjects.Components.Engineering { @@ -16,7 +16,7 @@ namespace Content.Server.GameObjects.Components.Engineering public override uint? NetID => ContentNetIDs.DISASSEMBLE_ON_ACTIVATE; [ViewVariables] - [field: DataField("prototype", customTypeSerializer: typeof(PrototypeIdSerializer))] + [DataField("prototype", customTypeSerializer: typeof(PrototypeIdSerializer))] public string? Prototype { get; } [ViewVariables] diff --git a/Content.Server/GameObjects/Components/Engineering/SpawnAfterInteractComponent.cs b/Content.Server/GameObjects/Components/Engineering/SpawnAfterInteractComponent.cs index d003dcbc31..a7d1463b31 100644 --- a/Content.Server/GameObjects/Components/Engineering/SpawnAfterInteractComponent.cs +++ b/Content.Server/GameObjects/Components/Engineering/SpawnAfterInteractComponent.cs @@ -15,7 +15,7 @@ namespace Content.Server.GameObjects.Components.Engineering public override uint? NetID => ContentNetIDs.SPAWN_AFTER_INTERACT; [ViewVariables] - [field: DataField("prototype", customTypeSerializer: typeof(PrototypeIdSerializer))] + [DataField("prototype", customTypeSerializer: typeof(PrototypeIdSerializer))] public string? Prototype { get; } [ViewVariables] diff --git a/Content.Server/GameObjects/Components/Fluids/MopComponent.cs b/Content.Server/GameObjects/Components/Fluids/MopComponent.cs index 3b4c481150..49c9f45fbc 100644 --- a/Content.Server/GameObjects/Components/Fluids/MopComponent.cs +++ b/Content.Server/GameObjects/Components/Fluids/MopComponent.cs @@ -1,20 +1,17 @@ #nullable enable +using System.Threading.Tasks; using Content.Server.GameObjects.Components.Chemistry; +using Content.Server.GameObjects.EntitySystems.DoAfter; using Content.Shared.Chemistry; using Content.Shared.Interfaces; using Content.Shared.Interfaces.GameObjects.Components; using Content.Shared.Utility; +using Robust.Shared.Audio; using Robust.Shared.GameObjects; using Robust.Shared.Localization; -using Robust.Shared.Serialization; -using System.Threading.Tasks; -using Content.Server.GameObjects.EntitySystems.DoAfter; -using Robust.Server.GameObjects; -using Robust.Shared.Audio; using Robust.Shared.Player; -using Robust.Shared.ViewVariables; -using Robust.Shared.Prototypes; using Robust.Shared.Serialization.Manager.Attributes; +using Robust.Shared.ViewVariables; namespace Content.Server.GameObjects.Components.Fluids { @@ -52,7 +49,7 @@ namespace Content.Server.GameObjects.Components.Fluids // Picking up a puddle requires multiple clicks // Dumping in a bucket requires 1 click // Long-term you'd probably use a cooldown and start the pickup once we have some form of global cooldown - [field: DataField("pickup_amount")] + [DataField("pickup_amount")] public ReagentUnit PickupAmount { get; } = ReagentUnit.New(5); [DataField("pickup_sound")] diff --git a/Content.Server/GameObjects/Components/Interactable/MultitoolComponent.cs b/Content.Server/GameObjects/Components/Interactable/MultitoolComponent.cs index e6a7bf0d91..45fc78fd0c 100644 --- a/Content.Server/GameObjects/Components/Interactable/MultitoolComponent.cs +++ b/Content.Server/GameObjects/Components/Interactable/MultitoolComponent.cs @@ -22,22 +22,22 @@ namespace Content.Server.GameObjects.Components.Interactable { [DataField("behavior")] public ToolQuality Behavior { get; private set; } = ToolQuality.None; - [field: DataField("state")] + [DataField("state")] public string State { get; } = string.Empty; - [field: DataField("texture")] + [DataField("texture")] public string Texture { get; } = string.Empty; - [field: DataField("sprite")] + [DataField("sprite")] public string Sprite { get; } = string.Empty; - [field: DataField("useSound")] + [DataField("useSound")] public string Sound { get; } = string.Empty; - [field: DataField("useSoundCollection")] + [DataField("useSoundCollection")] public string SoundCollection { get; } = string.Empty; - [field: DataField("changeSound")] + [DataField("changeSound")] public string ChangeSound { get; } = string.Empty; } diff --git a/Content.Server/GameObjects/Components/MachineLinking/SignalTransmitterComponent.cs b/Content.Server/GameObjects/Components/MachineLinking/SignalTransmitterComponent.cs index eec7df1581..a38492c4e6 100644 --- a/Content.Server/GameObjects/Components/MachineLinking/SignalTransmitterComponent.cs +++ b/Content.Server/GameObjects/Components/MachineLinking/SignalTransmitterComponent.cs @@ -24,7 +24,7 @@ namespace Content.Server.GameObjects.Components.MachineLinking /// 0 is unlimited range /// [ViewVariables] - [field: DataField("range")] + [DataField("range")] public float Range { get; private set; } = 10; [DataField("signalReceivers")] private List _receiverIds = new(); diff --git a/Content.Server/GameObjects/Components/Markers/SpawnPointComponent.cs b/Content.Server/GameObjects/Components/Markers/SpawnPointComponent.cs index 9728ccb10b..f7135f22bd 100644 --- a/Content.Server/GameObjects/Components/Markers/SpawnPointComponent.cs +++ b/Content.Server/GameObjects/Components/Markers/SpawnPointComponent.cs @@ -19,7 +19,7 @@ namespace Content.Server.GameObjects.Components.Markers private string? _jobId; [field: ViewVariables(VVAccess.ReadWrite)] - [field: DataField("spawn_type")] + [DataField("spawn_type")] public SpawnPointType SpawnType { get; } = SpawnPointType.Unset; public JobPrototype? Job => string.IsNullOrEmpty(_jobId) ? null : _prototypeManager.Index(_jobId); diff --git a/Content.Server/GameObjects/Components/Nutrition/CreamPieComponent.cs b/Content.Server/GameObjects/Components/Nutrition/CreamPieComponent.cs index 4467f31ee6..f3168ac56d 100644 --- a/Content.Server/GameObjects/Components/Nutrition/CreamPieComponent.cs +++ b/Content.Server/GameObjects/Components/Nutrition/CreamPieComponent.cs @@ -16,7 +16,7 @@ namespace Content.Server.GameObjects.Components.Nutrition public override string Name => "CreamPie"; [ViewVariables(VVAccess.ReadWrite)] - [field: DataField("paralyzeTime")] + [DataField("paralyzeTime")] public float ParalyzeTime { get; set; } = 1f; public void PlaySound() diff --git a/Content.Server/GameObjects/Components/Projectiles/ProjectileComponent.cs b/Content.Server/GameObjects/Components/Projectiles/ProjectileComponent.cs index a94c202e8a..4ffa9a1038 100644 --- a/Content.Server/GameObjects/Components/Projectiles/ProjectileComponent.cs +++ b/Content.Server/GameObjects/Components/Projectiles/ProjectileComponent.cs @@ -3,10 +3,8 @@ using Content.Server.GameObjects.Components.Mobs; using Content.Shared.Damage; using Content.Shared.GameObjects.Components.Damage; using Content.Shared.GameObjects.Components.Projectiles; -using Robust.Server.GameObjects; using Robust.Shared.Audio; using Robust.Shared.GameObjects; -using Robust.Shared.Physics; using Robust.Shared.Physics.Collision; using Robust.Shared.Physics.Dynamics; using Robust.Shared.Player; @@ -32,7 +30,7 @@ namespace Content.Server.GameObjects.Components.Projectiles set => _damages = value; } - [field: DataField("deleteOnCollide")] + [DataField("deleteOnCollide")] public bool DeleteOnCollide { get; } = true; // Get that juicy FPS hit sound diff --git a/Content.Server/GameObjects/Components/Research/LatheDatabaseComponent.cs b/Content.Server/GameObjects/Components/Research/LatheDatabaseComponent.cs index c92bdfed32..6f9ec0f884 100644 --- a/Content.Server/GameObjects/Components/Research/LatheDatabaseComponent.cs +++ b/Content.Server/GameObjects/Components/Research/LatheDatabaseComponent.cs @@ -15,7 +15,7 @@ namespace Content.Server.GameObjects.Components.Research /// Whether new recipes can be added to this database or not. /// [ViewVariables] - [field: DataField("static")] + [DataField("static")] public bool Static { get; private set; } = false; public override ComponentState GetComponentState(ICommonSession player) diff --git a/Content.Server/GameObjects/Components/Strap/StrapComponent.cs b/Content.Server/GameObjects/Components/Strap/StrapComponent.cs index c8e42b3ddc..b04e0189b9 100644 --- a/Content.Server/GameObjects/Components/Strap/StrapComponent.cs +++ b/Content.Server/GameObjects/Components/Strap/StrapComponent.cs @@ -47,28 +47,28 @@ namespace Content.Server.GameObjects.Components.Strap /// /// The change in position to the strapped mob /// - [field: DataField("position")] + [DataField("position")] public StrapPosition Position { get; } = StrapPosition.None; /// /// The sound to be played when a mob is buckled /// [ViewVariables] - [field: DataField("buckleSound")] + [DataField("buckleSound")] public string BuckleSound { get; } = "/Audio/Effects/buckle.ogg"; /// /// The sound to be played when a mob is unbuckled /// [ViewVariables] - [field: DataField("unbuckleSound")] + [DataField("unbuckleSound")] public string UnbuckleSound { get; } = "/Audio/Effects/unbuckle.ogg"; /// /// ID of the alert to show when buckled /// [ViewVariables] - [field: DataField("buckledAlertType")] + [DataField("buckledAlertType")] public AlertType BuckledAlertType { get; } = AlertType.Buckled; /// diff --git a/Content.Server/GameObjects/Components/Weapon/Ranged/Ammunition/AmmoComponent.cs b/Content.Server/GameObjects/Components/Weapon/Ranged/Ammunition/AmmoComponent.cs index 8968aee8b0..da1f9183ad 100644 --- a/Content.Server/GameObjects/Components/Weapon/Ranged/Ammunition/AmmoComponent.cs +++ b/Content.Server/GameObjects/Components/Weapon/Ranged/Ammunition/AmmoComponent.cs @@ -26,7 +26,7 @@ namespace Content.Server.GameObjects.Components.Weapon.Ranged.Ammunition public override string Name => "Ammo"; - [field: DataField("caliber")] + [DataField("caliber")] public BallisticCaliber Caliber { get; } = BallisticCaliber.Unspecified; public bool Spent @@ -53,7 +53,7 @@ namespace Content.Server.GameObjects.Components.Weapon.Ranged.Ammunition /// /// Used for something that is deleted when the projectile is retrieved /// - [field: DataField("caseless")] + [DataField("caseless")] public bool Caseless { get; } // Rather than managing bullet / case state seemed easier to just have 2 toggles @@ -62,26 +62,26 @@ namespace Content.Server.GameObjects.Components.Weapon.Ranged.Ammunition /// /// For shotguns where they might shoot multiple entities /// - [field: DataField("projectilesFired")] + [DataField("projectilesFired")] public int ProjectilesFired { get; } = 1; [DataField("projectile")] private string? _projectileId; // How far apart each entity is if multiple are shot - [field: DataField("ammoSpread")] + [DataField("ammoSpread")] public float EvenSpreadAngle { get; } = default; /// /// How fast the shot entities travel /// - [field: DataField("ammoVelocity")] + [DataField("ammoVelocity")] public float Velocity { get; } = 20f; [DataField("muzzleFlash")] private string _muzzleFlashSprite = "Objects/Weapons/Guns/Projectiles/bullet_muzzle.png"; - [field: DataField("soundCollectionEject")] + [DataField("soundCollectionEject")] public string? SoundCollectionEject { get; } = "CasingEject"; void ISerializationHooks.AfterDeserialization() diff --git a/Content.Server/GameObjects/Components/Weapon/Ranged/Barrels/PumpBarrelComponent.cs b/Content.Server/GameObjects/Components/Weapon/Ranged/Barrels/PumpBarrelComponent.cs index be783ea1ee..a8f8ee95df 100644 --- a/Content.Server/GameObjects/Components/Weapon/Ranged/Barrels/PumpBarrelComponent.cs +++ b/Content.Server/GameObjects/Components/Weapon/Ranged/Barrels/PumpBarrelComponent.cs @@ -39,7 +39,7 @@ namespace Content.Server.GameObjects.Components.Weapon.Ranged.Barrels } private const int DefaultCapacity = 6; - [field: DataField("capacity")] + [DataField("capacity")] public override int Capacity { get; } = DefaultCapacity; // Even a point having a chamber? I guess it makes some of the below code cleaner diff --git a/Content.Server/GameObjects/Components/Weapon/Ranged/Barrels/ServerRangedBarrelComponent.cs b/Content.Server/GameObjects/Components/Weapon/Ranged/Barrels/ServerRangedBarrelComponent.cs index a5fbc8b7ee..dc0feeabf2 100644 --- a/Content.Server/GameObjects/Components/Weapon/Ranged/Barrels/ServerRangedBarrelComponent.cs +++ b/Content.Server/GameObjects/Components/Weapon/Ranged/Barrels/ServerRangedBarrelComponent.cs @@ -10,7 +10,6 @@ using Content.Shared.GameObjects.Components.Damage; using Content.Shared.GameObjects.Components.Weapons.Ranged; using Content.Shared.GameObjects.EntitySystems; using Content.Shared.Interfaces.GameObjects.Components; -using Robust.Shared.Asynchronous; using Robust.Shared.Audio; using Robust.Shared.GameObjects; using Robust.Shared.IoC; @@ -51,7 +50,7 @@ namespace Content.Server.GameObjects.Components.Weapon.Ranged.Barrels [DataField("allSelectors")] private FireRateSelector _allRateSelectors; - [field: DataField("fireRate")] + [DataField("fireRate")] public override float FireRate { get; } = 2f; // _lastFire is when we actually fired (so if we hold the button then recoil doesn't build up if we're not firing) @@ -93,14 +92,14 @@ namespace Content.Server.GameObjects.Components.Weapon.Ranged.Barrels [DataField("ammoSpreadRatio")] public float SpreadRatio { get; private set; } - [field: DataField("canMuzzleFlash")] + [DataField("canMuzzleFlash")] public bool CanMuzzleFlash { get; } = true; // Sounds - [field: DataField("soundGunshot")] + [DataField("soundGunshot")] public string? SoundGunshot { get; set; } - [field: DataField("soundEmpty")] + [DataField("soundEmpty")] public string SoundEmpty { get; } = "/Audio/Weapons/Guns/Empty/empty.ogg"; void ISerializationHooks.BeforeSerialization() diff --git a/Content.Server/Holiday/HolidayPrototype.cs b/Content.Server/Holiday/HolidayPrototype.cs index 4675943eab..a2462efdfe 100644 --- a/Content.Server/Holiday/HolidayPrototype.cs +++ b/Content.Server/Holiday/HolidayPrototype.cs @@ -16,7 +16,7 @@ namespace Content.Server.Holiday [ViewVariables] [DataField("name")] public string Name { get; private set; } = string.Empty; [ViewVariables] - [field: DataField("id", required: true)] + [DataField("id", required: true)] public string ID { get; } = default!; [ViewVariables] diff --git a/Content.Server/Objectives/ObjectivePrototype.cs b/Content.Server/Objectives/ObjectivePrototype.cs index 2a623da25f..7637b37d26 100644 --- a/Content.Server/Objectives/ObjectivePrototype.cs +++ b/Content.Server/Objectives/ObjectivePrototype.cs @@ -13,7 +13,7 @@ namespace Content.Server.Objectives public class ObjectivePrototype : IPrototype { [ViewVariables] - [field: DataField("id", required: true)] + [DataField("id", required: true)] public string ID { get; } = default!; [ViewVariables] [DataField("issuer")] public string Issuer { get; private set; } = "Unknown"; diff --git a/Content.Shared/Access/AccessLevelPrototype.cs b/Content.Shared/Access/AccessLevelPrototype.cs index f422c52ea2..a245f798d7 100644 --- a/Content.Shared/Access/AccessLevelPrototype.cs +++ b/Content.Shared/Access/AccessLevelPrototype.cs @@ -13,7 +13,7 @@ namespace Content.Shared.Access public class AccessLevelPrototype : IPrototype { [ViewVariables] - [field: DataField("id", required: true)] + [DataField("id", required: true)] public string ID { get; } = default!; /// diff --git a/Content.Shared/Actions/BaseActionPrototype.cs b/Content.Shared/Actions/BaseActionPrototype.cs index ba7fbc77aa..74648cb233 100644 --- a/Content.Shared/Actions/BaseActionPrototype.cs +++ b/Content.Shared/Actions/BaseActionPrototype.cs @@ -22,7 +22,7 @@ namespace Content.Shared.Actions /// Icon representing this action in the UI. /// [ViewVariables] - [field: DataField("icon")] + [DataField("icon")] public SpriteSpecifier Icon { get; } = SpriteSpecifier.Invalid; /// @@ -30,7 +30,7 @@ namespace Content.Shared.Actions /// the action will simply be highlighted when turned on. /// [ViewVariables] - [field: DataField("iconOn")] + [DataField("iconOn")] public SpriteSpecifier IconOn { get; } = SpriteSpecifier.Invalid; /// @@ -42,14 +42,14 @@ namespace Content.Shared.Actions /// /// Description to show in UI. Accepts formatting. /// - [field: DataField("description")] + [DataField("description")] public FormattedMessage Description { get; } = new(); /// /// Requirements message to show in UI. Accepts formatting, but generally should be avoided /// so the requirements message isn't too prominent in the tooltip. /// - [field: DataField("requires")] + [DataField("requires")] public string Requires { get; } = string.Empty; /// @@ -63,21 +63,21 @@ namespace Content.Shared.Actions /// selected after it is used, so it can be continuously re-used. If this is false, /// the action will be deselected after one use. /// - [field: DataField("repeat")] + [DataField("repeat")] public bool Repeat { get; } /// /// For TargetEntity/TargetPoint actions, should the action be de-selected if currently selected (choosing a target) /// when it goes on cooldown. Defaults to false. /// - [field: DataField("deselectOnCooldown")] + [DataField("deselectOnCooldown")] public bool DeselectOnCooldown { get; } /// /// For TargetEntity actions, should the action be de-selected if the user doesn't click an entity when /// selecting a target. Defaults to false. /// - [field: DataField("deselectWhenEntityNotClicked")] + [DataField("deselectWhenEntityNotClicked")] public bool DeselectWhenEntityNotClicked { get; } [DataField("filters")] private List _filters = new(); diff --git a/Content.Shared/Alert/AlertOrderPrototype.cs b/Content.Shared/Alert/AlertOrderPrototype.cs index c676d193f8..7be8f3cf2a 100644 --- a/Content.Shared/Alert/AlertOrderPrototype.cs +++ b/Content.Shared/Alert/AlertOrderPrototype.cs @@ -16,7 +16,7 @@ namespace Content.Shared.Alert public class AlertOrderPrototype : IPrototype, IComparer, ISerializationHooks { [ViewVariables] - [field: DataField("id", required: true)] + [DataField("id", required: true)] public string ID { get; } = default!; [DataField("order")] private readonly List<(string type, string alert)> _order = new(); diff --git a/Content.Shared/Atmos/GasPrototype.cs b/Content.Shared/Atmos/GasPrototype.cs index c4c6e5b692..43f5ddcb41 100644 --- a/Content.Shared/Atmos/GasPrototype.cs +++ b/Content.Shared/Atmos/GasPrototype.cs @@ -8,13 +8,13 @@ namespace Content.Shared.Atmos [Prototype("gas")] public class GasPrototype : IPrototype { - [field: DataField("name")] public string Name { get; } = string.Empty; + [DataField("name")] public string Name { get; } = string.Empty; // TODO: Control gas amount necessary for overlay to appear // TODO: Add interfaces for gas behaviours e.g. breathing, burning [ViewVariables] - [field: DataField("id", required: true)] + [DataField("id", required: true)] public string ID { get; } = default!; /// @@ -39,7 +39,7 @@ namespace Content.Shared.Atmos /// /// Minimum amount of moles for this gas to be visible. /// - [field: DataField("gasMolesVisible")] + [DataField("gasMolesVisible")] public float GasMolesVisible { get; } = 0.25f; /// @@ -50,7 +50,7 @@ namespace Content.Shared.Atmos /// /// If this reagent is in gas form, this is the path to the overlay that will be used to make the gas visible. /// - [field: DataField("gasOverlayTexture")] + [DataField("gasOverlayTexture")] public string GasOverlayTexture { get; } = string.Empty; /// @@ -68,9 +68,9 @@ namespace Content.Shared.Atmos /// /// Path to the tile overlay used when this gas appears visible. /// - [field: DataField("overlayPath")] + [DataField("overlayPath")] public string OverlayPath { get; } = string.Empty; - [field: DataField("color")] public string Color { get; } = string.Empty; + [DataField("color")] public string Color { get; } = string.Empty; } } diff --git a/Content.Shared/Audio/SoundCollectionPrototype.cs b/Content.Shared/Audio/SoundCollectionPrototype.cs index 4b291ba27f..b9e966501d 100644 --- a/Content.Shared/Audio/SoundCollectionPrototype.cs +++ b/Content.Shared/Audio/SoundCollectionPrototype.cs @@ -10,9 +10,9 @@ namespace Content.Shared.Audio public sealed class SoundCollectionPrototype : IPrototype { [ViewVariables] - [field: DataField("id", required: true)] + [DataField("id", required: true)] public string ID { get; } = default!; - [field: DataField("files")] public List PickFiles { get; } = new(); + [DataField("files")] public List PickFiles { get; } = new(); } } diff --git a/Content.Shared/Chemistry/ReactionPrototype.cs b/Content.Shared/Chemistry/ReactionPrototype.cs index e5a1239374..7cd517f612 100644 --- a/Content.Shared/Chemistry/ReactionPrototype.cs +++ b/Content.Shared/Chemistry/ReactionPrototype.cs @@ -1,8 +1,6 @@ #nullable enable using System.Collections.Generic; -using Content.Shared.Interfaces; using Content.Shared.Interfaces.Chemistry; -using Robust.Shared.IoC; using Robust.Shared.Prototypes; using Robust.Shared.Serialization.Manager.Attributes; using Robust.Shared.ViewVariables; @@ -20,10 +18,10 @@ namespace Content.Shared.Chemistry [DataField("effects", serverOnly: true)] private List _effects = new(); [ViewVariables] - [field: DataField("id", required: true)] + [DataField("id", required: true)] public string ID { get; } = default!; - [field: DataField("name")] + [DataField("name")] public string Name { get; } = string.Empty; /// diff --git a/Content.Shared/Chemistry/ReagentEntityReaction.cs b/Content.Shared/Chemistry/ReagentEntityReaction.cs index 63fda54351..62489953cb 100644 --- a/Content.Shared/Chemistry/ReagentEntityReaction.cs +++ b/Content.Shared/Chemistry/ReagentEntityReaction.cs @@ -1,5 +1,4 @@ using System; -using Content.Shared.Interfaces.GameObjects.Components; using Robust.Shared.GameObjects; using Robust.Shared.Serialization.Manager.Attributes; using Robust.Shared.ViewVariables; @@ -17,15 +16,15 @@ namespace Content.Shared.Chemistry public abstract class ReagentEntityReaction { [ViewVariables] - [field: DataField("touch")] + [DataField("touch")] public bool Touch { get; } = false; [ViewVariables] - [field: DataField("injection")] + [DataField("injection")] public bool Injection { get; } = false; [ViewVariables] - [field: DataField("ingestion")] + [DataField("ingestion")] public bool Ingestion { get; } = false; public void React(ReactionMethod method, IEntity entity, ReagentPrototype reagent, ReagentUnit volume, Solution? source) diff --git a/Content.Shared/Chemistry/ReagentPrototype.cs b/Content.Shared/Chemistry/ReagentPrototype.cs index afc78d9e1c..5d5dae984d 100644 --- a/Content.Shared/Chemistry/ReagentPrototype.cs +++ b/Content.Shared/Chemistry/ReagentPrototype.cs @@ -2,7 +2,6 @@ using System; using System.Collections.Generic; using Content.Shared.Interfaces.Chemistry; -using Content.Shared.Interfaces.GameObjects.Components; using Robust.Shared.GameObjects; using Robust.Shared.Map; using Robust.Shared.Maths; @@ -29,34 +28,34 @@ namespace Content.Shared.Chemistry private readonly float _customPlantMetabolism = 1f; [ViewVariables] - [field: DataField("id", required: true)] + [DataField("id", required: true)] public string ID { get; } = default!; - [field: DataField("name")] + [DataField("name")] public string Name { get; } = string.Empty; - [field: DataField("desc")] + [DataField("desc")] public string Description { get; } = string.Empty; - [field: DataField("physicalDesc")] + [DataField("physicalDesc")] public string PhysicalDescription { get; } = string.Empty; - [field: DataField("color")] + [DataField("color")] public Color SubstanceColor { get; } = Color.White; - [field: DataField("toxin")] + [DataField("toxin")] public bool Toxin { get; } - [field: DataField("boozePower")] + [DataField("boozePower")] public int BoozePower { get; } - [field: DataField("boilingPoint")] + [DataField("boilingPoint")] public float? BoilingPoint { get; } - [field: DataField("meltingPoint")] + [DataField("meltingPoint")] public float? MeltingPoint { get; } - [field: DataField("spritePath")] + [DataField("spritePath")] public string SpriteReplacementPath { get; } = string.Empty; //List of metabolism effects this reagent has, should really only be used server-side. diff --git a/Content.Shared/Construction/ComponentConstructionGraphStep.cs b/Content.Shared/Construction/ComponentConstructionGraphStep.cs index 1b1c62ff2e..647a008ec2 100644 --- a/Content.Shared/Construction/ComponentConstructionGraphStep.cs +++ b/Content.Shared/Construction/ComponentConstructionGraphStep.cs @@ -9,7 +9,7 @@ namespace Content.Shared.Construction [DataDefinition] public class ComponentConstructionGraphStep : ArbitraryInsertConstructionGraphStep { - [field: DataField("component")] public string Component { get; } = string.Empty; + [DataField("component")] public string Component { get; } = string.Empty; public override bool EntityValid(IEntity entity) { diff --git a/Content.Shared/Construction/ConstructionGraphPrototype.cs b/Content.Shared/Construction/ConstructionGraphPrototype.cs index aa60b3bb29..403c765206 100644 --- a/Content.Shared/Construction/ConstructionGraphPrototype.cs +++ b/Content.Shared/Construction/ConstructionGraphPrototype.cs @@ -17,11 +17,11 @@ namespace Content.Shared.Construction private readonly Dictionary> _pathfinding = new(); [ViewVariables] - [field: DataField("id", required: true)] + [DataField("id", required: true)] public string ID { get; } = default!; [ViewVariables] - [field: DataField("start")] + [DataField("start")] public string? Start { get; } [DataField("graph", priority: 0)] diff --git a/Content.Shared/Construction/ConstructionPrototype.cs b/Content.Shared/Construction/ConstructionPrototype.cs index 64eea30dec..ca7bf09053 100644 --- a/Content.Shared/Construction/ConstructionPrototype.cs +++ b/Content.Shared/Construction/ConstructionPrototype.cs @@ -15,37 +15,37 @@ namespace Content.Shared.Construction /// /// Friendly name displayed in the construction GUI. /// - [field: DataField("name")] + [DataField("name")] public string Name { get; } = string.Empty; /// /// "Useful" description displayed in the construction GUI. /// - [field: DataField("description")] + [DataField("description")] public string Description { get; } = string.Empty; /// /// The this construction will be using. /// - [field: DataField("graph")] + [DataField("graph")] public string Graph { get; } = string.Empty; /// /// The target this construction will guide the user to. /// - [field: DataField("targetNode")] + [DataField("targetNode")] public string TargetNode { get; } = string.Empty; /// /// The starting this construction will start at. /// - [field: DataField("startNode")] + [DataField("startNode")] public string StartNode { get; } = string.Empty; /// /// Texture path inside the construction GUI. /// - [field: DataField("icon")] + [DataField("icon")] public SpriteSpecifier Icon { get; } = SpriteSpecifier.Invalid; /// @@ -59,16 +59,16 @@ namespace Content.Shared.Construction [DataField("objectType")] public ConstructionType Type { get; private set; } = ConstructionType.Structure; [ViewVariables] - [field: DataField("id", required: true)] + [DataField("id", required: true)] public string ID { get; } = default!; - [field: DataField("placementMode")] + [DataField("placementMode")] public string PlacementMode { get; } = "PlaceFree"; /// /// Whether this construction can be constructed rotated or not. /// - [field: DataField("canRotate")] + [DataField("canRotate")] public bool CanRotate { get; } = true; public IReadOnlyList Conditions => _conditions; diff --git a/Content.Shared/Construction/EntityInsertConstructionGraphStep.cs b/Content.Shared/Construction/EntityInsertConstructionGraphStep.cs index 9d5fabb6d1..6ba7cde5af 100644 --- a/Content.Shared/Construction/EntityInsertConstructionGraphStep.cs +++ b/Content.Shared/Construction/EntityInsertConstructionGraphStep.cs @@ -7,7 +7,7 @@ namespace Content.Shared.Construction [ImplicitDataDefinitionForInheritors] public abstract class EntityInsertConstructionGraphStep : ConstructionGraphStep { - [field: DataField("store")] public string Store { get; } = string.Empty; + [DataField("store")] public string Store { get; } = string.Empty; public abstract bool EntityValid(IEntity entity); } diff --git a/Content.Shared/Construction/MaterialConstructionGraphStep.cs b/Content.Shared/Construction/MaterialConstructionGraphStep.cs index 56070e2a3e..23d43b6f43 100644 --- a/Content.Shared/Construction/MaterialConstructionGraphStep.cs +++ b/Content.Shared/Construction/MaterialConstructionGraphStep.cs @@ -16,9 +16,9 @@ namespace Content.Shared.Construction { // TODO: Make this use the material system. // TODO TODO: Make the material system not shit. - [field: DataField("material")] public string MaterialPrototypeId { get; } = "Steel"; + [DataField("material")] public string MaterialPrototypeId { get; } = "Steel"; - [field: DataField("amount")] public int Amount { get; } = 1; + [DataField("amount")] public int Amount { get; } = 1; public StackPrototype MaterialPrototype => IoCManager.Resolve().Index(MaterialPrototypeId); diff --git a/Content.Shared/Construction/PrototypeConstructionGraphStep.cs b/Content.Shared/Construction/PrototypeConstructionGraphStep.cs index 6ea918a79d..be89428fb7 100644 --- a/Content.Shared/Construction/PrototypeConstructionGraphStep.cs +++ b/Content.Shared/Construction/PrototypeConstructionGraphStep.cs @@ -9,7 +9,7 @@ namespace Content.Shared.Construction [DataDefinition] public class PrototypeConstructionGraphStep : ArbitraryInsertConstructionGraphStep { - [field: DataField("prototype")] public string Prototype { get; } = string.Empty; + [DataField("prototype")] public string Prototype { get; } = string.Empty; public override bool EntityValid(IEntity entity) { diff --git a/Content.Shared/Construction/ToolConstructionGraphStep.cs b/Content.Shared/Construction/ToolConstructionGraphStep.cs index e9b4e993b1..de6745b878 100644 --- a/Content.Shared/Construction/ToolConstructionGraphStep.cs +++ b/Content.Shared/Construction/ToolConstructionGraphStep.cs @@ -9,11 +9,11 @@ namespace Content.Shared.Construction [DataDefinition] public class ToolConstructionGraphStep : ConstructionGraphStep { - [field: DataField("tool")] public ToolQuality Tool { get; } = ToolQuality.None; + [DataField("tool")] public ToolQuality Tool { get; } = ToolQuality.None; - [field: DataField("fuel")] public float Fuel { get; } = 10; + [DataField("fuel")] public float Fuel { get; } = 10; - [field: DataField("examine")] public string ExamineOverride { get; } = string.Empty; + [DataField("examine")] public string ExamineOverride { get; } = string.Empty; public override void DoExamine(FormattedMessage message, bool inDetailsRange) { diff --git a/Content.Shared/Damage/DamageContainer/DamageContainerPrototype.cs b/Content.Shared/Damage/DamageContainer/DamageContainerPrototype.cs index de618f7752..b3d4601b24 100644 --- a/Content.Shared/Damage/DamageContainer/DamageContainerPrototype.cs +++ b/Content.Shared/Damage/DamageContainer/DamageContainerPrototype.cs @@ -25,7 +25,7 @@ namespace Content.Shared.Damage.DamageContainer [ViewVariables] public IReadOnlyCollection SupportedTypes => _supportedTypes; [ViewVariables] - [field: DataField("id", required: true)] + [DataField("id", required: true)] public string ID { get; } = default!; void ISerializationHooks.AfterDeserialization() diff --git a/Content.Shared/Damage/ResistanceSet/ResistanceSetPrototype.cs b/Content.Shared/Damage/ResistanceSet/ResistanceSetPrototype.cs index 9354a690d1..e695017d8f 100644 --- a/Content.Shared/Damage/ResistanceSet/ResistanceSetPrototype.cs +++ b/Content.Shared/Damage/ResistanceSet/ResistanceSetPrototype.cs @@ -16,18 +16,18 @@ namespace Content.Shared.Damage.ResistanceSet public class ResistanceSetPrototype : IPrototype, ISerializationHooks { [ViewVariables] - [field: DataField("coefficients")] + [DataField("coefficients")] public Dictionary Coefficients { get; } = new(); [ViewVariables] - [field: DataField("flatReductions")] + [DataField("flatReductions")] public Dictionary FlatReductions { get; } = new(); [ViewVariables] public Dictionary Resistances { get; private set; } = new(); [ViewVariables] - [field: DataField("id", required: true)] + [DataField("id", required: true)] public string ID { get; } = default!; void ISerializationHooks.AfterDeserialization() diff --git a/Content.Shared/GameObjects/Components/Body/Preset/BodyPresetPrototype.cs b/Content.Shared/GameObjects/Components/Body/Preset/BodyPresetPrototype.cs index d2d929568b..9658ada2c1 100644 --- a/Content.Shared/GameObjects/Components/Body/Preset/BodyPresetPrototype.cs +++ b/Content.Shared/GameObjects/Components/Body/Preset/BodyPresetPrototype.cs @@ -17,14 +17,14 @@ namespace Content.Shared.GameObjects.Components.Body.Preset public class BodyPresetPrototype : IPrototype { [ViewVariables] - [field: DataField("id", required: true)] + [DataField("id", required: true)] public string ID { get; } = default!; - [field: DataField("partIDs")] + [DataField("partIDs")] private Dictionary _partIDs = new(); [ViewVariables] - [field: DataField("name")] + [DataField("name")] public string Name { get; } = string.Empty; [ViewVariables] diff --git a/Content.Shared/GameObjects/Components/Body/SharedBodyComponent.cs b/Content.Shared/GameObjects/Components/Body/SharedBodyComponent.cs index 05f0cceffb..6094061536 100644 --- a/Content.Shared/GameObjects/Components/Body/SharedBodyComponent.cs +++ b/Content.Shared/GameObjects/Components/Body/SharedBodyComponent.cs @@ -33,11 +33,11 @@ namespace Content.Shared.GameObjects.Components.Body public override uint? NetID => ContentNetIDs.BODY; [ViewVariables] - [field: DataField("template", required: true)] + [DataField("template", required: true)] private string? TemplateId { get; } = default; [ViewVariables] - [field: DataField("preset", required: true)] + [DataField("preset", required: true)] private string? PresetId { get; } = default; [ViewVariables] diff --git a/Content.Shared/GameObjects/Components/Body/Template/BodyTemplatePrototype.cs b/Content.Shared/GameObjects/Components/Body/Template/BodyTemplatePrototype.cs index b76d72c695..8a727f0b54 100644 --- a/Content.Shared/GameObjects/Components/Body/Template/BodyTemplatePrototype.cs +++ b/Content.Shared/GameObjects/Components/Body/Template/BodyTemplatePrototype.cs @@ -16,28 +16,28 @@ namespace Content.Shared.GameObjects.Components.Body.Template [Serializable, NetSerializable] public class BodyTemplatePrototype : IPrototype, ISerializationHooks { - [field: DataField("slots")] + [DataField("slots")] private Dictionary _slots = new(); - [field: DataField("connections")] + [DataField("connections")] private Dictionary> _rawConnections = new(); - [field: DataField("layers")] + [DataField("layers")] private Dictionary _layers = new(); - [field: DataField("mechanismLayers")] + [DataField("mechanismLayers")] private Dictionary _mechanismLayers = new(); [ViewVariables] - [field: DataField("id", required: true)] + [DataField("id", required: true)] public string ID { get; } = default!; [ViewVariables] - [field: DataField("name")] + [DataField("name")] public string Name { get; } = string.Empty; [ViewVariables] - [field: DataField("centerSlot")] + [DataField("centerSlot")] public string CenterSlot { get; } = string.Empty; [ViewVariables] diff --git a/Content.Shared/GameObjects/Components/Chemistry/ReactiveComponent.cs b/Content.Shared/GameObjects/Components/Chemistry/ReactiveComponent.cs index ad04b6491b..3c1a80c0f6 100644 --- a/Content.Shared/GameObjects/Components/Chemistry/ReactiveComponent.cs +++ b/Content.Shared/GameObjects/Components/Chemistry/ReactiveComponent.cs @@ -10,7 +10,7 @@ namespace Content.Shared.GameObjects.Components.Chemistry { public override string Name => "Reactive"; - [field: DataField("reactions", true, serverOnly:true)] + [DataField("reactions", true, serverOnly:true)] public ReagentEntityReaction[] Reactions { get; } = Array.Empty(); } } diff --git a/Content.Shared/GameObjects/Components/Chemistry/ReagentDispenser/ReagentDispenserInventoryPrototype.cs b/Content.Shared/GameObjects/Components/Chemistry/ReagentDispenser/ReagentDispenserInventoryPrototype.cs index ad94c74380..ee4f75c33d 100644 --- a/Content.Shared/GameObjects/Components/Chemistry/ReagentDispenser/ReagentDispenserInventoryPrototype.cs +++ b/Content.Shared/GameObjects/Components/Chemistry/ReagentDispenser/ReagentDispenserInventoryPrototype.cs @@ -21,7 +21,7 @@ namespace Content.Shared.GameObjects.Components.Chemistry.ReagentDispenser private List _inventory = new(); [ViewVariables] - [field: DataField("id", required: true)] + [DataField("id", required: true)] public string ID { get; } = default!; public List Inventory => _inventory; diff --git a/Content.Shared/GameObjects/Components/SharedCrayonComponent.cs b/Content.Shared/GameObjects/Components/SharedCrayonComponent.cs index 03fa960ab6..2a21e55eb3 100644 --- a/Content.Shared/GameObjects/Components/SharedCrayonComponent.cs +++ b/Content.Shared/GameObjects/Components/SharedCrayonComponent.cs @@ -78,11 +78,11 @@ namespace Content.Shared.GameObjects.Components public class CrayonDecalPrototype : IPrototype { [ViewVariables] - [field: DataField("id", required: true)] + [DataField("id", required: true)] public string ID { get; } = default!; - [field: DataField("spritePath")] public string SpritePath { get; } = string.Empty; + [DataField("spritePath")] public string SpritePath { get; } = string.Empty; - [field: DataField("decals")] public List Decals { get; } = new(); + [DataField("decals")] public List Decals { get; } = new(); } } diff --git a/Content.Shared/GameObjects/Components/SharedStackComponent.cs b/Content.Shared/GameObjects/Components/SharedStackComponent.cs index d0282bda95..66dc585a88 100644 --- a/Content.Shared/GameObjects/Components/SharedStackComponent.cs +++ b/Content.Shared/GameObjects/Components/SharedStackComponent.cs @@ -56,7 +56,7 @@ namespace Content.Shared.GameObjects.Components [ViewVariables] public int AvailableSpace => MaxCount - Count; [ViewVariables] - [field: DataField("stackType")] + [DataField("stackType")] public string StackTypeId { get; } = string.Empty; public StackPrototype StackType => _prototypeManager.Index(StackTypeId); diff --git a/Content.Shared/GameObjects/Components/Weapons/Melee/MeleeWeaponAnimationPrototype.cs b/Content.Shared/GameObjects/Components/Weapons/Melee/MeleeWeaponAnimationPrototype.cs index 24a77b8f4b..188233db5d 100644 --- a/Content.Shared/GameObjects/Components/Weapons/Melee/MeleeWeaponAnimationPrototype.cs +++ b/Content.Shared/GameObjects/Components/Weapons/Melee/MeleeWeaponAnimationPrototype.cs @@ -11,39 +11,39 @@ namespace Content.Shared.GameObjects.Components.Weapons.Melee public sealed class MeleeWeaponAnimationPrototype : IPrototype { [ViewVariables] - [field: DataField("id", required: true)] + [DataField("id", required: true)] public string ID { get; } = default!; [ViewVariables] - [field: DataField("state")] + [DataField("state")] public string State { get; } = string.Empty; [ViewVariables] - [field: DataField("prototype")] + [DataField("prototype")] public string Prototype { get; } = "WeaponArc"; [ViewVariables] - [field: DataField("length")] + [DataField("length")] public TimeSpan Length { get; } = TimeSpan.FromSeconds(0.5f); [ViewVariables] - [field: DataField("speed")] + [DataField("speed")] public float Speed { get; } = 1; [ViewVariables] - [field: DataField("color")] + [DataField("color")] public Vector4 Color { get; } = new(1,1,1,1); [ViewVariables] - [field: DataField("colorDelta")] + [DataField("colorDelta")] public Vector4 ColorDelta { get; } = Vector4.Zero; [ViewVariables] - [field: DataField("arcType")] + [DataField("arcType")] public WeaponArcType ArcType { get; } = WeaponArcType.Slash; [ViewVariables] - [field: DataField("width")] + [DataField("width")] public float Width { get; } = 90; } diff --git a/Content.Shared/Maps/ContentTileDefinition.cs b/Content.Shared/Maps/ContentTileDefinition.cs index d006272265..641f92b03f 100644 --- a/Content.Shared/Maps/ContentTileDefinition.cs +++ b/Content.Shared/Maps/ContentTileDefinition.cs @@ -15,27 +15,27 @@ namespace Content.Shared.Maps [ViewVariables] string IPrototype.ID => Name; - [field: DataField("name", required: true)] public string Name { get; } = string.Empty; + [DataField("name", required: true)] public string Name { get; } = string.Empty; public ushort TileId { get; private set; } - [field: DataField("display_name")] public string DisplayName { get; } = string.Empty; + [DataField("display_name")] public string DisplayName { get; } = string.Empty; - [field: DataField("texture")] public string SpriteName { get; } = string.Empty; + [DataField("texture")] public string SpriteName { get; } = string.Empty; [DataField("is_subfloor")] public bool IsSubFloor { get; private set; } - [field: DataField("base_turfs")] public List BaseTurfs { get; } = new(); + [DataField("base_turfs")] public List BaseTurfs { get; } = new(); [DataField("can_crowbar")] public bool CanCrowbar { get; private set; } - [field: DataField("footstep_sounds")] public string FootstepSounds { get; } = string.Empty; + [DataField("footstep_sounds")] public string FootstepSounds { get; } = string.Empty; [DataField("friction")] public float Friction { get; set; } [DataField("thermalConductivity")] public float ThermalConductivity { get; set; } = 0.05f; - [field: DataField("item_drop")] public string ItemDropPrototypeName { get; } = "FloorTileItemSteel"; + [DataField("item_drop")] public string ItemDropPrototypeName { get; } = "FloorTileItemSteel"; [DataField("is_space")] public bool IsSpace { get; private set; } diff --git a/Content.Shared/Materials/Material.cs b/Content.Shared/Materials/Material.cs index dfdc401cae..a6f9a52091 100644 --- a/Content.Shared/Materials/Material.cs +++ b/Content.Shared/Materials/Material.cs @@ -16,7 +16,7 @@ namespace Content.Shared.Materials public class MaterialPrototype : IPrototype, IInheritingPrototype { [ViewVariables] - [field: DataField("id", required: true)] + [DataField("id", required: true)] public string ID { get; } = default!; [DataField("name")] public string Name { get; private set; } = "unobtanium"; @@ -82,10 +82,10 @@ namespace Content.Shared.Materials [DataField("icon")] public SpriteSpecifier Icon { get; private set; } = SpriteSpecifier.Invalid; - [field: DataField("parent")] + [DataField("parent")] public string? Parent { get; } - [field: DataField("abstract")] + [DataField("abstract")] public bool Abstract { get; } } } diff --git a/Content.Shared/Preferences/Appearance/SpriteAccessoryPrototype.cs b/Content.Shared/Preferences/Appearance/SpriteAccessoryPrototype.cs index 423a2f9306..17d8ff2b12 100644 --- a/Content.Shared/Preferences/Appearance/SpriteAccessoryPrototype.cs +++ b/Content.Shared/Preferences/Appearance/SpriteAccessoryPrototype.cs @@ -12,18 +12,18 @@ namespace Content.Shared.Preferences.Appearance [Prototype("spriteAccessory")] public sealed class SpriteAccessoryPrototype : IPrototype, ISerializationHooks { - [field: DataField("id", required: true)] + [DataField("id", required: true)] public string ID { get; } = default!; - [field: DataField("categories", required: true)] + [DataField("categories", required: true)] public SpriteAccessoryCategories Categories { get; } = default!; public string Name { get; private set; } = default!; - [field: DataField("sprite", required: true)] + [DataField("sprite", required: true)] public SpriteSpecifier Sprite { get; } = default!; - [field: DataField("priority")] public int Priority { get; } = 0; + [DataField("priority")] public int Priority { get; } = 0; void ISerializationHooks.AfterDeserialization() { diff --git a/Content.Shared/Prototypes/Cargo/CargoProductPrototype.cs b/Content.Shared/Prototypes/Cargo/CargoProductPrototype.cs index 711b0e85f9..3d61201d80 100644 --- a/Content.Shared/Prototypes/Cargo/CargoProductPrototype.cs +++ b/Content.Shared/Prototypes/Cargo/CargoProductPrototype.cs @@ -17,7 +17,7 @@ namespace Content.Shared.Prototypes.Cargo [DataField("description")] private string _description = string.Empty; [ViewVariables] - [field: DataField("id", required: true)] + [DataField("id", required: true)] public string ID { get; } = default!; /// @@ -64,35 +64,35 @@ namespace Content.Shared.Prototypes.Cargo /// Texture path used in the CargoConsole GUI. /// [ViewVariables] - [field: DataField("icon")] + [DataField("icon")] public SpriteSpecifier Icon { get; } = SpriteSpecifier.Invalid; /// /// The prototype name of the product. /// [ViewVariables] - [field: DataField("product")] + [DataField("product")] public string Product { get; } = string.Empty; /// /// The point cost of the product. /// [ViewVariables] - [field: DataField("cost")] + [DataField("cost")] public int PointCost { get; } /// /// The prototype category of the product. (e.g. Engineering, Medical) /// [ViewVariables] - [field: DataField("category")] + [DataField("category")] public string Category { get; } = string.Empty; /// /// The prototype group of the product. (e.g. Contraband) /// [ViewVariables] - [field: DataField("group")] + [DataField("group")] public string Group { get; } = string.Empty; } } diff --git a/Content.Shared/Prototypes/DatasetPrototype.cs b/Content.Shared/Prototypes/DatasetPrototype.cs index ae3b1655df..3d6127caea 100644 --- a/Content.Shared/Prototypes/DatasetPrototype.cs +++ b/Content.Shared/Prototypes/DatasetPrototype.cs @@ -10,9 +10,9 @@ namespace Content.Shared.Prototypes public class DatasetPrototype : IPrototype { [ViewVariables] - [field: DataField("id", required: true)] + [DataField("id", required: true)] public string ID { get; } = default!; - [field: DataField("values")] public IReadOnlyList Values { get; } = new List(); + [DataField("values")] public IReadOnlyList Values { get; } = new List(); } } diff --git a/Content.Shared/Prototypes/EntityList/EntityListPrototype.cs b/Content.Shared/Prototypes/EntityList/EntityListPrototype.cs index 26b8b4d581..bad73b0036 100644 --- a/Content.Shared/Prototypes/EntityList/EntityListPrototype.cs +++ b/Content.Shared/Prototypes/EntityList/EntityListPrototype.cs @@ -12,11 +12,11 @@ namespace Content.Shared.Prototypes.EntityList public class EntityListPrototype : IPrototype { [ViewVariables] - [field: DataField("id", required: true)] + [DataField("id", required: true)] public string ID { get; } = default!; [ViewVariables] - [field: DataField("entities", customTypeSerializer: typeof(PrototypeIdListSerializer))] + [DataField("entities", customTypeSerializer: typeof(PrototypeIdListSerializer))] public ImmutableList EntityIds { get; } = ImmutableList.Empty; public IEnumerable Entities(IPrototypeManager? prototypeManager = null) diff --git a/Content.Shared/Prototypes/HUD/HudThemePrototype.cs b/Content.Shared/Prototypes/HUD/HudThemePrototype.cs index 4d55d4bd58..6b87ed1b37 100644 --- a/Content.Shared/Prototypes/HUD/HudThemePrototype.cs +++ b/Content.Shared/Prototypes/HUD/HudThemePrototype.cs @@ -6,13 +6,13 @@ namespace Content.Shared.Prototypes.HUD [Prototype("hudTheme")] public class HudThemePrototype : IPrototype { - [field: DataField("name", required: true)] + [DataField("name", required: true)] public string Name { get; } = string.Empty; - [field: DataField("id", required: true)] + [DataField("id", required: true)] public string ID { get; } = string.Empty; - [field: DataField("path", required: true)] + [DataField("path", required: true)] public string Path { get; } = string.Empty; } } diff --git a/Content.Shared/Prototypes/Kitchen/MicrowaveMealRecipePrototype.cs b/Content.Shared/Prototypes/Kitchen/MicrowaveMealRecipePrototype.cs index 0f3733c9d7..e0ac5483e4 100644 --- a/Content.Shared/Prototypes/Kitchen/MicrowaveMealRecipePrototype.cs +++ b/Content.Shared/Prototypes/Kitchen/MicrowaveMealRecipePrototype.cs @@ -14,7 +14,7 @@ namespace Content.Shared.Prototypes.Kitchen public class FoodRecipePrototype : IPrototype { [ViewVariables] - [field: DataField("id", required: true)] + [DataField("id", required: true)] public string ID { get; } = default!; [DataField("name")] @@ -26,10 +26,10 @@ namespace Content.Shared.Prototypes.Kitchen [DataField("solids")] private readonly Dictionary _ingsSolids = new (); - [field: DataField("result")] + [DataField("result")] public string Result { get; } = string.Empty; - [field: DataField("time")] + [DataField("time")] public int CookTime { get; } = 5; public string Name => Loc.GetString(_name); diff --git a/Content.Shared/Prototypes/PDA/UplinkStoreListingPrototype.cs b/Content.Shared/Prototypes/PDA/UplinkStoreListingPrototype.cs index d93b2e7386..6f617cda4b 100644 --- a/Content.Shared/Prototypes/PDA/UplinkStoreListingPrototype.cs +++ b/Content.Shared/Prototypes/PDA/UplinkStoreListingPrototype.cs @@ -10,22 +10,22 @@ namespace Content.Shared.Prototypes.PDA public class UplinkStoreListingPrototype : IPrototype { [ViewVariables] - [field: DataField("id", required: true)] + [DataField("id", required: true)] public string ID { get; } = default!; - [field: DataField("itemId")] + [DataField("itemId")] public string ItemId { get; } = string.Empty; - [field: DataField("price")] + [DataField("price")] public int Price { get; } = 5; - [field: DataField("category")] + [DataField("category")] public UplinkCategory Category { get; } = UplinkCategory.Utility; - [field: DataField("description")] + [DataField("description")] public string Description { get; } = string.Empty; - [field: DataField("listingName")] + [DataField("listingName")] public string ListingName { get; } = string.Empty; } } diff --git a/Content.Shared/Prototypes/Tag/TagPrototype.cs b/Content.Shared/Prototypes/Tag/TagPrototype.cs index 81d5561916..c615048bdd 100644 --- a/Content.Shared/Prototypes/Tag/TagPrototype.cs +++ b/Content.Shared/Prototypes/Tag/TagPrototype.cs @@ -14,7 +14,7 @@ namespace Content.Shared.Prototypes.Tag public class TagPrototype : IPrototype { [ViewVariables] - [field: DataField("id", required: true)] + [DataField("id", required: true)] public string ID { get; } = default!; } } diff --git a/Content.Shared/Research/LatheRecipePrototype.cs b/Content.Shared/Research/LatheRecipePrototype.cs index 438023f07c..1320df41fb 100644 --- a/Content.Shared/Research/LatheRecipePrototype.cs +++ b/Content.Shared/Research/LatheRecipePrototype.cs @@ -14,7 +14,7 @@ namespace Content.Shared.Research public class LatheRecipePrototype : IPrototype { [ViewVariables] - [field: DataField("id", required: true)] + [DataField("id", required: true)] public string ID { get; } = default!; [DataField("name")] diff --git a/Content.Shared/Research/TechnologyPrototype.cs b/Content.Shared/Research/TechnologyPrototype.cs index c11cb5dfa2..cedb80347b 100644 --- a/Content.Shared/Research/TechnologyPrototype.cs +++ b/Content.Shared/Research/TechnologyPrototype.cs @@ -16,48 +16,48 @@ namespace Content.Shared.Research /// The ID of this technology prototype. /// [ViewVariables] - [field: DataField("id", required: true)] + [DataField("id", required: true)] public string ID { get; } = default!; /// /// The name this technology will have on user interfaces. /// [ViewVariables] - [field: DataField("name")] + [DataField("name")] public string Name { get; } = string.Empty; /// /// An icon that represent this technology. /// - [field: DataField("icon")] + [DataField("icon")] public SpriteSpecifier Icon { get; } = SpriteSpecifier.Invalid; /// /// A short description of the technology. /// [ViewVariables] - [field: DataField("description")] + [DataField("description")] public string Description { get; } = string.Empty; /// /// The required research points to unlock this technology. /// [ViewVariables] - [field: DataField("requiredPoints")] + [DataField("requiredPoints")] public int RequiredPoints { get; } /// /// A list of technology IDs required to unlock this technology. /// [ViewVariables] - [field: DataField("requiredTechnologies")] + [DataField("requiredTechnologies")] public List RequiredTechnologies { get; } = new(); /// /// A list of recipe IDs this technology unlocks. /// [ViewVariables] - [field: DataField("unlockedRecipes")] + [DataField("unlockedRecipes")] public List UnlockedRecipes { get; } = new(); } } diff --git a/Content.Shared/Roles/AntagPrototype.cs b/Content.Shared/Roles/AntagPrototype.cs index 64e29ab866..87ab88c6d8 100644 --- a/Content.Shared/Roles/AntagPrototype.cs +++ b/Content.Shared/Roles/AntagPrototype.cs @@ -1,5 +1,4 @@ #nullable enable -using Robust.Shared.Localization; using Robust.Shared.Prototypes; using Robust.Shared.Serialization.Manager.Attributes; using Robust.Shared.ViewVariables; @@ -13,13 +12,13 @@ namespace Content.Shared.Roles public class AntagPrototype : IPrototype { [ViewVariables] - [field: DataField("id", required: true)] + [DataField("id", required: true)] public string ID { get; } = default!; /// /// The name of this antag as displayed to players. /// - [field: DataField("name")] + [DataField("name")] public string Name { get; } = string.Empty; /// diff --git a/Content.Shared/Roles/JobPrototype.cs b/Content.Shared/Roles/JobPrototype.cs index 977436278b..3c9367cc27 100644 --- a/Content.Shared/Roles/JobPrototype.cs +++ b/Content.Shared/Roles/JobPrototype.cs @@ -16,13 +16,13 @@ namespace Content.Shared.Roles private string _name = string.Empty; [ViewVariables] - [field: DataField("id", required: true)] + [DataField("id", required: true)] public string ID { get; } = default!; /// /// The name of this job as displayed to players. /// - [field: DataField("name")] + [DataField("name")] public string Name { get; } = string.Empty; /// @@ -49,15 +49,15 @@ namespace Content.Shared.Roles [DataField("startingGear")] public string? StartingGear { get; private set; } - [field: DataField("icon")] public string Icon { get; } = string.Empty; + [DataField("icon")] public string Icon { get; } = string.Empty; [DataField("special")] public JobSpecial? Special { get; private set; } - [field: DataField("departments")] + [DataField("departments")] public IReadOnlyCollection Departments { get; } = Array.Empty(); - [field: DataField("access")] + [DataField("access")] public IReadOnlyCollection Access { get; } = Array.Empty(); } } diff --git a/Content.Shared/Roles/StartingGearPrototype.cs b/Content.Shared/Roles/StartingGearPrototype.cs index 9d4bdf7bd0..ce6edce0fc 100644 --- a/Content.Shared/Roles/StartingGearPrototype.cs +++ b/Content.Shared/Roles/StartingGearPrototype.cs @@ -33,7 +33,7 @@ namespace Content.Shared.Roles private Dictionary _inHand = new(0); [ViewVariables] - [field: DataField("id", required: true)] + [DataField("id", required: true)] public string ID { get; } = default!; public string GetGear(Slots slot, HumanoidCharacterProfile? profile) diff --git a/Content.Shared/Stacks/StackPrototype.cs b/Content.Shared/Stacks/StackPrototype.cs index ea596585d2..d1e7a7454b 100644 --- a/Content.Shared/Stacks/StackPrototype.cs +++ b/Content.Shared/Stacks/StackPrototype.cs @@ -10,19 +10,19 @@ namespace Content.Shared.Stacks public class StackPrototype : IPrototype { [ViewVariables] - [field: DataField("id", required: true)] + [DataField("id", required: true)] public string ID { get; } = default!; - [field: DataField("name")] + [DataField("name")] public string Name { get; } = string.Empty; - [field: DataField("icon")] + [DataField("icon")] public SpriteSpecifier? Icon { get; } /// /// The entity id that will be spawned by default from this stack. /// - [field: DataField("spawn")] + [DataField("spawn")] public string? Spawn { get; } } } diff --git a/Content.Shared/VendingMachines/VendingMachineInventoryPrototype.cs b/Content.Shared/VendingMachines/VendingMachineInventoryPrototype.cs index 8821822ab0..1e9aa05771 100644 --- a/Content.Shared/VendingMachines/VendingMachineInventoryPrototype.cs +++ b/Content.Shared/VendingMachines/VendingMachineInventoryPrototype.cs @@ -12,22 +12,22 @@ namespace Content.Shared.VendingMachines public class VendingMachineInventoryPrototype : IPrototype { [ViewVariables] - [field: DataField("id", required: true)] + [DataField("id", required: true)] public string ID { get; } = default!; - [field: DataField("name")] + [DataField("name")] public string Name { get; } = string.Empty; - [field: DataField("description")] + [DataField("description")] public string Description { get; } = string.Empty; - [field: DataField("animationDuration")] + [DataField("animationDuration")] public double AnimationDuration { get; } - [field: DataField("spriteName")] + [DataField("spriteName")] public string SpriteName { get; } = string.Empty; - [field: DataField("startingInventory")] + [DataField("startingInventory")] public Dictionary StartingInventory { get; } = new(); } }