[tweak] critical logs in admin chat
# Conflicts: # Content.Server/AME/AMENodeGroup.cs # Content.Server/AME/Components/AMEControllerComponent.cs # Content.Server/Atmos/Piping/Binary/EntitySystems/GasPressurePumpSystem.cs # Content.Server/Atmos/Piping/Unary/EntitySystems/GasCanisterSystem.cs # Content.Server/Gravity/GravityGeneratorSystem.cs # Content.Server/Singularity/EntitySystems/ContainmentFieldGeneratorSystem.cs # Content.Server/Singularity/EntitySystems/EventHorizonSystem.cs # Content.Server/Singularity/EntitySystems/SingularityGeneratorSystem.cs
This commit is contained in:
@@ -2,6 +2,7 @@ using Content.Server.Administration.Logs;
|
||||
using Content.Server.Atmos.EntitySystems;
|
||||
using Content.Server.Atmos.Piping.Binary.Components;
|
||||
using Content.Server.Atmos.Piping.Components;
|
||||
using Content.Server.Chat.Managers;
|
||||
using Content.Server.NodeContainer;
|
||||
using Content.Server.NodeContainer.EntitySystems;
|
||||
using Content.Server.NodeContainer.Nodes;
|
||||
@@ -29,6 +30,8 @@ namespace Content.Server.Atmos.Piping.Binary.EntitySystems
|
||||
[Dependency] private readonly SharedAppearanceSystem _appearance = default!;
|
||||
[Dependency] private readonly NodeContainerSystem _nodeContainer = default!;
|
||||
[Dependency] private readonly SharedPopupSystem _popup = default!;
|
||||
[Dependency] private readonly EntityManager _entityManager = default!;
|
||||
[Dependency] private readonly IChatManager _chatManager = default!;
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
@@ -124,8 +127,12 @@ namespace Content.Server.Atmos.Piping.Binary.EntitySystems
|
||||
private void OnToggleStatusMessage(EntityUid uid, GasPressurePumpComponent pump, GasPressurePumpToggleStatusMessage args)
|
||||
{
|
||||
pump.Enabled = args.Enabled;
|
||||
var player = args.Session.AttachedEntity!.Value;
|
||||
_adminLogger.Add(LogType.AtmosPowerChanged, LogImpact.Medium,
|
||||
$"{ToPrettyString(args.Session.AttachedEntity!.Value):player} set the power on {ToPrettyString(uid):device} to {args.Enabled}");
|
||||
$"{ToPrettyString(player):player} set the power on {ToPrettyString(uid):device} to {args.Enabled}");
|
||||
if (_entityManager.GetComponent<MetaDataComponent>(uid).EntityName == "plasma pump" && args.Enabled)
|
||||
_chatManager.SendAdminAnnouncement(Loc.GetString("admin-chatalert-plasma-pump-enabled",
|
||||
("pump", ToPrettyString(uid)), ("player", ToPrettyString(player))));
|
||||
DirtyUI(uid, pump);
|
||||
UpdateAppearance(uid, pump);
|
||||
}
|
||||
@@ -133,8 +140,12 @@ namespace Content.Server.Atmos.Piping.Binary.EntitySystems
|
||||
private void OnOutputPressureChangeMessage(EntityUid uid, GasPressurePumpComponent pump, GasPressurePumpChangeOutputPressureMessage args)
|
||||
{
|
||||
pump.TargetPressure = Math.Clamp(args.Pressure, 0f, Atmospherics.MaxOutputPressure);
|
||||
var player = args.Session.AttachedEntity!.Value;
|
||||
_adminLogger.Add(LogType.AtmosPressureChanged, LogImpact.Medium,
|
||||
$"{ToPrettyString(args.Session.AttachedEntity!.Value):player} set the pressure on {ToPrettyString(uid):device} to {args.Pressure}kPa");
|
||||
$"{ToPrettyString(player):player} set the pressure on {ToPrettyString(uid):device} to {args.Pressure}kPa");
|
||||
if (_entityManager.GetComponent<MetaDataComponent>(uid).EntityName == "plasma pump")
|
||||
_chatManager.SendAdminAnnouncement(Loc.GetString("admin-chatalert-plasma-pump-pressure-change",
|
||||
("pump", ToPrettyString(uid)), ("player", ToPrettyString(player)), ("pressure", args.Pressure)));
|
||||
DirtyUI(uid, pump);
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user