- Station alarm computers now properly clear power alarms. Fixed issue 267. It was a case of an argument not being passed into the trigger alarm proc.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4435 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
baloh.matevz
2012-08-16 14:51:27 +00:00
parent c7f959d34f
commit dafcc596e8
2 changed files with 5 additions and 5 deletions

View File

@@ -80,7 +80,7 @@
/area/proc/poweralert(var/state, var/obj/source as obj)
if (state != poweralm)
poweralm = state
if(istype(source)) //Only report power alarms on the z-level where the thing is located.
if(istype(source)) //Only report power alarms on the z-level where the source is located.
var/list/cameras = list()
for (var/obj/machinery/camera/C in src)
cameras += C
@@ -90,12 +90,12 @@
aiPlayer.cancelAlarm("Power", src, source)
else
aiPlayer.triggerAlarm("Power", src, cameras, source)
for(var/obj/machinery/computer/station_alert/a in player_list)
for(var/obj/machinery/computer/station_alert/a in world)
if(a.z == source.z)
if(state == 1)
a.cancelAlarm("Power", src, source)
else
a.triggerAlarm("Power", src, source)
a.triggerAlarm("Power", src, cameras, source)
return
/area/proc/atmosalert(danger_level)

View File

@@ -55,7 +55,7 @@
proc/triggerAlarm(var/class, area/A, var/O, var/alarmsource)
if(stat & (BROKEN|NOPOWER))
if(stat & (BROKEN))
return
var/list/L = src.alarms[class]
for (var/I in L)
@@ -78,7 +78,7 @@
proc/cancelAlarm(var/class, area/A as area, obj/origin)
if(stat & (BROKEN|NOPOWER))
if(stat & (BROKEN))
return
var/list/L = src.alarms[class]
var/cleared = 0