From 6eac1092bb5245fb06631ecadba676b690c30696 Mon Sep 17 00:00:00 2001 From: Aurorablade Date: Tue, 15 Dec 2015 22:27:30 -0500 Subject: [PATCH] hate the mask of narnar --- code/game/data_huds.dm | 4 +- code/game/gamemodes/changeling/changeling.dm | 3 +- code/game/gamemodes/cult/cult.dm | 91 -------------------- code/modules/mob/dead/observer/observer.dm | 14 +-- code/modules/mob/transform_procs.dm | 8 +- 5 files changed, 16 insertions(+), 104 deletions(-) diff --git a/code/game/data_huds.dm b/code/game/data_huds.dm index 1f44e74629e..ce96bca33e0 100644 --- a/code/game/data_huds.dm +++ b/code/game/data_huds.dm @@ -27,9 +27,7 @@ return 1 /datum/atom_hud/data/human/medical/basic/add_to_single_hud(mob/M, mob/living/carbon/H) - if(istype(M,/mob/dead/observer)) - return 1 - if(check_sensors(H)) + if(check_sensors(H) || istype(M,/mob/dead/observer) ) ..() /datum/atom_hud/data/human/medical/basic/proc/update_suit_sensors(mob/living/carbon/H) diff --git a/code/game/gamemodes/changeling/changeling.dm b/code/game/gamemodes/changeling/changeling.dm index b5edebc95bf..cfd7abf254d 100644 --- a/code/game/gamemodes/changeling/changeling.dm +++ b/code/game/gamemodes/changeling/changeling.dm @@ -136,7 +136,6 @@ var/list/possible_changeling_IDs = list("Alpha","Beta","Gamma","Delta","Epsilon" changeling.current << "\red You are a changeling!" changeling.current << "\red Use say \":g message\" to communicate with your fellow changelings. Remember: you get all of their absorbed DNA if you absorb them." changeling.current << "You must complete the following tasks:" - set_antag_hud(changeling, "hudchangeling") if (changeling.current.mind) if (changeling.current.mind.assigned_role == "Clown") changeling.current << "You have evolved beyond your clownish nature, allowing you to wield weapons without harming yourself." @@ -146,6 +145,8 @@ var/list/possible_changeling_IDs = list("Alpha","Beta","Gamma","Delta","Epsilon" for(var/datum/objective/objective in changeling.objectives) changeling.current << "Objective #[obj_count]: [objective.explanation_text]" obj_count++ + + set_antag_hud(changeling.current, "hudchangeling") return /*/datum/game_mode/changeling/check_finished() diff --git a/code/game/gamemodes/cult/cult.dm b/code/game/gamemodes/cult/cult.dm index f7d7660b7fb..7208213d903 100644 --- a/code/game/gamemodes/cult/cult.dm +++ b/code/game/gamemodes/cult/cult.dm @@ -211,97 +211,6 @@ M << "[cult_mind.current] looks like they just reverted to their old faith!" -/datum/game_mode/proc/reset_cult_icons_for_cultist(var/datum/mind/target) - if(target.current) - if(target.current.client) - remove_all_cult_icons(target) - for(var/datum/mind/cultist in cult) - if(cultist.current) - add_cult_icon(target.current.client,cultist.current) - - -/datum/game_mode/proc/reset_cult_icons_for_spirit(mob/spirit/target) - if (target.client) - remove_all_cult_icons(target) - for(var/datum/mind/cultist in cult) - if(cultist.current) - add_cult_icon(target.client,cultist.current) - - -/datum/game_mode/proc/add_cult_icon(client/target_client,mob/target_mob) - var/I = image('icons/mob/mob.dmi', loc = target_mob, icon_state = "cult") - target_client.images += I - - -/datum/game_mode/proc/remove_cult_icon(client/target_client,mob/target_mob) - for(var/image/I in target_client.images) - if(I.icon_state == "cult" && I.loc == target_mob) - qdel(I) - - -/datum/game_mode/proc/remove_all_cult_icons_from_client(client/target) - for(var/image/I in target.images) - if(I.icon_state == "cult") - qdel(I) - - -/datum/game_mode/proc/remove_all_cult_icons(target) - var/datum/mind/cultist = target - if(istype(cultist)) - if(cultist.current) - if(cultist.current.client) - remove_all_cult_icons_from_client(cultist.current.client) - return TRUE - var/mob/spirit/currentSpirit = target - if(istype(currentSpirit)) - if (currentSpirit.client) - remove_all_cult_icons_from_client(currentSpirit.client) - return TRUE - return FALSE - - -/datum/game_mode/proc/add_cult_icon_to_spirit(mob/spirit/currentSpirit,datum/mind/cultist) - if(!istype(currentSpirit) || !istype(cultist)) - return FALSE - if (currentSpirit.client) - if (cultist.current) - add_cult_icon(currentSpirit.client,cultist.current) - - -/datum/game_mode/proc/add_cult_icon_to_cultist(datum/mind/first_cultist,datum/mind/second_cultist) - if(first_cultist.current && second_cultist.current) - if(first_cultist.current.client) - add_cult_icon(first_cultist.current.client, second_cultist.current) - - -/datum/game_mode/proc/remove_cult_icon_from_cultist(datum/mind/first_cultist,datum/mind/second_cultist) - if(first_cultist.current && second_cultist.current) - if(first_cultist.current.client) - remove_cult_icon(first_cultist.current.client,second_cultist.current) - - -/datum/game_mode/proc/remove_cult_icon_from_spirit(mob/spirit/currentSpirit,datum/mind/cultist) - if(!istype(currentSpirit) || !istype(cultist)) - return FALSE - if (currentSpirit.client) - if (cultist.current) - remove_cult_icon(currentSpirit.client,cultist.current) - - -/datum/game_mode/proc/cult_icon_pair_link(datum/mind/first_cultist,datum/mind/second_cultist) - if (!istype(first_cultist) || !istype(second_cultist)) - return 0 - add_cult_icon_to_cultist(first_cultist,second_cultist) - add_cult_icon_to_cultist(second_cultist,first_cultist) - - -/datum/game_mode/proc/cult_icon_pair_unlink(datum/mind/first_cultist,datum/mind/second_cultist) - if (!istype(first_cultist) || !istype(second_cultist)) - return 0 - remove_cult_icon_from_cultist(first_cultist,second_cultist) - remove_cult_icon_from_cultist(second_cultist,first_cultist) - - /datum/game_mode/proc/update_cult_icons_added(datum/mind/cult_mind) //spawn(0) // for(var/datum/mind/cultist in cult) diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index ea37bcee9fd..86e280aff1f 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -253,11 +253,6 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp return 1 -/mob/dead/observer/proc/show_me_the_hud(hud_index) - var/datum/atom_hud/H = huds[hud_index] - H.add_hud_to(src) - data_hud_seen = hud_index - //src << "Datahud"//debug print /mob/dead/observer/verb/toggle_medHUD() set category = "Ghost" @@ -296,6 +291,13 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp if(!M.has_enabled_antagHUD && !check_rights(R_ADMIN|R_MOD,0)) M.has_enabled_antagHUD = 1 + + var/datum/atom_hud/A = huds[SPECIALROLE_HUD] + if(M.has_enabled_antagHUD || check_rights(R_ADMIN|R_MOD)) + for(var/datum/atom_hud/H in huds) + if(istype(H, /datum/atom_hud/antag)) + (usr in A.hudusers) ? H.add_hud_to(usr) : H.remove_hud_from(usr) +/* if(M.antagHUD) M.antagHUD = 0 for(var/datum/atom_hud/H in huds) @@ -308,7 +310,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp if(istype(H, /datum/atom_hud/antag)) H.add_hud_to(usr) usr << "You toggled your antag HUD On." - +*/ /mob/dead/observer/proc/dead_tele(A in ghostteleportlocs) set category = "Ghost" diff --git a/code/modules/mob/transform_procs.dm b/code/modules/mob/transform_procs.dm index eb59f6b9aca..90a9152df21 100644 --- a/code/modules/mob/transform_procs.dm +++ b/code/modules/mob/transform_procs.dm @@ -97,6 +97,7 @@ if (should_gib) spawn(0) + ticker.mode.update_cult_icons_removed(src.mind.current) src.gib() // gib the body else spawn(0)//To prevent the proc from returning null. @@ -104,6 +105,7 @@ "[src] disappears into the shadows, never to be seen again.", \ "You disappear into the shadows, never to be seen again.", \ "You hear strange noise, you can't quite place it.") + ticker.mode.update_cult_icons_removed(src.mind.current) qdel(src) new_spirit << "You are a Mask of Nar'sie now. You are a tiny fragment of the unknowable entity that is the god." @@ -113,7 +115,7 @@ // let spirits identify cultists if(ticker.mode) - ticker.mode.reset_cult_icons_for_spirit(new_spirit) + ticker.mode.update_cult_icons_added(new_spirit.mind.current) // highlander test there_can_be_only_one_mask(new_spirit) @@ -320,7 +322,7 @@ /mob/proc/safe_respawn(var/MP) if(!MP) - return 0 + return 0 if(ispath(MP, /mob/living/simple_animal/pet/cat)) return 1 @@ -347,7 +349,7 @@ if(ispath(MP, /mob/living/simple_animal/borer) && !jobban_isbanned(src, "alien") && !jobban_isbanned(src, "Syndicate")) return 1 - + if(ispath(MP, /mob/living/simple_animal/diona) && !jobban_isbanned(src, "Dionaea")) return 1