Daedalus Dock - Modules - TypesVar Details - Proc Details

crossing_signal

Pedestrian crossing signal for tram

Vars

amber_distance_thresholdProximity threshold for amber warning (slow people may be in danger)
red_distance_thresholdProximity threshold for red warning (running people will likely not be able to cross)
signal_stategreen, amber, or red.
tram_idThe ID of the tram we control
tram_refWeakref to the tram piece we control

Procs

find_tramFinds the tram, just like the tram computer
on_tram_travellingOnly process if the tram is actually moving
set_signal_stateSet the signal state and update appearance.
update_operatingUpdate processing state.

Var Details

amber_distance_threshold

Proximity threshold for amber warning (slow people may be in danger)

red_distance_threshold

Proximity threshold for red warning (running people will likely not be able to cross)

signal_state

green, amber, or red.

tram_id

The ID of the tram we control

tram_ref

Weakref to the tram piece we control

Proc Details

find_tram

Finds the tram, just like the tram computer

Locates tram parts in the lift global list after everything is done.

on_tram_travelling

Only process if the tram is actually moving

set_signal_state

Set the signal state and update appearance.

Arguments: new_state - the new state (XING_STATE_RED, etc) force_update - force appearance to update even if state didn't change.

update_operating

Update processing state.

Returns whether we are still processing.