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.
+3 -3
View File
@@ -89,7 +89,7 @@
/datum/game_mode/proc/post_setup(report) //Gamemodes can override the intercept report. Passing TRUE as the argument will force a report.
if(!report)
report = !CONFIG_GET(flag/no_intercept_report)
addtimer(CALLBACK(GLOBAL_PROC, .proc/display_roundstart_logout_report), ROUNDSTART_LOGOUT_REPORT_TIME)
addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(display_roundstart_logout_report)), ROUNDSTART_LOGOUT_REPORT_TIME)
if(prob(20)) //cit-change
flipseclevel = TRUE
@@ -100,7 +100,7 @@
// delay = (delay SECONDS)
// else
// delay = (4 MINUTES) //default to 4 minutes if the delay isn't defined.
// addtimer(CALLBACK(GLOBAL_PROC, .proc/reopen_roundstart_suicide_roles), delay)
// addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(reopen_roundstart_suicide_roles)), delay)
if(SSdbcore.Connect())
var/list/to_set = list()
@@ -120,7 +120,7 @@
query_round_game_mode.Execute()
qdel(query_round_game_mode)
if(report)
addtimer(CALLBACK(src, .proc/send_intercept, 0), rand(waittime_l, waittime_h))
addtimer(CALLBACK(src, PROC_REF(send_intercept), 0), rand(waittime_l, waittime_h))
generate_station_goals()
gamemode_ready = TRUE
return TRUE