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 /🆑
43 lines
1.5 KiB
Plaintext
43 lines
1.5 KiB
Plaintext
//This one's from bay12
|
|
/obj/machinery/vending/engineering
|
|
name = "\improper Robco Tool Maker"
|
|
desc = "Everything you need for do-it-yourself station repair."
|
|
icon_state = "engi"
|
|
icon_deny = "engi-deny"
|
|
panel_type = "panel10"
|
|
products = list(
|
|
/obj/item/clothing/under/rank/engineering/chief_engineer = 4,
|
|
/obj/item/clothing/under/rank/engineering/engineer = 4,
|
|
/obj/item/clothing/shoes/sneakers/orange = 4,
|
|
/obj/item/clothing/head/utility/hardhat = 4,
|
|
/obj/item/storage/belt/utility = 4,
|
|
/obj/item/clothing/glasses/meson/engine = 4,
|
|
/obj/item/clothing/gloves/color/yellow = 4,
|
|
/obj/item/screwdriver = 12,
|
|
/obj/item/crowbar = 12,
|
|
/obj/item/wirecutters = 12,
|
|
/obj/item/multitool = 12,
|
|
/obj/item/wrench = 12,
|
|
/obj/item/t_scanner = 12,
|
|
/obj/item/stock_parts/power_store/cell = 8,
|
|
/obj/item/stock_parts/power_store/battery = 8,
|
|
/obj/item/weldingtool = 8,
|
|
/obj/item/clothing/head/utility/welding = 8,
|
|
/obj/item/light/tube = 10,
|
|
/obj/item/clothing/suit/utility/fire = 4,
|
|
/obj/item/stock_parts/scanning_module = 5,
|
|
/obj/item/stock_parts/micro_laser = 5,
|
|
/obj/item/stock_parts/matter_bin = 5,
|
|
/obj/item/stock_parts/servo = 5,
|
|
)
|
|
refill_canister = /obj/item/vending_refill/engineering
|
|
default_price = PAYCHECK_CREW
|
|
extra_price = PAYCHECK_COMMAND * 1.5
|
|
payment_department = ACCOUNT_ENG
|
|
light_mask = "engi-light-mask"
|
|
allow_custom = TRUE
|
|
|
|
/obj/item/vending_refill/engineering
|
|
machine_name = "Robco Tool Maker"
|
|
icon_state = "refill_engi"
|