From: ArkiveDev <95712736+ArkiveDev@users.noreply.github.com> Date: Mon, 24 Jun 2024 10:56:21 +0000 (-0400) Subject: Force map confirmation (#29391) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=d9506ce3a62134a7ee13dd28b1d7ba97c51a7314;p=space-station-14.git Force map confirmation (#29391) * Add map check to forcemap command * remove debug line * remove accidental newline --- 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))); }