mirror of
https://github.com/DeltaV-Station/Delta-v.git
synced 2026-09-30 16:17:27 +00:00
* Graft from https://github.com/space-wizards/space-station-14/pull/3049 * 'openahelp' command * Add AHelp into escape menu * Add a way to ahelp a player from the kick window * bwoink: XAMLify, bugfix, etc. * Rename the kick/bwoink window the Player Actions Panel * Add the bwoink sound y'all know and love adminhelp.ogg taken from https://github.com/tgstation/tgstation/blob/d775e1ac804eb9d0259573f5f29a18d320c97ef3/sound/effects/adminhelp.ogg (available in master, therefore see master license: "All assets including icons and sound are under a Creative Commons 3.0 BY-SA license unless otherwise indicated.") "Changed the adminhelpsound to some creative commons sound I pinched. Until somebody can get a better one. I'm sick of MAAAAAAAAOOOOOOW." Actual source is https://freesound.org/people/martian/sounds/19261/ (CC0) The sound had been reversed and the volume altered. * Actually play the bwoink sound on receiving an ahelp that you didn't send
46 lines
1.3 KiB
C#
46 lines
1.3 KiB
C#
using System;
|
|
using Content.Client.Administration;
|
|
using Content.Shared.Body.Mechanism;
|
|
using Robust.Client.Console;
|
|
using Robust.Client.GameObjects;
|
|
using Robust.Shared.Console;
|
|
using Robust.Shared.Network;
|
|
using Robust.Shared.Containers;
|
|
using Robust.Shared.GameObjects;
|
|
using Robust.Shared.IoC;
|
|
|
|
namespace Content.Client.Commands
|
|
{
|
|
public class OpenAHelpCommand : IConsoleCommand
|
|
{
|
|
public string Command => "openahelp";
|
|
public string Description => $"Opens AHelp channel for a given NetUserID, or your personal channel if none given.";
|
|
public string Help => $"{Command} [<netuserid>]";
|
|
|
|
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
|
{
|
|
if (args.Length >= 2)
|
|
{
|
|
shell.WriteLine(Help);
|
|
return;
|
|
}
|
|
if (args.Length == 0)
|
|
{
|
|
EntitySystem.Get<BwoinkSystem>().EnsureWindowForLocalPlayer();
|
|
}
|
|
else
|
|
{
|
|
if (Guid.TryParse(args[0], out var guid))
|
|
{
|
|
EntitySystem.Get<BwoinkSystem>().EnsureWindow(new NetUserId(guid));
|
|
}
|
|
else
|
|
{
|
|
shell.WriteLine("Bad GUID!");
|
|
return;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|