mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-16 01:25:10 +01:00
Forensics Datum (#17796)
* forensics datum initial work * typo fix * glove recursion fix * missing bloodtype on organ data * removed frustrating and unneeded b_type var from humans * no leaky * listcheck * documenting * documentation
This commit is contained in:
@@ -93,13 +93,14 @@
|
||||
var/whereLink = "<A href='byond://?_src_=holder;[HrefToken()];adminplayerobservecoodjump=1;X=[location.x];Y=[location.y];Z=[location.z]'>[where]</a>"
|
||||
|
||||
if(show_log)
|
||||
if(carry.my_atom.fingerprintslast)
|
||||
var/mob/M = get_mob_by_key(carry.my_atom.fingerprintslast)
|
||||
var/print_name = carry.my_atom.forensic_data?.get_lastprint()
|
||||
if(print_name)
|
||||
var/mob/M = get_mob_by_key(print_name)
|
||||
var/more = ""
|
||||
if(M)
|
||||
more = "(<A href='byond://?_src_=holder;[HrefToken()];adminmoreinfo=\ref[M]'>?</a>)"
|
||||
message_admins("A chemical smoke reaction has taken place in ([whereLink])[contained]. Last associated key is [carry.my_atom.fingerprintslast][more].", 0, 1)
|
||||
log_game("A chemical smoke reaction has taken place in ([where])[contained]. Last associated key is [carry.my_atom.fingerprintslast].")
|
||||
message_admins("A chemical smoke reaction has taken place in ([whereLink])[contained]. Last associated key is [print_name][more].", 0, 1)
|
||||
log_game("A chemical smoke reaction has taken place in ([where])[contained]. Last associated key is [print_name].")
|
||||
else
|
||||
message_admins("A chemical smoke reaction has taken place in ([whereLink]). No associated key.", 0, 1)
|
||||
log_game("A chemical smoke reaction has taken place in ([where])[contained]. No associated key.")
|
||||
|
||||
@@ -16,7 +16,6 @@ var/global/list/image/splatter_cache=list()
|
||||
icon_state = "mfloor1"
|
||||
random_icon_states = list("mfloor1", "mfloor2", "mfloor3", "mfloor4", "mfloor5", "mfloor6", "mfloor7")
|
||||
var/base_icon = 'icons/effects/blood.dmi'
|
||||
blood_DNA = list()
|
||||
var/basecolor="#A10808" // Color when wet.
|
||||
var/synthblood = 0
|
||||
var/list/datum/disease/viruses = list()
|
||||
@@ -49,8 +48,7 @@ var/global/list/image/splatter_cache=list()
|
||||
if(src.loc && isturf(src.loc))
|
||||
for(var/obj/effect/decal/cleanable/blood/B in src.loc)
|
||||
if(B != src)
|
||||
if (B.blood_DNA)
|
||||
blood_DNA |= B.blood_DNA.Copy()
|
||||
init_forensic_data().merge_blooddna(B.forensic_data)
|
||||
if(!(B.flags & ATOM_INITIALIZED))
|
||||
B.delete_me = TRUE
|
||||
else
|
||||
@@ -102,21 +100,20 @@ var/global/list/image/splatter_cache=list()
|
||||
S.update_icon() // Cut previous overlays
|
||||
if(!S.blood_overlay)
|
||||
S.generate_blood_overlay()
|
||||
if(!S.blood_DNA)
|
||||
S.blood_DNA = list()
|
||||
if(!forensic_data?.has_blooddna())
|
||||
S.blood_overlay.color = basecolor
|
||||
S.add_overlay(S.blood_overlay)
|
||||
if(S.blood_overlay && S.blood_overlay.color != basecolor)
|
||||
S.blood_overlay.color = basecolor
|
||||
S.add_overlay(S.blood_overlay)
|
||||
S.blood_DNA |= blood_DNA.Copy()
|
||||
transfer_blooddna_to(S)
|
||||
perp.update_inv_shoes()
|
||||
|
||||
else if (hasfeet)//Or feet
|
||||
perp.feet_blood_color = basecolor
|
||||
perp.track_blood = max(amount,perp.track_blood)
|
||||
LAZYINITLIST(perp.feet_blood_DNA)
|
||||
perp.feet_blood_DNA |= blood_DNA.Copy()
|
||||
perp.feet_blood_DNA |= init_forensic_data().get_blooddna().Copy()
|
||||
perp.update_bloodied()
|
||||
else if (perp.buckled && istype(perp.buckled, /obj/structure/bed/chair/wheelchair))
|
||||
var/obj/structure/bed/chair/wheelchair/W = perp.buckled
|
||||
@@ -145,9 +142,7 @@ var/global/list/image/splatter_cache=list()
|
||||
var/taken = rand(1,amount)
|
||||
amount -= taken
|
||||
to_chat(user, span_notice("You get some of \the [src] on your hands."))
|
||||
if (!user.blood_DNA)
|
||||
user.blood_DNA = list()
|
||||
user.blood_DNA |= blood_DNA.Copy()
|
||||
transfer_blooddna_to(user)
|
||||
user.bloody_hands += taken
|
||||
user.hand_blood_color = basecolor
|
||||
user.update_inv_gloves(1)
|
||||
|
||||
@@ -113,8 +113,7 @@ var/global/list/image/fluidtrack_cache=list()
|
||||
updated=1
|
||||
|
||||
dirs |= comingdir|realgoing
|
||||
if(islist(blood_DNA))
|
||||
blood_DNA |= DNA.Copy()
|
||||
init_forensic_data().merge_blooddna(null,DNA)
|
||||
if(updated)
|
||||
update_icon()
|
||||
|
||||
|
||||
@@ -46,11 +46,11 @@
|
||||
|
||||
gib.update_icon()
|
||||
|
||||
gib.blood_DNA = list()
|
||||
gib.init_forensic_data()
|
||||
if(MobDNA)
|
||||
gib.blood_DNA[MobDNA.unique_enzymes] = MobDNA.b_type
|
||||
gib.add_blooddna(MobDNA,null)
|
||||
else if(istype(src, /obj/effect/gibspawner/human)) // Probably a monkey
|
||||
gib.blood_DNA["Non-human DNA"] = "A+"
|
||||
gib.add_blooddna(null,null)
|
||||
if(istype(location,/turf/))
|
||||
var/list/directions = gibdirections[i]
|
||||
if(directions.len)
|
||||
|
||||
@@ -735,12 +735,9 @@ var/list/global/slot_flags_enumeration = list(
|
||||
//Make the blood_overlay have the proper color then apply it.
|
||||
blood_overlay.color = blood_color
|
||||
add_overlay(blood_overlay)
|
||||
|
||||
//if this blood isn't already in the list, add it
|
||||
if(istype(M))
|
||||
if(blood_DNA[M.dna.unique_enzymes])
|
||||
return 0 //already bloodied with this blood. Cannot add more.
|
||||
blood_DNA[M.dna.unique_enzymes] = M.dna.b_type
|
||||
add_blooddna(M.dna,M)
|
||||
|
||||
return 1 //we applied blood to the item
|
||||
|
||||
GLOBAL_LIST_EMPTY(blood_overlays_by_type)
|
||||
|
||||
@@ -201,12 +201,12 @@
|
||||
if(attacher)
|
||||
log_str += ADMIN_QUE(attacher)
|
||||
|
||||
var/mob/mob = get_mob_by_key(src.fingerprintslast)
|
||||
var/mob/mob = get_mob_by_key(forensic_data?.get_lastprint())
|
||||
var/last_touch_info = ""
|
||||
if(mob)
|
||||
last_touch_info = ADMIN_QUE(mob)
|
||||
|
||||
log_str += " Last touched by: [src.fingerprintslast][last_touch_info]"
|
||||
log_str += " Last touched by: [forensic_data?.get_lastprint()][last_touch_info]"
|
||||
GLOB.bombers += log_str
|
||||
message_admins(log_str, 0, 1)
|
||||
log_game(log_str)
|
||||
|
||||
@@ -333,11 +333,7 @@
|
||||
S.add(transfer)
|
||||
if (prob(transfer/orig_amount * 100))
|
||||
transfer_fingerprints_to(S)
|
||||
if(blood_DNA)
|
||||
if(S.blood_DNA)
|
||||
S.blood_DNA |= blood_DNA
|
||||
else
|
||||
S.blood_DNA = blood_DNA.Copy()
|
||||
transfer_blooddna_to(S)
|
||||
return transfer
|
||||
return 0
|
||||
|
||||
@@ -360,8 +356,7 @@
|
||||
newstack.color = color
|
||||
if (prob(transfer/orig_amount * 100))
|
||||
transfer_fingerprints_to(newstack)
|
||||
if(blood_DNA)
|
||||
newstack.blood_DNA |= blood_DNA
|
||||
transfer_blooddna_to(newstack)
|
||||
return newstack
|
||||
return null
|
||||
|
||||
|
||||
@@ -6,8 +6,7 @@
|
||||
if(pulledby)
|
||||
pulledby.start_pulling(S)
|
||||
transfer_fingerprints_to(S)
|
||||
if(blood_DNA)
|
||||
S.blood_DNA |= blood_DNA
|
||||
S.init_forensic_data().merge_blooddna(forensic_data)
|
||||
use(transfer)
|
||||
S.add(transfer)
|
||||
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
playsound(src, 'sound/weapons/empty.ogg', 50, 1)
|
||||
add_fingerprint(user)
|
||||
|
||||
if(blood_overlay && blood_DNA && (blood_DNA.len >= 1)) //updates blood overlay, if any
|
||||
if(blood_overlay && forensic_data?.has_blooddna()) //updates blood overlay, if any
|
||||
cut_overlays()
|
||||
|
||||
var/icon/I = new /icon(src.icon, src.icon_state)
|
||||
|
||||
@@ -395,8 +395,8 @@ var/list/global/tank_gauge_cache = list()
|
||||
if(pressure > TANK_FRAGMENT_PRESSURE)
|
||||
if(integrity <= 7)
|
||||
if(!istype(src.loc,/obj/item/transfer_valve))
|
||||
message_admins("Explosive tank rupture! last key to touch the tank was [src.fingerprintslast].")
|
||||
log_game("Explosive tank rupture! last key to touch the tank was [src.fingerprintslast].")
|
||||
message_admins("Explosive tank rupture! last key to touch the tank was [forensic_data?.get_lastprint()].")
|
||||
log_game("Explosive tank rupture! last key to touch the tank was [forensic_data?.get_lastprint()].")
|
||||
|
||||
//Give the gas a chance to build up more pressure through reacting
|
||||
air_contents.react()
|
||||
|
||||
@@ -546,7 +546,6 @@
|
||||
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
H.gunshot_residue = null
|
||||
if(H.gloves)
|
||||
H.gloves.wash(CLEAN_SCRUB)
|
||||
H.update_inv_gloves()
|
||||
@@ -559,7 +558,7 @@
|
||||
H.bloody_hands = 0
|
||||
H.germ_level = 0
|
||||
H.hand_blood_color = null
|
||||
LAZYCLEARLIST(H.blood_DNA)
|
||||
H.forensic_data?.wash(CLEAN_SCRUB)
|
||||
H.update_bloodied()
|
||||
else
|
||||
user.wash(CLEAN_SCRUB)
|
||||
|
||||
Reference in New Issue
Block a user