[0.17.3] Inconsistent behavior with blueprints in the shortcut bar (and no mod access to blueprint data)

This subforum contains all the issues which we already resolved.
Post Reply
dewiniaid
Long Handed Inserter
Long Handed Inserter
Posts: 96
Joined: Tue Mar 07, 2017 8:50 pm
Contact:

[0.17.3] Inconsistent behavior with blueprints in the shortcut bar (and no mod access to blueprint data)

Post by dewiniaid »

If a blueprint created in-game as an item (not the library) is placed in a quickbar slot, but is then moved into a chest, the blueprint is no longer placeable .

If the blueprint is then destroyed, it is removed from the quickbar.

If a blueprint is moved from the library directly onto the quickbar, it appears unavailable (it is dimmed out), but can be placed anyways. There is no physical item in the inventory in this case.

If a blueprint is copied from the library to the inventory, and then from the inventory to the quickbar, and then moved to a chest, it is no longer placeable.

If the chest is then destroyed, the blueprint shows as unavailable but magically becomes placeable again.



Modding:
(Context: I want to write a mod that exports/imports quickbar presets so they can be transferred between saves using a mechanism similar to blueprint strings; it's how I found the above.)

LuaPlayer::get_quick_bar_slot() on a quickbar slot containing a reference to a blueprint in the library returns nilaa

There is no way for a mod to determine which blueprint/book/decon planner is occupying a slot.

There is no way for a mod to set a specific blueprint/book/decon planner to a quickbar slot.

Proposed fix to the last last two: Have LuaPlayer::get_quick_bar_slot() return a second 'data' argument equivalent to either LuaItemStack::export_stack() or a Lua representation thereof (prior to the base64/deflate step), and add an optional third argument LuaPlayer::set_quick_bar_slot() for this data.

MightyMooquack
Burner Inserter
Burner Inserter
Posts: 8
Joined: Mon Apr 24, 2017 1:33 am
Contact:

Re: [0.17.3] Inconsistent behavior with blueprints in the shortcut bar (and no mod access to blueprint data)

Post by MightyMooquack »

Confirmed that LuaPlayer::get_quick_bar_slot() returns nil when a blueprint is in the slot. This is inconvenient, since I'm trying to make a mod that adds an item to the first empty quickbar slot. As-is, it will overwrite any blueprints.

Twinsen
Factorio Staff
Factorio Staff
Posts: 1240
Joined: Tue Sep 23, 2014 7:10 am
Contact:

Re: [0.17.3] Inconsistent behavior with blueprints in the shortcut bar (and no mod access to blueprint data)

Post by Twinsen »

The issues and inconsistencies mentioned should be fixed in Version: 0.17.38.

Regarding the modding part, unfortunately we have no API for working with the blueprint library, so unfortunately what you want can't be done yet.
We looked into the other modding issues and it's also problematic. See viewtopic.php?p=416593#p416593

Post Reply

Return to “Resolved Problems and Bugs”