cameras 
Vars | |
| cameras | The cameras on the map, no matter if they work or not. Updated in obj/machinery/camera.dm in Initialize() and Destroy(). |
|---|---|
| chunks | The chunks of the map, mapping the areas that the cameras can see. |
| chunks_to_update | Chunks that must be updated |
| current_run | Tracks current subsystem run |
| disable_camera_updates | Primarily for debugging, outright prevents all camera chunk updates |
| obscured_images | List of images cloned by all chunk static images put onto turfs cameras cant see Indexed by the plane offset to use |
Procs | |
| add_camera_to_chunk | Add a camera to a chunk. |
| bare_major_chunk_change | A faster, turf only version of /datum/controller/subsystem/cameras/proc/major_chunk_change For use in sensitive code, be careful with it |
| get_available_camera_by_tag_list | get_available_camera_by_tag_list |
| get_available_cameras_data | Returns list of available cameras, ready to use for UIs displaying list of them The format is: list("name" = "camera.c_tag", ref = REF(camera)) |
| get_camera_chunk | Checks if a chunk has been generated in x, y, z. |
| get_filtered_and_sorted_cameras | Returns list of all cameras that passed is_camera_available filter and sorted by cmp_camera_ctag_asc |
| get_turf_camera_chunk | Gets the camera chunk the passed turf is in. Returns the chunk if it exists and is visible, null otherwise. |
| is_camera_available | Checks if the camera_to_check meets the requirements of availability. |
| is_visible_by_cameras | Will check if an atom is on a viewable turf. Returns TRUE if the atom is visible by any camera, FALSE otherwise. |
| major_chunk_change | Never access this proc directly!!!! This will update the chunk and all the surrounding chunks. It will also add the atom to the cameras list if you set the choice to 1. Setting the choice to 0 will remove the camera from the chunks. If you want to update the chunks around an object, without adding/removing a camera, use choice 2. update_delay_buffer is passed all the way to queue_update() from portable camera updates on movement to change the time between static updates. |
| remove_camera_from_chunk | Removes a camera from a chunk. |
| turf_visible_by_cameras | Checks if the passed turf is visible by any camera. Returns TRUE if the turf is visible by any camera, FALSE otherwise. |
| update_eye_chunk | Updates what the camera eye can see. It is recommended you use this when a camera eye moves or its location is set. |
| update_offsets | Updates the images for new plane offsets |
| update_portable_camera | Used for Cyborg/mecha cameras. Since portable cameras can be in ANY chunk. update_delay_buffer is passed all the way to queue_update() from their camera updates on movement to change the time between static updates. |
| update_visibility | Updates the chunks that the turf is located in. Use this when obstacles are destroyed or when doors open. |
Var Details
cameras 
The cameras on the map, no matter if they work or not. Updated in obj/machinery/camera.dm in Initialize() and Destroy().
chunks 
The chunks of the map, mapping the areas that the cameras can see.
chunks_to_update 
Chunks that must be updated
current_run 
Tracks current subsystem run
disable_camera_updates 
Primarily for debugging, outright prevents all camera chunk updates
obscured_images 
List of images cloned by all chunk static images put onto turfs cameras cant see Indexed by the plane offset to use
Proc Details
add_camera_to_chunk
Add a camera to a chunk.
bare_major_chunk_change
A faster, turf only version of /datum/controller/subsystem/cameras/proc/major_chunk_change For use in sensitive code, be careful with it
get_available_camera_by_tag_list
get_available_camera_by_tag_list
Builds a list of all available cameras that can be seen to networks_available and in z_levels_available.
Entries are stored in c_tag[camera.can_use() ? null : " (Deactivated)"] => camera format
Args:
networks_available - List of networks that we use to see which cameras are visible to it.
z_levels_available - List of z levels to filter camera by. If empty, all z levels are considered valid.
sort_by_ctag - If the resulting list should be sorted by c_tag.
get_available_cameras_data
Returns list of available cameras, ready to use for UIs displaying list of them The format is: list("name" = "camera.c_tag", ref = REF(camera))
get_camera_chunk
Checks if a chunk has been generated in x, y, z.
get_filtered_and_sorted_cameras
Returns list of all cameras that passed is_camera_available filter and sorted by cmp_camera_ctag_asc
get_turf_camera_chunk
Gets the camera chunk the passed turf is in. Returns the chunk if it exists and is visible, null otherwise.
is_camera_available
Checks if the camera_to_check meets the requirements of availability.
is_visible_by_cameras
Will check if an atom is on a viewable turf. Returns TRUE if the atom is visible by any camera, FALSE otherwise.
major_chunk_change
Never access this proc directly!!!! This will update the chunk and all the surrounding chunks. It will also add the atom to the cameras list if you set the choice to 1. Setting the choice to 0 will remove the camera from the chunks. If you want to update the chunks around an object, without adding/removing a camera, use choice 2. update_delay_buffer is passed all the way to queue_update() from portable camera updates on movement to change the time between static updates.
remove_camera_from_chunk
Removes a camera from a chunk.
turf_visible_by_cameras
Checks if the passed turf is visible by any camera. Returns TRUE if the turf is visible by any camera, FALSE otherwise.
update_eye_chunk
Updates what the camera eye can see. It is recommended you use this when a camera eye moves or its location is set.
update_offsets
Updates the images for new plane offsets
update_portable_camera
Used for Cyborg/mecha cameras. Since portable cameras can be in ANY chunk. update_delay_buffer is passed all the way to queue_update() from their camera updates on movement to change the time between static updates.
update_visibility
Updates the chunks that the turf is located in. Use this when obstacles are destroyed or when doors open.