-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:
giacomand@gmail.com
2012-09-05 17:00:17 +00:00
parent 14d319228f
commit f97f3982bc
2 changed files with 13 additions and 2 deletions

View File

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

View File

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