Onehanded cigs, and a bunch of other stuff (#9279)

Surprisingly, doesn't really change that much user-facing side.

For some stupid reason, cigar cases were using a rehash of cigarette packet code for no good reason. So I just made it a parent item, and it works just fine.

also added a tooltip to share the rather obscure feature of putting a cigarette in your mouth.

resprites the tajaran cigarette packets to more accurately match where they come from
This commit is contained in:
Wowzewow (Wezzy)
2020-07-05 18:34:07 +03:00
committed by GitHub
parent 0f7e190eb5
commit a4c8f4b8dc
19 changed files with 129 additions and 120 deletions
+35 -3
View File
@@ -1,8 +1,40 @@
/obj/item/storage/fancy/cigarettes/pra
name = "\improper Labourer's Choice cigarette packet"
desc = "Jokingly referred to an essential part of a working class citizen's breakfast, beside state-provided provisions."
desc_fluff = "Imported from the People's Republic of Adhomai."
icon_state = "prapacket"
item_state = "Dpacket"
storage_slots = 7
cigarette_to_spawn = /obj/item/clothing/mask/smokable/cigarette/adhomai
can_hold = list(/obj/item/clothing/mask/smokable/cigarette, /obj/item/flame/lighter, /obj/item/trash/cigbutt, /obj/item/tajcard)
/obj/item/storage/fancy/cigarettes/pra/fill()
..()
new /obj/item/tajcard(src)
/obj/item/storage/fancy/cigarettes/dpra
name = "\improper Shastar List'ya cigarette packet"
desc = "Rumored to be a de-facto currency for Adhominian knuckles off-planet."
desc_fluff = "Imported from the Democratic People's Republic of Adhomai."
icon_state = "dprapacket"
item_state = "Bpacket"
cigarette_to_spawn = /obj/item/clothing/mask/smokable/cigarette/adhomai
/obj/item/storage/fancy/cigarettes/nka
name = "\improper Gato Royales cigarette packet"
desc = "Popular with the aristocrats of the New Kingdom of Adhomai for its mild menthol flavor."
desc_fluff = "Imported from the New Kingdom of Adhomai."
icon_state = "nkapacket"
item_state = "Fpacket"
cigarette_to_spawn = /obj/item/clothing/mask/smokable/cigarette/adhomai
/obj/item/tajcard
name = "collectable tajaran card"
desc = "A collectable card, usually found inside cigarette packs, with the illustration of a famous Tajara."
desc = "A collectable card with an illustration of a famous Tajaran figure, usually found inside cigarette packets."
icon = 'icons/obj/playing_cards.dmi'
icon_state = "tajcig"
drop_sound = 'sound/items/drop/paper.ogg'
pickup_sound = 'sound/items/pickup/paper.ogg'
w_class = ITEMSIZE_SMALL
var/list/figures = list("hadii", "tesla", "headmaster", "commissar", "almanq", "yasmin", "andrey", "paratrooper", "scout")
@@ -155,7 +187,7 @@
/obj/item/flame/lighter/adhomai
name = "adhomian lighter"
desc = "An adhomian lighter, it is designated to protect the flame from the strong winds of the Tajaran homeworld."
desc = "An adhomian lighter, designed to protect the flame from the strong winds of the Tajaran homeworld."
icon = 'icons/obj/tajara_items.dmi'
icon_state = "trenchlighter"
item_state = "trenchlighter"
@@ -234,4 +266,4 @@
starts_with = list(
/obj/item/dice/tajara = 3,
/obj/item/dice/tajara/alt = 3
)
)
+1 -1
View File
@@ -167,7 +167,7 @@ obj/item/clothing/mask/chewable/Destroy()
starts_with = list(/obj/item/clothing/mask/chewable/candy/gum = 5)
can_hold = list(/obj/item/clothing/mask/chewable/candy/gum,
/obj/item/trash/spitgum)
use_sound = 'sound/items/drop/paper.ogg'
use_sound = 'sound/items/drop/wrapper.ogg'
drop_sound = 'sound/items/drop/wrapper.ogg'
pickup_sound = 'sound/items/pickup/wrapper.ogg'
max_storage_space = 5
@@ -608,7 +608,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
item_state = icon_state
base_state = icon_state
/obj/item/flame/lighter/zippo/update_icon()
/obj/item/flame/lighter/update_icon()
if(lit)
icon_state = "[base_state]on"
item_state = "[base_state]on"
@@ -114,7 +114,7 @@
icon = 'icons/obj/crayons.dmi'
icon_state = "crayonbox"
icon_type = "crayon"
w_class = 2.0
w_class = ITEMSIZE_SMALL
can_hold = list(
/obj/item/pen/crayon
)
@@ -152,8 +152,9 @@
//CIG PACK//
////////////
/obj/item/storage/fancy/cigarettes
name = "Trans-Stellar Duty Free cigarette packet"
name = "Trans-Stellar Duty Frees cigarette packet"
desc = "A ubiquitous brand of cigarettes, found in the facilities of every major spacefaring corporation in the universe. As mild and flavorless as it gets."
desc_info = "You can put a cigarette directly in your mouth by selecting the mouth region and clicking on yourself with a cigarette packet in hand."
icon = 'icons/obj/cigs_lighters.dmi'
icon_state = "cigpacket"
item_state = "cigpacket"
@@ -164,8 +165,8 @@
)
drop_sound = 'sound/items/drop/gloves.ogg'
pickup_sound = 'sound/items/pickup/gloves.ogg'
use_sound = 'sound/items/drop/paper.ogg'
w_class = 1
use_sound = 'sound/items/drop/wrapper.ogg'
w_class = ITEMSIZE_TINY
throwforce = 2
slot_flags = SLOT_BELT
storage_slots = 6
@@ -197,7 +198,7 @@
if(M == user && target_zone == BP_MOUTH && contents.len > 0 && !user.wear_mask)
var/obj/item/clothing/mask/smokable/cigarette/W = new cigarette_to_spawn(user)
if(!istype(W))
to_chat(user, "<span class ='notice'>The [W] is blocking the cigarettes.</span>")
to_chat(user, SPAN_NOTICE("The [W] is in the way."))
return
//Checking contents of packet so lighters won't be cigarettes.
for (var/i = contents.len; i > 0; i--)
@@ -211,7 +212,7 @@
reagents.trans_to_obj(W, (reagents.total_volume/contents.len))
user.equip_to_slot_if_possible(W, slot_wear_mask)
reagents.maximum_volume = 15 * contents.len
to_chat(user, "<span class='notice'>You take a cigarette out of the pack.</span>")
user.visible_message("<b>[user]</b> casually pulls out a [cigarette_to_spawn] from \the [src] with their mouth.", range = 3)
update_icon()
else
..()
@@ -220,120 +221,52 @@
/obj/item/storage/fancy/cigarettes/acmeco
name = "\improper AcmeCo cigarette packet"
desc = "A packet of six AcmeCo cigarettes. For those who somehow want to obtain the record for the most amount of cancerous tumors."
desc = "For those who somehow want to obtain the record for the most amount of cancerous tumors."
icon_state = "Apacket"
item_state = "Apacket"
cigarette_to_spawn = /obj/item/clothing/mask/smokable/cigarette/acmeco
/obj/item/storage/fancy/cigarettes/blank
name = "\improper blank cigarette packet"
desc = "A packet of six blank cigarettes. The healthiest cigarettes on the market!"
desc = "The healthiest cigarettes on the market! Wait, isn't this just a roll of paper?"
icon_state = "Bpacket"
item_state = "Bpacket"
cigarette_to_spawn = /obj/item/clothing/mask/smokable/cigarette/blank
/obj/item/storage/fancy/cigarettes/cigar
name = "cigar case"
desc = "A luxurious tote for your fat tokes."
icon_state = "cigarcase"
item_state = "cigarcase"
icon_type = "cigar"
drop_sound = 'sound/items/drop/weldingtool.ogg'
pickup_sound = 'sound/items/pickup/weldingtool.ogg'
use_sound = 'sound/items/storage/briefcase.ogg'
storage_slots = 8
can_hold = list(/obj/item/clothing/mask/smokable/cigarette/cigar)
cigarette_to_spawn = /obj/item/clothing/mask/smokable/cigarette/cigar
/obj/item/storage/fancy/cigarettes/dromedaryco
name = "\improper DromedaryCo cigarette packet"
desc = "A packet of six imported DromedaryCo cancer sticks. A label on the packaging reads, \"Wouldn't a slow death make a change?\""
desc = "A label on the packaging reads, \"Wouldn't a slow death make a change?\""
icon_state = "Dpacket"
item_state = "Dpacket"
cigarette_to_spawn = /obj/item/clothing/mask/smokable/cigarette/dromedaryco
/obj/item/storage/fancy/cigar
name = "cigar case"
desc = "A case for holding your cigars when you are not smoking them."
icon_state = "cigarcase"
item_state = "cigarcase"
icon = 'icons/obj/cigs_lighters.dmi'
drop_sound = 'sound/items/drop/shovel.ogg'
pickup_sound = 'sound/items/pickup/shovel.ogg'
use_sound = 'sound/items/storage/briefcase.ogg'
item_icons = list(
slot_l_hand_str = 'icons/mob/items/lefthand_cigs_lighters.dmi',
slot_r_hand_str = 'icons/mob/items/righthand_cigs_lighters.dmi',
)
w_class = 1
throwforce = 2
slot_flags = SLOT_BELT
storage_slots = 8
can_hold = list(/obj/item/clothing/mask/smokable/cigarette/cigar)
icon_type = "cigar"
/obj/item/storage/fancy/cigar/Initialize()
. = ..()
flags |= NOREACT
create_reagents(15 * storage_slots)
/obj/item/storage/fancy/cigar/fill()
..()
for(var/i = 1 to storage_slots)
new /obj/item/clothing/mask/smokable/cigarette/cigar(src)
/obj/item/storage/fancy/cigar/update_icon()
icon_state = "[initial(icon_state)][contents.len]"
return
/obj/item/storage/fancy/cigar/remove_from_storage(obj/item/W as obj, atom/new_location)
var/obj/item/clothing/mask/smokable/cigarette/cigar/C = W
if(!istype(C)) return
reagents.trans_to_obj(C, (reagents.total_volume/contents.len))
..()
/obj/item/storage/fancy/cigar/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob, var/target_zone)
if(!istype(M, /mob))
return
if(M == user && target_zone == BP_MOUTH && contents.len > 0 && !user.wear_mask)
var/obj/item/clothing/mask/smokable/cigarette/cigar/W = new /obj/item/clothing/mask/smokable/cigarette/cigar(user)
reagents.trans_to_obj(W, (reagents.total_volume/contents.len))
user.equip_to_slot_if_possible(W, slot_wear_mask)
reagents.maximum_volume = 15 * contents.len
contents.len--
to_chat(user, "<span class='notice'>You take a cigar out of the case.</span>")
update_icon()
else
..()
/obj/item/storage/fancy/cigarettes/nicotine
name = "\improper Nico-Tine cigarette packet"
desc = "A packet of six Nico-Tine cigarettes. Allegedly advertised as the most enviromentally friendly cigarettes in the market. It doesn't specify how, but it definitely isn't your body."
desc = "An Eridani marketing triumph - the jingle still torments people to this day."
icon_state = "Epacket"
item_state = "Epacket"
cigarette_to_spawn = /obj/item/clothing/mask/smokable/cigarette/nicotine
/obj/item/storage/fancy/cigarettes/rugged
name = "\improper Lucky Strike cigarette packet"
desc = "A packet of six Lucky Strike cigarettes. Rumored to be part of an Idris money laundering scheme, its original purpose long forgotten."
name = "\improper Laissez-Faires cigarette packet"
desc = "Rumored to have outlived its original purpose as part of an Idris money laundering scheme."
icon_state = "Fpacket"
item_state = "Fpacket"
cigarette_to_spawn = /obj/item/clothing/mask/smokable/cigarette/rugged
/obj/item/storage/fancy/cigarettes/pra
name = "\improper Working Tajara cigarette packet"
desc = "A packet of six adhomian \"Working Tajara\" cigarettes, imported straight from the People's Republic of Adhomai."
icon_state = "prapacket"
item_state = "prapacket"
cigarette_to_spawn = /obj/item/clothing/mask/smokable/cigarette/adhomai
can_hold = list(/obj/item/clothing/mask/smokable/cigarette, /obj/item/flame/lighter, /obj/item/trash/cigbutt, /obj/item/tajcard)
/obj/item/storage/fancy/cigarettes/pra/fill()
..()
new /obj/item/tajcard(src)
/obj/item/storage/fancy/cigarettes/dpra
name = "\improper Shastar Leaves cigarette packet"
desc = "A packet of six adhomian \"Shastar Leaves\" cigarettes, imported straight from the Democratic People's Republic of Adhomai."
icon_state = "dprapacket"
item_state = "dprapacket"
cigarette_to_spawn = /obj/item/clothing/mask/smokable/cigarette/adhomai
/obj/item/storage/fancy/cigarettes/nka
name = "\improper Royal Choice cigarette packet"
desc = "A packet of six adhomian \"Royal Choice\" cigarettes, imported straight from the New Kingdom of Adhomai."
icon_state = "nkapacket"
item_state = "nkapacket"
cigarette_to_spawn = /obj/item/clothing/mask/smokable/cigarette/adhomai
/*
* Vial Box
*/
@@ -359,7 +292,7 @@
use_sound = 'sound/items/drop/glass.ogg'
drop_sound = 'sound/items/drop/toolbox.ogg'
pickup_sound = 'sound/items/pickup/toolbox.ogg'
max_w_class = 2
max_w_class = ITEMSIZE_SMALL
can_hold = list(/obj/item/reagent_containers/glass/beaker/vial)
max_storage_space = 12 //The sum of the w_classes of all the items in this storage item.
storage_slots = 6
@@ -59,7 +59,7 @@
item_state = "cigpacket"
drop_sound = 'sound/items/drop/wrapper.ogg'
pickup_sound = 'sound/items/pickup/wrapper.ogg'
use_sound = 'sound/items/drop/paper.ogg'
use_sound = 'sound/items/drop/wrapper.ogg'
item_icons = list(
slot_l_hand_str = 'icons/mob/items/lefthand_cigs_lighters.dmi',
slot_r_hand_str = 'icons/mob/items/righthand_cigs_lighters.dmi',
@@ -93,7 +93,7 @@
make_exact_fit()
drop_sound = 'sound/items/drop/gloves.ogg'
pickup_sound = 'sound/items/pickup/gloves.ogg'
use_sound = 'sound/items/drop/paper.ogg'
use_sound = 'sound/items/drop/wrapper.ogg'
/obj/item/storage/fancy/cigpaper/fine
name = "\improper Trident cigarette paper"