add mech maintenance alert

This commit is contained in:
datlo
2018-12-28 07:07:38 +00:00
parent c026d533b1
commit c12fa7af2b
3 changed files with 13 additions and 1 deletions
+5
View File
@@ -427,6 +427,11 @@ so as to remain in compliance with the most up-to-date laws."
desc = "Mech is running out of power."
icon_state = "lowcell"
/obj/screen/alert/mech_maintenance
name = "Maintenance Protocols"
desc = "Maintenance protocols are currently in effect, most actions disabled."
icon_state = "locked"
//GUARDIANS
/obj/screen/alert/cancharge
name = "Charge Ready"
+3
View File
@@ -1179,6 +1179,8 @@
activated = TRUE
else if(!hasInternalDamage())
occupant << sound(nominalsound, volume = 50)
if(state)
H.throw_alert("locked", /obj/screen/alert/mech_maintenance)
return 1
else
return 0
@@ -1261,6 +1263,7 @@
return
var/atom/movable/mob_container
occupant.clear_alert("charge")
occupant.clear_alert("locked")
occupant.clear_alert("mech damage")
occupant.clear_alert("mechaport")
occupant.clear_alert("mechaport_d")
+5 -1
View File
@@ -195,7 +195,7 @@
</head>
<body>
[add_req_access?"<a href='?src=[UID()];req_access=1;id_card=\ref[id_card];user=\ref[user]'>Edit operation keycodes</a>":null]
[maint_access?"<a href='?src=[UID()];maint_access=1;id_card=\ref[id_card];user=\ref[user]'>Initiate maintenance protocol</a>":null]
[maint_access?"<a href='?src=[UID()];maint_access=1;id_card=\ref[id_card];user=\ref[user]'>Initiate/Stop maintenance protocol</a>":null]
[(state>0) ?"<a href='?src=[UID()];set_internal_tank_valve=1;user=\ref[user]'>Set Cabin Air Pressure</a>":null]
</body>
</html>"}
@@ -317,9 +317,13 @@
if(state==0)
state = 1
to_chat(user, "The securing bolts are now exposed.")
if(occupant)
occupant.throw_alert("locked", /obj/screen/alert/mech_maintenance)
else if(state==1)
state = 0
to_chat(user, "The securing bolts are now hidden.")
if(occupant)
occupant.clear_alert("locked")
output_maintenance_dialog(afilter.getObj("id_card"),user)
return
if(href_list["set_internal_tank_valve"] && state >=1)