[1.1.109] LuaSurface.create_entity uses 0 based indexing for the "bar"
Posted: Thu Jul 04, 2024 1:15 pm
When I create entity (specifically a chest) with LuaSurface.create_entity I can provide "bar" parameter which will be used to set bar of a chest.
But this "bar" is treated as zero-based index, instead of 1-based index as all other method which work with inventory bar
But this "bar" is treated as zero-based index, instead of 1-based index as all other method which work with inventory bar
Code: Select all
-- setting "bar" to 10, so only first row should be allowed
-- but "get_bar" function returns 11
surface.create_entity({name = 'iron-chest', bar = 10}).get_inventory(defines.inventory.chest).get_bar()