Shiptest 13 - Modules - TypesVar Details - Proc Details

mineral

Mineral processing unit console

Vars

input_dirThe current direction of input_turf, in relation to the machine.
input_turfThe turf the machines listens to for items to pick up. Calls the pickup_item() proc.
needs_item_inputDetermines if this machine needs to pick up items. Used to avoid registering signals to /mineral machines that don't pickup items.
output_dirThe current direction, in relation to the machine, that items will be output to.

Procs

pickup_itemBase proc for all /mineral subtype machines to use. Place your item pickup behavior in this proc when you override it for your specific machine.
register_input_turfGets the turf in the input_dir direction adjacent to the machine, and registers signals for ATOM_ENTERED. Calls the pickup_item() proc when it receives these signals. DO NOT ADD COMSIG_ATOM_CREATED, SINCE PICKUP_ITEM WILL QDEL THE ITEM AND QDELING AN INITIALISING THING IS STUPID
unload_mineralGeneric unloading proc. Takes an atom as an argument and forceMove's it to the turf adjacent to this machine in the output_dir direction.
unregister_input_turfUnregisters signals that are registered the machine's input turf, if it has one.

Var Details

input_dir

The current direction of input_turf, in relation to the machine.

input_turf

The turf the machines listens to for items to pick up. Calls the pickup_item() proc.

needs_item_input

Determines if this machine needs to pick up items. Used to avoid registering signals to /mineral machines that don't pickup items.

output_dir

The current direction, in relation to the machine, that items will be output to.

Proc Details

pickup_item

Base proc for all /mineral subtype machines to use. Place your item pickup behavior in this proc when you override it for your specific machine.

Called when the COMSIG_ATOM_ENTERED and COMSIG_ATOM_CREATED signals are sent.

Arguments:

register_input_turf

Gets the turf in the input_dir direction adjacent to the machine, and registers signals for ATOM_ENTERED. Calls the pickup_item() proc when it receives these signals. DO NOT ADD COMSIG_ATOM_CREATED, SINCE PICKUP_ITEM WILL QDEL THE ITEM AND QDELING AN INITIALISING THING IS STUPID

unload_mineral

Generic unloading proc. Takes an atom as an argument and forceMove's it to the turf adjacent to this machine in the output_dir direction.

unregister_input_turf

Unregisters signals that are registered the machine's input turf, if it has one.