mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-26 06:29:23 +01:00
Tweaks amount of footprints, and fixes some bugs related to footprints, adds shoetype tracking to footprints
This commit is contained in:
@@ -252,9 +252,9 @@
|
||||
var/list/bloody_footprints_cache = list()
|
||||
|
||||
//Bloody shoes/footprints
|
||||
#define MAX_SHOE_BLOODINESS 100
|
||||
#define BLOODY_FOOTPRINT_BASE_ALPHA 100
|
||||
#define BLOOD_GAIN_PER_STEP 50
|
||||
#define MAX_SHOE_BLOODINESS 50
|
||||
#define BLOODY_FOOTPRINT_BASE_ALPHA 150
|
||||
#define BLOOD_GAIN_PER_STEP 25
|
||||
#define BLOOD_LOSS_PER_STEP 5
|
||||
#define BLOOD_FADEOUT_TIME 2
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
/obj/effect/proc_holder/spell/bloodcrawl/choose_targets(mob/user = usr)
|
||||
for(var/obj/effect/decal/cleanable/target in range(range, get_turf(user)))
|
||||
if(istype(target, /obj/effect/decal/cleanable/blood) || istype(target, /obj/effect/decal/cleanable/trail_holder))
|
||||
if(target.can_bloodcrawl_in())
|
||||
perform(target)
|
||||
return
|
||||
revert_cast()
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
|
||||
@@ -6,23 +6,23 @@
|
||||
/obj/effect/decal/cleanable/blood/old
|
||||
name = "dried blood"
|
||||
desc = "Looks like it's been here a while. Eew."
|
||||
bloodiness = 0
|
||||
|
||||
/obj/effect/decal/cleanable/blood/old/New()
|
||||
..()
|
||||
icon_state += "-old"
|
||||
blood_DNA["Non-human DNA"] = "A+"
|
||||
bloodiness = rand(10,50)
|
||||
|
||||
/obj/effect/decal/cleanable/blood/gibs/old
|
||||
name = "old rotting gibs"
|
||||
desc = "Space Jesus, why didn't anyone clean this up? It smells terrible."
|
||||
bloodiness = 0
|
||||
|
||||
/obj/effect/decal/cleanable/blood/gibs/old/New()
|
||||
..()
|
||||
icon_state += "-old"
|
||||
dir = pick(1,2,4,8)
|
||||
blood_DNA["Non-human DNA"] = "A+"
|
||||
bloodiness = rand(10,50)
|
||||
|
||||
/obj/effect/decal/cleanable/vomit/old
|
||||
name = "crusty dried vomit"
|
||||
|
||||
Reference in New Issue
Block a user