progress, just need to fiddle with footprints again

This commit is contained in:
Poojawa
2019-05-07 13:23:49 -05:00
parent d14943d4b0
commit 69eca2ae4b
19 changed files with 196 additions and 81 deletions
+2 -1
View File
@@ -30,7 +30,8 @@
if(damaged_clothes)
. += mutable_appearance('icons/effects/item_damage.dmi', "damagedgloves")
IF_HAS_BLOOD_DNA(src)
. += mutable_appearance('icons/effects/blood.dmi', "bloodyhands", color = blood_DNA_to_color())
GET_COMPONENT(D, /datum/component/forensics)
. += mutable_appearance('icons/effects/blood.dmi', "bloodyhands", color = D.blood_DNA_to_color())
/obj/item/clothing/gloves/update_clothes_damaged_state(damaging = TRUE)
..()
+2 -1
View File
@@ -47,7 +47,8 @@
if(damaged_clothes)
. += mutable_appearance('icons/effects/item_damage.dmi', "damagedhelmet")
IF_HAS_BLOOD_DNA(src)
. += mutable_appearance('icons/effects/blood.dmi', "helmetblood", color = blood_DNA_to_color())
GET_COMPONENT(D, /datum/component/forensics)
. += mutable_appearance('icons/effects/blood.dmi', "helmetblood", color = D.blood_DNA_to_color())
/obj/item/clothing/head/update_clothes_damaged_state(damaging = TRUE)
..()
+2 -1
View File
@@ -18,7 +18,8 @@
if(damaged_clothes)
. += mutable_appearance('icons/effects/item_damage.dmi', "damagedmask")
IF_HAS_BLOOD_DNA(src)
. += mutable_appearance('icons/effects/blood.dmi', "maskblood", color = blood_DNA_to_color())
GET_COMPONENT(D, /datum/component/forensics)
. += mutable_appearance('icons/effects/blood.dmi', "maskblood", color = D.blood_DNA_to_color())
/obj/item/clothing/mask/equipped(mob/user, slot)
..()
+2 -8
View File
@@ -44,12 +44,6 @@
playsound(user, 'sound/weapons/genhit2.ogg', 50, 1)
return(BRUTELOSS)
/obj/item/clothing/shoes/transfer_mob_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]
/obj/item/clothing/shoes/worn_overlays(isinhands = FALSE)
. = list()
if(!isinhands)
@@ -63,9 +57,9 @@
. += mutable_appearance('icons/effects/item_damage.dmi', "damagedshoe")
if(bloody)
if(adjusted == NORMAL_STYLE)
. += mutable_appearance('icons/effects/blood.dmi', "shoeblood", color = blood_DNA_to_color())
. += mutable_appearance('icons/effects/blood.dmi', "shoeblood", color = bloodtype_to_color(last_bloodtype))
else
. += mutable_appearance('modular_citadel/icons/mob/digishoes.dmi', "shoeblood", color = blood_DNA_to_color())
. += mutable_appearance('modular_citadel/icons/mob/digishoes.dmi', "shoeblood", color = bloodtype_to_color(last_bloodtype))
/obj/item/clothing/shoes/equipped(mob/user, slot)
. = ..()
+3 -2
View File
@@ -61,10 +61,11 @@
if(damaged_clothes)
. += mutable_appearance('icons/effects/item_damage.dmi', "damaged[blood_overlay_type]")
IF_HAS_BLOOD_DNA(src)
GET_COMPONENT(D, /datum/component/forensics)
if(taurmode >= SNEK_TAURIC)
. += mutable_appearance('modular_citadel/icons/mob/64x32_effects.dmi', "[blood_overlay_type]blood", color = blood_DNA_to_color())
. += mutable_appearance('modular_citadel/icons/mob/64x32_effects.dmi', "[blood_overlay_type]blood", color = D.blood_DNA_to_color())
else
. += mutable_appearance('icons/effects/blood.dmi', "[blood_overlay_type]blood", color = blood_DNA_to_color())
. += mutable_appearance('icons/effects/blood.dmi', "[blood_overlay_type]blood", color = D.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
+2 -1
View File
@@ -23,7 +23,8 @@
if(damaged_clothes)
. += mutable_appearance('icons/effects/item_damage.dmi', "damageduniform")
IF_HAS_BLOOD_DNA(src)
. += mutable_appearance('icons/effects/blood.dmi', "uniformblood", color = blood_DNA_to_color())
GET_COMPONENT(D, /datum/component/forensics)
. += mutable_appearance('icons/effects/blood.dmi', "uniformblood", color = D.blood_DNA_to_color())
if(accessory_overlay)
. += accessory_overlay
+5 -4
View File
@@ -138,7 +138,7 @@
if(iscarbon(AM))
var/mob/living/carbon/C = AM
for(var/bluhduh in GLOB.blood_types[blood_id])
for(var/datum/reagent/blood/bluhduh in GLOB.blood_types[blood_id])
if(blood_id == C.get_blood_id())//both mobs have the same blood substance
if(bluhduh) //actual blood reagent
if(blood_data["viruses"])
@@ -171,7 +171,7 @@
return
/mob/living/carbon/get_blood_data(blood_id)
for(var/bluhduh in GLOB.blood_types[blood_id])
for(var/datum/reagent/blood/bluhduh in GLOB.blood_types[blood_id])
if(bluhduh) //actual blood reagent
var/blood_data = list()
//set the blood data
@@ -183,6 +183,7 @@
blood_data["viruses"] += D.Copy()
blood_data["blood_DNA"] = copytext(dna.unique_enzymes,1,0)
blood_data["bloodcolor"] = bloodtype_to_color(dna.blood_type)
if(disease_resistances && disease_resistances.len)
blood_data["resistances"] = disease_resistances.Copy()
var/list/temp_chem = list()
@@ -201,7 +202,6 @@
if(!suiciding)
blood_data["cloneable"] = 1
blood_data["blood_type"] = copytext(dna.blood_type,1,0)
blood_data["bloodcolor"] = bloodtype_to_color(dna.blood_type)
blood_data["gender"] = gender
blood_data["real_name"] = real_name
blood_data["features"] = dna.features
@@ -234,7 +234,8 @@
return dna.species.exotic_blood
else if((NOBLOOD in dna.species.species_traits) || (has_trait(TRAIT_NOCLONE)))
return null
return "blood"
else
return "blood"
// This is has more potential uses, and is probably faster than the old proc.
/proc/get_safe_blood(bloodtype)
@@ -45,6 +45,8 @@
var/blood_state = BLOOD_STATE_NOT_BLOODY
var/list/blood_smear = list(BLOOD_STATE_BLOOD = 0, BLOOD_STATE_OIL = 0, BLOOD_STATE_NOT_BLOODY = 0)
var/last_bloodtype = ""//used to track the last bloodtype to have graced this smelly person. for smears on the floor
var/last_blood_DNA = ""//same as last one
var/name_override //For temporary visible name changes
@@ -66,10 +66,7 @@
FP.blood_state = S.blood_state
FP.entered_dirs |= dir
FP.bloodiness = S.bloody_shoes[S.blood_state]
FP.color = blood_DNA_to_color() //Color the blood with our dna stuff
if(S.last_blood_DNA && S.last_bloodtype)
FP.blood_DNA += 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.color = bloodtype_to_color(S.last_bloodtype)
FP.update_icon()
update_inv_shoes()
//End bloody footprints
@@ -112,8 +109,7 @@
FP.blood_state = blood_state
FP.entered_dirs |= dir
FP.bloodiness = blood_smear - BLOOD_LOSS_IN_SPREAD
FP.transfer_blood_dna(blood_DNA)
FP.color = blood_DNA_to_color() //Color the blood with our dna stuff
FP.color = bloodtype_to_color(last_bloodtype)
FP.update_icon()
else //we're on the floor, smear some stuff around
@@ -133,8 +129,7 @@
FP.blood_state = blood_state
FP.entered_dirs |= dir
FP.bloodiness = blood_smear - BLOOD_LOSS_IN_SPREAD
FP.transfer_blood_dna(blood_DNA)
FP.color = blood_DNA_to_color() //Color the blood with our dna stuff
FP.color = bloodtype_to_color(last_bloodtype)
FP.update_icon()
@@ -26,26 +26,34 @@
if(iscarbon(L))
var/mob/living/carbon/C = L
if(C.get_blood_id() == "blood" && (method == INJECT || (method == INGEST && C.dna && C.dna.species && (DRINKSBLOOD in C.dna.species.species_traits))))
if(!data || !(data["blood_type"] in get_safe_blood(C.dna.blood_type)))
C.reagents.add_reagent("toxin", reac_volume * 0.5)
if(data && (data["blood_type"] == "GEL") && (C.dna.species.exotic_blood != "jellyblood"))
C.reagents.add_reagent("toxin", reac_volume * 1.5) //filthy xenos bloooood
if(data && (data["blood_type"] == "HF") && (C.dna.species.exotic_blood != "oilblood"))
C.reagents.add_reagent("toxin", reac_volume * 1) //don't fucking put oil in people
if(data && (data["blood_type"] == "X*") && (C.dna.species.exotic_blood != "xenoblood"))
C.reagents.add_reagent("toxin", reac_volume * 1.5) //acid blooood
else
C.blood_volume = min(C.blood_volume + round(reac_volume, 0.1), BLOOD_VOLUME_MAXIMUM)
for(var/bluhduh in GLOB.blood_types)
if(C.get_blood_id() == bluhduh)
if(method == INJECT || (method == INGEST && C.dna && C.dna.species && (DRINKSBLOOD in C.dna.species.species_traits)))
if(!data || !(data["blood_type"] in get_safe_blood(C.dna.blood_type)))
C.reagents.add_reagent("toxin", reac_volume * 0.5)
if(data && (data["blood_type"] == "GEL") && (C.dna.species.exotic_blood != "jellyblood"))
C.reagents.add_reagent("toxin", reac_volume * 1.5) //filthy xenos bloooood
if(data && (data["blood_type"] == "HF") && (C.dna.species.exotic_blood != "oilblood"))
C.reagents.add_reagent("toxin", reac_volume * 1) //don't fucking put oil in people
if(data && (data["blood_type"] == "X*") && (C.dna.species.exotic_blood != "xenoblood"))
C.reagents.add_reagent("toxin", reac_volume * 1.5) //acid blooood
else
C.blood_volume = min(C.blood_volume + round(reac_volume, 0.1), BLOOD_VOLUME_MAXIMUM)
if(reac_volume >= 10 && istype(L))
L.add_blood_DNA(list(data["blood_DNA"] = data["blood_type"]))
L.color = bloodtype_to_color(data["blood_type"])
/datum/reagent/blood/reaction_obj(obj/O, volume)
if(volume >= 3 && istype(O))
O.add_blood_DNA(list(data["blood_DNA"] = data["blood_type"]))
O.color = bloodtype_to_color(data["blood_type"])
/datum/reagent/blood/on_new(list/data)
if(iscarbon(src))
var/mob/living/carbon/C = src
var/blood_id = C.get_blood_id()
data = C.get_blood_data(blood_id)
if(istype(data))
SetViruses(src, data)
color = bloodtype_to_color(data["blood_type"])
@@ -92,10 +100,12 @@
var/obj/effect/decal/cleanable/blood/B = locate() in T //find some blood here
if(!B)
B = new(T)
if(data["blood_DNA"])
if(data)
B.add_blood_DNA(list(data["blood_DNA"] = data["blood_type"]))
B.color = data["bloodcolor"]
/datum/reagent/blood/human
/datum/reagent/blood/synthetics
data = list("donor"=null,"viruses"=null,"blood_DNA"=null, "bloodcolor" = BLOOD_COLOR_SYNTHETIC, "blood_type"="SY","resistances"=null,"trace_chem"=null,"mind"=null,"ckey"=null,"gender"=null,"real_name"=null,"cloneable"=null,"factions"=null)
name = "Synthetic Blood"