mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 10:21:11 +00:00
Fixes fire alarm security level sprite
This commit is contained in:
@@ -902,7 +902,7 @@ FIRE ALARM
|
||||
var/buildstage = 2 // 2 = complete, 1 = no wires, 0 = circuit gone
|
||||
|
||||
/obj/machinery/firealarm/update_icon()
|
||||
|
||||
overlays.len = 0
|
||||
if(wiresexposed)
|
||||
switch(buildstage)
|
||||
if(2)
|
||||
@@ -911,23 +911,26 @@ FIRE ALARM
|
||||
icon_state="fire_b1"
|
||||
if(0)
|
||||
icon_state="fire_b0"
|
||||
|
||||
return
|
||||
|
||||
if(stat & BROKEN)
|
||||
icon_state = "firex"
|
||||
else if(stat & NOPOWER)
|
||||
icon_state = "firep"
|
||||
else if(!src.detecting)
|
||||
icon_state = "fire1"
|
||||
else
|
||||
icon_state = "fire0"
|
||||
if(!src.detecting)
|
||||
icon_state = "fire1"
|
||||
else
|
||||
icon_state = "fire0"
|
||||
if(z == 1 && security_level)
|
||||
src.overlays += image('icons/obj/monitors.dmi', "overlay_[get_security_level()]")
|
||||
else
|
||||
src.overlays += image('icons/obj/monitors.dmi', "overlay_green")
|
||||
|
||||
/obj/machinery/firealarm/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
if(src.detecting)
|
||||
if(exposed_temperature > T0C+200)
|
||||
src.alarm() // added check of detector status here
|
||||
return
|
||||
|
||||
/obj/machinery/firealarm/attack_ai(mob/user as mob)
|
||||
src.add_hiddenprint(user)
|
||||
@@ -1111,7 +1114,6 @@ FIRE ALARM
|
||||
return
|
||||
areaMaster.firereset()
|
||||
update_icon()
|
||||
return
|
||||
|
||||
/obj/machinery/firealarm/proc/alarm()
|
||||
if (!( src.working ))
|
||||
@@ -1119,7 +1121,8 @@ FIRE ALARM
|
||||
areaMaster.firealert()
|
||||
update_icon()
|
||||
//playsound(get_turf(src), 'sound/ambience/signal.ogg', 75, 0)
|
||||
return
|
||||
|
||||
var/global/list/firealarms = list() //shrug
|
||||
|
||||
/obj/machinery/firealarm/New(loc, dir, building)
|
||||
..()
|
||||
@@ -1136,15 +1139,14 @@ FIRE ALARM
|
||||
pixel_x = (dir & 3)? 0 : (dir == 4 ? -24 : 24)
|
||||
pixel_y = (dir & 3)? (dir ==1 ? -24 : 24) : 0
|
||||
|
||||
if(z == 1)
|
||||
if(security_level)
|
||||
src.overlays += image('icons/obj/monitors.dmi', "overlay_[get_security_level()]")
|
||||
else
|
||||
src.overlays += image('icons/obj/monitors.dmi', "overlay_green")
|
||||
|
||||
machines.Remove(src)
|
||||
firealarms |= src
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/firealarm/Destroy()
|
||||
firealarms.Remove(src)
|
||||
..()
|
||||
|
||||
/obj/machinery/firealarm/change_area(oldarea, newarea)
|
||||
..()
|
||||
name = replacetext(name,oldarea,newarea)
|
||||
|
||||
@@ -24,10 +24,7 @@
|
||||
to_chat(world, "<font size=4 color='red'>Attention! Security level lowered to green</font>")
|
||||
to_chat(world, "<font color='red'>[config.alert_desc_green]</font>")
|
||||
security_level = SEC_LEVEL_GREEN
|
||||
for(var/obj/machinery/firealarm/FA in machines)
|
||||
if(FA.z == 1)
|
||||
FA.overlays = list()
|
||||
FA.overlays += image('icons/obj/monitors.dmi', "overlay_green")
|
||||
|
||||
if(SEC_LEVEL_BLUE)
|
||||
if(security_level < SEC_LEVEL_BLUE)
|
||||
to_chat(world, "<font size=4 color='red'>Attention! Security level elevated to blue</font>")
|
||||
@@ -36,10 +33,7 @@
|
||||
to_chat(world, "<font size=4 color='red'>Attention! Security level lowered to blue</font>")
|
||||
to_chat(world, "<font color='red'>[config.alert_desc_blue_downto]</font>")
|
||||
security_level = SEC_LEVEL_BLUE
|
||||
for(var/obj/machinery/firealarm/FA in machines)
|
||||
if(FA.z == 1)
|
||||
FA.overlays = list()
|
||||
FA.overlays += image('icons/obj/monitors.dmi', "overlay_blue")
|
||||
|
||||
if(SEC_LEVEL_RED)
|
||||
if(security_level < SEC_LEVEL_RED)
|
||||
to_chat(world, "<font size=4 color='red'>Attention! Code red!</font>")
|
||||
@@ -54,19 +48,13 @@
|
||||
if(CC)
|
||||
CC.post_status("alert", "redalert")*/
|
||||
|
||||
for(var/obj/machinery/firealarm/FA in machines)
|
||||
if(FA.z == 1)
|
||||
FA.overlays = list()
|
||||
FA.overlays += image('icons/obj/monitors.dmi', "overlay_red")
|
||||
|
||||
if(SEC_LEVEL_DELTA)
|
||||
to_chat(world, "<font size=4 color='red'>Attention! Delta security level reached!</font>")
|
||||
to_chat(world, "<font color='red'>[config.alert_desc_delta]</font>")
|
||||
security_level = SEC_LEVEL_DELTA
|
||||
for(var/obj/machinery/firealarm/FA in machines)
|
||||
if(FA.z == 1)
|
||||
FA.overlays = list()
|
||||
FA.overlays += image('icons/obj/monitors.dmi', "overlay_delta")
|
||||
|
||||
for(var/obj/machinery/firealarm/FA in firealarms)
|
||||
FA.update_icon()
|
||||
else
|
||||
return
|
||||
|
||||
|
||||
35
html/changelogs/9600bauds_discoinferno.yml
Normal file
35
html/changelogs/9600bauds_discoinferno.yml
Normal file
@@ -0,0 +1,35 @@
|
||||
################################
|
||||
# Example Changelog File
|
||||
#
|
||||
# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb.
|
||||
#
|
||||
# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.)
|
||||
# When it is, any changes listed below will disappear.
|
||||
#
|
||||
# Valid Prefixes:
|
||||
# bugfix
|
||||
# wip (For works in progress)
|
||||
# tweak
|
||||
# soundadd
|
||||
# sounddel
|
||||
# rscdel (general deleting of nice things)
|
||||
# rscadd (general adding of nice things)
|
||||
# imageadd
|
||||
# imagedel
|
||||
# spellcheck (typo fixes)
|
||||
# experiment
|
||||
# tgs (TG-ported fixes?)
|
||||
#################################
|
||||
|
||||
# Your name.
|
||||
author: 9600bauds
|
||||
|
||||
# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again.
|
||||
delete-after: True
|
||||
|
||||
# Any changes you've made. See valid prefix list above.
|
||||
# INDENT WITH TWO SPACES. NOT TABS. SPACES.
|
||||
# SCREW THIS UP AND IT WON'T WORK.
|
||||
# Also, this gets changed to [] after reading. Just remove the brackets when you add new shit.
|
||||
changes:
|
||||
- bugfix: Fixed fire alarms not showing the security level of the station.
|
||||
Reference in New Issue
Block a user