light ![code/modules/power/lighting.dm 639](git.png)
Vars | |
b_colour | Lighting colour value when turned on. |
---|---|
base_state | Base icon_state . |
broken_chance | Probability the light bulb spawns broken. |
lighting_modes | List of lists. Alternative lighting modes the bulb supports. Entry index should be the LIGHTMODE_* type supported, and the value should be a list of l_* lighting values to be applied when the mode is enabled. |
random_tone | Whether or not to randomly select a lighting color from random_tone_options on init. |
random_tone_options | List of colors to pick from on init if random_tone is set. |
sound_on | Sound file to play when the light is turned on. |
status | The light bulb's status. One of LIGHT_* . |
switchcount | Number of times the light bulb has been switched on. Used to 'burn out' the bulb if switched too often. |
Procs | |
set_status | Handles updating the light's status . |
shatter | Handles shattering the light bulb under certain conditions, such as impacts or damage. |
switch_on | Handles switching the light bulb on. |
Var Details
b_colour ![code/modules/power/lighting.dm 658](git.png)
Lighting colour
value when turned on.
base_state ![code/modules/power/lighting.dm 647](git.png)
Base icon_state
.
broken_chance ![code/modules/power/lighting.dm 652](git.png)
Probability the light bulb spawns broken.
lighting_modes ![code/modules/power/lighting.dm 665](git.png)
List of lists. Alternative lighting modes the bulb supports. Entry index should be the LIGHTMODE_*
type supported, and the value should be a list of l_*
lighting values to be applied when the mode is enabled.
Example: LIGHTMODE_EMERGENCY = list(l_range = 4, l_power = 1, l_color = LIGHT_COLOUR_E_RED)
random_tone ![code/modules/power/lighting.dm 670](git.png)
Whether or not to randomly select a lighting color from random_tone_options
on init.
random_tone_options ![code/modules/power/lighting.dm 672](git.png)
List of colors to pick from on init if random_tone
is set.
sound_on ![code/modules/power/lighting.dm 668](git.png)
Sound file to play when the light is turned on.
status ![code/modules/power/lighting.dm 645](git.png)
The light bulb's status. One of LIGHT_*
.
switchcount ![code/modules/power/lighting.dm 649](git.png)
Number of times the light bulb has been switched on. Used to 'burn out' the bulb if switched too often.
Proc Details
set_status
Handles updating the light's status
.
shatter
Handles shattering the light bulb under certain conditions, such as impacts or damage.
switch_on
Handles switching the light bulb on.