mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
Using cameranet cameras to avoid burning out things like ERT/mercenary helmet cameras and traitor spy cams.
This commit is contained in:
@@ -29,9 +29,6 @@ var/global/list/playable_species = list("Human") // A list of ALL playable sp
|
||||
// Posters
|
||||
var/global/list/poster_designs = list()
|
||||
|
||||
// Cameras
|
||||
var/list/obj/machinery/camera/world_cameras = list()
|
||||
|
||||
// Uplinks
|
||||
var/list/obj/item/device/uplink/world_uplinks = list()
|
||||
|
||||
|
||||
@@ -37,7 +37,6 @@
|
||||
wires = new(src)
|
||||
assembly = new(src)
|
||||
assembly.state = 4
|
||||
world_cameras += src
|
||||
|
||||
/* // Use this to look for cameras that have the same c_tag.
|
||||
for(var/obj/machinery/camera/C in cameranet.cameras)
|
||||
@@ -55,7 +54,6 @@
|
||||
..()
|
||||
|
||||
/obj/machinery/camera/Destroy()
|
||||
world_cameras -= src
|
||||
deactivate(null, 0) //kick anyone viewing out
|
||||
if(assembly)
|
||||
qdel(assembly)
|
||||
|
||||
@@ -19,12 +19,12 @@
|
||||
cam.wires.UpdateCut(CAMERA_WIRE_ALARM, 0)
|
||||
|
||||
/datum/event/camera_damage/proc/acquire_random_camera(var/remaining_attempts = 5)
|
||||
if(!world_cameras.len)
|
||||
if(!cameranet.cameras.len)
|
||||
return
|
||||
if(!remaining_attempts)
|
||||
return
|
||||
|
||||
var/obj/machinery/camera/C = pick(world_cameras)
|
||||
var/obj/machinery/camera/C = pick(cameranet.cameras)
|
||||
if(is_valid_camera(C))
|
||||
return C
|
||||
return acquire_random_camera(remaining_attempts--)
|
||||
|
||||
Reference in New Issue
Block a user