mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-02-06 22:39:04 +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 /🆑
49 lines
1.6 KiB
Plaintext
49 lines
1.6 KiB
Plaintext
/obj/machinery/vending/assist
|
|
name = "\improper Part-Mart"
|
|
desc = "All the finest of miscellaneous electronics one could ever need! Not responsible for any injuries caused by reckless misuse of parts."
|
|
icon_state = "parts"
|
|
icon_deny = "parts-deny"
|
|
panel_type = "panel10"
|
|
products = list(
|
|
/obj/item/assembly/igniter = 3,
|
|
/obj/item/assembly/prox_sensor = 5,
|
|
/obj/item/assembly/signaler = 4,
|
|
/obj/item/computer_disk/ordnance = 4,
|
|
/obj/item/stock_parts/capacitor = 3,
|
|
/obj/item/stock_parts/servo = 3,
|
|
/obj/item/stock_parts/matter_bin = 3,
|
|
/obj/item/stock_parts/micro_laser = 3,
|
|
/obj/item/stock_parts/scanning_module = 3,
|
|
/obj/item/wirecutters = 2,
|
|
/obj/item/stack/sticky_tape/duct = 3,
|
|
)
|
|
contraband = list(
|
|
/obj/item/assembly/health = 2,
|
|
/obj/item/assembly/timer = 2,
|
|
/obj/item/assembly/voice = 2,
|
|
/obj/item/stock_parts/power_store/cell/high = 1,
|
|
/obj/item/stock_parts/power_store/battery/high = 1,
|
|
/obj/item/market_uplink/blackmarket = 1,
|
|
/obj/item/screwdriver = 2,
|
|
/obj/item/assembly/mousetrap = 4,
|
|
/obj/item/weaponcrafting/stock = 2,
|
|
)
|
|
premium = list(
|
|
/obj/item/assembly/igniter/condenser = 2,
|
|
/obj/item/circuitboard/machine/vendor = 3,
|
|
/obj/item/universal_scanner = 3,
|
|
/obj/item/vending_refill/custom = 3,
|
|
)
|
|
allow_custom = TRUE
|
|
|
|
refill_canister = /obj/item/vending_refill/assist
|
|
product_ads = "Only the finest!;Have some tools.;The most robust equipment.;The finest gear in space!"
|
|
default_price = PAYCHECK_CREW * 0.7 //Default of 35.
|
|
extra_price = PAYCHECK_CREW
|
|
payment_department = NO_FREEBIES
|
|
light_mask = "parts-light-mask"
|
|
|
|
/obj/item/vending_refill/assist
|
|
machine_name = "Part-Mart"
|
|
icon_state = "refill_parts"
|