From 0b403b3b033c9083245e3dfdabb38b1932dc747c Mon Sep 17 00:00:00 2001 From: phil235 Date: Tue, 31 Mar 2015 19:48:44 +0200 Subject: [PATCH] Fixes lack of dna in old blood. Fixes some comments about blood procs in atoms.dm Small tweak in xeno blood blood_DNA. --- code/game/atoms.dm | 19 ++++++++++++------- .../effects/decals/Cleanable/aliens.dm | 5 +++-- code/game/objects/effects/gibs.dm | 3 --- code/game/turfs/simulated/dirtystation.dm | 2 ++ 4 files changed, 17 insertions(+), 12 deletions(-) diff --git a/code/game/atoms.dm b/code/game/atoms.dm index d750748ce3c..c949a0e96e4 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -279,7 +279,7 @@ var/list/blood_splatter_icons = list() return "\ref[initial(icon)]-[initial(icon_state)]" /atom/proc/add_blood_list(mob/living/carbon/M) - // Returns 1 if we had blood already + // Returns 0 if we have that blood already if(!istype(blood_DNA, /list)) //if our list of DNA doesn't exist yet (or isn't a list) initialise it. blood_DNA = list() //if this blood isn't already in the list, add it @@ -300,15 +300,17 @@ var/list/blood_splatter_icons = list() return 0 if(!check_dna_integrity(M)) //check dna is valid and create/setup if necessary return 0 //no dna! - return + return 1 /obj/add_blood(mob/living/carbon/M) - if(..() == 0) return 0 + if(..() == 0) + return 0 return add_blood_list(M) /obj/item/add_blood(mob/living/carbon/M) var/blood_count = blood_DNA == null ? 0 : blood_DNA.len - if(..() == 0) return 0 + if(..() == 0) + return 0 //apply the blood-splatter overlay if it isn't already in there if(!blood_count && initial(icon) && initial(icon_state)) //try to find a pre-processed blood-splatter. otherwise, make a new one @@ -324,13 +326,15 @@ var/list/blood_splatter_icons = list() return 1 //we applied blood to the item /obj/item/clothing/gloves/add_blood(mob/living/carbon/M) - if(..() == 0) return 0 + if(..() == 0) + return 0 transfer_blood = rand(2, 4) bloody_hands_mob = M return 1 /turf/simulated/add_blood(mob/living/carbon/human/M) - if(..() == 0) return 0 + if(..() == 0) + return 0 var/obj/effect/decal/cleanable/blood/B = locate() in contents //check for existing blood splatter if(!B) @@ -340,7 +344,8 @@ var/list/blood_splatter_icons = list() return 1 //we bloodied the floor /mob/living/carbon/human/add_blood(mob/living/carbon/M) - if(..() == 0) return 0 + if(..() == 0) + return 0 add_blood_list(M) bloody_hands = rand(2, 4) bloody_hands_mob = M diff --git a/code/game/objects/effects/decals/Cleanable/aliens.dm b/code/game/objects/effects/decals/Cleanable/aliens.dm index 3d0b9d31048..4b51be4a825 100644 --- a/code/game/objects/effects/decals/Cleanable/aliens.dm +++ b/code/game/objects/effects/decals/Cleanable/aliens.dm @@ -11,7 +11,7 @@ icon_state = "xfloor1" random_icon_states = list("xfloor1", "xfloor2", "xfloor3", "xfloor4", "xfloor5", "xfloor6", "xfloor7") var/list/viruses = list() - blood_DNA = list() + blood_DNA = list("UNKNOWN DNA" = "X*") /obj/effect/decal/cleanable/xenoblood/Destroy() for(var/datum/disease/D in viruses) @@ -63,4 +63,5 @@ /obj/effect/decal/cleanable/blood/xtracks icon_state = "xtracks" - random_icon_states = null \ No newline at end of file + random_icon_states = null + blood_DNA = list("UNKNOWN DNA" = "X*") \ No newline at end of file diff --git a/code/game/objects/effects/gibs.dm b/code/game/objects/effects/gibs.dm index 6ee8c478ebf..8eb29846fa8 100644 --- a/code/game/objects/effects/gibs.dm +++ b/code/game/objects/effects/gibs.dm @@ -50,11 +50,8 @@ gib.viruses += viruus viruus.holder = gib - gib.blood_DNA = list() if(MobDNA) gib.blood_DNA[MobDNA.unique_enzymes] = MobDNA.blood_type - else if(istype(src, /obj/effect/gibspawner/xeno)) - gib.blood_DNA["UNKNOWN DNA"] = "X*" else if(istype(src, /obj/effect/gibspawner/generic)) // Probably a monkey gib.blood_DNA["Non-human DNA"] = "A+" var/list/directions = gibdirections[i] diff --git a/code/game/turfs/simulated/dirtystation.dm b/code/game/turfs/simulated/dirtystation.dm index 3a5e9e001a2..aaf89409336 100644 --- a/code/game/turfs/simulated/dirtystation.dm +++ b/code/game/turfs/simulated/dirtystation.dm @@ -10,6 +10,7 @@ /obj/effect/decal/cleanable/blood/old/New() ..() icon_state += "-old" + blood_DNA["Non-human DNA"] = "A+" /obj/effect/decal/cleanable/blood/gibs/old name = "old rotting gibs" @@ -19,6 +20,7 @@ ..() icon_state += "-old" dir = pick(1,2,4,8) + blood_DNA["Non-human DNA"] = "A+" /obj/effect/decal/cleanable/vomit/old name = "crusty dried vomit"