fixes issue with config loading
This commit is contained in:
@@ -267,7 +267,7 @@
|
||||
|
||||
if(M.config_tag)
|
||||
if(!(M.config_tag in modes)) // ensure each mode is added only once
|
||||
GLOB.world_game_log << "Adding game mode [M.name] ([M.config_tag]) to configuration."
|
||||
GLOB.config_error_log << "Adding game mode [M.name] ([M.config_tag]) to configuration."
|
||||
modes += M.config_tag
|
||||
mode_names[M.config_tag] = M.name
|
||||
probabilities[M.config_tag] = M.probability
|
||||
@@ -532,7 +532,7 @@
|
||||
if("error_msg_delay")
|
||||
error_msg_delay = text2num(value)
|
||||
else
|
||||
GLOB.world_game_log << "Unknown setting in configuration: '[name]'"
|
||||
GLOB.config_error_log << "Unknown setting in configuration: '[name]'"
|
||||
|
||||
else if(type == "game_options")
|
||||
switch(name)
|
||||
@@ -595,13 +595,13 @@
|
||||
if(mode_name in modes)
|
||||
continuous[mode_name] = 1
|
||||
else
|
||||
GLOB.world_game_log << "Unknown continuous configuration definition: [mode_name]."
|
||||
GLOB.config_error_log << "Unknown continuous configuration definition: [mode_name]."
|
||||
if("midround_antag")
|
||||
var/mode_name = lowertext(value)
|
||||
if(mode_name in modes)
|
||||
midround_antag[mode_name] = 1
|
||||
else
|
||||
GLOB.world_game_log << "Unknown midround antagonist configuration definition: [mode_name]."
|
||||
GLOB.config_error_log << "Unknown midround antagonist configuration definition: [mode_name]."
|
||||
if("midround_antag_time_check")
|
||||
midround_antag_time_check = text2num(value)
|
||||
if("midround_antag_life_check")
|
||||
@@ -617,9 +617,9 @@
|
||||
if(mode_name in modes)
|
||||
min_pop[mode_name] = text2num(mode_value)
|
||||
else
|
||||
GLOB.world_game_log << "Unknown minimum population configuration definition: [mode_name]."
|
||||
GLOB.config_error_log << "Unknown minimum population configuration definition: [mode_name]."
|
||||
else
|
||||
GLOB.world_game_log << "Incorrect minimum population configuration definition: [mode_name] [mode_value]."
|
||||
GLOB.config_error_log << "Incorrect minimum population configuration definition: [mode_name] [mode_value]."
|
||||
if("max_pop")
|
||||
var/pop_pos = findtext(value, " ")
|
||||
var/mode_name = null
|
||||
@@ -631,9 +631,9 @@
|
||||
if(mode_name in modes)
|
||||
max_pop[mode_name] = text2num(mode_value)
|
||||
else
|
||||
GLOB.world_game_log << "Unknown maximum population configuration definition: [mode_name]."
|
||||
GLOB.config_error_log << "Unknown maximum population configuration definition: [mode_name]."
|
||||
else
|
||||
GLOB.world_game_log << "Incorrect maximum population configuration definition: [mode_name] [mode_value]."
|
||||
GLOB.config_error_log << "Incorrect maximum population configuration definition: [mode_name] [mode_value]."
|
||||
if("shuttle_refuel_delay")
|
||||
shuttle_refuel_delay = text2num(value)
|
||||
if("show_game_type_odds")
|
||||
@@ -661,9 +661,9 @@
|
||||
if(prob_name in modes)
|
||||
probabilities[prob_name] = text2num(prob_value)
|
||||
else
|
||||
GLOB.world_game_log << "Unknown game mode probability configuration definition: [prob_name]."
|
||||
GLOB.config_error_log << "Unknown game mode probability configuration definition: [prob_name]."
|
||||
else
|
||||
GLOB.world_game_log << "Incorrect probability configuration definition: [prob_name] [prob_value]."
|
||||
GLOB.config_error_log << "Incorrect probability configuration definition: [prob_name] [prob_value]."
|
||||
|
||||
if("protect_roles_from_antagonist")
|
||||
protect_roles_from_antagonist = 1
|
||||
@@ -710,7 +710,7 @@
|
||||
// Value is in the form "LAWID,NUMBER"
|
||||
var/list/L = splittext(value, ",")
|
||||
if(L.len != 2)
|
||||
GLOB.world_game_log << "Invalid LAW_WEIGHT: " + t
|
||||
GLOB.config_error_log << "Invalid LAW_WEIGHT: " + t
|
||||
continue
|
||||
var/lawid = L[1]
|
||||
var/weight = text2num(L[2])
|
||||
@@ -767,7 +767,7 @@
|
||||
if ("mentor_legacy_system")
|
||||
mentor_legacy_system = 1
|
||||
// else
|
||||
// GLOB.world_game_log << "Adding game mode [M.name] ([M.config_tag]) to configuration."
|
||||
// GLOB.config_error_log << "Adding game mode [M.name] ([M.config_tag]) to configuration."
|
||||
|
||||
fps = round(fps)
|
||||
if(fps <= 0)
|
||||
@@ -821,7 +821,7 @@
|
||||
maplist[currentmap.map_name] = currentmap
|
||||
currentmap = null
|
||||
else
|
||||
GLOB.world_game_log << "Unknown command in map vote config: '[command]'"
|
||||
GLOB.config_error_log << "Unknown command in map vote config: '[command]'"
|
||||
|
||||
|
||||
/datum/configuration/proc/loadsql(filename)
|
||||
@@ -865,7 +865,7 @@
|
||||
if("feedback_tableprefix")
|
||||
global.sqlfdbktableprefix = value
|
||||
else
|
||||
GLOB.world_game_log << "Unknown setting in configuration: '[name]'"
|
||||
GLOB.config_error_log << "Unknown setting in configuration: '[name]'"
|
||||
|
||||
/datum/configuration/proc/pick_mode(mode_name)
|
||||
// I wish I didn't have to instance the game modes in order to look up
|
||||
|
||||
Reference in New Issue
Block a user