mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-27 07:08:00 +01:00
Defibbing THICKMATERIAL fix (#52291)
This commit is contained in:
@@ -255,7 +255,7 @@
|
||||
|
||||
/obj/item/defibrillator/compact/combat
|
||||
name = "combat defibrillator"
|
||||
desc = "A belt-equipped blood-red defibrillator. Can revive through spacesuits, has an experimental self-recharging battery, and can be utilized in combat via applying the paddles in a disarming or agressive manner."
|
||||
desc = "A belt-equipped blood-red defibrillator. Can revive through thick clothing, has an experimental self-recharging battery, and can be utilized in combat via applying the paddles in a disarming or aggressive manner."
|
||||
icon_state = "defibcombat" //needs defib inhand sprites
|
||||
inhand_icon_state = "defibcombat"
|
||||
worn_icon_state = "defibcombat"
|
||||
@@ -276,7 +276,7 @@
|
||||
|
||||
/obj/item/defibrillator/compact/combat/loaded/nanotrasen
|
||||
name = "elite Nanotrasen defibrillator"
|
||||
desc = "A belt-equipped state-of-the-art defibrillator. Can revive through spacesuits, has an experimental self-recharging battery, and can be utilized in combat via applying the paddles in a disarming or agressive manner."
|
||||
desc = "A belt-equipped state-of-the-art defibrillator. Can revive through thick clothing, has an experimental self-recharging battery, and can be utilized in combat via applying the paddles in a disarming or agressive manner."
|
||||
icon_state = "defibnt" //needs defib inhand sprites
|
||||
inhand_icon_state = "defibnt"
|
||||
worn_icon_state = "defibnt"
|
||||
@@ -495,7 +495,7 @@
|
||||
"<span class='warning'>You overcharge the paddles and begin to place them onto [H]'s chest...</span>")
|
||||
busy = TRUE
|
||||
update_icon()
|
||||
if(do_after(user, 15, target = H))
|
||||
if(do_after(user, 15, TRUE, H))
|
||||
user.visible_message("<span class='notice'>[user] places [src] on [H]'s chest.</span>",
|
||||
"<span class='warning'>You place [src] on [H]'s chest and begin to charge them.</span>")
|
||||
var/turf/T = get_turf(defib)
|
||||
@@ -504,7 +504,7 @@
|
||||
T.audible_message("<span class='warning'>\The [defib] lets out an urgent beep and lets out a steadily rising hum...</span>")
|
||||
else
|
||||
user.audible_message("<span class='warning'>[src] let out an urgent beep.</span>")
|
||||
if(do_after(user, 15, target = H)) //Takes longer due to overcharging
|
||||
if(do_after(user, 15, TRUE, H)) //Takes longer due to overcharging
|
||||
if(!H)
|
||||
busy = FALSE
|
||||
update_icon()
|
||||
@@ -545,14 +545,14 @@
|
||||
user.visible_message("<span class='warning'>[user] begins to place [src] on [H]'s chest.</span>", "<span class='warning'>You begin to place [src] on [H]'s chest...</span>")
|
||||
busy = TRUE
|
||||
update_icon()
|
||||
if(do_after(user, 30, target = H)) //beginning to place the paddles on patient's chest to allow some time for people to move away to stop the process
|
||||
if(do_after(user, 30, TRUE, 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("<span class='notice'>[user] places [src] on [H]'s chest.</span>", "<span class='warning'>You place [src] on [H]'s chest.</span>")
|
||||
playsound(src, 'sound/machines/defib_charge.ogg', 75, FALSE)
|
||||
var/obj/item/organ/heart = H.getorgan(/obj/item/organ/heart)
|
||||
if(do_after(user, 20, 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))
|
||||
if(do_after(user, 20, TRUE, H)) //placed on chest and short delay to shock for dramatic effect, revive time is 5sec total
|
||||
if((!combat && !req_defib) || (req_defib && !defib.combat))
|
||||
for(var/obj/item/clothing/C in H.get_equipped_items())
|
||||
if((C.body_parts_covered & CHEST) && (C.clothing_flags & THICKMATERIAL)) //check to see if something is obscuring their chest.
|
||||
user.audible_message("<span class='warning'>[req_defib ? "[defib]" : "[src]"] buzzes: Patient's chest is obscured. Operation aborted.</span>")
|
||||
playsound(src, 'sound/machines/defib_failed.ogg', 50, FALSE)
|
||||
busy = FALSE
|
||||
|
||||
Reference in New Issue
Block a user