From cd22f91ddf1e51559afce0ebcf1f0541fde2d5e3 Mon Sep 17 00:00:00 2001 From: Jordan Brown Date: Sat, 9 Jan 2021 22:04:58 -0500 Subject: [PATCH] Fix startup double runtimes again (#56047) Prevents runtimes that occur before /world/New is called from runtiming in /world/Error due to lack of the config being loaded. --- code/controllers/configuration/configuration.dm | 5 +++++ code/modules/error_handler/error_viewer.dm | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/code/controllers/configuration/configuration.dm b/code/controllers/configuration/configuration.dm index e59548399a1..55930cfa600 100644 --- a/code/controllers/configuration/configuration.dm +++ b/code/controllers/configuration/configuration.dm @@ -21,6 +21,9 @@ var/motd var/policy + /// If the configuration is loaded + var/loaded = FALSE + var/static/regex/ic_filter_regex /datum/controller/configuration/proc/admin_reload() @@ -53,6 +56,8 @@ LoadPolicy() LoadChatFilter() + loaded = TRUE + if (Master) Master.OnConfigLoad() diff --git a/code/modules/error_handler/error_viewer.dm b/code/modules/error_handler/error_viewer.dm index adcbb8fb57f..dd0089245ae 100644 --- a/code/modules/error_handler/error_viewer.dm +++ b/code/modules/error_handler/error_viewer.dm @@ -118,7 +118,7 @@ GLOBAL_DATUM(error_cache, /datum/error_viewer/error_cache) var/const/viewtext = "\[view]" // Nesting these in other brackets went poorly //log_debug("Runtime in [e.file], line [e.line]: [html_encode(e.name)] [error_entry.make_link(viewtext)]") var/err_msg_delay - if(config) + if(config?.loaded) err_msg_delay = CONFIG_GET(number/error_msg_delay) else var/datum/config_entry/CE = /datum/config_entry/number/error_msg_delay