Access to blueprint information in the shortcut bar.

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
Post Reply
dewiniaid
Long Handed Inserter
Long Handed Inserter
Posts: 96
Joined: Tue Mar 07, 2017 8:50 pm
Contact:

Access to blueprint information in the shortcut bar.

Post 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.

Hornwitser
Fast Inserter
Fast Inserter
Posts: 205
Joined: Fri Oct 05, 2018 4:34 pm
Contact:

Re: Access to blueprint information in the shortcut bar.

Post 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.

Xorimuth
Filter Inserter
Filter Inserter
Posts: 625
Joined: Sat Mar 02, 2019 9:39 pm
Contact:

Re: Access to blueprint information in the shortcut bar.

Post by Xorimuth »

Related to: 88867
My mods
Content: Freight Forwarding | Spidertron Patrols | Spidertron Enhancements | Power Overload
QoL: Factory Search | Remote Configuration | Module Inserter Simplified | Wire Shortcuts X | Ghost Warnings

martinvw
Manual Inserter
Manual Inserter
Posts: 2
Joined: Wed Nov 01, 2023 4:01 pm
Contact:

Re: Access to blueprint information in the shortcut bar.

Post 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.

Post Reply

Return to “Modding interface requests”