White Sands - Modules - TypesVar Details - Proc Details

/datum/component/overlay_lighting

Movable atom overlay-based lighting component.

Vars

affected_turfsLazy list to track the turfs being affected by our light, to determine their visibility.
cast_rangeCast range for the directional cast (how far away the atom is moved)
coneA cone overlay for directional light, it's alpha and color are dependant on the light
current_directionCurrent tracked direction for the directional cast behaviour
current_holderMovable atom currently holding the light. Parent might be a flashlight, for example, but that might be held by a mob or something else.
directionalWhether we're a directional light
directional_atomAbstractional atom for directional light, we move this around to make the directional effect
light_overlaysCache of the possible light overlays, according to size.
lum_powerHow much this light affects the dynamic_lumcount of turfs.
lumcount_rangeCeiling of range, integer without decimal entries.
overlay_lighting_flagsFor light sources that can be turned on and off.
parent_attached_toMovable atom the parent is attached to. For example, a flashlight into a helmet or gun. We'll need to track the thing the parent is attached to as if it were the parent itself.
rangeHow far the light reaches, float.
set_alphaTransparency value.
visible_maskOverlay effect to cut into the darkness and provide light.

Procs

add_dynamic_lumiAdds the luminosity and source for the afected movable atoms to keep track of their visibility.
cast_directional_lightHere we append the behavior associated to changing lum_power.
check_holderUsed to determine the new valid current_holder from the parent's loc.
clean_old_turfsClears the affected_turfs lazylist, removing from its contents the effects of being near the light.
get_new_turfsPopulates the affected_turfs lazylist, adding to its contents the effects of being near the light.
make_luminosity_updateClears the old affected turfs and populates the new ones.
on_holder_dir_changeCalled when current_holder changes loc.
on_holder_movedCalled when current_holder changes loc.
on_holder_qdelCalled when the current_holder is qdeleted, to remove the light effect.
on_light_flags_changeTriggered right before the parent light flags change.
on_parent_attached_to_movedCalled when parent_attached_to changes loc.
on_parent_attached_to_qdelCalled when the current_holder is qdeleted, to remove the light effect.
on_parent_dir_changeCalled when parent changes loc.
on_parent_movedCalled when parent changes loc.
on_toggleToggles the light on and off.
remove_dynamic_lumiRemoves the luminosity and source for the afected movable atoms to keep track of their visibility.
set_colorChanges the light's color, pretty straightforward.
set_directionSets a new direction for the directional cast, then updates luminosity
set_holderCalled to change the value of current_holder.
set_lum_powerHere we append the behavior associated to changing lum_power.
set_parent_attached_toCalled to change the value of parent_attached_to.
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.

Var Details

affected_turfs

Lazy list to track the turfs being affected by our light, to determine their visibility.

cast_range

Cast range for the directional cast (how far away the atom is moved)

cone

A cone overlay for directional light, it's alpha and color are dependant on the light

current_direction

Current tracked direction for the directional cast behaviour

current_holder

Movable atom currently holding the light. Parent might be a flashlight, for example, but that might be held by a mob or something else.

directional

Whether we're a directional light

directional_atom

Abstractional atom for directional light, we move this around to make the directional effect

light_overlays

Cache of the possible light overlays, according to size.

lum_power

How much this light affects the dynamic_lumcount of turfs.

lumcount_range

Ceiling of range, integer without decimal entries.

overlay_lighting_flags

For light sources that can be turned on and off.

parent_attached_to

Movable atom the parent is attached to. For example, a flashlight into a helmet or gun. We'll need to track the thing the parent is attached to as if it were the parent itself.

range

How far the light reaches, float.

set_alpha

Transparency value.

visible_mask

Overlay effect to cut into the darkness and provide light.

Proc Details

add_dynamic_lumi

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

cast_directional_light

Here we append the behavior associated to changing lum_power.

check_holder

Used to determine the new valid current_holder from the parent's loc.

clean_old_turfs

Clears the affected_turfs lazylist, removing from its contents the effects of being near the light.

get_new_turfs

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

make_luminosity_update

Clears the old affected turfs and populates the new ones.

on_holder_dir_change

Called when current_holder changes loc.

on_holder_moved

Called when current_holder changes loc.

on_holder_qdel

Called when the current_holder is qdeleted, to remove the light effect.

on_light_flags_change

Triggered right before the parent light flags change.

on_parent_attached_to_moved

Called when parent_attached_to changes loc.

on_parent_attached_to_qdel

Called when the current_holder is qdeleted, to remove the light effect.

on_parent_dir_change

Called when parent changes loc.

on_parent_moved

Called when parent changes loc.

on_toggle

Toggles the light on and off.

remove_dynamic_lumi

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

set_color

Changes the light's color, pretty straightforward.

set_direction

Sets a new direction for the directional cast, then updates luminosity

set_holder

Called to change the value of current_holder.

set_lum_power

Here we append the behavior associated to changing lum_power.

set_parent_attached_to

Called to change the value of parent_attached_to.

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.