mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-15 09:56:47 +01:00
Unsimulated Footprints Fix (#8722)
Footprints now properly carry over into ash turfs.
This commit is contained in:
@@ -63,12 +63,6 @@
|
||||
if (!mapload)
|
||||
updateVisibility(src)
|
||||
|
||||
/turf/simulated/proc/add_tracks(var/typepath, var/footprint_DNA, var/comingdir, var/goingdir, var/footprint_color="#A10808")
|
||||
var/obj/effect/decal/cleanable/blood/tracks/tracks = locate(typepath) in src
|
||||
if(!tracks)
|
||||
tracks = new typepath(src)
|
||||
tracks.add_tracks(footprint_DNA, comingdir, goingdir, footprint_color)
|
||||
|
||||
/turf/simulated/proc/update_dirt()
|
||||
dirt = min(dirt+1, 101)
|
||||
var/obj/effect/decal/cleanable/dirt/dirtoverlay = locate(/obj/effect/decal/cleanable/dirt, src)
|
||||
@@ -117,37 +111,6 @@
|
||||
// Dirt overlays.
|
||||
update_dirt()
|
||||
|
||||
if(istype(M, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = M
|
||||
// Tracking blood
|
||||
var/list/footprint_DNA = list()
|
||||
var/footprint_color
|
||||
var/will_track = FALSE
|
||||
if(H.shoes)
|
||||
var/obj/item/clothing/shoes/S = H.shoes
|
||||
if(istype(S))
|
||||
S.handle_movement(src, H.m_intent == "run" ? TRUE : FALSE)
|
||||
if(S.track_footprint)
|
||||
if(S.blood_DNA)
|
||||
footprint_DNA = S.blood_DNA
|
||||
footprint_color = S.blood_color
|
||||
S.track_footprint--
|
||||
will_track = TRUE
|
||||
else
|
||||
if(H.track_footprint)
|
||||
if(H.feet_blood_DNA)
|
||||
footprint_DNA = H.feet_blood_DNA
|
||||
footprint_color = H.footprint_color
|
||||
H.track_footprint--
|
||||
will_track = TRUE
|
||||
|
||||
if(will_track)
|
||||
add_tracks(H.species.get_move_trail(H), footprint_DNA, H.dir, 0, footprint_color) // Coming
|
||||
var/turf/simulated/from = get_step(H, reverse_direction(H.dir))
|
||||
if(istype(from) && from)
|
||||
from.add_tracks(H.species.get_move_trail(H), footprint_DNA, 0, H.dir, footprint_color) // Going
|
||||
footprint_DNA = null
|
||||
|
||||
M.inertia_dir = 0
|
||||
|
||||
..()
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
icon_state = "0"
|
||||
dynamic_lighting = 0
|
||||
footstep_sound = null //Override to make sure because yeah
|
||||
tracks_footprint = FALSE
|
||||
|
||||
plane = PLANE_SPACE_BACKGROUND
|
||||
|
||||
|
||||
+39
-1
@@ -35,7 +35,8 @@
|
||||
var/movement_cost = 0 // How much the turf slows down movement, if any.
|
||||
|
||||
// Footprint info
|
||||
var/does_footprint = FALSE
|
||||
var/tracks_footprint = TRUE // Whether footprints will appear on this turf
|
||||
var/does_footprint = FALSE // Whether stepping on this turf will dirty your shoes or feet with the below
|
||||
var/footprint_color // The hex color produced by the turf
|
||||
var/track_distance = 12 // How far the tracks last
|
||||
|
||||
@@ -243,6 +244,37 @@ var/const/enterloopsanity = 100
|
||||
|
||||
H.update_inv_shoes(TRUE)
|
||||
|
||||
if(istype(AM, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = AM
|
||||
// Tracking blood
|
||||
var/list/footprint_DNA = list()
|
||||
var/footprint_color
|
||||
var/will_track = FALSE
|
||||
if(H.shoes)
|
||||
var/obj/item/clothing/shoes/S = H.shoes
|
||||
if(istype(S))
|
||||
S.handle_movement(src, H.m_intent == "run" ? TRUE : FALSE)
|
||||
if(S.track_footprint)
|
||||
if(S.blood_DNA)
|
||||
footprint_DNA = S.blood_DNA
|
||||
footprint_color = S.blood_color
|
||||
S.track_footprint--
|
||||
will_track = TRUE
|
||||
else
|
||||
if(H.track_footprint)
|
||||
if(H.feet_blood_DNA)
|
||||
footprint_DNA = H.feet_blood_DNA
|
||||
footprint_color = H.footprint_color
|
||||
H.track_footprint--
|
||||
will_track = TRUE
|
||||
|
||||
if(tracks_footprint && will_track)
|
||||
add_tracks(H.species.get_move_trail(H), footprint_DNA, H.dir, 0, footprint_color) // Coming
|
||||
var/turf/simulated/from = get_step(H, reverse_direction(H.dir))
|
||||
if(istype(from) && from)
|
||||
from.add_tracks(H.species.get_move_trail(H), footprint_DNA, 0, H.dir, footprint_color) // Going
|
||||
footprint_DNA = null
|
||||
|
||||
..()
|
||||
|
||||
var/objects = 0
|
||||
@@ -255,6 +287,12 @@ var/const/enterloopsanity = 100
|
||||
if (oAM.simulated)
|
||||
AM.proximity_callback(oAM)
|
||||
|
||||
/turf/proc/add_tracks(var/typepath, var/footprint_DNA, var/comingdir, var/goingdir, var/footprint_color="#A10808")
|
||||
var/obj/effect/decal/cleanable/blood/tracks/tracks = locate(typepath) in src
|
||||
if(!tracks)
|
||||
tracks = new typepath(src)
|
||||
tracks.add_tracks(footprint_DNA, comingdir, goingdir, footprint_color)
|
||||
|
||||
/atom/movable/proc/proximity_callback(atom/movable/AM)
|
||||
set waitfor = FALSE
|
||||
sleep(0)
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
author: Geeves
|
||||
|
||||
delete-after: True
|
||||
|
||||
changes:
|
||||
- bugfix: "Footprints now properly carry over into ash turfs."
|
||||
Reference in New Issue
Block a user