[Twinsen] [0.14.14] Changes to item_slot_count don't update

This subforum contains all the issues which we already resolved.
Post Reply
GotLag
Filter Inserter
Filter Inserter
Posts: 532
Joined: Sat May 03, 2014 3:32 pm
Contact:

[Twinsen] [0.14.14] Changes to item_slot_count don't update

Post by GotLag »

I have a mod with a constant-combinator type entity (reactor-interface) that currently has 5 slots. As part of an update I am writing, I have increased item_slot_count in the prototype to 10.

However, when I load an old save I get a lua error from the on_tick event in my control.lua script, as it's trying to write a signal to slot 6 and the existing reactor-interface entities appear to still be treated as if they have 5 slots.
The specific error is "Index out of bounds: 6"

Note that if I comment out the offending line (so I can load the game) and open a reactor-interface GUI it shows 10 slots.

I have a stupid (but apparently working) workaround:
  1. Create a temporary surface
  2. Create a temporary reactor-interface
  3. Iterate over all existing reactor-interfaces and copy the settings from the temporary reactor-interface
  4. Delete the temporary reactor-interface
  5. Delete the temporary surface
This goes in my on_configuration_changed handler.

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

Re: [Twinsen] [0.14.14] Changes to item_slot_count don't update

Post by Twinsen »

Fixed in Version: 0.14.17

GotLag
Filter Inserter
Filter Inserter
Posts: 532
Joined: Sat May 03, 2014 3:32 pm
Contact:

Re: [Twinsen] [0.14.14] Changes to item_slot_count don't update

Post by GotLag »

Cheers!

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

Re: [Twinsen] [0.14.14] Changes to item_slot_count don't update

Post by Rseding91 »

Twinsen wrote:Fixed in Version: 0.14.17
Did you forget to push the fix? :)
If you want to get ahold of me I'm almost always on Discord.

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

Re: [Twinsen] [0.14.14] Changes to item_slot_count don't update

Post by Twinsen »

Rseding91 wrote:
Twinsen wrote:Fixed in Version: 0.14.17
Did you forget to push the fix? :)
I did. Pushed now and it will still be in Version: 0.14.17

Post Reply

Return to “Resolved Problems and Bugs”