Skip to content

Commit 57097f5

Browse files
committed
Added to option to disable the skip option
1 parent 9002b07 commit 57097f5

File tree

3 files changed

+14
-4
lines changed

3 files changed

+14
-4
lines changed

Modules/Config.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ public class Config
1313

1414
public bool GiveArmor {get; init;} = true;
1515
public string[] triggerWords {get; init;} = { "guns", "gun", "weapon", "weapons"};
16+
public bool AddSkipOption {get; init;} = true;
1617

1718
public Config()
1819
{

Modules/Core.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public class Core : BasePlugin
1919
public static Core Plugin = null!;
2020

2121
public override string ModuleName => "[Retakes] Weapons Allocator";
22-
public override string ModuleVersion => "1.1.3";
22+
public override string ModuleVersion => "1.1.4";
2323
public override string ModuleAuthor => "Ravid & B3none";
2424
public override string ModuleDescription => "Weapons Allocator plugin for retakes";
2525

Modules/Weapons/Menu.cs

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@ public static void OpenTPrimaryMenu(CCSPlayerController player)
1414
{
1515
CenterHtmlMenu centerHtmlMenu = new CenterHtmlMenu($"{PREFIX} Select a T Primary Weapon");
1616

17-
centerHtmlMenu.AddMenuOption("SKIP", (p, _) => OpenCTPrimaryMenu(p));
17+
if(Core.Config.AddSkipOption)
18+
{
19+
centerHtmlMenu.AddMenuOption("SKIP", (p, _) => OpenCTPrimaryMenu(p));
20+
}
1821

1922
foreach (Weapon weapon in PrimaryT)
2023
{
@@ -50,7 +53,10 @@ public static void OpenCTPrimaryMenu(CCSPlayerController player)
5053
{
5154
CenterHtmlMenu centerHtmlMenu = new CenterHtmlMenu($"{PREFIX} Select a CT Primary Weapon");
5255

53-
centerHtmlMenu.AddMenuOption("SKIP", (p, _) => OpenSecondaryMenu(p));
56+
if(Core.Config.AddSkipOption)
57+
{
58+
centerHtmlMenu.AddMenuOption("SKIP", (p, _) => OpenSecondaryMenu(p));
59+
}
5460

5561
foreach (Weapon weapon in PrimaryCt)
5662
{
@@ -86,7 +92,10 @@ private static void OpenSecondaryMenu(CCSPlayerController player)
8692
{
8793
CenterHtmlMenu centerHtmlMenu = new CenterHtmlMenu($"{PREFIX} Select a Secondary Weapon");
8894

89-
centerHtmlMenu.AddMenuOption("SKIP", (p, _) => OpenGiveAWPMenu(p));
95+
if(Core.Config.AddSkipOption)
96+
{
97+
centerHtmlMenu.AddMenuOption("SKIP", (p, _) => OpenGiveAWPMenu(p));
98+
}
9099

91100
foreach (Weapon weapon in Pistols)
92101
{

0 commit comments

Comments
 (0)