Add admin Erase verb, add checkbox to erase from the ban panel (#20985)

This commit is contained in:
DrSmugleaf
2023-10-14 02:02:56 -07:00
committed by GitHub
parent 3a2482420f
commit 5be0df32ad
22 changed files with 297 additions and 57 deletions

View File

@@ -48,6 +48,7 @@ namespace Content.Server.Administration.Systems
[Dependency] private readonly IGameTiming _gameTiming = default!;
[Dependency] private readonly IMapManager _mapManager = default!;
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;
[Dependency] private readonly AdminSystem _adminSystem = default!;
[Dependency] private readonly DisposalTubeSystem _disposalTubes = default!;
[Dependency] private readonly EuiManager _euiManager = default!;
[Dependency] private readonly GhostRoleSystem _ghostRoleSystem = default!;
@@ -140,6 +141,20 @@ namespace Content.Server.Administration.Systems
},
Impact = LogImpact.Medium,
});
// Erase
args.Verbs.Add(new Verb
{
Text = Loc.GetString("admin-verbs-erase"),
Category = VerbCategory.Admin,
Icon = new SpriteSpecifier.Texture(new("/Textures/Interface/VerbIcons/delete_transparent.svg.192dpi.png")),
Act = () =>
{
_adminSystem.Erase(targetActor.PlayerSession);
},
Impact = LogImpact.Extreme,
ConfirmationPopup = true
});
}
// Admin Logs