CatStation/Content.Shared/CCVar/CCVars.Misc.cs

145 lines
6.9 KiB
C#

using Robust.Shared.Configuration;
using Content.Shared.Administration;
using Content.Shared.CCVar.CVarAccess;
using Content.Shared.Mapping;
namespace Content.Shared.CCVar;
public sealed partial class CCVars
{
public static readonly CVarDef<bool> HolidaysEnabled = CVarDef.Create("holidays.enabled", true, CVar.SERVERONLY);
public static readonly CVarDef<bool> BrandingSteam = CVarDef.Create("branding.steam", false, CVar.CLIENTONLY);
public static readonly CVarDef<int> EntityMenuGroupingType = CVarDef.Create("entity_menu", 0, CVar.CLIENTONLY);
/// <summary>
/// Should we pre-load all of the procgen atlasses.
/// </summary>
public static readonly CVarDef<bool> ProcgenPreload =
CVarDef.Create("procgen.preload", true, CVar.SERVERONLY);
/// <summary>
/// Enabled: Cloning has 70% cost and reclaimer will refuse to reclaim corpses with souls. (For LRP).
/// Disabled: Cloning has full biomass cost and reclaimer can reclaim corpses with souls. (Playtested and balanced for MRP+).
/// </summary>
public static readonly CVarDef<bool> BiomassEasyMode =
CVarDef.Create("biomass.easy_mode", true, CVar.SERVERONLY);
/// <summary>
/// A scale factor applied to a grid's bounds when trying to find a spot to randomly generate an anomaly.
/// </summary>
public static readonly CVarDef<float> AnomalyGenerationGridBoundsScale =
CVarDef.Create("anomaly.generation_grid_bounds_scale", 0.6f, CVar.SERVERONLY);
/// <summary>
/// If enabled, the server automatically triggers an AFK check popup when a player's inactivity exceeds afk.time (or admin.afk_time for admins)
/// </summary>
public static readonly CVarDef<bool> AfkAutomaticChecks =
CVarDef.Create("afk.automatic_checks", true, CVar.SERVERONLY);
/// <summary>
/// How long a client can go without any input before being considered AFK.
/// </summary>
[CVarControl(AdminFlags.VarEdit, min: 0f, max: float.MaxValue)]
public static readonly CVarDef<float> AfkTime =
CVarDef.Create("afk.time", 600f, CVar.SERVER | CVar.REPLICATED);
// If afk players become an issue again, implement using a more aggressive time limit when server pop is near full
/// <summary>
/// How long a player has to confirm they are not AFK before being disconnected.
/// </summary>
[CVarControl(AdminFlags.Server, min: 10f, max: float.MaxValue)]
public static readonly CVarDef<float> AfkConfirmTimeout =
CVarDef.Create("afk.confirm_timeout", 60f, CVar.SERVER | CVar.REPLICATED);
/// <summary>
/// Sound played when the AFK confirmation window opens.
/// </summary>
[CVarControl(AdminFlags.Server)]
public static readonly CVarDef<string> AfkConfirmSound =
CVarDef.Create("afk.confirm_sound", "/Audio/Items/airhorn.ogg", CVar.SERVER | CVar.REPLICATED);
/// <summary>
/// Flavor limit. This is to ensure that having a large mass of flavors in
/// some food object won't spam a user with flavors.
/// </summary>
public static readonly CVarDef<int>
FlavorLimit = CVarDef.Create("flavor.limit", 10, CVar.SERVER | CVar.REPLICATED);
public static readonly CVarDef<string> DestinationFile =
CVarDef.Create("autogen.destination_file", "", CVar.SERVER | CVar.SERVERONLY);
/// <summary>
/// Whether uploaded files will be stored in the server's database.
/// This is useful to keep "logs" on what files admins have uploaded in the past.
/// </summary>
public static readonly CVarDef<bool> ResourceUploadingStoreEnabled =
CVarDef.Create("netres.store_enabled", true, CVar.SERVER | CVar.SERVERONLY);
/// <summary>
/// Numbers of days before stored uploaded files are deleted. Set to zero or negative to disable auto-delete.
/// This is useful to free some space automatically. Auto-deletion runs only on server boot.
/// </summary>
public static readonly CVarDef<int> ResourceUploadingStoreDeletionDays =
CVarDef.Create("netres.store_deletion_days", 30, CVar.SERVER | CVar.SERVERONLY);
/// <summary>
/// If a server update restart is pending, the delay after the last player leaves before we actually restart. In seconds.
/// </summary>
public static readonly CVarDef<float> UpdateRestartDelay =
CVarDef.Create("update.restart_delay", 20f, CVar.SERVERONLY);
/// <summary>
/// If fire alarms should have all access, or if activating/resetting these
/// should be restricted to what is dictated on a player's access card.
/// Defaults to true.
/// </summary>
public static readonly CVarDef<bool> FireAlarmAllAccess =
CVarDef.Create("firealarm.allaccess", true, CVar.SERVERONLY);
/// <summary>
/// Time between play time autosaves, in seconds.
/// </summary>
public static readonly CVarDef<float>
PlayTimeSaveInterval = CVarDef.Create("playtime.save_interval", 900f, CVar.SERVERONLY);
/// <summary>
/// The maximum amount of time the entity GC can process, in ms.
/// </summary>
public static readonly CVarDef<int> GCMaximumTimeMs =
CVarDef.Create("entgc.maximum_time_ms", 5, CVar.SERVERONLY);
public static readonly CVarDef<string> TippyEntity =
CVarDef.Create("tippy.entity", "Tippy", CVar.SERVER | CVar.REPLICATED);
/// <summary>
/// The number of seconds that must pass for a single entity to be able to point at something again.
/// </summary>
public static readonly CVarDef<float> PointingCooldownSeconds =
CVarDef.Create("pointing.cooldown_seconds", 0.5f, CVar.SERVERONLY);
/// <summary>
/// The last time the client recorded a valid connection to a game server.
/// Used in conjunction with <see cref="PlaytimeMinutesToday"/> to track how long the player has been playing for the given day.
/// </summary>
public static readonly CVarDef<string> PlaytimeLastConnectDate =
CVarDef.Create("playtime.last_connect_date", "", CVar.CLIENTONLY | CVar.ARCHIVE);
/// <summary>
/// The total minutes that the client has spent since the date of last connection.
/// This is reset to 0 when the last connect date is updated.
/// Do not read this value directly, use <code>ClientsidePlaytimeTrackingManager</code> instead.
/// </summary>
public static readonly CVarDef<float> PlaytimeMinutesToday =
CVarDef.Create("playtime.minutes_today", 0f, CVar.CLIENTONLY | CVar.ARCHIVE);
/// <summary>
/// If the cvar is enabled, every <see cref="StructureAlignerComponent"/> will be Aligned when the map initializes.
/// </summary>
/// <remarks>
/// May be considered a stopgap measure when unupgraded maps are in rotation?
/// </remarks>
public static readonly CVarDef<bool> MapInitAlign =
CVarDef.Create("align.map_init", false, CVar.SERVER | CVar.REPLICATED);
}