mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2025-12-29 03:32:28 +00:00
* Add SScamera * Refactor camera * Refactor how camera chunks add/remove cams * Use CAMERA_VIEW_DISTANCE to determine max view dist of cam * Fix movable cameras and optimise them * Optimise update() * Ensure aiEyes get removed properly when deleted * Final optimisations and refactoring * Fix cameras being EMPed * Shits fixed * AA review * Fix merge mistake * Add comment about early return * Seans review * the it the Co-authored-by: S34N <12197162+S34NW@users.noreply.github.com> * Update code/game/machinery/camera/camera.dm Co-authored-by: Ryan <80364400+Sirryan2002@users.noreply.github.com> * Ensure the robit has a camera before updating it --------- Co-authored-by: S34N <12197162+S34NW@users.noreply.github.com> Co-authored-by: Charlie <69320440+hal9000PR@users.noreply.github.com> Co-authored-by: Ryan <80364400+Sirryan2002@users.noreply.github.com>
25 lines
757 B
Plaintext
25 lines
757 B
Plaintext
// Subsystem that controls the camera vision tiles
|
|
SUBSYSTEM_DEF(camera)
|
|
name = "Camera"
|
|
flags = SS_BACKGROUND | SS_NO_INIT
|
|
priority = FIRE_PRIORITY_CAMERA
|
|
runlevels = RUNLEVEL_GAME | RUNLEVEL_POSTGAME
|
|
wait = 2.5 SECONDS
|
|
offline_implications = "AI camera view won't update. No immediate action is needed."
|
|
var/list/chunk_queue = list()
|
|
|
|
/datum/controller/subsystem/camera/fire(resumed)
|
|
for(var/datum/camerachunk/chunk as anything in chunk_queue)
|
|
chunk.update()
|
|
chunk_queue -= chunk
|
|
if(MC_TICK_CHECK)
|
|
return
|
|
|
|
|
|
/datum/controller/subsystem/camera/proc/queue(datum/camerachunk/chunk)
|
|
if(!chunk_queue[chunk])
|
|
chunk_queue[chunk] = chunk
|
|
|
|
/datum/controller/subsystem/camera/proc/remove_from_queue(datum/camerachunk/chunk)
|
|
chunk_queue -= chunk
|