2022-06-23 20:11:03 +10:00
|
|
|
using Content.Server.Chat.Systems;
|
2021-12-13 16:45:49 +11:00
|
|
|
using Content.Shared.Administration;
|
2021-02-01 16:49:43 -08:00
|
|
|
using Robust.Shared.Console;
|
2020-12-03 03:40:47 +01:00
|
|
|
using Robust.Shared.Enums;
|
|
|
|
|
|
2021-06-09 22:19:39 +02:00
|
|
|
namespace Content.Server.Chat.Commands
|
2020-12-03 03:40:47 +01:00
|
|
|
{
|
|
|
|
|
[AnyCommand]
|
2022-02-16 00:23:23 -07:00
|
|
|
internal sealed class SayCommand : IConsoleCommand
|
2020-12-03 03:40:47 +01:00
|
|
|
{
|
|
|
|
|
public string Command => "say";
|
|
|
|
|
public string Description => "Send chat messages to the local channel or a specified radio channel.";
|
|
|
|
|
public string Help => "say <text>";
|
|
|
|
|
|
2021-02-01 16:49:43 -08:00
|
|
|
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
2020-12-03 03:40:47 +01:00
|
|
|
{
|
2023-10-28 09:59:53 +11:00
|
|
|
if (shell.Player is not { } player)
|
2020-12-03 03:40:47 +01:00
|
|
|
{
|
2024-08-11 09:46:57 +00:00
|
|
|
shell.WriteError(Loc.GetString("shell-cannot-run-command-from-server"));
|
2020-12-03 03:40:47 +01:00
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
2021-12-06 15:34:46 +01:00
|
|
|
if (player.Status != SessionStatus.InGame)
|
2020-12-03 03:40:47 +01:00
|
|
|
return;
|
|
|
|
|
|
2021-12-06 15:34:46 +01:00
|
|
|
if (player.AttachedEntity is not {} playerEntity)
|
|
|
|
|
{
|
2022-01-11 06:48:18 -08:00
|
|
|
shell.WriteError("You don't have an entity!");
|
2021-12-06 15:34:46 +01:00
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
2020-12-03 03:40:47 +01:00
|
|
|
if (args.Length < 1)
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
var message = string.Join(" ", args).Trim();
|
|
|
|
|
if (string.IsNullOrEmpty(message))
|
|
|
|
|
return;
|
|
|
|
|
|
2022-11-15 17:09:27 +13:00
|
|
|
IoCManager.Resolve<IEntitySystemManager>().GetEntitySystem<ChatSystem>()
|
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 11:12:30 -07:00
|
|
|
.TrySendInGameICMessage(playerEntity, message, InGameICChatType.Speak, ChatTransmitRange.Normal, false, shell, player);
|
2020-12-03 03:40:47 +01:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|