mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-19 19:13:30 +01:00
Merge pull request #10399 from Darkmight9/Nanopaste_Overheal
Gives Nanopaste overheal
This commit is contained in:
@@ -22,16 +22,42 @@
|
||||
else
|
||||
to_chat(user, "<span class='notice'>All [R]'s systems are nominal.</span>")
|
||||
|
||||
if(istype(M,/mob/living/carbon/human)) //Repairing robolimbs
|
||||
if(istype(M,/mob/living/carbon/human)) //Repairing robotic limbs and IPCs
|
||||
var/mob/living/carbon/human/H = M
|
||||
var/obj/item/organ/external/S = H.get_organ(user.zone_sel.selecting)
|
||||
|
||||
if(S && S.is_robotic())
|
||||
if(S.get_damage())
|
||||
S.heal_damage(15, 15, robo_repair = 1)
|
||||
use(1)
|
||||
user.visible_message("<span class='notice'>\The [user] applies some nanite paste at[user != M ? " \the [M]'s" : " \the"][S.name] with \the [src].</span>",\
|
||||
"<span class='notice'>You apply some nanite paste at [user == M ? "your" : "[M]'s"] [S.name].</span>")
|
||||
var/remheal = 15
|
||||
var/nremheal = 0
|
||||
S.heal_damage(robo_repair = 1) //should in, theory, heal the robotic organs in just the targeted area with it being S instead of E
|
||||
var/childlist
|
||||
if(!isnull(S.children))
|
||||
childlist = S.children.Copy()
|
||||
var/parenthealed = FALSE
|
||||
while(remheal > 0)
|
||||
var/obj/item/organ/external/E
|
||||
if(S.get_damage())
|
||||
E = S
|
||||
else if(LAZYLEN(childlist))
|
||||
E = pick_n_take(childlist)
|
||||
if(!E.get_damage() || !E.is_robotic())
|
||||
continue
|
||||
else if(S.parent && !parenthealed)
|
||||
E = S.parent
|
||||
parenthealed = TRUE
|
||||
if(!E.get_damage() || !E.is_robotic())
|
||||
break
|
||||
else
|
||||
break
|
||||
nremheal = max(remheal - E.get_damage(), 0)
|
||||
E.heal_damage(remheal, 0, 0, 1) //Healing Brute
|
||||
E.heal_damage(0, remheal, 0, 1) //Healing Burn
|
||||
remheal = nremheal
|
||||
user.visible_message("<span class='notice'>\The [user] applies some nanite paste at \the [M]'s [E.name] with \the [src].</span>")
|
||||
if(H.bleed_rate && H.isSynthetic())
|
||||
H.bleed_rate = 0
|
||||
else
|
||||
to_chat(user, "<span class='notice'>Nothing to fix here.</span>")
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user