Blood colors happens to footprints now.
Different prints not working. splatter effect not working, I'm just sick of looking at this right now.
This commit is contained in:
@@ -19,17 +19,17 @@
|
||||
// It's something which takes on the look of other items, probably
|
||||
icon = I.icon
|
||||
icon_state = I.icon_state
|
||||
GET_COMPONENT(D, /datum/component/forensics)
|
||||
var/static/list/blood_splatter_appearances = list()
|
||||
//try to find a pre-processed blood-splatter. otherwise, make a new one
|
||||
var/index = "[REF(icon)]-[icon_state]-[D.blood_mix_color]"
|
||||
var/index = "[REF(icon)]-[icon_state]"
|
||||
pic = blood_splatter_appearances[index]
|
||||
|
||||
if(!pic)
|
||||
var/icon/blood_splatter_icon = icon(initial(I.icon), initial(I.icon_state), , 1) //we only want to apply blood-splatters to the initial icon_state for each object
|
||||
blood_splatter_icon.Blend("#fff", ICON_ADD) //fills the icon_state with white (except where it's transparent)
|
||||
blood_splatter_icon.Blend(icon(_icon, _icon_state), ICON_MULTIPLY) //adds blood and the remaining white areas become transparant
|
||||
blood_splatter_icon.Blend(D.blood_mix_color, ICON_MULTIPLY) //add the blood's color with DNA information
|
||||
pic = mutable_appearance(blood_splatter_icon, initial(I.icon_state))
|
||||
pic.color = I.blood_color //add the blood's color with DNA information
|
||||
blood_splatter_appearances[index] = pic
|
||||
return TRUE
|
||||
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
/datum/component/forensics/RegisterWithParent()
|
||||
check_blood()
|
||||
RegisterSignal(parent, COMSIG_COMPONENT_CLEAN_ACT, .proc/clean_act)
|
||||
// RegisterSignal(parent, COMSIG_BLOOD_COLOR, .proc/
|
||||
|
||||
/datum/component/forensics/UnregisterFromParent()
|
||||
UnregisterSignal(parent, list(COMSIG_COMPONENT_CLEAN_ACT))
|
||||
@@ -163,10 +164,14 @@
|
||||
if(!length(dna))
|
||||
return
|
||||
LAZYINITLIST(blood_DNA)
|
||||
LAZYINITLIST(blood_mix_types)
|
||||
for(var/i in dna)
|
||||
blood_DNA[i] = dna[i]
|
||||
var/blood_type = blood_DNA.Find(GLOB.all_types_bloods)
|
||||
add_blood_list(blood_type)
|
||||
for(var/type in blood_DNA)
|
||||
if(type in blood_DNA[type])
|
||||
blood_mix_types += blood_DNA[type]
|
||||
|
||||
blood_list_check(blood_mix_types)
|
||||
check_blood()
|
||||
return TRUE
|
||||
|
||||
@@ -176,22 +181,18 @@
|
||||
if(!length(blood_DNA))
|
||||
return
|
||||
|
||||
/datum/component/forensics/proc/add_blood_list(blood_type)
|
||||
if(!blood_type)
|
||||
return
|
||||
LAZYINITLIST(blood_mix_types)
|
||||
blood_list_checks(blood_mix_types, blood_type)
|
||||
blood_DNA_to_color(blood_mix_types)
|
||||
return TRUE
|
||||
|
||||
/datum/component/forensics/proc/blood_list_checks(list/blood_types, var/blood_type) //This is a messy attempt at trying to reduce lists of items and mobs with blood colors on them
|
||||
/datum/component/forensics/proc/blood_list_check(list/blood_types, blood_type) //This is a messy attempt at trying to reduce lists of items and mobs with blood colors on them
|
||||
if(blood_type in GLOB.regular_bloods)
|
||||
blood_type = "A+" //generic so we don't have 8 different types of human blood
|
||||
if(blood_type in blood_mix_types)
|
||||
return
|
||||
else
|
||||
LAZYADD(blood_mix_types, blood_type)
|
||||
return TRUE
|
||||
|
||||
if(blood_mix_types.len)
|
||||
blood_DNA_to_color(blood_mix_types)
|
||||
else
|
||||
return
|
||||
|
||||
/datum/component/forensics/proc/blood_DNA_to_color(list/bloods)
|
||||
var/final_rgb = "#940000" //We default to red just in case
|
||||
@@ -210,4 +211,3 @@
|
||||
final_rgb = BlendRGB(final_rgb, bloodtype_to_color(bloods))
|
||||
|
||||
blood_mix_color = final_rgb
|
||||
return TRUE
|
||||
|
||||
Reference in New Issue
Block a user