Using cameranet cameras to avoid burning out things like ERT/mercenary helmet cameras and traitor spy cams.

This commit is contained in:
PsiOmega
2015-04-27 11:14:31 +02:00
parent a999202cfc
commit 4bddde11ae
3 changed files with 2 additions and 7 deletions

View File

@@ -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()

View File

@@ -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)

View File

@@ -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--)