Fix construction action (#11186)
Co-authored-by: CommieFlowers <rasmus.cedergren@hotmail.com>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user