diff --git a/code/WorkInProgress/Cael_Aislinn/Tajara/examine.dm b/code/WorkInProgress/Cael_Aislinn/Tajara/examine.dm index 2c57d87e929..dde36fcd480 100644 --- a/code/WorkInProgress/Cael_Aislinn/Tajara/examine.dm +++ b/code/WorkInProgress/Cael_Aislinn/Tajara/examine.dm @@ -16,8 +16,8 @@ t_him = "her" if (src.w_uniform) - if (src.w_uniform.blood_DNA.len) - usr << "\red [src.name] is wearing a[src.w_uniform.blood_DNA.len ? " bloody " : " "] \icon[src.w_uniform] [src.w_uniform.name]!" + if (src.w_uniform.blood_DNA) + usr << "\red [src.name] is wearing a[src.w_uniform.blood_DNA ? " bloody " : " "] \icon[src.w_uniform] [src.w_uniform.name]!" else usr << "\blue [src.name] is wearing a \icon[src.w_uniform] [src.w_uniform.name]." @@ -25,8 +25,8 @@ usr << "\blue [src.name] is \icon[src.handcuffed] handcuffed!" if (src.wear_suit) - if (src.wear_suit.blood_DNA.len) - usr << "\red [src.name] has a[src.wear_suit.blood_DNA.len ? " bloody " : " "] \icon[src.wear_suit] [src.wear_suit.name] on!" + if (src.wear_suit.blood_DNA) + usr << "\red [src.name] has a[src.wear_suit.blood_DNA ? " bloody " : " "] \icon[src.wear_suit] [src.wear_suit.name] on!" else usr << "\blue [src.name] has a \icon[src.wear_suit] [src.wear_suit.name] on." @@ -37,43 +37,43 @@ usr << "\blue [src.name] has a \icon[src.r_ear] [src.r_ear.name] on [t_his] right ear." if (src.wear_mask) - if (src.wear_mask.blood_DNA.len) - usr << "\red [src.name] has a[src.wear_mask.blood_DNA.len ? " bloody " : " "] \icon[src.wear_mask] [src.wear_mask.name] on [t_his] face!" + if (src.wear_mask.blood_DNA) + usr << "\red [src.name] has a[src.wear_mask.blood_DNA ? " bloody " : " "] \icon[src.wear_mask] [src.wear_mask.name] on [t_his] face!" else usr << "\blue [src.name] has a \icon[src.wear_mask] [src.wear_mask.name] on [t_his] face." if (src.l_hand) - if (src.l_hand.blood_DNA.len) - usr << "\red [src.name] has a[src.l_hand.blood_DNA.len ? " bloody " : " "] \icon[src.l_hand] [src.l_hand.name] in [t_his] left hand!" + if (src.l_hand.blood_DNA) + usr << "\red [src.name] has a[src.l_hand.blood_DNA ? " bloody " : " "] \icon[src.l_hand] [src.l_hand.name] in [t_his] left hand!" else usr << "\blue [src.name] has a \icon[src.l_hand] [src.l_hand.name] in [t_his] left hand." if (src.r_hand) - if (src.r_hand.blood_DNA.len) - usr << "\red [src.name] has a[src.r_hand.blood_DNA.len ? " bloody " : " "] \icon[src.r_hand] [src.r_hand.name] in [t_his] right hand!" + if (src.r_hand.blood_DNA) + usr << "\red [src.name] has a[src.r_hand.blood_DNA ? " bloody " : " "] \icon[src.r_hand] [src.r_hand.name] in [t_his] right hand!" else usr << "\blue [src.name] has a \icon[src.r_hand] [src.r_hand.name] in [t_his] right hand." if (src.belt) - if (src.belt.blood_DNA.len) - usr << "\red [src.name] has a[src.belt.blood_DNA.len ? " bloody " : " "] \icon[src.belt] [src.belt.name] on [t_his] belt!" + if (src.belt.blood_DNA) + usr << "\red [src.name] has a[src.belt.blood_DNA ? " bloody " : " "] \icon[src.belt] [src.belt.name] on [t_his] belt!" else usr << "\blue [src.name] has a \icon[src.belt] [src.belt.name] on [t_his] belt." if(src.s_store) - if(src.s_store.blood_DNA.len) - usr << "\red [src.name] has a[src.s_store.blood_DNA.len ? " bloody " : " "] \icon[src.s_store] [src.s_store.name] on [t_his][src.wear_suit.blood_DNA.len ? " bloody " : " "] \icon[src.wear_suit] [src.wear_suit.name]!" + if(src.s_store.blood_DNA) + usr << "\red [src.name] has a[src.s_store.blood_DNA ? " bloody " : " "] \icon[src.s_store] [src.s_store.name] on [t_his][src.wear_suit.blood_DNA ? " bloody " : " "] \icon[src.wear_suit] [src.wear_suit.name]!" else - usr << "\blue [src.name] has a \icon[src.s_store] [src.s_store.name] on [t_his][src.wear_suit.blood_DNA.len ? " bloody " : " "] \icon[src.wear_suit] [src.wear_suit.name]." + usr << "\blue [src.name] has a \icon[src.s_store] [src.s_store.name] on [t_his][src.wear_suit.blood_DNA ? " bloody " : " "] \icon[src.wear_suit] [src.wear_suit.name]." if (src.shoes) - usr << "[src.shoes.blood_DNA.len ? "\red" : "\blue"][src.name] has a[src.shoes.blood_DNA.len ? " bloody " : " "] \icon[src.shoes] [src.shoes.name] on [t_his] feet." + usr << "[src.shoes.blood_DNA ? "\red" : "\blue"][src.name] has a[src.shoes.blood_DNA ? " bloody " : " "] \icon[src.shoes] [src.shoes.name] on [t_his] feet." if (src.gloves) - if (src.gloves.blood_DNA.len) + if (src.gloves.blood_DNA) usr << "\red [src.name] has bloody \icon[src.gloves] [src.gloves.name] on [t_his] hands!" else usr << "\blue [src.name] has \icon[src.gloves] [src.gloves.name] on [t_his] hands." - else if (src.blood_DNA.len) + else if (src.blood_DNA) usr << "\red [src.name] has bloody hands!" if (src.back) diff --git a/code/WorkInProgress/Cael_Aislinn/Tajara/tajaran.dm b/code/WorkInProgress/Cael_Aislinn/Tajara/tajaran.dm index 3a718e18de5..73f2c0fd741 100644 --- a/code/WorkInProgress/Cael_Aislinn/Tajara/tajaran.dm +++ b/code/WorkInProgress/Cael_Aislinn/Tajara/tajaran.dm @@ -144,7 +144,7 @@ overlays += image("icon" = 'uniform_fat.dmi', "icon_state" = "[t1][!lying ? "_s" : "_l"]", "layer" = MOB_LAYER) else*/ overlays += image("icon" = 'uniform.dmi', "icon_state" = text("[][]",t1, (!(lying) ? "_s" : "_l")), "layer" = MOB_LAYER) - if (w_uniform.blood_DNA.len) + if (w_uniform.blood_DNA) var/icon/stain_icon = icon('blood.dmi', "uniformblood[!lying ? "" : "2"]") overlays += image("icon" = stain_icon, "layer" = MOB_LAYER) @@ -174,14 +174,14 @@ else if(ro.destroyed) gloves_icon.Blend(new /icon('limb_mask.dmi', "left_[lying?"l":"s"]"), ICON_MULTIPLY) overlays += image(gloves_icon, "layer" = MOB_LAYER) - if (gloves.blood_DNA.len) + if (gloves.blood_DNA) var/icon/stain_icon = icon('blood.dmi', "bloodyhands[!lying ? "" : "2"]") if(lo.destroyed) stain_icon.Blend(new /icon('limb_mask.dmi', "right_[lying?"l":"s"]"), ICON_MULTIPLY) else if(ro.destroyed) stain_icon.Blend(new /icon('limb_mask.dmi', "left_[lying?"l":"s"]"), ICON_MULTIPLY) overlays += image("icon" = stain_icon, "layer" = MOB_LAYER) - else if (blood_DNA.len) + else if (blood_DNA) var/icon/stain_icon = icon('blood.dmi', "bloodyhands[!lying ? "" : "2"]") if(lo.destroyed) stain_icon.Blend(new /icon('limb_mask.dmi', "right_[lying?"l":"s"]"), ICON_MULTIPLY) @@ -210,7 +210,7 @@ else if(ro.destroyed && !lying) shoes_icon.Blend(new /icon('limb_mask.dmi', "left[lying?"_l":""]"), ICON_MULTIPLY) overlays += image(shoes_icon, "layer" = MOB_LAYER) - if (shoes.blood_DNA.len) + if (shoes.blood_DNA) var/icon/stain_icon = icon('blood.dmi', "shoesblood[!lying ? "" : "2"]") if(lo.destroyed) stain_icon.Blend(new /icon('limb_mask.dmi', "right_[lying?"l":"s"]"), ICON_MULTIPLY) @@ -269,7 +269,7 @@ var/t1 = wear_suit.icon_state overlays += image("icon" = 'suit.dmi', "icon_state" = text("[][]", t1, (!( lying ) ? null : "2")), "layer" = MOB_LAYER) if (wear_suit) - if (wear_suit.blood_DNA.len) + if (wear_suit.blood_DNA) var/icon/stain_icon = null if (istype(wear_suit, /obj/item/clothing/suit/armor/vest || /obj/item/clothing/suit/storage/wcoat)) stain_icon = icon('blood.dmi', "armorblood[!lying ? "" : "2"]") @@ -309,7 +309,7 @@ var/t1 = wear_mask.icon_state overlays += image("icon" = 'mask.dmi', "icon_state" = text("[][]", t1, (!( lying ) ? null : "2")), "layer" = MOB_LAYER) if (!istype(wear_mask, /obj/item/clothing/mask/cigarette)) - if (wear_mask.blood_DNA.len) + if (wear_mask.blood_DNA) var/icon/stain_icon = icon('blood.dmi', "maskblood[!lying ? "" : "2"]") overlays += image("icon" = stain_icon, "layer" = MOB_LAYER) wear_mask.screen_loc = ui_mask @@ -323,7 +323,7 @@ overlays += image("icon" = head_icon, "layer" = MOB_LAYER) if(gimmick_hat) overlays += image("icon" = icon('gimmick_head.dmi', "[gimmick_hat][!lying ? "" : "2"]"), "layer" = MOB_LAYER) - if (head.blood_DNA.len) + if (head.blood_DNA) var/icon/stain_icon = icon('blood.dmi', "helmetblood[!lying ? "" : "2"]") overlays += image("icon" = stain_icon, "layer" = MOB_LAYER) head.screen_loc = ui_head diff --git a/code/defines/atom.dm b/code/defines/atom.dm index dab843ea9f6..a25b19fa343 100644 --- a/code/defines/atom.dm +++ b/code/defines/atom.dm @@ -5,7 +5,7 @@ var/list/fingerprints var/list/fingerprintshidden var/fingerprintslast = null - var/list/blood_DNA = list() + var/list/blood_DNA var/last_bumped = 0 var/pass_flags = 0 @@ -13,7 +13,7 @@ var/datum/reagents/reagents = null //Detective Work, used for the duplicate data points kept in the scanners - var/list/original_atom = list() + var/list/original_atom //var/chem_is_open_container = 0 // replaced by OPENCONTAINER flags and atom/proc/is_open_container() @@ -242,4 +242,4 @@ atom/movable/proc/forceMove(atom/destination) loc = destination loc.Entered(src) return 1 - return 0 + return 0 diff --git a/code/game/atom_procs.dm b/code/game/atom_procs.dm index 9d4083602eb..7662a1b7d6d 100644 --- a/code/game/atom_procs.dm +++ b/code/game/atom_procs.dm @@ -141,6 +141,7 @@ for(var/i = 1, i <= src.fingerprints.len, i++) if(length(src.fingerprints[i]) != 69) src.fingerprints.Remove(src.fingerprints[i]) + if(fingerprints && !fingerprints.len) del(fingerprints) return 1 else if(src.fingerprintslast != M.key) @@ -158,10 +159,7 @@ if (!( src.flags ) & 256) return if(!blood_DNA) - var/turf/Z = get_turf(src) - message_admins("\red ERROR: [src] at [Z.x], [Z.y], [Z.z] is missing it's blood_DNA list!") - log_game("\red ERROR: [src] at [Z.x], [Z.y], [Z.z] is missing it's blood_DNA list!") - return + blood_DNA = list() if (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 @@ -278,10 +276,10 @@ log_game("\red ERROR: [src] at [Z.x], [Z.y], [Z.z] is missing it's blood_DNA list!") blood_DNA = list() return - if ( src.blood_DNA.len ) + if ( src.blood_DNA ) if (istype (src, /mob/living/carbon)) var/obj/item/source2 = src - source2.blood_DNA = list() + del(source2.blood_DNA) if(ishuman(src)) var/mob/living/carbon/human/M = src M.bloody_hands = 0 @@ -289,7 +287,7 @@ //source2.icon = I if (istype (src, /obj/item)) var/obj/item/source2 = src - source2.blood_DNA = list() + del(source2.blood_DNA) // var/icon/I = new /icon(source2.icon_old, source2.icon_state) if(source2.icon_old) source2.icon = source2.icon_old @@ -302,7 +300,7 @@ G.transfer_blood = 0 if (istype(src, /turf/simulated)) var/obj/item/source2 = src - source2.blood_DNA = list() + del(source2.blood_DNA) if(source2.icon_old) var/icon/I = new /icon(source2.icon_old, source2.icon_state) source2.icon = I @@ -327,8 +325,8 @@ break else src.fingerprints[i] = "1=" + prints["1"] + "&2=" + new_print - if(!src.fingerprints) - src.fingerprints = list() + if(fingerprints && !fingerprints.len) + del(fingerprints) if(istype(src, /mob/living/carbon/human)) var/mob/living/carbon/human/M = src M.update_clothing() diff --git a/code/game/machinery/camera.dm b/code/game/machinery/camera.dm index b980e24c108..02897e1fcff 100644 --- a/code/game/machinery/camera.dm +++ b/code/game/machinery/camera.dm @@ -66,6 +66,11 @@ continue else if (M == usr) continue + var/turf/temp_turf = get_turf(M) + if(temp_turf.z != 1 && temp_turf.z != 5) //Not on mining or the station. + continue + if(!checkcameravis(M)) //Not near a camera + continue var/name = M.name if (name in names) diff --git a/code/game/objects/devices/PDA/PDA.dm b/code/game/objects/devices/PDA/PDA.dm index 17915b0c443..7bbefbc4c2a 100755 --- a/code/game/objects/devices/PDA/PDA.dm +++ b/code/game/objects/devices/PDA/PDA.dm @@ -749,8 +749,10 @@ user << "\blue No fingerprints found on [C]" else user << text("\blue [C]'s Fingerprints: [md5(C:dna.uni_identity)]") - if ( !(C:blood_DNA.len) ) + if ( !C:blood_DNA || !C:blood_DNA.len ) user << "\blue No blood found on [C]" + if(C:blood_DNA) + del(C:blood_DNA) else user << "\blue Blood found on [C]. Analysing..." spawn(15) diff --git a/code/game/objects/devices/scanners.dm b/code/game/objects/devices/scanners.dm index 8d6323ac1ec..f6973408f5e 100644 --- a/code/game/objects/devices/scanners.dm +++ b/code/game/objects/devices/scanners.dm @@ -123,8 +123,10 @@ MASS SPECTROMETER user << "\blue Done printing." user << text("\blue [M]'s Fingerprints: [md5(M.dna.uni_identity)]") - if ( !(M.blood_DNA.len) ) + if ( !M.blood_DNA || !M.blood_DNA.len ) user << "\blue No blood found on [M]" + if(M.blood_DNA) + del(M.blood_DNA) else user << "\blue Blood found on [M]. Analysing..." spawn(15) @@ -147,16 +149,16 @@ MASS SPECTROMETER A.fingerprints = list() src.add_fingerprint(user) if (istype(A, /obj/effect/decal/cleanable/blood) || istype(A, /obj/effect/rune)) - if(!isnull(A.blood_DNA.len)) + if(!isnull(A.blood_DNA)) for(var/i = 1, i <= A.blood_DNA.len, i++) var/list/templist = A.blood_DNA[i] 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.len)) + if ((!A.fingerprints || !A.fingerprints.len) && !A.suit_fibers && !A.blood_DNA) user << "\blue Unable to locate any fingerprints, materials, fibers, or blood on [A]!" return 0 - else if (A.blood_DNA.len) + else if (A.blood_DNA) user << "\blue Blood found on [A]. Analysing..." sleep(15) if(!duplicate) @@ -169,8 +171,10 @@ MASS SPECTROMETER user << "\blue Blood type: [templist[2]]\nDNA: [templist[1]]" else user << "\blue No Blood Located" - if(!A.fingerprints || A.fingerprints.len == 0) + if(!A.fingerprints || !A.fingerprints.len) user << "\blue No Fingerprints Located." + if(A.fingerprints) + del(A.fingerprints) else user << text("\blue Isolated [A.fingerprints.len] fingerprints: Data Stored: Scan with Hi-Res Forensic Scanner to retrieve.") if(!duplicate) diff --git a/code/game/objects/items/item.dm b/code/game/objects/items/item.dm index bf3c7f3d118..dea189b4552 100755 --- a/code/game/objects/items/item.dm +++ b/code/game/objects/items/item.dm @@ -101,13 +101,7 @@ t = "huge" else if ((usr.mutations & CLUMSY) && prob(50)) t = "funny-looking" - if(!blood_DNA) - var/turf/Z = get_turf(src) - message_admins("\red ERROR: [src] at [Z.x], [Z.y], [Z.z] is missing it's blood_DNA list!") - log_game("\red ERROR: [src] at [Z.x], [Z.y], [Z.z] is missing it's blood_DNA list!") - blood_DNA = list() - return - usr << text("This is a []\icon[][]. It is a [] item.", !src.blood_DNA.len ? "" : "bloody ",src, src.name, t) + usr << text("This is a []\icon[][]. It is a [] item.", !src.blood_DNA ? "" : "bloody ",src, src.name, t) if(src.desc) usr << src.desc return diff --git a/code/modules/DetectiveWork/detective_work.dm b/code/modules/DetectiveWork/detective_work.dm index 3a80fcec216..55f34ac5806 100644 --- a/code/modules/DetectiveWork/detective_work.dm +++ b/code/modules/DetectiveWork/detective_work.dm @@ -307,23 +307,17 @@ obj/machinery/computer/forensic_scanning var/identifier = text2num(href_list["identifier"]) var/list/outputs = misc[identifier] var/item_name = get_name(outputs[1]) - temp += "Consolidated data points: [item_name]
" + temp += "Consolidated data points: [item_name]
" var/list/fibers = outputs[2] if(fibers && fibers.len) - var/dat = "[fibers[1]]" - for(var/j = 2, j <= fibers.len, j++) - dat += "
      [fibers[j]]" - temp += "    Fibers: [dat]
