diff --git a/code/game/objects/items/defib.dm b/code/game/objects/items/defib.dm index 034363be7d..5868ef4b1d 100644 --- a/code/game/objects/items/defib.dm +++ b/code/game/objects/items/defib.dm @@ -447,8 +447,9 @@ return (!H.suiciding && !(H.has_trait(TRAIT_NOCLONE)) && !H.hellbound && ((world.time - H.timeofdeath) < tlimit) && (H.getBruteLoss() < 180) && (H.getFireLoss() < 180) && H.getorgan(/obj/item/organ/heart) && BR && !BR.damaged_brain) /obj/item/twohanded/shockpaddles/proc/shock_touching(dmg, mob/H) - if(defib.pullshocksafely && isliving(H.pulledby)) - H.visible_message("The defibrillator safely discharges the excessive charge into the floor!") + if(req_defib) + if(defib.pullshocksafely && isliving(H.pulledby)) + H.visible_message("The defibrillator safely discharges the excessive charge into the floor!") else var/mob/living/M = H.pulledby if(M.electrocute_act(30, src)) @@ -542,7 +543,20 @@ user.visible_message("[user] begins to place [src] on [H]'s chest.", "You begin to place [src] on [H]'s chest...") busy = TRUE update_icon() - if(do_after(user, 30 - defib.primetime, target = H)) //beginning to place the paddles on patient's chest to allow some time for people to move away to stop the process + + var/primetimer + var/primetimer2 + var/deathtimer + if(req_defib) + primetimer = 30 - defib.primetime //I swear to god if I find shit like this elsewhere + primetimer2 = 20 - defib.primetime + deathtimer = DEFIB_TIME_LOSS * defib.timedeath + else + primetimer = 30 + primetimer2 = 20 + deathtimer = DEFIB_TIME_LOSS * 10 + + if(do_after(user, primetimer, target = H)) //beginning to place the paddles on patient's chest to allow some time for people to move away to stop the process user.visible_message("[user] places [src] on [H]'s chest.", "You place [src] on [H]'s chest.") playsound(src, 'sound/machines/defib_charge.ogg', 75, 0) var/tplus = world.time - H.timeofdeath @@ -550,10 +564,10 @@ // (in deciseconds) // brain damage starts setting in on the patient after // some time left rotting - var/tloss = DEFIB_TIME_LOSS * defib.timedeath + var/tloss = deathtimer var/total_burn = 0 var/total_brute = 0 - if(do_after(user, 20 - defib.primetime, target = H)) //placed on chest and short delay to shock for dramatic effect, revive time is 5sec total + if(do_after(user, primetimer2, target = H)) //placed on chest and short delay to shock for dramatic effect, revive time is 5sec total for(var/obj/item/carried_item in H.contents) if(istype(carried_item, /obj/item/clothing/suit/space)) if((!combat && !req_defib) || (req_defib && !defib.combat)) @@ -613,8 +627,9 @@ if(tplus > tloss) H.adjustBrainLoss( max(0, min(99, ((tlimit - tplus) / tlimit * 100))), 150) log_combat(user, H, "revived", defib) - if(defib.healdisk) - H.heal_overall_damage(25, 25) + if(req_defib) + if(defib.healdisk) + H.heal_overall_damage(25, 25) if(req_defib) defib.deductcharge(revivecost) cooldown = 1