[2.1.8] ContainerPrototype.picture needs all directions even ContainerPrototype.direction_count is 2
Posted: Fri Jun 26, 2026 11:56 am
I'm creating a container which has direction_count set to 2, so I'd expect picture to also only require 2 directions. But game doesn't load until I provide pictures for all 4 cardinal directions.
I would expect this to work:
But game fail to load with "Key "south" not found in property tree at ROOT.container.container.picture"
Not a massive problem, just something which could be polished.
I would expect this to work:
Code: Select all
data:extend({
{
type = 'container',
name = 'container',
picture = {
north = {
filename = '__base__/graphics/entity/steel-chest/steel-chest.png',
width = 64,
height = 80,
},
east = {
filename = '__base__/graphics/entity/steel-chest/steel-chest.png',
width = 64,
height = 80,
},
},
direction_count = 2,
inventory_size = 1,
collision_box = {{-1, -1}, {1, 1}},
selection_box = {{-1, -1}, {1, 1}},
}
})
Not a massive problem, just something which could be polished.