personal_crafting 
Vars | |
ignored_flags | crafting flags we ignore when considering a recipe |
---|---|
screen_loc_override | Custom screen_loc for our element |
Procs | |
check_contents | Check that the contents of the recipe meet the requirements. |
check_tools | Returns a boolean on whether the tool requirements of the input recipe are satisfied by the input source and surroundings. |
get_used_reqs | get_used_reqs works like this: Loop over reqs var of the recipe Set var amt to the value current cycle req is pointing to, its amount of type we need to delete Get var/surroundings list of things accessable to crafting by get_environment() Check the type of the current cycle req |
perform_all_checks | This proc performs all the necessary conditional control statement to ensure that the object is allowed to be crafted by the crafter. |
Var Details
ignored_flags 
crafting flags we ignore when considering a recipe
screen_loc_override 
Custom screen_loc for our element
Proc Details
check_contents
Check that the contents of the recipe meet the requirements.
user: The /mob that initated the crafting. recipe: The /datum/crafting_recipe being attempted. contents: List of items to search for the recipe's reqs.
check_tools
Returns a boolean on whether the tool requirements of the input recipe are satisfied by the input source and surroundings.
get_used_reqs
get_used_reqs works like this: Loop over reqs var of the recipe Set var amt to the value current cycle req is pointing to, its amount of type we need to delete Get var/surroundings list of things accessable to crafting by get_environment() Check the type of the current cycle req
-
If its reagent then do a while loop, inside it try to locate() reagent containers, inside such containers try to locate needed reagent, if there isn't remove thing from surroundings
-
- Transfer a quantity (The required amount of the contained quantity, whichever is lower) of the reagent to the temporary reagents holder
-
If it's a stack, create a tally stack and then transfer an amount of the stack to the stack until it reaches the required amount.
-
If it's anything else just locate() it in the list in a while loop, for each find reduce the amt var by 1 and put the found stuff in return list
For stacks and items, the material composition is also tallied in total_materials, to be transferred to the result after that is spawned.
get_used_reqs returns the list of used required object the result will receive as argument of atom/CheckParts() If one or some of the object types is in the 'parts' list of the recipe, they will be stored inside the contents of the result The rest will instead be deleted by atom/CheckParts()
perform_all_checks
This proc performs all the necessary conditional control statement to ensure that the object is allowed to be crafted by the crafter.