diff --git a/Content.Server/Construction/ConstructionSystem.Graph.cs b/Content.Server/Construction/ConstructionSystem.Graph.cs index 7709c1a7ce..210a21bf96 100644 --- a/Content.Server/Construction/ConstructionSystem.Graph.cs +++ b/Content.Server/Construction/ConstructionSystem.Graph.cs @@ -232,6 +232,10 @@ namespace Content.Server.Construction construction.Node = id; + // ChangeEntity will handle the pathfinding update. + if (node.Entity is {} newEntity && ChangeEntity(uid, userUid, newEntity, construction) != null) + return true; + if(performActions) PerformActions(uid, userUid, node.Actions); @@ -239,10 +243,6 @@ namespace Content.Server.Construction if (!Exists(uid)) return false; - // ChangeEntity will handle the pathfinding update. - if (node.Entity is {} newEntity && ChangeEntity(uid, userUid, newEntity, construction) != null) - return true; - UpdatePathfinding(uid, construction); return true; } @@ -328,9 +328,6 @@ namespace Content.Server.Construction QueueDel(uid); - if(GetCurrentNode(newUid, newConstruction) is {} node) - PerformActions(newUid, userUid, node.Actions); - return newUid; }