Add InteractUsing admin logs. (#29514)

Apparently we did not have these.
This commit is contained in:
Pieter-Jan Briers
2024-06-27 16:58:42 +02:00
committed by GitHub
parent 0896edf06c
commit 45cc19f315
2 changed files with 25 additions and 0 deletions

View File

@@ -486,6 +486,21 @@ namespace Content.Shared.Interaction
public void InteractUsingRanged(EntityUid user, EntityUid used, EntityUid? target,
EntityCoordinates clickLocation, bool inRangeUnobstructed)
{
if (target != null)
{
_adminLogger.Add(
LogType.InteractUsing,
LogImpact.Low,
$"{ToPrettyString(user):user} interacted with {ToPrettyString(target):target} using {ToPrettyString(used):used}");
}
else
{
_adminLogger.Add(
LogType.InteractUsing,
LogImpact.Low,
$"{ToPrettyString(user):user} interacted with *nothing* using {ToPrettyString(used):used}");
}
if (RangedInteractDoBefore(user, used, target, clickLocation, inRangeUnobstructed))
return;
@@ -926,6 +941,11 @@ namespace Content.Shared.Interaction
if (checkCanUse && !_actionBlockerSystem.CanUseHeldEntity(user, used))
return;
_adminLogger.Add(
LogType.InteractUsing,
LogImpact.Low,
$"{ToPrettyString(user):user} interacted with {ToPrettyString(target):target} using {ToPrettyString(used):used}");
if (RangedInteractDoBefore(user, used, target, clickLocation, true))
return;