From b35e4d7e7cd1076ac74e782506764f5942374fac Mon Sep 17 00:00:00 2001 From: Vera Aguilera Puerto Date: Sat, 8 May 2021 03:47:53 +0200 Subject: [PATCH] MaterialDataEntry's Value is now validated by the YAML linter. --- .../GameObjects/Components/Materials/MaterialComponent.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Content.Shared/GameObjects/Components/Materials/MaterialComponent.cs b/Content.Shared/GameObjects/Components/Materials/MaterialComponent.cs index c3a9fd5cba..7af11b96d0 100644 --- a/Content.Shared/GameObjects/Components/Materials/MaterialComponent.cs +++ b/Content.Shared/GameObjects/Components/Materials/MaterialComponent.cs @@ -6,6 +6,7 @@ using Robust.Shared.Prototypes; using Robust.Shared.Reflection; using Robust.Shared.Serialization; using Robust.Shared.Serialization.Manager.Attributes; +using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype; namespace Content.Shared.GameObjects.Components.Materials { @@ -45,7 +46,7 @@ namespace Content.Shared.GameObjects.Components.Materials [DataField("key", required: true)] public string StringKey = default!; - [DataField("mat", required: true)] + [DataField("mat", required: true, customTypeSerializer:typeof(PrototypeIdSerializer))] public string Value = default!; void ISerializationHooks.AfterDeserialization()