Light fixture 
The standard light tube fixture
Vars | |
brightness_color | Light colour when on |
---|---|
brightness_power | Light intensity |
brightness_range | Light range (Also used in power calculation) |
bulb_emergency_colour | The colour of the light while it's in emergency mode |
emergency_mode | If true, the light is in emergency mode |
extinguished | Was this light extinguished with an antag ability? Used to ovveride flicker events |
fire_mode | If true, the light swaps over to emergency colour |
fitting | Type of light bulb that goes into the fixture |
flickering | Is the light currently flickering? |
light_state | If the light state has changed since the last 'update()', also update the power requirements |
light_type | Item type of the light bulb |
lightmaterials | Materials the light is made of |
nightshift_allowed | Allowed to be switched to night shift mode? |
nightshift_enabled | Currently in night shift mode? |
nightshift_light_color | The colour of the light while it's in night shift mode |
nightshift_light_power | Light intensity when in night shift mode |
nightshift_light_range | Light range when in night shift mode |
no_emergency | If true, this light cannot ever have an emergency mode |
on | Is the light on or off? |
rigged | Is the light rigged to explode? |
static_power_used | How much power does it use? |
status | Light fixture status (LIGHT_OK | LIGHT_EMPTY | LIGHT_BURNED | LIGHT_BROKEN) |
switchcount | How many times has the light been switched on/off? (This is used to calc the probability the light burns out) |
Procs | |
flicker_event | Flicker routine for the light. Called by invoke_async so the parent proc can return immediately. |
update | Updates the light's properties |
Var Details
brightness_color 
Light colour when on
brightness_power 
Light intensity
brightness_range 
Light range (Also used in power calculation)
bulb_emergency_colour 
The colour of the light while it's in emergency mode
emergency_mode 
If true, the light is in emergency mode
extinguished 
Was this light extinguished with an antag ability? Used to ovveride flicker events
fire_mode 
If true, the light swaps over to emergency colour
fitting 
Type of light bulb that goes into the fixture
flickering 
Is the light currently flickering?
light_state 
If the light state has changed since the last 'update()', also update the power requirements
light_type 
Item type of the light bulb
lightmaterials 
Materials the light is made of
nightshift_allowed 
Allowed to be switched to night shift mode?
nightshift_enabled 
Currently in night shift mode?
nightshift_light_color 
The colour of the light while it's in night shift mode
nightshift_light_power 
Light intensity when in night shift mode
nightshift_light_range 
Light range when in night shift mode
no_emergency 
If true, this light cannot ever have an emergency mode
on 
Is the light on or off?
rigged 
Is the light rigged to explode?
static_power_used 
How much power does it use?
status 
Light fixture status (LIGHT_OK | LIGHT_EMPTY | LIGHT_BURNED | LIGHT_BROKEN)
switchcount 
How many times has the light been switched on/off? (This is used to calc the probability the light burns out)
Proc Details
flicker_event
Flicker routine for the light. Called by invoke_async so the parent proc can return immediately.
update
Updates the light's properties
Updates the icon_state, luminosity, colour, and power usage of the light. Also handles rigged light bulbs exploding. Arguments:
- trigger - Should this update make the light explode/burn out? (Defaults to TRUE)
- play_sound - Will the lightbulb play a sound when it's turned on.