Add stealthmins (#26263)

* Add stealthmin command.

* Update Content.Server/Administration/Commands/AdminWhoCommand.cs

As suggested by CE.

Co-authored-by: Chief-Engineer <119664036+Chief-Engineer@users.noreply.github.com>

* Add admin notifications for admins toggling stealthmin.

* Localize stealthmin command

---------

Co-authored-by: Chief-Engineer <119664036+Chief-Engineer@users.noreply.github.com>
This commit is contained in:
nikthechampiongr
2024-03-24 17:39:53 +02:00
committed by GitHub
parent 3731cc3c50
commit dca0c6694b
11 changed files with 197 additions and 10 deletions

View File

@@ -12,6 +12,11 @@ namespace Content.Shared.Administration
/// </summary>
public bool Active;
/// <summary>
/// Whether the admin is in stealth mode and won't appear in adminwho to admins without the Stealth flag.
/// </summary>
public bool Stealth;
/// <summary>
/// The admin's title.
/// </summary>
@@ -56,6 +61,14 @@ namespace Content.Shared.Administration
return HasFlag(AdminFlags.Admin);
}
/// <summary>
/// Check if this admin can be hidden and see other hidden admins.
/// </summary>
public bool CanStealth()
{
return HasFlag(AdminFlags.Stealth);
}
public bool CanAdminReloadPrototypes()
{
return HasFlag(AdminFlags.Host);

View File

@@ -94,6 +94,11 @@
/// </summary>
MassBan = 1 << 15,
/// <summary>
/// Allows you to remain hidden from adminwho except to other admins with this flag.
/// </summary>
Stealth = 1 << 16,
/// <summary>
/// Dangerous host permissions like scsi.
/// </summary>