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

transport

Vars

can_fireonly used on maps with trams, so only enabled by such.
max_cheap_moveshow many times the tram can move costing less than half max_time milliseconds before we speed it back up again. is only used if the tram has been slowed down for exceeding max_time
max_exceeding_moveshow many times the tram can move costing over max_time milliseconds before it gets slowed down
max_timehow much time a tram can take per movement before we notify admins and slow down the tram. in milliseconds
transports_by_typeassociative list of the form: list(lift_id = list(all transport_controller datums attached to lifts of that type))

Procs

detailed_destination_listGive a list of destinations to the tram controls
dispatch_transportDispatches the transport on a validated trip
helloRegisters the subsystem to listen for incoming requests from paired devices
incoming_requestPerforms the request received from a registered transport device
pre_departurePre-departure checks for the tram
validate_and_dispatchOperational checks, then start moving

Var Details

can_fire

only used on maps with trams, so only enabled by such.

max_cheap_moves

how many times the tram can move costing less than half max_time milliseconds before we speed it back up again. is only used if the tram has been slowed down for exceeding max_time

max_exceeding_moves

how many times the tram can move costing over max_time milliseconds before it gets slowed down

max_time

how much time a tram can take per movement before we notify admins and slow down the tram. in milliseconds

transports_by_type

associative list of the form: list(lift_id = list(all transport_controller datums attached to lifts of that type))

Proc Details

detailed_destination_list

Give a list of destinations to the tram controls

dispatch_transport

Dispatches the transport on a validated trip

The subsystem at this point has confirmed a valid trip Start the transport, wake up machinery running on the subsystem (signals, etc.)

Make tram go, basically.

Arguments: transport_controller: the transport controller datum we're giving orders to destination: destination we're sending it to request_flags: additional flags for the request (ie: bypass doors, emagged request)

hello

Registers the subsystem to listen for incoming requests from paired devices

When a new device (such as a button, tram, signal etc) comes online it calls this proc with the subsystem enabling two-way communication using signals.

Arguments: new_unit: the starting point to find a beacon unit_name: the friendly name of this device id_tag: a unique identifier for this device, set on init

incoming_request

Performs the request received from a registered transport device

Currently the only supported request type is tram dispatch so there's no var for what type of request it is

The subsystem will validate and process, then send a success or fail response to the device that made the request, with info relevant to the request such as destination or error details (if the request is rejected/fails)

Arguments: source: the device sending the request transport_id: the transport this request is for, such as tram line 1 or 2 platform: the requested destination to dispatch the tram options: additional flags for the request (ie: bypass doors, emagged request)

pre_departure

Pre-departure checks for the tram

We do things slighly different based on the request_flags such as door crushing, emag related things

Arguments: transport_controller: the transport controller datum we're giving orders to request_flags: additional flags for the request (ie: bypass doors, emagged request)

validate_and_dispatch

Operational checks, then start moving

Some check failures aren't worth halting the tram for, like no blocking the doors forever Crush them instead!

Arguments: transport_controller: the transport controller datum we're giving orders to attempt: how many attempts to start moving we've made