* 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:
TemporalOroboros
2023-02-28 08:15:48 -08:00
committed by GitHub
parent c8d9d05bcf
commit 93ec824d57
7 changed files with 244 additions and 7 deletions

View File

@@ -0,0 +1,20 @@
using Content.Shared.Administration;
using Robust.Shared.Console;
namespace Content.Server.Motd;
/// <summary>
/// A command that can be used by any player to print the Message of the Day.
/// </summary>
[AnyCommand]
public sealed class GetMotdCommand : LocalizedCommands
{
[Dependency] private readonly IEntityManager _entityManager = default!;
public override string Command => "get-motd";
public override void Execute(IConsoleShell shell, string argStr, string[] args)
{
_entityManager.EntitySysManager.GetEntitySystem<MOTDSystem>().TrySendMOTD(shell);
}
}