<commit_before>/datum/controller/configuration
	name = "Configuration"

	var/directory = "config"

	var/hiding_entries_by_type = TRUE	//Set for readability, admins can set this to FALSE if they want to debug it
	var/list/entries
	var/list/entries_by_type

	var/list/maplist
	var/datum/map_config/defaultmap

	var/list/modes			// allowed modes
	var/list/gamemode_cache
	var/list/votable_modes		// votable modes
	var/list/mode_names
	var/list/mode_reports
	var/list/mode_false_report_weight

	var/motd

/datum/controller/configuration/proc/Load()
	if(entries)
		CRASH("[THIS_PROC_TYPE_WEIRD] called more than once!")
	InitEntries()
	LoadModes()
	if(fexists("[directory]/config.txt") && LoadEntries("config.txt") <= 1)
		log_config("No $include directives found in config.txt! Loading legacy game_options/dbconfig/comms files...")
		LoadEntries("game_options.txt")
		LoadEntries("dbconfig.txt")
		LoadEntries("comms.txt")<commit_msg>Legacy config warning only happens if any legacy configs are present (#38421)<commit_after>/datum/controller/configuration
	name = "Configuration"

	var/directory = "config"

	var/hiding_entries_by_type = TRUE	//Set for readability, admins can set this to FALSE if they want to debug it
	var/list/entries
	var/list/entries_by_type

	var/list/maplist
	var/datum/map_config/defaultmap

	var/list/modes			// allowed modes
	var/list/gamemode_cache
	var/list/votable_modes		// votable modes
	var/list/mode_names
	var/list/mode_reports
	var/list/mode_false_report_weight

	var/motd

/datum/controller/configuration/proc/Load()
	if(entries)
		CRASH("[THIS_PROC_TYPE_WEIRD] called more than once!")
	InitEntries()
	LoadModes()
	if(fexists("[directory]/config.txt") && LoadEntries("config.txt") <= 1)
		var/list/legacy_configs = list("game_options.txt", "dbconfig.txt", "comms.txt")
		for(var/I in legacy_configs)
			if(fexists("[directory]/[I]"))
				log_config("No $include directives found in config.txt! Loading legacy [legacy_configs.Join("/")] files...")
				for(var/J in legacy_configs)
					LoadEntries(J)
				break
{'fraction_non_alphanumeric': 0.12181996086105674, 'fraction_numerical': 0.003424657534246575, 'mean_word_length': 4.77683615819209, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3010043', 'n_tokens_mistral': 757, 'n_tokens_neox': 708, 'n_words': 144}