From 21665239e09fd1e8a53e8619842622cab780e812 Mon Sep 17 00:00:00 2001 From: Kyep Date: Tue, 28 Mar 2017 21:51:30 -0700 Subject: [PATCH 1/3] Fixes cults not getting new sac target when target cryos --- code/game/gamemodes/cult/cult_objectives.dm | 27 +++++++++++---------- code/game/machinery/cryopod.dm | 14 +++++++++++ 2 files changed, 28 insertions(+), 13 deletions(-) diff --git a/code/game/gamemodes/cult/cult_objectives.dm b/code/game/gamemodes/cult/cult_objectives.dm index 2fe00023c20..4b30bbd37b0 100644 --- a/code/game/gamemodes/cult/cult_objectives.dm +++ b/code/game/gamemodes/cult/cult_objectives.dm @@ -145,6 +145,19 @@ message_admins("Last Cult Objective: [last_objective]") log_admin("Last Cult Objective: [last_objective]") +/datum/game_mode/cult/proc/get_possible_sac_targets() + var/list/possible_sac_targets = list() + for(var/mob/living/carbon/human/player in player_list) + if(player.mind && !is_convertable_to_cult(player.mind) && (player.stat != DEAD)) + possible_sac_targets += player.mind + if(!possible_sac_targets.len) + //There are no living Unconvertables on the station. Looking for a Sacrifice Target among the ordinary crewmembers + for(var/mob/living/carbon/human/player in player_list) + if(is_secure_level(player.z)) //We can't sacrifice people that are on the centcom z-level + continue + if(player.mind && !(player.mind in cult) && (player.stat != DEAD))//make DAMN sure they are not dead + possible_sac_targets += player.mind + return possible_sac_targets /datum/game_mode/cult/proc/pick_objective() var/list/possible_objectives = list() @@ -153,19 +166,7 @@ possible_objectives |= "bloodspill" if(!sacrificed.len) - var/list/possible_targets = list() - for(var/mob/living/carbon/human/player in player_list) - if(player.mind && !is_convertable_to_cult(player.mind) && (player.stat != DEAD)) - possible_targets += player.mind - - if(!possible_targets.len) - //There are no living Unconvertables on the station. Looking for a Sacrifice Target among the ordinary crewmembers - for(var/mob/living/carbon/human/player in player_list) - if(is_secure_level(player.z)) //We can't sacrifice people that are on the centcom z-level - continue - if(player.mind && !(player.mind in cult) && (player.stat != DEAD))//make DAMN sure they are not dead - possible_targets += player.mind - + var/list/possible_targets = get_possible_sac_targets() if(possible_targets.len > 0) sacrifice_target = pick(possible_targets) possible_objectives |= "sacrifice" diff --git a/code/game/machinery/cryopod.dm b/code/game/machinery/cryopod.dm index 48793165d00..82ef79b177e 100644 --- a/code/game/machinery/cryopod.dm +++ b/code/game/machinery/cryopod.dm @@ -324,6 +324,20 @@ else W.loc = loc + // Skip past any cult sacrifice objective using this person + if(GAMEMODE_IS_CULT && is_sacrifice_target(occupant.mind)) + var/datum/game_mode/cult/cult_mode = ticker.mode + var/list/p_s_t = cult_mode.get_possible_sac_targets() + if(p_s_t.len) + cult_mode.sacrifice_target = pick(p_s_t) + for(var/datum/mind/H in ticker.mode.cult) + if(H.current) + to_chat(H.current, "[ticker.mode.cultdat.entity_name] murmurs, Sacrifice [cult_mode.sacrifice_target]...") + for(var/mob/dead/observer/O in player_list) + to_chat(O, "[ticker.mode.cultdat.entity_name] murmurs, Sacrifice [cult_mode.sacrifice_target]...") + else + cult_mode.bypass_phase() + //Update any existing objectives involving this mob. for(var/datum/objective/O in all_objectives) // We don't want revs to get objectives that aren't for heads of staff. Letting From c18bd83e568a3cd7b15877b714f7e3c3e4c59d0d Mon Sep 17 00:00:00 2001 From: Kyep Date: Wed, 29 Mar 2017 00:17:49 -0700 Subject: [PATCH 2/3] Now tells cult that old sac target is no longer valid. --- code/game/machinery/cryopod.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/game/machinery/cryopod.dm b/code/game/machinery/cryopod.dm index 82ef79b177e..c3df6426433 100644 --- a/code/game/machinery/cryopod.dm +++ b/code/game/machinery/cryopod.dm @@ -332,9 +332,9 @@ cult_mode.sacrifice_target = pick(p_s_t) for(var/datum/mind/H in ticker.mode.cult) if(H.current) - to_chat(H.current, "[ticker.mode.cultdat.entity_name] murmurs, Sacrifice [cult_mode.sacrifice_target]...") + to_chat(H.current, "[ticker.mode.cultdat.entity_name] murmurs, [occupant] is beyond your reach. Sacrifice [cult_mode.sacrifice_target.current] instead...") for(var/mob/dead/observer/O in player_list) - to_chat(O, "[ticker.mode.cultdat.entity_name] murmurs, Sacrifice [cult_mode.sacrifice_target]...") + to_chat(O, "[ticker.mode.cultdat.entity_name] murmurs, [occupant] is beyond your reach. Sacrifice [cult_mode.sacrifice_target.current] instead...") else cult_mode.bypass_phase() From 96bbd9931e4dcc829e30ffe6810427f0eccf963b Mon Sep 17 00:00:00 2001 From: Kyep Date: Sat, 1 Apr 2017 16:08:26 -0700 Subject: [PATCH 3/3] Stops telling ghosts about target changes --- code/game/machinery/cryopod.dm | 2 -- 1 file changed, 2 deletions(-) diff --git a/code/game/machinery/cryopod.dm b/code/game/machinery/cryopod.dm index c3df6426433..d5ca725c9d2 100644 --- a/code/game/machinery/cryopod.dm +++ b/code/game/machinery/cryopod.dm @@ -333,8 +333,6 @@ for(var/datum/mind/H in ticker.mode.cult) if(H.current) to_chat(H.current, "[ticker.mode.cultdat.entity_name] murmurs, [occupant] is beyond your reach. Sacrifice [cult_mode.sacrifice_target.current] instead...") - for(var/mob/dead/observer/O in player_list) - to_chat(O, "[ticker.mode.cultdat.entity_name] murmurs, [occupant] is beyond your reach. Sacrifice [cult_mode.sacrifice_target.current] instead...") else cult_mode.bypass_phase()