small moth changes (#18810)

* changes

* fix test fail hopefully

* disallow eating containers

* no more eating stored stuff
This commit is contained in:
LankLTE
2023-08-08 21:05:05 -07:00
committed by GitHub
parent 61f546dd0c
commit 6b2fef1ac8
12 changed files with 60 additions and 15 deletions

View File

@@ -28,6 +28,7 @@ using Robust.Shared.Audio;
using Robust.Shared.Player;
using Robust.Shared.Utility;
using Content.Shared.Tag;
using Content.Server.Storage.Components;
namespace Content.Server.Nutrition.EntitySystems
{
@@ -119,6 +120,13 @@ namespace Content.Server.Nutrition.EntitySystems
return (false, true);
}
// Check for used storage on the food item
if (TryComp<ServerStorageComponent>(food, out var storageState) && storageState.StorageUsed != 0)
{
_popupSystem.PopupEntity(Loc.GetString("food-has-used-storage", ("food", food)), user, user);
return (false, true);
}
var flavors = _flavorProfileSystem.GetLocalizedFlavorsMessage(food, user, foodSolution);
if (foodComp.UsesRemaining <= 0)