/tg/ Station 13 - Modules - TypesVar Details - Proc Details

personal_crafting

Vars

ignored_flagscrafting flags we ignore when considering a recipe
screen_loc_overrideCustom screen_loc for our element

Procs

check_contentsCheck that the contents of the recipe meet the requirements.
check_toolsReturns a boolean on whether the tool requirements of the input recipe are satisfied by the input source and surroundings.
get_used_reqsget_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_checksThis 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

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.