" - else - temp += "    No fibers found." + temp += " Fibers:
" + for(var/j = 1, j <= fibers.len, j++) + temp += "
      [fibers[j]]" var/list/blood = outputs[3] if(blood && blood.len) - var/dat = "[blood[1]]" - for(var/j = 2, j <= blood.len, j++) - dat += "
      [blood[j]]" - temp += "    Blood: [dat]
" - else - temp += "    No blood found.
" + temp += " Blood:
" + for(var/j = 1, j <= blood.len, j++) + temp += "      [blood[j]]
" else temp = "ERROR. Database not found!
" temp += "
{Delete This Record}" @@ -338,23 +332,17 @@ obj/machinery/computer/forensic_scanning P.name = "Auxiliary Database File ([item_name])" P.overlays += "paper_words" P.info = "Auxiliary Evidence Database

" - P.info += "Consolidated data points: [item_name]
" + P.info += "Consolidated data points: [item_name]
" var/list/fibers = outputs[2] if(fibers && fibers.len) - var/dat = "[fibers[1]]" - for(var/j = 2, j <= fibers.len, j++) - dat += "
      [fibers[j]]" - P.info += "    Fibers: [dat]
" - else - P.info += "    No fibers found." + P.info += " Fibers:
" + for(var/j = 1, j <= fibers.len, j++) + P.info += "
      [fibers[j]]" var/list/blood = outputs[3] if(blood && blood.len) - var/dat = "[blood[1]]" - for(var/j = 2, j <= blood.len, j++) - dat += "
      [blood[j]]" - P.info += "    Blood: [dat]
