Files
Bubberstation/code/modules/detectivework/detective_work.dm
phil235 f90ee4aa8c - Fixed monkey starting with no dna.
- Fixed bugs with monkeyize/humanize: 7803 (humanized monkey nobloodtype)
- Fixes 9298 monkeyed ling have troubles humanizing themself (already fixed?)
- Fixes despawning clothes when monkeyizing. 11855
- Replaced check_dna_integrity proc by simpler has_dna proc when required.
- created set_species() proc
- fixed space retrovirus not transfering SE (despite having a domutcheck()). Still need to check if it needs a name = real_name.
- I renamed mecha/var/dna to dna_lock to avoid confusion
- I renamed an armor var in a species proc to armor_block to avoid confusion with species/var/armor.
- I removed many if(dna) checks in lots of files.
- I removed duplicate defense procs between human/proc/X and dna.species/proc/X since dna is now always set.
- Anatomic panacea from changeling removes alien embryo correctly. 6247
- Fixes runtime when trying to put dna-less brain mmi into a dnalocked mech.
- Removed carbon/var/list/features, we now only have dna.features and prefs.features
- Remove hulk mutation from lizards and other species (Fixed 6413); only real humans can acquire hulk. (less work on sprites for each ones, fixes lizard tail not in hulk color)
- Fixes cloning not setting up correctly dna UE and dna.real_name
- I fixed the issue with sucked+cloned ling being unable to absorb
- I fixed issue with changeling proc checking if they have the dna already not working.
- Fixed 4095, low health hulk with DAA getting stuck in loop of acquiring/losing hulk.
- I added a second layer for mutations to differientate mutations that go below and above the body layer (Fixes 7858)
- Fixes 10048, the transform to initial appearence button was fucking up the dna.

- Fixes cloning not setting up correctly dna UE and dna.real_name
- Fixed the issue with sucked+cloned ling being unable to absorb
- Fixed issue with changeling proc checking if they have the dna already not working.
- Fixed 4095, low health hulk with DAA getting stuck in loop of acquiring/losing hulk.
- Added a second layer for mutations to differientate mutations that go below and above the body layer (Fixes 7858)
- Fixes 10048, the transform to initial appearence button was fucking up the dna.
2015-09-19 22:18:28 +02:00

145 lines
4.8 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)
if(isnull(M)) return
if(isnull(M.key)) return
if(ishuman(M))
var/mob/living/carbon/human/H = M
if(H.gloves)
if(fingerprintslast != H.ckey)
fingerprintshidden += "\[[time_stamp()]\] (Wearing gloves). Real name: [H.real_name], Key: [H.key]"
fingerprintslast = H.ckey
return 0
if(!fingerprints)
if(fingerprintslast != H.ckey)
fingerprintshidden += "\[[time_stamp()]\] Real name: [H.real_name], Key: [H.key]"
fingerprintslast = H.ckey
return 1
else
if(fingerprintslast != M.ckey)
fingerprintshidden += "\[[time_stamp()]\] Real name: [M.real_name], Key: [M.key]"
fingerprintslast = M.ckey
return
//Set ignoregloves to add prints irrespective of the mob having gloves on.
/atom/proc/add_fingerprint(mob/living/M, ignoregloves = 0)
if(isnull(M)) return
if(isnull(M.key)) return
if(ishuman(M))
var/mob/living/carbon/human/H = M
//Add the list if it does not exist.
if(!fingerprintshidden)
fingerprintshidden = list()
//Fibers~
add_fibers(H)
//Now, lets get to the dirty work.
//Check if the gloves (if any) hide fingerprints
if(H.gloves)
var/obj/item/clothing/gloves/G = H.gloves
if(G.transfer_prints)
ignoregloves = 1
//Now, deal with gloves.
if(!ignoregloves)
if(H.gloves && H.gloves != src)
if(fingerprintslast != H.ckey)
fingerprintshidden += text("\[[]\](Wearing gloves). Real name: [], Key: []",time_stamp(), H.real_name, H.key)
fingerprintslast = H.ckey
H.gloves.add_fingerprint(M)
return 0
//More adminstuffz
if(fingerprintslast != H.ckey)
fingerprintshidden += text("\[[]\]Real name: [], Key: []",time_stamp(), H.real_name, H.key)
fingerprintslast = H.ckey
//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.ckey)
fingerprintshidden += text("\[[]\]Real name: [], Key: []",time_stamp(), M.real_name, M.key)
fingerprintslast = M.ckey
return
/atom/proc/transfer_fingerprints_to(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