Adds even more smites and a bunch of tools. (#9825)
* Adds three new smites, headstand, locker stuff, and reptilian species swap. * Localize all the smites. * save work * More smites... * Final tweaks. * oops * !PLEH * Adds disarm prone and improved hand removal options. * fix chances. * take out the trash. * Add some admin TRICKS instead of more smites. * oop * Implements the admin test arena and associated trick. * Tricks for granting/revoking access. * e * mfw * Implement quick dialogs, for when you don't want to spend 20 minutes writing a simple dialog prompt. * Forgot the rejuv icon. * E * docs * augh * Add rename/redescribe buttons. * Adds objects menu, implements a couple tricks for stations. * 1984 * Adds a trick for effectively infinite power. * fixes some icon uggo. * a * HALT! * Pause/unpause buttons. * Forgor the textures. * they broke every bone in their body. * i added more * more battery actions, touch up battery icon. * Address reviews.
This commit is contained in:
36
Content.Client/Administration/Systems/AdminVerbSystem.cs
Normal file
36
Content.Client/Administration/Systems/AdminVerbSystem.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
using Content.Shared.Verbs;
|
||||
using Robust.Client.Console;
|
||||
|
||||
namespace Content.Client.Administration.Systems
|
||||
{
|
||||
/// <summary>
|
||||
/// Client-side admin verb system. These usually open some sort of UIs.
|
||||
/// </summary>
|
||||
sealed class AdminVerbSystem : EntitySystem
|
||||
{
|
||||
[Dependency] private readonly IClientConGroupController _clientConGroupController = default!;
|
||||
[Dependency] private readonly IClientConsoleHost _clientConsoleHost = default!;
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
SubscribeLocalEvent<GetVerbsEvent<Verb>>(AddAdminVerbs);
|
||||
}
|
||||
|
||||
private void AddAdminVerbs(GetVerbsEvent<Verb> args)
|
||||
{
|
||||
// Currently this is only the ViewVariables verb, but more admin-UI related verbs can be added here.
|
||||
|
||||
// View variables verbs
|
||||
if (_clientConGroupController.CanViewVar())
|
||||
{
|
||||
Verb verb = new();
|
||||
verb.Category = VerbCategory.Debug;
|
||||
verb.Text = "View Variables";
|
||||
verb.IconTexture = "/Textures/Interface/VerbIcons/vv.svg.192dpi.png";
|
||||
verb.Act = () => _clientConsoleHost.ExecuteCommand($"vv {args.Target}");
|
||||
verb.ClientExclusive = true; // opening VV window is client-side. Don't ask server to run this verb.
|
||||
args.Verbs.Add(verb);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user