]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
[ChangeCVarCommand] Mapping Command (#35239)
authorSimon <63975668+Simyon264@users.noreply.github.com>
Tue, 18 Feb 2025 10:26:08 +0000 (11:26 +0100)
committerGitHub <noreply@github.com>
Tue, 18 Feb 2025 10:26:08 +0000 (11:26 +0100)
[ChangeCVarCommand] MappingCommand

Content.Server/Mapping/MappingCommand.cs
Content.Shared/CCVar/CCVars.Events.cs
Content.Shared/CCVar/CCVars.Shuttle.cs
Resources/Locale/en-US/cvar/cvar-help.ftl

index b85b0953dddcff79b2fd7f61762924a20c86369f..85c561b9db073521df40355b2827a767a88bddb7 100644 (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"}");
index 48797b8438cf5ffb507e6e68490b9849057978f6..c1be29a023c216403407261864430a9cde8d4dda 100644 (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);
 }
index caf7f81b0e135795d257bd9c3e38a7ef4e3d292f..74d3bf8cfb32c77243db789ae7fb927adfe6449e 100644 (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);
 
index 39f7c7636b587efdd945e4c9673363ff49a092fb..55b0cb6188c68e918d00189ebf03e456f593d365 100644 (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.