From 4998b7cfa1883cea121a2926993298bee149859c Mon Sep 17 00:00:00 2001 From: Ghommie Date: Wed, 22 May 2019 18:43:26 +0200 Subject: [PATCH] Actually, the cult team should process it instead. Got you covered, badmins spawning cult on other modes. --- code/game/gamemodes/cult/cult.dm | 16 ------------- code/modules/antagonists/cult/cult.dm | 24 +++++++++++++++++++ .../code/game/machinery/cryopod.dm | 7 ------ 3 files changed, 24 insertions(+), 23 deletions(-) diff --git a/code/game/gamemodes/cult/cult.dm b/code/game/gamemodes/cult/cult.dm index c0ebc1c63a..7b492e3a95 100644 --- a/code/game/gamemodes/cult/cult.dm +++ b/code/game/gamemodes/cult/cult.dm @@ -97,22 +97,6 @@ main_cult = C.cult_team ..() -/datum/game_mode/cult/process() - if(finished) - return - var/datum/objective/sacrifice/sac_objective = locate() in main_cult.objectives - if(!sac_objective || sac_objective.check_completion()) - return - var/datum/mind/sacrificial = sac_objective.get_target() - var/mob/living/t_current = sacrificial.current - if(!sacrificial || !sacrificial.current) //target is gone for good but not sacced. - main_cult.sort_sacrifice(TRUE) - return - if(QDELETED(sac_objective.target_current) || sac_objective.target_current != t_current) //target is now a different mob (monkey, simple mob) - sac_objective.sac_image = t_current.get_sac_image() - sac_objective.target_current = t_current - sac_objective.update_explanation_text() - /datum/game_mode/proc/add_cultist(datum/mind/cult_mind, stun , equip = FALSE) //BASE if (!istype(cult_mind)) return FALSE diff --git a/code/modules/antagonists/cult/cult.dm b/code/modules/antagonists/cult/cult.dm index c4d696ab59..9451012a04 100644 --- a/code/modules/antagonists/cult/cult.dm +++ b/code/modules/antagonists/cult/cult.dm @@ -242,6 +242,30 @@ var/cult_risen = FALSE var/cult_ascendent = FALSE +/datum/team/cult/New() + . = ..() + START_PROCESSING(SSprocessing, src) + +/datum/team/cult/Destroy() + STOP_PROCESSING(SSprocessing, src) + return ..() + +/datum/team/cult/process() + if(SSticker.current_state == GAME_STATE_FINISHED) + return + var/datum/objective/sacrifice/sac_objective = locate() in objectives + if(!sac_objective || sac_objective.check_completion()) + return + var/datum/mind/sacrificial = sac_objective.get_target() + var/mob/living/sac_current = sacrificial.current + if(!sacrificial || !sac_current) //target is gone for good but not sacrified. + sort_sacrifice(TRUE) + return + if(QDELETED(sac_objective.target_current) || sac_objective.target_current != sac_current) //target is now a different mob (monkey, simple mob) + sac_objective.sac_image = sac_current.get_sac_image() + sac_objective.target_current = sac_current + sac_objective.update_explanation_text() + /datum/team/cult/proc/check_size() if(cult_ascendent) return diff --git a/modular_citadel/code/game/machinery/cryopod.dm b/modular_citadel/code/game/machinery/cryopod.dm index 095641f1b4..15e7d34c65 100644 --- a/modular_citadel/code/game/machinery/cryopod.dm +++ b/modular_citadel/code/game/machinery/cryopod.dm @@ -246,13 +246,6 @@ /obj/machinery/cryopod/proc/despawn_occupant() var/mob/living/mob_occupant = occupant - if(istype(SSticker.mode, /datum/game_mode/cult)) - var/datum/game_mode/cult/M = SSticker.mode - var/datum/team/cult/C = M.main_cult - var/datum/objective/sacrifice/S = locate() in C.objectives - if(S.target == mob_occupant.mind) - C.sort_sacrifice(TRUE) - //Update any existing objectives involving this mob. for(var/datum/objective/O in GLOB.objectives) // We don't want revs to get objectives that aren't for heads of staff. Letting