Files
tbd-station-14/Content.Server/Chat/Commands/WhisperCommand.cs
HerCoyote23 e45dd96af9 Northstar Gloves (#16021)
* Added Gloves of North Star, no sprite or talking yet...

* Added sprites for the gloves of the north star...

* Replaced more placeholder sprites for northstar gloves...

* Added gloves of the north star to uplink...

* Added speech on hit, not yet configureable

* Not functional yet, but a step in the right direction I hope...

* IT WORKS!!

* Licensing and cleanup

* Reduced attack speed, changed from chat to popup, added some admin logging. It was causing too much adminlog spam otherwise

* Reorganized some files, final build??

* Changed the adminlog type from Verb to new type ItemConfigure

* More cleanup, fix sprite reference maybe

* Keronshb's suggestions, fixed some stuff, made hit sound use the meaty punch sfx

* Adds support for hiding speak/whisper/emote from adminlogs, makes northstar speak again!

* Some file shuffling, some of Keronshb's requests. Might appear a bit funky in github because vscode kept duplicating files for some reason and I had to delete them

* Made it work with the latest changes on Master

* Final? cleanup, upped dmg to 8, made ui not activate on activateinhand, instead you need to right click

* Set value to 0 credits, that's all

* Well that was much easier than I made it out to be. Now you can only activate the gloves with right click, no more mispredicts.

* Update MeleeWeaponSystem.cs

Iunno why this got changed in the first place, but I'm changin it back

* emptycommit

* emptycommit

* The tiny fixening
2023-05-23 14:12:30 -04:00

45 lines
1.4 KiB
C#

using Content.Server.Chat.Systems;
using Content.Shared.Administration;
using Robust.Server.Player;
using Robust.Shared.Console;
using Robust.Shared.Enums;
namespace Content.Server.Chat.Commands
{
[AnyCommand]
internal sealed class WhisperCommand : IConsoleCommand
{
public string Command => "whisper";
public string Description => "Send chat messages to the local channel as a whisper";
public string Help => "whisper <text>";
public void Execute(IConsoleShell shell, string argStr, string[] args)
{
if (shell.Player is not IPlayerSession 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.Whisper, ChatTransmitRange.Normal, false, shell, player);
}
}
}