Page 1 of 1

[1.1.65] support_bar()=true despite enable_inventory_bar = false

Posted: Fri Aug 12, 2022 4:14 pm
by Gweneph
Inventories whose entity prototypes were defined with enable_inventory_bar = false like the spaceship wreckage still support the bar in lua.

Code: Select all

/c game.player.selected.get_inventory(defines.inventory.chest).set_bar(1)
will block all slots

Code: Select all

/c game.print(game.player.selected.get_inventory(defines.inventory.chest).supports_bar())
prints true

If this is intended, is there a different way to detect whether an inventory has the UI enabled to apply the bar?

Re: [1.1.65] support_bar()=true despite enable_inventory_bar = false

Posted: Fri Aug 12, 2022 4:44 pm
by Rseding91
Thanks for the report. The enable_inventory_bar is actually removed in 1.2 and only ever made it so the player (though the GUI) couldn't change the bar. Things like copy-paste settings, blueprints, and the Lua API all still worked as if the value didn't exist. So what you're seeing is expected.