Adds support for a map rotation system. (#7162)

* Adds support for a map rotation system.
It is now the default way of selecting a map, map votes have been disabled.

* whoops

* Randomize the map it starts off with, too.
(it'd pick bagel every time otherwise)

* Address review

* remove knight from rotation due to it being an unmaintained map.

* minor cleanup
This commit is contained in:
Moony
2022-03-17 13:59:53 -05:00
committed by GitHub
parent afc0e3708e
commit 3721b3303b
5 changed files with 84 additions and 8 deletions

View File

@@ -126,6 +126,19 @@ namespace Content.Shared.CCVar
public static readonly CVarDef<bool>
GameMapForced = CVarDef.Create("game.mapforced", false, CVar.SERVERONLY);
/// <summary>
/// The depth of the queue used to calculate which map is next in rotation.
/// This is how long the game "remembers" that some map was put in play. Default is 16 rounds.
/// </summary>
public static readonly CVarDef<int>
GameMapMemoryDepth = CVarDef.Create("game.map_memory_depth", 16, CVar.SERVERONLY);
/// <summary>
/// Is map rotation enabled?
/// </summary>
public static readonly CVarDef<bool>
GameMapRotation = CVarDef.Create<bool>("game.map_rotation", true, CVar.SERVERONLY);
/// <summary>
/// Whether a random position offset will be applied to the station on roundstart.
/// </summary>
@@ -562,7 +575,7 @@ namespace Content.Shared.CCVar
/// See vote.enabled, but specific to map votes
/// </summary>
public static readonly CVarDef<bool> VoteMapEnabled =
CVarDef.Create("vote.map_enabled", true, CVar.SERVERONLY);
CVarDef.Create("vote.map_enabled", false, CVar.SERVERONLY);
/// <summary>
/// The required ratio of the server that must agree for a restart round vote to go through.