diff --git a/code/__defines/configuration_ch.dm b/code/__defines/configuration.dm
similarity index 100%
rename from code/__defines/configuration_ch.dm
rename to code/__defines/configuration.dm
diff --git a/code/__defines/rust_g.dm b/code/__defines/rust_g.dm
index 5404cebed9..e5805bc481 100644
--- a/code/__defines/rust_g.dm
+++ b/code/__defines/rust_g.dm
@@ -48,6 +48,48 @@
/// Gets the version of rust_g
/proc/rustg_get_version() return RUSTG_CALL(RUST_G, "get_version")()
+#define rustg_dmi_strip_metadata(fname) RUSTG_CALL(RUST_G, "dmi_strip_metadata")(fname)
+#define rustg_dmi_create_png(path, width, height, data) RUSTG_CALL(RUST_G, "dmi_create_png")(path, width, height, data)
+#define rustg_dmi_resize_png(path, width, height, resizetype) RUSTG_CALL(RUST_G, "dmi_resize_png")(path, width, height, resizetype)
+/**
+ * input: must be a path, not an /icon; you have to do your own handling if it is one, as icon objects can't be directly passed to rustg.
+ *
+ * output: json_encode'd list. json_decode to get a flat list with icon states in the order they're in inside the .dmi
+ */
+#define rustg_dmi_icon_states(fname) RUSTG_CALL(RUST_G, "dmi_icon_states")(fname)
+
+#define rustg_file_read(fname) RUSTG_CALL(RUST_G, "file_read")(fname)
+#define rustg_file_exists(fname) (RUSTG_CALL(RUST_G, "file_exists")(fname) == "true")
+#define rustg_file_write(text, fname) RUSTG_CALL(RUST_G, "file_write")(text, fname)
+#define rustg_file_append(text, fname) RUSTG_CALL(RUST_G, "file_append")(text, fname)
+#define rustg_file_get_line_count(fname) text2num(RUSTG_CALL(RUST_G, "file_get_line_count")(fname))
+#define rustg_file_seek_line(fname, line) RUSTG_CALL(RUST_G, "file_seek_line")(fname, "[line]")
+
+#ifdef RUSTG_OVERRIDE_BUILTINS
+#define file2text(fname) rustg_file_read("[fname]")
+#define text2file(text, fname) rustg_file_append(text, "[fname]")
+#endif
+
+/// Returns the git hash of the given revision, ex. "HEAD".
+#define rustg_git_revparse(rev) RUSTG_CALL(RUST_G, "rg_git_revparse")(rev)
+
+/**
+ * Returns the date of the given revision in the format YYYY-MM-DD.
+ * Returns null if the revision is invalid.
+ */
+#define rustg_git_commit_date(rev) RUSTG_CALL(RUST_G, "rg_git_commit_date")(rev)
+
+#define rustg_hash_string(algorithm, text) LIBCALL(RUST_G, "hash_string")(algorithm, text)
+#define rustg_hash_file(algorithm, fname) LIBCALL(RUST_G, "hash_file")(algorithm, fname)
+
+#define RUSTG_HASH_MD5 "md5"
+#define RUSTG_HASH_SHA1 "sha1"
+#define RUSTG_HASH_SHA256 "sha256"
+#define RUSTG_HASH_SHA512 "sha512"
+
+#ifdef RUSTG_OVERRIDE_BUILTINS
+#define md5(thing) (isfile(thing) ? rustg_hash_file(RUSTG_HASH_MD5, "[thing]") : rustg_hash_string(RUSTG_HASH_MD5, thing))
+#endif
/**
* Sets up the Aho-Corasick automaton with its default options.
@@ -107,36 +149,6 @@
#define rustg_cnoise_generate(percentage, smoothing_iterations, birth_limit, death_limit, width, height) \
RUSTG_CALL(RUST_G, "cnoise_generate")(percentage, smoothing_iterations, birth_limit, death_limit, width, height)
-#define rustg_dmi_strip_metadata(fname) RUSTG_CALL(RUST_G, "dmi_strip_metadata")(fname)
-#define rustg_dmi_create_png(path, width, height, data) RUSTG_CALL(RUST_G, "dmi_create_png")(path, width, height, data)
-#define rustg_dmi_resize_png(path, width, height, resizetype) RUSTG_CALL(RUST_G, "dmi_resize_png")(path, width, height, resizetype)
-/**
- * input: must be a path, not an /icon; you have to do your own handling if it is one, as icon objects can't be directly passed to rustg.
- *
- * output: json_encode'd list. json_decode to get a flat list with icon states in the order they're in inside the .dmi
- */
-#define rustg_dmi_icon_states(fname) RUSTG_CALL(RUST_G, "dmi_icon_states")(fname)
-
-#define rustg_file_read(fname) RUSTG_CALL(RUST_G, "file_read")(fname)
-#define rustg_file_exists(fname) (RUSTG_CALL(RUST_G, "file_exists")(fname) == "true")
-#define rustg_file_write(text, fname) RUSTG_CALL(RUST_G, "file_write")(text, fname)
-#define rustg_file_append(text, fname) RUSTG_CALL(RUST_G, "file_append")(text, fname)
-#define rustg_file_get_line_count(fname) text2num(RUSTG_CALL(RUST_G, "file_get_line_count")(fname))
-#define rustg_file_seek_line(fname, line) RUSTG_CALL(RUST_G, "file_seek_line")(fname, "[line]")
-
-#ifdef RUSTG_OVERRIDE_BUILTINS
- #define file2text(fname) rustg_file_read("[fname]")
- #define text2file(text, fname) rustg_file_append(text, "[fname]")
-#endif
-
-/// Returns the git hash of the given revision, ex. "HEAD".
-#define rustg_git_revparse(rev) RUSTG_CALL(RUST_G, "rg_git_revparse")(rev)
-
-/**
- * Returns the date of the given revision in the format YYYY-MM-DD.
- * Returns null if the revision is invalid.
- */
-#define rustg_git_commit_date(rev) RUSTG_CALL(RUST_G, "rg_git_commit_date")(rev)
#define RUSTG_HTTP_METHOD_GET "get"
#define RUSTG_HTTP_METHOD_PUT "put"
@@ -159,6 +171,16 @@
#define rustg_noise_get_at_coordinates(seed, x, y) RUSTG_CALL(RUST_G, "noise_get_at_coordinates")(seed, x, y)
+/*
+ * Takes in a string and json_encode()"d lists to produce a sanitized string.
+ * This function operates on whitelists, there is currently no way to blacklist.
+ * Args:
+ * * text: the string to sanitize.
+ * * attribute_whitelist_json: a json_encode()'d list of HTML attributes to allow in the final string.
+ * * tag_whitelist_json: a json_encode()'d list of HTML tags to allow in the final string.
+ */
+#define rustg_sanitize_html(text, attribute_whitelist_json, tag_whitelist_json) RUSTG_CALL(RUST_G, "sanitize_html")(text, attribute_whitelist_json, tag_whitelist_json)
+
#define rustg_sql_connect_pool(options) RUSTG_CALL(RUST_G, "sql_connect_pool")(options)
#define rustg_sql_query_async(handle, query, params) RUSTG_CALL(RUST_G, "sql_query_async")(handle, query, params)
#define rustg_sql_query_blocking(handle, query, params) RUSTG_CALL(RUST_G, "sql_query_blocking")(handle, query, params)
@@ -199,4 +221,3 @@
#define url_encode(text) rustg_url_encode(text)
#define url_decode(text) rustg_url_decode(text)
#endif
-
diff --git a/code/_global_vars/configuration_ch.dm b/code/_global_vars/configuration.dm
similarity index 100%
rename from code/_global_vars/configuration_ch.dm
rename to code/_global_vars/configuration.dm
diff --git a/code/_global_vars/sensitive.dm b/code/_global_vars/sensitive.dm
deleted file mode 100644
index 8de09f4f3a..0000000000
--- a/code/_global_vars/sensitive.dm
+++ /dev/null
@@ -1,11 +0,0 @@
-// MySQL configuration
-GLOBAL_REAL_VAR(sqladdress) = "localhost"
-GLOBAL_REAL_VAR(sqlport) = "3306"
-GLOBAL_REAL_VAR(sqldb) = "tgstation"
-GLOBAL_REAL_VAR(sqllogin) = "root"
-GLOBAL_REAL_VAR(sqlpass) = ""
-// Feedback gathering sql connection
-GLOBAL_REAL_VAR(sqlfdbkdb) = "test"
-GLOBAL_REAL_VAR(sqlfdbklogin) = "root"
-GLOBAL_REAL_VAR(sqlfdbkpass) = ""
-GLOBAL_REAL_VAR(sqllogging) = 0 // Should we log deaths, population stats, etc.?
diff --git a/code/_helpers/logging.dm b/code/_helpers/logging.dm
index f21d0164fb..34d6eec3df 100644
--- a/code/_helpers/logging.dm
+++ b/code/_helpers/logging.dm
@@ -28,22 +28,22 @@
/proc/log_admin(text)
admin_log.Add(text)
- if (CONFIG_GET(flag/log_admin)) // CHOMPEdit
+ if (CONFIG_GET(flag/log_admin))
WRITE_LOG(diary, "ADMIN: [text]")
/proc/log_adminpm(text, client/source, client/dest)
admin_log.Add(text)
- if (CONFIG_GET(flag/log_admin)) // CHOMPEdit
+ if (CONFIG_GET(flag/log_admin))
WRITE_LOG(diary, "ADMINPM: [key_name(source)]->[key_name(dest)]: [html_decode(text)]")
/proc/log_pray(text, client/source)
admin_log.Add(text)
- if (CONFIG_GET(flag/log_admin)) // CHOMPEdit
+ if (CONFIG_GET(flag/log_admin))
WRITE_LOG(diary, "PRAY: [key_name(source)]: [text]")
/proc/log_debug(text)
- //if (CONFIG_GET(flag/log_debug)) // CHOMPEdit
- // WRITE_LOG(debug_log, "DEBUG: [sanitize(text)]")
+ //if (CONFIG_GET(flag/log_debug)) // CHOMPRemove
+ // WRITE_LOG(debug_log, "DEBUG: [sanitize(text)]") // CHOMPRemove
WRITE_LOG(debug_log, "DEBUG: [sanitize(text)]")
for(var/client/C in GLOB.admins)
@@ -53,25 +53,25 @@
html = span_filter_debuglogs("DEBUG: [text]"))
/proc/log_game(text)
- if (CONFIG_GET(flag/log_game)) // CHOMPEdit
+ if (CONFIG_GET(flag/log_game))
WRITE_LOG(diary, "GAME: [text]")
/proc/log_vote(text)
- if (CONFIG_GET(flag/log_vote)) // CHOMPEdit
+ if (CONFIG_GET(flag/log_vote))
WRITE_LOG(diary, "VOTE: [text]")
/proc/log_access_in(client/new_client)
- if (CONFIG_GET(flag/log_access)) // CHOMPEdit
+ if (CONFIG_GET(flag/log_access))
var/message = "[key_name(new_client)] - IP:[new_client.address] - CID:[new_client.computer_id] - BYOND v[new_client.byond_version]"
WRITE_LOG(diary, "ACCESS IN: [message]") //VOREStation Edit
/proc/log_access_out(mob/last_mob)
- if (CONFIG_GET(flag/log_access)) // CHOMPEdit
+ if (CONFIG_GET(flag/log_access))
var/message = "[key_name(last_mob)] - IP:[last_mob.lastKnownIP] - CID:Logged Out - BYOND Logged Out"
WRITE_LOG(diary, "ACCESS OUT: [message]")
/proc/log_say(text, mob/speaker)
- if (CONFIG_GET(flag/log_say)) // CHOMPEdit
+ if (CONFIG_GET(flag/log_say))
WRITE_LOG(diary, "SAY: [speaker.simple_info_line()]: [html_decode(text)]")
//Log the message to in-game dialogue logs, as well. //CHOMPEdit Begin
@@ -92,7 +92,7 @@
//CHOMPEdit End
/proc/log_ooc(text, client/user)
- if (CONFIG_GET(flag/log_ooc)) // CHOMPEdit
+ if (CONFIG_GET(flag/log_ooc))
WRITE_LOG(diary, "OOC: [user.simple_info_line()]: [html_decode(text)]")
if(!SSdbcore.IsConnected())
establish_db_connection()
@@ -108,7 +108,7 @@
//GLOB.round_text_log += span_bold("([time_stamp()])") + " (" + span_bold("[user]") + ") " + span_underline("OOC:") + " - " + span_blue(span_bold("[text]"))
/proc/log_aooc(text, client/user)
- if (CONFIG_GET(flag/log_ooc)) // CHOMPEdit
+ if (CONFIG_GET(flag/log_ooc))
WRITE_LOG(diary, "AOOC: [user.simple_info_line()]: [html_decode(text)]")
if(!SSdbcore.IsConnected())
establish_db_connection()
@@ -124,7 +124,7 @@
//GLOB.round_text_log += span_bold("([time_stamp()])") + " (" + span_bold("[user]") + ") " + span_underline("AOOC:") + " - " + span_red(span_bold("[text]"))
/proc/log_looc(text, client/user)
- if (CONFIG_GET(flag/log_ooc)) // CHOMPEdit
+ if (CONFIG_GET(flag/log_ooc))
WRITE_LOG(diary, "LOOC: [user.simple_info_line()]: [html_decode(text)]")
if(!SSdbcore.IsConnected())
establish_db_connection()
@@ -140,7 +140,7 @@
//GLOB.round_text_log += span_bold("([time_stamp()])") + " (" + span_bold("[user]") + ") " + span_underline("LOOC:") + " - " + span_orange(span_bold("[text]"))
/proc/log_whisper(text, mob/speaker)
- if (CONFIG_GET(flag/log_whisper)) // CHOMPEdit
+ if (CONFIG_GET(flag/log_whisper))
WRITE_LOG(diary, "WHISPER: [speaker.simple_info_line()]: [html_decode(text)]")
if(speaker.client)
@@ -159,7 +159,7 @@
qdel(query_insert)
/proc/log_emote(text, mob/speaker)
- if (CONFIG_GET(flag/log_emote)) // CHOMPEdit
+ if (CONFIG_GET(flag/log_emote))
WRITE_LOG(diary, "EMOTE: [speaker.simple_info_line()]: [html_decode(text)]")
//CHOMPEdit Begin
if(speaker.client)
@@ -179,23 +179,23 @@
//CHOMPEdit End
/proc/log_attack(attacker, defender, message)
- if (CONFIG_GET(flag/log_attack)) // CHOMPEdit
+ if (CONFIG_GET(flag/log_attack))
WRITE_LOG(diary, "ATTACK: [attacker] against [defender]: [message]")
/proc/log_adminsay(text, mob/speaker)
- if (CONFIG_GET(flag/log_adminchat)) // CHOMPEdit
+ if (CONFIG_GET(flag/log_adminchat))
WRITE_LOG(diary, "ADMINSAY: [speaker.simple_info_line()]: [html_decode(text)]")
/proc/log_modsay(text, mob/speaker)
- if (CONFIG_GET(flag/log_adminchat)) // CHOMPEdit
+ if (CONFIG_GET(flag/log_adminchat))
WRITE_LOG(diary, "MODSAY: [speaker.simple_info_line()]: [html_decode(text)]")
/proc/log_eventsay(text, mob/speaker)
- if (CONFIG_GET(flag/log_adminchat)) // CHOMPEdit
+ if (CONFIG_GET(flag/log_adminchat))
WRITE_LOG(diary, "EVENTSAY: [speaker.simple_info_line()]: [html_decode(text)]")
/proc/log_ghostsay(text, mob/speaker)
- if (CONFIG_GET(flag/log_say)) // CHOMPEdit
+ if (CONFIG_GET(flag/log_say))
WRITE_LOG(diary, "DEADCHAT: [speaker.simple_info_line()]: [html_decode(text)]")
//CHOMPEdit Begin
if(speaker.client)
@@ -216,7 +216,7 @@
//CHOMPEdit End
/proc/log_ghostemote(text, mob/speaker)
- if (CONFIG_GET(flag/log_emote)) // CHMOPEdit
+ if (CONFIG_GET(flag/log_emote))
WRITE_LOG(diary, "DEADEMOTE: [speaker.simple_info_line()]: [html_decode(text)]")
//CHOMPEdit Begin
if(speaker.client)
@@ -234,11 +234,11 @@
//CHOMPEdit End
/proc/log_adminwarn(text)
- if (CONFIG_GET(flag/log_adminwarn)) // CHOMPEdit
+ if (CONFIG_GET(flag/log_adminwarn))
WRITE_LOG(diary, "ADMINWARN: [html_decode(text)]")
/proc/log_pda(text, mob/speaker)
- if (CONFIG_GET(flag/log_pda)) // CHOMPEdit
+ if (CONFIG_GET(flag/log_pda))
WRITE_LOG(diary, "PDA: [speaker.simple_info_line()]: [html_decode(text)]")
//CHOMPEdit Begin
if(speaker.client)
@@ -260,8 +260,8 @@
/proc/log_to_dd(text)
to_world_log(text) //this comes before the config check because it can't possibly runtime
- //if(CONFIG_GET(flag/log_world_output)) // CHOMPEdit
- // WRITE_LOG(diary, "DD_OUTPUT: [text]")
+ //if(CONFIG_GET(flag/log_world_output)) // CHOMPRemove
+ // WRITE_LOG(diary, "DD_OUTPUT: [text]") // CHOMPRemove
WRITE_LOG(diary, "DD_OUTPUT: [text]")
/proc/log_error(text)
diff --git a/code/_helpers/logging/debug_ch.dm b/code/_helpers/logging/debug.dm
similarity index 100%
rename from code/_helpers/logging/debug_ch.dm
rename to code/_helpers/logging/debug.dm
diff --git a/code/_helpers/logging_vr.dm b/code/_helpers/logging_vr.dm
index d8969228c0..abaf7a0654 100644
--- a/code/_helpers/logging_vr.dm
+++ b/code/_helpers/logging_vr.dm
@@ -1,5 +1,5 @@
/proc/log_nsay(text, inside, mob/speaker)
- if (CONFIG_GET(flag/log_say)) // CHOMPEdit
+ if (CONFIG_GET(flag/log_say))
WRITE_LOG(diary, "NSAY (NIF:[inside]): [speaker.simple_info_line()]: [html_decode(text)]")
//CHOMPEdit Begin
if(speaker.client)
@@ -17,7 +17,7 @@
//CHOMPEdit End
/proc/log_nme(text, inside, mob/speaker)
- if (CONFIG_GET(flag/log_emote)) // CHOMPEdit
+ if (CONFIG_GET(flag/log_emote))
WRITE_LOG(diary, "NME (NIF:[inside]): [speaker.simple_info_line()]: [html_decode(text)]")
//CHOMPEdit Begin
if(speaker.client)
@@ -35,7 +35,7 @@
//CHOMPEdit End
/proc/log_subtle(text, mob/speaker)
- if (CONFIG_GET(flag/log_emote)) // CHOMPEdit
+ if (CONFIG_GET(flag/log_emote))
WRITE_LOG(diary, "SUBTLE: [speaker.simple_info_line()]: [html_decode(text)]")
//CHOMPEdit Begin
if(speaker.client)
diff --git a/code/_helpers/mobs.dm b/code/_helpers/mobs.dm
index 40cfc85f81..409b0491ee 100644
--- a/code/_helpers/mobs.dm
+++ b/code/_helpers/mobs.dm
@@ -374,7 +374,7 @@ Proc for attack log creation, because really why not
cached_character_icons[cachekey] = .
/proc/not_has_ooc_text(mob/user)
- if (CONFIG_GET(flag/allow_metadata) && (!user.client?.prefs?.metadata || length(user.client.prefs.metadata) < 15)) // CHOMPEdit
+ if (CONFIG_GET(flag/allow_metadata) && (!user.client?.prefs?.metadata || length(user.client.prefs.metadata) < 15))
to_chat(user, span_warning("Please set informative OOC notes related to RP/ERP preferences. Set them using the 'OOC Notes' button on the 'General' tab in character setup."))
return TRUE
return FALSE
diff --git a/code/_helpers/nameof_ch.dm b/code/_helpers/nameof.dm
similarity index 100%
rename from code/_helpers/nameof_ch.dm
rename to code/_helpers/nameof.dm
diff --git a/code/_helpers/names.dm b/code/_helpers/names.dm
index 439a5eaf91..12d2c08e86 100644
--- a/code/_helpers/names.dm
+++ b/code/_helpers/names.dm
@@ -92,8 +92,8 @@ var/religion_name = null
new_station_name += pick("13","XIII","Thirteen")
- if (config && CONFIG_GET(string/servername)) // CHOMPEdit
- world.name = "[CONFIG_GET(string/servername)]: [name]" // CHOMPEdit
+ if (config && CONFIG_GET(string/servername))
+ world.name = "[CONFIG_GET(string/servername)]: [name]"
else
world.name = new_station_name
@@ -104,8 +104,8 @@ var/religion_name = null
using_map.station_name = name
- if (config && CONFIG_GET(string/servername)) // CHOMPEdit
- world.name = "[CONFIG_GET(string/servername)]: [name]" // CHOMPEdit
+ if (config && CONFIG_GET(string/servername))
+ world.name = "[CONFIG_GET(string/servername)]: [name]"
else
world.name = name
diff --git a/code/_helpers/type2type.dm b/code/_helpers/type2type.dm
index f01c1263f4..0e0dd58295 100644
--- a/code/_helpers/type2type.dm
+++ b/code/_helpers/type2type.dm
@@ -8,7 +8,6 @@
* angle2dir
*/
-// CHOMPEdit Start
//Splits the text of a file at seperator and returns them in a list.
//returns an empty list if the file doesn't exist
/world/proc/file2list(filename, seperator="\n", trim = TRUE)
@@ -36,7 +35,6 @@
return "turf"
else //regex everything else (works for /proc too)
return lowertext(replacetext("[the_type]", "[type2parent(the_type)]/", ""))
-// CHOMPEdit End
// Returns an integer given a hexadecimal number string as input.
/proc/hex2num(hex)
diff --git a/code/_helpers/unsorted.dm b/code/_helpers/unsorted.dm
index e8606811be..7e63f79ae4 100644
--- a/code/_helpers/unsorted.dm
+++ b/code/_helpers/unsorted.dm
@@ -1389,9 +1389,6 @@ var/mob/dview/dview_mob = new
#undef NOT_FLAG
#undef HAS_FLAG
-//datum may be null, but it does need to be a typed var
-//#define NAMEOF(datum, X) (#X || ##datum.##X) // CHOMPEdit: Moved to nameof_ch.dm
-
#define VARSET_LIST_CALLBACK(target, var_name, var_value) CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(___callbackvarset), ##target, ##var_name, ##var_value)
//dupe code because dm can't handle 3 level deep macros
#define VARSET_CALLBACK(datum, var, var_value) CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(___callbackvarset), ##datum, NAMEOF(##datum, ##var), ##var_value)
diff --git a/code/_helpers/unsorted_vr.dm b/code/_helpers/unsorted_vr.dm
index 2b7eae4ea4..88c6dba1b2 100644
--- a/code/_helpers/unsorted_vr.dm
+++ b/code/_helpers/unsorted_vr.dm
@@ -43,26 +43,26 @@
//Sender is optional
/proc/admin_chat_message(var/message = "Debug Message", var/color = "#FFFFFF", var/sender)
- if (!CONFIG_GET(string/chat_webhook_url) || !message) // CHOMPEdit
+ if (!CONFIG_GET(string/chat_webhook_url) || !message)
return
spawn(0)
var/query_string = "type=adminalert"
- query_string += "&key=[url_encode(CONFIG_GET(string/chat_webhook_key))]" // CHOMPEdit
+ query_string += "&key=[url_encode(CONFIG_GET(string/chat_webhook_key))]"
query_string += "&msg=[url_encode(message)]"
query_string += "&color=[url_encode(color)]"
if(sender)
query_string += "&from=[url_encode(sender)]"
- world.Export("[CONFIG_GET(string/chat_webhook_url)]?[query_string]") // CHOMPEdit
+ world.Export("[CONFIG_GET(string/chat_webhook_url)]?[query_string]")
/proc/admin_action_message(var/admin = "INVALID", var/user = "INVALID", var/action = "INVALID", var/reason = "INVALID", var/time = "INVALID")
- if (!CONFIG_GET(string/chat_webhook_url) || !action) // CHOMPEdit
+ if (!CONFIG_GET(string/chat_webhook_url) || !action)
return
spawn(0)
var/query_string = "type=adminaction"
- query_string += "&key=[url_encode(CONFIG_GET(string/chat_webhook_key))]" // CHOMPEdit
+ query_string += "&key=[url_encode(CONFIG_GET(string/chat_webhook_key))]"
query_string += "&admin=[url_encode(admin)]"
query_string += "&user=[url_encode(user)]"
query_string += "&action=[url_encode(action)]"
query_string += "&reason=[url_encode(reason)]"
query_string += "&time=[url_encode(time)]"
- world.Export("[CONFIG_GET(string/chat_webhook_url)]?[query_string]") // CHOMPEdit
+ world.Export("[CONFIG_GET(string/chat_webhook_url)]?[query_string]")
diff --git a/code/_onclick/click.dm b/code/_onclick/click.dm
index 747c659d46..9947b037ba 100644
--- a/code/_onclick/click.dm
+++ b/code/_onclick/click.dm
@@ -158,7 +158,7 @@
next_click = max(world.time + timeout, next_click)
/mob/proc/checkClickCooldown()
- if(next_click > world.time && !CONFIG_GET(flag/no_click_cooldown)) // CHOMPEdit
+ if(next_click > world.time && !CONFIG_GET(flag/no_click_cooldown))
return FALSE
return TRUE
diff --git a/code/controllers/autotransfer.dm b/code/controllers/autotransfer.dm
index 52362febfb..f3f298f900 100644
--- a/code/controllers/autotransfer.dm
+++ b/code/controllers/autotransfer.dm
@@ -6,9 +6,9 @@ var/datum/controller/transfer_controller/transfer_controller
var/shift_hard_end = 0 //VOREStation Edit
var/shift_last_vote = 0 //VOREStation Edit
/datum/controller/transfer_controller/New()
- timerbuffer = CONFIG_GET(number/vote_autotransfer_initial) // CHOMPEdit
+ timerbuffer = CONFIG_GET(number/vote_autotransfer_initial)
shift_hard_end = CONFIG_GET(number/vote_autotransfer_initial) + (CONFIG_GET(number/vote_autotransfer_interval) * 2) //CHOMPStation Edit //Change this "1" to how many extend votes you want there to be. //Note: Fuck you whoever just slapped a number here instead of using the FUCKING CONFIG LIKE ALL THE OTHER NUMBERS HERE
- shift_last_vote = shift_hard_end - CONFIG_GET(number/vote_autotransfer_interval) //VOREStation Edit // CHOMPEdit
+ shift_last_vote = shift_hard_end - CONFIG_GET(number/vote_autotransfer_interval) //VOREStation Edit
START_PROCESSING(SSprocessing, src)
/datum/controller/transfer_controller/Destroy()
@@ -23,9 +23,9 @@ var/datum/controller/transfer_controller/transfer_controller
to_world(span_world(span_notice("Warning: This upcoming round-extend vote will be your last chance to vote for shift extension. Wrap up your scenes in the next 60 minutes if the round is extended."))) //CHOMPStation Edit
if (round_duration_in_ds >= shift_hard_end - 1 MINUTE)
init_shift_change(null, 1)
- shift_hard_end = timerbuffer + CONFIG_GET(number/vote_autotransfer_interval) //If shuttle somehow gets recalled, let's force it to call again next time a vote would occur. // CHOMPEdit
- timerbuffer = timerbuffer + CONFIG_GET(number/vote_autotransfer_interval) //Just to make sure a vote doesn't occur immediately afterwords. // CHOMPEdit
+ shift_hard_end = timerbuffer + CONFIG_GET(number/vote_autotransfer_interval) //If shuttle somehow gets recalled, let's force it to call again next time a vote would occur.
+ timerbuffer = timerbuffer + CONFIG_GET(number/vote_autotransfer_interval) //Just to make sure a vote doesn't occur immediately afterwords.
else if (round_duration_in_ds >= timerbuffer - 1 MINUTE)
SSvote.start_vote(new /datum/vote/crew_transfer)
//VOREStation Edit END
- timerbuffer = timerbuffer + CONFIG_GET(number/vote_autotransfer_interval) // CHOMPEdit
+ timerbuffer = timerbuffer + CONFIG_GET(number/vote_autotransfer_interval)
diff --git a/code/controllers/configuration_ch/config_entry.dm b/code/controllers/configuration/config_entry.dm
similarity index 100%
rename from code/controllers/configuration_ch/config_entry.dm
rename to code/controllers/configuration/config_entry.dm
diff --git a/code/controllers/configuration_ch/configuration.dm b/code/controllers/configuration/configuration.dm
similarity index 100%
rename from code/controllers/configuration_ch/configuration.dm
rename to code/controllers/configuration/configuration.dm
diff --git a/code/controllers/configuration_ch/entries/chompstation.dm b/code/controllers/configuration/entries/chompstation.dm
similarity index 100%
rename from code/controllers/configuration_ch/entries/chompstation.dm
rename to code/controllers/configuration/entries/chompstation.dm
diff --git a/code/controllers/configuration_ch/entries/dbconfig.dm b/code/controllers/configuration/entries/dbconfig.dm
similarity index 91%
rename from code/controllers/configuration_ch/entries/dbconfig.dm
rename to code/controllers/configuration/entries/dbconfig.dm
index 2dbc1fb075..d14ca42e68 100644
--- a/code/controllers/configuration_ch/entries/dbconfig.dm
+++ b/code/controllers/configuration/entries/dbconfig.dm
@@ -46,8 +46,8 @@
/datum/config_entry/number/max_concurrent_queries/ValidateAndSet(str_val)
. = ..()
- if (.)
- SSdbcore.max_concurrent_queries = config_entry_value
+ //if (.) TODO: ENABLE THIS IN FUTURE DB PRs
+ //SSdbcore.max_concurrent_queries = config_entry_value TODO: ENABLE THIS IN FUTURE DB PRs
/// The exe for mariadbd.exe.
/// Shouldn't really be set on production servers, primarily for EZDB.
diff --git a/code/controllers/configuration_ch/entries/game_options.dm b/code/controllers/configuration/entries/game_options.dm
similarity index 98%
rename from code/controllers/configuration_ch/entries/game_options.dm
rename to code/controllers/configuration/entries/game_options.dm
index 5508d5e168..867460f861 100644
--- a/code/controllers/configuration_ch/entries/game_options.dm
+++ b/code/controllers/configuration/entries/game_options.dm
@@ -12,12 +12,10 @@
/datum/config_entry/flag/limbs_can_break
/datum/config_entry/number/organ_health_multiplier
- integer = FALSE
- default = 1.0
+ default = 1
/datum/config_entry/number/organ_regeneration_multiplier
- integer = FALSE
- default = 1.0
+ default = 1
// FIXME: Unused
///datum/config_entry/flag/revival_pod_plants
diff --git a/code/controllers/configuration_ch/entries/general.dm b/code/controllers/configuration/entries/general.dm
similarity index 99%
rename from code/controllers/configuration_ch/entries/general.dm
rename to code/controllers/configuration/entries/general.dm
index 06e9e5a021..555ae7c9fe 100644
--- a/code/controllers/configuration_ch/entries/general.dm
+++ b/code/controllers/configuration/entries/general.dm
@@ -51,6 +51,9 @@
/// logs world.log to a file
/datum/config_entry/flag/log_runtime
+/// logs sql stuff
+/datum/config_entry/flag/log_sql
+
/// log to_world_log(messages)
/datum/config_entry/flag/log_world_output
@@ -571,7 +574,7 @@
/// 0 / RAD_RESIST_CALC_DIV = Each turf absorbs some fraction of the working radiation level
/// 1 / RAD_RESIST_CALC_SUB = Each turf absorbs a fixed amount of radiation
/datum/config_entry/flag/radiation_resistance_calc_mode
- default = RAD_RESIST_CALC_DIV
+ default = RAD_RESIST_CALC_DIV // CHOMPEdit
/datum/config_entry/flag/radiation_resistance_calc_mode/ValidateAndSet(str_val)
if(!VASProcCallGuard(str_val))
diff --git a/code/controllers/configuration_ch/entries/resources.dm b/code/controllers/configuration/entries/resources.dm
similarity index 100%
rename from code/controllers/configuration_ch/entries/resources.dm
rename to code/controllers/configuration/entries/resources.dm
diff --git a/code/controllers/configuration_ch/entries/vorestation.dm b/code/controllers/configuration/entries/vorestation.dm
similarity index 98%
rename from code/controllers/configuration_ch/entries/vorestation.dm
rename to code/controllers/configuration/entries/vorestation.dm
index 38d0dcda5c..ae9730dbc4 100644
--- a/code/controllers/configuration_ch/entries/vorestation.dm
+++ b/code/controllers/configuration/entries/vorestation.dm
@@ -34,7 +34,7 @@
/// Hours
/datum/config_entry/number/pto_cap
- default = 200
+ default = 200 // CHOMPEdit
protection = CONFIG_ENTRY_LOCKED
/datum/config_entry/flag/require_flavor
diff --git a/code/controllers/configuration_ch/legacy.dm b/code/controllers/configuration/legacy.dm
similarity index 100%
rename from code/controllers/configuration_ch/legacy.dm
rename to code/controllers/configuration/legacy.dm
diff --git a/code/controllers/configuration_ch.dm b/code/controllers/configuration_ch.dm
deleted file mode 100644
index 2dcb5657db..0000000000
--- a/code/controllers/configuration_ch.dm
+++ /dev/null
@@ -1,125 +0,0 @@
-// Making this file to allow us to easily understand the location of any modifications to the config file made by Chompers and to try and prevent any conflicts happening in the future.
-// Basically a copy pasta from virgo's configuration.dm file but it'll make life easer for us to just toggle on/off.
-
-
-/datum/configuration
- var/discord_restriction = FALSE
- var/use_jobwhitelist = TRUE
- var/emojis = FALSE
-
- var/vorefootstep_volume = 75 //In future see about making a function to adjust volume serverside in config.txt, easy to do with reenable values. - Jack
-
- var/nodebot_enabled = 0 //So, nodebot is a supplement to the TGS discord bot pretty much. For things likes faxes and the manifest it's very helpful because it's able to render html into an image and post it.
- var/nodebot_location //We need to print the manifest to this location so nodebot can render it to chat. //NOTE: TO BE REPLACED BY BETTER CODE FOR FETCHING MANIFEST
-
- //These are for tgs4 channels, for discord chatbots used in TGS.
- var/ahelp_channel_tag
- var/fax_channel_tag
- var/role_request_channel_tag
-
- //These are for the role request TGS discord bot. Role IDs to ping.
- var/role_request_id_command
- var/role_request_id_security
- var/role_request_id_engineering
- var/role_request_id_medical
- var/role_request_id_research
- var/role_request_id_supply
- var/role_request_id_service
- var/role_request_id_expedition
- var/role_request_id_silicon
-
- var/discord_faxes_autoprint = 0 //Only turn this on if you're not using the nodebot.
- var/discord_faxes_disabled = 0 //Turn this off if you don't want the TGS bot sending you messages whenever a fax is sent to central.
- var/discord_ahelps_disabled = 0 //Turn this off if you don't want the TGS bot sending you messages whenever an ahelp ticket is created.
- var/discord_ahelps_all = 0 //Turn this on if you want all admin-PMs to go to be sent to discord, and not only the first message of a ticket.
-
-
- var/list/ip_whitelist = list()
-
-/hook/startup/proc/read_ch_config()
- var/list/Lines = file2list("config/config.txt")
- for(var/t in Lines)
- if(!t) continue
-
- t = trim(t)
- if (length(t) == 0)
- continue
- else if (copytext(t, 1, 2) == "#")
- continue
-
- var/pos = findtext(t, " ")
- var/name = null
- var/value = null
-
- if (pos)
- name = lowertext(copytext(t, 1, pos))
- value = copytext(t, pos + 1)
- else
- name = lowertext(t)
-
- if (!name)
- continue
-
- switch (name)
- if ("discord_restriction")
- config.discord_restriction = 1
- if ("use_jobwhitelist")
- config.use_jobwhitelist = 1
- if ("disable_emojis")
- config.emojis = 0
- if ("nodebot_enabled")
- config.nodebot_enabled = 1
- if ("discord_faxes_autoprint")
- config.discord_faxes_autoprint = 1
- if ("discord_faxes_disabled")
- config.discord_faxes_disabled = 1
- if ("discord_ahelps_disabled")
- config.discord_ahelps_disabled = 1
- if ("discord_ahelps_all")
- config.discord_ahelps_all = 1
- if ("nodebot_location")
- config.nodebot_location = value
- if ("ahelp_channel_tag")
- config.ahelp_channel_tag = value
- if ("fax_channel_tag")
- config.fax_channel_tag = value
- if ("role_request_channel_tag")
- config.role_request_channel_tag = value
- if ("role_request_id_command")
- config.role_request_id_command = value
- if ("role_request_id_security")
- config.role_request_id_security = value
- if ("role_request_id_engineering")
- config.role_request_id_engineering = value
- if ("role_request_id_medical")
- config.role_request_id_medical = value
- if ("role_request_id_research")
- config.role_request_id_research = value
- if ("role_request_id_supply")
- config.role_request_id_supply = value
- if ("role_request_id_service")
- config.role_request_id_service = value
- if ("role_request_id_expedition")
- config.role_request_id_expedition = value
- if ("role_request_id_silicon")
- config.role_request_id_silicon = value
- if("job_camp_time_limit")
- config.job_camp_time_limit = value MINUTES
-
-
- var/list/ip_whitelist_lines = file2list("config/ip_whitelist.txt")
- var/increment = 1
- for(var/t in ip_whitelist_lines)
- if (!t) continue
- t = trim(t)
- if (length(t) == 0)
- continue
- else if (copytext(t, 1, 2) == "#")
- continue
- var/ip_address = splittext(t, ",")
- for (var/name in ip_address)
- config.ip_whitelist[name] = increment
- increment += 1
-
-
- return 1
diff --git a/code/controllers/master.dm b/code/controllers/master.dm
index 82f60cb235..4e1081f557 100644
--- a/code/controllers/master.dm
+++ b/code/controllers/master.dm
@@ -205,7 +205,7 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
var/start_timeofday = REALTIMEOFDAY
// Initialize subsystems.
- current_ticklimit = CONFIG_GET(number/tick_limit_mc_init) // CHOMPEdit
+ current_ticklimit = CONFIG_GET(number/tick_limit_mc_init)
for (var/datum/controller/subsystem/SS in subsystems)
if (SS.flags & SS_NO_INIT)
continue
@@ -226,7 +226,7 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
if (!current_runlevel)
SetRunLevel(RUNLEVEL_LOBBY)
- // GLOB.revdata = new // It can load revdata now, from tgs or .git or whatever // CHOMPEDIT
+ // GLOB.revdata = new // It can load revdata now, from tgs or .git or whatever
// Sort subsystems by display setting for easy access.
sortTim(subsystems, GLOBAL_PROC_REF(cmp_subsystem_display))
@@ -236,7 +236,7 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
#else
world.sleep_offline = 1
#endif
- world.change_fps(CONFIG_GET(number/fps)) // CHOMPEdit
+ world.change_fps(CONFIG_GET(number/fps))
var/initialized_tod = REALTIMEOFDAY
sleep(1)
initializations_finished_with_no_players_logged_in = initialized_tod < REALTIMEOFDAY - 10
@@ -725,9 +725,7 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
for(var/datum/controller/subsystem/SS as anything in subsystems)
SS.StopLoadingMap()
-// CHOMPEdit Begin
/datum/controller/master/proc/OnConfigLoad()
for (var/thing in subsystems)
var/datum/controller/subsystem/SS = thing
SS.OnConfigLoad()
-// CHOMPEdit End
diff --git a/code/controllers/subsystem.dm b/code/controllers/subsystem.dm
index 7fc81af178..1badd0a453 100644
--- a/code/controllers/subsystem.dm
+++ b/code/controllers/subsystem.dm
@@ -224,10 +224,10 @@
if(SS_SLEEPING)
state = SS_PAUSING
-// CHOMPEdit Start
/// Called after the config has been loaded or reloaded.
/datum/controller/subsystem/proc/OnConfigLoad()
+// CHOMPEdit Start
/**
* Used to initialize the subsystem. This is expected to be overriden by subtypes.
*/
diff --git a/code/controllers/subsystems/assets.dm b/code/controllers/subsystems/assets.dm
index 96fb1b304e..d34d05ff55 100644
--- a/code/controllers/subsystems/assets.dm
+++ b/code/controllers/subsystems/assets.dm
@@ -6,9 +6,9 @@ SUBSYSTEM_DEF(assets)
var/list/preload = list()
var/datum/asset_transport/transport = new()
-/datum/controller/subsystem/assets/OnConfigLoad() // CHOMPEdit
+/datum/controller/subsystem/assets/OnConfigLoad()
var/newtransporttype = /datum/asset_transport
- switch (CONFIG_GET(string/asset_transport)) // CHOMPEdit
+ switch (CONFIG_GET(string/asset_transport))
if ("webroot")
newtransporttype = /datum/asset_transport/webroot
diff --git a/code/controllers/subsystems/inactivity.dm b/code/controllers/subsystems/inactivity.dm
index a465d4b6f9..bc7a5a7dde 100644
--- a/code/controllers/subsystems/inactivity.dm
+++ b/code/controllers/subsystems/inactivity.dm
@@ -6,7 +6,7 @@ SUBSYSTEM_DEF(inactivity)
var/number_kicked = 0
/datum/controller/subsystem/inactivity/fire(resumed = FALSE)
- if (!CONFIG_GET(number/kick_inactive)) // CHOMPEdit
+ if (!CONFIG_GET(number/kick_inactive))
can_fire = FALSE
return
if (!resumed)
@@ -15,8 +15,8 @@ SUBSYSTEM_DEF(inactivity)
while(client_list.len)
var/client/C = client_list[client_list.len]
client_list.len--
- if(C.is_afk(CONFIG_GET(number/kick_inactive) MINUTES) && can_kick(C)) // CHOMPEdit
- to_chat_immediate(C, world.time, span_warning("You have been inactive for more than [CONFIG_GET(number/kick_inactive)] minute\s and have been disconnected.")) // CHOMPEdit
+ if(C.is_afk(CONFIG_GET(number/kick_inactive) MINUTES) && can_kick(C))
+ to_chat_immediate(C, world.time, span_warning("You have been inactive for more than [CONFIG_GET(number/kick_inactive)] minute\s and have been disconnected."))
var/information
if(C.mob)
diff --git a/code/controllers/subsystems/lighting.dm b/code/controllers/subsystems/lighting.dm
index 099123ef5f..aefe01f0ae 100644
--- a/code/controllers/subsystems/lighting.dm
+++ b/code/controllers/subsystems/lighting.dm
@@ -20,7 +20,7 @@ SUBSYSTEM_DEF(lighting)
/datum/controller/subsystem/lighting/Initialize() // CHOMPEdit
if(!subsystem_initialized)
- if (CONFIG_GET(flag/starlight)) // CHOMPEdit
+ if (CONFIG_GET(flag/starlight))
for(var/area/A in world)
if (A.dynamic_lighting == DYNAMIC_LIGHTING_IFSTARLIGHT)
A.luminosity = 0
diff --git a/code/controllers/subsystems/mapping.dm b/code/controllers/subsystems/mapping.dm
index c9e656b8b6..3be7bf6022 100644
--- a/code/controllers/subsystems/mapping.dm
+++ b/code/controllers/subsystems/mapping.dm
@@ -18,7 +18,7 @@ SUBSYSTEM_DEF(mapping)
world.max_z_changed() // This is to set up the player z-level list, maxz hasn't actually changed (probably)
load_map_templates()
- if(CONFIG_GET(flag/generate_map)) // CHOMPEdit
+ if(CONFIG_GET(flag/generate_map))
// Map-gen is still very specific to the map, however putting it here should ensure it loads in the correct order.
using_map.perform_map_generation()
@@ -50,8 +50,8 @@ SUBSYSTEM_DEF(mapping)
// Choose an engine type
var/datum/map_template/engine/chosen_type = null
- if (LAZYLEN(CONFIG_GET(str_list/engine_map))) // CHOMPEdit
- var/chosen_name = pick(CONFIG_GET(str_list/engine_map)) // CHOMPEdit
+ if (LAZYLEN(CONFIG_GET(str_list/engine_map)))
+ var/chosen_name = pick(CONFIG_GET(str_list/engine_map))
chosen_type = map_templates[chosen_name]
if(!istype(chosen_type))
error("Configured engine map [chosen_name] is not a valid engine map name!")
diff --git a/code/controllers/subsystems/media_tracks.dm b/code/controllers/subsystems/media_tracks.dm
index 6bd30db4a1..f43eb4d6d0 100644
--- a/code/controllers/subsystems/media_tracks.dm
+++ b/code/controllers/subsystems/media_tracks.dm
@@ -19,7 +19,7 @@ SUBSYSTEM_DEF(media_tracks)
return SS_INIT_SUCCESS // CHOMPEdit
/datum/controller/subsystem/media_tracks/proc/load_tracks()
- for(var/filename in CONFIG_GET(str_list/jukebox_track_files)) // CHOMPEdit
+ for(var/filename in CONFIG_GET(str_list/jukebox_track_files))
report_progress("Loading jukebox track: [filename]")
if(!fexists(filename))
diff --git a/code/controllers/subsystems/nightshift.dm b/code/controllers/subsystems/nightshift.dm
index 32c377305f..fa1d626e6d 100644
--- a/code/controllers/subsystems/nightshift.dm
+++ b/code/controllers/subsystems/nightshift.dm
@@ -11,7 +11,7 @@ SUBSYSTEM_DEF(nightshift)
var/high_security_mode = FALSE
/datum/controller/subsystem/nightshift/Initialize()
- if(!CONFIG_GET(flag/enable_night_shifts)) // CHOMPEdit
+ if(!CONFIG_GET(flag/enable_night_shifts))
can_fire = FALSE
/*
if(config.randomize_shift_time)
diff --git a/code/controllers/subsystems/persist_vr.dm b/code/controllers/subsystems/persist_vr.dm
index 82b04e57dc..608909bdcb 100644
--- a/code/controllers/subsystems/persist_vr.dm
+++ b/code/controllers/subsystems/persist_vr.dm
@@ -16,7 +16,7 @@ SUBSYSTEM_DEF(persist)
// Do PTO Accruals
/datum/controller/subsystem/persist/proc/update_department_hours(var/resumed = FALSE)
- if(!CONFIG_GET(flag/time_off)) // CHOMPEdit
+ if(!CONFIG_GET(flag/time_off))
return
establish_db_connection()
@@ -78,7 +78,7 @@ SUBSYSTEM_DEF(persist)
play_hours[department_earning] = wait_in_hours
// Cap it
- dept_hours[department_earning] = min(CONFIG_GET(number/pto_cap), dept_hours[department_earning]) // CHOMPEdit
+ dept_hours[department_earning] = min(CONFIG_GET(number/pto_cap), dept_hours[department_earning])
// Okay we figured it out, lets update database!
var/sql_ckey = sql_sanitize_text(C.ckey)
diff --git a/code/controllers/subsystems/persistence.dm b/code/controllers/subsystems/persistence.dm
index 3133187f80..a89cd78b43 100644
--- a/code/controllers/subsystems/persistence.dm
+++ b/code/controllers/subsystems/persistence.dm
@@ -27,7 +27,7 @@ SUBSYSTEM_DEF(persistence)
/datum/controller/subsystem/persistence/proc/track_value(var/atom/value, var/track_type)
- if(CONFIG_GET(flag/persistence_disabled)) //if the config is set to persistence disabled, nothing will save or load. // CHOMPEdit
+ if(CONFIG_GET(flag/persistence_disabled)) //if the config is set to persistence disabled, nothing will save or load.
return
var/turf/T = get_turf(value)
diff --git a/code/controllers/subsystems/radiation.dm b/code/controllers/subsystems/radiation.dm
index 42856d7009..e3e8ae1102 100644
--- a/code/controllers/subsystems/radiation.dm
+++ b/code/controllers/subsystems/radiation.dm
@@ -24,7 +24,7 @@ SUBSYSTEM_DEF(radiation)
if(QDELETED(S))
sources -= S
else if(S.decay)
- S.update_rad_power(S.rad_power - CONFIG_GET(number/radiation_decay_rate)) // COMPEdit
+ S.update_rad_power(S.rad_power - CONFIG_GET(number/radiation_decay_rate))
if (MC_TICK_CHECK)
return
@@ -93,12 +93,12 @@ SUBSYSTEM_DEF(radiation)
origin.calc_rad_resistance()
if(origin.cached_rad_resistance)
- if(CONFIG_GET(flag/radiation_resistance_calc_mode) == RAD_RESIST_CALC_DIV) // CHOMPEdit
- working = round((working / (origin.cached_rad_resistance * CONFIG_GET(number/radiation_resistance_multiplier))), 0.01) // CHOMPEdit
- else if(CONFIG_GET(flag/radiation_resistance_calc_mode) == RAD_RESIST_CALC_SUB) // CHOMPEdit
- working = round((working - (origin.cached_rad_resistance * CONFIG_GET(number/radiation_resistance_multiplier))), 0.01) // CHOMPEdit
+ if(CONFIG_GET(flag/radiation_resistance_calc_mode) == RAD_RESIST_CALC_DIV)
+ working = round((working / (origin.cached_rad_resistance * CONFIG_GET(number/radiation_resistance_multiplier))), 0.01)
+ else if(CONFIG_GET(flag/radiation_resistance_calc_mode) == RAD_RESIST_CALC_SUB)
+ working = round((working - (origin.cached_rad_resistance * CONFIG_GET(number/radiation_resistance_multiplier))), 0.01)
- if(working <= CONFIG_GET(number/radiation_lower_limit)) // Too far from this source // CHOMPEdit
+ if(working <= CONFIG_GET(number/radiation_lower_limit)) // Too far from this source
working = 0 // May as well be 0
break
@@ -106,7 +106,7 @@ SUBSYSTEM_DEF(radiation)
// Shouldn't really ever have practical uses, but standing in a room literally made from uranium is more dangerous than standing next to a single uranium vase
. += working / (dist ** 2)
- if(. <= CONFIG_GET(number/radiation_lower_limit)) // CHOMPEdit
+ if(. <= CONFIG_GET(number/radiation_lower_limit))
. = 0
// Add a radiation source instance to the repository. It will override any existing source on the same turf.
diff --git a/code/controllers/subsystems/sqlite.dm b/code/controllers/subsystems/sqlite.dm
index ed63595b39..c771ee5ffe 100644
--- a/code/controllers/subsystems/sqlite.dm
+++ b/code/controllers/subsystems/sqlite.dm
@@ -14,7 +14,7 @@ SUBSYSTEM_DEF(sqlite)
return SS_INIT_SUCCESS // CHOMPEdit
/datum/controller/subsystem/sqlite/proc/connect()
- if(!CONFIG_GET(flag/sqlite_enabled)) // CHOMPEdit
+ if(!CONFIG_GET(flag/sqlite_enabled))
return
if(!sqlite_db)
@@ -104,17 +104,17 @@ SUBSYSTEM_DEF(sqlite)
return !sqlite_check_for_errors(query, "Insert Feedback")
/datum/controller/subsystem/sqlite/proc/can_submit_feedback(client/C)
- if(!CONFIG_GET(flag/sqlite_enabled)) // CHOMPEdit
+ if(!CONFIG_GET(flag/sqlite_enabled))
return FALSE
- if(CONFIG_GET(number/sqlite_feedback_min_age) && !is_old_enough(C)) // CHOMPEdit
+ if(CONFIG_GET(number/sqlite_feedback_min_age) && !is_old_enough(C))
return FALSE
- if(CONFIG_GET(number/sqlite_feedback_cooldown) > 0 && get_feedback_cooldown(C.key, CONFIG_GET(number/sqlite_feedback_cooldown), sqlite_db) > 0) // CHOMPEdit
+ if(CONFIG_GET(number/sqlite_feedback_cooldown) > 0 && get_feedback_cooldown(C.key, CONFIG_GET(number/sqlite_feedback_cooldown), sqlite_db) > 0)
return FALSE
return TRUE
// Returns TRUE if the player is 'old' enough, according to the config.
/datum/controller/subsystem/sqlite/proc/is_old_enough(client/C)
- if(get_player_age(C.key) < CONFIG_GET(number/sqlite_feedback_min_age)) // CHOMPEdit
+ if(get_player_age(C.key) < CONFIG_GET(number/sqlite_feedback_min_age))
return FALSE
return TRUE
diff --git a/code/controllers/subsystems/ticker.dm b/code/controllers/subsystems/ticker.dm
index 1c7ce54073..59b0c1dc73 100644
--- a/code/controllers/subsystems/ticker.dm
+++ b/code/controllers/subsystems/ticker.dm
@@ -51,8 +51,8 @@ var/global/datum/controller/subsystem/ticker/ticker
global.ticker = src // TODO - Remove this! Change everything to point at SSticker intead
/datum/controller/subsystem/ticker/Initialize()
- pregame_timeleft = CONFIG_GET(number/pregame_time) // CHOMPEdit
- send2mainirc("Server lobby is loaded and open at byond://[CONFIG_GET(string/serverurl) ? CONFIG_GET(string/serverurl) : (CONFIG_GET(string/server) ? CONFIG_GET(string/server) : "[world.address]:[world.port]")]") // CHOMPEdit
+ pregame_timeleft = CONFIG_GET(number/pregame_time)
+ send2mainirc("Server lobby is loaded and open at byond://[CONFIG_GET(string/serverurl) ? CONFIG_GET(string/serverurl) : (CONFIG_GET(string/server) ? CONFIG_GET(string/server) : "[world.address]:[world.port]")]")
SSwebhooks.send(
WEBHOOK_ROUNDPREP,
list(
@@ -108,7 +108,7 @@ var/global/datum/controller/subsystem/ticker/ticker
round_start_time = world.time // otherwise round_start_time would be 0 for the signals
if(!setup_choose_gamemode())
// It failed, go back to lobby state and re-send the welcome message
- pregame_timeleft = CONFIG_GET(number/pregame_time) // CHOMPEdit
+ pregame_timeleft = CONFIG_GET(number/pregame_time)
// SSvote.gamemode_vote_called = FALSE // Allow another autogamemode vote
current_state = GAME_STATE_PREGAME
Master.SetRunLevel(RUNLEVEL_LOBBY)
@@ -135,8 +135,8 @@ var/global/datum/controller/subsystem/ticker/ticker
if(!src.mode)
var/list/weighted_modes = list()
for(var/datum/game_mode/GM in runnable_modes)
- weighted_modes[GM.config_tag] = CONFIG_GET(keyed_list/probabilities)[GM.config_tag] // CHOMPEdit
- src.mode = config.gamemode_cache[pickweight(weighted_modes)] // CHOMPEdit
+ weighted_modes[GM.config_tag] = CONFIG_GET(keyed_list/probabilities)[GM.config_tag]
+ src.mode = config.gamemode_cache[pickweight(weighted_modes)]
else
src.mode = config.pick_mode(master_mode)
@@ -150,7 +150,7 @@ var/global/datum/controller/subsystem/ticker/ticker
job_master.DivideOccupations() // Apparently important for new antagonist system to register specific job antags properly.
if(!src.mode.can_start())
- to_world(span_danger(span_bold("Unable to start [mode.name].") + " Not enough players readied, [CONFIG_GET(keyed_list/player_requirements)[mode.config_tag]] players needed. Reverting to pregame lobby.")) // CHOMPEdit
+ to_world(span_filter_system(span_bold("Unable to start [mode.name].") + " Not enough players readied, [CONFIG_GET(keyed_list/player_requirements)[mode.config_tag]] players needed. Reverting to pregame lobby."))
mode.fail_setup()
mode = null
job_master.ResetOccupations()
@@ -198,7 +198,7 @@ var/global/datum/controller/subsystem/ticker/ticker
current_state = GAME_STATE_PLAYING
Master.SetRunLevel(RUNLEVEL_GAME)
- if(CONFIG_GET(flag/sql_enabled)) // CHOMPEdit
+ if(CONFIG_GET(flag/sql_enabled))
statistic_cycle() // Polls population totals regularly and stores them in an SQL DB -- TLE
return 1
@@ -214,7 +214,7 @@ var/global/datum/controller/subsystem/ticker/ticker
// Calculate if game and/or mode are finished (Complicated by the continuous_rounds config option)
var/game_finished = FALSE
var/mode_finished = FALSE
- if (CONFIG_GET(flag/continuous_rounds)) // Game keeps going after mode ends. // CHOMPEdit
+ if (CONFIG_GET(flag/continuous_rounds)) // Game keeps going after mode ends.
game_finished = (emergency_shuttle.returned() || mode.station_was_nuked)
mode_finished = ((end_game_state >= END_GAME_MODE_FINISHED) || mode.check_finished()) // Short circuit if already finished.
else // Game ends when mode does
diff --git a/code/datums/ai_law_sets.dm b/code/datums/ai_law_sets.dm
index 23f981b262..38d99905dc 100644
--- a/code/datums/ai_law_sets.dm
+++ b/code/datums/ai_law_sets.dm
@@ -27,7 +27,7 @@
selectable = 0
/datum/ai_laws/nanotrasen/malfunction/New()
- set_zeroth_law(CONFIG_GET(string/law_zero)) // CHOMPEdit
+ set_zeroth_law(CONFIG_GET(string/law_zero))
..()
/************* NanoTrasen Aggressive *************/
diff --git a/code/datums/helper_datums/getrev.dm b/code/datums/helper_datums/getrev.dm
index 3f68ab7eb8..d75c0b2188 100644
--- a/code/datums/helper_datums/getrev.dm
+++ b/code/datums/helper_datums/getrev.dm
@@ -1,5 +1,3 @@
-//GLOBAL_DATUM(revdata, /datum/getrev) // CHOMPEdit
-
/datum/getrev
var/branch
var/revision
@@ -50,7 +48,7 @@
var/details = ": '" + html_encode(tm.title) + "' by " + html_encode(tm.author) + " at commit " + html_encode(copytext_char(cm, 1, 11))
if(details && findtext(details, "\[s\]") && (!usr || !usr.client.holder))
continue
- . += "#[tm.number][details]" // CHOMPEdit
+ . += "#[tm.number][details]"
/client/verb/showrevinfo()
set category = "OOC.Game" //CHOMPEdit
@@ -65,8 +63,8 @@
if(GLOB.revdata.revision)
msg += span_bold("Server revision:") + " B:[GLOB.revdata.branch] D:[GLOB.revdata.date]"
- if(CONFIG_GET(string/githuburl)) // CHOMPEdit
- msg += span_bold("Commit:") + " [GLOB.revdata.revision]" // CHOMPEdit
+ if(CONFIG_GET(string/githuburl))
+ msg += span_bold("Commit:") + " [GLOB.revdata.revision]"
else
msg += span_bold("Commit:") + " [GLOB.revdata.revision]" // CHOMPEdit - Actually SHOW the revision
else
diff --git a/code/datums/managed_browsers/feedback_form.dm b/code/datums/managed_browsers/feedback_form.dm
index e1a90763ab..15bf63f535 100644
--- a/code/datums/managed_browsers/feedback_form.dm
+++ b/code/datums/managed_browsers/feedback_form.dm
@@ -19,7 +19,7 @@ GENERAL_PROTECT_DATUM(/datum/managed_browser/feedback_form)
var/feedback_hide_author = FALSE
/datum/managed_browser/feedback_form/New(client/new_client)
- feedback_topic = CONFIG_GET(str_list/sqlite_feedback_topics)[1] // CHOMPEdit
+ feedback_topic = CONFIG_GET(str_list/sqlite_feedback_topics)[1]
..(new_client)
/datum/managed_browser/feedback_form/Destroy()
@@ -29,7 +29,7 @@ GENERAL_PROTECT_DATUM(/datum/managed_browser/feedback_form)
// Privacy option is allowed if both the config allows it, and the pepper file exists and isn't blank.
/datum/managed_browser/feedback_form/proc/can_be_private()
- return CONFIG_GET(flag/sqlite_feedback_privacy) && SSsqlite.get_feedback_pepper() // CHOMPEdit
+ return CONFIG_GET(flag/sqlite_feedback_privacy) && SSsqlite.get_feedback_pepper()
/datum/managed_browser/feedback_form/display()
if(!my_client)
@@ -70,11 +70,11 @@ GENERAL_PROTECT_DATUM(/datum/managed_browser/feedback_form)
dat += my_client.ckey
dat += "
"
- var/list/sqlite_feedback_topics = CONFIG_GET(str_list/sqlite_feedback_topics) // CHOMPEdit
- if(sqlite_feedback_topics.len > 1) // CHOMPEdit
+ var/list/sqlite_feedback_topics = CONFIG_GET(str_list/sqlite_feedback_topics)
+ if(sqlite_feedback_topics.len > 1)
dat += "Topic: [href(src, list("feedback_choose_topic" = 1), feedback_topic)]
"
else
- dat += "Topic: [sqlite_feedback_topics[1]]
" // CHOMPEdit
+ dat += "Topic: [sqlite_feedback_topics[1]]
"
dat += "
"
if(feedback_body)
@@ -85,7 +85,7 @@ GENERAL_PROTECT_DATUM(/datum/managed_browser/feedback_form)
dat += href(src, list("feedback_edit_body" = 1), "Edit")
dat += "