Footprints in the Ash (#4484)

Ash will now track onto a user's boots, creating footprints in both the ash and any subsequent tiling the user steps on. Currently these footprints use the track template that blood uses, and indeed are a subtype of blood-tracks. The result is perhaps not the best sprite. Even so, I thought it at least a worthy experiment.
This commit is contained in:
LordFowl
2018-04-01 00:44:16 +03:00
committed by Erki
parent 16f9794354
commit 30039435a4
3 changed files with 80 additions and 6 deletions
+32
View File
@@ -100,6 +100,38 @@
if (prob(20))
add_overlay("asteroid[rand(0, 9)]", TRUE)
/turf/simulated/floor/asteroid/ash/Entered(atom/A, atom/OL)
..()
if(ishuman(A))
var/mob/living/carbon/human/H = A
var/obj/item/organ/external/l_foot = H.get_organ("l_foot")
var/obj/item/organ/external/r_foot = H.get_organ("r_foot")
var/hasfeet = 1
if((!l_foot || l_foot.is_stump()) && (!r_foot || r_foot.is_stump()))
hasfeet = 0
if(H.shoes && !H.buckled)//Adding ash to shoes
var/obj/item/clothing/shoes/S = H.shoes
if(istype(S))
S.blood_color = "#6C6564"
S.track_blood = max(12,S.track_blood)
if(!S.blood_overlay)
S.generate_blood_overlay()
if(S.blood_overlay && S.blood_overlay.color != "#6C6564")
S.cut_overlay(S.blood_overlay, TRUE)
S.blood_overlay.color = "#6C6564"
S.add_overlay(S.blood_overlay, TRUE)
else if (hasfeet)//Or feet
H.feet_blood_color = "#6C6564"
H.track_blood = max(12,H.track_blood)
H.update_inv_shoes(1)
/turf/simulated/floor/asteroid/ash/rocky
name = "rocky ash"
icon_state = "rockyash"