From: Trevor Day Date: Thu, 11 Jan 2024 21:56:06 +0000 (-0800) Subject: Bluespace Anomaly Admin Logs (#23942) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=cc823e24e9adab87b596e11122c4eccee78028b5;p=space-station-14.git Bluespace Anomaly Admin Logs (#23942) Add bluespace anomaly teleportation logs. --- diff --git a/Content.Server/Anomaly/Effects/BluespaceAnomalySystem.cs b/Content.Server/Anomaly/Effects/BluespaceAnomalySystem.cs index 603396e31a..87c0ba4a4e 100644 --- a/Content.Server/Anomaly/Effects/BluespaceAnomalySystem.cs +++ b/Content.Server/Anomaly/Effects/BluespaceAnomalySystem.cs @@ -1,7 +1,9 @@ using System.Linq; using System.Numerics; using Content.Server.Anomaly.Components; +using Content.Shared.Administration.Logs; using Content.Shared.Anomaly.Components; +using Content.Shared.Database; using Content.Shared.Mobs.Components; using Content.Shared.Teleportation.Components; using Robust.Shared.Audio; @@ -13,6 +15,7 @@ namespace Content.Server.Anomaly.Effects; public sealed class BluespaceAnomalySystem : EntitySystem { [Dependency] private readonly IRobustRandom _random = default!; + [Dependency] private readonly ISharedAdminLogManager _adminLogger = default!; [Dependency] private readonly SharedAudioSystem _audio = default!; [Dependency] private readonly EntityLookupSystem _lookup = default!; [Dependency] private readonly SharedTransformSystem _xform = default!; @@ -43,6 +46,8 @@ public sealed class BluespaceAnomalySystem : EntitySystem _random.Shuffle(coords); for (var i = 0; i < allEnts.Count; i++) { + + _adminLogger.Add(LogType.Teleport, $"{ToPrettyString(allEnts[i])} has been shuffled to {coords[i]} by the {ToPrettyString(uid)} at {xform.Coordinates}"); _xform.SetWorldPosition(allEnts[i], coords[i], xformQuery); } } @@ -62,6 +67,9 @@ public sealed class BluespaceAnomalySystem : EntitySystem var randomY = _random.NextFloat(gridBounds.Bottom, gridBounds.Top); var pos = new Vector2(randomX, randomY); + + _adminLogger.Add(LogType.Teleport, $"{ToPrettyString(ent)} has been teleported to {pos} by the supercritical {ToPrettyString(uid)} at {mapPos}"); + _xform.SetWorldPosition(ent, pos); _audio.PlayPvs(component.TeleportSound, ent); }