Cleans up warnings in disposals (#17419)
This commit is contained in:
@@ -1,6 +1,3 @@
|
||||
using System.Linq;
|
||||
using Content.Server.Atmos.EntitySystems;
|
||||
using Content.Server.Disposal.Unit.Components;
|
||||
using Content.Server.Disposal.Unit.EntitySystems;
|
||||
|
||||
namespace Content.Server.Disposal.Tube.Components
|
||||
@@ -9,27 +6,6 @@ namespace Content.Server.Disposal.Tube.Components
|
||||
[Access(typeof(DisposalTubeSystem), typeof(DisposalUnitSystem))]
|
||||
public sealed class DisposalEntryComponent : Component
|
||||
{
|
||||
[Dependency] private readonly IEntityManager _entMan = default!;
|
||||
|
||||
private const string HolderPrototypeId = "DisposalHolder";
|
||||
|
||||
public bool TryInsert(DisposalUnitComponent from, IEnumerable<string>? tags = default)
|
||||
{
|
||||
var holder = _entMan.SpawnEntity(HolderPrototypeId, _entMan.GetComponent<TransformComponent>(Owner).MapPosition);
|
||||
var holderComponent = _entMan.GetComponent<DisposalHolderComponent>(holder);
|
||||
|
||||
foreach (var entity in from.Container.ContainedEntities.ToArray())
|
||||
{
|
||||
holderComponent.TryInsert(entity);
|
||||
}
|
||||
|
||||
EntitySystem.Get<AtmosphereSystem>().Merge(holderComponent.Air, from.Air);
|
||||
from.Air.Clear();
|
||||
|
||||
if (tags != default)
|
||||
holderComponent.Tags.UnionWith(tags);
|
||||
|
||||
return EntitySystem.Get<DisposableSystem>().EnterTube((holderComponent).Owner, Owner, holderComponent);
|
||||
}
|
||||
public const string HolderPrototypeId = "DisposalHolder";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user