diff --git a/Content.Client/Administration/UI/Tabs/ObjectsTab/ObjectsTabEntry.xaml.cs b/Content.Client/Administration/UI/Tabs/ObjectsTab/ObjectsTabEntry.xaml.cs index 29774bb587..ee5d3701f5 100644 --- a/Content.Client/Administration/UI/Tabs/ObjectsTab/ObjectsTabEntry.xaml.cs +++ b/Content.Client/Administration/UI/Tabs/ObjectsTab/ObjectsTabEntry.xaml.cs @@ -1,4 +1,4 @@ -using Content.Client.Administration.Managers; +using Content.Client.Administration.Managers; using Robust.Client.AutoGenerated; using Robust.Client.Graphics; using Robust.Client.UserInterface.Controls; @@ -13,6 +13,7 @@ public sealed partial class ObjectsTabEntry : PanelContainer public Action? OnTeleport; public Action? OnDelete; + private readonly Dictionary _confirmations = new(); public ObjectsTabEntry(IClientAdminManager manager, string name, NetEntity nent, StyleBox styleBox) { @@ -27,6 +28,13 @@ public sealed partial class ObjectsTabEntry : PanelContainer DeleteButton.Disabled = !manager.CanCommand("delete"); TeleportButton.OnPressed += _ => OnTeleport?.Invoke(nent); - DeleteButton.OnPressed += _ => OnDelete?.Invoke(nent); + DeleteButton.OnPressed += _ => + { + if (!AdminUIHelpers.TryConfirm(DeleteButton, _confirmations)) + { + return; + } + OnDelete?.Invoke(nent); + }; } }