get_max_inventory_index() on a rocket silo returns 12, but get_inventory(12) seems to always be nil, and the largest defined index is 11:
fuel=1
rocket_silo_input=crafter_input=2
rocket_silo_output=crafter_output=3
rocket_silo_modules=crafter_modules=4
unnamed=5
burnt_result=6
crafter_trash=8
rocket_silo_rocket=9
rocket_silo_trash=11
[2.0.72] Rocket Silo max inventory index 11 vs 12
-
justarandomgeek
- Filter Inserter

- Posts: 307
- Joined: Fri Mar 18, 2016 4:34 pm
- Contact:
Re: [2.0.72] Rocket Silo max inventory index 11 vs 12
Given that rocket silo does not use inventory index 12, for the next release i made it only report max inventory index of 11. There will be no changelog record for this because i am not considering this to be a bug: max inventory index only represents an upper bound of inventory index that can be used inside of a loop that iterates over all inventory indexes if you want a robust way of getting all inventories, but since inventory indexes are not required to be contiguous, there will be gaps and your code should already handle a case that for given index there is no inventory. Other entities may also report max inventory index that is too high and i will not be changing them. Having max inventory index reporting value too big is considered acceptable.
