Fixes that annoying atmos zero pressure bug I've constantly been pinged and nagged about for like the past few days.

This commit is contained in:
Vera Aguilera Puerto
2021-11-11 16:15:14 +01:00
parent 7b4da352df
commit 1b01247c5f
4 changed files with 21 additions and 10 deletions

View File

@@ -366,6 +366,11 @@ namespace Content.Server.Doors.Components
occluder.Enabled = false;
}
if (Owner.TryGetComponent(out AirtightComponent? airtight))
{
EntitySystem.Get<AirtightSystem>().SetAirblocked(airtight, false);
}
_stateChangeCancelTokenSource?.Cancel();
_stateChangeCancelTokenSource = new();
@@ -387,11 +392,13 @@ namespace Content.Server.Doors.Components
protected override void OnPartialOpen()
{
base.OnPartialOpen();
if (Owner.TryGetComponent(out AirtightComponent? airtight))
{
EntitySystem.Get<AirtightSystem>().SetAirblocked(airtight, false);
}
base.OnPartialOpen();
Owner.EntityManager.EventBus.RaiseEvent(EventSource.Local, new AccessReaderChangeMessage(Owner, false));
}