feat: Various Admin QOL features (#5436)

* feat: added lslaws command

* feat: add lswatchlisted command

* tweak: nicer formatting for lswatchlisted

* tweak: nicer formatting for lslaws

* feat: lsobjectives lists everyone's objectives if no user specified

* feat: mark ghosted players in players tab

* docs: add missing DeltaV patch comment

* feat: only alert admins if meatspiking player characters

* feat: always alert about station explosions, don't spam off-station alerts

* feat: stripping alert tweaks

* feat: admin alert on low hour latejoin

* refactor: forgot to make onspawncomplete non-async, wasn't necessary after all

* feat: EORG alerts

* feat: getping command

* refactor: remove unused imports, format

* refactor: early return in onspawncomplete

* feat: add coordinate link to eorg destroy alert

* tweak: cache watchlist data to avoid db calls, use in lswatchlisted

* fix: null-check in OnNoteAdded

* feat: watchlist indicator on admin overlay

* feat: optionally mark watchlisted in f7 players

* feat: refresh admin playerlist data on wl change

* fix: update player list after cache write

* feat: add tp links to prayer messages

* tweak: don't alert when uncuffing self

* tweak: lower uncuff other alert impact if mindshielded

* docs: add deltav comments to imports

* refactor: address review comments

* style: deltav comments on same line as change

* performance: get metadata only if objectives > 0

* fix: actually check user if explosion gridPos not on station

* style: remove extraneous newlines

* refactor: use fancy getOrNew method

* feat: refresh player list UI if marking pref changed

* feat: latejoin alert hours configurable

* fix: also list objectives for non-humanoids and dead people
This commit is contained in:
DisposableCrewmember42
2026-04-04 16:38:32 +02:00
committed by GitHub
parent c703999890
commit 3c0d4ab253
25 changed files with 687 additions and 24 deletions
@@ -6,6 +6,7 @@ using Content.Server.Atmos.EntitySystems;
using Content.Server.Destructible;
using Content.Server.NodeContainer.EntitySystems;
using Content.Server.NPC.Pathfinding;
using Content.Server.Station.Systems; // DeltaV - Admin QOL
using Content.Shared.Atmos.Components;
using Content.Shared.Camera;
using Content.Shared.CCVar;
@@ -54,6 +55,7 @@ public sealed partial class ExplosionSystem : SharedExplosionSystem
[Dependency] private readonly SharedMapSystem _map = default!;
[Dependency] private readonly FlammableSystem _flammableSystem = default!;
[Dependency] private readonly DestructibleSystem _destructibleSystem = default!;
[Dependency] private readonly StationSystem _stationSystem = default!; // DeltaV
private EntityQuery<FlammableComponent> _flammableQuery;
private EntityQuery<PhysicsComponent> _physicsQuery;
@@ -246,19 +248,47 @@ public sealed partial class ExplosionSystem : SharedExplosionSystem
if (!addLog)
return;
// DeltaV - check if on station START
string? stationName = null;
var station = _stationSystem.GetOwningStation(gridPos?.EntityId);
// just in case: is the user on station?
if (station is null && user is not null)
{
station = _stationSystem.GetOwningStation(user);
}
if (station is not null)
{
if (_stationSystem.TryGetNetEntity(station, out var stationNetEnt))
{
stationName = _stationSystem.GetStationNames().Find(x => x.Entity == stationNetEnt).Name;
}
}
// DeltaV - check if on station END
if (user == null)
{
_adminLogger.Add(LogType.Explosion, LogImpact.High,
$"{ToPrettyString(uid):entity} exploded ({typeId}) at Pos:{(posFound ? $"{gridPos:coordinates}" : "[Grid or Map not found]")} with intensity {totalIntensity} slope {slope}");
_adminLogger.Add(LogType.Explosion, station is not null ? LogImpact.Extreme : LogImpact.High, // DeltaV - Set to Extreme if onStation (always alert), add station name if available
$"{ToPrettyString(uid):entity} exploded ({typeId}) at {(stationName != null ? $"{stationName} " : "")}Pos:{(posFound ? $"{gridPos:coordinates}" : "[Grid or Map not found]")} with intensity {totalIntensity} slope {slope}");
}
else
{
var alertMinExplosionIntensity = _cfg.GetCVar(CCVars.AdminAlertExplosionMinIntensity);
var logImpact = (alertMinExplosionIntensity > -1 && totalIntensity >= alertMinExplosionIntensity)
? LogImpact.Extreme
: LogImpact.High;
: LogImpact.Medium; // DeltaV - If false, Medium instead of High
// DeltaV - Set to Extreme if onStation (always alert) START
if (station is not null)
logImpact = LogImpact.Extreme;
// DeltaV - Set to Extreme if onStation (always alert) END
if (posFound)
_adminLogger.Add(LogType.Explosion, logImpact, $"{ToPrettyString(user.Value):user} caused {ToPrettyString(uid):entity} to explode ({typeId}) at Pos:{gridPos:coordinates} with intensity {totalIntensity} slope {slope}");
{
_adminLogger.Add(LogType.Explosion,
logImpact,
$"{ToPrettyString(user.Value):user} caused {ToPrettyString(uid):entity} to explode ({typeId}) at {(stationName != null ? $"{stationName} " : "")}Pos:{gridPos:coordinates} with intensity {totalIntensity} slope {slope}"); // DeltaV - Add stationName to log message if available
}
else
_adminLogger.Add(LogType.Explosion, logImpact, $"{ToPrettyString(user.Value):user} caused {ToPrettyString(uid):entity} to explode ({typeId}) at Pos:[Grid or Map not found] with intensity {totalIntensity} slope {slope}");
}