Merge remote-tracking branch 'upstream/master' into dev-freeze

Signed-off-by: Mloc-Argent <colmohici@gmail.com>

Conflicts:
	code/game/machinery/alarm.dm
This commit is contained in:
Mloc-Argent
2014-06-30 23:44:46 +01:00
13 changed files with 1748 additions and 1770 deletions
+46 -11
View File
@@ -71,10 +71,28 @@
/area/proc/atmosalert(danger_level)
// if(type==/area) //No atmos alarms in space
// return 0 //redudant
//Check all the alarms before lowering atmosalm. Raising is perfectly fine.
for (var/area/RA in related)
for (var/obj/machinery/alarm/AA in RA)
if ( !(AA.stat & (NOPOWER|BROKEN)) && !AA.shorted)
danger_level = max(danger_level, AA.danger_level)
if(danger_level != atmosalm)
//updateicon()
//mouse_opacity = 0
if (danger_level==2)
if (danger_level < 1 && atmosalm >= 1)
//closing the doors on red and opening on green provides a bit of hysteresis that will hopefully prevent fire doors from opening and closing repeatedly due to noise
air_doors_open()
if (danger_level < 2 && atmosalm >= 2)
for(var/area/RA in related)
for(var/obj/machinery/camera/C in RA)
C.network.Remove("Atmosphere Alarms")
for(var/mob/living/silicon/aiPlayer in player_list)
aiPlayer.cancelAlarm("Atmosphere", src, src)
for(var/obj/machinery/computer/station_alert/a in machines)
a.cancelAlarm("Atmosphere", src, src)
if (danger_level >= 2 && atmosalm < 2)
var/list/cameras = list()
for(var/area/RA in related)
//updateicon()
@@ -85,18 +103,35 @@
aiPlayer.triggerAlarm("Atmosphere", src, cameras, src)
for(var/obj/machinery/computer/station_alert/a in machines)
a.triggerAlarm("Atmosphere", src, cameras, src)
else if (atmosalm == 2)
for(var/area/RA in related)
for(var/obj/machinery/camera/C in RA)
C.network.Remove("Atmosphere Alarms")
for(var/mob/living/silicon/aiPlayer in player_list)
aiPlayer.cancelAlarm("Atmosphere", src, src)
for(var/obj/machinery/computer/station_alert/a in machines)
a.cancelAlarm("Atmosphere", src, src)
air_doors_close()
atmosalm = danger_level
return 1
return 0
/area/proc/air_doors_close()
if(!src.master.air_doors_activated)
src.master.air_doors_activated = 1
for(var/obj/machinery/door/firedoor/E in src.master.all_doors)
if(!E:blocked)
if(E.operating)
E:nextstate = CLOSED
else if(!E.density)
spawn(0)
E.close()
/area/proc/air_doors_open()
if(src.master.air_doors_activated)
src.master.air_doors_activated = 0
for(var/obj/machinery/door/firedoor/E in src.master.all_doors)
if(!E:blocked)
if(E.operating)
E:nextstate = OPEN
else if(E.density)
spawn(0)
E.open()
/area/proc/firealert()
if(name == "Space") //no fire alarms in space
return