Oh sorry kuxynator, I didn’t realize it was you and not the original author of the thread, I have massive respect for you for the amount of work you put into the modding community! Thanks for all you do.
When trying to access the selection box parameters for the flame thrower, it is giving me a table vs an array. I'm not very experienced in coding in LUA with this being my first foray into it so I apologize if I get any of the vernacular wrong as I come from the .NET world.
When I get back home I can attach screenshots of what is showing in the debugger.
I think it might have something to do with the data-updates.lua when the box variable is modified here as the error only occurs on fluid-turret types :
---@param entity data.EntityPrototype
local function modify(entity)
--[[TRACE]]--trace("modify", entity.name, tonumber(entity.tile_width), tonumber(entity.tile_height))
local min=math.min
local max=math.max
local v = 0.1
local box = entity.selection_box
if(not box) then return end
--calcutate optimal selection box for tile-size
local hv = get_tile_with(entity) /2
local vv = get_tile_height(entity) /2
local box2 = {{min(-hv+v,0), min(-vv+v,0)}, {max(hv-v,0), max(vv-v,0)}}
--print("box", serpent.line(box))
--print("box2", serpent.line(box2))
--WTF?? most entities have no tile_width/tile_height
--Default: calculated by the collision box width/height rounded up.
-- use optimal selection box corner or original if it closer to center
box = {
left_top = {max(box2[1][1], (box[1] or box.left_top )[1]), max(box2[1][2],(box[1] or box.left_top )[2])},
right_bottom = {min(box2[2][1], (box[2] or box.right_bottom)[1]), min(box2[2][2],(box[2] or box.right_bottom)[2])},
}
entity.selection_box = box
end
Which would result in {left_top,right_bottom} for fluid turrets. This makes doing fluid_turret_Selection_Box[1][1] (or in the case of the code above, box2[1][1]) not accessible anymore.