This commit is contained in:
SandPoot
2023-11-29 22:40:13 -03:00
parent c9b0dedf77
commit 40f1d7401d
704 changed files with 1766 additions and 1743 deletions
+2 -2
View File
@@ -421,7 +421,7 @@ GLOBAL_VAR_INIT(dynamic_forced_threat_level, -1)
/datum/game_mode/dynamic/post_setup(report)
for(var/datum/dynamic_ruleset/roundstart/rule in executed_rules)
rule.candidates.Cut() // The rule should not use candidates at this point as they all are null.
addtimer(CALLBACK(src, /datum/game_mode/dynamic/.proc/execute_roundstart_rule, rule), rule.delay)
addtimer(CALLBACK(src, TYPE_PROC_REF(/datum/game_mode/dynamic, execute_roundstart_rule), rule), rule.delay)
..()
@@ -740,7 +740,7 @@ GLOBAL_VAR_INIT(dynamic_forced_threat_level, -1)
if (forced_latejoin_rule.ready(TRUE))
if (!forced_latejoin_rule.repeatable)
latejoin_rules = remove_from_list(latejoin_rules, forced_latejoin_rule.type)
addtimer(CALLBACK(src, /datum/game_mode/dynamic/.proc/execute_midround_latejoin_rule, forced_latejoin_rule), forced_latejoin_rule.delay)
addtimer(CALLBACK(src, TYPE_PROC_REF(/datum/game_mode/dynamic, execute_midround_latejoin_rule), forced_latejoin_rule), forced_latejoin_rule.delay)
forced_latejoin_rule = null
else if (latejoin_injection_cooldown < world.time && prob(get_injection_chance()))
@@ -1,5 +1,5 @@
/datum/game_mode/dynamic/proc/setup_hijacking()
RegisterSignal(SSdcs, COMSIG_GLOB_PRE_RANDOM_EVENT, .proc/on_pre_random_event)
RegisterSignal(SSdcs, COMSIG_GLOB_PRE_RANDOM_EVENT, PROC_REF(on_pre_random_event))
/datum/game_mode/dynamic/proc/on_pre_random_event(datum/source, datum/round_event_control/round_event_control)
SIGNAL_HANDLER
@@ -37,7 +37,7 @@
current_midround_rulesets = drafted_rules - rule
midround_injection_timer_id = addtimer(
CALLBACK(src, .proc/execute_midround_rule, rule), \
CALLBACK(src, PROC_REF(execute_midround_rule), rule), \
ADMIN_CANCEL_MIDROUND_TIME, \
TIMER_STOPPABLE, \
)
@@ -53,7 +53,7 @@
midround_injection_timer_id = null
if (!rule.repeatable)
midround_rules = remove_from_list(midround_rules, rule.type)
addtimer(CALLBACK(src, .proc/execute_midround_latejoin_rule, rule), rule.delay)
addtimer(CALLBACK(src, PROC_REF(execute_midround_latejoin_rule), rule), rule.delay)
/// Executes a random latejoin ruleset from the list of drafted rules.
/datum/game_mode/dynamic/proc/pick_latejoin_rule(list/drafted_rules)
@@ -62,7 +62,7 @@
return
if (!rule.repeatable)
latejoin_rules = remove_from_list(latejoin_rules, rule.type)
addtimer(CALLBACK(src, .proc/execute_midround_latejoin_rule, rule), rule.delay)
addtimer(CALLBACK(src, PROC_REF(execute_midround_latejoin_rule), rule), rule.delay)
return TRUE
/// Mainly here to facilitate delayed rulesets. All midround/latejoin rulesets are executed with a timered callback to this proc.