Adds disposal mailing units (again) (#7630)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
using System.Linq;
|
||||
using System.Linq;
|
||||
using Content.Server.Atmos.EntitySystems;
|
||||
using Content.Server.Disposal.Unit.Components;
|
||||
using Content.Server.Disposal.Unit.EntitySystems;
|
||||
@@ -14,7 +14,7 @@ namespace Content.Server.Disposal.Tube.Components
|
||||
|
||||
private const string HolderPrototypeId = "DisposalHolder";
|
||||
|
||||
public bool TryInsert(DisposalUnitComponent from)
|
||||
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);
|
||||
@@ -27,6 +27,9 @@ namespace Content.Server.Disposal.Tube.Components
|
||||
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, null, this);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user