on_research_finished and LuaRecipe.enabled
Posted: Wed Jul 20, 2016 1:07 am
Hi,
it seems that in on_research_finished event, when you try to read recipe.enabled on the recipes that have just been found, it gives false
example : research automation and in on_research_finished event, print :
game.forces.player.recipes["assembling-machine-1"].enabled and game.forces.player.recipes["long-handed-inserter"].enabled )
it will give false false
if you do it afterwards, outside the event, it will give true true.
it seems that in on_research_finished event, when you try to read recipe.enabled on the recipes that have just been found, it gives false
example : research automation and in on_research_finished event, print :
game.forces.player.recipes["assembling-machine-1"].enabled and game.forces.player.recipes["long-handed-inserter"].enabled )
it will give false false
if you do it afterwards, outside the event, it will give true true.