mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-28 01:51:46 +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 /🆑
285 lines
10 KiB
Plaintext
285 lines
10 KiB
Plaintext
|
|
GLOBAL_LIST_INIT(autodrobe_costumes_items, list(
|
|
/obj/item/clothing/under/costume/gladiator = 3,
|
|
/obj/item/clothing/head/helmet/gladiator = 3,
|
|
/obj/item/clothing/suit/toggle/labcoat/mad = 3,
|
|
/obj/item/clothing/suit/bio_suit/plaguedoctorsuit = 3,
|
|
/obj/item/clothing/head/bio_hood/plague = 3,
|
|
/obj/item/clothing/mask/gas/plaguedoctor = 3,
|
|
/obj/item/clothing/under/rank/medical/doctor/nurse = 3,
|
|
/obj/item/clothing/suit/toggle/owlwings = 1,
|
|
/obj/item/clothing/under/costume/owl = 1,
|
|
/obj/item/clothing/mask/gas/owl_mask = 1,
|
|
/obj/item/clothing/suit/toggle/owlwings/griffinwings = 1,
|
|
/obj/item/clothing/under/costume/griffin = 1,
|
|
/obj/item/clothing/shoes/griffin = 1,
|
|
/obj/item/clothing/head/costume/griffin = 1,
|
|
/obj/item/clothing/under/costume/pirate = 3,
|
|
/obj/item/clothing/suit/costume/pirate = 3,
|
|
/obj/item/clothing/head/costume/pirate = 3,
|
|
/obj/item/clothing/head/costume/pirate/bandana = 3,
|
|
/obj/item/clothing/shoes/pirate = 3,
|
|
/obj/item/clothing/under/costume/soviet = 3,
|
|
/obj/item/clothing/head/costume/ushanka = 3,
|
|
/obj/item/clothing/accessory/vest_sheriff = 1,
|
|
/obj/item/clothing/head/cowboy/brown = 3,
|
|
/obj/item/clothing/head/cowboy/red = 3,
|
|
/obj/item/clothing/head/cowboy/black = 3,
|
|
/obj/item/clothing/head/costume/sombrero/green = 3,
|
|
/obj/item/clothing/suit/costume/poncho = 3,
|
|
/obj/item/clothing/suit/costume/poncho/green = 3,
|
|
/obj/item/clothing/suit/costume/poncho/red = 3,
|
|
/obj/item/clothing/suit/costume/snowman = 3,
|
|
/obj/item/clothing/head/costume/snowman = 3,
|
|
/obj/item/clothing/under/costume/referee = 1,
|
|
/obj/item/clothing/mask/whistle = 1,
|
|
/obj/item/storage/backpack/henchmen = 5,
|
|
/obj/item/clothing/under/costume/henchmen = 5,
|
|
/obj/item/clothing/head/costume/jackbros = 5,
|
|
/obj/item/clothing/under/costume/jackbros = 5,
|
|
/obj/item/clothing/under/costume/deckers = 5,
|
|
/obj/item/clothing/under/costume/sailor = 3,
|
|
/obj/item/clothing/head/costume/delinquent = 1,
|
|
/obj/item/clothing/suit/costume/dracula = 3,
|
|
/obj/item/clothing/under/costume/draculass = 3,
|
|
/obj/item/clothing/suit/costume/gothcoat = 3,
|
|
/obj/item/clothing/glasses/eyepatch = 3,
|
|
/obj/item/clothing/glasses/eyepatch/medical = 3,
|
|
/obj/item/clothing/under/costume/gi = 4,
|
|
/obj/item/clothing/head/soft/propeller_hat = 3,
|
|
/obj/item/clothing/neck/bowtie/rainbow = 3,
|
|
))
|
|
|
|
GLOBAL_LIST_INIT(autodrobe_supernatural_items, list(
|
|
/obj/item/clothing/suit/costume/imperium_monk = 3,
|
|
/obj/item/clothing/suit/chaplainsuit/holidaypriest = 3,
|
|
/obj/item/clothing/suit/chaplainsuit/habit = 3,
|
|
/obj/item/clothing/head/chaplain/habit_veil = 3,
|
|
/obj/item/clothing/suit/chaplainsuit/whiterobe = 3,
|
|
/obj/item/clothing/head/wizard/marisa/fake = 3,
|
|
/obj/item/clothing/suit/wizrobe/marisa/fake = 3,
|
|
/obj/item/clothing/head/costume/witchwig = 3,
|
|
/obj/item/staff/broom = 3,
|
|
/obj/item/clothing/suit/wizrobe/fake = 3,
|
|
/obj/item/clothing/head/wizard/fake = 3,
|
|
/obj/item/staff = 3,
|
|
/obj/item/clothing/head/costume/shrine_wig = 1,
|
|
/obj/item/clothing/suit/costume/shrine_maiden = 1,
|
|
/obj/item/gohei = 3,
|
|
))
|
|
|
|
GLOBAL_LIST_INIT(autodrobe_entretainers_items, list(
|
|
/obj/item/clothing/under/rank/civilian/clown/blue = 3,
|
|
/obj/item/clothing/under/rank/civilian/clown/green = 3,
|
|
/obj/item/clothing/under/rank/civilian/clown/yellow = 3,
|
|
/obj/item/clothing/under/rank/civilian/clown/orange = 3,
|
|
/obj/item/clothing/under/rank/civilian/clown/purple = 3,
|
|
/obj/item/clothing/mask/gas/sexyclown = 3,
|
|
/obj/item/clothing/under/rank/civilian/clown/sexy = 3,
|
|
/obj/item/clothing/head/beret = 6,
|
|
/obj/item/clothing/mask/gas/sexymime = 3,
|
|
/obj/item/clothing/under/rank/civilian/mime/sexy = 3,
|
|
/obj/item/clothing/under/rank/civilian/mime/skirt = 3,
|
|
/obj/item/clothing/under/rank/civilian/clown/jester = 3,
|
|
/obj/item/clothing/head/costume/jester = 3,
|
|
/obj/item/clothing/shoes/jester_shoes = 3,
|
|
/obj/item/clothing/under/costume/villain = 3,
|
|
/obj/item/clothing/suit/costume/joker = 3,
|
|
/obj/item/clothing/under/costume/joker = 3,
|
|
/obj/item/clothing/shoes/singery = 1,
|
|
/obj/item/clothing/under/costume/singer/yellow = 1,
|
|
/obj/item/clothing/shoes/singerb = 1,
|
|
/obj/item/clothing/under/costume/singer/blue = 1,
|
|
/obj/item/clothing/head/costume/cueball = 1,
|
|
))
|
|
|
|
GLOBAL_LIST_INIT(autodrobe_fancy_items, list(
|
|
/obj/item/clothing/under/rank/captain/suit = 1,
|
|
/obj/item/clothing/under/rank/captain/suit/skirt = 1,
|
|
/obj/item/clothing/under/costume/seifuku = 3,
|
|
/obj/item/clothing/under/costume/seifuku/red = 3,
|
|
/obj/item/clothing/under/costume/seifuku/teal = 3,
|
|
/obj/item/clothing/under/costume/seifuku/tan = 3,
|
|
/obj/item/clothing/under/dress/skirt = 3,
|
|
/obj/item/clothing/neck/tie = 3,
|
|
/obj/item/clothing/head/hats/tophat = 3,
|
|
/obj/item/clothing/under/costume/kilt = 3,
|
|
/obj/item/clothing/glasses/monocle = 3,
|
|
/obj/item/clothing/head/hats/bowler = 3,
|
|
/obj/item/cane = 3,
|
|
/obj/item/clothing/under/dress/sundress = 3,
|
|
/obj/item/clothing/suit/costume/whitedress = 3,
|
|
/obj/item/clothing/suit/costume/changshan_red = 3,
|
|
/obj/item/clothing/suit/costume/changshan_blue = 3,
|
|
/obj/item/clothing/suit/costume/cheongsam_red = 3,
|
|
/obj/item/clothing/suit/costume/cheongsam_blue = 3,
|
|
))
|
|
|
|
GLOBAL_LIST_INIT(autodrobe_animal_items, list(
|
|
/obj/item/clothing/head/costume/kitty = 3,
|
|
/obj/item/clothing/head/costume/rabbitears = 3,
|
|
/obj/item/clothing/suit/costume/chickensuit = 3,
|
|
/obj/item/clothing/head/costume/chicken = 3,
|
|
/obj/item/clothing/suit/hooded/carp_costume = 3,
|
|
/obj/item/clothing/suit/hooded/ian_costume = 3,
|
|
/obj/item/clothing/suit/hooded/bee_costume = 3,
|
|
/obj/item/clothing/mask/animal/small/bat = 3,
|
|
/obj/item/clothing/mask/animal/small/bee = 3,
|
|
/obj/item/clothing/mask/animal/small/bear = 3,
|
|
/obj/item/clothing/mask/animal/small/raven = 3,
|
|
/obj/item/clothing/mask/animal/small/jackal = 3,
|
|
/obj/item/clothing/mask/animal/small/fox = 3,
|
|
/obj/item/clothing/mask/animal/frog = 3,
|
|
/obj/item/clothing/mask/animal/small/rat = 3,
|
|
/obj/item/clothing/mask/animal/pig = 3,
|
|
/obj/item/clothing/mask/animal/cowmask = 3,
|
|
/obj/item/clothing/mask/animal/horsehead = 3,
|
|
))
|
|
|
|
GLOBAL_LIST_INIT(autodrobe_service_items, list(
|
|
/obj/item/clothing/under/costume/buttondown/slacks/service = 3,
|
|
/obj/item/clothing/under/costume/buttondown/skirt/service = 3,
|
|
/obj/item/clothing/neck/bowtie = 6,
|
|
/obj/item/clothing/accessory/waistcoat = 4,
|
|
/obj/item/clothing/under/suit/waiter = 4,
|
|
/obj/item/clothing/suit/apron = 3,
|
|
/obj/item/clothing/suit/apron/overalls = 3,
|
|
/obj/item/clothing/head/costume/maid_headband = 3,
|
|
/obj/item/clothing/under/costume/maid = 3,
|
|
/obj/item/clothing/under/rank/civilian/janitor/maid = 3,
|
|
/obj/item/clothing/accessory/maidapron = 3,
|
|
))
|
|
|
|
GLOBAL_LIST_INIT(autodrobe_other_items, list(
|
|
/obj/item/clothing/head/wig/random = 6,
|
|
/obj/item/clothing/head/flatcap = 3,
|
|
/obj/item/clothing/suit/jacket/miljacket = 3,
|
|
/obj/item/clothing/shoes/workboots/black = 3,
|
|
/obj/item/clothing/mask/fakemoustache = 3,
|
|
/obj/item/clothing/glasses/cold= 3,
|
|
/obj/item/clothing/glasses/heat= 3,
|
|
/obj/item/clothing/mask/gas/cyborg = 3,
|
|
/obj/item/clothing/mask/joy = 3,
|
|
/obj/item/clothing/mask/gas/prop = 4,
|
|
/obj/item/clothing/mask/gas/atmosprop = 3,
|
|
/obj/item/clothing/mask/animal/small/tribal = 1,
|
|
))
|
|
|
|
GLOBAL_LIST_INIT(autodrobe_premium_items, list(
|
|
/obj/item/clothing/suit/costume/pirate/captain = 2,
|
|
/obj/item/clothing/head/costume/pirate/captain = 2,
|
|
/obj/item/clothing/under/rank/civilian/clown/rainbow = 1,
|
|
/obj/item/clothing/head/helmet/roman/fake = 3,
|
|
/obj/item/clothing/head/helmet/roman/legionnaire/fake = 3,
|
|
/obj/item/clothing/under/costume/roman = 3,
|
|
/obj/item/clothing/shoes/roman = 3,
|
|
/obj/item/shield/roman/fake = 3,
|
|
/obj/item/clothing/suit/chaplainsuit/clownpriest = 1,
|
|
/obj/item/clothing/head/chaplain/clownmitre = 1,
|
|
/obj/item/skub = 1,
|
|
/obj/item/clothing/suit/hooded/mysticrobe = 1,
|
|
/obj/item/clothing/under/dress/wedding_dress = 1,
|
|
/obj/item/clothing/under/suit/tuxedo = 1,
|
|
/obj/item/clothing/head/costume/weddingveil = 1,
|
|
/obj/item/storage/belt/fannypack/cummerbund = 1,
|
|
/obj/item/clothing/suit/costume/drfreeze_coat = 1,
|
|
/obj/item/clothing/under/costume/drfreeze = 1,
|
|
/obj/item/clothing/head/costume/drfreezehat = 1,
|
|
))
|
|
|
|
GLOBAL_LIST_INIT(autodrobe_contraband_items, list(
|
|
/obj/item/clothing/glasses/blindfold = 1,
|
|
/obj/item/clothing/glasses/sunglasses/gar = 2,
|
|
/obj/item/clothing/head/costume/powdered_wig = 1,
|
|
/obj/item/clothing/head/costume/tv_head = 1,
|
|
/obj/item/clothing/mask/muzzle = 2,
|
|
/obj/item/clothing/shoes/clown_shoes/meown_shoes = 1,
|
|
/obj/item/clothing/shoes/clown_shoes/moffers = 1,
|
|
/obj/item/clothing/shoes/ducky_shoes = 1,
|
|
/obj/item/clothing/suit/costume/judgerobe = 1,
|
|
/obj/item/clothing/head/costume/lobsterhat = 1,
|
|
/obj/item/clothing/under/costume/lobster = 1,
|
|
/obj/item/gun/magic/wand/nothing = 2,
|
|
/obj/item/skillchip/musical = 3,
|
|
/obj/item/storage/box/tape_wizard = 1,
|
|
))
|
|
|
|
GLOBAL_VAR_INIT(all_autodrobe_items, (autodrobe_costumes_items +\
|
|
autodrobe_costumes_items +\
|
|
autodrobe_supernatural_items +\
|
|
autodrobe_entretainers_items +\
|
|
autodrobe_fancy_items +\
|
|
autodrobe_animal_items +\
|
|
autodrobe_service_items +\
|
|
autodrobe_other_items +\
|
|
autodrobe_premium_items +\
|
|
autodrobe_contraband_items \
|
|
))
|
|
|
|
/obj/machinery/vending/autodrobe
|
|
name = "\improper AutoDrobe"
|
|
desc = "A vending machine for costumes."
|
|
icon_state = "theater"
|
|
icon_deny = "theater-deny"
|
|
panel_type = "panel16"
|
|
product_slogans = "Dress for success!;Suited and booted!;It's show time!;Why leave style up to fate? Use AutoDrobe!"
|
|
vend_reply = "Thank you for using AutoDrobe!"
|
|
|
|
/**
|
|
* Categories are filled in Initialize!
|
|
*/
|
|
|
|
refill_canister = /obj/item/vending_refill/autodrobe
|
|
default_price = PAYCHECK_CREW * 0.8 //Default of 40.
|
|
extra_price = PAYCHECK_COMMAND
|
|
payment_department = ACCOUNT_SRV
|
|
light_mask = "theater-light-mask"
|
|
allow_custom = TRUE
|
|
|
|
/obj/machinery/vending/autodrobe/Initialize(mapload)
|
|
product_categories = list(
|
|
list(
|
|
"name" = "Costumes",
|
|
"icon" = "mask",
|
|
"products" = GLOB.autodrobe_costumes_items
|
|
),
|
|
list(
|
|
"name" = "Supernatural",
|
|
"icon" = "hand-sparkles",
|
|
"products" = GLOB.autodrobe_supernatural_items
|
|
),
|
|
list(
|
|
"name" = "Entertainers",
|
|
"icon" = "masks-theater",
|
|
"products" = GLOB.autodrobe_entretainers_items
|
|
),
|
|
list(
|
|
"name" = "Fancy",
|
|
"icon" = "user-tie",
|
|
"products" = GLOB.autodrobe_fancy_items
|
|
),
|
|
list(
|
|
"name" = "Animals",
|
|
"icon" = "paw",
|
|
"products" = GLOB.autodrobe_animal_items
|
|
),
|
|
list(
|
|
"name" = "Service",
|
|
"icon" = "kitchen-set",
|
|
"products" = GLOB.autodrobe_service_items
|
|
),
|
|
list(
|
|
"name" = "Other",
|
|
"icon" = "star",
|
|
"products" = GLOB.autodrobe_other_items
|
|
),
|
|
)
|
|
premium = GLOB.autodrobe_premium_items
|
|
contraband = GLOB.autodrobe_contraband_items
|
|
|
|
. = ..()
|
|
|
|
/obj/item/vending_refill/autodrobe
|
|
machine_name = "AutoDrobe"
|
|
icon_state = "refill_costume"
|