Content ecs containers (#22484)
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -159,7 +159,7 @@ namespace Content.Server.Kitchen.EntitySystems
|
||||
if (inputContainer.ContainedEntities.Count >= reagentGrinder.StorageMaxEntities)
|
||||
return;
|
||||
|
||||
if (!inputContainer.Insert(heldEnt, EntityManager))
|
||||
if (!_containerSystem.Insert(heldEnt, inputContainer))
|
||||
return;
|
||||
|
||||
args.Handled = true;
|
||||
@@ -230,7 +230,7 @@ namespace Content.Server.Kitchen.EntitySystems
|
||||
ClickSound(uid, reagentGrinder);
|
||||
foreach (var entity in inputContainer.ContainedEntities.ToList())
|
||||
{
|
||||
inputContainer.Remove(entity);
|
||||
_containerSystem.Remove(entity, inputContainer);
|
||||
_randomHelper.RandomOffset(entity, 0.4f);
|
||||
}
|
||||
UpdateUiState(uid);
|
||||
@@ -244,7 +244,7 @@ namespace Content.Server.Kitchen.EntitySystems
|
||||
var inputContainer = _containerSystem.EnsureContainer<Container>(uid, SharedReagentGrinder.InputContainerId);
|
||||
var ent = GetEntity(message.EntityId);
|
||||
|
||||
if (inputContainer.Remove(ent))
|
||||
if (_containerSystem.Remove(ent, inputContainer))
|
||||
{
|
||||
_randomHelper.RandomOffset(ent, 0.4f);
|
||||
ClickSound(uid, reagentGrinder);
|
||||
|
||||
Reference in New Issue
Block a user