Construction Approvals

by azaghal

Ghosts require player's approval before construction bots are dispatched. This gives the player improved control over what parts of the factory get built, and when.

Utilities
a month ago
1.1 - 2.0
3.48K
Logistic network Blueprints

b [FIXED] Crash when using blueprint book which contains blueprint without any entities

2 months ago

It happens when I place a blueprint (100x100) of just bricks, while having the opcion of auto-aprove activated.

The mod Construction Planner Continued (4.0.6) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event ConstructionPlannerContinued::on_pre_build (ID 9)
ConstructionPlannerContinued/control.lua:919: bad argument #2 of 2 to 'table_size' (table expected, got nil)
stack traceback:
[C]: in function 'table_size'
ConstructionPlannerContinued/control.lua:919: in function 'get_blueprint_dimensions'
ConstructionPlannerContinued/control.lua:1046: in function 'get_maximum_blueprint_dimension'
ConstructionPlannerContinued/control.lua:1072: in function 'get_largest_possible_blueprint_bounding_box'
ConstructionPlannerContinued/control.lua:1457: in function <ConstructionPlannerContinued/control.lua:1383>

2 months ago

Hello Factory077,

Thanks for reporting this one - I was able to easily reproduce it locally. The crash happens when you are using a blueprint book with blueprint that does not contain any entities in it (as you have noted). I will try to get out a quick fix tomorrow/today most likely.

As a workaround, you should be able to use the blueprint directly (instead of via blueprint book).

That whole piece of code needs to get revamped since the modding API now exposes the active index for the player's blueprint library as well. Just need to get around to rewriting the whole thing (alongside some rebranding of the mod to avoid confusion with original mod that is active once again).

Best regards,
Branko

2 months ago

Turns out the crash would happen with any blueprint book that has blueprint without any entities - irrespective of what blueprint is currently selected. The fix was simple, and I have already pushed out the release 4.0.7.

If you can just confirm this fixes the crash in your game, I will go ahead and close off the topic.

And thank you once again for reporting the problem with clear and concise reproduction steps. :)

Best regards,
Branko

a month ago

Marking as fixed, thank you for reporting this one. :)

This thread has been locked.