on_player_crafted_item: add recipe

Post Reply
AmE
Manual Inserter
Manual Inserter
Posts: 1
Joined: Sat Sep 24, 2016 8:54 pm
Contact:

on_player_crafted_item: add recipe

Post by AmE » Sat Sep 24, 2016 9:04 pm

i would require a way to find out what recipe was used on crafting an item (one that is much more efficient then searching through all recipes, even more since the the possibility to have more then one recipe for a certain item exists - due mods adding recipes for example ),

It would be really nice to have this added. (unless there is already a way, and i completely overlooked it after searching through it for an hour)

from:

Code: Select all

on_player_crafted_item
<...>
Contains
item_stack :: LuaItemStack: The crafted item
to

Code: Select all

Contains
item_stack :: LuaItemStack: The crafted item
used_recipe :: LuaRecipe: Used Recipe

Danielv123
Inserter
Inserter
Posts: 44
Joined: Sun Jan 03, 2016 10:28 am
Contact:

Re: on_player_crafted_item: add recipe

Post by Danielv123 » Tue Nov 08, 2016 10:26 am

But thats not possible if items were to stack. Or there are multiple recipes to create one item (petrol for example)

Rseding91
Factorio Staff
Factorio Staff
Posts: 9969
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: on_player_crafted_item: add recipe

Post by Rseding91 » Mon Nov 14, 2016 11:51 am

Added for 0.15.
If you want to get ahold of me I'm almost always on Discord.

Post Reply

Return to “Implemented mod requests”

Who is online

Users browsing this forum: No registered users