diff --git a/code/game/objects/items/weapons/storage/fancy.dm b/code/game/objects/items/weapons/storage/fancy.dm index 51de635827c..786c1706d61 100644 --- a/code/game/objects/items/weapons/storage/fancy.dm +++ b/code/game/objects/items/weapons/storage/fancy.dm @@ -295,6 +295,7 @@ slot_l_hand_str = 'icons/mob/items/lefthand_cigs_lighters.dmi', slot_r_hand_str = 'icons/mob/items/righthand_cigs_lighters.dmi', ) + contained_sprite = FALSE // makes cigarette packets actually visible in hand drop_sound = 'sound/items/drop/gloves.ogg' pickup_sound = 'sound/items/pickup/gloves.ogg' use_sound = 'sound/items/storage/wrapper.ogg' @@ -303,6 +304,7 @@ slot_flags = SLOT_BELT storage_slots = 6 can_hold = list(/obj/item/clothing/mask/smokable/cigarette, /obj/item/flame/lighter, /obj/item/trash/cigbutt) + cant_hold = list(/obj/item/clothing/mask/smokable/cigarette/cigar) // prevents cigars from being put in regular cigarettes packs, because thats kind of silly var/cigarette_to_spawn = /obj/item/clothing/mask/smokable/cigarette /obj/item/storage/box/fancy/cigarettes/Initialize() @@ -311,13 +313,17 @@ . = ..() /obj/item/storage/box/fancy/cigarettes/fill() - for(var/i = 1 to storage_slots) - new cigarette_to_spawn(src) + if(cigarette_to_spawn) + for(var/i = 1 to storage_slots) + new cigarette_to_spawn(src) /obj/item/storage/box/fancy/cigarettes/update_icon() . = ..() if(opened) - icon_state = "[initial(icon_state)][contents.len]" + handle_open_icon() + +/obj/item/storage/box/fancy/cigarettes/proc/handle_open_icon() + icon_state = "[initial(icon_state)][contents.len]" // The old open states method, kept here as to not break old packages. /obj/item/storage/box/fancy/cigarettes/remove_from_storage(obj/item/removed_item, atom/new_location) var/obj/item/clothing/mask/smokable/cigarette/C = removed_item @@ -391,6 +397,7 @@ use_sound = 'sound/items/storage/briefcase.ogg' storage_slots = 8 can_hold = list(/obj/item/clothing/mask/smokable/cigarette/cigar) + cant_hold = list() //allows cigar cases to hold cigars cigarette_to_spawn = /obj/item/clothing/mask/smokable/cigarette/cigar chewable = FALSE @@ -425,6 +432,44 @@ item_state = "Fpacket" cigarette_to_spawn = /obj/item/clothing/mask/smokable/cigarette/oracle +/obj/item/storage/box/fancy/cigarettes/case + name = "cigarette case" + desc = "A simple cigarette case for the aspiring chain-smoker." + icon_state = "cigarettecase" + item_state = "cigarettecase" + storage_type = "case" + drop_sound = 'sound/items/drop/weldingtool.ogg' + pickup_sound = 'sound/items/pickup/weldingtool.ogg' + use_sound = 'sound/items/storage/briefcase.ogg' + storage_slots = 14 + max_storage_space = 14 //A janky but functional solution since I could not figure out how to increase the maximum storage to match how much the case is designed to hold in any other way + cigarette_to_spawn = null + +/// Added a new function to allow the base sprite (unopened) to still utilize the regular opened sprites (the ones that go from 0 to 1 to 2 etc etc etc), +/// without needing to add them as separate items in the DMI file. Could be used with the cigar cases in the future if someone chooses to give them new closed sprites for fluff. +/// Also allows contributors to add their own unique cigarette case sprites without adding additional confusing bloat. +/obj/item/storage/box/fancy/cigarettes/case/handle_open_icon() + icon_state = "cigarettecase[contents.len]" + +// List of different cigarette cases (unique closed states sprites) - Add new ones here, please +/obj/item/storage/box/fancy/cigarettes/case/mus + name = "decorated cigarette case" + desc = "A fancy cigarette case with some kind of golden inscription on its cover." + icon_state = "cigarettecase_mus" + item_state = "cigarettecase" + +/obj/item/storage/box/fancy/cigarettes/case/sol + name = "sol cigarette case" + desc = "A fancy cigarette case with the Solarian emblem on its cover." + icon_state = "cigarettecase_sol" + item_state = "cigarettecase" + +/obj/item/storage/box/fancy/cigarettes/case/tc + name = "biesel cigarette case" + desc = "A simple cigarette case with the symbol of the Republic of Biesel on its cover." + icon_state = "cigarettecase_tc" + item_state = "cigarettecase" + /* * Vial Box */ diff --git a/code/modules/client/preference_setup/loadout/items/smoking.dm b/code/modules/client/preference_setup/loadout/items/smoking.dm index 805399b3bac..55e165d8c34 100644 --- a/code/modules/client/preference_setup/loadout/items/smoking.dm +++ b/code/modules/client/preference_setup/loadout/items/smoking.dm @@ -144,3 +144,17 @@ ecig["ordinary electronic cigarette"] = /obj/item/clothing/mask/smokable/ecig/util ecig["deluxe electronic cigarette"] = /obj/item/clothing/mask/smokable/ecig/deluxe gear_tweaks += new /datum/gear_tweak/path(ecig) + +/datum/gear/smoking/cigarettecase //loadout list for cigarette cases. add new custom one's here + display_name = "cigarette cases selection" + description = "A selection of empty cigarette cases." + path = /obj/item/storage/box/fancy/cigarettes/case + +/datum/gear/smoking/cigarettecase/New() + ..() + var/list/cigarettecase = list() + cigarettecase["cigarette case"] = /obj/item/storage/box/fancy/cigarettes/case + cigarettecase["cigarette case, decorated"] = /obj/item/storage/box/fancy/cigarettes/case/mus + cigarettecase["cigarette case, sol"] = /obj/item/storage/box/fancy/cigarettes/case/sol + cigarettecase["cigarette case, biesel"] = /obj/item/storage/box/fancy/cigarettes/case/tc + gear_tweaks += new /datum/gear_tweak/path(cigarettecase) diff --git a/html/changelogs/ShimmerIsTaken - Cigarette Cases.yml b/html/changelogs/ShimmerIsTaken - Cigarette Cases.yml new file mode 100644 index 00000000000..94143debed4 --- /dev/null +++ b/html/changelogs/ShimmerIsTaken - Cigarette Cases.yml @@ -0,0 +1,61 @@ +################################ +# 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 +# - (fixes bugs) +# wip +# - (work in progress) +# qol +# - (quality of life) +# soundadd +# - (adds a sound) +# sounddel +# - (removes a sound) +# rscadd +# - (adds a feature) +# rscdel +# - (removes a feature) +# imageadd +# - (adds an image or sprite) +# imagedel +# - (removes an image or sprite) +# spellcheck +# - (fixes spelling or grammar) +# experiment +# - (experimental change) +# balance +# - (balance changes) +# code_imp +# - (misc internal code change) +# refactor +# - (refactors code) +# config +# - (makes a change to the config files) +# admin +# - (makes changes to administrator tools) +# server +# - (miscellaneous changes to server) +################################# + +# Your name. +author: ShimmerIsTaken + +# 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 prefixS list above. +# INDENT WITH TWO SPACES. NOT TABS. SPACES. +# SCREW THIS UP AND IT WON'T WORK. +# Also, this gets changed to [] after reading. Just remove the brackets when you add new shit. +# Please surround your changes in double quotes ("). It works without them, but if you use certain characters it screws up compiling. The quotes will not show up in the changelog. +changes: + - rscadd: "Added a new item to the smoking loadout, an empty cigarette case that can be filled with rolled cigarettes or bought one's, and kept in a nice pretty package." + - bugfix: "Fixes cigarette packs and the cigar case not displaying their in-hand sprites." + - bugfix: "Fixed cigarette packs being able to hold cigars. Same applies to the newly added item, cigars can only be stored in cigar cases." + - imageadd: "Added new cigarette case sprites, blank, Biesel, Sol, and decorated, item and inhand. Modified the inhand sprites of certain existing cigarette packets and cigar case to fix the northfacing sprite." diff --git a/icons/mob/items/lefthand_cigs_lighters.dmi b/icons/mob/items/lefthand_cigs_lighters.dmi index 3f6f49f5d0e..020bb032ed3 100644 Binary files a/icons/mob/items/lefthand_cigs_lighters.dmi and b/icons/mob/items/lefthand_cigs_lighters.dmi differ diff --git a/icons/mob/items/righthand_cigs_lighters.dmi b/icons/mob/items/righthand_cigs_lighters.dmi index 8f7a5abf546..e133e08492c 100644 Binary files a/icons/mob/items/righthand_cigs_lighters.dmi and b/icons/mob/items/righthand_cigs_lighters.dmi differ diff --git a/icons/obj/cigs_lighters.dmi b/icons/obj/cigs_lighters.dmi index 8767cc4749b..422caa82f01 100644 Binary files a/icons/obj/cigs_lighters.dmi and b/icons/obj/cigs_lighters.dmi differ