Reaction & reagent effect logging (#5463)
* Reaction logging * effect logging * position
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using System.Collections.Generic;
|
||||
using Content.Shared.Administration.Logs;
|
||||
using Content.Shared.Chemistry.Components;
|
||||
using Content.Shared.Chemistry.Reagent;
|
||||
using Content.Shared.FixedPoint;
|
||||
@@ -18,6 +19,7 @@ namespace Content.Shared.Chemistry.Reaction
|
||||
|
||||
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;
|
||||
[Dependency] private readonly IRobustRandom _random = default!;
|
||||
[Dependency] protected readonly SharedAdminLogSystem _logSystem = default!;
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
@@ -97,6 +99,9 @@ namespace Content.Shared.Chemistry.Reaction
|
||||
if (!effect.ShouldApply(args))
|
||||
continue;
|
||||
|
||||
var entity = EntityManager.GetEntity(args.SolutionEntity);
|
||||
_logSystem.Add(LogType.ReagentEffect, LogImpact.Low,
|
||||
$"Reaction effect {effect.GetType().Name} of reaction ${reaction.ID:reaction} applied on entity {entity} at {entity.Transform.Coordinates}");
|
||||
effect.Effect(args);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user