upstream-merge-16484 [MDB IGNORE] (#9289)

Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
Selis
2024-10-25 21:39:18 +02:00
committed by GitHub
parent b32c1ed032
commit 026253a175
277 changed files with 471452 additions and 36179 deletions

View File

@@ -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

View File

@@ -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.?

View File

@@ -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)

View File

@@ -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)

View File

@@ -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

View File

@@ -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

View File

@@ -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)

View File

@@ -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)

View File

@@ -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]")

View File

@@ -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

View File

@@ -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)

View File

@@ -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.

View File

@@ -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

View File

@@ -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))

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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.
*/

View File

@@ -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

View File

@@ -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)

View File

@@ -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

View File

@@ -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!")

View File

@@ -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))

View File

@@ -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)

View File

@@ -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)

View File

@@ -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)

View File

@@ -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.

View File

@@ -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

View File

@@ -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

View File

@@ -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 *************/

View File

@@ -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
. += "<a href=\"[CONFIG_GET(string/githuburl)]/pull/[tm.number]\">#[tm.number][details]</a>" // CHOMPEdit
. += "<a href=\"[CONFIG_GET(string/githuburl)]/pull/[tm.number]\">#[tm.number][details]</a>"
/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:") + " <a href='[CONFIG_GET(string/githuburl)]/commit/[GLOB.revdata.revision]'>[GLOB.revdata.revision]</a>" // CHOMPEdit
if(CONFIG_GET(string/githuburl))
msg += span_bold("Commit:") + " <a href='[CONFIG_GET(string/githuburl)]/commit/[GLOB.revdata.revision]'>[GLOB.revdata.revision]</a>"
else
msg += span_bold("Commit:") + " [GLOB.revdata.revision]" // CHOMPEdit - Actually SHOW the revision
else

View File

@@ -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 += "<br>"
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)]<br>"
else
dat += "Topic: [sqlite_feedback_topics[1]]<br>" // CHOMPEdit
dat += "Topic: [sqlite_feedback_topics[1]]<br>"
dat += "<br>"
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 += "<hr>"
if(CONFIG_GET(number/sqlite_feedback_cooldown)) // CHOMPEdit
if(CONFIG_GET(number/sqlite_feedback_cooldown))
dat += "<i>Please note that you will have to wait [CONFIG_GET(number/sqlite_feedback_cooldown)] day\s before \
being able to write more feedback after submitting.</i><br>"
@@ -113,7 +113,7 @@ GENERAL_PROTECT_DATUM(/datum/managed_browser/feedback_form)
return
if(href_list["feedback_choose_topic"])
feedback_topic = tgui_input_list(my_client, "Choose the topic you want to submit your feedback under.", "Feedback Topic", CONFIG_GET(str_list/sqlite_feedback_topics)) // CHOMPEdit
feedback_topic = tgui_input_list(my_client, "Choose the topic you want to submit your feedback under.", "Feedback Topic", CONFIG_GET(str_list/sqlite_feedback_topics))
display()
return

View File

@@ -143,7 +143,7 @@
if(href_list["filter_topic"])
var/topic_to_search = tgui_input_text(my_client, "Write desired topic here. Partial topics are allowed. \
\nThe current topics in the config are [english_list(CONFIG_GET(str_list/sqlite_feedback_topics))].", "Filter by Topic", null) // CHOMPEdit
\nThe current topics in the config are [english_list(CONFIG_GET(str_list/sqlite_feedback_topics))].", "Filter by Topic", null)
if(topic_to_search)
last_query = feedback_filter(SQLITE_FEEDBACK_COLUMN_TOPIC, topic_to_search)

View File

@@ -56,7 +56,7 @@ var/DB_PORT = 3306 // This is the port your MySQL server is running on (3306 is
_db_con = _dm_db_new_con()
/DBConnection/proc/Connect(dbi_handler=src.dbi,user_handler=src.user,password_handler=src.password,cursor_handler)
if(!config.sql_enabled)
if(!CONFIG_GET(flag/sql_enabled))
return 0
if(!src) return 0
cursor_handler = src.default_cursor
@@ -66,7 +66,7 @@ var/DB_PORT = 3306 // This is the port your MySQL server is running on (3306 is
/DBConnection/proc/Disconnect() return _dm_db_close(_db_con)
/DBConnection/proc/IsConnected()
if(!config.sql_enabled) return 0
if(!CONFIG_GET(flag/sql_enabled)) return 0
var/success = _dm_db_is_connected(_db_con)
return success
@@ -76,8 +76,8 @@ var/DB_PORT = 3306 // This is the port your MySQL server is running on (3306 is
/DBConnection/proc/SelectDB(database_name,dbi)
if(IsConnected()) Disconnect()
//return Connect("[dbi?"[dbi]":"dbi:mysql:[database_name]:[DB_SERVER]:[DB_PORT]"]",user,password)
return Connect("[dbi?"[dbi]":"dbi:mysql:[database_name]:[sqladdress]:[sqlport]"]",user,password)
/DBConnection/proc/NewQuery(sql_query,cursor_handler=src.default_cursor) return new/datum/db_query(sql_query,src,cursor_handler)
return Connect("[dbi?"[dbi]":"dbi:mysql:[database_name]:[CONFIG_GET(string/address)]:[CONFIG_GET(number/port)]"]",user,password)
/DBConnection/proc/NewQuery(sql_query,cursor_handler=src.default_cursor) return new/DBQuery(sql_query,src,cursor_handler)
/datum/db_query/New(sql_query,DBConnection/connection_handler,cursor_handler)

View File

@@ -1,5 +1,5 @@
/proc/sql_poll_population()
if(!CONFIG_GET(flag/enable_stat_tracking)) // CHOMPEdit
if(!CONFIG_GET(flag/enable_stat_tracking))
return
var/admincount = GLOB.admins.len
var/playercount = 0
@@ -19,15 +19,15 @@
/proc/sql_report_round_start()
// TODO
if(!CONFIG_GET(flag/enable_stat_tracking)) // CHOMPEdit
if(!CONFIG_GET(flag/enable_stat_tracking))
return
/proc/sql_report_round_end()
// TODO
if(!CONFIG_GET(flag/enable_stat_tracking)) // CHOMPEdit
if(!CONFIG_GET(flag/enable_stat_tracking))
return
/proc/sql_report_death(var/mob/living/carbon/human/H)
if(!CONFIG_GET(flag/enable_stat_tracking)) // CHOMPEdit
if(!CONFIG_GET(flag/enable_stat_tracking))
return
if(!H)
return
@@ -62,7 +62,7 @@
/proc/sql_report_cyborg_death(var/mob/living/silicon/robot/H)
if(!CONFIG_GET(flag/enable_stat_tracking)) // CHOMPEdit
if(!CONFIG_GET(flag/enable_stat_tracking))
return
if(!H)
return
@@ -98,7 +98,7 @@
/proc/statistic_cycle()
set waitfor = 0
if(!CONFIG_GET(flag/enable_stat_tracking)) // CHOMPEdit
if(!CONFIG_GET(flag/enable_stat_tracking))
return
while(1)
sql_poll_population()

View File

@@ -63,7 +63,7 @@ var/datum/antagonist/borer/borers
borer.forceMove(get_turf(pick(get_vents())))
/datum/antagonist/borer/attempt_random_spawn()
if(CONFIG_GET(flag/aliens_allowed)) ..() // CHOMPEdit
if(CONFIG_GET(flag/aliens_allowed)) ..()
/datum/antagonist/borer/proc/get_vents()
var/list/vents = list()

View File

@@ -27,7 +27,7 @@ var/datum/antagonist/xenos/xenomorphs
xenomorphs = src
/datum/antagonist/xenos/attempt_random_spawn()
if(CONFIG_GET(flag/aliens_allowed)) ..() // CHOMPEdit
if(CONFIG_GET(flag/aliens_allowed)) ..()
/datum/antagonist/xenos/proc/get_vents()
var/list/vents = list()

View File

@@ -91,7 +91,7 @@
get_starting_locations()
if(!role_text_plural)
role_text_plural = role_text
if(CONFIG_GET(flag/protect_roles_from_antagonist)) // CHOMPEdit
if(CONFIG_GET(flag/protect_roles_from_antagonist))
restricted_jobs |= protected_jobs
if(antaghud_indicator)
if(!hud_icon_reference)
@@ -112,7 +112,7 @@
if(ghosts_only && !istype(player.current, /mob/observer/dead))
candidates -= player
log_debug("[key_name(player)] is not eligible to become a [role_text]: Only ghosts may join as this role! They have been removed from the draft.")
else if(CONFIG_GET(flag/use_age_restriction_for_antags) && player.current.client.player_age < minimum_player_age) // CHOMPEdit
else if(CONFIG_GET(flag/use_age_restriction_for_antags) && player.current.client.player_age < minimum_player_age)
candidates -= player
log_debug("[key_name(player)] is not eligible to become a [role_text]: Is only [player.current.client.player_age] day\s old, has to be [minimum_player_age] day\s!")
else if(player.special_role)

View File

@@ -106,13 +106,13 @@
to_chat(player.current, span_notice("[leader_welcome_text]"))
else
to_chat(player.current, span_notice("[welcome_text]"))
if (CONFIG_GET(flag/objectives_disabled)) // CHOMPEdit
if (CONFIG_GET(flag/objectives_disabled))
to_chat(player.current, span_notice("[antag_text]"))
if((flags & ANTAG_HAS_NUKE) && !spawned_nuke)
create_nuke()
if (!CONFIG_GET(flag/objectives_disabled)) // CHOMPEdit
if (!CONFIG_GET(flag/objectives_disabled))
show_objectives(player)
return 1

View File

@@ -8,7 +8,7 @@
if(!ignore_role)
if(player.assigned_role in restricted_jobs)
return FALSE
if(CONFIG_GET(flag/protect_roles_from_antagonist) && (player.assigned_role in protected_jobs)) // CHOMPEdit
if(CONFIG_GET(flag/protect_roles_from_antagonist) && (player.assigned_role in protected_jobs))
return FALSE
if(avoid_silicons)
var/datum/job/J = SSjob.get_job(player.assigned_role)

View File

@@ -1,12 +1,12 @@
/datum/antagonist/proc/create_global_objectives()
if(CONFIG_GET(flag/objectives_disabled)) // CHOMPEdit
if(CONFIG_GET(flag/objectives_disabled))
return 0
if(global_objectives && global_objectives.len)
return 0
return 1
/datum/antagonist/proc/create_objectives(var/datum/mind/player)
if(CONFIG_GET(flag/objectives_disabled)) // CHOMPEdit
if(CONFIG_GET(flag/objectives_disabled))
return 0
if(create_global_objectives() || global_objectives.len)
player.objectives |= global_objectives
@@ -17,7 +17,7 @@
/datum/antagonist/proc/check_victory()
var/result = 1
if(CONFIG_GET(flag/objectives_disabled)) // CHOMPEdit
if(CONFIG_GET(flag/objectives_disabled))
return 1
if(global_objectives && global_objectives.len)
for(var/datum/objective/O in global_objectives)

View File

@@ -23,7 +23,7 @@ var/datum/antagonist/ninja/ninjas
ninjas = src
/datum/antagonist/ninja/attempt_random_spawn()
if(CONFIG_GET(flag/ninjas_allowed)) ..() // CHOMPEdit
if(CONFIG_GET(flag/ninjas_allowed)) ..()
/datum/antagonist/ninja/create_objectives(var/datum/mind/ninja)

View File

@@ -152,7 +152,7 @@ var/datum/antagonist/raider/raiders
var/win_msg = ""
//No objectives, go straight to the feedback.
if(CONFIG_GET(flag/objectives_disabled) || !global_objectives.len) // CHOMPEdit
if(CONFIG_GET(flag/objectives_disabled) || !global_objectives.len)
return
var/success = global_objectives.len

View File

