uh what?
This commit is contained in:
@@ -75,12 +75,11 @@
|
||||
|
||||
var/inprefs = FALSE
|
||||
var/list/topiclimiter
|
||||
|
||||
///Used for limiting the rate of clicks sends by the client to avoid abuse
|
||||
var/list/clicklimiter
|
||||
|
||||
///lazy list of all credit object bound to this client
|
||||
var/list/credits
|
||||
var/datum/chatOutput/chatOutput
|
||||
|
||||
var/list/credits //lazy list of all credit object bound to this client
|
||||
|
||||
var/datum/player_details/player_details //these persist between logins/logouts during the same round.
|
||||
|
||||
|
||||
@@ -20,9 +20,7 @@ GLOBAL_LIST_INIT(blacklisted_builds, list(
|
||||
When somebody clicks a link in game, this Topic is called first.
|
||||
It does the stuff in this proc and then is redirected to the Topic() proc for the src=[0xWhatever]
|
||||
(if specified in the link). ie locate(hsrc).Topic()
|
||||
|
||||
Such links can be spoofed.
|
||||
|
||||
Because of this certain things MUST be considered whenever adding a Topic() for something:
|
||||
- Can it be fed harmful values which could cause runtimes?
|
||||
- Is the Topic call an admin-only thing?
|
||||
@@ -40,7 +38,7 @@ GLOBAL_LIST_INIT(blacklisted_builds, list(
|
||||
var/asset_cache_job
|
||||
if(href_list["asset_cache_confirm_arrival"])
|
||||
asset_cache_job = asset_cache_confirm_arrival(href_list["asset_cache_confirm_arrival"])
|
||||
if (!asset_cache_job)
|
||||
if(!asset_cache_job)
|
||||
return
|
||||
|
||||
// Rate limiting
|
||||
@@ -102,7 +100,7 @@ GLOBAL_LIST_INIT(blacklisted_builds, list(
|
||||
return
|
||||
|
||||
// Tgui Topic middleware
|
||||
if(tgui_Topic(href_list))
|
||||
if(!tgui_Topic(href_list))
|
||||
return
|
||||
|
||||
// Admin PM
|
||||
@@ -110,9 +108,10 @@ GLOBAL_LIST_INIT(blacklisted_builds, list(
|
||||
cmd_admin_pm(href_list["priv_msg"],null)
|
||||
return
|
||||
|
||||
// Mentor PM (cit.)
|
||||
// CITADEL Start - Mentor PM
|
||||
if (citadel_client_procs(href_list))
|
||||
return
|
||||
// CITADEL End
|
||||
|
||||
switch(href_list["_src_"])
|
||||
if("holder")
|
||||
@@ -120,7 +119,7 @@ GLOBAL_LIST_INIT(blacklisted_builds, list(
|
||||
if("usr")
|
||||
hsrc = mob
|
||||
if("mentor") // CITADEL
|
||||
hsrc = mentor_datum
|
||||
hsrc = mentor_datum // CITADEL END
|
||||
if("prefs")
|
||||
if (inprefs)
|
||||
return
|
||||
@@ -130,6 +129,8 @@ GLOBAL_LIST_INIT(blacklisted_builds, list(
|
||||
return
|
||||
if("vars")
|
||||
return view_var_Topic(href,href_list,hsrc)
|
||||
if("chat")
|
||||
return chatOutput.Topic(href, href_list)
|
||||
|
||||
switch(href_list["action"])
|
||||
if("openLink")
|
||||
@@ -146,6 +147,7 @@ GLOBAL_LIST_INIT(blacklisted_builds, list(
|
||||
to_chat(src, "Become a BYOND member to access member-perks and features, as well as support the engine that makes this game possible. Only 10 bucks for 3 months! <a href=\"https://secure.byond.com/membership\">Click Here to find out more</a>.")
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/*
|
||||
* Call back proc that should be checked in all paths where a client can send messages
|
||||
*
|
||||
@@ -208,10 +210,14 @@ GLOBAL_LIST_INIT(blacklisted_builds, list(
|
||||
///////////
|
||||
//CONNECT//
|
||||
///////////
|
||||
#if (PRELOAD_RSC == 0)
|
||||
GLOBAL_LIST_EMPTY(external_rsc_urls)
|
||||
#endif
|
||||
|
||||
/client/New(TopicData)
|
||||
world.SetConfig("APP/admin", ckey, "role=admin")
|
||||
world.SetConfig("APP/admin", ckey, "role=admin") //CITADEL EDIT - Allows admins to reboot in OOM situations
|
||||
var/tdata = TopicData //save this for later use
|
||||
chatOutput = new /datum/chatOutput(src)
|
||||
TopicData = null //Prevent calls to client.Topic from connect
|
||||
|
||||
if(connection != "seeker" && connection != "web")//Invalid connection type.
|
||||
@@ -220,9 +226,6 @@ GLOBAL_LIST_INIT(blacklisted_builds, list(
|
||||
GLOB.clients += src
|
||||
GLOB.directory[ckey] = src
|
||||
|
||||
// Instantiate tgui panel
|
||||
tgui_panel = new(src)
|
||||
|
||||
GLOB.ahelp_tickets.ClientLogin(src)
|
||||
var/connecting_admin = FALSE //because de-admined admins connecting should be treated like admins.
|
||||
//Admin Authorisation
|
||||
@@ -263,6 +266,7 @@ GLOBAL_LIST_INIT(blacklisted_builds, list(
|
||||
new /datum/admins(localhost_rank, ckey, 1, 1)
|
||||
//preferences datum - also holds some persistent data for the client (because we may as well keep these datums to a minimum)
|
||||
prefs = GLOB.preferences_datums[ckey]
|
||||
|
||||
if(prefs)
|
||||
prefs.parent = src
|
||||
else
|
||||
@@ -272,7 +276,7 @@ GLOBAL_LIST_INIT(blacklisted_builds, list(
|
||||
|
||||
prefs.last_ip = address //these are gonna be used for banning
|
||||
prefs.last_id = computer_id //these are gonna be used for banning
|
||||
fps = prefs.clientfps //(prefs.clientfps < 0) ? RECOMMENDED_FPS : prefs.clientfps
|
||||
fps = prefs.clientfps
|
||||
|
||||
if(fexists(roundend_report_file()))
|
||||
verbs += /client/proc/show_previous_roundend_report
|
||||
@@ -297,26 +301,22 @@ GLOBAL_LIST_INIT(blacklisted_builds, list(
|
||||
alert_mob_dupe_login = TRUE
|
||||
if(matches)
|
||||
if(C)
|
||||
message_admins("<span class='danger'><B>Notice: </B></span><span class='notice'>[key_name_admin(src)] has the same [matches] as [key_name_admin(C)].</span>")
|
||||
log_admin_private("Notice: [key_name(src)] has the same [matches] as [key_name(C)].")
|
||||
message_admins("<font color='red'><B>Notice: </B><font color='blue'>[key_name_admin(src)] has the same [matches] as [key_name_admin(C)].</font>")
|
||||
log_access("Notice: [key_name(src)] has the same [matches] as [key_name(C)].")
|
||||
else
|
||||
message_admins("<span class='danger'><B>Notice: </B></span><span class='notice'>[key_name_admin(src)] has the same [matches] as [key_name_admin(C)] (no longer logged in). </span>")
|
||||
log_admin_private("Notice: [key_name(src)] has the same [matches] as [key_name(C)] (no longer logged in).")
|
||||
message_admins("<font color='red'><B>Notice: </B><font color='blue'>[key_name_admin(src)] has the same [matches] as [key_name_admin(C)] (no longer logged in). </font>")
|
||||
log_access("Notice: [key_name(src)] has the same [matches] as [key_name(C)] (no longer logged in).")
|
||||
|
||||
if(GLOB.player_details[ckey])
|
||||
player_details = GLOB.player_details[ckey]
|
||||
player_details.byond_version = full_version
|
||||
else
|
||||
player_details = new(ckey)
|
||||
player_details = new
|
||||
player_details.byond_version = full_version
|
||||
GLOB.player_details[ckey] = player_details
|
||||
|
||||
|
||||
. = ..() //calls mob.Login()
|
||||
// if (length(GLOB.stickybanadminexemptions))
|
||||
// GLOB.stickybanadminexemptions -= ckey
|
||||
// if (!length(GLOB.stickybanadminexemptions))
|
||||
// restore_stickybans()
|
||||
|
||||
if (byond_version >= 512)
|
||||
if (!byond_build || byond_build < 1386)
|
||||
@@ -336,12 +336,7 @@ GLOBAL_LIST_INIT(blacklisted_builds, list(
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
// if(SSinput.initialized) placed here on tg.
|
||||
// set_macros()
|
||||
// update_movement_keys()
|
||||
|
||||
// Initialize tgui panel
|
||||
tgui_panel.initialize()
|
||||
chatOutput.start() // Starts the chat
|
||||
|
||||
if(alert_mob_dupe_login)
|
||||
spawn()
|
||||
@@ -352,13 +347,12 @@ GLOBAL_LIST_INIT(blacklisted_builds, list(
|
||||
connection_timeofday = world.timeofday
|
||||
winset(src, null, "command=\".configure graphics-hwmode on\"")
|
||||
var/cev = CONFIG_GET(number/client_error_version)
|
||||
var/ceb = CONFIG_GET(number/client_error_build)
|
||||
var/cwv = CONFIG_GET(number/client_warn_version)
|
||||
if (byond_version < cev || (byond_version == cev && byond_build < ceb)) //Out of date client.
|
||||
if (byond_version < cev) //Out of date client.
|
||||
to_chat(src, "<span class='danger'><b>Your version of BYOND is too old:</b></span>")
|
||||
to_chat(src, CONFIG_GET(string/client_error_message))
|
||||
to_chat(src, "Your version: [byond_version].[byond_build]")
|
||||
to_chat(src, "Required version: [cev].[ceb] or later")
|
||||
to_chat(src, "Your version: [byond_version]")
|
||||
to_chat(src, "Required version: [cev] or later")
|
||||
to_chat(src, "Visit <a href=\"https://secure.byond.com/download\">BYOND's website</a> to get the latest version of BYOND.")
|
||||
if (connecting_admin)
|
||||
to_chat(src, "Because you are an admin, you are being allowed to walk past this limitation, But it is still STRONGLY suggested you upgrade")
|
||||
@@ -470,10 +464,6 @@ GLOBAL_LIST_INIT(blacklisted_builds, list(
|
||||
if (menuitem)
|
||||
menuitem.Load_checked(src)
|
||||
|
||||
// view_size = new(src, getScreenSize(prefs.widescreenpref))
|
||||
// view_size.resetFormat()
|
||||
// view_size.setZoomMode()
|
||||
// fit_viewport()
|
||||
Master.UpdateTickRate()
|
||||
|
||||
/client/proc/ensure_keys_set()
|
||||
@@ -487,17 +477,13 @@ GLOBAL_LIST_INIT(blacklisted_builds, list(
|
||||
|
||||
/client/Del()
|
||||
if(!gc_destroyed)
|
||||
Destroy() //Clean up signals and timers.
|
||||
Destroy()
|
||||
return ..()
|
||||
|
||||
/client/Destroy()
|
||||
GLOB.clients -= src
|
||||
GLOB.directory -= ckey
|
||||
log_access("Logout: [key_name(src)]")
|
||||
GLOB.ahelp_tickets.ClientLogout(src)
|
||||
// SSserver_maint.UpdateHubStatus()
|
||||
if(credits)
|
||||
QDEL_LIST(credits)
|
||||
log_access("Logout: [key_name(src)]")
|
||||
if(holder)
|
||||
adminGreet(1)
|
||||
holder.owner = null
|
||||
@@ -519,13 +505,16 @@ GLOBAL_LIST_INIT(blacklisted_builds, list(
|
||||
)
|
||||
|
||||
send2irc("Server", "[cheesy_message] (No admins online)")
|
||||
|
||||
GLOB.ahelp_tickets.ClientLogout(src)
|
||||
GLOB.directory -= ckey
|
||||
GLOB.clients -= src
|
||||
QDEL_LIST_ASSOC_VAL(char_render_holders)
|
||||
if(movingmob != null)
|
||||
movingmob.client_mobs_in_contents -= mob
|
||||
UNSETEMPTY(movingmob.client_mobs_in_contents)
|
||||
// seen_messages = null
|
||||
Master.UpdateTickRate()
|
||||
. = ..() //Even though we're going to be hard deleted there are still some things that want to know the destroy is happening
|
||||
. = ..()
|
||||
return QDEL_HINT_HARDDEL_NOW
|
||||
|
||||
/client/proc/set_client_age_from_db(connectiontopic)
|
||||
@@ -627,9 +616,6 @@ GLOBAL_LIST_INIT(blacklisted_builds, list(
|
||||
var/datum/DBQuery/query_log_connection = SSdbcore.NewQuery("INSERT INTO `[format_table_name("connection_log")]` (`id`,`datetime`,`server_ip`,`server_port`,`round_id`,`ckey`,`ip`,`computerid`) VALUES(null,Now(),INET_ATON(IF('[world.internet_address]' LIKE '', '0', '[world.internet_address]')),'[world.port]','[GLOB.round_id]','[sql_ckey]',INET_ATON('[sql_ip]'),'[sql_computerid]')")
|
||||
query_log_connection.Execute()
|
||||
qdel(query_log_connection)
|
||||
|
||||
// SSserver_maint.UpdateHubStatus()
|
||||
|
||||
if(new_player)
|
||||
player_age = -1
|
||||
. = player_age
|
||||
@@ -871,31 +857,40 @@ GLOBAL_LIST_INIT(blacklisted_builds, list(
|
||||
return inactivity
|
||||
return FALSE
|
||||
|
||||
/// Send resources to the client.
|
||||
/// Sends both game resources and browser assets.
|
||||
//send resources to the client. It's here in its own proc so we can move it around easiliy if need be
|
||||
/client/proc/send_resources()
|
||||
#if (PRELOAD_RSC == 0)
|
||||
var/static/next_external_rsc = 0
|
||||
var/list/external_rsc_urls = CONFIG_GET(keyed_list/external_rsc_urls)
|
||||
if(length(external_rsc_urls))
|
||||
next_external_rsc = WRAP(next_external_rsc+1, 1, external_rsc_urls.len+1)
|
||||
preload_rsc = external_rsc_urls[next_external_rsc]
|
||||
if(GLOB.external_rsc_urls && GLOB.external_rsc_urls.len)
|
||||
next_external_rsc = WRAP(next_external_rsc+1, 1, GLOB.external_rsc_urls.len+1)
|
||||
preload_rsc = GLOB.external_rsc_urls[next_external_rsc]
|
||||
#endif
|
||||
|
||||
//get the common files
|
||||
getFiles(
|
||||
'html/search.js',
|
||||
'html/panels.css',
|
||||
'html/browser/common.css',
|
||||
'html/browser/scannernew.css',
|
||||
'html/browser/playeroptions.css',
|
||||
)
|
||||
spawn (10) //removing this spawn causes all clients to not get verbs.
|
||||
|
||||
//load info on what assets the client has
|
||||
src << browse('code/modules/asset_cache/validate_assets.html', "window=asset_cache_browser")
|
||||
|
||||
//Precache the client with all other assets slowly, so as to not block other browse() calls
|
||||
if (CONFIG_GET(flag/asset_simple_preload))
|
||||
addtimer(CALLBACK(SSassets.transport, /datum/asset_transport.proc/send_assets_slow, src, SSassets.transport.preload), 5 SECONDS)
|
||||
getFilesSlow(src, SSassets.preload, register_asset = FALSE)
|
||||
addtimer(CALLBACK(GLOBAL_PROC, /proc/getFilesSlow, src, SSassets.preload, FALSE), 5 SECONDS)
|
||||
|
||||
#if (PRELOAD_RSC == 0)
|
||||
for (var/name in GLOB.vox_sounds)
|
||||
var/file = GLOB.vox_sounds[name]
|
||||
Export("##action=load_rsc", file)
|
||||
stoplag()
|
||||
for (var/name in GLOB.vox_sounds_male)
|
||||
var/file = GLOB.vox_sounds_male[name]
|
||||
Export("##action=load_rsc", file)
|
||||
stoplag()
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
//Darkmode preference by Kmc2000//
|
||||
|
||||
/*
|
||||
This lets you switch chat themes by using winset and CSS loading, you must relog to see this change (or rebuild your browseroutput datum)
|
||||
Things to note:
|
||||
If you change ANYTHING in interface/skin.dmf you need to change it here:
|
||||
Format:
|
||||
winset(src, "window as appears in skin.dmf after elem", "var to change = desired value")
|
||||
How this works:
|
||||
I've added a function to browseroutput.js which registers a cookie for darkmode and swaps the chat accordingly. You can find the button to do this under the "cog" icon next to the ping button (top right of chat)
|
||||
This then swaps the window theme automatically
|
||||
Thanks to spacemaniac and mcdonald for help with the JS side of this.
|
||||
*/
|
||||
|
||||
/client/proc/force_white_theme() //There's no way round it. We're essentially changing the skin by hand. It's painful but it works, and is the way Lummox suggested.
|
||||
//Main windows
|
||||
winset(src, "infowindow", "background-color = [COLOR_WHITEMODE_DARKBACKGROUND];text-color = [COLOR_WHITEMODE_TEXT]")
|
||||
winset(src, "info", "background-color = [COLOR_WHITEMODE_BACKGROUND];text-color = [COLOR_WHITEMODE_TEXT]")
|
||||
winset(src, "browseroutput", "background-color = [COLOR_WHITEMODE_DARKBACKGROUND];text-color = [COLOR_WHITEMODE_TEXT]")
|
||||
winset(src, "outputwindow", "background-color = [COLOR_WHITEMODE_DARKBACKGROUND];text-color = [COLOR_WHITEMODE_TEXT]")
|
||||
winset(src, "mainwindow", "background-color = [COLOR_WHITEMODE_DARKBACKGROUND]")
|
||||
winset(src, "split", "background-color = [COLOR_WHITEMODE_BACKGROUND]")
|
||||
//Buttons
|
||||
winset(src, "changelog", "background-color = [COLOR_WHITEMODE_INFO_BUTTONS_BG];text-color = [COLOR_WHITEMODE_TEXT]")
|
||||
winset(src, "rules", "background-color = [COLOR_WHITEMODE_INFO_BUTTONS_BG];text-color = [COLOR_WHITEMODE_TEXT]")
|
||||
winset(src, "wiki", "background-color = [COLOR_WHITEMODE_INFO_BUTTONS_BG];text-color = [COLOR_WHITEMODE_TEXT]")
|
||||
winset(src, "forum", "background-color = [COLOR_WHITEMODE_INFO_BUTTONS_BG];text-color = [COLOR_WHITEMODE_TEXT]")
|
||||
winset(src, "github", "background-color = [COLOR_WHITEMODE_INFO_BUTTONS_BG];text-color = [COLOR_WHITEMODE_TEXT]")
|
||||
winset(src, "report-issue", "background-color = [COLOR_WHITEMODE_ISSUE_BUTTON_BG];text-color = [COLOR_WHITEMODE_TEXT]")
|
||||
//Status and verb tabs
|
||||
winset(src, "output", "background-color = [COLOR_WHITEMODE_BACKGROUND];text-color = [COLOR_WHITEMODE_TEXT]")
|
||||
winset(src, "statwindow", "background-color = [COLOR_WHITEMODE_DARKBACKGROUND];text-color = [COLOR_WHITEMODE_TEXT]")
|
||||
winset(src, "stat", "background-color = [COLOR_WHITEMODE_BACKGROUND];tab-background-color = [COLOR_WHITEMODE_DARKBACKGROUND];\
|
||||
text-color = [COLOR_WHITEMODE_TEXT];tab-text-color = [COLOR_WHITEMODE_TEXT];\
|
||||
prefix-color = [COLOR_WHITEMODE_TEXT];suffix-color = [COLOR_WHITEMODE_TEXT]")
|
||||
//Etc.
|
||||
winset(src, "say", "background-color = [COLOR_WHITEMODE_DARKBACKGROUND];text-color = [COLOR_WHITEMODE_TEXT]")
|
||||
winset(src, "asset_cache_browser", "background-color = [COLOR_WHITEMODE_DARKBACKGROUND];text-color = [COLOR_WHITEMODE_TEXT]")
|
||||
winset(src, "tooltip", "background-color = [COLOR_WHITEMODE_BACKGROUND];text-color = [COLOR_WHITEMODE_TEXT]")
|
||||
|
||||
/client/proc/force_dark_theme() //Inversely, if theyre using white theme and want to swap to the superior dark theme, let's get WINSET() ing
|
||||
//Main windows
|
||||
winset(src, "infowindow", "background-color = [COLOR_DARKMODE_DARKBACKGROUND];text-color = [COLOR_DARKMODE_TEXT]")
|
||||
winset(src, "info", "background-color = [COLOR_DARKMODE_BACKGROUND];text-color = [COLOR_DARKMODE_TEXT]")
|
||||
winset(src, "browseroutput", "background-color = [COLOR_DARKMODE_BACKGROUND];text-color = [COLOR_DARKMODE_TEXT]")
|
||||
winset(src, "outputwindow", "background-color = [COLOR_DARKMODE_BACKGROUND];text-color = [COLOR_DARKMODE_TEXT]")
|
||||
winset(src, "mainwindow", "background-color = [COLOR_DARKMODE_DARKBACKGROUND]")
|
||||
winset(src, "split", "background-color = [COLOR_DARKMODE_BACKGROUND]")
|
||||
//Buttons
|
||||
winset(src, "changelog", "background-color = [COLOR_DARKMODE_INFO_BUTTONS_BG];text-color = [COLOR_DARKMODE_TEXT]")
|
||||
winset(src, "rules", "background-color = [COLOR_DARKMODE_INFO_BUTTONS_BG];text-color = [COLOR_DARKMODE_TEXT]")
|
||||
winset(src, "wiki", "background-color = [COLOR_DARKMODE_INFO_BUTTONS_BG];text-color = [COLOR_DARKMODE_TEXT]")
|
||||
winset(src, "forum", "background-color = [COLOR_DARKMODE_INFO_BUTTONS_BG];text-color = [COLOR_DARKMODE_TEXT]")
|
||||
winset(src, "github", "background-color = [COLOR_DARKMODE_INFO_BUTTONS_BG];text-color = [COLOR_DARKMODE_TEXT]")
|
||||
winset(src, "report-issue", "background-color = [COLOR_DARKMODE_ISSUE_BUTTON_BG];text-color = [COLOR_DARKMODE_TEXT]")
|
||||
//Status and verb tabs
|
||||
winset(src, "output", "background-color = [COLOR_DARKMODE_BACKGROUND];text-color = [COLOR_DARKMODE_TEXT]")
|
||||
winset(src, "statwindow", "background-color = [COLOR_DARKMODE_DARKBACKGROUND];text-color = [COLOR_DARKMODE_TEXT]")
|
||||
winset(src, "stat", "background-color = [COLOR_DARKMODE_DARKBACKGROUND];tab-background-color = [COLOR_DARKMODE_BACKGROUND];\
|
||||
text-color = [COLOR_DARKMODE_TEXT];tab-text-color = [COLOR_DARKMODE_TEXT];\
|
||||
prefix-color = [COLOR_DARKMODE_TEXT];suffix-color = [COLOR_DARKMODE_TEXT]")
|
||||
//Etc.
|
||||
winset(src, "say", "background-color = [COLOR_DARKMODE_BACKGROUND];text-color = [COLOR_DARKMODE_TEXT]")
|
||||
winset(src, "asset_cache_browser", "background-color = [COLOR_DARKMODE_BACKGROUND];text-color = [COLOR_DARKMODE_TEXT]")
|
||||
winset(src, "tooltip", "background-color = [COLOR_DARKMODE_BACKGROUND];text-color = [COLOR_DARKMODE_TEXT]")
|
||||
@@ -163,7 +163,6 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
)
|
||||
var/custom_speech_verb = "default" //if your say_mod is to be something other than your races
|
||||
var/custom_tongue = "default" //if your tongue is to be something other than your races
|
||||
var/chosen_limb_id //body sprite selected to load for the users limbs, null means default, is sanitized when loaded
|
||||
|
||||
/// Security record note section
|
||||
var/security_records
|
||||
@@ -247,8 +246,6 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
/// Which of the 5 persistent scar slots we randomly roll to load for this round, if enabled. Actually rolled in [/datum/preferences/proc/load_character(slot)]
|
||||
var/scars_index = 1
|
||||
|
||||
var/hide_ckey = FALSE //pref for hiding if your ckey shows round-end or not
|
||||
|
||||
/datum/preferences/New(client/C)
|
||||
parent = C
|
||||
|
||||
@@ -373,7 +370,6 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
dat += "[medical_records]"
|
||||
else
|
||||
dat += "[TextPreview(medical_records)]...<BR>"
|
||||
dat += "<br><a href='?_src_=prefs;preference=hide_ckey;task=input'><b>Hide ckey: [hide_ckey ? "Enabled" : "Disabled"]</b></a><br>"
|
||||
dat += "</tr></table>"
|
||||
|
||||
//Character Appearance
|
||||
@@ -525,12 +521,6 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
dat += "</td>"
|
||||
mutant_category = 0
|
||||
|
||||
if(length(pref_species.allowed_limb_ids))
|
||||
if(!chosen_limb_id || !(chosen_limb_id in pref_species.allowed_limb_ids))
|
||||
chosen_limb_id = pref_species.id
|
||||
dat += "<h3>Body sprite</h3>"
|
||||
dat += "<a style='display:block;width:100px' href='?_src_=prefs;preference=bodysprite;task=input'>[chosen_limb_id]</a>"
|
||||
|
||||
if(mutant_category)
|
||||
dat += "</td>"
|
||||
mutant_category = 0
|
||||
@@ -859,8 +849,6 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
dat += "<table><tr><td width='340px' height='300px' valign='top'>"
|
||||
dat += "<h2>Fetish content prefs</h2>"
|
||||
dat += "<b>Arousal:</b><a href='?_src_=prefs;preference=arousable'>[arousable == TRUE ? "Enabled" : "Disabled"]</a><BR>"
|
||||
dat += "<b>Genital examine text</b>:<a href='?_src_=prefs;preference=genital_examine'>[(cit_toggles & GENITAL_EXAMINE) ? "Enabled" : "Disabled"]</a><BR>"
|
||||
dat += "<b>Vore examine text</b>:<a href='?_src_=prefs;preference=vore_examine'>[(cit_toggles & VORE_EXAMINE) ? "Enabled" : "Disabled"]</a><BR>"
|
||||
dat += "<b>Voracious MediHound sleepers:</b> <a href='?_src_=prefs;preference=hound_sleeper'>[(cit_toggles & MEDIHOUND_SLEEPER) ? "Yes" : "No"]</a><br>"
|
||||
dat += "<b>Hear Vore Sounds:</b> <a href='?_src_=prefs;preference=toggleeatingnoise'>[(cit_toggles & EATING_NOISES) ? "Yes" : "No"]</a><br>"
|
||||
dat += "<b>Hear Vore Digestion Sounds:</b> <a href='?_src_=prefs;preference=toggledigestionnoise'>[(cit_toggles & DIGESTION_NOISES) ? "Yes" : "No"]</a><br>"
|
||||
@@ -1450,11 +1438,6 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
if(!isnull(msg))
|
||||
features["ooc_notes"] = msg
|
||||
|
||||
if("hide_ckey")
|
||||
hide_ckey = !hide_ckey
|
||||
if(user)
|
||||
user.mind?.hide_ckey = hide_ckey
|
||||
|
||||
if("hair")
|
||||
var/new_hair = input(user, "Choose your character's hair colour:", "Character Preference","#"+hair_color) as color|null
|
||||
if(new_hair)
|
||||
@@ -2109,6 +2092,8 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
else
|
||||
features["body_model"] = chosengender
|
||||
gender = chosengender
|
||||
facial_hair_style = random_facial_hair_style(gender)
|
||||
hair_style = random_hair_style(gender)
|
||||
|
||||
if("body_size")
|
||||
var/min = CONFIG_GET(number/body_size_min)
|
||||
@@ -2134,11 +2119,6 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
var/selected_custom_speech_verb = input(user, "Choose your desired speech verb (none means your species speech verb)", "Character Preference") as null|anything in GLOB.speech_verbs
|
||||
if(selected_custom_speech_verb)
|
||||
custom_speech_verb = selected_custom_speech_verb
|
||||
|
||||
if("bodysprite")
|
||||
var/selected_body_sprite = input(user, "Choose your desired body sprite", "Character Preference") as null|anything in pref_species.allowed_limb_ids
|
||||
if(selected_body_sprite)
|
||||
chosen_limb_id = selected_body_sprite //this gets sanitized before loading
|
||||
else
|
||||
switch(href_list["preference"])
|
||||
//CITADEL PREFERENCES EDIT - I can't figure out how to modularize these, so they have to go here. :c -Pooj
|
||||
@@ -2362,13 +2342,6 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
parent.mob.hud_used.update_parallax_pref(parent.mob)
|
||||
|
||||
// Citadel edit - Prefs don't work outside of this. :c
|
||||
|
||||
if("genital_examine")
|
||||
cit_toggles ^= GENITAL_EXAMINE
|
||||
|
||||
if("vore_examine")
|
||||
cit_toggles ^= VORE_EXAMINE
|
||||
|
||||
if("hound_sleeper")
|
||||
cit_toggles ^= MEDIHOUND_SLEEPER
|
||||
|
||||
@@ -2537,8 +2510,6 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
|
||||
character.dna.features = features.Copy()
|
||||
character.set_species(chosen_species, icon_update = FALSE, pref_load = TRUE)
|
||||
if(chosen_limb_id && (chosen_limb_id in character.dna.species.allowed_limb_ids))
|
||||
character.dna.species.mutant_bodyparts["limbs_id"] = chosen_limb_id
|
||||
character.dna.real_name = character.real_name
|
||||
character.dna.nameless = character.nameless
|
||||
character.dna.custom_species = character.custom_species
|
||||
|
||||
@@ -514,8 +514,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
S["scars3"] >> scars_list["3"]
|
||||
S["scars4"] >> scars_list["4"]
|
||||
S["scars5"] >> scars_list["5"]
|
||||
S["chosen_limb_id"] >> chosen_limb_id
|
||||
S["hide_ckey"] >> hide_ckey //saved per-character
|
||||
|
||||
|
||||
//Custom names
|
||||
for(var/custom_name_id in GLOB.preferences_custom_names)
|
||||
@@ -845,8 +844,6 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
|
||||
WRITE_FILE(S["feature_ooc_notes"], features["ooc_notes"])
|
||||
|
||||
WRITE_FILE(S["chosen_limb_id"], chosen_limb_id)
|
||||
|
||||
//Custom names
|
||||
for(var/custom_name_id in GLOB.preferences_custom_names)
|
||||
var/savefile_slot_name = custom_name_id + "_name" //TODO remove this
|
||||
@@ -859,7 +856,6 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
WRITE_FILE(S["joblessrole"] , joblessrole)
|
||||
//Write prefs
|
||||
WRITE_FILE(S["job_preferences"] , job_preferences)
|
||||
WRITE_FILE(S["hide_ckey"] , hide_ckey)
|
||||
|
||||
//Quirks
|
||||
WRITE_FILE(S["all_quirks"] , all_quirks)
|
||||
@@ -875,7 +871,6 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
WRITE_FILE(S["scars4"] , scars_list["4"])
|
||||
WRITE_FILE(S["scars5"] , scars_list["5"])
|
||||
|
||||
|
||||
//gear loadout
|
||||
if(chosen_gear.len)
|
||||
var/text_to_save = chosen_gear.Join("|")
|
||||
|
||||
@@ -145,7 +145,8 @@ TOGGLE_CHECKBOX(/datum/verbs/menu/Settings/Sound, togglemidis)()
|
||||
to_chat(usr, "You will no longer hear sounds uploaded by admins")
|
||||
usr.stop_sound_channel(CHANNEL_ADMIN)
|
||||
var/client/C = usr.client
|
||||
C?.tgui_panel?.stop_music()
|
||||
if(C && C.chatOutput && !C.chatOutput.broken && C.chatOutput.loaded)
|
||||
C.chatOutput.stopMusic()
|
||||
SSblackbox.record_feedback("nested tally", "preferences_verb", 1, list("Toggle Hearing Midis", "[usr.client.prefs.toggles & SOUND_MIDI ? "Enabled" : "Disabled"]")) //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
/datum/verbs/menu/Settings/Sound/togglemidis/Get_checked(client/C)
|
||||
return C.prefs.toggles & SOUND_MIDI
|
||||
@@ -233,7 +234,8 @@ TOGGLE_CHECKBOX(/datum/verbs/menu/Settings/Sound, toggleprayersounds)()
|
||||
set desc = "Stop Current Sounds"
|
||||
SEND_SOUND(usr, sound(null))
|
||||
var/client/C = usr.client
|
||||
C?.tgui_panel?.stop_music()
|
||||
if(C && C.chatOutput && !C.chatOutput.broken && C.chatOutput.loaded)
|
||||
C.chatOutput.stopMusic()
|
||||
SSblackbox.record_feedback("nested tally", "preferences_verb", 1, list("Stop Self Sounds")) //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
|
||||
|
||||
@@ -158,6 +158,88 @@ GLOBAL_VAR_INIT(normal_ooc_colour, "#002eb8")
|
||||
else
|
||||
to_chat(src, "<span class='notice'>There are no admin notices at the moment.</span>")
|
||||
|
||||
/client/verb/fix_chat()
|
||||
set name = "Fix chat"
|
||||
set category = "OOC"
|
||||
if (!chatOutput || !istype(chatOutput))
|
||||
var/action = alert(src, "Invalid Chat Output data found!\nRecreate data?", "Wot?", "Recreate Chat Output data", "Cancel")
|
||||
if (action != "Recreate Chat Output data")
|
||||
return
|
||||
chatOutput = new /datum/chatOutput(src)
|
||||
chatOutput.start()
|
||||
action = alert(src, "Goon chat reloading, wait a bit and tell me if it's fixed", "", "Fixed", "Nope")
|
||||
if (action == "Fixed")
|
||||
log_game("GOONCHAT: [key_name(src)] Had to fix their goonchat by re-creating the chatOutput datum")
|
||||
else
|
||||
chatOutput.load()
|
||||
action = alert(src, "How about now? (give it a moment (it may also try to load twice))", "", "Yes", "No")
|
||||
if (action == "Yes")
|
||||
log_game("GOONCHAT: [key_name(src)] Had to fix their goonchat by re-creating the chatOutput datum and forcing a load()")
|
||||
else
|
||||
action = alert(src, "Welp, I'm all out of ideas. Try closing byond and reconnecting.\nWe could also disable fancy chat and re-enable oldchat", "", "Thanks anyways", "Switch to old chat")
|
||||
if (action == "Switch to old chat")
|
||||
winset(src, "output", "is-visible=true;is-disabled=false")
|
||||
winset(src, "browseroutput", "is-visible=false")
|
||||
log_game("GOONCHAT: [key_name(src)] Failed to fix their goonchat window after recreating the chatOutput and forcing a load()")
|
||||
|
||||
else if (chatOutput.loaded)
|
||||
var/action = alert(src, "ChatOutput seems to be loaded\nDo you want me to force a reload, wiping the chat log or just refresh the chat window because it broke/went away?", "Hmmm", "Force Reload", "Refresh", "Cancel")
|
||||
switch (action)
|
||||
if ("Force Reload")
|
||||
chatOutput.loaded = FALSE
|
||||
chatOutput.start() //this is likely to fail since it asks , but we should try it anyways so we know.
|
||||
action = alert(src, "Goon chat reloading, wait a bit and tell me if it's fixed", "", "Fixed", "Nope")
|
||||
if (action == "Fixed")
|
||||
log_game("GOONCHAT: [key_name(src)] Had to fix their goonchat by forcing a start()")
|
||||
else
|
||||
chatOutput.load()
|
||||
action = alert(src, "How about now? (give it a moment (it may also try to load twice))", "", "Yes", "No")
|
||||
if (action == "Yes")
|
||||
log_game("GOONCHAT: [key_name(src)] Had to fix their goonchat by forcing a load()")
|
||||
else
|
||||
action = alert(src, "Welp, I'm all out of ideas. Try closing byond and reconnecting.\nWe could also disable fancy chat and re-enable oldchat", "", "Thanks anyways", "Switch to old chat")
|
||||
if (action == "Switch to old chat")
|
||||
winset(src, "output", "is-visible=true;is-disabled=false")
|
||||
winset(src, "browseroutput", "is-visible=false")
|
||||
log_game("GOONCHAT: [key_name(src)] Failed to fix their goonchat window forcing a start() and forcing a load()")
|
||||
|
||||
if ("Refresh")
|
||||
chatOutput.showChat()
|
||||
action = alert(src, "Goon chat refreshing, wait a bit and tell me if it's fixed", "", "Fixed", "Nope, force a reload")
|
||||
if (action == "Fixed")
|
||||
log_game("GOONCHAT: [key_name(src)] Had to fix their goonchat by forcing a show()")
|
||||
else
|
||||
chatOutput.loaded = FALSE
|
||||
chatOutput.load()
|
||||
action = alert(src, "How about now? (give it a moment)", "", "Yes", "No")
|
||||
if (action == "Yes")
|
||||
log_game("GOONCHAT: [key_name(src)] Had to fix their goonchat by forcing a load()")
|
||||
else
|
||||
action = alert(src, "Welp, I'm all out of ideas. Try closing byond and reconnecting.\nWe could also disable fancy chat and re-enable oldchat", "", "Thanks anyways", "Switch to old chat")
|
||||
if (action == "Switch to old chat")
|
||||
winset(src, "output", "is-visible=true;is-disabled=false")
|
||||
winset(src, "browseroutput", "is-visible=false")
|
||||
log_game("GOONCHAT: [key_name(src)] Failed to fix their goonchat window forcing a show() and forcing a load()")
|
||||
return
|
||||
|
||||
else
|
||||
chatOutput.start()
|
||||
var/action = alert(src, "Manually loading Chat, wait a bit and tell me if it's fixed", "", "Fixed", "Nope")
|
||||
if (action == "Fixed")
|
||||
log_game("GOONCHAT: [key_name(src)] Had to fix their goonchat by manually calling start()")
|
||||
else
|
||||
chatOutput.load()
|
||||
alert(src, "How about now? (give it a moment (it may also try to load twice))", "", "Yes", "No")
|
||||
if (action == "Yes")
|
||||
log_game("GOONCHAT: [key_name(src)] Had to fix their goonchat by manually calling start() and forcing a load()")
|
||||
else
|
||||
action = alert(src, "Welp, I'm all out of ideas. Try closing byond and reconnecting.\nWe could also disable fancy chat and re-enable oldchat", "", "Thanks anyways", "Switch to old chat")
|
||||
if (action == "Switch to old chat")
|
||||
winset(src, "output", list2params(list("on-show" = "", "is-disabled" = "false", "is-visible" = "true")))
|
||||
winset(src, "browseroutput", "is-disabled=true;is-visible=false")
|
||||
log_game("GOONCHAT: [key_name(src)] Failed to fix their goonchat window after manually calling start() and forcing a load()")
|
||||
|
||||
|
||||
|
||||
/client/verb/motd()
|
||||
set name = "MOTD"
|
||||
|
||||
Reference in New Issue
Block a user