-
Notifications
You must be signed in to change notification settings - Fork 34
/
Config.cs
89 lines (78 loc) · 3.01 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
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 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 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 class RtvConfig : ICommandConfig, IVoteConfig, IEndOfMapConfig
{
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 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 class TimeleftConfig
{
public bool ShowToAll { get; set; } = false;
}
public class NextmapConfig
{
public bool ShowToAll { get; set; } = false;
}
public class Config : IBasePluginConfig
{
public int Version { get; set; } = 9;
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;
}
}