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
This commit is contained in:
45
Content.Client/Commands/OpenAHelpCommand.cs
Normal file
45
Content.Client/Commands/OpenAHelpCommand.cs
Normal file
@@ -0,0 +1,45 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user