Storage Standardization [Take 2] (#21270)

This commit is contained in:
Nemanja
2023-10-30 23:55:55 -04:00
committed by GitHub
parent 2c5ea97d9a
commit 0c329ed661
240 changed files with 1365 additions and 1275 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);