From 751166cfbee698b076b3fbe3ae10edf86fe16929 Mon Sep 17 00:00:00 2001 From: Poojawa Date: Fri, 17 May 2019 04:59:53 -0500 Subject: [PATCH 1/2] Unfucks borg defibs --- code/game/objects/items/defib.dm | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/code/game/objects/items/defib.dm b/code/game/objects/items/defib.dm index 034363be7d..1bbe175230 100644 --- a/code/game/objects/items/defib.dm +++ b/code/game/objects/items/defib.dm @@ -542,7 +542,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 +563,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 +626,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 From eb717645bd5d29cbb1412b3091b0f29607daae77 Mon Sep 17 00:00:00 2001 From: Poojawa Date: Fri, 17 May 2019 05:16:53 -0500 Subject: [PATCH 2/2] M.emote("scream") --- code/game/objects/items/defib.dm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/code/game/objects/items/defib.dm b/code/game/objects/items/defib.dm index 1bbe175230..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))