From 2707ddd7509ecb1fbfbf24ceaaebee4eb3dd1a63 Mon Sep 17 00:00:00 2001 From: ktccd Date: Sat, 1 Apr 2017 17:40:12 +0200 Subject: [PATCH] Cloning-Genitalia-Fix (#277) * Cloning-Genitalia-Fix Fixes the issue with genitals not being re-created with cloning. This should make it so other methods of coming back also gives the organs your DNA says you should have, such as podding people. * Sanity checks and fixes Removed the OLD sanity check for drawing eyes. It was refusing to draw eyes if you had ANY disability. 's far as I know, blind people still have eyes and so do mute people. Also, put a sanity check in give_genitals, just in case a species has DNA with genitals but is a NOGENITALS species. Somehow. IT COULD HAPPEN, ALRIGHT?! ^^ * TRAVIS LOVE ME AGAIN This commit fixes the problem that made Travis hate me previously. Even though THAT part of the code had not been changed... Anyway, it looks more neat now, so that's good. --- code/citadel/organs/genitals.dm | 2 ++ code/datums/dna.dm | 3 +++ code/modules/mob/living/carbon/human/human.dm | 2 ++ code/modules/mob/living/carbon/human/species.dm | 7 +++---- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/code/citadel/organs/genitals.dm b/code/citadel/organs/genitals.dm index 294950f1be..d5d1e8c541 100644 --- a/code/citadel/organs/genitals.dm +++ b/code/citadel/organs/genitals.dm @@ -48,6 +48,8 @@ //proc to give a player their genitals and stuff when they log in /mob/living/carbon/human/proc/give_genitals(clean=0)//clean will remove all pre-existing genitals. proc will then give them any genitals that are enabled in their DNA + if (NOGENITALS in dna.species.species_traits) + return if(clean) var/obj/item/organ/genital/GtoClean for(GtoClean in internal_organs) diff --git a/code/datums/dna.dm b/code/datums/dna.dm index e9b21c28ae..71af078246 100644 --- a/code/datums/dna.dm +++ b/code/datums/dna.dm @@ -247,10 +247,13 @@ dna.struc_enzymes = se domutcheck() + give_genitals(1) + if(mrace || newfeatures || ui) update_body() update_hair() update_body_parts() + update_genitals() update_mutations_overlay() diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 38795bf76f..4e6fd5de15 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -54,6 +54,7 @@ internal_organs += new dna.species.mutanteyes() internal_organs += new /obj/item/organ/brain + give_genitals() ..() /mob/living/carbon/human/OpenCraftingMenu() @@ -628,6 +629,7 @@ hair_style = pick("Bedhead", "Bedhead 2", "Bedhead 3") underwear = "Nude" update_body() + update_genitals() update_hair() /mob/living/carbon/human/singularity_pull(S, current_size) diff --git a/code/modules/mob/living/carbon/human/species.dm b/code/modules/mob/living/carbon/human/species.dm index c2ab5a1045..017f081bd7 100644 --- a/code/modules/mob/living/carbon/human/species.dm +++ b/code/modules/mob/living/carbon/human/species.dm @@ -311,13 +311,12 @@ // eyes - var/has_eyes = TRUE + var/has_eyes = (H.getorgan(/obj/item/organ/eyes) && HD) - if(!H.getorgan(/obj/item/organ/eyes) && HD) + if(!has_eyes) standing += image("icon"='icons/mob/human_face.dmi', "icon_state" = "eyes_missing", "layer" = -BODY_LAYER) - has_eyes = FALSE - if(!(H.disabilities & HUSK)) + if(!HUSK) // lipstick if(H.lip_style && (LIPS in species_traits) && HD) var/image/lips = image("icon"='icons/mob/human_face.dmi', "icon_state"="lips_[H.lip_style]", "layer" = -BODY_LAYER)