Make AdminLogsSystem an IoC manager (#8492)

* Make log not entity system

* Fixes
This commit is contained in:
wrexbe
2022-05-28 23:41:17 -07:00
committed by GitHub
parent 0f99a0dd1d
commit 1e0babbd50
79 changed files with 653 additions and 572 deletions

View File

@@ -16,7 +16,7 @@ namespace Content.Server.Chemistry.EntitySystems
var coordinates = Transform(owner).Coordinates;
_logSystem.Add(LogType.ChemicalReaction, reaction.Impact,
_adminLogger.Add(LogType.ChemicalReaction, reaction.Impact,
$"Chemical reaction {reaction.ID:reaction} occurred with strength {unitReactions:strength} on entity {ToPrettyString(owner):metabolizer} at {coordinates}");
SoundSystem.Play(Filter.Pvs(owner, entityManager:EntityManager), reaction.Sound.GetSound(), owner);

View File

@@ -206,7 +206,7 @@ public sealed partial class ChemistrySystem
// Add an admin log, using the "force feed" log type. It's not quite feeding, but the effect is the same.
if (component.ToggleState == SharedInjectorComponent.InjectorToggleMode.Inject)
{
_logs.Add(LogType.ForceFeed,
_adminLogger.Add(LogType.ForceFeed,
$"{EntityManager.ToPrettyString(user):user} is attempting to inject {EntityManager.ToPrettyString(target):target} with a solution {SolutionContainerSystem.ToPrettyString(solution):solution}");
}
}
@@ -216,7 +216,7 @@ public sealed partial class ChemistrySystem
actualDelay /= 2;
if (component.ToggleState == SharedInjectorComponent.InjectorToggleMode.Inject)
_logs.Add(LogType.Ingestion,
_adminLogger.Add(LogType.Ingestion,
$"{EntityManager.ToPrettyString(user):user} is attempting to inject themselves with a solution {SolutionContainerSystem.ToPrettyString(solution):solution}.");
}

View File

@@ -7,7 +7,7 @@ namespace Content.Server.Chemistry.EntitySystems;
public sealed partial class ChemistrySystem : EntitySystem
{
[Dependency] private readonly AdminLogSystem _logs = default!;
[Dependency] private readonly IAdminLogManager _adminLogger = default!;
[Dependency] private readonly BloodstreamSystem _blood = default!;
[Dependency] private readonly DoAfterSystem _doAfter = default!;
[Dependency] private readonly PopupSystem _popup = default!;