using Content.Shared.Popups;
using Content.Shared.Prying.Components;
using Content.Shared.Wires;
+using Robust.Shared.Timing;
namespace Content.Shared.Doors.Systems;
public abstract class SharedAirlockSystem : EntitySystem
{
+ [Dependency] private readonly IGameTiming _timing = default!;
[Dependency] protected readonly SharedAppearanceSystem Appearance = default!;
[Dependency] protected readonly SharedDoorSystem DoorSystem = default!;
- [Dependency] protected readonly SharedPopupSystem Popup = default!;
- [Dependency] private readonly SharedWiresSystem _wiresSystem = default!;
+ [Dependency] private readonly SharedWiresSystem _wiresSystem = default!;
public override void Initialize()
{
private void OnStateChanged(EntityUid uid, AirlockComponent component, DoorStateChangedEvent args)
{
+ // This is here so we don't accidentally bulldoze state values and mispredict.
+ if (_timing.ApplyingState)
+ return;
+
// Only show the maintenance panel if the airlock is closed
if (TryComp<WiresPanelComponent>(uid, out var wiresPanel))
{