From d9506ce3a62134a7ee13dd28b1d7ba97c51a7314 Mon Sep 17 00:00:00 2001 From: ArkiveDev <95712736+ArkiveDev@users.noreply.github.com> Date: Mon, 24 Jun 2024 06:56:21 -0400 Subject: [PATCH] Force map confirmation (#29391) * Add map check to forcemap command * remove debug line * remove accidental newline --- Content.Server/GameTicking/Commands/ForceMapCommand.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Content.Server/GameTicking/Commands/ForceMapCommand.cs b/Content.Server/GameTicking/Commands/ForceMapCommand.cs index 5d2191fb52..5677ff4b8f 100644 --- a/Content.Server/GameTicking/Commands/ForceMapCommand.cs +++ b/Content.Server/GameTicking/Commands/ForceMapCommand.cs @@ -29,6 +29,12 @@ namespace Content.Server.GameTicking.Commands var gameMap = IoCManager.Resolve(); var name = args[0]; + if (!gameMap.TrySelectMapIfEligible(name)) + { + shell.WriteLine($"No eligible map exists with name {name}."); + return; + } + _configurationManager.SetCVar(CCVars.GameMap, name); shell.WriteLine(Loc.GetString("forcemap-command-success", ("map", name))); } -- 2.51.2