From c9f02d97a195e3eb1699cf5489b8517ffea8139a Mon Sep 17 00:00:00 2001 From: Ghommie <42542238+Ghommie@users.noreply.github.com> Date: Wed, 25 Mar 2020 02:47:16 +0100 Subject: [PATCH 1/5] Privates Visibility Preferences. Also Undergarments having a purpose. --- code/__DEFINES/citadel_defines.dm | 8 +++ code/__DEFINES/misc.dm | 19 ++--- code/__HELPERS/_cit_helpers.dm | 9 ++- code/__HELPERS/global_lists.dm | 5 -- code/__HELPERS/mobs.dm | 11 ++- .../configuration/entries/game_options.dm | 5 ++ code/game/gamemodes/changeling/changeling.dm | 4 +- code/game/objects/structures/dresser.dm | 2 +- .../objects/structures/ghost_role_spawners.dm | 2 +- code/modules/admin/create_mob.dm | 2 +- .../antagonists/bloodsucker/powers/veil.dm | 4 +- code/modules/antagonists/devil/devil.dm | 4 +- code/modules/awaymissions/corpse.dm | 2 +- code/modules/client/preferences.dm | 47 ++++++++----- .../sprite_accessories/_sprite_accessories.dm | 6 +- .../sprite_accessories/undershirt.dm | 4 ++ .../sprite_accessories/underwear.dm | 7 ++ code/modules/mob/living/carbon/human/human.dm | 3 +- .../mob/living/carbon/human/update_icons.dm | 6 +- .../code/modules/arousal/arousal.dm | 2 +- .../code/modules/arousal/genitals.dm | 70 ++++++++++++------- .../arousal/genitals_sprite_accessories.dm | 6 +- .../code/modules/arousal/organs/breasts.dm | 6 +- .../code/modules/arousal/organs/penis.dm | 10 ++- .../code/modules/arousal/organs/testicles.dm | 8 +-- .../code/modules/arousal/organs/vagina.dm | 3 +- .../code/modules/client/preferences.dm | 6 -- 27 files changed, 148 insertions(+), 113 deletions(-) diff --git a/code/__DEFINES/citadel_defines.dm b/code/__DEFINES/citadel_defines.dm index 01355173d2..8b4ef2aca4 100644 --- a/code/__DEFINES/citadel_defines.dm +++ b/code/__DEFINES/citadel_defines.dm @@ -35,6 +35,8 @@ #define MASTURBATE_LINKED_ORGAN (1<<6) //used to pass our mission to the linked organ #define CAN_CLIMAX_WITH (1<<7) #define GENITAL_CAN_AROUSE (1<<8) +#define GENITAL_UNDIES_HIDDEN (1<<9) +#define UPDATE_OWNER_APPEARANCE (1<<10) #define DEF_VAGINA_SHAPE "Human" @@ -71,6 +73,12 @@ #define MILK_RATE_MULT 1 #define MILK_EFFICIENCY 1 +//visibility toggles defines to avoid errors typos code errors. +#define GEN_VISIBLE_ALWAYS "Always visible" +#define GEN_VISIBLE_NO_CLOTHES "Hidden by clothes" +#define GEN_VISIBLE_NO_UNDIES "Hidden by underwear" +#define GEN_VISIBLE_NEVER "Always hidden" + //Individual logging define #define INDIVIDUAL_LOOC_LOG "LOOC log" diff --git a/code/__DEFINES/misc.dm b/code/__DEFINES/misc.dm index 89cacc1c7b..3a1e44f053 100644 --- a/code/__DEFINES/misc.dm +++ b/code/__DEFINES/misc.dm @@ -27,14 +27,15 @@ 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 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 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 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 @@ -59,7 +60,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 32 //KEEP THIS UP-TO-DATE OR SHIT WILL BREAK ;_; +#define TOTAL_LAYERS 33 //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/__HELPERS/_cit_helpers.dm b/code/__HELPERS/_cit_helpers.dm index cc8ab0d250..9afae12c30 100644 --- a/code/__HELPERS/_cit_helpers.dm +++ b/code/__HELPERS/_cit_helpers.dm @@ -58,14 +58,13 @@ GLOBAL_LIST_EMPTY(ipc_antennas_list) //Genitals and Arousal Lists 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_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 -GLOBAL_LIST_INIT(dick_nouns, list("dick","cock","member","shaft")) -GLOBAL_LIST_INIT(cum_id_list,"semen") -GLOBAL_LIST_INIT(milk_id_list,"milk") +//longcat memes. +GLOBAL_LIST_INIT(dick_nouns, list("phallus", "willy", "dick", "prick", "member", "tool", "gentleman's organ", "cock", "wang", "knob", "dong", "joystick", "pecker", "johnson", "weenie", "tadger", "schlong", "thirsty ferret", "One eyed trouser trout", "Ding dong", "ankle spanker", "Pork sword", "engine cranker", "Harry hot dog", "Davy Crockett", "Kidney cracker", "Heat seeking moisture missile", "Giggle stick", "love whistle", "Tube steak", "Uncle Dick", "Purple helmet warrior")) + +GLOBAL_LIST_INIT(genitals_visibility_toggles, list(GEN_VISIBLE_ALWAYS, GEN_VISIBLE_NO_CLOTHES, GEN_VISIBLE_NO_UNDIES, GEN_VISIBLE_NEVER)) GLOBAL_LIST_INIT(dildo_shapes, list( "Human" = "human", diff --git a/code/__HELPERS/global_lists.dm b/code/__HELPERS/global_lists.dm index ff2559b661..38e25b04c5 100644 --- a/code/__HELPERS/global_lists.dm +++ b/code/__HELPERS/global_lists.dm @@ -54,11 +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.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", - "One eyed trouser trout", "Ding dong", "ankle spanker", "Pork sword", "engine cranker", "Harry hot dog", "Davy Crockett", - "Kidney cracker", "Heat seeking moisture missile", "Giggle stick", "love whistle", "Tube steak", "Uncle Dick", "Purple helmet warrior") for(var/gpath in subtypesof(/obj/item/organ/genital)) var/obj/item/organ/genital/G = gpath diff --git a/code/__HELPERS/mobs.dm b/code/__HELPERS/mobs.dm index b8edf3b0f4..f7546193aa 100644 --- a/code/__HELPERS/mobs.dm +++ b/code/__HELPERS/mobs.dm @@ -185,7 +185,6 @@ "cock_diameter_ratio" = COCK_DIAMETER_RATIO_DEF, "cock_color" = pick("FFFFFF","7F7F7F", "7FFF7F", "7F7FFF", "FF7F7F", "7FFFFF", "FF7FFF", "FFFF7F"), "has_balls" = FALSE, - "balls_internal" = FALSE, "balls_color" = pick("FFFFFF","7F7F7F", "7FFF7F", "7F7FFF", "FF7F7F", "7FFFFF", "FF7FFF", "FFFF7F"), "balls_size" = BALLS_SIZE_DEF, "balls_shape" = DEF_BALLS_SHAPE, @@ -200,13 +199,11 @@ "has_vag" = FALSE, "vag_shape" = pick(GLOB.vagina_shapes_list), "vag_color" = pick("FFFFFF","7F7F7F", "7FFF7F", "7F7FFF", "FF7F7F", "7FFFFF", "FF7FFF", "FFFF7F"), - "vag_clits" = 1, - "vag_clit_diam" = 0.25, - "vag_clit_len" = 0.25, "has_womb" = FALSE, - "womb_cum_rate" = CUM_RATE, - "womb_cum_mult" = CUM_RATE_MULT, - "womb_efficiency" = CUM_EFFICIENCY, + "balls_visibility" = GEN_VISIBLE_NO_UNDIES, + "breasts_visibility"= GEN_VISIBLE_NO_UNDIES, + "cock_visibility" = GEN_VISIBLE_NO_UNDIES, + "vag_visibility" = GEN_VISIBLE_NO_UNDIES, "ipc_screen" = snowflake_ipc_antenna_list ? pick(snowflake_ipc_antenna_list) : "None", "ipc_antenna" = "None", "flavor_text" = "", diff --git a/code/controllers/configuration/entries/game_options.dm b/code/controllers/configuration/entries/game_options.dm index bc290bedb9..b233e92007 100644 --- a/code/controllers/configuration/entries/game_options.dm +++ b/code/controllers/configuration/entries/game_options.dm @@ -436,3 +436,8 @@ /datum/config_entry/number/penis_max_inches_prefs config_entry_value = 20 min_val = 0 + +/datum/config_entry/keyed_list/safe_visibility_toggles + key_mode = KEY_MODE_TEXT + value_mode = VALUE_MODE_FLAG + config_entry_value = list(GEN_VISIBLE_NO_CLOTHES, GEN_VISIBLE_NO_UNDIES, GEN_VISIBLE_NEVER) //refer to cit_helpers for all toggles. diff --git a/code/game/gamemodes/changeling/changeling.dm b/code/game/gamemodes/changeling/changeling.dm index 14fe960422..4db8f4129a 100644 --- a/code/game/gamemodes/changeling/changeling.dm +++ b/code/game/gamemodes/changeling/changeling.dm @@ -88,13 +88,13 @@ GLOBAL_VAR(changeling_team_objective_type) //If this is not null, we hand our th user.underwear = chosen_prof.underwear user.undie_color = chosen_prof.undie_color user.undershirt = chosen_prof.undershirt - user.shirt_color =chosen_prof.shirt_color + user.shirt_color = chosen_prof.shirt_color user.socks = chosen_prof.socks user.socks_color =chosen_prof.socks_color chosen_dna.transfer_identity(user, 1) user.updateappearance(mutcolor_update=1) - user.update_body() + user.update_body(TRUE) user.domutcheck() //vars hackery. not pretty, but better than the alternative. diff --git a/code/game/objects/structures/dresser.dm b/code/game/objects/structures/dresser.dm index ecacf49fc2..528153324d 100644 --- a/code/game/objects/structures/dresser.dm +++ b/code/game/objects/structures/dresser.dm @@ -73,7 +73,7 @@ H.socks_color = recolor_undergarment(H, "socks", H.socks_color) add_fingerprint(H) - H.update_body() + H.update_body(TRUE) /obj/structure/dresser/proc/recolor_undergarment(mob/living/carbon/human/H, garment_type = "underwear", default_color) var/n_color = input(H, "Choose your [garment_type]'\s color.", "Character Preference", default_color) as color|null diff --git a/code/game/objects/structures/ghost_role_spawners.dm b/code/game/objects/structures/ghost_role_spawners.dm index 7469bd2e72..65145c0eed 100644 --- a/code/game/objects/structures/ghost_role_spawners.dm +++ b/code/game/objects/structures/ghost_role_spawners.dm @@ -31,7 +31,7 @@ new_spawn.underwear = "Nude" //You're a plant, partner new_spawn.undershirt = "Nude" //changing underwear/shirt/socks doesn't seem to function correctly right now because of some bug elsewhere? new_spawn.socks = "Nude" - new_spawn.update_body() + new_spawn.update_body(TRUE) //Ash walker eggs: Spawns in ash walker dens in lavaland. Ghosts become unbreathing lizards that worship the Necropolis and are advised to retrieve corpses to create more ash walkers. diff --git a/code/modules/admin/create_mob.dm b/code/modules/admin/create_mob.dm index 3336da7267..3e604856c5 100644 --- a/code/modules/admin/create_mob.dm +++ b/code/modules/admin/create_mob.dm @@ -45,6 +45,6 @@ SEND_SIGNAL(H, COMSIG_HUMAN_ON_RANDOMIZE) - H.update_body() + H.update_body(TRUE) H.update_hair() H.update_body_parts() diff --git a/code/modules/antagonists/bloodsucker/powers/veil.dm b/code/modules/antagonists/bloodsucker/powers/veil.dm index 0b3cded832..ecb0611940 100644 --- a/code/modules/antagonists/bloodsucker/powers/veil.dm +++ b/code/modules/antagonists/bloodsucker/powers/veil.dm @@ -95,7 +95,7 @@ H.dna.features = random_features(H.dna.species?.id) // Apply Appearance - H.update_body() // Outfit and underware, also body. + H.update_body(TRUE) // Outfit and underwear, also body and privates. //H.update_mutant_bodyparts() // Lizard tails etc H.update_hair() H.update_body_parts() @@ -140,7 +140,7 @@ ADD_TRAIT(H, TRAIT_DISFIGURED, "husk") // NOTE: We are ASSUMING husk. // H.status_flags |= DISFIGURED // Restore "Unknown" disfigurement H.dna.features = prev_features // Apply Appearance - H.update_body() // Outfit and underware, also body. + H.update_body(TRUE) // Outfit and underwear, also body and privates. H.update_hair() H.update_body_parts() // Body itself, maybe skin color? cast_effect() // POOF diff --git a/code/modules/antagonists/devil/devil.dm b/code/modules/antagonists/devil/devil.dm index 1d0bfde322..26e6283f09 100644 --- a/code/modules/antagonists/devil/devil.dm +++ b/code/modules/antagonists/devil/devil.dm @@ -244,7 +244,7 @@ GLOBAL_LIST_INIT(devil_suffix, list(" the Red", " the Soulless", " the Master", H.undershirt = "Nude" H.socks = "Nude" H.dna.features["mcolor"] = "511" //A deep red - H.regenerate_icons() + H.update_body(TRUE) else //Did the devil get hit by a staff of transmutation? owner.current.color = "#501010" give_appropriate_spells() @@ -466,7 +466,7 @@ GLOBAL_LIST_INIT(devil_suffix, list(" the Red", " the Soulless", " the Master", H.undershirt = "Nude" H.socks = "Nude" H.dna.features["mcolor"] = "511" - H.regenerate_icons() + H.update_body(TRUE) if(SOULVALUE >= TRUE_THRESHOLD) //Yes, BOTH this and the above if statement are to run if soulpower is high enough. var/mob/living/carbon/true_devil/A = new /mob/living/carbon/true_devil(targetturf) A.faction |= "hell" diff --git a/code/modules/awaymissions/corpse.dm b/code/modules/awaymissions/corpse.dm index f740ed27dd..50dd1e5608 100644 --- a/code/modules/awaymissions/corpse.dm +++ b/code/modules/awaymissions/corpse.dm @@ -208,7 +208,7 @@ else H.skin_tone = random_skin_tone() H.update_hair() - H.update_body() + H.update_body() //update_genitals arg FALSE because these don't quite require/have them most times. if(outfit) var/static/list/slots = list("uniform", "r_hand", "l_hand", "suit", "shoes", "gloves", "ears", "glasses", "mask", "head", "belt", "r_pocket", "l_pocket", "back", "id", "neck", "backpack_contents", "suit_store") for(var/slot in slots) diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index 87330ce42c..1b280baa56 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -126,7 +126,6 @@ GLOBAL_LIST_EMPTY(preferences_datums) "cock_diameter_ratio" = COCK_DIAMETER_RATIO_DEF, "cock_color" = "fff", "has_balls" = FALSE, - "balls_internal" = FALSE, "balls_color" = "fff", "balls_shape" = DEF_BALLS_SHAPE, "balls_size" = BALLS_SIZE_DEF, @@ -141,12 +140,11 @@ GLOBAL_LIST_EMPTY(preferences_datums) "has_vag" = FALSE, "vag_shape" = DEF_VAGINA_SHAPE, "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, + "balls_visibility" = GEN_VISIBLE_NO_UNDIES, + "breasts_visibility"= GEN_VISIBLE_NO_UNDIES, + "cock_visibility" = GEN_VISIBLE_NO_UNDIES, + "vag_visibility" = GEN_VISIBLE_NO_UNDIES, "ipc_screen" = "Sunburst", "ipc_antenna" = "None", "flavor_text" = "", @@ -763,6 +761,7 @@ GLOBAL_LIST_EMPTY(preferences_datums) dat += "    Change
" dat += "Penis Shape: [features["cock_shape"]]" dat += "Penis Length: [features["cock_length"]] inch(es)" + dat += "Penis Visibility:[features["cock_visibility"]]" dat += "Has Testicles:[features["has_balls"] == TRUE ? "Yes" : "No"]" if(features["has_balls"]) if(pref_species.use_skintones && features["genitals_use_skintone"] == TRUE) @@ -771,7 +770,7 @@ GLOBAL_LIST_EMPTY(preferences_datums) else dat += "Testicles Color:
" dat += "    Change
" - dat += "Testicles showing:[features["balls_shape"]]" + dat += "Testicles Visibility:[features["balls_visibility"]]" dat += APPEARANCE_CATEGORY_COLUMN dat += "

