In my current mod I need to detect what recipe a furnace currently has/had. Unfortunately furnaces lose their recipe when they finish their craft and no ingredients are left.
What I want is a property which holds the last known recipe of a furnace.
Something like: LuaEntity.last_known_recipe [R] (useable only on furnaces) --> returns either LuaRecipe or LuaRecipePrototype or recipe name (doesn't matter)
The game can easily save this info but keeping track of the recipe for every furnace with a mod is very bad for performance.
furnace.last_known_recipe
furnace.last_known_recipe
My mods:
Re: furnace.last_known_recipe
Furnaces actually already track this so it was super easy to add.
If you want to get ahold of me I'm almost always on Discord.