Add $reset directive to config processor for setting a config entry to default value (#59874)

added this so that the value of INTERVIEW_QUESTIONS (and subsequently any other string list) can be overridden without much issue by additional config files.

i also changed the functionality of default on config_entry as it seemed to be counterintuitive to have it be set to the initial value of the config_entry. in my opinion this should be a compile-time default, and so i've refactored the code such that default now contains the actual default, and the config_entry_value is set at intialization.
This commit is contained in:
Bobbahbrown
2021-06-30 16:20:57 +12:00
committed by GitHub
parent 3542c43c5a
commit 634049e1e9
7 changed files with 160 additions and 130 deletions
+1 -1
View File
@@ -122,7 +122,7 @@ GLOBAL_DATUM(error_cache, /datum/error_viewer/error_cache)
err_msg_delay = CONFIG_GET(number/error_msg_delay)
else
var/datum/config_entry/CE = /datum/config_entry/number/error_msg_delay
err_msg_delay = initial(CE.config_entry_value)
err_msg_delay = initial(CE.default)
error_source.next_message_at = world.time + err_msg_delay
/datum/error_viewer/error_source