Add support for multiple changelog files, add admin changelog (#20849)

This commit is contained in:
DrSmugleaf
2023-10-12 15:45:04 -07:00
committed by GitHub
parent 4159b7b5e8
commit d6575eb556
10 changed files with 402 additions and 168 deletions

View File

@@ -1,5 +1,4 @@
using System;
using Content.Shared.Administration;
using Content.Shared.Administration;
namespace Content.Client.Administration.Managers
{
@@ -13,6 +12,15 @@ namespace Content.Client.Administration.Managers
/// </summary>
event Action AdminStatusUpdated;
/// <summary>
/// Gets the admin data for the client, if they are an admin.
/// </summary>
/// <param name="includeDeAdmin">
/// Whether to return admin data for admins that are current de-adminned.
/// </param>
/// <returns><see langword="null" /> if the player is not an admin.</returns>
AdminData? GetAdminData(bool includeDeAdmin = false);
/// <summary>
/// Checks whether the local player is an admin.
/// </summary>
@@ -52,5 +60,17 @@ namespace Content.Client.Administration.Managers
bool CanAdminMenu();
void Initialize();
/// <summary>
/// Checks if the client is an admin.
/// </summary>
/// <param name="includeDeAdmin">
/// Whether to return admin data for admins that are current de-adminned.
/// </param>
/// <returns>true if the player is an admin, false otherwise.</returns>
bool IsAdmin(bool includeDeAdmin = false)
{
return GetAdminData(includeDeAdmin) != null;
}
}
}