vitals_reader 
A wall mounted screen that showcases the vitals of a patient nearby.
Vars | |
| 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 |
Procs | |
| 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. |
| 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. |
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
- state_to_use - icon state to use, required
- color_to_use - color to use, optional
- y_offset - offset to apply to the y position of the overlay, defaults to 0
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.
- scan_attempts - number of times this has been called, used to prevent infinite loops
get_humanoid_overlays
Returns all overlays to be shown when a humanoid patient is detected
- hp_color - color being used for general, overrall health
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
- hp_color - color being used for general, overrall health
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.