mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-18 02:24:11 +01:00
The Smoking Expansion DLC II - The Second Puff (#30334)
* King's Own Tobacco * Update cigs.dm * cigar boxes * badass * CI * CI (again) * Update centcomm.dmm
This commit is contained in:
+102
-21
@@ -56,7 +56,7 @@ LIGHTERS ARE IN LIGHTERS.DM
|
||||
if(list_reagents)
|
||||
reagents.add_reagent_list(list_reagents)
|
||||
smoketime = reagents.total_volume * 2.5
|
||||
update_appearance(UPDATE_NAME|UPDATE_ICON_STATE)
|
||||
update_appearance(UPDATE_NAME|UPDATE_ICON)
|
||||
|
||||
/obj/item/clothing/mask/cigarette/update_icon_state()
|
||||
. = ..()
|
||||
@@ -261,7 +261,7 @@ LIGHTERS ARE IN LIGHTERS.DM
|
||||
if(C.wear_mask == src) // Don't update if it's just in their hand
|
||||
C.wear_mask_update(src)
|
||||
set_light(2, 0.25, "#E38F46")
|
||||
update_appearance(UPDATE_NAME|UPDATE_ICON_STATE)
|
||||
update_appearance(UPDATE_NAME|UPDATE_ICON)
|
||||
START_PROCESSING(SSobj, src)
|
||||
playsound(src, 'sound/items/lighter/light.ogg', 25, TRUE)
|
||||
return TRUE
|
||||
@@ -417,6 +417,7 @@ LIGHTERS ARE IN LIGHTERS.DM
|
||||
/obj/item/clothing/mask/cigarette/rollie/Initialize(mapload)
|
||||
. = ..()
|
||||
scatter_atom()
|
||||
|
||||
/obj/item/clothing/mask/cigarette/rollie/custom
|
||||
desc = "A roll of dried plant matter wrapped in thin paper."
|
||||
list_reagents = list()
|
||||
@@ -476,21 +477,67 @@ LIGHTERS ARE IN LIGHTERS.DM
|
||||
to_chat(user, "<span class='warning'>You need to dry this first!</span>")
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
user.unequip(plant, TRUE)
|
||||
user.unequip(src, TRUE)
|
||||
var/obj/item/clothing/mask/cigarette/rollie/custom/custom_rollie = new (get_turf(user))
|
||||
custom_rollie.reagents.maximum_volume = plant.reagents.total_volume
|
||||
plant.reagents.trans_to(custom_rollie, plant.reagents.total_volume)
|
||||
custom_rollie.smoketime = custom_rollie.reagents.total_volume * 2.5
|
||||
|
||||
user.put_in_active_hand(custom_rollie)
|
||||
to_chat(user, "<span class='notice'>You roll the [plant.name] into a rolling paper.</span>")
|
||||
custom_rollie.desc = "Dried [plant.name] rolled up in a thin piece of paper."
|
||||
|
||||
qdel(plant)
|
||||
// Don't stuff the entire tin into a single cig, you barbarian!
|
||||
if(istype(used, /obj/item/food/grown/tobacco/pre_dried))
|
||||
custom_rollie.desc = "Dried tobacco rolled up in a thin piece of paper."
|
||||
if(plant.reagents.total_volume > custom_rollie.chem_volume)
|
||||
to_chat(user, "<span class='notice'>You pour some of [plant] into a rolling paper.</span>")
|
||||
plant.reagents.trans_to(custom_rollie, 40)
|
||||
plant.update_appearance(UPDATE_ICON)
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You empty [plant] into a rolling paper.</span>")
|
||||
plant.reagents.trans_to(custom_rollie, plant.reagents.total_volume)
|
||||
user.unequip(plant, TRUE)
|
||||
qdel(plant)
|
||||
user.put_in_active_hand(new /obj/item/trash/tobacco_tin)
|
||||
else
|
||||
user.unequip(plant, TRUE)
|
||||
custom_rollie.reagents.maximum_volume = plant.reagents.total_volume
|
||||
plant.reagents.trans_to(custom_rollie, plant.reagents.total_volume)
|
||||
to_chat(user, "<span class='notice'>You roll the [plant.name] into a rolling paper.</span>")
|
||||
custom_rollie.desc = "Dried [plant.name] rolled up in a thin piece of paper."
|
||||
qdel(plant)
|
||||
custom_rollie.smoketime = custom_rollie.reagents.total_volume * REAGENT_TIME_RATIO
|
||||
user.put_in_hands(custom_rollie)
|
||||
qdel(src)
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
/obj/item/food/grown/tobacco/pre_dried
|
||||
name = "\improper King's Own tobacco"
|
||||
desc = "A tin of loose-leaf tobacco for filling pipes and hand-rolled cigarettes."
|
||||
icon = 'icons/obj/cigarettes.dmi'
|
||||
icon_state = "pipe_tobacco"
|
||||
seed = null
|
||||
trash = /obj/item/trash/tobacco_tin
|
||||
dry = TRUE
|
||||
tastes = list("tobacco" = 1, "herbs" = 2, "spices" = 2)
|
||||
volume = 240
|
||||
list_reagents = list("nicotine" = 240) // One of these has to fill an entire pipe. This is also the same nicotine found in a pack of 6 normal cigarettes.
|
||||
|
||||
/obj/item/food/grown/tobacco/pre_dried/examine_more(mob/user)
|
||||
. = ..()
|
||||
. += "A unique verity of hardy, arid tobacco grown on the Vulpkanin world of Strend in the Kelunian system. \
|
||||
The strain was developed from varieties imported from Kelune by the first colonists, and is now considered a luxury brand."
|
||||
. += ""
|
||||
. += "Sun-dried, finely shredded, and infused with herbs and spices; it has a pleasant but difficult to pin down flavor.\
|
||||
Whilst intended for use in pipes or hand-rolled cigarettes, some have been known to use it as dip or snuff."
|
||||
|
||||
/obj/item/food/grown/tobacco/pre_dried/On_Consume(mob/M, mob/user)
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
..()
|
||||
|
||||
/obj/item/food/grown/tobacco/pre_dried/update_icon_state()
|
||||
. = ..()
|
||||
if(reagents.total_volume < 240)
|
||||
icon_state = "pipe_tobacco_open"
|
||||
|
||||
/obj/item/trash/tobacco_tin
|
||||
name = "empty tobacco tin"
|
||||
icon = 'icons/obj/cigarettes.dmi'
|
||||
icon_state = "pipe_tobacco_empty"
|
||||
|
||||
//////////////////////////////
|
||||
// MARK: CIGARS
|
||||
//////////////////////////////
|
||||
@@ -506,7 +553,7 @@ LIGHTERS ARE IN LIGHTERS.DM
|
||||
|
||||
/obj/item/clothing/mask/cigarette/cigar/examine_more(mob/user)
|
||||
. = ..()
|
||||
. += " Don't let the advertising fool you, this thing is a bargain basement, bottom-of-the-barrel product and the smoking experience it offers is little better than an oversized Robust cigarette."
|
||||
. += "Don't let the advertising fool you, this thing is a bargain basement, bottom-of-the-barrel product and the smoking experience it offers is little better than an oversized Robust cigarette."
|
||||
. += ""
|
||||
. += "It still makes you look like a mafia boss, however."
|
||||
|
||||
@@ -524,7 +571,7 @@ LIGHTERS ARE IN LIGHTERS.DM
|
||||
|
||||
/obj/item/clothing/mask/cigarette/cigar/havana
|
||||
name = "\improper Premium Havanian Cigar"
|
||||
desc = "A luxury cigar only fit for the best of the best."
|
||||
desc = "A luxury cigar imported straight from Sol. Only fit for the best of the best. You feel badass merely glimpsing it..."
|
||||
icon_state = "gold_cigar"
|
||||
smoketime = 450
|
||||
chem_volume = 200
|
||||
@@ -541,6 +588,27 @@ LIGHTERS ARE IN LIGHTERS.DM
|
||||
. += "Due to a mixture of limited manufacturing capacity, high quality, brand prestige, and export taxes, \
|
||||
these cigars are too expensive for all but the most wealthy to smoke with any degree of regularity."
|
||||
|
||||
/obj/item/clothing/mask/cigarette/cigar/havana/equipped(mob/user, slot, initial)
|
||||
. = ..()
|
||||
if(lit && slot == ITEM_SLOT_MASK)
|
||||
grant_badass(user)
|
||||
|
||||
/obj/item/clothing/mask/cigarette/cigar/havana/light(mob/living/user)
|
||||
..()
|
||||
if(!HAS_TRAIT_FROM(user, TRAIT_BADASS, HOLO_CIGAR))
|
||||
grant_badass(user)
|
||||
|
||||
/obj/item/clothing/mask/cigarette/cigar/havana/proc/grant_badass(mob/user)
|
||||
if(!HAS_TRAIT_FROM(user, TRAIT_BADASS, HOLO_CIGAR))
|
||||
ADD_TRAIT(user, TRAIT_BADASS, HOLO_CIGAR)
|
||||
to_chat(user, "<span class='notice'>You feel more badass while smoking [src].</span>")
|
||||
|
||||
/obj/item/clothing/mask/cigarette/cigar/havana/dropped(mob/user, silent)
|
||||
. = ..()
|
||||
if(HAS_TRAIT_FROM(user, TRAIT_BADASS, HOLO_CIGAR))
|
||||
REMOVE_TRAIT(user, TRAIT_BADASS, HOLO_CIGAR)
|
||||
to_chat(user, "<span class='notice'>You feel less badass.</span>")
|
||||
|
||||
/obj/item/cigbutt/cigarbutt
|
||||
name = "cigar butt"
|
||||
desc = "A manky old cigar butt."
|
||||
@@ -584,7 +652,7 @@ LIGHTERS ARE IN LIGHTERS.DM
|
||||
to_chat(user, "<span class='notice'>You enable the holo-cigar.</span>")
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
update_appearance(UPDATE_NAME|UPDATE_ICON_STATE)
|
||||
update_appearance(UPDATE_NAME|UPDATE_ICON)
|
||||
|
||||
/obj/item/clothing/mask/holo_cigar/Destroy()
|
||||
. = ..()
|
||||
@@ -665,17 +733,30 @@ LIGHTERS ARE IN LIGHTERS.DM
|
||||
to_chat(user, "<span class='warning'>[src] is full!</span>")
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
filler.reagents.trans_to(src, chem_volume)
|
||||
to_chat(user, "<span class='notice'>You stuff the [filler.name] into the pipe.</span>")
|
||||
if(istype(used, /obj/item/food/grown/tobacco/pre_dried))
|
||||
to_chat(user, "<span class='notice'>You empty [filler] into the pipe.</span>")
|
||||
if((chem_volume - reagents.total_volume) >= filler.reagents.total_volume)
|
||||
filler.reagents.trans_to(src, chem_volume)
|
||||
user.unequip(filler, TRUE)
|
||||
qdel(filler)
|
||||
user.put_in_active_hand(new /obj/item/trash/tobacco_tin)
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You pour some of [filler] into the pipe.</span>")
|
||||
filler.reagents.trans_to(src, clamp(filler.reagents.total_volume, 0, (chem_volume - reagents.total_volume)))
|
||||
filler.update_icon(UPDATE_ICON_STATE)
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You stuff the [filler.name] into the pipe.</span>")
|
||||
filler.reagents.trans_to(src, chem_volume)
|
||||
qdel(filler)
|
||||
|
||||
smoketime = max(reagents.total_volume * REAGENT_TIME_RATIO, smoketime)
|
||||
qdel(filler)
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
/obj/item/clothing/mask/cigarette/pipe/light()
|
||||
if(!lit)
|
||||
lit = TRUE
|
||||
damtype = "fire"
|
||||
update_appearance(UPDATE_NAME|UPDATE_ICON_STATE)
|
||||
update_appearance(UPDATE_NAME|UPDATE_ICON)
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/clothing/mask/cigarette/pipe/process()
|
||||
@@ -687,7 +768,7 @@ LIGHTERS ARE IN LIGHTERS.DM
|
||||
var/mob/living/M = loc
|
||||
to_chat(M, "<span class='notice'>Your [name] goes out, and you empty the ash.</span>")
|
||||
lit = FALSE
|
||||
update_appearance(UPDATE_NAME|UPDATE_ICON_STATE)
|
||||
update_appearance(UPDATE_NAME|UPDATE_ICON)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return
|
||||
|
||||
@@ -700,7 +781,7 @@ LIGHTERS ARE IN LIGHTERS.DM
|
||||
)
|
||||
lit = FALSE
|
||||
first_puff = TRUE
|
||||
update_appearance(UPDATE_NAME|UPDATE_ICON_STATE)
|
||||
update_appearance(UPDATE_NAME|UPDATE_ICON)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/clothing/mask/cigarette/pipe/die()
|
||||
|
||||
@@ -10,7 +10,9 @@
|
||||
* Egg Box
|
||||
* Candle Box
|
||||
* Crayon Box
|
||||
* Matchbox
|
||||
* Cigarette Box
|
||||
* Cigar Box
|
||||
* Vial Box
|
||||
* Aquatic Starter Kit
|
||||
*/
|
||||
@@ -168,10 +170,7 @@
|
||||
return
|
||||
..()
|
||||
|
||||
/*
|
||||
* Matches Box
|
||||
*/
|
||||
|
||||
// MARK: MatchBox
|
||||
/obj/item/storage/fancy/matches
|
||||
name = "matchbox"
|
||||
desc = "A small box of Almost But Not Quite Plasma Premium Matches."
|
||||
@@ -425,7 +424,63 @@
|
||||
if(!length(contents))
|
||||
. += "[icon_state]_empty"
|
||||
|
||||
// MARK: Cigar Box
|
||||
/obj/item/storage/fancy/cigars
|
||||
name = "plastic cigar box"
|
||||
desc = "A cheap plastic box for holding cheap cigars. Only Nanotrasen would think something like this is a good idea."
|
||||
icon = 'icons/obj/cigarettes.dmi'
|
||||
icon_state = "cigar_box"
|
||||
storage_slots = 6
|
||||
max_combined_w_class = 6
|
||||
can_hold = list(/obj/item/clothing/mask/cigarette/cigar)
|
||||
icon_type = "cigar"
|
||||
var/cigar_type = /obj/item/clothing/mask/cigarette/cigar
|
||||
|
||||
/obj/item/storage/fancy/cigars/populate_contents()
|
||||
for(var/I in 1 to storage_slots)
|
||||
new cigar_type(src)
|
||||
|
||||
/obj/item/storage/fancy/cigars/update_overlays()
|
||||
. = ..()
|
||||
for(var/I = 1 to length(contents))
|
||||
var/obj/item/clothing/mask/cigarette/cigar/cigar = contents[I]
|
||||
var/icon/new_cigar_icon = icon('icons/obj/cigarettes.dmi', "[initial(cigar.icon_state)]_[I]")
|
||||
. += new_cigar_icon
|
||||
|
||||
/obj/item/storage/fancy/cigars/update_icon_state()
|
||||
icon_state = "[initial(icon_state)]_open"
|
||||
|
||||
/obj/item/storage/fancy/cigars/cohiba
|
||||
name = "wooden cigar box"
|
||||
icon_state = "wood_cigar_box"
|
||||
desc = "An ornate wooden box with decorative brass inlays. Perfect for storing a collection of fine cigars."
|
||||
cigar_type = /obj/item/clothing/mask/cigarette/cigar/cohiba
|
||||
|
||||
/obj/item/storage/fancy/havana_cigar
|
||||
name = "\improper Cuban cigar box"
|
||||
desc = "A small, ornate wooden box with decorative brass inlays. It has space for a single cigar inside. The bottom portion of the box has a silk-covered for holding the cigar. \
|
||||
Underneath the insert is a folded paper with embossed gold lettering explaining the long and illustrious history of Cuban cigars."
|
||||
icon = 'icons/obj/cigarettes.dmi'
|
||||
icon_state = "cuban_cigar_box"
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
can_hold = list(/obj/item/clothing/mask/cigarette/cigar/havana) // It's so powerful it refuses anything else.
|
||||
icon_type = "cigar"
|
||||
storage_slots = 1
|
||||
var/cigar_type = /obj/item/clothing/mask/cigarette/cigar/havana
|
||||
|
||||
/obj/item/storage/fancy/havana_cigar/update_icon_state()
|
||||
icon_state = "[initial(icon_state)]_open"
|
||||
|
||||
/obj/item/storage/fancy/havana_cigar/populate_contents()
|
||||
new cigar_type(src)
|
||||
|
||||
/obj/item/storage/fancy/havana_cigar/update_overlays()
|
||||
. = ..()
|
||||
for(var/I = 1 to length(contents))
|
||||
var/obj/item/clothing/mask/cigarette/cigar/cigar = contents[I]
|
||||
var/icon/new_cigar_icon = icon('icons/obj/cigarettes.dmi', "h_[initial(cigar.icon_state)]")
|
||||
. += new_cigar_icon
|
||||
|
||||
// MARK: Vial Box
|
||||
/obj/item/storage/fancy/vials
|
||||
name = "vial storage box"
|
||||
|
||||
Reference in New Issue
Block a user