@@ -428,7 +428,7 @@
occupantData["isViableSubject"] = 0
occupantData["health"] = connected.occupant.health
occupantData["maxHealth"] = connected.occupant.maxHealth
occupantData["minHealth"] = CONFIG_GET(number/health_threshold_dead) // CHOMPEdit
occupantData["minHealth"] = CONFIG_GET(number/health_threshold_dead)
occupantData["uniqueEnzymes"] = connected.occupant.dna.unique_enzymes
occupantData["uniqueIdentity"] = connected.occupant.dna.uni_identity
occupantData["structuralEnzymes"] = connected.occupant.dna.struc_enzymes

View File

@@ -277,7 +277,7 @@ var/list/sacrificed = list()
H.sdisabilities &= ~BLIND
for(var/obj/item/organ/E in H.bad_external_organs)
var/obj/item/organ/external/affected = E
if((affected.damage < affected.min_broken_damage * CONFIG_GET(number/organ_health_multiplier)) && (affected.status & ORGAN_BROKEN)) // CHOMPEdit
if((affected.damage < affected.min_broken_damage * CONFIG_GET(number/organ_health_multiplier)) && (affected.status & ORGAN_BROKEN))
affected.status &= ~ORGAN_BROKEN
for(var/datum/wound/W in affected.wounds)
if(istype(W, /datum/wound/internal_bleeding))

View File

@@ -109,7 +109,7 @@
if(src.imprinted != "empty")
to_chat(U, span_danger("Capture failed!") + ": The soul stone has already been imprinted with [src.imprinted]'s mind!")
return
if ((T.health + T.halloss) > CONFIG_GET(number/health_threshold_crit) && T.stat != DEAD) // CHOMPEdit
if ((T.health + T.halloss) > CONFIG_GET(number/health_threshold_crit) && T.stat != DEAD)
to_chat(U, span_danger("Capture failed!") + ": Kill or maim the victim first!")
return
if(T.client == null)

View File

@@ -3,7 +3,7 @@
hadevent = 1
message_admins("The apocalypse has begun! (this holiday event can be disabled by toggling events off within 60 seconds)")
spawn(600)
if(!CONFIG_GET(flag/allow_random_events)) return // CHOMPEdit
if(!CONFIG_GET(flag/allow_random_events)) return
Show2Group4Delay(ScreenText(null,"<center><font color='red' size='8'>GAME OVER</font></center>"),null,150)
for(var/i=1,i<=4,i++)
spawn_dynamic_event()

View File

@@ -148,10 +148,10 @@ var/global/list/additional_antag_types = list()
playerC++
if(master_mode=="secret")
if(playerC < CONFIG_GET(keyed_list/player_requirements_secret)[config_tag]) // CHOMPEdit
if(playerC < CONFIG_GET(keyed_list/player_requirements_secret)[config_tag])
return 0
else
if(playerC < CONFIG_GET(keyed_list/player_requirements)[config_tag]) // CHOMPEdit
if(playerC < CONFIG_GET(keyed_list/player_requirements)[config_tag])
return 0
if(!(antag_templates && antag_templates.len))
@@ -273,7 +273,7 @@ var/global/list/additional_antag_types = list()
for(var/datum/antagonist/antag in antag_templates)
if(!antag.antags_are_dead())
return 0
if(CONFIG_GET(flag/continuous_rounds)) // CHOMPEdit
if(CONFIG_GET(flag/continuous_rounds))
emergency_shuttle.auto_recall = 0
return 0
return 1
@@ -473,7 +473,7 @@ var/global/list/additional_antag_types = list()
/datum/game_mode/proc/create_antagonists()
if(!CONFIG_GET(flag/traitor_scaling)) // CHOMPEdit
if(!CONFIG_GET(flag/traitor_scaling))
antag_scaling_coeff = 0
if(antag_tags && antag_tags.len)

View File

@@ -33,7 +33,7 @@ var/list/nuke_disks = list()
return 0
/datum/game_mode/nuclear/declare_completion()
if(CONFIG_GET(flag/objectives_disabled)) // CHOMPEdit
if(CONFIG_GET(flag/objectives_disabled))
..()
return
var/disk_rescued = 1

View File

@@ -44,7 +44,7 @@
for(var/obj/item/organ/E in H.bad_external_organs) // Fix bones
var/obj/item/organ/external/affected = E
if((affected.damage < affected.min_broken_damage * CONFIG_GET(number/organ_health_multiplier)) && (affected.status & ORGAN_BROKEN)) // CHOMPEdit
if((affected.damage < affected.min_broken_damage * CONFIG_GET(number/organ_health_multiplier)) && (affected.status & ORGAN_BROKEN))
affected.status &= ~ORGAN_BROKEN
for(var/datum/wound/W in affected.wounds) // Fix IB

View File

@@ -24,7 +24,7 @@
) */ //VOREStation Removal: no alt-titles for visitors
/datum/job/assistant/get_access()
if(CONFIG_GET(flag/assistant_maint)) // CHOMPEdit
if(CONFIG_GET(flag/assistant_maint))
return list(access_maint_tunnels)
else
return list()

View File

@@ -78,11 +78,11 @@
/datum/job/intern/New()
..()
if(config)
total_positions = CONFIG_GET(number/limit_interns) // CHOMPEdit
spawn_positions = CONFIG_GET(number/limit_interns) // CHOMPEdit
total_positions = CONFIG_GET(number/limit_interns)
spawn_positions = CONFIG_GET(number/limit_interns)
/datum/job/intern/get_access()
if(CONFIG_GET(flag/assistant_maint)) // CHOMPEdit
if(CONFIG_GET(flag/assistant_maint))
return list(access_maint_tunnels)
else
return list()
@@ -103,8 +103,8 @@
/datum/job/assistant/New()
..()
if(config)
total_positions = CONFIG_GET(number/limit_visitors) // CHOMPEdit
spawn_positions = CONFIG_GET(number/limit_visitors) // CHOMPEdit
total_positions = CONFIG_GET(number/limit_visitors)
spawn_positions = CONFIG_GET(number/limit_visitors)
/datum/job/assistant/get_access()
return list()

View File

@@ -102,7 +102,7 @@
. = outfit.equip_base(H, title, alt_title)
/datum/job/proc/get_access()
if(!config || CONFIG_GET(flag/jobs_have_minimal_access)) // CHOMPEdit
if(!config || CONFIG_GET(flag/jobs_have_minimal_access))
return src.minimal_access.Copy()
else
return src.access.Copy()
@@ -112,7 +112,7 @@
return (available_in_days(C) == 0) //Available in 0 days = available right now = player is old enough to play.
/datum/job/proc/available_in_days(client/C)
if(C && CONFIG_GET(flag/use_age_restriction_for_jobs) && isnum(C.player_age) && isnum(minimal_player_age)) // CHOMPEdit
if(C && CONFIG_GET(flag/use_age_restriction_for_jobs) && isnum(C.player_age) && isnum(minimal_player_age))
return max(0, minimal_player_age - C.player_age)
return 0

View File

@@ -30,7 +30,7 @@
return (available_in_playhours(C) == 0)
/datum/job/proc/available_in_playhours(client/C)
if(C && CONFIG_GET(flag/use_playtime_restriction_for_jobs) && dept_time_required) // CHOMPEdit
if(C && CONFIG_GET(flag/use_playtime_restriction_for_jobs) && dept_time_required)
if(isnum(C.play_hours[pto_type])) // Has played that department before
return max(0, dept_time_required - C.play_hours[pto_type])
else // List doesn't have that entry, maybe never played, maybe invalid PTO type (you should fix that...)
@@ -41,7 +41,7 @@
// Captain gets every department combined
/datum/job/captain/available_in_playhours(client/C)
if(C && CONFIG_GET(flag/use_playtime_restriction_for_jobs) && dept_time_required) // CHOMPEdit
if(C && CONFIG_GET(flag/use_playtime_restriction_for_jobs) && dept_time_required)
var/remaining_time_needed = dept_time_required
for(var/key in C.play_hours)
if(isnum(C.play_hours[key]) && !(key == PTO_TALON))
@@ -51,7 +51,7 @@
// HoP gets civilian, cargo, and exploration combined
/datum/job/hop/available_in_playhours(client/C)
if(C && CONFIG_GET(flag/use_playtime_restriction_for_jobs) && dept_time_required) // CHOMPEdit
if(C && CONFIG_GET(flag/use_playtime_restriction_for_jobs) && dept_time_required)
var/remaining_time_needed = dept_time_required
if(isnum(C.play_hours[PTO_CIVILIAN]))
remaining_time_needed = max(0, remaining_time_needed - C.play_hours[PTO_CIVILIAN])

View File

@@ -125,7 +125,7 @@
title = JOB_ALT_FOOL
/datum/job/clown/get_access()
if(CONFIG_GET(flag/assistant_maint)) // CHOMPEdit
if(CONFIG_GET(flag/assistant_maint))
return list(access_maint_tunnels, access_entertainment, access_clown, access_tomfoolery)
else
return list(access_entertainment, access_clown, access_tomfoolery)
@@ -153,7 +153,7 @@
title = JOB_ALT_PASEUR
/datum/job/mime/get_access()
if(CONFIG_GET(flag/assistant_maint)) // CHOMPEdit
if(CONFIG_GET(flag/assistant_maint))
return list(access_maint_tunnels, access_entertainment, access_tomfoolery, access_mime)
else
return list(access_entertainment, access_tomfoolery, access_mime)

View File

@@ -599,7 +599,7 @@ var/global/datum/controller/occupations/job_master
return H
/datum/controller/occupations/proc/LoadJobs(jobsfile) //ran during round setup, reads info from jobs.txt -- Urist
if(!CONFIG_GET(flag/load_jobs_from_txt)) // CHOMPEdit
if(!CONFIG_GET(flag/load_jobs_from_txt))
return 0
var/list/jobEntries = file2list(jobsfile)

View File

@@ -3,7 +3,7 @@
GLOBAL_LIST_EMPTY(whitelist) // CHOMPEdit - Managed Globals
/hook/startup/proc/loadWhitelist()
if(CONFIG_GET(flag/usewhitelist)) // CHOMPEdit
if(CONFIG_GET(flag/usewhitelist))
load_whitelist()
return 1
@@ -21,7 +21,7 @@ GLOBAL_LIST_EMPTY(whitelist) // CHOMPEdit - Managed Globals
GLOBAL_LIST_EMPTY(alien_whitelist) // CHOMPEdit - Managed Globals
/hook/startup/proc/loadAlienWhitelist()
if(CONFIG_GET(flag/usealienwhitelist)) // CHOMPEdit
if(CONFIG_GET(flag/usealienwhitelist))
load_alienwhitelist()
return 1
@@ -113,7 +113,7 @@ GLOBAL_LIST_EMPTY(alien_whitelist) // CHOMPEdit - Managed Globals
return 1
/proc/whitelist_overrides(mob/M)
if(!CONFIG_GET(flag/usealienwhitelist)) // CHOMPEdit
if(!CONFIG_GET(flag/usealienwhitelist))
return TRUE
if(check_rights(R_ADMIN|R_EVENT, 0, M))
return TRUE

View File

@@ -190,7 +190,7 @@
occupantData["stat"] = occupant.stat
occupantData["health"] = occupant.health
occupantData["maxHealth"] = occupant.maxHealth
occupantData["minHealth"] = CONFIG_GET(number/health_threshold_dead) // CHOMPEdit
occupantData["minHealth"] = CONFIG_GET(number/health_threshold_dead)
occupantData["bruteLoss"] = occupant.getBruteLoss()
occupantData["oxyLoss"] = occupant.getOxyLoss()
occupantData["toxLoss"] = occupant.getToxLoss()

View File

