If I enable the mod and load a saved game created without the mod, the technologies and recipes remain with the original prototype, and the recipe for the new item is disabled despite the unlocking technology having been researched already.
If I write the following commands in the in-game console, everything is fine:
Code: Select all
game.player.force.resettechnologies()
game.player.force.resetrecipes()
if game.player.force.technologies["robotics"].researched then
game.player.force.recipes["hyper-inserter"].enabled=true
end
Code: Select all
game.onload(function()
game.player.force.resettechnologies()
game.player.force.resetrecipes()
if game.player.force.technologies["robotics"].researched then
game.player.force.recipes["hyper-inserter"].enabled=true
end
end
)
So, why is this not working? Is this a correct usage of "onload"? Is there a better way to achieve the same effect? And what is the meaning of this cryptic message?