Skip to content

Commit

Permalink
UPDATE: Refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
nickj609 committed Jun 20, 2024
1 parent a61c186 commit ef30804
Show file tree
Hide file tree
Showing 25 changed files with 1,902 additions and 1,514 deletions.
27 changes: 16 additions & 11 deletions Config.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public void OnConfigParsed(Config _config)
else if(_config.RTV.Enabled == true)
{
// Set RTV flag
_RTV = _config.RTV.Enabled;
PluginState.RTVEnabled = _config.RTV.Enabled;

// Check if plugin DLL exists
if (File.Exists(Path.Join(GameDirectory, _config.RTV.Plugin)))
Expand Down Expand Up @@ -184,7 +184,7 @@ public class GameSettings
public class MapGroupSettings
{
public float Delay { get; set; } = 2.0f; // Map change delay in seconds
public string Default { get; set; } = "mg_active"; // Default map group on server start
public string Default { get; set; } = "mg_casual"; // Default map group on server start
public string DefaultMap { get; set; } = "de_dust2"; // Default map on server start
public string Style { get; set; } = "center"; // Changes map menu type (i.e. "chat" or "center")
public string File { get; set; } = "gamemodes_server.txt"; // Default game modes and map groups file
Expand All @@ -198,19 +198,25 @@ public class GameModeSettings
public bool ListEnabled { get; set; } = true; // Enables custom game mode list. If set to false, generated from map groups.
public Dictionary<string, string> List { get; set; } = new Dictionary<string, string>() // Custom game mode list
{
{"casual", "Casual"},
{"comp", "Competitive"},
{"1v1", "1 vs 1"},
{"aim","Aim"},
{"awp", "AWP Only"},
{"scoutzknivez", "ScoutzKnives"},
{"wingman", "Wingman"},
{"gungame", "Gun Game"},
{"surf", "Surf"},
{"prac", "Practice"},
{"dm", "Deathmatch"},
{"dm-multicfg", "Deathmatch Multicfg"},
{"dm-multicfg", "Deathmatch v2"},
{"ar", "Armsrace"},
{"gg", "Gun Game"},
{"retake","Retakes"},
{"executes","Executes"},
{"1v1", "1v1"},
{"aim","Aim"},
{"bhop","Bhop"},
{"surf", "Surf"},
{"kz", "Kreedz"},
{"soccer","Soccer"},
{"awp", "AWP Only"},
{"course", "Course"},
{"hns", "Hide N Seek"},
{"kz", "Kreedz"},
{"minigames", "Mini Games"}
}; // Default Game Mode List
}
Expand All @@ -221,7 +227,6 @@ public class VoteSettings
public bool GameMode { get; set; } = false; // Enables vote to change game mode
public bool GameSetting { get; set; } = false; // Enables vote to change game setting
public string Style { get; set; } = "center"; // Changes vote menu type (i.e. "chat" or "center")

}

// Create config from classes
Expand Down
10 changes: 10 additions & 0 deletions Contracts/IPluginDependency.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
using CounterStrikeSharp.API.Core;

namespace GameModeManager
{
public interface IPluginDependency<TPlugin, TConfig>
{
public virtual void OnConfigParsed(TConfig config) { }
public virtual void OnLoad(TPlugin plugin) { }
}
}
Loading

0 comments on commit ef30804

Please sign in to comment.