Slight construction cleanup. (#12614)

This commit is contained in:
Vera Aguilera Puerto
2022-11-16 12:10:27 +01:00
committed by GitHub
parent baa54dc5fe
commit 4e3246d278
2 changed files with 7 additions and 4 deletions

View File

@@ -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;