[Alternative to #6407] Makes mutant bodyparts and mutcolors into editable genetic traits (#6750)

* Makes mutant bodyparts and mutcolors into editable genetic traits (plus a whole shitload of otherwise out of scope code improvements because I just HAD to touch old code)

* Mirror

* genetically-editable mutant bodyparts and colors - skyrat edition

Co-authored-by: Funce <funce.973@gmail.com>
This commit is contained in:
Y0SH1M4S73R
2021-07-08 16:04:19 +01:00
committed by GitHub
co-authored by Funce
parent 091024586d
commit 93d03dc6bb
62 changed files with 731 additions and 138 deletions
@@ -39,5 +39,10 @@
human_target.dna.features["moth_wings"] = human_target.dna.features["original_moth_wings"]
else
human_target.dna.features["moth_wings"] = "Plain"
//SKYRAT EDIT REMOVAL BEGIN - CUSTOMIZATION
/*
human_target.dna.update_uf_block(DNA_MOTH_WINGS_BLOCK)
*/
//SKYRAT EDIT REMOVAL END
human_target.update_mutant_bodyparts()
return ..()
+22 -7
View File
@@ -6,6 +6,7 @@
icon_state = "severedtail"
zone = BODY_ZONE_PRECISE_GROIN
slot = ORGAN_SLOT_TAIL
/// The sprite accessory this tail gives to the human it's attached to. If null, it will inherit its value from the human's DNA once attached.
var/tail_type = "None"
/obj/item/organ/tail/Insert(mob/living/carbon/human/tail_owner, special = FALSE, drop_if_replaced = TRUE)
@@ -28,13 +29,16 @@
if(istype(tail_owner))
var/default_part = tail_owner.dna.species.mutant_bodyparts["tail_human"]
if(!default_part || default_part == "None")
tail_owner.dna.features["tail_human"] = tail_owner.dna.species.mutant_bodyparts["tail_human"] = tail_type
if(tail_type)
tail_owner.dna.features["tail_human"] = tail_owner.dna.species.mutant_bodyparts["tail_human"] = tail_type
tail_owner.dna.update_uf_block(DNA_HUMAN_TAIL_BLOCK)
else
tail_owner.dna.species.mutant_bodyparts["tail_human"] = tail_owner.dna.features["tail_human"]
tail_owner.update_body()
/obj/item/organ/tail/cat/Remove(mob/living/carbon/human/tail_owner, special = FALSE)
..()
if(istype(tail_owner))
tail_owner.dna.features["tail_human"] = "None"
tail_owner.dna.species.mutant_bodyparts -= "tail_human"
color = tail_owner.hair_color
tail_owner.update_body()
@@ -46,6 +50,7 @@
desc = "A severed lizard tail. Somewhere, no doubt, a lizard hater is very pleased with themselves."
color = "#116611"
tail_type = "Smooth"
/// The sprite accessory this tail gives to the human it's attached to. If null, it will inherit its value from the human's DNA once attached.
var/spines = "None"
//SKYRAT EDIT REMOVAL BEGIN - CUSTOMIZATION
@@ -60,18 +65,25 @@
// Checks here are necessary so it wouldn't overwrite the tail of a lizard it spawned in
var/default_part = tail_owner.dna.species.mutant_bodyparts["tail_lizard"]
if(!default_part || default_part == "None")
tail_owner.dna.features["tail_lizard"] = tail_owner.dna.species.mutant_bodyparts["tail_lizard"] = tail_type
if(tail_type)
tail_owner.dna.features["tail_lizard"] = tail_owner.dna.species.mutant_bodyparts["tail_lizard"] = tail_type
tail_owner.dna.update_uf_block(DNA_LIZARD_TAIL_BLOCK)
else
tail_owner.dna.species.mutant_bodyparts["tail_lizard"] = tail_owner.dna.features["tail_lizard"]
default_part = tail_owner.dna.species.mutant_bodyparts["spines"]
if(!default_part || default_part == "None")
tail_owner.dna.features["spines"] = tail_owner.dna.species.mutant_bodyparts["spines"] = spines
if(spines)
tail_owner.dna.features["spines"] = tail_owner.dna.species.mutant_bodyparts["spines"] = spines
tail_owner.dna.update_uf_block(DNA_SPINES_BLOCK)
else
tail_owner.dna.species.mutant_bodyparts["spines"] = tail_owner.dna.features["spines"]
tail_owner.update_body()
/obj/item/organ/tail/lizard/Remove(mob/living/carbon/human/tail_owner, special = FALSE)
..()
if(istype(tail_owner))
tail_owner.dna.species.mutant_bodyparts -= "tail_lizard"
tail_owner.dna.species.mutant_bodyparts -= "spines"
color = "#" + tail_owner.dna.features["mcolor"]
tail_type = tail_owner.dna.features["tail_lizard"]
spines = tail_owner.dna.features["spines"]
@@ -92,6 +104,8 @@
/obj/item/organ/tail/lizard/fake
name = "fabricated lizard tail"
desc = "A fabricated severed lizard tail. This one's made of synthflesh. Probably not usable for lizard wine."
tail_type = null
spines = null
/obj/item/organ/tail/monkey
name = "monkey tail"
@@ -106,13 +120,14 @@
if(istype(tail_owner))
if(!("tail_monkey" in tail_owner.dna.species.mutant_bodyparts))
tail_owner.dna.species.mutant_bodyparts |= "tail_monkey"
tail_owner.dna.features["tail_monkey"] = tail_type
if(tail_type)
tail_owner.dna.features["tail_monkey"] = tail_type
tail_owner.dna.update_uf_block(DNA_MONKEY_TAIL_BLOCK)
tail_owner.update_body()
/obj/item/organ/tail/monkey/Remove(mob/living/carbon/human/tail_owner, special = FALSE)
..()
if(istype(tail_owner))
tail_owner.dna.features["tail_monkey"] = "None"
tail_owner.dna.species.mutant_bodyparts -= "tail_monkey"
tail_owner.update_body()
*/