This commit is contained in:
LetterJay
2017-05-10 19:41:55 -05:00
parent 49990d0c05
commit 57372ebdb0
5 changed files with 43 additions and 72 deletions
+26 -26
View File
@@ -64,9 +64,9 @@
var/respawn = 1
var/guest_jobban = 1
var/usewhitelist = 0
var/inactivity_period = 3000 //time in ds until a player is considered inactive
var/afk_period = 6000 //time in ds until a player is considered afk and kickable
var/kick_inactive = FALSE //force disconnect for inactive players
var/inactivity_period = 3000 //time in ds until a player is considered inactive
var/afk_period = 6000 //time in ds until a player is considered afk and kickable
var/kick_inactive = FALSE //force disconnect for inactive players
var/load_jobs_from_txt = 0
var/automute_on = 0 //enables automuting/spam prevention
var/minimal_access_threshold = 0 //If the number of players is larger than this threshold, minimal access will be turned on.
@@ -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.world_game_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
@@ -289,7 +289,7 @@
GLOB.abandon_allowed = respawn
/datum/configuration/proc/load(filename, type = "config") //the type can also be game_options, in which case it uses a different switch. not making it separate to not copypaste code - Urist
var/list/Lines = world.file2list(filename)
var/list/Lines = world.file2list(filename)
for(var/t in Lines)
if(!t)
@@ -406,12 +406,12 @@
usewhitelist = TRUE
if("allow_metadata")
allow_Metadata = 1
if("inactivity_period")
inactivity_period = text2num(value) * 10 //documented as seconds in config.txt
if("afk_period")
afk_period = text2num(value) * 10 // ^^^
if("inactivity_period")
inactivity_period = text2num(value) * 10 //documented as seconds in config.txt
if("afk_period")
afk_period = text2num(value) * 10 // ^^^
if("kick_inactive")
kick_inactive = TRUE
kick_inactive = TRUE
if("load_jobs_from_txt")
load_jobs_from_txt = 1
if("forbid_singulo_possession")
@@ -532,7 +532,7 @@
if("error_msg_delay")
error_msg_delay = text2num(value)
else
GLOB.world_game_log << "Unknown setting in configuration: '[name]'"
GLOB.world_game_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.world_game_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.world_game_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.world_game_log << "Unknown minimum population configuration definition: [mode_name]."
else
GLOB.world_game_log << "Incorrect minimum population configuration definition: [mode_name] [mode_value]."
GLOB.world_game_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.world_game_log << "Unknown maximum population configuration definition: [mode_name]."
else
GLOB.world_game_log << "Incorrect maximum population configuration definition: [mode_name] [mode_value]."
GLOB.world_game_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.world_game_log << "Unknown game mode probability configuration definition: [prob_name]."
else
GLOB.world_game_log << "Incorrect probability configuration definition: [prob_name] [prob_value]."
GLOB.world_game_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.world_game_log << "Invalid LAW_WEIGHT: " + t
continue
var/lawid = L[1]
var/weight = text2num(L[2])
@@ -766,8 +766,8 @@
mentors_mobname_only = 1
if ("mentor_legacy_system")
mentor_legacy_system = 1
else
GLOB.diary << "Unknown setting in configuration: '[name]'"
// else
// GLOB.world_game_log << "Adding game mode [M.name] ([M.config_tag]) to configuration."
fps = round(fps)
if(fps <= 0)
@@ -775,7 +775,7 @@
/datum/configuration/proc/loadmaplist(filename)
var/list/Lines = world.file2list(filename)
var/list/Lines = world.file2list(filename)
var/datum/map_config/currentmap = null
for(var/t in Lines)
@@ -821,11 +821,11 @@
maplist[currentmap.map_name] = currentmap
currentmap = null
else
GLOB.world_game_log << "Unknown command in map vote config: '[command]'"
GLOB.world_game_log << "Unknown command in map vote config: '[command]'"
/datum/configuration/proc/loadsql(filename)
var/list/Lines = world.file2list(filename)
var/list/Lines = world.file2list(filename)
for(var/t in Lines)
if(!t)
continue
@@ -865,7 +865,7 @@
if("feedback_tableprefix")
global.sqlfdbktableprefix = value
else
GLOB.world_game_log << "Unknown setting in configuration: '[name]'"
GLOB.world_game_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
+2 -1
View File
@@ -42,6 +42,7 @@ SUBSYSTEM_DEF(blackbox)
msg_cargo = SSblackbox.msg_cargo
msg_other = SSblackbox.msg_other
feedback = SSblackbox.feedback
//no touchie
@@ -90,7 +91,7 @@ SUBSYSTEM_DEF(blackbox)
if (sqlrowlist != "")
sqlrowlist += ", " //a comma (,) at the start of the first row to insert will trigger a SQL error
sqlrowlist += "(null, Now(), [GLOB.round_id], \"[sanitizeSQL(FV.get_variable())]\", [FV.get_value()], \"[sanitizeSQL(FV.get_details())]\")"
sqlrowlist += "(null, Now(), [GLOB.round_id], \"[sanitizeSQL(FV.get_variable())]\", [FV.get_value()], \"[sanitizeSQL(FV.get_details())]\")"
if (sqlrowlist == "")
return