Fix construction action (#11186)

Co-authored-by: CommieFlowers <rasmus.cedergren@hotmail.com>
This commit is contained in:
rolfero
2022-09-11 10:56:03 +02:00
committed by GitHub
parent d933db683d
commit f492442337

View File

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