diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index 0b21646a4b..ad144c0cae 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -513,9 +513,71 @@ GLOBAL_LIST_EMPTY(preferences_datums) dat += "Be [capitalize(i)]: \[IN [days_remaining] DAYS]
" else dat += "Be [capitalize(i)]: [(i in be_special) ? "Yes" : "No"]
" - dat += citadel_pref_replace(current_tab) + dat += "
" + dat += "

Citadel Preferences

" //Because fuck me if preferences can't be fucking modularized and expected to update in a reasonable timeframe. + dat += "Arousal:[arousable == TRUE ? "Enabled" : "Disabled"]
" + dat += "Exhibitionist:[features["exhibitionist"] == TRUE ? "Yes" : "No"]
" + dat += "Allow MediHound sleeper: [(cit_toggles & MEDIHOUND_SLEEPER) ? "Yes" : "No"]
" + dat += "Hear Vore Sounds: [(cit_toggles & EATING_NOISES) ? "Yes" : "No"]
" + dat += "Hear Vore Digestion Sounds: [(cit_toggles & DIGESTION_NOISES) ? "Yes" : "No"]
" + dat += "Widescreen: [widescreenpref ? "Enabled ([CONFIG_GET(string/default_view)])" : "Disabled (15x15)"]
" + dat += "Auto stand: [autostand ? "Enabled" : "Disabled"]
" + dat += "Screen Shake: [(screenshake==100) ? "Full" : ((screenshake==0) ? "None" : "[screenshake]")]
" + if (user && user.client && !user.client.prefs.screenshake==0) + dat += "Damage Screen Shake: [(damagescreenshake==1) ? "On" : ((damagescreenshake==0) ? "Off" : "Only when down")]
" + dat += "
" + if(3) + if(!gear_tab) + gear_tab = GLOB.loadout_items[1] + dat += "" + dat += "" + dat += "" + dat += "" + dat += "" + dat += "" + dat += "" + dat += "" + dat += "" + dat += "" + dat += "" + for(var/j in GLOB.loadout_items[gear_tab]) + var/datum/gear/gear = GLOB.loadout_items[gear_tab][j] + var/donoritem + if(gear.ckeywhitelist && gear.ckeywhitelist.len) + donoritem = TRUE + if(!(user.ckey in gear.ckeywhitelist)) + continue + var/class_link = "" + if(gear.type in chosen_gear) + class_link = "style='white-space:normal;' class='linkOn' href='?_src_=prefs;preference=gear;toggle_gear_path=[html_encode(j)];toggle_gear=0'" + else if(gear_points <= 0) + class_link = "style='white-space:normal;' class='linkOff'" + else if(donoritem) + class_link = "style='white-space:normal;background:#ebc42e;' href='?_src_=prefs;preference=gear;toggle_gear_path=[html_encode(j)];toggle_gear=1'" + else + class_link = "style='white-space:normal;' href='?_src_=prefs;preference=gear;toggle_gear_path=[html_encode(j)];toggle_gear=1'" + dat += "" + dat += "" + dat += "
[gear_points] loadout points remaining. \[Clear Loadout\]
You can only choose one item per category, unless it's an item that spawns in your backpack or hands.
" + var/firstcat = TRUE + for(var/i in GLOB.loadout_items) + if(firstcat) + firstcat = FALSE + else + dat += " |" + if(i == gear_tab) + dat += " [i] " + else + dat += " [i] " + dat += "

[gear_tab]

