mirror of
https://github.com/CHOMPstation/CHOMPstation.git
synced 2026-08-23 12:06:22 +01:00
Merge branch 'master' of https://github.com/PolarisSS13/Polaris into polaris-sync-2017-05-08
# Conflicts: # code/modules/mob/dead/observer/observer.dm # code/modules/mob/living/carbon/human/life.dm # code/modules/mob/mob_defines.dm # html/changelogs/.all_changelog.yml # vorestation.dme
This commit is contained in:
@@ -49,7 +49,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
|
||||
var/no_air = null
|
||||
// var/list/lights // list of all lights on this area
|
||||
var/list/all_doors = list() //Added by Strumpetplaya - Alarm Change - Contains a list of doors adjacent to this area
|
||||
var/air_doors_activated = 0
|
||||
var/firedoors_closed = 0
|
||||
var/list/ambience = list('sound/ambience/ambigen1.ogg','sound/ambience/ambigen3.ogg','sound/ambience/ambigen4.ogg','sound/ambience/ambigen5.ogg','sound/ambience/ambigen6.ogg','sound/ambience/ambigen7.ogg','sound/ambience/ambigen8.ogg','sound/ambience/ambigen9.ogg','sound/ambience/ambigen10.ogg','sound/ambience/ambigen11.ogg','sound/ambience/ambigen12.ogg','sound/ambience/ambigen14.ogg')
|
||||
var/list/forced_ambience = null
|
||||
var/sound_env = STANDARD_STATION
|
||||
|
||||
+23
-37
@@ -53,22 +53,28 @@
|
||||
danger_level = max(danger_level, AA.danger_level)
|
||||
|
||||
if(danger_level != atmosalm)
|
||||
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()
|
||||
else if (danger_level >= 2 && atmosalm < 2)
|
||||
air_doors_close()
|
||||
|
||||
atmosalm = danger_level
|
||||
//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
|
||||
if (danger_level < 1 || danger_level >= 2)
|
||||
firedoors_update()
|
||||
|
||||
for (var/obj/machinery/alarm/AA in src)
|
||||
AA.update_icon()
|
||||
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/area/proc/air_doors_close()
|
||||
if(!air_doors_activated)
|
||||
air_doors_activated = 1
|
||||
// Either close or open firedoors depending on current alert statuses
|
||||
/area/proc/firedoors_update()
|
||||
if(fire || party || atmosalm)
|
||||
firedoors_close()
|
||||
else
|
||||
firedoors_open()
|
||||
|
||||
// Close all firedoors in the area
|
||||
/area/proc/firedoors_close()
|
||||
if(!firedoors_closed)
|
||||
firedoors_closed = TRUE
|
||||
for(var/obj/machinery/door/firedoor/E in all_doors)
|
||||
if(!E.blocked)
|
||||
if(E.operating)
|
||||
@@ -77,9 +83,10 @@
|
||||
spawn(0)
|
||||
E.close()
|
||||
|
||||
/area/proc/air_doors_open()
|
||||
if(air_doors_activated)
|
||||
air_doors_activated = 0
|
||||
// Open all firedoors in the area
|
||||
/area/proc/firedoors_open()
|
||||
if(firedoors_closed)
|
||||
firedoors_closed = FALSE
|
||||
for(var/obj/machinery/door/firedoor/E in all_doors)
|
||||
if(!E.blocked)
|
||||
if(E.operating)
|
||||
@@ -93,27 +100,13 @@
|
||||
if(!fire)
|
||||
fire = 1 //used for firedoor checks
|
||||
updateicon()
|
||||
mouse_opacity = 0
|
||||
for(var/obj/machinery/door/firedoor/D in all_doors)
|
||||
if(!D.blocked)
|
||||
if(D.operating)
|
||||
D.nextstate = FIREDOOR_CLOSED
|
||||
else if(!D.density)
|
||||
spawn()
|
||||
D.close()
|
||||
firedoors_update()
|
||||
|
||||
/area/proc/fire_reset()
|
||||
if (fire)
|
||||
fire = 0 //used for firedoor checks
|
||||
updateicon()
|
||||
mouse_opacity = 0
|
||||
for(var/obj/machinery/door/firedoor/D in all_doors)
|
||||
if(!D.blocked)
|
||||
if(D.operating)
|
||||
D.nextstate = FIREDOOR_OPEN
|
||||
else if(D.density)
|
||||
spawn(0)
|
||||
D.open()
|
||||
firedoors_update()
|
||||
|
||||
/area/proc/readyalert()
|
||||
if(!eject)
|
||||
@@ -131,21 +124,14 @@
|
||||
if (!( party ))
|
||||
party = 1
|
||||
updateicon()
|
||||
mouse_opacity = 0
|
||||
firedoors_update()
|
||||
return
|
||||
|
||||
/area/proc/partyreset()
|
||||
if (party)
|
||||
party = 0
|
||||
mouse_opacity = 0
|
||||
updateicon()
|
||||
for(var/obj/machinery/door/firedoor/D in src)
|
||||
if(!D.blocked)
|
||||
if(D.operating)
|
||||
D.nextstate = FIREDOOR_OPEN
|
||||
else if(D.density)
|
||||
spawn(0)
|
||||
D.open()
|
||||
firedoors_update()
|
||||
return
|
||||
|
||||
/area/proc/updateicon()
|
||||
|
||||
Reference in New Issue
Block a user