Refactor command system and add static skill support

This commit is contained in:
Juzlus 2025-09-05 04:40:53 +02:00
parent e33975fe8b
commit c73473f0ed
22 changed files with 509 additions and 156 deletions

View file

@ -12,7 +12,7 @@ namespace jRandomSkills
{
private const Skills skillName = Skills.Glaz;
private static bool exists = false;
private static List<int> smokes = new List<int>();
private readonly static List<int> smokes = [];
public static void LoadSkill()
{
@ -80,11 +80,8 @@ namespace jRandomSkills
SkillUtils.TryGiveWeapon(player, CsItem.SmokeGrenade);
}
public class SkillConfig : Config.DefaultSkillInfo
public class SkillConfig(Skills skill = skillName, bool active = true, string color = "#5d00ff", CsTeam onlyTeam = CsTeam.None, bool needsTeammates = false) : Config.DefaultSkillInfo(skill, active, color, onlyTeam, needsTeammates)
{
public SkillConfig(Skills skill = skillName, bool active = true, string color = "#5d00ff", CsTeam onlyTeam = CsTeam.None, bool needsTeammates = false) : base(skill, active, color, onlyTeam, needsTeammates)
{
}
}
}
}