Content ecs containers (#22484)
This commit is contained in:
@@ -63,7 +63,7 @@ namespace Content.Server.Disposal.Unit.EntitySystems
|
||||
if (!CanInsert(uid, toInsert, holder))
|
||||
return false;
|
||||
|
||||
if (!holder.Container.Insert(toInsert, EntityManager))
|
||||
if (!_containerSystem.Insert(toInsert, holder.Container))
|
||||
return false;
|
||||
|
||||
if (_physicsQuery.TryGetComponent(toInsert, out var physBody))
|
||||
@@ -127,14 +127,14 @@ namespace Content.Server.Disposal.Unit.EntitySystems
|
||||
RemComp<BeingDisposedComponent>(entity);
|
||||
|
||||
var meta = _metaQuery.GetComponent(entity);
|
||||
holder.Container.Remove(entity, EntityManager, meta: meta, reparent: false, force: true);
|
||||
_containerSystem.Remove((entity, null, meta), holder.Container, reparent: false, force: true);
|
||||
|
||||
var xform = _xformQuery.GetComponent(entity);
|
||||
if (xform.ParentUid != uid)
|
||||
continue;
|
||||
|
||||
if (duc != null)
|
||||
duc.Container.Insert(entity, EntityManager, xform, meta: meta);
|
||||
_containerSystem.Insert((entity, xform, meta), duc.Container);
|
||||
else
|
||||
{
|
||||
_xformSystem.AttachToGridOrMap(entity, xform);
|
||||
@@ -185,7 +185,7 @@ namespace Content.Server.Disposal.Unit.EntitySystems
|
||||
}
|
||||
|
||||
// Insert into next tube
|
||||
if (!to.Contents.Insert(holderUid))
|
||||
if (!_containerSystem.Insert(holderUid, to.Contents))
|
||||
{
|
||||
ExitDisposals(holderUid, holder, holderTransform);
|
||||
return false;
|
||||
@@ -267,7 +267,7 @@ namespace Content.Server.Disposal.Unit.EntitySystems
|
||||
|
||||
// Past this point, we are performing inter-tube transfer!
|
||||
// Remove current tube content
|
||||
_disposalTubeQuery.GetComponent(currentTube).Contents.Remove(uid, reparent: false, force: true);
|
||||
_containerSystem.Remove(uid, _disposalTubeQuery.GetComponent(currentTube).Contents, reparent: false, force: true);
|
||||
|
||||
// Find next tube
|
||||
var nextTube = _disposalTubeSystem.NextTubeFor(currentTube, holder.CurrentDirection);
|
||||
|
||||
@@ -208,7 +208,7 @@ public sealed class DisposalUnitSystem : SharedDisposalUnitSystem
|
||||
if (!ResolveDisposals(uid, ref disposal))
|
||||
return;
|
||||
|
||||
if (!disposal.Container.Insert(toInsert))
|
||||
if (!_containerSystem.Insert(toInsert, disposal.Container))
|
||||
return;
|
||||
|
||||
_adminLogger.Add(LogType.Action, LogImpact.Medium, $"{ToPrettyString(user):player} inserted {ToPrettyString(toInsert)} into {ToPrettyString(uid)}");
|
||||
@@ -681,7 +681,7 @@ public sealed class DisposalUnitSystem : SharedDisposalUnitSystem
|
||||
|
||||
public void Remove(EntityUid uid, SharedDisposalUnitComponent component, EntityUid toRemove)
|
||||
{
|
||||
component.Container.Remove(toRemove);
|
||||
_containerSystem.Remove(toRemove, component.Container);
|
||||
|
||||
if (component.Container.ContainedEntities.Count == 0)
|
||||
{
|
||||
@@ -800,7 +800,7 @@ public sealed class DisposalUnitSystem : SharedDisposalUnitSystem
|
||||
{
|
||||
_audioSystem.PlayPvs(component.InsertSound, uid);
|
||||
|
||||
if (!component.Container.Insert(inserted))
|
||||
if (!_containerSystem.Insert(inserted, component.Container))
|
||||
return;
|
||||
|
||||
if (user != inserted && user != null)
|
||||
|
||||
Reference in New Issue
Block a user