From 7b42b14ec9ab6ff8642bd2ce4a4d0a2fc29a312f Mon Sep 17 00:00:00 2001 From: Whatstone Date: Sun, 22 Dec 2024 19:51:31 -0500 Subject: [PATCH] TradeCrateDestination: use string, validate proto --- Content.Server/_NF/Trade/TradeCrateDestinationComponent.cs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Content.Server/_NF/Trade/TradeCrateDestinationComponent.cs b/Content.Server/_NF/Trade/TradeCrateDestinationComponent.cs index d276e28c421..f6909b2b80b 100644 --- a/Content.Server/_NF/Trade/TradeCrateDestinationComponent.cs +++ b/Content.Server/_NF/Trade/TradeCrateDestinationComponent.cs @@ -1,6 +1,5 @@ using Content.Shared._NF.Trade; -using Robust.Shared.GameStates; -using Robust.Shared.Prototypes; +using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype; namespace Content.Server._NF.Trade; @@ -10,6 +9,6 @@ namespace Content.Server._NF.Trade; [RegisterComponent] public sealed partial class TradeCrateDestinationComponent : Component { - [DataField] - public ProtoId DestinationProto; + [DataField(customTypeSerializer: typeof(PrototypeIdSerializer))] + public string DestinationProto; }