GameLoop/GameSettings.cs
/// <summary>
/// The game settings for this server
/// </summary>
public static class GameSettings
{
/// <summary>
/// Enable or disable the game loop. Mainly for developers, so they don't have to sit through the timer every time.
/// </summary>
[ConVar( "sbdm.gameloop", ConVarFlags.Replicated | ConVarFlags.Saved )]
public static bool GameLoop { get; set; } = true;
/// <summary>
/// Give you everything
/// </summary>
[ConVar( "sbdm.cheatmode", ConVarFlags.Replicated | ConVarFlags.Saved | ConVarFlags.GameSetting | ConVarFlags.Cheat ), Group( "Cheats" ), Title( "Spawn with all weapons" )]
public static bool CheatMode { get; set; } = false;
/// <summary>
/// All weapons have infinite ammo
/// </summary>
[ConVar( "sbdm.infammo", ConVarFlags.Replicated | ConVarFlags.GameSetting ), Group( "Cheats" )]
public static bool InfiniteAmmo { get; set; } = false;
/// <summary>
/// Show debug information
/// </summary>
[ConVar( "sbdm.debug", ConVarFlags.Replicated ), Group( "Cheats" )]
public static int Debug { get; set; } = 0;
/// <summary>
/// Start delay, countdown to game start
/// </summary>
[ConVar( "sbdm.warmuptime", ConVarFlags.Replicated | ConVarFlags.GameSetting ), Group( "Gameplay" ), Range( 0, 30 ), Step( 1 )]
public static float WarmupTime { get; set; } = 7;
/// <summary>
/// How long the round is, in seconds
/// </summary>
[ConVar( "sbdm.roundtime", ConVarFlags.Replicated | ConVarFlags.GameSetting ), Group( "Gameplay" ), Range( 60, 600 ), Step( 1 )]
public static float RoundTime { get; set; } = 60 * 5;
/// <summary>
/// How long the scoreboard shows at the end in seconds
/// </summary>
[ConVar( "sbdm.resulttime", ConVarFlags.Replicated ), Group( "Gameplay" )]
public static float ResultTime { get; set; } = 15;
/// <summary>
/// Multiply all bullet radiuses by this
/// </summary>
[ConVar( "skill.bulletradius", ConVarFlags.Replicated | ConVarFlags.GameSetting )]
[Range( 0.1f, 10f ), Step( 0.1f ), Group( "Weapons" )]
public static float BulletRadius { get; set; } = 1;
/// <summary>
/// Radius of the mp5's bullet
/// </summary>
[ConVar( "mp5.bulletradius", ConVarFlags.Replicated | ConVarFlags.GameSetting )]
[Range( 0.1f, 10f ), Step( 0.1f ), Group( "Weapons" ), Title( "MP5 Bullet Radius" )]
public static float Mp5BulletRadius { get; set; } = 1;
/// <summary>
/// Radius of the glock's bullet
/// </summary>
[ConVar( "glock.bulletradius", ConVarFlags.Replicated | ConVarFlags.GameSetting )]
[Range( 0.1f, 10f ), Step( 0.1f ), Group( "Weapons" )]
public static float GlockBulletRadius { get; set; } = 1f;
/// <summary>
/// Radius of the python's bullet
/// </summary>
[ConVar( "python.bulletradius", ConVarFlags.Replicated | ConVarFlags.GameSetting )]
[Range( 0.1f, 10f ), Step( 0.1f ), Group( "Weapons" )]
public static float PythonBulletRadius { get; set; } = 2f;
/// <summary>
/// Radius of the shotgun's bullet
/// </summary>
[ConVar( "shotgun.bulletradius", ConVarFlags.Replicated | ConVarFlags.GameSetting )]
[Range( 0.1f, 10f ), Step( 0.1f ), Group( "Weapons" )]
public static float ShotgunBulletRadius { get; set; } = 2f;
/// <summary>
/// Radius of the crossbow's bullet (when zoomed)
/// </summary>
[ConVar( "crossbow.bulletradius", ConVarFlags.Replicated | ConVarFlags.GameSetting )]
[Range( 0.1f, 10f ), Step( 0.1f ), Group( "Weapons" )]
public static float CrossbowBulletRadius { get; set; } = 1f;
/// <summary>
/// Minimum time between throwing satchels
/// </summary>
[ConVar( "satchel.thowdelay", ConVarFlags.Replicated | ConVarFlags.GameSetting )]
[Range( 0.1f, 10f ), Step( 0.1f ), Group( "Weapons" )]
public static float SatchelThrowDelay { get; set; } = 0.2f;
/// <summary>
/// Minimum time between throwing satchels
/// </summary>
[ConVar( "satchel.thowpower", ConVarFlags.Replicated | ConVarFlags.GameSetting )]
[Range( 250f, 2500f ), Step( 1 ), Group( "Weapons" )]
public static float SatchelThrowPower { get; set; } = 500.0f;
/// <summary>
/// Scale of damage when headshotting a player with most weapons.
/// </summary>
[ConVar( "sbdm.headshotscale", ConVarFlags.Replicated | ConVarFlags.GameSetting )]
[Range( 0.1f, 10f ), Step( 0.1f ), Group( "Weapons" )]
public static float HeadshotDamageScale { get; set; } = 2.0f;
/// <summary>
/// Maximum decals that can exist. Remove old ones when new ones are created.
/// </summary>
[ConVar( "sbdm.maxdecals", ConVarFlags.Replicated | ConVarFlags.GameSetting )]
[Range( 64, 1024f ), Step( 1 ), Group( "Weapons" )]
public static int MaxDecals { get; set; } = 512;
/// <summary>
/// A list of maps that we'll pick randomly from if map voting is not enabled
/// </summary>
[ConVar( "sbdm.maplist", ConVarFlags.Replicated )]
public static string MapList { get; set; } = "facepunch.depot;thieves.marine_base_arena";
/// <summary>
/// How many maps will show up in the voting screen?
/// </summary>
[ConVar( "sbdm.mapvotecount", ConVarFlags.Replicated ), Group( "Maps" )]
[Range( 2, 10 )]
public static int MapVoteCount { get; set; } = 8;
[ConVar( "sbdm.mapvotetime", ConVarFlags.Replicated | ConVarFlags.GameSetting ), Group( "Maps" )]
public static float MapVoteTime { get; set; } = 15f;
/// <summary>
/// How many bots to add to the lobby.
/// </summary>
[ConVar( "sbdm.bots.count", ConVarFlags.GameSetting )]
[Range( 0, 8 ), Group( "Bots" )]
public static int BotCount { get; set; } = 0;
/// <summary>
/// How likely bots will target the head when aiming.
/// </summary>
[ConVar( "sbdm.bots.headshotbias", ConVarFlags.GameSetting )]
[Range( 0, 10 ), Step( 1 ), Group( "Bots" )]
public static float BotHeadShotBias { get; set; } = 1.0f;
/// <summary>
/// How fast a bot track moving targets.
/// </summary>
[ConVar( "sbdm.bots.reactionspeedbias", ConVarFlags.GameSetting )]
[Range( 0, 10 ), Step( 1 ), Group( "Bots" )]
public static float BotReactionSpeedBias { get; set; } = 1.0f;
/// <summary>
/// Can be used to improve or worsen bot accuracy.
/// </summary>
[ConVar( "sbdm.bots.accuracybias", ConVarFlags.GameSetting )]
[Range( 0, 1 ), Step( 1 ), Group( "Bots" )]
public static float BotAccuracy { get; set; } = 0.5f;
/// <summary>
/// If set to true will run a simulated bot match
/// </summary>
[ConVar( "sbdm.dev.benchmark", ConVarFlags.Replicated | ConVarFlags.Cheat ), Group( "Cheats" )]
public static bool IsBenchmark { get; set; } = false;
}