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..d5ca725c9d2 100644 --- a/code/game/machinery/cryopod.dm +++ b/code/game/machinery/cryopod.dm @@ -324,6 +324,18 @@ 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, [occupant] is beyond your reach. Sacrifice [cult_mode.sacrifice_target.current] instead...") + 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