Merge remote-tracking branch 'upstream/master' into kk-spacetraffic

This commit is contained in:
Killian
2024-12-02 06:08:55 +00:00
705 changed files with 9505 additions and 7717 deletions
@@ -11,6 +11,7 @@
pref.all_underwear_metadata = check_list_copy(save_data["all_underwear_metadata"])
for(var/i in pref.all_underwear_metadata)
pref.all_underwear_metadata[i] = path2text_list(pref.all_underwear_metadata[i])
pref.headset = save_data["headset"]
pref.backbag = save_data["backbag"]
pref.pdachoice = save_data["pdachoice"]
pref.communicator_visibility = save_data["communicator_visibility"]
@@ -23,6 +24,7 @@
for(var/i in pref.all_underwear_metadata)
underwear[i] = check_list_copy(pref.all_underwear_metadata[i])
save_data["all_underwear_metadata"] = underwear
save_data["headset"] = pref.headset
save_data["backbag"] = pref.backbag
save_data["pdachoice"] = pref.pdachoice
save_data["communicator_visibility"] = pref.communicator_visibility
@@ -72,6 +74,10 @@ var/global/list/valid_ringtones = list(
pref.all_underwear -= underwear_category_name
// TODO - Looks like this is duplicating the work of sanitize_character() if so, remove
if(pref.headset > GLOB.headsetlist.len || pref.headset < 1)
pref.headset = 1 //Same as above
character.headset = pref.headset
if(pref.backbag > backbaglist.len || pref.backbag < 1)
pref.backbag = 2 //Same as above
character.backbag = pref.backbag
@@ -107,6 +113,7 @@ var/global/list/valid_ringtones = list(
for(var/underwear_metadata in pref.all_underwear_metadata)
if(!(underwear_metadata in pref.all_underwear))
pref.all_underwear_metadata -= underwear_metadata
pref.headset = sanitize_integer(pref.headset, 1, GLOB.headsetlist.len, initial(pref.headset))
pref.backbag = sanitize_integer(pref.backbag, 1, backbaglist.len, initial(pref.backbag))
pref.pdachoice = sanitize_integer(pref.pdachoice, 1, pdachoicelist.len, initial(pref.pdachoice))
pref.ringtone = sanitize(pref.ringtone, 20)
@@ -123,6 +130,7 @@ var/global/list/valid_ringtones = list(
. += " <a href='?src=\ref[src];underwear=[UWC.name];tweak=\ref[gt]'>[gt.get_contents(get_metadata(UWC.name, gt))]</a>"
. += "<br>"
. += "Headset Type: <a href='?src=\ref[src];change_headset=1'><b>[GLOB.headsetlist[pref.headset]]</b></a><br>"
. += "Backpack Type: <a href='?src=\ref[src];change_backpack=1'><b>[backbaglist[pref.backbag]]</b></a><br>"
. += "PDA Type: <a href='?src=\ref[src];change_pda=1'><b>[pdachoicelist[pref.pdachoice]]</b></a><br>"
. += "Communicator Visibility: <a href='?src=\ref[src];toggle_comm_visibility=1'><b>[(pref.communicator_visibility) ? "Yes" : "No"]</b></a><br>"
@@ -149,6 +157,12 @@ var/global/list/valid_ringtones = list(
/datum/category_item/player_setup_item/general/equipment/OnTopic(var/href,var/list/href_list, var/mob/user)
if(href_list["change_headset"])
var/new_headset = tgui_input_list(user, "Choose your character's style of headset:", "Character Preference", GLOB.headsetlist, GLOB.headsetlist[pref.headset])
if(!isnull(new_headset) && CanUseTopic(user))
pref.headset = GLOB.headsetlist.Find(new_headset)
return TOPIC_REFRESH_UPDATE_PREVIEW
if(href_list["change_backpack"])
var/new_backbag = tgui_input_list(user, "Choose your character's style of bag:", "Character Preference", backbaglist, backbaglist[pref.backbag])
if(!isnull(new_backbag) && CanUseTopic(user))
@@ -360,18 +360,18 @@
/datum/gear/accessory/wristband_collection
display_name = "wristbands (selection)"
path = /obj/item/clothing/accessory/wristbandcollection
path = /obj/item/clothing/accessory/wristband/collection
/datum/gear/accessory/wristband_collection/New()
..()
var/list/wristband_lists = list(
"Green, Blue and Yellow" = /obj/item/clothing/accessory/wristbandcollection,
"Pink, Black and Red" = /obj/item/clothing/accessory/wristbandcollection/pink,
"Red and Orange" = /obj/item/clothing/accessory/wristbandcollection/les,
"White, Pink and Blue" = /obj/item/clothing/accessory/wristbandcollection/trans,
"Blue, Purple and Pink" = /obj/item/clothing/accessory/wristbandcollection/bi,
"Black, White and Grey" = /obj/item/clothing/accessory/wristbandcollection/ace,
"Spiked" = /obj/item/clothing/accessory/wristband_spiked
"Green, Blue and Yellow" = /obj/item/clothing/accessory/wristband/collection,
"Pink, Black and Red" = /obj/item/clothing/accessory/wristband/collection/pink,
"Red and Orange" = /obj/item/clothing/accessory/wristband/collection/les,
"White, Pink and Blue" = /obj/item/clothing/accessory/wristband/collection/trans,
"Blue, Purple and Pink" = /obj/item/clothing/accessory/wristband/collection/bi,
"Black, White and Grey" = /obj/item/clothing/accessory/wristband/collection/ace,
"Spiked" = /obj/item/clothing/accessory/wristband/spiked
)
gear_tweaks += new/datum/gear_tweak/path(wristband_lists)
@@ -271,7 +271,7 @@
// C CKEYS
/datum/gear/fluff/cappy_watch
path = /obj/item/clothing/accessory/watch
path = /obj/item/clothing/accessory/watch/custom
display_name = "Cappy's Pocket Watch"
ckeywhitelist = list("cappycat")
character_name = list("Cappy Fuzzlyfeathers")
@@ -528,7 +528,7 @@
character_name = list("Elizabeth Bayou")
/datum/gear/fluff/mercury_vopal_ring
path = /obj/item/clothing/gloves/ring/material/void_opal/fluff/mercury
path = /obj/item/clothing/accessory/ring/material/void_opal/fluff/mercury
display_name = "Mercury's Mate Ring"
ckeywhitelist = list("haloren")
character_name = list("Mercury")
@@ -694,6 +694,12 @@
ckeywhitelist = list("john.wayne9392")
character_name = list("Harmony Pretchl")
/datum/gear/fluff/vox_dylo_pills
path = /obj/item/storage/pill_bottle/dylovene
display_name = "Dylovene pill bottle"
ckeywhitelist = list("jparker890")
character_name = list("Krey-Timinine")
/datum/gear/fluff/koyo_box
path = /obj/item/storage/box/fluff/koyoakimomi
display_name = "Koyo's Box"
@@ -1239,6 +1245,13 @@
ckeywhitelist = list("satinisle")
character_name = list("Parriz Tavakdavi")
/datum/gear/fluff/dark_tarot
path = /obj/item/deck/dark_tarot
display_name = "dark rose tarot deck"
ckeywhitelist = list("satinisle")
character_name = list("Millie Orlen")
// T CKEYS
/datum/gear/fluff/ascian_medal
path = /obj/item/clothing/accessory/medal/silver/unity/tabiranth
@@ -56,7 +56,6 @@
toytype["Big Red Button"] = /obj/item/toy/redbutton
toytype["Garden gnome"] = /obj/item/toy/gnome
toytype["Toy AI"] = /obj/item/toy/AI
toytype["Hand buzzer"] = /obj/item/clothing/gloves/ring/buzzer/toy
toytype["Toy nuke"] = /obj/item/toy/nuke
toytype["Toy gibber"] = /obj/item/toy/minigibber
toytype["Toy xeno"] = /obj/item/toy/toy_xeno
@@ -58,7 +58,7 @@
/datum/gear/gloves/fingerless
display_name = "fingerless gloves"
description = "A pair of gloves that don't actually cover the fingers. Available in classic black or recolourable white."
description = "A pair of gloves that don't actually cover the fingers. Available in classic black or recolourable white, with or without cutouts."
path = /obj/item/clothing/gloves/fingerless
/datum/gear/gloves/fingerless/New()
@@ -66,7 +66,8 @@
var/list/selector_uniforms = list(
"black"=/obj/item/clothing/gloves/fingerless,
"black, alt" =/obj/item/clothing/gloves/fingerless/alt,
"recolourable white"=/obj/item/clothing/gloves/fingerless_recolourable
"recolourable white"=/obj/item/clothing/gloves/fingerless_recolourable,
"recolourable, alt"=/obj/item/clothing/gloves/fingerless_recolourable/alt
)
gear_tweaks += new/datum/gear_tweak/path(sortAssoc(selector_uniforms))
gear_tweaks += gear_tweak_free_color_choice
@@ -74,27 +75,27 @@
/datum/gear/gloves/ring
display_name = "ring selection"
description = "Choose from a number of rings."
path = /obj/item/clothing/gloves/ring
path = /obj/item/clothing/accessory/ring
cost = 1
/datum/gear/gloves/ring/New()
..()
var/ringtype = list()
ringtype["CTI ring"] = /obj/item/clothing/gloves/ring/cti
ringtype["Mariner University ring"] = /obj/item/clothing/gloves/ring/mariner
ringtype["engagement ring"] = /obj/item/clothing/gloves/ring/engagement
ringtype["signet ring"] = /obj/item/clothing/gloves/ring/seal/signet
ringtype["masonic ring"] = /obj/item/clothing/gloves/ring/seal/mason
ringtype["ring, glass"] = /obj/item/clothing/gloves/ring/material/glass
ringtype["ring, wood"] = /obj/item/clothing/gloves/ring/material/wood
ringtype["ring, plastic"] = /obj/item/clothing/gloves/ring/material/plastic
ringtype["ring, iron"] = /obj/item/clothing/gloves/ring/material/iron
ringtype["ring, bronze"] = /obj/item/clothing/gloves/ring/material/bronze
ringtype["ring, steel"] = /obj/item/clothing/gloves/ring/material/steel
ringtype["ring, copper"] = /obj/item/clothing/gloves/ring/material/copper
ringtype["ring, silver"] = /obj/item/clothing/gloves/ring/material/silver
ringtype["ring, gold"] = /obj/item/clothing/gloves/ring/material/gold
ringtype["ring, platinum"] = /obj/item/clothing/gloves/ring/material/platinum
ringtype["CTI ring"] = /obj/item/clothing/accessory/ring/cti
ringtype["Mariner University ring"] = /obj/item/clothing/accessory/ring/mariner
ringtype["engagement ring"] = /obj/item/clothing/accessory/ring/engagement
ringtype["signet ring"] = /obj/item/clothing/accessory/ring/seal/signet
ringtype["masonic ring"] = /obj/item/clothing/accessory/ring/seal/mason
ringtype["ring, glass"] = /obj/item/clothing/accessory/ring/material/glass
ringtype["ring, wood"] = /obj/item/clothing/accessory/ring/material/wood
ringtype["ring, plastic"] = /obj/item/clothing/accessory/ring/material/plastic
ringtype["ring, iron"] = /obj/item/clothing/accessory/ring/material/iron
ringtype["ring, bronze"] = /obj/item/clothing/accessory/ring/material/bronze
ringtype["ring, steel"] = /obj/item/clothing/accessory/ring/material/steel
ringtype["ring, copper"] = /obj/item/clothing/accessory/ring/material/copper
ringtype["ring, silver"] = /obj/item/clothing/accessory/ring/material/silver
ringtype["ring, gold"] = /obj/item/clothing/accessory/ring/material/gold
ringtype["ring, platinum"] = /obj/item/clothing/accessory/ring/material/platinum
gear_tweaks += new/datum/gear_tweak/path(ringtype)
@@ -105,14 +106,14 @@
/datum/gear/gloves/watch
display_name = "wristwatch selector"
description = "Pick from a range of wristwatches."
path = /obj/item/clothing/gloves/watch
path = /obj/item/clothing/accessory/watch
/datum/gear/gloves/watch/New()
..()
var/list/selector_watches = list(
"plain plastic"=/obj/item/clothing/gloves/watch,
"silver"=/obj/item/clothing/gloves/watch/silver,
"gold"=/obj/item/clothing/gloves/watch/gold,
"survival"=/obj/item/clothing/gloves/watch/survival
"plain plastic"=/obj/item/clothing/accessory/watch,
"silver"=/obj/item/clothing/accessory/watch/silver,
"gold"=/obj/item/clothing/accessory/watch/gold,
"survival"=/obj/item/clothing/accessory/watch/survival
)
gear_tweaks += new/datum/gear_tweak/path(sortAssoc(selector_watches))
@@ -1,10 +1,10 @@
/datum/gear/gloves/goldring
display_name = "wedding ring, gold"
path = /obj/item/clothing/gloves/ring/wedding
path = /obj/item/clothing/accessory/ring/wedding
/datum/gear/gloves/silverring
display_name = "wedding ring, silver"
path = /obj/item/clothing/gloves/ring/wedding/silver
path = /obj/item/clothing/accessory/ring/wedding/silver
/datum/gear/gloves/colored
display_name = "gloves, colorable"
@@ -7,11 +7,6 @@
sort_order = 1
category_item_type = /datum/category_item/player_setup_item/general
/datum/category_group/player_setup_category/skill_preferences
name = "Skills"
sort_order = 2
category_item_type = /datum/category_item/player_setup_item/skills
/datum/category_group/player_setup_category/occupation_preferences
name = "Occupation"
sort_order = 3
@@ -1,89 +0,0 @@
/datum/category_item/player_setup_item/skills
name = "Skills"
sort_order = 1
/datum/category_item/player_setup_item/skills/load_character(list/save_data)
pref.skills = check_list_copy(save_data["skills"])
pref.used_skillpoints = save_data["used_skillpoints"]
pref.skill_specialization = save_data["skill_specialization"]
/datum/category_item/player_setup_item/skills/save_character(list/save_data)
save_data["skills"] = check_list_copy(pref.skills)
save_data["used_skillpoints"] = pref.used_skillpoints
save_data["skill_specialization"] = pref.skill_specialization
/datum/category_item/player_setup_item/skills/sanitize_character()
if(SKILLS == null) setup_skills()
if(!pref.skills) pref.skills = list()
if(!pref.skills.len) pref.ZeroSkills()
if(pref.used_skillpoints < 0) pref.used_skillpoints = 0
// Moved from /datum/preferences/proc/copy_to()
/datum/category_item/player_setup_item/skills/copy_to_mob(var/mob/living/carbon/human/character)
character.skills = pref.skills
character.used_skillpoints = pref.used_skillpoints
/datum/category_item/player_setup_item/skills/content()
. = list()
. += span_bold("Select your Skills") + "<br>"
. += "Current skill level: <b>[pref.GetSkillClass(pref.used_skillpoints)]</b> ([pref.used_skillpoints])<br>"
. += "<a href='?src=\ref[src];preconfigured=1'>Use preconfigured skillset</a><br>"
. += "<table>"
for(var/V in SKILLS)
. += "<tr><th colspan = 5><b>[V]</b>"
. += "</th></tr>"
for(var/datum/skill/S in SKILLS[V])
var/level = pref.skills[S.ID]
. += "<tr style='text-align:left;'>"
. += "<th><a href='?src=\ref[src];skillinfo=\ref[S]'>[S.name]</a></th>"
. += skill_to_button(S, "Untrained", level, SKILL_NONE)
// secondary skills don't have an amateur level
if(S.secondary)
. += "<th></th>"
else
. += skill_to_button(S, "Amateur", level, SKILL_BASIC)
. += skill_to_button(S, "Trained", level, SKILL_ADEPT)
. += skill_to_button(S, "Professional", level, SKILL_EXPERT)
. += "</tr>"
. += "</table>"
. = jointext(.,null)
/datum/category_item/player_setup_item/proc/skill_to_button(var/skill, var/level_name, var/current_level, var/selection_level)
if(current_level == selection_level)
return "<th>" + span_linkOn("[level_name]") + "</th>"
return "<th><a href='?src=\ref[src];setskill=\ref[skill];newvalue=[selection_level]'>[level_name]</a></th>"
/datum/category_item/player_setup_item/skills/OnTopic(href, href_list, user)
if(href_list["skillinfo"])
var/datum/skill/S = locate(href_list["skillinfo"])
var/HTML = span_bold("[S.name]") + "<br>[S.desc]"
user << browse(HTML, "window=\ref[user]skillinfo")
return TOPIC_HANDLED
else if(href_list["setskill"])
var/datum/skill/S = locate(href_list["setskill"])
var/value = text2num(href_list["newvalue"])
pref.skills[S.ID] = value
pref.CalculateSkillPoints()
return TOPIC_REFRESH
else if(href_list["preconfigured"])
var/selected = tgui_input_list(user, "Select a skillset", "Skillset", SKILL_PRE)
if(!selected || !CanUseTopic(user)) return
pref.ZeroSkills(1)
for(var/V in SKILL_PRE[selected])
if(V == "field")
pref.skill_specialization = SKILL_PRE[selected]["field"]
continue
pref.skills[V] = SKILL_PRE[selected][V]
pref.CalculateSkillPoints()
return TOPIC_REFRESH
else if(href_list["setspecialization"])
pref.skill_specialization = href_list["setspecialization"]
pref.CalculateSkillPoints()
return TOPIC_REFRESH
return ..()
@@ -40,7 +40,7 @@
var/channel = href_list["change_volume"]
if(!(channel in pref.volume_channels))
pref.volume_channels["[channel]"] = 1
var/value = tgui_input_number(usr, "Choose your volume for [channel] (0-200%)", "[channel] volume", (pref.volume_channels[channel] * 100), 200, 0)
var/value = tgui_input_number(user, "Choose your volume for [channel] (0-200%)", "[channel] volume", (pref.volume_channels[channel] * 100), 200, 0)
if(isnum(value))
value = CLAMP(value, 0, 200)
pref.volume_channels["[channel]"] = (value / 100)
@@ -79,14 +79,14 @@
data["volume_channels"] = user.client.prefs.volume_channels
return data
/datum/volume_panel/tgui_act(action, params)
/datum/volume_panel/tgui_act(action, params, datum/tgui/ui)
if(..())
return TRUE
if(!usr?.client?.prefs)
if(!ui.user?.client?.prefs)
return TRUE
var/datum/preferences/P = usr.client.prefs
var/datum/preferences/P = ui.user.client.prefs
switch(action)
if("adjust_volume")
var/channel = params["channel"]
@@ -63,6 +63,9 @@ var/global/list/valid_bloodreagents = list("default","iron","copper","phoron","s
. += link + (trait_prefs[identifier] ? "Enabled" : "Disabled")
if (2) //TRAIT_PREF_TYPE_COLOR
. += " " + color_square(hex = trait_prefs[identifier]) + link + "Change"
if (3) //TRAIT_PREF_TYPE_STRING
var/string = trait_prefs[identifier]
. += link + (length(string) > 0 ? string : "\[Empty\]")
. += "</a></li>"
. += "</ul>"
if (altered)
@@ -101,6 +104,9 @@ var/global/list/valid_bloodreagents = list("default","iron","copper","phoron","s
var/new_color = input(user, "Choose the color for this trait preference:", "Trait Preference", trait_prefs[preference]) as color|null
if (new_color)
trait_prefs[preference] = new_color
if (3) //TRAIT_PREF_TYPE_STRING
var/new_string = instance.apply_sanitization_to_string(preference, tgui_input_text(user, "What should the new value be?", instance.has_preferences[preference][2], trait_prefs[preference], MAX_NAME_LEN))
trait_prefs[preference] = new_string
// Definition of the stuff for Ears
/datum/category_item/player_setup_item/vore/traits