Air alarm icon improvements, 3/4ths edition (#17219)

* Air alarm screens now glow in the dark, an the fan animation is linked to it heating or cooling a room

* Make the fan animation faster

* Give the level 2 built air alarm a fan back, but with no rotation

* Fix exposed wire state not showing up when an air alarm is broken
This commit is contained in:
Cody Brittain
2023-09-05 10:30:55 +00:00
committed by GitHub
parent 796ca38d2e
commit 09ae9201c8
3 changed files with 61 additions and 8 deletions
+18 -8
View File
@@ -101,6 +101,8 @@ pixel_x = 10;
var/report_danger_level = 1
var/global/image/alarm_overlay
/obj/machinery/alarm/north
PRESET_NORTH
@@ -350,6 +352,7 @@ pixel_x = 10;
regulating_temperature = 1
visible_message("\The [src] clicks as it starts [environment.temperature > target_temperature ? "cooling" : "heating"] the room.",\
"You hear a click and a faint electronic hum.")
update_icon()
else
//check for when we should stop adjusting temperature
if (get_danger_level(target_temperature, TLV["temperature"]) || abs(environment.temperature - target_temperature) <= 0.5)
@@ -357,6 +360,7 @@ pixel_x = 10;
regulating_temperature = 0
visible_message("\The [src] clicks quietly as it stops [environment.temperature > target_temperature ? "cooling" : "heating"] the room.",\
"You hear a click as a faint electronic humming stops.")
update_icon()
if (regulating_temperature)
//Unnecessary checks removed, duplication of effort
@@ -441,12 +445,13 @@ pixel_x = 10;
/obj/machinery/alarm/update_icon()
cut_overlays()
icon_state = "alarmp"
if(wiresexposed)
icon_state = "alarmx"
set_light(0)
return
if((stat & (NOPOWER|BROKEN)) || shorted)
icon_state = "alarmp"
add_overlay("alarm_fan_off")
set_light(0)
return
@@ -454,20 +459,25 @@ pixel_x = 10;
if (alarm_area.atmosalm)
icon_level = max(icon_level, 1) //if there's an atmos alarm but everything is okay locally, no need to go past yellow
alarm_overlay = make_screen_overlay(icon, "alarm[icon_level]")
add_overlay(alarm_overlay)
var/new_color = null
switch(icon_level)
if (0)
add_overlay("alarm0")
new_color = "#03A728"
new_color = COLOR_LIME
if (1)
add_overlay("alarm2") //yes, alarm2 is yellow alarm
new_color = COLOR_SUN
if (2)
add_overlay("alarm1")
new_color = "#DA0205"
new_color = COLOR_RED_LIGHT
set_light(l_range = L_WALLMOUNT_RANGE, l_power = L_WALLMOUNT_POWER, l_color = new_color)
if(regulating_temperature)
add_overlay("alarm_fan_on")
else
add_overlay("alarm_fan_off")
/obj/machinery/alarm/proc/refresh_all()
for(var/id_tag in alarm_area.air_vent_names)
var/list/I = alarm_area.air_vent_info[id_tag]
@@ -0,0 +1,43 @@
################################
# 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
# rscadd (general adding of nice things)
# rscdel (general deleting of nice things)
# imageadd
# imagedel
# maptweak
# spellcheck (typo fixes)
# experiment
# balance
# admin
# backend
# security
# refactor
#################################
# Your name.
author: GeneralCamo
# 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, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries.
# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog.
changes:
- tweak: "The air alarm fan animation now only plays when it is actively heating or cooling a room."
- tweak: "The air alarm screen now glows."
- bugfix: "Fixed the air alarm red and yellow icon states being swapped."
Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 27 KiB