diff --git a/code/__HELPERS/mobs.dm b/code/__HELPERS/mobs.dm index d847423853..1b50210106 100644 --- a/code/__HELPERS/mobs.dm +++ b/code/__HELPERS/mobs.dm @@ -210,7 +210,8 @@ "ipc_screen" = snowflake_ipc_antenna_list ? pick(snowflake_ipc_antenna_list) : "None", "ipc_antenna" = "None", "flavor_text" = "", - "meat_type" = "Mammalian" + "meat_type" = "Mammalian", + "body_model" = MALE )) /proc/random_hair_style(gender) diff --git a/code/datums/dna.dm b/code/datums/dna.dm index 05a6e4f060..4ddf74fc0a 100644 --- a/code/datums/dna.dm +++ b/code/datums/dna.dm @@ -412,13 +412,13 @@ switch(deconstruct_block(getblock(dna.uni_identity, DNA_GENDER_BLOCK), 4)) if(G_MALE) - gender = MALE + set_gender(MALE, TRUE) if(G_FEMALE) - gender = FEMALE + set_gender(FEMALE, TRUE) if(G_PLURAL) - gender = PLURAL + set_gender(PLURAL, TRUE) else - gender = NEUTER + set_gender(NEUTER, TRUE) /mob/living/carbon/human/updateappearance(icon_update=1, mutcolor_update=0, mutations_overlay_update=0) ..() diff --git a/code/modules/admin/create_mob.dm b/code/modules/admin/create_mob.dm index 4d1cb1a7de..3336da7267 100644 --- a/code/modules/admin/create_mob.dm +++ b/code/modules/admin/create_mob.dm @@ -41,6 +41,7 @@ H.dna.features["deco_wings"] = pick(GLOB.deco_wings_list) H.dna.features["insect_fluff"] = pick(GLOB.insect_fluffs_list) H.dna.features["flavor_text"] = "" //Oh no. + H.dna.features["body_model"] = H.gender SEND_SIGNAL(H, COMSIG_HUMAN_ON_RANDOMIZE) diff --git a/code/modules/antagonists/abductor/machinery/experiment.dm b/code/modules/antagonists/abductor/machinery/experiment.dm index 96bcd27a3b..ca6481bcfe 100644 --- a/code/modules/antagonists/abductor/machinery/experiment.dm +++ b/code/modules/antagonists/abductor/machinery/experiment.dm @@ -61,7 +61,7 @@ /obj/machinery/abductor/experiment/proc/dissection_icon(mob/living/carbon/human/H) var/icon/photo = null - var/g = (H.gender == FEMALE) ? "f" : "m" + var/g = (H.dna.features["body_model"] == FEMALE) ? "f" : "m" if(H.dna.species.use_skintones) photo = icon("icon" = 'icons/mob/human.dmi', "icon_state" = "[H.skin_tone]_[g]") else diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index 4629ed5c35..b8db883c6d 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -150,7 +150,8 @@ GLOBAL_LIST_EMPTY(preferences_datums) "ipc_screen" = "Sunburst", "ipc_antenna" = "None", "flavor_text" = "", - "meat_type" = "Mammalian" + "meat_type" = "Mammalian", + "body_model" = MALE ) var/list/custom_names = list() @@ -343,6 +344,8 @@ GLOBAL_LIST_EMPTY(preferences_datums) dat += "[TextPreview(features["flavor_text"])]...
" dat += "

Body

