ECS airlocks (#13500)
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
using Content.Server.Doors.Components;
|
||||
using Content.Server.Doors.Systems;
|
||||
using Content.Server.NPC.Pathfinding;
|
||||
using Content.Server.Shuttles.Components;
|
||||
@@ -10,7 +9,6 @@ using Robust.Shared.Map;
|
||||
using Robust.Shared.Physics;
|
||||
using Robust.Shared.Physics.Collision.Shapes;
|
||||
using Robust.Shared.Physics.Components;
|
||||
using Robust.Shared.Physics.Dynamics;
|
||||
using Robust.Shared.Physics.Dynamics.Joints;
|
||||
using Robust.Shared.Physics.Systems;
|
||||
using Robust.Shared.Utility;
|
||||
@@ -20,6 +18,7 @@ namespace Content.Server.Shuttles.Systems
|
||||
public sealed partial class DockingSystem : EntitySystem
|
||||
{
|
||||
[Dependency] private readonly IMapManager _mapManager = default!;
|
||||
[Dependency] private readonly AirlockSystem _airlocks = default!;
|
||||
[Dependency] private readonly DoorSystem _doorSystem = default!;
|
||||
[Dependency] private readonly FixtureSystem _fixtureSystem = default!;
|
||||
[Dependency] private readonly PathfindingSystem _pathfinding = default!;
|
||||
@@ -273,7 +272,7 @@ namespace Content.Server.Shuttles.Systems
|
||||
// Listen it makes intersection tests easier; you can probably dump this but it requires a bunch more boilerplate
|
||||
// TODO: I want this to ideally be 2 fixtures to force them to have some level of alignment buuuttt
|
||||
// I also need collisionmanager for that yet again so they get dis.
|
||||
_fixtureSystem.TryCreateFixture(uid, shape, DockingFixture, hard: false);
|
||||
_fixtureSystem.TryCreateFixture(uid, shape, DockingFixture, hard: false, body: physicsComponent);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -351,7 +350,7 @@ namespace Content.Server.Shuttles.Systems
|
||||
doorA.ChangeAirtight = false;
|
||||
if (TryComp<AirlockComponent>(dockA.Owner, out var airlockA))
|
||||
{
|
||||
airlockA.SetBoltsWithAudio(true);
|
||||
_airlocks.SetBoltsWithAudio(dockA.Owner, airlockA, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -363,7 +362,7 @@ namespace Content.Server.Shuttles.Systems
|
||||
doorB.ChangeAirtight = false;
|
||||
if (TryComp<AirlockComponent>(dockB.Owner, out var airlockB))
|
||||
{
|
||||
airlockB.SetBoltsWithAudio(true);
|
||||
_airlocks.SetBoltsWithAudio(dockB.Owner, airlockB, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -448,12 +447,12 @@ namespace Content.Server.Shuttles.Systems
|
||||
|
||||
if (TryComp<AirlockComponent>(dock.Owner, out var airlockA))
|
||||
{
|
||||
airlockA.SetBoltsWithAudio(false);
|
||||
_airlocks.SetBoltsWithAudio(dock.Owner, airlockA, false);
|
||||
}
|
||||
|
||||
if (TryComp<AirlockComponent>(dock.DockedWith, out var airlockB))
|
||||
{
|
||||
airlockB.SetBoltsWithAudio(false);
|
||||
_airlocks.SetBoltsWithAudio(dock.DockedWith.Value, airlockB, false);
|
||||
}
|
||||
|
||||
if (TryComp(dock.Owner, out DoorComponent? doorA))
|
||||
|
||||
Reference in New Issue
Block a user