Kill ContainerHelpers (#20908)
This commit is contained in:
@@ -11,6 +11,8 @@ namespace Content.Server.Containers
|
||||
[UsedImplicitly]
|
||||
public sealed class EmptyOnMachineDeconstructSystem : EntitySystem
|
||||
{
|
||||
[Dependency] private readonly SharedContainerSystem _container = default!;
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
@@ -33,12 +35,12 @@ namespace Content.Server.Containers
|
||||
{
|
||||
if (!EntityManager.TryGetComponent<ContainerManagerComponent>(uid, out var mComp))
|
||||
return;
|
||||
var baseCoords = EntityManager.GetComponent<TransformComponent>(component.Owner).Coordinates;
|
||||
var baseCoords = EntityManager.GetComponent<TransformComponent>(uid).Coordinates;
|
||||
foreach (var v in component.Containers)
|
||||
{
|
||||
if (mComp.TryGetContainer(v, out var container))
|
||||
{
|
||||
container.EmptyContainer(true, baseCoords);
|
||||
_container.EmptyContainer(container, true, baseCoords);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user