fabrication
Vars | |
categories | List of lists (Strings => Strings). Global list of recipe categories. These are pulled from the recipes provided in recipes . Set during Initialize() . |
---|---|
recipes | List of lists(Strings => Paths - Subtypes of /datum/fabricator_recipe ). Global list of fabricator recipes. Set during Initialize() . |
stages_by_type | List of lists (Paths (/obj/item ) => Paths (/singleting/crafting_stage )). Global list of crafting stages. These are pulled from each crafting stage's begins_with_object_type var. Set during Initialize() . |
Procs | |
find_crafting_recipes | Retrieves a list of crafting stages for the given type path. |
get_categories | Retrieves a list of categories for the given root type. |
get_recipes | Retrieves a list of recipes for the given root type. |
try_craft_with | Attempts to start a crafting stage using the target and tool. |
Var Details
categories
List of lists (Strings => Strings). Global list of recipe categories. These are pulled from the recipes provided in recipes
. Set during Initialize()
.
Example formatting:
list(
"general" = list(
"Arms and Ammunition",
"Devices and Components"
),
"microlathe" = list(
"Cutlery",
"Drinking Glasses"
)
)
recipes
List of lists(Strings => Paths - Subtypes of /datum/fabricator_recipe
). Global list of fabricator recipes. Set during Initialize()
.
Example formatting:
list(
"general" = list(
/datum/fabricator_recipe/A,
/datum/fabricator_recipe/B
),
"microlathe" = list(
/datum/fabricator_recipe/C,
/datum/fabricator_recipe/D
)
)
stages_by_type
List of lists (Paths (/obj/item
) => Paths (/singleting/crafting_stage
)). Global list of crafting stages. These are pulled from each crafting stage's begins_with_object_type
var. Set during Initialize()
.
Proc Details
find_crafting_recipes
Retrieves a list of crafting stages for the given type path.
Parameters:
type
- The object type path to fetch from thestages_by_type
list.
Returns list of paths (/singleton/crafting_stage
). The initial crafting stages with the given type set as their begins_with_object_type
.
get_categories
Retrieves a list of categories for the given root type.
Parameters:
type
- The root type to fetch from thecategories
list.
Returns list of strings. The categories associated with the given root type.
get_recipes
Retrieves a list of recipes for the given root type.
Parameters:
type
- The root type to fetch from therecipes
list.
Returns list of paths (/datum/fabricator_recipe
). The recipes associated with the given root type.
try_craft_with
Attempts to start a crafting stage using the target and tool.
Parameters:
target
- The target object. This will be compared withbegins_with_object_type
from crafting stages.tool
- The item being used. This will be compared withcompletion_trigger_type
from crafting stages.user
- The mob performing the interaction.
Has no return value.