Merge remote-tracking branch 'origin/master' into TGUI-CHAT-TGUI-CHAT-TGUI-CHAT

This commit is contained in:
Letter N
2020-08-29 14:09:56 +08:00
207 changed files with 5495 additions and 4491 deletions
+16 -3
View File
@@ -246,6 +246,8 @@ 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/chosen_limb_id //body sprite selected to load for the users limbs, null means default, is sanitized when loaded
/datum/preferences/New(client/C)
parent = C
@@ -521,6 +523,12 @@ 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
@@ -801,7 +809,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
if(!subcategories.Find(gear_subcategory))
gear_subcategory = subcategories[1]
var/firstsubcat = FALSE
var/firstsubcat = TRUE
for(var/subcategory in subcategories)
if(firstsubcat)
firstsubcat = FALSE
@@ -2092,8 +2100,6 @@ 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)
@@ -2119,6 +2125,11 @@ 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
@@ -2510,6 +2521,8 @@ 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,6 +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
//Custom names
@@ -844,6 +845,8 @@ 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