* 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.
46 lines
1.3 KiB
C#
46 lines
1.3 KiB
C#
using Content.Client.Administration.Managers;
|
|
using Robust.Client.Graphics;
|
|
|
|
namespace Content.Client.Administration.Systems
|
|
{
|
|
public sealed partial class AdminSystem
|
|
{
|
|
[Dependency] private readonly IClientAdminManager _adminManager = default!;
|
|
[Dependency] private readonly IEyeManager _eyeManager = default!;
|
|
|
|
private AdminNameOverlay _adminNameOverlay = default!;
|
|
|
|
public event Action? OverlayEnabled;
|
|
public event Action? OverlayDisabled;
|
|
|
|
private void InitializeOverlay()
|
|
{
|
|
_adminNameOverlay = new AdminNameOverlay(this, _entityManager, _eyeManager, _resourceCache, _entityLookup);
|
|
_adminManager.AdminStatusUpdated += OnAdminStatusUpdated;
|
|
}
|
|
|
|
private void ShutdownOverlay()
|
|
{
|
|
_adminManager.AdminStatusUpdated -= OnAdminStatusUpdated;
|
|
}
|
|
|
|
private void OnAdminStatusUpdated()
|
|
{
|
|
AdminOverlayOff();
|
|
}
|
|
|
|
public void AdminOverlayOn()
|
|
{
|
|
if (_overlayManager.HasOverlay<AdminNameOverlay>()) return;
|
|
_overlayManager.AddOverlay(_adminNameOverlay);
|
|
OverlayEnabled?.Invoke();
|
|
}
|
|
|
|
public void AdminOverlayOff()
|
|
{
|
|
_overlayManager.RemoveOverlay<AdminNameOverlay>();
|
|
OverlayDisabled?.Invoke();
|
|
}
|
|
}
|
|
}
|