[2.1.9] Changing inventory_type from with_bar to with_filters_and_bar breaks blueprinted container limiters

Post your bugs and problems so we can fix them.
phidias0303
Burner Inserter
Burner Inserter
Posts: 7
Joined: Tue Apr 14, 2020 8:15 pm
Contact:

[2.1.9] Changing inventory_type from with_bar to with_filters_and_bar breaks blueprinted container limiters

Post by phidias0303 »

Description:
When changing the inventory_type of a container prototype entity from with_bar to with_filters_and_bar, any red lock limiter bar settings that were configured on the container in a blueprint are completely lost, all slots are reset to unlimited.

Expected Behavior:
Since the new inventory type (with_filters_and_bar) is a superset of the old one (with_bar), meaning it doesn't remove existing features (the bar), I would expect existing blueprints from vanilla to work correctly and retain their configured limiter settings.

Actual Behavior:
The limiter bar configuration is entirely wiped out when loading the blueprint, as if it was never set.

Additional Context:
The container's prototype inventory_type is changed from with_bar to with_filters_and_bar.
Old save blueprints that worked fine under with_bar lose their red lock limiter configuration.
The bar feature itself still exists in the new type, so this appears to be a migration/missing initialization issue rather than an intentional breaking change.

Code: Select all

        for _, v in pairs(data.raw['container']) do
            v.inventory_type = 'with_filters_and_bar'
        end
Rseding91
Factorio Staff
Factorio Staff
Posts: 17231
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [2.1.9] Changing inventory_type from with_bar to with_filters_and_bar breaks blueprinted container limiters

Post by Rseding91 »

Thanks for the report however I am not able to reproduce any such issues. Can you please give me steps that show what you're describing?
If you want to get ahold of me I'm almost always on Discord.
phidias0303
Burner Inserter
Burner Inserter
Posts: 7
Joined: Tue Apr 14, 2020 8:15 pm
Contact:

Re: [2.1.9] Changing inventory_type from with_bar to with_filters_and_bar breaks blueprinted container limiters

Post by phidias0303 »

Hi, i am still able to reproduce it on 2.1.12, so i do it on the newer version instead.

First, enable just the base / space age.
The blueprint change will be triggered by both direction, so either having the extra change mod on, or off, first, does not matter.
PHI-CL2_1.0.0.zip
test mod
(87.57 KiB) Downloaded 4 times
Start a map, create the blueprint with a chest that is limited.
Then, toggle the mod (on to off, or off to on, vice versa).
After that, a restart will be done, your blueprint stored in blueprint library, will become the no limit chest.

Example 1: With mod -> Without
427520_20260721193322_1.png
427520_20260721193322_1.png (2.24 MiB) Viewed 67 times
427520_20260721193504_1.png
427520_20260721193504_1.png (3.36 MiB) Viewed 67 times
Example 2: Without -> With mod
427520_20260721193529_1.png
427520_20260721193529_1.png (3.25 MiB) Viewed 67 times
427520_20260721193730_1.png
427520_20260721193730_1.png (4.7 MiB) Viewed 67 times
Rseding91
Factorio Staff
Factorio Staff
Posts: 17231
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [2.1.9] Changing inventory_type from with_bar to with_filters_and_bar breaks blueprinted container limiters

Post by Rseding91 »

Ah, I see how to reproduce it now. I should be able to fix it tonight/tomorrow and have it in the next release.
If you want to get ahold of me I'm almost always on Discord.
Post Reply

Return to “Bug Reports”