From c1e13a83fbba9c814e863ff754e9bb3dab92ccaa Mon Sep 17 00:00:00 2001 From: Ghommie <42542238+Ghommie@users.noreply.github.com> Date: Wed, 25 Mar 2020 03:35:29 +0100 Subject: [PATCH] Boom. --- code/__DEFINES/misc.dm | 19 ++++--- code/modules/client/preferences_savefile.dm | 51 +++++++++++++++++-- .../code/modules/arousal/genitals.dm | 15 ++---- .../modules/client/preferences_savefile.dm | 23 --------- 4 files changed, 58 insertions(+), 50 deletions(-) diff --git a/code/__DEFINES/misc.dm b/code/__DEFINES/misc.dm index 3a1e44f053..89cacc1c7b 100644 --- a/code/__DEFINES/misc.dm +++ b/code/__DEFINES/misc.dm @@ -27,15 +27,14 @@ Will print: "/mob/living/carbon/human/death" (you can optionally embed it in a s //Human Overlays Indexes///////// //LOTS OF CIT CHANGES HERE. BE CAREFUL WHEN UPSTREAM ADDS MORE LAYERS -#define MUTATIONS_LAYER 33 //mutations. Tk headglows, cold resistance glow, etc -#define GENITALS_BEHIND_LAYER 32 //Some genitalia needs to be behind everything, such as with taurs (Taurs use body_behind_layer -#define BODY_BEHIND_LAYER 31 //certain mutantrace features (tail when looking south) that must appear behind the body parts -#define BODYPARTS_LAYER 30 //Initially "AUGMENTS", this was repurposed to be a catch-all bodyparts flag -#define MARKING_LAYER 29 //Matrixed body markings because clashing with snouts? -#define BODY_ADJ_LAYER 28 //certain mutantrace features (snout, body markings) that must appear above the body parts -#define GENITALS_FRONT_LAYER 27 //Draws some genitalia above clothes and the TAUR body if need be. -#define BODY_LAYER 26 //underwear, undershirts, socks, eyes, lips(makeup) -#define GENITALS_NO_UNDIE_LAYER 25 //found above undergarments. +#define MUTATIONS_LAYER 32 //mutations. Tk headglows, cold resistance glow, etc +#define GENITALS_BEHIND_LAYER 31 //Some genitalia needs to be behind everything, such as with taurs (Taurs use body_behind_layer +#define BODY_BEHIND_LAYER 30 //certain mutantrace features (tail when looking south) that must appear behind the body parts +#define BODYPARTS_LAYER 29 //Initially "AUGMENTS", this was repurposed to be a catch-all bodyparts flag +#define MARKING_LAYER 28 //Matrixed body markings because clashing with snouts? +#define BODY_ADJ_LAYER 27 //certain mutantrace features (snout, body markings) that must appear above the body parts +#define GENITALS_FRONT_LAYER 26 //Draws some genitalia above clothes and the TAUR body if need be. +#define BODY_LAYER 25 //underwear, undershirts, socks, eyes, lips(makeup) #define FRONT_MUTATIONS_LAYER 24 //mutations that should appear above body, body_adj and bodyparts layer (e.g. laser eyes) #define DAMAGE_LAYER 23 //damage indicators (cuts and burns) #define UNIFORM_LAYER 22 @@ -60,7 +59,7 @@ Will print: "/mob/living/carbon/human/death" (you can optionally embed it in a s #define HANDS_LAYER 3 #define BODY_FRONT_LAYER 2 #define FIRE_LAYER 1 //If you're on fire -#define TOTAL_LAYERS 33 //KEEP THIS UP-TO-DATE OR SHIT WILL BREAK ;_; +#define TOTAL_LAYERS 32 //KEEP THIS UP-TO-DATE OR SHIT WILL BREAK ;_; //Human Overlay Index Shortcuts for alternate_worn_layer, layers //Because I *KNOW* somebody will think layer+1 means "above" diff --git a/code/modules/client/preferences_savefile.dm b/code/modules/client/preferences_savefile.dm index 69b8b5685f..76fc40b115 100644 --- a/code/modules/client/preferences_savefile.dm +++ b/code/modules/client/preferences_savefile.dm @@ -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 26 +#define SAVEFILE_VERSION_MAX 27 /* SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Carn @@ -145,6 +145,12 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car if(features["meat_type"] == "Inesct") features["meat_type"] = "Insect" + if(current_version < 27) + var/tennis + S["feature_balls_shape"] >> tennis + if(tennis == "Hidden") + features["balls_visibility"] = GEN_VISIBLE_NEVER + /datum/preferences/proc/load_path(ckey,filename="preferences.sav") if(!ckey) return @@ -447,22 +453,24 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car S["feature_cock_color"] >> features["cock_color"] S["feature_cock_length"] >> features["cock_length"] S["feature_cock_diameter"] >> features["cock_diameter"] - S["feature_has_sheath"] >> features["sheath_color"] + S["feature_cock_visibility"] >> features["cock_visibility"] //balls features S["feature_has_balls"] >> features["has_balls"] S["feature_balls_color"] >> features["balls_color"] S["feature_balls_size"] >> features["balls_size"] - S["feature_balls_shape"] >> features["balls_shape"] + S["feature_balls_visibility"] >> features["balls_visibility"] //breasts features S["feature_has_breasts"] >> features["has_breasts"] S["feature_breasts_size"] >> features["breasts_size"] S["feature_breasts_shape"] >> features["breasts_shape"] S["feature_breasts_color"] >> features["breasts_color"] S["feature_breasts_producing"] >> features["breasts_producing"] + S["feature_breasts_visibility"] >> features["breasts_visibility"] //vagina features S["feature_has_vag"] >> features["has_vag"] S["feature_vag_shape"] >> features["vag_shape"] S["feature_vag_color"] >> features["vag_color"] + S["feature_vag_visibility"] >> features["vag_visibility"] //womb features S["feature_has_womb"] >> features["has_womb"] //flavor text @@ -549,14 +557,18 @@ 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/list/L = CONFIG_GET(keyed_list/breasts_cups_prefs) + B_sizes = L.Copy() 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) + var/static/safe_visibilities + if(!safe_visibilities) + var/list/L = CONFIG_GET(keyed_list/safe_visibility_toggles) + safe_visibilities = L.Copy() 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) @@ -568,6 +580,11 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car features["cock_color"] = sanitize_hexcolor(features["cock_color"], 3, FALSE, "FFF") features["balls_color"] = sanitize_hexcolor(features["balls_color"], 3, FALSE, "FFF") features["vag_color"] = sanitize_hexcolor(features["vag_color"], 3, FALSE, "FFF") + features["breasts_visibility"] = sanitize_inlist(features["breasts_visibility"], safe_visibilities, GEN_VISIBLE_NO_UNDIES) + features["cock_visibility"] = sanitize_inlist(features["cock_visibility"], safe_visibilities, GEN_VISIBLE_NO_UNDIES) + features["balls_visibility"] = sanitize_inlist(features["balls_visibility"], safe_visibilities, GEN_VISIBLE_NO_UNDIES) + features["vag_visibility"] = sanitize_inlist(features["vag_visibility"], safe_visibilities, GEN_VISIBLE_NO_UNDIES) + features["flavor_text"] = copytext(features["flavor_text"], 1, MAX_FLAVOR_LEN) @@ -648,6 +665,30 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car WRITE_FILE(S["feature_insect_markings"] , features["insect_markings"]) WRITE_FILE(S["feature_meat"] , features["meat_type"]) + WRITE_FILE(S["feature_has_cock"], features["has_cock"]) + WRITE_FILE(S["feature_cock_shape"], features["cock_shape"]) + WRITE_FILE(S["feature_cock_color"], features["cock_color"]) + WRITE_FILE(S["feature_cock_length"], features["cock_length"]) + WRITE_FILE(S["feature_cock_visibility"], features["cock_visibility"]) + + WRITE_FILE(S["feature_has_balls"], features["has_balls"]) + WRITE_FILE(S["feature_balls_color"], features["balls_color"]) + WRITE_FILE(S["feature_balls_size"], features["balls_size"]) + WRITE_FILE(S["feature_balls_visibility"], features["balls_visibility"]) + + WRITE_FILE(S["feature_has_breasts"], features["has_breasts"]) + WRITE_FILE(S["feature_breasts_size"], features["breasts_size"]) + WRITE_FILE(S["feature_breasts_shape"], features["breasts_shape"]) + WRITE_FILE(S["feature_breasts_color"], features["breasts_color"]) + WRITE_FILE(S["feature_breasts_producing"], features["breasts_producing"]) + WRITE_FILE(S["feature_breasts_visibility"], features["breasts_visibility"]) + + 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_has_womb"], features["has_womb"]) //Custom names for(var/custom_name_id in GLOB.preferences_custom_names) diff --git a/modular_citadel/code/modules/arousal/genitals.dm b/modular_citadel/code/modules/arousal/genitals.dm index 87379274b6..74a05488fa 100644 --- a/modular_citadel/code/modules/arousal/genitals.dm +++ b/modular_citadel/code/modules/arousal/genitals.dm @@ -265,7 +265,6 @@ var/list/gen_index[GENITAL_LAYER_INDEX_LENGTH] var/list/genitals_to_add var/list/fully_exposed - var/list/somewhat_exposed for(var/obj/item/organ/genital/G in internal_organs) if(G.is_exposed()) //Checks appropriate clothing slot and if it's through_clothes LAZYADD(gen_index[G.layer_index], G) @@ -316,13 +315,9 @@ genital_overlay.icon_state = "[G.slot]_[S.icon_state]_[size][dna.species.use_skintones ? "_s" : ""]_[aroused_state]_[layertext]" - if(layers_num[layer] == GENITALS_FRONT_LAYER) - if(G.genital_flags & GENITAL_THROUGH_CLOTHES) - genital_overlay.layer = -GENITALS_EXPOSED_LAYER - LAZYADD(fully_exposed, genital_overlay) - else if(!(G.genital_flags & GENITAL_UNDIES_HIDDEN)) - genital_overlay.layer = -GENITALS_NO_UNDIE_LAYER - LAZYADD(somewhat_exposed, genital_overlay) + if(layers_num[layer] == GENITALS_FRONT_LAYER && G.genital_flags & GENITAL_THROUGH_CLOTHES) + genital_overlay.layer = -GENITALS_EXPOSED_LAYER + LAZYADD(fully_exposed, genital_overlay) else genital_overlay.layer = -layers_num[layer] standing += genital_overlay @@ -334,10 +329,6 @@ overlays_standing[GENITALS_EXPOSED_LAYER] = fully_exposed apply_overlay(GENITALS_EXPOSED_LAYER) - if(LAZYLEN(somewhat_exposed)) - overlays_standing[GENITALS_NO_UNDIE_LAYER] = somewhat_exposed - apply_overlay(GENITALS_NO_UNDIE_LAYER) - for(var/L in relevant_layers) apply_overlay(layers_num[L]) diff --git a/modular_citadel/code/modules/client/preferences_savefile.dm b/modular_citadel/code/modules/client/preferences_savefile.dm index 80e20c9f48..d9b902656f 100644 --- a/modular_citadel/code/modules/client/preferences_savefile.dm +++ b/modular_citadel/code/modules/client/preferences_savefile.dm @@ -44,29 +44,6 @@ WRITE_FILE(S["feature_xeno_tail"], features["xenotail"]) WRITE_FILE(S["feature_xeno_dors"], features["xenodorsal"]) WRITE_FILE(S["feature_xeno_head"], features["xenohead"]) - //cock features - WRITE_FILE(S["feature_has_cock"], features["has_cock"]) - WRITE_FILE(S["feature_cock_shape"], features["cock_shape"]) - WRITE_FILE(S["feature_cock_color"], features["cock_color"]) - WRITE_FILE(S["feature_cock_length"], features["cock_length"]) - WRITE_FILE(S["feature_cock_girth"], features["cock_girth"]) - //balls features - WRITE_FILE(S["feature_has_balls"], features["has_balls"]) - WRITE_FILE(S["feature_balls_color"], features["balls_color"]) - WRITE_FILE(S["feature_balls_size"], features["balls_size"]) - WRITE_FILE(S["feature_balls_shape"], features["balls_shape"]) - //breasts features - WRITE_FILE(S["feature_has_breasts"], features["has_breasts"]) - WRITE_FILE(S["feature_breasts_size"], features["breasts_size"]) - WRITE_FILE(S["feature_breasts_shape"], features["breasts_shape"]) - WRITE_FILE(S["feature_breasts_color"], features["breasts_color"]) - WRITE_FILE(S["feature_breasts_producing"], features["breasts_producing"]) - //vagina features - 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"]) - //womb features - WRITE_FILE(S["feature_has_womb"], features["has_womb"]) //flavor text WRITE_FILE(S["feature_flavor_text"], features["flavor_text"])