Merge branch 'master' into hair-gradients

This commit is contained in:
dearmochi
2021-07-27 18:28:46 +02:00
812 changed files with 31957 additions and 47236 deletions
+4 -4
View File
@@ -1,12 +1,12 @@
// This is in its own file as it has so much stuff to contend with
/client/proc/edit_2fa()
if(!config._2fa_auth_host)
if(!GLOB.configuration.system._2fa_auth_host)
alert(usr, "This server does not have 2FA enabled.")
return
// Client does not have 2FA enabled. Set it up.
if(prefs._2fa_status == _2FA_DISABLED)
// Get us an auth token
var/datum/http_response/qrcr = wrap_http_get("[config._2fa_auth_host]/generateQR?ckey=[ckey]")
var/datum/http_response/qrcr = wrap_http_get("[GLOB.configuration.system._2fa_auth_host]/generateQR?ckey=[ckey]")
// If this fails, shits gone bad
if(qrcr.errored)
alert(usr, "Something has gone VERY wrong ingame. Please inform the server host.\nError details: [qrcr.error]")
@@ -33,7 +33,7 @@
B.close()
return
var/datum/http_response/vr = wrap_http_get("[config._2fa_auth_host]/validateCode?ckey=[ckey]&code=[entered_code]")
var/datum/http_response/vr = wrap_http_get("[GLOB.configuration.system._2fa_auth_host]/validateCode?ckey=[ckey]&code=[entered_code]")
// If this fails, shits gone bad
if(vr.errored)
alert(usr, "Something has gone VERY wrong ingame. Please inform the server host.\nError details: [vr.error]")
@@ -86,7 +86,7 @@
alert(usr, "2FA deactivation aborted!")
return
var/datum/http_response/vr = wrap_http_get("[config._2fa_auth_host]/validateCode?ckey=[ckey]&code=[entered_code]")
var/datum/http_response/vr = wrap_http_get("[GLOB.configuration.system._2fa_auth_host]/validateCode?ckey=[ckey]&code=[entered_code]")
// If this fails, shits gone bad
if(vr.errored)
alert(usr, "Something has gone VERY wrong ingame. Please inform the server host.\nError details: [vr.error]")
+3
View File
@@ -69,6 +69,9 @@
//datum that controls the displaying and hiding of tooltips
var/datum/tooltip/tooltips
/// Persistent storage for the flavour text of examined atoms.
var/list/description_holders = list()
// Their chat window, sort of important.
// See /goon/code/datums/browserOutput.dm
var/datum/chatOutput/chatOutput
+32 -32
View File
@@ -122,11 +122,12 @@
//Logs all hrefs
if(config && config.log_hrefs)
if(GLOB.configuration.logging.href_logging)
log_href("[src] (usr:[usr]\[[COORD(usr)]\]) : [hsrc ? "[hsrc] " : ""][href]")
if(href_list["karmashop"])
if(config.disable_karma)
if(!GLOB.configuration.general.enable_karma)
to_chat(src, "Karma is disabled on this server.")
return
switch(href_list["karmashop"])
@@ -218,7 +219,7 @@
to_chat(src, "<span class='danger'>You are sending messages to quickly. Please wait [wait_time] [wait_time == 1 ? "second" : "seconds"] before sending another message.</span>")
return 1
last_message_time = world.time
if(config.automute_on && !check_rights(R_ADMIN, 0) && last_message == message)
if(GLOB.configuration.general.enable_auto_mute && !check_rights(R_ADMIN, 0) && last_message == message)
last_message_count++
if(last_message_count >= SPAM_TRIGGER_AUTOMUTE)
to_chat(src, "<span class='danger'>You have exceeded the spam filter limit for identical messages. An auto-mute was applied.</span>")
@@ -259,7 +260,7 @@
return null
if(byond_version < MIN_CLIENT_VERSION) // Too out of date to play at all. Unfortunately, we can't send them a message here.
version_blocked = TRUE
if(byond_build < config.minimum_client_build)
if(byond_build < GLOB.configuration.general.minimum_client_build)
version_blocked = TRUE
var/show_update_prompt = FALSE
@@ -274,7 +275,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]
@@ -306,10 +307,6 @@
spawn() // Goonchat does some non-instant checks in start()
chatOutput.start()
if( (world.address == address || !address) && !GLOB.host )
GLOB.host = key
world.update_status()
if(holder)
on_holder_add()
add_admin_verbs()
@@ -383,7 +380,7 @@
playercount += 1
// Update the state of the panic bunker based on current playercount
var/threshold = config.panic_bunker_threshold
var/threshold = GLOB.configuration.general.panic_bunker_threshold
if((playercount > threshold) && (GLOB.panic_bunker_enabled == FALSE))
GLOB.panic_bunker_enabled = TRUE
@@ -421,6 +418,7 @@
GLOB.admins -= src
GLOB.directory -= ckey
GLOB.clients -= src
QDEL_NULL(chatOutput)
if(movingmob)
movingmob.client_mobs_in_contents -= mob
UNSETEMPTY(movingmob.client_mobs_in_contents)
@@ -465,7 +463,7 @@
/client/proc/donor_loadout_points()
if(donator_level > 0 && prefs)
prefs.max_gear_slots = config.max_loadout_points + 5
prefs.max_gear_slots = GLOB.configuration.general.base_loadout_points + 5
/client/proc/log_client_to_db(connectiontopic)
set waitfor = FALSE // This needs to run async because any sleep() inside /client/New() breaks stuff badly
@@ -567,8 +565,9 @@
//New player!! Need to insert all the stuff
// Check new peeps for panic bunker
// AA TODO: Move this to world.IsBanned()
if(GLOB.panic_bunker_enabled)
var/threshold = config.panic_bunker_threshold
var/threshold = GLOB.configuration.general.panic_bunker_threshold
src << "Server is not accepting connections from never-before-seen players until player count is less than [threshold]. Please try again later."
qdel(src)
return // Dont insert or they can just go in again
@@ -592,10 +591,10 @@
/client/proc/check_ip_intel()
set waitfor = 0 //we sleep when getting the intel, no need to hold up the client connection while we sleep
if(config.ipintel_email)
if(config.ipintel_maxplaytime && config.use_exp_tracking)
if(GLOB.configuration.ipintel.enabled)
if(GLOB.configuration.ipintel.playtime_ignore_threshold && GLOB.configuration.jobs.enable_exp_tracking)
var/living_hours = get_exp_type_num(EXP_TYPE_LIVING) / 60
if(living_hours >= config.ipintel_maxplaytime)
if(living_hours >= GLOB.configuration.ipintel.playtime_ignore_threshold)
return
if(is_connecting_from_localhost())
@@ -611,14 +610,15 @@
verify_ip_intel()
/client/proc/verify_ip_intel()
if(ip_intel >= config.ipintel_rating_bad)
var/detailsurl = config.ipintel_detailsurl ? "(<a href='[config.ipintel_detailsurl][address]'>IP Info</a>)" : ""
if(config.ipintel_whitelist)
if(ip_intel >= GLOB.configuration.ipintel.bad_rating)
var/detailsurl = GLOB.configuration.ipintel.details_url ? "(<a href='[GLOB.configuration.ipintel.details_url][address]'>IP Info</a>)" : ""
if(GLOB.configuration.ipintel.whitelist_mode)
// AA TODO: move this check to world.IsBanned()
spawn(40) // This is necessary because without it, they won't see the message, and addtimer cannot be used because the timer system may not have initialized yet
message_admins("<span class='adminnotice'>IPIntel: [key_name_admin(src)] on IP [address] was rejected. [detailsurl]</span>")
var/blockmsg = "<B>Error: proxy/VPN detected. Proxy/VPN use is not allowed here. Deactivate it before you reconnect.</B>"
if(config.banappeals)
blockmsg += "\nIf you are not actually using a proxy/VPN, or have no choice but to use one, request whitelisting at: [config.banappeals]"
if(GLOB.configuration.url.banappeals_url)
blockmsg += "\nIf you are not actually using a proxy/VPN, or have no choice but to use one, request whitelisting at: [GLOB.configuration.url.banappeals_url]"
to_chat(src, blockmsg)
qdel(src)
else
@@ -626,9 +626,9 @@
/client/proc/check_forum_link()
if(!config.forum_link_url || !prefs || prefs.fuid)
if(!GLOB.configuration.url.forum_link_url || !prefs || prefs.fuid)
return
if(config.use_exp_tracking)
if(GLOB.configuration.jobs.enable_exp_tracking)
var/living_hours = get_exp_type_num(EXP_TYPE_LIVING) / 60
if(living_hours < 20)
return
@@ -662,7 +662,7 @@
return tokenstr
/client/proc/link_forum_account(fromban)
if(!config.forum_link_url)
if(!GLOB.configuration.url.forum_link_url)
return
if(IsGuestKey(key))
to_chat(src, "Guest keys cannot be linked.")
@@ -680,7 +680,7 @@
if(query_find_link.NextRow())
if(query_find_link.item[1])
if(!fromban)
to_chat(src, "Your forum account is already set. (" + query_find_link.item[1] + ")")
to_chat(src, "Your forum account is already set. ([query_find_link.item[1]])")
qdel(query_find_link)
return
qdel(query_find_link)
@@ -688,7 +688,7 @@
if(!tokenid)
to_chat(src, "link_forum_account: unable to create token")
return
var/url = "[config.forum_link_url][tokenid]"
var/url = "[GLOB.configuration.url.forum_link_url][tokenid]"
if(fromban)
url += "&fwd=appeal"
to_chat(src, {"Now opening a window to verify your information with the forums, so that you can appeal your ban. If the window does not load, please copy/paste this link: <a href="[url]">[url]</a>"})
@@ -708,7 +708,7 @@
if(connection != "seeker") //Invalid connection type.
return null
topic = params2list(topic)
if(!config.check_randomizer)
if(!GLOB.configuration.general.enabled_cid_randomiser_buster)
return
// Stash o' ckeys
var/static/cidcheck = list()
@@ -841,8 +841,8 @@
//Send resources to the client.
/client/proc/send_resources()
// Change the way they should download resources.
if(config.resource_urls)
preload_rsc = pick(config.resource_urls)
if(length(GLOB.configuration.url.rsc_urls))
preload_rsc = pick(GLOB.configuration.url.rsc_urls)
else
preload_rsc = 1 // If config.resource_urls is not set, preload like normal.
// Most assets are now handled through global_cache.dm
@@ -948,7 +948,7 @@
void.UpdateGreed(actualview[1],actualview[2])
/client/proc/send_ssd_warning(mob/M)
if(!config.ssd_warning)
if(!GLOB.configuration.general.ssd_warning)
return FALSE
if(ssd_warning_acknowledged)
return FALSE
@@ -1101,7 +1101,7 @@
qdel(query_age)
// Notify admins on new clients connecting, if the byond account age is less than a config value
if(notify && (byondacc_age < config.byond_account_age_threshold))
if(notify && (byondacc_age < GLOB.configuration.general.byond_account_age_threshold))
message_admins("[key] has just connected for the first time. BYOND account registered on [byondacc_date] ([byondacc_age] days old)")
/client/proc/show_update_notice()
@@ -1148,7 +1148,7 @@
*/
/client/proc/cid_count_check()
// If the config is 0, disable this
if(config.max_client_cid_history == 0)
if(GLOB.configuration.general.max_client_cid_history == 0)
return
// If we have no DB, dont even bother
@@ -1168,7 +1168,7 @@
cidcount = query_cidcheck.item[1]
qdel(query_cidcheck)
if(cidcount > config.max_client_cid_history)
if(cidcount > GLOB.configuration.general.max_client_cid_history)
// Check their notes for CID tracking in the past
var/has_note = FALSE
var/note_text = ""
@@ -63,10 +63,6 @@
display_name = "Fur Cap"
path = /obj/item/clothing/head/furcap
/datum/gear/donor/mouse
display_name = "Mouse Headband"
path = /obj/item/clothing/head/kitty/mouse
/datum/gear/donor/fawkes
display_name = "Guy Fawkes mask"
path = /obj/item/clothing/mask/fawkes
@@ -138,10 +138,6 @@
path = /obj/item/cartridge/mob_hunt_game
cost = 2
/datum/gear/piano_synth
display_name ="synthesizer"
path = /obj/item/instrument/piano_synth
cost = 2
//////////////////////
// Mugs //
//////////////////////
@@ -197,3 +193,62 @@
display_name = "crewmember coffee mug"
description = "A crewmember's coffee mug, emblazoned in the colors of the Service department."
path = /obj/item/reagent_containers/food/drinks/mug/serv
//////////////////////
// Instruments //
//////////////////////
/datum/gear/instrument
display_name = "Synthesizer"
path = /obj/item/instrument/piano_synth
sort_category = "Instruments"
cost = 2
/datum/gear/instrument/accordion
display_name = "Accordion"
path = /obj/item/instrument/accordion
/datum/gear/instrument/banjo
display_name = "Banjo"
path = /obj/item/instrument/banjo
/datum/gear/instrument/eguitar
display_name = "Electric guitar"
path = /obj/item/instrument/eguitar
/datum/gear/instrument/glock
display_name = "Glockenspiel"
path = /obj/item/instrument/glockenspiel
/datum/gear/instrument/guitar
display_name = "Guitar"
path = /obj/item/instrument/guitar
/datum/gear/instrument/harmonica
display_name = "Harmonica"
path = /obj/item/instrument/harmonica
/datum/gear/instrument/recorder
display_name = "Recorder"
path = /obj/item/instrument/recorder
/datum/gear/instrument/sax
display_name = "Saxophone"
path = /obj/item/instrument/saxophone
/datum/gear/instrument/trumpet
display_name = "Trumpet"
path = /obj/item/instrument/trumpet
/datum/gear/instrument/trombone
display_name = "Trombone"
path = /obj/item/instrument/trombone
/datum/gear/instrument/violin
display_name = "Violin"
path = /obj/item/instrument/violin
/datum/gear/instrument/xylo
display_name = "Xylophone"
path = /obj/item/instrument/xylophone
@@ -108,6 +108,11 @@
path = /obj/item/clothing/suit/armor/secjacket
allowed_roles = list("Head of Security", "Warden", "Detective", "Security Officer", "Security Pod Pilot")
/datum/gear/suit/secbomberjacket
display_name = "security bomber jacket"
path = /obj/item/clothing/suit/jacket/pilot
allowed_roles = list("Head of Security", "Warden", "Detective", "Security Officer", "Security Pod Pilot")
/datum/gear/suit/ianshirt
display_name = "Ian Shirt"
path = /obj/item/clothing/suit/ianshirt
+12 -39
View File
@@ -38,7 +38,7 @@ GLOBAL_LIST_INIT(special_role_times, list( //minimum age (in days) for accounts
return 0
if(!role)
return 0
if(!config.use_age_restriction_for_antags)
if(!GLOB.configuration.gamemode.antag_account_age_restriction)
return 0
if(!isnum(C.player_age))
return 0 //This is only a number if the db connection is established, otherwise it is text: "Requires database", meaning these restrictions cannot be enforced
@@ -221,7 +221,7 @@ GLOBAL_LIST_INIT(special_role_times, list( //minimum age (in days) for accounts
parent = C
b_type = pick(4;"O-", 36;"O+", 3;"A-", 28;"A+", 1;"B-", 20;"B+", 1;"AB-", 5;"AB+")
max_gear_slots = config.max_loadout_points
max_gear_slots = GLOB.configuration.general.base_loadout_points
var/loaded_preferences_successfully = FALSE
if(istype(C))
if(!IsGuestKey(C.key))
@@ -378,7 +378,7 @@ GLOBAL_LIST_INIT(special_role_times, list( //minimum age (in days) for accounts
dat += "</td><td width='405px' height='200px' valign='top'>"
dat += "<h2>Occupation Choices</h2>"
dat += "<a href='?_src_=prefs;preference=job;task=menu'>Set Occupation Preferences</a><br>"
if(jobban_isbanned(user, "Records"))
if(jobban_isbanned(user, ROLEBAN_RECORDS))
dat += "<b>You are banned from using character records.</b><br>"
else
dat += "<a href=\"byond://?_src_=prefs;preference=records;record=1\">Character Records</a><br>"
@@ -489,7 +489,7 @@ GLOBAL_LIST_INIT(special_role_times, list( //minimum age (in days) for accounts
dat += "<b>Ghost PDA:</b> <a href='?_src_=prefs;preference=ghost_pda'><b>[(toggles & PREFTOGGLE_CHAT_GHOSTPDA) ? "All PDA Messages" : "No PDA Messages"]</b></a><br>"
if(check_rights(R_ADMIN,0))
dat += "<b>OOC Color:</b> <span style='border: 1px solid #161616; background-color: [ooccolor ? ooccolor : GLOB.normal_ooc_colour];'>&nbsp;&nbsp;&nbsp;</span> <a href='?_src_=prefs;preference=ooccolor;task=input'><b>Change</b></a><br>"
if(config.allow_Metadata)
if(GLOB.configuration.general.allow_character_metadata)
dat += "<b>OOC Notes:</b> <a href='?_src_=prefs;preference=metadata;task=input'><b>Edit</b></a><br>"
dat += "<b>Parallax (Fancy Space):</b> <a href='?_src_=prefs;preference=parallax'>"
switch (parallax)
@@ -511,7 +511,7 @@ GLOBAL_LIST_INIT(special_role_times, list( //minimum age (in days) for accounts
// RIGHT SIDE OF THE PAGE
dat += "</td><td width='300px' height='300px' valign='top'>"
dat += "<h2>Special Role Settings</h2>"
if(jobban_isbanned(user, "Syndicate"))
if(jobban_isbanned(user, ROLE_SYNDICATE))
dat += "<b>You are banned from special roles.</b>"
be_special = list()
else
@@ -1118,9 +1118,9 @@ GLOBAL_LIST_INIT(special_role_times, list( //minimum age (in days) for accounts
ResetJobs()
SetChoices(user)
if("learnaboutselection")
if(config.wikiurl)
if(GLOB.configuration.url.wiki_url)
if(alert("Would you like to open the Job selection info in your browser?", "Open Job Selection", "Yes", "No") == "Yes")
user << link("[config.wikiurl]/index.php/Job_Selection_and_Assignment")
user << link("[GLOB.configuration.url.wiki_url]/index.php/Job_Selection_and_Assignment")
else
to_chat(user, "<span class='danger'>The Wiki URL is not set in the server configuration.</span>")
if("random")
@@ -1337,17 +1337,10 @@ GLOBAL_LIST_INIT(special_role_times, list( //minimum age (in days) for accounts
if("species")
var/list/new_species = list("Human", "Tajaran", "Skrell", "Unathi", "Diona", "Vulpkanin")
var/prev_species = species
// var/whitelisted = 0
if(config.usealienwhitelist) //If we're using the whitelist, make sure to check it!
for(var/Spec in GLOB.whitelisted_species)
if(is_alien_whitelisted(user,Spec))
new_species += Spec
// whitelisted = 1
// if(!whitelisted)
// alert(user, "You cannot change your species as you need to be whitelisted. If you wish to be whitelisted contact an admin in-game, on the forums, or on IRC.")
else //Not using the whitelist? Aliens for everyone!
new_species += GLOB.whitelisted_species
for(var/species in GLOB.whitelisted_species)
if(is_alien_whitelisted(user, species))
new_species += species
species = input("Please select a species", "Character Generation", null) in sortTim(new_species, /proc/cmp_text_asc)
var/datum/species/NS = GLOB.all_species[species]
@@ -1430,18 +1423,6 @@ GLOBAL_LIST_INIT(special_role_times, list( //minimum age (in days) for accounts
if("language")
// var/languages_available
var/list/new_languages = list("None")
/*
if(config.usealienwhitelist)
for(var/L in GLOB.all_languages)
var/datum/language/lang = GLOB.all_languages[L]
if((!(lang.flags & RESTRICTED)) && (is_alien_whitelisted(user, L)||(!( lang.flags & WHITELISTED ))))
new_languages += lang
languages_available = 1
if(!(languages_available))
alert(user, "There are not currently any available secondary languages.")
else
*/
for(var/L in GLOB.all_languages)
var/datum/language/lang = GLOB.all_languages[L]
if(!(lang.flags & RESTRICTED))
@@ -2068,8 +2049,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, "<span class='info'>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.</span>")
to_chat(user, "<span class='info'>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.</span>")
else
to_chat(user, "<span class='info'>Automatic cryoing turned off.</span>")
toggles2 ^= PREFTOGGLE_2_AFKWATCH
@@ -2201,14 +2182,6 @@ GLOBAL_LIST_INIT(special_role_times, list( //minimum age (in days) for accounts
if(be_random_name)
real_name = random_name(gender,species)
if(config.humans_need_surnames)
var/firstspace = findtext(real_name, " ")
var/name_length = length(real_name)
if(!firstspace) //we need a surname
real_name += " [pick(GLOB.last_names)]"
else if(firstspace == name_length)
real_name += "[pick(GLOB.last_names)]"
character.add_language(language)
@@ -348,3 +348,11 @@
prefs.toggles2 ^= PREFTOGGLE_2_FORCE_WHITE_RUNECHAT
prefs.save_preferences(src)
to_chat(src, "Your runechats will [(prefs.toggles2 & PREFTOGGLE_2_FORCE_WHITE_RUNECHAT) ? "no longer" : "now"] be forced to be white.")
/client/verb/toggle_simple_stat_panel()
set name = "Toggle Simple Status Panel"
set category = "Preferences"
set desc = "Toggles detailed information on the status panel"
prefs.toggles2 ^= PREFTOGGLE_2_SIMPLE_STAT_PANEL
prefs.save_preferences(src)
to_chat(src, "You will [(prefs.toggles2 & PREFTOGGLE_2_SIMPLE_STAT_PANEL) ? "no longer" : "now"] get detailed information on the status panel.")