From d387481aa5d5f9af36c02c08e7aae228b1148cb2 Mon Sep 17 00:00:00 2001 From: Poojawa Date: Mon, 19 Mar 2018 02:13:47 -0500 Subject: [PATCH] UI's functional again at least --- code/modules/client/preferences.dm | 18 +- .../code/controllers/subsystem/job.dm | 13 +- .../code/modules/client/preferences.dm | 742 +++++++++--------- .../modules/client/preferences_savefile.dm | 2 +- 4 files changed, 388 insertions(+), 387 deletions(-) diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index 86413bbb6b..0b21646a4b 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -227,7 +227,8 @@ GLOBAL_LIST_EMPTY(preferences_datums) dat += "" - dat += "

Body

" +// CITADEL EDIT - ALL OF THESE ARE HANDLED IN THE MODULAR VERSION, TAB 2 + /* dat += "

Body

" dat += "Random Body " dat += "Always Random Body: [be_random_body ? "Yes" : "No"]
" @@ -241,8 +242,7 @@ GLOBAL_LIST_EMPTY(preferences_datums) dat += "Backpack:
[backbag]
" dat += "Uplink Spawn Location:
[uplink_spawn_loc]
" -// CITADEL EDIT - ALL OF THESE ARE HANDLED IN THE MODULAR VERSION, TAB 2 - /* if(pref_species.use_skintones) + if(pref_species.use_skintones) dat += "" @@ -252,8 +252,6 @@ GLOBAL_LIST_EMPTY(preferences_datums) dat += "" - dat = add_citadel_choices(dat) - if(HAIR in pref_species.species_traits) dat += "" @@ -396,10 +394,9 @@ GLOBAL_LIST_EMPTY(preferences_datums) dat += "[features["wings"]]
" - dat += ""*/ - dat += citadel_dat_replace(current_tab) + dat += "" - dat += "" + dat += ""*/ if (1) // Game Preferences @@ -516,9 +513,7 @@ 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_dat_replace(current_tab) - + dat += citadel_pref_replace(current_tab) dat += "" @@ -1428,6 +1423,7 @@ GLOBAL_LIST_EMPTY(preferences_datums) if("tab") if (href_list["tab"]) current_tab = text2num(href_list["tab"]) + process_citadel_prefs(user, href_list) process_citadel_link(user, href_list) ShowChoices(user) return 1 diff --git a/modular_citadel/code/controllers/subsystem/job.dm b/modular_citadel/code/controllers/subsystem/job.dm index 846c17344c..e9d7c65a34 100644 --- a/modular_citadel/code/controllers/subsystem/job.dm +++ b/modular_citadel/code/controllers/subsystem/job.dm @@ -1,4 +1,4 @@ -/datum/controller/subsystem/job/proc/equip_loadout(mob/dead/new_player/N, mob/living/M, equipbackpackstuff) +/datum/controller/subsystem/job/proc/equip_loadout(mob/dead/new_player/N, mob/living/M) var/mob/the_mob = N if(!the_mob) the_mob = M // cause this doesn't get assigned if player is a latejoiner @@ -11,21 +11,18 @@ if(!G) continue var/permitted = TRUE - if(G.restricted_roles && G.restricted_roles.len && !(M.mind.assigned_role in G.restricted_roles)) - permitted = FALSE if(G.ckeywhitelist && G.ckeywhitelist.len && !(the_mob.client.ckey in G.ckeywhitelist)) permitted = FALSE - if(!equipbackpackstuff && G.category == slot_in_backpack)//snowflake check since plopping stuff in the backpack doesnt work for pre-job equip loadout stuffs - permitted = FALSE - if(equipbackpackstuff && G.category != slot_in_backpack)//ditto + if(G.restricted_roles && G.restricted_roles.len && !(M.job in G.restricted_roles)) permitted = FALSE if(!permitted) continue var/obj/item/I = new G.path - if(!M.equip_to_slot_if_possible(I, G.category, disable_warning = TRUE, bypass_equip_delay_self = TRUE)) // If the job's dresscode compliant, try to put it in its slot, first - if(!M.equip_to_slot_if_possible(I, slot_in_backpack, disable_warning = TRUE, bypass_equip_delay_self = TRUE)) // Otherwise, try to put it in the backpack + if(!M.equip_to_slot_if_possible(I, G.category, disable_warning = TRUE, bypass_equip_delay_self = TRUE)) // Try to put it in its slot, first + if(!M.equip_to_slot_if_possible(I, slot_in_backpack, disable_warning = TRUE, bypass_equip_delay_self = TRUE)) // If it fails, try to put it in the backpack I.forceMove(get_turf(M)) // If everything fails, just put it on the floor under the mob. + /datum/controller/subsystem/job/proc/FreeRole(rank) if(!rank) return diff --git a/modular_citadel/code/modules/client/preferences.dm b/modular_citadel/code/modules/client/preferences.dm index 56011f0333..b515264320 100644 --- a/modular_citadel/code/modules/client/preferences.dm +++ b/modular_citadel/code/modules/client/preferences.dm @@ -3,18 +3,25 @@ #define BACKPACK_SLOT_AMT 4 /datum/preferences + //gear var/gear_points = 10 var/list/gear_categories var/list/chosen_gear var/gear_tab + + //pref vars var/screenshake = 100 var/damagescreenshake = 2 var/arousable = TRUE var/widescreenpref = TRUE var/autostand = TRUE + + //vore prefs var/toggleeatingnoise = TRUE var/toggledigestionnoise = TRUE var/hound_sleeper = TRUE + + // stuff that was in base max_save_slots = 10 var/cit_toggles = TOGGLES_CITADEL features = list("mcolor" = "FFF", @@ -90,10 +97,370 @@ ..() LAZYINITLIST(chosen_gear) -/datum/preferences/proc/add_citadel_choices(.) - - return . +/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 + . = "
" + . += "Character Settings" + . += "Character Appearance" + . += "Loadout" + . += "Game Preferences" + + if(!path) + . += "
Please create an account to save your preferences
" + + . += "
" + + . += "
" + + //Character Appearance + if(current_tab == 2) + update_preview_icon(nude=TRUE) + user << browse_rsc(preview_icon, "previewicon.png") + . += "" + */ + . += "
" + . += "
" + . += "Set Flavor Text
" + if(lentext(features["flavor_text"]) <= 40) + if(!lentext(features["flavor_text"])) + . += "\[...\]" + else + . += "[features["flavor_text"]]" + else + . += "[TextPreview(features["flavor_text"])]...
" + . += "

