Files
GS13NG/code/datums/components/crafting/recipes.dm
Artur eafc69aa65 Reviewer suggestion, reduces paralyze
And ports that commit that ghommie said
2020-04-17 16:22:15 +03:00

27 lines
1.1 KiB
Plaintext

/datum/crafting_recipe
var/name = "" //in-game display name
var/list/reqs = list() //type paths of items consumed associated with how many are needed
var/list/blacklist = list() //type paths of items explicitly not allowed as an ingredient
var/result //type path of item resulting from this craft
var/list/tools = list() //type paths of items needed but not consumed
var/time = 30 //time in deciseconds
var/list/parts = list() //type paths of items that will be placed in the result
var/list/chem_catalysts = list() //like tools but for reagents
var/category = CAT_NONE //where it shows up in the crafting UI
var/subcategory = CAT_NONE
var/always_availible = TRUE //Set to FALSE if it needs to be learned first.
/datum/crafting_recipe/New()
if(!(result in reqs))
blacklist += result
/**
* Run custom pre-craft checks for this recipe
*
* user: The /mob that initiated the crafting
* collected_requirements: A list of lists of /obj/item instances that satisfy reqs. Top level list is keyed by requirement path.
*/
/datum/crafting_recipe/proc/check_requirements(mob/user, list/collected_requirements)
return TRUE