Files
tbd-station-14/Content.Client/Commands/OpenAHelpCommand.cs
20kdc b3f43509d1 Basic AHelp Panel, Ported & Fixed (#4776)
* 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 d775e1ac80/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
2021-10-06 17:25:27 +02:00

46 lines
1.3 KiB
C#
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
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;
}
}
}
}
}