forked from abnerfs/cs2-rockthevote
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Config.cs
143 lines (128 loc) · 5.33 KB
/
Config.cs
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
using CounterStrikeSharp.API.Core;
using System.Text.Json.Serialization;
namespace cs2_rockthevote
{
public interface ICommandConfig
{
public bool EnabledInWarmup { get; set; }
public int MinPlayers { get; set; }
public int MinRounds { get; set; }
}
public interface IVoteConfig
{
public int VotePercentage { get; set; }
public bool ChangeMapImmediatly { get; set; }
public bool IgnoreSpec { get; set; }
}
public interface IEndOfMapConfig
{
public int MapsToShow { get; set; }
public bool ChangeMapImmediatly { get; set; }
public int VoteDuration { get; set; }
public bool HudMenu { get; set; }
public bool HideHudAfterVote { get; set; }
public int ExtendTimeStep { get; set; }
public int ExtendRoundStep { get; set; }
}
public interface IExtendMapConfig
{
public bool Enabled { get; set; }
public int VoteDuration { get; set; }
public int VotePercentage { get; set; }
public int ExtendTimeStep { get; set; }
public int ExtendRoundStep { get; set; }
public bool HudMenu { get; set; }
public int ExtendLimit { get; set; }
}
public class EndOfMapConfig : IEndOfMapConfig, IExtendMapConfig
{
public bool Enabled { get; set; } = true;
public int MapsToShow { get; set; } = 6;
public bool HudMenu { get; set; } = true;
public bool ChangeMapImmediatly { get; set; } = false;
public int VoteDuration { get; set; } = 30;
public bool HideHudAfterVote { get; set; } = false;
public int TriggerSecondsBeforeEnd { get; set; } = 120;
public int TriggerRoundsBeforEnd { get; set; } = 2;
public float DelayToChangeInTheEnd { get; set; } = 6F;
public bool AllowExtend { get; set; } = true;
public int ExtendTimeStep { get; set; } = 15;
public int ExtendRoundStep { get; set; } = 5;
public int VotePercentage { get; set; } = 60;
public int ExtendLimit { get; set; } = 3;
}
public class RtvConfig : ICommandConfig, IVoteConfig, IEndOfMapConfig, IExtendMapConfig
{
public bool Enabled { get; set; } = true;
public bool EnabledInWarmup { get; set; } = true;
public bool NominationEnabled { get; set; } = true;
public int MinPlayers { get; set; } = 0;
public int MinRounds { get; set; } = 0;
public bool ChangeMapImmediatly { get; set; } = true;
public bool HideHudAfterVote { get; set; } = false;
public int MapsToShow { get; set; } = 6;
public int VoteDuration { get; set; } = 30;
public int VotePercentage { get; set; } = 60;
public bool HudMenu { get; set; } = true;
public bool DontChangeRtv { get; set; } = true;
public bool IgnoreSpec { get; set; } = true;
public int VoteCooldownTime { get; set; } = 300;
public int ExtendTimeStep { get; set; } = 15;
public int ExtendRoundStep { get; set; } = 5;
public int ExtendLimit { get; set; } = 3;
}
public class ExtendConfig : ICommandConfig, IVoteConfig
{
public bool Enabled { get; set; } = true;
public bool EnabledInWarmup { get; set; } = true;
public int MinPlayers { get; set; } = 0;
public int MinRounds { get; set; } = 0;
public int VotePercentage { get; set; } = 60;
public bool ChangeMapImmediatly { get; set; } = false;
public bool IgnoreSpec { get; set; } = true;
public int ExtendTimeStep { get; set; } = 15;
public int ExtendRoundStep { get; set; } = 5;
public int ExtendLimit { get; set; } = 3;
}
public class VotemapConfig : ICommandConfig, IVoteConfig
{
public bool Enabled { get; set; } = true;
public int VotePercentage { get; set; } = 60;
public bool ChangeMapImmediatly { get; set; } = true;
public bool EnabledInWarmup { get; set; } = true;
public int MinPlayers { get; set; } = 0;
public int MinRounds { get; set; } = 0;
public bool HudMenu { get; set; } = false;
public bool IgnoreSpec { get; set; } = true;
}
public class TimeleftConfig
{
public bool ShowToAll { get; set; } = false;
}
public class NextmapConfig
{
public bool ShowToAll { get; set; } = false;
}
public class VipExtendMapConfig : IExtendMapConfig
{
public bool Enabled { get; set; } = true;
public int VoteDuration { get; set; } = 30;
public int VotePercentage { get; set; } = 60;
public int ExtendTimeStep { get; set; } = 15;
public int ExtendRoundStep { get; set; } = 5;
public int ExtendLimit { get; set; } = 3;
public bool HudMenu { get; set; } = true;
}
public class Config : IBasePluginConfig
{
public int Version { get; set; } = 14;
public RtvConfig Rtv { get; set; } = new();
public VotemapConfig Votemap { get; set; } = new();
public EndOfMapConfig EndOfMapVote { get; set; } = new();
public ExtendConfig ExtendMapVote { get; set; } = new();
public VipExtendMapConfig VipExtendMapVote { get; set; } = new();
public TimeleftConfig Timeleft { get; set; } = new();
public NextmapConfig Nextmap { get; set; } = new();
public ushort MapsInCoolDown { get; set; } = 3;
}
}