[Rseding91] [1.1.57] Items inside modded item-with-inventory incompatible with hotbar when 0 of that item in inventory

This subforum contains all the issues which we already resolved.
Hanakocz
Inserter
Inserter
Posts: 49
Joined: Sun Jun 24, 2018 7:06 pm
Contact:

[Rseding91] [1.1.57] Items inside modded item-with-inventory incompatible with hotbar when 0 of that item in inventory

Post by Hanakocz »

Heya,
I tried to make simple filtered bag

Code: Select all

data:extend
{{
    name = 'weapon-bag',
    type = 'item-with-inventory',
    inventory_size = 10,
    icons = Lib.icons('weapon-bag'),
    stack_size = 1,
    item_subgroup_filters = item_subgroup_filters,
    filter_mode = 'whitelist',
    extends_inventory_by_default = true,
    insertion_priority_mode = 'default'
}}
It works as expected from documentation - it is openable, filterable, collects filtered items automatically.

However there is one issue, if you have item in hotbar, it shows total amount of available items from your inventory and from the bag. When you click the item in hotbar, it takes full stack of the item into cursor, and it prioritizes taking items from the bag. When items are removed from cursor (Q), they return to bag. However, this works only when you have at least one same item in the main inventory. If all the items are in bag only, clicking on them at hotbar does nothing even though it shows you have enough of the items.

I would expect that I can use items from extended inventories, regardless if I have that item *also* in the main inventory, especially when the default behaviour is that all collected items go into the bag first, so main inventory usually will have none of the items.

As a bonus note, taking the items directly from bag still makes reservation on that slot (hand in slot), however when pressing Q, error is thrown that items can't be returned. Then hand disappears and repeated Q press drops the items into the bag (as it collects items first because of the filters)
Factorio 2022.04.11 - 16.35.26.02.mp4
(13.73 MiB) Downloaded 182 times
Video: clicking on hotbar, dropping items back by pressing Q.

Rseding91
Factorio Staff
Factorio Staff
Posts: 14138
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [Rseding91] [1.1.57] Items inside modded item-with-inventory incompatible with hotbar when 0 of that item in invento

Post by Rseding91 »

Thanks for the report. It's now fixed for the next release.
If you want to get ahold of me I'm almost always on Discord.

Post Reply

Return to “Resolved Problems and Bugs”