Tweaks amount of footprints, and fixes some bugs related to footprints, adds shoetype tracking to footprints

This commit is contained in:
Remie Richards
2015-09-13 15:36:56 +01:00
parent 803b6dfd87
commit 4bb97067b2
5 changed files with 47 additions and 16 deletions
@@ -50,6 +50,11 @@
var/list/existing_dirs = list()
blood_DNA = list()
/obj/effect/decal/cleanable/trail_holder/can_bloodcrawl_in()
return 1
/obj/effect/decal/cleanable/blood/gibs
name = "gibs"
desc = "They look bloody and gruesome."
@@ -101,31 +106,37 @@
icon = 'icons/effects/drip.dmi'
icon_state = "1"
random_icon_states = list("1","2","3","4","5")
bloodiness = 0
var/list/drips = list()
/obj/effect/decal/cleanable/blood/drip/New()
..()
spawn(1)
drips |= icon_state
bloodiness = rand(5,15)
/obj/effect/decal/cleanable/blood/drip/can_bloodcrawl_in()
return 1
//BLOODY FOOTPRINTS
/obj/effect/decal/cleanable/blood/footprints
name = "footprints"
icon = 'icons/effects/footprints.dmi'
icon_state = "nothingwhatsoever"
desc = "Follow the bloody brick road!"
desc = "where might they lead?"
gender = PLURAL
random_icon_states = null
var/entered_dirs = 0
var/exited_dirs = 0
blood_state = BLOOD_STATE_HUMAN //the icon state to load images from
var/list/shoe_types = list()
/obj/effect/decal/cleanable/blood/footprints/Crossed(atom/movable/O)
if(ishuman(O))
var/mob/living/carbon/human/H = O
if(H.shoes) //Don't need to check for blood, as the footprints will MAKE the shoes bloody
entered_dirs|= H.dir
shoe_types |= H.shoes.type
update_icon()
/obj/effect/decal/cleanable/blood/footprints/Uncrossed(atom/movable/O)
@@ -133,6 +144,7 @@
var/mob/living/carbon/human/H = O
if(H.shoes)
exited_dirs|= H.dir
shoe_types |= H.shoes.type
update_icon()
/obj/effect/decal/cleanable/blood/footprints/update_icon()
@@ -158,4 +170,22 @@
if(I)
overlays += I
alpha = BLOODY_FOOTPRINT_BASE_ALPHA+bloodiness
alpha = BLOODY_FOOTPRINT_BASE_ALPHA+bloodiness
/obj/effect/decal/cleanable/blood/footprints/examine(mob/user)
. = ..()
if(shoe_types.len)
. += "You recognise the footprints as belonging to:\n"
for(var/shoe in shoe_types)
var/obj/item/clothing/shoes/S = shoe
. += "some <B>[initial(S.name)]</B> \icon[S]\n"
user << .
/obj/effect/decal/cleanable/blood/footprints/can_bloodcrawl_in()
if((blood_state != BLOOD_STATE_OIL) && (blood_state != BLOOD_STATE_NOT_BLOODY))
return 1
return 0
@@ -50,7 +50,7 @@
/obj/effect/decal/cleanable/Crossed(atom/movable/O)
if(ishuman(O))
var/mob/living/carbon/human/H = O
if(H.shoes && blood_state)
if(H.shoes && blood_state && bloodiness)
var/obj/item/clothing/shoes/S = H.shoes
var/add_blood = 0
if(bloodiness >= BLOOD_GAIN_PER_STEP)
@@ -60,11 +60,12 @@
bloodiness -= add_blood
S.bloody_shoes[blood_state] = min(MAX_SHOE_BLOODINESS,S.bloody_shoes[blood_state]+add_blood)
S.blood_state = blood_state
alpha = BLOODY_FOOTPRINT_BASE_ALPHA+bloodiness
update_icon()
H.update_inv_shoes()
if(!bloodiness)
animate(src,alpha = 0,BLOOD_FADEOUT_TIME)
sleep(BLOOD_FADEOUT_TIME)
qdel(src)
return
/obj/effect/decal/cleanable/proc/can_bloodcrawl_in()
return bloodiness