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

materials

Vars

base_stack_recipesList of stackcrafting recipes for materials using base recipes
dimensional_themesA list of dimensional themes used by the dimensional anomaly and other things, most of which require materials to function.
flat_materialsFlat list of materials
material_combosA cache of all material combinations that have been used
materialsDictionary of material.id || material ref
materials_by_typeDictionary of type || list of material refs
propertiesAn ID -> instance list of material properties
requirementsA typepath -> instance list of material requirements
rigid_stack_recipesList of stackcrafting recipes for materials using rigid recipes

Procs

get_id_from_argsI'm not going to lie, this was swiped from SSdcs. Credit does to ninjanomnom
get_materialFetches a cached material singleton when passed sufficient arguments. Arguments:
get_material_set_cacheReturns a list to be used as an object's custom_materials. Lists will be cached and re-used based on the parameters.
get_materials_by_flagFetches all materials that match a flag, or that don't have a flag if the passed flag is negative
get_materials_by_reqReturns all materials that fit a requirement datum
initialize_material
initialize_materialsRan on initialize, populated the materials and material dictionaries with their appropriate vars (See these variables for more info)

Var Details

base_stack_recipes

List of stackcrafting recipes for materials using base recipes

dimensional_themes

A list of dimensional themes used by the dimensional anomaly and other things, most of which require materials to function.

flat_materials

Flat list of materials

material_combos

A cache of all material combinations that have been used

materials

Dictionary of material.id || material ref

materials_by_type

Dictionary of type || list of material refs

properties

An ID -> instance list of material properties

requirements

A typepath -> instance list of material requirements

rigid_stack_recipes

List of stackcrafting recipes for materials using rigid recipes

Proc Details

get_id_from_args

I'm not going to lie, this was swiped from SSdcs. Credit does to ninjanomnom

Generates an id for bespoke elements materials when given the argument list Generating the id here is a bit complex because we need to support named arguments Named arguments can appear in any order and we need them to appear after ordered arguments We assume that no one will pass in a named argument with a value of null

get_material

Fetches a cached material singleton when passed sufficient arguments. Arguments:

get_material_set_cache

Returns a list to be used as an object's custom_materials. Lists will be cached and re-used based on the parameters.

get_materials_by_flag

Fetches all materials that match a flag, or that don't have a flag if the passed flag is negative

get_materials_by_req

Returns all materials that fit a requirement datum

initialize_material

initialize_materials

Ran on initialize, populated the materials and material dictionaries with their appropriate vars (See these variables for more info)