light
Vars | |
base_state | Base description and icon_state . |
---|---|
construct_type | Type path for the machine to create when dismantled. Should be /obj/machinery/light_construct or a subtype. |
current_mode | The light's current lighting mode. One of LIGHTMODE_* . |
flickering | Whether or not the light is currently flickering. |
light_type | Type path of the light bulb item. Used for initialization and to determine what bulbs fit. |
lightbulb | The installed light bolb. |
on | Whether or not the light is turned on. |
s | spark_spread effect datum. |
Procs | |
broken | Break the light and make sparks if it was on. |
fix | Fixes a broken light. |
flicker | Causes the light to start flickering. |
get_color_from_area | Fetches the light's color based on area flags. Used for Init and for smartly installing new bulbs during runtime (See light replacers). |
get_fitting_name | Fetches the name of light_type . |
get_mode_color | Return's the current mode's l_color value or, if there is no current_mode , the lightbulb's color. |
get_status | Returns lightbulb.status . |
insert_bulb | Attempts to insert a given light bulb. Called by use_tool() . |
remove_bulb | Attempts to remove an installed light bulb. Called by attack_hand() . |
set_emergency_lighting | Toggles the light's emergency lighting mode (LIGHTMODE_EMERGENCY ). |
set_mode | Set's the lights current_mode . new_mode should be one of LIGHTMODE_* . |
seton | Sets the light's on state, if there's a functional light bulb installed. |
switch_check | Calls lightbulb.switch_on() and updates the lighting and icon accordingly. |
Var Details
base_state
Base description and icon_state
.
construct_type
Type path for the machine to create when dismantled. Should be /obj/machinery/light_construct
or a subtype.
current_mode
The light's current lighting mode. One of LIGHTMODE_*
.
flickering
Whether or not the light is currently flickering.
light_type
Type path of the light bulb item. Used for initialization and to determine what bulbs fit.
lightbulb
The installed light bolb.
on
Whether or not the light is turned on.
s
spark_spread
effect datum.
Proc Details
broken
Break the light and make sparks if it was on.
fix
Fixes a broken light.
flicker
Causes the light to start flickering.
get_color_from_area
Fetches the light's color based on area flags. Used for Init and for smartly installing new bulbs during runtime (See light replacers).
get_fitting_name
Fetches the name of light_type
.
get_mode_color
Return's the current mode's l_color
value or, if there is no current_mode
, the lightbulb's color.
get_status
Returns lightbulb.status
.
insert_bulb
Attempts to insert a given light bulb. Called by use_tool()
.
remove_bulb
Attempts to remove an installed light bulb. Called by attack_hand()
.
set_emergency_lighting
Toggles the light's emergency lighting mode (LIGHTMODE_EMERGENCY
).
set_mode
Set's the lights current_mode
. new_mode
should be one of LIGHTMODE_*
.
seton
Sets the light's on
state, if there's a functional light bulb installed.
switch_check
Calls lightbulb.switch_on()
and updates the lighting and icon accordingly.