Skip to content

Commit

Permalink
bleed debug
Browse files Browse the repository at this point in the history
  • Loading branch information
Kapu1178 committed Sep 13, 2023
1 parent b45acdc commit 57ffde1
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion code/modules/mob/living/blood.dm
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,22 @@

var/temp_bleed = 0

#warn DNM Bleed debugging

Check warning on line 31 in code/modules/mob/living/blood.dm

View workflow job for this annotation

GitHub Actions / Run Linters

#warn DNM Bleed debugging
var/list/obj/item/bodypart/spray_candidates
//Bleeding out
for(var/obj/item/bodypart/iter_part as anything in bodyparts)
var/needs_bleed_update = FALSE
var/iter_bleed_rate = iter_part.get_modified_bleed_rate() * pulse_mod
if(iter_bleed_rate < 0)
iter_bleed_rate = 0
stack_trace("Negative bleed, reeeeeee")

var/bleed_amt = iter_part.bandage?.absorb_blood(iter_bleed_rate, src)

if(bleed_amt < 0)
bleed_amt = 0
stack_trace("Negative bleed, reeeeeee")

if(isnull(bleed_amt))
bleed_amt = iter_bleed_rate

Expand All @@ -59,6 +68,10 @@
if(iter_part.generic_bleedstacks) // If you don't have any bleedstacks, don't try and heal them
iter_part.adjustBleedStacks(-1, 0)

if(temp_bleed < 0)
temp_bleed = 0
stack_trace("Negative bleed, reeeeeee")

var/bled
if(temp_bleed)
bled = bleed(temp_bleed)
Expand All @@ -73,7 +86,6 @@
)
COOLDOWN_START(src, blood_spray_cd, 8 SECONDS)


/// Has each bodypart update its bleed/wound overlay icon states
/mob/living/carbon/proc/update_bodypart_bleed_overlays()
for(var/obj/item/bodypart/iter_part as anything in bodyparts)
Expand Down

0 comments on commit 57ffde1

Please sign in to comment.