[tweak] more logs

# Conflicts:
#	Content.Server/Explosion/EntitySystems/ExplosionSystem.cs
#	Content.Server/ParticleAccelerator/Components/ParticleAcceleratorControlBoxComponent.cs
This commit is contained in:
rhailrake
2023-04-27 21:01:13 +06:00
committed by Remuchi
parent 509a5d6862
commit d2b52acee3
3 changed files with 22 additions and 7 deletions

View File

@@ -60,6 +60,7 @@ public sealed partial class ExplosionSystem
//WD-EDIT //WD-EDIT
[Dependency] private readonly StationSystem _stationSystem = default!; [Dependency] private readonly StationSystem _stationSystem = default!;
[Dependency] private readonly IChatManager _chatManager = default!;
//WD-EDIT //WD-EDIT
/// <summary> /// <summary>
@@ -273,6 +274,8 @@ public sealed partial class ExplosionSystem
{ {
_adminLogger.Add(LogType.Explosion, LogImpact.High, _adminLogger.Add(LogType.Explosion, LogImpact.High,
$"{ToPrettyString(uid):entity} exploded ({typeId}) at {pos.Coordinates:coordinates} with intensity {totalIntensity} slope {slope}"); $"{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 else
{ {

View File

@@ -5,6 +5,7 @@ using Content.Shared.Singularity.Components;
using Robust.Shared.Utility; using Robust.Shared.Utility;
using System.Diagnostics; using System.Diagnostics;
using Content.Server.Administration.Managers; using Content.Server.Administration.Managers;
using Content.Server.Chat.Managers;
using Content.Shared.CCVar; using Content.Shared.CCVar;
using Robust.Shared.Audio; using Robust.Shared.Audio;
using Robust.Shared.Audio.Systems; using Robust.Shared.Audio.Systems;
@@ -18,6 +19,7 @@ public sealed partial class ParticleAcceleratorSystem
[Dependency] private readonly IAdminManager _adminManager = default!; [Dependency] private readonly IAdminManager _adminManager = default!;
[Dependency] private readonly SharedAudioSystem _audio = default!; [Dependency] private readonly SharedAudioSystem _audio = default!;
[Dependency] private readonly IGameTiming _timing = default!; [Dependency] private readonly IGameTiming _timing = default!;
[Dependency] private readonly IChatManager _chatManager = default!;
private void InitializeControlBoxSystem() private void InitializeControlBoxSystem()
{ {
@@ -78,7 +80,12 @@ public sealed partial class ParticleAcceleratorSystem
return; return;
if (user?.AttachedEntity is { } player) 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; comp.Enabled = true;
UpdatePowerDraw(uid, comp); UpdatePowerDraw(uid, comp);
@@ -98,7 +105,12 @@ public sealed partial class ParticleAcceleratorSystem
return; return;
if (user?.AttachedEntity is { } player) 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; comp.Enabled = false;
UpdatePowerDraw(uid, comp); 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}"); _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); var alertMinPowerState = (ParticleAcceleratorPowerState)_cfg.GetCVar(CCVars.AdminAlertParticleAcceleratorMinPowerState);
if (strength >= alertMinPowerState) if (strength >= alertMinPowerState)

View File

@@ -36,7 +36,7 @@
- sandbox - sandbox
name: sandbox-title name: sandbox-title
description: sandbox-description description: sandbox-description
showInVote: true showInVote: false
maxPlayers: 5 maxPlayers: 5
rules: rules:
- Sandbox - Sandbox
@@ -71,7 +71,7 @@
- nukeops - nukeops
name: nukeops-title name: nukeops-title
description: nukeops-description description: nukeops-description
showInVote: false showInVote: true
rules: rules:
- Nukeops - Nukeops
- BasicStationEventScheduler - BasicStationEventScheduler
@@ -99,7 +99,7 @@
- zomber - zomber
name: zombie-title name: zombie-title
description: zombie-description description: zombie-description
showInVote: false showInVote: true
rules: rules:
- Zombie - Zombie
- BasicStationEventScheduler - BasicStationEventScheduler
@@ -110,7 +110,7 @@
- pirates - pirates
name: pirates-title name: pirates-title
description: pirates-description description: pirates-description
showInVote: false showInVote: true
rules: rules:
- Pirates - Pirates
- BasicStationEventScheduler - BasicStationEventScheduler