NameCostRestrictionsDescription
[j][gear.cost]" + if(islist(gear.restricted_roles)) + if(gear.restricted_roles.len) + dat += "" + dat += gear.restricted_roles.Join(";") + dat += "" + dat += "[gear.description]
" else dat = citadel_dat_replace(current_tab) @@ -1034,7 +1096,7 @@ GLOBAL_LIST_EMPTY(preferences_datums) if(new_metadata) metadata = sanitize(copytext(new_metadata,1,MAX_MESSAGE_LEN)) - if("hair") +/* if("hair") var/new_hair = input(user, "Choose your character's hair colour:", "Character Preference","#"+hair_color) as color|null if(new_hair) hair_color = sanitize_hexcolor(new_hair) @@ -1116,7 +1178,7 @@ GLOBAL_LIST_EMPTY(preferences_datums) if(new_eyes) eye_color = sanitize_hexcolor(new_eyes) -/* if("species") + if("species") var/result = input(user, "Select a species", "Species Selection") as null|anything in GLOB.roundstart_races @@ -1149,7 +1211,7 @@ GLOBAL_LIST_EMPTY(preferences_datums) var/new_tail new_tail = input(user, "Choose your character's tail:", "Character Preference") as null|anything in GLOB.tails_list_human if(new_tail) - features["tail_human"] = new_tail */ + features["tail_human"] = new_tail if("snout") var/new_snout @@ -1163,11 +1225,11 @@ GLOBAL_LIST_EMPTY(preferences_datums) if(new_horns) features["horns"] = new_horns -/* if("ears") + if("ears") var/new_ears new_ears = input(user, "Choose your character's ears:", "Character Preference") as null|anything in GLOB.ears_list if(new_ears) - features["ears"] = new_ears */ + features["ears"] = new_ears if("wings") var/new_wings @@ -1208,7 +1270,7 @@ GLOBAL_LIST_EMPTY(preferences_datums) if("s_tone") var/new_s_tone = input(user, "Choose your character's skin-tone:", "Character Preference") as null|anything in GLOB.skin_tones if(new_s_tone) - skin_tone = new_s_tone + skin_tone = new_s_tone*/ if("ooccolor") var/new_ooccolor = input(user, "Choose your OOC colour:", "Game Preference",ooccolor) as color|null @@ -1315,6 +1377,52 @@ GLOBAL_LIST_EMPTY(preferences_datums) 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 + if("genital_colour") + features["genitals_use_skintone"] = !features["genitals_use_skintone"] + if("arousable") + arousable = !arousable + if("has_cock") + features["has_cock"] = !features["has_cock"] + if("has_balls") + features["has_balls"] = !features["has_balls"] + if("has_ovi") + features["has_ovi"] = !features["has_ovi"] + if("has_eggsack") + features["has_eggsack"] = !features["has_eggsack"] + if("balls_internal") + features["balls_internal"] = !features["balls_internal"] + if("eggsack_internal") + features["eggsack_internal"] = !features["eggsack_internal"] + if("has_breasts") + features["has_breasts"] = !features["has_breasts"] + if("has_vag") + features["has_vag"] = !features["has_vag"] + if("has_womb") + features["has_womb"] = !features["has_womb"] + if("exhibitionist") + features["exhibitionist"] = !features["exhibitionist"] + if("widescreenpref") + widescreenpref = !widescreenpref + user.client.change_view(CONFIG_GET(string/default_view)) + if("autostand") + autostand = !autostand + if ("screenshake") + var/desiredshake = input(user, "Set the amount of screenshake you want. \n(0 = disabled, 100 = full, 200 = maximum.)", "Character Preference", screenshake) as null|num + if (!isnull(desiredshake)) + screenshake = desiredshake + if("damagescreenshake") + switch(damagescreenshake) + if(0) + damagescreenshake = 1 + if(1) + damagescreenshake = 2 + if(2) + damagescreenshake = 0 + else + damagescreenshake = 1 + //END CITADEL EDIT if("publicity") if(unlock_content) toggles ^= MEMBER_PUBLIC @@ -1401,6 +1509,16 @@ GLOBAL_LIST_EMPTY(preferences_datums) parallax = WRAP(parallax - 1, PARALLAX_INSANE, PARALLAX_DISABLE + 1) if (parent && parent.mob && parent.mob.hud_used) parent.mob.hud_used.update_parallax_pref(parent.mob) + // Citadel edit - Prefs don't work outside of this. :c + if("hound_sleeper") + cit_toggles ^= MEDIHOUND_SLEEPER + + if("toggleeatingnoise") + cit_toggles ^= EATING_NOISES + + if("toggledigestionnoise") + cit_toggles ^= DIGESTION_NOISES + //END CITADEL EDIT if("save") save_preferences() @@ -1423,7 +1541,35 @@ GLOBAL_LIST_EMPTY(preferences_datums) if("tab") if (href_list["tab"]) current_tab = text2num(href_list["tab"]) - process_citadel_prefs(user, href_list) + + if(href_list["preference"] == "gear") + if(href_list["clear_loadout"]) + LAZYCLEARLIST(chosen_gear) + gear_points = initial(gear_points) + save_preferences() + if(href_list["select_category"]) + for(var/i in GLOB.loadout_items) + if(i == href_list["select_category"]) + gear_tab = i + if(href_list["toggle_gear_path"]) + var/datum/gear/G = GLOB.loadout_items[gear_tab][html_decode(href_list["toggle_gear_path"])] + if(!G) + return + var/toggle = text2num(href_list["toggle_gear"]) + if(!toggle && (G.type in chosen_gear))//toggling off and the item effectively is in chosen gear) + LAZYREMOVE(chosen_gear, G.type) + gear_points += initial(G.cost) + else if(toggle && (!(is_type_in_ref_list(G, chosen_gear)))) + if(!is_loadout_slot_available(G.category)) + to_chat(user, "You cannot take this loadout, as you've already chosen too many of the same category!") + return + if(G.ckeywhitelist && G.ckeywhitelist.len && !(user.ckey in G.ckeywhitelist)) + to_chat(user, "This is an item intended for donator use only. You are not authorized to use this item.") + return + if(gear_points >= initial(G.cost)) + LAZYADD(chosen_gear, G.type) + gear_points -= initial(G.cost) + process_citadel_link(user, href_list) ShowChoices(user) return 1 diff --git a/code/modules/client/preferences_savefile.dm b/code/modules/client/preferences_savefile.dm index 8bebf460e6..d2efc477c6 100644 --- a/code/modules/client/preferences_savefile.dm +++ b/code/modules/client/preferences_savefile.dm @@ -383,17 +383,14 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car if(gender == MALE) hair_style = sanitize_inlist(hair_style, GLOB.hair_styles_male_list) facial_hair_style = sanitize_inlist(facial_hair_style, GLOB.facial_hair_styles_male_list) - //underwear = sanitize_inlist(underwear, GLOB.underwear_m) - //undershirt = sanitize_inlist(undershirt, GLOB.undershirt_m) + underwear = sanitize_inlist(underwear, GLOB.underwear_m) + undershirt = sanitize_inlist(undershirt, GLOB.undershirt_m) else hair_style = sanitize_inlist(hair_style, GLOB.hair_styles_female_list) facial_hair_style = sanitize_inlist(facial_hair_style, GLOB.facial_hair_styles_female_list) - //underwear = sanitize_inlist(underwear, GLOB.underwear_f) - //undershirt = sanitize_inlist(undershirt, GLOB.undershirt_f) - //socks = sanitize_inlist(socks, GLOB.socks_list) - underwear = "Nude" - undershirt = "Nude" - socks = "Nude" + underwear = sanitize_inlist(underwear, GLOB.underwear_f) + undershirt = sanitize_inlist(undershirt, GLOB.undershirt_f) + socks = sanitize_inlist(socks, GLOB.socks_list) age = sanitize_integer(age, AGE_MIN, AGE_MAX, initial(age)) hair_color = sanitize_hexcolor(hair_color, 3, 0) facial_hair_color = sanitize_hexcolor(facial_hair_color, 3, 0) diff --git a/modular_citadel/code/modules/client/preferences.dm b/modular_citadel/code/modules/client/preferences.dm index b515264320..1bc484fb9d 100644 --- a/modular_citadel/code/modules/client/preferences.dm +++ b/modular_citadel/code/modules/client/preferences.dm @@ -20,101 +20,84 @@ var/toggleeatingnoise = TRUE var/toggledigestionnoise = TRUE var/hound_sleeper = TRUE + var/cit_toggles = TOGGLES_CITADEL // stuff that was in base max_save_slots = 10 - var/cit_toggles = TOGGLES_CITADEL features = list("mcolor" = "FFF", - "tail_lizard" = "Smooth", - "tail_human" = "None", - "snout" = "Round", - "horns" = "None", - "ears" = "None", - "wings" = "None", - "frills" = "None", - "spines" = "None", - "body_markings" = "None", - "legs" = "Normal Legs", - "moth_wings" = "Plain", - "mcolor2" = "FFF", - "mcolor3" = "FFF", - "mam_body_markings" = "None", - "mam_ears" = "None", - "mam_tail" = "None", - "mam_tail_animated" = "None", - "xenodorsal" = "None", - "xenohead" = "None", - "xenotail" = "None", - "taur" = "None", - "exhibitionist" = FALSE, - "genitals_use_skintone" = FALSE, - "has_cock" = FALSE, - "cock_shape" = "Human", - "cock_length" = 6, - "cock_girth_ratio" = COCK_GIRTH_RATIO_DEF, - "cock_color" = "fff", - "has_sheath" = FALSE, - "sheath_color" = "fff", - "has_balls" = FALSE, - "balls_internal" = FALSE, - "balls_color" = "fff", - "balls_amount" = 2, - "balls_sack_size" = BALLS_SACK_SIZE_DEF, - "balls_size" = BALLS_SIZE_DEF, - "balls_cum_rate" = CUM_RATE, - "balls_cum_mult" = CUM_RATE_MULT, - "balls_efficiency" = CUM_EFFICIENCY, - "balls_fluid" = "semen", - "has_ovi" = FALSE, - "ovi_shape" = "knotted", - "ovi_length" = 6, - "ovi_color" = "fff", - "has_eggsack" = FALSE, - "eggsack_internal" = TRUE, - "eggsack_color" = "fff", - "eggsack_size" = BALLS_SACK_SIZE_DEF, - "eggsack_egg_color" = "fff", - "eggsack_egg_size" = EGG_GIRTH_DEF, - "has_breasts" = FALSE, - "breasts_color" = "fff", - "breasts_size" = "C", - "breasts_shape" = "Pair", - "breasts_fluid" = "milk", - "has_vag" = FALSE, - "vag_shape" = "Human", - "vag_color" = "fff", - "vag_clits" = 1, - "vag_clit_diam" = 0.25, - "has_womb" = FALSE, - "womb_cum_rate" = CUM_RATE, - "womb_cum_mult" = CUM_RATE_MULT, - "womb_efficiency" = CUM_EFFICIENCY, - "womb_fluid" = "femcum", - "ipc_screen" = "Sunburst", - "flavor_text" = "") + "tail_lizard" = "Smooth", + "tail_human" = "None", + "snout" = "Round", + "horns" = "None", + "ears" = "None", + "wings" = "None", + "frills" = "None", + "spines" = "None", + "body_markings" = "None", + "legs" = "Normal Legs", + "moth_wings" = "Plain", + "mcolor2" = "FFF", + "mcolor3" = "FFF", + "mam_body_markings" = "None", + "mam_ears" = "None", + "mam_tail" = "None", + "mam_tail_animated" = "None", + "xenodorsal" = "None", + "xenohead" = "None", + "xenotail" = "None", + "taur" = "None", + "exhibitionist" = FALSE, + "genitals_use_skintone" = FALSE, + "has_cock" = FALSE, + "cock_shape" = "Human", + "cock_length" = 6, + "cock_girth_ratio" = COCK_GIRTH_RATIO_DEF, + "cock_color" = "fff", + "has_sheath" = FALSE, + "sheath_color" = "fff", + "has_balls" = FALSE, + "balls_internal" = FALSE, + "balls_color" = "fff", + "balls_amount" = 2, + "balls_sack_size" = BALLS_SACK_SIZE_DEF, + "balls_size" = BALLS_SIZE_DEF, + "balls_cum_rate" = CUM_RATE, + "balls_cum_mult" = CUM_RATE_MULT, + "balls_efficiency" = CUM_EFFICIENCY, + "balls_fluid" = "semen", + "has_ovi" = FALSE, + "ovi_shape" = "knotted", + "ovi_length" = 6, + "ovi_color" = "fff", + "has_eggsack" = FALSE, + "eggsack_internal" = TRUE, + "eggsack_color" = "fff", + "eggsack_size" = BALLS_SACK_SIZE_DEF, + "eggsack_egg_color" = "fff", + "eggsack_egg_size" = EGG_GIRTH_DEF, + "has_breasts" = FALSE, + "breasts_color" = "fff", + "breasts_size" = "C", + "breasts_shape" = "Pair", + "breasts_fluid" = "milk", + "has_vag" = FALSE, + "vag_shape" = "Human", + "vag_color" = "fff", + "vag_clits" = 1, + "vag_clit_diam" = 0.25, + "has_womb" = FALSE, + "womb_cum_rate" = CUM_RATE, + "womb_cum_mult" = CUM_RATE_MULT, + "womb_efficiency" = CUM_EFFICIENCY, + "womb_fluid" = "femcum", + "ipc_screen" = "Sunburst", + "flavor_text" = "" + ) /datum/preferences/New(client/C) ..() LAZYINITLIST(chosen_gear) - -/datum/preferences/proc/citadel_pref_replace(current_tab) - var/mob/user - - . += "
" - . += "