" dat += "Gender:[gender == MALE ? "Male" : (gender == FEMALE ? "Female" : (gender == PLURAL ? "Non-binary" : "Object"))]
" + if(gender != NEUTER && pref_species.sexes) + dat += "Body Model:[features["body_model"] == MALE ? "Masculine" : "Feminine"]
" dat += "Species:[pref_species.name]
" dat += "Custom Species Name:[custom_species ? custom_species : "None"]
" dat += "Random Body:Randomize!
" @@ -2126,16 +2129,23 @@ GLOBAL_LIST_EMPTY(preferences_datums) if(unlock_content) toggles ^= MEMBER_PUBLIC if("gender") - var/chosengender = input(user, "Select your character's gender.", "Gender Selection", gender) in list(MALE,FEMALE,"nonbinary","object") + var/chosengender = input(user, "Select your character's gender.", "Gender Selection", gender) as null|anything in list(MALE,FEMALE,"nonbinary","object") switch(chosengender) if("nonbinary") chosengender = PLURAL + features["body_model"] = pick(MALE, FEMALE) if("object") chosengender = NEUTER + features["body_model"] = MALE + else + features["body_model"] = chosengender gender = chosengender facial_hair_style = random_facial_hair_style(gender) hair_style = random_hair_style(gender) + if("body_model") + features["body_model"] = features["body_model"] == MALE ? FEMALE : MALE + if("hotkeys") hotkeys = !hotkeys if(hotkeys) diff --git a/code/modules/client/preferences_savefile.dm b/code/modules/client/preferences_savefile.dm index 63a9ca40e9..9db5dcde50 100644 --- a/code/modules/client/preferences_savefile.dm +++ b/code/modules/client/preferences_savefile.dm @@ -375,6 +375,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car S["name_is_always_random"] >> be_random_name S["body_is_always_random"] >> be_random_body S["gender"] >> gender + S["body_model"] >> features["body_model"] S["age"] >> age S["hair_color"] >> hair_color S["facial_hair_color"] >> facial_hair_color @@ -490,6 +491,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car real_name = reject_bad_name(real_name) gender = sanitize_gender(gender, TRUE, TRUE) + features["body_model"] = sanitize_gender(features["body_model"], FALSE, FALSE, gender == FEMALE ? FEMALE : MALE) if(!real_name) real_name = random_unique_name(gender) custom_species = reject_bad_name(custom_species) @@ -599,6 +601,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car WRITE_FILE(S["name_is_always_random"] , be_random_name) WRITE_FILE(S["body_is_always_random"] , be_random_body) WRITE_FILE(S["gender"] , gender) + WRITE_FILE(S["body_model"] , features["body_model"]) WRITE_FILE(S["age"] , age) WRITE_FILE(S["hair_color"] , hair_color) WRITE_FILE(S["facial_hair_color"] , facial_hair_color) diff --git a/code/modules/mob/dead/new_player/preferences_setup.dm b/code/modules/mob/dead/new_player/preferences_setup.dm index 14cd7be547..a7fdf2d914 100644 --- a/code/modules/mob/dead/new_player/preferences_setup.dm +++ b/code/modules/mob/dead/new_player/preferences_setup.dm @@ -23,6 +23,10 @@ var/rando_race = pick(GLOB.roundstart_races) pref_species = new rando_race() features = random_features(pref_species?.id) + if(gender == MALE || gender != FEMALE) + features["body_model"] = gender + else if(gender == PLURAL) + features["body_model"] = pick(MALE,FEMALE) age = rand(AGE_MIN,AGE_MAX) /datum/preferences/proc/update_preview_icon(equip_job = TRUE) diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index f5f9a734ae..938f6531f1 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -1025,3 +1025,19 @@ /mob/living/carbon/can_hold_items() return TRUE + +/mob/living/carbon/set_gender(ngender = NEUTER, silent = FALSE, update_icon = TRUE, forced = FALSE) + var/bender = gender != ngender + . = ..() + if(!.) + return + if(dna && bender) + if(ngender == MALE || ngender == FEMALE) + dna.features["body_model"] = ngender + if(!silent) + var/adj = ngender == MALE ? "masculine" : "feminine" + visible_message("[src] suddenly looks more [adj]!", "You suddenly feel more [adj]!") + else if(ngender == NEUTER) + dna.features["body_model"] = MALE + if(update_icon) + update_body() diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index b2691f4474..097788dd7b 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -621,13 +621,14 @@ //Used for new human mobs created by cloning/goleming/podding /mob/living/carbon/human/proc/set_cloned_appearance() - if(gender == MALE) + if(dna.features["body_model"] == MALE) facial_hair_style = "Full Beard" else facial_hair_style = "Shaved" hair_style = pick("Bedhead", "Bedhead 2", "Bedhead 3") underwear = "Nude" undershirt = "Nude" + socks = "Nude" update_body() update_hair() update_genitals() diff --git a/code/modules/mob/living/carbon/human/species.dm b/code/modules/mob/living/carbon/human/species.dm index 18d2393470..d464419b73 100644 --- a/code/modules/mob/living/carbon/human/species.dm +++ b/code/modules/mob/living/carbon/human/species.dm @@ -585,7 +585,7 @@ GLOBAL_LIST_EMPTY(roundstart_race_names) 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.gender == FEMALE) + 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) @@ -746,7 +746,7 @@ GLOBAL_LIST_EMPTY(roundstart_race_names) if(!bodyparts_to_add) return - var/g = (H.gender == FEMALE) ? "f" : "m" + var/g = (H.dna.features["body_model"] == FEMALE) ? "f" : "m" for(var/layer in relevent_layers) var/layertext = mutant_bodyparts_layertext(layer) diff --git a/code/modules/mob/living/carbon/human/update_icons.dm b/code/modules/mob/living/carbon/human/update_icons.dm index f1b1570e24..5d04b7fff2 100644 --- a/code/modules/mob/living/carbon/human/update_icons.dm +++ b/code/modules/mob/living/carbon/human/update_icons.dm @@ -132,7 +132,7 @@ There are several things that need to be remembered: var/mutable_appearance/uniform_overlay if(dna && dna.species.sexes) - var/G = (gender == FEMALE) ? "f" : "m" + var/G = (dna.features["body_model"] == FEMALE) ? "f" : "m" if(G == "f" && U.fitted != NO_FEMALE_UNIFORM) uniform_overlay = U.build_worn_icon(t_color, UNIFORM_LAYER, alt_worn, FALSE, U.fitted, variant_flag, FALSE) diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 265d520749..1309fae60c 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -1192,3 +1192,9 @@ /mob/living/canface() return ..() && CHECK_MOBILITY(src, MOBILITY_MOVE) + +/mob/living/proc/set_gender(ngender = NEUTER, silent = FALSE, update_icon = TRUE, forced = FALSE) + if(forced || (!ckey || client?.prefs.cit_toggles & (ngender == FEMALE ? FORCED_FEM : FORCED_MASC))) + gender = ngender + return TRUE + return FALSE diff --git a/code/modules/ninja/suit/suit.dm b/code/modules/ninja/suit/suit.dm index 03fc7a2ed2..01e6abaa6a 100644 --- a/code/modules/ninja/suit/suit.dm +++ b/code/modules/ninja/suit/suit.dm @@ -124,7 +124,7 @@ Contents: return TRUE /obj/item/clothing/suit/space/space_ninja/proc/lockIcons(mob/living/carbon/human/H) - icon_state = H.gender==FEMALE ? "s-ninjanf" : "s-ninjan" + icon_state = H.dna.features["body_model"] == FEMALE ? "s-ninjanf" : "s-ninjan" H.gloves.icon_state = "s-ninjan" H.gloves.item_state = "s-ninjan" diff --git a/code/modules/paperwork/photocopier.dm b/code/modules/paperwork/photocopier.dm index 97d28d7674..8db531aa5e 100644 --- a/code/modules/paperwork/photocopier.dm +++ b/code/modules/paperwork/photocopier.dm @@ -121,11 +121,10 @@ if(isalienadult(ass) || istype(ass, /mob/living/simple_animal/hostile/alien)) //Xenos have their own asses, thanks to Pybro. temp_img = icon('icons/ass/assalien.png') else if(ishuman(ass)) //Suit checks are in check_ass - if(ass.gender == MALE) - temp_img = icon('icons/ass/assmale.png') - else if(ass.gender == FEMALE) + var/mob/living/carbon/human/H = ass + if(H.dna.features["body_model"] == FEMALE) temp_img = icon('icons/ass/assfemale.png') - else //In case anyone ever makes the generic ass. For now I'll be using male asses. + else temp_img = icon('icons/ass/assmale.png') else if(isdrone(ass)) //Drones are hot temp_img = icon('icons/ass/assdrone.png') diff --git a/code/modules/research/xenobiology/xenobiology.dm b/code/modules/research/xenobiology/xenobiology.dm index 00e22742e5..a346cd697f 100644 --- a/code/modules/research/xenobiology/xenobiology.dm +++ b/code/modules/research/xenobiology/xenobiology.dm @@ -342,12 +342,7 @@ to_chat(user, "You can't swap your gender!") return - if(user.gender == MALE) - user.gender = FEMALE - user.visible_message("[user] suddenly looks more feminine!", "You suddenly feel more feminine!") - else - user.gender = MALE - user.visible_message("[user] suddenly looks more masculine!", "You suddenly feel more masculine!") + user.set_gender(user.gender == MALE ? FEMALE : MALE, forced = TRUE) //You are doing this to yourself. return 100 if(SLIME_ACTIVATE_MAJOR) @@ -910,16 +905,9 @@ to_chat(user, "The potion can only be used on gendered things!") return - if(L.gender == MALE && (L.client?.prefs.cit_toggles & FORCED_FEM)) - L.gender = FEMALE - L.visible_message("[L] suddenly looks more feminine!", "You suddenly feel more feminine!") - else if(L.gender == FEMALE && (L.client?.prefs.cit_toggles & FORCED_MASC)) - L.gender = MALE - L.visible_message("[L] suddenly looks more masculine!", "You suddenly feel more masculine!") - else + if(!L.set_gender(L.gender == MALE ? FEMALE : MALE)) to_chat(user,"It won't work on [L]!") return - L.regenerate_icons() qdel(src) /obj/item/slimepotion/slime/renaming diff --git a/code/modules/spells/spell_types/area_teleport.dm b/code/modules/spells/spell_types/area_teleport.dm index cd3d471efc..17a895490e 100644 --- a/code/modules/spells/spell_types/area_teleport.dm +++ b/code/modules/spells/spell_types/area_teleport.dm @@ -82,10 +82,7 @@ switch(invocation_type) if("shout") user.say("[invocation] [uppertext(chosenarea.name)]", forced = "spell") - if(user.gender==MALE) - playsound(user.loc, pick('sound/misc/null.ogg','sound/misc/null.ogg'), 100, 1) - else - playsound(user.loc, pick('sound/misc/null.ogg','sound/misc/null.ogg'), 100, 1) + playsound(user.loc, pick('sound/misc/null.ogg'), 100, 1) if("whisper") user.whisper("[invocation] [uppertext(chosenarea.name)]") diff --git a/code/modules/surgery/bodyparts/bodyparts.dm b/code/modules/surgery/bodyparts/bodyparts.dm index 4b56ab6cb8..210a5e349d 100644 --- a/code/modules/surgery/bodyparts/bodyparts.dm +++ b/code/modules/surgery/bodyparts/bodyparts.dm @@ -347,7 +347,7 @@ else skin_tone = "" - body_gender = H.gender + body_gender = H.dna.features["body_model"] should_draw_gender = S.sexes if(MUTCOLORS in S.species_traits) @@ -358,7 +358,7 @@ base_bp_icon = (base_bp_icon == DEFAULT_BODYPART_ICON) ? DEFAULT_BODYPART_ICON_ORGANIC : base_bp_icon else species_color = "" - + if(base_bp_icon != DEFAULT_BODYPART_ICON) color_src = MUTCOLORS //TODO - Add color matrix support to base limbs diff --git a/icons/mob/human_parts_greyscale.dmi b/icons/mob/human_parts_greyscale.dmi index ab30929727..3ecfc7bb0c 100644 Binary files a/icons/mob/human_parts_greyscale.dmi and b/icons/mob/human_parts_greyscale.dmi differ diff --git a/modular_citadel/code/modules/reagents/chemistry/reagents/enlargement.dm b/modular_citadel/code/modules/reagents/chemistry/reagents/enlargement.dm index c173d3775b..28a776082f 100644 --- a/modular_citadel/code/modules/reagents/chemistry/reagents/enlargement.dm +++ b/modular_citadel/code/modules/reagents/chemistry/reagents/enlargement.dm @@ -104,8 +104,7 @@ var/obj/item/organ/genital/womb/W = M.getorganslot(ORGAN_SLOT_WOMB) if(M.gender == MALE) - M.gender = FEMALE - M.visible_message("[M] suddenly looks more feminine!", "You suddenly feel more feminine!") + M.set_gender(FEMALE) if(P) P.modify_size(-0.05) @@ -251,8 +250,7 @@ var/obj/item/organ/genital/womb/W = M.getorganslot(ORGAN_SLOT_WOMB) if(M.gender == FEMALE) - M.gender = MALE - M.visible_message("[M] suddenly looks more masculine!", "You suddenly feel more masculine!") + M.set_gender(MALE) if(B) B.modify_size(-0.05) diff --git a/modular_citadel/icons/mob/mam_markings.dmi b/modular_citadel/icons/mob/mam_markings.dmi index af916d2fd0..946f17abb8 100644 Binary files a/modular_citadel/icons/mob/mam_markings.dmi and b/modular_citadel/icons/mob/mam_markings.dmi differ