materials
Vars | |
base_stack_recipes | List of stackcrafting recipes for materials using base recipes |
---|---|
material_combos | A cache of all material combinations that have been used |
materialids_by_category | Dictionary of category || list of material ids, mostly used by rnd machines like autolathes. |
materialids_by_type | Dictionary of type || list of material ids |
materials | Dictionary of material.id || material ref |
materials_by_category | Dictionary of category || list of material refs |
materials_by_type | Dictionary of type || list of material refs |
rigid_stack_recipes | List of stackcrafting recipes for materials using rigid recipes |
template_paths_by_rarity | Blank versions of all of the mining templates, indexed by rarity. |
Procs | |
FindOrCreateMaterialCombo | Returns a list to be used as an object's custom_materials. Lists will be cached and re-used based on the parameters. |
GetIdFromArguments | Generates a unique ID from a list of arguments. Does not support passing in lists. |
GetMaterialName | Returns the name of a supplied material datum or reagent ID. |
InitializeMaterial | |
InitializeMaterials | Ran on initialize, populated the materials and materials_by_category dictionaries with their appropiate vars (See these variables for more info) |
_GetMaterialRef |
Var Details
base_stack_recipes
List of stackcrafting recipes for materials using base recipes
material_combos
A cache of all material combinations that have been used
materialids_by_category
Dictionary of category || list of material ids, mostly used by rnd machines like autolathes.
materialids_by_type
Dictionary of type || list of material ids
materials
Dictionary of material.id || material ref
materials_by_category
Dictionary of category || list of material refs
materials_by_type
Dictionary of type || list of material refs
rigid_stack_recipes
List of stackcrafting recipes for materials using rigid recipes
template_paths_by_rarity
Blank versions of all of the mining templates, indexed by rarity.
Proc Details
FindOrCreateMaterialCombo
Returns a list to be used as an object's custom_materials. Lists will be cached and re-used based on the parameters.
GetIdFromArguments
Generates a unique ID from a list of arguments. Does not support passing in lists.
GetMaterialName
Returns the name of a supplied material datum or reagent ID.
InitializeMaterial
-
Creates and caches a material datum.
-
Arugments:
-
- arguments: The arguments to use to create the material datum
-
- The first element is the type of material to initialize.
InitializeMaterials
Ran on initialize, populated the materials and materials_by_category dictionaries with their appropiate vars (See these variables for more info)
_GetMaterialRef
-
Fetches a cached material singleton when passed sufficient arguments.
-
Arguments:
-
- arguments: The list of arguments used to fetch the material ref.
-
- The first element is a material datum, text string, or material type.
-
- [Material datums][/datum/material] are assumed to be references to the cached datum and are returned
-
- Text is assumed to be the text ID of a material and the corresponding material is fetched from the cache
-
- A material type is checked for bespokeness:
-
- If the material type is not bespoke the type is assumed to be the id for a material and the corresponding material is loaded from the cache.
-
- If the material type is bespoke a text ID is generated from the arguments list and used to load a material datum from the cache.
-
- The following elements are used to generate bespoke IDs