Skip to content

Cigarette and Food Accessibility Overhaul #829

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 21 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions code/game/machinery/vending/vending.dm
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ GLOBAL_LIST_EMPTY_TYPED(total_vending_machines, /obj/structure/machinery/vending
/// when did we last pitch?
var/last_slogan = 0
/// how long until we can pitch again?
var/slogan_delay = 600
var/slogan_delay = 30
/// icon_state when vending
var/icon_vend
/// icon_state when failing to vend
Expand All @@ -84,6 +84,8 @@ GLOBAL_LIST_EMPTY_TYPED(total_vending_machines, /obj/structure/machinery/vending
var/shut_up = FALSE
/// can we access the hidden inventory?
var/extended_inventory = FALSE
// are we partially unstocked?
var/partially_unstocked = FALSE
/// if the vendor is currently being hacked
var/panel_open = FALSE
var/wires = 15
Expand Down Expand Up @@ -153,14 +155,22 @@ GLOBAL_LIST_EMPTY_TYPED(total_vending_machines, /obj/structure/machinery/vending
var/price = prices[typepath]
if(isnull(amount)) amount = 1


var/obj/item/temp_path = typepath
var/datum/data/vending_product/product = new /datum/data/vending_product()

product.product_path = typepath
product.amount = amount
product.price = price
product.max_amount = amount

//Empty it
if(partially_unstocked)
if(prob(25)) // Chance to just be empty
product.amount = 0
else
product.amount = rand(1, amount) //between one and max number
else
product.amount = amount
if(ispath(typepath, /obj/item/weapon/gun) || ispath(typepath, /obj/item/ammo_magazine) || ispath(typepath, /obj/item/explosive/grenade) || ispath(typepath, /obj/item/weapon/gun/flamer) || ispath(typepath, /obj/item/storage) )
product.display_color = "black"
else
Expand Down
379 changes: 127 additions & 252 deletions code/game/machinery/vending/vending_types.dm

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion code/game/objects/items.dm
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
//also useful for items with many icon_state values when you don't want to make an inhand sprite for each value.
/// When set to true, every single sprite can be found in the one icon .dmi, rather than being spread into onmobs, inhands, and objects
var/contained_sprite = FALSE

var/use_initial_icon_for_helmetgarb = TRUE //many items, like cigarettes, change their icon when opened.
var/r_speed = 1
var/force = 0
var/damtype = BRUTE
Expand Down
88 changes: 63 additions & 25 deletions code/game/objects/items/storage/fancy.dm
Original file line number Diff line number Diff line change
Expand Up @@ -137,12 +137,17 @@
)
icon_type = "cigarette"
var/default_cig_type=/obj/item/clothing/mask/cigarette
var/loadout = FALSE

/obj/item/storage/fancy/cigarettes/fill_preset_inventory()
flags_atom |= NOREACT
for(var/i = 1 to storage_slots)
new default_cig_type(src)
if(loadout)
for(var/i in 1 to rand(0,3))
new default_cig_type(src)
else
for(var/i = 1 to storage_slots)
new default_cig_type(src)
create_reagents(15 * storage_slots)//so people can inject cigarettes without opening a packet, now with being able to inject the whole one
flags_atom |= NOREACT

/obj/item/storage/fancy/cigarettes/Initialize()
. = ..()
Expand All @@ -167,48 +172,60 @@
..()

/obj/item/storage/fancy/cigarettes/emeraldgreen
name = "\improper Emerald Green Packet"
desc = "They remind you of a gross, tar-filled version of Ireland. These cheap cigarettes are Weyland-Yutani's entry into the general market."
name = "\improper Emerald Green packet"
desc = "A cheap Koorlander-affiliated brand known for their heavy tar. Their popularity is largely limited to the frontier, given the highly competitive legacy market on Earth."
icon_state = "cigpacket"
item_state = "cigpacket"

/obj/item/storage/fancy/cigarettes/emeraldgreen/loadout
loadout = TRUE

/obj/item/storage/fancy/cigarettes/wypacket
name = "\improper Weyland-Yutani Gold packet"
desc = "Building Better Worlds, and rolling better cigarettes. These fancy cigarettes are Weyland-Yutani's entry into the premium tobacco market. Comes backed by a fierce legal team."
desc = "Weyland Yutani's entrance to the tobacco market. Despite the luxurious branding and high price, they aren't known to be especially high quality."
icon_state = "wypacket"
item_state = "wypacket"

/obj/item/storage/fancy/cigarettes/wypacket/loadout
loadout = TRUE

/obj/item/storage/fancy/cigarettes/wypacket_4
name = "\improper Weyland-Yutani Gold mini packet"
desc = "Building Better Worlds, and rolling better cigarettes. Compact and ready for your executive ventures, protecting corporate assets never felt cooler."
desc = "Weyland Yutani's entrance to the tobacco market. Despite the luxurious branding and high price, they aren't known to be especially high quality."
icon_state = "wy4packet"
item_state = "wypacket"
item_state_slots = list(WEAR_AS_GARB = "cig_wypack")
storage_slots = 4

/obj/item/storage/fancy/cigarettes/balaji
name = "\improper Balaji Imperial packet"
desc = "Smoke 'em if you gottem! Quite popular amongst people living in the Three World Empire."
desc = "A well-established TWE cigarette brand out of India known for their lightness and smooth taste. Despite an attempted buy-out from Weyland-Yutani, Balaji has remained independent."
icon_state = "bpacket"
item_state = "bpacket"

/obj/item/storage/fancy/cigarettes/balaji/loadout
loadout = TRUE

/obj/item/storage/fancy/cigarettes/balaji_4
name = "\improper Balaji Imperial Mini packet"
desc = "Smoke 'em if you gottem! Now a field, in the new compact package!"
desc = "A well-established TWE cigarette brand out of India known for their lightness and smooth taste. Despite an attempted buy-out from Weyland-Yutani, Balaji has remained independent."
icon_state = "b4packet"
item_state = "bpacket"
item_state_slots = list(WEAR_AS_GARB = "cig_bpack")
storage_slots = 4

/obj/item/storage/fancy/cigarettes/lucky_strikes
name = "\improper Lucky Strikes Packet"
desc = "Lucky Strikes Means Fine Tobacco! 9/10 doctors agree on Lucky Strikes... as the leading cause of marine lung cancer."
name = "\improper Lucky Strikes Red packet"
desc = "Long time friend to the Marine Corps, and one of the most popular American cigarette brands on the market. Unfiltered, all-American goodness."
icon_state = "lspacket"
item_state = "lspacket"
default_cig_type = /obj/item/clothing/mask/cigarette/ucigarette

/obj/item/storage/fancy/cigarettes/lucky_strikes/loadout
loadout = TRUE

/obj/item/storage/fancy/cigarettes/lucky_strikes_4
name = "\improper Lucky Strikes Mini Packet"
name = "\improper Lucky Strikes Mini packet"
desc = "These four-packs of Luckies come in every MRE. They're not as good as the Habana Reals that come in the LACN MREs, but at least they're free."
icon_state = "ls4packet"
item_state = "lspacket"
Expand All @@ -218,14 +235,17 @@

/obj/item/storage/fancy/cigarettes/blackpack
name = "\improper Executive Select packet"
desc = "These cigarettes are the height of luxury. They're smooth, they're cool, and they smell like victory... and cigarette smoke."
desc = "Known by their distinct black colour, blue glow, and smooth taste, these are the most expensive cigarettes on the market today and make a very good case for their being so."
icon_state = "blackpacket"
item_state = "blackpacket"
default_cig_type = /obj/item/clothing/mask/cigarette/bcigarette

/obj/item/storage/fancy/cigarettes/blackpack/loadout
loadout = TRUE

/obj/item/storage/fancy/cigarettes/blackpack_4
name = "\improper Executive Select mini packet"
desc = "Luxury right in your ration. You will have them just in time to use them while observing a nuclear blast and enjoying it."
desc = "Known by their distinct black colour, blue glow, and smooth taste, these are the most expensive cigarettes on the market today and make a very good case for their being so."
icon_state = "black4packet"
item_state = "blackpacket"
item_state_slots = list(WEAR_AS_GARB = "cig_blackpack")
Expand All @@ -234,42 +254,60 @@

/obj/item/storage/fancy/cigarettes/kpack
name = "\improper Koorlander Gold packet"
desc = "Lovingly machine-rolled for YOUR pleasure. For when you want to look cool and the risk of a slow horrible death isn't really a factor."
desc = "A well-established TWE based cigarette brand primarily manufactured in the colonies, it is the primary competitior to Balaji Imperial. Despite this, there are ongoing discussions about a merger for the sake of remaining independent of Weyland-Yutani."
icon_state = "kpacket"
item_state = "kpacket"

/obj/item/storage/fancy/cigarettes/kpack/loadout
loadout = TRUE

/obj/item/storage/fancy/cigarettes/arcturian_ace
name = "\improper Arcturian Ace packet"
desc = "An entry level brand of cigarettes with a bright blue packaging. You're guessing these aren't really good for you, but it doesn't matter when it's Arcturian baby!"
desc = "An exotic brand of cigarettes affiliated with Koorlander that utilizes hybrid tobacco grown on Arctura. They're supposedly healthier for you as a result, and with how smooth they are you might actually believe it."
icon_state = "aapacket"
item_state = "aapacket"

/obj/item/storage/fancy/cigarettes/arcturian_ace/loadout
loadout = TRUE

/obj/item/storage/fancy/cigarettes/lady_finger
name = "\improper Lady Fingers packet"
desc = "These intensely strong unfiltered menthol cigarettes don't seem very ladylike. They don't seem very fingerlike for that matter, either. Smoking may kill, but poor branding is almost as bad."
desc = "A cheap Koorlander-affiliated brand of unfiltered menthol cigarettes. You've never seen these outside of the colonies."
icon_state = "lfpacket"
item_state = "lfpacket"
default_cig_type = /obj/item/clothing/mask/cigarette/ucigarette

/obj/item/storage/fancy/cigarettes/lady_finger/loadout
loadout = TRUE

/obj/item/storage/fancy/cigarettes/spirit
name = "\improper American Spirit Turquoise Packet"
desc = "A pack of turquoise American Spirit cigarettes, for that strong full-bodied flavour you know and love."
name = "\improper American Spirit Turquoise packet"
desc = "A well-established UA based cigarette brand. The turquois packaging hints at their strong full-bodied flavour."
icon_state = "naspacket"
item_state = "naspacket"
default_cig_type = /obj/item/clothing/mask/cigarette

/obj/item/storage/fancy/cigarettes/spirit/loadout
loadout = TRUE

/obj/item/storage/fancy/cigarettes/spirit/yellow
name = "\improper American Spirit Yellow Packet"
desc = "A pack of yellow American Spirit cigarettes, for that mellow flavour you know and love."
name = "\improper American Spirit Yellow packet"
desc = "A well-established UA based cigarette brand. The yellow packaging hints at their mellow flavour."
icon_state = "y_naspacket"
item_state = "y_naspacket"

/obj/item/storage/fancy/cigarettes/spirit/yellow/loadout
loadout = TRUE

/obj/item/storage/fancy/cigarettes/laika
name = "\improper Laika packet"
desc = "A Russian brand of cigarettes maintaining and honoring the legacy of the dog Laika, a space pioneer."
desc = "One of the many state-owned cigarette brands in the UPP, these come from Russia and honor the space pioneer Laika. Strong and heavily filtered, they're said to bring good luck to those in space transit, if not a lot of tobacco."
icon_state = "laikapacket"
item_state = "laikapacket"

/obj/item/storage/fancy/cigarettes/laika/loadout
loadout = TRUE

/obj/item/storage/fancy/cigarettes/trading_card
name = "\improper WeyYu Gold Military Trading Card packet"
desc = "Gotta collect 'em all, and smoke 'em all! This fancy military trading card version of Weyland Yutani Gold cigarette packs has one card that is apart of the 3 available 5-card sets."
Expand Down Expand Up @@ -374,8 +412,8 @@
// MATCH BOX

/obj/item/storage/fancy/cigar/matchbook
name = "\improper Lucky Strikes matchbook"
desc = "A small book of cheap paper matches. Good luck getting them to light. Made by Lucky Strikes, but you'll be anything but lucky when you burn your hand trying to light a match on this."
name = "\improper matchbook"
desc = "A small book of cheap paper matches. Good luck getting them to light. Made with generic tan paper."
icon_state = "mpacket"
item_state = "zippo"
storage_slots = 6
Expand Down Expand Up @@ -405,7 +443,7 @@
to_chat(user, SPAN_NOTICE("\The [W] fails to light."))

/obj/item/storage/fancy/cigar/matchbook/brown
name = "brown matchbook"
name = "matchbook"
desc = "A small book of cheap paper matches. Good luck getting them to light. Made with generic brown paper."
icon_state = "mpacket_br"

Expand Down
Loading