Cultists now get a new sacrifice target when the old one goes to cryo

fixed the game not reassigning sacrifice targets who cryo. No longer lists the objective as gibbed (failed), instead assigns a new one
This commit is contained in:
SteelSlayer
2019-07-19 20:36:35 -04:00
parent 4b3efa1ae1
commit 5e1b22060e
3 changed files with 13 additions and 1 deletions
+1 -1
View File
@@ -29,7 +29,7 @@ var/global/list/all_cults = list()
return 1
/proc/is_sacrifice_target(datum/mind/mind)
if(istype(SSticker.mode.name, "cult"))
if(SSticker.mode.name == "cult")
var/datum/game_mode/cult/cult_mode = SSticker.mode
if(mind == cult_mode.sacrifice_target)
return 1
@@ -163,6 +163,16 @@
possible_sac_targets += player.mind
return possible_sac_targets
// Handles the updating of sacrifice objectives after the sacrifice target goes to cryo and ghosts
/datum/game_mode/cult/proc/update_sac_objective(previous_target, previous_role)
for(var/datum/mind/cult_mind in cult)
if(cult_mind)
var/updated_memory = cult_mind.memory
updated_memory = replacetext("[cult_mind.memory]", "[previous_target]", "[sacrifice_target]")
updated_memory = replacetext("[updated_memory]", "[previous_role]", "[sacrifice_target.assigned_role]")
cult_mind.memory = updated_memory
/datum/game_mode/cult/proc/pick_objective()
var/list/possible_objectives = list()
+2
View File
@@ -371,6 +371,8 @@
for(var/datum/mind/H in SSticker.mode.cult)
if(H.current)
to_chat(H.current, "<span class='danger'>[SSticker.cultdat.entity_name]</span> murmurs, <span class='cultlarge'>[occupant] is beyond your reach. Sacrifice [cult_mode.sacrifice_target.current] instead...</span></span>")
H.current << 'sound/ambience/alarm4.ogg'
cult_mode.update_sac_objective(occupant.mind, occupant.mind.assigned_role)
else
cult_mode.bypass_phase()