diff --git a/code/modules/antagonists/_common/antag_datum.dm b/code/modules/antagonists/_common/antag_datum.dm index 3184a169fc..b5ed6c18df 100644 --- a/code/modules/antagonists/_common/antag_datum.dm +++ b/code/modules/antagonists/_common/antag_datum.dm @@ -64,6 +64,18 @@ GLOBAL_LIST_EMPTY(antagonists) /datum/antagonist/proc/remove_innate_effects(mob/living/mob_override) return +// Adds the specified antag hud to the player. Usually called in an antag datum file +/datum/antagonist/proc/add_antag_hud(antag_hud_type, antag_hud_name, mob/living/mob_override) + var/datum/atom_hud/antag/hud = GLOB.huds[antag_hud_type] + hud.join_hud(mob_override) + set_antag_hud(mob_override, antag_hud_name) + +// Removes the specified antag hud from the player. Usually called in an antag datum file +/datum/antagonist/proc/remove_antag_hud(antag_hud_type, mob/living/mob_override) + var/datum/atom_hud/antag/hud = GLOB.huds[antag_hud_type] + hud.leave_hud(mob_override) + set_antag_hud(mob_override, null) + //Assign default team and creates one for one of a kind team antagonists /datum/antagonist/proc/create_team(datum/team/team) return diff --git a/code/modules/antagonists/fugitive/fugitive.dm b/code/modules/antagonists/fugitive/fugitive.dm index 0f8ddd33b1..701e7b776c 100644 --- a/code/modules/antagonists/fugitive/fugitive.dm +++ b/code/modules/antagonists/fugitive/fugitive.dm @@ -8,6 +8,14 @@ var/is_captured = FALSE var/backstory = "error" +/datum/antagonist/fugitive/apply_innate_effects(mob/living/mob_override) + var/mob/living/M = mob_override || owner.current + add_antag_hud(ANTAG_HUD_FUGITIVE, "fugitive", M) + +/datum/antagonist/fugitive/remove_innate_effects(mob/living/mob_override) + var/mob/living/M = mob_override || owner.current + remove_antag_hud(ANTAG_HUD_FUGITIVE, M) + /datum/antagonist/fugitive/on_gain() forge_objectives() . = ..() diff --git a/code/modules/antagonists/fugitive/hunter.dm b/code/modules/antagonists/fugitive/hunter.dm index 2eea322ad5..9d1fb96582 100644 --- a/code/modules/antagonists/fugitive/hunter.dm +++ b/code/modules/antagonists/fugitive/hunter.dm @@ -7,6 +7,14 @@ var/datum/team/fugitive_hunters/hunter_team var/backstory = "error" +/datum/antagonist/fugitive_hunter/apply_innate_effects(mob/living/mob_override) + var/mob/living/M = mob_override || owner.current + add_antag_hud(ANTAG_HUD_FUGITIVE, "fugitive_hunter", M) + +/datum/antagonist/fugitive_hunter/remove_innate_effects(mob/living/mob_override) + var/mob/living/M = mob_override || owner.current + remove_antag_hud(ANTAG_HUD_FUGITIVE, M) + /datum/antagonist/fugitive_hunter/on_gain() forge_objectives() . = ..()