Merge branch 'master' of https://github.com/Citadel-Station-13/Citadel-Station-13 into proc-define-shit

This commit is contained in:
SandPoot
2024-03-08 19:10:22 -03:00
810 changed files with 140372 additions and 5523 deletions
+19 -17
View File
@@ -41,10 +41,10 @@ GLOBAL_LIST_EMPTY(preferences_datums)
var/last_custom_holoform = 0
//Cooldowns for saving/loading. These are four are all separate due to loading code calling these one after another
var/saveprefcooldown
var/loadprefcooldown
var/savecharcooldown
var/loadcharcooldown
COOLDOWN_DECLARE(saveprefcooldown)
COOLDOWN_DECLARE(loadprefcooldown)
COOLDOWN_DECLARE(savecharcooldown)
COOLDOWN_DECLARE(loadcharcooldown)
//game-preferences
var/lastchangelog = "" //Saved changlog filesize to detect if there was a change
@@ -65,7 +65,6 @@ GLOBAL_LIST_EMPTY(preferences_datums)
var/screentip_pref = SCREENTIP_PREFERENCE_ENABLED
var/screentip_color = "#ffd391"
var/screentip_images = TRUE
var/buttons_locked = FALSE
var/hotkeys = FALSE
///Runechat preference. If true, certain messages will be displayed on the map, not ust on the chat area. Boolean.
@@ -268,6 +267,9 @@ GLOBAL_LIST_EMPTY(preferences_datums)
var/loadout_errors = 0
var/pref_queue
var/char_queue
/datum/preferences/New(client/C)
parent = C
@@ -1070,8 +1072,6 @@ GLOBAL_LIST_EMPTY(preferences_datums)
dat += "<b>Runechat message char limit:</b> <a href='?_src_=prefs;preference=max_chat_length;task=input'>[max_chat_length]</a><br>"
dat += "<b>See Runechat for non-mobs:</b> <a href='?_src_=prefs;preference=see_chat_non_mob'>[see_chat_non_mob ? "Enabled" : "Disabled"]</a><br>"
dat += "<br>"
dat += "<b>Action Buttons:</b> <a href='?_src_=prefs;preference=action_buttons'>[(buttons_locked) ? "Locked In Place" : "Unlocked"]</a><br>"
dat += "<br>"
dat += "<b>PDA Color:</b> <span style='border:1px solid #161616; background-color: [pda_color];'><font color='[color_hex2num(pda_color) < 200 ? "FFFFFF" : "000000"]'>[pda_color]</font></span> <a href='?_src_=prefs;preference=pda_color;task=input'>Change</a><BR>"
dat += "<b>PDA Style:</b> <a href='?_src_=prefs;task=input;preference=pda_style'>[pda_style]</a><br>"
dat += "<b>PDA Reskin:</b> <a href='?_src_=prefs;task=input;preference=pda_skin'>[pda_skin]</a><br>"
@@ -1429,7 +1429,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
//The job before the current job. I only use this to get the previous jobs color when I'm filling in blank rows.
var/datum/job/lastJob
for(var/datum/job/job in sortList(SSjob.occupations, GLOBAL_PROC_REF(cmp_job_display_asc)))
for(var/datum/job/job in sort_list(SSjob.occupations, GLOBAL_PROC_REF(cmp_job_display_asc)))
index += 1
if((index >= limit) || (job.title in splitJobs))
@@ -1578,7 +1578,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
SetJobPreferenceLevel(job, jpval)
SetChoices(user)
return 1
return TRUE
/datum/preferences/proc/ResetJobs()
@@ -1724,7 +1724,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
UpdateJobPreference(user, href_list["text"], text2num(href_list["level"]))
else
SetChoices(user)
return 1
return TRUE
else if(href_list["preference"] == "trait")
switch(href_list["task"])
@@ -2631,8 +2631,10 @@ GLOBAL_LIST_EMPTY(preferences_datums)
var/pickedui = input(user, "Choose your UI style.", "Character Preference", UI_style) as null|anything in GLOB.available_ui_styles
if(pickedui)
UI_style = pickedui
if (parent && parent.mob && parent.mob.hud_used)
parent.mob.hud_used.update_ui_style(ui_style2icon(UI_style))
if (pickedui && parent && parent.mob && parent.mob.hud_used)
QDEL_NULL(parent.mob.hud_used)
parent.mob.create_mob_hud()
parent.mob.hud_used.show_hud(1, parent.mob)
if("pda_style")
var/pickedPDAStyle = input(user, "Choose your PDA style.", "Character Preference", pda_style) as null|anything in GLOB.pda_styles
if(pickedPDAStyle)
@@ -2981,7 +2983,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
if(!length(key_bindings[old_key]))
key_bindings -= old_key
key_bindings[full_key] += list(kb_name)
key_bindings[full_key] = sortList(key_bindings[full_key])
key_bindings[full_key] = sort_list(key_bindings[full_key])
if(href_list["special"]) // special keys need a full reset
user.client.ensure_keys_set(src)
user << browse(null, "window=capturekeypress")
@@ -3001,15 +3003,13 @@ GLOBAL_LIST_EMPTY(preferences_datums)
chat_on_map = !chat_on_map
if("see_chat_non_mob")
see_chat_non_mob = !see_chat_non_mob
if("action_buttons")
buttons_locked = !buttons_locked
if("tgui_fancy")
tgui_fancy = !tgui_fancy
if("outline_enabled")
outline_enabled = !outline_enabled
if("outline_color")
var/pickedOutlineColor = input(user, "Choose your outline color.", "General Preference", outline_color) as color|null
if(pickedOutlineColor != pickedOutlineColor)
if(pickedOutlineColor != outline_color)
outline_color = pickedOutlineColor // nullable
if("screentip_pref")
var/choice = input(user, "Choose your screentip preference", "Screentipping?", screentip_pref) as null|anything in GLOB.screentip_pref_options
@@ -3217,6 +3217,8 @@ GLOBAL_LIST_EMPTY(preferences_datums)
load_character()
if("changeslot")
if(char_queue)
deltimer(char_queue) // Do not dare.
if(!load_character(text2num(href_list["num"])))
random_character()
real_name = random_unique_name(gender)
@@ -3333,7 +3335,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
user_gear[LOADOUT_CUSTOM_DESCRIPTION] = new_description
ShowChoices(user)
return 1
return TRUE
/datum/preferences/proc/copy_to(mob/living/carbon/human/character, icon_updates = 1, roundstart_checks = TRUE, initial_spawn = FALSE)
if(be_random_name)