From b61f3c1e53c55ac6eee4732eb22b671253348d4c Mon Sep 17 00:00:00 2001 From: MSWS Date: Sun, 4 Feb 2024 21:26:52 -0800 Subject: [PATCH] Initial stuff for debug --- Jailbreak.sln | 7 +++++++ mod/Jailbreak.Debug/DebugCommand.cs | 22 ++++++++++++++++++++ mod/Jailbreak.Debug/DebugServiceExtension.cs | 12 +++++++++++ mod/Jailbreak.Debug/Jailbreak.Debug.csproj | 13 ++++++++++++ mod/Jailbreak.Debug/Subcommands/MarkRebel.cs | 20 ++++++++++++++++++ 5 files changed, 74 insertions(+) create mode 100644 mod/Jailbreak.Debug/DebugCommand.cs create mode 100644 mod/Jailbreak.Debug/DebugServiceExtension.cs create mode 100644 mod/Jailbreak.Debug/Jailbreak.Debug.csproj create mode 100644 mod/Jailbreak.Debug/Subcommands/MarkRebel.cs diff --git a/Jailbreak.sln b/Jailbreak.sln index 4e9a7f23..6098dfce 100644 --- a/Jailbreak.sln +++ b/Jailbreak.sln @@ -26,6 +26,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jailbreak.Rebel", "mod\Jail EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jailbreak.Logs", "mod\Jailbreak.Logs\Jailbreak.Logs.csproj", "{CE6EC648-E7F9-4CE7-B28F-8C7995830F35}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jailbreak.Debug", "mod\Jailbreak.Debug\Jailbreak.Debug.csproj", "{4F10E2B5-E8BB-4253-9BE6-9187575ADB13}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -68,6 +70,10 @@ Global {CE6EC648-E7F9-4CE7-B28F-8C7995830F35}.Debug|Any CPU.Build.0 = Debug|Any CPU {CE6EC648-E7F9-4CE7-B28F-8C7995830F35}.Release|Any CPU.ActiveCfg = Release|Any CPU {CE6EC648-E7F9-4CE7-B28F-8C7995830F35}.Release|Any CPU.Build.0 = Release|Any CPU + {4F10E2B5-E8BB-4253-9BE6-9187575ADB13}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4F10E2B5-E8BB-4253-9BE6-9187575ADB13}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4F10E2B5-E8BB-4253-9BE6-9187575ADB13}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4F10E2B5-E8BB-4253-9BE6-9187575ADB13}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(NestedProjects) = preSolution {9135CCC9-66C5-4A9C-AE3C-91475B5F0437} = {177DA48D-8306-4102-918D-992569878581} @@ -79,5 +85,6 @@ Global {FC2D6F50-BCFF-41E6-A965-6C73CC01C3BF} = {CDCDE44E-01D2-4B76-99DA-A57E1E956038} {CB2391A1-6CDD-496F-B8D6-674FD6268038} = {36BA84C0-291C-4930-A7C6-97CDF8F7F0D7} {CE6EC648-E7F9-4CE7-B28F-8C7995830F35} = {36BA84C0-291C-4930-A7C6-97CDF8F7F0D7} + {4F10E2B5-E8BB-4253-9BE6-9187575ADB13} = {36BA84C0-291C-4930-A7C6-97CDF8F7F0D7} EndGlobalSection EndGlobal diff --git a/mod/Jailbreak.Debug/DebugCommand.cs b/mod/Jailbreak.Debug/DebugCommand.cs new file mode 100644 index 00000000..e942b587 --- /dev/null +++ b/mod/Jailbreak.Debug/DebugCommand.cs @@ -0,0 +1,22 @@ +using CounterStrikeSharp.API.Core; +using CounterStrikeSharp.API.Modules.Admin; +using CounterStrikeSharp.API.Modules.Commands; +using Jailbreak.Public.Behaviors; + +namespace Jailbreak.Debug; + +public class DebugCommand : IPluginBehavior +{ + [RequiresPermissions("@css/root")] + public void Command_Debug(CCSPlayerController? executor, CommandInfo info) + { + if (executor == null) + { + return; + } + + if (info.ArgCount == 1) + { + } + } +} \ No newline at end of file diff --git a/mod/Jailbreak.Debug/DebugServiceExtension.cs b/mod/Jailbreak.Debug/DebugServiceExtension.cs new file mode 100644 index 00000000..30cbf76f --- /dev/null +++ b/mod/Jailbreak.Debug/DebugServiceExtension.cs @@ -0,0 +1,12 @@ +using Jailbreak.Public.Extensions; +using Microsoft.Extensions.DependencyInjection; + +namespace Jailbreak.Debug; + +public static class DebugServiceExtension +{ + public static void AddDebugService(this IServiceCollection services) + { + services.AddPluginBehavior(); + } +} \ No newline at end of file diff --git a/mod/Jailbreak.Debug/Jailbreak.Debug.csproj b/mod/Jailbreak.Debug/Jailbreak.Debug.csproj new file mode 100644 index 00000000..d809758e --- /dev/null +++ b/mod/Jailbreak.Debug/Jailbreak.Debug.csproj @@ -0,0 +1,13 @@ + + + + net7.0 + enable + enable + + + + + + + diff --git a/mod/Jailbreak.Debug/Subcommands/MarkRebel.cs b/mod/Jailbreak.Debug/Subcommands/MarkRebel.cs new file mode 100644 index 00000000..a375c022 --- /dev/null +++ b/mod/Jailbreak.Debug/Subcommands/MarkRebel.cs @@ -0,0 +1,20 @@ +using CounterStrikeSharp.API.Core; +using CounterStrikeSharp.API.Modules.Commands; + +namespace Jailbreak.Debug.Subcommands; + +public class MarkRebel +{ + public void Command_MarkRebel(CCSPlayerController? executor, CommandInfo info) + { + if (executor == null) + { + return; + } + + if (info.ArgCount == 1) + { + // asdf + } + } +} \ No newline at end of file