some fixes

This commit is contained in:
Timothy Teakettle
2020-06-26 22:49:43 +01:00
parent 334d55bef3
commit 9c9868438c
4 changed files with 11 additions and 3 deletions

View File

@@ -463,8 +463,10 @@
if(!new_blood_dna)
return FALSE
LAZYINITLIST(blood_DNA) //if our list of DNA doesn't exist yet, initialise it.
LAZYINITLIST(blood_DNA["color"])
var/old_length = blood_DNA.len
blood_DNA |= new_blood_dna
blood_DNA["color"] += new_blood_dna["bloodcolor"]
if(blood_DNA.len == old_length)
return FALSE
return TRUE
@@ -472,8 +474,11 @@
//to add blood dna info to the object's blood_DNA list
/atom/proc/transfer_blood_dna(list/blood_dna, list/datum/disease/diseases)
LAZYINITLIST(blood_DNA)
LAZYINITLIST(blood_dna["color"])
var/old_length = blood_DNA.len
blood_DNA |= blood_dna
blood_DNA["color"] += blood_dna["bloodcolor"]
if(blood_DNA.len > old_length)
return TRUE
//some new blood DNA was added

View File

@@ -42,6 +42,10 @@
slime_change.Grant(C) //CIT CHANGE
C.faction |= "slime"
/datum/species/jelly/handle_mutant_bodyparts(mob/living/carbon/human/H)
//update blood color to body color
H.dna.species.exotic_blood_color = "#" + H.dna.features["mcolor"]
/datum/species/jelly/spec_life(mob/living/carbon/human/H)
if(H.stat == DEAD || HAS_TRAIT(H, TRAIT_NOMARROW)) //can't farm slime jelly from a dead slime/jelly person indefinitely, and no regeneration for blooduskers
return

View File

@@ -193,9 +193,6 @@
/mob/living/carbon/update_body()
update_body_parts()
// snowflakey thing: update blood colour if a slimeperson
if(isjellyperson(src))
dna.species.exotic_blood_color = "#" + dna.features["mcolor"]
/mob/living/carbon/proc/update_body_parts()
//CHECK FOR UPDATE

View File

@@ -70,6 +70,8 @@
B = new(T)
if(data["blood_DNA"])
B.blood_DNA[data["blood_DNA"]] = data["blood_type"]
if(!B.blood_DNA["color"])
B.blood_DNA["color"] = list(data["bloodcolor"])
if(B.reagents)
B.reagents.add_reagent(type, reac_volume)
B.update_icon()