Files
Polaris/code/modules/reagents/reagent_containers/hypospray.dm
Cael_Aislinn c0102cf13e Merge branch 'bleeding-edge-freeze' of https://github.com/Baystation12/Baystation12 into bs12_with_tgport
Conflicts:
	baystation12.dme
	code/defines/procs/global_lists.dm
	code/game/gamemodes/events.dm
	code/game/gamemodes/events/space_ninja.dm
	code/game/mecha/working/ripley.dm
	code/modules/mob/living/carbon/human/human_attackalien.dm
	code/modules/mob/living/carbon/human/life.dm
	code/modules/mob/new_player/preferences.dm
	icons/mob/items_lefthand.dmi
	icons/mob/items_righthand.dmi
	icons/mob/mask.dmi

Signed-off-by: Cael_Aislinn <cael_aislinn@yahoo.com.au>
2012-12-29 13:06:03 +10:00

52 lines
2.0 KiB
Plaintext

////////////////////////////////////////////////////////////////////////////////
/// HYPOSPRAY
////////////////////////////////////////////////////////////////////////////////
/obj/item/weapon/reagent_containers/hypospray
name = "hypospray"
desc = "The DeForest Medical Corporation hypospray is a sterile, air-needle autoinjector for rapid administration of drugs to patients."
icon = 'icons/obj/syringe.dmi'
item_state = "hypo"
icon_state = "hypo"
amount_per_transfer_from_this = 5
volume = 30
possible_transfer_amounts = null
flags = FPRINT | TABLEPASS | OPENCONTAINER
slot_flags = SLOT_BELT
/obj/item/weapon/reagent_containers/hypospray/attack_paw(mob/user as mob)
return src.attack_hand(user)
/obj/item/weapon/reagent_containers/hypospray/New() //comment this to make hypos start off empty
..()
reagents.add_reagent("doctorsdelight", 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."
return
if (!( istype(M, /mob) ))
return
if (reagents.total_volume)
user << "\blue You inject [M] with the hypospray."
M << "\red You feel a tiny prick!"
src.reagents.reaction(M, INGEST)
if(M.reagents)
var/list/injected = list()
for(var/datum/reagent/R in src.reagents.reagent_list)
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."
var/contained = english_list(injected)
log_attack("<font color='red'>[user.name] ([user.ckey]) injected [M.name] ([M.ckey]) with [src.name], which had [contained] (INTENT: [uppertext(user.a_intent)])</font>")
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