+using Content.Server.Administration.Logs;
using Content.Shared.CartridgeLoader;
using Content.Shared.CartridgeLoader.Cartridges;
+using Content.Shared.Database;
namespace Content.Server.CartridgeLoader.Cartridges;
public sealed class NotekeeperCartridgeSystem : EntitySystem
{
[Dependency] private readonly CartridgeLoaderSystem? _cartridgeLoaderSystem = default!;
+ [Dependency] private readonly IAdminLogManager _adminLogger = default!;
public override void Initialize()
{
if (message.Action == NotekeeperUiAction.Add)
{
component.Notes.Add(message.Note);
+ _adminLogger.Add(LogType.PdaInteract, LogImpact.Low,
+ $"{ToPrettyString(args.Actor)} added a note to PDA: '{message.Note}' contained on: {ToPrettyString(uid)}");
}
else
{
component.Notes.Remove(message.Note);
+ _adminLogger.Add(LogType.PdaInteract, LogImpact.Low,
+ $"{ToPrettyString(args.Actor)} removed a note from PDA: '{message.Note}' was contained on: {ToPrettyString(uid)}");
}
UpdateUiState(uid, GetEntity(args.LoaderUid), component);
}
-
private void UpdateUiState(EntityUid uid, EntityUid loaderUid, NotekeeperCartridgeComponent? component)
{
if (!Resolve(uid, ref component))