diff --git a/code/__DEFINES/atom_hud.dm b/code/__DEFINES/atom_hud.dm index 3a2534c00b..8a107c23ee 100644 --- a/code/__DEFINES/atom_hud.dm +++ b/code/__DEFINES/atom_hud.dm @@ -40,6 +40,7 @@ #define ANTAG_HUD_SINTOUCHED 16 #define ANTAG_HUD_SOULLESS 17 #define ANTAG_HUD_CLOCKWORK 18 +#define ANTAG_HUD_BORER 19 // Notification action types #define NOTIFY_JUMP "jump" diff --git a/code/datums/hud.dm b/code/datums/hud.dm index f9444898ce..dc78eea396 100644 --- a/code/datums/hud.dm +++ b/code/datums/hud.dm @@ -20,6 +20,7 @@ GLOBAL_LIST_INIT(huds, list( ANTAG_HUD_SINTOUCHED = new/datum/atom_hud/antag/hidden(), ANTAG_HUD_SOULLESS = new/datum/atom_hud/antag/hidden(), ANTAG_HUD_CLOCKWORK = new/datum/atom_hud/antag(), + ANTAG_HUD_BORER = new/datum/atom_hud/antag(), )) /datum/atom_hud diff --git a/code/game/gamemodes/antag_spawner_cit.dm b/code/game/gamemodes/antag_spawner_cit.dm index 175ad0e8a4..a7923be45e 100644 --- a/code/game/gamemodes/antag_spawner_cit.dm +++ b/code/game/gamemodes/antag_spawner_cit.dm @@ -27,7 +27,7 @@ obj/item/weapon/antag_spawner/syndi_borer/spawn_antag(client/C, turf/T, mob/owne to_chat(B, "You are awake at last! Seek out whoever released you and aid them as best you can!") if(new_objective) to_chat(B, "Objective #[1]: [new_objective.explanation_text]") - + SSticker.mode.update_borer_icons_added(B) /obj/item/weapon/antag_spawner/syndi_borer/proc/check_usability(mob/user) if(used) to_chat(user, "[src] appears to be empty!") diff --git a/code/game/gamemodes/miniantags/borer/borer.dm b/code/game/gamemodes/miniantags/borer/borer.dm index 42a413bcd7..656dec9341 100644 --- a/code/game/gamemodes/miniantags/borer/borer.dm +++ b/code/game/gamemodes/miniantags/borer/borer.dm @@ -413,6 +413,8 @@ GLOBAL_VAR_INIT(total_borer_hosts_needed, 10) victim = C forceMove(victim) + SSticker.mode.update_borer_icons_added_host(victim.mind) + RemoveBorerActions() GrantInfestActions() @@ -587,6 +589,7 @@ GLOBAL_VAR_INIT(total_borer_hosts_needed, 10) var/mob/living/V = victim V.verbs -= /mob/living/proc/borer_comm talk_to_borer_action.Remove(victim) + SSticker.mode.update_borer_icons_removed_host(victim.mind) victim = null return @@ -842,6 +845,7 @@ GLOBAL_VAR_INIT(total_borer_hosts_needed, 10) if(mind) mind.store_memory("You must escape with at least [GLOB.total_borer_hosts_needed] borers with hosts on the shuttle.") + SSticker.mode.update_borer_icons_added(mind) to_chat(src, "You are a cortical borer!") to_chat(src, "You are a brain slug that worms its way into the head of its victim. Use stealth, persuasion and your powers of mind control to keep you, your host and your eventual spawn safe and warm.") @@ -1075,4 +1079,28 @@ GLOBAL_VAR_INIT(total_borer_hosts_needed, 10) /datum/action/innate/borer/jumpstart_host/Activate() var/mob/living/simple_animal/borer/B = owner - B.jumpstart() \ No newline at end of file + B.jumpstart() + + +//HUD STUFF +/datum/game_mode/proc/update_borer_icons_added(datum/mind/borer_mind) + var/datum/atom_hud/antag/borerhud = GLOB.huds[ANTAG_HUD_BORER] + borerhud.join_hud(borer_mind.current) + set_antag_hud(borer_mind.current, "hudbrainworm") + +/datum/game_mode/proc/update_borer_icons_removed(datum/mind/borer_mind) + var/datum/atom_hud/antag/borerhud = GLOB.huds[ANTAG_HUD_BORER] + borerhud.leave_hud(borer_mind.current) + set_antag_hud(borer_mind.current, null) + +/datum/game_mode/proc/update_borer_icons_added_host(datum/mind/host_mind) + var/datum/atom_hud/antag/hosthud = GLOB.huds[ANTAG_HUD_BORER] //Invisible to self + hosthud.self_visible = FALSE + hosthud.join_hud(host_mind.current) + set_antag_hud(host_mind.current, "hudbrainworm") + +/datum/game_mode/proc/update_borer_icons_removed_host(datum/mind/host_mind) + var/datum/atom_hud/antag/hosthud = GLOB.huds[ANTAG_HUD_BORER] //Invisible to self + hosthud.self_visible = FALSE //Probably not needed as we're deleting? + hosthud.leave_hud(host_mind.current) + set_antag_hud(host_mind.current, null)