From f4fd53a4fad49bf98d890bcf55bb97d9fb41e6b7 Mon Sep 17 00:00:00 2001 From: SabreML <57483089+SabreML@users.noreply.github.com> Date: Mon, 25 Dec 2023 21:03:01 +0000 Subject: [PATCH 1/2] The fix --- code/game/machinery/vending/vendor_types/food.dm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/code/game/machinery/vending/vendor_types/food.dm b/code/game/machinery/vending/vendor_types/food.dm index 51749ab2a010..10e1a035cb0b 100644 --- a/code/game/machinery/vending/vendor_types/food.dm +++ b/code/game/machinery/vending/vendor_types/food.dm @@ -38,8 +38,8 @@ unslashable = FALSE wrenchable = TRUE -/obj/structure/machinery/cm_vending/sorted/boozeomat/get_listed_products(mob/user) - return list( +/obj/structure/machinery/cm_vending/sorted/boozeomat/populate_product_list(scale) + listed_products = list( list("ALCOHOL", -1, null, null), list("Ale", 6, /obj/item/reagent_container/food/drinks/cans/ale, VENDOR_ITEM_REGULAR), list("Beer", 6, /obj/item/reagent_container/food/drinks/cans/beer, VENDOR_ITEM_REGULAR), @@ -97,8 +97,8 @@ unslashable = FALSE wrenchable = TRUE -/obj/structure/machinery/cm_vending/sorted/boozeomat/chess/get_listed_products(mob/user) - return list( +/obj/structure/machinery/cm_vending/sorted/boozeomat/chess/populate_product_list(scale) + listed_products = list( list("White Pieces", -1, null, null), list("Pawn", 2, /obj/item/reagent_container/food/drinks/bottle/vodka/chess/w_pawn, VENDOR_ITEM_REGULAR), list("Bishop", 2, /obj/item/reagent_container/food/drinks/bottle/vodka/chess/w_bishop, VENDOR_ITEM_REGULAR), From 365dafb0de91c82ed627cc7ab325532ad8ba815d Mon Sep 17 00:00:00 2001 From: SabreML <57483089+SabreML@users.noreply.github.com> Date: Mon, 25 Dec 2023 21:04:17 +0000 Subject: [PATCH 2/2] Plus this too because it's inconsistent As far as I can tell this vendor is the only one which creates its contents list every time in `get_listed_products()`, rather than referencing a global list. --- .../vending/vendor_types/crew/synthetic.dm | 26 ++++++++++--------- 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/code/game/machinery/vending/vendor_types/crew/synthetic.dm b/code/game/machinery/vending/vendor_types/crew/synthetic.dm index ecef3ed622d9..2395d572bad7 100644 --- a/code/game/machinery/vending/vendor_types/crew/synthetic.dm +++ b/code/game/machinery/vending/vendor_types/crew/synthetic.dm @@ -345,18 +345,20 @@ GLOBAL_LIST_INIT(cm_vending_clothing_synth_snowflake, list( return ..() /obj/structure/machinery/cm_vending/own_points/experimental_tools/get_listed_products(mob/user) - return list( - list("Autocompressor", 15, /obj/item/clothing/suit/auto_cpr, null, VENDOR_ITEM_REGULAR), - list("Backpack Firefighting Watertank", 15, /obj/item/reagent_container/glass/watertank/atmos, null, VENDOR_ITEM_REGULAR), - list("Breaching Hammer", 15, /obj/item/weapon/twohanded/breacher/synth, null, VENDOR_ITEM_REGULAR), - list("Compact Defibrillator", 15, /obj/item/device/defibrillator/compact, null, VENDOR_ITEM_REGULAR), - list("Compact Nailgun kit", 15, /obj/effect/essentials_set/cnailgun, null, VENDOR_ITEM_REGULAR), - list("Crew Monitor", 15, /obj/item/tool/crew_monitor, null, VENDOR_ITEM_REGULAR), - list("Experimental Meson Goggles", 15, /obj/item/clothing/glasses/night/experimental_mesons, null, VENDOR_ITEM_REGULAR), - list("Maintenance Jack", 15, /obj/item/maintenance_jack, null, VENDOR_ITEM_REGULAR), - list("Portable Dialysis Machine", 15, /obj/item/tool/portadialysis, null, VENDOR_ITEM_REGULAR), - list("Telescopic Baton", 15, /obj/item/weapon/telebaton, null, VENDOR_ITEM_REGULAR), - ) + return GLOB.cm_vending_synth_tools + +GLOBAL_LIST_INIT(cm_vending_synth_tools, list( + list("Autocompressor", 15, /obj/item/clothing/suit/auto_cpr, null, VENDOR_ITEM_REGULAR), + list("Backpack Firefighting Watertank", 15, /obj/item/reagent_container/glass/watertank/atmos, null, VENDOR_ITEM_REGULAR), + list("Breaching Hammer", 15, /obj/item/weapon/twohanded/breacher/synth, null, VENDOR_ITEM_REGULAR), + list("Compact Defibrillator", 15, /obj/item/device/defibrillator/compact, null, VENDOR_ITEM_REGULAR), + list("Compact Nailgun kit", 15, /obj/effect/essentials_set/cnailgun, null, VENDOR_ITEM_REGULAR), + list("Crew Monitor", 15, /obj/item/tool/crew_monitor, null, VENDOR_ITEM_REGULAR), + list("Experimental Meson Goggles", 15, /obj/item/clothing/glasses/night/experimental_mesons, null, VENDOR_ITEM_REGULAR), + list("Maintenance Jack", 15, /obj/item/maintenance_jack, null, VENDOR_ITEM_REGULAR), + list("Portable Dialysis Machine", 15, /obj/item/tool/portadialysis, null, VENDOR_ITEM_REGULAR), + list("Telescopic Baton", 15, /obj/item/weapon/telebaton, null, VENDOR_ITEM_REGULAR), +)) //------------EXPERIMENTAL TOOL KITS--------------- /obj/effect/essentials_set/cnailgun