Files
Bubberstation/code/modules/vending/snack.dm
T
san7890 4efacff9fa Completely Culls req_access_txt/req_one_access_txt (#72281)
Hey there,

Now that every instance of `req_access` and `req_one_access` is a list
of strings, there is absolutely no reason for
req_access_txt/req_access_one_txt to exist. In fact, any instance where
they were still used in the codebase was very convoluted and was very
broken! Don't worry, I fixed it all out, and life is good.

I also dmdoc the surviving access variables, because those were missing.
I went on the side of caution and made a more verbose documentation with
an example just to have people really grasp this (it took me a while to
actually get it)

I believe that we changed _everything_ over to the
req_access/req_one_access system earlier this year in VV, but the
problem is that _new mappers don't understand the difference between the
two systems_. In fact, the "txt" system is completely redundant since
all it does is transition stuff to the "base" system. So, let's just
completely cull the one that's all but deprecated and ensure this
confusion no longer arises. The whole purpose of "txt" seemed to be to
convert the access, but it's all pointless now that we can just read the
list directly.

I'm also 99% certain that the "access check" on vending machines broke
(and didn't seem to have correct logic in the first place? I
legitimately couldn't find a case where it could fail in testing, so I
changed that up), and that's fixed up now. Let me know if I was clueless
there. I know it's short-circuiting now as opposed to "all must be
true", but it just didn't work.
2023-01-01 13:52:02 +00:00

58 lines
1.9 KiB
Plaintext

/obj/machinery/vending/snack
name = "\improper Getmore Chocolate Corp"
desc = "A snack machine courtesy of the Getmore Chocolate Corporation, based out of Mars."
product_slogans = "Try our new nougat bar!;Twice the calories for half the price!"
product_ads = "The healthiest!;Award-winning chocolate bars!;Mmm! So good!;Oh my god it's so juicy!;Have a snack.;Snacks are good for you!;Have some more Getmore!;Best quality snacks straight from mars.;We love chocolate!;Try our new jerky!"
icon_state = "snack"
panel_type = "panel2"
light_mask = "snack-light-mask"
products = list(
/obj/item/food/spacetwinkie = 6,
/obj/item/food/cheesiehonkers = 6,
/obj/item/food/candy = 6,
/obj/item/food/chips = 6,
/obj/item/food/chips/shrimp = 6,
/obj/item/food/sosjerky = 6,
/obj/item/food/cornchips/random = 6,
/obj/item/food/sosjerky = 6,
/obj/item/food/no_raisin = 6,
/obj/item/food/peanuts = 6,
/obj/item/food/peanuts/random = 3,
/obj/item/food/cnds = 6,
/obj/item/food/cnds/random = 3,
/obj/item/food/semki = 6,
/obj/item/reagent_containers/cup/glass/dry_ramen = 3,
/obj/item/storage/box/gum = 3,
/obj/item/food/energybar = 6,
)
contraband = list(
/obj/item/food/syndicake = 6,
/obj/item/food/peanuts/ban_appeal = 3,
/obj/item/food/candy/bronx = 1,
)
premium = list(
/obj/item/food/spacers_sidekick = 3,
/obj/item/food/pistachios = 3,
)
refill_canister = /obj/item/vending_refill/snack
req_access = list(ACCESS_KITCHEN)
default_price = PAYCHECK_CREW * 0.6
extra_price = PAYCHECK_CREW
payment_department = ACCOUNT_SRV
input_display_header = "Chef's Food Selection"
/obj/item/vending_refill/snack
machine_name = "Getmore Chocolate Corp"
/obj/machinery/vending/snack/blue
icon_state = "snackblue"
/obj/machinery/vending/snack/orange
icon_state = "snackorange"
/obj/machinery/vending/snack/green
icon_state = "snackgreen"
/obj/machinery/vending/snack/teal
icon_state = "snackteal"