* 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
52 lines
1.6 KiB
C#
52 lines
1.6 KiB
C#
#nullable enable
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Diagnostics.CodeAnalysis;
|
|
using Robust.Shared.Network;
|
|
using Robust.Shared.Serialization;
|
|
using Robust.Shared.Utility;
|
|
using Robust.Shared.GameObjects;
|
|
using Robust.Shared.GameObjects.Components;
|
|
using Robust.Shared.Log;
|
|
|
|
namespace Content.Shared.Administration
|
|
{
|
|
public abstract class SharedBwoinkSystem : EntitySystem
|
|
{
|
|
public override void Initialize()
|
|
{
|
|
base.Initialize();
|
|
|
|
SubscribeNetworkEvent<BwoinkTextMessage>(OnBwoinkTextMessage);
|
|
}
|
|
|
|
protected virtual void OnBwoinkTextMessage(BwoinkTextMessage message, EntitySessionEventArgs eventArgs)
|
|
{
|
|
// Specific side code in target.
|
|
}
|
|
|
|
protected void LogBwoink(BwoinkTextMessage message)
|
|
{
|
|
Logger.InfoS("c.s.go.es.bwoink", $"@{message.ChannelId}: {message.Text}");
|
|
}
|
|
|
|
[Serializable, NetSerializable]
|
|
public sealed class BwoinkTextMessage : EntityEventArgs
|
|
{
|
|
public NetUserId ChannelId { get; }
|
|
// This is ignored from the client.
|
|
// It's checked by the client when receiving a message from the server for bwoink noises.
|
|
// This could be a boolean "Incoming", but that would require making a second instance.
|
|
public NetUserId TrueSender { get; }
|
|
public string Text { get; }
|
|
|
|
public BwoinkTextMessage(NetUserId channelId, NetUserId trueSender, string text)
|
|
{
|
|
ChannelId = channelId;
|
|
TrueSender = trueSender;
|
|
Text = text;
|
|
}
|
|
}
|
|
}
|
|
}
|