From 6d4433dd77c7788dbd4a790d6728b96d6cb52489 Mon Sep 17 00:00:00 2001 From: Ghommie <42542238+Ghommie@users.noreply.github.com> Date: Sun, 22 Mar 2020 01:07:51 +0100 Subject: [PATCH 1/5] Size preferences made configurable. --- code/__DEFINES/citadel_defines.dm | 3 +-- code/__HELPERS/_cit_helpers.dm | 1 - code/__HELPERS/global_lists.dm | 1 - code/__HELPERS/mobs.dm | 2 +- .../configuration/entries/game_options.dm | 13 +++++++++++++ code/modules/client/preferences.dm | 9 +++++---- code/modules/client/preferences_savefile.dm | 8 ++++++-- .../carbon/human/species_types/jellypeople.dm | 10 +++++----- config/game_options.txt | 11 +++++++++++ 9 files changed, 42 insertions(+), 16 deletions(-) diff --git a/code/__DEFINES/citadel_defines.dm b/code/__DEFINES/citadel_defines.dm index 7bcca68713..01355173d2 100644 --- a/code/__DEFINES/citadel_defines.dm +++ b/code/__DEFINES/citadel_defines.dm @@ -39,15 +39,14 @@ #define DEF_VAGINA_SHAPE "Human" -#define COCK_SIZE_MIN 1 #define COCK_SIZE_DEF 6 -#define COCK_SIZE_MAX 20 #define COCK_DIAMETER_RATIO_MAX 0.42 #define COCK_DIAMETER_RATIO_DEF 0.25 #define COCK_DIAMETER_RATIO_MIN 0.15 #define DEF_COCK_SHAPE "Human" + #define BALLS_VOLUME_BASE 25 #define BALLS_VOLUME_MULT 1 diff --git a/code/__HELPERS/_cit_helpers.dm b/code/__HELPERS/_cit_helpers.dm index 1954a159b3..cc8ab0d250 100644 --- a/code/__HELPERS/_cit_helpers.dm +++ b/code/__HELPERS/_cit_helpers.dm @@ -60,7 +60,6 @@ GLOBAL_LIST_EMPTY(genitals_list) GLOBAL_LIST_EMPTY(cock_shapes_list) GLOBAL_LIST_EMPTY(gentlemans_organ_names) GLOBAL_LIST_EMPTY(balls_shapes_list) -GLOBAL_LIST_EMPTY(breasts_size_list) GLOBAL_LIST_EMPTY(breasts_shapes_list) GLOBAL_LIST_EMPTY(vagina_shapes_list) GLOBAL_LIST_INIT(cum_into_containers_list, list(/obj/item/reagent_containers/food/snacks/pie)) //Yer fuggin snowflake name list jfc diff --git a/code/__HELPERS/global_lists.dm b/code/__HELPERS/global_lists.dm index 8c73d32583..ff2559b661 100644 --- a/code/__HELPERS/global_lists.dm +++ b/code/__HELPERS/global_lists.dm @@ -54,7 +54,6 @@ init_sprite_accessory_subtypes(/datum/sprite_accessory/vagina, GLOB.vagina_shapes_list) init_sprite_accessory_subtypes(/datum/sprite_accessory/breasts, GLOB.breasts_shapes_list) init_sprite_accessory_subtypes(/datum/sprite_accessory/testicles, GLOB.balls_shapes_list) - GLOB.breasts_size_list = list ("a", "b", "c", "d", "e") //We need the list to choose from initialized, but it's no longer a sprite_accessory thing. GLOB.gentlemans_organ_names = list("phallus", "willy", "dick", "prick", "member", "tool", "gentleman's organ", "cock", "wang", "knob", "dong", "joystick", "pecker", "johnson", "weenie", "tadger", "schlong", "thirsty ferret", "baloney pony", "schlanger", "Mutton dagger", "old blind bob","Hanging Johnny", "fishing rod", "Tally whacker", "polly rocket", diff --git a/code/__HELPERS/mobs.dm b/code/__HELPERS/mobs.dm index d847423853..771c39fcff 100644 --- a/code/__HELPERS/mobs.dm +++ b/code/__HELPERS/mobs.dm @@ -194,7 +194,7 @@ "balls_efficiency" = CUM_EFFICIENCY, "has_breasts" = FALSE, "breasts_color" = pick("FFFFFF","7F7F7F", "7FFF7F", "7F7FFF", "FF7F7F", "7FFFFF", "FF7FFF", "FFFF7F"), - "breasts_size" = pick(GLOB.breasts_size_list), + "breasts_size" = pick(CONFIG_GET(keyed_list/breasts_cups_prefs)), "breasts_shape" = DEF_BREASTS_SHAPE, "breasts_producing" = FALSE, "has_vag" = FALSE, diff --git a/code/controllers/configuration/entries/game_options.dm b/code/controllers/configuration/entries/game_options.dm index 911b986367..d3d6aea851 100644 --- a/code/controllers/configuration/entries/game_options.dm +++ b/code/controllers/configuration/entries/game_options.dm @@ -423,3 +423,16 @@ config_entry_value = 3 /datum/config_entry/flag/suicide_allowed + +/datum/config_entry/keyed_list/breasts_cups_prefs + key_mode = KEY_MODE_TEXT + value_mode = VALUE_MODE_FLAG + config_entry_value = list ("a", "b", "c", "d", "e") //keep these lowercase + +/datum/config_entry/number/penis_min_inches_prefs + config_entry_value = 1 + min_val = 0 + +/datum/config_entry/number/penis_max_inches_prefs + config_entry_value = 20 + min_val = 0 diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index 4629ed5c35..b6a8511982 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -1924,9 +1924,11 @@ GLOBAL_LIST_EMPTY(preferences_datums) to_chat(user,"Invalid color. Your color is not bright enough.") if("cock_length") - var/new_length = input(user, "Penis length in inches:\n([COCK_SIZE_MIN]-[COCK_SIZE_MAX])", "Character Preference") as num|null + var/min_D = CONFIG_GET(number/penis_min_inches_prefs) + var/max_D = CONFIG_GET(number/penis_max_inches_prefs) + var/new_length = input(user, "Penis length in inches:\n([min_D]-[max_D])", "Character Preference") as num|null if(new_length) - features["cock_length"] = max(min( round(text2num(new_length)), COCK_SIZE_MAX),COCK_SIZE_MIN) + features["cock_length"] = CLAMP(round(new_length), min_D, max_D) if("cock_shape") var/new_shape @@ -1952,8 +1954,7 @@ GLOBAL_LIST_EMPTY(preferences_datums) features["balls_shape"] = new_shape if("breasts_size") - var/new_size - new_size = input(user, "Breast Size", "Character Preference") as null|anything in GLOB.breasts_size_list + var/new_size = input(user, "Breast Size", "Character Preference") as null|anything in CONFIG_GET(keyed_list/breasts_cups_prefs) if(new_size) features["breasts_size"] = new_size diff --git a/code/modules/client/preferences_savefile.dm b/code/modules/client/preferences_savefile.dm index 63a9ca40e9..e3799b4f56 100644 --- a/code/modules/client/preferences_savefile.dm +++ b/code/modules/client/preferences_savefile.dm @@ -545,10 +545,14 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car features["insect_markings"] = sanitize_inlist(features["insect_markings"], GLOB.insect_markings_list, "None") features["insect_wings"] = sanitize_inlist(features["insect_wings"], GLOB.insect_wings_list) - features["breasts_size"] = sanitize_inlist(features["breasts_size"], GLOB.breasts_size_list, BREASTS_SIZE_DEF) + var/static/list/B_sizes = CONFIG_GET(keyed_list/breasts_cups_prefs) + var/static/min_D = CONFIG_GET(number/penis_min_inches_prefs) + var/static/max_D = CONFIG_GET(number/penis_max_inches_prefs) + + features["breasts_size"] = sanitize_inlist(features["breasts_size"], B_sizes, BREASTS_SIZE_DEF) + features["cock_length"] = sanitize_integer(features["cock_length"], min_D, max_D, COCK_SIZE_DEF) features["breasts_shape"] = sanitize_inlist(features["breasts_shape"], GLOB.breasts_shapes_list, DEF_BREASTS_SHAPE) features["cock_shape"] = sanitize_inlist(features["cock_shape"], GLOB.cock_shapes_list, DEF_COCK_SHAPE) - features["cock_length"] = sanitize_integer(features["cock_length"], COCK_SIZE_MIN, COCK_SIZE_MAX, COCK_SIZE_DEF) features["balls_shape"] = sanitize_inlist(features["balls_shape"], GLOB.balls_shapes_list, DEF_BALLS_SHAPE) features["vag_shape"] = sanitize_inlist(features["vag_shape"], GLOB.vagina_shapes_list, DEF_VAGINA_SHAPE) features["breasts_color"] = sanitize_hexcolor(features["breasts_color"], 3, FALSE, "FFF") diff --git a/code/modules/mob/living/carbon/human/species_types/jellypeople.dm b/code/modules/mob/living/carbon/human/species_types/jellypeople.dm index cf2950ff6f..147cb30772 100644 --- a/code/modules/mob/living/carbon/human/species_types/jellypeople.dm +++ b/code/modules/mob/living/carbon/human/species_types/jellypeople.dm @@ -603,10 +603,11 @@ else if (select_alteration == "Penis Length") for(var/obj/item/organ/genital/penis/X in H.internal_organs) qdel(X) - var/new_length - new_length = input(owner, "Penis length in inches:\n([COCK_SIZE_MIN]-[COCK_SIZE_MAX])", "Genital Alteration") as num|null + var/min_D = CONFIG_GET(number/penis_min_inches_prefs) + var/max_D = CONFIG_GET(number/penis_max_inches_prefs) + var/new_length = input(owner, "Penis length in inches:\n([min_D]-[max_D])", "Genital Alteration") as num|null if(new_length) - H.dna.features["cock_length"] = max(min( round(text2num(new_length)), COCK_SIZE_MAX),COCK_SIZE_MIN) + H.dna.features["cock_length"] = CLAMP(round(new_length), min_D, max_D) H.update_genitals() H.apply_overlay() H.give_genital(/obj/item/organ/genital/testicles) @@ -615,8 +616,7 @@ else if (select_alteration == "Breast Size") for(var/obj/item/organ/genital/breasts/X in H.internal_organs) qdel(X) - var/new_size - new_size = input(owner, "Breast Size", "Genital Alteration") as null|anything in GLOB.breasts_size_list + var/new_size = input(owner, "Breast Size", "Genital Alteration") as null|anything in CONFIG_GET(keyed_list/breasts_cups_prefs) if(new_size) H.dna.features["breasts_size"] = new_size H.update_genitals() diff --git a/config/game_options.txt b/config/game_options.txt index 4113a90e6d..f40d1bcd35 100644 --- a/config/game_options.txt +++ b/config/game_options.txt @@ -609,3 +609,14 @@ DROPPED_MODES 3 ## Whether the suicide verb is allowed. # SUICIDE_ALLOWED + +## Breast cups selectable from the character creation menu. Keep em lowercase. +BREASTS_CUPS_PREFS a +BREASTS_CUPS_PREFS b +BREASTS_CUPS_PREFS c +BREASTS_CUPS_PREFS d +BREASTS_CUPS_PREFS e + +## Minimum and maximum limits for penis length from the character creation menu. +PENIS_MIN_INCHES_PREFS 1 +PENIS_MIN_INCHES_PREFS 20 \ No newline at end of file From ff3e39440294b60b06198e52366740f3e606d215 Mon Sep 17 00:00:00 2001 From: Ghom <42542238+Ghommie@users.noreply.github.com> Date: Sun, 22 Mar 2020 03:25:27 +0100 Subject: [PATCH 3/5] OH NO --- config/game_options.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/game_options.txt b/config/game_options.txt index f40d1bcd35..c3930fd325 100644 --- a/config/game_options.txt +++ b/config/game_options.txt @@ -619,4 +619,4 @@ BREASTS_CUPS_PREFS e ## Minimum and maximum limits for penis length from the character creation menu. PENIS_MIN_INCHES_PREFS 1 -PENIS_MIN_INCHES_PREFS 20 \ No newline at end of file +PENIS_MAX_INCHES_PREFS 20 From ebfa9d6b841aab4debc4b8cf620fba5a9a9aa985 Mon Sep 17 00:00:00 2001 From: Ghommie <42542238+Ghommie@users.noreply.github.com> Date: Sun, 22 Mar 2020 04:21:00 +0100 Subject: [PATCH 4/5] Very tentative attempt at figuring out what's wrong. --- .../configuration/entries/game_options.dm | 2 +- code/modules/client/preferences_savefile.dm | 12 +++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/code/controllers/configuration/entries/game_options.dm b/code/controllers/configuration/entries/game_options.dm index d3d6aea851..bc290bedb9 100644 --- a/code/controllers/configuration/entries/game_options.dm +++ b/code/controllers/configuration/entries/game_options.dm @@ -427,7 +427,7 @@ /datum/config_entry/keyed_list/breasts_cups_prefs key_mode = KEY_MODE_TEXT value_mode = VALUE_MODE_FLAG - config_entry_value = list ("a", "b", "c", "d", "e") //keep these lowercase + config_entry_value = list("a", "b", "c", "d", "e") //keep these lowercase /datum/config_entry/number/penis_min_inches_prefs config_entry_value = 1 diff --git a/code/modules/client/preferences_savefile.dm b/code/modules/client/preferences_savefile.dm index e3799b4f56..cd94ef64fd 100644 --- a/code/modules/client/preferences_savefile.dm +++ b/code/modules/client/preferences_savefile.dm @@ -545,9 +545,15 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car features["insect_markings"] = sanitize_inlist(features["insect_markings"], GLOB.insect_markings_list, "None") features["insect_wings"] = sanitize_inlist(features["insect_wings"], GLOB.insect_wings_list) - var/static/list/B_sizes = CONFIG_GET(keyed_list/breasts_cups_prefs) - var/static/min_D = CONFIG_GET(number/penis_min_inches_prefs) - var/static/max_D = CONFIG_GET(number/penis_max_inches_prefs) + var/static/list/B_sizes + if(!B_sizes) + B_sizes = CONFIG_GET(keyed_list/breasts_cups_prefs) + var/static/min_D + if(!min_D) + min_D = CONFIG_GET(number/penis_min_inches_prefs) + var/static/max_D + if(!max_D) + max_D = CONFIG_GET(number/penis_max_inches_prefs) features["breasts_size"] = sanitize_inlist(features["breasts_size"], B_sizes, BREASTS_SIZE_DEF) features["cock_length"] = sanitize_integer(features["cock_length"], min_D, max_D, COCK_SIZE_DEF) From b43f7c10be706811d9e83b8567bc963f0dd0fd70 Mon Sep 17 00:00:00 2001 From: Ghommie <42542238+Ghommie@users.noreply.github.com> Date: Sun, 22 Mar 2020 04:30:45 +0100 Subject: [PATCH 5/5] Savefiles vs admin shenanigeans... --- code/modules/client/preferences_savefile.dm | 1 + 1 file changed, 1 insertion(+) diff --git a/code/modules/client/preferences_savefile.dm b/code/modules/client/preferences_savefile.dm index cd94ef64fd..2996367a1a 100644 --- a/code/modules/client/preferences_savefile.dm +++ b/code/modules/client/preferences_savefile.dm @@ -548,6 +548,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car var/static/list/B_sizes if(!B_sizes) B_sizes = CONFIG_GET(keyed_list/breasts_cups_prefs) + B_sizes = B_sizes.Copy() var/static/min_D if(!min_D) min_D = CONFIG_GET(number/penis_min_inches_prefs)