Forensics re-destroyed, but better this time.

All lists are LAZYINITLIST, cleaning code is preserved, examine is preserved. We should be back in buisness, but this is just a 'holy fuck finally' commit
This commit is contained in:
Poojawa
2019-08-17 02:43:59 -05:00
parent 8bd54bcc54
commit 088bc484e3
29 changed files with 288 additions and 439 deletions
+4 -9
View File
@@ -344,12 +344,7 @@ BLIND // can't see anything
else
..()
/obj/item/clothing/transfer_blood_dna(list/blood_dna)
..()
var/list/blood_list
GET_COMPONENT(D, /datum/component/forensics)
if(D)
blood_list = D.blood_DNA
if(blood_list.len)
last_bloodtype = blood_list[blood_list[blood_list.len]]//trust me this works
last_blood_DNA = blood_list[blood_list.len]
/obj/item/clothing/transfer_blood_dna(list/blood_dna, list/datum/disease/diseases)
if(length(blood_DNA))
last_bloodtype = blood_DNA[blood_DNA[blood_DNA.len]]//trust me this works
last_blood_DNA = blood_DNA[blood_DNA.len]
+5 -6
View File
@@ -14,11 +14,10 @@
/obj/item/clothing/gloves/ComponentInitialize()
. = ..()
AddComponent(/datum/component/redirect, list(COMSIG_COMPONENT_CLEAN_ACT = CALLBACK(src, .proc/clean_blood)))
AddComponent(/datum/component/redirect, list(COMSIG_COMPONENT_CLEAN_ACT = CALLBACK(src, /obj/item/clothing/gloves/clean_blood)))
/obj/item/clothing/gloves/proc/clean_blood(datum/source, strength)
if(strength < CLEAN_STRENGTH_BLOOD)
return
/obj/item/clothing/gloves/clean_blood(datum/source, strength)
. = ..()
transfer_blood = 0
/obj/item/clothing/gloves/suicide_act(mob/living/carbon/user)
@@ -30,7 +29,7 @@
if(!isinhands)
if(damaged_clothes)
. += mutable_appearance('icons/effects/item_damage.dmi', "damagedgloves")
IF_HAS_BLOOD_DNA(src)
if(blood_DNA)
. += mutable_appearance('icons/effects/blood.dmi', "bloodyhands", color = blood_DNA_to_color())
/obj/item/clothing/gloves/update_clothes_damaged_state(damaging = TRUE)
@@ -41,4 +40,4 @@
// Called just before an attack_hand(), in mob/UnarmedAttack()
/obj/item/clothing/gloves/proc/Touch(atom/A, proximity)
return 0 // return 1 to cancel attack_hand()
return FALSE // return TRUE to cancel attack_hand()
+1 -1
View File
@@ -46,7 +46,7 @@
if(!isinhands)
if(damaged_clothes)
. += mutable_appearance('icons/effects/item_damage.dmi', "damagedhelmet")
IF_HAS_BLOOD_DNA(src)
if(blood_DNA)
. += mutable_appearance('icons/effects/blood.dmi', "helmetblood", color = blood_DNA_to_color())
/obj/item/clothing/head/update_clothes_damaged_state(damaging = TRUE)
+1 -1
View File
@@ -59,7 +59,7 @@
if(body_parts_covered & HEAD)
if(damaged_clothes)
. += mutable_appearance('icons/effects/item_damage.dmi', "damagedmask")
IF_HAS_BLOOD_DNA(src)
if(blood_DNA)
. += mutable_appearance('icons/effects/blood.dmi', "maskblood", color = blood_DNA_to_color())
/obj/item/clothing/mask/update_clothes_damaged_state(damaging = TRUE)
+1 -1
View File
@@ -12,7 +12,7 @@
if(body_parts_covered & HEAD)
if(damaged_clothes)
. += mutable_appearance('icons/effects/item_damage.dmi', "damagedmask")
IF_HAS_BLOOD_DNA(src)
if(blood_DNA)
. += mutable_appearance('icons/effects/blood.dmi', "maskblood", color = blood_DNA_to_color())
/obj/item/clothing/neck/tie
+5 -5
View File
@@ -21,7 +21,7 @@
/obj/item/clothing/shoes/ComponentInitialize()
. = ..()
AddComponent(/datum/component/redirect, list(COMSIG_COMPONENT_CLEAN_ACT = CALLBACK(src, .proc/clean_blood)))
AddComponent(/datum/component/redirect, list(COMSIG_COMPONENT_CLEAN_ACT = CALLBACK(src, /obj/item/clothing/shoes/clean_blood)))
/obj/item/clothing/shoes/suicide_act(mob/living/carbon/user)
if(rand(2)>1)
@@ -46,7 +46,7 @@
. = list()
if(!isinhands)
var/bloody = FALSE
IF_HAS_BLOOD_DNA(src)
if(blood_DNA)
bloody = TRUE
else
bloody = bloody_shoes[BLOOD_STATE_BLOOD]
@@ -93,9 +93,9 @@
var/mob/M = loc
M.update_inv_shoes()
/obj/item/clothing/shoes/proc/clean_blood(datum/source, strength)
if(strength < CLEAN_STRENGTH_BLOOD)
return
/obj/item/clothing/shoes/clean_blood(datum/source, strength)
. = ..()
bloody_shoes = list(BLOOD_STATE_BLOOD = 0, BLOOD_STATE_OIL = 0, BLOOD_STATE_NOT_BLOODY = 0)
blood_state = BLOOD_STATE_NOT_BLOODY
if(ismob(loc))
+1 -1
View File
@@ -53,7 +53,7 @@
if(!isinhands)
if(damaged_clothes)
. += mutable_appearance('icons/effects/item_damage.dmi', "damaged[blood_overlay_type]")
IF_HAS_BLOOD_DNA(src)
if(blood_DNA)
if(taurmode >= SNEK_TAURIC)
. += mutable_appearance('modular_citadel/icons/mob/64x32_effects.dmi', "[blood_overlay_type]blood", color = blood_DNA_to_color())
else
+1 -1
View File
@@ -22,7 +22,7 @@
if(!isinhands)
if(damaged_clothes)
. += mutable_appearance('icons/effects/item_damage.dmi', "damageduniform")
IF_HAS_BLOOD_DNA(src)
if(blood_DNA)
. += mutable_appearance('icons/effects/blood.dmi', "uniformblood", color = blood_DNA_to_color())
if(accessory_overlay)
. += accessory_overlay