@@ -410,7 +410,7 @@ GLOBAL_LIST_EMPTY(external_rsc_urls)
|
||||
for (var/child in entries)
|
||||
winset(src, "[child]", "[entries[child]]")
|
||||
if (!ispath(child, /datum/verbs/menu))
|
||||
var/atom/verb/verbpath = child
|
||||
var/procpath/verbpath = child
|
||||
if (copytext(verbpath.name,1,2) != "@")
|
||||
new child(src)
|
||||
|
||||
|
||||
@@ -58,6 +58,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
var/inquisitive_ghost = 1
|
||||
var/allow_midround_antag = 1
|
||||
var/preferred_map = null
|
||||
var/preferred_chaos = null
|
||||
var/pda_style = MONO
|
||||
var/pda_color = "#808000"
|
||||
var/pda_skin = PDA_SKIN_ALT
|
||||
@@ -86,6 +87,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
var/skin_tone = "caucasian1" //Skin color
|
||||
var/eye_color = "000" //Eye color
|
||||
var/horn_color = "85615a" //Horn color
|
||||
var/wing_color = "fff" //Wing color
|
||||
var/datum/species/pref_species = new /datum/species/human() //Mutant race
|
||||
var/list/features = list("mcolor" = "FFF",
|
||||
"tail_lizard" = "Smooth",
|
||||
@@ -112,7 +114,6 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
"xenohead" = "Standard",
|
||||
"xenotail" = "Xenomorph Tail",
|
||||
"taur" = "None",
|
||||
"exhibitionist" = FALSE,
|
||||
"genitals_use_skintone" = FALSE,
|
||||
"has_cock" = FALSE,
|
||||
"cock_shape" = "Human",
|
||||
@@ -336,8 +337,8 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
dat += "<table><tr><td width='340px' height='300px' valign='top'>"
|
||||
dat += "<h2>Flavor Text</h2>"
|
||||
dat += "<a href='?_src_=prefs;preference=flavor_text;task=input'><b>Set Examine Text</b></a><br>"
|
||||
if(lentext(features["flavor_text"]) <= 40)
|
||||
if(!lentext(features["flavor_text"]))
|
||||
if(length(features["flavor_text"]) <= 40)
|
||||
if(!length(features["flavor_text"]))
|
||||
dat += "\[...\]"
|
||||
else
|
||||
dat += "[features["flavor_text"]]"
|
||||
@@ -591,6 +592,8 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
dat += "<h3>Decorative wings</h3>"
|
||||
|
||||
dat += "<a style='display:block;width:100px' href='?_src_=prefs;preference=deco_wings;task=input'>[features["deco_wings"]]</a>"
|
||||
dat += "<span style='border:1px solid #161616; background-color: #[wing_color];'> </span> <a href='?_src_=prefs;preference=wings_color;task=input'>Change</a><BR>"
|
||||
|
||||
if("insect_wings" in pref_species.default_features)
|
||||
if(!mutant_category)
|
||||
dat += APPEARANCE_CATEGORY_COLUMN
|
||||
@@ -598,6 +601,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
dat += "<h3>Insect wings</h3>"
|
||||
|
||||
dat += "<a style='display:block;width:100px' href='?_src_=prefs;preference=insect_wings;task=input'>[features["insect_wings"]]</a>"
|
||||
dat += "<span style='border:1px solid #161616; background-color: #[wing_color];'> </span> <a href='?_src_=prefs;preference=wings_color;task=input'>Change</a><BR>"
|
||||
mutant_category++
|
||||
if(mutant_category >= MAX_MUTANT_ROWS)
|
||||
dat += "</td>"
|
||||
@@ -822,7 +826,6 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
dat +="<td width='300px' 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>Voracious MediHound sleepers:</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>"
|
||||
@@ -832,6 +835,12 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
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>"
|
||||
var/p_chaos
|
||||
if (!preferred_chaos)
|
||||
p_chaos = "No preference"
|
||||
else
|
||||
p_chaos = preferred_chaos
|
||||
dat += "<b>Preferred Chaos Amount:</b> <a href='?_src_=prefs;preference=preferred_chaos;task=input'>[p_chaos]</a><br>"
|
||||
dat += "<br>"
|
||||
dat += "</td>"
|
||||
dat += "</tr></table>"
|
||||
@@ -1689,7 +1698,10 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
if("horns_color")
|
||||
var/new_horn_color = input(user, "Choose your character's horn colour:", "Character Preference","#"+horn_color) as color|null
|
||||
if(new_horn_color)
|
||||
horn_color = sanitize_hexcolor(new_horn_color)
|
||||
if (new_horn_color == "#000000")
|
||||
horn_color = "#85615A"
|
||||
else
|
||||
horn_color = sanitize_hexcolor(new_horn_color)
|
||||
|
||||
if("wings")
|
||||
var/new_wings
|
||||
@@ -1697,6 +1709,14 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
if(new_wings)
|
||||
features["wings"] = new_wings
|
||||
|
||||
if("wings_color")
|
||||
var/new_wing_color = input(user, "Choose your character's wing colour:", "Character Preference","#"+wing_color) as color|null
|
||||
if(new_wing_color)
|
||||
if (new_wing_color == "#000000")
|
||||
wing_color = "#FFFFFF"
|
||||
else
|
||||
wing_color = sanitize_hexcolor(new_wing_color)
|
||||
|
||||
if("frills")
|
||||
var/new_frills
|
||||
new_frills = input(user, "Choose your character's frills:", "Character Preference") as null|anything in GLOB.frills_list
|
||||
@@ -1730,13 +1750,13 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
new_insect_wings = input(user, "Choose your character's wings:", "Character Preference") as null|anything in GLOB.insect_wings_list
|
||||
if(new_insect_wings)
|
||||
features["insect_wings"] = new_insect_wings
|
||||
|
||||
|
||||
if("deco_wings")
|
||||
var/new_deco_wings
|
||||
new_deco_wings = input(user, "Choose your character's wings:", "Character Preference") as null|anything in GLOB.deco_wings_list
|
||||
if(new_deco_wings)
|
||||
features["deco_wings"] = new_deco_wings
|
||||
|
||||
|
||||
if("insect_fluffs")
|
||||
var/new_insect_fluff
|
||||
new_insect_fluff = input(user, "Choose your character's wings:", "Character Preference") as null|anything in GLOB.insect_fluffs_list
|
||||
@@ -1983,6 +2003,9 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
if (pickedmap)
|
||||
preferred_map = maplist[pickedmap]
|
||||
|
||||
if ("preferred_chaos")
|
||||
var/pickedchaos = input(user, "Choose your preferred level of chaos. This will help with dynamic threat level ratings.", "Character Preference") as null|anything in list(CHAOS_NONE,CHAOS_LOW,CHAOS_MED,CHAOS_HIGH,CHAOS_MAX)
|
||||
preferred_chaos = pickedchaos
|
||||
if ("clientfps")
|
||||
var/desiredfps = input(user, "Choose your desired fps. (0 = synced with server tick rate (currently:[world.fps]))", "Character Preference", clientfps) as null|num
|
||||
if (!isnull(desiredfps))
|
||||
@@ -2042,8 +2065,6 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
features["has_womb"] = FALSE
|
||||
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))
|
||||
@@ -2262,6 +2283,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
character.hair_color = hair_color
|
||||
character.facial_hair_color = facial_hair_color
|
||||
character.horn_color = horn_color
|
||||
character.wing_color = wing_color
|
||||
|
||||
character.skin_tone = skin_tone
|
||||
character.hair_style = hair_style
|
||||
@@ -2312,9 +2334,10 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
character.Digitigrade_Leg_Swap(TRUE)
|
||||
|
||||
//let's be sure the character updates
|
||||
character.update_body()
|
||||
character.update_hair()
|
||||
character.update_body_parts()
|
||||
if(icon_updates)
|
||||
character.update_body()
|
||||
character.update_hair()
|
||||
character.update_body_parts()
|
||||
|
||||
/datum/preferences/proc/get_default_name(name_id)
|
||||
switch(name_id)
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
// You do not need to raise this if you are adding new values that have sane defaults.
|
||||
// Only raise this value when changing the meaning/format/name/layout of an existing value
|
||||
// where you would want the updater procs below to run
|
||||
#define SAVEFILE_VERSION_MAX 23
|
||||
#define SAVEFILE_VERSION_MAX 24
|
||||
|
||||
/*
|
||||
SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Carn
|
||||
@@ -109,6 +109,12 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
else if(current_version < 23) // we are fixing a gamebreaking bug.
|
||||
job_preferences = list() //It loaded null from nonexistant savefile field.
|
||||
|
||||
if(current_version < 24 && S["feature_exhibitionist"])
|
||||
var/datum/quirk/exhibitionism/E
|
||||
var/quirk_name = initial(E.name)
|
||||
neutral_quirks += quirk_name
|
||||
all_quirks += quirk_name
|
||||
|
||||
/datum/preferences/proc/load_path(ckey,filename="preferences.sav")
|
||||
if(!ckey)
|
||||
return
|
||||
@@ -177,6 +183,8 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
S["autostand"] >> autostand
|
||||
S["cit_toggles"] >> cit_toggles
|
||||
S["lewdchem"] >> lewdchem
|
||||
S["preferred_chaos"] >> preferred_chaos
|
||||
|
||||
|
||||
//try to fix any outdated data if necessary
|
||||
if(needs_update >= 0)
|
||||
@@ -272,6 +280,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
WRITE_FILE(S["autostand"], autostand)
|
||||
WRITE_FILE(S["cit_toggles"], cit_toggles)
|
||||
WRITE_FILE(S["lewdchem"], lewdchem)
|
||||
WRITE_FILE(S["preferred_chaos"], preferred_chaos)
|
||||
|
||||
return 1
|
||||
|
||||
@@ -317,6 +326,12 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
if(!S["features["mcolor"]"] || S["features["mcolor"]"] == "#000")
|
||||
WRITE_FILE(S["features["mcolor"]"] , "#FFF")
|
||||
|
||||
if(!S["features["horn_color"]"] || S["features["horn_color"]"] == "#000")
|
||||
WRITE_FILE(S["features["horn_color"]"] , "#85615a")
|
||||
|
||||
if(!S["features["wing_color"]"] || S["features["wing_color"]"] == "#000")
|
||||
WRITE_FILE(S["features["wing_color"]"] , "#FFF")
|
||||
|
||||
//Character
|
||||
S["real_name"] >> real_name
|
||||
S["nameless"] >> nameless
|
||||
@@ -338,6 +353,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
S["socks"] >> socks
|
||||
S["socks_color"] >> socks_color
|
||||
S["horn_color"] >> horn_color
|
||||
S["wing_color"] >> wing_color
|
||||
S["backbag"] >> backbag
|
||||
S["jumpsuit_style"] >> jumpsuit_style
|
||||
S["uplink_loc"] >> uplink_spawn_loc
|
||||
@@ -449,6 +465,12 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
if(!features["mcolor"] || features["mcolor"] == "#000")
|
||||
features["mcolor"] = pick("FFFFFF","7F7F7F", "7FFF7F", "7F7FFF", "FF7F7F", "7FFFFF", "FF7FFF", "FFFF7F")
|
||||
|
||||
if(!features["horn_color"] || features["horn_color"] == "#000")
|
||||
features["horn_color"] = "85615a"
|
||||
|
||||
if(!features["wing_color"] || features["wing_color"] == "#000")
|
||||
features["wing_color"] = "FFFFFF"
|
||||
|
||||
nameless = sanitize_integer(nameless, 0, 1, initial(nameless))
|
||||
be_random_name = sanitize_integer(be_random_name, 0, 1, initial(be_random_name))
|
||||
be_random_body = sanitize_integer(be_random_body, 0, 1, initial(be_random_body))
|
||||
@@ -471,6 +493,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
eye_color = sanitize_hexcolor(eye_color, 3, 0)
|
||||
skin_tone = sanitize_inlist(skin_tone, GLOB.skin_tones)
|
||||
horn_color = sanitize_hexcolor(horn_color, 3, FALSE)
|
||||
wing_color = sanitize_hexcolor(wing_color, 3, FALSE, "#FFFFFF")
|
||||
backbag = sanitize_inlist(backbag, GLOB.backbaglist, initial(backbag))
|
||||
jumpsuit_style = sanitize_inlist(jumpsuit_style, GLOB.jumpsuitlist, initial(jumpsuit_style))
|
||||
uplink_spawn_loc = sanitize_inlist(uplink_spawn_loc, GLOB.uplink_spawn_loc_list, initial(uplink_spawn_loc))
|
||||
@@ -485,7 +508,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
features["body_markings"] = sanitize_inlist(features["body_markings"], GLOB.body_markings_list)
|
||||
features["feature_lizard_legs"] = sanitize_inlist(features["legs"], GLOB.legs_list)
|
||||
features["insect_wings"] = sanitize_inlist(features["insect_wings"], GLOB.insect_wings_list)
|
||||
features["deco_wings"] = sanitize_inlist(features["deco_wings"], GLOB.deco_wings_list)
|
||||
features["deco_wings"] = sanitize_inlist(features["deco_wings"], GLOB.deco_wings_list, "None")
|
||||
features["insect_fluff"] = sanitize_inlist(features["insect_fluff"], GLOB.insect_fluffs_list)
|
||||
|
||||
joblessrole = sanitize_integer(joblessrole, 1, 3, initial(joblessrole))
|
||||
@@ -540,6 +563,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
WRITE_FILE(S["socks"] , socks)
|
||||
WRITE_FILE(S["socks_color"] , socks_color)
|
||||
WRITE_FILE(S["horn_color"] , horn_color)
|
||||
WRITE_FILE(S["wing_color"] , wing_color)
|
||||
WRITE_FILE(S["backbag"] , backbag)
|
||||
WRITE_FILE(S["jumpsuit_style"] , jumpsuit_style)
|
||||
WRITE_FILE(S["uplink_loc"] , uplink_spawn_loc)
|
||||
|
||||
Reference in New Issue
Block a user