Page 1 of 1

Read access to Blueprint Book inventory_size

Posted: Mon Jul 25, 2016 6:30 am
by DaveMcW
/c game.player.print(game.item_prototypes["blueprint-book"].inventory_size)

Error: LuaItemPrototype doesn't contain key inventory_size. :cry:


My use case: I want to automatically craft a blueprint book filled with blueprints, but only if the player has enough advanced circuits to afford it. Currently I don't know how many advanced circuits I need until I craft a blueprint book!

Re: Read access to Blueprint Book inventory_size

Posted: Mon Jul 25, 2016 8:01 am
by binbinhfr
The blueprint book recipe ingredients depends on its inventory size ? Weird.

I don't know if it helps, but it seems that the blueprint book inventory can be accessed here :
http://lua-api.factorio.com/latest/defines.html
item_main and item_active