Allow gamemodes to specify custom map pools (#18429)

* Allow game presets to require certain maps

* make preset maps ignore the game map pool

* make it use a map pool prototype

* Typo

---------

Co-authored-by: Kevin Zheng <kevinz5000@gmail.com>
This commit is contained in:
Nemanja
2023-08-01 17:11:50 -04:00
committed by GitHub
parent b7382646b6
commit 27231420bc
8 changed files with 102 additions and 29 deletions

View File

@@ -44,7 +44,8 @@ namespace Content.Server.GameTicking
private string GetInfoText()
{
if (Preset == null)
var preset = CurrentPreset ?? Preset;
if (preset == null)
{
return string.Empty;
}
@@ -72,8 +73,8 @@ namespace Content.Server.GameTicking
stationNames.Append(Loc.GetString("game-ticker-no-map-selected"));
}
var gmTitle = Loc.GetString(Preset.ModeTitle);
var desc = Loc.GetString(Preset.Description);
var gmTitle = Loc.GetString(preset.ModeTitle);
var desc = Loc.GetString(preset.Description);
return Loc.GetString(RunLevel == GameRunLevel.PreRoundLobby ? "game-ticker-get-info-preround-text" : "game-ticker-get-info-text",
("roundId", RoundId), ("playerCount", playerCount), ("readyCount", readyCount), ("mapName", stationNames.ToString()),("gmTitle", gmTitle),("desc", desc));
}