So I finally found out why I was still seeing errors in the log for your width and height calcs. It boils down to pathed_data["line_length"] is sometimes 0 and you don't get a correct width calc and the height created a divide by zero which created an erroneous "true" result in the the if statement creating the log entry. So below is the corrected with and height calcs which account for a line_length of 0. You should replace this code in all of your mods.
I was seeing the errors on the gun-turret and laser-turret graphics files.
edited: to erroneous "true" result. I typed that incorrectly thankfully the code was still correct. :)
-- find width of animations
if type(pathed_data["width"]) == "number" and type(pathed_data["line_length"]) == "number" then
-- If pathed_data["line_length"] is > 0 do the operation normally. If is is zero then multiply pathed_data["frame_count"] and pathed_data["width"] to get correct number for with calc.
local width = pathed_data["line_length"] > 0 and pathed_data["line_length"] * pathed_data["width"] or pathed_data["frame_count"] * pathed_data["width"]
-- Separate upscaling calc to make it easier to read above calc.
width = math.max(math.floor(width * settings["upscale"]), 1)
if width > 8192 then
log("[ERROR]: Image @ " .. new_path .. " is wider than 8192 px (maximum)! It can't be loaded into the game!")
return
end
end
-- find height of animations
if type(pathed_data["height"]) == "number" and type(pathed_data["line_length"]) == "number" then
-- If pathed_data["line_length"] is > 0 do the operation normally. If is is zero then substitute pathed_data["direction_count"] to get correct number for hight calc.
local height = pathed_data["line_length"] > 0 and math.ceil((pathed_data["frame_count"] or 1) / pathed_data["line_length"]) or pathed_data["direction_count"]
-- Separate pathed_data["height"] calc and upscaling calc to make it easier to read above calc.
height = math.max(math.floor(height * pathed_data["height"] * settings["upscale"]), 1)
if height > 8192 then
log("[ERROR]: Image @ " .. new_path .. " is taller than 8192 px (maximum)! It can't be loaded into the game!")
return
end
end