mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-31 09:00:25 +01:00
@@ -87,3 +87,64 @@
|
||||
reagents.add_reagent(/singleton/reagent/toxin/heartworm_eggs, 2)
|
||||
desc = "<b>BIOHAZARDOUS! - Heart Fluke eggs.</b> Purchased from <i>SciSupply Eridani</i>, recently incorporated into <i>Zeng-Hu Pharmaceuticals' Keiretsu</i>!"
|
||||
update_icon()
|
||||
|
||||
/obj/item/reagent_containers/powder
|
||||
name = "chemical powder"
|
||||
desc = "A powdered form of... something."
|
||||
icon = 'icons/obj/chemical.dmi'
|
||||
icon_state = "powder"
|
||||
item_state = "powder"
|
||||
amount_per_transfer_from_this = 5
|
||||
possible_transfer_amounts = 5
|
||||
w_class = ITEMSIZE_TINY
|
||||
volume = 50
|
||||
|
||||
/obj/item/reagent_containers/powder/examine(mob/user)
|
||||
. = ..()
|
||||
if(reagents)
|
||||
to_chat(user, SPAN_NOTICE("There's about [reagents.total_volume] unit\s here."))
|
||||
|
||||
/obj/item/reagent_containers/powder/Initialize()
|
||||
. = ..()
|
||||
get_appearance()
|
||||
|
||||
/obj/item/reagent_containers/powder/proc/get_appearance()
|
||||
/// Color based on dominant reagent.
|
||||
color = reagents.get_color()
|
||||
|
||||
// Proc to shove them up your nose
|
||||
|
||||
/obj/item/reagent_containers/powder/attackby(obj/item/W, mob/living/user)
|
||||
if(istype(W, /obj/item/paper/cig) || istype(W, /obj/item/spacecash))
|
||||
var/mob/living/carbon/human/H = user
|
||||
var/obj/item/blocked = H.check_mouth_coverage()
|
||||
if(blocked)
|
||||
to_chat(user, "<span class='warning'>\The [blocked] is in the way!</span>")
|
||||
return TRUE
|
||||
if(!H.check_has_mouth())
|
||||
to_chat(user, SPAN_WARNING("You cannot seem to snort \the [src]."))
|
||||
return TRUE
|
||||
|
||||
user.visible_message(
|
||||
SPAN_WARNING("\The [user] starts to snort some of \the [src] with \a [W]!"),
|
||||
SPAN_NOTICE("You start to snort some of \the [src] with \the [W]!")
|
||||
)
|
||||
playsound(loc, 'sound/effects/snort.ogg', 50, 1)
|
||||
if (!do_after(user, 2 SECONDS))
|
||||
return TRUE
|
||||
|
||||
user.visible_message(
|
||||
SPAN_WARNING("\The [user] snorts some of \the [src] with \a [W]!"),
|
||||
SPAN_NOTICE("You snort \the [src] with \the [W]!")
|
||||
)
|
||||
playsound(loc, 'sound/effects/snort.ogg', 50, 1)
|
||||
|
||||
if(reagents)
|
||||
var/contained = reagentlist()
|
||||
var/temp = reagents.get_temperature()
|
||||
var/trans = reagents.trans_to_mob(H, amount_per_transfer_from_this, CHEM_BREATHE, bypass_checks = TRUE)
|
||||
admin_inject_log(user, H, src, contained, temp, trans)
|
||||
if(!reagents.total_volume)
|
||||
qdel(src)
|
||||
return TRUE
|
||||
return ..()
|
||||
|
||||
Reference in New Issue
Block a user