Predict doors and airlocks (#25419)

* predict doors and airlocks

* prying, too

* ack

* eek
This commit is contained in:
Nemanja
2024-02-22 18:01:31 -05:00
committed by GitHub
parent b7747596f1
commit ce0a51fc29
25 changed files with 444 additions and 559 deletions

View File

@@ -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;