This commit is contained in:
Leon Friedrich
2022-01-30 13:49:56 +13:00
committed by GitHub
parent 6fb492aae7
commit c465715273
37 changed files with 1400 additions and 1429 deletions

View File

@@ -1,8 +1,10 @@
using System;
using Content.Server.Doors.Components;
using Content.Server.Doors.Systems;
using Content.Server.Power.Components;
using Content.Server.Shuttles.Components;
using Content.Shared.Doors;
using Content.Shared.Doors.Components;
using Content.Shared.Verbs;
using Robust.Shared.GameObjects;
using Robust.Shared.IoC;
@@ -23,6 +25,7 @@ namespace Content.Server.Shuttles.EntitySystems
[Dependency] private readonly IMapManager _mapManager = default!;
[Dependency] private readonly FixtureSystem _fixtureSystem = default!;
[Dependency] private readonly SharedJointSystem _jointSystem = default!;
[Dependency] private readonly DoorSystem _doorSystem = default!;
private const string DockingFixture = "docking";
private const string DockingJoint = "docking";
@@ -365,16 +368,16 @@ namespace Content.Server.Shuttles.EntitySystems
dockA.DockJoint = joint;
dockB.DockJoint = joint;
if (TryComp(dockA.Owner, out ServerDoorComponent? doorA))
if (TryComp(dockA.Owner, out DoorComponent? doorA))
{
doorA.ChangeAirtight = false;
doorA.Open();
_doorSystem.StartOpening(doorA.Owner, doorA);
}
if (TryComp(dockB.Owner, out ServerDoorComponent? doorB))
if (TryComp(dockB.Owner, out DoorComponent? doorB))
{
doorB.ChangeAirtight = false;
doorB.Open();
_doorSystem.StartOpening(doorB.Owner, doorB);
}
var msg = new DockEvent
@@ -448,16 +451,16 @@ namespace Content.Server.Shuttles.EntitySystems
return;
}
if (TryComp(dock.Owner, out ServerDoorComponent? doorA))
if (TryComp(dock.Owner, out DoorComponent? doorA))
{
doorA.ChangeAirtight = true;
doorA.Close();
_doorSystem.TryClose(doorA.Owner, doorA);
}
if (TryComp(dock.DockedWith, out ServerDoorComponent? doorB))
if (TryComp(dock.DockedWith, out DoorComponent? doorB))
{
doorB.ChangeAirtight = true;
doorB.Close();
_doorSystem.TryClose(doorB.Owner, doorB);
}
// Could maybe give the shuttle a light push away, or at least if there's no other docks left?