moves damage checks
title. Makes it harder to circumvent them.
This commit is contained in:
@@ -111,23 +111,23 @@
|
||||
|
||||
if(affecting && affecting.is_robotic_limb() && user.a_intent != INTENT_HARM)
|
||||
//only heal to threshhold_passed_mindamage if limb is damaged to or past threshhold, otherwise heal normally
|
||||
var/damage = affecting.brute_dam
|
||||
var/damage
|
||||
var/heal_amount = 15
|
||||
|
||||
affecting.update_threshhold_state(burn = FALSE)
|
||||
|
||||
if(affecting.threshhold_brute_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(src.use_tool(H, user, 0, volume=50, amount=1))
|
||||
if(user == H)
|
||||
user.visible_message("<span class='notice'>[user] starts to fix some of the dents on [H]'s [affecting.name].</span>",
|
||||
"<span class='notice'>You start fixing some of the dents on [H]'s [affecting.name].</span>")
|
||||
if(!do_mob(user, H, 50))
|
||||
return
|
||||
damage = affecting.brute_dam
|
||||
affecting.update_threshhold_state(burn = FALSE)
|
||||
if(affecting.threshhold_brute_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
|
||||
item_heal_robotic(H, user, heal_amount, 0)
|
||||
else
|
||||
return ..()
|
||||
|
||||
Reference in New Issue
Block a user