From e2d540b5566d950b5399563c85f40dacb7284cf1 Mon Sep 17 00:00:00 2001 From: Gottfrei Date: Sat, 28 Oct 2023 09:19:44 +0300 Subject: [PATCH] HUD Updates In Mind Transfer --- code/datums/hud.dm | 21 ++++++++++++++++++- code/datums/mind.dm | 7 +++++++ .../vampire/vampire_powers/bestia_powers.dm | 1 - 3 files changed, 27 insertions(+), 2 deletions(-) diff --git a/code/datums/hud.dm b/code/datums/hud.dm index de6bdf7a152..0db62cfdd88 100644 --- a/code/datums/hud.dm +++ b/code/datums/hud.dm @@ -103,11 +103,30 @@ GLOBAL_LIST_INIT(huds, list( \ for(var/datum/mindslaves/serv in (SSticker.mode.vampires | SSticker.mode.goon_vampires | SSticker.mode.traitors)) serv_huds += serv.thrallhud - for(var/datum/atom_hud/hud in (GLOB.all_huds|serv_huds))//|gang_huds)) if(src in hud.hudusers) hud.add_hud_to(src) + for(var/obj/item/check in contents) + if(istype(check, /obj/item/clothing/glasses/hud)) + var/obj/item/clothing/glasses/hud/glasses = check + if(glasses.HUDType && get_slot_by_item(glasses) == slot_glasses) + var/datum/atom_hud/my_hud = GLOB.huds[glasses.HUDType] + my_hud.add_hud_to(src) + + if(istype(check, /obj/item/clothing/head)) + var/obj/item/clothing/head/helmet = check + if(helmet.HUDType && get_slot_by_item(helmet) == slot_head) + var/datum/atom_hud/my_hud = GLOB.huds[helmet.HUDType] + my_hud.add_hud_to(src) + + if(istype(check, /obj/item/organ/internal/cyberimp/eyes/hud)) + var/obj/item/organ/internal/cyberimp/eyes/hud/implant = check + if(implant.HUD_type) + var/datum/atom_hud/my_hud = GLOB.huds[implant.HUD_type] + my_hud.add_hud_to(src) + + /mob/new_player/reload_huds() return diff --git a/code/datums/mind.dm b/code/datums/mind.dm index 932a2205596..96ad9273325 100644 --- a/code/datums/mind.dm +++ b/code/datums/mind.dm @@ -182,6 +182,13 @@ if(active) new_character.key = key //now transfer the key to link the client to our new body + // essential mob updates + new_character.update_blind_effects() + new_character.update_blurry_effects() + new_character.update_sight() + new_character.hud_used?.reload_fullscreen() + new_character.reload_huds() + SEND_SIGNAL(src, COMSIG_MIND_TRANSER_TO, new_character) diff --git a/code/modules/antagonists/vampire/vampire_powers/bestia_powers.dm b/code/modules/antagonists/vampire/vampire_powers/bestia_powers.dm index 9e11912748e..a9ec0f47748 100644 --- a/code/modules/antagonists/vampire/vampire_powers/bestia_powers.dm +++ b/code/modules/antagonists/vampire/vampire_powers/bestia_powers.dm @@ -1022,7 +1022,6 @@ GLOBAL_LIST_INIT(vampire_dissect_organs, list( user.forceMove(vampire_animal) user.mind.transfer_to(vampire_animal) vampire.draw_HUD() - vampire_animal.update_sight() var/matrix/animation_matrix = new(vampire_animal.transform) vampire_animal.transform = matrix().Scale(0)