Citadel Preferences

" - . += "Arousal:[arousable == TRUE ? "Enabled" : "Disabled"]
" - . += "Exhibitionist:[features["exhibitionist"] == TRUE ? "Yes" : "No"]
" - . += "Allow MediHound sleeper: [(cit_toggles & MEDIHOUND_SLEEPER) ? "Yes" : "No"]
" - . += "Hear Vore Sounds: [(cit_toggles & EATING_NOISES) ? "Yes" : "No"]
" - . += "Hear Vore Digestion Sounds: [(cit_toggles & DIGESTION_NOISES) ? "Yes" : "No"]
" - . += "Widescreen: [widescreenpref ? "Enabled ([CONFIG_GET(string/default_view)])" : "Disabled (15x15)"]
" - . += "Auto stand: [autostand ? "Enabled" : "Disabled"]
" - . += "Screen Shake: [(screenshake==100) ? "Full" : ((screenshake==0) ? "None" : "[screenshake]")]
" - if (user && user.client && !user.client.prefs.screenshake==0) - . += "Damage Screen Shake: [(damagescreenshake==1) ? "On" : ((damagescreenshake==0) ? "Off" : "Only when down")]
" - . += "
" - /datum/preferences/proc/citadel_dat_replace(current_tab) var/mob/user //This proc is for menus other than game pref and char pref @@ -263,214 +246,93 @@ */ . += "" - if(current_tab == 3) - if(!gear_tab) - gear_tab = GLOB.loadout_items[1] - . += "" - . += "" - . += "" - . += "" - . += "" - . += "" - . += "" - . += "" - . += "" - . += "" - . += "" - for(var/j in GLOB.loadout_items[gear_tab]) - var/datum/gear/gear = GLOB.loadout_items[gear_tab][j] - var/donoritem - if(gear.ckeywhitelist && gear.ckeywhitelist.len) - donoritem = TRUE - if(user && user.client && user.client.ckey && !(gear.ckeywhitelist.Find(user.client.ckey))) - continue - var/class_link = "" - if(gear.type in chosen_gear) - class_link = "class='linkOn' href='?_src_=prefs;preference=gear;toggle_gear_path=[j];toggle_gear=0'" - else if(donoritem) - class_link = "class='linkOn' href='?_src_=prefs;preference=gear;toggle_gear_path=[j];toggle_gear=1'" - else if(gear_points <= 0) - class_link = "class='linkOff'" - else - class_link = "href='?_src_=prefs;preference=gear;toggle_gear_path=[j];toggle_gear=1'" - . += "" - . += "" - . += "
[gear_points] loadout points remaining. \[Clear Loadout\]
You can only choose one item per category, unless it's an item that spawns in your backpack or hands.
" - var/firstcat = TRUE - for(var/i in GLOB.loadout_items) - if(firstcat) - firstcat = FALSE - else - . += " |" - if(i == gear_tab) - . += " [i] " - else - . += " [i] " - . += "

