Log verbs & alt-click interactions. (#5471)
* verb logging * Just a lil regex Verb ([a-zA-Z]*) = new\(\) Verb $1 = new(args) * nvm that didn't work * better log messages * Revert "Just a lil regex" This reverts commit aa2b143d042f1ed007c801d9e2c264cb07993aa1. * remove garbage code * better docstring
This commit is contained in:
@@ -15,6 +15,7 @@ using Content.Server.Mind.Commands;
|
||||
using Content.Server.Mind.Components;
|
||||
using Content.Server.Players;
|
||||
using Content.Shared.Administration;
|
||||
using Content.Shared.Administration.Logs;
|
||||
using Content.Shared.Body.Components;
|
||||
using Content.Shared.GameTicking;
|
||||
using Content.Shared.Interaction.Helpers;
|
||||
@@ -67,6 +68,7 @@ namespace Content.Server.Administration
|
||||
verb.Category = VerbCategory.Debug;
|
||||
verb.IconTexture = "/Textures/Interface/VerbIcons/delete_transparent.svg.192dpi.png";
|
||||
verb.Act = () => args.Target.Delete();
|
||||
verb.Impact = LogImpact.Medium;
|
||||
args.Verbs.Add(verb);
|
||||
}
|
||||
|
||||
@@ -78,6 +80,7 @@ namespace Content.Server.Administration
|
||||
verb.Category = VerbCategory.Debug;
|
||||
verb.IconTexture = "/Textures/Interface/VerbIcons/rejuvenate.svg.192dpi.png";
|
||||
verb.Act = () => RejuvenateCommand.PerformRejuvenate(args.Target);
|
||||
verb.Impact = LogImpact.Medium;
|
||||
args.Verbs.Add(verb);
|
||||
}
|
||||
|
||||
@@ -95,6 +98,7 @@ namespace Content.Server.Administration
|
||||
{
|
||||
player.ContentData()?.Mind?.TransferTo(args.Target.Uid, ghostCheckOverride: true);
|
||||
};
|
||||
verb.Impact = LogImpact.High;
|
||||
args.Verbs.Add(verb);
|
||||
}
|
||||
|
||||
@@ -108,9 +112,11 @@ namespace Content.Server.Administration
|
||||
verb.Category = VerbCategory.Debug;
|
||||
verb.IconTexture = "/Textures/Interface/VerbIcons/sentient.svg.192dpi.png";
|
||||
verb.Act = () => MakeSentientCommand.MakeSentient(args.Target.Uid, EntityManager);
|
||||
verb.Impact = LogImpact.Medium;
|
||||
args.Verbs.Add(verb);
|
||||
}
|
||||
|
||||
// Atillery
|
||||
if (_adminManager.HasAdminFlag(player, AdminFlags.Fun))
|
||||
{
|
||||
Verb verb = new();
|
||||
@@ -125,6 +131,7 @@ namespace Content.Server.Administration
|
||||
body.Gib();
|
||||
}
|
||||
};
|
||||
verb.Impact = LogImpact.Extreme; // if you're just outright killing a person, I guess that deserves to be extreme?
|
||||
args.Verbs.Add(verb);
|
||||
}
|
||||
|
||||
@@ -137,6 +144,7 @@ namespace Content.Server.Administration
|
||||
verb.Category = VerbCategory.Debug;
|
||||
verb.IconTexture = "/Textures/Interface/VerbIcons/outfit.svg.192dpi.png";
|
||||
verb.Act = () => _euiManager.OpenEui(new SetOutfitEui(args.Target), player);
|
||||
verb.Impact = LogImpact.Medium;
|
||||
args.Verbs.Add(verb);
|
||||
}
|
||||
|
||||
@@ -179,6 +187,7 @@ namespace Content.Server.Administration
|
||||
// TODO VERB ICON add ghost icon
|
||||
// Where is the national park service icon for haunted forests?
|
||||
verb.Act = () => _ghostRoleSystem.OpenMakeGhostRoleEui(player, args.Target.Uid);
|
||||
verb.Impact = LogImpact.Medium;
|
||||
args.Verbs.Add(verb);
|
||||
}
|
||||
|
||||
@@ -203,6 +212,7 @@ namespace Content.Server.Administration
|
||||
verb.Category = VerbCategory.Debug;
|
||||
verb.IconTexture = "/Textures/Interface/VerbIcons/spill.svg.192dpi.png";
|
||||
verb.Act = () => OpenEditSolutionsEui(player, args.Target.Uid);
|
||||
verb.Impact = LogImpact.Medium; // maybe high depending on WHAT reagents they add...
|
||||
args.Verbs.Add(verb);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ using System.Linq;
|
||||
using Content.Server.Chemistry.EntitySystems;
|
||||
using Content.Server.Construction.Components;
|
||||
using Content.Server.Fluids.Components;
|
||||
using Content.Shared.Administration.Logs;
|
||||
using Content.Shared.Chemistry.Components;
|
||||
using Content.Shared.Chemistry.Reagent;
|
||||
using Content.Shared.Directions;
|
||||
@@ -104,6 +105,7 @@ namespace Content.Server.Fluids.EntitySystems
|
||||
// TODO VERB ICONS spill icon? pouring out a glass/beaker?
|
||||
verb.Act = () => _solutionContainerSystem.SplitSolution(args.Target.Uid,
|
||||
solution, solution.DrainAvailable).SpillAt(args.Target.Transform.Coordinates, "PuddleSmear");
|
||||
verb.Impact = LogImpact.Medium; // dangerous reagent reaction are logged separately.
|
||||
args.Verbs.Add(verb);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using Content.Server.Morgue.Components;
|
||||
using Content.Shared.Administration.Logs;
|
||||
using Content.Shared.Verbs;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Shared.GameObjects;
|
||||
@@ -28,6 +29,7 @@ namespace Content.Server.Morgue
|
||||
verb.Text = Loc.GetString("cremate-verb-get-data-text");
|
||||
// TODO VERB ICON add flame/burn symbol?
|
||||
verb.Act = () => component.TryCremate();
|
||||
verb.Impact = LogImpact.Medium; // could be a body? or evidence? I dunno.
|
||||
args.Verbs.Add(verb);
|
||||
}
|
||||
|
||||
|
||||
@@ -78,7 +78,7 @@ namespace Content.Server.Verbs.Commands
|
||||
verbs.TryGetValue(key, out var vset) &&
|
||||
vset.Any())
|
||||
{
|
||||
verbSystem.ExecuteVerb(vset.First());
|
||||
verbSystem.ExecuteVerb(vset.First(), playerEntity.Uid, target.Uid, forced: true);
|
||||
shell.WriteLine(Loc.GetString("invoke-verb-command-success", ("verb", verbName), ("target", target), ("player", playerEntity)));
|
||||
return;
|
||||
}
|
||||
@@ -89,7 +89,7 @@ namespace Content.Server.Verbs.Commands
|
||||
{
|
||||
if (verb.Text.ToLowerInvariant() == verbName)
|
||||
{
|
||||
verbSystem.ExecuteVerb(verb);
|
||||
verbSystem.ExecuteVerb(verb, playerEntity.Uid, target.Uid, forced: true);
|
||||
shell.WriteLine(Loc.GetString("invoke-verb-command-success", ("verb", verb.Text), ("target", target), ("player", playerEntity)));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ namespace Content.Server.Verbs
|
||||
|
||||
// Find the requested verb.
|
||||
if (verbs.TryGetValue(args.RequestedVerb, out var verb))
|
||||
ExecuteVerb(verb);
|
||||
ExecuteVerb(verb, userEntity.Uid, args.Target);
|
||||
else
|
||||
// 404 Verb not found. Note that this could happen due to something as simple as opening the verb menu, walking away, then trying
|
||||
// to run the pickup-item verb. So maybe this shouldn't even be logged?
|
||||
|
||||
Reference in New Issue
Block a user