diff --git a/code/_onclick/hud/alert.dm b/code/_onclick/hud/alert.dm index 3a7727a9f61..baf6a2dfeb6 100644 --- a/code/_onclick/hud/alert.dm +++ b/code/_onclick/hud/alert.dm @@ -36,14 +36,10 @@ alert = new type if(new_master) - var/old_layer = new_master.layer - var/old_plane = new_master.plane - new_master.layer = LAYER_HUD_ABOVE - new_master.plane = PLANE_PLAYER_HUD_ABOVE - alert.overlays += new_master - new_master.layer = old_layer - new_master.plane = old_plane - alert.icon_state = "template" // We'll set the icon to the client's ui pref in reorganize_alerts() + var/mutable_appearance/itemMA = new (new_master) + itemMA.layer = LAYER_HUD_ABOVE + itemMA.plane = PLANE_PLAYER_HUD_ABOVE + alert.add_overlay(itemMA) alert.master = new_master else alert.icon_state = "[initial(alert.icon_state)][severity]" @@ -83,6 +79,7 @@ var/timeout = 0 //If set to a number, this alert will clear itself after that many deciseconds var/severity = 0 var/alerttooltipstyle = "" + var/no_underlay // Don't underlay the UI style's blank template icon under this /obj/screen/alert/MouseEntered(location,control,params) @@ -394,17 +391,16 @@ so as to remain in compliance with the most up-to-date laws." // Re-render all alerts - also called in /datum/hud/show_hud() because it's needed there /datum/hud/proc/reorganize_alerts() var/list/alerts = mymob.alerts - var/icon_pref if(!hud_shown) for(var/i = 1, i <= alerts.len, i++) mymob.client.screen -= alerts[alerts[i]] return 1 for(var/i = 1, i <= alerts.len, i++) var/obj/screen/alert/alert = alerts[alerts[i]] - if(alert.icon_state == "template") - if(!icon_pref) - icon_pref = ui_style2icon(mymob.client.prefs.UI_style) - alert.icon = icon_pref + if(alert.icon_state in cached_icon_states(ui_style)) + alert.icon = ui_style + else if(!alert.no_underlay) + alert.underlays = list(image(icon = ui_style, icon_state = "template")) switch(i) if(1) . = ui_alert1 @@ -419,7 +415,7 @@ so as to remain in compliance with the most up-to-date laws." else . = "" alert.screen_loc = . - mymob.client.screen |= alert + mymob?.client?.screen |= alert return 1 /mob diff --git a/code/_onclick/hud/hud.dm b/code/_onclick/hud/hud.dm index 830dd65546f..9d0f477b13c 100644 --- a/code/_onclick/hud/hud.dm +++ b/code/_onclick/hud/hud.dm @@ -190,6 +190,8 @@ var/list/global_huds = list( var/action_buttons_hidden = 0 var/list/slot_info + var/icon/ui_style + datum/hud/New(mob/owner) mymob = owner instantiate() @@ -305,7 +307,8 @@ datum/hud/New(mob/owner) /datum/hud/proc/instantiate() if(!ismob(mymob)) return 0 if(!mymob.client) return 0 - var/ui_style = ui_style2icon(mymob.client.prefs.UI_style) + + ui_style = ui_style2icon(mymob.client.prefs.UI_style) var/ui_color = mymob.client.prefs.UI_style_color var/ui_alpha = mymob.client.prefs.UI_style_alpha diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index 936f9d85f9f..acf79a63687 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -837,15 +837,7 @@ mob/observer/dead/MayRespawn(var/feedback = 0) if(message) to_chat(src, "[message]") if(source) - var/obj/screen/alert/A = throw_alert("\ref[source]_notify_revive", /obj/screen/alert/notify_cloning) - if(A) - if(client && client.prefs && client.prefs.UI_style) - A.icon = ui_style2icon(client.prefs.UI_style) - A.desc = message - var/old_layer = source.layer - source.layer = FLOAT_LAYER - A.overlays += source - source.layer = old_layer + throw_alert("\ref[source]_notify_revive", /obj/screen/alert/notify_cloning, new_master = source) to_chat(src, "(Click to re-enter)") if(sound) SEND_SOUND(src, sound(sound)) diff --git a/icons/mob/screen/holo.dmi b/icons/mob/screen/holo.dmi index e7a0d01a1b8..434da95f7d8 100644 Binary files a/icons/mob/screen/holo.dmi and b/icons/mob/screen/holo.dmi differ diff --git a/icons/mob/screen/midnight.dmi b/icons/mob/screen/midnight.dmi index e0ff03e0bfe..842554a84bb 100644 Binary files a/icons/mob/screen/midnight.dmi and b/icons/mob/screen/midnight.dmi differ diff --git a/icons/mob/screen/minimalist.dmi b/icons/mob/screen/minimalist.dmi index f53374f86f2..a60c9b196ae 100644 Binary files a/icons/mob/screen/minimalist.dmi and b/icons/mob/screen/minimalist.dmi differ diff --git a/icons/mob/screen/old-noborder.dmi b/icons/mob/screen/old-noborder.dmi index 7998ec1ae13..ddc72353ee3 100644 Binary files a/icons/mob/screen/old-noborder.dmi and b/icons/mob/screen/old-noborder.dmi differ diff --git a/icons/mob/screen/old.dmi b/icons/mob/screen/old.dmi index 54465c48310..f165b01b5bf 100644 Binary files a/icons/mob/screen/old.dmi and b/icons/mob/screen/old.dmi differ diff --git a/icons/mob/screen/orange.dmi b/icons/mob/screen/orange.dmi index 22f806952e6..d0b52d10d4a 100644 Binary files a/icons/mob/screen/orange.dmi and b/icons/mob/screen/orange.dmi differ diff --git a/icons/mob/screen/white.dmi b/icons/mob/screen/white.dmi index 12ec85588ef..0a1a31bc31e 100644 Binary files a/icons/mob/screen/white.dmi and b/icons/mob/screen/white.dmi differ diff --git a/icons/mob/screen_alert.dmi b/icons/mob/screen_alert.dmi index 32921f32130..638fd7d1092 100644 Binary files a/icons/mob/screen_alert.dmi and b/icons/mob/screen_alert.dmi differ