MotD (#13655)
* MOTD * Message of the Day * Pretty sure the tests aren't me. Let's check. * Update Content.Shared/CCVar/CCVars.cs Co-authored-by: AJCM-git <60196617+AJCM-git@users.noreply.github.com> * command dependencies and moving MOTD to its own system * Some doc comments * Let's try those tests again * More doc comments, most of the github reviews, and aliases for get-motd and set-motd * Clear test MOTD * Localized motd commands and completion hints * Makes set-motd only show up in the alias command if the player has access to it. --------- Co-authored-by: AJCM-git <60196617+AJCM-git@users.noreply.github.com>
This commit is contained in:
@@ -77,6 +77,7 @@ public sealed partial class ChatSystem : SharedChatSystem
|
||||
base.Shutdown();
|
||||
ShutdownEmotes();
|
||||
_configurationManager.UnsubValueChanged(CCVars.LoocEnabled, OnLoocEnabledChanged);
|
||||
_configurationManager.UnsubValueChanged(CCVars.DeadLoocEnabled, OnDeadLoocEnabledChanged);
|
||||
}
|
||||
|
||||
private void OnLoocEnabledChanged(bool val)
|
||||
@@ -99,13 +100,17 @@ public sealed partial class ChatSystem : SharedChatSystem
|
||||
|
||||
private void OnGameChange(GameRunLevelChangedEvent ev)
|
||||
{
|
||||
if (_configurationManager.GetCVar(CCVars.OocEnableDuringRound))
|
||||
return;
|
||||
|
||||
if (ev.New == GameRunLevel.InRound)
|
||||
_configurationManager.SetCVar(CCVars.OocEnabled, false);
|
||||
else if (ev.New == GameRunLevel.PostRound)
|
||||
_configurationManager.SetCVar(CCVars.OocEnabled, true);
|
||||
switch(ev.New)
|
||||
{
|
||||
case GameRunLevel.InRound:
|
||||
if(!_configurationManager.GetCVar(CCVars.OocEnableDuringRound))
|
||||
_configurationManager.SetCVar(CCVars.OocEnabled, false);
|
||||
break;
|
||||
case GameRunLevel.PostRound:
|
||||
if(!_configurationManager.GetCVar(CCVars.OocEnableDuringRound))
|
||||
_configurationManager.SetCVar(CCVars.OocEnabled, true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user