" - else - P.info += "    No blood found.
" + P.info += " Blood:
" + for(var/j = 1, j <= blood.len, j++) + P.info += "      [blood[j]]
" else usr << "ERROR. Database not found!
" if("scan") @@ -390,7 +378,7 @@ obj/machinery/computer/forensic_scanning scan_process = 0 scan_name = scanning.name scan_data = "[scanning]

" - if (scanning.blood_DNA.len) + if (scanning.blood_DNA) scan_data += "Blood Found:
" for(var/i = 1, i <= scanning.blood_DNA.len, i++) var/list/templist = scanning.blood_DNA[i] @@ -398,8 +386,6 @@ obj/machinery/computer/forensic_scanning else scan_data += "No Blood Found

" if(!scanning.fingerprints) - scanning.fingerprints = list() - if (!length(scanning.fingerprints)) scan_data += "No Fingerprints Found

" else var/list/L = scanning.fingerprints @@ -433,7 +419,7 @@ obj/machinery/computer/forensic_scanning if(istype(scanning,/obj/item/device/detective_scanner)) scan_data += "
Data transfered from Scanner to Database.
" add_data_scanner(scanning) - else if(!length(scanning.fingerprints)) + else if(!scanning.fingerprints) scan_data += "
Add to Database?
" else temp = "Scan Failed: No Object" @@ -502,7 +488,7 @@ obj/machinery/computer/forensic_scanning A.suit_fibers = tempsuit_fibers backup_DNA = A.blood_DNA A.blood_DNA = tempblood_DNA - if((!A.fingerprints || !length(A.fingerprints))) //No prints + if((!A.fingerprints)) //No prints var/merged = 0 if(!misc) misc = list() @@ -542,7 +528,7 @@ obj/machinery/computer/forensic_scanning misc[misc.len] = templist //Store it! return !merged else //Has prints. - var/list/found_prints[A.fingerprints.len + 1] + var/list/found_prints[A.fingerprints.len] for(var/i = 1, i <= found_prints.len, i++) found_prints[i] = 0 if(!files) @@ -611,7 +597,7 @@ obj/machinery/computer/forensic_scanning perp_list.len++ perp_list[perp_list.len] = sum_list files[i] = perp_list - for(var/m = 1, m < found_prints.len, m++) //Uh Oh! A print wasn't used! New datapoint! + for(var/m = 1, m <= found_prints.len, m++) //Uh Oh! A print wasn't used! New datapoint! if(found_prints[m] == 0) var/list/newperp[2] var/list/sum_list[4] diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index 22049a61a38..e73fb0c8a91 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -139,8 +139,6 @@ verbs += /client/proc/only_one // Fateweaver suggested I do this - Doohl verbs += /client/proc/callprocgen verbs += /client/proc/callprocobj - verbs += /client/proc/cmd_debug_prints - verbs += /client/proc/cmd_debug_blood verbs += /client/proc/rnd_check_designs if (holder.level >= 5)//Game Admin******************************************************************** @@ -426,8 +424,6 @@ verbs -= /client/proc/delbook verbs -= /client/proc/Force_Event_admin verbs -= /client/proc/radioalert - verbs -= /client/proc/cmd_debug_prints - verbs -= /client/proc/cmd_debug_blood verbs -= /client/proc/rnd_check_designs verbs -= /client/proc/make_tajaran diff --git a/code/modules/admin/verbs/debug.dm b/code/modules/admin/verbs/debug.dm index 29aa471f172..d72c8c60bc6 100644 --- a/code/modules/admin/verbs/debug.dm +++ b/code/modules/admin/verbs/debug.dm @@ -813,75 +813,4 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that M.equip_if_possible(W, M.slot_wear_id) M.update_clothing() - return - - -/client/proc/cmd_debug_blood() - set category = "Debug" - set name = "Analyze all blood_DNA" - - // to prevent REALLY stupid activations - switch(alert("Are you sure?", ,"Yes", "No")) - if("No") - return - world << "\red ALERT! \black Standby for high CPU bugtesting to determine missing blood_DNA values!" - world << "\red THIS WILL PROBABLY LAG LIKE HELL." - world << "Initiating in 10 BYOND seconds..." - log_admin("[key_name(src)] has initiated a scan of all blood_DNA lists!") - message_admins("[key_name_admin(src)] has initiated a scan of all blood_DNA lists!", 0) - sleep(100) - world << "\red SCAN INITIATED." - spawn(0) //I am not stupid enough to leave that in a regular loop. - for(var/atom/O in world) - if(!islist(O.blood_DNA)) - var/turf/T = get_turf(O) - if(istype(O.loc,/turf)) - src << "[O] at [T.x],[T.y],[T.z] has a non-list blood_DNA variable! (Last touched by [O.fingerprintslast])" - else - src << "[O] in [O.loc] at [T.x],[T.y],[T.z] has a non-list blood_DNA variable! (Last touched by [O.fingerprintslast])" - world << "\red SCAN COMPLETE." - world << "Thank you for your patience." - return - - -/client/proc/cmd_debug_prints() - set category = "Debug" - set name = "Analyze all fingerprints" - - // to prevent REALLY stupid activations - switch(alert("Are you sure?", ,"Yes", "No")) - if("No") - return - world << "\red ALERT! \black Standby for high CPU bugtesting to determine incorrect fingerprint values!" - world << "\red THIS WILL PROBABLY LAG LIKE HELL." - world << "Initiating in 10 BYOND seconds..." - log_admin("[key_name(src)] has initiated a scan of all fingerprints!") - message_admins("[key_name_admin(src)] has initiated a scan of all fingerprints!", 0) - sleep(100) - world << "\red SCAN INITIATED." - spawn(0) //I am not stupid enough to leave that in a regular loop. - for(var/atom/O in world) - if(istype(O, /mob)) //Lets not. - continue - if(!islist(O.fingerprints)) - var/turf/T = get_turf(O) - if(istype(O.loc,/turf)) - src << "[O] at [T.x],[T.y],[T.z] has a non-list fingerprints variable! (Last touched by [O.fingerprintslast])" - else - src << "[O] in [O.loc] at [T.x],[T.y],[T.z] has a non-list fingerprints variable! (Last touched by [O.fingerprintslast])" - else if (O.fingerprints.len) - for(var/i = 1, i <= O.fingerprints.len, i++) - if(length(O.fingerprints[i]) != 69) - var/turf/T = get_turf(O) - if(isnull(T)) - src << "[O] at [O.loc] has a fingerprints variable of incorrect length! (TURF NOT FOUND). (Last touched by [O.fingerprintslast])" - else - if(istype(O.loc,/turf)) - src << "[O] at [T.x],[T.y],[T.z] has a fingerprints variable of incorrect length! (Last touched by [O.fingerprintslast])" - else - src << "[O] in [O.loc] at [T.x],[T.y],[T.z] has a fingerprints variable of incorrect length! (Last touched by [O.fingerprintslast])" - break - - world << "\red SCAN COMPLETE." - world << "Thank you for your patience." - return \ No newline at end of file + return \ No newline at end of file diff --git a/code/modules/chemical/Chemistry-Reagents.dm b/code/modules/chemical/Chemistry-Reagents.dm index 7c4db6492fd..7c4feba29c1 100644 --- a/code/modules/chemical/Chemistry-Reagents.dm +++ b/code/modules/chemical/Chemistry-Reagents.dm @@ -157,8 +157,11 @@ datum blood_prop = new(T) blood_prop.blood_DNA = list(list(self.data["blood_DNA"], self.data["blood_type"])) else - blood_prop.blood_DNA.len++ - blood_prop.blood_DNA[blood_prop.blood_DNA.len] = list(self.data["blood_DNA"], self.data["blood_type"]) + if(!blood_prop.blood_DNA) + blood_prop.blood_DNA = list(list(self.data["blood_DNA"], self.data["blood_type"])) + else + blood_prop.blood_DNA.len++ + blood_prop.blood_DNA[blood_prop.blood_DNA.len] = list(self.data["blood_DNA"], self.data["blood_type"]) for(var/datum/disease/D in self.data["viruses"]) var/datum/disease/newVirus = new D.type @@ -184,8 +187,11 @@ datum blood_prop = new(T) blood_prop.blood_DNA = list(list(self.data["blood_DNA"],"A+")) else - blood_prop.blood_DNA.len++ - blood_prop.blood_DNA[blood_prop.blood_DNA.len] = list(self.data["blood_DNA"], "A+") + if(!blood_prop.blood_DNA) + blood_prop.blood_DNA = list(list(self.data["blood_DNA"],"A+")) + else + blood_prop.blood_DNA.len++ + blood_prop.blood_DNA[blood_prop.blood_DNA.len] = list(self.data["blood_DNA"], "A+") for(var/datum/disease/D in self.data["viruses"]) var/datum/disease/newVirus = new D.type @@ -205,8 +211,11 @@ datum blood_prop = new(T) blood_prop.blood_DNA = list(list("UNKNOWN DNA","X*")) else - blood_prop.blood_DNA.len++ - blood_prop.blood_DNA[blood_prop.blood_DNA.len] = list("UNKNOWN DNA","X*") + if(!blood_prop.blood_DNA) + blood_prop.blood_DNA = list(list("UNKNOWN DNA","X*")) + else + blood_prop.blood_DNA.len++ + blood_prop.blood_DNA[blood_prop.blood_DNA.len] = list("UNKNOWN DNA","X*") for(var/datum/disease/D in self.data["viruses"]) var/datum/disease/newVirus = new D.type diff --git a/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm b/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm index d2904fb4e85..22170299534 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm @@ -379,7 +379,7 @@ if (!t1) t1 = wear_suit.icon_state overlays += image("icon" = 'mob.dmi', "icon_state" = text("[][]", t1, (!( lying ) ? null : "2")), "layer" = MOB_LAYER) - if (wear_suit.blood_DNA.len) + if (wear_suit.blood_DNA) if (istype(wear_suit, /obj/item/clothing/suit/armor)) overlays += image("icon" = 'blood.dmi', "icon_state" = "armorblood[!lying ? "" : "2"]", "layer" = MOB_LAYER) else @@ -404,7 +404,7 @@ if (!t1) t1 = head.icon_state overlays += image("icon" = 'mob.dmi', "icon_state" = text("[][]", t1, (!( lying ) ? null : "2")), "layer" = MOB_LAYER) - if (head.blood_DNA.len) + if (head.blood_DNA) overlays += image("icon" = 'blood.dmi', "icon_state" = "helmetblood[!lying ? "" : "2"]", "layer" = MOB_LAYER) head.screen_loc = ui_oclothing diff --git a/code/modules/mob/living/carbon/human/examine.dm b/code/modules/mob/living/carbon/human/examine.dm index 65f1103e019..41fee404c8a 100644 --- a/code/modules/mob/living/carbon/human/examine.dm +++ b/code/modules/mob/living/carbon/human/examine.dm @@ -16,8 +16,8 @@ t_him = "her" if (src.w_uniform) - if (src.w_uniform.blood_DNA.len) - usr << "\red [src.name] is wearing a[src.w_uniform.blood_DNA.len ? " bloody " : " "] \icon[src.w_uniform] [src.w_uniform.name]!" + if (src.w_uniform.blood_DNA) + usr << "\red [src.name] is wearing a[src.w_uniform.blood_DNA ? " bloody " : " "] \icon[src.w_uniform] [src.w_uniform.name]!" else usr << "\blue [src.name] is wearing a \icon[src.w_uniform] [src.w_uniform.name]." @@ -25,8 +25,8 @@ usr << "\blue [src.name] is \icon[src.handcuffed] handcuffed!" if (src.wear_suit) - if (src.wear_suit.blood_DNA.len) - usr << "\red [src.name] has a[src.wear_suit.blood_DNA.len ? " bloody " : " "] \icon[src.wear_suit] [src.wear_suit.name] on!" + if (src.wear_suit.blood_DNA) + usr << "\red [src.name] has a[src.wear_suit.blood_DNA ? " bloody " : " "] \icon[src.wear_suit] [src.wear_suit.name] on!" else usr << "\blue [src.name] has a \icon[src.wear_suit] [src.wear_suit.name] on." @@ -37,51 +37,51 @@ usr << "\blue [src.name] has a \icon[src.r_ear] [src.r_ear.name] on [t_his] right ear." if (src.wear_mask) - if (src.wear_mask.blood_DNA.len) - usr << "\red [src.name] has a[src.wear_mask.blood_DNA.len ? " bloody " : " "] \icon[src.wear_mask] [src.wear_mask.name] on [t_his] face!" + if (src.wear_mask.blood_DNA) + usr << "\red [src.name] has a[src.wear_mask.blood_DNA ? " bloody " : " "] \icon[src.wear_mask] [src.wear_mask.name] on [t_his] face!" else usr << "\blue [src.name] has a \icon[src.wear_mask] [src.wear_mask.name] on [t_his] face." if (src.head) - usr << "\blue [src.name] is wearing a[src.head.blood_DNA.len ? " bloody " : " "] \icon[src.head] [src.head.name] on [t_his] head!" + usr << "\blue [src.name] is wearing a[src.head.blood_DNA ? " bloody " : " "] \icon[src.head] [src.head.name] on [t_his] head!" if (src.glasses) - usr << "\blue [src.name] is wearing a pair of [src.glasses.blood_DNA.len ? " bloody " : " "] \icon[src.glasses] [src.glasses.name]!" + usr << "\blue [src.name] is wearing a pair of [src.glasses.blood_DNA ? " bloody " : " "] \icon[src.glasses] [src.glasses.name]!" if (src.l_hand) - if (src.l_hand.blood_DNA.len) - usr << "\red [src.name] has a[src.l_hand.blood_DNA.len ? " bloody " : " "] \icon[src.l_hand] [src.l_hand.name] in [t_his] left hand!" + if (src.l_hand.blood_DNA) + usr << "\red [src.name] has a[src.l_hand.blood_DNA ? " bloody " : " "] \icon[src.l_hand] [src.l_hand.name] in [t_his] left hand!" else usr << "\blue [src.name] has a \icon[src.l_hand] [src.l_hand.name] in [t_his] left hand." if (src.r_hand) - if (src.r_hand.blood_DNA.len) - usr << "\red [src.name] has a[src.r_hand.blood_DNA.len ? " bloody " : " "] \icon[src.r_hand] [src.r_hand.name] in [t_his] right hand!" + if (src.r_hand.blood_DNA) + usr << "\red [src.name] has a[src.r_hand.blood_DNA ? " bloody " : " "] \icon[src.r_hand] [src.r_hand.name] in [t_his] right hand!" else usr << "\blue [src.name] has a \icon[src.r_hand] [src.r_hand.name] in [t_his] right hand." if (src.belt) - if (src.belt.blood_DNA.len) - usr << "\red [src.name] has a[src.belt.blood_DNA.len ? " bloody " : " "] \icon[src.belt] [src.belt.name] on [t_his] belt!" + if (src.belt.blood_DNA) + usr << "\red [src.name] has a[src.belt.blood_DNA ? " bloody " : " "] \icon[src.belt] [src.belt.name] on [t_his] belt!" else usr << "\blue [src.name] has a \icon[src.belt] [src.belt.name] on [t_his] belt." if(src.s_store) - if(src.s_store.blood_DNA.len) - usr << "\red [src.name] has a[src.s_store.blood_DNA.len ? " bloody " : " "] \icon[src.s_store] [src.s_store.name] on [t_his][src.wear_suit.blood_DNA.len ? " bloody " : " "] \icon[src.wear_suit] [src.wear_suit.name]!" + if(src.s_store.blood_DNA) + usr << "\red [src.name] has a[src.s_store.blood_DNA ? " bloody " : " "] \icon[src.s_store] [src.s_store.name] on [t_his][src.wear_suit.blood_DNA ? " bloody " : " "] \icon[src.wear_suit] [src.wear_suit.name]!" else - usr << "\blue [src.name] has a \icon[src.s_store] [src.s_store.name] on [t_his][src.wear_suit.blood_DNA.len ? " bloody " : " "] \icon[src.wear_suit] [src.wear_suit.name]." + usr << "\blue [src.name] has a \icon[src.s_store] [src.s_store.name] on [t_his][src.wear_suit.blood_DNA ? " bloody " : " "] \icon[src.wear_suit] [src.wear_suit.name]." if (src.shoes) - usr << "[src.shoes.blood_DNA.len ? "\red" : "\blue"] [src.name] has a[src.shoes.blood_DNA.len ? " bloody " : " "] \icon[src.shoes] [src.shoes.name] on [t_his] feet." + usr << "[src.shoes.blood_DNA ? "\red" : "\blue"] [src.name] has a[src.shoes.blood_DNA ? " bloody " : " "] \icon[src.shoes] [src.shoes.name] on [t_his] feet." if (src.gloves) - if (src.gloves.blood_DNA.len) + if (src.gloves.blood_DNA) usr << "\red [src.name] has bloody \icon[src.gloves] [src.gloves.name] on [t_his] hands!" else usr << "\blue [src.name] has \icon[src.gloves] [src.gloves.name] on [t_his] hands." - else if (src.blood_DNA.len) + else if (src.blood_DNA) usr << "\red [src.name] has bloody hands!" if (src.back) @@ -97,7 +97,7 @@ id = src.wear_id.registered_name if (src.wear_id.PHOTO) photo = 1 - if (id != src.real_name && in_range(src, usr) && prob(50)) + if (id != src.real_name && in_range(src, usr)) if (photo) usr << "\red [src.name] is wearing \icon[src.wear_id] [src.wear_id.name] with a photo yet doesn't seem to be that person!!!" else diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 6b9a64c3949..38c8d339116 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -886,7 +886,7 @@ overlays += image("icon" = 'uniform_fat.dmi', "icon_state" = "[t1][!lying ? "_s" : "_l"]", "layer" = MOB_LAYER) else overlays += image("icon" = 'uniform.dmi', "icon_state" = text("[][]",t1, (!(lying) ? "_s" : "_l")), "layer" = MOB_LAYER) - if (w_uniform.blood_DNA.len) + if (w_uniform.blood_DNA) var/icon/stain_icon = icon('blood.dmi', "uniformblood[!lying ? "" : "2"]") overlays += image("icon" = stain_icon, "layer" = MOB_LAYER) @@ -916,14 +916,14 @@ else if(ro.destroyed) gloves_icon.Blend(new /icon('limb_mask.dmi', "left_[lying?"l":"s"]"), ICON_MULTIPLY) overlays += image(gloves_icon, "layer" = MOB_LAYER) - if (gloves.blood_DNA.len) + if (gloves.blood_DNA) var/icon/stain_icon = icon('blood.dmi', "bloodyhands[!lying ? "" : "2"]") if(lo.destroyed) stain_icon.Blend(new /icon('limb_mask.dmi', "right_[lying?"l":"s"]"), ICON_MULTIPLY) else if(ro.destroyed) stain_icon.Blend(new /icon('limb_mask.dmi', "left_[lying?"l":"s"]"), ICON_MULTIPLY) overlays += image("icon" = stain_icon, "layer" = MOB_LAYER) - else if (blood_DNA.len) + else if (blood_DNA) var/icon/stain_icon = icon('blood.dmi', "bloodyhands[!lying ? "" : "2"]") if(lo.destroyed) stain_icon.Blend(new /icon('limb_mask.dmi', "right_[lying?"l":"s"]"), ICON_MULTIPLY) @@ -952,7 +952,7 @@ else if(ro.destroyed && !lying) shoes_icon.Blend(new /icon('limb_mask.dmi', "left[lying?"_l":""]"), ICON_MULTIPLY) overlays += image(shoes_icon, "layer" = MOB_LAYER) - if (shoes.blood_DNA.len) + if (shoes.blood_DNA) var/icon/stain_icon = icon('blood.dmi', "shoesblood[!lying ? "" : "2"]") if(lo.destroyed) stain_icon.Blend(new /icon('limb_mask.dmi', "right_[lying?"l":"s"]"), ICON_MULTIPLY) @@ -1011,7 +1011,7 @@ var/t1 = wear_suit.icon_state overlays += image("icon" = 'suit.dmi', "icon_state" = text("[][]", t1, (!( lying ) ? null : "2")), "layer" = MOB_LAYER) if (wear_suit) - if (wear_suit.blood_DNA.len) + if (wear_suit.blood_DNA) var/icon/stain_icon = null if (istype(wear_suit, /obj/item/clothing/suit/armor/vest || /obj/item/clothing/suit/storage/wcoat)) stain_icon = icon('blood.dmi', "armorblood[!lying ? "" : "2"]") @@ -1047,7 +1047,7 @@ var/t1 = wear_mask.icon_state overlays += image("icon" = 'mask.dmi', "icon_state" = text("[][]", t1, (!( lying ) ? null : "2")), "layer" = MOB_LAYER) if (!istype(wear_mask, /obj/item/clothing/mask/cigarette)) - if (wear_mask.blood_DNA.len) + if (wear_mask.blood_DNA) var/icon/stain_icon = icon('blood.dmi', "maskblood[!lying ? "" : "2"]") overlays += image("icon" = stain_icon, "layer" = MOB_LAYER) wear_mask.screen_loc = ui_mask @@ -1061,7 +1061,7 @@ overlays += image("icon" = head_icon, "layer" = MOB_LAYER) if(gimmick_hat) overlays += image("icon" = icon('gimmick_head.dmi', "[gimmick_hat][!lying ? "" : "2"]"), "layer" = MOB_LAYER) - if (head.blood_DNA.len) + if (head.blood_DNA) var/icon/stain_icon = icon('blood.dmi', "helmetblood[!lying ? "" : "2"]") overlays += image("icon" = stain_icon, "layer" = MOB_LAYER) head.screen_loc = ui_head diff --git a/code/modules/mob/organ/organ_external.dm b/code/modules/mob/organ/organ_external.dm index 75423e961cc..cfa6502e723 100644 --- a/code/modules/mob/organ/organ_external.dm +++ b/code/modules/mob/organ/organ_external.dm @@ -92,13 +92,11 @@ obj/item/weapon/organ/New(loc, mob/living/carbon/human/H) if(!istype(H)) return if(H.dna) - if(blood_DNA.len) + if(blood_DNA && blood_DNA.len) blood_DNA.len++ blood_DNA[blood_DNA.len] = list(H.dna.unique_enzymes, H.dna.b_type) else - var/templist[1] - templist[1] = list(H.dna.unique_enzymes, H.dna.b_type) - blood_DNA = templist + blood_DNA = list(list(H.dna.unique_enzymes, H.dna.b_type)) var/icon/I = new /icon(icon, icon_state)