[TEST MERGE] Slot-based Storage (#21212)

This commit is contained in:
Nemanja
2023-10-25 18:53:38 -04:00
committed by GitHub
parent 6b04aaf964
commit 41795720da
234 changed files with 1052 additions and 1008 deletions

View File

@@ -1,3 +1,4 @@
using System.Linq;
using Content.Server.Body.Components;
using Content.Server.Body.Systems;
using Content.Server.Inventory;
@@ -122,7 +123,7 @@ public sealed class FoodSystem : EntitySystem
return (false, false);
// Check for used storage on the food item
if (TryComp<StorageComponent>(food, out var storageState) && storageState.StorageUsed != 0)
if (TryComp<StorageComponent>(food, out var storageState) && storageState.Container.ContainedEntities.Any())
{
_popup.PopupEntity(Loc.GetString("food-has-used-storage", ("food", food)), user, user);
return (false, true);