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 MeCommand : IConsoleCommand
|
2020-12-03 03:40:47 +01:00
|
|
|
{
|
|
|
|
|
public string Command => "me";
|
|
|
|
|
public string Description => "Perform an action.";
|
|
|
|
|
public string Help => "me <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
|
|
|
{
|
2022-01-25 10:38:52 +01:00
|
|
|
shell.WriteError("This command cannot be run from the server.");
|
2020-12-03 03:40:47 +01:00
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
2022-01-25 10:38:52 +01:00
|
|
|
if (player.Status != SessionStatus.InGame)
|
2020-12-03 03:40:47 +01:00
|
|
|
return;
|
|
|
|
|
|
2022-01-25 10:38:52 +01:00
|
|
|
if (player.AttachedEntity is not {} playerEntity)
|
2020-12-03 03:40:47 +01:00
|
|
|
{
|
2022-01-25 10:38:52 +01:00
|
|
|
shell.WriteError("You don't have an entity!");
|
2021-03-16 15:50:20 +01:00
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
2022-01-25 10:38:52 +01:00
|
|
|
if (args.Length < 1)
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
var message = string.Join(" ", args).Trim();
|
|
|
|
|
if (string.IsNullOrEmpty(message))
|
2020-12-03 03:40:47 +01:00
|
|
|
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.Emote, ChatTransmitRange.Normal, false, shell, player);
|
2020-12-03 03:40:47 +01:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|