diff --git a/_build_dependencies.sh b/_build_dependencies.sh index be4b390a6d3..8cef5ce91b9 100644 --- a/_build_dependencies.sh +++ b/_build_dependencies.sh @@ -7,5 +7,3 @@ export NODE_VERSION=12 export BYOND_MAJOR=513 # Byond Minor export BYOND_MINOR=1528 -# For the RUSTG library. Not actually installed by CI but kept as a reference -export RUSTG_VERSION=2.1-P diff --git a/code/__DEFINES/rust_g.dm b/code/__DEFINES/rust_g.dm index fe4b644096b..6a331a6131f 100644 --- a/code/__DEFINES/rust_g.dm +++ b/code/__DEFINES/rust_g.dm @@ -18,14 +18,46 @@ // Noise related operations // #define rustg_noise_get_at_coordinates(seed, x, y) call(RUST_G, "noise_get_at_coordinates")(seed, x, y) +// File related operations // +#define rustg_file_read(fname) call(RUST_G, "file_read")(fname) +#define rustg_file_write(text, fname) call(RUST_G, "file_write")(text, fname) +#define rustg_file_append(text, fname) call(RUST_G, "file_append")(text, fname) + +#ifdef RUSTG_OVERRIDE_BUILTINS +#define file2text(fname) rustg_file_read(fname) +#define text2file(text, fname) rustg_file_append(text, fname) +#endif + // Git related operations // #define rustg_git_revparse(rev) call(RUST_G, "rg_git_revparse")(rev) #define rustg_git_commit_date(rev) call(RUST_G, "rg_git_commit_date")(rev) +// Hash related operations // +#define rustg_hash_string(algorithm, text) call(RUST_G, "hash_string")(algorithm, text) +#define rustg_hash_file(algorithm, fname) call(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 + // Logging stuff // #define rustg_log_write(fname, text) call(RUST_G, "log_write")(fname, text) /proc/rustg_log_close_all() return call(RUST_G, "log_close_all")() +// URL encoding stuff +#define rustg_url_encode(text) call(RUST_G, "url_encode")(text) +#define rustg_url_decode(text) call(RUST_G, "url_decode")(text) + +#ifdef RUSTG_OVERRIDE_BUILTINS +#define url_encode(text) rustg_url_encode(text) +#define url_decode(text) rustg_url_decode(text) +#endif + // HTTP library stuff // #define RUSTG_HTTP_METHOD_GET "get" #define RUSTG_HTTP_METHOD_PUT "put" @@ -50,5 +82,8 @@ #define rustg_sql_disconnect_pool(handle) call(RUST_G, "sql_disconnect_pool")(handle) #define rustg_sql_check_query(job_id) call(RUST_G, "sql_check_query")("[job_id]") +// toml2json stuff // +#define rustg_toml2json(tomlfile) call(RUST_G, "toml2json")(tomlfile) + // RUSTG Version // -#define RUST_G_VERSION "0.4.5-P2" +#define RUST_G_VERSION "0.4.5-P3" diff --git a/code/__HELPERS/text.dm b/code/__HELPERS/text.dm index 970f90684bb..4b2d36ab229 100644 --- a/code/__HELPERS/text.dm +++ b/code/__HELPERS/text.dm @@ -10,7 +10,7 @@ /proc/format_table_name(table as text) - return sqlfdbktableprefix + table + return GLOB.configuration.database.table_prefix + table /* * Text sanitization diff --git a/code/_globalvars/sensitive.dm b/code/_globalvars/sensitive.dm deleted file mode 100644 index 4c04b2d480b..00000000000 --- a/code/_globalvars/sensitive.dm +++ /dev/null @@ -1,12 +0,0 @@ -// All global vars in this file require a different handler as we dont want their data to be exposed, not even to admins with permission to view globals -// They write as native BYOND globals, which means they cant be edited at all, and also use a format -// Please only throw absolutely crucial do-not-view shit in here please. -aa07 - -// MySQL configuration -GLOBAL_REAL_VAR(sqladdress) = "localhost" -GLOBAL_REAL_VAR(sqlport) = "3306" -GLOBAL_REAL_VAR(sqlfdbkdb) = "test" -GLOBAL_REAL_VAR(sqlfdbklogin) = "root" -GLOBAL_REAL_VAR(sqlfdbkpass) = "" -GLOBAL_REAL_VAR(sqlfdbktableprefix) = "erro_" -GLOBAL_REAL_VAR(sql_version) = 0 diff --git a/code/controllers/configuration.dm b/code/controllers/configuration.dm index aa43133d111..7379c3b3990 100644 --- a/code/controllers/configuration.dm +++ b/code/controllers/configuration.dm @@ -24,8 +24,6 @@ var/log_world_output = 0 // log world.log << messages var/log_runtimes = 0 // logs world.log to a file var/log_hrefs = 0 // logs all links clicked in-game. Could be used for debugging and tracking down exploits - var/sql_enabled = 0 // for sql switching - var/allow_admin_ooccolor = 0 // Allows admins with relevant permissions to have their own ooc colour var/pregame_timestart = 240 // Time it takes for the server to start the game var/allow_vote_restart = 0 // allow votes to restart var/allow_vote_mode = 0 // allow votes to change mode @@ -37,14 +35,12 @@ var/vote_no_dead = 0 // dead people can't vote (tbi) // var/enable_authentication = 0 // goon authentication var/del_new_on_log = 1 // qdel's new players if they log before they spawn in - var/feature_object_spell_system = 0 //spawns a spellbook which gives object-type spells instead of verb-type spells for the wizard var/traitor_scaling = 0 //if amount of traitors scales based on amount of players var/protect_roles_from_antagonist = 0// If security and such can be tratior/cult/other var/continuous_rounds = 0 // Gamemodes which end instantly will instead keep on going until the round ends by escape shuttle or nuke. var/allow_Metadata = 0 // Metadata is supported. var/popup_admin_pm = 0 //adminPMs to non-admins show in a pop-up 'reply' window when set to 1. var/Ticklag = 0.5 - var/socket_talk = 0 // use socket_talk to communicate with other processes var/list/resource_urls = null var/antag_hud_allowed = 0 // Ghosts can turn on Antagovision to see a HUD of who is the bad guys this round. var/antag_hud_restricted = 0 // Ghosts that turn on Antagovision cannot rejoin the round. @@ -72,12 +68,6 @@ var/assistantlimit = 0 //enables assistant limiting var/assistantratio = 2 //how many assistants to security members - // The AFK subsystem will not be activated if any of the below config values are equal or less than 0 - var/warn_afk_minimum = 0 // How long till you get a warning while being AFK - var/auto_cryo_afk = 0 // How long till you get put into cryo when you're AFK - var/auto_despawn_afk = 0 // How long till you actually despawn in cryo when you're AFK (Not ssd so not automatic) - - var/auto_cryo_ssd_mins = 0 var/ssd_warning = 0 var/list_afk_minimum = 5 // How long people have to be AFK before it's listed on the "List AFK players" verb @@ -91,7 +81,6 @@ var/usealienwhitelist = 0 var/limitalienplayers = 0 - var/alien_to_human_ratio = 0.5 var/server var/banappeals @@ -100,7 +89,6 @@ var/rulesurl = "http://example.org" var/githuburl = "http://example.org" var/donationsurl = "http://example.org" - var/repositoryurl = "http://example.org" var/discordurl = "http://example.org" var/discordforumurl = "http://example.org" @@ -223,9 +211,6 @@ // Developer var/developer_express_start = 0 - // Automatic localhost admin disable - var/disable_localhost_admin = 0 - //Start now warning var/start_now_confirmation = 0 @@ -263,12 +248,6 @@ /// URL for the CentCom Ban DB API var/centcom_ban_db_url = null - /// Timeout (seconds) for async SQL queries - var/async_sql_query_timeout = 10 SECONDS - - /// Limit of how many SQL threads can run at once - var/rust_sql_thread_limit = 50 - /// Max amount of CIDs that one ckey can have attached to them before they trip a warning var/max_client_cid_history = 3 @@ -323,9 +302,6 @@ if("resource_urls") config.resource_urls = splittext(value, " ") - if("admin_legacy_system") - config.admin_legacy_system = 1 - if("ban_legacy_system") config.ban_legacy_system = 1 @@ -350,15 +326,6 @@ if("shadowling_max_age") config.shadowling_max_age = text2num(value) - if("warn_afk_minimum") - config.warn_afk_minimum = text2num(value) - if("auto_cryo_afk") - config.auto_cryo_afk = text2num(value) - if("auto_despawn_afk") - config.auto_despawn_afk = text2num(value) - - if("auto_cryo_ssd_mins") - config.auto_cryo_ssd_mins = text2num(value) if("ssd_warning") config.ssd_warning = 1 @@ -440,9 +407,6 @@ if("mentors") config.mods_are_mentors = 1 - if("allow_admin_ooccolor") - config.allow_admin_ooccolor = 1 - if("pregame_timestart") config.pregame_timestart = text2num(value) @@ -524,9 +488,6 @@ if("donationsurl") config.donationsurl = value - if("repositoryurl") - config.repositoryurl = value - if("guest_jobban") config.guest_jobban = 1 @@ -539,9 +500,6 @@ if("usewhitelist") config.usewhitelist = 1 - if("feature_object_spell_system") - config.feature_object_spell_system = 1 - if("allow_metadata") config.allow_Metadata = 1 @@ -587,9 +545,6 @@ if("ticklag") Ticklag = text2num(value) - if("socket_talk") - socket_talk = text2num(value) - if("allow_antag_hud") config.antag_hud_allowed = 1 @@ -605,10 +560,6 @@ if("usealienwhitelist") usealienwhitelist = 1 - if("alien_player_ratio") - limitalienplayers = 1 - alien_to_human_ratio = text2num(value) - if("assistant_maint") config.assistant_maint = 1 @@ -744,8 +695,6 @@ config.disable_high_pop_mc_mode_amount = text2num(value) if("developer_express_start") config.developer_express_start = 1 - if("disable_localhost_admin") - config.disable_localhost_admin = 1 if("enable_gamemode_player_limit") config.enable_gamemode_player_limit = 1 if("byond_account_age_threshold") @@ -837,59 +786,6 @@ else log_config("Unknown setting in configuration: '[name]'") -/datum/configuration/proc/loadsql(filename) // -- TLE - if(IsAdminAdvancedProcCall()) - to_chat(usr, "SQL configuration reload blocked: Advanced ProcCall detected.") - message_admins("[key_name(usr)] attempted to reload SQL configuration via advanced proc-call") - log_admin("[key_name(usr)] attempted to reload SQL configuration via advanced proc-call") - return - var/list/Lines = file2list(filename) - 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("sql_enabled") - config.sql_enabled = 1 - if("address") - sqladdress = value - if("port") - sqlport = value - if("feedback_database") - sqlfdbkdb = value - if("feedback_login") - sqlfdbklogin = value - if("feedback_password") - sqlfdbkpass = value - if("feedback_tableprefix") - sqlfdbktableprefix = value - if("db_version") - sql_version = text2num(value) - if("async_query_timeout") - async_sql_query_timeout = text2num(value) - if("rust_sql_thread_limit") - config.rust_sql_thread_limit = text2num(value) - else - log_config("Unknown setting in configuration: '[name]'") - /datum/configuration/proc/loadoverflowwhitelist(filename) var/list/Lines = file2list(filename) for(var/t in Lines) diff --git a/code/controllers/configuration/__config_defines.dm b/code/controllers/configuration/__config_defines.dm new file mode 100644 index 00000000000..874fd9160f4 --- /dev/null +++ b/code/controllers/configuration/__config_defines.dm @@ -0,0 +1,36 @@ +// Config protection states +#define PROTECTION_PRIVATE "PRIVATE" +#define PROTECTION_READONLY "READONLY" +#define PROTECTION_NONE "NONE" +/// Wrapper to not overwrite a variable if a list key doesnt exist. Auto casts to bools. +#define CONFIG_LOAD_BOOL(target, input) \ + if(!isnull(input)) {\ + target = ((input == 1) ? TRUE : FALSE)\ + } + +/// Wrapper to not overwrite a variable if a list key doesnt exist. Auto casts to int. +#define CONFIG_LOAD_INT(target, input) \ + if(!isnull(input)) {\ + target = text2num(input)\ + } + +/// Wrapper to not overwrite a variable if a list key doesnt exist. Auto casts to string. +#define CONFIG_LOAD_STR(target, input) \ + if(!isnull(input)) {\ + target = "[input]"\ + } + +/// Wrapper to not overwrite a variable if a list key doesnt exist. No casting done. +#define CONFIG_LOAD_RAW(target, input) \ + if(!isnull(input)) {\ + target = input\ + } + +/// Wrapper to not overwrite a variable if a list key doesnt exist. Ensures target is a list. +#define CONFIG_LOAD_LIST(target, input) \ + if(!isnull(input)) {\ + if(islist(input)) {\ + target = input\ + }\ + } + diff --git a/code/controllers/configuration/configuration_core.dm b/code/controllers/configuration/configuration_core.dm new file mode 100644 index 00000000000..9398f6aa83a --- /dev/null +++ b/code/controllers/configuration/configuration_core.dm @@ -0,0 +1,78 @@ +// Paradise SS13 Configuration System +// Refactored to use config sections as part of a single TOML file, since thats much better to deal with + +GLOBAL_DATUM_INIT(configuration, /datum/server_configuration, new()) + +/// Represents a base configuration datum. Has everything else bundled into it +/datum/server_configuration + /// Holder for the admin configuration datum + var/datum/configuration_section/admin_configuration/admin + var/datum/configuration_section/afk_configuration/afk + var/datum/configuration_section/custom_sprites_configuration/custom_sprites + var/datum/configuration_section/database_configuration/database + +/datum/server_configuration/Destroy(force) + SHOULD_CALL_PARENT(FALSE) + // This is going to stay existing. I dont care. + return QDEL_HINT_LETMELIVE + +/datum/server_configuration/CanProcCall(procname) + return FALSE // No thanks + +/datum/server_configuration/proc/load_configuration() + var/start = start_watch() // Time tracking + + // Initialize all our holders + admin = new() + afk = new() + custom_sprites = new() + database = new() + + // Load our stuff up + var/config_file = "config/config.toml" + if(!fexists(config_file)) + config_file = "config/example/config.toml" // Fallback to example if user hasnt setup config properly + var/raw_json = rustg_toml2json(config_file) + var/list/raw_config_data = json_decode(raw_json) + + // Now pass through all our stuff + admin.load_data(raw_config_data["admin_configuration"]) + afk.load_data(raw_config_data["afk_configuration"]) + custom_sprites.load_data(raw_config_data["custom_sprites_configuration"]) + database.load_data(raw_config_data["database_configuration"]) + + // And report the load + DIRECT_OUTPUT(world.log, "Config loaded in [stop_watch(start)]s") + pass() // Breakpoint here. If I left thing in, scream at me. + + +/datum/configuration_section + /// See __config_defines.dm + var/protection_state = PROTECTION_NONE + +/datum/configuration_section/proc/load_data(list/data) + CRASH("load() not overriden for [type]!") + +// Maximum protection +/datum/configuration_section/can_vv_get(var_name) + if(protection_state == PROTECTION_PRIVATE) + return FALSE + . = ..() + +/datum/configuration_section/vv_edit_var(var_name, var_value) + if(protection_state in list(PROTECTION_PRIVATE, PROTECTION_READONLY)) + return FALSE + . = ..() + +/datum/configuration_section/vv_get_var(var_name) + if(protection_state == PROTECTION_PRIVATE) + return FALSE + . = ..() + +/datum/configuration_section/Destroy(force) + SHOULD_CALL_PARENT(FALSE) + // This is going to stay existing. I dont care. + return QDEL_HINT_LETMELIVE + +/datum/configuration_section/CanProcCall(procname) + return FALSE // No thanks diff --git a/code/controllers/configuration/sections/admin_configuration.dm b/code/controllers/configuration/sections/admin_configuration.dm new file mode 100644 index 00000000000..0829b6f2f7a --- /dev/null +++ b/code/controllers/configuration/sections/admin_configuration.dm @@ -0,0 +1,32 @@ +/// Config holder for all admin related things +/datum/configuration_section/admin_configuration + protection_state = PROTECTION_READONLY // Dont even think about it + var/use_database_admins = FALSE + var/enable_localhost_autoadmin = TRUE + var/allow_admin_ooc_colour = TRUE + /// Assoc list of admin ranks and their stuff. key: rank name string | value: list of rights + var/list/rank_rights_map = list() + /// Assoc list of admin ckeys and their ranks. key: ckey | value: rank name + var/list/ckey_rank_map = list() + +/datum/configuration_section/admin_configuration/load_data(list/data) + // Use the load wrappers here. That way the default isnt made 'null' if you comment out the config line + CONFIG_LOAD_BOOL(use_database_admins, data["use_database_admins"]) + CONFIG_LOAD_BOOL(enable_localhost_autoadmin, data["enable_localhost_autoadmin"]) + CONFIG_LOAD_BOOL(allow_admin_ooc_colour, data["allow_admin_ooc_colour"]) + + // Load admin rank tokens + if(islist(data["admin_ranks"])) + rank_rights_map.Cut() + for(var/list/kvset in data["admin_ranks"]) + rank_rights_map[kvset["name"]] = kvset["rights"] + + // Load admin assignments + if(islist(data["admin_assignments"])) + ckey_rank_map.Cut() + for(var/list/kvset in data["admin_assignments"]) + ckey_rank_map[kvset["ckey"]] = kvset["rank"] + + // For the person who asks "Why not put admin datum generation in this step?", well I will tell you why + // Admins can be reloaded at runtime when DB edits are made and such, and I dont want an entire config reload to be part of this + // Separation makes sense. That and in prod we use the DB anyways. diff --git a/code/controllers/configuration/sections/afk_configuration.dm b/code/controllers/configuration/sections/afk_configuration.dm new file mode 100644 index 00000000000..292492e3ca1 --- /dev/null +++ b/code/controllers/configuration/sections/afk_configuration.dm @@ -0,0 +1,17 @@ +/// Config holder for all AFK related things +/datum/configuration_section/afk_configuration + /// Minutes before someone gets an AFK warning + var/warning_minutes = 0 + /// Minutes before someone is auto moved to cryo + var/auto_cryo_minutes = 0 + /// Minutes before someone is auto despawned + var/auto_despawn_minutes = 0 + /// Time before SSD people are auto cryo'd + var/ssd_auto_cryo_minutes = 0 + +/datum/configuration_section/afk_configuration/load_data(list/data) + // Use the load wrappers here. That way the default isnt made 'null' if you comment out the config line + CONFIG_LOAD_INT(warning_minutes, data["afk_warning_minutes"]) + CONFIG_LOAD_INT(auto_cryo_minutes, data["afk_auto_cryo_minutes"]) + CONFIG_LOAD_INT(auto_despawn_minutes, data["afk_auto_despawn_minutes"]) + CONFIG_LOAD_INT(ssd_auto_cryo_minutes, data["ssd_auto_cryo_minutes"]) diff --git a/code/controllers/configuration/sections/custom_sprites_configuration.dm b/code/controllers/configuration/sections/custom_sprites_configuration.dm new file mode 100644 index 00000000000..3b1c18feb70 --- /dev/null +++ b/code/controllers/configuration/sections/custom_sprites_configuration.dm @@ -0,0 +1,25 @@ +/// Config holder for all things regarding custom sprites +/datum/configuration_section/custom_sprites_configuration + /// List of ckeys that have custom cyborg skins + var/list/cyborg_ckeys = list() + /// List of ckeys that have custom AI core skins + var/list/ai_core_ckeys = list() + /// List of ckeys that have custom AI hologram skins + var/list/ai_hologram_ckeys = list() + /// List of ckeys that have custom pAI holoforms + var/list/pai_holoform_ckeys = list() + /// Assoc of ckeys that have custom pAI screens. Key: ckey | value: list of icon states + var/list/ipc_screen_map = list() + +/datum/configuration_section/custom_sprites_configuration/load_data(list/data) + // Use the load wrappers here. That way the default isnt made 'null' if you comment out the config line + CONFIG_LOAD_LIST(cyborg_ckeys, data["cyborgs"]) + CONFIG_LOAD_LIST(ai_core_ckeys, data["ai_core"]) + CONFIG_LOAD_LIST(ai_hologram_ckeys, data["ai_hologram"]) + CONFIG_LOAD_LIST(pai_holoform_ckeys, data["pai_holoform"]) + + // Load the ipc screens + if(islist(data["ipc_screens"])) + ipc_screen_map.Cut() + for(var/kvp in data["ipc_screens"]) + ipc_screen_map[kvp["ckey"]] = kvp["screens"] diff --git a/code/controllers/configuration/sections/database_configuration.dm b/code/controllers/configuration/sections/database_configuration.dm new file mode 100644 index 00000000000..e71a159777a --- /dev/null +++ b/code/controllers/configuration/sections/database_configuration.dm @@ -0,0 +1,47 @@ +/// Config holder for all database related things +/datum/configuration_section/database_configuration + protection_state = PROTECTION_PRIVATE // NO! BAD! + /// SQL enabled or not + var/enabled = FALSE + /// What SQL version are we on + var/version = 0 + /// Address of the SQL server + var/address = "127.0.0.1" + /// Port of the SQL server + var/port = 3306 + /// SQL usename + var/username = "root" + /// SQL password + var/password = "root" // Dont do this in prod. Please...... + /// Database name + var/db = "feedback" // TODO: Rename to paradise_db + /// Table prefix + var/table_prefix = "erro_" // TODO: Remove table prefixes + /// Time in seconds for async queries to time out + var/async_query_timeout = 10 + /// Thread limit for async queries + var/async_thread_limit = 50 + +/datum/configuration_section/database_configuration/load_data(list/data) + // UNIT TESTS ARE DEFINED - USE CUSTOM CI VALUES + #ifdef UNIT_TESTS + + enabled = TRUE + table_prefix = "" + // This needs to happen in the CI environment to ensure the example SQL version gets updated. + CONFIG_LOAD_INT(version, data["sql_version"]) + + #else + // Load the normal config. Were not in CI mode + // Use the load wrappers here. That way the default isnt made 'null' if you comment out the config line + CONFIG_LOAD_BOOL(enabled, data["sql_enabled"]) + CONFIG_LOAD_INT(version, data["sql_version"]) + CONFIG_LOAD_STR(address, data["sql_address"]) + CONFIG_LOAD_INT(port, data["sql_port"]) + CONFIG_LOAD_STR(username, data["sql_username"]) + CONFIG_LOAD_STR(password, data["sql_password"]) + CONFIG_LOAD_STR(db, data["sql_database"]) + CONFIG_LOAD_STR(table_prefix, data["sql_table_prefix"]) + CONFIG_LOAD_INT(async_query_timeout, data["async_query_timeout"]) + CONFIG_LOAD_INT(async_thread_limit, data["async_thread_limit"]) + #endif diff --git a/code/controllers/subsystem/afk.dm b/code/controllers/subsystem/afk.dm index 9b1d5f3fa26..c7042513e49 100644 --- a/code/controllers/subsystem/afk.dm +++ b/code/controllers/subsystem/afk.dm @@ -12,7 +12,8 @@ SUBSYSTEM_DEF(afk) /datum/controller/subsystem/afk/Initialize() - if(config.warn_afk_minimum <= 0 || config.auto_cryo_afk <= 0 || config.auto_despawn_afk <= 0) + + if(GLOB.configuration.afk.warning_minutes <= 0 || GLOB.configuration.afk.auto_cryo_minutes <= 0 || GLOB.configuration.afk.auto_despawn_minutes <= 0) flags |= SS_NO_FIRE else non_cryo_antags = list(SPECIAL_ROLE_ABDUCTOR_AGENT, SPECIAL_ROLE_ABDUCTOR_SCIENTIST, \ @@ -35,19 +36,20 @@ SUBSYSTEM_DEF(afk) toRemove += H.ckey continue + var/mins_afk = round(H.client.inactivity / 600) - if(mins_afk < config.warn_afk_minimum) + if(mins_afk < GLOB.configuration.afk.warning_minutes) if(afk_players[H.ckey]) toRemove += H.ckey continue if(!afk_players[H.ckey]) afk_players[H.ckey] = AFK_WARNED - warn(H, "You are AFK for [mins_afk] minutes. You will be cryod after [config.auto_cryo_afk] total minutes and fully despawned after [config.auto_despawn_afk] total minutes. Please move or click in game if you want to avoid being despawned.") + warn(H, "You are AFK for [mins_afk] minutes. You will be cryod after [GLOB.configuration.afk.auto_cryo_minutes] total minutes and fully despawned after [GLOB.configuration.afk.auto_despawn_minutes] total minutes. Please move or click in game if you want to avoid being despawned.") else var/area/A = T.loc // Turfs loc is the area if(afk_players[H.ckey] == AFK_WARNED) - if(mins_afk >= config.auto_cryo_afk && A.can_get_auto_cryod) + if(mins_afk >= GLOB.configuration.afk.auto_cryo_minutes && A.can_get_auto_cryod) if(A.fast_despawn) toRemove += H.ckey warn(H, "You have been despawned after being AFK for [mins_afk] minutes. You have been despawned instantly due to you being in a secure area.") @@ -60,13 +62,13 @@ SUBSYSTEM_DEF(afk) afk_players[H.ckey] = AFK_CRYOD log_afk_action(H, mins_afk, T, "put into cryostorage") warn(H, "You are AFK for [mins_afk] minutes and have been moved to cryostorage. \ - After being AFK for another [config.auto_despawn_afk] minutes you will be fully despawned. \ + After being AFK for another [GLOB.configuration.afk.auto_despawn_minutes] minutes you will be fully despawned. \ Please eject yourself (right click, eject) out of the cryostorage if you want to avoid being despawned.") else message_admins("[key_name_admin(H)] at ([get_area(T).name] [ADMIN_JMP(T)]) is AFK for [mins_afk] and can't be automatically cryod due to it's antag status: ([H.mind.special_role]).") afk_players[H.ckey] = AFK_ADMINS_WARNED - else if(afk_players[H.ckey] != AFK_ADMINS_WARNED && mins_afk >= config.auto_despawn_afk) + else if(afk_players[H.ckey] != AFK_ADMINS_WARNED && mins_afk >= GLOB.configuration.afk.auto_despawn_minutes) log_afk_action(H, mins_afk, T, "despawned") warn(H, "You have been despawned after being AFK for [mins_afk] minutes.") toRemove += H.ckey diff --git a/code/controllers/subsystem/dbcore.dm b/code/controllers/subsystem/dbcore.dm index 81aab3b0759..fa8d6ee6df9 100644 --- a/code/controllers/subsystem/dbcore.dm +++ b/code/controllers/subsystem/dbcore.dm @@ -30,7 +30,7 @@ SUBSYSTEM_DEF(dbcore) // This is in Initialize() so that its actually seen in chat /datum/controller/subsystem/dbcore/Initialize() if(!schema_valid) - to_chat(world, "Database schema ([sql_version]) doesn't match the latest schema version ([SQL_VERSION]). Roundstart has been delayed.") + to_chat(world, "Database schema ([GLOB.configuration.database.version]) doesn't match the latest schema version ([SQL_VERSION]). Roundstart has been delayed.") return ..() @@ -66,7 +66,7 @@ SUBSYSTEM_DEF(dbcore) if(IsConnected()) return TRUE - if(!config.sql_enabled) + if(!GLOB.configuration.database.enabled) return FALSE if(failed_connection_timeout <= world.time) //it's been more than 5 seconds since we failed to connect, reset the counter @@ -77,14 +77,14 @@ SUBSYSTEM_DEF(dbcore) return FALSE var/result = json_decode(rustg_sql_connect_pool(json_encode(list( - "host" = sqladdress, - "port" = text2num(sqlport), - "user" = sqlfdbklogin, - "pass" = sqlfdbkpass, - "db_name" = sqlfdbkdb, - "read_timeout" = config.async_sql_query_timeout, - "write_timeout" = config.async_sql_query_timeout, - "max_threads" = config.rust_sql_thread_limit, + "host" = GLOB.configuration.database.address, + "port" = GLOB.configuration.database.port, + "user" = GLOB.configuration.database.username, + "pass" = GLOB.configuration.database.password, + "db_name" = GLOB.configuration.database.db, + "read_timeout" = GLOB.configuration.database.async_query_timeout, + "write_timeout" = GLOB.configuration.database.async_query_timeout, + "max_threads" = GLOB.configuration.database.async_thread_limit, )))) . = (result["status"] == "ok") if(.) @@ -102,11 +102,11 @@ SUBSYSTEM_DEF(dbcore) * If it is a valid version, the DB will then connect. */ /datum/controller/subsystem/dbcore/proc/CheckSchemaVersion() - if(config.sql_enabled) + if(GLOB.configuration.database.enabled) // The unit tests have their own version of this check, which wont hold the server up infinitely, so this is disabled if we are running unit tests #ifndef UNIT_TESTS - if(config.sql_enabled && sql_version != SQL_VERSION) - config.sql_enabled = FALSE + if(GLOB.configuration.database.enabled && GLOB.configuration.database.version != SQL_VERSION) + GLOB.configuration.database.enabled = FALSE schema_valid = FALSE SSticker.ticker_going = FALSE SEND_TEXT(world.log, "Database connection failed: Invalid SQL Versions") @@ -206,7 +206,7 @@ SUBSYSTEM_DEF(dbcore) * Does a few sanity checks, then asks the DLL if we are properly connected */ /datum/controller/subsystem/dbcore/proc/IsConnected() - if(!config.sql_enabled) + if(!GLOB.configuration.database.enabled) return FALSE if(!schema_valid) return FALSE @@ -222,7 +222,7 @@ SUBSYSTEM_DEF(dbcore) * Will always report "Database disabled by configuration" if the DB is disabled. */ /datum/controller/subsystem/dbcore/proc/ErrorMsg() - if(!config.sql_enabled) + if(!GLOB.configuration.database.enabled) return "Database disabled by configuration" return last_error @@ -492,7 +492,7 @@ SUBSYSTEM_DEF(dbcore) /client/proc/reestablish_db_connection() set category = "Debug" set name = "Reestablish DB Connection" - if(!config.sql_enabled) + if(!GLOB.configuration.database.enabled) to_chat(usr, "The Database is not enabled in the server configuration!") return diff --git a/code/controllers/subsystem/statistics.dm b/code/controllers/subsystem/statistics.dm index bfc7d9655d5..16328e4c0f1 100644 --- a/code/controllers/subsystem/statistics.dm +++ b/code/controllers/subsystem/statistics.dm @@ -6,7 +6,7 @@ SUBSYSTEM_DEF(statistics) /datum/controller/subsystem/statistics/Initialize(start_timeofday) - if(!config.sql_enabled) + if(!GLOB.configuration.database.enabled) flags |= SS_NO_FIRE // Disable firing if SQL is disabled return ..() diff --git a/code/game/gamemodes/wizard/wizard.dm b/code/game/gamemodes/wizard/wizard.dm index 43e768a1ef2..53b0e9a9372 100644 --- a/code/game/gamemodes/wizard/wizard.dm +++ b/code/game/gamemodes/wizard/wizard.dm @@ -110,16 +110,6 @@ obj_count++ return -/*/datum/game_mode/proc/learn_basic_spells(mob/living/carbon/human/wizard_mob) - if(!istype(wizard_mob)) - return - if(!config.feature_object_spell_system) - wizard_mob.verbs += /client/proc/jaunt - wizard_mob.mind.special_verbs += /client/proc/jaunt - else - wizard_mob.spell_list += new /obj/effect/proc_holder/spell/targeted/ethereal_jaunt(usr) -*/ - /datum/game_mode/proc/equip_wizard(mob/living/carbon/human/wizard_mob) if(!istype(wizard_mob)) return diff --git a/code/game/jobs/whitelist.dm b/code/game/jobs/whitelist.dm index af80e7474a4..4ebabc37d9b 100644 --- a/code/game/jobs/whitelist.dm +++ b/code/game/jobs/whitelist.dm @@ -1,24 +1,3 @@ -#define WHITELISTFILE "data/whitelist.txt" - -GLOBAL_LIST_EMPTY(whitelist) - -/proc/init_whitelists() - if(config.usewhitelist) - load_whitelist() - if(config.usealienwhitelist) - load_alienwhitelist() - -/proc/load_whitelist() - GLOB.whitelist = file2list(WHITELISTFILE) - if(!GLOB.whitelist.len) - GLOB.whitelist = null -/* -/proc/check_whitelist(mob/M, rank) - if(!whitelist) - return 0 - return ("[M.ckey]" in whitelist) -*/ - /proc/is_job_whitelisted(mob/M, rank) if(guest_jobbans(rank)) if(!config.usewhitelist) @@ -55,18 +34,6 @@ GLOBAL_LIST_EMPTY(whitelist) else return TRUE - - - -GLOBAL_LIST_EMPTY(alien_whitelist) - -/proc/load_alienwhitelist() - var/text = file2text("config/alienwhitelist.txt") - if(!text) - log_config("Failed to load config/alienwhitelist.txt\n") - else - GLOB.alien_whitelist = splittext(text, "\n") - //todo: admin aliens /proc/is_alien_whitelisted(mob/M, species) if(!config.usealienwhitelist) @@ -77,8 +44,6 @@ GLOBAL_LIST_EMPTY(alien_whitelist) return TRUE if(check_rights(R_ADMIN, 0)) return TRUE - if(!GLOB.alien_whitelist) - return FALSE if(!SSdbcore.IsConnected()) return FALSE else @@ -104,14 +69,3 @@ GLOBAL_LIST_EMPTY(alien_whitelist) break qdel(species_read) -/* - if(M && species) - for(var/s in alien_whitelist) - if(findtext(s,"[M.ckey] - [species]")) - return 1 - if(findtext(s,"[M.ckey] - All")) - return 1 -*/ - - -#undef WHITELISTFILE diff --git a/code/game/verbs/ooc.dm b/code/game/verbs/ooc.dm index f4f37f313a1..5f7bdc35e49 100644 --- a/code/game/verbs/ooc.dm +++ b/code/game/verbs/ooc.dm @@ -61,7 +61,7 @@ GLOBAL_VAR_INIT(admin_ooc_colour, "#b82e00") if(check_rights(R_MOD,0) && !check_rights(R_ADMIN,0)) display_colour = GLOB.moderator_ooc_colour else if(check_rights(R_ADMIN,0)) - if(config.allow_admin_ooccolor) + if(GLOB.configuration.admin.allow_admin_ooc_colour) display_colour = src.prefs.ooccolor else display_colour = GLOB.admin_ooc_colour diff --git a/code/game/world.dm b/code/game/world.dm index 5ba97917661..f91d9b0f875 100644 --- a/code/game/world.dm +++ b/code/game/world.dm @@ -8,9 +8,20 @@ GLOBAL_LIST_INIT(map_transition_config, MAP_TRANSITION_CONFIG) // Right off the bat enable_auxtools_debugger() + // Do sanity checks to ensure RUST actually exists + if(!fexists(RUST_G)) + DIRECT_OUTPUT(world.log, "ERROR: RUSTG was not found and is required for the game to function. Server will now exit.") + del(world) + + var/rustg_version = rustg_get_version() + if(rustg_version != RUST_G_VERSION) + DIRECT_OUTPUT(world.log, "ERROR: RUSTG version mismatch. Library is [rustg_version], code wants [RUST_G_VERSION]. Server will now exit.") + del(world) + //temporary file used to record errors with loading config and the database, moved to log directory once logging is set up GLOB.config_error_log = GLOB.world_game_log = GLOB.world_runtime_log = GLOB.sql_log = "data/logs/config_error.log" load_configuration() + GLOB.configuration.load_configuration() // Right off the bat, load up the DB SSdbcore.CheckSchemaVersion() // This doesnt just check the schema version, it also connects to the db! This needs to happen super early! I cannot stress this enough! @@ -188,7 +199,6 @@ GLOBAL_LIST_EMPTY(world_topic_handlers) config = new /datum/configuration() config.load("config/config.txt") config.load("config/game_options.txt","game_options") - config.loadsql("config/dbconfig.txt") config.loadoverflowwhitelist("config/ofwhitelist.txt") // apply some settings from config.. diff --git a/code/modules/admin/admin_ranks.dm b/code/modules/admin/admin_ranks.dm index 72376027dc5..9f0f37df719 100644 --- a/code/modules/admin/admin_ranks.dm +++ b/code/modules/admin/admin_ranks.dm @@ -7,25 +7,15 @@ GLOBAL_PROTECT(admin_ranks) // this shit is being protected for obvious reasons var/previous_rights = 0 - //load text from file - var/list/Lines = file2list("config/admin_ranks.txt") - - //process each line seperately - for(var/line in Lines) - if(!length(line)) continue - if(copytext(line,1,2) == "#") continue - - var/list/List = splittext(line,"+") - if(!List.len) continue - - var/rank = ckeyEx(List[1]) - switch(rank) - if(null,"") continue - if("Removed") continue //Reserved + // Process each rank set seperately + // key: rank name | value: list of rights + for(var/rankname in GLOB.configuration.admin.rank_rights_map) + var/list/rank_right_tokens = GLOB.configuration.admin.rank_rights_map[rankname] var/rights = 0 - for(var/i=2, i<=List.len, i++) - switch(ckey(List[i])) + for(var/right_token in rank_right_tokens) + var/token = lowertext(splittext(right_token, "+")[2]) + switch(token) if("@","prev") rights |= previous_rights if("buildmode","build") rights |= R_BUILDMODE if("admin") rights |= R_ADMIN @@ -46,7 +36,7 @@ GLOBAL_PROTECT(admin_ranks) // this shit is being protected for obvious reasons if("proccall") rights |= R_PROCCALL if("viewruntimes") rights |= R_VIEWRUNTIMES - GLOB.admin_ranks[rank] = rights + GLOB.admin_ranks[rankname] = rights previous_rights = rights #ifdef TESTING @@ -73,29 +63,13 @@ GLOBAL_PROTECT(admin_ranks) // this shit is being protected for obvious reasons for(var/A in world.GetConfig("admin")) world.SetConfig("APP/admin", A, null) - if(config.admin_legacy_system) + if(!GLOB.configuration.admin.use_database_admins) load_admin_ranks() - //load text from file - var/list/Lines = file2list("config/admins.txt") - //process each line seperately - for(var/line in Lines) - if(!length(line)) continue - if(copytext(line,1,2) == "#") continue - - //Split the line at every "-" - var/list/List = splittext(line, "-") - if(!List.len) continue - - //ckey is before the first "-" - var/ckey = ckey(List[1]) - if(!ckey) continue - - //rank follows the first "-" - var/rank = "" - if(List.len >= 2) - rank = ckeyEx(List[2]) + for(var/iterator_key in GLOB.configuration.admin.ckey_rank_map) + var/ckey = ckey(iterator_key) // Snip out formatting + var/rank = GLOB.configuration.admin.ckey_rank_map[iterator_key] //load permissions associated with this rank var/rights = GLOB.admin_ranks[rank] @@ -113,7 +87,7 @@ GLOBAL_PROTECT(admin_ranks) // this shit is being protected for obvious reasons //The current admin system uses SQL if(!SSdbcore.IsConnected()) log_world("Failed to connect to database in load_admins(). Reverting to legacy system.") - config.admin_legacy_system = 1 + GLOB.configuration.admin.use_database_admins = FALSE load_admins() return @@ -141,7 +115,7 @@ GLOBAL_PROTECT(admin_ranks) // this shit is being protected for obvious reasons if(!GLOB.admin_datums) log_world("The database query in load_admins() resulted in no admins being added to the list. Reverting to legacy system.") - config.admin_legacy_system = 1 + GLOB.configuration.admin.use_database_admins = FALSE load_admins() return diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index f63473216a9..9cc91cb4a32 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -672,21 +672,13 @@ GLOBAL_LIST_INIT(admin_verbs_ticket, list( var/datum/admins/D = GLOB.admin_datums[ckey] var/rank = null - if(config.admin_legacy_system) - //load text from file - var/list/Lines = file2list("config/admins.txt") - for(var/line in Lines) - if(findtext(line, "#")) // Skip comments + if(!GLOB.configuration.admin.use_database_admins) + for(var/iterator_key in GLOB.configuration.admin.ckey_rank_map) + var/_ckey = ckey(iterator_key) // Snip out formatting + if(ckey != _ckey) continue - - var/list/splitline = splittext(line, " - ") - if(length(splitline) != 2) // Always 'ckey - rank' - continue - if(lowertext(splitline[1]) == ckey) - rank = ckeyEx(splitline[2]) - break - continue - + rank = GLOB.configuration.admin.ckey_rank_map[iterator_key] + break else if(!SSdbcore.IsConnected()) to_chat(src, "Warning, MYSQL database is not connected.") @@ -706,7 +698,7 @@ GLOBAL_LIST_INIT(admin_verbs_ticket, list( qdel(rank_read) if(!D) - if(config.admin_legacy_system) + if(!GLOB.configuration.admin.use_database_admins) if(GLOB.admin_ranks[rank] == null) error("Error while re-adminning [src], admin rank ([rank]) does not exist.") to_chat(src, "Error while re-adminning, admin rank ([rank]) does not exist.") diff --git a/code/modules/admin/permissionverbs/permissionedit.dm b/code/modules/admin/permissionverbs/permissionedit.dm index 0abbb877350..17d3e2c0fa3 100644 --- a/code/modules/admin/permissionverbs/permissionedit.dm +++ b/code/modules/admin/permissionverbs/permissionedit.dm @@ -52,7 +52,7 @@ usr << browse(output,"window=editrights;size=600x500") /datum/admins/proc/log_admin_rank_modification(adm_ckey, new_rank) - if(config.admin_legacy_system) return + if(!GLOB.configuration.admin.use_database_admins) return if(!usr.client) return @@ -140,7 +140,7 @@ message_admins("[key_name(usr)] attempted to edit admin ranks via advanced proc-call") log_admin("[key_name(usr)] attempted to edit admin ranks via advanced proc-call") return - if(config.admin_legacy_system) + if(!GLOB.configuration.admin.use_database_admins) return if(!usr.client) diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index 26fa05cebfb..754b4c45924 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -287,19 +287,19 @@ if(null,"") return if("*New Rank*") new_rank = input("Please input a new rank", "New custom rank", null, null) as null|text - if(config.admin_legacy_system) + if(!GLOB.configuration.admin.use_database_admins) new_rank = ckeyEx(new_rank) if(!new_rank) to_chat(usr, "Error: Topic 'editrights': Invalid rank") return - if(config.admin_legacy_system) + if(!GLOB.configuration.admin.use_database_admins) if(GLOB.admin_ranks.len) if(new_rank in GLOB.admin_ranks) rights = GLOB.admin_ranks[new_rank] //we typed a rank which already exists, use its rights else GLOB.admin_ranks[new_rank] = 0 //add the new rank to admin_ranks else - if(config.admin_legacy_system) + if(!GLOB.configuration.admin.use_database_admins) new_rank = ckeyEx(new_rank) rights = GLOB.admin_ranks[new_rank] //we input an existing rank, use its rights diff --git a/code/modules/client/client_procs.dm b/code/modules/client/client_procs.dm index fe1799b5048..e357899aaec 100644 --- a/code/modules/client/client_procs.dm +++ b/code/modules/client/client_procs.dm @@ -274,7 +274,7 @@ GLOB.directory[ckey] = src //Admin Authorisation // Automatically makes localhost connection an admin - if(!config.disable_localhost_admin) + if(GLOB.configuration.admin.enable_localhost_autoadmin) if(is_connecting_from_localhost()) new /datum/admins("!LOCALHOST!", R_HOST, ckey) // Makes localhost rank holder = GLOB.admin_datums[ckey] diff --git a/code/modules/client/preference/preferences.dm b/code/modules/client/preference/preferences.dm index 5a838c3ac9a..b3f913e9134 100644 --- a/code/modules/client/preference/preferences.dm +++ b/code/modules/client/preference/preferences.dm @@ -2025,8 +2025,8 @@ GLOBAL_LIST_INIT(special_role_times, list( //minimum age (in days) for accounts if("afk_watch") if(!(toggles2 & PREFTOGGLE_2_AFKWATCH)) - to_chat(user, "You will now get put into cryo dorms after [config.auto_cryo_afk] minutes. \ - Then after [config.auto_despawn_afk] minutes you will be fully despawned. You will receive a visual and auditory warning before you will be put into cryodorms.") + to_chat(user, "You will now get put into cryo dorms after [GLOB.configuration.afk.auto_cryo_minutes] minutes. \ + Then after [GLOB.configuration.afk.auto_despawn_minutes] minutes you will be fully despawned. You will receive a visual and auditory warning before you will be put into cryodorms.") else to_chat(user, "Automatic cryoing turned off.") toggles2 ^= PREFTOGGLE_2_AFKWATCH diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 2fff14882ad..34ca227bed1 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -61,7 +61,7 @@ player_logged++ if(istype(loc, /obj/machinery/cryopod)) return - if(config.auto_cryo_ssd_mins && (player_logged >= (config.auto_cryo_ssd_mins * 30)) && player_logged % 30 == 0) + if(GLOB.configuration.afk.ssd_auto_cryo_minutes && (player_logged >= (GLOB.configuration.afk.ssd_auto_cryo_minutes * 30)) && player_logged % 30 == 0) var/turf/T = get_turf(src) if(!is_station_level(T.z)) return diff --git a/code/modules/mob/living/carbon/human/species/machine.dm b/code/modules/mob/living/carbon/human/species/machine.dm index e0df022eb79..963b878a758 100644 --- a/code/modules/mob/living/carbon/human/species/machine.dm +++ b/code/modules/mob/living/carbon/human/species/machine.dm @@ -129,17 +129,11 @@ if((head_organ.dna.species.name in tmp_hair.species_allowed) && (robohead.company in tmp_hair.models_allowed)) //Populate the list of available monitor styles only with styles that the monitor-head is allowed to use. hair += i - var/file = file2text("config/custom_sprites.txt") //Pulls up the custom_sprites list - var/lines = splittext(file, "\n") - for(var/line in lines) // Looks for lines set up as screen:ckey:screen_name - var/list/Entry = splittext(line, ":") // split lines - for(var/i = 1 to Entry.len) - Entry[i] = trim(Entry[i]) // Cleans up lines - if(Entry.len != 3 || Entry[1] != "screen") // Ignore entries that aren't for screens - continue - if(Entry[2] == H.ckey) // They're in the list? Custom sprite time, var and icon change required - hair += Entry[3] // Adds custom screen to list + if(H.ckey in GLOB.configuration.custom_sprites.ipc_screen_map) + // key: ckey | value: list of icon states + for(var/style in GLOB.configuration.custom_sprites.ipc_screen_map[H.ckey]) + hair += style var/new_style = input(H, "Select a monitor display", "Monitor Display", head_organ.h_style) as null|anything in hair var/new_color = input("Please select hair color.", "Monitor Color", head_organ.hair_colour) as null|color diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index eaf7261a7b0..491f94e20bc 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -365,20 +365,8 @@ GLOBAL_LIST_INIT(ai_verbs_default, list( if(stat || aiRestorePowerRoutine) return if(!custom_sprite) //Check to see if custom sprite time, checking the appopriate file to change a var - var/file = file2text("config/custom_sprites.txt") - var/lines = splittext(file, "\n") - - for(var/line in lines) - // split & clean up - var/list/Entry = splittext(line, ":") - for(var/i = 1 to Entry.len) - Entry[i] = trim(Entry[i]) - - if(Entry.len < 2 || Entry[1] != "ai") //ignore incorrectly formatted entries or entries that aren't marked for AI - continue - - if(Entry[2] == ckey) //They're in the list? Custom sprite time, var and icon change required - custom_sprite = 1 + if(ckey in GLOB.configuration.custom_sprites.ai_core_ckeys) + custom_sprite = TRUE var/display_choices = list( "Monochrome", @@ -963,21 +951,9 @@ GLOBAL_LIST_INIT(ai_verbs_default, list( if(check_unable()) return - if(!custom_hologram) //Check to see if custom sprite time, checking the appopriate file to change a var - var/file = file2text("config/custom_sprites.txt") - var/lines = splittext(file, "\n") - - for(var/line in lines) - // split & clean up - var/list/Entry = splittext(line, ":") - for(var/i = 1 to Entry.len) - Entry[i] = trim(Entry[i]) - - if(Entry.len < 2 || Entry[1] != "hologram") - continue - - if (Entry[2] == ckey) //Custom holograms - custom_hologram = 1 // option is given in hologram menu + if(!custom_hologram) + if(ckey in GLOB.configuration.custom_sprites.ai_hologram_ckeys) + custom_hologram = TRUE var/input switch(alert("Would you like to select a hologram based on a crew member, an animal, or switch to a unique avatar?",,"Crew Member","Unique","Animal")) @@ -1319,7 +1295,7 @@ GLOBAL_LIST_INIT(ai_verbs_default, list( /mob/living/silicon/ai/proc/open_nearest_door(mob/living/target) if(!istype(target)) return - + if(check_unable(AI_CHECK_WIRELESS)) return diff --git a/code/modules/mob/living/silicon/pai/pai.dm b/code/modules/mob/living/silicon/pai/pai.dm index a70b8034238..a8c9dab4e62 100644 --- a/code/modules/mob/living/silicon/pai/pai.dm +++ b/code/modules/mob/living/silicon/pai/pai.dm @@ -286,21 +286,9 @@ //check for custom_sprite if(!custom_sprite) - var/file = file2text("config/custom_sprites.txt") - var/lines = splittext(file, "\n") - - for(var/line in lines) - // split & clean up - var/list/Entry = splittext(line, ":") - for(var/i = 1 to Entry.len) - Entry[i] = trim(Entry[i]) - - if(Entry.len < 2 || Entry[1] != "pai") //ignore incorrectly formatted entries or entries that aren't marked for pAI - continue - - if(Entry[2] == ckey) //They're in the list? Custom sprite time, var and icon change required - custom_sprite = 1 - my_choices["Custom"] = "[ckey]-pai" + if(ckey in GLOB.configuration.custom_sprites.pai_holoform_ckeys) + custom_sprite = TRUE + my_choices["Custom"] = "[ckey]-pai" my_choices = possible_chassis.Copy() if(custom_sprite) diff --git a/code/modules/mob/living/silicon/robot/drone/drone_abilities.dm b/code/modules/mob/living/silicon/robot/drone/drone_abilities.dm index 58605d8d89f..96bd7ee572b 100644 --- a/code/modules/mob/living/silicon/robot/drone/drone_abilities.dm +++ b/code/modules/mob/living/silicon/robot/drone/drone_abilities.dm @@ -49,35 +49,6 @@ else ..() -/mob/living/silicon/robot/drone/verb/customize() - set name = "Customize Chassis" - set desc = "Reconfigure your chassis into a customized version." - set category = "Drone" - - if(!custom_sprite) //Check to see if custom sprite time, checking the appopriate file to change a var - var/file = file2text("config/custom_sprites.txt") - var/lines = splittext(file, "\n") - - for(var/line in lines) - // split & clean up - var/list/Entry = splittext(line, ":") - for(var/i = 1 to Entry.len) - Entry[i] = trim(Entry[i]) - - if(Entry.len < 2 || Entry[1] != "drone") - continue - - if (Entry[2] == ckey) //Custom holograms - custom_sprite = 1 // option is given in hologram menu - - if(!custom_sprite) - to_chat(src, "Error 404: Custom chassis not found. Revoking customization option.") - else - icon = 'icons/mob/custom_synthetic/custom-synthetic.dmi' - icon_state = "[ckey]-drone" - to_chat(src, "You reconfigure your chassis and improve the station through your new aesthetics.") - verbs -= /mob/living/silicon/robot/drone/verb/customize - /mob/living/silicon/robot/drone/get_scooped(mob/living/carbon/grabber) var/obj/item/holder/H = ..() if(!istype(H)) diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index c67d64a72b1..b530fc1cf51 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -215,20 +215,8 @@ GLOBAL_LIST_INIT(robot_verbs_default, list( //Check for custom sprite if(!custom_sprite) - var/file = file2text("config/custom_sprites.txt") - var/lines = splittext(file, "\n") - - for(var/line in lines) - // split & clean up - var/list/Entry = splittext(line, ":") - for(var/i = 1 to Entry.len) - Entry[i] = trim(Entry[i]) - - if(Entry.len < 2 || Entry[1] != "cyborg") //ignore incorrectly formatted entries or entries that aren't marked for cyborg - continue - - if(Entry[2] == ckey) //They're in the list? Custom sprite time, var and icon change required - custom_sprite = 1 + if(ckey in GLOB.configuration.custom_sprites.cyborg_ckeys) + custom_sprite = TRUE if(mmi && mmi.brainmob) mmi.brainmob.name = newname diff --git a/code/modules/unit_tests/sql.dm b/code/modules/unit_tests/sql.dm index 06287c881c8..393a207e5de 100644 --- a/code/modules/unit_tests/sql.dm +++ b/code/modules/unit_tests/sql.dm @@ -1,43 +1,8 @@ // Unit test to check SQL version has been updated properly., /datum/unit_test/sql_version/Run() // Check if the SQL version set in the code is equal to the CI DB config - if(config.sql_enabled && sql_version != SQL_VERSION) - Fail("SQL version error: Game is running V[SQL_VERSION] but config is V[sql_version]. You may need to update tools/ci/dbconfig.txt") - // Check if the CI DB config is up to date with the example dbconfig - // This proc is a little unclean but it works - var/example_db_version - var/list/Lines = file2list("config/example/dbconfig.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("db_version") - example_db_version = text2num(value) - - if(!example_db_version) - Fail("SQL version error: File config/example/dbconfig.txt does not have a valid SQL version set!") - - if(example_db_version != SQL_VERSION) - Fail("SQL version error: Game is running V[SQL_VERSION] but config/example/dbconfig.txt is V[example_db_version].") + if(GLOB.configuration.database.version != SQL_VERSION) + Fail("SQL version error: Game is running V[SQL_VERSION] but config is V[sql_version]. You may need to update the example config.") if(SSdbcore.total_errors > 0) Fail("SQL errors occured on startup. Please fix them.") diff --git a/config/example/admin_ranks.txt b/config/example/admin_ranks.txt deleted file mode 100644 index 84b0036e2c8..00000000000 --- a/config/example/admin_ranks.txt +++ /dev/null @@ -1,38 +0,0 @@ -######################################################################################## -# ADMIN RANK DEFINES # -# The format of this is very simple. Rank name goes first. # -# Rank is CASE-SENSITIVE, all punctuation will be stripped so spaces don't matter. # -# Each rank is then followed by keywords with the prefix "+". # -# These keywords represent groups of verbs and abilities which are given to that rank. # -# +@ (or +prev) is a special shorthand which adds all the rights of the rank above it. # -# Ranks with no keywords will just be given the most basic verbs and abilities # -######################################################################################## -# KEYWORDS: -# +MENTOR = Access only to the Question's Ahelp and has little way of metagaming the game. -# +ADMIN = general admin tools, verbs etc -# +FUN = events, other event-orientated actions. Access to the fun secrets in the secrets panel. -# +BAN = the ability to ban, jobban and fullban -# +STEALTH = the ability to stealthmin (make yourself appear with a fake name to everyone but other admins -# +POSSESS = the ability to possess objects -# +REJUV (or +REJUVINATE) = the ability to heal, respawn, modify damage and use godmode -# +BUILD (or +BUILDMODE) = the ability to use buildmode -# +SERVER = higher-risk admin verbs and abilities, such as those which affect the server configuration. -# +DEBUG = debug tools used for diagnosing and fixing problems. It's useful to give this to coders so they can investigate problems on a live server. -# +VAREDIT = everyone may view viewvars/debugvars/whatever you call it. This keyword allows you to actually EDIT those variables. -# +RIGHTS (or +PERMISSIONS) = allows you to promote and/or demote people. -# +SOUND (or +SOUNDS) = allows you to upload and play sounds -# +SPAWN (or +CREATE) = mob transformations, spawning of most atoms including mobs (high-risk atoms, e.g. blackholes, will require the +FUN flag too) -# +EVERYTHING (or +HOST or +ALL) = Simply gives you everything without having to type every flag -# +VIEWRUNTIMES = Allows a player to view the runtimes of the server, but not use other debug verbs - -# Admin Ranks -Admin Observer -Mentor +MENTOR -Trial Admin +ADMIN +BAN +STEALTH +REJUVINATE -Game Admin +ADMIN +BAN +DEBUG +REJUVINATE +BUILDMODE +EVENT +SERVER +POSSESS +PROCCALL +STEALTH +VAREDIT +SOUND +SPAWN -Head of Staff +EVERYTHING - -Hosting Provider +EVERYTHING - -# Coder Ranks -Maintainers +EVERYTHING \ No newline at end of file diff --git a/config/example/admins.txt b/config/example/admins.txt deleted file mode 100644 index c42f756a87d..00000000000 --- a/config/example/admins.txt +++ /dev/null @@ -1,8 +0,0 @@ -###################################################################### -# Basically, ckey goes first. Rank goes after the "-" # -# Case is not important for ckey. # -# Case IS important for the rank. However punctuation/spaces are not # -# Ranks can be anything defined in admin_ranks.txt # -###################################################################### - -# example - Hosting Provider diff --git a/config/example/alienwhitelist.txt b/config/example/alienwhitelist.txt deleted file mode 100644 index 01acc82de92..00000000000 --- a/config/example/alienwhitelist.txt +++ /dev/null @@ -1 +0,0 @@ -some~user - Species \ No newline at end of file diff --git a/config/example/away_mission_config.txt b/config/example/away_mission_config.txt deleted file mode 100644 index bfbc792d821..00000000000 --- a/config/example/away_mission_config.txt +++ /dev/null @@ -1,34 +0,0 @@ -#List the potential random Z-levels here. -#Maps must be the full path to them -#Maps should be 255x255 or smaller and be bounded. Falling off the edge of the map will result in undefined behavior. -#SPECIFYING AN INVALID MAP WILL RESULT IN RUNTIMES ON GAME START - -#!!IMPORTANT NOTES FOR HOSTING AWAY MISSIONS!!: -#Do NOT tick the maps during compile -- the game uses this list to decide which map to load. Ticking the maps will result in them ALL being loaded at once. -#DO tick the associated code file for the away mission you are enabling. Otherwise, the map will be trying to reference objects which do not exist, which will cause runtime errors! - -#===================================# -# BROKEN / INCOMPLETE AWAY MISSIONS # -#===================================# -#_maps/map_files/RandomZLevels/example.dmm -#_maps/map_files/RandomZLevels/spacebattle.dmm -#_maps/map_files/RandomZLevels/stationCollision.dmm -#_maps/map_files/RandomZLevels/spacehotel.dmm -#_maps/map_files/RandomZLevels/wildwest.dmm -#_maps/map_files/RandomZLevels/academy.dmm - -#===================================# -# USABLE AWAY MISSIONS # -#===================================# -_maps/map_files/RandomZLevels/moonoutpost19.dmm -#_maps/map_files/RandomZLevels/undergroundoutpost45.dmm -_maps/map_files/RandomZLevels/blackmarketpackers.dmm -_maps/map_files/RandomZLevels/terrorspiders.dmm -_maps/map_files/RandomZLevels/centcomAway.dmm -_maps/map_files/RandomZLevels/beach.dmm - - -#===================================# -# SPECIAL AWAY MISSIONS # -#===================================# -#_maps/map_files/RandomZLevels/evil_santa.dmm diff --git a/config/example/config.toml b/config/example/config.toml new file mode 100644 index 00000000000..32c3f748616 --- /dev/null +++ b/config/example/config.toml @@ -0,0 +1,750 @@ +########## +# README # +########## +# +# Paradise SS13 Config System +# This used to be 10+ different text files, now its all condensed into one toml file with sections and proper values +# This is serialized to json on world load by RUSTG, and then handled inside BYOND +# Editing this in an IDE such as VSCode is highly recommended so you can lint for errors +# Commenting out any value will make it use the game default (likely null) +# If you add new sections, keep them alphabetical +# Please be careful editing this, as you can break it all if youre not careful. -aa07 +# +# +# SECTION LIST (Ctrl+F to jump to these) +# - admin_configuration +# - afk_configuration +# - custom_sprites_configuration +# - database_configuration +# - debug_configuration +# - discord_configuration +# - event_configuration +# - gamemode_configuration +# - gateway_configuration +# - general_configuration +# - ipintel_configuration +# - job_configuration +# - logging_configuration +# - movement_configuration +# - overflow_configuration +# - ruin_configuration +# - system_configuration +# - url_configuration +# - voting_configuration + + +################################################################ + + +[admin_configuration] +# This section contains all information regarding admin setup. This includes ranks, rights, and if you are using the database-backed admin system + +# Set this to true if you are using database-based admins, or false if you want to define them in this file +# If the database fails, this file will be used as fallback +use_database_admins = false +# Auto authenticate localhost users as admin? Useful for test servers, disable in producation +enable_localhost_autoadmin = false +# List of admin rank assignments and their permissions +# These names ARE CASE SENSITIVE +# +BUILD (or +BUILDMODE) = the ability to use buildmode +# +ADMIN = general admin tools, verbs etc +# +BAN = the ability to ban, jobban and fullban +# +EVENT = Access to event related verbs +# +SERVER = higher-risk admin verbs and abilities, such as those which affect the server configuration. +# +DEBUG = debug tools used for diagnosing and fixing problems. It's useful to give this to coders so they can investigate problems on a live server. +# +PERMISSIONS (or +RIGHTS) = allows you to promote and/or demote people. +# +POSSESS = the ability to possess objects +# +STEALTH = the ability to stealthmin (make yourself appear with a fake name to everyone but other admins) +# +REJUV (or +REJUVINATE) = the ability to heal, respawn, modify damage and use godmode +# +VAREDIT = everyone may view viewvars/debugvars/whatever you call it. This keyword allows you to actually EDIT those variables. +# +EVERYTHING (or +HOST or +ALL) = Simply gives you everything without having to type every flag +# +SOUND (or +SOUNDS) = allows you to upload and play sounds +# +SPAWN (or +CREATE) = mob transformations, spawning of most atoms including mobs +# +MOD = Access to low level moderation tools. Not used in Paradise production +# +MENTOR = Access only to the Question's Ahelp and has little way of metagaming the game. +# +PROCCALL = Access to call procs on anything. Be careful who you grant this too! +# +VIEWRUNTIMES = Allows a player to view the runtimes of the server, but not use other debug verbs +admin_ranks = [ + # Format: {name = "My Rank", rights = ["+LIST", "+OF", "+RIGHTS"]} + {name = "Mentor", rights = ["+MENTOR"]}, + {name = "Trial Admin", rights = ["+ADMIN", "+BAN", "+STEALTH", "+REJUVINATE"]}, + {name = "Game Admin", rights = ["+ADMIN", "+BAN", "+STEALTH", "+REJUVINATE", "+DEBUG", "+BUILDMODE", "+EVENT", "+SERVER", "+POSSESS", "+PROCCALL", "+VAREDIT", "+SOUND", "+SPAWN"]}, + {name = "Head of Staff", rights = ["+EVERYTHING"]}, + {name = "Hosting Provider", rights = ["+EVERYTHING"]}, + {name = "Maintainers", rights = ["+EVERYTHING"]} +] +# List of people and the admin rank they are assigned to +admin_assignments = [ + #{ckey = "Your Name Here", rank = "Hosting Provider"} +] +# Allow admins to set their own OOC colour +allow_admin_ooc_colour = true + + +################################################################ + + +[afk_configuration] +# This section contains options for the auto AFK cryo system + +# Amount of minutes that a person can be AFK for before they are warned +afk_warning_minutes = 15 +# Amount of minutes that a person can be AFK for before they are auto cryo'd +afk_auto_cryo_minutes = 20 +# Amount of minutes that a person can be AFK for before they are despawned +afk_auto_despawn_minutes = 21 +# Amount of time before SSD people are auto cryo'd +ssd_auto_cryo_minutes = 15 + + +################################################################ + + +[custom_sprites_configuration] +# This section contains a list of information for people with custom sprites for mobs, if they donated +# It is split by mob type, and screens have their own system +# Make sure you use CKEYS not KEYS here (EG: affectedarc07 instead of AffectedArc07) + +# List of ckeys who have a custom cyborg skin +cyborgs = ["ckeyhere"] +# List of ckeys who have a custom AI core style +ai_core = ["ckeyhere"] +# List of ckeys who have a custom AI holopad hologram sprite +ai_hologram = ["ckeyhere"] +# List of ckeys who have a custom pAI holoform sprite +pai_holoform = ["ckeyhere"] +# List of dictionary entries for ckeys with a custom IPC screean +ipc_screens = [ + {ckey = "ckeyhere", screens = ["Icon State 1", "Icon State 2"]} +] + + +################################################################ + + +[database_configuration] +# This section contains all the settings for the ingame database +# If you are running in production, you will want to be using a database + +# Enable/disable the database on a whole +sql_enabled = false +# SQL version. If this is a mismatch, round start will be delayed +sql_version = 22 +# SQL server address. Can be an IP or DNS name +sql_address = "127.0.0.1" +# SQL server port +sql_port = 3306 +# SQL server database name +sql_database = "feedback" # TODO: Convert into `paradise_db` +# SQL server table prefix, if applicable. SET TO EMPTY STRING IF NOT. +sql_table_prefix = "" # TODO: Deprecate table prefixes +# SQL server username +sql_username = "root" +# SQL server password +sql_password = "please use something secure in a prod environment" +# Time in seconds for async queries to time out +async_query_timeout = 10 +# How many threads is the async SQL engine allowed to open. 50 is normal. Trust me. +async_thread_limit = 50 + + +################################################################ + + +[debug_configuration] +# This section is settings for debug/backend related things +# Dont change these unless you know what you are doing + +# Disable calling qdel on players if they logout before spawning in +dont_delete_newmob = false +# Defines world tick lag. 0.5 is default for 20 TPS/FPS (10 * ticklag = TPS/FPS) +ticklag = 0.5 +# Tick usage percentage limit for the MC during initialization. +world_init_mc_tick_limit = 500 +# Base MC tick rate. 1 = once per BYOND tick +base_mc_tick_rate = 1 +# Highpop MC tick rate. Increased to account for lag +highpop_mc_tick_rate = 1.1 +# Threshold to enable MC highpop mode +mc_highpop_threshold_enable = 65 +# Threshold to disable MC highpop mode +mc_highpop_threshold_disable = 60 + + +################################################################ + + +[discord_configuration] +# This section contains all the information related to Discord webhook sending from the code +# If you are using webhooks, please fill out this section in full +# All role IDs must be STRINGS as BYOND doesnt like ints that big +enable_discord_webhooks = false +# List of all webhooks for the primary feed (public channels) +webhook_main_urls = [ + "https://webhook.one", + "https://webhook.two" +] +# List of all webhook URLs for the mentor feed (mentorhelps relay) +webhooks_mentor_urls = [ + "https://mentor.webhook.one", + "https://mentor.webhook.two" +] +# List of all webhook URLs for the admin feed (round alerts, ahelps, etc) +admin_webhook_urls = [ + "https://admin.webhook.one", + "https://admin.webhook.two" +] +# Role ID for the admin role on the discord. Set to "" to disable. +# THIS MUST BE A STRING +admin_role_id = "" +# Forward all ahelps to the discord? If disabled, ahelps are only forwarded if admins are AFK/Offline +forward_all_ahelps = true + + +################################################################ + + +[event_configuration] +# This section contains settings for ingame random events + +# Disable this to disable all random events +allow_random_events = true +# Map of lower bounds for event delays +event_delay_lower_bounds = {mundane = 10, moderate = 30, major = 50} +# Map of upper bounds for event delays +event_delay_upper_bounds = {mundane = 15, moderate = 45, major = 70} +# Expected round length in minutes. Changes event weights +expected_round_length = 120 +# Initial delays for the first events firing off. If any of these are commented, a random value based on above thresholds is used +event_initial_delays = [ + #{severity = "mundane", lower_bound = 10, upper_bound = 15}, + {severity = "moderate", lower_bound = 25, upper_bound = 40}, + {severity = "major", lower_bound = 55, upper_bound = 75}, +] + + +################################################################ + + +[gamemode_configuration] +# This section contains setups for the gamemodes, as well as their probabilities + +# Should antags use account age restrictions? +antag_account_age_restrictions = false +# Gamemode probabilities map for if you are using secret or random +gamemode_probabilities = [ + {gamemode = "abduction", probability = 0}, + {gamemode = "blob", probability = 1}, + {gamemode = "changeling", probability = 3}, + {gamemode = "cult", probability = 3}, + {gamemode = "extend-a-traitormongous", probability = 2}, # Autotraitor + {gamemode = "extended", probability = 3}, + {gamemode = "heist", probability = 0}, + {gamemode = "meteor", probability = 0}, + {gamemode = "nuclear", probability = 2}, + {gamemode = "raginmages", probability = 0}, + {gamemode = "revolution", probability = 0}, + {gamemode = "shadowling", probability = 1}, + {gamemode = "traitor", probability = 2}, + {gamemode = "traitorchan", probability = 3}, + {gamemode = "traitorvamp", probability = 3}, + {gamemode = "vampire", probability = 3}, + {gamemode = "wizard", probability = 2}, +] +# Maximum cycles (2s) before a shadowling starts to take damage if they dont hatch +shadowling_max_age = 600 +# Do we want the amount of traitors to scale with population? +traitor_scaling = true +# Protect mindshielded roles from being antagonists +prevent_mindshield_antag = true +# Rounds such as rev, wizard and malf end instantly when the antag has won. Enable the setting below to not do that. +disable_certain_round_early_end = false +# Amount of objectives for traitors to get (Does not include escape or hijack) +traitor_objective_amount = 2 + + +################################################################ + + +[gateway_configuration] +# This section contains everything relating to the ingame gateway (away mission) system. + +# Do we want to enable this at all? Disable for faster load times in testing +enable_away_mission = true +# Delay (in seconds) before the gateway is usable +away_mission_delay = 0 +# List of all enabled away missions. Comment out an entry to disable it. +enabled_away_missions = [ + #"_maps/map_files/RandomZLevels/academy.dmm", + "_maps/map_files/RandomZLevels/beach.dmm", + "_maps/map_files/RandomZLevels/blackmarketpackers.dmm", + "_maps/map_files/RandomZLevels/centcomAway.dmm", + #"_maps/map_files/RandomZLevels/evil_santa.dmm", # Special christmas mission. Enable for festivities + #"_maps/map_files/RandomZLevels/example.dmm", # Example file. Do not enable. + "_maps/map_files/RandomZLevels/moonoutpost19.dmm", + #"_maps/map_files/RandomZLevels/spacebattle.dmm", # Broken/incomplete. Do not enable + #"_maps/map_files/RandomZLevels/stationCollision.dmm", # Broken/incomplete. Do not enable + "_maps/map_files/RandomZLevels/terrorspiders.dmm", + #"_maps/map_files/RandomZLevels/undergroundoutpost45.dmm", + #"_maps/map_files/RandomZLevels/wildwest.dmm", +] + + +################################################################ + + +[general_configuration] +# General setup for the server (branding, options, etc) + +# Name for the server in the list +server_name = "ParaCode Test" +# Tag line for the server. This appears as supplementary text +# EG: The perfect mix of RP & action +server_tag_line = "ParaCode Testing Server" +# Server features. Shows in a newline +server_features = "Medium RP, varied species/jobs." +# Store bans in the database? If you are in production, you want this on +use_database_bans = false +# Allow OOC character metadata notes +allow_character_metadata = true +# Lobby time before roundstart (Seconds) +lobby_time = 240 +# Forbid people without a BYOND account joining the server +guest_ban = true +# Player threshold before the automatic panic bunker engages +panic_bunker_threshold = 150 +# Allow players to use antagHUD? +allow_antag_hud = true +# Forbid players from rejoining if they use antag hud +restrict_antag_hud_rejoin = true +# Do we want to allow player respawns? +respawn_enabled = false +# Enable karma awarding and karma lockouts for jobs and species? +enable_karma = true +# Enable/disable the buster for the CID randomiser DLL +enable_cid_randomiser_buster = false +# Prevent admins from possessing the singularity +prevent_admin_singlo_possession = false +# Force open a reply window whenever someone is admin PM'd. Quite annoying. +popup_admin_pm = false +# Announce holidays ingame (such as halloween, christmas, happy [whatever] day) +allow_holidays = true +# Enable auto muting in all chat channels +enable_auto_mute = false +# Show a warning to players to make them accept a popup if they try to interact with SSD players +ssd_warning = true +# Allow ghosts to spin chairs +ghost_interaction = false +# Enable/disable starlight to make space without areas be lit up +starlight = true +# Disable lobby music on the server +disable_lobby_music = false +# Enable this if you want to disable the popup alert for people on the same CID +disable_cid_warning_popup = false +# Amount of loadout points people should get +base_loadout_points = 5 +# Respawnability loss penalty if you cryo below this threshold (Minutes) +cryo_penalty_period = 30 +# Enable twitter emojis in OOC? +enable_ooc_emoji = true +# Auto start the game if running a local test server +developer_express_start = false +# Minimum client build for playing the server. Keep above 1421 due to exploits +minimum_client_build = 1421 +# Give a confirmation when pressing "Start Now". Useful for avoiding starting the live server early +start_now_confirmation = true +# Enable player limits on gamemodes. Disable if testing +enable_gamemode_player_limit = true +# BYOND accounts younger than this threshold (days) will cause alerts on first login +byond_account_age_threshold = 3 +# Maximum CIDs a client can have attached to them before they trip a warning +max_client_cid_history = 20 +# Enable automatic profiling of rounds to profile.json +enable_auto_profiler = true +# Auto disable OOC when round starts? +auto_disable_ooc = true +# Enable/disable the breaking of bones +breakable_bones = true +# Enable/disable revival pod plants +enable_revival_pod_plants = true +# Enable/disable cloning +enable_cloning = true +# Randomise shift time instead of it always being 12:00 +randomise_shift_time = true +# Enable night shift for night lighting +enable_night_shifts = true +# Cap for monkeys spawned from monkey cubes +monkey_cube_cap = 32 +# Make explosions react to obstacles (walls+doors) instead of ignoring them +reactionary_explosions = true +# Bomb cap for explosions (Outer devastation. Other values calculate from this) +bomb_cap = 20 +# Amount of time (in hundreths of a second [why]) for a brain to keep its "spark of life". Set to -1 to disable. +revival_brain_life = 60000 # 10 minutes +# Enable random silicon lawset (If said lawset has default = TRUE in the code). Disable for always crewsimov +random_ai_lawset = true + + +################################################################ + + +[ipintel_configuration] +# This section contains all the information for IPIntel (The AntiVPN system) + +# Enable or disable IPIntel entirely +ipintel_enabled = false +# Threshold to kick people out (0-1 percentage float) +bad_rading = 0.98 +# Contact email (required, leaving blank disables this) +contact_email = "ch@nge.me" +# How many hours to save good matches for (IPIntel has rate limits) +hours_save_good = 72 +# How many hours to save bad matches for (IPIntel has rate limits) +hours_save_bad = 24 +# IPIntel Domain. Do not put http:// in front of it +ipintel_domain = "check.getipintel.net" +# Ignore checking IPs with more hours than the threshold below. Requires EXP tracking to be enabled +playtime_ignore_threshold = 10 +# Details URL for more info on an IP (such as ASN). IP is tacked on the end. +details_url = "https://iphub.info/?ip=" + + +################################################################ + + +[job_configuration] +# This section contains information on job configuartion, as well as the jon amounts + +# Disable this if you are in a lowpop environment +jobs_have_minimal_access = true +# Require account agre restrictions for job? Requires the database +restrict_jobs_on_account_age = false +# Allow admins to bypass all job age restrictions +restrict_jobs_on_account_age_admin_bypass = true +# Enable job EXP tracking (playtime)? Requires the database +enable_exp_tracking = false +# Enable job EXP-based restrictions (EG: require X hours as officer before warden)? Requires the database +enable_exp_restrictions = false +# Allow admins to bypass all EXP restrictions +enable_exp_admin_bypass = true +# Allow non-admins to play the AI job +allow_ai = true +# Prevent guests (people without BYOND accounts) from playing following positions +# Captain, HoS, HoP, CE, RD, CMO, Warden, Security, Detective, AI +guest_job_ban = true +# Should assistants have maint access? +assistant_maint_access = true +# Should the amount of assistants be limited? +assistant_limit = false +# If they above setting is enabled, specify a ratio of how many assistants can be allowed per security officers onboard +assistant_security_ratio = 2 +# Enable to use the custom job amounts here, disable to use the code ones +enable_job_amount_overrides = true +# Job slot amount map. These are overrides. If you dont specify a value here, the code will be used as default. -1 is infinite +job_slot_amounts = [ + # Commmand + {name = "Captain", lowpop = 1, highpop = 1}, + {name = "Head of Personnel", lowpop = 1, highpop = 1}, + {name = "Head of Security", lowpop = 1, highpop = 1}, + {name = "Chief Engineer", lowpop = 1, highpop = 1}, + {name = "Research Director", lowpop = 1, highpop = 1}, + {name = "Chief Medical Officer", lowpop = 1, highpop = 1}, + # Engineering + {name = "Atmospheric Technician", lowpop = 3, highpop = 4}, + {name = "Station Engineer", lowpop = 5, highpop = 6}, + # Medical + {name = "Chemist", lowpop = 2, highpop = 2}, + {name = "Geneticist", lowpop = 2, highpop = 2}, + {name = "Medical Doctor", lowpop = 5, highpop = 6}, + {name = "Virologist", lowpop = 1, highpop = 1}, + # Science + {name = "Robotocist", lowpop = 2, highpop = 2}, + {name = "Scientist", lowpop = 6, highpop = 7}, + # Security + {name = "Detective", lowpop = 1, highpop = 1}, + {name = "Security Officer", lowpop = 7, highpop = 8}, + {name = "Warden", lowpop = 1, highpop = 1}, + # Service + {name = "Bartender", lowpop = 1, highpop = 1}, + {name = "Botanist", lowpop = 2, highpop = 2}, + {name = "Chaplain", lowpop = 1, highpop = 1}, + {name = "Chef", lowpop = 1, highpop = 1}, + {name = "Janitor", lowpop = 1, highpop = 2}, + {name = "Lawyer", lowpop = 2, highpop = 2}, + {name = "Librarian", lowpop = 1, highpop = 1}, + # Cargo/Supply + {name = "Quartermaster", lowpop = 1, highpop = 1}, + {name = "Shaft Miner", lowpop = 6, highpop = 6}, + {name = "Cargo Technician", lowpop = 3, highpop = 4}, + # Silicon + {name = "AI", lowpop = 1, highpop = 1}, + {name = "Cyborg", lowpop = 1, highpop = 1}, + # Misc + {name = "Assistant", lowpop = -1, highpop = -1}, +] + + +################################################################ + + +[logging_configuration] +# Configuration for all things related to logging data to disk +# If you are in production you will want most of these on + +# Log OOC messages +enable_ooc_logging = true +# Log ingame say messages +enable_say_logging = true +# Log admin actions +enable_admin_logging = true +# Log client access (login/logout) +enable_access_logging = true +# Log game events (roundstart, results, a lot of other things) +enable_game_logging = true +# Enable logging of votes and their results +enable_vote_logging = true +# Enable logging of whipers +enable_whisper_logging = true +# Enable logging of emotes +enable_emote_logging = true +# Enable logging of attacks between players +enable_attack_logging = true +# Enable logging of PDA messages +enable_pda_logging = true +# Enable runtime logging +enable_runtime_logging = true +# Enable world.log output logging +enable_world_logging = false +# Log hrefs +enable_href_logging = true +# Log admin warning messages +enable_admin_warning_logging = true +# Log asay messages +enable_adminchat_logging = true + + +################################################################ + + +[movement_configuration] +# This section contains values for all mob movement stuff. +# We suggest VVing ingame till you get values you like. +# In context of this, speed = delay. Lower number = higher speed. + +# Base run speed before modifiers +base_run_speed = 1 +# Base walk speed before modifiers +base_walk_speed = 4 +# Move delay for humanoids +human_delay = 1.5 +# Move delay for cyborgs +robot_delay = 2.5 +# Move delay for monkeys (and other primitives) +monkey_delay = 1.5 +# Move delay for xenomorphs +alien_delay = 1.5 +# Move delay for slimes (xenobio, not slimepeople) +slime_delay = 1.5 +# Move delay for other simple animals +animal_delay = 2.5 + + +################################################################ + + +[overflow_configuration] +# This contains information for re-routing players to an overflow server +# We dont use this in production, but you may find it useful + +# Cap of players before we start to re-route to the overflow server. 0 to disable +player_reroute_cap = 0 +# Overflow server location +overflow_server = "byond://yourdomain.com:1111" +# List of ckeys who will not get rerouted to the overflow server +overflow_whitelist = ["keyhere", "anotherhere"] + + +################################################################ + + +[ruin_configuration] +# This section contains configuration for all space ruins and lava ruins + +# Globally enable and disable placing of space ruins. Lava ruins will still place. +enable_space_ruins = true +# Minimum number of extra zlevels to generate and fill with ruins +minimum_zlevels = 2 +# Maximum number of extra zlevels to generate and fill with ruins +maximum_zlevels = 4 +# List of all space ruins that can generate in the world +# Commenting something out in here DISABLES IT FROM SPAWNING +active_space_ruins = [ + "_maps/map_files/RandomRuins/SpaceRuins/way_home.dmm", + "_maps/map_files/RandomRuins/SpaceRuins/asteroid1.dmm", + "_maps/map_files/RandomRuins/SpaceRuins/asteroid2.dmm", + "_maps/map_files/RandomRuins/SpaceRuins/asteroid3.dmm", + "_maps/map_files/RandomRuins/SpaceRuins/asteroid4.dmm", + "_maps/map_files/RandomRuins/SpaceRuins/asteroid5.dmm", + "_maps/map_files/RandomRuins/SpaceRuins/derelict1.dmm", + "_maps/map_files/RandomRuins/SpaceRuins/derelict2.dmm", + "_maps/map_files/RandomRuins/SpaceRuins/derelict3.dmm", + "_maps/map_files/RandomRuins/SpaceRuins/derelict4.dmm", + "_maps/map_files/RandomRuins/SpaceRuins/derelict5.dmm", + "_maps/map_files/RandomRuins/SpaceRuins/spacebar.dmm", + "_maps/map_files/RandomRuins/SpaceRuins/abandonedzoo.dmm", + "_maps/map_files/RandomRuins/SpaceRuins/deepstorage.dmm", + "_maps/map_files/RandomRuins/SpaceRuins/emptyshell.dmm", + "_maps/map_files/RandomRuins/SpaceRuins/gasthelizards.dmm", + "_maps/map_files/RandomRuins/SpaceRuins/intactemptyship.dmm", + "_maps/map_files/RandomRuins/SpaceRuins/mechtransport.dmm", + "_maps/map_files/RandomRuins/SpaceRuins/turretedoutpost.dmm", + + ### The following ruins are based from past pre-spawned Zlevel content ### + "_maps/map_files/RandomRuins/SpaceRuins/abandonedtele.dmm", + "_maps/map_files/RandomRuins/SpaceRuins/blowntcommsat.dmm", + "_maps/map_files/RandomRuins/SpaceRuins/clownmime.dmm", + "_maps/map_files/RandomRuins/SpaceRuins/dj.dmm", + "_maps/map_files/RandomRuins/SpaceRuins/druglab.dmm", + "_maps/map_files/RandomRuins/SpaceRuins/syndiedepot.dmm", + "_maps/map_files/RandomRuins/SpaceRuins/syndie_space_base.dmm", + "_maps/map_files/RandomRuins/SpaceRuins/ussp_tele.dmm", + "_maps/map_files/RandomRuins/SpaceRuins/ussp.dmm", + + + # The following is the white ship ruin. Its force-spawned and is required to stop SSshuttle runtiming on startup + # Its also important incase a white-ship console is ever built midround + # DO NOT DISABLE THIS UNLESS YOU HAVE A GOOD REASON + "_maps/map_files/RandomRuins/SpaceRuins/whiteship.dmm", + + # The following is a force-spawned ruin consisting mostly of empty space with a shuttle docking port for the free golem shuttle + # Disabling it will lead to the free golem shuttle sometimes being stuck on lavaland. + "_maps/map_files/RandomRuins/SpaceRuins/golemtarget.dmm" +] +# List of all ruins that can generate on lavaland +# Commenting something out in here DISABLES IT FROM SPAWNING +active_lava_ruins = [ + ##BIODOMES + "_maps/map_files/RandomRuins/LavaRuins/lavaland_biodome_beach.dmm", + "_maps/map_files/RandomRuins/LavaRuins/lavaland_biodome_clown_planet.dmm", + "_maps/map_files/RandomRuins/LavaRuins/lavaland_biodome_winter.dmm", + ##RESPAWN + "_maps/map_files/RandomRuins/LavaRuins/lavaland_surface_ash_walker1.dmm", + "_maps/map_files/RandomRuins/LavaRuins/lavaland_surface_hermit.dmm", + "_maps/map_files/RandomRuins/LavaRuins/lavaland_surface_seed_vault.dmm", + ##SIN + "_maps/map_files/RandomRuins/LavaRuins/lavaland_surface_envy.dmm", + "_maps/map_files/RandomRuins/LavaRuins/lavaland_surface_gluttony.dmm", + # Greed blacklisted because its reward (dice) has a 1/20 chance of making you a wizard + #"_maps/map_files/RandomRuins/LavaRuins/lavaland_surface_greed.dmm", + "_maps/map_files/RandomRuins/LavaRuins/lavaland_surface_pride.dmm", + "_maps/map_files/RandomRuins/LavaRuins/lavaland_surface_sloth.dmm", + ##MEGAFAUNA + "_maps/map_files/RandomRuins/LavaRuins/lavaland_surface_blooddrunk1.dmm", + "_maps/map_files/RandomRuins/LavaRuins/lavaland_surface_blooddrunk2.dmm", + "_maps/map_files/RandomRuins/LavaRuins/lavaland_surface_blooddrunk3.dmm", + #re-removed 7/24/2020, I ran a month-long test of hierophant Jun-Jul and the staff was still too strong. https://github.com/ParadiseSS13/Paradise/pull/13542 + #"_maps/map_files/RandomRuins/LavaRuins/lavaland_surface_hierophant.dmm", + "_maps/map_files/RandomRuins/LavaRuins/lavaland_surface_swarmer_crash.dmm", + + ##MISC + "_maps/map_files/RandomRuins/LavaRuins/lavaland_surface_animal_hospital.dmm", + # Cube blacklisted because it contains a wishgranter that gives you hijack on use + #"_maps/map_files/RandomRuins/LavaRuins/lavaland_surface_cube.dmm", + "_maps/map_files/RandomRuins/LavaRuins/lavaland_surface_cultaltar.dmm", + "_maps/map_files/RandomRuins/LavaRuins/lavaland_surface_dead_ratvar.dmm", + "_maps/map_files/RandomRuins/LavaRuins/lavaland_surface_fountain_hell.dmm", + "_maps/map_files/RandomRuins/LavaRuins/lavaland_surface_pizza_party.dmm", + "_maps/map_files/RandomRuins/LavaRuins/lavaland_surface_puzzle.dmm", + "_maps/map_files/RandomRuins/LavaRuins/lavaland_surface_random_ripley.dmm", + "_maps/map_files/RandomRuins/LavaRuins/lavaland_surface_survivalpod.dmm", + "_maps/map_files/RandomRuins/LavaRuins/lavaland_surface_ufo_crash.dmm", + "_maps/map_files/RandomRuins/LavaRuins/lavaland_surface_xeno_nest.dmm", +] +# Budget for lavaland ruins. A higher number means more will spawn +lavaland_ruin_budget = 60 + + +################################################################ + + +[system_configuration] +# This contains stuff that the host should fill out, relating to backend stuff + +# Communications password for authorising world/Topic requests. Comment out to disable +#communications_password = "generateSomeLongRandomStringHere" +# Medal hub for tracking lavaland stats +#medal_hub_address = "hubmakerckey.hubname" +# Medal hub password for tracking lavaland stats +#medal_hub_password = "putYourPasswordHere" +# Do we want to kill the world on reboot instead of restarting it? +shutdown_on_reboot = false +# If true to above, an optional shell command can be ran. Defaults to killing DD on windows +#shutdown_shell_command = "taskkill /im dreamdaemon.exe /f" + + +################################################################ + + +[url_configuration] +# Configuration for all the URLs used by the server +# If you are in production you will want to tweak these to your servers +# If you comment any of these out, they will be null ingame + +# Location of server resources. Used to offload sending the paradise.rsc from DD to a webserver +# NOTE: This wants paradise.rsc inside a zip file, and it is HTTP ONLY. NO HTTPS +#rsc_url = "http://www.paradisestation.org/windows/paradise.rsc.zip" +# Link URL to link forum accounts to ckeys. If set to an empty string, no link option will be offered +# Token is appended right on the end, so set parameters as needed +#forum_link_url = "https://example.com/link.php?token=" +# URL for accessing player info from admin webtools +# Ckey is appended right on the end, so set parameters as needed +#forum_playerinfo_url = "https://example.com/info.php?ckey=" +# Server location for world reboot. Don't include the byond://, just give the address and port. +#reboot_url = "byond.paradisestation.org:6666" +# Forum address +forum_url = "https://www.paradisestation.org/forum/" +# Wiki address +wiki_url = "https://www.paradisestation.org/wiki" +# Rules address +rules_url = "https://www.paradisestation.org/rules" +# Github address +github_url = "https://github.com/ParadiseSS13/Paradise" +# Discord address +#discord_url = "http://example.org" +# Discord address (forum-based invite) +discord_forum_url = "https://www.paradisestation.org/forum/discord/invite/general/" +# Donations address +donations_url = "https://www.patreon.com/ParadiseStation" +# Ban appeals URL - usually for a forum or wherever people should go to contact your admins +ban_appeals_url = "https://www.paradisestation.org/forum/55-unban-requests/" +# URL for the CentComm ban DB. Doesnt change much. Ckey is slapped on the end +centcomm_ban_db_url = "https://centcom.melonmesa.com/ban/search/" + + +################################################################ + + +[voting_configuration] +# This section contains all settings relating to the ingame voting system + +# Allow players to vote for a round restart? +allow_vote_restart = false +# Allow players to vote for a gamemode in lobby? +allow_vote_mode = false +# Minimum delay between each vote (deciseconds) +vote_delay = 18000 +# Time that a vote will last for (deciseconds) +vote_time = 600 +# Time before the first auto crew transfer vote (deciseconds) +autotransfer_initial_time = 72000 +# Interval after the first auto transfer vote for the next to be called (deciseconds) +autotransfer_interval_time = 18000 +# Prevent dead players from voting or starting votes +prevent_dead_voting = false +# Default to players not voting by default +disable_default_vote = true + + +################################################################ + +# Congratulations. You reached the end. heres a cookie. diff --git a/config/example/config.txt b/config/example/config.txt deleted file mode 100644 index c378f41b89d..00000000000 --- a/config/example/config.txt +++ /dev/null @@ -1,473 +0,0 @@ -## Server name: This identifies your server in the server list. It may also be used as the title of the game window. -SERVERNAME ParaCode Test - -## Server tagline: This appears on the hub entry. -SERVER_TAG_LINE ParaCode Test - -## Server extra features: This appears in the feature list on the hub entry. -SERVER_EXTRA_FEATURES Medium RP, varied species/jobs. - -## Download the RSC from the web - this needs to be regenerated every time the code is changed. -#RESOURCE_URLS http://www.paradisestation.org/windows/paradise.rsc.zip - -## Add a # infront of this if you want to use the SQL based admin system, the legacy system uses admins.txt. You need to set up your database to use the SQL based system. -ADMIN_LEGACY_SYSTEM - -## Add a # infront of this if you want to use the SQL based banning system. The legacy systems use the files in the data folder. You need to set up your database to use the SQL based system. -BAN_LEGACY_SYSTEM - -## Add a # here if you wish to use the setup where jobs have more access. This is intended for servers with low populations - where there are not enough players to fill all roles, so players need to do more than just one job. Also for servers where they don't want people to hide in their own departments. -JOBS_HAVE_MINIMAL_ACCESS - -## Unhash this entry to have certain jobs require your account to be at least a certain number of days old to select. You can configure the exact age requirement for different jobs by editing -## the minimal_player_age variable in the files in folder /code/game/jobs/job/.. for the job you want to edit. Set minimal_player_age to 0 to disable age requirement for that job. -## REQUIRES the database set up to work. Keep it hashed if you don't have a database set up. -## NOTE: If you have just set-up the database keep this DISABLED, as player age is determined from the first time they connect to the server with the database up. If you just set it up, it means -## you have noone older than 0 days, since noone has been logged yet. Only turn this on once you have had the database up for 30 days. -#USE_AGE_RESTRICTION_FOR_JOBS - -##Unhash this to track player playtime in the database. Requires database to be enabled. -#USE_EXP_TRACKING -##Unhash this to enable playtime requirements for jobs that have them defined. -#USE_EXP_RESTRICTIONS -##Allows admins to bypass job playtime requirements. -USE_EXP_RESTRICTIONS_ADMIN_BYPASS - -## Unhash this entry to have certain antagonist roles require your account to be at least a certain number of days old to select. You can configure the exact age requirement for different antag roles by editing special_role_times in /code/modules/client/preferences.dm. -## See USE_AGE_RESTRICTION_FOR_JOBS for more information -#USE_AGE_RESTRICTION_FOR_ANTAGS - -## log OOC channel -LOG_OOC - -## log client Say -LOG_SAY - -## log admin actions -LOG_ADMIN - -## log client access (logon/logoff) -LOG_ACCESS - -## log game actions (start of round, results, etc.) -LOG_GAME - -## log player votes -LOG_VOTE - -## log client Whisper -LOG_WHISPER - -## log emotes -LOG_EMOTE - -## log attack messages -LOG_ATTACK - -## log pda messages -LOG_PDA - -## log world.log and runtime errors to a file -LOG_RUNTIME - -## log world.log messages -# LOG_WORLD_OUTPUT - -## log all Topic() calls (for use by coders in tracking down Topic issues) -LOG_HREFS - -## log admin warning messages - may result in some message duplication -LOG_ADMINWARN - -## Log admin chat -LOG_ADMINCHAT - -## Amount of minutes that a person has to be AFK before he will be warned by the AFK subsystem. Leave this 0 to prevent the subsystem from activating -WARN_AFK_MINIMUM 15 - -## Amount of minutes that a person has to be AFK before he will be cryod by the AFK subsystem. Leave this 0 to prevent the subsystem from activating -AUTO_CRYO_AFK 20 - -## Amount of minutes that a person has to be AFK before he will be despawned by the AFK subsystem. Leave this 0 to prevent the subsystem from activating -AUTO_DESPAWN_AFK 21 - -## probablities for game modes chosen in "secret" and "random" modes -## -## default probablity is 1, increase to make that mode more likely to be picked -## set to 0 to disable that mode -PROBABILITY ABDUCTION 0 -PROBABILITY BLOB 1 -PROBABILITY CHANGELING 3 -PROBABILITY CULT 3 -PROBABILITY EXTEND-A-TRAITORMONGOUS 2 -PROBABILITY EXTENDED 3 -PROBABILITY HEIST 0 -PROBABILITY METEOR 0 -PROBABILITY NUCLEAR 2 -PROBABILITY RAGINMAGES 0 -PROBABILITY REVOLUTION 0 -PROBABILITY SHADOWLING 1 -PROBABILITY TRAITOR 2 -PROBABILITY TRAITORCHAN 3 -PROBABILITY TRAITORVAMP 3 -PROBABILITY VAMPIRE 3 -PROBABILITY WIZARD 2 - -## Uncomment to allow free golems on all roundtypes. Otherwise, disabled on cult, wiz, raging mages, blob, and nuclear. -#UNRESTRICTED_FREE_GOLEMS - -## MAXIMUM SECONDS SHADOWLINGS CAN REMAIN UNHATCHED BEFORE THEY TAKE DAMAGE -SHADOWLING_MAX_AGE 600 - -## Hash out to disable random events during the round. -ALLOW_RANDOM_EVENTS - -## if amount of traitors scales or not -TRAITOR_SCALING - -## If security is prohibited from being most antagonists -PROTECT_ROLES_FROM_ANTAGONIST - -## Comment this out to stop admins being able to choose their personal ooccolor -ALLOW_ADMIN_OOCCOLOR - -## If metadata is supported -ALLOW_METADATA - -## The time it takes for a round to start in seconds -PREGAME_TIMESTART 240 - -## allow players to initiate a restart vote -#ALLOW_VOTE_RESTART - -## allow players to initate a mode-change start -#ALLOW_VOTE_MODE - -## min delay (deciseconds) between voting sessions (default 10 minutes) -VOTE_DELAY 18000 - -## time period (deciseconds) which voting session will last (default 1 minute) -VOTE_PERIOD 600 - -## autovote initial delay (deciseconds) before first automatic transfer vote call (default 180 minutes) -VOTE_AUTOTRANSFER_INITIAL 72000 - -##autovote delay (deciseconds) before sequential automatic transfer votes are called (default 60 minutes) -VOTE_AUTOTRANSFER_INTERVAL 18000 - -## prevents dead players from voting or starting votes -#NO_DEAD_VOTE - -## players' votes default to "No vote" (otherwise, default to "No change") -DEFAULT_NO_VOTE - -## allow AI job -ALLOW_AI - -## Allow ghosts to see antagonist through AntagHUD -ALLOW_ANTAG_HUD - -## If ghosts use antagHUD they are no longer allowed to join the round. -ANTAG_HUD_RESTRICTED - -## disable abandon mob -NORESPAWN - -## disables calling qdel(src) on newmobs if they logout before spawnin in -# DONT_DEL_NEWMOB - -## Set to jobban "Guest-" accounts from Captain, HoS, HoP, CE, RD, CMO, Warden, Security, Detective, and AI positions. -## Set to 1 to jobban them from those positions, set to 0 to allow them. -GUEST_JOBBAN - -## Uncomment this to stop people connecting to your server without a registered ckey. (i.e. guest-* are all blocked from connecting) -GUEST_BAN - -## above this player count threshold, never-before-seen players are blocked from connecting -PANIC_BUNKER_THRESHOLD 150 - -### IPINTEL: -### This allows you to detect likely proxies by checking ips against getipintel.net -## Rating to warn at: (0.90 is good, 1 is 100% likely to be a spammer/proxy, 0.8 is 80%, etc) anything equal to or higher then this number triggers an admin warning -#IPINTEL_RATING_BAD 0.98 -## Contact email, (required to use the service, leaving blank or default disables IPINTEL) -#IPINTEL_EMAIL ch@nge.me -## How long to save good matches (ipintel rate limits to 15 per minute and 500 per day. so this shouldn't be too low, getipintel.net suggests 6 hours, time is in hours) (Your ip will get banned if you go over 500 a day too many times) -#IPINTEL_SAVE_GOOD 72 -## How long to save bad matches (these numbers can change as ips change hands, best not to save these for too long in case somebody gets a new ip used by a spammer/proxy before.) -#IPINTEL_SAVE_BAD 24 -## Domain name to query (leave commented out for the default, only needed if you pay getipintel.net for more querys) -#IPINTEL_DOMAIN check.getipintel.net -## Ignore players with this many hours of playtime. Requires USE_EXP_TRACKING -#IPINTEL_MAXPLAYTIME 10 -## Require players (except the previous ones with playtime, if enabled) to be whitelisted to use proxies/VPNs. -#IPINTEL_WHITELIST -## URL to show to admins to provide more information about an IP address. Leave undefined for default. -#IPINTEL_DETAILSURL https://iphub.info/?ip= - -## URL to use to link forum accounts. If not set, no link option will be offered. -#FORUM_LINK_URL https://example.com/link.php?token= - -## URL to use for admins accessing the web-based tools menu -#FORUM_PLAYERINFO_URL https://example.com/info.php?ckey= - -## Comment to disable checking for the cid randomizer dll. (disabled if database isn't enabled or connected) -#CHECK_RANDOMIZER - -## the whitelist -USEWHITELIST - -## set a server location for world reboot. Don't include the byond://, just give the address and port. -# SERVER server.net:port - -## Forum address -FORUMURL https://www.paradisestation.org/forum/ - -## Wiki address -WIKIURL https://www.paradisestation.org/wiki - -## Rules address -RULESURL https://www.paradisestation.org/rules - -## Github address -GITHUBURL https://github.com/ParadiseSS13/Paradise - -## Discord address -#DISCORDURL http://example.org - -## Discord address (forum-based invite) -DISCORDFORUMURL https://www.paradisestation.org/forum/discord/invite/general/ - -## Donations address -DONATIONSURL https://www.patreon.com/ParadiseStation - -## Repository address -REPOSITORYURL https://github.com/ParadiseSS13/Paradise - -## Ban appeals URL - usually for a forum or wherever people should go to contact your admins -BANAPPEALS https://www.paradisestation.org/forum/55-unban-requests/ - -## In-game features -## spawns a spellbook which gives object-type spells instead of verb-type spells for the wizard -# FEATURE_OBJECT_SPELL_SYSTEM - -## Toggle for having jobs load up from the .txt -LOAD_JOBS_FROM_TXT - -## Remove the # mark infront of this to forbid admins from posssessing the singularity. -#FORBID_SINGULO_POSSESSION - -## Remove the # to show a popup 'reply to' window to every non-admin that recieves an adminPM. -## The intention is to make adminPMs more visible. (although I fnd popups annoying so this defaults to off) -#POPUP_ADMIN_PM - -## Remove the # to allow special 'Easter-egg' events on special holidays such as seasonal holidays and stuff like 'Talk Like a Pirate Day' :3 YAARRR -ALLOW_HOLIDAYS - -##Defines the ticklag for the world. 0.9 is the normal one, 0.5 is smoother. -TICKLAG 0.5 - -## Whether the server will talk to other processes through socket_talk -SOCKET_TALK 0 - -## Comment this out to disable automuting -#AUTOMUTE_ON - -## How long the delay is before the Away Mission gate opens. Default is half an hour. -GATEWAY_DELAY 10 - -## Remove the # to give assistants maint access. -ASSISTANT_MAINT - -## Remove the # to enable assistant limiting. -#ASSISTANT_LIMIT - -# Mins before SSD crew are cryoed. -AUTO_CRYO_SSD_MINS 15 - -# If enabled, prevents people interacting with SSD players unless they acknowledge they have read the server rules. -SSD_WARNING - -## If you enabled assistant limiting set the ratio of assistants to security members default is 2 assistants to 1 officer -ASSISTANT_RATIO 2 - -## Remove the # to make rounds which end instantly (Rev, Wizard, Malf) to continue until the shuttle is called or the station is nuked. -## Malf and Rev will let the shuttle be called when the antags/protags are dead. -#CONTINUOUS_ROUNDS - -## Uncomment to restrict non-admins from using humanoid alien races -USEALIENWHITELIST - -## Comment this to unrestrict the number of alien players allowed in the round. The number represents the number of alien players for every human player. -ALIEN_PLAYER_RATIO 0.2 - -##Remove the # to let ghosts spin chairs -#GHOST_INTERACTION - -## Password used for authorizing external tools via world/Topic. -#COMMS_PASSWORD - -## Expected round length in minutes -EXPECTED_ROUND_LENGTH 120 - -## The lower delay between events in minutes. -## Affect mundane, moderate, and major events respectively -EVENT_DELAY_LOWER 10;30;50 - -## The upper delay between events in minutes. -## Affect mundane, moderate, and major events respectively -EVENT_DELAY_UPPER 15;45;70 - -## The delay until the first time an event of the given severity runs in minutes. -## Unset setting use the EVENT_DELAY_LOWER and EVENT_DELAY_UPPER values instead. -#EVENT_CUSTOM_START_MINOR 10;15 -EVENT_CUSTOM_START_MODERATE 25;40 -EVENT_CUSTOM_START_MAJOR 55;75 - -## Starlight for exterior walls and breaches. Uncomment for starlight! -## This is disabled by default to make testing quicker, should be enabled on production servers or testing servers messing with lighting -STARLIGHT - -## Player rerouting stuff -## If not 0, players can be rerouted to an overflow server after a certain cap is reached - -## Cap before players start being rerouted -PLAYER_REROUTE_CAP 0 - -## Server to reroute to -#OVERFLOW_SERVER_URL byond://example.org:1111 - -## Disable the loading of away missions -#DISABLE_AWAY_MISSIONS - -## Disable the loading of space ruins -#DISABLE_SPACE_RUINS - -## Minimum number of space ruins levels to generate -EXTRA_SPACE_RUIN_LEVELS_MIN 2 - -## Maximum number of space ruins levels to generate -EXTRA_SPACE_RUIN_LEVELS_MAX 4 - -## Uncomment to disable the OOC/LOOC channel by default. -#DISABLE_OOC - -## Uncomment to disable the dead OOC channel by default. -#DISABLE_DEAD_OOC - -## Uncomment to disable ghost chat by default. -#DISABLE_DSAY - -## Uncomment this if you want to disable the lobby music -#DISABLE_LOBBY_MUSIC - -## Uncomment this if you want to disable the popup alert for people on the same CID -#DISABLE_CID_WARN_POPUP - -## How many loadout points players may spend in character setup -#MAX_LOADOUT_POINTS 5 - -# How many minutes players must wait, from round start, before they can ghost out -# and still qualify for re-entering the round. Defaults to 30. -# Setting this to 0 will disable the penalty period -#ROUND_ABANDON_PENALTY_PERIOD 30 - -## Hub address for tracking stats -## example: Hubmakerckey.Hubname -#MEDAL_HUB_ADDRESS - -## Password for the hub page -#MEDAL_HUB_PASSWORD - -## Uncomment this if you want to disable usage of emoji in OOC -#DISABLE_OOC_EMOJI - -## Uncomment this to shut down the world any time it would normally reboot -#SHUTDOWN_ON_REBOOT -## A command to run prior to the world shutting down, only used if the above option is enabled -## This default value will kill Dream Daemon on Windows machines. -#SHUTDOWN_SHELL_COMMAND taskkill /f /im dreamdaemon.exe - -## Uncomment this to disable karma and unlock all karma purchases for players by default -#DISABLE_KARMA - -## Defines the ticklimit for subsystem initialization (In percents of a byond tick). Lower makes world start smoother. Higher makes it faster. -##This is currently a testing optimized setting. A good value for production would be 98. -TICK_LIMIT_MC_INIT 500 - -###Master Controller High Pop Mode### - -##The Master Controller(MC) is the primary system controlling timed tasks and events in SS13 (lobby timer, game checks, lighting updates, atmos, etc) -##Default base MC tick rate (1 = process every "byond tick" (see: tick_lag/fps config settings), 2 = process every 2 byond ticks, etc) -## Setting this to 0 will prevent the Master Controller from ticking -BASE_MC_TICK_RATE 1 - -##High population MC tick rate -## Byond rounds timer values UP, but the tick rate is modified with heuristics during lag spites so setting this to something like 2 -## will make it run every 2 byond ticks, but will also double the effect of anti-lag heuristics. You can instead set it to something like -## 1.1 to make it run every 2 byond ticks, but only increase the effect of anti-lag heuristics by 10%. or 1.5 for 50%. -## (As an aside, you could in theory also reduce the effect of anti-lag heuristics in the base tick rate by setting it to something like 0.5) -HIGH_POP_MC_TICK_RATE 1.1 - -##Engage high pop mode if player count raises above this (Player in this context means any connected user. Lobby, ghost or in-game all count) -HIGH_POP_MC_MODE_AMOUNT 65 - -##Disengage high pop mode if player count drops below this -DISABLE_HIGH_POP_MC_MODE_AMOUNT 60 - -##Uncomment to enable developer start. Auto starts the server after initialization -#DEVELOPER_EXPRESS_START - -## Uncomment to disable automatic admin for localhost -#DISABLE_LOCALHOST_ADMIN - -## Add a # infront of this to unlimit the builds used to play. Advised is to keep it atleast 1421 due to the middle mouse button locking exploit -MINIMUM_CLIENT_BUILD 1421 - -## Uncomment to give a confirmation before hitting start now -#START_NOW_CONFIRMATION - -## If uncommented, all gamemodes will respect the number of required players. Defaults to no. -ENABLE_GAMEMODE_PLAYER_LIMIT - -## BYOND accounts younger than the value below will alert admins when they connect for the first time, -## as well as making the BYOND account age in player panel bold -BYOND_ACCOUNT_AGE_THRESHOLD 3 - -##### DISCORD STUFF ##### - -## If you are going to enable discord webhooks, fill out EVERYTHING in this section - -## Uncomment the line below to enable Discord webhooks -#ENABLE_DISCORD_WEBHOOKS - -## Role ID to be pinged with administrative events. If unset, all pings to this role will be disabled -## IF YOU ARE DISABLING THIS COMMENT IT OUT ENTIRELY, DONT LEAVE IT BLANK -#DISCORD_WEBHOOKS_ADMIN_ROLE_ID 111111111111 - -## Webhook URLs for the main discord webhook. Separate multiple URLs with a | (EG: https://url1|https://url2) -#DISCORD_WEBHOOKS_MAIN_URL - -## Webhook URLs for the admin discord webhook. Separate multiple URLs with a | (EG: https://url1|https://url2) -#DISCORD_WEBHOOKS_ADMIN_URL - -## Webhook URLs for the mentor discord webhook. Separate multiple URLs with a | (EG: https://url1|https://url2) -#DISCORD_WEBHOOKS_MENTOR_URL - -## Uncomment to send all ahelps to discord. If the line is commented, only ahelps made when no admins are online will be forwarded -## Ahelps forwarded when staff are online will never have the role ping, regardless of the setting above -#DISCORD_FORWARD_ALL_AHELPS - -##### END DISCORD STUFF ##### - -## URL For CentCom global ban DB -## This is a config option should you want to disable this system, or if the primary URL changes -## THE TRAILING SLASH ON THE END IS IMPORTANT SINCE IT JUST APPENDS THE CKEY TO THE END IN RAW -## Add a hash before the line below to disable the system -CENTCOM_BAN_DB_URL https://centcom.melonmesa.com/ban/search/ - -## Max amount of CIDs that one ckey can have attached to them before they trip a warning. Set to 0 to disable. -MAX_CLIENT_CID_HISTORY 20 - -## Uncomment to enable automatic performance profiling of rounds -ENABLE_AUTO_PROFILER \ No newline at end of file diff --git a/config/example/custom_sprites.txt b/config/example/custom_sprites.txt deleted file mode 100644 index 45d1d66058b..00000000000 --- a/config/example/custom_sprites.txt +++ /dev/null @@ -1,7 +0,0 @@ -Each entry should be composed of 2 parts, divided by a colon (:) with no spaces, in order to work. Failure to do so will result in that entry being disregarded by the code. -- The first part should be either "cyborg", "ai", "hologram", "pai", "drone", or "screen". This tells the code what type of custom sprite this entry is for. The "ai" option is for AI core displays, while "hologram" is for AI hologram projections. -- The second part should be the ckey of the player this entry is for. This tells the code who it works for and also is used to retrieve the proper sprite for them to use. -- If the entry is a custom screen, it will need a 3rd part which is the screen name. This tells the code which screen to use, as well allows for someone to have more then one custom screen. - - -example:example \ No newline at end of file diff --git a/config/example/dbconfig.txt b/config/example/dbconfig.txt deleted file mode 100644 index 3817f8aa114..00000000000 --- a/config/example/dbconfig.txt +++ /dev/null @@ -1,45 +0,0 @@ -## MySQL Connection Configuration -## This is used for stats, feedback gathering, -## administration, and the in game library. - -## Should SQL be enabled? Uncomment to enable. -#SQL_ENABLED - -## Server the MySQL database can be found at. -# Examples: localhost, 200.135.5.43, www.mysqldb.com, etc. -ADDRESS 127.0.0.1 - -## MySQL server port (default is 3306). -PORT 3306 - -## Database for all SQL functions, not just feedback. -FEEDBACK_DATABASE feedback - -## This value must be set to the version of the paradise schema in use. -## If this value does not match, the SQL database will not be loaded and an error will be generated. -## Roundstart will be delayed. -DB_VERSION 22 - -## Prefix to be added to the name of every table, older databases will require this be set to erro_ -## If left out defaults to erro_ for legacy reasons, if you want no table prefix, give a blank prefix rather then comment out -## Note, this does not change the table names in the database, you will have to do that yourself. -## IE: -## FEEDBACK_TABLEPREFIX erro_ -## FEEDBACK_TABLEPREFIX -## FEEDBACK_TABLEPREFIX SS13_ -## -## Leave as is if you are using the standard schema file. -FEEDBACK_TABLEPREFIX - -## Username/Login used to access the database. -FEEDBACK_LOGIN username - -## Password used to access the database. -FEEDBACK_PASSWORD password - -## Time in seconds for asynchronous queries to timeout -## Set to 0 for infinite -ASYNC_QUERY_TIMEOUT 10 - -## The maximum number of additional threads Rust SQL is allowed to run at once -RUST_SQL_THREAD_LIMIT 50 diff --git a/config/example/game_options.txt b/config/example/game_options.txt deleted file mode 100644 index 0d81a9402c8..00000000000 --- a/config/example/game_options.txt +++ /dev/null @@ -1,79 +0,0 @@ -### HEALTH ### -## Determines whether bones can be broken through excessive damage to the organ -## 0 means bones can't break, 1 means they can -BONES_CAN_BREAK 1 - -### REVIVAL ### -## Whether pod plants work or not -REVIVAL_POD_PLANTS 1 - -## Whether cloning tubes work or not -REVIVAL_CLONING 1 - -## Amount of time (in hundredths of seconds) for which a brain retains the "spark of life" after the person's death (set to -1 for infinite) -REVIVAL_BRAIN_LIFE 60000 - -### AUTO TOGGLE OOC DURING ROUND ### -#Uncomment this if you want OOC to be automatically disabled during the round, it will be enabled during the lobby and after the round end results. -AUTO_TOGGLE_OOC_DURING_ROUND - -### MOB MOVEMENT ### -## We suggest editing these variabled in-game to find a good speed for your server. To do this you must be a high level admin. Open the 'debug' tab ingame. Select "Debug Controller" and then, in the popup, select "Configuration". These variables should have the same name. -## These values get directly added to values and totals in-game. To speed things up make the number negative, to slow things down, make the number positive. - -## These modify the run/walk speed of all mobs before the mob-specific modifiers are applied. -RUN_SPEED 1 -WALK_SPEED 4 - -## The variables below affect the movement of specific mob types. -HUMAN_DELAY 1.5 -ROBOT_DELAY 2.5 -MONKEY_DELAY 1.5 -ALIEN_DELAY 1.5 -SLIME_DELAY 1.5 -ANIMAL_DELAY 2.5 - -## Comment for "normal" explosions, which ignore obstacles -## Uncomment for explosions that react to doors and walls -REACTIONARY_EXPLOSIONS - -# The number of objectives traitors get. -# Not including escaping/hijacking. -TRAITOR_OBJECTIVES_AMOUNT 2 - -### Configure the bomb cap -## This caps all explosions to the specified range. Used for both balance reasons and to prevent overloading the server and lagging the game out. -## This is given as the 3rd number(light damage) in the standard (1,2,3) explosion notation. The other numbers are derived by dividing by 2 and 4. -## eg: If you give the number 20. The bomb cap will be 5,10,20. -## Can be any number between 4 and 128, some examples are provided below. - -## Default (3,7,14) -#BOMBCAP 14 -## One 'step' up (5,10,20) (recommended if you enable REACTIONARY_EXPLOSIONS above) -BOMBCAP 20 -## LagHell (7,14,28) -#BOMBCAP 28 - -### ROUNDSTART SILICON LAWS ### -## This controls what the AI's laws are at the start of the round. -## Set to 0/commented for "off", silicons will just start with Crewsimov. -## Set to 1 for "random", silicons will start with a random lawset picked from (at the time of writing): Nanotrasen Default, P.A.L.A.D.I.N., Corporate, Robop and Crewsimov. More can be added by changing the law datum "default" variable in ai_laws.dm. - -DEFAULT_LAWS 1 - -## Randomize roundstart time (anywhere from 00:00 to 23:00 instead of always starting at 12:00) -RANDOMIZE_SHIFT_TIME - -## Enable Nightshift - Causes the station to go into "night mode" from 19:30 to 07:30. Best used with RANDOMIZED_SHIFT_TIME. -ENABLE_NIGHT_SHIFTS - -## Lavaland "Budget" -# Lavaland ruin spawning has an imaginary budget to spend on ruins, where -# a less lootfilled or smaller or less round effecting ruin costs less to -# spawn, while the converse is true. Alter this number to affect the amount -# of ruins. -LAVALAND_BUDGET 60 - -## Cube monkey limit -# Amount of cube monkeys that can be spawned before the game limits them -CUBEMONKEY_CAP 32 \ No newline at end of file diff --git a/config/example/jobs.txt b/config/example/jobs.txt deleted file mode 100644 index 6a73ab5f517..00000000000 --- a/config/example/jobs.txt +++ /dev/null @@ -1,37 +0,0 @@ -Captain=1 -Head of Personnel=1 -Head of Security=1 -Chief Engineer=1 -Research Director=1 -Chief Medical Officer=1 - -Station Engineer=5 -Roboticist=2 - -Medical Doctor=5 -Geneticist=2 -Virologist=1 - -Scientist=6 -Chemist=2 - -Bartender=1 -Botanist=2 -Chef=1 -Janitor=1 -Quartermaster=1 -Shaft Miner=6 - -Warden=1 -Detective=1 -Security Officer=7 - -Assistant=-1 -Atmospheric Technician=3 -Cargo Technician=3 -Chaplain=1 -Lawyer=2 -Librarian=1 - -AI=1 -Cyborg=1 diff --git a/config/example/jobs_highpop.txt b/config/example/jobs_highpop.txt deleted file mode 100644 index eaaa50d55a9..00000000000 --- a/config/example/jobs_highpop.txt +++ /dev/null @@ -1,37 +0,0 @@ -Captain=1 -Head of Personnel=1 -Head of Security=1 -Chief Engineer=1 -Research Director=1 -Chief Medical Officer=1 - -Station Engineer=6 -Roboticist=2 - -Medical Doctor=6 -Geneticist=2 -Virologist=1 - -Scientist=7 -Chemist=2 - -Bartender=1 -Botanist=2 -Chef=1 -Janitor=2 -Quartermaster=1 -Shaft Miner=6 - -Warden=1 -Detective=1 -Security Officer=8 - -Assistant=-1 -Atmospheric Technician=4 -Cargo Technician=4 -Chaplain=1 -Lawyer=2 -Librarian=1 - -AI=1 -Cyborg=1 diff --git a/config/example/lavaRuinBlacklist.txt b/config/example/lavaRuinBlacklist.txt deleted file mode 100644 index 49b70b5e682..00000000000 --- a/config/example/lavaRuinBlacklist.txt +++ /dev/null @@ -1,45 +0,0 @@ -#Listing maps here will blacklist them from generating in lavaland. -#Maps must be the full path to them -#A list of maps valid to blacklist can be found in _maps\RandomRuins\LavaRuins -#SPECIFYING AN INVALID MAP WILL RESULT IN RUNTIMES ON GAME START - -##BIODOMES -#_maps/map_files/RandomRuins/LavaRuins/lavaland_biodome_beach.dmm -#_maps/map_files/RandomRuins/LavaRuins/lavaland_biodome_clown_planet.dmm -#_maps/map_files/RandomRuins/LavaRuins/lavaland_biodome_winter.dmm - -##RESPAWN -#_maps/map_files/RandomRuins/LavaRuins/lavaland_surface_ash_walker1.dmm -#_maps/map_files/RandomRuins/LavaRuins/lavaland_surface_hermit.dmm -#_maps/map_files/RandomRuins/LavaRuins/lavaland_surface_seed_vault.dmm - -##SIN -#_maps/map_files/RandomRuins/LavaRuins/lavaland_surface_envy.dmm -# Gluttony was blacklisted because its reward is 'become morph'. Unblacklisted as it doesn't seem to generate complaints or be abused - but watch it. -#_maps/map_files/RandomRuins/LavaRuins/lavaland_surface_gluttony.dmm -# Greed blacklisted because its reward (dice) has a 1/20 chance of making you a wizard -_maps/map_files/RandomRuins/LavaRuins/lavaland_surface_greed.dmm -#_maps/map_files/RandomRuins/LavaRuins/lavaland_surface_pride.dmm -#_maps/map_files/RandomRuins/LavaRuins/lavaland_surface_sloth.dmm - -##MEGAFAUNA -#_maps/map_files/RandomRuins/LavaRuins/lavaland_surface_blooddrunk1.dmm -#_maps/map_files/RandomRuins/LavaRuins/lavaland_surface_blooddrunk2.dmm -#_maps/map_files/RandomRuins/LavaRuins/lavaland_surface_blooddrunk3.dmm -#re-removed 7/24/2020, I ran a month-long test of hierophant Jun-Jul and the staff was still too strong. https://github.com/ParadiseSS13/Paradise/pull/13542 -_maps/map_files/RandomRuins/LavaRuins/lavaland_surface_hierophant.dmm -#_maps/map_files/RandomRuins/LavaRuins/lavaland_surface_swarmer_crash.dmm - -##MISC -#_maps/map_files/RandomRuins/LavaRuins/lavaland_surface_animal_hospital.dmm -# Cube blacklisted because it contains a wishgranter that gives you hijack on use -_maps/map_files/RandomRuins/LavaRuins/lavaland_surface_cube.dmm -#_maps/map_files/RandomRuins/LavaRuins/lavaland_surface_cultaltar.dmm -#_maps/map_files/RandomRuins/LavaRuins/lavaland_surface_dead_ratvar.dmm -#_maps/map_files/RandomRuins/LavaRuins/lavaland_surface_fountain_hell.dmm" -#_maps/map_files/RandomRuins/LavaRuins/lavaland_surface_pizza_party.dmm -#_maps/map_files/RandomRuins/LavaRuins/lavaland_surface_puzzle.dmm -#_maps/map_files/RandomRuins/LavaRuins/lavaland_surface_random_ripley.dmm -#_maps/map_files/RandomRuins/LavaRuins/lavaland_surface_survivalpod.dmm -#_maps/map_files/RandomRuins/LavaRuins/lavaland_surface_ufo_crash.dmm" -#_maps/map_files/RandomRuins/LavaRuins/lavaland_surface_xeno_nest.dmm" \ No newline at end of file diff --git a/config/example/ofwhitelist.txt b/config/example/ofwhitelist.txt deleted file mode 100644 index 7588d3b698e..00000000000 --- a/config/example/ofwhitelist.txt +++ /dev/null @@ -1,2 +0,0 @@ -#Any ckeys in this file will be ignored by the overflow system. -example142 \ No newline at end of file diff --git a/config/example/spaceRuinBlacklist.txt b/config/example/spaceRuinBlacklist.txt deleted file mode 100644 index 7ca7abb4b3a..00000000000 --- a/config/example/spaceRuinBlacklist.txt +++ /dev/null @@ -1,46 +0,0 @@ -#Listing maps here will blacklist them from generating in space. -#Maps must be the full path to them -#Maps valid to be blacklisted can be found in _maps/map_files/RandomRuins/SpaceRuins -#SPECIFYING AN INVALID MAP WILL RESULT IN RUNTIMES ON GAME START - -#_maps/map_files/RandomRuins/SpaceRuins/way_home.dmm -#_maps/map_files/RandomRuins/SpaceRuins/asteroid1.dmm -#_maps/map_files/RandomRuins/SpaceRuins/asteroid2.dmm -#_maps/map_files/RandomRuins/SpaceRuins/asteroid3.dmm -#_maps/map_files/RandomRuins/SpaceRuins/asteroid4.dmm -#_maps/map_files/RandomRuins/SpaceRuins/asteroid5.dmm -#_maps/map_files/RandomRuins/SpaceRuins/derelict1.dmm -#_maps/map_files/RandomRuins/SpaceRuins/derelict2.dmm -#_maps/map_files/RandomRuins/SpaceRuins/derelict3.dmm -#_maps/map_files/RandomRuins/SpaceRuins/derelict4.dmm -#_maps/map_files/RandomRuins/SpaceRuins/derelict5.dmm -#_maps/map_files/RandomRuins/SpaceRuins/spacebar.dmm -#_maps/map_files/RandomRuins/SpaceRuins/abandonedzoo.dmm -#_maps/map_files/RandomRuins/SpaceRuins/deepstorage.dmm -#_maps/map_files/RandomRuins/SpaceRuins/emptyshell.dmm -#_maps/map_files/RandomRuins/SpaceRuins/gasthelizards.dmm -#_maps/map_files/RandomRuins/SpaceRuins/intactemptyship.dmm -#_maps/map_files/RandomRuins/SpaceRuins/mechtransport.dmm -#_maps/map_files/RandomRuins/SpaceRuins/turretedoutpost.dmm - -### The following ruins are based from past pre-spawned Zlevel content ### - -#_maps/map_files/RandomRuins/SpaceRuins/abandonedtele.dmm -#_maps/map_files/RandomRuins/SpaceRuins/blowntcommsat.dmm -#_maps/map_files/RandomRuins/SpaceRuins/clownmime.dmm -#_maps/map_files/RandomRuins/SpaceRuins/dj.dmm -#_maps/map_files/RandomRuins/SpaceRuins/druglab.dmm -#_maps/map_files/RandomRuins/SpaceRuins/syndiedepot.dmm -#_maps/map_files/RandomRuins/SpaceRuins/syndie_space_base.dmm -#_maps/map_files/RandomRuins/SpaceRuins/ussp_tele.dmm -#_maps/map_files/RandomRuins/SpaceRuins/ussp.dmm - - -# The following is the white ship ruin. Its force-spawned and is required to stop SSshuttle runtiming on startup -# Its also important incase a white-ship console is ever built midround -# DO NOT DISABLE THIS UNLESS YOU HAVE A GOOD REASON -#_maps/map_files/RandomRuins/SpaceRuins/whiteship.dmm - -# The following is a force-spawned ruin consisting mostly of empty space with a shuttle docking port for the free golem shuttle -# Disabling it will lead to the free golem shuttle sometimes being stuck on lavaland. -#_maps/map_files/RandomRuins/SpaceRuins/golemtarget.dmm \ No newline at end of file diff --git a/librust_g.so b/librust_g.so index 6587d39c0a2..1f059e0b2ce 100644 Binary files a/librust_g.so and b/librust_g.so differ diff --git a/paradise.dme b/paradise.dme index 87d2a7b506e..3d3b807c1c4 100644 --- a/paradise.dme +++ b/paradise.dme @@ -131,7 +131,6 @@ #include "code\_globalvars\logging.dm" #include "code\_globalvars\mapping.dm" #include "code\_globalvars\misc.dm" -#include "code\_globalvars\sensitive.dm" #include "code\_globalvars\traits.dm" #include "code\_globalvars\lists\flavor_misc.dm" #include "code\_globalvars\lists\fortunes.dm" @@ -184,6 +183,12 @@ #include "code\controllers\master.dm" #include "code\controllers\subsystem.dm" #include "code\controllers\verbs.dm" +#include "code\controllers\configuration\__config_defines.dm" +#include "code\controllers\configuration\configuration_core.dm" +#include "code\controllers\configuration\sections\admin_configuration.dm" +#include "code\controllers\configuration\sections\afk_configuration.dm" +#include "code\controllers\configuration\sections\custom_sprites_configuration.dm" +#include "code\controllers\configuration\sections\database_configuration.dm" #include "code\controllers\subsystem\acid.dm" #include "code\controllers\subsystem\afk.dm" #include "code\controllers\subsystem\air.dm" diff --git a/rust_g.dll b/rust_g.dll index bb414674e2e..ed4ac5bc38b 100644 Binary files a/rust_g.dll and b/rust_g.dll differ diff --git a/tools/ci/dbconfig.txt b/tools/ci/dbconfig.txt deleted file mode 100644 index 2fff6faf540..00000000000 --- a/tools/ci/dbconfig.txt +++ /dev/null @@ -1,13 +0,0 @@ -# This exists solely as a DBconfig file for CI testing -# Dont use it ingame -# Remember to update this when you increase the SQL version! -aa -SQL_ENABLED -DB_VERSION 22 -ADDRESS 127.0.0.1 -PORT 3306 -FEEDBACK_DATABASE feedback -FEEDBACK_TABLEPREFIX -FEEDBACK_LOGIN root -FEEDBACK_PASSWORD root -ASYNC_QUERY_TIMEOUT 10 -RUST_SQL_THREAD_LIMIT 50 diff --git a/tools/ci/run_server.sh b/tools/ci/run_server.sh index c03809363c1..bb32d85f940 100755 --- a/tools/ci/run_server.sh +++ b/tools/ci/run_server.sh @@ -1,13 +1,7 @@ #!/bin/bash set -euo pipefail -cp config/example/* config/ - -#Apply test DB config for SQL connectivity -rm config/dbconfig.txt -cp tools/ci/dbconfig.txt config - -# Now run the server and the unit tests +# Run the server and the unit tests DreamDaemon paradise.dmb -close -trusted -verbose # Check if the unit tests actually suceeded diff --git a/tools/ci/validate_rustg_windows.py b/tools/ci/validate_rustg_windows.py index 3d4535484ed..787bafb9a60 100644 --- a/tools/ci/validate_rustg_windows.py +++ b/tools/ci/validate_rustg_windows.py @@ -3,13 +3,14 @@ # This script is invoked by GitHub actions as part of CI to validate that the windows DLL for RUSTG works and creates proper formats # Imports -import os, sys +import os, json from ctypes import * from datetime import datetime, timedelta # Initial vars ci_log_file = "ci_log.log" ci_testing_text = "This is a test message" +ci_toml_file_location = "config/example/config.toml" # Helpers def success(msg): @@ -88,4 +89,19 @@ if logline in valid_results: else: fail("Log timestamp is not valid 8601. Got {}".format(logline)) +# Make sure we can parse TOML +string_array = c_char_p * 1 +sa = string_array(bytes(ci_toml_file_location, "ascii")) +rustg_dll.toml2json.argtypes = [c_int, c_char_p * 1] +# Set args for JSON retrieval +rustg_dll.toml2json.restype = c_char_p + +try: + # Run it + output_json = rustg_dll.toml2json(1, sa).decode() + json.loads(output_json) + success("toml2json conversion successful") +except Exception: + fail("Failed to convert toml2json") + exit(0) # Success