diff --git a/code/__DEFINES/mob_hud.dm b/code/__DEFINES/mob_hud.dm index 97fbc64a9da4..7536b7576d8d 100644 --- a/code/__DEFINES/mob_hud.dm +++ b/code/__DEFINES/mob_hud.dm @@ -13,6 +13,7 @@ #define XENO_HOSTILE_SLOW "13" // xeno-inflicted slow. used by a bunch of MOBA xenos stuff #define XENO_HOSTILE_TAG "14" // dancer prae 'tag' #define XENO_HOSTILE_FREEZE "15" // Any xeno-inflifcted root +#define XENO_EXECUTE "28" // Execute thershold, vampire #define HEALTH_HUD_XENO "16" // health HUD for xenos #define PLASMA_HUD "17" // indicates the plasma level of xenos. @@ -45,6 +46,7 @@ #define MOB_HUD_FACTION_PMC 15 #define MOB_HUD_HUNTER 16 #define MOB_HUD_HUNTER_CLAN 17 +#define MOB_HUD_EXECUTE 18 //for SL/FTL/LZ targeting on locator huds #define TRACKER_SL "track_sl" diff --git a/code/datums/mob_hud.dm b/code/datums/mob_hud.dm index 975bd5d15cb9..603f9a05d702 100644 --- a/code/datums/mob_hud.dm +++ b/code/datums/mob_hud.dm @@ -18,7 +18,8 @@ GLOBAL_LIST_INIT_TYPED(huds, /datum/mob_hud, list( MOB_HUD_FACTION_CLF = new /datum/mob_hud/faction/clf(), MOB_HUD_FACTION_PMC = new /datum/mob_hud/faction/pmc(), MOB_HUD_HUNTER = new /datum/mob_hud/hunter_hud(), - MOB_HUD_HUNTER_CLAN = new /datum/mob_hud/hunter_clan() + MOB_HUD_HUNTER_CLAN = new /datum/mob_hud/hunter_clan(), + MOB_HUD_EXECUTE = new /datum/mob_hud/execute_hud(), )) /datum/mob_hud @@ -167,6 +168,9 @@ GLOBAL_LIST_INIT_TYPED(huds, /datum/mob_hud, list( /datum/mob_hud/xeno_hostile hud_icons = list(XENO_HOSTILE_ACID, XENO_HOSTILE_SLOW, XENO_HOSTILE_TAG, XENO_HOSTILE_FREEZE) +/datum/mob_hud/execute_hud + hud_icons = list(XENO_EXECUTE) + /datum/mob_hud/hunter_clan hud_icons = list(HUNTER_CLAN) @@ -259,6 +263,11 @@ GLOBAL_LIST_INIT_TYPED(huds, /datum/mob_hud, list( var/datum/mob_hud/hostile_hud = GLOB.huds[MOB_HUD_XENO_HOSTILE] hostile_hud.remove_hud_from(src, src) + if (execute_hud) + execute_hud = FALSE + var/datum/mob_hud/execute = GLOB.huds[MOB_HUD_EXECUTE] + execute.remove_hud_from(src, src) + /mob/proc/refresh_huds(mob/source_mob) @@ -772,6 +781,16 @@ GLOBAL_DATUM(hud_icon_hudfocus, /image) var/image/holder = hud_list[HOLOCARD_HUD] holder.icon_state = holo_card_color ? "holo_card_[holo_card_color]" : "hudblank" +// Vampire Execute HUD +/mob/living/carbon/human/proc/update_execute_hud() + var/image/execute_holder = hud_list[XENO_EXECUTE] + + execute_holder.icon_state = "hudblank" + execute_holder.overlays.Cut() + + if(stat == UNCONSCIOUS || (stat != DEAD && HAS_TRAIT(src, TRAIT_KNOCKEDOUT))) + execute_holder.overlays += image('icons/mob/hud/hud.dmi', src, "prae_tag") + // Xeno "hostile" HUD /mob/living/carbon/human/proc/update_xeno_hostile_hud() var/image/acid_holder = hud_list[XENO_HOSTILE_ACID] diff --git a/code/modules/mob/living/carbon/human/death.dm b/code/modules/mob/living/carbon/human/death.dm index c97e4344cabf..34582a6612d4 100644 --- a/code/modules/mob/living/carbon/human/death.dm +++ b/code/modules/mob/living/carbon/human/death.dm @@ -131,3 +131,5 @@ else if(death_data?.cause_name == "existing") // Corpses spawn as gibbed true to avoid sfx, even though they aren't actually gibbed... AddComponent(/datum/component/weed_food) + + update_execute_hud() diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index eb19593bde46..6db31ea6451a 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -1704,3 +1704,18 @@ item.showoff(src) return TRUE return ..() + +/mob/living/carbon/human/on_knockedout_trait_gain(datum/source) + . = ..() + + update_execute_hud() + + return . + +/mob/living/carbon/human/on_knockedout_trait_loss(datum/source) + . = ..() + + update_execute_hud() + + return . + diff --git a/code/modules/mob/living/carbon/human/human_defines.dm b/code/modules/mob/living/carbon/human/human_defines.dm index e611452e9de7..de901f941efb 100644 --- a/code/modules/mob/living/carbon/human/human_defines.dm +++ b/code/modules/mob/living/carbon/human/human_defines.dm @@ -136,7 +136,7 @@ var/last_chew = 0 //taken from human.dm - hud_possible = list(HEALTH_HUD, STATUS_HUD, STATUS_HUD_OOC, STATUS_HUD_XENO_INFECTION, STATUS_HUD_XENO_CULTIST, ID_HUD, WANTED_HUD, ORDER_HUD, XENO_HOSTILE_ACID, XENO_HOSTILE_SLOW, XENO_HOSTILE_TAG, XENO_HOSTILE_FREEZE, HUNTER_CLAN, HUNTER_HUD, FACTION_HUD, HOLOCARD_HUD) + hud_possible = list(HEALTH_HUD, STATUS_HUD, STATUS_HUD_OOC, STATUS_HUD_XENO_INFECTION, STATUS_HUD_XENO_CULTIST, ID_HUD, WANTED_HUD, ORDER_HUD, XENO_HOSTILE_ACID, XENO_HOSTILE_SLOW, XENO_HOSTILE_TAG, XENO_HOSTILE_FREEZE, XENO_EXECUTE, HUNTER_CLAN, HUNTER_HUD, FACTION_HUD, HOLOCARD_HUD) var/embedded_flag //To check if we've need to roll for damage on movement while an item is imbedded in us. var/allow_gun_usage = TRUE var/melee_allowed = TRUE diff --git a/code/modules/mob/living/carbon/xenomorph/Xenomorph.dm b/code/modules/mob/living/carbon/xenomorph/Xenomorph.dm index adfb65169c88..78d590a29afe 100644 --- a/code/modules/mob/living/carbon/xenomorph/Xenomorph.dm +++ b/code/modules/mob/living/carbon/xenomorph/Xenomorph.dm @@ -218,6 +218,7 @@ ////////////////////////////////////////////////////////////////// var/xeno_mobhud = FALSE //whether the xeno mobhud is activated or not. var/xeno_hostile_hud = FALSE // 'Hostile' HUD - the verb Xenos use to see tags, etc on humans + var/execute_hud = FALSE // Crit HUD, only visible to vampire lurkers var/list/plasma_types = list() //The types of plasma the caste contains var/list/xeno_shields = list() // List of /datum/xeno_shield that holds all active shields on the Xeno. var/acid_splash_cooldown = 5 SECONDS //Time it takes between acid splash retaliate procs diff --git a/code/modules/mob/living/carbon/xenomorph/strains/castes/lurker/vampire.dm b/code/modules/mob/living/carbon/xenomorph/strains/castes/lurker/vampire.dm index 34dfcc325943..820aa662c919 100644 --- a/code/modules/mob/living/carbon/xenomorph/strains/castes/lurker/vampire.dm +++ b/code/modules/mob/living/carbon/xenomorph/strains/castes/lurker/vampire.dm @@ -25,4 +25,8 @@ lurker.damage_modifier -= XENO_DAMAGE_MOD_VERY_SMALL lurker.attack_speed_modifier -= 2 + var/datum/mob_hud/execute_hud = GLOB.huds[MOB_HUD_EXECUTE] + execute_hud.add_hud_to(lurker, lurker) + lurker.execute_hud = TRUE + lurker.recalculate_everything()