@@ -68,7 +68,7 @@
occupantData["stat"] = occupant.stat
occupantData["health"] = occupant.health
occupantData["maxHealth"] = occupant.maxHealth
occupantData["minHealth"] = CONFIG_GET(number/health_threshold_dead) // CHOMPEdit
occupantData["minHealth"] = CONFIG_GET(number/health_threshold_dead)
occupantData["bruteLoss"] = occupant.getBruteLoss()
occupantData["oxyLoss"] = occupant.getOxyLoss()
occupantData["toxLoss"] = occupant.getToxLoss()

View File

@@ -336,7 +336,7 @@
set_temp("Error: Not enough biomass.", "danger")
else if(pod.mess)
set_temp("Error: The cloning pod is malfunctioning.", "danger")
else if(!CONFIG_GET(flag/revival_cloning)) // CHOMPEdit
else if(!CONFIG_GET(flag/revival_cloning))
set_temp("Error: Unable to initiate cloning cycle.", "danger")
else
cloneresult = pod.growclone(C)

View File

@@ -102,7 +102,7 @@
"timeoff_factor" = job.timeoff_factor,
"pto_department" = job.pto_type
)
if(CONFIG_GET(flag/time_off) && CONFIG_GET(flag/pto_job_change)) // CHOMPEdit
if(CONFIG_GET(flag/time_off) && CONFIG_GET(flag/pto_job_change))
data["allow_change_job"] = TRUE
if(job && job.timeoff_factor < 0) // Currently are Off Duty, so gotta lookup what on-duty jobs are open
data["job_choices"] = getOpenOnDutyJobs(user, job.pto_type)

View File

@@ -113,7 +113,7 @@
occupantData["stat"] = occupant.stat
occupantData["health"] = occupant.health
occupantData["maxHealth"] = occupant.getMaxHealth()
occupantData["minHealth"] = CONFIG_GET(number/health_threshold_dead) // CHOMPEdit
occupantData["minHealth"] = CONFIG_GET(number/health_threshold_dead)
occupantData["bruteLoss"] = occupant.getBruteLoss()
occupantData["oxyLoss"] = occupant.getOxyLoss()
occupantData["toxLoss"] = occupant.getToxLoss()

View File

@@ -19,7 +19,7 @@ generic_filth = TRUE means when the decal is saved, it will be switched out for
age = _age
if(random_icon_states && length(src.random_icon_states) > 0)
src.icon_state = pick(src.random_icon_states)
if(!mapload || !CONFIG_GET(flag/persistence_ignore_mapload)) // CHOMPEdit
if(!mapload || !CONFIG_GET(flag/persistence_ignore_mapload))
SSpersistence.track_value(src, /datum/persistent/filth)
jan_icon = new/obj/effect/decal/jan_hud(src.loc)
. = ..()

View File

@@ -1,7 +1,7 @@
//TODO: Flash range does nothing currently
/proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impact_range, flash_range, adminlog = 1, z_transfer = UP|DOWN, shaped)
var/multi_z_scalar = CONFIG_GET(number/multi_z_explosion_scalar) // CHOMPEdit
var/multi_z_scalar = CONFIG_GET(number/multi_z_explosion_scalar)
spawn(0)
var/start = world.timeofday
epicenter = get_turf(epicenter)
@@ -74,7 +74,7 @@
var/x0 = epicenter.x
var/y0 = epicenter.y
var/z0 = epicenter.z
if(CONFIG_GET(flag/use_recursive_explosions)) // CHOMPEdit
if(CONFIG_GET(flag/use_recursive_explosions))
var/power = devastation_range * 2 + heavy_impact_range + light_impact_range //The ranges add up, ie light 14 includes both heavy 7 and devestation 3. So this calculation means devestation counts for 4, heavy for 2 and light for 1 power, giving us a cap of 27 power.
explosion_rec(epicenter, power, shaped)
else

View File

@@ -59,7 +59,7 @@
/obj/item/toy/nanotrasenballoon,
/obj/item/toy/syndicateballoon,
/obj/item/aiModule/syndicate,
/obj/item/book/manual/wiki/engineering_hacking, // CHOMPEdit
/obj/item/book/manual/wiki/engineering_hacking,
/obj/item/card/emag,
/obj/item/card/emag_broken,
/obj/item/card/id/syndicate,

View File

@@ -111,7 +111,7 @@
to_chat(user, "You finish drawing.")
var/msg = "[user.client.key] ([user]) has drawn [drawtype] (with [src]) at [target.x],[target.y],[target.z]."
if(CONFIG_GET(flag/log_graffiti)) // CHOMPEdit
if(CONFIG_GET(flag/log_graffiti))
message_admins(msg)
log_game(msg) //We will log it anyways.

View File

@@ -290,7 +290,7 @@
if(confirm != "Yes")
return
if(CONFIG_GET(flag/antag_hud_restricted) && has_enabled_antagHUD == 1) // CHOMPEdit
if(CONFIG_GET(flag/antag_hud_restricted) && has_enabled_antagHUD == 1)
to_chat(src, span_danger("You have used the antagHUD and cannot respawn or use communicators!"))
return

View File

@@ -299,10 +299,10 @@
H.updatehealth()
if(H.isSynthetic())
if(H.health + H.getOxyLoss() + H.getToxLoss() <= CONFIG_GET(number/health_threshold_dead)) // CHOMPEdit
if(H.health + H.getOxyLoss() + H.getToxLoss() <= CONFIG_GET(number/health_threshold_dead))
return "buzzes, \"Resuscitation failed - Severe damage detected. Begin manual repair before further attempts futile.\""
else if(H.health + H.getOxyLoss() <= CONFIG_GET(number/health_threshold_dead) || (HUSK in H.mutations) || !H.can_defib) // CHOMPEdit
else if(H.health + H.getOxyLoss() <= CONFIG_GET(number/health_threshold_dead) || (HUSK in H.mutations) || !H.can_defib)
return "buzzes, \"Resuscitation failed - Severe tissue damage makes recovery of patient impossible via defibrillator. Further attempts futile.\""
var/bad_vital_organ = check_vital_organs(H)
@@ -435,7 +435,7 @@
H.apply_damage(burn_damage_amt, BURN, BP_TORSO)
//set oxyloss so that the patient is just barely in crit, if possible
var/barely_in_crit = CONFIG_GET(number/health_threshold_crit) - 1 // CHOMPEdit
var/barely_in_crit = CONFIG_GET(number/health_threshold_crit) - 1
var/adjust_health = barely_in_crit - H.health //need to increase health by this much
H.adjustOxyLoss(-adjust_health)

View File

@@ -17,7 +17,7 @@
age = _age
/obj/item/trash/Initialize(mapload)
if(!mapload || !CONFIG_GET(flag/persistence_ignore_mapload)) // CHOMPEdit
if(!mapload || !CONFIG_GET(flag/persistence_ignore_mapload))
SSpersistence.track_value(src, /datum/persistent/filth/trash)
. = ..()

View File

@@ -5,30 +5,6 @@
due_date = 0 // Game time in 1/10th seconds
unique = 1 // 0 - Normal book, 1 - Should not be treated as normal book, unable to be copied, unable to be modified
/* CHOMPEdit Start
/obj/item/book/manual/engineering_construction
name = "Station Repairs and Construction"
icon_state ="bookEngineering"
item_state = "book3"
author = "Engineering Encyclopedia" // Who wrote the thing, can be changed by pen or PC. It is not automatically assigned
title = "Station Repairs and Construction"
/obj/item/book/manual/engineering_construction/New()
..()
dat = {"
<html><head>
</head>
<body>
<iframe width='100%' height='97%' src="[CONFIG_GET(string/wikiurl)]Guide_to_Construction&printable=yes&remove_links=1" frameborder="0" id="main_frame"></iframe>
</body>
</html>
"}
*/ // CHOMPEdit End
/obj/item/book/manual/engineering_particle_accelerator
name = "Particle Accelerator User's Guide"
icon_state ="bookParticleAccelerator"
@@ -320,30 +296,6 @@
</body>
</html>"} // CHOMPedit END : Updating the R-UST manual
/* CHOMPEdit Start
/obj/item/book/manual/engineering_hacking
name = "Hacking"
icon_state ="bookHacking"
item_state = "book2"
author = "Engineering Encyclopedia" // Who wrote the thing, can be changed by pen or PC. It is not automatically assigned
title = "Hacking"
/obj/item/book/manual/engineering_hacking/New()
..()
dat = {"
<html><head>
</head>
<body>
<iframe width='100%' height='97%' src="[CONFIG_GET(string/wikiurl)]Hacking&printable=yes&remove_links=1" frameborder="0" id="main_frame"></iframe>
</body>
</html>
"}
*/ // CHOMPEdit End
/obj/item/book/manual/engineering_singularity_safety
name = "Singularity Safety in Special Circumstances"
icon_state ="bookEngineeringSingularitySafety"
@@ -677,26 +629,6 @@
</html>
"}
/* CHOMPEdit Start
/obj/item/book/manual/robotics_manual
name = "Guide to Robotics"
icon_state ="evabook"
item_state = "book3"
author = "Simple Robotics" // Who wrote the thing, can be changed by pen or PC. It is not automatically assigned
title = "Guide to Robotics"
/obj/item/book/manual/robotics_manual/New()
..()
dat = {"
<html><head>
</head>
<body>
<iframe width='100%' height='97%' src="[CONFIG_GET(string/wikiurl)]Guide_to_Robotics&printable=yes&remove_links=1" frameborder="0" id="main_frame"></iframe>
</body>
</html>
"}
*/ // CHOMPEdit End
/obj/item/book/manual/robotics_cyborgs
name = JOB_CYBORG + "s for Dummies"
icon_state = "borgbook"
@@ -902,104 +834,6 @@
</html>
"}
/* CHOMPEdit Start
/obj/item/book/manual/security_space_law
name = "Corporate Regulations"
desc = "A set of corporate guidelines for keeping law and order on privately-owned space stations."
icon_state = "bookSpaceLaw"
item_state = "book13"
author = "The Company"
title = "Corporate Regulations"
/obj/item/book/manual/security_space_law/New()
..()
dat = {"
<html><head>
</head>
<body>
<iframe width='100%' height='97%' src="[CONFIG_GET(string/wikiurl)]Corporate_Regulations&printable=yes&remove_links=1" frameborder="0" id="main_frame"></iframe>
</body>
</html>
"}
/obj/item/book/manual/medical_diagnostics_manual
name = "Medical Diagnostics Manual"
desc = "First, do no harm. A detailed medical practitioner's guide."
icon_state = "bookMedical"
item_state = "book12"
author = "Medical Department"
title = "Medical Diagnostics Manual"
/obj/item/book/manual/medical_diagnostics_manual/New()
..()
dat = {"<html>
<head>
<style>
h1 {font-size: 18px; margin: 15px 0px 5px;}
h2 {font-size: 15px; margin: 15px 0px 5px;}
li {margin: 2px 0px 2px 15px;}
ul {margin: 5px; padding: 0px;}
ol {margin: 5px; padding: 0px 15px;}
body {font-size: 13px; font-family: Verdana;}
</style>
</head>
<body>
<br>
<h1>The Oath</h1>
<i>The Medical Oath sworn by recognised medical practitioners in the employ of [using_map.company_name]</i><br>
<ol>
<li>Now, as a new doctor, I solemnly promise that I will, to the best of my ability, serve humanity-caring for the sick, promoting good health, and alleviating pain and suffering.</li>
<li>I recognise that the practice of medicine is a privilege with which comes considerable responsibility and I will not abuse my position.</li>
<li>I will practise medicine with integrity, humility, honesty, and compassion-working with my fellow doctors and other colleagues to meet the needs of my patients.</li>
<li>I shall never intentionally do or administer anything to the overall harm of my patients.</li>
<li>I will not permit considerations of gender, race, religion, political affiliation, sexual orientation, nationality, or social standing to influence my duty of care.</li>
<li>I will oppose policies in breach of human rights and will not participate in them. I will strive to change laws that are contrary to my profession's ethics and will work towards a fairer distribution of health resources.</li>
<li>I will assist my patients to make informed decisions that coincide with their own values and beliefs and will uphold patient confidentiality.</li>
<li>I will recognise the limits of my knowledge and seek to maintain and increase my understanding and skills throughout my professional life. I will acknowledge and try to remedy my own mistakes and honestly assess and respond to those of others.</li>
<li>I will seek to promote the advancement of medical knowledge through teaching and research.</li>
<li>I make this declaration solemnly, freely, and upon my honour.</li>
</ol><br>
<HR COLOR="steelblue" WIDTH="60%" ALIGN="LEFT">
<iframe width='100%' height='100%' src="[CONFIG_GET(string/wikiurl)]Guide_to_Medicine&printable=yes&removelinks=1" frameborder="0" id="main_frame"></iframe>
</body>
</html>
"}
/obj/item/book/manual/engineering_guide
name = "Engineering Textbook"
icon_state ="bookEngineering2"
item_state = "book3"
author = "Engineering Encyclopedia"
title = "Engineering Textbook"
/obj/item/book/manual/engineering_guide/New()
..()
dat = {"
<html><head>
</head>
<body>
<iframe width='100%' height='100%' src="[CONFIG_GET(string/wikiurl)]Guide_to_Engineering&printable=yes&remove_links=1" frameborder="0" id="main_frame"></iframe> </body>
</html>
"}
*/ // CHOMPEdit End
/obj/item/book/manual/chef_recipes
name = JOB_CHEF + " Recipes"
icon_state = "cooked_book"

