mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-14 04:02:31 +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:
@@ -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)
|
||||
|
||||
@@ -49,4 +49,41 @@
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been injected ([contained]) with [src.name] by [user.name] ([user.ckey])</font>")
|
||||
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to inject [M.name] ([M.ckey]) with [contained]</font>")
|
||||
|
||||
return
|
||||
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