furnace.last_known_recipe

321freddy
Fast Inserter
Fast Inserter
Posts: 125
Joined: Fri Sep 23, 2016 10:16 pm
Contact:

furnace.last_known_recipe

Post 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.
Rseding91
Factorio Staff
Factorio Staff
Posts: 14912
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: furnace.last_known_recipe

Post by Rseding91 »

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.
321freddy
Fast Inserter
Fast Inserter
Posts: 125
Joined: Fri Sep 23, 2016 10:16 pm
Contact:

Re: furnace.last_known_recipe

Post by 321freddy »

Awesome, thanks :D
Post Reply

Return to “Implemented mod requests”