Skip to content

Commit

Permalink
adds returns to prevent runtimes hopefuly
Browse files Browse the repository at this point in the history
  • Loading branch information
cuberound authored Nov 30, 2023
1 parent dbc71b6 commit 621be36
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions code/datums/components/healing_reduction.dm
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,18 @@ Humans will take continuous damage instead.
/datum/component/healing_reduction/process(delta_time)
if(!parent)
qdel(src)
return

healing_reduction = max(healing_reduction - healing_reduction_dissipation * delta_time, 0)

if(healing_reduction <= 0)
qdel(src)
return

if(ishuman(parent)) //deals brute to humans
var/mob/living/carbon/human/H = parent
H.apply_damage(healing_reduction_dissipation * delta_time, BRUTE)

if(healing_reduction <= 0)
qdel(src)

var/color = GLOW_COLOR
var/intensity = healing_reduction/max_buildup
color += num2text(MAX_ALPHA*intensity, 2, 16)
Expand Down

0 comments on commit 621be36

Please sign in to comment.