forked from abnerfs/cs2-rockthevote
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathConfig.cs
More file actions
148 lines (132 loc) · 6.24 KB
/
Copy pathConfig.cs
File metadata and controls
148 lines (132 loc) · 6.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
using CounterStrikeSharp.API.Core;
using System.Text.Json.Serialization;
namespace cs2_rockthevote
{
public class RtvConfig
{
public bool Enabled { get; set; } = true;
public bool EnabledInWarmup { get; set; } = false;
public bool EnablePanorama { get; set; } = false;
public int MinPlayers { get; set; } = 0;
public int MinRounds { get; set; } = 0;
public bool ChangeAtRoundEnd { get; set; } = false;
public int MapChangeDelay { get; set; } = 5;
public bool SoundEnabled { get; set; } = false;
public float SoundVolume { get; set; } = 1.0F;
public string SoundPath { get; set; } = "sounds/vo/announcer/cs2_classic/felix_broken_fang_pick_1_map_tk01.vsnd_c";
public int MapsToShow { get; set; } = 6;
public bool AlwaysActive { get; set; } = true;
public bool AlwaysActiveReminder { get; set; } = true;
public int ReminderInterval { get; set; } = 180;
public int RtvVoteDuration { get; set; } = 60;
public int MapVoteDuration { get; set; } = 60;
public int CooldownDuration { get; set; } = 180;
public int MapStartDelay { get; set; } = 180;
public int VotePercentage { get; set; } = 51;
public bool EnableCountdown { get; set; } = true;
public string CountdownType { get; set; } = "chat";
public int ChatCountdownInterval { get; set; } = 15;
}
public class EndOfMapConfig
{
public bool Enabled { get; set; } = true;
public bool EnableRevote {get; set; } = false;
public int MapsToShow { get; set; } = 6;
public string MenuType { get; set; } = "WasdMenu";
public bool ChangeMapImmediately { get; set; } = false;
public int VoteDuration { get; set; } = 150;
public bool SoundEnabled { get; set; } = true;
public float SoundVolume { get; set; } = 0.5F;
public string SoundPath { get; set; } = "1974266470";
public int TriggerSecondsBeforeEnd { get; set; } = 180;
public int TriggerRoundsBeforeEnd { get; set; } = 0;
public float DelayToChangeInTheEnd { get; set; } = 0F;
public bool IncludeExtendCurrentMap { get; set; } = true;
public bool EnableCountdown { get; set; } = false;
public string CountdownType { get; set; } = "chat";
public int ChatCountdownInterval { get; set; } = 30;
public bool ChatMapChoiceReminder { get; set; } = true;
public int ChatMapChoiceInterval { get; set; } = 30;
public bool EnableHint { get; set; } = false;
public string HintType { get; set; } = "GameHint";
}
public class VotemapConfig
{
public bool Enabled { get; set; } = false;
public string MenuType { get; set; } = "WasdMenu";
public int VotePercentage { get; set; } = 50;
public bool ChangeMapImmediately { get; set; } = true;
public bool EnabledInWarmup { get; set; } = false;
public int MinPlayers { get; set; } = 0;
public int MinRounds { get; set; } = 0;
public string Permission { get; set; } = "@css/vip";
[JsonIgnore]
public string[] Permissions => PermissionUtility.Parse(Permission);
}
public class VoteExtendConfig
{
public bool Enabled { get; set; } = false;
public bool EnablePanorama { get; set; } = true;
public int VoteDuration { get; set; } = 60;
public int VotePercentage { get; set; } = 50;
public int CooldownDuration { get; set; } = 180;
public bool EnableCountdown { get; set; } = true;
public string CountdownType { get; set; } = "chat";
public int ChatCountdownInterval { get; set; } = 15;
public string Permission { get; set; } = "@css/vip";
[JsonIgnore]
public string[] Permissions => PermissionUtility.Parse(Permission);
}
public class NominateConfig
{
public bool Enabled { get; set; } = true;
public bool EnabledInWarmup { get; set; } = true;
public string MenuType { get; set; } = "WasdMenu";
public int NominateLimit { get; set; } = 1;
public string Permission { get; set; } = "";
[JsonIgnore]
public string[] Permissions => PermissionUtility.Parse(Permission);
}
public class MapChooserConfig
{
public string Command { get; set; } = "mapmenu,mm";
public string MenuType { get; set; } = "WasdMenu";
public string Permission { get; set; } = "@css/changemap";
[JsonIgnore]
public string[] Permissions => PermissionUtility.Parse(Permission);
}
public class GeneralConfig
{
public string AdminPermission { get; set; } = "@css/root";
[JsonIgnore]
public string[] AdminPermissions => PermissionUtility.Parse(AdminPermission);
public bool DebugLogging { get; set; } = false;
public int MaxMapExtensions { get; set; } = 2;
public string DisableMapExtensions { get; set; } = "";
[JsonIgnore]
public string[] DisabledExtensionMaps => PermissionUtility.Parse(DisableMapExtensions);
public int RoundTimeExtension { get; set; } = 15;
public int MapsInCoolDown { get; set; } = 3;
public bool HideHudAfterVote { get; set; } = true;
public bool RandomStartMap { get; set; } = false;
public bool IncludeSpectator { get; set; } = true;
public bool IncludeAFK { get; set; } = true;
public int AFKCheckInterval { get; set; } = 30;
public bool EnableMapValidation { get; set; } = false;
public string SteamApiKey { get; set; } = "";
public string DiscordWebhook { get; set; } = "";
}
public class Config : BasePluginConfig, IBasePluginConfig
{
public const int CurrentVersion = 24;
[JsonPropertyName("ConfigVersion")]
public override int Version { get; set; } = CurrentVersion;
public RtvConfig Rtv { get; set; } = new();
public EndOfMapConfig EndOfMapVote { get; set; } = new();
public NominateConfig Nominate { get; set; } = new();
public VotemapConfig Votemap { get; set; } = new();
public VoteExtendConfig VoteExtend { get; set; } = new();
public MapChooserConfig MapChooser { get; set; } = new();
public GeneralConfig General { get; set; } = new();
}
}