Recounts rise_number and related variables every once in a while (#27393)

* Recounts cultists every once in a while

* Update code/modules/antagonists/cult/team_cult.dm

Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com>
Signed-off-by: DGamerL <108773801+DGamerL@users.noreply.github.com>

* Remove old check

---------

Signed-off-by: DGamerL <108773801+DGamerL@users.noreply.github.com>
Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com>
This commit is contained in:
DGamerL
2024-11-23 13:51:53 +00:00
committed by GitHub
co-authored by Contrabang
parent c50ff7ce9c
commit 9ab117a1a3
+11 -2
View File
@@ -31,14 +31,23 @@ RESTRICT_TYPE(/datum/team/cult)
/// Boolean that prevents all_members_timer from being called multiple times
var/is_in_transition = FALSE
/// Timer until we do a recount of cultist members
var/recount_timer
/datum/team/cult/New(list/starting_members)
. = ..()
recount_timer = addtimer(CALLBACK(src, PROC_REF(cult_threshold_check)), 5 MINUTES, TIMER_STOPPABLE|TIMER_DELETE_ME|TIMER_LOOP)
/datum/team/cult/Destroy(force, ...)
deltimer(recount_timer)
return ..()
/datum/team/cult/create_team(list/starting_members)
cult_threshold_check() // Set this ALWAYS before any check_cult_size check, or
. = ..()
objective_holder.add_objective(/datum/objective/servecult)
addtimer(CALLBACK(src, PROC_REF(cult_threshold_check)), 2 MINUTES) // Check again in 2 minutes for latejoiners
cult_status = NARSIE_DEMANDS_SACRIFICE
create_next_sacrifice()