diff --git a/code/game/objects/items/contraband.dm b/code/game/objects/items/contraband.dm index e77b877ea3c..bc983a4c866 100644 --- a/code/game/objects/items/contraband.dm +++ b/code/game/objects/items/contraband.dm @@ -87,3 +87,64 @@ reagents.add_reagent(/singleton/reagent/toxin/heartworm_eggs, 2) desc = "BIOHAZARDOUS! - Heart Fluke eggs. Purchased from SciSupply Eridani, recently incorporated into Zeng-Hu Pharmaceuticals' Keiretsu!" 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, "\The [blocked] is in the way!") + 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 ..() diff --git a/code/modules/reagents/reagent_containers/pill.dm b/code/modules/reagents/reagent_containers/pill.dm index 7b01cc56a6f..9fb5f1e90c5 100644 --- a/code/modules/reagents/reagent_containers/pill.dm +++ b/code/modules/reagents/reagent_containers/pill.dm @@ -80,6 +80,23 @@ . = ..() +/obj/item/reagent_containers/pill/attackby(obj/item/W, mob/user) + if(is_sharp(W) || istype(W, /obj/item/card/id)) + var/obj/item/reagent_containers/powder/J = new /obj/item/reagent_containers/powder(loc) + user.visible_message( + SPAN_WARNING("\The [user] gently cuts up \the [src] with \a [W]!"), + SPAN_NOTICE("You gently cut up \the [src] with \the [W]."), + SPAN_WARNING("You hear quiet grinding.") + ) + playsound(loc, 'sound/effects/chop.ogg', 50, 1) + + if(reagents) + reagents.trans_to_obj(J, reagents.total_volume) + J.get_appearance() + qdel(src) + + return ..() + //////////////////////////////////////////////////////////////////////////////// /// Pills. END //////////////////////////////////////////////////////////////////////////////// diff --git a/html/changelogs/flpfs-cocaine.yml b/html/changelogs/flpfs-cocaine.yml new file mode 100644 index 00000000000..9883cd396cd --- /dev/null +++ b/html/changelogs/flpfs-cocaine.yml @@ -0,0 +1,41 @@ +################################ +# Example Changelog File +# +# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb. +# +# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.) +# When it is, any changes listed below will disappear. +# +# Valid Prefixes: +# bugfix +# wip (For works in progress) +# tweak +# soundadd +# sounddel +# rscadd (general adding of nice things) +# rscdel (general deleting of nice things) +# imageadd +# imagedel +# maptweak +# spellcheck (typo fixes) +# experiment +# balance +# admin +# backend +# security +# refactor +################################# + +# Your name. +author: Flpfs + +# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again. +delete-after: True + +# Any changes you've made. See valid prefix list above. +# INDENT WITH TWO SPACES. NOT TABS. SPACES. +# SCREW THIS UP AND IT WON'T WORK. +# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries. +# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog. +changes: + - rscadd: "You can now chop pills up with an ID, and snort them with cash or a rolling cigarette paper. Go Venus!" diff --git a/icons/obj/chemical.dmi b/icons/obj/chemical.dmi index b9cb186fc1a..1509240564e 100644 Binary files a/icons/obj/chemical.dmi and b/icons/obj/chemical.dmi differ diff --git a/sound/effects/chop.ogg b/sound/effects/chop.ogg new file mode 100644 index 00000000000..59c6d992678 Binary files /dev/null and b/sound/effects/chop.ogg differ diff --git a/sound/effects/snort.ogg b/sound/effects/snort.ogg new file mode 100644 index 00000000000..6cb5de712a4 Binary files /dev/null and b/sound/effects/snort.ogg differ