mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 02:09:41 +00:00
TGUI Camera Console - Part 1; Plain console done
# Conflicts: # code/_onclick/hud/skybox.dm # code/controllers/subsystems/skybox.dm # code/game/machinery/computer/camera.dm # tgui/packages/tgui/public/tgui.bundle.js
This commit is contained in:
@@ -18,7 +18,6 @@
|
||||
var/list/sources = new() //List of sources triggering the alarm. Used to determine when the alarm should be cleared.
|
||||
var/list/sources_assoc = new() //Associative list of source triggers. Used to efficiently acquire the alarm source.
|
||||
var/list/cameras //List of cameras that can be switched to, if the player has that capability.
|
||||
var/cache_id //ID for camera cache, changed by invalidateCameraCache().
|
||||
var/area/last_area //The last acquired area, used should origin be lost (for example a destroyed borg containing an alarming camera).
|
||||
var/area/last_name //The last acquired name, used should origin be lost
|
||||
var/area/last_camera_area //The last area in which cameras where fetched, used to see if the camera list should be updated.
|
||||
@@ -78,15 +77,10 @@
|
||||
return last_name
|
||||
|
||||
/datum/alarm/proc/cameras()
|
||||
// reset camera cache
|
||||
if(camera_repository.camera_cache_id != cache_id)
|
||||
cameras = null
|
||||
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()))
|
||||
if(cameras && (last_camera_area != alarm_area()))
|
||||
cameras = null
|
||||
|
||||
// The list of cameras is also reset by /proc/invalidateCameraCache()
|
||||
if(!cameras)
|
||||
cameras = origin ? origin.get_alarm_cameras() : last_area.get_alarm_cameras()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user