Skip to content

Commit

Permalink
Log giving items to the Oracle or Butlertrol (DeltaV-Station#1450)
Browse files Browse the repository at this point in the history
Log oracle and Roboisseur sells
  • Loading branch information
NullWanderer authored Jul 1, 2024
1 parent ee4dd88 commit 5568ddf
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Content.Server/DeltaV/NPC/Roboisseur/RoboisseurSystem.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using Content.Server.Administration.Logs;
using Content.Shared.Interaction;
using Content.Shared.Mobs.Components;
using Content.Server.Chat.Systems;
Expand All @@ -7,6 +8,7 @@
using Content.Shared.Kitchen;
using Robust.Server.GameObjects;
using Content.Server.Materials;
using Content.Shared.Database;
using Robust.Shared.Player;
using Robust.Shared.Timing;

Expand All @@ -20,6 +22,7 @@ public sealed partial class RoboisseurSystem : EntitySystem
[Dependency] private readonly MaterialStorageSystem _material = default!;
[Dependency] private readonly AppearanceSystem _appearance = default!;
[Dependency] private readonly IGameTiming _timing = default!;
[Dependency] private readonly IAdminLogManager _adminLog = default!;

public override void Initialize()
{
Expand Down Expand Up @@ -127,6 +130,10 @@ private void OnInteractUsing(EntityUid uid, RoboisseurComponent component, Inter
message = Loc.GetString(_random.Pick(component.RewardMessagesTier2));
_chat.TrySendInGameICMessage(uid, message, InGameICChatType.Speak, true);

_adminLog.Add(LogType.InteractHand,
LogImpact.Medium,
$"{ToPrettyString(args.User):player} sold {ToPrettyString(args.Used)} to {ToPrettyString(uid)}.");

RewardServicer(args.User, component, tier);

if (nextItem)
Expand Down
7 changes: 7 additions & 0 deletions Content.Server/Nyanotrasen/Research/Oracle/OracleSystem.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System.Linq;
using Content.Server.Administration.Logs;
using Content.Server.Botany;
using Content.Server.Chat.Managers;
using Content.Server.Chat.Systems;
Expand All @@ -10,6 +11,7 @@
using Content.Shared.Chemistry.Components;
using Content.Shared.Chemistry.EntitySystems;
using Content.Shared.Chemistry.Reagent;
using Content.Shared.Database;
using Content.Shared.Interaction;
using Content.Shared.Mobs.Components;
using Content.Shared.Psionics.Glimmer;
Expand All @@ -30,6 +32,7 @@ public sealed class OracleSystem : EntitySystem
[Dependency] private readonly SolutionContainerSystem _solutionSystem = default!;
[Dependency] private readonly GlimmerSystem _glimmerSystem = default!;
[Dependency] private readonly PuddleSystem _puddleSystem = default!;
[Dependency] private readonly IAdminLogManager _adminLog = default!;

public override void Update(float frameTime)
{
Expand Down Expand Up @@ -132,6 +135,10 @@ private void OnInteractUsing(EntityUid uid, OracleComponent component, InteractU

EntityManager.QueueDeleteEntity(args.Used);

_adminLog.Add(LogType.InteractHand,
LogImpact.Medium,
$"{ToPrettyString(args.User):player} sold {ToPrettyString(args.Used)} to {ToPrettyString(uid)}.");

EntityManager.SpawnEntity("ResearchDisk5000", Transform(args.User).Coordinates);

DispenseLiquidReward(uid, component);
Expand Down

0 comments on commit 5568ddf

Please sign in to comment.