/tg/ Station 13 - Modules - Types — Var Details - Proc Details

overlay_lighting

Movable atom overlay-based lighting component.

Vars

lightDatum that actually creates the overlay we manage
lum_powerHow much this light affects the dynamic_lumcount of turfs.
lumcount_rangeCeiling of range, integer without decimal entries.
luminosity_turfThe turf we are currently displaying light on, if any

Procs

add_dynamic_lumiAdds the luminosity and source for the affected movable atoms to keep track of their visibility.
clean_old_cellsClears ourselves from spatial grid's dynlights lists
on_holder_movedCalled when current_holder changes loc.
on_light_eaterHandles putting the source for overlay lights into the light eater queue since we aren't tracked by /atom/var/light_sources
on_light_flags_changeTriggered right after the parent light flags change.
on_toggleToggles the light on and off.
register_new_cellsPopulates the affected_turfs lazylist, adding to its contents the effects of being near the light.
remove_dynamic_lumiRemoves the luminosity and source for the affected movable atoms to keep track of their visibility.
set_colorChanges the light's color, pretty straightforward.
set_light_render_sourceChanges the light's color, pretty straightforward.
set_powerChanges the intensity/brightness of the light by altering the visual object's alpha.
set_rangeChanges the range which the light reaches. 0 means no light, 6 is the maximum value.
turn_offToggles the light off.
turn_onToggles the light on.
update_luminosity_cellsClears the old affected cells and populates the new ones.

Var Details

light

Datum that actually creates the overlay we manage

lum_power

How much this light affects the dynamic_lumcount of turfs.

lumcount_range

Ceiling of range, integer without decimal entries.

luminosity_turf

The turf we are currently displaying light on, if any

Proc Details

add_dynamic_lumi

Adds the luminosity and source for the affected movable atoms to keep track of their visibility.

clean_old_cells

Clears ourselves from spatial grid's dynlights lists

on_holder_moved

Called when current_holder changes loc.

on_light_eater

Handles putting the source for overlay lights into the light eater queue since we aren't tracked by /atom/var/light_sources

on_light_flags_change

Triggered right after the parent light flags change.

on_toggle

Toggles the light on and off.

register_new_cells

Populates the affected_turfs lazylist, adding to its contents the effects of being near the light.

remove_dynamic_lumi

Removes the luminosity and source for the affected movable atoms to keep track of their visibility.

set_color

Changes the light's color, pretty straightforward.

set_light_render_source

Changes the light's color, pretty straightforward.

set_power

Changes the intensity/brightness of the light by altering the visual object's alpha.

set_range

Changes the range which the light reaches. 0 means no light, 6 is the maximum value.

turn_off

Toggles the light off.

turn_on

Toggles the light on.

update_luminosity_cells

Clears the old affected cells and populates the new ones.