Page 1 of 1

[Twinsen][0.17.17] Blueprint Icons not disappearing/moving when using set_quick_bar_slot

Posted: Sun Mar 24, 2019 6:53 pm
by Amuxix
When overriding an existing slot filter using with set_quick_bar_slot the blueprint icons are not moved and stay over the newly set filter.

I have attached images to show what happens, I'm using a mod I've made that swaps bars horizontally.

This is the hotbar before switching:
Before.png
Before.png (59.19 KiB) Viewed 1528 times
This is how it looks after, look closely at the last two slots of the lower bar
After.png
After.png (53.71 KiB) Viewed 1528 times
I would also like to request if it's possible to change the get_quick_bar_slot to return a LuaItemStack so that blueprints can be switched correctly?

Note: I had reported this at the same time as another bug before that was fixed, the bug report is 66150

Re: [Twinsen][0.17.17] Blueprint Icons not disappearing/moving when using set_quick_bar_slot

Posted: Mon Mar 25, 2019 1:30 pm
by Twinsen
Fixed in Version: 0.17.18.
I fixed the issue with the drawing. (the slots will need to be set again for the correct state to be set).

As for the feature request, it's complicated. In c++, the shortcuts to blueprints and unique items are stored as Items, but in lua we don't have LuaItem, just LuaItemStack's. We can make the code search for an item in the player inventory and return that LuaItemStack but that still wont work for shortcuts to items in chests for example.

As for shortcuts to items in the blueprint library, we don't even have any kind of lua support for the blueprint library, so nothing I can return there unless we implement some new LuaBlueprintRecord.

Try making a request in Modding interface requests and something might be done about it eventually. viewforum.php?f=28

Re: [Twinsen][0.17.17] Blueprint Icons not disappearing/moving when using set_quick_bar_slot

Posted: Mon Mar 25, 2019 3:37 pm
by Amuxix
Thanks for the quick fix.

As for the request thanks for the response, I thought the filters were just LuaItemStacks which represent a LuaItemPrototype so the change would just be to return the ItemStack instead of the Prototype