Allow zoom command to ignore zoom limits (#19419)

This commit is contained in:
Leon Friedrich
2023-08-22 21:27:41 +12:00
committed by GitHub
parent cf38f16d36
commit 4d845caa07
7 changed files with 62 additions and 36 deletions

View File

@@ -29,36 +29,6 @@ namespace Content.Server.Administration.Managers
/// </summary>
IEnumerable<IPlayerSession> AllAdmins { get; }
/// <summary>
/// Checks if a player is an admin.
/// </summary>
/// <param name="session">The player to check.</param>
/// <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(IPlayerSession session, bool includeDeAdmin = false);
/// <summary>
/// Gets the admin data for a player, if they are an admin.
/// </summary>
/// <param name="session">The player to get admin data for.</param>
/// <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(IPlayerSession session, bool includeDeAdmin = false);
/// <summary>
/// See if a player has an admin flag.
/// </summary>
/// <returns>True if the player is and admin and has the specified flags.</returns>
bool HasAdminFlag(IPlayerSession player, AdminFlags flag)
{
var data = GetAdminData(player);
return data != null && data.HasFlag(flag);
}
/// <summary>
/// De-admins an admin temporarily so they are effectively a normal player.
/// </summary>