Space Station 13 - Modules - TypesVar Details - Proc Details

cameranet

Vars

camerasThe cameras on the map, no matter if they work or not. Updated in obj/machinery/camera.dm by New() and Destroy().
chunksThe chunks of the map, mapping the areas that the cameras can see.

Procs

add_cameraAdd a camera to a chunk.
check_camera_visReturns 1 if a mob is on a viewable turf, otherwise returns 0.
chunk_generatedReturns the chunk at (x, y, z) if it exists, otherwise returns null.
get_camera_chunkReturns the chunk at (x, y, z) if it exists, otherwise returns a new chunk at that location.
major_chunk_changePrivate method for updating the chunk an atom is in, and all surrounding chunks. add will be added as a camera to the chunk of its current location and all surrounding chunks. remove will be removed as a camera from the chunk of its current location and all surrounding chunks. update will not be added or removed as a camera, but its surrounding chunks will be updated. These parameters are mutually exclusive.
remove_cameraRemoves a camera from a chunk.
update_portable_cameraRefreshes the chunk location of a portable camera. Used by Cyborgs.
update_visibilityUpdates the chunks that the turf is located in. Use this when obstacles are destroyed or when doors open.
visibilityUpdates what the camera network can see.

Var Details

cameras

The cameras on the map, no matter if they work or not. Updated in obj/machinery/camera.dm by New() and Destroy().

chunks

The chunks of the map, mapping the areas that the cameras can see.

Proc Details

add_camera

Add a camera to a chunk.

check_camera_vis

Returns 1 if a mob is on a viewable turf, otherwise returns 0.

chunk_generated

Returns the chunk at (x, y, z) if it exists, otherwise returns null.

get_camera_chunk

Returns the chunk at (x, y, z) if it exists, otherwise returns a new chunk at that location.

major_chunk_change

Private method for updating the chunk an atom is in, and all surrounding chunks. add will be added as a camera to the chunk of its current location and all surrounding chunks. remove will be removed as a camera from the chunk of its current location and all surrounding chunks. update will not be added or removed as a camera, but its surrounding chunks will be updated. These parameters are mutually exclusive.

remove_camera

Removes a camera from a chunk.

update_portable_camera

Refreshes the chunk location of a portable camera. Used by Cyborgs.

update_visibility

Updates the chunks that the turf is located in. Use this when obstacles are destroyed or when doors open.

visibility

Updates what the camera network can see.