Currently, when you're holding a blueprint record that is stored in the library, there is no way to access that from the API. My Quickbar Templates mod relies on being able to import and export blueprints, and using them straight from the library is the easiest and best method to do it. But now, in order for the mod to work, you have to move the record into your inventory, pick it up again so it's an item, then the mod's button will appear so you can click it.
Along with reading it, please also make it trigger on_cursor_stack_changed, as my mod also relies on that in order to work.
Thanks!
Enable reading the currently held blueprint record
Enable reading the currently held blueprint record
Don't forget, you're here forever.
Re: Enable reading the currently held blueprint record
It isn't an item stack, it is a blueprint library record, so the event wouldn't be related.
But .. we can make a lua api to access the currently helt blueprint record.
But .. we can make a lua api to access the currently helt blueprint record.
Re: Enable reading the currently held blueprint record
This is extremely important, as the current behavior breaks a whole slew of modding use cases:
1) If a player places a blueprint using a blueprint library record, during `on_put_item` there is no way for mods to access the blueprint configuration or content.
2) If a player deconstructs an area with a deconstruction planner library record, during `on_player_deconstructed_area`, there is no way to access to the deconstruction planner configuration.
At the moment, the only advice I can give users of my mods encountering the resulting issues (e.g. https://mods.factorio.com/mod/beltlayer ... d864140f0a) is to never use the blueprint library for any purpose.
1) If a player places a blueprint using a blueprint library record, during `on_put_item` there is no way for mods to access the blueprint configuration or content.
2) If a player deconstructs an area with a deconstruction planner library record, during `on_player_deconstructed_area`, there is no way to access to the deconstruction planner configuration.
At the moment, the only advice I can give users of my mods encountering the resulting issues (e.g. https://mods.factorio.com/mod/beltlayer ... d864140f0a) is to never use the blueprint library for any purpose.
Miniloader — UPS-friendly 1x1 loaders
Bulk Rail Loaders — Rapid train loading and unloading
Beltlayer & Pipelayer — Route items and fluids freely underground
Bulk Rail Loaders — Rapid train loading and unloading
Beltlayer & Pipelayer — Route items and fluids freely underground
Re: Enable reading the currently held blueprint record
Added a way to read cursor blueprint contents regardless of source.
Re: Enable reading the currently held blueprint record
Thank you very much! Is there some sort of event we can listen for to tell when a player picks up or changes their held blueprint record? Otherwise I'll have to read the cursor in an on_tick event.
Don't forget, you're here forever.