Page 1 of 1

Access to blueprint information in the shortcut bar.

Posted: Fri Mar 01, 2019 3:06 am
by dewiniaid
Related bug report: see here

While the modding API can query and set filters on the quickbar (LuaPlayer::get_quick_bar_slot and LuaPlayer::set_quick_bar_slot), it has a few major limitations:
  • If an item in the quickbar is a blueprint/book/decon planner/item-with-tags, a mod cannot determine which blueprint or book it is. *]If an item in the quickbar is a reference to the blueprint library, it appears empty. There is no way to determine it was a blueprint, much less its contents.
  • I do not think there is a way to assign a specific blueprint (or similar) to a quickbar slot. (Though I just now noticed the function accepts an itemstack so maybe there is.)
In the bug report thread, I suggested this as an alternative at least for the interim:
  • Have LuaPlayer::get_quick_bar_slot return a second value consisting of either the blueprint string or a Lua table corresponding to the pre-deflate/base64 version thereof. (And likewise for similar items), or the itemstack of the associated item (if one exists)
  • Add an optional third parameter to LuaPlayer::set_quick_bar_slot to specify a counterpart to the above, to assign a quickbar slot to a specific blueprint.
  • Add some way to see the blueprint being linked in the blueprint library, or at least know the slot is not empty.

Re: Access to blueprint information in the shortcut bar.

Posted: Mon Oct 17, 2022 9:53 am
by Hornwitser
I also require this information and access for a cross server sync feature I have implemented. I can't link spidertron remotes or blueprints/decon/update planners properly on the toolbar when switching servers due to this.

Re: Access to blueprint information in the shortcut bar.

Posted: Mon Oct 17, 2022 10:38 am
by Xorimuth
Related to: 88867

Re: Access to blueprint information in the shortcut bar.

Posted: Wed Nov 01, 2023 4:13 pm
by martinvw
I assume this API limitation is also the reason why @raiguard's mod https://mods.factorio.com/mod/QuickbarTemplates can't import/export blueprint/blueprint book filters.