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;
|
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user