diff --git a/code/__DEFINES/components.dm b/code/__DEFINES/components.dm index 7322823231..b00765d2bb 100644 --- a/code/__DEFINES/components.dm +++ b/code/__DEFINES/components.dm @@ -202,6 +202,8 @@ #define COMSIG_TURF_MAKE_DRY "make_turf_try" //(max_strength, immediate, duration_decrease = INFINITY): Returns bool. #define COMSIG_COMPONENT_CLEAN_ACT "clean_act" //called on an object to clean it of cleanables. Usualy with soap: (num/strength) +//Blood color +#define COMSIG_BLOOD_COLOR "blood_DNA_to_color" //RGB blood stuff //Food #define COMSIG_FOOD_EATEN "food_eaten" //from base of obj/item/reagent_containers/food/snacks/attack(): (mob/living/eater, mob/feeder) diff --git a/code/__DEFINES/footsteps.dm b/code/__DEFINES/footsteps.dm index 56dfbe155d..8937ab6afa 100644 --- a/code/__DEFINES/footsteps.dm +++ b/code/__DEFINES/footsteps.dm @@ -8,6 +8,7 @@ #define FOOTSTEP_LAVA "lava" #define FOOTPRINT_SHOE "shoe" +#define FOOTPRINT_FOOT "foot" #define FOOTPRINT_PAW "paw" #define FOOTPRINT_CLAW "claw" #define FOOTPRINT_WHEEL "wheels" diff --git a/code/datums/components/decals/blood.dm b/code/datums/components/decals/blood.dm index ba69e07d65..3daa4b5944 100644 --- a/code/datums/components/decals/blood.dm +++ b/code/datums/components/decals/blood.dm @@ -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 diff --git a/code/datums/components/forensics.dm b/code/datums/components/forensics.dm index a3461b31fb..4ee8b93cc7 100644 --- a/code/datums/components/forensics.dm +++ b/code/datums/components/forensics.dm @@ -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 diff --git a/code/game/objects/effects/decals/cleanable.dm b/code/game/objects/effects/decals/cleanable.dm index c4b668696d..f5e929a7ae 100644 --- a/code/game/objects/effects/decals/cleanable.dm +++ b/code/game/objects/effects/decals/cleanable.dm @@ -90,12 +90,13 @@ else if(H.bloodiness && blood_state && bloodiness && (!H.has_trait(TRAIT_LIGHT_STEP) || !H.mind.assigned_role == "Detective")) var/add_blood = 0 - if(H.bloodiness >= BLOOD_GAIN_PER_STEP) - add_blood = BLOOD_GAIN_PER_STEP + if(H.bloodiness >= 1) + add_blood = 5 else add_blood = bloodiness bloodiness -= add_blood H.blood_smear[blood_state] = min(MAX_SHOE_BLOODINESS,H.blood_smear[blood_state]+add_blood) + H.bloodiness = add_blood H.add_blood_DNA(return_blood_DNA()) H.blood_state = blood_state H.blood_color = blood_color diff --git a/code/game/objects/effects/decals/cleanable/aliens.dm b/code/game/objects/effects/decals/cleanable/aliens.dm index 29c8332529..9b4d65cff4 100644 --- a/code/game/objects/effects/decals/cleanable/aliens.dm +++ b/code/game/objects/effects/decals/cleanable/aliens.dm @@ -33,8 +33,10 @@ GET_COMPONENT(infective, /datum/component/infective) if(infective) diseases = infective.diseases + var/obj/effect/decal/cleanable/blood/gibs/gibbers = src var/obj/effect/decal/cleanable/blood/splatter/xeno/splat = new /obj/effect/decal/cleanable/blood/splatter/xeno(loc, diseases) - splat.update_icon() + splat.color = gibbers.blood_color + splat.blood_color = gibbers.blood_color if(!step_to(src, get_step(src, direction), 0)) break diff --git a/code/game/objects/effects/decals/cleanable/gibs.dm b/code/game/objects/effects/decals/cleanable/gibs.dm index 5c76bd6867..31849c7251 100644 --- a/code/game/objects/effects/decals/cleanable/gibs.dm +++ b/code/game/objects/effects/decals/cleanable/gibs.dm @@ -11,14 +11,13 @@ /obj/effect/decal/cleanable/blood/gibs/proc/guts() if(gib_overlay) - var/mutable_appearance/gibz = mutable_appearance(icon, icon_state + "-overlay", color = blood_color) - gibz.layer = (LOW_OBJ_LAYER - 0.1) - var/mutable_appearance/gibz2 = mutable_appearance(icon, icon_state + "c-overlay", color = body_colors) - gibz2.layer = (LOW_OBJ_LAYER - 0.2) + var/mutable_appearance/gibz = mutable_appearance(icon, icon_state + "-overlay", color = blood_color, layer = (LOW_OBJ_LAYER + 0.1)) + var/mutable_appearance/gibz2 = mutable_appearance(icon, icon_state + "c-overlay", color = body_colors, layer = (LOW_OBJ_LAYER + 0.1)) if(!slimy_gibs) gibz.appearance_flags = RESET_COLOR add_overlay(gibz) else + gibz.appearance_flags = RESET_COLOR add_overlay(gibz) add_overlay(gibz2) @@ -31,6 +30,8 @@ var/mob/living/carbon/human/H = L if(H.mind.assigned_role == "Detective") //Gumshoe perks yo playsound(loc, 'sound/effects/gib_step.ogg', 10, 1) + else + playsound(loc, 'sound/effects/gib_step.ogg', H.has_trait(TRAIT_LIGHT_STEP) ? 20 : 50, 1) else playsound(loc, 'sound/effects/gib_step.ogg', L.has_trait(TRAIT_LIGHT_STEP) ? 20 : 50, 1) . = ..() @@ -48,6 +49,7 @@ var/obj/effect/decal/cleanable/blood/gibs/gibbers = src var/obj/effect/decal/cleanable/blood/splatter/splat = new /obj/effect/decal/cleanable/blood/splatter(loc, diseases) splat.color = gibbers.blood_color + splat.blood_color = gibbers.blood_color if(!step_to(src, get_step(src, direction), 0)) break diff --git a/code/game/objects/effects/decals/cleanable/humans.dm b/code/game/objects/effects/decals/cleanable/humans.dm index 1c9dfb9a35..0a4a266874 100644 --- a/code/game/objects/effects/decals/cleanable/humans.dm +++ b/code/game/objects/effects/decals/cleanable/humans.dm @@ -8,10 +8,6 @@ color = BLOOD_COLOR_HUMAN //default so we don't have white splotches everywhere. bloodiness = BLOOD_AMOUNT_PER_DECAL -/obj/effect/decal/cleanable/blood/ComponentInitialize() - . = ..() - AddComponent(/datum/component/forensics) - update_icon() /obj/effect/decal/cleanable/blood/replace_decal(obj/effect/decal/cleanable/blood/C) if(bloodiness) @@ -28,21 +24,24 @@ update_icon() /obj/effect/decal/cleanable/blood/update_icon() - GET_COMPONENT(F, /datum/component/forensics) - if(F && istype(F)) - blood_color = F.blood_mix_color + if(!blood_color) + if(reagents.reagent_list.len) + for(var/datum/reagent/R in reagents.reagent_list) + // Get blood data from the blood reagent. + if(istype(R, /datum/reagent/blood)) + if(R.data["blood_type"]) + blood_color = bloodtype_to_color(R.data["blood_type"]) + else if(istype(R, /datum/reagent/liquidgibs)) + if(R.data["blood_type"]) + blood_color = bloodtype_to_color(R.data["blood_type"]) + else + return else - for(var/datum/reagent/R in reagents.reagent_list) - // Get blood data from the blood reagent. - if(istype(R, /datum/reagent/blood)) - if(R.data["blood_type"]) - blood_color = bloodtype_to_color(R.data["blood_type"]) - else if(istype(R, /datum/reagent/liquidgibs)) - if(R.data["blood_type"]) - blood_color = bloodtype_to_color(R.data["blood_type"]) - - color = blood_color + color = blood_color +//obj/effect/decal/cleanable/blood/update_color() + // if(SEND_SIGNAL(COMSIG_BLOOD_COLOR) & COMPONENT_BLOCK_UPDATE_COLOR) + // return /obj/effect/decal/cleanable/blood/old name = "dried blood" @@ -108,9 +107,9 @@ entered_dirs |= H.dir update_icon() - else if(!H.bloodiness) - H.blood_smear[blood_state] = max(S.blood_smear[blood_state] - BLOOD_LOSS_PER_STEP, 0) - H.bloodiness = max(H.bloodiness - BLOOD_LOSS_IN_SPREAD, 0) + else if(H.bloodiness && H.blood_smear[blood_state]) + H.blood_smear[blood_state] = max(H.blood_smear[blood_state] - BLOOD_LOSS_PER_STEP, 0) + H.bloodiness = H.bloodinessmax H.blood_color = blood_color if (!(entered_dirs & H.dir)) entered_dirs |= H.dir @@ -130,9 +129,9 @@ exited_dirs |= H.dir update_icon() - else if(!H.bloodiness) + else if(H.bloodiness && H.blood_smear[blood_state]) H.blood_smear[blood_state] = max(H.blood_smear[blood_state] - BLOOD_LOSS_PER_STEP, 0) - H.bloodiness = max(H.bloodiness - BLOOD_LOSS_IN_SPREAD, 0) + H.bloodiness = H.bloodinessmax H.blood_color = blood_color if (!(exited_dirs & H.dir)) exited_dirs |= H.dir @@ -143,17 +142,18 @@ for(var/Ddir in GLOB.cardinals) if(entered_dirs & Ddir) - var/image/bloodstep_overlay = GLOB.bloody_footprints_cache["entered-[print_state]-[Ddir]-[color]"] + var/image/bloodstep_overlay = GLOB.bloody_footprints_cache["entered-[print_state]-[Ddir]"] if(!bloodstep_overlay) - GLOB.bloody_footprints_cache["entered-[print_state]-[Ddir]-[color]"] = bloodstep_overlay = image(icon, "[print_state]1", dir = Ddir) + GLOB.bloody_footprints_cache["entered-[print_state]-[Ddir]"] = bloodstep_overlay = image(icon, "[print_state]1", dir = Ddir) add_overlay(bloodstep_overlay) if(exited_dirs & Ddir) - var/image/bloodstep_overlay = GLOB.bloody_footprints_cache["exited-[print_state]-[Ddir]-[color]"] + var/image/bloodstep_overlay = GLOB.bloody_footprints_cache["exited-[print_state]-[Ddir]"] if(!bloodstep_overlay) - GLOB.bloody_footprints_cache["exited-[print_state]-[Ddir]-[color]"] = bloodstep_overlay = image(icon, "[print_state]2", dir = Ddir) + GLOB.bloody_footprints_cache["exited-[print_state]-[Ddir]"] = bloodstep_overlay = image(icon, "[print_state]2", dir = Ddir) add_overlay(bloodstep_overlay) alpha = BLOODY_FOOTPRINT_BASE_ALPHA + bloodiness + color = blood_color /obj/effect/decal/cleanable/blood/footprints/tracks/examine(mob/user) @@ -166,8 +166,8 @@ to_chat(user, .) -/obj/effect/decal/cleanable/blood/footprints/tracks/replace_decal(obj/effect/decal/cleanable/C) - if(blood_state != C.blood_state) //We only replace footprints of the same type as us +/obj/effect/decal/cleanable/blood/footprints/tracks/replace_decal(obj/effect/decal/cleanable/blood/footprints/tracks/C) + if(print_state != C.print_state) //We only replace footprints of the same type as us return if(color != C.color) return @@ -178,12 +178,18 @@ return TRUE return FALSE -/obj/effect/decal/cleanable/blood/footprints/tracks/footprints +/obj/effect/decal/cleanable/blood/footprints/tracks/shoe name = "footprints" desc = "They look like tracks left by footwear." icon_state = FOOTPRINT_SHOE print_state = FOOTPRINT_SHOE +/obj/effect/decal/cleanable/blood/footprints/tracks/foot + name = "footprints" + desc = "They look like tracks left by a bare foot." + icon_state = FOOTPRINT_FOOT + print_state = FOOTPRINT_FOOT + /obj/effect/decal/cleanable/blood/footprints/tracks/snake name = "tracks" desc = "They look like tracks left by a giant snake." @@ -191,14 +197,14 @@ print_state = FOOTPRINT_SNAKE /obj/effect/decal/cleanable/blood/footprints/tracks/paw - name = "tracks" - desc = "They look like tracks left by mammalian paws." + name = "footprints" + desc = "They look like tracks left by paws." icon_state = FOOTPRINT_PAW print_state = FOOTPRINT_PAW /obj/effect/decal/cleanable/blood/footprints/tracks/claw - name = "tracks" - desc = "They look like tracks left by reptilian claws." + name = "footprints" + desc = "They look like tracks left by claws." icon_state = FOOTPRINT_CLAW print_state = FOOTPRINT_CLAW diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 4d6253d0b0..88eb8e9ad4 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -111,6 +111,9 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE) var/list/grind_results //A reagent list containing the reagents this item produces when ground up in a grinder - this can be an empty list to allow for reagent transferring only var/list/juice_results //A reagent list containing blah blah... but when JUICED in a grinder! + //Blood overlay things + var/blood_color + /obj/item/Initialize() materials = typelist("materials", materials) diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm index f79bf5c567..922f37b270 100644 --- a/code/modules/clothing/clothing.dm +++ b/code/modules/clothing/clothing.dm @@ -41,7 +41,6 @@ var/dynamic_hair_suffix = ""//head > mask for head hair var/dynamic_fhair_suffix = ""//mask > head for facial hair - var/blood_color = BLOOD_COLOR_HUMAN 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) diff --git a/code/modules/clothing/shoes/_shoes.dm b/code/modules/clothing/shoes/_shoes.dm index 4c6131644c..4aec17fafe 100644 --- a/code/modules/clothing/shoes/_shoes.dm +++ b/code/modules/clothing/shoes/_shoes.dm @@ -17,6 +17,8 @@ var/adjusted = NORMAL_STYLE mutantrace_variation = MUTANTRACE_VARIATION + var/move_trail = /obj/effect/decal/cleanable/blood/footprints/tracks/shoe + /obj/item/clothing/shoes/ComponentInitialize() . = ..() AddComponent(/datum/component/redirect, list(COMSIG_COMPONENT_CLEAN_ACT = CALLBACK(src, .proc/clean_blood))) diff --git a/code/modules/detectivework/detective_work.dm b/code/modules/detectivework/detective_work.dm index c892bfeffc..0b1d6807bf 100644 --- a/code/modules/detectivework/detective_work.dm +++ b/code/modules/detectivework/detective_work.dm @@ -25,6 +25,16 @@ if(D) . = D.fibers +/atom/proc/return_blood_mix_types() + GET_COMPONENT(D, /datum/component/forensics) + if(D) + . = D.blood_mix_types + +/atom/proc/return_blood_mix_color() + GET_COMPONENT(D, /datum/component/forensics) + if(D) + . = D.blood_mix_color + /atom/proc/add_fingerprint_list(list/fingerprints) //ASSOC LIST FINGERPRINT = FINGERPRINT if(length(fingerprints)) . = AddComponent(/datum/component/forensics, fingerprints) diff --git a/code/modules/mob/living/carbon/human/human_defines.dm b/code/modules/mob/living/carbon/human/human_defines.dm index be6d2196e0..95139f75ee 100644 --- a/code/modules/mob/living/carbon/human/human_defines.dm +++ b/code/modules/mob/living/carbon/human/human_defines.dm @@ -44,6 +44,7 @@ var/bleedsuppress = 0 //for stopping bloodloss, eventually this will be limb-based like bleeding var/bloodiness = 0 + var/bloodinessmax = 5 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/blood_color //For blood smearing stuff diff --git a/code/modules/mob/living/carbon/human/human_movement.dm b/code/modules/mob/living/carbon/human/human_movement.dm index 1135a592e1..b2592ae157 100644 --- a/code/modules/mob/living/carbon/human/human_movement.dm +++ b/code/modules/mob/living/carbon/human/human_movement.dm @@ -46,110 +46,61 @@ for(var/datum/mutation/human/HM in dna.mutations) HM.on_move(src, NewLoc) - if(shoes) - if(!lying && !buckled) - if(loc == NewLoc) - if(!has_gravity(loc)) - return - var/obj/item/clothing/shoes/S = shoes - - //Bloody footprints - var/turf/T = get_turf(src) - if(S.blood_smear && S.blood_smear[S.blood_state]) - var/obj/effect/decal/cleanable/blood/footprints/tracks/oldFP = locate(/obj/effect/decal/cleanable/blood/footprints/tracks) in T - if(oldFP && (oldFP.blood_state == S.blood_state && oldFP.color == color)) - return - S.blood_smear[S.blood_state] = max(0, S.blood_smear[S.blood_state]-BLOOD_LOSS_PER_STEP) - var/obj/effect/decal/cleanable/blood/footprints/tracks/footprints/FP = new /obj/effect/decal/cleanable/blood/footprints/tracks/footprints(T) - FP.icon_state = FOOTPRINT_SHOE - FP.print_state = FOOTPRINT_SHOE - FP.blood_state = S.blood_state - FP.blood_color = S.blood_color - FP.entered_dirs |= dir - FP.bloodiness = S.blood_smear[S.blood_state] - FP.update_icon() - update_inv_shoes() - //End bloody footprints - - S.step_action() - - else - if(!buckled) + if(!buckled) + if(shoes) if(!lying) if(loc == NewLoc) if(!has_gravity(loc)) return + var/obj/item/clothing/shoes/S = shoes + //Bloody footprints var/turf/T = get_turf(src) - var/mob/living/carbon/human/H = src - if(H.bloodiness) - var/obj/effect/decal/cleanable/blood/footprints/tracks/oldFP = locate(/obj/effect/decal/cleanable/blood/footprints/tracks) in T - if(oldFP && (oldFP.blood_state == blood_state && oldFP.color == color)) + if(S.blood_smear && S.blood_smear[S.blood_state]) + var/obj/effect/decal/cleanable/blood/footprints/tracks/shoe/oldFP = locate(/obj/effect/decal/cleanable/blood/footprints/tracks/shoe) in T + if(oldFP && (oldFP.blood_state == S.blood_state && oldFP.color == S.blood_color)) return - else - var/obj/effect/decal/cleanable/blood/footprints/tracks/FP = new /obj/effect/decal/cleanable/blood/footprints/tracks(T) - if(DIGITIGRADE in dna.species.species_traits) - if(dna.species.id == ("lizard" || "ashwalker" || "xeno")) - FP.icon_state = FOOTPRINT_CLAW - FP.print_state = FOOTPRINT_CLAW - else if(dna.species.id == "Mammal") - FP.icon_state = FOOTPRINT_PAW - FP.print_state = FOOTPRINT_PAW - else - FP.icon_state = FOOTPRINT_SHOE - FP.print_state = FOOTPRINT_SHOE - else if(("taur" in dna.species.mutant_bodyparts) && (dna.features["taur"] != "None")) - if(dna.features["taur"] in GLOB.noodle_taurs) - FP.icon_state = FOOTPRINT_SNAKE - FP.print_state = FOOTPRINT_SNAKE - else if(dna.features["taur"] in GLOB.paw_taurs) - FP.icon_state = FOOTPRINT_PAW - FP.print_state = FOOTPRINT_PAW - else - FP.icon_state = FOOTPRINT_SHOE - FP.print_state = FOOTPRINT_SHOE - FP.add_blood_DNA(return_blood_DNA()) - FP.blood_color = H.blood_color - FP.update_icon() - var/newdir = get_dir(T, loc) - if(newdir == dir) - FP.setDir(newdir) - else - newdir = newdir | dir - if(newdir == 3) - newdir = 1 - else if(newdir == 12) - newdir = 4 - FP.setDir(newdir) - bloodiness-- + S.blood_smear[S.blood_state] = max(0, S.blood_smear[S.blood_state]-BLOOD_LOSS_PER_STEP) + var/obj/effect/decal/cleanable/blood/footprints/tracks/shoe/FP = new /obj/effect/decal/cleanable/blood/footprints/tracks/shoe(T) + FP.icon_state = FOOTPRINT_SHOE + FP.print_state = FOOTPRINT_SHOE + FP.blood_state = S.blood_state + FP.blood_color = S.blood_color + FP.entered_dirs |= dir + FP.bloodiness = S.blood_smear[S.blood_state] + FP.update_icon() + update_inv_shoes() + //End bloody footprints - else //we're on the floor, smear some stuff around - if(loc == NewLoc) - if(!has_gravity(loc)) + S.step_action() + else + if(loc == NewLoc) + if(!has_gravity(loc)) + return + var/turf/T = get_turf(src) + var/step_print = dna.species.get_move_trail(src) + if(bloodiness && blood_smear[blood_state]) + var/obj/effect/decal/cleanable/blood/footprints/tracks/oldFP = locate(step_print) in T + if(oldFP && (oldFP.blood_state == blood_state && oldFP == dna.species.move_trail && oldFP.blood_color == blood_color)) return - var/turf/T = get_turf(src) - var/mob/living/carbon/human/H = src - if(bloodiness) - var/obj/effect/decal/cleanable/blood/footprints/tracks/oldFP = locate(/obj/effect/decal/cleanable/blood/footprints/tracks) in T - if(oldFP && (oldFP.blood_state == blood_state && oldFP.color == color)) - return - else - var/obj/effect/decal/cleanable/blood/footprints/tracks/FP = new /obj/effect/decal/cleanable/blood/footprints/tracks/body(T) - FP.icon_state = FOOTPRINT_DRAG - FP.print_state = FOOTPRINT_DRAG - FP.add_blood_DNA(return_blood_DNA()) - FP.blood_color = H.blood_color - FP.update_icon() - var/newdir = get_dir(T, loc) - if(newdir == dir) - FP.setDir(newdir) - else - newdir = newdir | dir - if(newdir == 3) - newdir = 1 - else if(newdir == 12) - newdir = 4 - FP.setDir(newdir) - bloodiness-- + else + var/obj/effect/decal/cleanable/blood/footprints/tracks/FP = new step_print(T) + if(("taur" in dna.species.mutant_bodyparts) && (dna.features["taur"] != "None") && !lying) + if(dna.features["taur"] in GLOB.noodle_taurs) + FP.icon_state = FOOTPRINT_SNAKE + FP.print_state = FOOTPRINT_SNAKE + else if(dna.features["taur"] in GLOB.paw_taurs) + FP.icon_state = FOOTPRINT_PAW + FP.print_state = FOOTPRINT_PAW + if(!dna.species.move_trail && !lying) //we're assuming people have their chosen snowflake on, so. + FP.icon_state = FOOTPRINT_SHOE + FP.print_state = FOOTPRINT_SHOE + + FP.add_blood_DNA(return_blood_DNA()) + FP.blood_color = blood_color + FP.entered_dirs |= dir + FP.bloodiness = blood_smear[blood_state] + FP.update_icon() + bloodiness-- /mob/living/carbon/human/Process_Spacemove(movement_dir = 0) //Temporary laziness thing. Will change to handles by species reee. if(dna.species.space_move(src)) diff --git a/code/modules/mob/living/carbon/human/species.dm b/code/modules/mob/living/carbon/human/species.dm index d3eb4bafa0..e34d17163b 100644 --- a/code/modules/mob/living/carbon/human/species.dm +++ b/code/modules/mob/living/carbon/human/species.dm @@ -77,7 +77,7 @@ GLOBAL_LIST_EMPTY(roundstart_races) var/fixed_mut_color3 = "" var/whitelisted = 0 //Is this species restricted to certain players? var/whitelist = list() //List the ckeys that can use this species, if it's whitelisted.: list("John Doe", "poopface666", "SeeALiggerPullTheTrigger") Spaces & capitalization can be included or ignored entirely for each key as it checks for both. - + var/obj/effect/decal/cleanable/blood/footprints/tracks/move_trail = /obj/effect/decal/cleanable/blood/footprints/tracks/shoe // What marks are left when walking /////////// // PROCS // @@ -927,6 +927,15 @@ GLOBAL_LIST_EMPTY(roundstart_races) return "TAUR" //END EDIT +// Impliments different trails for species depending on if they're wearing shoes. +/datum/species/proc/get_move_trail(var/mob/living/carbon/human/H) + if(H.lying) + return /obj/effect/decal/cleanable/blood/footprints/tracks/body + if(H.shoes || (H.wear_suit && (H.wear_suit.body_parts_covered & FEET))) + var/obj/item/clothing/shoes/shoes = (H.wear_suit && (H.wear_suit.body_parts_covered & FEET)) ? H.wear_suit : H.shoes // suits take priority over shoes + return shoes.move_trail + else + return move_trail /datum/species/proc/spec_life(mob/living/carbon/human/H) if(H.has_trait(TRAIT_NOBREATH)) diff --git a/code/modules/mob/living/carbon/human/species_types/angel.dm b/code/modules/mob/living/carbon/human/species_types/angel.dm index 5122294956..92798c8bc7 100644 --- a/code/modules/mob/living/carbon/human/species_types/angel.dm +++ b/code/modules/mob/living/carbon/human/species_types/angel.dm @@ -10,6 +10,7 @@ blacklisted = 1 limbs_id = "human" skinned_type = /obj/item/stack/sheet/animalhide/human + move_trail = /obj/effect/decal/cleanable/blood/footprints/tracks/foot var/datum/action/innate/flight/fly diff --git a/code/modules/mob/living/carbon/human/species_types/humans.dm b/code/modules/mob/living/carbon/human/species_types/humans.dm index 96b43795a2..d3288e1cd1 100644 --- a/code/modules/mob/living/carbon/human/species_types/humans.dm +++ b/code/modules/mob/living/carbon/human/species_types/humans.dm @@ -9,6 +9,7 @@ skinned_type = /obj/item/stack/sheet/animalhide/human disliked_food = GROSS | RAW liked_food = JUNKFOOD | FRIED + move_trail = /obj/effect/decal/cleanable/blood/footprints/tracks/foot /datum/species/human/qualifies_for_rank(rank, list/features) return TRUE //Pure humans are always allowed in all roles. diff --git a/code/modules/mob/living/carbon/human/species_types/jellypeople.dm b/code/modules/mob/living/carbon/human/species_types/jellypeople.dm index 5c8c082d47..ea7a20163a 100644 --- a/code/modules/mob/living/carbon/human/species_types/jellypeople.dm +++ b/code/modules/mob/living/carbon/human/species_types/jellypeople.dm @@ -10,6 +10,7 @@ inherent_traits = list(TRAIT_TOXINLOVER) meat = /obj/item/reagent_containers/food/snacks/meat/slab/human/mutant/slime exotic_blood = "jellyblood" + exotic_bloodtype = "GEL" damage_overlay_type = "" var/datum/action/innate/regenerate_limbs/regenerate_limbs var/datum/action/innate/slime_change/slime_change //CIT CHANGE @@ -17,6 +18,7 @@ coldmod = 6 // = 3x cold damage heatmod = 0.5 // = 1/4x heat damage burnmod = 0.5 // = 1/2x generic burn damage + move_trail = /obj/effect/decal/cleanable/blood/footprints/tracks/foot /datum/species/jelly/on_species_loss(mob/living/carbon/C) if(regenerate_limbs) @@ -119,7 +121,7 @@ name = "Slimeperson" id = "slime" default_color = "00FFFF" - species_traits = list(MUTCOLORS,EYECOLOR,HAIR,FACEHAIR,NOBLOOD) + species_traits = list(MUTCOLORS,EYECOLOR,HAIR,FACEHAIR) say_mod = "says" hair_color = "mutcolor" hair_alpha = 150 diff --git a/code/modules/mob/living/carbon/human/species_types/lizardpeople.dm b/code/modules/mob/living/carbon/human/species_types/lizardpeople.dm index c5a64ebd13..ba4d8b8781 100644 --- a/code/modules/mob/living/carbon/human/species_types/lizardpeople.dm +++ b/code/modules/mob/living/carbon/human/species_types/lizardpeople.dm @@ -73,6 +73,7 @@ /datum/species/lizard/on_species_gain(mob/living/carbon/human/C, datum/species/old_species) if(("legs" in C.dna.species.mutant_bodyparts) && C.dna.features["legs"] == "Digitigrade Legs") species_traits += DIGITIGRADE + move_trail = /obj/effect/decal/cleanable/blood/footprints/tracks/claw if(DIGITIGRADE in species_traits) C.Digitigrade_Leg_Swap(FALSE) return ..() @@ -80,6 +81,7 @@ /datum/species/lizard/on_species_loss(mob/living/carbon/human/C, datum/species/new_species) if(("legs" in C.dna.species.mutant_bodyparts) && C.dna.features["legs"] == "Normal Legs") species_traits -= DIGITIGRADE + move_trail = /obj/effect/decal/cleanable/blood/footprints/tracks/foot if(DIGITIGRADE in species_traits) C.Digitigrade_Leg_Swap(TRUE) @@ -95,6 +97,7 @@ mutantlungs = /obj/item/organ/lungs/ashwalker burnmod = 0.9 brutemod = 0.9 + move_trail = /obj/effect/decal/cleanable/blood/footprints/tracks/claw /datum/species/lizard/ashwalker/on_species_gain(mob/living/carbon/human/C, datum/species/old_species) if((C.dna.features["spines"] != "None" ) && (C.dna.features["tail"] == "None")) //tbh, it's kinda ugly for them not to have a tail yet have floating spines diff --git a/code/modules/mob/living/carbon/human/species_types/mothmen.dm b/code/modules/mob/living/carbon/human/species_types/mothmen.dm index d15d989384..4c2c360c68 100644 --- a/code/modules/mob/living/carbon/human/species_types/mothmen.dm +++ b/code/modules/mob/living/carbon/human/species_types/mothmen.dm @@ -15,6 +15,7 @@ disliked_food = FRUIT | GROSS toxic_food = MEAT | RAW mutanteyes = /obj/item/organ/eyes/moth + move_trail = /obj/effect/decal/cleanable/blood/footprints/tracks/claw /datum/species/moth/on_species_gain(mob/living/carbon/C) . = ..() diff --git a/code/modules/mob/living/carbon/human/species_types/plasmamen.dm b/code/modules/mob/living/carbon/human/species_types/plasmamen.dm index 6f5ae6f4eb..9fae5a21ea 100644 --- a/code/modules/mob/living/carbon/human/species_types/plasmamen.dm +++ b/code/modules/mob/living/carbon/human/species_types/plasmamen.dm @@ -21,6 +21,7 @@ var/internal_fire = FALSE //If the bones themselves are burning clothes won't help you much disliked_food = FRUIT liked_food = VEGETABLES + move_trail = /obj/effect/decal/cleanable/blood/footprints/tracks/foot /datum/species/plasmaman/spec_life(mob/living/carbon/human/H) var/datum/gas_mixture/environment = H.loc.return_air() diff --git a/code/modules/mob/living/carbon/human/species_types/podpeople.dm b/code/modules/mob/living/carbon/human/species_types/podpeople.dm index 3e238f8a53..cfbe16bfbf 100644 --- a/code/modules/mob/living/carbon/human/species_types/podpeople.dm +++ b/code/modules/mob/living/carbon/human/species_types/podpeople.dm @@ -12,6 +12,7 @@ meat = /obj/item/reagent_containers/food/snacks/meat/slab/human/mutant/plant disliked_food = MEAT | DAIRY liked_food = VEGETABLES | FRUIT | GRAIN + move_trail = /obj/effect/decal/cleanable/blood/footprints/tracks/foot /datum/species/pod/on_species_gain(mob/living/carbon/C, datum/species/old_species) . = ..() diff --git a/code/modules/mob/living/carbon/human/species_types/skeletons.dm b/code/modules/mob/living/carbon/human/species_types/skeletons.dm index d778aa50f2..25967dd0c3 100644 --- a/code/modules/mob/living/carbon/human/species_types/skeletons.dm +++ b/code/modules/mob/living/carbon/human/species_types/skeletons.dm @@ -13,6 +13,7 @@ damage_overlay_type = ""//let's not show bloody wounds or burns over bones. disliked_food = NONE liked_food = GROSS | MEAT | RAW + move_trail = /obj/effect/decal/cleanable/blood/footprints/tracks/foot /datum/species/skeleton/check_roundstart_eligible() if(SSevents.holidays && SSevents.holidays[HALLOWEEN]) diff --git a/code/modules/mob/living/carbon/human/species_types/zombies.dm b/code/modules/mob/living/carbon/human/species_types/zombies.dm index 504dbb514b..e2c8ffb9c3 100644 --- a/code/modules/mob/living/carbon/human/species_types/zombies.dm +++ b/code/modules/mob/living/carbon/human/species_types/zombies.dm @@ -15,6 +15,7 @@ var/static/list/spooks = list('sound/hallucinations/growl1.ogg','sound/hallucinations/growl2.ogg','sound/hallucinations/growl3.ogg','sound/hallucinations/veryfar_noise.ogg','sound/hallucinations/wail.ogg') disliked_food = NONE liked_food = GROSS | MEAT | RAW + move_trail = /obj/effect/decal/cleanable/blood/footprints/tracks/foot /datum/species/zombie/check_roundstart_eligible() if(SSevents.holidays && SSevents.holidays[HALLOWEEN]) @@ -47,7 +48,7 @@ /datum/species/zombie/infectious/spec_life(mob/living/carbon/C) . = ..() C.a_intent = INTENT_HARM // THE SUFFERING MUST FLOW - + //Zombies never actually die, they just fall down until they regenerate enough to rise back up. //They must be restrained, beheaded or gibbed to stop being a threat. if(regen_cooldown < world.time) @@ -58,7 +59,7 @@ C.adjustToxLoss(-heal_amt) if(!C.InCritical() && prob(4)) playsound(C, pick(spooks), 50, TRUE, 10) - + //Congrats you somehow died so hard you stopped being a zombie /datum/species/zombie/infectious/spec_death(mob/living/carbon/C) . = ..() diff --git a/code/modules/reagents/chemistry/reagents/other_reagents.dm b/code/modules/reagents/chemistry/reagents/other_reagents.dm index 85d73d6a6e..d91b675e22 100644 --- a/code/modules/reagents/chemistry/reagents/other_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/other_reagents.dm @@ -1,5 +1,5 @@ /datum/reagent/blood - data = list("donor"=null,"viruses"=null,"blood_DNA"=null, "bloodcolor" = BLOOD_COLOR_HUMAN, "blood_type"=null,"resistances"=null,"trace_chem"=null,"mind"=null,"ckey"=null,"gender"=null,"real_name"=null,"cloneable"=null,"factions"=null) + data = list("donor"=null,"viruses"=null,"blood_DNA"=null, "bloodcolor" = BLOOD_COLOR_HUMAN, "blood_type"= "O+","resistances"=null,"trace_chem"=null,"mind"=null,"ckey"=null,"gender"=null,"real_name"=null,"cloneable"=null,"factions"=null) name = "Blood" id = "blood" color = BLOOD_COLOR_HUMAN // rgb: 200, 0, 0 @@ -182,7 +182,7 @@ description = "You don't even want to think about what's in here." taste_description = "gross iron" shot_glass_icon_state = "shotglassred" - data = list("donor"=null,"viruses"=null,"blood_DNA"=null, "bloodcolor" = BLOOD_COLOR_HUMAN, "blood_type"=null,"resistances"=null,"trace_chem"=null,"mind"=null,"ckey"=null,"gender"=null,"real_name"=null,"cloneable"=null,"factions"=null) + data = list("donor"=null,"viruses"=null,"blood_DNA"=null, "bloodcolor" = BLOOD_COLOR_HUMAN, "blood_type"= "O+","resistances"=null,"trace_chem"=null,"mind"=null,"ckey"=null,"gender"=null,"real_name"=null,"cloneable"=null,"factions"=null) /datum/reagent/liquidgibs/xeno name = "Liquid xeno gibs" diff --git a/icons/effects/fluidtracks.dmi b/icons/effects/fluidtracks.dmi index 6579334e87..e2f0c97479 100644 Binary files a/icons/effects/fluidtracks.dmi and b/icons/effects/fluidtracks.dmi differ diff --git a/modular_citadel/code/modules/mob/living/carbon/human/species_types/furrypeople.dm b/modular_citadel/code/modules/mob/living/carbon/human/species_types/furrypeople.dm index 89e6eca180..3301345fcf 100644 --- a/modular_citadel/code/modules/mob/living/carbon/human/species_types/furrypeople.dm +++ b/modular_citadel/code/modules/mob/living/carbon/human/species_types/furrypeople.dm @@ -13,6 +13,7 @@ meat = /obj/item/reagent_containers/food/snacks/meat/slab/human/mutant/mammal liked_food = MEAT | FRIED disliked_food = TOXIC + move_trail = /obj/effect/decal/cleanable/blood/footprints/tracks/paw //Curiosity killed the cat's wagging tail. /datum/species/mammal/spec_death(gibbed, mob/living/carbon/human/H) @@ -42,6 +43,20 @@ mutant_bodyparts |= "mam_tail" H.update_body() +/datum/species/mammal/on_species_gain(mob/living/carbon/human/C, datum/species/old_species) + if(("legs" in C.dna.species.mutant_bodyparts) && C.dna.features["legs"] == "Digitigrade Legs") + species_traits += DIGITIGRADE + move_trail = /obj/effect/decal/cleanable/blood/footprints/tracks/paw + if(DIGITIGRADE in species_traits) + C.Digitigrade_Leg_Swap(FALSE) + return ..() + +/datum/species/mammal/on_species_loss(mob/living/carbon/human/C, datum/species/new_species) + if(("legs" in C.dna.species.mutant_bodyparts) && C.dna.features["legs"] == "Normal Legs") + species_traits -= DIGITIGRADE + move_trail = /obj/effect/decal/cleanable/blood/footprints/tracks/foot + if(DIGITIGRADE in species_traits) + C.Digitigrade_Leg_Swap(TRUE) /datum/species/mammal/qualifies_for_rank(rank, list/features) return TRUE @@ -63,6 +78,7 @@ miss_sound = 'sound/weapons/slashmiss.ogg' liked_food = MEAT | FRUIT disliked_food = TOXIC + move_trail = /obj/effect/decal/cleanable/blood/footprints/tracks/claw /datum/species/avian/spec_death(gibbed, mob/living/carbon/human/H) if(H) @@ -110,6 +126,7 @@ liked_food = MEAT disliked_food = TOXIC meat = /obj/item/reagent_containers/food/snacks/carpmeat/aquatic + move_trail = /obj/effect/decal/cleanable/blood/footprints/tracks/foot /datum/species/aquatic/spec_death(gibbed, mob/living/carbon/human/H) if(H) @@ -156,6 +173,7 @@ miss_sound = 'sound/weapons/slashmiss.ogg' liked_food = MEAT | FRUIT disliked_food = TOXIC + move_trail = /obj/effect/decal/cleanable/blood/footprints/tracks/claw /datum/species/insect/spec_death(gibbed, mob/living/carbon/human/H) if(H) @@ -204,23 +222,25 @@ miss_sound = 'sound/weapons/slashmiss.ogg' meat = /obj/item/reagent_containers/food/snacks/meat/slab/xeno skinned_type = /obj/item/stack/sheet/animalhide/xeno - exotic_bloodtype = "xenoblood" + exotic_blood = "xenoblood" + exotic_bloodtype = "X*" damage_overlay_type = "xeno" liked_food = MEAT /datum/species/xeno/on_species_gain(mob/living/carbon/human/C, datum/species/old_species) if(("legs" in C.dna.species.mutant_bodyparts) && C.dna.features["legs"] == "Digitigrade Legs") species_traits += DIGITIGRADE + move_trail = /obj/effect/decal/cleanable/blood/footprints/tracks/claw if(DIGITIGRADE in species_traits) C.Digitigrade_Leg_Swap(FALSE) - . = ..() + return ..() /datum/species/xeno/on_species_loss(mob/living/carbon/human/C, datum/species/new_species) if(("legs" in C.dna.species.mutant_bodyparts) && C.dna.features["legs"] == "Normal Legs") species_traits -= DIGITIGRADE + move_trail = /obj/effect/decal/cleanable/blood/footprints/tracks/foot if(DIGITIGRADE in species_traits) C.Digitigrade_Leg_Swap(TRUE) - . = ..() //Praise the Omnissiah, A challange worthy of my skills - HS diff --git a/modular_citadel/code/modules/mob/living/carbon/human/species_types/ipc.dm b/modular_citadel/code/modules/mob/living/carbon/human/species_types/ipc.dm index e132dbfc2c..5b35195f31 100644 --- a/modular_citadel/code/modules/mob/living/carbon/human/species_types/ipc.dm +++ b/modular_citadel/code/modules/mob/living/carbon/human/species_types/ipc.dm @@ -13,6 +13,7 @@ meat = /obj/item/reagent_containers/food/snacks/meat/slab/human/mutant/ipc exotic_blood = "oilblood" + exotic_bloodtype = "HF" var/datum/action/innate/monitor_change/screen