"New player" admin logging improvements (#35961)

* Initial commit

* Adjust a whoooole bunch of logs

* Also spears

* Track going crit

* Review fix

* Review fixes
This commit is contained in:
SlamBamActionman
2025-03-20 20:56:51 +01:00
committed by GitHub
parent 07a8a02522
commit 43d08100b9
47 changed files with 249 additions and 97 deletions

View File

@@ -23,7 +23,9 @@ using Robust.Shared.Prototypes;
using Robust.Shared.Random;
using Robust.Shared.Timing;
using Content.Server.Labels.Components;
using Content.Shared.Administration.Logs;
using Content.Shared.Containers.ItemSlots;
using Content.Shared.Database;
namespace Content.Server.Botany.Systems;
@@ -42,6 +44,7 @@ public sealed class PlantHolderSystem : EntitySystem
[Dependency] private readonly RandomHelperSystem _randomHelper = default!;
[Dependency] private readonly IRobustRandom _random = default!;
[Dependency] private readonly ItemSlotsSystem _itemSlots = default!;
[Dependency] private readonly ISharedAdminLogManager _adminLogger = default!;
public const float HydroponicsSpeedMultiplier = 1f;
@@ -188,6 +191,9 @@ public sealed class PlantHolderSystem : EntitySystem
CheckLevelSanity(uid, component);
UpdateSprite(uid, component);
if (seed.PlantLogImpact != null)
_adminLogger.Add(LogType.Botany, seed.PlantLogImpact.Value, $"{ToPrettyString(args.User):player} planted {Loc.GetString(seed.Name):seed} at Pos:{Transform(uid).Coordinates}.");
return;
}