Body

" + . += "Gender: [gender == MALE ? "Male" : "Female"]
" + . += "Species:[pref_species.id]
" + . += "Random Body
" + . += "Always Random Body: [be_random_body ? "Yes" : "No"]
" + if((MUTCOLORS in pref_species.species_traits) || (MUTCOLORS_PARTSONLY in pref_species.species_traits)) + . += "Primary Color:     Change
" + . += "Secondary Color:     Change
" + . += "Tertiary Color:     Change
" + if(pref_species.use_skintones) + . += "Skin Tone: [skin_tone]
" + . += "Genitals Use Skintone:[features["genitals_use_skintone"] == TRUE ? "Enabled" : "Disabled"]
" + + if(HAIR in pref_species.species_traits) + . += "Hair Style: [hair_style]
" + . += "Hair Color:     Change
" + . += "Facial Hair Style: [facial_hair_style]
" + . += "Facial Hair Color:     Change
" + if(EYECOLOR in pref_species.species_traits) + . += "Eye Color:     Change
" + if("tail_lizard" in pref_species.mutant_bodyparts) + . += "Tail: [features["tail_lizard"]]
" + else if("mam_tail" in pref_species.mutant_bodyparts) + . += "Tail: [features["mam_tail"]]
" + else if("tail_human" in pref_species.mutant_bodyparts) + . += "Tail: [features["tail_human"]]
" + if("snout" in pref_species.mutant_bodyparts) + . += "Snout: [features["snout"]]
" + if("horns" in pref_species.mutant_bodyparts) + . += "Horns: [features["horns"]]
" + if("frills" in pref_species.mutant_bodyparts) + . += "Frills: [features["frills"]]
" + if("spines" in pref_species.mutant_bodyparts) + . += "Spines: [features["spines"]]
" + if("body_markings" in pref_species.mutant_bodyparts) + . += "Body Markings: [features["body_markings"]]
" + else if("mam_body_markings" in pref_species.mutant_bodyparts) + . += "Body Markings: [features["mam_body_markings"]]
" + if("mam_ears" in pref_species.mutant_bodyparts) + . += "Ears: [features["mam_ears"]]
" + else if("ears" in pref_species.mutant_bodyparts) + . += "Ears: [features["ears"]]
" + if("legs" in pref_species.mutant_bodyparts) + . += "Legs: [features["legs"]]
" + if("moth_wings" in pref_species.mutant_bodyparts) + . += "Moth wings[features["moth_wings"]]
" + if("taur" in pref_species.mutant_bodyparts) + . += "Taur: [features["taur"]]
" + if("wings" in pref_species.mutant_bodyparts && GLOB.r_wings_list.len >1) + . += "Wings: [features["wings"]]
" + if("xenohead" in pref_species.mutant_bodyparts) + . += "Caste: [features["xenohead"]]
" + if("xenotail" in pref_species.mutant_bodyparts) + . += "Tail: [features["xenotail"]]
" + if("xenodorsal" in pref_species.mutant_bodyparts) + . += "Dorsal Tubes: [features["xenodorsal"]]
" + if("ipc_screen" in pref_species.mutant_bodyparts) + . += "Screen:[features["ipc_screen"]]
" + + . += "
" + + . += "