[gear_tab]

NameCostRestrictionsDescription
[j][gear.cost]" - if(islist(gear.restricted_roles)) - if(gear.restricted_roles.len) - . += "" - . += gear.restricted_roles.Join(";") - . += "" - . += "[gear.description]
" - -/datum/preferences/proc/process_citadel_prefs(mob/user, list/href_list) - if(href_list["task"] == "input") - switch(href_list["preference"]) - //genital code - if("genital_colour") - switch(features["genitals_use_skintone"]) - if(TRUE) - features["genitals_use_skintone"] = FALSE - if(FALSE) - features["genitals_use_skintone"] = TRUE - else - features["genitals_use_skintone"] = FALSE - if("arousable") - switch(arousable) - if(TRUE) - arousable = FALSE - if(FALSE) - arousable = TRUE - else//failsafe - arousable = FALSE - if("has_cock") - switch(features["has_cock"]) - if(TRUE) - features["has_cock"] = FALSE - if(FALSE) - features["has_cock"] = TRUE - features["has_ovi"] = FALSE - features["has_eggsack"] = FALSE - else - features["has_cock"] = FALSE - features["has_ovi"] = FALSE - if("has_balls") - switch(features["has_balls"]) - if(TRUE) - features["has_balls"] = FALSE - if(FALSE) - features["has_balls"] = TRUE - features["has_eggsack"] = FALSE - else - features["has_balls"] = FALSE - features["has_eggsack"] = FALSE - if("has_ovi") - switch(features["has_ovi"]) - if(TRUE) - features["has_ovi"] = FALSE - if(FALSE) - features["has_ovi"] = TRUE - features["has_cock"] = FALSE - features["has_balls"] = FALSE - else - features["has_ovi"] = FALSE - features["has_cock"] = FALSE - if("has_eggsack") - switch(features["has_eggsack"]) - if(TRUE) - features["has_eggsack"] = FALSE - if(FALSE) - features["has_eggsack"] = TRUE - features["has_balls"] = FALSE - else - features["has_eggsack"] = FALSE - features["has_balls"] = FALSE - if("balls_internal") - switch(features["balls_internal"]) - if(TRUE) - features["balls_internal"] = FALSE - if(FALSE) - features["balls_internal"] = TRUE - features["eggsack_internal"] = FALSE - else - features["balls_internal"] = FALSE - features["eggsack_internal"] = FALSE - if("eggsack_internal") - switch(features["eggsack_internal"]) - if(TRUE) - features["eggsack_internal"] = FALSE - if(FALSE) - features["eggsack_internal"] = TRUE - features["balls_internal"] = FALSE - else - features["eggsack_internal"] = FALSE - features["balls_internal"] = FALSE - if("has_breasts") - switch(features["has_breasts"]) - if(TRUE) - features["has_breasts"] = FALSE - if(FALSE) - features["has_breasts"] = TRUE - else - features["has_breasts"] = FALSE - if("has_vag") - switch(features["has_vag"]) - if(TRUE) - features["has_vag"] = FALSE - if(FALSE) - features["has_vag"] = TRUE - else - features["has_vag"] = FALSE - if("has_womb") - switch(features["has_womb"]) - if(TRUE) - features["has_womb"] = FALSE - if(FALSE) - features["has_womb"] = TRUE - else - features["has_womb"] = FALSE - if("exhibitionist") - switch(features["exhibitionist"]) - if(TRUE) - features["exhibitionist"] = FALSE - if(FALSE) - features["exhibitionist"] = TRUE - else - features["exhibitionist"] = FALSE - else - switch(href_list["preference"]) - if("widescreenpref") - widescreenpref = !widescreenpref - user.client.change_view(CONFIG_GET(string/default_view)) - - if("autostand") - autostand = !autostand - - if("screenshake") - var/desiredshake = input(user, "Set the amount of screenshake you want. \n(0 = disabled, 100 = full, 200 = maximum.)", "Character Preference", screenshake) as null|num - if (!isnull(desiredshake)) - screenshake = desiredshake - - if("damagescreenshake") - switch(damagescreenshake) - if(0) - damagescreenshake = 1 - if(1) - damagescreenshake = 2 - if(2) - damagescreenshake = 0 - else - damagescreenshake = 1 - - if("hound_sleeper") - toggles ^= MEDIHOUND_SLEEPER - - if("toggleeatingnoise") - toggles ^= EATING_NOISES - - if("toggledigestionnoise") - toggles ^= DIGESTION_NOISES - /datum/preferences/proc/process_citadel_link(mob/user, list/href_list) - if(href_list["task"] == "input") + if("input") switch(href_list["preference"]) - if("flavor_text") var/msg = stripped_multiline_input(usr,"Set the flavor text in your 'examine' verb. This can also be used for OOC notes and preferences!","Flavor Text",html_decode(features["flavor_text"]), MAX_MESSAGE_LEN*2, TRUE) as message if(msg != null) msg = copytext(msg, 1, MAX_MESSAGE_LEN*2) features["flavor_text"] = msg + + if("hair") + var/new_hair = input(user, "Choose your character's hair colour:", "Character Preference","#"+hair_color) as color|null + if(new_hair) + hair_color = sanitize_hexcolor(new_hair) + + if("hair_style") + var/new_hair_style + if(gender == MALE) + new_hair_style = input(user, "Choose your character's hair style:", "Character Preference") as null|anything in GLOB.hair_styles_male_list + else + new_hair_style = input(user, "Choose your character's hair style:", "Character Preference") as null|anything in GLOB.hair_styles_female_list + if(new_hair_style) + hair_style = new_hair_style + + if("next_hair_style") + if (gender == MALE) + hair_style = next_list_item(hair_style, GLOB.hair_styles_male_list) + else + hair_style = next_list_item(hair_style, GLOB.hair_styles_female_list) + + if("previous_hair_style") + if (gender == MALE) + hair_style = previous_list_item(hair_style, GLOB.hair_styles_male_list) + else + hair_style = previous_list_item(hair_style, GLOB.hair_styles_female_list) + + if("facial") + var/new_facial = input(user, "Choose your character's facial-hair colour:", "Character Preference","#"+facial_hair_color) as color|null + if(new_facial) + facial_hair_color = sanitize_hexcolor(new_facial) + if("facial_hair_style") + var/new_facial_hair_style + if(gender == MALE) + new_facial_hair_style = input(user, "Choose your character's facial-hair style:", "Character Preference") as null|anything in GLOB.facial_hair_styles_male_list + else + new_facial_hair_style = input(user, "Choose your character's facial-hair style:", "Character Preference") as null|anything in GLOB.facial_hair_styles_female_list + if(new_facial_hair_style) + facial_hair_style = new_facial_hair_style + + if("next_facehair_style") + if (gender == MALE) + facial_hair_style = next_list_item(facial_hair_style, GLOB.facial_hair_styles_male_list) + else + facial_hair_style = next_list_item(facial_hair_style, GLOB.facial_hair_styles_female_list) + if("previous_facehair_style") + if (gender == MALE) + facial_hair_style = previous_list_item(facial_hair_style, GLOB.facial_hair_styles_male_list) + else + facial_hair_style = previous_list_item(facial_hair_style, GLOB.facial_hair_styles_female_list) + + if("underwear") + var/new_underwear + if(gender == MALE) + new_underwear = input(user, "Choose your character's underwear:", "Character Preference") as null|anything in GLOB.underwear_m + else + new_underwear = input(user, "Choose your character's underwear:", "Character Preference") as null|anything in GLOB.underwear_f + if(new_underwear) + underwear = new_underwear + + if("undershirt") + var/new_undershirt + if(gender == MALE) + new_undershirt = input(user, "Choose your character's undershirt:", "Character Preference") as null|anything in GLOB.undershirt_m + else + new_undershirt = input(user, "Choose your character's undershirt:", "Character Preference") as null|anything in GLOB.undershirt_f + if(new_undershirt) + undershirt = new_undershirt + + if("socks") + var/new_socks + new_socks = input(user, "Choose your character's socks:", "Character Preference") as null|anything in GLOB.socks_list + if(new_socks) + socks = new_socks + + if("eyes") + var/new_eyes = input(user, "Choose your character's eye colour:", "Character Preference","#"+eye_color) as color|null + if(new_eyes) + eye_color = sanitize_hexcolor(new_eyes) if("species") var/result = input(user, "Select a species", "Species Selection") as null|anything in GLOB.roundstart_races @@ -563,6 +425,65 @@ if(new_tail != "None") features["taur"] = "None" + if("snout") + var/new_snout + new_snout = input(user, "Choose your character's snout:", "Character Preference") as null|anything in GLOB.snouts_list + if(new_snout) + features["snout"] = new_snout + + if("horns") + var/new_horns + new_horns = input(user, "Choose your character's horns:", "Character Preference") as null|anything in GLOB.horns_list + if(new_horns) + features["horns"] = new_horns + + if("ears") + var/new_ears + new_ears = input(user, "Choose your character's ears:", "Character Preference") as null|anything in GLOB.ears_list + if(new_ears) + features["ears"] = new_ears + + if("wings") + var/new_wings + new_wings = input(user, "Choose your character's wings:", "Character Preference") as null|anything in GLOB.r_wings_list + if(new_wings) + features["wings"] = new_wings + + if("frills") + var/new_frills + new_frills = input(user, "Choose your character's frills:", "Character Preference") as null|anything in GLOB.frills_list + if(new_frills) + features["frills"] = new_frills + + if("spines") + var/new_spines + new_spines = input(user, "Choose your character's spines:", "Character Preference") as null|anything in GLOB.spines_list + if(new_spines) + features["spines"] = new_spines + + if("body_markings") + var/new_body_markings + new_body_markings = input(user, "Choose your character's body markings:", "Character Preference") as null|anything in GLOB.body_markings_list + if(new_body_markings) + features["body_markings"] = new_body_markings + + if("legs") + var/new_legs + new_legs = input(user, "Choose your character's legs:", "Character Preference") as null|anything in GLOB.legs_list + if(new_legs) + features["legs"] = new_legs + + if("moth_wings") + var/new_moth_wings + new_moth_wings = input(user, "Choose your character's wings:", "Character Preference") as null|anything in GLOB.moth_wings_list + if(new_moth_wings) + features["moth_wings"] = new_moth_wings + + if("s_tone") + var/new_s_tone = input(user, "Choose your character's skin-tone:", "Character Preference") as null|anything in GLOB.skin_tones + if(new_s_tone) + skin_tone = new_s_tone + if("taur") var/list/snowflake_taur_list = list("Normal" = null) for(var/path in GLOB.taur_list) @@ -726,35 +647,6 @@ else user << "Invalid color. Your color is not bright enough." - if(href_list["preference"] == "gear") - if(href_list["clear_loadout"]) - LAZYCLEARLIST(chosen_gear) - gear_points = initial(gear_points) - save_preferences() - if(href_list["select_category"]) - for(var/i in GLOB.loadout_items) - if(i == href_list["select_category"]) - gear_tab = i - if(href_list["toggle_gear_path"]) - var/datum/gear/G = GLOB.loadout_items[gear_tab][href_list["toggle_gear_path"]] - if(!G) - return - var/toggle = text2num(href_list["toggle_gear"]) - if(!toggle && (G.type in chosen_gear))//toggling off and the item effectively is in chosen gear) - LAZYREMOVE(chosen_gear, G.type) - gear_points += initial(G.cost) - else if(toggle && (!(is_type_in_ref_list(G, chosen_gear)))) - if(G.ckeywhitelist && G.ckeywhitelist.len && !(user.ckey in G.ckeywhitelist)) - to_chat(user, "This is an item intended for donator use only. You are not authorized to use this item.") - return - if(!is_loadout_slot_available(G.category)) - to_chat(user, "You cannot take this loadout, as you've already chosen too many of the same category!") - return - if(gear_points >= initial(G.cost)) - LAZYADD(chosen_gear, G.type) - gear_points -= initial(G.cost) - - /datum/preferences/proc/is_loadout_slot_available(slot) var/list/L LAZYINITLIST(L)