using Content.Shared.Power; using Content.Shared.Power.Components; using Content.Shared.Power.EntitySystems; using Content.Shared.UserInterface; namespace Content.Server.Power.EntitySystems; public sealed partial class ActivatableUIRequiresPowerSystem : SharedActivatableUIRequiresPowerSystem { [Dependency] private ActivatableUISystem _activatableUI = default!; [SubscribeLocalEvent] private void OnPowerChanged(EntityUid uid, ActivatableUIRequiresPowerComponent component, ref PowerChangedEvent args) { if (!args.Powered) _activatableUI.CloseAll(uid); } }