I'm about to go fucking APE
None of this is actually viable, Footprints aren't taking proper color, aren't updating their color. It's just default red. screm
This commit is contained in:
@@ -41,6 +41,10 @@
|
||||
var/dynamic_hair_suffix = ""//head > mask for head hair
|
||||
var/dynamic_fhair_suffix = ""//mask > head for facial hair
|
||||
|
||||
//for blood coloration memes
|
||||
var/last_bloodtype //used to track the last bloodtype to have graced these shoes; makes for better performing footprint shenanigans
|
||||
var/last_blood_DNA //same as last one
|
||||
|
||||
/obj/item/clothing/Initialize()
|
||||
. = ..()
|
||||
if(CHECK_BITFIELD(clothing_flags, VOICEBOX_TOGGLABLE))
|
||||
@@ -339,3 +343,10 @@ BLIND // can't see anything
|
||||
deconstruct(FALSE)
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/item/clothing/transfer_blood_dna(list/blood_dna)
|
||||
..()
|
||||
var/list/blood_list = list(return_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]
|
||||
|
||||
@@ -19,9 +19,6 @@
|
||||
var/adjusted = NORMAL_STYLE
|
||||
mutantrace_variation = MUTANTRACE_VARIATION
|
||||
|
||||
var/last_bloodtype = ""//used to track the last bloodtype to have graced these shoes; makes for better performing footprint shenanigans
|
||||
var/last_blood_DNA = ""//same as last one
|
||||
|
||||
/obj/item/clothing/shoes/ComponentInitialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/redirect, list(COMSIG_COMPONENT_CLEAN_ACT = CALLBACK(src, .proc/clean_blood)))
|
||||
@@ -107,9 +104,3 @@
|
||||
|
||||
/obj/item/proc/negates_gravity()
|
||||
return FALSE
|
||||
|
||||
/obj/item/clothing/shoes/transfer_blood_dna(list/blood_dna)
|
||||
..()
|
||||
if(blood_dna.len)
|
||||
last_bloodtype = blood_dna[blood_dna[blood_dna.len]]//trust me this works
|
||||
last_blood_DNA = blood_dna[blood_dna.len]
|
||||
|
||||
@@ -55,9 +55,9 @@
|
||||
. += mutable_appearance('icons/effects/item_damage.dmi', "damaged[blood_overlay_type]")
|
||||
IF_HAS_BLOOD_DNA(src)
|
||||
if(taurmode >= SNEK_TAURIC)
|
||||
. += mutable_appearance('modular_citadel/icons/mob/64x32_effects.dmi', "[blood_overlay_type]blood")
|
||||
. += mutable_appearance('modular_citadel/icons/mob/64x32_effects.dmi', "[blood_overlay_type]blood", color = blood_DNA_to_color())
|
||||
else
|
||||
. += mutable_appearance('icons/effects/blood.dmi', "[blood_overlay_type]blood")
|
||||
. += mutable_appearance('icons/effects/blood.dmi', "[blood_overlay_type]blood", color = blood_DNA_to_color())
|
||||
var/mob/living/carbon/human/M = loc
|
||||
if(ishuman(M) && M.w_uniform)
|
||||
var/obj/item/clothing/under/U = M.w_uniform
|
||||
|
||||
@@ -78,6 +78,7 @@
|
||||
if(!B)
|
||||
B = new /obj/effect/decal/cleanable/blood/splatter(src, diseases)
|
||||
B.add_blood_DNA(blood_dna) //give blood info to the blood decal.
|
||||
B.update_icon()
|
||||
return TRUE //we bloodied the floor
|
||||
|
||||
/mob/living/carbon/human/add_blood_DNA(list/blood_dna, list/datum/disease/diseases)
|
||||
@@ -112,25 +113,29 @@
|
||||
|
||||
//to add blood dna info to the object's blood_DNA list
|
||||
/atom/proc/transfer_blood_dna(list/blood_dna)
|
||||
var/list/dna = blood_DNA_length()
|
||||
if(!dna)
|
||||
dna = list()
|
||||
var/old_length = dna.len
|
||||
dna |= blood_dna
|
||||
if(dna.len > old_length)
|
||||
var/list/blood_DNA = return_blood_DNA()
|
||||
if(!blood_DNA)
|
||||
blood_DNA = list()
|
||||
var/old_length = blood_DNA.len
|
||||
blood_DNA |= blood_dna
|
||||
if(blood_DNA.len > old_length)
|
||||
return TRUE//some new blood DNA was added
|
||||
|
||||
/atom/proc/blood_DNA_to_color() //handles RGB colorings of blood
|
||||
var/list/dna = blood_DNA_length()
|
||||
/atom/proc/blood_DNA_to_color()
|
||||
return
|
||||
|
||||
/obj/effect/decal/cleanable/blood/blood_DNA_to_color()
|
||||
to_chat(world, "blood dna to color called by [src]")
|
||||
var/list/colors = list()//first we make a list of all bloodtypes present
|
||||
for(var/bloop in dna)
|
||||
if(colors[dna[bloop]])
|
||||
colors[dna[bloop]]++
|
||||
for(var/bloop in Blood_DNA)
|
||||
if(colors[Blood_DNA[bloop]])
|
||||
colors[Blood_DNA[bloop]]++
|
||||
else
|
||||
colors[dna[bloop]] = 1
|
||||
colors[Blood_DNA[bloop]] = 1
|
||||
|
||||
var/final_rgb = BLOOD_COLOR_HUMAN
|
||||
|
||||
to_chat(world, "colors has [colors.len] bloodtypes in it")
|
||||
if(colors.len)
|
||||
var/sum = 0 //this is all shitcode, but it works; trust me
|
||||
final_rgb = bloodtype_to_color(colors[1])
|
||||
@@ -144,3 +149,9 @@
|
||||
i++
|
||||
|
||||
return final_rgb
|
||||
|
||||
/obj/item/clothing/blood_DNA_to_color()
|
||||
var/final_rgb = BLOOD_COLOR_HUMAN
|
||||
if(last_bloodtype)
|
||||
final_rgb = bloodtype_to_color(last_bloodtype)
|
||||
return final_rgb
|
||||
|
||||
@@ -64,6 +64,9 @@
|
||||
FP.blood_state = S.blood_state
|
||||
FP.entered_dirs |= dir
|
||||
FP.bloodiness = S.bloody_shoes[S.blood_state]
|
||||
if(S.last_blood_DNA && S.last_bloodtype)
|
||||
FP.shoe_printer += list(S.last_blood_DNA = S.last_bloodtype)
|
||||
//hacky as heck; we need to move the LAST entry to there, otherwise we mix all the blood
|
||||
FP.add_blood_DNA(S.return_blood_DNA())
|
||||
FP.update_icon()
|
||||
update_inv_shoes()
|
||||
|
||||
Reference in New Issue
Block a user