-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathRotation.cs
More file actions
69 lines (64 loc) · 1.83 KB
/
Copy pathRotation.cs
File metadata and controls
69 lines (64 loc) · 1.83 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
using BBRAPIModules;
using System.Threading.Tasks;
namespace BattleBitBaseModules;
[Module("Configure the map and game mode rotation of the server", "1.0.0")]
public class Rotation : BattleBitModule
{
public RotationConfiguration Configuration { get; set; } = null!;
public override Task OnConnected()
{
this.Logger.Info($"Setting up game mode rotation to {string.Join(", ", this.Configuration.GameModes)}");
this.Server.GamemodeRotation.SetRotation(this.Configuration.GameModes);
this.Logger.Debug($"New game mode rotation: {string.Join(", ", this.Server.GamemodeRotation.GetGamemodeRotation())}");
this.Logger.Info($"Setting up map rotation to {string.Join(", ", this.Configuration.Maps)}");
this.Server.MapRotation.SetRotation(this.Configuration.Maps);
this.Logger.Debug($"New map rotation: {string.Join(", ", this.Server.MapRotation.GetMapRotation())}");
return Task.CompletedTask;
}
}
public class RotationConfiguration : ModuleConfiguration
{
public string[] GameModes { get; set; } = new[]
{
"TDM",
"AAS",
"RUSH",
"CONQ",
"DOMI",
"ELI",
"INFCONQ",
"FRONTLINE",
"GunGameFFA",
"FFA",
"GunGameTeam",
"SuicideRush",
"CatchGame",
"Infected",
"CashRun",
"VoxelFortify",
"VoxelTrench",
"CaptureTheFlag"
};
public string[] Maps { get; set; } = new[]
{
"Azagor",
"Basra",
"Construction",
"District",
"Dustydew",
"Eduardovo",
"Frugis",
"Isle",
"Lonovo",
"MultuIslands",
"Namak",
"OilDunes",
"River",
"Salhan",
"SandySunset",
"TensaTown",
"Valley",
"Wakistan",
"WineParadise"
};
}