working as intended now and improved

This commit is contained in:
Poojawa
2018-03-19 07:00:05 -05:00
parent b27c5cd3b0
commit d593e46c6b
3 changed files with 367 additions and 332 deletions
+154 -8
View File
@@ -513,9 +513,71 @@ GLOBAL_LIST_EMPTY(preferences_datums)
dat += "<b>Be [capitalize(i)]:</b> <font color=red> \[IN [days_remaining] DAYS]</font><br>"
else
dat += "<b>Be [capitalize(i)]:</b> <a href='?_src_=prefs;preference=be_special;be_special_type=[i]'>[(i in be_special) ? "Yes" : "No"]</a><br>"
dat += citadel_pref_replace(current_tab)
dat += "<table><tr><td width='340px' height='300px' valign='top'>"
dat += "<h2>Citadel Preferences</h2>" //Because fuck me if preferences can't be fucking modularized and expected to update in a reasonable timeframe.
dat += "<b>Arousal:</b><a href='?_src_=prefs;preference=arousable'>[arousable == TRUE ? "Enabled" : "Disabled"]</a><BR>"
dat += "<b>Exhibitionist:</b><a href='?_src_=prefs;preference=exhibitionist'>[features["exhibitionist"] == TRUE ? "Yes" : "No"]</a><BR>"
dat += "<b>Allow MediHound sleeper:</b> <a href='?_src_=prefs;preference=hound_sleeper'>[(cit_toggles & MEDIHOUND_SLEEPER) ? "Yes" : "No"]</a><br>"
dat += "<b>Hear Vore Sounds:</b> <a href='?_src_=prefs;preference=toggleeatingnoise'>[(cit_toggles & EATING_NOISES) ? "Yes" : "No"]</a><br>"
dat += "<b>Hear Vore Digestion Sounds:</b> <a href='?_src_=prefs;preference=toggledigestionnoise'>[(cit_toggles & DIGESTION_NOISES) ? "Yes" : "No"]</a><br>"
dat += "<b>Widescreen:</b> <a href='?_src_=prefs;preference=widescreenpref'>[widescreenpref ? "Enabled ([CONFIG_GET(string/default_view)])" : "Disabled (15x15)"]</a><br>"
dat += "<b>Auto stand:</b> <a href='?_src_=prefs;preference=autostand'>[autostand ? "Enabled" : "Disabled"]</a><br>"
dat += "<b>Screen Shake:</b> <a href='?_src_=prefs;preference=screenshake'>[(screenshake==100) ? "Full" : ((screenshake==0) ? "None" : "[screenshake]")]</a><br>"
if (user && user.client && !user.client.prefs.screenshake==0)
dat += "<b>Damage Screen Shake:</b> <a href='?_src_=prefs;preference=damagescreenshake'>[(damagescreenshake==1) ? "On" : ((damagescreenshake==0) ? "Off" : "Only when down")]</a><br>"
dat += "</td></tr></table>"
if(3)
if(!gear_tab)
gear_tab = GLOB.loadout_items[1]
dat += "<table align='center' width='100%'>"
dat += "<tr><td colspan=4><center><b><font color='[gear_points == 0 ? "#E62100" : "#CCDDFF"]'>[gear_points]</font> loadout points remaining.</b> \[<a href='?_src_=prefs;preference=gear;clear_loadout=1'>Clear Loadout</a>\]</center></td></tr>"
dat += "<tr><td colspan=4><center>You can only choose one item per category, unless it's an item that spawns in your backpack or hands.</center></td></tr>"
dat += "<tr><td colspan=4><center><b>"
var/firstcat = TRUE
for(var/i in GLOB.loadout_items)
if(firstcat)
firstcat = FALSE
else
dat += " |"
if(i == gear_tab)
dat += " <span class='linkOn'>[i]</span> "
else
dat += " <a href='?_src_=prefs;preference=gear;select_category=[i]'>[i]</a> "
dat += "</b></center></td></tr>"
dat += "<tr><td colspan=4><hr></td></tr>"
dat += "<tr><td colspan=4><b><center>[gear_tab]</center></b></td></tr>"
dat += "<tr><td colspan=4><hr></td></tr>"
dat += "<tr style='vertical-align:top;'><td width=15%><b>Name</b></td>"
dat += "<td width=5% style='vertical-align:top'><b>Cost</b></td>"
dat += "<td><font size=2><b>Restrictions</b></font></td>"
dat += "<td><font size=2><b>Description</b></font></td></tr>"
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 += "<tr style='vertical-align:top;'><td width=15%><a [class_link]>[j]</a></td>"
dat += "<td width = 5% style='vertical-align:top'>[gear.cost]</td><td>"
if(islist(gear.restricted_roles))
if(gear.restricted_roles.len)
dat += "<font size=2>"
dat += gear.restricted_roles.Join(";")
dat += "</font>"
dat += "</td><td><font size=2><i>[gear.description]</i></font></td></tr>"
dat += "</table>"
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, "<span class='danger'>You cannot take this loadout, as you've already chosen too many of the same category!</span>")
return
if(G.ckeywhitelist && G.ckeywhitelist.len && !(user.ckey in G.ckeywhitelist))
to_chat(user, "<span class='danger'>This is an item intended for donator use only. You are not authorized to use this item.</span>")
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
+5 -8
View File
@@ -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)
+208 -316
View File
@@ -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
. += "<table><tr><td width='340px' height='300px' valign='top'>"
. += "<h2>Citadel Preferences</h2>"
. += "<b>Arousal:</b><a href='?_src_=prefs;preference=arousable'>[arousable == TRUE ? "Enabled" : "Disabled"]</a><BR>"
. += "<b>Exhibitionist:</b><a href='?_src_=prefs;preference=exhibitionist'>[features["exhibitionist"] == TRUE ? "Yes" : "No"]</a><BR>"
. += "<b>Allow MediHound sleeper:</b> <a href='?_src_=prefs;preference=hound_sleeper'>[(cit_toggles & MEDIHOUND_SLEEPER) ? "Yes" : "No"]</a><br>"
. += "<b>Hear Vore Sounds:</b> <a href='?_src_=prefs;preference=toggleeatingnoise'>[(cit_toggles & EATING_NOISES) ? "Yes" : "No"]</a><br>"
. += "<b>Hear Vore Digestion Sounds:</b> <a href='?_src_=prefs;preference=toggledigestionnoise'>[(cit_toggles & DIGESTION_NOISES) ? "Yes" : "No"]</a><br>"
. += "<b>Widescreen:</b> <a href='?_src_=prefs;preference=widescreenpref'>[widescreenpref ? "Enabled ([CONFIG_GET(string/default_view)])" : "Disabled (15x15)"]</a><br>"
. += "<b>Auto stand:</b> <a href='?_src_=prefs;preference=autostand'>[autostand ? "Enabled" : "Disabled"]</a><br>"
. += "<b>Screen Shake:</b> <a href='?_src_=prefs;preference=screenshake'>[(screenshake==100) ? "Full" : ((screenshake==0) ? "None" : "[screenshake]")]</a><br>"
if (user && user.client && !user.client.prefs.screenshake==0)
. += "<b>Damage Screen Shake:</b> <a href='?_src_=prefs;preference=damagescreenshake'>[(damagescreenshake==1) ? "On" : ((damagescreenshake==0) ? "Off" : "Only when down")]</a><br>"
. += "</td></tr></table>"
/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 @@
*/
. += "</td></tr></table>"
if(current_tab == 3)
if(!gear_tab)
gear_tab = GLOB.loadout_items[1]
. += "<table align='center' width='100%'>"
. += "<tr><td colspan=4><center><b><font color='[gear_points == 0 ? "#E67300" : "#3366CC"]'>[gear_points]</font> loadout points remaining.</b> \[<a href='?_src_=prefs;preference=gear;clear_loadout=1'>Clear Loadout</a>\]</center></td></tr>"
. += "<tr><td colspan=4><center>You can only choose one item per category, unless it's an item that spawns in your backpack or hands.</center></td></tr>"
. += "<tr><td colspan=4><center><b>"
var/firstcat = TRUE
for(var/i in GLOB.loadout_items)
if(firstcat)
firstcat = FALSE
else
. += " |"
if(i == gear_tab)
. += " <span class='linkOn'>[i]</span> "
else
. += " <a href='?_src_=prefs;preference=gear;select_category=[i]'>[i]</a> "
. += "</b></center></td></tr>"
. += "<tr><td colspan=4><hr></td></tr>"
. += "<tr><td colspan=4><b><center>[gear_tab]</center></b></td></tr>"
. += "<tr><td colspan=4><hr></td></tr>"
. += "<tr style='vertical-align:top;'><td width=15%><b>Name</b></td>"
. += "<td width=5% style='vertical-align:top'><b>Cost</b></td>"
. += "<td><font size=2><b>Restrictions</b></font></td>"
. += "<td><font size=2><b>Description</b></font></td></tr>"
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'"
. += "<tr style='vertical-align:top;'><td width=15%><a style='white-space:normal;' [class_link]>[j]</a></td>"
. += "<td width = 5% style='vertical-align:top'>[gear.cost]</td><td>"
if(islist(gear.restricted_roles))
if(gear.restricted_roles.len)
. += "<font size=2>"
. += gear.restricted_roles.Join(";")
. += "</font>"
. += "</td><td><font size=2><i>[gear.description]</i></font></td></tr>"
. += "</table>"
/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 << "<span class='danger'>Invalid color. Your color is not bright enough.</span>"
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, "<span class='danger'>This is an item intended for donator use only. You are not authorized to use this item.</span>")
return
if(!is_loadout_slot_available(G.category))
to_chat(user, "<span class='danger'>You cannot take this loadout, as you've already chosen too many of the same category!</span>")
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)