mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 10:21:11 +00:00
-The upgrade camera malf module now upgrades cameras to be motion cameras too.
-Made the alarm delay a variable and I decreased it to 10 seconds. There's another 10 seconds in queueAlarm, so it's 20 seconds total before the motion alarm triggers. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4625 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -152,13 +152,23 @@ rcd light flash thingy on matter drain
|
||||
if(UC.uses > 0)
|
||||
if(C.assembly)
|
||||
var/upgraded = 0
|
||||
|
||||
if(!C.isXRay())
|
||||
C.upgradeXRay()
|
||||
//Update what it can see.
|
||||
cameranet.updateVisibility(C)
|
||||
upgraded = 1
|
||||
|
||||
if(!C.isEmpProof())
|
||||
C.upgradeEmpProof()
|
||||
upgraded = 1
|
||||
|
||||
if(!C.isMotion())
|
||||
C.upgradeMotion()
|
||||
upgraded = 1
|
||||
// Add it to machines that process
|
||||
machines |= src
|
||||
|
||||
if(upgraded)
|
||||
UC.uses --
|
||||
C.visible_message("<span class='notice'>\icon[src] *beep*</span>")
|
||||
@@ -303,7 +313,7 @@ rcd light flash thingy on matter drain
|
||||
already = 1
|
||||
if (!already)
|
||||
usr.verbs += /client/proc/upgrade_camera
|
||||
src.temp = "Upgrades a camera to have X-Ray vision and be EMP-Proof. 10 uses."
|
||||
src.temp = "Upgrades a camera to have X-Ray vision, Motion and be EMP-Proof. 10 uses."
|
||||
usr:current_modules += new /datum/AI_Module/small/upgrade_camera
|
||||
else src.temp = "Ten additional uses added to ReCam module."
|
||||
src.processing_time -= 15
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
var/list/motionTargets = list()
|
||||
var/detectTime = 0
|
||||
var/area/ai_monitored/area_motion = null
|
||||
var/alarm_delay = 100 // Don't forget, there's another 10 seconds in queueAlarm()
|
||||
|
||||
|
||||
/obj/machinery/camera/process()
|
||||
@@ -12,7 +13,7 @@
|
||||
return
|
||||
if (detectTime > 0)
|
||||
var/elapsed = world.time - detectTime
|
||||
if (elapsed > 300)
|
||||
if (elapsed > alarm_delay)
|
||||
triggerAlarm()
|
||||
else if (detectTime == -1)
|
||||
for (var/mob/target in motionTargets)
|
||||
|
||||
Reference in New Issue
Block a user