diff --git a/Content.Server/UserInterface/ActivatableUISystem.cs b/Content.Server/UserInterface/ActivatableUISystem.cs index adeeed7c19..459a704911 100644 --- a/Content.Server/UserInterface/ActivatableUISystem.cs +++ b/Content.Server/UserInterface/ActivatableUISystem.cs @@ -5,6 +5,7 @@ using Content.Shared.Hands; using Content.Shared.Hands.Components; using Content.Shared.Interaction; using Content.Shared.Interaction.Events; +using Content.Shared.Popups; using Content.Shared.UserInterface; using Content.Shared.Verbs; using Robust.Server.GameObjects; @@ -17,6 +18,7 @@ public sealed partial class ActivatableUISystem : EntitySystem [Dependency] private readonly IAdminManager _adminManager = default!; [Dependency] private readonly ActionBlockerSystem _blockerSystem = default!; [Dependency] private readonly UserInterfaceSystem _uiSystem = default!; + [Dependency] private readonly SharedPopupSystem _popupSystem = default!; public override void Initialize() { @@ -142,6 +144,9 @@ public sealed partial class ActivatableUISystem : EntitySystem if (aui.SingleUser && (aui.CurrentSingleUser != null) && (actor.PlayerSession != aui.CurrentSingleUser)) { + string message = Loc.GetString("machine-already-in-use", ("machine", uiEntity)); + _popupSystem.PopupEntity(message, uiEntity, user); + // If we get here, supposedly, the object is in use. // Check with BUI that it's ACTUALLY in use just in case. // Since this could brick the object if it goes wrong. diff --git a/Resources/Locale/en-US/machine/machine.ftl b/Resources/Locale/en-US/machine/machine.ftl index e23c9791cd..458e783059 100644 --- a/Resources/Locale/en-US/machine/machine.ftl +++ b/Resources/Locale/en-US/machine/machine.ftl @@ -22,4 +22,6 @@ two-way-lever-left = push left two-way-lever-right = push right two-way-lever-cant = can't push the lever that way! -recycler-count-items = Recycled {$items} objects. \ No newline at end of file +recycler-count-items = Recycled {$items} objects. + +machine-already-in-use = {CAPITALIZE(THE($machine))} is already in use. \ No newline at end of file