Modify damage logging. (#5579)
This commit is contained in:
@@ -1,17 +1,12 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Content.Shared.Administration.Logs;
|
||||
using Content.Shared.CCVar;
|
||||
using Content.Shared.Hands.Components;
|
||||
using Content.Shared.Physics;
|
||||
using Content.Shared.Physics.Pull;
|
||||
using Robust.Shared.Configuration;
|
||||
using Robust.Shared.Containers;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.GameStates;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Log;
|
||||
using Robust.Shared.Maths;
|
||||
using Robust.Shared.Physics;
|
||||
using Robust.Shared.Physics.Dynamics;
|
||||
|
||||
@@ -128,13 +123,12 @@ namespace Content.Shared.Throwing
|
||||
return;
|
||||
}
|
||||
|
||||
var landMsg = new LandEvent {User = thrownItem.Thrower?.Uid};
|
||||
RaiseLocalEvent(landing.Uid, landMsg, false);
|
||||
|
||||
// Assume it's uninteresting if it has no thrower. For now anyway.
|
||||
if (thrownItem.Thrower is not null)
|
||||
_adminLogSystem.Add(LogType.Landed, LogImpact.Low, $"{landing} thrown by {thrownItem.Thrower:thrower} landed.");
|
||||
|
||||
var landMsg = new LandEvent {User = thrownItem.Thrower?.Uid};
|
||||
RaiseLocalEvent(landing.Uid, landMsg, false);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -142,11 +136,12 @@ namespace Content.Shared.Throwing
|
||||
/// </summary>
|
||||
public void ThrowCollideInteraction(IEntity? user, IPhysBody thrown, IPhysBody target)
|
||||
{
|
||||
if (user is not null)
|
||||
_adminLogSystem.Add(LogType.ThrowHit, LogImpact.Low,
|
||||
$"{thrown.Owner:thrown} thrown by {user:thrower} hit {target.Owner:target}.");
|
||||
// TODO: Just pass in the bodies directly
|
||||
RaiseLocalEvent(target.Owner.Uid, new ThrowHitByEvent(user, thrown.Owner, target.Owner));
|
||||
RaiseLocalEvent(thrown.Owner.Uid, new ThrowDoHitEvent(user, thrown.Owner, target.Owner));
|
||||
if (user is not null)
|
||||
_adminLogSystem.Add(LogType.ThrowHit, LogImpact.Low, $"{thrown.Owner:thrown} thrown by {user:thrower} hit {target.Owner:target}.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user