Skip to content

Commit

Permalink
get_desc
Browse files Browse the repository at this point in the history
  • Loading branch information
amylizzle committed Dec 22, 2023
1 parent 8b8fa75 commit 2143932
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion code/obj/machinery/alarm.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
//

/obj/machinery/alarm
name = "Air Monitor"
name = "air Monitor"
icon = 'icons/obj/monitors.dmi'
icon_state = "alarm_unpowered"
power_usage = 5
Expand Down Expand Up @@ -47,6 +47,20 @@
else
alarm_zone = "Unregistered"

/obj/machinery/alarm/get_desc(dist, mob/user)
. = ..()
if(status & NOPOWER | BROKEN)
. += "It doesn't seem to be working."
return

switch(last_safe)
if(0)
. += "It is showing an alert status. Maybe you should hold your breath."
if(1)
. += "It is showing a caution alarm. Something isn't right, but you can still breathe."
if(2)
. += "It is showing optimal status. Take a deep breath of fresh-ish air!"

/obj/machinery/alarm/ui_interact(mob/user, datum/tgui/ui)
ui = tgui_process.try_update_ui(user, src, ui)
if(!ui)
Expand Down

0 comments on commit 2143932

Please sign in to comment.