Clothing & Equipment

" + + . += "Underwear:[underwear]
" + . += "Undershirt:[undershirt]
" + . += "Socks:[socks]
" + . += "Backpack:[backbag]
" + . += "Uplink Location:[uplink_spawn_loc]
" + + . += "

Genitals

" + if(NOGENITALS in pref_species.species_traits) + . += "Your species ([pref_species.name]) does not support genitals!
" + else + . += "Has Penis:[features["has_cock"] == TRUE ? "Yes" : "No"]
" + if(features["has_cock"] == TRUE) + if(pref_species.use_skintones && features["genitals_use_skintone"] == TRUE) + . += "Penis Color:   (Skin tone overriding)
" + else + . += "Penis Color:    Change
" + . += "Penis Shape: [features["cock_shape"]]
" + . += "Penis Length: [features["cock_length"]] inch(es)
" + . += "Has Testicles:[features["has_balls"] == TRUE ? "Yes" : "No"]
" + if(features["has_balls"] == TRUE) + if(pref_species.use_skintones && features["genitals_use_skintone"] == TRUE) + . += "Testicles Color:   (Skin tone overriding)
" + else + . += "Testicles Color:    Change
" + . += "Has Vagina:[features["has_vag"] == TRUE ? "Yes" : "No"]
" + if(features["has_vag"]) + . += "Vagina Type: [features["vag_shape"]]
" + if(pref_species.use_skintones && features["genitals_use_skintone"] == TRUE) + . += "Vagina Color:   (Skin tone overriding)
" + else + . += "Vagina Color:    Change
" + . += "Has Womb:[features["has_womb"] == TRUE ? "Yes" : "No"]
" + . += "Has Breasts:[features["has_breasts"] == TRUE ? "Yes" : "No"]
" + if(features["has_breasts"]) + if(pref_species.use_skintones && features["genitals_use_skintone"] == TRUE) + . += "Color:   (Skin tone overriding)
" + else + . += "Color:    Change
" + . += "Cup Size:[features["breasts_size"]]
" + . += "Breast Shape:[features["breasts_shape"]]
" + /* + . += "

Ovipositor

" + . += "Has Ovipositor:[features["has_ovi"] == TRUE ? "Yes" : "No"]" + if(features["has_ovi"]) + . += "Ovi Color:    Change" + . += "

Eggsack

