mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-27 01:21:30 +00:00
## About The Pull Request The list of options you could choose from when screwdrivering a custom vending machine circuit board was hard-coded and also contained copy pastes of every vending machine name (some of which were outdated). It was yucky - Add a new var on `/obj/machinery/vending` called `allow_custom`, defaults to FALSE and determines whether that type shows up as an option when screwdrivering a custom vending machine board, I've went through and made assignments for it mirror what was in the old static list i.e. this won't introduce any new options - Change the hard-coded static list to be built on Initialize, populating with every subtype that has `allow_custom` set to TRUE - Eliminate a second static list that was just the inverse of the first one (first one was typepath = name and this one was just name = typepath) - Changed an `istype` check to `==` because old behavior meant subtypes of a given vending machine would have their type set to the supertype if that was also a valid custom vending machine option ## Why It's Good For The Game Cleaner code, no needing to maintain two separate entries for the name of a vending machine, eligibility for a machine to be used in custom vending machines is now a var on the type instead of in a random file pertaining to circuit boards ## Changelog 🆑 refactor: refactored custom vending machine brand code, a new var on /obj/machinery/vending called allow_custom now determines whether the machine can be chosen when screwdrivering the circuit board /🆑
77 lines
2.2 KiB
Plaintext
77 lines
2.2 KiB
Plaintext
/obj/machinery/vending/dinnerware
|
|
name = "\improper Plasteel Chef's Dinnerware Vendor"
|
|
desc = "A kitchen and restaurant equipment vendor."
|
|
product_ads = "Mm, food stuffs!;Food and food accessories.;Get your plates!;You like forks?;I like forks.;Woo, utensils.;You don't really need these..."
|
|
icon_state = "dinnerware"
|
|
panel_type = "panel4"
|
|
product_categories = list(
|
|
list(
|
|
"name" = "Kitchen Utensils",
|
|
"icon" = FA_ICON_KITCHEN_SET,
|
|
"products" = list(
|
|
/obj/item/storage/bag/tray = 8,
|
|
/obj/item/reagent_containers/cup/soup_pot = 3,
|
|
/obj/item/kitchen/spoon/soup_ladle = 3,
|
|
/obj/item/clothing/suit/apron/chef = 2,
|
|
/obj/item/kitchen/rollingpin = 2,
|
|
/obj/item/kitchen/tongs = 2,
|
|
/obj/item/knife/kitchen = 2,
|
|
),
|
|
),
|
|
list(
|
|
"name" = "Eating Utensils",
|
|
"icon" = FA_ICON_UTENSILS,
|
|
"products" = list(
|
|
/obj/item/kitchen/fork = 6,
|
|
/obj/item/kitchen/spoon = 10,
|
|
),
|
|
),
|
|
list(
|
|
"name" = "Dinnerware",
|
|
"icon" = FA_ICON_PLATE_WHEAT,
|
|
"products" = list(
|
|
/obj/item/plate/small = 5,
|
|
/obj/item/plate = 10,
|
|
/obj/item/plate/large = 5,
|
|
/obj/item/reagent_containers/cup/bowl = 30,
|
|
/obj/item/reagent_containers/cup/glass/drinkingglass = 8,
|
|
),
|
|
),
|
|
list(
|
|
"name" = "Condiments",
|
|
"icon" = FA_ICON_BOTTLE_DROPLET,
|
|
"products" = list(
|
|
/obj/item/reagent_containers/condiment/pack/ketchup = 5,
|
|
/obj/item/reagent_containers/condiment/pack/hotsauce = 5,
|
|
/obj/item/reagent_containers/condiment/pack/astrotame = 5,
|
|
/obj/item/reagent_containers/condiment/saltshaker = 5,
|
|
/obj/item/reagent_containers/condiment/peppermill = 5,
|
|
),
|
|
),
|
|
list(
|
|
"name" = "Recipes",
|
|
"icon" = FA_ICON_BOOK_OPEN_READER,
|
|
"products" = list(
|
|
/obj/item/book/granter/crafting_recipe/cooking_sweets_101 = 2,
|
|
),
|
|
),
|
|
)
|
|
|
|
premium = list(
|
|
/obj/item/skillchip/chefs_kiss = 2
|
|
)
|
|
contraband = list(
|
|
/obj/item/kitchen/rollingpin/illegal = 2,
|
|
/obj/item/knife/butcher = 2,
|
|
)
|
|
refill_canister = /obj/item/vending_refill/dinnerware
|
|
default_price = PAYCHECK_CREW * 0.8
|
|
extra_price = PAYCHECK_CREW * 2.4
|
|
payment_department = ACCOUNT_SRV
|
|
light_mask = "dinnerware-light-mask"
|
|
allow_custom = TRUE
|
|
|
|
/obj/item/vending_refill/dinnerware
|
|
machine_name = "Plasteel Chef's Dinnerware Vendor"
|
|
icon_state = "refill_smoke"
|