Predict doors and airlocks (#25419)
* predict doors and airlocks * prying, too * ack * eek
This commit is contained in:
@@ -20,7 +20,6 @@ namespace Content.Server.Shuttles.Systems
|
||||
public sealed partial class DockingSystem : EntitySystem
|
||||
{
|
||||
[Dependency] private readonly IMapManager _mapManager = default!;
|
||||
[Dependency] private readonly DoorBoltSystem _bolts = default!;
|
||||
[Dependency] private readonly DoorSystem _doorSystem = default!;
|
||||
[Dependency] private readonly FixtureSystem _fixtureSystem = default!;
|
||||
[Dependency] private readonly PathfindingSystem _pathfinding = default!;
|
||||
@@ -363,7 +362,7 @@ namespace Content.Server.Shuttles.Systems
|
||||
doorA.ChangeAirtight = false;
|
||||
if (TryComp<DoorBoltComponent>(dockAUid, out var airlockA))
|
||||
{
|
||||
_bolts.SetBoltsWithAudio(dockAUid, airlockA, true);
|
||||
_doorSystem.SetBoltsDown((dockAUid, airlockA), true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -375,7 +374,7 @@ namespace Content.Server.Shuttles.Systems
|
||||
doorB.ChangeAirtight = false;
|
||||
if (TryComp<DoorBoltComponent>(dockBUid, out var airlockB))
|
||||
{
|
||||
_bolts.SetBoltsWithAudio(dockBUid, airlockB, true);
|
||||
_doorSystem.SetBoltsDown((dockBUid, airlockB), true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -470,7 +469,7 @@ namespace Content.Server.Shuttles.Systems
|
||||
return;
|
||||
|
||||
if (TryComp<DoorBoltComponent>(dockUid, out var airlock))
|
||||
_bolts.SetBoltsWithAudio(dockUid, airlock, false);
|
||||
_doorSystem.SetBoltsDown((dockUid, airlock), false);
|
||||
|
||||
if (TryComp(dockUid, out DoorComponent? door) && _doorSystem.TryClose(dockUid, door))
|
||||
door.ChangeAirtight = true;
|
||||
|
||||
Reference in New Issue
Block a user