Merge pull request #9973 from VOREStation/upstream-merge-7925

[MIRROR] Makes custom cigarettes even more custom-ier
This commit is contained in:
Novacat
2021-03-19 03:48:21 -04:00
committed by Chompstation Bot
parent 5c285eda7d
commit a4bf657c59
4 changed files with 61 additions and 15 deletions

View File

@@ -302,6 +302,7 @@
/obj/item/weapon/storage/fancy/cigarettes/jerichos = 10,
/obj/item/weapon/storage/fancy/cigarettes/menthols = 10,
/obj/item/weapon/storage/rollingpapers = 10,
/obj/item/weapon/storage/rollingpapers/blunt = 10,
/obj/item/weapon/storage/chewables/tobacco = 5,
/obj/item/weapon/storage/chewables/tobacco/fine = 5,
/obj/item/weapon/storage/box/matches = 10,
@@ -330,6 +331,7 @@
/obj/item/weapon/storage/fancy/cigarettes/jerichos = 22,
/obj/item/weapon/storage/fancy/cigarettes/menthols = 18,
/obj/item/weapon/storage/rollingpapers = 10,
/obj/item/weapon/storage/rollingpapers/blunt = 20,
/obj/item/weapon/storage/chewables/tobacco = 10,
/obj/item/weapon/storage/chewables/tobacco/fine = 20,
/obj/item/weapon/storage/box/matches = 1,

View File

@@ -484,34 +484,70 @@ CIGARETTE PACKETS ARE IN FANCY.DM
/obj/item/clothing/mask/smokable/cigarette/joint
name = "joint"
desc = "This probably shouldn't ever show up."
desc = "A joint lovingly rolled and crafted with care. Blaze it."
icon_state = "joint"
max_smoketime = 400
smoketime = 400
chem_volume = 25
/obj/item/clothing/mask/smokable/cigarette/joint/blunt
name = "blunt"
desc = "A blunt lovingly rolled and crafted with care. Blaze it."
icon_state = "cigar"
max_smoketime = 500
smoketime = 500
nicotine_amt = 0
nicotine_amt = 4
chem_volume = 45
/obj/item/weapon/rollingpaper
/obj/item/weapon/reagent_containers/rollingpaper
name = "rolling paper"
desc = "A small, thin piece of easily flammable paper, commonly used for rolling and smoking various dried plants."
description_fluff = "The legalization of certain substances propelled the sale of rolling papers through the roof. Now almost every Trans-stellar produces a variety, often of questionable quality."
icon = 'icons/obj/cigarettes.dmi'
icon_state = "cig paper"
volume = 25
var/obj/item/clothing/mask/smokable/cigarette/crafted_type = /obj/item/clothing/mask/smokable/cigarette/joint
/obj/item/weapon/rollingpaper/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/item/weapon/reagent_containers/rollingpaper/blunt
name = "blunt wrap"
desc = "A small piece of easily flammable paper similar to that which encases cigars. It's made out of tobacco, bigger than a standard rolling paper, and will last longer."
icon_state = "blunt paper"
volume = 45
crafted_type = /obj/item/clothing/mask/smokable/cigarette/joint/blunt
/obj/item/weapon/reagent_containers/rollingpaper/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (istype(W, /obj/item/weapon/reagent_containers/food/snacks))
var/obj/item/weapon/reagent_containers/food/snacks/grown/G = W
if (!G.dry)
to_chat(user, "<span class='notice'>[G] must be dried before you roll it into [src].</span>")
if (!G.dry) //This prevents people from just stuffing cheeseburgers into their joint
to_chat(user, "<span class='notice'>[G.name] must be dried before you add it to [src].</span>")
return
var/obj/item/clothing/mask/smokable/cigarette/joint/J = new /obj/item/clothing/mask/smokable/cigarette/joint(user.loc)
to_chat(usr, "<span class='notice'>You roll the [G.name] into a joint!</span>")
J.add_fingerprint(user)
if (G.reagents.total_volume + src.reagents.total_volume > src.reagents.maximum_volume) //Check that we don't have too much already in the paper before adding things
to_chat(user, "<span class='warning'>The [src] is too full to add [G.name].</span>")
return
if (src.reagents.total_volume == 0)
if (istype(src, /obj/item/weapon/reagent_containers/rollingpaper/blunt)) //update the icon if this is the first thing we're adding to the paper
src.icon_state = "blunt_full"
else
src.icon_state = "paper_full"
to_chat(user, "<span class='notice'>You add the [G.name] to the [src.name].</span>")
src.add_fingerprint(user)
if(G.reagents)
G.reagents.trans_to_obj(J, G.reagents.total_volume)
J.name = "[G.name] joint"
J.desc = "A joint lovingly rolled and filled with [G.name]. Blaze it."
G.reagents.trans_to_obj(src, G.reagents.total_volume) //adds the reagents from the plant into the paper
user.drop_from_inventory(G)
qdel(G)
qdel(src)
/obj/item/weapon/reagent_containers/rollingpaper/attack_self(mob/living/user)
if(!src.reagents) //don't roll an empty joint
to_chat(user, "<span class='warning'>There is nothing in [src]. Add something to it first.</span>")
return
var/obj/item/clothing/mask/smokable/cigarette/J = new crafted_type()
to_chat(user,"<span class='notice'>You roll the [src] into a blunt!</span>")
J.add_fingerprint(user)
if(src.reagents)
src.reagents.trans_to_obj(J, src.reagents.total_volume)
user.drop_from_inventory(src)
user.put_in_hands(J)
qdel(src)
/////////
//ZIPPO//

View File

@@ -354,8 +354,16 @@
throwforce = 2
slot_flags = SLOT_BELT
storage_slots = 14
can_hold = list(/obj/item/weapon/rollingpaper)
starts_with = list(/obj/item/weapon/rollingpaper = 14)
can_hold = list(/obj/item/weapon/reagent_containers/rollingpaper)
starts_with = list(/obj/item/weapon/reagent_containers/rollingpaper = 14)
/obj/item/weapon/storage/rollingpapers/blunt
name = "blunt wrap pack"
desc = "A small cardboard pack containing several folded blunt wraps."
icon_state = "bluntbox"
storage_slots = 7
can_hold = list(/obj/item/weapon/reagent_containers/rollingpaper/blunt)
starts_with = list(/obj/item/weapon/reagent_containers/rollingpaper/blunt = 7)
/*
* Vial Box

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 KiB

After

Width:  |  Height:  |  Size: 5.9 KiB