Files
Aurora.3/code/modules/detectivework/forensics.dm
Karolis 8b785b3815 New record consoles and removal of old datacore, adds SSrecords (#4878)
This PR is depending on #4868 for it's ui framework. This PR mostly makes new SSrecords subsystem responsible for storing records. This should replace old datacore.

Make new SSrecords.
Make things use SSrecords and whole code compile
Made VueUi button <vui-button> to push parameters as JSON, preserving client side data stricture.

    Add new records console and admin record management.

I am mostly looking for feedback regarding SSrecords and it's data storage mechanism criticism (It's using lists for storage)
2019-07-27 12:24:16 +03:00

41 lines
1.6 KiB
Plaintext

/obj/item/weapon/forensics
icon = 'icons/obj/forensics.dmi'
w_class = 1
//This is the output of the stringpercent(print) proc, and means about 80% of
//the print must be there for it to be complete. (Prints are 32 digits)
var/const/FINGERPRINT_COMPLETE = 6
proc/is_complete_print(var/print)
return stringpercent(print) <= FINGERPRINT_COMPLETE
atom/var/list/suit_fibers
atom/proc/add_fibers(mob/living/carbon/human/M)
if(M.gloves && istype(M.gloves,/obj/item/clothing/gloves))
var/obj/item/clothing/gloves/G = M.gloves
if(G.transfer_blood) //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)
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
var/suit_coverage = 0
if(M.wear_suit)
fibertext = "Material from \a [M.wear_suit]."
if(prob(10*item_multiplier) && !(fibertext in suit_fibers))
suit_fibers += fibertext
suit_coverage = M.wear_suit.body_parts_covered
if(M.w_uniform && (M.w_uniform.body_parts_covered & ~suit_coverage))
fibertext = "Fibers from \a [M.w_uniform]."
if(prob(15*item_multiplier) && !(fibertext in suit_fibers))
suit_fibers += fibertext
if(M.gloves && (M.gloves.body_parts_covered & ~suit_coverage))
fibertext = "Material from a pair of [M.gloves.name]."
if(prob(20*item_multiplier) && !(fibertext in suit_fibers))
suit_fibers += "Material from a pair of [M.gloves.name]."