Files
tbd-station-14/Content.Shared/CCVar/CCVars.cs
Simon 29029d2586 Add ability for admins to change certain cvars via command. (#35105)
* Add ability for admins to change certain cvars via command.

* Cleanup

* More cleanup.

* Even more cleanup.

* WAITER! WAITER! ONE MORE COMMIT PLEASE!

* Remove requirement for Admin AdminFlag

Not needed as the command checks for the perms.

* Add search function to CVars and help text

* Move to controller instead.

* Add another cvar for testing

* Remove unused comment

* Move to Post Server Initialize

LoC does not work at the earlier stages of server initalization

* Remove unneeded comment

We clear out list so its no longer needed
2025-02-16 10:06:13 +01:00

41 lines
1.3 KiB
C#

using Content.Shared.Administration;
using Content.Shared.CCVar.CVarAccess;
using Robust.Shared;
using Robust.Shared.Configuration;
namespace Content.Shared.CCVar;
/// <summary>
/// Contains all the CVars used by content.
/// </summary>
/// <remarks>
/// NOTICE FOR FORKS: Put your own CVars in a separate file with a different [CVarDefs] attribute. RT will automatically pick up on it.
/// </remarks>
[CVarDefs]
public sealed partial class CCVars : CVars
{
// Only debug stuff lives here.
#if DEBUG
[CVarControl(AdminFlags.Debug)]
public static readonly CVarDef<string> DebugTestCVar =
CVarDef.Create("debug.test_cvar", "default", CVar.SERVER);
[CVarControl(AdminFlags.Debug)]
public static readonly CVarDef<float> DebugTestCVar2 =
CVarDef.Create("debug.test_cvar2", 123.42069f, CVar.SERVER);
#endif
/// <summary>
/// A simple toggle to test <c>OptionsVisualizerComponent</c>.
/// </summary>
public static readonly CVarDef<bool> DebugOptionVisualizerTest =
CVarDef.Create("debug.option_visualizer_test", false, CVar.CLIENTONLY);
/// <summary>
/// Set to true to disable parallel processing in the pow3r solver.
/// </summary>
public static readonly CVarDef<bool> DebugPow3rDisableParallel =
CVarDef.Create("debug.pow3r_disable_parallel", true, CVar.SERVERONLY);
}