diff --git a/Content.Server/GameTicking/GameTicker.cs b/Content.Server/GameTicking/GameTicker.cs index 114ab2023d..0efeed6880 100644 --- a/Content.Server/GameTicking/GameTicker.cs +++ b/Content.Server/GameTicking/GameTicker.cs @@ -68,7 +68,6 @@ namespace Content.Server.GameTicking public const float PresetFailedCooldownIncrease = 30f; private const string PlayerPrototypeName = "HumanMob_Content"; private const string ObserverPrototypeName = "MobObserver"; - private const string MapFile = "Maps/saltern.yml"; private static TimeSpan _roundStartTimeSpan; [ViewVariables] private readonly List _gameRules = new List(); @@ -699,11 +698,16 @@ namespace Content.Server.GameTicking DisallowLateJoin = false; } + private string GetMap() + { + return _configurationManager.GetCVar(CCVars.GameMap); + } + private void _preRoundSetup() { DefaultMap = _mapManager.CreateMap(); var startTime = _gameTiming.RealTime; - var grid = _mapLoader.LoadBlueprint(DefaultMap, MapFile); + var grid = _mapLoader.LoadBlueprint(DefaultMap, GetMap()); DefaultGridId = grid.Index; _spawnPoint = grid.ToCoordinates(); diff --git a/Content.Shared/CCVars.cs b/Content.Shared/CCVars.cs index faf2c627d1..dfd91e0b3b 100644 --- a/Content.Shared/CCVars.cs +++ b/Content.Shared/CCVars.cs @@ -46,6 +46,9 @@ namespace Content.Shared public static readonly CVarDef GameMaxCharacterSlots = CVarDef.Create("game.maxcharacterslots", 10, CVar.ARCHIVE | CVar.SERVERONLY); + public static readonly CVarDef + GameMap = CVarDef.Create("game.map", "Maps/saltern.yml", CVar.SERVERONLY); + /// /// When enabled, guests will be assigned permanent UIDs and will have their preferences stored. ///