From 71d4303393782d330c184b818c0a755f3f23e357 Mon Sep 17 00:00:00 2001 From: Vordenburg <114301317+Vordenburg@users.noreply.github.com> Date: Sat, 19 Aug 2023 14:00:41 -0400 Subject: [PATCH] Lint more stuff (#19307) --- .../GameTicking/Rules/Components/ZombieRuleComponent.cs | 4 +++- Content.Shared/Roles/StartingGearPrototype.cs | 5 +++-- Content.Shared/Spider/SpiderComponent.cs | 4 ++-- Content.Shared/Store/CurrencyPrototype.cs | 3 ++- Resources/Prototypes/Roles/Jobs/Fun/misc_startinggear.yml | 4 ++-- 5 files changed, 12 insertions(+), 8 deletions(-) diff --git a/Content.Server/GameTicking/Rules/Components/ZombieRuleComponent.cs b/Content.Server/GameTicking/Rules/Components/ZombieRuleComponent.cs index 84b440d69e..699c404b4c 100644 --- a/Content.Server/GameTicking/Rules/Components/ZombieRuleComponent.cs +++ b/Content.Server/GameTicking/Rules/Components/ZombieRuleComponent.cs @@ -1,4 +1,5 @@ -using Content.Shared.Roles; +using Content.Shared.Actions.ActionTypes; +using Content.Shared.Roles; using Robust.Shared.Audio; using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom; using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype; @@ -93,5 +94,6 @@ public sealed class ZombieRuleComponent : Component [DataField("shuttleCalled")] public bool ShuttleCalled; + [ValidatePrototypeId] public const string ZombifySelfActionPrototype = "TurnUndead"; } diff --git a/Content.Shared/Roles/StartingGearPrototype.cs b/Content.Shared/Roles/StartingGearPrototype.cs index c515dbc250..7dc75ece98 100644 --- a/Content.Shared/Roles/StartingGearPrototype.cs +++ b/Content.Shared/Roles/StartingGearPrototype.cs @@ -1,14 +1,15 @@ using Content.Shared.Preferences; using Robust.Shared.Prototypes; using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype; +using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.Dictionary; namespace Content.Shared.Roles { [Prototype("startingGear")] public sealed class StartingGearPrototype : IPrototype { - // TODO: Custom TypeSerializer for dictionary value prototype IDs - [DataField("equipment")] private Dictionary _equipment = new(); + [DataField("equipment", customTypeSerializer: typeof(PrototypeIdValueDictionarySerializer))] + private Dictionary _equipment = new(); /// /// if empty, there is no skirt override - instead the uniform provided in equipment is added. diff --git a/Content.Shared/Spider/SpiderComponent.cs b/Content.Shared/Spider/SpiderComponent.cs index a5b5731711..0a6229afdd 100644 --- a/Content.Shared/Spider/SpiderComponent.cs +++ b/Content.Shared/Spider/SpiderComponent.cs @@ -1,7 +1,7 @@ using Content.Shared.Actions; +using Content.Shared.Actions.ActionTypes; using Robust.Shared.GameStates; using Robust.Shared.Prototypes; -using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom; using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype; namespace Content.Shared.Spider; @@ -15,7 +15,7 @@ public sealed class SpiderComponent : Component public string WebPrototype = "SpiderWeb"; [ViewVariables(VVAccess.ReadWrite)] - [DataField("webActionName")] + [DataField("webActionName", customTypeSerializer: typeof(PrototypeIdSerializer))] public string WebActionName = "SpiderWebAction"; } diff --git a/Content.Shared/Store/CurrencyPrototype.cs b/Content.Shared/Store/CurrencyPrototype.cs index b01b2969e9..33de8dd9c2 100644 --- a/Content.Shared/Store/CurrencyPrototype.cs +++ b/Content.Shared/Store/CurrencyPrototype.cs @@ -1,6 +1,7 @@ using Content.Shared.FixedPoint; using Robust.Shared.Prototypes; using Robust.Shared.Serialization; +using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.Dictionary; namespace Content.Shared.Store; @@ -28,7 +29,7 @@ public sealed class CurrencyPrototype : IPrototype /// /// The physical entity of the currency /// - [DataField("cash")] //TODO: you get your customTypeSerializer when FixedPoint2 works in them! -emo + [DataField("cash", customTypeSerializer: typeof(PrototypeIdValueDictionarySerializer))] public Dictionary? Cash { get; } /// diff --git a/Resources/Prototypes/Roles/Jobs/Fun/misc_startinggear.yml b/Resources/Prototypes/Roles/Jobs/Fun/misc_startinggear.yml index 4861cee2d2..57b3ad2e9b 100644 --- a/Resources/Prototypes/Roles/Jobs/Fun/misc_startinggear.yml +++ b/Resources/Prototypes/Roles/Jobs/Fun/misc_startinggear.yml @@ -53,7 +53,7 @@ innerclothingskirt: ClothingUniformJumpskirtColorBlack satchel: ClothingBackpackDuffelSyndicateAmmo duffelbag: ClothingBackpackDuffelSyndicateAmmo - + # Syndicate Operative Outfit - Monkey - type: startingGear id: SyndicateOperativeGearMonkey @@ -281,7 +281,7 @@ equipment: jumpsuit: ClothingUniformJumpsuitBrigmedic outerClothing: ClothingOuterCoatAMG - back: ClothingBackpackBrigmedicFilled + back: ClothingBackpackBrigmedic shoes: ClothingShoesColorRed gloves: ClothingHandsGlovesNitrile eyes: ClothingEyesHudMedical