Add multiple logs (#12857)

This commit is contained in:
Chief-Engineer
2022-12-15 12:33:27 -06:00
committed by GitHub
parent 343e695524
commit eb18363bd2
8 changed files with 92 additions and 4 deletions

View File

@@ -1,8 +1,10 @@
using Content.Server.Body.Components;
using Content.Server.Body.Systems;
using Content.Server.Chemistry.EntitySystems;
using Content.Shared.Administration.Logs;
using Content.Shared.Chemistry;
using Content.Shared.Chemistry.Reagent;
using Content.Shared.Database;
using Content.Shared.FixedPoint;
using Content.Shared.Smoking;
@@ -13,6 +15,7 @@ namespace Content.Server.Chemistry.Components
public sealed class SmokeSolutionAreaEffectComponent : SolutionAreaEffectComponent
{
[Dependency] private readonly IEntityManager _entMan = default!;
[Dependency] private readonly ISharedAdminLogManager _adminLogger = default!;
public new const string SolutionName = "solutionArea";
@@ -49,7 +52,11 @@ namespace Content.Server.Chemistry.Components
}
var bloodstreamSys = EntitySystem.Get<BloodstreamSystem>();
bloodstreamSys.TryAddToChemicals(entity, transferSolution, bloodstream);
if (bloodstreamSys.TryAddToChemicals(entity, transferSolution, bloodstream))
{
// Log solution addition by smoke
_adminLogger.Add(LogType.ForceFeed, LogImpact.Medium, $"{_entMan.ToPrettyString(entity):target} was affected by smoke {SolutionContainerSystem.ToPrettyString(transferSolution)}");
}
}