Vagina

" dat += "[features["has_vag"] == TRUE ? "Yes" : "No"]" @@ -783,6 +782,7 @@ GLOBAL_LIST_EMPTY(preferences_datums) else dat += "Vagina Color:
" dat += "    Change
" + dat += "Vagina Visibility:[features["vag_visibility"]]" dat += "Has Womb:[features["has_womb"] == TRUE ? "Yes" : "No"]" dat += "" dat += APPEARANCE_CATEGORY_COLUMN @@ -796,7 +796,8 @@ GLOBAL_LIST_EMPTY(preferences_datums) dat += "Color:
" dat += "    Change
" dat += "Cup Size:[features["breasts_size"]]" - dat += "Breast Shape:[features["breasts_shape"]]" + dat += "Breasts Shape:[features["breasts_shape"]]" + dat += "Breasts Visibility:[features["breasts_visibility"]]" dat += "Lactates:[features["breasts_producing"] == TRUE ? "Yes" : "No"]" dat += "" dat += "" @@ -1939,8 +1940,13 @@ GLOBAL_LIST_EMPTY(preferences_datums) if(new_shape) features["cock_shape"] = new_shape + if("cock_visibility") + var/n_vis = input(user, "Penis Visibility", "Character Preference") as null|anything in CONFIG_GET(keyed_list/safe_visibility_toggles) + if(n_vis) + features["cock_visibility"] = n_vis + if("balls_color") - var/new_ballscolor = input(user, "Testicle Color:", "Character Preference") as color|null + var/new_ballscolor = input(user, "Testicles Color:", "Character Preference") as color|null if(new_ballscolor) var/temp_hsv = RGBtoHSV(new_ballscolor) if(new_ballscolor == "#000000") @@ -1950,11 +1956,10 @@ GLOBAL_LIST_EMPTY(preferences_datums) else to_chat(user,"Invalid color. Your color is not bright enough.") - if("balls_shape") - var/new_shape - new_shape = input(user, "Testicle Type:", "Character Preference") as null|anything in GLOB.balls_shapes_list - if(new_shape) - features["balls_shape"] = new_shape + if("balls_visibility") + var/n_vis = input(user, "Testicles Visibility", "Character Preference") as null|anything in CONFIG_GET(keyed_list/safe_visibility_toggles) + if(n_vis) + features["balls_visibility"] = n_vis if("breasts_size") var/new_size = input(user, "Breast Size", "Character Preference") as null|anything in CONFIG_GET(keyed_list/breasts_cups_prefs) @@ -1978,6 +1983,11 @@ GLOBAL_LIST_EMPTY(preferences_datums) else to_chat(user,"Invalid color. Your color is not bright enough.") + if("breasts_visibility") + var/n_vis = input(user, "Breasts Visibility", "Character Preference") as null|anything in CONFIG_GET(keyed_list/safe_visibility_toggles) + if(n_vis) + features["breasts_visibility"] = n_vis + if("vag_shape") var/new_shape new_shape = input(user, "Vagina Type", "Character Preference") as null|anything in GLOB.vagina_shapes_list @@ -1995,6 +2005,11 @@ GLOBAL_LIST_EMPTY(preferences_datums) else to_chat(user,"Invalid color. Your color is not bright enough.") + if("vag_visibility") + var/n_vis = input(user, "Vagina Visibility", "Character Preference") as null|anything in CONFIG_GET(keyed_list/safe_visibility_toggles) + if(n_vis) + features["vag_visibility"] = n_vis + if("ooccolor") var/new_ooccolor = input(user, "Choose your OOC colour:", "Game Preference",ooccolor) as color|null if(new_ooccolor) @@ -2088,8 +2103,6 @@ GLOBAL_LIST_EMPTY(preferences_datums) features["has_balls"] = FALSE if("has_balls") features["has_balls"] = !features["has_balls"] - if("balls_internal") - features["balls_internal"] = !features["balls_internal"] if("has_breasts") features["has_breasts"] = !features["has_breasts"] if(features["has_breasts"] == FALSE) @@ -2409,6 +2422,8 @@ GLOBAL_LIST_EMPTY(preferences_datums) else character.Digitigrade_Leg_Swap(TRUE) + character.give_genitals(TRUE) //character.update_genitals() is already called on genital.update_appearance() + SEND_SIGNAL(character, COMSIG_HUMAN_PREFS_COPIED_TO, src, icon_updates, roundstart_checks) //let's be sure the character updates diff --git a/code/modules/mob/dead/new_player/sprite_accessories/_sprite_accessories.dm b/code/modules/mob/dead/new_player/sprite_accessories/_sprite_accessories.dm index abe51bf486..4365e59a7a 100644 --- a/code/modules/mob/dead/new_player/sprite_accessories/_sprite_accessories.dm +++ b/code/modules/mob/dead/new_player/sprite_accessories/_sprite_accessories.dm @@ -71,11 +71,13 @@ //for snowflake/donor specific sprites var/list/ckeys_allowed - + //For soft-restricting markings to species IDs var/list/recommended_species /datum/sprite_accessory/underwear icon = 'icons/mob/underwear.dmi' var/has_color = FALSE - var/has_digitigrade = FALSE \ No newline at end of file + var/has_digitigrade = FALSE + var/covers_groin = FALSE + var/covers_chest = FALSE \ No newline at end of file diff --git a/code/modules/mob/dead/new_player/sprite_accessories/undershirt.dm b/code/modules/mob/dead/new_player/sprite_accessories/undershirt.dm index 58c64dc7d0..73233f3e09 100644 --- a/code/modules/mob/dead/new_player/sprite_accessories/undershirt.dm +++ b/code/modules/mob/dead/new_player/sprite_accessories/undershirt.dm @@ -2,9 +2,13 @@ // Undershirt Definitions // //////////////////////////// +/datum/sprite_accessory/underwear/top + covers_chest = TRUE + /datum/sprite_accessory/underwear/top/nude name = "Nude" icon_state = null + covers_chest = FALSE // please make sure they're sorted alphabetically and categorized diff --git a/code/modules/mob/dead/new_player/sprite_accessories/underwear.dm b/code/modules/mob/dead/new_player/sprite_accessories/underwear.dm index 9441b5120a..58d5e1ba88 100644 --- a/code/modules/mob/dead/new_player/sprite_accessories/underwear.dm +++ b/code/modules/mob/dead/new_player/sprite_accessories/underwear.dm @@ -2,9 +2,13 @@ // Underwear Definitions // /////////////////////////// +/datum/sprite_accessory/underwear/bottom + covers_groin = TRUE + /datum/sprite_accessory/underwear/bottom/nude name = "Nude" icon_state = null + covers_groin = FALSE /datum/sprite_accessory/underwear/bottom/mankini name = "Mankini" @@ -155,16 +159,19 @@ name = "Swimsuit, One Piece - Red" icon_state = "swimming_red" gender = FEMALE + covers_chest = TRUE /datum/sprite_accessory/underwear/bottom/swimsuit name = "Swimsuit, One Piece - Black" icon_state = "swimming_black" gender = FEMALE + covers_chest = TRUE /datum/sprite_accessory/underwear/bottom/swimsuit_blue name = "Swimsuit, One Piece - Striped Blue" icon_state = "swimming_blue" gender = FEMALE + covers_chest = TRUE /datum/sprite_accessory/underwear/bottom/thong name = "Thong" diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 57667293e7..bbc109ab38 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -629,9 +629,8 @@ underwear = "Nude" undershirt = "Nude" socks = "Nude" - update_body() + update_body(TRUE) update_hair() - update_genitals() /mob/living/carbon/human/singularity_pull(S, current_size) ..() diff --git a/code/modules/mob/living/carbon/human/update_icons.dm b/code/modules/mob/living/carbon/human/update_icons.dm index 66233f7243..bb80f7555c 100644 --- a/code/modules/mob/living/carbon/human/update_icons.dm +++ b/code/modules/mob/living/carbon/human/update_icons.dm @@ -57,10 +57,12 @@ There are several things that need to be remembered: dna.species.handle_mutant_bodyparts(src) -/mob/living/carbon/human/update_body() +/mob/living/carbon/human/update_body(update_genitals = FALSE) remove_overlay(BODY_LAYER) dna.species.handle_body(src) ..() + if(update_genitals) + update_genitals() /mob/living/carbon/human/update_fire() ..((fire_stacks > 3) ? "Standing" : "Generic_mob_burning") @@ -72,7 +74,7 @@ There are several things that need to be remembered: if(!..()) icon_render_key = null //invalidate bodyparts cache - update_body() + update_body(TRUE) update_hair() update_inv_w_uniform() update_inv_wear_id() diff --git a/modular_citadel/code/modules/arousal/arousal.dm b/modular_citadel/code/modules/arousal/arousal.dm index 5c7d5a39e9..843672877e 100644 --- a/modular_citadel/code/modules/arousal/arousal.dm +++ b/modular_citadel/code/modules/arousal/arousal.dm @@ -33,7 +33,7 @@ hidden_underwear = on_off hidden_socks = on_off - update_body() + update_body(TRUE) /mob/living/carbon/human/proc/adjust_arousal(strength,aphro = FALSE,maso = FALSE) // returns all genitals that were adjust diff --git a/modular_citadel/code/modules/arousal/genitals.dm b/modular_citadel/code/modules/arousal/genitals.dm index 6f0588f76e..87379274b6 100644 --- a/modular_citadel/code/modules/arousal/genitals.dm +++ b/modular_citadel/code/modules/arousal/genitals.dm @@ -41,6 +41,9 @@ return update_size() update_appearance() + if(genital_flags & UPDATE_OWNER_APPEARANCE && owner && ishuman(owner)) + var/mob/living/carbon/human/H = owner + H.update_genitals() if(linked_organ_slot || (linked_organ && !owner)) update_link() @@ -49,9 +52,16 @@ var/list/exposed_genitals = list() //Keeping track of them so we don't have to iterate through every genitalia and see if exposed /obj/item/organ/genital/proc/is_exposed() - if(!owner || CHECK_BITFIELD(genital_flags, GENITAL_INTERNAL) || CHECK_BITFIELD(genital_flags, GENITAL_HIDDEN)) + if(!owner || genital_flags & (GENITAL_INTERNAL|GENITAL_HIDDEN)) return FALSE - if(CHECK_BITFIELD(genital_flags, GENITAL_THROUGH_CLOTHES)) + if(genital_flags & GENITAL_UNDIES_HIDDEN && ishuman(owner)) + var/mob/living/carbon/human/H = owner + if(!(NO_UNDERWEAR in H.dna.species.species_traits)) + var/datum/sprite_accessory/underwear/top/T = GLOB.undershirt_list[H.undershirt] + var/datum/sprite_accessory/underwear/bottom/B = GLOB.underwear_list[H.underwear] + if(zone == BODY_ZONE_CHEST ? (H.hidden_undershirt || T?.covers_chest || B?.covers_chest) : (H.hidden_underwear || T?.covers_groin || B?.covers_groin)) + return FALSE + if(genital_flags & GENITAL_THROUGH_CLOTHES) return TRUE switch(zone) //update as more genitals are added @@ -60,25 +70,19 @@ if(BODY_ZONE_PRECISE_GROIN) return owner.is_groin_exposed() -/obj/item/organ/genital/proc/toggle_visibility(visibility) +/obj/item/organ/genital/proc/toggle_visibility(visibility, update = TRUE) + genital_flags &= ~(GENITAL_THROUGH_CLOTHES|GENITAL_HIDDEN|GENITAL_UNDIES_HIDDEN) + owner.exposed_genitals -= src switch(visibility) - if("Always visible") - ENABLE_BITFIELD(genital_flags, GENITAL_THROUGH_CLOTHES) - DISABLE_BITFIELD(genital_flags, GENITAL_HIDDEN) - if(!(src in owner.exposed_genitals)) - owner.exposed_genitals += src - if("Hidden by clothes") - DISABLE_BITFIELD(genital_flags, GENITAL_THROUGH_CLOTHES) - DISABLE_BITFIELD(genital_flags, GENITAL_HIDDEN) - if(src in owner.exposed_genitals) - owner.exposed_genitals -= src - if("Always hidden") - DISABLE_BITFIELD(genital_flags, GENITAL_THROUGH_CLOTHES) - ENABLE_BITFIELD(genital_flags, GENITAL_HIDDEN) - if(src in owner.exposed_genitals) - owner.exposed_genitals -= src + if(GEN_VISIBLE_ALWAYS) + genital_flags |= GENITAL_THROUGH_CLOTHES + owner.exposed_genitals += src + if(GEN_VISIBLE_NO_UNDIES) + genital_flags |= GENITAL_UNDIES_HIDDEN + if(GEN_VISIBLE_NEVER) + genital_flags |= GENITAL_HIDDEN - if(ishuman(owner)) //recast to use update genitals proc + if(update && ishuman(owner)) //recast to use update genitals proc var/mob/living/carbon/human/H = owner H.update_genitals() @@ -87,6 +91,10 @@ set name = "Expose/Hide genitals" set desc = "Allows you to toggle which genitals should show through clothes or not." + if(stat != CONSCIOUS) + to_chat(usr, "You can toggle genitals visibility right now...") + return + var/list/genital_list = list() for(var/obj/item/organ/genital/G in internal_organs) if(!CHECK_BITFIELD(G.genital_flags, GENITAL_INTERNAL)) @@ -95,10 +103,11 @@ return //Full list of exposable genitals created var/obj/item/organ/genital/picked_organ - picked_organ = input(src, "Choose which genitalia to expose/hide", "Expose/Hide genitals", null) in genital_list - if(picked_organ) - var/picked_visibility = input(src, "Choose visibility setting", "Expose/Hide genitals", "Hidden by clothes") in list("Always visible", "Hidden by clothes", "Always hidden") - picked_organ.toggle_visibility(picked_visibility) + picked_organ = input(src, "Choose which genitalia to expose/hide", "Expose/Hide genitals") as null|anything in genital_list + if(picked_organ && (picked_organ in internal_organs)) + var/picked_visibility = input(src, "Choose visibility setting", "Expose/Hide genitals") as null|anything in GLOB.genitals_visibility_toggles + if(picked_visibility && picked_organ && (picked_organ in internal_organs)) + picked_organ.toggle_visibility(picked_visibility) return /mob/living/carbon/verb/toggle_arousal_state() @@ -256,6 +265,7 @@ 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) @@ -306,9 +316,13 @@ 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 && CHECK_BITFIELD(G.genital_flags, GENITAL_THROUGH_CLOTHES)) - genital_overlay.layer = -GENITALS_EXPOSED_LAYER - LAZYADD(fully_exposed, genital_overlay) // to be added to a layer with higher priority than clothes, hence the name of the bitflag. + 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) else genital_overlay.layer = -layers_num[layer] standing += genital_overlay @@ -320,6 +334,10 @@ 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/arousal/genitals_sprite_accessories.dm b/modular_citadel/code/modules/arousal/genitals_sprite_accessories.dm index 07453facdf..92c643c4bd 100644 --- a/modular_citadel/code/modules/arousal/genitals_sprite_accessories.dm +++ b/modular_citadel/code/modules/arousal/genitals_sprite_accessories.dm @@ -74,13 +74,9 @@ name = "testicle" //the preview name of the accessory color_src = "balls_color" -/datum/sprite_accessory/testicles/hidden - icon_state = "none" - name = "Hidden" - /datum/sprite_accessory/testicles/single icon_state = "single" - name = "Single" + name = "Single" //Single as "single pair", for clarity. //Vaginas /datum/sprite_accessory/vagina diff --git a/modular_citadel/code/modules/arousal/organs/breasts.dm b/modular_citadel/code/modules/arousal/organs/breasts.dm index bfa506da6d..8183ba92bc 100644 --- a/modular_citadel/code/modules/arousal/organs/breasts.dm +++ b/modular_citadel/code/modules/arousal/organs/breasts.dm @@ -12,7 +12,7 @@ fluid_id = /datum/reagent/consumable/milk fluid_rate = MILK_RATE shape = DEF_BREASTS_SHAPE - genital_flags = CAN_MASTURBATE_WITH|CAN_CLIMAX_WITH|GENITAL_FUID_PRODUCTION|GENITAL_CAN_AROUSE + genital_flags = CAN_MASTURBATE_WITH|CAN_CLIMAX_WITH|GENITAL_FUID_PRODUCTION|GENITAL_CAN_AROUSE|UPDATE_OWNER_APPEARANCE|GENITAL_UNDIES_HIDDEN masturbation_verb = "massage" arousal_verb = "Your breasts start feeling sensitive" unarousal_verb = "Your breasts no longer feel sensitive" @@ -64,9 +64,6 @@ icon_state += "_s" else color = "#[owner.dna.features["breasts_color"]]" - if(ishuman(owner)) - var/mob/living/carbon/human/H = owner - H.update_genitals() //Allows breasts to grow and change size, with sprite changes too. //maximum wah @@ -133,6 +130,7 @@ cached_size = size size = breast_values[size] prev_size = cached_size + toggle_visibility(D.features["breasts_visibility"], FALSE) #undef BREASTS_ICON_MIN_SIZE #undef BREASTS_ICON_MAX_SIZE \ No newline at end of file diff --git a/modular_citadel/code/modules/arousal/organs/penis.dm b/modular_citadel/code/modules/arousal/organs/penis.dm index 294ac6c877..ded05134a9 100644 --- a/modular_citadel/code/modules/arousal/organs/penis.dm +++ b/modular_citadel/code/modules/arousal/organs/penis.dm @@ -8,7 +8,7 @@ masturbation_verb = "stroke" arousal_verb = "You pop a boner" unarousal_verb = "Your boner goes down" - genital_flags = CAN_MASTURBATE_WITH|CAN_CLIMAX_WITH|GENITAL_CAN_AROUSE + genital_flags = CAN_MASTURBATE_WITH|CAN_CLIMAX_WITH|GENITAL_CAN_AROUSE|UPDATE_OWNER_APPEARANCE|GENITAL_UNDIES_HIDDEN linked_organ_slot = ORGAN_SLOT_TESTICLES fluid_transfer_factor = 0.5 shape = DEF_COCK_SHAPE @@ -66,9 +66,9 @@ if(owner) if (round(length) > round(prev_length)) - to_chat(owner, "Your [pick(GLOB.gentlemans_organ_names)] [pick("swells up to", "flourishes into", "expands into", "bursts forth into", "grows eagerly into", "amplifys into")] a [uppertext(round(length))] inch penis.") + to_chat(owner, "Your [pick(GLOB.dick_nouns)] [pick("swells up to", "flourishes into", "expands into", "bursts forth into", "grows eagerly into", "amplifys into")] a [uppertext(round(length))] inch penis.") else if ((round(length) < round(prev_length)) && (length > 0.5)) - to_chat(owner, "Your [pick(GLOB.gentlemans_organ_names)] [pick("shrinks down to", "decreases into", "diminishes into", "deflates into", "shrivels regretfully into", "contracts into")] a [uppertext(round(length))] inch penis.") + to_chat(owner, "Your [pick(GLOB.dick_nouns)] [pick("shrinks down to", "decreases into", "diminishes into", "deflates into", "shrivels regretfully into", "contracts into")] a [uppertext(round(length))] inch penis.") icon_state = sanitize_text("penis_[shape]_[size]") diameter = (length * diameter_ratio)//Is it just me or is this ludicous, why not make it exponentially decay? @@ -89,9 +89,6 @@ icon_state += "_s" else color = "#[owner.dna.features["cock_color"]]" - if(ishuman(owner)) - var/mob/living/carbon/human/H = owner - H.update_genitals() /obj/item/organ/genital/penis/get_features(mob/living/carbon/human/H) var/datum/dna/D = H.dna @@ -103,3 +100,4 @@ diameter_ratio = D.features["cock_diameter_ratio"] shape = D.features["cock_shape"] prev_length = length + toggle_visibility(D.features["cock_visibility"], FALSE) \ No newline at end of file diff --git a/modular_citadel/code/modules/arousal/organs/testicles.dm b/modular_citadel/code/modules/arousal/organs/testicles.dm index cf4480ff1f..4264cf5e48 100644 --- a/modular_citadel/code/modules/arousal/organs/testicles.dm +++ b/modular_citadel/code/modules/arousal/organs/testicles.dm @@ -9,7 +9,7 @@ arousal_verb = "Your balls ache a little" unarousal_verb = "Your balls finally stop aching, again" linked_organ_slot = ORGAN_SLOT_PENIS - genital_flags = CAN_MASTURBATE_WITH|MASTURBATE_LINKED_ORGAN|GENITAL_FUID_PRODUCTION + genital_flags = CAN_MASTURBATE_WITH|MASTURBATE_LINKED_ORGAN|GENITAL_FUID_PRODUCTION|UPDATE_OWNER_APPEARANCE|GENITAL_UNDIES_HIDDEN var/size_name = "average" shape = DEF_BALLS_SHAPE fluid_id = /datum/reagent/consumable/semen @@ -53,9 +53,6 @@ icon_state += "_s" else color = "#[owner.dna.features["balls_color"]]" - if(ishuman(owner)) - var/mob/living/carbon/human/H = owner - H.update_genitals() /obj/item/organ/genital/testicles/get_features(mob/living/carbon/human/H) var/datum/dna/D = H.dna @@ -64,8 +61,7 @@ else color = "#[D.features["balls_color"]]" shape = D.features["balls_shape"] - if(D.features["balls_shape"] == "Hidden") - ENABLE_BITFIELD(genital_flags, GENITAL_INTERNAL) fluid_rate = D.features["balls_cum_rate"] fluid_mult = D.features["balls_cum_mult"] fluid_efficiency = D.features["balls_efficiency"] + toggle_visibility(D.features["balls_visibility"], FALSE) \ No newline at end of file diff --git a/modular_citadel/code/modules/arousal/organs/vagina.dm b/modular_citadel/code/modules/arousal/organs/vagina.dm index 91c3b8b8e9..f7e8eddcbd 100644 --- a/modular_citadel/code/modules/arousal/organs/vagina.dm +++ b/modular_citadel/code/modules/arousal/organs/vagina.dm @@ -7,7 +7,7 @@ slot = "vagina" size = 1 //There is only 1 size right now shape = DEF_VAGINA_SHAPE - genital_flags = CAN_MASTURBATE_WITH|CAN_CLIMAX_WITH|GENITAL_CAN_AROUSE + genital_flags = CAN_MASTURBATE_WITH|CAN_CLIMAX_WITH|GENITAL_CAN_AROUSE|GENITAL_UNDIES_HIDDEN masturbation_verb = "finger" arousal_verb = "You feel wetness on your crotch" unarousal_verb = "You no longer feel wet" @@ -70,3 +70,4 @@ else color = "[D.features["vag_color"]]" shape = "[D.features["vag_shape"]]" + toggle_visibility(D.features["vag_visibility"], FALSE) diff --git a/modular_citadel/code/modules/client/preferences.dm b/modular_citadel/code/modules/client/preferences.dm index f1dbe31d02..8c55f2d9a8 100644 --- a/modular_citadel/code/modules/client/preferences.dm +++ b/modular_citadel/code/modules/client/preferences.dm @@ -45,9 +45,3 @@ else if(L[slot_to_string(slot)] < DEFAULT_SLOT_AMT) return TRUE - -/datum/preferences/copy_to(mob/living/carbon/human/character, icon_updates = 1) - ..() - character.give_genitals(TRUE) - if(icon_updates) - character.update_genitals() 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 2/5] 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"]) From c6b4b5f68626f7bc3db9f44fcb824fb3f9410cde Mon Sep 17 00:00:00 2001 From: Ghommie <42542238+Ghommie@users.noreply.github.com> Date: Wed, 25 Mar 2020 05:17:09 +0100 Subject: [PATCH 3/5] lazy fix before I go to sleep. --- .../mob/living/carbon/human/species.dm | 71 +++++++++---------- .../code/modules/arousal/genitals.dm | 2 +- 2 files changed, 35 insertions(+), 38 deletions(-) diff --git a/code/modules/mob/living/carbon/human/species.dm b/code/modules/mob/living/carbon/human/species.dm index d464419b73..c566e16ad9 100644 --- a/code/modules/mob/living/carbon/human/species.dm +++ b/code/modules/mob/living/carbon/human/species.dm @@ -550,48 +550,45 @@ GLOBAL_LIST_EMPTY(roundstart_race_names) //Underwear, Undershirts & Socks if(!(NO_UNDERWEAR in species_traits)) - if(H.socks && H.get_num_legs(FALSE) >= 2) - if(H.hidden_socks) - H.socks = "Nude" - else + if(H.socks && !H.hidden_socks && H.get_num_legs(FALSE) >= 2) + if(H.saved_socks) H.socks = H.saved_socks - var/datum/sprite_accessory/underwear/socks/S = GLOB.socks_list[H.socks] - if(S) - var/digilegs = ((DIGITIGRADE in species_traits) && S.has_digitigrade) ? "_d" : "" - var/mutable_appearance/MA = mutable_appearance(S.icon, "[S.icon_state][digilegs]", -BODY_LAYER) - if(S.has_color) - MA.color = "#[H.socks_color]" - standing += MA + H.saved_socks = "" + var/datum/sprite_accessory/underwear/socks/S = GLOB.socks_list[H.socks] + if(S) + var/digilegs = ((DIGITIGRADE in species_traits) && S.has_digitigrade) ? "_d" : "" + var/mutable_appearance/MA = mutable_appearance(S.icon, "[S.icon_state][digilegs]", -BODY_LAYER) + if(S.has_color) + MA.color = "#[H.socks_color]" + standing += MA - if(H.underwear) - if(H.hidden_underwear) - H.underwear = "Nude" - else + if(H.underwear && !H.hidden_underwear) + if(H.saved_underwear) H.underwear = H.saved_underwear - var/datum/sprite_accessory/underwear/bottom/B = GLOB.underwear_list[H.underwear] - if(B) - var/digilegs = ((DIGITIGRADE in species_traits) && B.has_digitigrade) ? "_d" : "" - var/mutable_appearance/MA = mutable_appearance(B.icon, "[B.icon_state][digilegs]", -BODY_LAYER) - if(B.has_color) - MA.color = "#[H.undie_color]" - standing += MA + H.saved_underwear = "" + var/datum/sprite_accessory/underwear/bottom/B = GLOB.underwear_list[H.underwear] + if(B) + var/digilegs = ((DIGITIGRADE in species_traits) && B.has_digitigrade) ? "_d" : "" + var/mutable_appearance/MA = mutable_appearance(B.icon, "[B.icon_state][digilegs]", -BODY_LAYER) + if(B.has_color) + MA.color = "#[H.undie_color]" + standing += MA - if(H.undershirt) - if(H.hidden_undershirt) - H.undershirt = "Nude" - else + if(H.undershirt && !H.hidden_undershirt) + if(H.saved_undershirt) H.undershirt = H.saved_undershirt - var/datum/sprite_accessory/underwear/top/T = GLOB.undershirt_list[H.undershirt] - if(T) - var/state = "[T.icon_state][((DIGITIGRADE in species_traits) && T.has_digitigrade) ? "_d" : ""]" - var/mutable_appearance/MA - if(H.dna.species.sexes && H.dna.features["body_model"] == FEMALE) - MA = wear_female_version(state, T.icon, BODY_LAYER) - else - MA = mutable_appearance(T.icon, state, -BODY_LAYER) - if(T.has_color) - MA.color = "#[H.shirt_color]" - standing += MA + H.saved_undershirt = "" + var/datum/sprite_accessory/underwear/top/T = GLOB.undershirt_list[H.undershirt] + if(T) + var/state = "[T.icon_state][((DIGITIGRADE in species_traits) && T.has_digitigrade) ? "_d" : ""]" + var/mutable_appearance/MA + if(H.dna.species.sexes && H.dna.features["body_model"] == FEMALE) + MA = wear_female_version(state, T.icon, BODY_LAYER) + else + MA = mutable_appearance(T.icon, state, -BODY_LAYER) + if(T.has_color) + MA.color = "#[H.shirt_color]" + standing += MA if(standing.len) H.overlays_standing[BODY_LAYER] = standing diff --git a/modular_citadel/code/modules/arousal/genitals.dm b/modular_citadel/code/modules/arousal/genitals.dm index 74a05488fa..f65267aa39 100644 --- a/modular_citadel/code/modules/arousal/genitals.dm +++ b/modular_citadel/code/modules/arousal/genitals.dm @@ -59,7 +59,7 @@ if(!(NO_UNDERWEAR in H.dna.species.species_traits)) var/datum/sprite_accessory/underwear/top/T = GLOB.undershirt_list[H.undershirt] var/datum/sprite_accessory/underwear/bottom/B = GLOB.underwear_list[H.underwear] - if(zone == BODY_ZONE_CHEST ? (H.hidden_undershirt || T?.covers_chest || B?.covers_chest) : (H.hidden_underwear || T?.covers_groin || B?.covers_groin)) + if(zone == BODY_ZONE_CHEST ? (!H.hidden_undershirt && (T?.covers_chest || B?.covers_chest)) : (!H.hidden_underwear && (T?.covers_groin || B?.covers_groin))) return FALSE if(genital_flags & GENITAL_THROUGH_CLOTHES) return TRUE From c05d2c1572d6ba83f4fe402dcf8790313cfd9f8a Mon Sep 17 00:00:00 2001 From: Ghommie <42542238+Ghommie@users.noreply.github.com> Date: Wed, 25 Mar 2020 17:08:09 +0100 Subject: [PATCH 4/5] Making it actually work. --- code/modules/client/preferences.dm | 8 +++--- .../code/modules/arousal/genitals.dm | 27 ++++++++++++------- 2 files changed, 21 insertions(+), 14 deletions(-) diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index 1b280baa56..424b913ece 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -761,7 +761,7 @@ GLOBAL_LIST_EMPTY(preferences_datums) dat += "    Change
" dat += "Penis Shape: [features["cock_shape"]]" dat += "Penis Length: [features["cock_length"]] inch(es)" - dat += "Penis Visibility:[features["cock_visibility"]]" + dat += "Penis Visibility:[features["cock_visibility"]]" dat += "Has Testicles:[features["has_balls"] == TRUE ? "Yes" : "No"]" if(features["has_balls"]) if(pref_species.use_skintones && features["genitals_use_skintone"] == TRUE) @@ -770,7 +770,7 @@ GLOBAL_LIST_EMPTY(preferences_datums) else dat += "Testicles Color:
" dat += "    Change
" - dat += "Testicles Visibility:[features["balls_visibility"]]" + dat += "Testicles Visibility:[features["balls_visibility"]]" dat += APPEARANCE_CATEGORY_COLUMN dat += "

