Fixed it by changing data-final-fixes.lua from
local function modify_construction_robot(name, construction_robot)
--- construction
if data.raw["construction-robot"][construction_robot.name]["idle"] then
data.raw["construction-robot"][construction_robot.name]["idle"].scale = 1*(settings.startup["robot-size"].value/100)
end
if data.raw["construction-robot"][construction_robot.name]["idle"]["hr_version"] then
data.raw["construction-robot"][construction_robot.name]["idle"]["hr_version"].scale = 0.5*(settings.startup["robot-size"].value/100)
end
<snip>
return
end
to
local function modify_construction_robot(name, construction_robot)
--- construction
local bot = data.raw["construction-robot"][construction_robot.name]
if bot then
if bot["idle"] then
bot["idle"].scale = 1*(settings.startup["robot-size"].value/100)
if bot["idle"]["hr_version"] then
bot["idle"]["hr_version"].scale = 0.5*(settings.startup["robot-size"].value/100)
end
end
<snip>
end
return
end
Did the same for the function modify_logistic_robot() some lines further down.
By the way, I heard that calls to data.raw are expensive, one therefore should use a local variable instead if the same thing in data.raw is used repeatedly. That's why I used "local bots = …". Also, it's less code you have to write and the short reference makes the code more readable. :-)