diff --git a/Content.Server/Construction/ConstructionSystem.Graph.cs b/Content.Server/Construction/ConstructionSystem.Graph.cs index 152ae66011..38a9b2eef8 100644 --- a/Content.Server/Construction/ConstructionSystem.Graph.cs +++ b/Content.Server/Construction/ConstructionSystem.Graph.cs @@ -3,6 +3,7 @@ using Content.Server.Containers; using Content.Shared.Construction; using Content.Shared.Construction.Prototypes; using Content.Shared.Construction.Steps; +using Content.Shared.Database; using Robust.Server.Containers; using Robust.Shared.Containers; using Robust.Shared.Prototypes; @@ -229,8 +230,13 @@ namespace Content.Server.Construction || GetNodeFromGraph(graph, id) is not {} node) return false; + var oldNode = construction.Node; construction.Node = id; + if (userUid != null) + _adminLogger.Add(LogType.Construction, LogImpact.Low, + $"{ToPrettyString(userUid.Value):player} changed {ToPrettyString(uid):entity}'s node from \"{oldNode}\" to \"{id}\""); + // ChangeEntity will handle the pathfinding update. if (node.Entity is {} newEntity && ChangeEntity(uid, userUid, newEntity, construction) != null) return true; diff --git a/Content.Server/Construction/ConstructionSystem.Interactions.cs b/Content.Server/Construction/ConstructionSystem.Interactions.cs index f55c8b5b77..1875ea2365 100644 --- a/Content.Server/Construction/ConstructionSystem.Interactions.cs +++ b/Content.Server/Construction/ConstructionSystem.Interactions.cs @@ -48,7 +48,7 @@ namespace Content.Server.Construction /// When is true, this method will simply return whether the interaction /// would be handled by the entity or not. It essentially becomes a pure method that modifies nothing. /// The result of this interaction with the entity. - private HandleResult HandleEvent(EntityUid uid, object ev, bool validation, ConstructionComponent? construction = null, InteractUsingEvent? args = null) + private HandleResult HandleEvent(EntityUid uid, object ev, bool validation, ConstructionComponent? construction = null) { if (!Resolve(uid, ref construction)) return HandleResult.False; @@ -170,9 +170,6 @@ namespace Content.Server.Construction // We change the node now. ChangeNode(uid, user, edge.Target, true, construction); - - if (ev is ConstructionDoAfterComplete event1 && event1.WrappedEvent is InteractUsingEvent event2) - _adminLogger.Add(LogType.Construction, LogImpact.Low, $"{ToPrettyString(event2.User):player} changed {ToPrettyString(uid):entity}'s node to {edge.Target}"); } return HandleResult.True;