Page 1 of 1

Elevated rails prerequisite entity construction

Posted: Thu Nov 07, 2024 2:22 am
by ILLISIS
11-07-2024, 13-07-19.png
11-07-2024, 13-07-19.png (1.26 MiB) Viewed 121 times
Referring to the image attached, I am met with a situation where objects are within construction range are able to be supplied but not built by robots.
The API has the ability to determine that the item required to build a ghost entity is available in the logistic network however the entity requires other entities to be built first, the main case is elevated rail supports.

Current logic that checks for item availability:
https://github.com/ILLISIS/Constructron ... on.lua#L46

So the entity is in range, and the item to build the entity is satisfied in the network, there just does not seem to be a way in the API to determine if prerequisite entities (rail supports) are met for bots to place the rails in this case.

The result of this flaw in logic is the code block will never be passed and it will forever wait for something to be built that cannot be due to the prerequisite not being met.

A timeout could be placed within the code as a work around but that is not the best solution in my opinion.