Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Foot print fix #763

Merged
merged 14 commits into from
Dec 20, 2024
6 changes: 4 additions & 2 deletions code/game/objects/effects/decals/Cleanable/aliens.dm
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,17 @@
desc = "It's yellow and acidic. It looks like... <i>blood?</i>"
icon = 'icons/effects/blood.dmi'
basecolor = "#dffc00"
amount = 0
blood_color = "#66b400"
amount = 3
MalorMorfin marked this conversation as resolved.
Show resolved Hide resolved

/obj/effect/decal/cleanable/blood/gibs/xeno
name = "steaming gibs"
desc = "Gnarly..."
icon_state = "xgib1"
random_icon_states = list("xgib1", "xgib2", "xgib3", "xgib4", "xgib5", "xgib6")
basecolor = "#dffc00"
amount = 0
blood_color = "#66b400"
amount = 5

/obj/effect/decal/cleanable/blood/gibs/xeno/up
random_icon_states = list("xgib1", "xgib2", "xgib3", "xgib4", "xgib5", "xgib6","xgibup1","xgibup1","xgibup1")
Expand Down
4 changes: 3 additions & 1 deletion code/game/objects/effects/decals/Cleanable/humans.dm
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
icon_state = "mfloor1"
random_icon_states = list("mfloor1", "mfloor2", "mfloor3", "mfloor4", "mfloor5", "mfloor6", "mfloor7")
var/base_icon = 'icons/effects/blood.dmi'
var/basecolor="#ff3b00" // Color when wet.
var/basecolor = "#9b0707"
var/amount = 5
var/drying_timer

Expand Down Expand Up @@ -64,6 +64,8 @@
var/hasfeet = 1
if((!l_foot || l_foot.limb_status & LIMB_DESTROYED) && (!r_foot || r_foot.limb_status & LIMB_DESTROYED))
hasfeet = 0
if(!isnull(blood_color))
basecolor = blood_color
if(perp.shoes && !perp.buckled)//Adding blood to shoes
var/obj/item/clothing/shoes/S = perp.shoes
if(istype(S))
Expand Down
3 changes: 2 additions & 1 deletion code/game/objects/effects/decals/Cleanable/tracks.dm
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
var/dirs=0
icon = 'icons/effects/fluidtracks.dmi'
icon_state = ""
basecolor = "#ffffff"
var/coming_state="blood1"
var/going_state="blood2"
var/updatedtracks=0
Expand Down Expand Up @@ -62,7 +63,7 @@
* @param goingdir Direction tracks are going to (or 0).
* @param bloodcolor Color of the blood when wet.
*/
/obj/effect/decal/cleanable/blood/tracks/proc/AddTracks(list/DNA, comingdir, goingdir, bloodcolor="#A10808")
/obj/effect/decal/cleanable/blood/tracks/proc/AddTracks(list/DNA, comingdir, goingdir, bloodcolor)
var/updated=0
// Shift our goingdir 4 spaces to the left so it's in the GOING bitblock.
var/realgoing=goingdir<<4
Expand Down
30 changes: 0 additions & 30 deletions code/game/turfs/open.dm
Original file line number Diff line number Diff line change
Expand Up @@ -12,36 +12,6 @@
var/heavyxenofootstep = FOOTSTEP_GENERIC_HEAVY
smoothing_groups = list(SMOOTH_GROUP_OPEN_FLOOR)

/turf/open/Entered(atom/movable/arrived, atom/old_loc, list/atom/old_locs) //todo refactor this entire proc is garbage
if(iscarbon(arrived))
var/mob/living/carbon/C = arrived
if(!C.lying_angle && !(C.buckled && istype(C.buckled,/obj/structure/bed/chair)))
if(ishuman(C))
var/mob/living/carbon/human/H = C

// Tracking blood
var/list/bloodDNA = null
var/bloodcolor=""
if(H.shoes)
var/obj/item/clothing/shoes/S = H.shoes
if(S.track_blood && S.blood_overlay)
bloodcolor=S.blood_color
S.track_blood--
else
if(H.track_blood && H.feet_blood_color)
bloodcolor=H.feet_blood_color
H.track_blood--

if (bloodDNA && !locate(/obj/structure) in contents)
src.AddTracks(/obj/effect/decal/cleanable/blood/tracks/footprints,bloodDNA,H.dir,0,bloodcolor) // Coming
var/turf/from = get_step(H,REVERSE_DIR(H.dir))
if(istype(from) && from)
from.AddTracks(/obj/effect/decal/cleanable/blood/tracks/footprints,bloodDNA,0,H.dir,bloodcolor) // Going

bloodDNA = null

return ..()

/turf/open/examine(mob/user)
. = ..()
. += ceiling_desc()
Expand Down
2 changes: 1 addition & 1 deletion code/game/turfs/turf.dm
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@
return abs(x - T.x) + abs(y - T.y)

//Blood stuff------------
/turf/proc/AddTracks(typepath,bloodDNA,comingdir,goingdir,bloodcolor="#A10808")
/turf/proc/AddTracks(typepath,bloodDNA,comingdir,goingdir,bloodcolor)
if(!can_bloody)
return
var/obj/effect/decal/cleanable/blood/tracks/tracks = locate(typepath) in src
Expand Down
24 changes: 24 additions & 0 deletions code/modules/mob/living/carbon/human/human_movement.dm
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,31 @@
if(shoes && !buckled)
var/obj/item/clothing/shoes/S = shoes
S.step_action()
ToTracks(direction)

/mob/living/carbon/human/proc/ToTracks(direction)
if(lying_angle && (buckled && istype(buckled, /obj/structure/bed/chair)))
return
Helg2 marked this conversation as resolved.
Show resolved Hide resolved

// Tracking blood
var/bloodcolor = ""
var/bloodamount = 0
if(shoes?.track_blood && shoes?.blood_overlay)
bloodcolor = shoes.blood_color
bloodamount = shoes.track_blood
shoes.track_blood--
else if(track_blood && feet_blood_color)
bloodcolor = feet_blood_color
bloodamount = track_blood
track_blood--

if ((bloodamount > 0) && !locate(/obj/structure) in contents)
Helg2 marked this conversation as resolved.
Show resolved Hide resolved
var/turf/turf = get_turf(src)
turf.AddTracks(/obj/effect/decal/cleanable/blood/tracks/footprints, null, direction, 0, bloodcolor) // Coming
var/turf/from = get_step(src, REVERSE_DIR(direction))
from.AddTracks(/obj/effect/decal/cleanable/blood/tracks/footprints, null, 0, direction, bloodcolor) // Going

return
Helg2 marked this conversation as resolved.
Show resolved Hide resolved

/mob/living/carbon/human/proc/Process_Cloaking_Router(mob/living/carbon/human/user)
if(!user.cloaking)
Expand Down
Binary file modified icons/effects/fluidtracks.dmi
Binary file not shown.
Loading