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

@@ -20,7 +20,7 @@ namespace Content.Server.Atmos.Piping.Trinary.EntitySystems
public sealed class GasMixerSystem : EntitySystem
{
[Dependency] private UserInterfaceSystem _userInterfaceSystem = default!;
[Dependency] private AdminLogSystem _adminLogSystem = default!;
[Dependency] private IAdminLogManager _adminLogger = default!;
[Dependency] private readonly AtmosphereSystem _atmosphereSystem = default!;
[Dependency] private readonly SharedAmbientSoundSystem _ambientSoundSystem = default!;
@@ -180,7 +180,7 @@ namespace Content.Server.Atmos.Piping.Trinary.EntitySystems
private void OnToggleStatusMessage(EntityUid uid, GasMixerComponent mixer, GasMixerToggleStatusMessage args)
{
mixer.Enabled = args.Enabled;
_adminLogSystem.Add(LogType.AtmosPowerChanged, LogImpact.Medium,
_adminLogger.Add(LogType.AtmosPowerChanged, LogImpact.Medium,
$"{ToPrettyString(args.Session.AttachedEntity!.Value):player} set the power on {ToPrettyString(uid):device} to {args.Enabled}");
DirtyUI(uid, mixer);
UpdateAppearance(uid, mixer);
@@ -189,7 +189,7 @@ namespace Content.Server.Atmos.Piping.Trinary.EntitySystems
private void OnOutputPressureChangeMessage(EntityUid uid, GasMixerComponent mixer, GasMixerChangeOutputPressureMessage args)
{
mixer.TargetPressure = Math.Clamp(args.Pressure, 0f, mixer.MaxTargetPressure);
_adminLogSystem.Add(LogType.AtmosPressureChanged, LogImpact.Medium,
_adminLogger.Add(LogType.AtmosPressureChanged, LogImpact.Medium,
$"{ToPrettyString(args.Session.AttachedEntity!.Value):player} set the pressure on {ToPrettyString(uid):device} to {args.Pressure}kPa");
DirtyUI(uid, mixer);
}
@@ -200,7 +200,7 @@ namespace Content.Server.Atmos.Piping.Trinary.EntitySystems
float nodeOne = Math.Clamp(args.NodeOne, 0f, 100.0f) / 100.0f;
mixer.InletOneConcentration = nodeOne;
mixer.InletTwoConcentration = 1.0f - mixer.InletOneConcentration;
_adminLogSystem.Add(LogType.AtmosRatioChanged, LogImpact.Medium,
_adminLogger.Add(LogType.AtmosRatioChanged, LogImpact.Medium,
$"{EntityManager.ToPrettyString(args.Session.AttachedEntity!.Value):player} set the ratio on {EntityManager.ToPrettyString(uid):device} to {mixer.InletOneConcentration}:{mixer.InletTwoConcentration}");
DirtyUI(uid, mixer);
}