Define CVars in a central location.

Instead of a bunch of RegisterCVar<> calls, it's now similar to Key Functions.
This commit is contained in:
Pieter-Jan Briers
2020-09-25 21:21:22 +02:00
parent 927869a7b0
commit d4fefd4046
4 changed files with 132 additions and 8 deletions

25
Content.Shared/CCVars.cs Normal file
View File

@@ -0,0 +1,25 @@
using Robust.Shared;
using Robust.Shared.Configuration;
namespace Content.Shared
{
// ReSharper disable once InconsistentNaming
[CVarDefs]
public sealed class CCVars : CVars
{
public static readonly CVarDef<bool>
GameLobbyEnabled = CVarDef.Create("game.lobbyenabled", false, CVar.ARCHIVE);
public static readonly CVarDef<int>
GameLobbyDuration = CVarDef.Create("game.lobbyduration", 20, CVar.ARCHIVE);
public static readonly CVarDef<string>
GameLobbyDefaultPreset = CVarDef.Create("game.defaultpreset", "Suspicion", CVar.ARCHIVE);
public static readonly CVarDef<string>
GameLobbyFallbackPreset = CVarDef.Create("game.fallbackpreset", "Sandbox", CVar.ARCHIVE);
public static readonly CVarDef<bool>
GameLobbyEnableWin = CVarDef.Create("game.enablewin", true, CVar.ARCHIVE);
}
}