diff --git a/Content.Server/GameObjects/Components/Nutrition/FoodComponent.cs b/Content.Server/GameObjects/Components/Nutrition/FoodComponent.cs index 7cdaa14916..ef13d79fb9 100644 --- a/Content.Server/GameObjects/Components/Nutrition/FoodComponent.cs +++ b/Content.Server/GameObjects/Components/Nutrition/FoodComponent.cs @@ -47,7 +47,7 @@ namespace Content.Server.GameObjects.Components.Nutrition base.ExposeData(serializer); serializer.DataField(ref _useSound, "useSound", "/Audio/items/eatfood.ogg"); serializer.DataField(ref _transferAmount, "transferAmount", ReagentUnit.New(5)); - serializer.DataField(ref _trashPrototype, "trash", "TrashPlate"); + serializer.DataField(ref _trashPrototype, "trash", null); if (serializer.Reading) { @@ -171,6 +171,12 @@ namespace Content.Server.GameObjects.Components.Nutrition return true; } + if (string.IsNullOrEmpty(_trashPrototype)) + { + Owner.Delete(); + return true; + } + //We're empty. Become trash. var position = Owner.Transform.GridPosition; var finisher = Owner.EntityManager.SpawnEntity(_trashPrototype, position); diff --git a/Resources/Prototypes/Entities/Items/Consumables/food.yml b/Resources/Prototypes/Entities/Items/Consumables/food.yml index c4c909698e..a76f1400ce 100644 --- a/Resources/Prototypes/Entities/Items/Consumables/food.yml +++ b/Resources/Prototypes/Entities/Items/Consumables/food.yml @@ -3,6 +3,7 @@ id: FoodBase abstract: true components: + - type: Food - type: LoopingSound - type: Sprite state: icon