light_overlay 
Datum which handles visual part of overlay lighting Split from the overlay_lighting component as to allow multiple visuals to exist side by side, or to have a light separate from atom vars/without casting turf lumens
Vars | |
| beam | Whether we're a beam light |
|---|---|
| cast_range | Cast range for the directional cast (how far away the atom is moved) |
| cone | A cone overlay for directional light, its alpha and color are dependent 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. |
| currently_displaying | Are we currently displaying light on our holder? |
| directional | Whether we're a directional light |
| directional_offset_x | Tracks current directional x offset so we don't update unnecessarily |
| directional_offset_y | Tracks current directional y offset so we don't update unnecessarily |
| light_overlays | Cache of the possible light overlays, according to size. |
| overlay_lighting_flags | For light sources that can be turned on and off. |
| parent | The movable we are "owned" by |
| 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. |
Procs | |
| cast_directional_light | Here we append the behavior associated to changing power. |
| check_holder | Used to determine the new valid current_holder from the parent's loc. |
| hide_from_holder | Removes our overlay from our holder, assuming everything's setup proper MUST be called before modifying cone or visible_mask, or you will cause stuck lighting |
| on_holder_dir_change | Called when current_holder changes loc. |
| on_pickup_anim | Avoids duplicate overlays (one from our NEXT holder, selected after the animation, one from the pickup animation) |
| refresh_shared_signals | We have a habit of storing individual atoms under many names, which is really messy We do need to DO this, but this lets us think about it less. Do this after any of the vars change or you unreg any relevant procs |
| set_direction | Sets a new direction for the directional cast, then updates luminosity |
| set_holder | Called to change the value of current_holder. |
| set_parent_attached_to | Called to change the value of parent_attached_to. |
| show_to_holder | Adds our overlays to our holder, assuming everything's setup proper |
Var Details
beam 
Whether we're a beam light
cast_range 
Cast range for the directional cast (how far away the atom is moved)
cone 
A cone overlay for directional light, its alpha and color are dependent 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.
currently_displaying 
Are we currently displaying light on our holder?
directional 
Whether we're a directional light
directional_offset_x 
Tracks current directional x offset so we don't update unnecessarily
directional_offset_y 
Tracks current directional y offset so we don't update unnecessarily
light_overlays 
Cache of the possible light overlays, according to size.
overlay_lighting_flags 
For light sources that can be turned on and off.
parent 
The movable we are "owned" by
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
cast_directional_light
Here we append the behavior associated to changing power.
check_holder
Used to determine the new valid current_holder from the parent's loc.
hide_from_holder
Removes our overlay from our holder, assuming everything's setup proper MUST be called before modifying cone or visible_mask, or you will cause stuck lighting
on_holder_dir_change
Called when current_holder changes loc.
on_pickup_anim
Avoids duplicate overlays (one from our NEXT holder, selected after the animation, one from the pickup animation)
refresh_shared_signals
We have a habit of storing individual atoms under many names, which is really messy We do need to DO this, but this lets us think about it less. Do this after any of the vars change or you unreg any relevant procs
set_direction
Sets a new direction for the directional cast, then updates luminosity
set_holder
Called to change the value of current_holder.
set_parent_attached_to
Called to change the value of parent_attached_to.
show_to_holder
Adds our overlays to our holder, assuming everything's setup proper