diff --git a/code/game/gamemodes/steal_items.dm b/code/game/gamemodes/steal_items.dm index 77e775939fc..9814eb3ff2e 100644 --- a/code/game/gamemodes/steal_items.dm +++ b/code/game/gamemodes/steal_items.dm @@ -74,8 +74,8 @@ return 0 /datum/theft_objective/defib - name = "a compact defibrillator" - typepath = /obj/item/defibrillator/compact + name = "the chief medical officer's advanced compact defibrillator" + typepath = /obj/item/defibrillator/compact/advanced protected_jobs = list("Chief Medical Officer", "Paramedic") location_override = "the Chief Medical Officer's Office" diff --git a/code/game/machinery/defib_mount.dm b/code/game/machinery/defib_mount.dm index 5aac39d12dd..fe333ebf4ef 100644 --- a/code/game/machinery/defib_mount.dm +++ b/code/game/machinery/defib_mount.dm @@ -34,8 +34,8 @@ if(building) set_pixel_offsets_from_dir(30, -30, 30, -30) -/obj/machinery/defibrillator_mount/loaded/New() //loaded subtype for mapping use - ..() +/obj/machinery/defibrillator_mount/loaded/Initialize(mapload) //loaded subtype for mapping use + . = ..() defib = new/obj/item/defibrillator/loaded(src) update_icon() diff --git a/code/game/objects/items/weapons/defib.dm b/code/game/objects/items/weapons/defib.dm index e76207ae85c..4cf977dc91c 100644 --- a/code/game/objects/items/weapons/defib.dm +++ b/code/game/objects/items/weapons/defib.dm @@ -3,6 +3,7 @@ /obj/item/defibrillator name = "defibrillator" desc = "A device that delivers powerful shocks to detachable paddles that resuscitate incapacitated patients." + icon = 'icons/obj/defib.dmi' icon_state = "defibunit" item_state = "defibunit" slot_flags = SLOT_BACK @@ -17,27 +18,27 @@ ) var/paddles_on_defib = TRUE //if the paddles are on the defib (TRUE) - var/safety = TRUE //if you can zap people with the defibs on harm mode var/powered = FALSE //if there's a cell in the defib with enough power for a revive, blocks paddles from reviving otherwise var/obj/item/twohanded/shockpaddles/paddles var/obj/item/stock_parts/cell/high/cell = null + var/safety = TRUE //if you can zap people with the defibs on harm mode var/combat = FALSE //can we revive through space suits? + var/heart_attack = FALSE //can it give instant heart attacks when zapped on harm intent with combat? + var/base_icon_state = "defibpaddles" + var/obj/item/twohanded/shockpaddles/paddle_type = /obj/item/twohanded/shockpaddles /obj/item/defibrillator/get_cell() return cell -/obj/item/defibrillator/New() //starts without a cell for rnd - ..() - paddles = make_paddles() +/obj/item/defibrillator/Initialize(mapload) //starts without a cell for rnd + . = ..() + paddles = new paddle_type(src) update_icon() - return -/obj/item/defibrillator/loaded/New() //starts with hicap - ..() - paddles = make_paddles() +/obj/item/defibrillator/loaded/Initialize(mapload) //starts with hicap + . = ..() cell = new(src) update_icon() - return /obj/item/defibrillator/update_icon() update_power() @@ -158,9 +159,6 @@ var/datum/action/A = X A.UpdateButtonIcon() -/obj/item/defibrillator/proc/make_paddles() - return new /obj/item/twohanded/shockpaddles(src) - /obj/item/defibrillator/equipped(mob/user, slot) ..() if(slot != slot_back) @@ -214,38 +212,68 @@ /obj/item/defibrillator/compact name = "compact defibrillator" - desc = "A belt-equipped defibrillator that can be rapidly deployed." + desc = "A belt-mounted defibrillator that can be rapidly deployed." icon_state = "defibcompact" item_state = "defibcompact" + sprite_sheets = null //Because Vox had the belt defibrillator sprites in back.dm w_class = WEIGHT_CLASS_NORMAL slot_flags = SLOT_BELT origin_tech = "biotech=5" +/obj/item/defibrillator/compact/loaded/Initialize(mapload) + . = ..() + cell = new(src) + update_icon() + /obj/item/defibrillator/compact/item_action_slot_check(slot, mob/user) if(slot == slot_belt) return TRUE -/obj/item/defibrillator/compact/loaded/New() - ..() - paddles = make_paddles() - cell = new(src) - update_icon() - return - /obj/item/defibrillator/compact/combat name = "combat defibrillator" - desc = "A belt-equipped blood-red defibrillator that can be rapidly deployed. Does not have the restrictions or safeties of conventional defibrillators and can revive through space suits." + desc = "A belt-mounted blood-red defibrillator that can be rapidly deployed. Does not have the restrictions or safeties of conventional defibrillators and can revive through space suits." + icon_state = "defibcombat" + item_state = "defibcombat" + paddle_type = /obj/item/twohanded/shockpaddles/syndicate combat = TRUE safety = FALSE -/obj/item/defibrillator/compact/combat/loaded/New() - ..() - paddles = make_paddles() +/obj/item/defibrillator/compact/combat/loaded/Initialize(mapload) + . = ..() cell = new(src) update_icon() - return -/obj/item/defibrillator/compact/combat/attackby(obj/item/W, mob/user, params) +/obj/item/defibrillator/compact/advanced + name = "advanced compact defibrillator" + desc = "A belt-mounted state-of-the-art defibrillator that can be rapidly deployed in all environments. Uses an experimental self-charging cell, meaning that it will (probably) never stop working. Can be used to defibrillate through space suits. It is impossible to damage." + icon_state = "defibnt" + item_state = "defibnt" + paddle_type = /obj/item/twohanded/shockpaddles/advanced + combat = TRUE + safety = TRUE + heart_attack = TRUE + resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF //Objective item, better not have it destroyed. + + var/next_emp_message //to prevent spam from the emagging message on the advanced defibrillator + +/obj/item/defibrillator/compact/advanced/attackby(obj/item/W, mob/user, params) + if(W == paddles) + paddles.unwield() + toggle_paddles() + update_icon() + +/obj/item/defibrillator/compact/advanced/loaded/Initialize(mapload) + . = ..() + cell = new /obj/item/stock_parts/cell/bluespace/charging(src) + update_icon() + +/obj/item/defibrillator/compact/advanced/emp_act(severity) + if(world.time > next_emp_message) + atom_say("Warning: Electromagnetic pulse detected. Integrated shielding prevented all potential hardware damage.") + playsound(src, 'sound/machines/defib_saftyon.ogg', 50) + next_emp_message = world.time + 5 SECONDS + +/obj/item/defibrillator/compact/advanced/attackby(obj/item/W, mob/user, params) if(W == paddles) paddles.unwield() toggle_paddles() @@ -257,6 +285,7 @@ /obj/item/twohanded/shockpaddles name = "defibrillator paddles" desc = "A pair of plastic-gripped paddles with flat metal surfaces that are used to deliver powerful electric shocks." + icon = 'icons/obj/defib.dmi' icon_state = "defibpaddles" item_state = "defibpaddles" force = 0 @@ -268,6 +297,7 @@ var/revivecost = 1000 var/cooldown = FALSE var/busy = FALSE + var/base_icon_state = "defibpaddles" var/obj/item/defibrillator/defib /obj/item/twohanded/shockpaddles/New(mainunit) @@ -280,10 +310,10 @@ return /obj/item/twohanded/shockpaddles/update_icon() - icon_state = "defibpaddles[wielded]" - item_state = "defibpaddles[wielded]" + icon_state = "[base_icon_state][wielded]" + item_state = "[base_icon_state][wielded]" if(cooldown) - icon_state = "defibpaddles[wielded]_cooldown" + icon_state = "[base_icon_state][wielded]_cooldown" /obj/item/twohanded/shockpaddles/suicide_act(mob/user) user.visible_message("[user] is putting the live paddles on [user.p_their()] chest! It looks like [user.p_theyre()] trying to commit suicide.") @@ -336,7 +366,7 @@ to_chat(user, "[defib] is recharging.") return if(!ishuman(M)) - to_chat(user, "The instructions on [defib] don't mention how to revive that...") + to_chat(user, "The instructions on [defib] don't mention how to defibrillate that...") return else if(user.a_intent == INTENT_HARM && !defib.safety) @@ -347,7 +377,7 @@ H.Weaken(5) playsound(get_turf(src), 'sound/machines/defib_zap.ogg', 50, 1, -1) H.emote("gasp") - if(!H.undergoing_cardiac_arrest() && (prob(10) || defib.combat)) // Your heart explodes. + if(!H.undergoing_cardiac_arrest() && (prob(10) || (defib.combat && !defib.heart_attack) || prob(10) && (defib.combat && defib.heart_attack))) // Your heart explodes. H.set_heartattack(TRUE) SEND_SIGNAL(H, COMSIG_LIVING_MINOR_SHOCK, 100) add_attack_logs(user, M, "Stunned with [src]") @@ -470,7 +500,8 @@ /obj/item/borg_defib name = "defibrillator paddles" - desc = "A pair of mounted paddles with flat metal surfaces that are used to deliver powerful electric shocks." + desc = "A pair of paddles with flat metal surfaces that are used to deliver powerful electric shocks." + icon = 'icons/obj/defib.dmi' icon_state = "defibpaddles0" item_state = "defibpaddles0" force = 0 @@ -590,3 +621,17 @@ playsound(get_turf(src), 'sound/machines/defib_failed.ogg', 50, 0) busy = FALSE update_icon() + +/obj/item/twohanded/shockpaddles/syndicate + name = "combat defibrillator paddles" + desc = "A pair of high-tech paddles with flat plasteel surfaces to revive deceased operatives (unless they exploded). They possess both the ability to penetrate armor and to deliver powerful or disabling shocks offensively." + icon_state = "syndiepaddles0" + item_state = "syndiepaddles0" + base_icon_state = "syndiepaddles" + +/obj/item/twohanded/shockpaddles/advanced + name = "advanced defibrillator paddles" + desc = "A pair of high-tech paddles with flat plasteel surfaces that are used to deliver powerful electric shocks. They possess the ability to penetrate armor to deliver shock." + icon_state = "ntpaddles0" + item_state = "ntpaddles0" + base_icon_state = "ntpaddles" diff --git a/code/game/objects/structures/crates_lockers/closets/secure/medical.dm b/code/game/objects/structures/crates_lockers/closets/secure/medical.dm index a56c63937e3..555124cbb47 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/medical.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/medical.dm @@ -182,7 +182,7 @@ new /obj/item/clothing/shoes/brown (src) new /obj/item/radio/headset/heads/cmo(src) new /obj/item/clothing/gloves/color/latex/nitrile(src) - new /obj/item/defibrillator/compact/loaded(src) + new /obj/item/defibrillator/compact/advanced/loaded(src) new /obj/item/handheld_defibrillator(src) new /obj/item/storage/belt/medical(src) new /obj/item/flash(src) diff --git a/code/modules/power/cell.dm b/code/modules/power/cell.dm index 38575891d07..eae1047d0e0 100644 --- a/code/modules/power/cell.dm +++ b/code/modules/power/cell.dm @@ -284,6 +284,12 @@ charge = 0 update_icon() +/obj/item/stock_parts/cell/bluespace/charging + name = "self-charging bluespace power cell" + desc = "An experimental, self-charging, transdimensional power cell." + origin_tech = "powerstorage=10;bluespace=10" + self_recharge = TRUE + /obj/item/stock_parts/cell/infinite name = "infinite-capacity power cell!" icon_state = "icell" @@ -294,7 +300,7 @@ chargerate = 30000 /obj/item/stock_parts/cell/infinite/use() - return 1 + return TRUE /obj/item/stock_parts/cell/infinite/abductor name = "void core" diff --git a/code/modules/research/designs/medical_designs.dm b/code/modules/research/designs/medical_designs.dm index f91b8f2012b..7ce266b522a 100644 --- a/code/modules/research/designs/medical_designs.dm +++ b/code/modules/research/designs/medical_designs.dm @@ -72,6 +72,16 @@ build_path = /obj/item/defibrillator category = list("Medical") +/datum/design/compact_defib + name = "Compact Defibrillator" + desc = "A belt-mounted defibrillator for rapid deployment." + id = "compact_defib" + req_tech = list("materials" = 7, "biotech" = 7, "powerstorage" = 6) + build_type = PROTOLATHE + materials = list(MAT_METAL = 10000, MAT_GLASS = 4000, MAT_SILVER = 2000) + build_path = /obj/item/defibrillator/compact + category = list("Medical") + /datum/design/defib_mount name = "Defibrillator Wall Mount" desc = "A wall mount for defibrillator units." diff --git a/code/modules/response_team/ert_outfits.dm b/code/modules/response_team/ert_outfits.dm index b597af644f9..d4b4f5fc929 100644 --- a/code/modules/response_team/ert_outfits.dm +++ b/code/modules/response_team/ert_outfits.dm @@ -340,7 +340,7 @@ /obj/item/organ/internal/cyberimp/arm/surgery, /obj/item/organ/internal/cyberimp/chest/nutriment ) - belt = /obj/item/defibrillator/compact/loaded + belt = /obj/item/defibrillator/compact/advanced/loaded l_pocket = /obj/item/reagent_containers/hypospray/safety/ert r_pocket = /obj/item/melee/classic_baton/telescopic @@ -369,7 +369,7 @@ mask = /obj/item/clothing/mask/gas/sechailer/swat suit_store = /obj/item/gun/energy/gun/blueshield/pdw9 - belt = /obj/item/defibrillator/compact/loaded + belt = /obj/item/defibrillator/compact/advanced/loaded l_pocket = /obj/item/reagent_containers/hypospray/combat/nanites r_pocket = /obj/item/reagent_containers/hypospray/autoinjector diff --git a/icons/mob/clothing/belt.dmi b/icons/mob/clothing/belt.dmi index dd893450d75..63a203345ae 100644 Binary files a/icons/mob/clothing/belt.dmi and b/icons/mob/clothing/belt.dmi differ diff --git a/icons/mob/clothing/species/vox/back.dmi b/icons/mob/clothing/species/vox/back.dmi index a0a8445964a..7747d55af60 100644 Binary files a/icons/mob/clothing/species/vox/back.dmi and b/icons/mob/clothing/species/vox/back.dmi differ diff --git a/icons/mob/inhands/items_lefthand.dmi b/icons/mob/inhands/items_lefthand.dmi index a0b551e83bd..b5659069b65 100644 Binary files a/icons/mob/inhands/items_lefthand.dmi and b/icons/mob/inhands/items_lefthand.dmi differ diff --git a/icons/mob/inhands/items_righthand.dmi b/icons/mob/inhands/items_righthand.dmi index 39636bd7bab..f712201f5e4 100644 Binary files a/icons/mob/inhands/items_righthand.dmi and b/icons/mob/inhands/items_righthand.dmi differ diff --git a/icons/obj/defib.dmi b/icons/obj/defib.dmi new file mode 100644 index 00000000000..ca471bd5ffa Binary files /dev/null and b/icons/obj/defib.dmi differ diff --git a/icons/obj/items.dmi b/icons/obj/items.dmi index d00d1d4fb94..fd2b776aa43 100644 Binary files a/icons/obj/items.dmi and b/icons/obj/items.dmi differ