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

exosuit fabricator

Vars

being_builtThe current design datum that the machine is building.
build_finishWorld time when the build will finish.
build_materialsReference to all materials used in the creation of the item being_built.
build_startWorld time when the build started.
component_coeffCoefficient for the efficiency of material usage in item building. Based on the installed parts.
link_on_initWhether the Exofab links to the ore silo on init. Special derelict or maintanance variants should set this to FALSE.
part_setsA list of categories that valid MECHFAB design datums will broadly categorise themselves under.
process_queueWhether or not the machine is building the entire queue automagically.
queueCurrent items in the build queue.
rmatReference to a remote material inventory, such as an ore silo.
stored_partPart currently stored in the Exofab.
stored_researchCopy of the currently synced techweb.
time_coeffCoefficient for the speed of item building. Based on the installed parts.

Procs

add_part_set_to_queueAdds a list of datum designs to the build queue.
add_to_queueAdds a datum design to the build queue.
build_next_in_queueAttempts to build the next item in the build queue.
build_partStarts the build process for a given design datum.
check_resourcesChecks if the Exofab has enough resources to print a given item.
dispense_built_partDispenses a part to the tile infront of the Exosuit Fab.
eject_sheetsEject material sheets.
get_construction_time_w_coeffCalculates the coefficient-modified build time of a design.
get_resource_cost_w_coeffCalculates the coefficient-modified resource cost of a single material component of a design's recipe.
get_resources_w_coeffCalculates resource/material costs for printing an item based on the machine's resource coefficient.
list_queueGenerates a list of parts formatted for tgui based on the current build queue.
on_finish_printingIntended to be called when the exofab has stopped working and is no longer printing items.
on_start_printingIntended to be called when an item starts printing.
output_available_resourcesGenerates a list of resources / materials available to this Exosuit Fab
output_part_infoGenerates an info list for a given part.
remove_from_queueRemoves datum design from the build queue based on index.
syncSyncs machine with R&D servers.

Var Details

being_built

The current design datum that the machine is building.

build_finish

World time when the build will finish.

build_materials

Reference to all materials used in the creation of the item being_built.

build_start

World time when the build started.

component_coeff

Coefficient for the efficiency of material usage in item building. Based on the installed parts.

Whether the Exofab links to the ore silo on init. Special derelict or maintanance variants should set this to FALSE.

part_sets

A list of categories that valid MECHFAB design datums will broadly categorise themselves under.

process_queue

Whether or not the machine is building the entire queue automagically.

queue

Current items in the build queue.

rmat

Reference to a remote material inventory, such as an ore silo.

stored_part

Part currently stored in the Exofab.

stored_research

Copy of the currently synced techweb.

time_coeff

Coefficient for the speed of item building. Based on the installed parts.

Proc Details

add_part_set_to_queue

Adds a list of datum designs to the build queue.

Will only add designs that are in this machine's stored techweb. Does final checks for datum IDs and makes sure this machine can build the designs.

add_to_queue

Adds a datum design to the build queue.

Returns TRUE if successful and FALSE if the design was not added to the queue.

build_next_in_queue

Attempts to build the next item in the build queue.

Returns FALSE if either there are no more parts to build or the next part is not buildable. Returns TRUE if the next part has started building.

build_part

Starts the build process for a given design datum.

Returns FALSE if the procedure fails. Returns TRUE when being_built is set. Uses materials.

check_resources

Checks if the Exofab has enough resources to print a given item.

Returns FALSE if the design has no reagents used in its construction (?) or if there are insufficient resources. Returns TRUE if there are sufficient resources to print the item.

dispense_built_part

Dispenses a part to the tile infront of the Exosuit Fab.

Returns FALSE is the machine cannot dispense the part on the appropriate turf. Return TRUE if the part was successfully dispensed.

eject_sheets

Eject material sheets.

Returns the number of sheets successfully ejected. eject_sheet - Byond REF of the material to eject. eject_amt - Number of sheets to attempt to eject.

get_construction_time_w_coeff

Calculates the coefficient-modified build time of a design.

Returns coefficient-modified build time of a given design.

get_resource_cost_w_coeff

Calculates the coefficient-modified resource cost of a single material component of a design's recipe.

Returns coefficient-modified resource cost for the given material component.

get_resources_w_coeff

Calculates resource/material costs for printing an item based on the machine's resource coefficient.

Returns a list of k,v resources with their amounts.

list_queue

Generates a list of parts formatted for tgui based on the current build queue.

Returns a formatted list of lists containing formatted part information for every part in the build queue.

on_finish_printing

Intended to be called when the exofab has stopped working and is no longer printing items.

Removes the overlay to show the fab working and sets idle power usage settings. Additionally resets the description and turns off queue processing.

on_start_printing

Intended to be called when an item starts printing.

Adds the overlay to show the fab working and sets active power usage settings.

output_available_resources

Generates a list of resources / materials available to this Exosuit Fab

Returns null if there is no material container available. List format is list(material_name = list(amount = ..., ref = ..., etc.))

output_part_info

Generates an info list for a given part.

Returns a list of part information.

remove_from_queue

Removes datum design from the build queue based on index.

Returns TRUE if successful and FALSE if a design was not removed from the queue.

sync

Syncs machine with R&D servers.

Requires an R&D Console visible within 7 tiles. Copies techweb research. Updates tgui's state data.