From 4ecf20f82276740a78f3bd391aa6bde8bd76d4dc Mon Sep 17 00:00:00 2001 From: ShizCalev Date: Fri, 30 Mar 2018 14:42:00 -0400 Subject: [PATCH 1/2] Fixes mutant bodypart assignments (#36816) * Fixes mutant bodypart assignments * comment --- code/modules/admin/secrets.dm | 6 ++++-- code/modules/admin/verbs/randomverbs.dm | 3 --- code/modules/mob/living/carbon/human/species.dm | 2 +- .../mob/living/carbon/human/species_types/angel.dm | 10 +++++++--- .../mob/living/carbon/human/species_types/dullahan.dm | 1 - .../mob/living/carbon/human/species_types/humans.dm | 3 +-- .../mob/living/carbon/human/species_types/vampire.dm | 1 - .../mob/living/simple_animal/hostile/cat_butcher.dm | 10 +++++----- code/modules/surgery/organs/ears.dm | 1 + code/modules/surgery/organs/tails.dm | 3 +-- 10 files changed, 20 insertions(+), 20 deletions(-) diff --git a/code/modules/admin/secrets.dm b/code/modules/admin/secrets.dm index 5e18378c5198..e8b8b29b0e50 100644 --- a/code/modules/admin/secrets.dm +++ b/code/modules/admin/secrets.dm @@ -410,8 +410,10 @@ if(H.dna.species.id == "human") if(H.dna.features["tail_human"] == "None" || H.dna.features["ears"] == "None") - H.dna.features["tail_human"] = "Cat" - H.dna.features["ears"] = "Cat" + var/obj/item/organ/ears/cat/ears = new + var/obj/item/organ/tail/cat/tail = new + ears.Insert(H, drop_if_replaced=FALSE) + tail.Insert(H, drop_if_replaced=FALSE) var/list/honorifics = list("[MALE]" = list("kun"), "[FEMALE]" = list("chan","tan"), "[NEUTER]" = list("san")) //John Robust -> Robust-kun var/list/names = splittext(H.real_name," ") var/forename = names.len > 1 ? names[2] : names[1] diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm index 778eb25d5afb..6d75c8a0040d 100644 --- a/code/modules/admin/verbs/randomverbs.dm +++ b/code/modules/admin/verbs/randomverbs.dm @@ -1233,9 +1233,6 @@ GLOBAL_LIST_EMPTY(custom_outfits) //Admin created outfits else tail.Remove(H) - H.dna.features["ears"] = "None" - H.dna.features["tail_human"] = "None" - if(!silent) to_chat(H, "You are no longer a cat.") diff --git a/code/modules/mob/living/carbon/human/species.dm b/code/modules/mob/living/carbon/human/species.dm index 609c29b606a0..a0be2d5997c4 100644 --- a/code/modules/mob/living/carbon/human/species.dm +++ b/code/modules/mob/living/carbon/human/species.dm @@ -37,7 +37,7 @@ GLOBAL_LIST_EMPTY(roundstart_races) var/dangerous_existence //A flag for transformation spells that tells them "hey if you turn a person into one of these without preperation, they'll probably die!" var/say_mod = "says" // affects the speech message var/list/default_features = list() // Default mutant bodyparts for this species. Don't forget to set one for every mutant bodypart you allow this species to have. - var/list/mutant_bodyparts = list() // Parts of the body that are diferent enough from the standard human model that they cause clipping with some equipment + var/list/mutant_bodyparts = list() // Visible CURRENT bodyparts that are unique to a species. DO NOT USE THIS AS A LIST OF ALL POSSIBLE BODYPARTS AS IT WILL FUCK SHIT UP! Changes to this list for non-species specific bodyparts (ie cat ears and tails) should be assigned at organ level if possible. Layer hiding is handled by handle_mutant_bodyparts() below. var/list/mutant_organs = list() //Internal organs that are unique to this race. var/speedmod = 0 // this affects the race's speed. positive numbers make it move slower, negative numbers make it move faster var/armor = 0 // overall defense for the race... or less defense, if it's negative. diff --git a/code/modules/mob/living/carbon/human/species_types/angel.dm b/code/modules/mob/living/carbon/human/species_types/angel.dm index 5ebb10fd5626..878282647eed 100644 --- a/code/modules/mob/living/carbon/human/species_types/angel.dm +++ b/code/modules/mob/living/carbon/human/species_types/angel.dm @@ -3,7 +3,7 @@ id = "angel" default_color = "FFFFFF" species_traits = list(SPECIES_ORGANIC,EYECOLOR,HAIR,FACEHAIR,LIPS) - mutant_bodyparts = list("tail_human", "ears", "wings") + mutant_bodyparts = list("wings") default_features = list("mcolor" = "FFF", "tail_human" = "None", "ears" = "None", "wings" = "Angel") use_skintones = 1 no_equip = list(slot_back) @@ -15,7 +15,9 @@ /datum/species/angel/on_species_gain(mob/living/carbon/human/H, datum/species/old_species) ..() - if(H.dna && H.dna.species &&((H.dna.features["wings"] != "Angel") && ("wings" in H.dna.species.mutant_bodyparts))) + if(H.dna && H.dna.species && (H.dna.features["wings"] != "Angel")) + if(!("wings" in H.dna.species.mutant_bodyparts)) + H.dna.species.mutant_bodyparts |= "wings" H.dna.features["wings"] = "Angel" H.update_body() if(ishuman(H) && !fly) @@ -29,7 +31,9 @@ if(H.movement_type & FLYING) H.movement_type &= ~FLYING ToggleFlight(H,0) - if(H.dna && H.dna.species &&((H.dna.features["wings"] != "None") && ("wings" in H.dna.species.mutant_bodyparts))) + if(H.dna && H.dna.species && (H.dna.features["wings"] == "Angel")) + if("wings" in H.dna.species.mutant_bodyparts) + H.dna.species.mutant_bodyparts -= "wings" H.dna.features["wings"] = "None" H.update_body() H.remove_trait(TRAIT_HOLY, SPECIES_TRAIT) diff --git a/code/modules/mob/living/carbon/human/species_types/dullahan.dm b/code/modules/mob/living/carbon/human/species_types/dullahan.dm index 6029182afe92..1665f62af154 100644 --- a/code/modules/mob/living/carbon/human/species_types/dullahan.dm +++ b/code/modules/mob/living/carbon/human/species_types/dullahan.dm @@ -4,7 +4,6 @@ default_color = "FFFFFF" species_traits = list(SPECIES_ORGANIC,EYECOLOR,HAIR,FACEHAIR,LIPS) inherent_traits = list(TRAIT_NOHUNGER,TRAIT_NOBREATH) - mutant_bodyparts = list("tail_human", "ears", "wings") default_features = list("mcolor" = "FFF", "tail_human" = "None", "ears" = "None", "wings" = "None") use_skintones = TRUE mutant_brain = /obj/item/organ/brain/dullahan diff --git a/code/modules/mob/living/carbon/human/species_types/humans.dm b/code/modules/mob/living/carbon/human/species_types/humans.dm index bb0d4fc0f118..891596a3f8d7 100644 --- a/code/modules/mob/living/carbon/human/species_types/humans.dm +++ b/code/modules/mob/living/carbon/human/species_types/humans.dm @@ -3,7 +3,6 @@ id = "human" default_color = "FFFFFF" species_traits = list(SPECIES_ORGANIC,EYECOLOR,HAIR,FACEHAIR,LIPS) - mutant_bodyparts = list("tail_human", "ears", "wings") default_features = list("mcolor" = "FFF", "tail_human" = "None", "ears" = "None", "wings" = "None") use_skintones = 1 skinned_type = /obj/item/stack/sheet/animalhide/human @@ -29,7 +28,7 @@ if(istype(F) && (F.flight) && F.allow_thrust(0.01, src)) return TRUE -datum/species/human/on_species_gain(mob/living/carbon/human/H, datum/species/old_species) +/datum/species/human/on_species_gain(mob/living/carbon/human/H, datum/species/old_species) if(H.dna.features["ears"] == "Cat") mutantears = /obj/item/organ/ears/cat if(H.dna.features["tail_human"] == "Cat") diff --git a/code/modules/mob/living/carbon/human/species_types/vampire.dm b/code/modules/mob/living/carbon/human/species_types/vampire.dm index 2267be85f2c2..e27d7f4f3568 100644 --- a/code/modules/mob/living/carbon/human/species_types/vampire.dm +++ b/code/modules/mob/living/carbon/human/species_types/vampire.dm @@ -4,7 +4,6 @@ default_color = "FFFFFF" species_traits = list(SPECIES_UNDEAD,EYECOLOR,HAIR,FACEHAIR,LIPS,DRINKSBLOOD) inherent_traits = list(TRAIT_NOHUNGER,TRAIT_NOBREATH) - mutant_bodyparts = list("tail_human", "ears", "wings") default_features = list("mcolor" = "FFF", "tail_human" = "None", "ears" = "None", "wings" = "None") exotic_bloodtype = "U" use_skintones = TRUE diff --git a/code/modules/mob/living/simple_animal/hostile/cat_butcher.dm b/code/modules/mob/living/simple_animal/hostile/cat_butcher.dm index 0360aa0f4b60..0489215665f6 100644 --- a/code/modules/mob/living/simple_animal/hostile/cat_butcher.dm +++ b/code/modules/mob/living/simple_animal/hostile/cat_butcher.dm @@ -34,10 +34,10 @@ . = ..() if(. && prob(35) && iscarbon(target)) var/mob/living/carbon/human/L = target - if(L.dna.features["tail_human"] == "Cat") + var/obj/item/organ/tail/cat/tail = L.getorgan(/obj/item/organ/tail/cat) + if(!QDELETED(tail)) visible_message("[src] severs [L]'s tail in one swift swipe!", "You sever [L]'s tail in one swift swipe.") - L.dna.features["tail_human"] -= "Cat" - L.dna.species.mutant_bodyparts -= "tail_human" - L.update_body() - new /obj/item/organ/tail/cat(get_turf(target)) + tail.Remove(L) + var/obj/item/organ/tail/cat/dropped_tail = new(target.drop_location()) + dropped_tail.color = L.hair_color return 1 diff --git a/code/modules/surgery/organs/ears.dm b/code/modules/surgery/organs/ears.dm index db90bbf92449..fff342a10143 100644 --- a/code/modules/surgery/organs/ears.dm +++ b/code/modules/surgery/organs/ears.dm @@ -96,5 +96,6 @@ ..() if(istype(H)) color = H.hair_color + H.dna.features["ears"] = "None" H.dna.species.mutant_bodyparts -= "ears" H.update_body() diff --git a/code/modules/surgery/organs/tails.dm b/code/modules/surgery/organs/tails.dm index 076db2390dde..8b05cbef08b1 100644 --- a/code/modules/surgery/organs/tails.dm +++ b/code/modules/surgery/organs/tails.dm @@ -30,12 +30,11 @@ /obj/item/organ/tail/cat/Remove(mob/living/carbon/human/H, special = 0) ..() if(istype(H)) + H.dna.features["tail_human"] = "None" H.dna.species.mutant_bodyparts -= "tail_human" - tail_type = H.dna.features["tail_human"] color = H.hair_color H.update_body() - /obj/item/organ/tail/lizard name = "lizard tail" desc = "A severed lizard tail. Somewhere, no doubt, a lizard hater is very pleased with themselves." From 14e459a8c9b89a329b7358b702f633cdf8ae6496 Mon Sep 17 00:00:00 2001 From: yogstation13-bot Date: Fri, 30 Mar 2018 19:42:51 +0100 Subject: [PATCH 2/2] Fixes mutant bodypart assignments