-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14 from FoxxoTrystan/Subtle
Sublte
- Loading branch information
Showing
10 changed files
with
122 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
using Content.Server.Chat.Systems; | ||
using Content.Shared.Administration; | ||
using Robust.Shared.Console; | ||
using Robust.Shared.Enums; | ||
|
||
namespace Content.Server.Chat.Commands | ||
{ | ||
[AnyCommand] | ||
internal sealed class SubtleCommand : IConsoleCommand | ||
{ | ||
public string Command => "subtle"; | ||
public string Description => "Perform an subtle action."; | ||
public string Help => "subtle <text>"; | ||
|
||
public void Execute(IConsoleShell shell, string argStr, string[] args) | ||
{ | ||
if (shell.Player is not { } player) | ||
{ | ||
shell.WriteError("This command cannot be run from the server."); | ||
return; | ||
} | ||
|
||
if (player.Status != SessionStatus.InGame) | ||
return; | ||
|
||
if (player.AttachedEntity is not {} playerEntity) | ||
{ | ||
shell.WriteError("You don't have an entity!"); | ||
return; | ||
} | ||
|
||
if (args.Length < 1) | ||
return; | ||
|
||
var message = string.Join(" ", args).Trim(); | ||
if (string.IsNullOrEmpty(message)) | ||
return; | ||
|
||
IoCManager.Resolve<IEntitySystemManager>().GetEntitySystem<ChatSystem>() | ||
.TrySendInGameICMessage(playerEntity, message, InGameICChatType.Subtle, ChatTransmitRange.NoGhosts, false, shell, player); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
hud-chatbox-channel-Subtle = Subtle | ||
hud-chatbox-select-channel-Subtle = Subtle |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters