Fix powered machines working unpowered if the panel is open. (#32135)
This commit is contained in:
committed by
GitHub
parent
1a4a467a2e
commit
8385de8769
@@ -18,9 +18,6 @@ public sealed class ActivatableUIRequiresPowerSystem : SharedActivatableUIRequir
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (TryComp<WiresPanelComponent>(ent.Owner, out var panel) && panel.Open)
|
|
||||||
return;
|
|
||||||
|
|
||||||
_popup.PopupClient(Loc.GetString("base-computer-ui-component-not-powered", ("machine", ent.Owner)), args.User, args.User);
|
_popup.PopupClient(Loc.GetString("base-computer-ui-component-not-powered", ("machine", ent.Owner)), args.User, args.User);
|
||||||
args.Cancel();
|
args.Cancel();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,7 @@
|
|||||||
using Content.Server.Power.Components;
|
|
||||||
using Content.Shared.Power;
|
using Content.Shared.Power;
|
||||||
using Content.Shared.Power.Components;
|
using Content.Shared.Power.Components;
|
||||||
using Content.Shared.Power.EntitySystems;
|
using Content.Shared.Power.EntitySystems;
|
||||||
using Content.Shared.UserInterface;
|
using Content.Shared.UserInterface;
|
||||||
using Content.Shared.Wires;
|
|
||||||
using ActivatableUISystem = Content.Shared.UserInterface.ActivatableUISystem;
|
using ActivatableUISystem = Content.Shared.UserInterface.ActivatableUISystem;
|
||||||
|
|
||||||
namespace Content.Server.Power.EntitySystems;
|
namespace Content.Server.Power.EntitySystems;
|
||||||
@@ -26,9 +24,6 @@ public sealed class ActivatableUIRequiresPowerSystem : SharedActivatableUIRequir
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (TryComp<WiresPanelComponent>(ent.Owner, out var panel) && panel.Open)
|
|
||||||
return;
|
|
||||||
|
|
||||||
args.Cancel();
|
args.Cancel();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user