Camera fixes and performance tweaks.

Improves camera EMP handling. Now uses a var and processing to determine when the EMP should end, preventing inconsistent states when a camera is EMPd multiple times.

Reduces the process and bandwidth need for cameras.
* There is now a common camera repository, responsible for setting up cameras once for every invalidation.
* Camera consoles now only updates when the camera cache is invalidated, not every second.
* The console now only presents one network at a time, and only sends the data necessary to view that network (as opposed to sending the data for all cameras).
This commit is contained in:
PsiOmegaDelta
2016-01-30 13:44:52 +01:00
committed by Datraen
parent 1a9d1e6f36
commit e7686dd3e7
12 changed files with 153 additions and 80 deletions
+2 -2
View File
@@ -76,9 +76,9 @@
/datum/alarm/proc/cameras()
// reset camera cache
if(camera_cache_id != cache_id)
if(camera_repository.camera_cache_id != cache_id)
cameras = null
cache_id = camera_cache_id
cache_id = camera_repository.camera_cache_id
// If the alarm origin has changed area, for example a borg containing an alarming camera, reset the list of cameras
else if(cameras && (last_camera_area != alarm_area()))
cameras = null