diff --git a/code/game/area/ai_monitored.dm b/code/game/area/ai_monitored.dm index d1250c91520..a4ff676dcf7 100644 --- a/code/game/area/ai_monitored.dm +++ b/code/game/area/ai_monitored.dm @@ -9,7 +9,7 @@ for (var/obj/machinery/camera/M in src) if(M.isMotion()) motioncameras.Add(M) - M.area_motion = src + M.set_area_motion(src) //Only need to use one camera diff --git a/code/game/machinery/camera/camera.dm b/code/game/machinery/camera/camera.dm index 8a9b0161acd..6e7c25c543f 100644 --- a/code/game/machinery/camera/camera.dm +++ b/code/game/machinery/camera/camera.dm @@ -79,7 +79,6 @@ if (isturf(loc)) myarea = get_area(src) LAZYADD(myarea.cameras, src) - proximity_monitor = new(src, 1) if(mapload && is_station_level(z) && prob(3) && !start_active) toggle_cam() @@ -91,6 +90,14 @@ network -= i network += "[idnum][i]" +/obj/machinery/proc/create_prox_monitor() + if(!proximity_monitor) + proximity_monitor = new(src, 1) + +/obj/machinery/camera/proc/set_area_motion(area/A) + area_motion = A + create_prox_monitor() + /obj/machinery/camera/Destroy() if(can_use()) toggle_cam(null, 0) //kick anyone viewing out and remove from the camera chunks diff --git a/code/game/machinery/camera/presets.dm b/code/game/machinery/camera/presets.dm index 9e1978468b1..399ce386925 100644 --- a/code/game/machinery/camera/presets.dm +++ b/code/game/machinery/camera/presets.dm @@ -133,8 +133,11 @@ if(!assembly.proxy_module) assembly.proxy_module = new(assembly) upgrades |= CAMERA_UPGRADE_MOTION + create_prox_monitor() /obj/machinery/camera/proc/removeMotion() if(name == "motion-sensitive security camera") name = "security camera" upgrades &= ~CAMERA_UPGRADE_MOTION + if(!area_motion) + QDEL_NULL(proximity_monitor) diff --git a/code/game/turfs/open/space/transit.dm b/code/game/turfs/open/space/transit.dm index a4caa6c468f..be30c63a5b7 100644 --- a/code/game/turfs/open/space/transit.dm +++ b/code/game/turfs/open/space/transit.dm @@ -45,6 +45,10 @@ var/datum/space_level/D = A if (D.linkage == CROSSLINKED) possible_transtitons += D.z_value + if(!length(possible_transtitons)) //No space to throw them to - try throwing them onto mining + possible_transtitons = SSmapping.levels_by_trait(ZTRAIT_MINING) + if(!length(possible_transtitons)) //Just throw them back on station, if not just runtime. + possible_transtitons = SSmapping.levels_by_trait(ZTRAIT_STATION) var/_z = pick(possible_transtitons) //now select coordinates for a border turf diff --git a/code/modules/shuttle/on_move.dm b/code/modules/shuttle/on_move.dm index 39bf5b4ab48..924f9fd3e23 100644 --- a/code/modules/shuttle/on_move.dm +++ b/code/modules/shuttle/on_move.dm @@ -121,6 +121,8 @@ All ShuttleMove procs go here update_light() if(rotation) shuttleRotate(rotation) + if(proximity_monitor) + proximity_monitor.HandleMove() update_parallax_contents()