light
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
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.
Example: LIGHTMODE_EMERGENCY = list(l_range = 4, l_power = 1, l_color = LIGHT_COLOUR_E_RED)
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.
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.