" + . += "Has Eggsack:[features["has_eggsack"] == TRUE ? "Yes" : "No"]
" + if(features["has_eggsack"] == TRUE) + . += "Color:    Change" + . += "Egg Color:    Change" + . += "Egg Size:[features["eggsack_egg_size"]]\" Diameter" + . += "
" + + 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") @@ -358,150 +725,6 @@ features["vag_color"] = sanitize_hexcolor(new_vagcolor) else user << "Invalid color. Your color is not bright enough." - - else - 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 - - 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 - // VORE SOUND TOGGLES - if("toggleeatingnoise") - toggles ^= EATING_NOISES - - if("toggledigestionnoise") - toggles ^= DIGESTION_NOISES if(href_list["preference"] == "gear") if(href_list["clear_loadout"]) @@ -513,7 +736,7 @@ 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"])] + var/datum/gear/G = GLOB.loadout_items[gear_tab][href_list["toggle_gear_path"]] if(!G) return var/toggle = text2num(href_list["toggle_gear"]) @@ -521,231 +744,16 @@ 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(!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/citadel_dat_replace(current_tab) - var/mob/user - - - //This proc is for menus other than game pref and char pref - . = "
" - - . += "Character Settings" - . += "Character Appearance" - . += "Loadout" - . += "Game Preferences" - - if(!path) - . += "
Please create an account to save your preferences
" - - . += "
" - - . += "
" - if(current_tab == 1) - . += "
" - . += "

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")]
" - . += "
" - - - //Character Appearance - if(current_tab == 2) - . += "" - */ - . += "
" - . += "

" - . += "Set Flavor Text
" - if(lentext(features["flavor_text"]) <= 40) - if(!lentext(features["flavor_text"])) - . += "\[...\]" - else - . += "[features["flavor_text"]]" - else - . += "[TextPreview(features["flavor_text"])]...
" - . += "

Body

" - . += "Gender: [gender == MALE ? "Male" : "Female"]
" - . += "Species:[pref_species.id]
" - . += "Random Body
" - . += "Always Random Body: [be_random_body ? "Yes" : "No"]
" - if((MUTCOLORS in pref_species.species_traits) || (MUTCOLORS_PARTSONLY in pref_species.species_traits)) - . += "Primary Color:     Change
" - . += "Secondary Color:     Change
" - . += "Tertiary Color:     Change
" - if(pref_species.use_skintones) - . += "Skin Tone: [skin_tone]
" - . += "Genitals Use Skintone:[features["genitals_use_skintone"] == TRUE ? "Enabled" : "Disabled"]
" - - if(HAIR in pref_species.species_traits) - . += "Hair Style: [hair_style]
" - . += "Hair Color:     Change
" - . += "Facial Hair Style: [facial_hair_style]
" - . += "Facial Hair Color:     Change
" - if(EYECOLOR in pref_species.species_traits) - . += "Eye Color:     Change
" - if("tail_lizard" in pref_species.mutant_bodyparts) - . += "Tail: [features["tail_lizard"]]
" - else if("mam_tail" in pref_species.mutant_bodyparts) - . += "Tail: [features["mam_tail"]]
" - else if("tail_human" in pref_species.mutant_bodyparts) - . += "Tail: [features["tail_human"]]
" - if("snout" in pref_species.mutant_bodyparts) - . += "Snout: [features["snout"]]
" - if("horns" in pref_species.mutant_bodyparts) - . += "Horns: [features["horns"]]
" - if("frills" in pref_species.mutant_bodyparts) - . += "Frills: [features["frills"]]
" - if("spines" in pref_species.mutant_bodyparts) - . += "Spines: [features["spines"]]
" - if("body_markings" in pref_species.mutant_bodyparts) - . += "Body Markings: [features["body_markings"]]
" - else if("mam_body_markings" in pref_species.mutant_bodyparts) - . += "Body Markings: [features["mam_body_markings"]]
" - if("mam_ears" in pref_species.mutant_bodyparts) - . += "Ears: [features["mam_ears"]]
" - else if("ears" in pref_species.mutant_bodyparts) - . += "Ears: [features["ears"]]
" - if("legs" in pref_species.mutant_bodyparts) - . += "Legs: [features["legs"]]
" - if("moth_wings" in pref_species.mutant_bodyparts) - . += "Moth wings[features["moth_wings"]]
" - if("taur" in pref_species.mutant_bodyparts) - . += "Taur: [features["taur"]]
" - if("wings" in pref_species.mutant_bodyparts && GLOB.r_wings_list.len >1) - . += "Wings: [features["wings"]]
" - if("xenohead" in pref_species.mutant_bodyparts) - . += "Caste: [features["xenohead"]]
" - if("xenotail" in pref_species.mutant_bodyparts) - . += "Tail: [features["xenotail"]]
" - if("xenodorsal" in pref_species.mutant_bodyparts) - . += "Dorsal Tubes: [features["xenodorsal"]]
" - if("ipc_screen" in pref_species.mutant_bodyparts) - . += "Screen:[features["ipc_screen"]]
" - - . += "
" - - . += "

