byond - Modules - TypesVar Details - Proc Details

/atom/movable/lighting_mask

Vars

affecting_turfsTurfs that are being affected by this mask, this is for the sake of luminosity
attached_atomThe atom that we are attached to, does not need hard del protection as we are deleted with it
awaiting_updatePrevents us from registering for update twice before SSlighting init
current_angleThe current angle the item is pointing at
is_directionalSet to TRUE if you want the light to rotate with the owner
mask_holderReference to the holder /obj/effect
radiusThe radius of illumination of the mask
shadowslist of mutable appearance shadows

Procs

apply_matrixif you want the matrix to grow or shrink, you can do that using this proc when applyng it
calculate_lighting_shadowsReturns a list of matrices corresponding to the matrices that should be applied to triangles of coordinates (0,0),(1,0),(0,1) to create a triangcalculate_shadows_matricesle that respresents the shadows takes in the old turf to smoothly animate shadow movement
calculate_triangle_verticesBasically takes the 2-4 corners, extends them and then generates triangle coordinates representing shadows Input: list(list(list(x, y), list(x, y))) Layer 1: Lines Layer 2: Vertex Layer 3: X/Y value OUTPUT: The same thing but with 3 lists embedded rather than 2 because they are triangles not lines now.
cull_blocked_in_groupTakes in the list of lines and sight blockers and returns only the lines that are not blocked
get_corners_from_coordsConverts the corners into the 3 (or 2) valid points For example if a wall is top right of the source, the bottom left wall corner can be removed otherwise the wall itself will be in the shadow. Input: list(list(x1, y1), list(x2, y2)) Output: list(list(list(x, y), list(x, y))) <-- 2 coordinates that form a line
get_matrixCreates a matrix for the lighting mak to use
group_atomsGroups things into vertical and horizontal lines. Input: All atoms ungrouped list(atom1, atom2, atom3) Output: List(List(Group), list(group2), ... , list(groupN)) Output: List(List(atom1, atom2), list(atom3, atom4...), ... , list(atom))
queue_mask_updateEnqueues the mask in the queue properly
rotateRotates the light source to angle degrees.
rotate_mask_on_holder_turnThe holder atom turned, spins the mask if it's needed
set_colorSetter proc for colors
set_intensitySetter proc for the intensity of the mask
set_radiusSets the radius of the mask, and updates everything that needs to be updated
triangle_to_matrixConverts a triangle into a matrix that can be applied to a standardized triangle to make it represent the points.

Var Details

affecting_turfs

Turfs that are being affected by this mask, this is for the sake of luminosity

attached_atom

The atom that we are attached to, does not need hard del protection as we are deleted with it

awaiting_update

Prevents us from registering for update twice before SSlighting init

current_angle

The current angle the item is pointing at

is_directional

Set to TRUE if you want the light to rotate with the owner

mask_holder

Reference to the holder /obj/effect

radius

The radius of illumination of the mask

shadows

list of mutable appearance shadows

Proc Details

apply_matrix

if you want the matrix to grow or shrink, you can do that using this proc when applyng it

calculate_lighting_shadows

Returns a list of matrices corresponding to the matrices that should be applied to triangles of coordinates (0,0),(1,0),(0,1) to create a triangcalculate_shadows_matricesle that respresents the shadows takes in the old turf to smoothly animate shadow movement

calculate_triangle_vertices

Basically takes the 2-4 corners, extends them and then generates triangle coordinates representing shadows Input: list(list(list(x, y), list(x, y))) Layer 1: Lines Layer 2: Vertex Layer 3: X/Y value OUTPUT: The same thing but with 3 lists embedded rather than 2 because they are triangles not lines now.

cull_blocked_in_group

Takes in the list of lines and sight blockers and returns only the lines that are not blocked

get_corners_from_coords

Converts the corners into the 3 (or 2) valid points For example if a wall is top right of the source, the bottom left wall corner can be removed otherwise the wall itself will be in the shadow. Input: list(list(x1, y1), list(x2, y2)) Output: list(list(list(x, y), list(x, y))) <-- 2 coordinates that form a line

get_matrix

Creates a matrix for the lighting mak to use

group_atoms

Groups things into vertical and horizontal lines. Input: All atoms ungrouped list(atom1, atom2, atom3) Output: List(List(Group), list(group2), ... , list(groupN)) Output: List(List(atom1, atom2), list(atom3, atom4...), ... , list(atom))

queue_mask_update

Enqueues the mask in the queue properly

rotate

Rotates the light source to angle degrees.

rotate_mask_on_holder_turn

The holder atom turned, spins the mask if it's needed

set_color

Setter proc for colors

set_intensity

Setter proc for the intensity of the mask

set_radius

Sets the radius of the mask, and updates everything that needs to be updated

triangle_to_matrix

Converts a triangle into a matrix that can be applied to a standardized triangle to make it represent the points.