Fixed airlock appearance bugs (#23300)

fixed airlock appearance bugs

(cherry picked from commit 60b0267390f13d4ad78d3a4771642096e1f61a2c)
This commit is contained in:
778b 2024-01-01 10:36:31 +03:00 committed by Debug
parent 62c568348f
commit 8c59c2ef3b
No known key found for this signature in database
GPG Key ID: 271270A74EF9C350
1 changed files with 6 additions and 3 deletions

View File

@ -95,14 +95,16 @@ public sealed class AirlockSystem : SharedAirlockSystem
if (_appearanceSystem.TryGetData<bool>(uid, DoorVisuals.Powered, out var powered, args.Component) && powered)
{
boltedVisible = _appearanceSystem.TryGetData<bool>(uid, DoorVisuals.BoltLights, out var lights, args.Component)
&& lights && state == DoorState.Closed;
&& lights && (state == DoorState.Closed || state == DoorState.Open || state == DoorState.Welded);
emergencyLightsVisible = _appearanceSystem.TryGetData<bool>(uid, DoorVisuals.EmergencyLights, out var eaLights, args.Component) && eaLights;
unlitVisible =
state == DoorState.Closing
(state == DoorState.Closing
|| state == DoorState.Opening
|| state == DoorState.Denying
|| (state == DoorState.Open && comp.OpenUnlitVisible)
|| (_appearanceSystem.TryGetData<bool>(uid, DoorVisuals.ClosedLights, out var closedLights, args.Component) && closedLights);
|| (_appearanceSystem.TryGetData<bool>(uid, DoorVisuals.ClosedLights, out var closedLights, args.Component) && closedLights))
&& !boltedVisible && !emergencyLightsVisible; ;
}
args.Sprite.LayerSetVisible(DoorVisualLayers.BaseUnlit, unlitVisible);
@ -115,6 +117,7 @@ public sealed class AirlockSystem : SharedAirlockSystem
&& state != DoorState.Open
&& state != DoorState.Opening
&& state != DoorState.Closing
&& !boltedVisible
);
}
}