hoo boy
replaces all mentions of bodypart_robotic with is_robotic_limb() where possible, adds BODYPART_HYBRID, adds helpers for organic / robotic limbs (is_robotic_limb() / is_organic_limb(), with a arg to override it accepting hybrid limbs) Also makes the the surgery to heal robotic limbs work if the torso isn't a robot, but rather if there are robotic bodyparts, makes the IPC brain repair.. only accept IPC brains (obviously), makes the damage threshholds for robo-limbs vars instead of a fix 25 with hybrid ones predefined at 25 / 15 (trigger / mindamage), adds an error message to fixing them if already at theshhold, etc. Now just for replacing BODYPART_ORGANIC with is_organic_limb aswell where applicable.. also actual values for the other robo limbs. Fun!
This commit is contained in:
@@ -548,12 +548,19 @@ By design, d1 is the smallest direction and d2 is the highest
|
||||
return ..()
|
||||
|
||||
var/obj/item/bodypart/affecting = H.get_bodypart(check_zone(user.zone_selected))
|
||||
if(affecting && affecting.status == BODYPART_ROBOTIC)
|
||||
//only heal to 25 if limb is damaged to or past 25 burn, otherwise heal normally
|
||||
var/difference = affecting.burn_dam - 25
|
||||
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/heal_amount = 15
|
||||
if(difference >= 0)
|
||||
heal_amount = difference
|
||||
|
||||
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))
|
||||
|
||||
Reference in New Issue
Block a user