Not sure exactly what mods were causing these bugs, but in functions.lua
:
function ProductivityResearchForEveryone.rescaleIcons(icons, rescale_mod)
for _, icon in pairs(icons) do
if icon.scale then
icon.scale = icon.scale * rescale_mod
if icon.shift then
-- Per https://lua-api.factorio.com/latest/types/IconData.html, this can be either a 2-element vector, or a struct {x, y}
if (icon.shift[1] ~= nil) then
icon.shift[1] = icon.shift[1] * rescale_mod
icon.shift[2] = icon.shift[2] * rescale_mod
else
icon.shift.x = icon.shift.x * rescale_mod
icon.shift.y = icon.shift.y * rescale_mod
end
end
end
end
end
function ProductivityResearchForEveryone.isTechSimplerThan(tech, other_tech)
-- after prereq bias, before pack type count
-- ignore techs with no unit ingredients.
-- This is 100% a bug in another mod but I wasn't able to figure out which mod was causing the bug
if (tech.unit.ingredients ~= nil) and not (other_tech.unit.ingredients ~= nil) then
return true
end
if not (tech.unit.ingredients ~= nil) and (other_tech.unit.ingredients ~= nil) then
return false
end
if (tech.unit.ingredients == nil) and (other_tech.unit.ingredients == nil) then
return false
end
(I'm not really familiar with lua, there might be better ways to handle these checks)