mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-14 12:13:06 +00:00
Autoinjectors.
Now they are one-use, as they were intended. You can still change their contents with syringes before they are used. To mitigate their one-use nature, box of them is added to medical closets and supply pack.
This commit is contained in:
@@ -359,7 +359,8 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/antitoxin,
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/inaprovaline,
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/stoxin,
|
||||
/obj/item/weapon/storage/box/syringes)
|
||||
/obj/item/weapon/storage/box/syringes,
|
||||
/obj/item/weapon/storage/box/injectors)
|
||||
cost = 10
|
||||
containertype = /obj/structure/closet/crate/medical
|
||||
containername = "Medical crate"
|
||||
|
||||
@@ -424,6 +424,13 @@
|
||||
W.update_icon()
|
||||
return
|
||||
|
||||
/obj/item/weapon/storage/box/injectors
|
||||
name = "box of injectors"
|
||||
desc = "Contains autoinjectors."
|
||||
New()
|
||||
..()
|
||||
for (var/i; i < storage_slots; i++)
|
||||
new /obj/item/weapon/reagent_containers/hypospray/autoinjector(src)
|
||||
|
||||
/obj/item/weapon/storage/box/lights
|
||||
name = "replacement bulbs"
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
New()
|
||||
..()
|
||||
sleep(2)
|
||||
new /obj/item/weapon/storage/box/injectors
|
||||
new /obj/item/weapon/storage/box/syringes(src)
|
||||
new /obj/item/weapon/reagent_containers/dropper(src)
|
||||
new /obj/item/weapon/reagent_containers/dropper(src)
|
||||
|
||||
@@ -20,17 +20,17 @@
|
||||
|
||||
/obj/item/weapon/reagent_containers/hypospray/New() //comment this to make hypos start off empty
|
||||
..()
|
||||
reagents.add_reagent("doctorsdelight", 30)
|
||||
reagents.add_reagent("tricordrazine", 30)
|
||||
return
|
||||
|
||||
/obj/item/weapon/reagent_containers/hypospray/attack(mob/M as mob, mob/user as mob)
|
||||
if(!reagents.total_volume)
|
||||
user << "\red The hypospray is empty."
|
||||
user << "\red [src] is empty."
|
||||
return
|
||||
if (!( istype(M, /mob) ))
|
||||
return
|
||||
if (reagents.total_volume)
|
||||
user << "\blue You inject [M] with the hypospray."
|
||||
user << "\blue You inject [M] with [src]."
|
||||
M << "\red You feel a tiny prick!"
|
||||
|
||||
src.reagents.reaction(M, INGEST)
|
||||
@@ -41,7 +41,7 @@
|
||||
injected += R.name
|
||||
|
||||
var/trans = reagents.trans_to(M, amount_per_transfer_from_this)
|
||||
user << "\blue [trans] units injected. [reagents.total_volume] units remaining in the hypospray."
|
||||
user << "\blue [trans] units injected. [reagents.total_volume] units remaining in [src]."
|
||||
|
||||
var/contained = english_list(injected)
|
||||
|
||||
@@ -50,3 +50,40 @@
|
||||
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to inject [M.name] ([M.ckey]) with [contained]</font>")
|
||||
|
||||
return
|
||||
|
||||
/obj/item/weapon/reagent_containers/hypospray/autoinjector
|
||||
name = "autoinjector"
|
||||
desc = "A rapid and safe way to administer small amounts of drugs by untrained or trained personnel."
|
||||
icon_state = "autoinjector"
|
||||
item_state = "autoinjector"
|
||||
amount_per_transfer_from_this = 5
|
||||
volume = 5
|
||||
|
||||
/obj/item/weapon/reagent_containers/hypospray/autoinjector/New()
|
||||
..()
|
||||
reagents.remove_reagent("tricordrazine", 30)
|
||||
reagents.add_reagent("inaprovaline", 5)
|
||||
update_icon()
|
||||
return
|
||||
|
||||
/obj/item/weapon/reagent_containers/hypospray/autoinjector/attack(mob/M as mob, mob/user as mob)
|
||||
..()
|
||||
if(reagents.total_volume <= 0)
|
||||
flags &= ~OPENCONTAINER
|
||||
update_icon()
|
||||
return
|
||||
|
||||
/obj/item/weapon/reagent_containers/hypospray/autoinjector/update_icon()
|
||||
if(reagents.total_volume > 0)
|
||||
icon_state = "[initial(icon_state)]1"
|
||||
else
|
||||
icon_state = "[initial(icon_state)]0"
|
||||
|
||||
/obj/item/weapon/reagent_containers/hypospray/autoinjector/examine()
|
||||
..()
|
||||
if(reagents && reagents.reagent_list.len)
|
||||
usr << "\blue It is currently loaded."
|
||||
else
|
||||
usr << "\blue It is spent."
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user