From d2b52acee3f75e4b1f792154e85980112c1ffe47 Mon Sep 17 00:00:00 2001 From: rhailrake <49613070+rhailrake@users.noreply.github.com> Date: Thu, 27 Apr 2023 21:01:13 +0600 Subject: [PATCH] [tweak] more logs # Conflicts: # Content.Server/Explosion/EntitySystems/ExplosionSystem.cs # Content.Server/ParticleAccelerator/Components/ParticleAcceleratorControlBoxComponent.cs --- .../Explosion/EntitySystems/ExplosionSystem.cs | 3 +++ .../ParticleAcceleratorSystem.ControlBox.cs | 18 +++++++++++++++--- Resources/Prototypes/game_presets.yml | 8 ++++---- 3 files changed, 22 insertions(+), 7 deletions(-) diff --git a/Content.Server/Explosion/EntitySystems/ExplosionSystem.cs b/Content.Server/Explosion/EntitySystems/ExplosionSystem.cs index 294728730a..6a627be8ee 100644 --- a/Content.Server/Explosion/EntitySystems/ExplosionSystem.cs +++ b/Content.Server/Explosion/EntitySystems/ExplosionSystem.cs @@ -60,6 +60,7 @@ public sealed partial class ExplosionSystem //WD-EDIT [Dependency] private readonly StationSystem _stationSystem = default!; + [Dependency] private readonly IChatManager _chatManager = default!; //WD-EDIT /// @@ -273,6 +274,8 @@ public sealed partial class ExplosionSystem { _adminLogger.Add(LogType.Explosion, LogImpact.High, $"{ToPrettyString(uid):entity} exploded ({typeId}) at {pos.Coordinates:coordinates} with intensity {totalIntensity} slope {slope}"); + _chatManager.SendAdminAnnouncement(Loc.GetString("admin-chatalert-explosion-no-player", + ("entity", ToPrettyString(uid)), ("coordinates", pos), ("intensity", totalIntensity), ("slope", slope))); } else { diff --git a/Content.Server/ParticleAccelerator/EntitySystems/ParticleAcceleratorSystem.ControlBox.cs b/Content.Server/ParticleAccelerator/EntitySystems/ParticleAcceleratorSystem.ControlBox.cs index 5d373652a9..83127edb12 100644 --- a/Content.Server/ParticleAccelerator/EntitySystems/ParticleAcceleratorSystem.ControlBox.cs +++ b/Content.Server/ParticleAccelerator/EntitySystems/ParticleAcceleratorSystem.ControlBox.cs @@ -5,6 +5,7 @@ using Content.Shared.Singularity.Components; using Robust.Shared.Utility; using System.Diagnostics; using Content.Server.Administration.Managers; +using Content.Server.Chat.Managers; using Content.Shared.CCVar; using Robust.Shared.Audio; using Robust.Shared.Audio.Systems; @@ -18,6 +19,7 @@ public sealed partial class ParticleAcceleratorSystem [Dependency] private readonly IAdminManager _adminManager = default!; [Dependency] private readonly SharedAudioSystem _audio = default!; [Dependency] private readonly IGameTiming _timing = default!; + [Dependency] private readonly IChatManager _chatManager = default!; private void InitializeControlBoxSystem() { @@ -78,7 +80,12 @@ public sealed partial class ParticleAcceleratorSystem return; if (user?.AttachedEntity is { } player) - _adminLogger.Add(LogType.Action, LogImpact.Low, $"{ToPrettyString(player):player} has turned {ToPrettyString(uid)} on"); + { + _adminLogger.Add(LogType.Action, LogImpact.Low, + $"{ToPrettyString(player):player} has turned {ToPrettyString(uid)} on"); + _chatManager.SendAdminAnnouncement(Loc.GetString("admin-chatalert-particle-accelerator-on", + ("player", ToPrettyString(player)))); + } comp.Enabled = true; UpdatePowerDraw(uid, comp); @@ -98,7 +105,12 @@ public sealed partial class ParticleAcceleratorSystem return; if (user?.AttachedEntity is { } player) - _adminLogger.Add(LogType.Action, LogImpact.Low, $"{ToPrettyString(player):player} has turned {ToPrettyString(uid)} off"); + { + _adminLogger.Add(LogType.Action, LogImpact.Low, + $"{ToPrettyString(player):player} has turned {ToPrettyString(uid)} off"); + _chatManager.SendAdminAnnouncement(Loc.GetString("admin-chatalert-particle-accelerator-off", + ("player", ToPrettyString(player)))); + } comp.Enabled = false; UpdatePowerDraw(uid, comp); @@ -167,7 +179,7 @@ public sealed partial class ParticleAcceleratorSystem }; _adminLogger.Add(LogType.Action, impact, $"{ToPrettyString(player):player} has set the strength of {ToPrettyString(uid)} to {strength}"); - + _chatManager.SendAdminAnnouncement(Loc.GetString("admin-chatalert-particle-strength-change", ("player", ToPrettyString(player)), ("state", strength))); var alertMinPowerState = (ParticleAcceleratorPowerState)_cfg.GetCVar(CCVars.AdminAlertParticleAcceleratorMinPowerState); if (strength >= alertMinPowerState) diff --git a/Resources/Prototypes/game_presets.yml b/Resources/Prototypes/game_presets.yml index b42b2e49f9..ab0b1220e0 100644 --- a/Resources/Prototypes/game_presets.yml +++ b/Resources/Prototypes/game_presets.yml @@ -36,7 +36,7 @@ - sandbox name: sandbox-title description: sandbox-description - showInVote: true + showInVote: false maxPlayers: 5 rules: - Sandbox @@ -71,7 +71,7 @@ - nukeops name: nukeops-title description: nukeops-description - showInVote: false + showInVote: true rules: - Nukeops - BasicStationEventScheduler @@ -99,7 +99,7 @@ - zomber name: zombie-title description: zombie-description - showInVote: false + showInVote: true rules: - Zombie - BasicStationEventScheduler @@ -110,7 +110,7 @@ - pirates name: pirates-title description: pirates-description - showInVote: false + showInVote: true rules: - Pirates - BasicStationEventScheduler