Makes pAI screen alert actually work (#68118)

Currently, when a pAI personality is submitted, it's supposed to show an alert screen briefly with flick. This doesn't work. So I've changed it to a 5 second overlay instead, and this does work.
This commit is contained in:
tattle
2022-07-05 18:53:18 -07:00
committed by GitHub
parent 2d2a22fc0c
commit 83e24e3b0d
2 changed files with 10 additions and 1 deletions
+10 -1
View File
@@ -187,10 +187,19 @@
if(!COOLDOWN_FINISHED(src, alert_cooldown))
return
COOLDOWN_START(src, alert_cooldown, 5 SECONDS)
flick("[initial(icon_state)]-alert", src)
add_alert()
addtimer(CALLBACK(src, .proc/remove_alert), 5 SECONDS)
playsound(src, 'sound/machines/ping.ogg', 30, TRUE)
loc.visible_message(span_info("[src] flashes a message across its screen, \"Additional personalities available for download.\""), blind_message = span_notice("[src] vibrates with an alert."))
/obj/item/paicard/proc/add_alert()
add_overlay(
list(mutable_appearance(icon, "[initial(icon_state)]-alert"),
emissive_appearance(icon, "[initial(icon_state)]-alert", alpha = src.alpha)))
/obj/item/paicard/proc/remove_alert()
cut_overlays()
/obj/item/paicard/emp_act(severity)
. = ..()
if (. & EMP_PROTECT_SELF)
Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

After

Width:  |  Height:  |  Size: 4.0 KiB