Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bleed debug #592

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading