Page 1 of 1

furnace.last_known_recipe

Posted: Mon May 29, 2017 1:47 pm
by 321freddy
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.

Re: furnace.last_known_recipe

Posted: Mon May 29, 2017 3:33 pm
by Rseding91
Furnaces actually already track this so it was super easy to add.

Re: furnace.last_known_recipe

Posted: Mon May 29, 2017 3:56 pm
by 321freddy
Awesome, thanks :D