small moth changes (#18810)
* changes * fix test fail hopefully * disallow eating containers * no more eating stored stuff
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user