mirror of
https://github.com/daffyyyy/CS2-SimpleAdmin.git
synced 2026-11-07 12:07:05 +01:00
Migrate menus and votes to Panorama UI Kit
Replace MenuManagerCS2 with Panorama UI Kit for the admin menus and css_vote. Layout names (menu, vote, banner, toast) are configurable under MenuConfig and preloaded on startup; MenuType is removed and ConfigVersion bumped to 26. - Drop MenuManagerApi.dll and the old chat menu classes - Reference PanoramaUiKit.Shared.dll, bump CounterStrikeSharp to 1.0.376 - Add .editorconfig and CODING_CONVENTIONS.md, apply them codebase-wide - Remove the CS2-SimpleAdmin-docs site - Rewrite README for the fork
This commit is contained in:
parent
03a454b1b5
commit
460d8b2b85
112 changed files with 5559 additions and 36371 deletions
|
|
@ -9,7 +9,7 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="CounterStrikeSharp.API" Version="1.0.369" />
|
||||
<PackageReference Include="CounterStrikeSharp.API" Version="1.0.376" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ namespace CS2_SimpleAdminApi;
|
|||
public interface ICS2_SimpleAdminApi
|
||||
{
|
||||
public static readonly PluginCapability<ICS2_SimpleAdminApi?> PluginCapability = new("simpleadmin:api");
|
||||
|
||||
|
||||
public event Action? OnSimpleAdminReady;
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -18,17 +18,17 @@ public interface ICS2_SimpleAdminApi
|
|||
/// <param name="player">The player controller.</param>
|
||||
/// <returns>PlayerInfo object representing player data.</returns>
|
||||
public PlayerInfo GetPlayerInfo(CCSPlayerController player);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Returns the database connection string used by the plugin.
|
||||
/// </summary>
|
||||
public string GetConnectionString();
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Returns the configured server IP address with port.
|
||||
/// </summary>
|
||||
public string GetServerAddress();
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Returns the internal server ID assigned in the plugin's database.
|
||||
/// </summary>
|
||||
|
|
@ -45,42 +45,42 @@ public interface ICS2_SimpleAdminApi
|
|||
/// Event fired when a player receives a penalty.
|
||||
/// </summary>
|
||||
public event Action<PlayerInfo, PlayerInfo?, PenaltyType, string, int, int?, int?>? OnPlayerPenaltied;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Event fired when a penalty is added to a player by SteamID.
|
||||
/// </summary>
|
||||
public event Action<SteamID, PlayerInfo?, PenaltyType, string, int, int?, int?>? OnPlayerPenaltiedAdded;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Event to show admin activity messages.
|
||||
/// </summary>
|
||||
public event Action<string, string?, bool, object>? OnAdminShowActivity;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Event fired when an admin toggles silent mode.
|
||||
/// </summary>
|
||||
public event Action<int, bool>? OnAdminToggleSilent;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Issues a penalty to a player controller with specified type, reason, and optional duration.
|
||||
/// </summary>
|
||||
public void IssuePenalty(CCSPlayerController player, CCSPlayerController? admin, PenaltyType penaltyType, string reason, int duration = -1);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Issues a penalty to a player identified by SteamID with specified type, reason, and optional duration.
|
||||
/// </summary>
|
||||
public void IssuePenalty(SteamID steamid, CCSPlayerController? admin, PenaltyType penaltyType, string reason, int duration = -1);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Logs a command invoked by a caller with the command string.
|
||||
/// </summary>
|
||||
public void LogCommand(CCSPlayerController? caller, string command);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Logs a command invoked by a caller with the command info object.
|
||||
/// </summary>
|
||||
public void LogCommand(CCSPlayerController? caller, CommandInfo command);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Shows an admin activity message, optionally suppressing broadcasting.
|
||||
/// </summary>
|
||||
|
|
@ -109,27 +109,27 @@ public interface ICS2_SimpleAdminApi
|
|||
/// Returns true if the specified admin player is in silent mode (not broadcasting activity).
|
||||
/// </summary>
|
||||
public bool IsAdminSilent(CCSPlayerController player);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Returns a set of player slots representing admins currently in silent mode.
|
||||
/// </summary>
|
||||
public HashSet<int> ListSilentAdminsSlots();
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Registers a new command with the specified name, description, and callback.
|
||||
/// </summary>
|
||||
public void RegisterCommand(string name, string? description, CommandInfo.CommandCallback callback);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Unregisters an existing command by its name.
|
||||
/// </summary>
|
||||
public void UnRegisterCommand(string name);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Gets target players from command
|
||||
/// </summary>
|
||||
TargetResult? GetTarget(CommandInfo command);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Returns the list of current valid players, available to call from other plugins.
|
||||
/// </summary>
|
||||
|
|
@ -233,4 +233,4 @@ public interface ICS2_SimpleAdminApi
|
|||
/// Opens a menu for a player.
|
||||
/// </summary>
|
||||
void OpenMenu(object menu, CCSPlayerController player);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
using CounterStrikeSharp.API.Core;
|
||||
|
||||
namespace CS2_SimpleAdminApi;
|
||||
|
||||
/// <summary>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue