mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-20 11:34:19 +01:00
add mech maintenance alert
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user