Merge branch 'master' into tgui-input-framework

This commit is contained in:
ItsSelis
2022-09-03 23:59:32 +02:00
112 changed files with 1785 additions and 236 deletions
+96 -8
View File
@@ -221,6 +221,13 @@ GLOBAL_LIST_EMPTY(preferences_datums)
"vag_visibility" = GEN_VISIBLE_NO_UNDIES,
"butt_visibility" = GEN_VISIBLE_NO_UNDIES,
"belly_visibility" = GEN_VISIBLE_NO_UNDIES,
"cock_stuffing" = FALSE,
"balls_stuffing" = FALSE,
"vag_stuffing" = FALSE,
"breasts_stuffing" = FALSE,
"butt_stuffing" = FALSE,
"belly_stuffing" = FALSE,
"inert_eggs" = FALSE,
"ipc_screen" = "Sunburst",
"ipc_antenna" = "None",
"flavor_text" = "",
@@ -364,6 +371,19 @@ GLOBAL_LIST_EMPTY(preferences_datums)
var/list/tcg_cards = list()
var/list/tcg_decks = list()
//SPLURT EDIT - gregnancy
/// Does john spaceman's cum actually impregnate people?
var/virility = 0
/// Can john spaceman get gregnant if all conditions are right? (has a womb and is not on contraceptives)
var/fertility = 0
/// Does john spaceman look like a gluttonous slob if he pregent?
var/pregnancy_inflation = FALSE
/// Self explanitory
var/pregnancy_breast_growth = FALSE
var/egg_shell = "chicken"
//SPLURT END
/datum/preferences/New(client/C)
parent = C
@@ -837,6 +857,20 @@ GLOBAL_LIST_EMPTY(preferences_datums)
dat += "<b>Lust tolerance:</b><a style='display:block;width:100px' href ='?_src_=prefs;preference=lust_tolerance;task=input'>[lust_tolerance]</a>"
dat += "<b>Sexual potency:</b><a style='display:block;width:100px' href ='?_src_=prefs;preference=sexual_potency;task=input'>[sexual_potency]</a>"
dat += "</td>"
//SPLURT EDIT BEGIN - gregnancy preferences
dat += "<td width='220px' height='300px' valign='top'>"
dat += "<h3>Pregnancy preferences</h3>"
dat += "<b>Chance of impregnation:</b><a style='display:block;width:100px' href ='?_src_=prefs;preference=virility;task=input'>[virility ? virility : "Disabled"]</a>"
dat += "<b>Chance of getting pregnant:</b><a style='display:block;width:100px' href ='?_src_=prefs;preference=fertility;task=input'>[fertility ? fertility : "Disabled"]</a>"
dat += "<b>Lay inert eggs:</b><a style='display:block;width:100px' href ='?_src_=prefs;preference=inert_eggs'>[features["inert_eggs"] == TRUE ? "Enabled" : "Disabled"]</a>"
if(fertility)
dat += "<b>Pregnancy inflation:</b><a style='display:block;width:100px' href ='?_src_=prefs;preference=pregnancy_inflation;task=input'>[pregnancy_inflation ? "Enabled" : "Disabled"]</a>"
dat += "<b>Pregnancy breast growth:</b><a style='display:block;width:100px' href ='?_src_=prefs;preference=pregnancy_breast_growth;task=input'>[pregnancy_breast_growth ? "Enabled" : "Disabled"]</a>"
if(fertility || features["inert_eggs"])
dat += "<b>Egg shell:</b><a style='display:block;width:100px' href ='?_src_=prefs;preference=egg_shell;task=input'>[egg_shell]</a>"
dat += "</td>"
//SPLURT EDIT END
dat += APPEARANCE_CATEGORY_COLUMN
if(NOGENITALS in pref_species.species_traits)
dat += "<b>Your species ([pref_species.name]) does not support genitals!</b><br>"
@@ -863,6 +897,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
dat += "<b>Penis Length:</b> <a style='display:block;width:120px' href='?_src_=prefs;preference=cock_length;task=input'>[features["cock_length"]] inch(es)</a>"
dat += "<b>Diameter Ratio:</b> <a style='display:block;width:120px' href='?_src_=prefs;preference=cock_diameter_ratio;task=input'>[features["cock_diameter_ratio"]]</a>"
dat += "<b>Penis Visibility:</b><a style='display:block;width:100px' href='?_src_=prefs;preference=cock_visibility;task=input'>[features["cock_visibility"]]</a>"
dat += "<b>Egg Stuffing:</b><a style='display:block;width:50px' href='?_src_=prefs;preference=cock_stuffing'>[features["cock_stuffing"] == TRUE ? "Yes" : "No"]</a>"
dat += "<b>Has Testicles:</b><a style='display:block;width:50px' href='?_src_=prefs;preference=has_balls'>[features["has_balls"] == TRUE ? "Yes" : "No"]</a>"
if(features["has_balls"])
if(pref_species.use_skintones && features["genitals_use_skintone"] == TRUE)
@@ -873,6 +908,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
dat += "<span style='border: 1px solid #161616; background-color: #[features["balls_color"]];'><font color='[color_hex2num(features["balls_color"]) < 200 ? "FFFFFF" : "000000"]'>#[features["balls_color"]]</font></span> <a href='?_src_=prefs;preference=balls_color;task=input'>Change</a><br>"
dat += "<b>Testicles Shape:</b> <a style='display:block;width:120px' href='?_src_=prefs;preference=balls_shape;task=input'>[features["balls_shape"]]</a>"
dat += "<b>Testicles Visibility:</b><a style='display:block;width:100px' href='?_src_=prefs;preference=balls_visibility;task=input'>[features["balls_visibility"]]</a>"
dat += "<b>Egg Stuffing:</b><a style='display:block;width:50px' href='?_src_=prefs;preference=balls_stuffing'>[features["balls_stuffing"] == TRUE ? "Yes" : "No"]</a>"
dat += "<b>Produces:</b>"
var/datum/reagent/balls_fluid = find_reagent_object_from_type(features["balls_fluid"])
if(balls_fluid && (balls_fluid in GLOB.genital_fluids_list))
@@ -892,6 +928,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
dat += "<b>Vagina Color:</b></a><BR>"
dat += "<span style='border: 1px solid #161616; background-color: #[features["vag_color"]];'><font color='[color_hex2num(features["vag_color"]) < 200 ? "FFFFFF" : "000000"]'>#[features["vag_color"]]</font></span> <a href='?_src_=prefs;preference=vag_color;task=input'>Change</a><br>"
dat += "<b>Vagina Visibility:</b><a style='display:block;width:100px' href='?_src_=prefs;preference=vag_visibility;task=input'>[features["vag_visibility"]]</a>"
dat += "<b>Egg Stuffing:</b><a style='display:block;width:50px' href='?_src_=prefs;preference=vag_stuffing'>[features["vag_stuffing"] == TRUE ? "Yes" : "No"]</a>"
dat += "<b>Has Womb:</b><a style='display:block;width:50px' href='?_src_=prefs;preference=has_womb'>[features["has_womb"] == TRUE ? "Yes" : "No"]</a>"
if(features["has_womb"] == TRUE)
dat += "<b>Produces:</b>"
@@ -915,6 +952,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
dat += "<b>Breasts Shape:</b><a style='display:block;width:50px' href='?_src_=prefs;preference=breasts_shape;task=input'>[features["breasts_shape"]]</a>"
dat += "<b>Breasts Visibility:</b><a style='display:block;width:100px' href='?_src_=prefs;preference=breasts_visibility;task=input'>[features["breasts_visibility"]]</a>"
dat += "<b>Lactates:</b><a style='display:block;width:50px' href='?_src_=prefs;preference=breasts_producing'>[features["breasts_producing"] == TRUE ? "Yes" : "No"]</a>"
dat += "<b>Egg Stuffing:</b><a style='display:block;width:50px' href='?_src_=prefs;preference=breasts_stuffing'>[features["breasts_stuffing"] == TRUE ? "Yes" : "No"]</a>"
if(features["breasts_producing"] == TRUE)
dat += "<b>Produces:</b>"
var/datum/reagent/breasts_fluid = find_reagent_object_from_type(features["breasts_fluid"])
@@ -935,6 +973,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
dat += "<span style='border: 1px solid #161616; background-color: #[features["butt_color"]];'><font color='[color_hex2num(features["butt_color"]) < 200 ? "FFFFFF" : "000000"]'>#[features["butt_color"]]</font></span> <a href='?_src_=prefs;preference=butt_color;task=input'>Change</a><br>"
dat += "<b>Butt Size:</b><a style='display:block;width:50px' href='?_src_=prefs;preference=butt_size;task=input'>[features["butt_size"]]</a>"
dat += "<b>Butt Visibility:</b><a style='display:block;width:100px' href='?_src_=prefs;preference=butt_visibility;task=input'>[features["butt_visibility"]]</a>"
dat += "<b>Egg Stuffing:</b><a style='display:block;width:50px' href='?_src_=prefs;preference=butt_stuffing'>[features["butt_stuffing"] == TRUE ? "Yes" : "No"]</a>"
dat += "</td>"
dat += APPEARANCE_CATEGORY_COLUMN
dat += "<h3>Belly</h3>"
@@ -948,6 +987,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
dat += "<span style='border: 1px solid #161616; background-color: #[features["belly_color"]];'><font color='[color_hex2num(features["belly_color"]) < 200 ? "FFFFFF" : "000000"]'>#[features["belly_color"]]</font></span> <a href='?_src_=prefs;preference=belly_color;task=input'>Change</a><br>"
dat += "<b>Belly Size:</b><a style='display:block;width:50px' href='?_src_=prefs;preference=belly_size;task=input'>[features["belly_size"]]</a>"
dat += "<b>Belly Visibility:</b><a style='display:block;width:100px' href='?_src_=prefs;preference=belly_visibility;task=input'>[features["belly_visibility"]]</a>"
dat += "<b>Egg Stuffing:</b><a style='display:block;width:50px' href='?_src_=prefs;preference=belly_stuffing'>[features["belly_stuffing"] == TRUE ? "Yes" : "No"]</a>"
dat += "</td>"
if(pref_species.id == SPECIES_DULLAHAN)
dat += APPEARANCE_CATEGORY_COLUMN
@@ -1052,7 +1092,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
dat += "</td>"
dat +="<td width='300px' height='300px' valign='top'>"
dat += "<td width='300px' height='300px' valign='top'>"
dat += "<h2>Special Role Settings</h2>"
@@ -1060,11 +1100,9 @@ GLOBAL_LIST_EMPTY(preferences_datums)
dat += "<font color=red><b>You are banned from antagonist roles.</b></font>"
src.be_special = list()
dat += "<b>DISABLE ALL ANTAGONISM</b> <a href='?_src_=prefs;preference=disable_antag'>[(toggles & NO_ANTAG) ? "YES" : "NO"]</a><br>"
for (var/i in GLOB.special_roles)
if(i == ROLE_NO_ANTAGONISM)
dat += "<b>DISABLE ALL ANTAGONISM</b> <a href='?_src_=prefs;preference=be_special;be_special_type=[i]'>[(i in be_special) ? "YES" : "NO"]</a><br>"
continue
if(jobban_isbanned(user, i))
dat += "<b>Be [capitalize(i)]:</b> <a href='?_src_=prefs;jobbancheck=[i]'>BANNED</a><br>"
else
@@ -1077,12 +1115,20 @@ GLOBAL_LIST_EMPTY(preferences_datums)
if(days_remaining)
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) ? "Enabled" : "Disabled"]</a><br>"
var/enabled_text = ""
if(i in be_special)
if(be_special[i] >= 1)
enabled_text = "Enabled"
else
enabled_text = "Low"
else
enabled_text = "Disabled"
dat += "<b>Be [capitalize(i)]:</b> <a href='?_src_=prefs;preference=be_special;be_special_type=[i]'>[enabled_text]</a><br>"
dat += "<b>Midround Antagonist:</b> <a href='?_src_=prefs;preference=allow_midround_antag'>[(toggles & MIDROUND_ANTAG) ? "Enabled" : "Disabled"]</a><br>"
dat += "<br>"
dat +="<td width='300px' height='300px' valign='top'>"
dat += "<td width='300px' height='300px' valign='top'>"
if(user.client.holder) // sandstorm start - moves admin prefs to the right
dat += "<h2>Admin Settings</h2>"
@@ -2047,6 +2093,28 @@ GLOBAL_LIST_EMPTY(preferences_datums)
if(user)
user.mind?.hide_ckey = hide_ckey
//SPLURT EDIT BEGIN - gregnancy
if("virility")
var/viri = input(user, "Set the chance of you impregnating something (set to 0 to disable). \n(0 = minimum, 100 = maximum)", "Character Preference", virility) as num|null
virility = clamp(viri, 0, 100)
if("fertility")
var/fert = input(user, "Set the chance of you getting impregnated (set to 0 to disable). \n(0 = minimum, 100 = maximum)", "Character Preference", fertility) as num|null
fertility = clamp(fert, 0, 100)
if("egg_shell")
var/shell = input(user, "Pick a shell for your eggs", "Character Preferences") as null|anything in GLOB.egg_skins
if(shell)
egg_shell = shell
if("pregnancy_inflation")
pregnancy_inflation = !pregnancy_inflation
if("pregnancy_breast_growth")
pregnancy_breast_growth = !pregnancy_breast_growth
//SPLURT EDIT END
if("hair")
var/new_hair = input(user, "Choose your character's hair colour:", "Character Preference","#"+hair_color) as color|null
if(new_hair)
@@ -3145,7 +3213,20 @@ GLOBAL_LIST_EMPTY(preferences_datums)
user.client.view_size.setDefault(getScreenSize(widescreenpref))
if("long_strip_menu")
long_strip_menu = !long_strip_menu
if("cock_stuffing")
features["cock_stuffing"] = !features["cock_stuffing"]
if("balls_stuffing")
features["balls_stuffing"] = !features["balls_stuffing"]
if("vag_stuffing")
features["vag_stuffing"] = !features["vag_stuffing"]
if("breasts_stuffing")
features["breasts_stuffing"] = !features["breasts_stuffing"]
if("butt_stuffing")
features["butt_stuffing"] = !features["butt_stuffing"]
if("belly_stuffing")
features["belly_stuffing"] = !features["belly_stuffing"]
if("inert_eggs")
features["inert_eggs"] = !features["inert_eggs"]
if("pixel_size")
switch(pixel_size)
if(PIXEL_SCALING_AUTO)
@@ -3395,12 +3476,19 @@ GLOBAL_LIST_EMPTY(preferences_datums)
deadmin ^= DEADMIN_POSITION_SILICON
//
if("disable_antag")
toggles ^= NO_ANTAG
if("be_special")
var/be_special_type = href_list["be_special_type"]
if(be_special_type in be_special)
be_special -= be_special_type
if(be_special[be_special_type] >= 1)
be_special -= be_special_type
else
be_special[be_special_type] = 1
else
be_special += be_special_type
be_special[be_special_type] = 0
if("name")
be_random_name = !be_random_name
+53 -8
View File
@@ -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 55
#define SAVEFILE_VERSION_MAX 56
/*
SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Carn
@@ -42,14 +42,20 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
//if your savefile is 3 months out of date, then 'tough shit'.
/datum/preferences/proc/update_preferences(current_version, savefile/S)
if(current_version < 55) //Bitflag toggles don't set their defaults when they're added, always defaulting to off instead.
toggles |= SOUND_BARK
if(current_version < 46) //If you remove this, remove force_reset_keybindings() too.
force_reset_keybindings_direct(TRUE)
addtimer(CALLBACK(src, .proc/force_reset_keybindings), 30) //No mob available when this is run, timer allows user choice.
if(current_version < 30)
outline_enabled = TRUE
outline_color = COLOR_THEME_MIDNIGHT
if(current_version < 46) //If you remove this, remove force_reset_keybindings() too.
force_reset_keybindings_direct(TRUE)
addtimer(CALLBACK(src, .proc/force_reset_keybindings), 30) //No mob available when this is run, timer allows user choice.
if(current_version < 55) //Bitflag toggles don't set their defaults when they're added, always defaulting to off instead.
toggles |= SOUND_BARK
if(current_version < 56)
if("NO_ANTAGS" in be_special)
toggles |= NO_ANTAG
be_special -= "NO_ANTAGS"
for(var/be_special_type in be_special)
be_special[be_special_type] = 1
/datum/preferences/proc/update_character(current_version, savefile/S)
if(current_version < 19)
@@ -762,6 +768,13 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
"vag_visibility" = GEN_VISIBLE_NO_UNDIES,
"butt_visibility" = GEN_VISIBLE_NO_UNDIES,
"belly_visibility" = GEN_VISIBLE_NO_UNDIES,
"cock_stuffing" = FALSE,
"balls_stuffing" = FALSE,
"vag_stuffing" = FALSE,
"breasts_stuffing" = FALSE,
"butt_stuffing" = FALSE,
"belly_stuffing" = FALSE,
"inert_eggs" = FALSE,
"ipc_screen" = "Sunburst",
"ipc_antenna" = "None",
"flavor_text" = "",
@@ -993,6 +1006,15 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
S["vore_flags"] >> vore_flags
S["vore_taste"] >> vore_taste
S["vore_smell"] >> vore_smell
S["feature_breasts_stuffing"] >> features["breasts_stuffing"]
S["feature_cock_stuffing"] >> features["cock_stuffing"]
S["feature_balls_stuffing"] >> features["balls_stuffing"]
S["feature_vag_stuffing"] >> features["vag_stuffing"]
S["feature_butt_stuffing"] >> features["butt_stuffing"]
S["feature_belly_stuffing"] >> features["belly_stuffing"]
S["feature_inert_eggs"] >> features["inert_eggs"]
var/char_vr_path = "[vr_path]/character_[default_slot]_v2.json"
if(fexists(char_vr_path))
var/list/json_from_file = json_decode(file2text(char_vr_path))
@@ -1202,6 +1224,15 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
vore_smell = copytext(vore_smell, 1, MAX_TASTE_LEN)
belly_prefs = SANITIZE_LIST(belly_prefs)
//SPLURT EDIT BEGIN - gregnancy
S["virile"] >> virility
S["fertile"] >> fertility
if(S["egg_shell"])
S["egg_shell"] >> egg_shell
S["pregnancy_inflation"] >> pregnancy_inflation
S["pregnancy_breast_growth"] >> pregnancy_breast_growth
//SPLURT EDIT END
cit_character_pref_load(S)
return 1
@@ -1291,12 +1322,14 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
WRITE_FILE(S["feature_cock_diameter_ratio"], features["cock_diameter_ratio"])
WRITE_FILE(S["feature_cock_taur"], features["cock_taur"])
WRITE_FILE(S["feature_cock_visibility"], features["cock_visibility"])
WRITE_FILE(S["feature_cock_stuffing"], features["cock_stuffing"])
WRITE_FILE(S["feature_has_balls"], features["has_balls"])
WRITE_FILE(S["feature_balls_color"], features["balls_color"])
WRITE_FILE(S["feature_balls_shape"], features["balls_shape"])
WRITE_FILE(S["feature_balls_size"], features["balls_size"])
WRITE_FILE(S["feature_balls_visibility"], features["balls_visibility"])
WRITE_FILE(S["feature_balls_stuffing"], features["balls_stuffing"])
WRITE_FILE(S["feature_balls_shape"], features["balls_shape"])
WRITE_FILE(S["feature_balls_fluid"], features["balls_fluid"])
@@ -1307,11 +1340,13 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
WRITE_FILE(S["feature_breasts_fluid"], features["breasts_fluid"])
WRITE_FILE(S["feature_breasts_producing"], features["breasts_producing"])
WRITE_FILE(S["feature_breasts_visibility"], features["breasts_visibility"])
WRITE_FILE(S["feature_breasts_stuffing"], features["breasts_stuffing"])
WRITE_FILE(S["feature_has_vag"], features["has_vag"])
WRITE_FILE(S["feature_vag_shape"], features["vag_shape"])
WRITE_FILE(S["feature_vag_color"], features["vag_color"])
WRITE_FILE(S["feature_vag_visibility"], features["vag_visibility"])
WRITE_FILE(S["feature_vag_stuffing"], features["vag_stuffing"])
WRITE_FILE(S["feature_has_womb"], features["has_womb"])
WRITE_FILE(S["feature_womb_fluid"], features["womb_fluid"])
@@ -1320,11 +1355,15 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
WRITE_FILE(S["feature_butt_color"], features["butt_color"])
WRITE_FILE(S["feature_butt_size"], features["butt_size"])
WRITE_FILE(S["feature_butt_visibility"], features["butt_visibility"])
WRITE_FILE(S["feature_butt_stuffing"], features["butt_stuffing"])
WRITE_FILE(S["feature_has_belly"], features["has_belly"])
WRITE_FILE(S["feature_belly_color"], features["belly_color"])
WRITE_FILE(S["feature_belly_size"], features["belly_size"])
WRITE_FILE(S["feature_belly_visibility"], features["belly_visibility"])
WRITE_FILE(S["feature_belly_stuffing"], features["belly_stuffing"])
WRITE_FILE(S["feature_inert_eggs"], features["inert_eggs"])
WRITE_FILE(S["feature_neckfire"], features["neckfire"])
WRITE_FILE(S["feature_neckfire_color"], features["neckfire_color"])
@@ -1396,8 +1435,14 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
if(islist(modified_limbs))
WRITE_FILE(S["modified_limbs"] , safe_json_encode(modified_limbs))
WRITE_FILE(S["chosen_limb_id"], chosen_limb_id)
WRITE_FILE(S["headshot"], features["headshot_link"]) //SPLURT edit
//SPLURT EDIT BEGIN
WRITE_FILE(S["virile"], virility)
WRITE_FILE(S["fertile"], fertility)
WRITE_FILE(S["egg_shell"], egg_shell)
WRITE_FILE(S["pregnancy_inflation"], pregnancy_inflation)
WRITE_FILE(S["pregnancy_breast_growth"], pregnancy_breast_growth)
WRITE_FILE(S["headshot"], features["headshot_link"])
//SPLURT EDIT END
//gear loadout
if(length(loadout_data))