Clothing & Equipment

" - - . += "Underwear:[underwear]
" - . += "Undershirt:[undershirt]
" - . += "Socks:[socks]
" - . += "Backpack:[backbag]
" - . += "Uplink Location:[uplink_spawn_loc]
" - - . += "

Genitals

" - if(NOGENITALS in pref_species.species_traits) - . += "Your species ([pref_species.name]) does not support genitals!
" - else - . += "Has Penis:[features["has_cock"] == TRUE ? "Yes" : "No"]
" - if(features["has_cock"] == TRUE) - if(pref_species.use_skintones && features["genitals_use_skintone"] == TRUE) - . += "Penis Color:   (Skin tone overriding)
" - else - . += "Penis Color:    Change
" - // . += "
" - . += "Penis Shape: [features["cock_shape"]]
" - . += "Penis Length: [features["cock_length"]] inch(es)
" - . += "Has Testicles:[features["has_balls"] == TRUE ? "Yes" : "No"]
" - if(features["has_balls"] == TRUE) - if(pref_species.use_skintones && features["genitals_use_skintone"] == TRUE) - . += "Testicles Color:   (Skin tone overriding)
" - else - . += "Testicles Color:    Change
" - . += "Has Vagina:[features["has_vag"] == TRUE ? "Yes" : "No"]
" - if(features["has_vag"]) - . += "Vagina Type: [features["vag_shape"]]
" - if(pref_species.use_skintones && features["genitals_use_skintone"] == TRUE) - . += "Vagina Color:   (Skin tone overriding)
" - else - . += "Vagina Color:    Change
" - . += "Has Womb:[features["has_womb"] == TRUE ? "Yes" : "No"]
" - . += "Has Breasts:[features["has_breasts"] == TRUE ? "Yes" : "No"]
" - if(features["has_breasts"]) - if(pref_species.use_skintones && features["genitals_use_skintone"] == TRUE) - . += "Color:   (Skin tone overriding)
" - else - . += "Color:    Change
" - . += "Cup Size:[features["breasts_size"]]
" - . += "Breast Shape:[features["breasts_shape"]]
" - /* - . += "

Ovipositor

" - . += "Has Ovipositor:[features["has_ovi"] == TRUE ? "Yes" : "No"]" - if(features["has_ovi"]) - . += "Ovi Color:    Change" - . += "

Eggsack

" - . += "Has Eggsack:[features["has_eggsack"] == TRUE ? "Yes" : "No"]
" - if(features["has_eggsack"] == TRUE) - . += "Color:    Change" - . += "Egg Color:    Change" - . += "Egg Size:[features["eggsack_egg_size"]]\" Diameter" - . += "
" - - 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.ckey && !(gear.ckeywhitelist.Find(user.client.ckey))) - 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'" - . += "" - . += "" - . += "
[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/is_loadout_slot_available(slot) var/list/L @@ -768,7 +776,7 @@ datum/preferences/copy_to(mob/living/carbon/human/character, icon_updates = 1) ..() character.give_genitals(TRUE) - character.flavor_text = features["flavor_text"] //Let's up.e their flavor_text at least initially + character.flavor_text = features["flavor_text"] //Let's update their flavor_text at least initially character.canbearoused = arousable if(icon_updates) character.update_genitals() \ No newline at end of file diff --git a/modular_citadel/code/modules/client/preferences_savefile.dm b/modular_citadel/code/modules/client/preferences_savefile.dm index 8f8c7a94e9..f37736b438 100644 --- a/modular_citadel/code/modules/client/preferences_savefile.dm +++ b/modular_citadel/code/modules/client/preferences_savefile.dm @@ -27,7 +27,7 @@ if(path) LAZYADD(chosen_gear, path) gear_points -= initial(path.cost) - + /datum/preferences/proc/cit_character_pref_save(savefile/S) //ipcs WRITE_FILE(S["feature_ipc_screen"], features["ipc_screen"])