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

mecha_part_fabricator

Vars

being_builtThe current design datum that the machine is building.
build_finishWorld time when the build will finish.
build_startWorld time when the build started.
cached_designsAll designs in the techweb that can be fabricated by this machine, since the last update.
component_coeffCoefficient for the efficiency of material usage in item building. Based on the installed parts.
drop_directionDirection the produced items will drop (0 means on top of us)
illegal_local_designsLocal designs that only this mechfab have(using when mechfab emaged so it's illegal designs).
link_on_initWhether the Exofab links to the ore silo on init. Special derelict or maintanance variants should set this to FALSE.
print_soundLooping sound for printing items
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_researchReference to the techweb.
time_coeffCoefficient for the speed of item building. Based on the installed parts.
top_job_idThe job ID of the part currently being processed. This is used for ordering list items for the client UI.

Procs

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.
dispense_built_partDispenses a part to the tile infront of the Exosuit Fab.
get_construction_time_w_coeffCalculates the coefficient-modified build time of a design.
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.
remove_from_queueRemoves datum design from the build queue based on index.
update_menu_techUpdates the final_sets and buildable_parts for the current mecha fabricator.

Var Details

being_built

The current design datum that the machine is building.

build_finish

World time when the build will finish.

build_start

World time when the build started.

cached_designs

All designs in the techweb that can be fabricated by this machine, since the last update.

component_coeff

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

drop_direction

Direction the produced items will drop (0 means on top of us)

illegal_local_designs

Local designs that only this mechfab have(using when mechfab emaged so it's illegal designs).

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

print_sound

Looping sound for printing items

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

Reference to the techweb.

time_coeff

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

top_job_id

The job ID of the part currently being processed. This is used for ordering list items for the client UI.

Proc Details

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.

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.

get_construction_time_w_coeff

Calculates the coefficient-modified build time of a design.

Returns coefficient-modified build time of a given design.

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.

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.

update_menu_tech

Updates the final_sets and buildable_parts for the current mecha fabricator.