Content ecs containers (#22484)

This commit is contained in:
TemporalOroboros
2023-12-27 21:30:03 -08:00
committed by GitHub
parent 1d06539432
commit 7a77d6d5dd
72 changed files with 172 additions and 160 deletions

View File

@@ -173,7 +173,7 @@ namespace Content.Server.Kitchen.EntitySystems
if (metaData.EntityPrototype.ID == recipeSolid.Key)
{
component.Storage.Remove(item);
_sharedContainer.Remove(item, component.Storage);
EntityManager.DeleteEntity(item);
break;
}
@@ -208,7 +208,7 @@ namespace Content.Server.Kitchen.EntitySystems
foreach (var part in headSlots)
{
component.Storage.Insert(part.Id);
_container.Insert(part.Id, component.Storage);
headCount++;
}
}
@@ -371,7 +371,7 @@ namespace Content.Server.Kitchen.EntitySystems
if (_tag.HasTag(item, "MicrowaveSelfUnsafe") || _tag.HasTag(item, "Plastic"))
{
var junk = Spawn(component.BadRecipeEntityId, Transform(uid).Coordinates);
component.Storage.Insert(junk);
_container.Insert(junk, component.Storage);
QueueDel(item);
}
@@ -504,7 +504,7 @@ namespace Content.Server.Kitchen.EntitySystems
if (!HasContents(component) || HasComp<ActiveMicrowaveComponent>(uid))
return;
component.Storage.Remove(EntityManager.GetEntity(args.EntityID));
_sharedContainer.Remove(EntityManager.GetEntity(args.EntityID), component.Storage);
UpdateUserInterfaceState(uid, component);
}