Modify damage logging. (#5579)

This commit is contained in:
Leon Friedrich
2021-11-29 02:34:44 +13:00
committed by GitHub
parent b807250021
commit 0de4b7bc9f
28 changed files with 265 additions and 62 deletions

View File

@@ -1,5 +1,7 @@
using Content.Server.Administration.Logs;
using Content.Server.Tools;
using Content.Server.Tools.Components;
using Content.Shared.Administration.Logs;
using Content.Shared.Damage;
using Content.Shared.Interaction;
using Content.Shared.Popups;
@@ -14,6 +16,7 @@ namespace Content.Server.Repairable
{
[Dependency] private readonly ToolSystem _toolSystem = default!;
[Dependency] private readonly DamageableSystem _damageableSystem = default!;
[Dependency] private readonly AdminLogSystem _logSystem = default!;
public override void Initialize()
{
@@ -32,6 +35,7 @@ namespace Content.Server.Repairable
// Repair all damage
_damageableSystem.SetAllDamage(damageable, 0);
_logSystem.Add(LogType.Healed, $"{args.User} repaired ${uid} back to full health");
component.Owner.PopupMessage(args.User,
Loc.GetString("comp-repairable-repair",