Ingredients function?

Guacanator

New member
I want to know if there is a function that will return the items needed to craft a third item. If it's not built into mafia, is there a library that includes such a function? Would the only way to get this result be to create a massive array for every craftable item in the game? Is there even a list anywhere of every craftable item in the game?

Cheers,
Guac
 

Guacanator

New member
Perfect! That's exactly what I was looking for! thanks. My next question is how to go about comparing the returned map to a different map. would I need to use foreach for this?
 
Last edited:

heeheehee

Developer
Staff member
Most likely, assuming that I'm understanding your question.

[And lemme guess -- craftbot of sorts?]
 

Guacanator

New member
Yes I am making a craftbot! And better yet, it's working! :cool:

The code is probably the sloppiest and most thrown-together you've ever seen, though. :(
 
Top