Skip to content

Commit

Permalink
Merge pull request Civ13#2354 from savethetreez/branch
Browse files Browse the repository at this point in the history
Salbutamol and Bag Valve mask fix/WIP code
  • Loading branch information
savethetreez authored Sep 11, 2023
2 parents d23a7ae + bcaa3bf commit 27f293e
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 22 deletions.
15 changes: 15 additions & 0 deletions code/game/objects/items/stacks/medical.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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 << "<span class='warning'>Uncover their mouth first!.</span>"
return
visible_message("[user] starts to attach the [src] to [M]...")
if (do_after(user, 100, src))
M.adjustOxyLoss(-7)
user.visible_message("<span class='notice'>[user] manually ventilates [M].</span>", "<span class='notice'>You manually ventilate [M].</span>")
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..."
Expand Down
45 changes: 23 additions & 22 deletions code/modules/reagents/reagent_containers/syringe.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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."
Expand Down Expand Up @@ -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

0 comments on commit 27f293e

Please sign in to comment.