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

vitals_reader

A wall mounted screen that showcases the vitals of a patient nearby.

Vars

activeWhether we are on or off
advancedWhether we perform an advanced scan on examine or not
beep_cdCooldown between beeps
beepsWhether we go beep beep
chemscanIf TRUE, also append a chemical scan to the readout
connectable_typecacheStatic typecache of things the vitals display can connect to. By default it will connect to these and grab their occupant to display as a patient.
frameTypepath to spawn when deconstructed
last_reported_statThe last stat we beeped about
max_scan_attemptsHow many attempts at scanning for a patient do we try before we turn ourself off
patientReference to the mob that is being tracked / scanned

Procs

construct_overlayHelper to construct an overlay for the vitals display
find_active_patientRecursively checks all nearby machines to find a patient to track.
get_humanoid_overlaysReturns all overlays to be shown when a humanoid patient is detected
get_scanning_overlaysReturns overlays to be used when active but without a patient detected
get_simple_mob_overlaysReturns all overlays to be shown when a simple / basic animal patient is detected
percent_to_barConverts a percentage to a bar icon state
percent_to_colorConverts a percentage to a color
set_patientSets the passed mob as the active patient If there is already a patient, it will be unset first.
toggle_activeToggles whether the display is active or not
unset_patientUnset the current patient.
update_overlay_on_signalSignal proc to update the display when a signal is received.

Var Details

active

Whether we are on or off

advanced

Whether we perform an advanced scan on examine or not

beep_cd

Cooldown between beeps

beeps

Whether we go beep beep

chemscan

If TRUE, also append a chemical scan to the readout

connectable_typecache

Static typecache of things the vitals display can connect to. By default it will connect to these and grab their occupant to display as a patient.

frame

Typepath to spawn when deconstructed

last_reported_stat

The last stat we beeped about

max_scan_attempts

How many attempts at scanning for a patient do we try before we turn ourself off

patient

Reference to the mob that is being tracked / scanned

Proc Details

construct_overlay

Helper to construct an overlay for the vitals display

find_active_patient

Recursively checks all nearby machines to find a patient to track.

This can (and should be) signal driven in the future, but machines don't have a set_occupant proc yet, so this will do for the moment.

get_humanoid_overlays

Returns all overlays to be shown when a humanoid patient is detected

get_scanning_overlays

Returns overlays to be used when active but without a patient detected

get_simple_mob_overlays

Returns all overlays to be shown when a simple / basic animal patient is detected

percent_to_bar

Converts a percentage to a bar icon state

percent_to_color

Converts a percentage to a color

set_patient

Sets the passed mob as the active patient If there is already a patient, it will be unset first.

toggle_active

Toggles whether the display is active or not

unset_patient

Unset the current patient.

update_overlay_on_signal

Signal proc to update the display when a signal is received.