Vagina

" dat += "[features["has_vag"] == TRUE ? "Yes" : "No"]" @@ -782,7 +782,7 @@ GLOBAL_LIST_EMPTY(preferences_datums) else dat += "Vagina Color:
" dat += "    Change
" - dat += "Vagina Visibility:[features["vag_visibility"]]" + dat += "Vagina Visibility:[features["vag_visibility"]]" dat += "Has Womb:[features["has_womb"] == TRUE ? "Yes" : "No"]" dat += "" dat += APPEARANCE_CATEGORY_COLUMN @@ -797,7 +797,7 @@ GLOBAL_LIST_EMPTY(preferences_datums) dat += "    Change
" dat += "Cup Size:[features["breasts_size"]]" dat += "Breasts Shape:[features["breasts_shape"]]" - dat += "Breasts Visibility:[features["breasts_visibility"]]" + dat += "Breasts Visibility:[features["breasts_visibility"]]" dat += "Lactates:[features["breasts_producing"] == TRUE ? "Yes" : "No"]" dat += "" dat += "" diff --git a/modular_citadel/code/modules/arousal/genitals.dm b/modular_citadel/code/modules/arousal/genitals.dm index f65267aa39..8d505fd06c 100644 --- a/modular_citadel/code/modules/arousal/genitals.dm +++ b/modular_citadel/code/modules/arousal/genitals.dm @@ -57,9 +57,9 @@ if(genital_flags & GENITAL_UNDIES_HIDDEN && ishuman(owner)) var/mob/living/carbon/human/H = owner if(!(NO_UNDERWEAR in H.dna.species.species_traits)) - var/datum/sprite_accessory/underwear/top/T = GLOB.undershirt_list[H.undershirt] - var/datum/sprite_accessory/underwear/bottom/B = GLOB.underwear_list[H.underwear] - if(zone == BODY_ZONE_CHEST ? (!H.hidden_undershirt && (T?.covers_chest || B?.covers_chest)) : (!H.hidden_underwear && (T?.covers_groin || B?.covers_groin))) + var/datum/sprite_accessory/underwear/top/T = H.hidden_undershirt ? null : GLOB.undershirt_list[H.undershirt] + var/datum/sprite_accessory/underwear/bottom/B = H.hidden_underwear ? null : GLOB.underwear_list[H.underwear] + if(zone == BODY_ZONE_CHEST ? (T?.covers_chest || B?.covers_chest) : (!T?.covers_groin || B?.covers_groin)) return FALSE if(genital_flags & GENITAL_THROUGH_CLOTHES) return TRUE @@ -72,17 +72,19 @@ /obj/item/organ/genital/proc/toggle_visibility(visibility, update = TRUE) genital_flags &= ~(GENITAL_THROUGH_CLOTHES|GENITAL_HIDDEN|GENITAL_UNDIES_HIDDEN) - owner.exposed_genitals -= src + if(owner) + owner.exposed_genitals -= src switch(visibility) if(GEN_VISIBLE_ALWAYS) genital_flags |= GENITAL_THROUGH_CLOTHES - owner.exposed_genitals += src + if(owner) + owner.exposed_genitals += src if(GEN_VISIBLE_NO_UNDIES) genital_flags |= GENITAL_UNDIES_HIDDEN if(GEN_VISIBLE_NEVER) genital_flags |= GENITAL_HIDDEN - if(update && ishuman(owner)) //recast to use update genitals proc + if(update && owner && ishuman(owner)) //recast to use update genitals proc var/mob/living/carbon/human/H = owner H.update_genitals() @@ -191,14 +193,19 @@ if(.) update() RegisterSignal(owner, COMSIG_MOB_DEATH, .proc/update_appearance) + if(genital_flags & GENITAL_THROUGH_CLOTHES) + owner.exposed_genitals += src /obj/item/organ/genital/Remove(special = FALSE) . = ..() - var/mob/living/carbon/human/H = . + var/mob/living/carbon/C = . update() - if(!QDELETED(H)) - UnregisterSignal(H, COMSIG_MOB_DEATH) - H.update_genitals() + if(!QDELETED(C)) + if(genital_flags & UPDATE_OWNER_APPEARANCE && ishuman(C)) + var/mob/living/carbon/human/H = . + H.update_genitals() + C.exposed_genitals -= src + UnregisterSignal(C, COMSIG_MOB_DEATH) //proc to give a player their genitals and stuff when they log in /mob/living/carbon/human/proc/give_genitals(clean = FALSE)//clean will remove all pre-existing genitals. proc will then give them any genitals that are enabled in their DNA From ddf4d759bdc5dbda4ef6f290ca6060dd2d5887f7 Mon Sep 17 00:00:00 2001 From: Ghommie <42542238+Ghommie@users.noreply.github.com> Date: Wed, 25 Mar 2020 17:25:23 +0100 Subject: [PATCH 5/5] Now locally tested too and it works fine. --- modular_citadel/code/modules/arousal/genitals.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modular_citadel/code/modules/arousal/genitals.dm b/modular_citadel/code/modules/arousal/genitals.dm index 8d505fd06c..7705dcafd1 100644 --- a/modular_citadel/code/modules/arousal/genitals.dm +++ b/modular_citadel/code/modules/arousal/genitals.dm @@ -59,7 +59,7 @@ if(!(NO_UNDERWEAR in H.dna.species.species_traits)) var/datum/sprite_accessory/underwear/top/T = H.hidden_undershirt ? null : GLOB.undershirt_list[H.undershirt] var/datum/sprite_accessory/underwear/bottom/B = H.hidden_underwear ? null : GLOB.underwear_list[H.underwear] - if(zone == BODY_ZONE_CHEST ? (T?.covers_chest || B?.covers_chest) : (!T?.covers_groin || B?.covers_groin)) + if(zone == BODY_ZONE_CHEST ? (T?.covers_chest || B?.covers_chest) : (T?.covers_groin || B?.covers_groin)) return FALSE if(genital_flags & GENITAL_THROUGH_CLOTHES) return TRUE