Merge pull request #13528 from DeltaFire15/robotic-limbs-PT2
Robotic limbs 2 : Threshhold Boogaloo
This commit is contained in:
@@ -59,7 +59,7 @@
|
||||
if(!affecting) //Missing limb?
|
||||
to_chat(user, "<span class='warning'>[C] doesn't have \a [parse_zone(user.zone_selected)]!</span>")
|
||||
return
|
||||
if(affecting.status == BODYPART_ORGANIC) //Limb must be organic to be healed - RR
|
||||
if(affecting.is_organic_limb(FALSE)) //Limb must be organic to be healed - RR
|
||||
if(affecting.brute_dam && brute || affecting.burn_dam && burn)
|
||||
user.visible_message("<span class='green'>[user] applies \the [src] on [C]'s [affecting.name].</span>", "<span class='green'>You apply \the [src] on [C]'s [affecting.name].</span>")
|
||||
if(affecting.heal_damage(brute, burn))
|
||||
|
||||
@@ -103,7 +103,7 @@ GLOBAL_LIST_INIT(bibleitemstates, list("bible", "koran", "scrapbook", "bible",
|
||||
/obj/item/storage/book/bible/proc/bless(mob/living/carbon/human/H, mob/living/user)
|
||||
for(var/X in H.bodyparts)
|
||||
var/obj/item/bodypart/BP = X
|
||||
if(BP.status == BODYPART_ROBOTIC)
|
||||
if(BP.is_robotic_limb())
|
||||
to_chat(user, "<span class='warning'>[src.deity_name] refuses to heal this metallic taint!</span>")
|
||||
return 0
|
||||
|
||||
|
||||
@@ -109,18 +109,25 @@
|
||||
|
||||
var/obj/item/bodypart/affecting = H.get_bodypart(check_zone(user.zone_selected))
|
||||
|
||||
if(affecting && affecting.status == BODYPART_ROBOTIC && user.a_intent != INTENT_HARM)
|
||||
//only heal to 25 if limb is damaged to or past 25 brute, otherwise heal normally
|
||||
var/difference = affecting.brute_dam - 25
|
||||
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
|
||||
var/heal_amount = 15
|
||||
if(difference >= 0)
|
||||
heal_amount = difference
|
||||
|
||||
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