From e753c1ad1483e6329e057d273aac5c218b518ce7 Mon Sep 17 00:00:00 2001 From: Ghommie <42542238+Ghommie@users.noreply.github.com> Date: Tue, 14 Apr 2020 02:20:19 +0200 Subject: [PATCH 1/2] Fixed a little peeve with random bodies. --- code/__HELPERS/mobs.dm | 12 +++++++++--- code/datums/dna.dm | 2 +- code/modules/antagonists/bloodsucker/powers/veil.dm | 2 +- .../modules/mob/dead/new_player/preferences_setup.dm | 6 +----- 4 files changed, 12 insertions(+), 10 deletions(-) diff --git a/code/__HELPERS/mobs.dm b/code/__HELPERS/mobs.dm index febd333578..48c7cab6dc 100644 --- a/code/__HELPERS/mobs.dm +++ b/code/__HELPERS/mobs.dm @@ -47,7 +47,7 @@ init_sprite_accessory_subtypes(/datum/sprite_accessory/underwear/socks, GLOB.socks_list) return pick(GLOB.socks_list) -/proc/random_features(intendedspecies) +/proc/random_features(intendedspecies, intended_gender) if(!GLOB.tails_list_human.len) init_sprite_accessory_subtypes(/datum/sprite_accessory/tails/human, GLOB.tails_list_human) if(!GLOB.tails_list_lizard.len) @@ -149,7 +149,13 @@ var/color2 = random_short_color() var/color3 = random_short_color() - //CIT CHANGE - changes this entire return to support cit's snowflake parts + var/body_model = MALE + switch(intended_gender) + if(MALE || FEMALE) + body_model = intended_gender + if(PLURAL) + body_model = pick(MALE,FEMALE) + return(list( "mcolor" = color1, "mcolor2" = color2, @@ -209,7 +215,7 @@ "ipc_antenna" = "None", "flavor_text" = "", "meat_type" = "Mammalian", - "body_model" = MALE + "body_model" = body_model )) /proc/random_hair_style(gender) diff --git a/code/datums/dna.dm b/code/datums/dna.dm index 95b45b6bc2..2fffde8271 100644 --- a/code/datums/dna.dm +++ b/code/datums/dna.dm @@ -302,7 +302,7 @@ unique_enzymes = generate_unique_enzymes() uni_identity = generate_uni_identity() generate_dna_blocks() - features = random_features(species?.id) + features = random_features(species?.id, holder?.gender) /datum/dna/stored //subtype used by brain mob's stored_dna diff --git a/code/modules/antagonists/bloodsucker/powers/veil.dm b/code/modules/antagonists/bloodsucker/powers/veil.dm index ecb0611940..3b722c50b5 100644 --- a/code/modules/antagonists/bloodsucker/powers/veil.dm +++ b/code/modules/antagonists/bloodsucker/powers/veil.dm @@ -92,7 +92,7 @@ H.socks = random_socks(H.gender) //H.eye_color = random_eye_color() REMOVE_TRAIT(H, TRAIT_DISFIGURED, null) // - H.dna.features = random_features(H.dna.species?.id) + H.dna.features = random_features(H.dna.species?.id, H.gender) // Apply Appearance H.update_body(TRUE) // Outfit and underwear, also body and privates. diff --git a/code/modules/mob/dead/new_player/preferences_setup.dm b/code/modules/mob/dead/new_player/preferences_setup.dm index a7fdf2d914..54921e9112 100644 --- a/code/modules/mob/dead/new_player/preferences_setup.dm +++ b/code/modules/mob/dead/new_player/preferences_setup.dm @@ -22,11 +22,7 @@ if(!pref_species) 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) + features = random_features(pref_species?.id, gender) age = rand(AGE_MIN,AGE_MAX) /datum/preferences/proc/update_preview_icon(equip_job = TRUE) From a57828703ed2a5bdf3d55ef9091e85a96e4aa52d Mon Sep 17 00:00:00 2001 From: Ghom <42542238+Ghommie@users.noreply.github.com> Date: Tue, 14 Apr 2020 16:09:31 +0200 Subject: [PATCH 2/2] Update mobs.dm --- code/__HELPERS/mobs.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/__HELPERS/mobs.dm b/code/__HELPERS/mobs.dm index 48c7cab6dc..7a62d7ba1c 100644 --- a/code/__HELPERS/mobs.dm +++ b/code/__HELPERS/mobs.dm @@ -151,7 +151,7 @@ var/body_model = MALE switch(intended_gender) - if(MALE || FEMALE) + if(MALE, FEMALE) body_model = intended_gender if(PLURAL) body_model = pick(MALE,FEMALE)