From bcaa3bff73b47cd18cf14cdcd8f536b72746a2cd Mon Sep 17 00:00:00 2001 From: savethetreez Date: Mon, 11 Sep 2023 22:00:40 +0200 Subject: [PATCH] Salbutamol and Bag Valve mask fix/WIP code --- code/game/objects/items/stacks/medical.dm | 15 +++++++ .../reagents/reagent_containers/syringe.dm | 45 ++++++++++--------- 2 files changed, 38 insertions(+), 22 deletions(-) diff --git a/code/game/objects/items/stacks/medical.dm b/code/game/objects/items/stacks/medical.dm index 777b504b3a..e5b375e558 100644 --- a/code/game/objects/items/stacks/medical.dm +++ b/code/game/objects/items/stacks/medical.dm @@ -416,6 +416,21 @@ heal_brute = 10 // for healing dogs and other animals amount = 10 +/obj/item/bag_valve_mask + name = "bag valve mask" + desc = "A hand-held device commonly used to provide positive pressure ventilation to patients who are not breathing or not breathing adequately." + icon = 'icons/obj/surgery.dmi' + icon_state = "valvemask" +/obj/item/bag_valve_mask/attack(var/mob/living/human/M as mob, var/mob/user as mob) + if (M.wear_mask) + user << "Uncover their mouth first!." + return + visible_message("[user] starts to attach the [src] to [M]...") + if (do_after(user, 100, src)) + M.adjustOxyLoss(-7) + user.visible_message("[user] manually ventilates [M].", "You manually ventilate [M].") + return + /obj/item/revival_kit name = "revival kit" desc = "A full sized hospital and multiple years of rehabilitation in only couple of seconds, a true gift from the gods! Better not be greedy..." diff --git a/code/modules/reagents/reagent_containers/syringe.dm b/code/modules/reagents/reagent_containers/syringe.dm index 084e9228e8..6d6ac3d17f 100644 --- a/code/modules/reagents/reagent_containers/syringe.dm +++ b/code/modules/reagents/reagent_containers/syringe.dm @@ -399,6 +399,29 @@ icon_state = "single_use2_empty" used = TRUE +/obj/item/weapon/reagent_containers/syringe/salbutamol + name = "salbutamol injector" + desc = "Injector containing 5 units of salbutamol. Do NOT administer more than 10 units at once!" + icon_state = "single_use6" + w_class = ITEM_SIZE_TINY + volume = 5 + amount_per_transfer_from_this = 5 + single_use = TRUE + +/obj/item/weapon/reagent_containers/syringe/salbutamol/New() + ..() + reagents.add_reagent("salbutamol", 5) + mode = SYRINGE_INJECT + +/obj/item/weapon/reagent_containers/syringe/morphine/update_icon() + if (reagents && reagents.total_volume > 0) + icon_state = "single_use6" + else + icon_state = "single_use6_empty" + used = TRUE + +// Stupid syringes to be reworked or removed + /obj/item/weapon/reagent_containers/syringe/combat name = "combat syringe" desc = "A single-use injector made to pump you full of lifesaving drugs." @@ -448,26 +471,4 @@ icon_state = "single_use5" else icon_state = "single_use5_empty" - used = TRUE - -/obj/item/weapon/reagent_containers/syringe/salbutamol - name = "salbutamol injector" - desc = "Injector containing 5 units of salbutamol. Do NOT administer more than 10 units at once!" - icon_state = "single_use6" - w_class = ITEM_SIZE_TINY - volume = 5 - amount_per_transfer_from_this = 5 - single_use = TRUE - -/obj/item/weapon/reagent_containers/syringe/salbutamol/New() - ..() - if (reagents) - reagents.add_reagent("salbutamol", 5) - mode = SYRINGE_INJECT - -/obj/item/weapon/reagent_containers/syringe/morphine/update_icon() - if (reagents && reagents.total_volume > 0) - icon_state = "single_use6" - else - icon_state = "single_use6_empty" used = TRUE \ No newline at end of file