86d4d5307a
When you touch an item, to spread the blood, it would take the "bloody_hands" to 0; which is checked if true while you wash your hands. I limited it to only go down to 1, so it will still be true unless you wash your hands. Fixed an issue where blood_DNA was being cleared before the blood_hands variable was being set to 0. Now you can properly hide your bloody hands with gloves and when you take them off the hands will still be bloody. Removed an unused variable. Set the bloody_hands_mob to null where it was appropriate. The amount of blood you can transfer to other items, when you touch them, will be a little random for variety. Revive() will now heal your hallos damage.
149 lines
5.1 KiB
Plaintext
149 lines
5.1 KiB
Plaintext
//CONTAINS: Suit fibers and Detective's Scanning Computer
|
|
|
|
atom/var/list/suit_fibers
|
|
|
|
atom/proc/add_fibers(mob/living/carbon/human/M)
|
|
if(M.gloves && istype(M.gloves,/obj/item/clothing/))
|
|
var/obj/item/clothing/gloves/G = M.gloves
|
|
if(G.transfer_blood > 1) //bloodied gloves transfer blood to touched objects
|
|
if(add_blood(G.bloody_hands_mob)) //only reduces the bloodiness of our gloves if the item wasn't already bloody
|
|
G.transfer_blood--
|
|
else if(M.bloody_hands > 1)
|
|
if(add_blood(M.bloody_hands_mob))
|
|
M.bloody_hands--
|
|
if(!suit_fibers) suit_fibers = list()
|
|
var/fibertext
|
|
var/item_multiplier = istype(src,/obj/item)?1.2:1
|
|
if(M.wear_suit)
|
|
fibertext = "Material from \a [M.wear_suit]."
|
|
if(prob(10*item_multiplier) && !(fibertext in suit_fibers))
|
|
//world.log << "Added fibertext: [fibertext]"
|
|
suit_fibers += fibertext
|
|
if(!(M.wear_suit.body_parts_covered & CHEST))
|
|
if(M.w_uniform)
|
|
fibertext = "Fibers from \a [M.w_uniform]."
|
|
if(prob(12*item_multiplier) && !(fibertext in suit_fibers)) //Wearing a suit means less of the uniform exposed.
|
|
//world.log << "Added fibertext: [fibertext]"
|
|
suit_fibers += fibertext
|
|
if(!(M.wear_suit.body_parts_covered & HANDS))
|
|
if(M.gloves)
|
|
fibertext = "Material from a pair of [M.gloves.name]."
|
|
if(prob(20*item_multiplier) && !(fibertext in suit_fibers))
|
|
//world.log << "Added fibertext: [fibertext]"
|
|
suit_fibers += fibertext
|
|
else if(M.w_uniform)
|
|
fibertext = "Fibers from \a [M.w_uniform]."
|
|
if(prob(15*item_multiplier) && !(fibertext in suit_fibers))
|
|
// "Added fibertext: [fibertext]"
|
|
suit_fibers += fibertext
|
|
if(M.gloves)
|
|
fibertext = "Material from a pair of [M.gloves.name]."
|
|
if(prob(20*item_multiplier) && !(fibertext in suit_fibers))
|
|
//world.log << "Added fibertext: [fibertext]"
|
|
suit_fibers += "Material from a pair of [M.gloves.name]."
|
|
else if(M.gloves)
|
|
fibertext = "Material from a pair of [M.gloves.name]."
|
|
if(prob(20*item_multiplier) && !(fibertext in suit_fibers))
|
|
//world.log << "Added fibertext: [fibertext]"
|
|
suit_fibers += "Material from a pair of [M.gloves.name]."
|
|
|
|
/atom/proc/add_hiddenprint(mob/living/M as mob)
|
|
if(isnull(M)) return
|
|
if(isnull(M.key)) return
|
|
if(ishuman(M))
|
|
var/mob/living/carbon/human/H = M
|
|
if(!istype(H.dna, /datum/dna))
|
|
return 0
|
|
if(H.gloves)
|
|
if(fingerprintslast != H.key)
|
|
fingerprintshidden += text("\[[time_stamp()]\] (Wearing gloves). Real name: [], Key: []",H.real_name, H.key)
|
|
fingerprintslast = H.key
|
|
return 0
|
|
if(!( fingerprints ))
|
|
if(fingerprintslast != H.key)
|
|
fingerprintshidden += text("\[[time_stamp()]\] Real name: [], Key: []",H.real_name, H.key)
|
|
fingerprintslast = H.key
|
|
return 1
|
|
else
|
|
if(fingerprintslast != M.key)
|
|
fingerprintshidden += text("\[[time_stamp()]\] Real name: [], Key: []",M.real_name, M.key)
|
|
fingerprintslast = M.key
|
|
return
|
|
|
|
//Set ignoregloves to add prints irrespective of the mob having gloves on.
|
|
/atom/proc/add_fingerprint(mob/living/M as mob, ignoregloves = 0)
|
|
if(isnull(M)) return
|
|
if(isnull(M.key)) return
|
|
if(ishuman(M))
|
|
//Add the list if it does not exist.
|
|
if(!fingerprintshidden)
|
|
fingerprintshidden = list()
|
|
|
|
//Fibers~
|
|
add_fibers(M)
|
|
|
|
//Now, lets get to the dirty work.
|
|
//First, make sure their DNA makes sense.
|
|
var/mob/living/carbon/human/H = M
|
|
check_dna_integrity(H) //sets up dna and its variables if it was missing somehow
|
|
|
|
//Now, deal with gloves.
|
|
if(!ignoregloves)
|
|
if(H.gloves && H.gloves != src)
|
|
if(fingerprintslast != H.key)
|
|
fingerprintshidden += text("\[[]\](Wearing gloves). Real name: [], Key: []",time_stamp(), H.real_name, H.key)
|
|
fingerprintslast = H.key
|
|
H.gloves.add_fingerprint(M)
|
|
|
|
//Deal with gloves the pass finger/palm prints.
|
|
if(H.gloves != src)
|
|
if(prob(75) && istype(H.gloves, /obj/item/clothing/gloves/latex))
|
|
return 0
|
|
else if(H.gloves && !istype(H.gloves, /obj/item/clothing/gloves/latex))
|
|
return 0
|
|
|
|
//More adminstuffz
|
|
if(fingerprintslast != H.key)
|
|
fingerprintshidden += text("\[[]\]Real name: [], Key: []",time_stamp(), H.real_name, H.key)
|
|
fingerprintslast = H.key
|
|
|
|
//Make the list if it does not exist.
|
|
if(!fingerprints)
|
|
fingerprints = list()
|
|
|
|
//Hash this shit.
|
|
var/full_print = md5(H.dna.uni_identity)
|
|
|
|
// Add the fingerprints
|
|
fingerprints[full_print] = full_print
|
|
|
|
return 1
|
|
else
|
|
//Smudge up dem prints some
|
|
if(fingerprintslast != M.key)
|
|
fingerprintshidden += text("\[[]\]Real name: [], Key: []",time_stamp(), M.real_name, M.key)
|
|
fingerprintslast = M.key
|
|
|
|
return
|
|
|
|
|
|
/atom/proc/transfer_fingerprints_to(var/atom/A)
|
|
|
|
// Make sure everything are lists.
|
|
if(!islist(A.fingerprints))
|
|
A.fingerprints = list()
|
|
if(!islist(A.fingerprintshidden))
|
|
A.fingerprintshidden = list()
|
|
|
|
if(!islist(fingerprints))
|
|
fingerprints = list()
|
|
if(!islist(fingerprintshidden))
|
|
fingerprintshidden = list()
|
|
|
|
// Transfer
|
|
if(fingerprints)
|
|
A.fingerprints |= fingerprints.Copy() //detective
|
|
if(fingerprintshidden)
|
|
A.fingerprintshidden |= fingerprintshidden.Copy() //admin
|
|
A.fingerprintslast = fingerprintslast
|