forked from abnerfs/cs2-rockthevote
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathConfig.cs
76 lines (66 loc) · 2.59 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
using CounterStrikeSharp.API.Core;
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 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 class EndOfMapConfig : IEndOfMapConfig {
public bool Enabled { get; set; } = true;
public int TriggerSecondsBeforeEnd { get; set; } = 120;
public int TriggerRoundsBeforEnd { get; set; } = 2;
public float DelayToChangeInTheEnd { get; set; } = 6F;
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 class RtvConfig : ICommandConfig, IVoteConfig, IEndOfMapConfig {
public bool Enabled { get; set; } = true;
public bool NominationEnabled { get; set; } = true;
public bool EnabledInWarmup { get; set; } = true;
public int MinPlayers { get; set; } = 0;
public int MinRounds { get; set; } = 0;
public bool HideHudAfterVote { get; set; } = false;
public int MapsToShow { get; set; } = 6;
public int VoteDuration { get; set; } = 30;
public bool HudMenu { get; set; } = true;
public bool ChangeMapImmediatly { get; set; } = true;
public int VotePercentage { get; set; } = 60;
}
public class VotemapConfig : ICommandConfig, IVoteConfig {
public bool Enabled { get; set; } = true;
public bool HudMenu { get; set; } = false;
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; } = true;
}
public class TimeleftConfig {
public bool ShowToAll { get; set; } = false;
}
public class NextmapConfig {
public bool ShowToAll { get; set; } = false;
}
public class Config : IBasePluginConfig {
public RtvConfig Rtv { get; set; } = new();
public VotemapConfig Votemap { get; set; } = new();
public EndOfMapConfig EndOfMapVote { get; set; } = new();
public TimeleftConfig Timeleft { get; set; } = new();
public NextmapConfig Nextmap { get; set; } = new();
public ushort MapsInCoolDown { get; set; } = 3;
public int Version { get; set; } = 9;
}