Content ecs containers (#22484)
This commit is contained in:
@@ -133,14 +133,14 @@ namespace Content.Server.Construction
|
||||
{
|
||||
foreach (var entity in container.ContainedEntities.ToArray())
|
||||
{
|
||||
container.Remove(entity);
|
||||
_container.Remove(entity, container);
|
||||
}
|
||||
|
||||
foreach (var cont in containers.Values)
|
||||
{
|
||||
foreach (var entity in cont.ContainedEntities.ToArray())
|
||||
{
|
||||
cont.Remove(entity);
|
||||
_container.Remove(entity, cont);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -150,10 +150,10 @@ namespace Content.Server.Construction
|
||||
|
||||
void ShutdownContainers()
|
||||
{
|
||||
container.Shutdown();
|
||||
_container.ShutdownContainer(container);
|
||||
foreach (var c in containers.Values.ToArray())
|
||||
{
|
||||
c.Shutdown();
|
||||
_container.ShutdownContainer(c);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -188,10 +188,10 @@ namespace Content.Server.Construction
|
||||
|
||||
if (string.IsNullOrEmpty(materialStep.Store))
|
||||
{
|
||||
if (!container.Insert(splitStack.Value))
|
||||
if (!_container.Insert(splitStack.Value, container))
|
||||
continue;
|
||||
}
|
||||
else if (!GetContainer(materialStep.Store).Insert(splitStack.Value))
|
||||
else if (!_container.Insert(splitStack.Value, GetContainer(materialStep.Store)))
|
||||
continue;
|
||||
|
||||
handled = true;
|
||||
@@ -217,10 +217,10 @@ namespace Content.Server.Construction
|
||||
|
||||
if (string.IsNullOrEmpty(arbitraryStep.Store))
|
||||
{
|
||||
if (!container.Insert(entity))
|
||||
if (!_container.Insert(entity, container))
|
||||
continue;
|
||||
}
|
||||
else if (!GetContainer(arbitraryStep.Store).Insert(entity))
|
||||
else if (!_container.Insert(entity, GetContainer(arbitraryStep.Store)))
|
||||
continue;
|
||||
|
||||
handled = true;
|
||||
@@ -284,8 +284,8 @@ namespace Content.Server.Construction
|
||||
|
||||
foreach (var entity in cont.ContainedEntities.ToArray())
|
||||
{
|
||||
cont.ForceRemove(entity);
|
||||
newCont.Insert(entity);
|
||||
_container.Remove(entity, cont, reparent: false, force: true);
|
||||
_container.Insert(entity, newCont);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user