Skip to content

Commit

Permalink
CVars, yay.
Browse files Browse the repository at this point in the history
  • Loading branch information
Monotheonist committed Jan 8, 2025
1 parent a3198f0 commit 7563c2e
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions Content.Shared/_Impstation/CCVars/ImpCCVars.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
using Robust.Shared;
using Robust.Shared.Configuration;

namespace Content.Shared.CCVar;

/// <summary>
/// Contains all the CVars used by the random announcer system. From Impstation.
// I'm pretty sure this is the entirety of what it needs to function.
/// </summary>

// ReSharper disable once InconsistentNaming - Shush you!!
[CVarDefs]
public sealed class CCVars : CVars
{
/*
* Announcers
*/

/// <summary>
/// Weighted list of announcers to choose from
/// </summary>
public static readonly CVarDef<string> AnnouncerList =
CVarDef.Create("announcer.list", "RandomAnnouncers", CVar.REPLICATED);

/// <summary>
/// Optionally force set an announcer
/// </summary>
public static readonly CVarDef<string> Announcer =
CVarDef.Create("announcer.announcer", "", CVar.SERVERONLY);

/// <summary>
/// Optionally blacklist announcers
/// List of IDs separated by commas
/// </summary>
public static readonly CVarDef<string> AnnouncerBlacklist =
CVarDef.Create("announcer.blacklist", "", CVar.SERVERONLY);

/// <summary>
/// Changes how loud the announcers are for the client
/// </summary>
public static readonly CVarDef<float> AnnouncerVolume =
CVarDef.Create("announcer.volume", 0.5f, CVar.ARCHIVE | CVar.CLIENTONLY);

/// <summary>
/// Disables multiple announcement sounds from playing at once
/// </summary>
public static readonly CVarDef<bool> AnnouncerDisableMultipleSounds =
CVarDef.Create("announcer.disable_multiple_sounds", false, CVar.ARCHIVE | CVar.CLIENTONLY);

}

0 comments on commit 7563c2e

Please sign in to comment.