From 9c70fa213627a7fcb5d8bbe6ae0434fbd75c708b Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Wed, 24 Jun 2020 20:40:57 -0700 Subject: [PATCH] Update configuration.dm --- code/controllers/configuration/configuration.dm | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/code/controllers/configuration/configuration.dm b/code/controllers/configuration/configuration.dm index 8f34901d46..31431ddab9 100644 --- a/code/controllers/configuration/configuration.dm +++ b/code/controllers/configuration/configuration.dm @@ -104,7 +104,9 @@ var/list/lines = world.file2list("[directory]/[filename]") var/list/_entries = entries var/list/postload_required = list() + var/linenumber = 0 for(var/L in lines) + linenumber++ L = trim(L) if(!L) continue @@ -132,7 +134,7 @@ if(entry == "$include") if(!value) - log_config("Warning: Invalid $include directive: [value]") + log_config("LINE [linenumber]: Invalid $include directive: [value]") else LoadEntries(value, stack) ++. @@ -140,7 +142,7 @@ var/datum/config_entry/E = _entries[entry] if(!E) - log_config("Unknown setting in configuration: '[entry]'") + log_config("LINE [linenumber]: Unknown setting: '[entry]'") continue if(lockthis) @@ -150,7 +152,7 @@ var/datum/config_entry/new_ver = entries_by_type[E.deprecated_by] var/new_value = E.DeprecationUpdate(value) var/good_update = istext(new_value) - log_config("Entry [entry] is deprecated and will be removed soon. Migrate to [new_ver.name]![good_update ? " Suggested new value is: [new_value]" : ""]") + log_config("LINE [linenumber]: [entry] is deprecated and will be removed soon. Migrate to [new_ver.name]![good_update ? " Suggested new value is: [new_value]" : ""]") if(!warned_deprecated_configs) addtimer(CALLBACK(GLOBAL_PROC, /proc/message_admins, "This server is using deprecated configuration settings. Please check the logs and update accordingly."), 0) warned_deprecated_configs = TRUE @@ -162,10 +164,10 @@ var/validated = E.ValidateAndSet(value, TRUE) if(!validated) - log_config("Failed to validate setting \"[value]\" for [entry]") + log_config("LINE [linenumber]: Failed to validate setting \"[value]\" for [entry]") else if(E.modified && !E.dupes_allowed) - log_config("Duplicate setting for [entry] ([value], [E.resident_file]) detected! Using latest.") + log_config("LINE [linenumber]: Duplicate setting for [entry] ([value], [E.resident_file]) detected! Using latest.") if(E.postload_required) postload_required[E] = TRUE