11using System . Text . Json ;
2+ using CounterStrikeSharp . API . Modules . Utils ;
23using MySqlConnector ;
34
45using static RetakesAllocator . Modules . Core ;
@@ -10,6 +11,7 @@ public class Config
1011{
1112 public ConnectionConfig DbConnection { get ; init ; } = null ! ;
1213 public PrefixConfig Prefix { get ; init ; } = null ! ;
14+ public PistolRoundConfig PistolRound { get ; init ; } = null ! ;
1315
1416 public bool GiveArmor { get ; init ; } = true ;
1517 public string [ ] triggerWords { get ; init ; } = { "guns" , "gun" , "weapon" , "weapons" } ;
@@ -19,8 +21,10 @@ public Config()
1921 {
2022 DbConnection = new ConnectionConfig ( ) ;
2123 Prefix = new PrefixConfig ( ) ;
24+ PistolRound = new PistolRoundConfig ( ) ;
2225 GiveArmor = true ;
2326 triggerWords = new string [ ] { "guns" , "gun" , "weapon" , "weapons" } ;
27+ AddSkipOption = true ;
2428 }
2529
2630 public bool IsValid ( )
@@ -58,6 +62,18 @@ public class PrefixConfig
5862 public string PrefixCon { get ; set ; } = "[RetakesAllocator]" ;
5963}
6064
65+ public class PistolRoundConfig
66+ {
67+ public int RoundAmount { get ; init ; } = 2 ;
68+ public string weapon_t { get ; init ; } = "weapon_glock" ;
69+ public string weapon_ct { get ; init ; } = "weapon_usp_silencer" ;
70+
71+ public string GetWeaponByTeam ( CsTeam team )
72+ {
73+ return ( team == CsTeam . Terrorist ) ? weapon_t : weapon_ct ;
74+ }
75+ }
76+
6177public static class Configs
6278{
6379 public const string ConfigDirectory = "configs" ;
0 commit comments