mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-14 04:02:31 +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
|
// Posters
|
||||||
var/global/list/poster_designs = list()
|
var/global/list/poster_designs = list()
|
||||||
|
|
||||||
// Cameras
|
|
||||||
var/list/obj/machinery/camera/world_cameras = list()
|
|
||||||
|
|
||||||
// Uplinks
|
// Uplinks
|
||||||
var/list/obj/item/device/uplink/world_uplinks = list()
|
var/list/obj/item/device/uplink/world_uplinks = list()
|
||||||
|
|
||||||
|
|||||||
@@ -37,7 +37,6 @@
|
|||||||
wires = new(src)
|
wires = new(src)
|
||||||
assembly = new(src)
|
assembly = new(src)
|
||||||
assembly.state = 4
|
assembly.state = 4
|
||||||
world_cameras += src
|
|
||||||
|
|
||||||
/* // Use this to look for cameras that have the same c_tag.
|
/* // Use this to look for cameras that have the same c_tag.
|
||||||
for(var/obj/machinery/camera/C in cameranet.cameras)
|
for(var/obj/machinery/camera/C in cameranet.cameras)
|
||||||
@@ -55,7 +54,6 @@
|
|||||||
..()
|
..()
|
||||||
|
|
||||||
/obj/machinery/camera/Destroy()
|
/obj/machinery/camera/Destroy()
|
||||||
world_cameras -= src
|
|
||||||
deactivate(null, 0) //kick anyone viewing out
|
deactivate(null, 0) //kick anyone viewing out
|
||||||
if(assembly)
|
if(assembly)
|
||||||
qdel(assembly)
|
qdel(assembly)
|
||||||
|
|||||||
@@ -19,12 +19,12 @@
|
|||||||
cam.wires.UpdateCut(CAMERA_WIRE_ALARM, 0)
|
cam.wires.UpdateCut(CAMERA_WIRE_ALARM, 0)
|
||||||
|
|
||||||
/datum/event/camera_damage/proc/acquire_random_camera(var/remaining_attempts = 5)
|
/datum/event/camera_damage/proc/acquire_random_camera(var/remaining_attempts = 5)
|
||||||
if(!world_cameras.len)
|
if(!cameranet.cameras.len)
|
||||||
return
|
return
|
||||||
if(!remaining_attempts)
|
if(!remaining_attempts)
|
||||||
return
|
return
|
||||||
|
|
||||||
var/obj/machinery/camera/C = pick(world_cameras)
|
var/obj/machinery/camera/C = pick(cameranet.cameras)
|
||||||
if(is_valid_camera(C))
|
if(is_valid_camera(C))
|
||||||
return C
|
return C
|
||||||
return acquire_random_camera(remaining_attempts--)
|
return acquire_random_camera(remaining_attempts--)
|
||||||
|
|||||||
Reference in New Issue
Block a user