[ChangeCVarCommand] Mapping Command (#35239)

[ChangeCVarCommand] MappingCommand
This commit is contained in:
Simon
2025-02-18 11:26:08 +01:00
committed by GitHub
parent 0f4ab0e84e
commit eff25810c5
4 changed files with 16 additions and 4 deletions

View File

@@ -117,8 +117,8 @@ namespace Content.Server.Mapping
}
// don't interrupt mapping with events or auto-shuttle
shell.ExecuteCommand("sudo cvar events.enabled false");
shell.ExecuteCommand("sudo cvar shuttle.auto_call_time 0");
shell.ExecuteCommand("changecvar events.enabled false");
shell.ExecuteCommand("changecvar shuttle.auto_call_time 0");
if (_cfg.GetCVar(CCVars.AutosaveEnabled))
shell.ExecuteCommand($"toggleautosave {mapId} {toLoad ?? "NEWMAP"}");

View File

@@ -1,4 +1,6 @@
using Robust.Shared.Configuration;
using Content.Shared.Administration;
using Content.Shared.CCVar.CVarAccess;
using Robust.Shared.Configuration;
namespace Content.Shared.CCVar;
@@ -7,6 +9,7 @@ public sealed partial class CCVars
/// <summary>
/// Controls if the game should run station events
/// </summary>
[CVarControl(AdminFlags.Server | AdminFlags.Mapping)]
public static readonly CVarDef<bool>
EventsEnabled = CVarDef.Create("events.enabled", true, CVar.ARCHIVE | CVar.SERVERONLY);
}

View File

@@ -1,4 +1,6 @@
using Robust.Shared.Configuration;
using Content.Shared.Administration;
using Content.Shared.CCVar.CVarAccess;
using Robust.Shared.Configuration;
namespace Content.Shared.CCVar;
@@ -170,6 +172,7 @@ public sealed partial class CCVars
/// <summary>
/// Time in minutes after round start to auto-call the shuttle. Set to zero to disable.
/// </summary>
[CVarControl(AdminFlags.Server | AdminFlags.Mapping, min: 0, max: int.MaxValue)]
public static readonly CVarDef<int> EmergencyShuttleAutoCallTime =
CVarDef.Create("shuttle.auto_call_time", 90, CVar.SERVERONLY);

View File

@@ -1,6 +1,12 @@
changecvar-simple-debug_test_cvar = Does nothing.
changecvar-full-debug_test_cvar = Just a simple testing cvar. Does nothing.
changecvar-simple-events_enabled = Controls if the game should run station events.
changecvar-full-events_enabled = Controls if the game should run station events.
changecvar-simple-shuttle_auto_call_time = Time after round start to auto-call the shuttle.
changecvar-full-shuttle_auto_call_time = Time in minutes after round start to auto-call the shuttle. Set to zero to disable.
changecvar-simple-playtest_all_damage_modifier = Multiplier for all damage dealt.
changecvar-full-playtest_all_damage_modifier = Multiplier for all damage dealt.
changecvar-simple-playtest_all_heal_modifier = Multiplier for all healing done.