From 1f25c49c064ee39f89bf05d1542b5a735ceb0a49 Mon Sep 17 00:00:00 2001 From: SkyMarshal Date: Sun, 5 Feb 2012 21:56:12 -0700 Subject: [PATCH] MOAR BUGFIXES --- code/WorkInProgress/detective_work.dm | 2 +- code/game/atom_procs.dm | 56 +++++++++------------ code/game/objects/devices/PDA/PDA.dm | 2 +- code/game/objects/devices/scanners.dm | 8 +-- code/game/objects/items/item.dm | 2 +- code/modules/chemical/Chemistry-Reagents.dm | 4 +- code/modules/mob/new_player/new_player.dm | 2 +- code/unused/pda2/scanners.dm | 2 +- 8 files changed, 34 insertions(+), 44 deletions(-) diff --git a/code/WorkInProgress/detective_work.dm b/code/WorkInProgress/detective_work.dm index 48e741c729..2fd443fb5c 100644 --- a/code/WorkInProgress/detective_work.dm +++ b/code/WorkInProgress/detective_work.dm @@ -358,7 +358,7 @@ obj/machinery/computer/forensic_scanning scan_process = 0 scan_name = scanning.name scan_data = "[scanning]

" - if (scanning.blood_DNA) + if (scanning.blood_DNA.len) scan_data += "Blood Found:
" for(var/i = 1, i < (scanning.blood_DNA.len + 1), i++) var/list/templist = scanning.blood_DNA[i] diff --git a/code/game/atom_procs.dm b/code/game/atom_procs.dm index 52b1520b2c..aeac2e04bb 100644 --- a/code/game/atom_procs.dm +++ b/code/game/atom_procs.dm @@ -139,7 +139,7 @@ return 0 if (!( src.flags ) & 256) return - if (src.blood_DNA) + if (src.blood_DNA.len) if (istype(src, /obj/item)&&!istype(src, /obj/item/weapon/melee/energy))//Only regular items. Energy melee weapon are not affected. var/obj/item/source2 = src source2.icon_old = src.icon @@ -148,20 +148,15 @@ I.Blend(new /icon('blood.dmi', "itemblood"),ICON_MULTIPLY) I.Blend(new /icon(src.icon, src.icon_state),ICON_UNDERLAY) src.icon = I - if(src.blood_DNA.len) - var/inthere = 0 - for(var/i = 1, i <= src.blood_DNA.len, i++) - var/list/templist = src.blood_DNA[i] - if(templist[1] == M.dna.unique_enzymes && templist[2] == M.dna.b_type) - inthere = 1 - break - if(!inthere) - src.blood_DNA.len++ - src.blood_DNA[src.blood_DNA.len] = list(M.dna.unique_enzymes,M.dna.b_type) - else - var/list/blood_DNA_temp[1] - blood_DNA_temp[1] = list(M.dna.unique_enzymes, M.dna.b_type) - src.blood_DNA = blood_DNA_temp + var/inthere = 0 + for(var/i = 1, i <= src.blood_DNA.len, i++) + var/list/templist = src.blood_DNA[i] + if(templist[1] == M.dna.unique_enzymes && templist[2] == M.dna.b_type) + inthere = 1 + break + if(!inthere) + src.blood_DNA.len++ + src.blood_DNA[src.blood_DNA.len] = list(M.dna.unique_enzymes,M.dna.b_type) else if (istype(src, /turf/simulated)) var/turf/simulated/source2 = src var/list/objsonturf = range(0,src) @@ -179,20 +174,15 @@ this.viruses += newDisease newDisease.holder = this else if (istype(src, /mob/living/carbon/human)) - if(src.blood_DNA.len) - var/inthere = 0 - for(var/i = 1, i <= src.blood_DNA.len, i++) - var/list/templist = src.blood_DNA[i] - if(templist[1] == M.dna.unique_enzymes && templist[2] == M.dna.b_type) - inthere = 1 - break - if(!inthere) - src.blood_DNA.len++ - src.blood_DNA[src.blood_DNA.len] = list(M.dna.unique_enzymes,M.dna.b_type) - else - var/list/blood_DNA_temp[1] - blood_DNA_temp[1] = list(M.dna.unique_enzymes, M.dna.b_type) - src.blood_DNA = blood_DNA_temp + var/inthere = 0 + for(var/i = 1, i <= src.blood_DNA.len, i++) + var/list/templist = src.blood_DNA[i] + if(templist[1] == M.dna.unique_enzymes && templist[2] == M.dna.b_type) + inthere = 1 + break + if(!inthere) + src.blood_DNA.len++ + src.blood_DNA[src.blood_DNA.len] = list(M.dna.unique_enzymes,M.dna.b_type) else return else @@ -249,21 +239,21 @@ if (!( src.flags ) & 256) return - if ( src.blood_DNA ) + if ( src.blood_DNA.len ) if (istype (src, /mob/living/carbon)) var/obj/item/source2 = src - source2.blood_DNA = null + source2.blood_DNA = list() //var/icon/I = new /icon(source2.icon_old, source2.icon_state) //doesnt have icon_old //source2.icon = I if (istype (src, /obj/item)) var/obj/item/source2 = src - source2.blood_DNA = null + source2.blood_DNA = list() // var/icon/I = new /icon(source2.icon_old, source2.icon_state) source2.icon = source2.icon_old source2.update_icon() if (istype(src, /turf/simulated)) var/obj/item/source2 = src - source2.blood_DNA = null + source2.blood_DNA = list() var/icon/I = new /icon(source2.icon_old, source2.icon_state) source2.icon = I if(src.fingerprints && src.fingerprints.len) diff --git a/code/game/objects/devices/PDA/PDA.dm b/code/game/objects/devices/PDA/PDA.dm index c9abad11b9..19c2ffd581 100644 --- a/code/game/objects/devices/PDA/PDA.dm +++ b/code/game/objects/devices/PDA/PDA.dm @@ -738,7 +738,7 @@ user << "\blue No fingerprints found on [C]" else user << text("\blue [C]'s Fingerprints: [md5(C:dna.uni_identity)]") - if ( !(C:blood_DNA) ) + if ( !(C:blood_DNA.len) ) user << "\blue No blood found on [C]" else user << "\blue Blood found on [C]. Analysing..." diff --git a/code/game/objects/devices/scanners.dm b/code/game/objects/devices/scanners.dm index 2d3f8b6c6a..182730a526 100644 --- a/code/game/objects/devices/scanners.dm +++ b/code/game/objects/devices/scanners.dm @@ -122,7 +122,7 @@ MASS SPECTROMETER user << "\blue Done printing." user << text("\blue [M]'s Fingerprints: [md5(M.dna.uni_identity)]") - if ( !(M.blood_DNA) ) + if ( !(M.blood_DNA.len) ) user << "\blue No blood found on [M]" else user << "\blue Blood found on [M]. Analysing..." @@ -145,10 +145,10 @@ MASS SPECTROMETER user << "\blue Blood type: [templist[2]]\nDNA: [templist[1]]" return var/duplicate = 0 - if ((!A.fingerprints || A.fingerprints.len == 0) && !(A.suit_fibers) && !(A.blood_DNA)) + if ((!A.fingerprints || A.fingerprints.len == 0) && !(A.suit_fibers) && !(A.blood_DNA.len)) user << "\blue Unable to locate any fingerprints, materials, fibers, or blood on [A]!" return 0 - else if (A.blood_DNA) + else if (A.blood_DNA.len) user << "\blue Blood found on [A]. Analysing..." sleep(15) if(!duplicate) @@ -231,7 +231,7 @@ MASS SPECTROMETER var/list/blood = temp[4] if(!blood) blood = list() - if(A.blood_DNA) + if(A.blood_DNA.len) for(var/j = 1, j < (A.blood_DNA.len + 1), j++) //Blood~~~ if(!blood.Find(A.blood_DNA[j])) //It isn't! Add! blood += A.blood_DNA[j] diff --git a/code/game/objects/items/item.dm b/code/game/objects/items/item.dm index 6990232470..e0ad793502 100644 --- a/code/game/objects/items/item.dm +++ b/code/game/objects/items/item.dm @@ -100,7 +100,7 @@ t = "huge" else if ((usr.mutations & CLUMSY) && prob(50)) t = "funny-looking" - usr << text("This is a []\icon[][]. It is a [] item.", !src.blood_DNA ? "" : "bloody ",src, src.name, t) + usr << text("This is a []\icon[][]. It is a [] item.", !src.blood_DNA.len ? "" : "bloody ",src, src.name, t) if(src.desc) usr << src.desc return diff --git a/code/modules/chemical/Chemistry-Reagents.dm b/code/modules/chemical/Chemistry-Reagents.dm index aec2e12635..850e89084c 100644 --- a/code/modules/chemical/Chemistry-Reagents.dm +++ b/code/modules/chemical/Chemistry-Reagents.dm @@ -179,7 +179,7 @@ datum var/obj/effect/decal/cleanable/blood/blood_prop = locate() in T if(!blood_prop) blood_prop = new(T) - blood_prop.blood_DNA = list(self.data["blood_DNA"]) + blood_prop.blood_DNA = list(list(self.data["blood_DNA"])) for(var/datum/disease/D in self.data["viruses"]) var/datum/disease/newVirus = new D.type blood_prop.viruses += newVirus @@ -196,7 +196,7 @@ datum var/obj/effect/decal/cleanable/xenoblood/blood_prop = locate() in T if(!blood_prop) blood_prop = new(T) - blood_prop.blood_DNA = list(self.data["blood_DNA"]) + blood_prop.blood_DNA = list(list(self.data["blood_DNA"])) for(var/datum/disease/D in self.data["viruses"]) var/datum/disease/newVirus = new D.type blood_prop.viruses += newVirus diff --git a/code/modules/mob/new_player/new_player.dm b/code/modules/mob/new_player/new_player.dm index 6498340632..64f207624f 100644 --- a/code/modules/mob/new_player/new_player.dm +++ b/code/modules/mob/new_player/new_player.dm @@ -274,7 +274,7 @@ proc/AnnounceArrival(var/mob/living/carbon/human/character, var/rank) if (ticker.current_state == GAME_STATE_PLAYING) var/obj/item/device/radio/intercom/a = new /obj/item/device/radio/intercom(null) - a.autosay("[character.real_name] has arrived on the station.", "Arrivals Announcement Computer") + a.autosay("[character.real_name],[character.wear_id.assignment ? " [character.wear_id.assignment]," : "" ] has arrived on the station.", "Arrivals Announcement Computer") del(a) diff --git a/code/unused/pda2/scanners.dm b/code/unused/pda2/scanners.dm index 9463558b34..499b867954 100644 --- a/code/unused/pda2/scanners.dm +++ b/code/unused/pda2/scanners.dm @@ -62,7 +62,7 @@ dat += "\blue Unable to scan [A]'s fingerprints.\n" else dat += "\blue [H]'s Fingerprints: [md5(H.dna.uni_identity)]\n" - if ( !(H.blood_DNA) ) + if ( !(H.blood_DNA.len) ) dat += "\blue No blood found on [H]\n" else for(var/i = 1, i < H.blood_DNA.len, i++)