[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:
@@ -1,6 +1,7 @@
|
||||
using Content.Server.Administration.Logs;
|
||||
using Content.Server.Audio;
|
||||
using Content.Server.Construction;
|
||||
using Content.Server.Chat.Managers;
|
||||
using Content.Server.Power.Components;
|
||||
using Content.Shared.Database;
|
||||
using Content.Shared.Gravity;
|
||||
@@ -19,6 +20,8 @@ namespace Content.Server.Gravity
|
||||
[Dependency] private readonly SharedPointLightSystem _lights = default!;
|
||||
[Dependency] private readonly UserInterfaceSystem _uiSystem = default!;
|
||||
|
||||
[Dependency] private readonly IChatManager _chatManager = default!;
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
@@ -139,7 +142,12 @@ namespace Content.Server.Gravity
|
||||
return;
|
||||
|
||||
if (session is { AttachedEntity: { } })
|
||||
_adminLogger.Add(LogType.Action, on ? LogImpact.Medium : LogImpact.High, $"{session:player} set ${ToPrettyString(uid):target} to {(on ? "on" : "off")}");
|
||||
{
|
||||
var player = session.AttachedEntity.Value;
|
||||
_adminLogger.Add(LogType.Action, on ? LogImpact.Medium : LogImpact.High, $"{ToPrettyString(player):player} set ${ToPrettyString(uid):target} to {(on ? "on" : "off")}");
|
||||
_chatManager.SendAdminAnnouncement(Loc.GetString("admin-chatalert-gravity-generator-turned",
|
||||
("player", ToPrettyString(player)), ("gravgen", ToPrettyString(uid)), ("status", on ? "on" : "off")));
|
||||
}
|
||||
|
||||
component.SwitchedOn = on;
|
||||
UpdatePowerState(component, powerReceiver);
|
||||
|
||||
Reference in New Issue
Block a user