View File

@@ -6,7 +6,7 @@
author = "NanoTrasen"
title = "Standard Operating Procedure"
/obj/item/book/manual/standard_operating_procedure/Initialize() // CHOMPEdit
/obj/item/book/manual/standard_operating_procedure/Initialize()
..()
dat = {"
@@ -29,7 +29,7 @@
author = "Jeremiah Acacius"
title = "Corporate Regulations"
/obj/item/book/manual/command_guide/Initialize() // CHOMPEdit
/obj/item/book/manual/command_guide/Initialize()
..()
dat = {"

View File

@@ -36,7 +36,7 @@
var/wiki_url = CONFIG_GET(string/wikiurl)
if(!wiki_url)
//user.balloon_alert(user, "this book is empty!")
to_chat(user, "this book is empty!")
to_chat(user, span_info("this book is empty!"))
return
//credit_book_to_reader(user)
@@ -91,7 +91,7 @@
var/wiki_url = CONFIG_GET(string/wikiurl)
if(!wiki_url)
//user.balloon_alert(user, "this book is empty!")
to_chat(user, "this book is empty!")
to_chat(user, span_info("this book is empty!"))
return
var/dat = {"<html>

View File

@@ -122,7 +122,7 @@
return
if(usr.stat || usr.restrained())
return
if(ismouse(usr) || (isobserver(usr) && !CONFIG_GET(flag/ghost_interaction))) // CHOMPEdit
if(ismouse(usr) || (isobserver(usr) && !CONFIG_GET(flag/ghost_interaction)))
return
src.set_dir(turn(src.dir, 270))
@@ -141,7 +141,7 @@
return
if(usr.stat || usr.restrained())
return
if(ismouse(usr) || (isobserver(usr) && !CONFIG_GET(flag/ghost_interaction))) // CHOMPEdit
if(ismouse(usr) || (isobserver(usr) && !CONFIG_GET(flag/ghost_interaction)))
return
src.set_dir(turn(src.dir, 90))

View File

@@ -75,7 +75,7 @@
return
if(usr.stat || usr.restrained())
return
if(ismouse(usr) || (isobserver(usr) && !CONFIG_GET(flag/ghost_interaction))) // CHOMPEdit
if(ismouse(usr) || (isobserver(usr) && !CONFIG_GET(flag/ghost_interaction)))
return
src.set_dir(turn(src.dir, 270))
@@ -89,7 +89,7 @@
return
if(usr.stat || usr.restrained())
return
if(ismouse(usr) || (isobserver(usr) && !CONFIG_GET(flag/ghost_interaction))) // CHOMPEdit
if(ismouse(usr) || (isobserver(usr) && !CONFIG_GET(flag/ghost_interaction)))
return
src.set_dir(turn(src.dir, 90))

View File

@@ -84,7 +84,7 @@
return ..()
/obj/structure/trash_pile/attack_ghost(mob/observer/user as mob)
if(CONFIG_GET(flag/disable_player_mice)) // CHOMPEdit
if(CONFIG_GET(flag/disable_player_mice))
to_chat(user, span_warning("Spawning as a mouse is currently disabled."))
return
@@ -116,7 +116,7 @@
host = new /mob/living/simple_mob/animal/passive/mouse(get_turf(src))
if(host)
if(CONFIG_GET(flag/uneducated_mice)) // CHOMPEdit
if(CONFIG_GET(flag/uneducated_mice))
host.universal_understand = 0
announce_ghost_joinleave(src, 0, "They are now a mouse.")
host.ckey = user.ckey

View File

@@ -13,7 +13,7 @@
var/forced_dirs = 0 //Force this one to pretend it's an overedge turf
/turf/space/Initialize()
if(CONFIG_GET(flag/starlight)) // CHOMPEdit
if(CONFIG_GET(flag/starlight))
update_starlight()
//Sprite stuff only beyond here
@@ -75,7 +75,7 @@
/turf/space/proc/update_starlight()
if(locate(/turf/simulated) in orange(src,1))
set_light(CONFIG_GET(flag/starlight)) // CHOMPEdit
set_light(CONFIG_GET(flag/starlight))
else
set_light(0)

View File

@@ -31,22 +31,21 @@
to_world_log("Your server's byond version does not meet the recommended requirements for this server. Please update BYOND")
TgsNew(new /datum/tgs_event_handler/impl, TGS_SECURITY_TRUSTED) // CHOMPEdit - tgs event handler
// VgsNew() // VOREStation Edit - VGS // CHOMPEdit - Has to be initialized after config was loaded
config.Load(params[OVERRIDE_CONFIG_DIRECTORY_PARAMETER]) // CHOMPEdit
config.Load(params[OVERRIDE_CONFIG_DIRECTORY_PARAMETER])
ConfigLoaded() // CHOMPEdit
makeDatumRefLists() // CHOMPEdit
VgsNew() // CHOMPEdit
ConfigLoaded()
makeDatumRefLists()
VgsNew()
var/servername = CONFIG_GET(string/servername) // CHOMPEdit
if(config && servername != null && CONFIG_GET(flag/server_suffix) && world.port > 0) // CHOMPEdit
var servername = CONFIG_GET(string/servername)
if(config && servername != null && CONFIG_GET(flag/server_suffix) && world.port > 0)
// dumb and hardcoded but I don't care~
servername += " #[(world.port % 1000) / 100]" // CHOMPEdit
CONFIG_SET(string/servername, servername) // CHOMPEdit
servername += " #[(world.port % 1000) / 100]"
CONFIG_SET(string/servername, servername)
// TODO - Figure out what this is. Can you assign to world.log?
// if(config && CONFIG_GET(flag/log_runtime)) // CHOMPEdit
// if(config && CONFIG_FLAG(flag/log_runtime))
// log = file("data/logs/runtime/[time2text(world.realtime,"YYYY-MM-DD-(hh-mm-ss)")]-runtime.log")
GLOB.timezoneOffset = world.timezone * 36000
@@ -95,14 +94,13 @@
#endif
spawn(3000) //so we aren't adding to the round-start lag
if(CONFIG_GET(flag/ToRban)) // CHOMPEdit
if(CONFIG_GET(flag/ToRban))
ToRban_autoupdate()
#undef RECOMMENDED_VERSION
return
// CHOMPEdit Start
/// Runs after config is loaded but before Master is initialized
/world/proc/ConfigLoaded()
// Everything in here is prioritized in a very specific way.
@@ -110,15 +108,14 @@
// (i.e. basically nothing should be added before load_admins() in here)
// Try to set round ID
SSdbcore.InitializeRound()
SSdbcore.InitializeRound() // CHOMPEdit
//apply a default value to config.python_path, if needed
if (!CONFIG_GET(string/python_path)) // CHOMPEdit
if (!CONFIG_GET(string/python_path))
if(world.system_type == UNIX)
CONFIG_SET(string/python_path, "/usr/bin/env python2") // CHOMPEdit
CONFIG_SET(string/python_path, "/usr/bin/env python2")
else //probably windows, if not this should work anyway
CONFIG_SET(string/python_path, "python") // CHOMPEdit
// CHOMPEdit End
CONFIG_SET(string/python_path, "python")
var/world_topic_spam_protect_ip = "0.0.0.0"
var/world_topic_spam_protect_time = world.timeofday
@@ -146,11 +143,11 @@ var/world_topic_spam_protect_time = world.timeofday
var/list/s = list()
s["version"] = game_version
s["mode"] = master_mode
s["respawn"] = CONFIG_GET(flag/abandon_allowed) // CHOMPEdit
s["persistance"] = CONFIG_GET(flag/persistence_disabled) // CHOMPEdit
s["enter"] = CONFIG_GET(flag/enter_allowed) // CHOMPEdit
s["vote"] = CONFIG_GET(flag/allow_vote_mode) // CHOMPEdit
s["ai"] = CONFIG_GET(flag/allow_ai) // CHOMPEdit
s["respawn"] = CONFIG_GET(flag/abandon_allowed)
s["persistance"] = CONFIG_GET(flag/persistence_disabled)
s["enter"] = CONFIG_GET(flag/enter_allowed)
s["vote"] = CONFIG_GET(flag/allow_vote_mode)
s["ai"] = CONFIG_GET(flag/allow_ai)
s["host"] = host ? host : null
// This is dumb, but spacestation13.com's banners break if player count isn't the 8th field of the reply, so... this has to go here.
@@ -283,7 +280,7 @@ var/world_topic_spam_protect_time = world.timeofday
else if(copytext(T,1,5) == "info")
var/input[] = params2list(T)
if(input["key"] != CONFIG_GET(string/comms_password)) // CHOMPEdit
if(input["key"] != CONFIG_GET(string/comms_password))
if(world_topic_spam_protect_ip == addr && abs(world_topic_spam_protect_time - world.time) < 50)
spawn(50)
@@ -370,7 +367,7 @@ var/world_topic_spam_protect_time = world.timeofday
var/input[] = params2list(T)
if(input["key"] != CONFIG_GET(string/comms_password)) // CHOMPEdit
if(input["key"] != CONFIG_GET(string/comms_password))
if(world_topic_spam_protect_ip == addr && abs(world_topic_spam_protect_time - world.time) < 50)
spawn(50)
@@ -420,7 +417,7 @@ var/world_topic_spam_protect_time = world.timeofday
2. validationkey = the key the bot has, it should match the gameservers commspassword in it's configuration.
*/
var/input[] = params2list(T)
if(input["key"] != CONFIG_GET(string/comms_password)) // CHOMPEdit
if(input["key"] != CONFIG_GET(string/comms_password))
if(world_topic_spam_protect_ip == addr && abs(world_topic_spam_protect_time - world.time) < 50)
spawn(50)
@@ -435,7 +432,7 @@ var/world_topic_spam_protect_time = world.timeofday
else if(copytext(T,1,4) == "age")
var/input[] = params2list(T)
if(input["key"] != CONFIG_GET(string/comms_password)) // CHOMPEdit
if(input["key"] != CONFIG_GET(string/comms_password))
if(world_topic_spam_protect_ip == addr && abs(world_topic_spam_protect_time - world.time) < 50)
spawn(50)
world_topic_spam_protect_time = world.time
@@ -471,8 +468,8 @@ var/world_topic_spam_protect_time = world.timeofday
else
Master.Shutdown() //run SS shutdowns
for(var/client/C in GLOB.clients)
if(CONFIG_GET(string/server)) //if you set a server location in config.txt, it sends you there instead of trying to reconnect to the same world address. -- NeoFite // CHOMPEdit
C << link("byond://[CONFIG_GET(string/server)]") // CHOMPEdit
if(CONFIG_GET(string/server)) //if you set a server location in config.txt, it sends you there instead of trying to reconnect to the same world address. -- NeoFite
C << link("byond://[CONFIG_GET(string/server)]")
TgsReboot()
log_world("World rebooted at [time_stamp()]")
@@ -506,14 +503,14 @@ var/world_topic_spam_protect_time = world.timeofday
/world/proc/load_motd()
join_motd = file2text("config/motd.txt")
/* CHOMPEdit Start
/* Replaced with configuration controller
/proc/load_configuration()
config = new /datum/configuration()
config.load("config/config.txt")
config.load("config/game_options.txt","game_options")
config.loadsql("config/dbconfig.txt")
config.loadforumsql("config/forumdbconfig.txt")
*/ // CHOMPEdit End
*/
/hook/startup/proc/loadMods()
world.load_mods()
@@ -521,7 +518,7 @@ var/world_topic_spam_protect_time = world.timeofday
return 1
/world/proc/load_mods()
if(CONFIG_GET(flag/admin_legacy_system)) // CHOMPEdit
if(CONFIG_GET(flag/admin_legacy_system))
var/text = file2text("config/moderators.txt")
if (!text)
error("Failed to load config/mods.txt")
@@ -542,7 +539,7 @@ var/world_topic_spam_protect_time = world.timeofday
D.associate(GLOB.directory[ckey])
/world/proc/load_mentors()
if(CONFIG_GET(flag/admin_legacy_system)) // CHOMPEdit
if(CONFIG_GET(flag/admin_legacy_system))
var/text = file2text("config/mentors.txt")
if (!text)
error("Failed to load config/mentors.txt")
@@ -579,8 +576,8 @@ var/world_topic_spam_protect_time = world.timeofday
/world/proc/update_status()
var/s = ""
if (config && CONFIG_GET(string/servername)) // CHOMPEdit
s += span_bold("[CONFIG_GET(string/servername)]") + " &#8212; " // CHOMPEdit
if (config && CONFIG_GET(string/servername))
s += span_bold("[CONFIG_GET(string/servername)]") + " &#8212; "
s += span_bold("[station_name()]");
s += " ("
@@ -601,16 +598,16 @@ var/world_topic_spam_protect_time = world.timeofday
if (!CONFIG_GET(flag/enter_allowed))
features += "closed"
features += CONFIG_GET(flag/abandon_allowed) ? "respawn" : "no respawn" // CHOMPEdit
features += CONFIG_GET(flag/abandon_allowed) ? "respawn" : "no respawn"
features += CONFIG_GET(flag/persistence_disabled) ? "persistence disabled" : "persistence enabled" // CHOMPEdit
features += CONFIG_GET(flag/persistence_disabled) ? "persistence disabled" : "persistence enabled"
features += CONFIG_GET(flag/persistence_ignore_mapload) ? "persistence mapload disabled" : "persistence mapload enabled" // CHOMPEdit
features += CONFIG_GET(flag/persistence_ignore_mapload) ? "persistence mapload disabled" : "persistence mapload enabled"
if (config && CONFIG_GET(flag/allow_vote_mode)) // CHOMPEdit
if (config && CONFIG_GET(flag/allow_vote_mode))
features += "vote"
if (config && CONFIG_GET(flag/allow_ai)) // CHOMPEdit
if (config && CONFIG_GET(flag/allow_ai))
features += "AI allowed"
var/n = 0
@@ -624,8 +621,8 @@ var/world_topic_spam_protect_time = world.timeofday
features += "~[n] player"
if (config && CONFIG_GET(string/hostedby)) // CHOMPEdit
features += "hosted by <b>[CONFIG_GET(string/hostedby)]</b>" // CHOMPEdit
if (config && CONFIG_GET(string/hostedby))
features += "hosted by <b>[CONFIG_GET(string/hostedby)]</b>"
if (features)
s += ": [jointext(features, ", ")]"
@@ -639,7 +636,7 @@ var/failed_db_connections = 0
var/failed_old_db_connections = 0
/hook/startup/proc/connectDB()
if(!CONFIG_GET(flag/sql_enabled)) //CHOMPEdit
if(!CONFIG_GET(flag/sql_enabled))
to_world_log("SQL connection disabled in config.")
else if(establish_db_connection())//CHOMPEdit Begin
to_world_log("Feedback database connection established.")
@@ -665,7 +662,7 @@ var/failed_old_db_connections = 0
return 1
/*/proc/setup_database_connection() CHOMPEdit TGSQL
if(!config.sql_enabled)
if(!CONFIG_GET(flag/sql_enabled))
return 0
if(failed_db_connections > FAILED_DB_CONNECTION_CUTOFF) //If it failed to establish a connection more than 5 times in a row, don't bother attempting to conenct anymore.
return 0
@@ -673,11 +670,11 @@ var/failed_old_db_connections = 0
if(!dbcon)
dbcon = new()
var/user = sqlfdbklogin
var/pass = sqlfdbkpass
var/db = sqlfdbkdb
var/address = sqladdress
var/port = sqlport
var/user = CONFIG_GET(string/feedback_login)
var/pass = CONFIG_GET(string/feedback_password)
var/db = CONFIG_GET(string/feedback_database)
var/address = CONFIG_GET(string/address)
var/port = CONFIG_GET(number/port)
dbcon.Connect("dbi:mysql:[db]:[address]:[port]","[user]","[pass]")
. = dbcon.IsConnected()
@@ -702,48 +699,6 @@ var/failed_old_db_connections = 0
/proc/establish_db_connection() //CHOMPEdit TGSQL
return SSdbcore.Connect()
/hook/startup/proc/connectOldDB()
if(!CONFIG_GET(flag/sql_enabled)) // CHOMPEdit
to_world_log("SQL connection disabled in config.")
else if(establish_old_db_connection()) //CHOMPEdit Begin
to_world_log("SQL database connection established.")
else
to_world_log("SQL database connection failed")
//CHOMPEdit End
return 1
//These two procs are for the old database, while it's being phased out. See the tgstation.sql file in the SQL folder for more information.
/*/proc/setup_old_database_connection() //CHOMPStation TGSQL
if(!config.sql_enabled)
return 0
if(failed_old_db_connections > FAILED_DB_CONNECTION_CUTOFF) //If it failed to establish a connection more than 5 times in a row, don't bother attempting to conenct anymore.
return 0
if(!dbcon_old)
dbcon_old = new()
var/user = sqllogin
var/pass = sqlpass
var/db = sqldb
var/address = sqladdress
var/port = sqlport
dbcon_old.Connect("dbi:mysql:[db]:[address]:[port]","[user]","[pass]")
. = dbcon_old.IsConnected()
if ( . )
failed_old_db_connections = 0 //If this connection succeeded, reset the failed connections counter.
else
failed_old_db_connections++ //If it failed, increase the failed connections counter.
to_world_log(dbcon.ErrorMsg())
return .*/
//This proc ensures that the connection to the feedback database (global variable dbcon) is established
/proc/establish_old_db_connection()
return SSdbcore.Connect()
/* CHOMPedit
// Cleans up DB connections and recreates them
/proc/reset_database_connections()
@@ -759,7 +714,7 @@ var/failed_old_db_connections = 0
if(dbcon_old?.IsConnected())
results += "WARNING: dbcon_old is connected, not touching it, but is this intentional?"
if(!config.sql_enabled)
if(!CONFIG_GET(flag/sql_enabled))
results += "stopping because config.sql_enabled = false"
else
. = setup_database_connection()
@@ -808,10 +763,10 @@ var/failed_old_db_connections = 0
/proc/get_world_url()
. = "byond://"
if(CONFIG_GET(string/serverurl)) // CHOMPEdit
. += CONFIG_GET(string/serverurl) // CHOMPEdit
else if(CONFIG_GET(string/server)) // CHOMPEdit
. += CONFIG_GET(string/server) // CHOMPEdit
if(CONFIG_GET(string/serverurl))
. += CONFIG_GET(string/serverurl)
else if(CONFIG_GET(string/server))
. += CONFIG_GET(string/server)
else
. += "[world.address]:[world.port]"

View File

@@ -88,8 +88,6 @@ var/list/reverse_dir = list( // reverse_dir[dir] = reverse of dir
)
var/global/const/SQRT_TWO = 1.41421356237
// var/datum/configuration/config = null // CHOMPEdit
var/list/combatlog = list()
var/list/IClog = list()
var/list/OOClog = list()

View File

@@ -24,8 +24,6 @@ var/global/datum/global_init/init = new ()
debug_log << "[log_end]\n[log_end]\nStarting up. [time_stamp()][log_end]\n---------------------[log_end]"
*/ //VOREStation Removal End
decls_repository = new()
//load_configuration() // CHOMP Edit
//makeDatumRefLists() // CHOMP Edit
initialize_integrated_circuits_list()

View File

@@ -5,21 +5,21 @@
return ..()
//Guest Checking
if(!CONFIG_GET(flag/guests_allowed) && IsGuestKey(key)) // CHOMPEdit
if(!CONFIG_GET(flag/guests_allowed) && IsGuestKey(key))
log_adminwarn("Failed Login: [key] - Guests not allowed")
message_admins(span_blue("Failed Login: [key] - Guests not allowed"))
return list("reason"="guest", "desc"="\nReason: Guests not allowed. Please sign in with a byond account.")
//check if the IP address is a known TOR node
if(config && CONFIG_GET(flag/ToRban) && ToRban_isbanned(address)) // CHOMPEdit
if(config && CONFIG_GET(flag/ToRban) && ToRban_isbanned(address))
log_adminwarn("Failed Login: [src] - Banned: ToR")
message_admins(span_blue("Failed Login: [src] - Banned: ToR"))
//ban their computer_id and ckey for posterity
AddBan(ckey(key), computer_id, "Use of ToR", "Automated Ban", 0, 0)
return list("reason"="Using ToR", "desc"="\nReason: The network you are using to connect has been banned.\nIf you believe this is a mistake, please request help at [CONFIG_GET(string/banappeals)]") // CHOMPEdit
return list("reason"="Using ToR", "desc"="\nReason: The network you are using to connect has been banned.\nIf you believe this is a mistake, please request help at [CONFIG_GET(string/banappeals)]")
if(CONFIG_GET(flag/ban_legacy_system)) // CHOMPEdit
if(CONFIG_GET(flag/ban_legacy_system))
//Ban Checking
. = CheckBan( ckey(key), computer_id, address )

View File

@@ -10,8 +10,8 @@ var/savefile/Banlist
. = list()
var/appeal
if(config && CONFIG_GET(string/banappeals)) // CHOMPEdit
appeal = "\nFor more information on your ban, or to appeal, head to <a href='[CONFIG_GET(string/banappeals)]'>[CONFIG_GET(string/banappeals)]</a>" // CHOMPEdit
if(config && CONFIG_GET(string/banappeals))
appeal = "\nFor more information on your ban, or to appeal, head to <a href='[CONFIG_GET(string/banappeals)]'>[CONFIG_GET(string/banappeals)]</a>"
Banlist.cd = "/base"
if( "[ckey][id]" in Banlist.dir )
Banlist.cd = "[ckey][id]"

View File

@@ -52,11 +52,11 @@
ToRban_update()
if("toggle")
if(config)
if(CONFIG_GET(flag/ToRban)) // CHOMPEdit
CONFIG_SET(flag/ToRban, FALSE) // CHOMPEdit
if(CONFIG_GET(flag/ToRban))
CONFIG_SET(flag/ToRban, FALSE)
message_admins(span_red("ToR banning disabled."))
else
CONFIG_SET(flag/ToRban, TRUE) // CHOMPEdit
CONFIG_SET(flag/ToRban, TRUE)
message_admins(span_green("ToR banning enabled."))
if("show")
var/savefile/F = new(TORFILE)

View File

@@ -757,8 +757,8 @@ var/datum/announcement/minor/admin_min_announcer = new
if(!check_rights(R_ADMIN))
return
CONFIG_SET(flag/ooc_allowed, !CONFIG_GET(flag/ooc_allowed)) // CHOMPEdit
if (CONFIG_GET(flag/ooc_allowed)) // CHOMPEdit
CONFIG_SET(flag/ooc_allowed, !CONFIG_GET(flag/ooc_allowed))
if (CONFIG_GET(flag/ooc_allowed))
to_world(span_world("The OOC channel has been globally enabled!"))
else
to_world(span_world("The OOC channel has been globally disabled!"))
@@ -773,8 +773,8 @@ var/datum/announcement/minor/admin_min_announcer = new
if(!check_rights(R_ADMIN))
return
CONFIG_SET(flag/looc_allowed, !CONFIG_GET(flag/looc_allowed)) // CHOMPEdit
if (CONFIG_GET(flag/looc_allowed)) // CHOMPEdit
CONFIG_SET(flag/looc_allowed, !CONFIG_GET(flag/looc_allowed))
if (CONFIG_GET(flag/looc_allowed))
to_world(span_world("The LOOC channel has been globally enabled!"))
else
to_world(span_world("The LOOC channel has been globally disabled!"))
@@ -790,8 +790,8 @@ var/datum/announcement/minor/admin_min_announcer = new
if(!check_rights(R_ADMIN))
return
CONFIG_SET(flag/dsay_allowed, !CONFIG_GET(flag/dsay_allowed)) // CHOMPEdit
if (CONFIG_GET(flag/dsay_allowed)) // CHOMPEdit
CONFIG_SET(flag/dsay_allowed, !CONFIG_GET(flag/dsay_allowed))
if (CONFIG_GET(flag/dsay_allowed))
to_world(span_world("Deadchat has been globally enabled!"))
else
to_world(span_world("Deadchat has been globally disabled!"))
@@ -807,7 +807,7 @@ var/datum/announcement/minor/admin_min_announcer = new
if(!check_rights(R_ADMIN))
return
CONFIG_SET(flag/dooc_allowed, !CONFIG_GET(flag/dooc_allowed)) // CHOMPEdit
CONFIG_SET(flag/dooc_allowed, !CONFIG_GET(flag/dooc_allowed))
log_admin("[key_name(usr)] toggled Dead OOC.")
message_admins("[key_name_admin(usr)] toggled Dead OOC.", 1)
feedback_add_details("admin_verb","TDOOC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
@@ -829,9 +829,9 @@ var/datum/announcement/minor/admin_min_announcer = new
set category = "Server.Game" //CHOMPEdit
set desc="Toggle traitor scaling"
set name="Toggle Traitor Scaling"
CONFIG_SET(flag/traitor_scaling, !CONFIG_GET(flag/traitor_scaling)) // CHOMPEdit
log_admin("[key_name(usr)] toggled Traitor Scaling to [CONFIG_GET(flag/traitor_scaling)].") // CHOMPEdit
message_admins("[key_name_admin(usr)] toggled Traitor Scaling [CONFIG_GET(flag/traitor_scaling) ? "on" : "off"].", 1) // CHOMPEdit
CONFIG_SET(flag/traitor_scaling, !CONFIG_GET(flag/traitor_scaling))
log_admin("[key_name(usr)] toggled Traitor Scaling to [CONFIG_GET(flag/traitor_scaling)].")
message_admins("[key_name_admin(usr)] toggled Traitor Scaling [CONFIG_GET(flag/traitor_scaling) ? "on" : "off"].", 1)
feedback_add_details("admin_verb","TTS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/datum/admins/proc/startnow()
@@ -861,8 +861,8 @@ var/datum/announcement/minor/admin_min_announcer = new
set category = "Server.Game" //CHOMPEdit
set desc="People can't enter"
set name="Toggle Entering"
CONFIG_SET(flag/enter_allowed, !CONFIG_GET(flag/enter_allowed)) // CHOMPEdit
if (!CONFIG_GET(flag/enter_allowed)) // CHOMPEdit
CONFIG_SET(flag/enter_allowed, !CONFIG_GET(flag/enter_allowed))
if (!CONFIG_GET(flag/enter_allowed))
to_world(span_world("New players may no longer enter the game."))
else
to_world(span_world("New players may now enter the game."))
@@ -875,8 +875,8 @@ var/datum/announcement/minor/admin_min_announcer = new
set category = "Server.Game" //CHOMPEdit
set desc="People can't be AI"
set name="Toggle AI"
CONFIG_SET(flag/allow_ai, !CONFIG_GET(flag/allow_ai)) // CHOMPEdit
if (!CONFIG_GET(flag/allow_ai)) // CHOMPEdit
CONFIG_SET(flag/allow_ai, !CONFIG_GET(flag/allow_ai))
if (!CONFIG_GET(flag/allow_ai))
to_world(span_world("The AI job is no longer chooseable."))
else
to_world(span_world("The AI job is chooseable now."))
@@ -888,13 +888,13 @@ var/datum/announcement/minor/admin_min_announcer = new
set category = "Server.Game" //CHOMPEdit
set desc="Respawn basically"
set name="Toggle Respawn"
CONFIG_SET(flag/abandon_allowed, !CONFIG_GET(flag/abandon_allowed)) // CHOMPEdit
if(CONFIG_GET(flag/abandon_allowed)) // CHOMPEdit
CONFIG_SET(flag/abandon_allowed, !CONFIG_GET(flag/abandon_allowed))
if(CONFIG_GET(flag/abandon_allowed))
to_world(span_world("You may now respawn."))
else
to_world(span_world("You may no longer respawn :("))
message_admins(span_blue("[key_name_admin(usr)] toggled respawn to [CONFIG_GET(flag/abandon_allowed) ? "On" : "Off"]."), 1) // CHOMPEdit
log_admin("[key_name(usr)] toggled respawn to [CONFIG_GET(flag/abandon_allowed) ? "On" : "Off"].") // CHOMPEdit
message_admins(span_blue("[key_name_admin(usr)] toggled respawn to [CONFIG_GET(flag/abandon_allowed) ? "On" : "Off"]."), 1)
log_admin("[key_name(usr)] toggled respawn to [CONFIG_GET(flag/abandon_allowed) ? "On" : "Off"].")
world.update_status()
feedback_add_details("admin_verb","TR") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
@@ -902,15 +902,15 @@ var/datum/announcement/minor/admin_min_announcer = new
set category = "Server.Config" //CHOMPEdit
set desc="Whether persistent data will be saved from now on."
set name="Toggle Persistent Data"
CONFIG_SET(flag/persistence_disabled, !CONFIG_GET(flag/persistence_disabled)) // CHOMPEdit
CONFIG_SET(flag/persistence_disabled, !CONFIG_GET(flag/persistence_disabled))
/* CHOMP Edit: the entire world doesn't need to know.
if(!config.persistence_disabled)
if(!CONFIG_GET(flag/persistence_disabled))
to_world(span_world("Persistence is now enabled."))
else
to_world(span_world("Persistence is no longer enabled."))
*/
message_admins(span_blue("[key_name_admin(usr)] toggled persistence to [CONFIG_GET(flag/persistence_disabled) ? "Off" : "On"]."), 1) // CHOMPEdit
log_admin("[key_name(usr)] toggled persistence to [CONFIG_GET(flag/persistence_disabled) ? "Off" : "On"].") // CHOMPEdit
message_admins(span_blue("[key_name_admin(usr)] toggled persistence to [CONFIG_GET(flag/persistence_disabled) ? "Off" : "On"]."), 1)
log_admin("[key_name(usr)] toggled persistence to [CONFIG_GET(flag/persistence_disabled) ? "Off" : "On"].")
world.update_status()
feedback_add_details("admin_verb","TPD") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
@@ -918,13 +918,13 @@ var/datum/announcement/minor/admin_min_announcer = new
set category = "Server.Config" //CHOMPEdit
set desc="Whether mapload persistent data will be saved from now on."
set name="Toggle Mapload Persistent Data"
CONFIG_SET(flag/persistence_ignore_mapload, !CONFIG_GET(flag/persistence_ignore_mapload)) // CHOMPEdit
if(!CONFIG_GET(flag/persistence_ignore_mapload)) // CHOMPEdit
CONFIG_SET(flag/persistence_ignore_mapload, !CONFIG_GET(flag/persistence_ignore_mapload))
if(!CONFIG_GET(flag/persistence_ignore_mapload))
to_world(span_world("Persistence is now enabled."))
else
to_world(span_world("Persistence is no longer enabled."))
message_admins(span_blue("[key_name_admin(usr)] toggled persistence to [CONFIG_GET(flag/persistence_ignore_mapload) ? "Off" : "On"]."), 1) // CHOMPEdit
log_admin("[key_name(usr)] toggled persistence to [CONFIG_GET(flag/persistence_ignore_mapload) ? "Off" : "On"].") // CHOMPEdit
message_admins(span_blue("[key_name_admin(usr)] toggled persistence to [CONFIG_GET(flag/persistence_ignore_mapload) ? "Off" : "On"]."), 1)
log_admin("[key_name(usr)] toggled persistence to [CONFIG_GET(flag/persistence_ignore_mapload) ? "Off" : "On"].")
world.update_status()
feedback_add_details("admin_verb","TMPD") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
@@ -932,18 +932,18 @@ var/datum/announcement/minor/admin_min_announcer = new
set category = "Server.Game" //CHOMPEdit
set desc="Toggle alien mobs"
set name="Toggle Aliens"
CONFIG_SET(flag/aliens_allowed, !CONFIG_GET(flag/aliens_allowed)) // CHOMPEdit
log_admin("[key_name(usr)] toggled Aliens to [CONFIG_GET(flag/aliens_allowed)].") // CHOMPEdit
message_admins("[key_name_admin(usr)] toggled Aliens [CONFIG_GET(flag/aliens_allowed) ? "on" : "off"].", 1) // CHOMPEdit
CONFIG_SET(flag/aliens_allowed, !CONFIG_GET(flag/aliens_allowed))
log_admin("[key_name(usr)] toggled Aliens to [CONFIG_GET(flag/aliens_allowed)].")
message_admins("[key_name_admin(usr)] toggled Aliens [CONFIG_GET(flag/aliens_allowed) ? "on" : "off"].", 1)
feedback_add_details("admin_verb","TA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/datum/admins/proc/toggle_space_ninja()
set category = "Server.Game" //CHOMPEdit
set desc="Toggle space ninjas spawning."
set name="Toggle Space Ninjas"
CONFIG_SET(flag/ninjas_allowed, !CONFIG_GET(flag/ninjas_allowed)) // CHOMPEdit
log_admin("[key_name(usr)] toggled Space Ninjas to [CONFIG_GET(flag/ninjas_allowed)].") // CHOMPEdit
message_admins("[key_name_admin(usr)] toggled Space Ninjas [CONFIG_GET(flag/ninjas_allowed) ? "on" : "off"].", 1) // CHOMPEdit
CONFIG_SET(flag/ninjas_allowed, !CONFIG_GET(flag/ninjas_allowed))
log_admin("[key_name(usr)] toggled Space Ninjas to [CONFIG_GET(flag/ninjas_allowed)].")
message_admins("[key_name_admin(usr)] toggled Space Ninjas [CONFIG_GET(flag/ninjas_allowed) ? "on" : "off"].", 1)
feedback_add_details("admin_verb","TSN") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/datum/admins/proc/delay()
@@ -970,24 +970,24 @@ var/datum/announcement/minor/admin_min_announcer = new
set category = "Server.Game" //CHOMPEdit
set desc="Toggle admin jumping"
set name="Toggle Jump"
CONFIG_SET(flag/allow_admin_jump, !CONFIG_GET(flag/allow_admin_jump)) // CHOMPEdit
message_admins(span_blue("Toggled admin jumping to [CONFIG_GET(flag/allow_admin_jump)].")) // CHOMPEdit
CONFIG_SET(flag/allow_admin_jump, !CONFIG_GET(flag/allow_admin_jump))
message_admins(span_blue("Toggled admin jumping to [CONFIG_GET(flag/allow_admin_jump)]."))
feedback_add_details("admin_verb","TJ") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/datum/admins/proc/adspawn()
set category = "Server.Game" //CHOMPEdit
set desc="Toggle admin spawning"
set name="Toggle Spawn"
CONFIG_SET(flag/allow_admin_spawning, !CONFIG_GET(flag/allow_admin_spawning)) // CHOMPEdit
message_admins(span_blue("Toggled admin item spawning to [CONFIG_GET(flag/allow_admin_spawning)].")) // CHOMPEdit
CONFIG_SET(flag/allow_admin_spawning, !CONFIG_GET(flag/allow_admin_spawning))
message_admins(span_blue("Toggled admin item spawning to [CONFIG_GET(flag/allow_admin_spawning)]."))
feedback_add_details("admin_verb","TAS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/datum/admins/proc/adrev()
set category = "Server.Game" //CHOMPEdit
set desc="Toggle admin revives"
set name="Toggle Revive"
CONFIG_SET(flag/allow_admin_rev, !CONFIG_GET(flag/allow_admin_rev)) // CHOMPEdit
message_admins(span_blue("Toggled reviving to [CONFIG_GET(flag/allow_admin_rev)].")) // CHOMPEdit
CONFIG_SET(flag/allow_admin_rev, !CONFIG_GET(flag/allow_admin_rev))
message_admins(span_blue("Toggled reviving to [CONFIG_GET(flag/allow_admin_rev)]."))
feedback_add_details("admin_verb","TAR") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/datum/admins/proc/immreboot()
@@ -1012,7 +1012,7 @@ var/datum/announcement/minor/admin_min_announcer = new
set category = "Admin.Moderation" //CHOMPEdit
set name = "Unprison"
if (M.z == 2)
if (CONFIG_GET(flag/allow_admin_jump)) // CHOMPEdit
if (CONFIG_GET(flag/allow_admin_jump))
M.loc = pick(latejoin)
message_admins("[key_name_admin(usr)] has unprisoned [key_name_admin(M)]", 1)
log_admin("[key_name(usr)] has unprisoned [key_name(M)]")
@@ -1244,8 +1244,8 @@ var/datum/announcement/minor/admin_min_announcer = new
set category = "Debug"
set desc="Reduces view range when wearing welding helmets"
set name="Toggle tinted welding helmets."
CONFIG_SET(flag/welder_vision, !CONFIG_GET(flag/welder_vision)) // CHOMPEdit
if (CONFIG_GET(flag/welder_vision)) // CHOMPEdit
CONFIG_SET(flag/welder_vision, !CONFIG_GET(flag/welder_vision))
if (CONFIG_GET(flag/welder_vision))
to_world(span_world("Reduced welder vision has been enabled!"))
else
to_world(span_world("Reduced welder vision has been disabled!"))
@@ -1257,13 +1257,13 @@ var/datum/announcement/minor/admin_min_announcer = new
set category = "Server.Config" //CHOMPEdit
set desc="Guests can't enter"
set name="Toggle guests"
CONFIG_SET(flag/guests_allowed, !CONFIG_GET(flag/guests_allowed)) // CHOMPEdit
if (!CONFIG_GET(flag/guests_allowed)) // CHOMPEdit
CONFIG_SET(flag/guests_allowed, !CONFIG_GET(flag/guests_allowed))
if (!CONFIG_GET(flag/guests_allowed))
to_world(span_world("Guests may no longer enter the game."))
else
to_world(span_world("Guests may now enter the game."))
log_admin("[key_name(usr)] toggled guests game entering [CONFIG_GET(flag/guests_allowed) ? "":"dis"]allowed.") // CHOMPEdit
message_admins(span_blue("[key_name_admin(usr)] toggled guests game entering [CONFIG_GET(flag/guests_allowed) ? "":"dis"]allowed."), 1) // CHOMPEdit
log_admin("[key_name(usr)] toggled guests game entering [CONFIG_GET(flag/guests_allowed)?"":"dis"]allowed.")
message_admins(span_blue("[key_name_admin(usr)] toggled guests game entering [CONFIG_GET(flag/guests_allowed)?"":"dis"]allowed."), 1)
feedback_add_details("admin_verb","TGU") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/datum/admins/proc/output_ai_laws()

View File

@@ -39,7 +39,7 @@
src << browse(F,"window=investigate[subject];size=800x300")
if("hrefs") //persistant logs and stuff
if(config && CONFIG_GET(flag/log_hrefs)) // CHOMPEdit
if(config && CONFIG_GET(flag/log_hrefs))
if(href_logfile)
src << browse(href_logfile,"window=investigate[subject];size=800x300")
else

View File

@@ -115,7 +115,7 @@ var/list/admin_ranks = list() //list of all ranks with associated rights
if(!SSdbcore.IsConnected()) //CHOMPEdit TGSQL
error("Failed to connect to database in load_admins(). Reverting to legacy system.")
log_misc("Failed to connect to database in load_admins(). Reverting to legacy system.")
CONFIG_SET(flag/admin_legacy_system, TRUE) // CHOMPEdit
CONFIG_SET(flag/admin_legacy_system, TRUE)
load_admins()
return
@@ -139,7 +139,7 @@ var/list/admin_ranks = list() //list of all ranks with associated rights
if(!admin_datums)
error("The database query in load_admins() resulted in no admins being added to the list. Reverting to legacy system.")
log_misc("The database query in load_admins() resulted in no admins being added to the list. Reverting to legacy system.")
CONFIG_SET(flag/admin_legacy_system, TRUE) // CHOMPEdit
CONFIG_SET(flag/admin_legacy_system, TRUE)
load_admins()
return

View File

@@ -593,7 +593,7 @@ var/list/admin_verbs_event_manager = list(
if(holder.rights & R_SERVER) add_verb(src, admin_verbs_server)
if(holder.rights & R_DEBUG)
add_verb(src, admin_verbs_debug)
if(CONFIG_GET(flag/debugparanoid) && !(holder.rights & R_ADMIN)) // CHOMPEdit
if(CONFIG_GET(flag/debugparanoid) && !(holder.rights & R_ADMIN))
remove_verb(src, admin_verbs_paranoid_debug) //Right now it's just callproc but we can easily add others later on.
if(holder.rights & R_POSSESS) add_verb(src, admin_verbs_possess)
if(holder.rights & R_PERMISSIONS) add_verb(src, admin_verbs_permissions)

View File

@@ -127,7 +127,7 @@
set name = "Display Job bans"
set category = "Admin.Investigate" //CHOMPEdit
if(holder)
if(CONFIG_GET(flag/ban_legacy_system)) // CHOMPEdit
if(CONFIG_GET(flag/ban_legacy_system))
holder.Jobbans()
else
holder.DB_ban_panel()
@@ -138,7 +138,7 @@
set name = "Unban Panel"
set category = "Admin.Game" //CHOMPEdit
if(holder)
if(CONFIG_GET(flag/ban_legacy_system)) // CHOMPEdit
if(CONFIG_GET(flag/ban_legacy_system))
holder.unbanpanel()
else
holder.DB_ban_panel()
@@ -411,8 +411,8 @@
set category = "Server.Config" //CHOMPEdit
if(!holder) return
if(config)
CONFIG_SET(flag/log_hrefs, !CONFIG_GET(flag/log_hrefs)) // CHOMPEdit
message_admins(span_bold("[key_name_admin(usr)] [CONFIG_GET(flag/log_hrefs) ? "started" : "stopped"] logging hrefs")) // CHOMPEdit
CONFIG_SET(flag/log_hrefs, !CONFIG_GET(flag/log_hrefs))
message_admins(span_bold("[key_name_admin(usr)] [CONFIG_GET(flag/log_hrefs) ? "started" : "stopped"] logging hrefs"))
/client/proc/check_ai_laws()
set name = "Check AI Laws"
@@ -513,16 +513,16 @@
set category = "Server.Game" //CHOMPEdit
if(!holder) return
if(config)
CONFIG_SET(flag/cult_ghostwriter, !CONFIG_GET(flag/cult_ghostwriter)) // CHOMPEdit
message_admins("Admin [key_name_admin(usr)] has [CONFIG_GET(flag/cult_ghostwriter) ? "en" : "dis"]abled ghost writers.", 1) // CHOMPEdit
CONFIG_SET(flag/cult_ghostwriter, !CONFIG_GET(flag/cult_ghostwriter))
message_admins("Admin [key_name_admin(usr)] has [CONFIG_GET(flag/cult_ghostwriter) ? "en" : "dis"]abled ghost writers.", 1)
/client/proc/toggledrones()
set name = "Toggle maintenance drones"
set category = "Server.Game" //CHOMPEdit
if(!holder) return
if(config)
CONFIG_SET(flag/allow_drone_spawn, !CONFIG_GET(flag/allow_drone_spawn)) // CHOMPEdit
message_admins("Admin [key_name_admin(usr)] has [CONFIG_GET(flag/allow_drone_spawn) ? "en" : "dis"]abled maintenance drones.", 1) // CHOMPEdit
CONFIG_SET(flag/allow_drone_spawn, !CONFIG_GET(flag/allow_drone_spawn))
message_admins("Admin [key_name_admin(usr)] has [CONFIG_GET(flag/allow_drone_spawn) ? "en" : "dis"]abled maintenance drones.", 1)
/client/proc/man_up(mob/T as mob in mob_list)
set category = "Fun.Do Not" //CHOMPEdit

View File

@@ -95,7 +95,7 @@
var/dat = "<HEAD><TITLE>Book Inventory Management</TITLE></HEAD><BODY>\n"
dat += "<h3>ADMINISTRATIVE MANAGEMENT</h3>"
establish_old_db_connection()
establish_db_connection()
if(!SSdbcore.IsConnected())
dat += "<font color=red><b>ERROR</b>: Unable to contact External Archive. Please contact your system administrator for assistance.</font>"
@@ -134,8 +134,8 @@
var/which = tgui_alert(usr, "Which do you want to toggle?", "Choose Recolour Toggle", list("Robot", "Simple Mob"))
switch(which)
if("Robot")
CONFIG_SET(flag/allow_robot_recolor, !CONFIG_GET(flag/allow_robot_recolor)) // CHOMPEdit
to_chat(usr, "You have [CONFIG_GET(flag/allow_robot_recolor) ? "enabled" : "disabled"] newly spawned cyborgs to spawn with the recolour verb") // CHOMPEdit
CONFIG_SET(flag/allow_robot_recolor, !CONFIG_GET(flag/allow_robot_recolor))
to_chat(usr, "You have [CONFIG_GET(flag/allow_robot_recolor) ? "enabled" : "disabled"] newly spawned cyborgs to spawn with the recolour verb")
if("Simple Mob")
CONFIG_SET(flag/allow_simple_mob_recolor, !CONFIG_GET(flag/allow_simple_mob_recolor)) //CHOMPEdit
to_chat(usr, "You have [CONFIG_GET(flag/allow_simple_mob_recolor) ? "enabled" : "disabled"] newly spawned simple mobs to spawn with the recolour verb") //CHOMPEdit
CONFIG_SET(flag/allow_simple_mob_recolor, !CONFIG_GET(flag/allow_simple_mob_recolor))
to_chat(usr, "You have [CONFIG_GET(flag/allow_simple_mob_recolor) ? "enabled" : "disabled"] newly spawned simple mobs to spawn with the recolour verb")

View File

@@ -21,9 +21,9 @@ var/jobban_keylist[0] //to store the keys & ranks
*/
if (guest_jobbans(rank))
if(CONFIG_GET(flag/guest_jobban) && IsGuestKey(M.key)) // CHOMPEdit
if(CONFIG_GET(flag/guest_jobban) && IsGuestKey(M.key))
return "Guest Job-ban"
if(CONFIG_GET(flag/usewhitelist) && !check_whitelist(M)) // CHOMPEdit
if(CONFIG_GET(flag/usewhitelist) && !check_whitelist(M))
return "Whitelisted Job"
return ckey_is_jobbanned(M.ckey, rank)
@@ -59,7 +59,7 @@ DEBUG
return 1
/proc/jobban_loadbanfile()
if(CONFIG_GET(flag/ban_legacy_system)) // CHOMPEdit
if(CONFIG_GET(flag/ban_legacy_system))
var/savefile/S=new("data/job_full.ban")
S["keys[0]"] >> jobban_keylist
log_admin("Loading jobban_rank")
@@ -72,7 +72,7 @@ DEBUG
if(!establish_db_connection())
error("Database connection failed. Reverting to the legacy ban system.")
log_misc("Database connection failed. Reverting to the legacy ban system.")
CONFIG_SET(flag/ban_legacy_system, TRUE) // CHOMPedit
CONFIG_SET(flag/ban_legacy_system, TRUE)
jobban_loadbanfile()
return

View File

@@ -45,7 +45,7 @@
usr << browse(output,"window=editrights;size=600x500")
/datum/admins/proc/log_admin_rank_modification(var/adm_ckey, var/new_rank)
if(CONFIG_GET(flag/admin_legacy_system)) return // CHOMPEdit
if(CONFIG_GET(flag/admin_legacy_system)) return
if(!usr.client)
return
@@ -99,7 +99,7 @@
to_chat(usr, span_filter_adminlog("[span_blue("Admin rank changed.")]"))
/datum/admins/proc/log_admin_permission_modification(var/adm_ckey, var/new_permission)
if(CONFIG_GET(flag/admin_legacy_system)) return // CHOMPEdit
if(CONFIG_GET(flag/admin_legacy_system)) return
if(!usr.client)
return

View File

@@ -178,19 +178,19 @@
if(null,"") return
if("*New Rank*")
new_rank = tgui_input_text(usr, "Please input a new rank", "New custom rank")
if(CONFIG_GET(flag/admin_legacy_system)) // CHOMPEdit
if(CONFIG_GET(flag/admin_legacy_system))
new_rank = ckeyEx(new_rank)
if(!new_rank)
to_chat(usr, span_filter_adminlog(span_warning("Error: Topic 'editrights': Invalid rank")))
return
if(CONFIG_GET(flag/admin_legacy_system)) // CHOMPEdit
if(CONFIG_GET(flag/admin_legacy_system))
if(admin_ranks.len)
if(new_rank in admin_ranks)
rights = admin_ranks[new_rank] //we typed a rank which already exists, use its rights
else
admin_ranks[new_rank] = 0 //add the new rank to admin_ranks
else
if(CONFIG_GET(flag/admin_legacy_system)) // CHOMPEdit
if(CONFIG_GET(flag/admin_legacy_system))
new_rank = ckeyEx(new_rank)
rights = admin_ranks[new_rank] //we input an existing rank, use its rights
@@ -682,7 +682,7 @@
to_chat(usr, span_filter_adminlog(span_warning("You do not have the appropriate permissions to add job bans!")))
return
if(check_rights(R_MOD,0) && !check_rights(R_ADMIN,0) && !CONFIG_GET(flag/mods_can_job_tempban)) // If mod and tempban disabled // CHOMPEdit
if(check_rights(R_MOD,0) && !check_rights(R_ADMIN,0) && !CONFIG_GET(flag/mods_can_job_tempban)) // If mod and tempban disabled
to_chat(usr, span_filter_adminlog(span_warning("Mod jobbanning is disabled!")))
return
@@ -785,14 +785,14 @@
if(!check_rights(R_MOD,0) && !check_rights(R_BAN, 0))
to_chat(usr, span_filter_adminlog(span_warning("You cannot issue temporary job-bans!")))
return
if(CONFIG_GET(flag/ban_legacy_system)) // CHOMPEdit
if(CONFIG_GET(flag/ban_legacy_system))
to_chat(usr, span_filter_adminlog(span_warning("Your server is using the legacy banning system, which does not support temporary job bans. Consider upgrading. Aborting ban.")))
return
var/mins = tgui_input_number(usr,"How long (in minutes)?","Ban time",1440)
if(!mins)
return
if(check_rights(R_MOD, 0) && !check_rights(R_BAN, 0) && mins > CONFIG_GET(number/mod_job_tempban_max)) // CHOMPEdit
to_chat(usr, span_filter_adminlog(span_warning("Moderators can only job tempban up to [CONFIG_GET(number/mod_job_tempban_max)] minutes!"))) // CHOMPEdit
if(check_rights(R_MOD, 0) && !check_rights(R_BAN, 0) && mins > CONFIG_GET(number/mod_job_tempban_max))
to_chat(usr, span_filter_adminlog(span_warning("Moderators can only job tempban up to [CONFIG_GET(number/mod_job_tempban_max)] minutes!")))
return
var/reason = sanitize(tgui_input_text(usr,"Reason?","Please State Reason",""))
if(!reason)
@@ -844,7 +844,7 @@
//Unbanning joblist
//all jobs in joblist are banned already OR we didn't give a reason (implying they shouldn't be banned)
if(joblist.len) //at least 1 banned job exists in joblist so we have stuff to unban.
if(!CONFIG_GET(flag/ban_legacy_system)) // CHOMPEdit
if(!CONFIG_GET(flag/ban_legacy_system))
to_chat(usr, span_filter_adminlog("Unfortunately, database based unbanning cannot be done through this panel"))
DB_ban_panel(M.ckey)
return
@@ -907,7 +907,7 @@
to_chat(usr, span_warning("You do not have the appropriate permissions to add bans!"))
return
if(check_rights(R_MOD,0) && !check_rights(R_ADMIN, 0) && !CONFIG_GET(flag/mods_can_job_tempban)) // If mod and tempban disabled // CHOMPEdit
if(check_rights(R_MOD,0) && !check_rights(R_ADMIN, 0) && !CONFIG_GET(flag/mods_can_job_tempban)) // If mod and tempban disabled
to_chat(usr, span_warning("Mod jobbanning is disabled!"))
return
@@ -923,8 +923,8 @@
var/mins = tgui_input_number(usr,"How long (in minutes)?","Ban time",1440)
if(!mins)
return
if(check_rights(R_MOD, 0) && !check_rights(R_BAN, 0) && mins > CONFIG_GET(number/mod_tempban_max)) // CHOMPEdit
to_chat(usr, span_warning("Moderators can only job tempban up to [CONFIG_GET(number/mod_tempban_max)] minutes!")) // CHOMPEdit
if(check_rights(R_MOD, 0) && !check_rights(R_BAN, 0) && mins > CONFIG_GET(number/mod_tempban_max))
to_chat(usr, span_warning("Moderators can only job tempban up to [CONFIG_GET(number/mod_tempban_max)] minutes!"))
return
if(mins >= 525600) mins = 525599
var/reason = sanitize(tgui_input_text(usr,"Reason?","reason","Griefer"))
@@ -938,8 +938,8 @@
feedback_inc("ban_tmp",1)
DB_ban_record(BANTYPE_TEMP, M, mins, reason)
feedback_inc("ban_tmp_mins",mins)
if(CONFIG_GET(string/banappeals)) // CHOMPEdit
to_chat(M, span_filter_system(span_warning("To try to resolve this matter head to [CONFIG_GET(string/banappeals)]"))) // CHOMPEdit
if(CONFIG_GET(string/banappeals))
to_chat(M, span_filter_system(span_warning("To try to resolve this matter head to [CONFIG_GET(string/banappeals)]")))
else
to_chat(M, span_filter_system(span_warning("No ban appeals URL has been set.")))
log_admin("[usr.client.ckey] has banned [M.ckey].\nReason: [reason]\nThis will be removed in [mins] minutes.")
@@ -964,8 +964,8 @@
AddBan(M.ckey, M.computer_id, reason, usr.ckey, 0, 0)
to_chat(M, span_filter_system(span_critical("You have been banned by [usr.client.ckey].\nReason: [reason].")))
to_chat(M, span_filter_system(span_warning("This is a permanent ban.")))
if(CONFIG_GET(string/banappeals)) // CHOMPEdit
to_chat(M, span_filter_system(span_warning("To try to resolve this matter head to [CONFIG_GET(string/banappeals)]"))) // CHOMPEdit
if(CONFIG_GET(string/banappeals))
to_chat(M, span_filter_system(span_warning("To try to resolve this matter head to [CONFIG_GET(string/banappeals)]")))
else
to_chat(M, span_filter_system(span_warning("No ban appeals URL has been set.")))
ban_unban_log_save("[usr.client.ckey] has permabanned [M.ckey]. - Reason: [reason] - This is a permanent ban.")
@@ -1260,7 +1260,7 @@
to_chat(usr, span_filter_adminlog("This can only be used on instances of type /mob/living"))
return
if(CONFIG_GET(flag/allow_admin_rev)) // CHOMPEdit
if(CONFIG_GET(flag/allow_admin_rev))
L.revive()
message_admins(span_red("Admin [key_name_admin(usr)] healed / revived [key_name_admin(L)]!"), 1)
log_admin("[key_name(usr)] healed / Rrvived [key_name(L)]")
@@ -1368,13 +1368,13 @@
to_chat(X, take_msg)
to_chat(M, span_filter_pm(span_boldnotice("Your adminhelp is being attended to by [usr.client]. Thanks for your patience!")))
// VoreStation Edit Start
if (CONFIG_GET(string/chat_webhook_url)) // CHOMPEdit
if (CONFIG_GET(string/chat_webhook_url))
spawn(0)
var/query_string = "type=admintake"
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(key_name(usr.client))]"
query_string += "&user=[url_encode(key_name(M))]"
world.Export("[CONFIG_GET(string/chat_webhook_url)]?[query_string]") // CHOMPEdit
world.Export("[CONFIG_GET(string/chat_webhook_url)]?[query_string]")
// VoreStation Edit End
else
to_chat(usr, span_warning("Unable to locate mob."))
@@ -1587,7 +1587,7 @@
else if(href_list["jumpto"])
if(!check_rights(R_ADMIN|R_MOD|R_DEBUG|R_EVENT))
return
if(!CONFIG_GET(flag/allow_admin_jump)) // CHOMPEdit
if(!CONFIG_GET(flag/allow_admin_jump))
tgui_alert_async(usr, "Admin jumping disabled")
return
@@ -1607,7 +1607,7 @@
else if(href_list["getmob"])
if(!check_rights(R_ADMIN|R_MOD|R_DEBUG|R_EVENT))
return
if(!CONFIG_GET(flag/allow_admin_jump)) // CHOMPEdit
if(!CONFIG_GET(flag/allow_admin_jump))
tgui_alert_async(usr, "Admin jumping disabled")
return
if(tgui_alert(usr, "Confirm?", "Message", list("Yes", "No")) != "Yes")
@@ -1626,7 +1626,7 @@
else if(href_list["sendmob"])
if(!check_rights(R_ADMIN|R_MOD|R_DEBUG|R_EVENT))
return
if(!CONFIG_GET(flag/allow_admin_jump)) // CHOMPEdit
if(!CONFIG_GET(flag/allow_admin_jump))
tgui_alert_async(usr, "Admin jumping disabled")
return
@@ -1694,7 +1694,7 @@
else if(href_list["object_list"]) //this is the laggiest thing ever
if(!check_rights(R_SPAWN)) return
if(!CONFIG_GET(flag/allow_admin_spawning)) // CHOMPEdit
if(!CONFIG_GET(flag/allow_admin_spawning))
to_chat(usr, span_filter_adminlog("Spawning of items is not allowed."))
return

Some files were not shown because too many files have changed in this diff Show More