mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-11 07:03:30 +01:00
Merge pull request #6987 from Kyep/cult_sac_fix
Fixes cults not getting new sac target when target cryos
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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, "<span class='danger'>[ticker.mode.cultdat.entity_name]</span> murmurs, <span class='cultlarge'>[occupant] is beyond your reach. Sacrifice [cult_mode.sacrifice_target.current] instead...</span></span>")
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user