I mean something like this for sprites:
-- requester chest
local layer_left = {
priority = "extra-high",
filename = "base/graphics/entity/logistic-chest/logistic-chest-requester.png",
width = 2,
height = 32,
shift = util.by_pixel(-1, 0) -- here you fine tune the sprite by nudging it left(-) or right (+) (x, y)
}
local layer_right = {
priority = "extra-high",
filename = "base/graphics/entity/logistic-chest/logistic-chest-requester.png",
width = 2,
height = 32,
shift = util.by_pixel(30, 0) -- here you fine tune the sprite by nudging it left(-) or right (+) (x, y)
}
-- the middle layer will be the remaining picture of the chest now that you cut both sides
local layer_middle = {
priority = "extra-high",
filename = "base/graphics/entity/logistic-chest/logistic-chest-requester.png",
width = 28,
height = 32,
shift = util.by_pixel(2, 0) -- here you fine tune the sprite by nudging it left(-) or right (+) (x, y)
-- we nudge it 2 pixels to the right so we won't copy the 2 pixels from the left side of the item
}
-- then on your merged logistic chest file
structure = {
layers = {
layer_left,
-- now we will replicate the middle layer for the "i" number of chests, I don't know your variable here so I'm assuming chest_count as the variable
for i = 0, (chest_count -1), do
layer_middle
end,
layer_right
}
}
-- since every entity is a 32x32 sprite, if you have like 4 connected chests it would be 32x4 sprites on the direction of your connection, what I wrote above could be the initial idea for the horizontal chest sprite since we're only messing with the width property not height.
For the middle layer we're just stamping multiple times the 1 chest middle layer sprite on the final 1x4 chest.
I know that the code probably won't work but its some idea to start with so you won't need to recreate every single sprite picture by hand just to stamp on the items, you can do it on runtime by copying the pixels of the already loaded sprite ingame.