Log a lot less reagent effects (#5572)

This commit is contained in:
mirrorcult
2021-11-27 00:31:56 -07:00
committed by GitHub
parent bf30f82ff5
commit f697bf413c
9 changed files with 58 additions and 20 deletions

View File

@@ -160,10 +160,13 @@ namespace Content.Server.Body.Systems
if (!effect.ShouldApply(args, _random))
continue;
var entity = EntityManager.GetEntity(args.SolutionEntity);
_logSystem.Add(LogType.ReagentEffect, LogImpact.Low,
$"Metabolism effect {effect.GetType().Name} of reagent {args.Reagent.Name:reagent} applied on entity {entity} at {entity.Transform.Coordinates}");
effect.Effect(args);
if (effect.ShouldLog)
{
var entity = EntityManager.GetEntity(args.SolutionEntity);
_logSystem.Add(LogType.ReagentEffect, effect.LogImpact,
$"Metabolism effect {effect.GetType().Name} of reagent {args.Reagent.Name:reagent} applied on entity {entity} at {entity.Transform.Coordinates}");
effect.Effect(args);
}
}
}