Merge pull request #32266 from AnturK/halalert

Fixes hallucination alerts not clearing up properly.
This commit is contained in:
oranges
2017-11-02 09:51:09 +13:00
committed by CitadelStationBot
parent 56c534fa62
commit d56e7c8c56
+22 -20
View File
@@ -905,45 +905,47 @@ GLOBAL_LIST_INIT(hallucinations_major, list(
alert_type = specific
feedback_details += "Type: [alert_type]"
switch(alert_type)
if("oxy")
target.throw_alert("not_enough_oxy", /obj/screen/alert/not_enough_oxy, override = TRUE)
if("not_enough_oxy")
target.throw_alert(alert_type, /obj/screen/alert/not_enough_oxy, override = TRUE)
if("not_enough_tox")
target.throw_alert("not_enough_tox", /obj/screen/alert/not_enough_tox, override = TRUE)
target.throw_alert(alert_type, /obj/screen/alert/not_enough_tox, override = TRUE)
if("not_enough_co2")
target.throw_alert("not_enough_co2", /obj/screen/alert/not_enough_co2, override = TRUE)
target.throw_alert(alert_type, /obj/screen/alert/not_enough_co2, override = TRUE)
if("too_much_oxy")
target.throw_alert("too_much_oxy", /obj/screen/alert/too_much_oxy, override = TRUE)
target.throw_alert(alert_type, /obj/screen/alert/too_much_oxy, override = TRUE)
if("too_much_co2")
target.throw_alert("too_much_co2", /obj/screen/alert/too_much_co2, override = TRUE)
if("tox_in_air")
target.throw_alert("too_much_tox", /obj/screen/alert/too_much_tox, override = TRUE)
target.throw_alert(alert_type, /obj/screen/alert/too_much_co2, override = TRUE)
if("too_much_tox")
target.throw_alert(alert_type, /obj/screen/alert/too_much_tox, override = TRUE)
if("nutrition")
if(prob(50))
target.throw_alert("nutrition", /obj/screen/alert/fat, override = TRUE)
target.throw_alert(alert_type, /obj/screen/alert/fat, override = TRUE)
else
target.throw_alert("nutrition", /obj/screen/alert/starving, override = TRUE)
target.throw_alert(alert_type, /obj/screen/alert/starving, override = TRUE)
if("weightless")
target.throw_alert("weightless", /obj/screen/alert/weightless, override = TRUE)
target.throw_alert(alert_type, /obj/screen/alert/weightless, override = TRUE)
if("fire")
target.throw_alert("fire", /obj/screen/alert/fire, override = TRUE)
target.throw_alert(alert_type, /obj/screen/alert/fire, override = TRUE)
if("temphot")
target.throw_alert("temp", /obj/screen/alert/hot, 3, override = TRUE)
alert_type = "temp"
target.throw_alert(alert_type, /obj/screen/alert/hot, 3, override = TRUE)
if("tempcold")
target.throw_alert("temp", /obj/screen/alert/cold, 3, override = TRUE)
alert_type = "temp"
target.throw_alert(alert_type, /obj/screen/alert/cold, 3, override = TRUE)
if("pressure")
if(prob(50))
target.throw_alert("pressure", /obj/screen/alert/highpressure, 2, override = TRUE)
target.throw_alert(alert_type, /obj/screen/alert/highpressure, 2, override = TRUE)
else
target.throw_alert("pressure", /obj/screen/alert/lowpressure, 2, override = TRUE)
target.throw_alert(alert_type, /obj/screen/alert/lowpressure, 2, override = TRUE)
//BEEP BOOP I AM A ROBOT
if("newlaw")
target.throw_alert("newlaw", /obj/screen/alert/newlaw, override = TRUE)
target.throw_alert(alert_type, /obj/screen/alert/newlaw, override = TRUE)
if("locked")
target.throw_alert("locked", /obj/screen/alert/locked, override = TRUE)
target.throw_alert(alert_type, /obj/screen/alert/locked, override = TRUE)
if("hacked")
target.throw_alert("hacked", /obj/screen/alert/hacked, override = TRUE)
target.throw_alert(alert_type, /obj/screen/alert/hacked, override = TRUE)
if("charge")
target.throw_alert("charge",/obj/screen/alert/emptycell, override = TRUE)
target.throw_alert(alert_type,/obj/screen/alert/emptycell, override = TRUE)
sleep(duration)
target.clear_alert(alert_type, clear_override = TRUE)
qdel(src)