moves damage checks
title. Makes it harder to circumvent them.
This commit is contained in:
@@ -550,20 +550,20 @@ By design, d1 is the smallest direction and d2 is the highest
|
||||
var/obj/item/bodypart/affecting = H.get_bodypart(check_zone(user.zone_selected))
|
||||
if(affecting && affecting.is_robotic_limb())
|
||||
//only heal to threshhold_passed_mindamage if limb is damaged to or past threshhold, otherwise heal normally
|
||||
var/damage = affecting.burn_dam
|
||||
var/damage
|
||||
var/heal_amount = 15
|
||||
|
||||
if(user == H)
|
||||
user.visible_message("<span class='notice'>[user] starts to fix some of the wires in [H]'s [affecting.name].</span>", "<span class='notice'>You start fixing some of the wires in [H]'s [affecting.name].</span>")
|
||||
if(!do_mob(user, H, 50))
|
||||
return
|
||||
damage = affecting.burn_dam
|
||||
affecting.update_threshhold_state(brute = FALSE)
|
||||
|
||||
if(affecting.threshhold_burn_passed)
|
||||
heal_amount = min(heal_amount, damage - affecting.threshhold_passed_mindamage)
|
||||
|
||||
if(!heal_amount)
|
||||
to_chat(user, "<span class ='notice'[user == H ? "Your" : "[H]'s"] [affecting.name] appears to have suffered severe internal damage and requires surgery to repair further.</span>")
|
||||
return
|
||||
if(user == H)
|
||||
user.visible_message("<span class='notice'>[user] starts to fix some of the wires in [H]'s [affecting.name].</span>", "<span class='notice'>You start fixing some of the wires in [H]'s [affecting.name].</span>")
|
||||
if(!do_mob(user, H, 50))
|
||||
to_chat(user, "<span class='notice'>[user == H ? "Your" : "[H]'s"] [affecting.name] appears to have suffered severe internal damage and requires surgery to repair further.</span>")
|
||||
return
|
||||
if(item_heal_robotic(H, user, 0, heal_amount))
|
||||
use(1)
|
||||
|
||||
Reference in New Issue
Block a user