FoodComponent trash prototype ID is now validated by the YAML linter.

This commit is contained in:
Vera Aguilera Puerto
2021-05-08 03:44:09 +02:00
parent e3a2847200
commit 62a4145681

View File

@@ -19,7 +19,9 @@ using Robust.Shared.GameObjects;
using Robust.Shared.IoC;
using Robust.Shared.Localization;
using Robust.Shared.Player;
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization.Manager.Attributes;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
using Robust.Shared.ViewVariables;
namespace Content.Server.GameObjects.Components.Nutrition
@@ -32,7 +34,7 @@ namespace Content.Server.GameObjects.Components.Nutrition
[ViewVariables] [DataField("useSound")] protected virtual string? UseSound { get; set; } = "/Audio/Items/eatfood.ogg";
[ViewVariables] [DataField("trash")] protected virtual string? TrashPrototype { get; set; }
[ViewVariables] [DataField("trash", customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>))] protected virtual string? TrashPrototype { get; set; }
[ViewVariables] [DataField("transferAmount")] protected virtual ReagentUnit TransferAmount { get; set; } = ReagentUnit.New(5);