add entity logs verb (#14170)
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using Content.Server.Administration.Commands;
|
||||
using Content.Server.Administration.Logs;
|
||||
using Content.Server.Administration.Managers;
|
||||
using Content.Server.Administration.UI;
|
||||
using Content.Server.Chemistry.Components.SolutionManager;
|
||||
@@ -48,6 +49,7 @@ namespace Content.Server.Administration.Systems
|
||||
[Dependency] private readonly ArtifactSystem _artifactSystem = default!;
|
||||
[Dependency] private readonly UserInterfaceSystem _uiSystem = default!;
|
||||
[Dependency] private readonly PrayerSystem _prayerSystem = default!;
|
||||
[Dependency] private readonly EuiManager _eui = default!;
|
||||
|
||||
private readonly Dictionary<IPlayerSession, EditSolutionsEui> _openSolutionUis = new();
|
||||
|
||||
@@ -119,6 +121,25 @@ namespace Content.Server.Administration.Systems
|
||||
});
|
||||
}
|
||||
|
||||
// Admin Logs
|
||||
if (_adminManager.HasAdminFlag(player, AdminFlags.Logs))
|
||||
{
|
||||
Verb logsVerbEntity = new()
|
||||
{
|
||||
Priority = -2,
|
||||
Text = Loc.GetString("admin-verbs-admin-logs-entity"),
|
||||
Category = VerbCategory.Admin,
|
||||
Act = () =>
|
||||
{
|
||||
var ui = new AdminLogsEui();
|
||||
_eui.OpenEui(ui, player);
|
||||
ui.SetLogFilter(search:args.Target.GetHashCode().ToString());
|
||||
},
|
||||
Impact = LogImpact.Low
|
||||
};
|
||||
args.Verbs.Add(logsVerbEntity);
|
||||
}
|
||||
|
||||
// TeleportTo
|
||||
args.Verbs.Add(new Verb
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user