Skip to content

Commit

Permalink
immersive cigarollos
Browse files Browse the repository at this point in the history
  • Loading branch information
TobyThorne committed Sep 8, 2024
1 parent 12ca215 commit 3f71c2d
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 21 deletions.
47 changes: 32 additions & 15 deletions code/game/objects/items/smokables/cigarettes.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
name = "cigarette"
desc = "A small paper cylinder filled with processed tobacco and various fillers."
icon_state = "cigoff"
base_icon_state = null
throw_speed = 2
item_state = "cigoff"
w_class = ITEM_SIZE_TINY
Expand All @@ -19,6 +20,8 @@

/obj/item/clothing/mask/smokable/cigarette/Initialize()
. = ..()
if(!base_icon_state)
base_icon_state = icon_state
for(var/R in filling)
reagents.add_reagent(R, filling[R])

Expand All @@ -27,7 +30,7 @@
ClearOverlays()
if(dynamic_icon)
var/ratio = round(smoketime / initial(smoketime), 0.25) * 100
icon_state = ever_lit ? "[initial(icon_state)][ratio]" : initial(icon_state)
icon_state = ever_lit ? "[base_icon_state][ratio]" : initial(icon_state)
if(lit)
AddOverlays(OVERLAY(icon, "[ember_state][ratio]", alpha, RESET_COLOR))
else if(lit)
Expand Down Expand Up @@ -319,47 +322,61 @@
// CIGARILLOS //
////////////////
/obj/item/clothing/mask/smokable/cigarette/trident
name = "wood tip cigar"
brand = "\improper Trident cigar"
desc = "A narrow cigar with a wooden tip."
icon_state = "cigarello"
name = "wood tip cigarillo"
brand = "\improper Trident cigarillo"
desc = "A narrow cigarillo with a wooden tip."
icon_state = "cigarillo"
base_icon_state = "cigarillo"
item_state = "cigaroff"
ember_state = "cigarello-on"
ember_state = "cigarilloember"
smoketime = 480
chem_volume = 10
filter_trans = 0.25
type_butt = /obj/item/cigbutt/woodbutt
filling = list(/datum/reagent/tobacco/fine = 6)
dynamic_icon = FALSE
var/brand_overlay = ""

/obj/item/clothing/mask/smokable/cigarette/trident/Initialize()
. = ..()
if(brand_overlay)
icon_state = "cigarillo"
base_icon_state = "cigarillo"
AddOverlays("[base_icon_state]_[brand_overlay]", ATOM_ICON_CACHE_PROTECTED)

/obj/item/cigbutt/woodbutt
name = "wooden tip"
desc = "A wooden mouthpiece from a cigar. Smells rather bad."
icon_state = "woodbutt"
desc = "A wooden mouthpiece from a cigarillo. Smells rather bad."
icon_state = "cigarillobutt"
matter = list(MATERIAL_WOOD = 1)

/obj/item/clothing/mask/smokable/cigarette/trident/mint
icon_state = "cigarelloMi"
icon_state = "cigarilloMi"
brand_overlay = "Mi"
filling = list(/datum/reagent/tobacco/fine = 6, /datum/reagent/menthol = 2)

/obj/item/clothing/mask/smokable/cigarette/trident/berry
icon_state = "cigarelloBe"
icon_state = "cigarilloBe"
brand_overlay = "Be"
filling = list(/datum/reagent/tobacco/fine = 6, /datum/reagent/drink/juice/berry = 2)

/obj/item/clothing/mask/smokable/cigarette/trident/cherry
icon_state = "cigarelloCh"
icon_state = "cigarilloCh"
brand_overlay = "Ch"
filling = list(/datum/reagent/tobacco/fine = 6, /datum/reagent/nutriment/cherryjelly = 2)

/obj/item/clothing/mask/smokable/cigarette/trident/grape
icon_state = "cigarelloGr"
icon_state = "cigarilloGr"
brand_overlay = "Gr"
filling = list(/datum/reagent/tobacco/fine = 6, /datum/reagent/drink/juice/grape = 2)

/obj/item/clothing/mask/smokable/cigarette/trident/watermelon
icon_state = "cigarelloWm"
icon_state = "cigarilloWm"
brand_overlay = "Wm"
filling = list(/datum/reagent/tobacco/fine = 6, /datum/reagent/drink/juice/watermelon = 2)

/obj/item/clothing/mask/smokable/cigarette/trident/orange
icon_state = "cigarelloOr"
icon_state = "cigarilloOr"
brand_overlay = "Or"
filling = list(/datum/reagent/tobacco/fine = 6, /datum/reagent/drink/juice/orange = 2)

////////////////////
Expand Down
12 changes: 6 additions & 6 deletions code/game/objects/items/storage/fancy.dm
Original file line number Diff line number Diff line change
Expand Up @@ -265,17 +265,17 @@

//cigarellos
/obj/item/storage/fancy/cigarettes/cigarello
name = "pack of Trident Original cigars"
desc = "The Trident brand's wood tipped little cigar, favored by the Sol corps diplomatique for their pleasant aroma. Machine made on Mars for over 100 years."
name = "pack of Trident Original cigarillos"
desc = "The Trident brand's wood tipped little cigars, favored by the Sol corps diplomatique for their pleasant aroma. Machine made on Mars for over 100 years."
icon_state = "CRpacket"
item_state = "Dpacket"
max_storage_space = 6
key_type = /obj/item/clothing/mask/smokable/cigarette/trident
startswith = list(/obj/item/clothing/mask/smokable/cigarette/trident = 6)

/obj/item/storage/fancy/cigarettes/cigarello/variety
name = "pack of Trident Fruit cigars"
desc = "The Trident brand's wood tipped little cigar, favored by the Sol corps diplomatique for their pleasant aroma. Machine made on Mars for over 100 years. This is a fruit variety pack."
name = "pack of Trident Fruit cigarillos"
desc = "The Trident brand's wood tipped little cigars, favored by the Sol corps diplomatique for their pleasant aroma. Machine made on Mars for over 100 years. This is a fruit variety pack."
icon_state = "CRFpacket"
startswith = list( /obj/item/clothing/mask/smokable/cigarette/trident/watermelon,
/obj/item/clothing/mask/smokable/cigarette/trident/orange,
Expand All @@ -284,8 +284,8 @@
/obj/item/clothing/mask/smokable/cigarette/trident/berry)

/obj/item/storage/fancy/cigarettes/cigarello/mint
name = "pack of Trident Menthol cigars"
desc = "The Trident brand's wood tipped little cigar, favored by the Sol corps diplomatique for their pleasant aroma. Machine made on Mars for over 100 years. These are the menthol variety."
name = "pack of Trident Menthol cigarillos"
desc = "The Trident brand's wood tipped little cigars, favored by the Sol corps diplomatique for their pleasant aroma. Machine made on Mars for over 100 years. These are the menthol variety."
icon_state = "CRMpacket"
startswith = list(/obj/item/clothing/mask/smokable/cigarette/trident/mint = 6)

Expand Down
Binary file modified icons/obj/cigarettes.dmi
Binary file not shown.

0 comments on commit 3f71c2d

Please sign in to comment.