From 93b2b8ba4ff559a4212f9d19df64cc2d82a0e319 Mon Sep 17 00:00:00 2001 From: Unknown Date: Wed, 13 Feb 2019 17:28:24 -0600 Subject: [PATCH] Reworks Booze/Soda Dispensers slightly --- code/datums/supplypacks.dm | 9 ++ code/game/machinery/constructable_frame.dm | 24 ++++ .../chemistry/machinery/chem_dispenser.dm | 133 ++++++++++++++++++ .../reagents/chemistry/reagents/drinks.dm | 2 +- 4 files changed, 167 insertions(+), 1 deletion(-) diff --git a/code/datums/supplypacks.dm b/code/datums/supplypacks.dm index 9c42d7c30dc..ce745e19e02 100644 --- a/code/datums/supplypacks.dm +++ b/code/datums/supplypacks.dm @@ -1034,6 +1034,15 @@ var/list/all_supply_groups = list(supply_emergency,supply_security,supply_engine containername = "party equipment" announce_beacons = list("Bar" = list("Bar")) +/datum/supply_packs/organic/bar + name = "Bar Starter Kit" + contains = list(/obj/item/storage/box/drinkingglasses, + /obj/item/circuitboard/soda, + /obj/item/circuitboard/beer) + cost = 20 + containername = "beer starter kit" + announce_beacons = list("Bar" = list("Bar")) + //////// livestock /datum/supply_packs/organic/cow name = "Cow Crate" diff --git a/code/game/machinery/constructable_frame.dm b/code/game/machinery/constructable_frame.dm index 01a30cdbee7..ece6615b786 100644 --- a/code/game/machinery/constructable_frame.dm +++ b/code/game/machinery/constructable_frame.dm @@ -617,6 +617,30 @@ to destroy them and players will be able to make replacements. /obj/item/stock_parts/manipulator = 2, /obj/item/reagent_containers/glass/beaker = 2) +/obj/item/circuitboard/soda + name = "Circuit board (Soda Machine)" + build_path = /obj/machinery/chem_dispenser/soda + board_type = "machine" + frame_desc = "Requires 2 Matter Bins, 1 Manipulators, 1 Capacitor, 1 Console Screen, and 1 Power Cell." + req_components = list( + /obj/item/stock_parts/matter_bin = 2, + /obj/item/stock_parts/manipulator = 1, + /obj/item/stock_parts/capacitor = 1, + /obj/item/stock_parts/console_screen = 1, + /obj/item/stock_parts/cell = 1) + +/obj/item/circuitboard/beer + name = "Circuit board (Beer Machine)" + build_path = /obj/machinery/chem_dispenser/beer + board_type = "machine" + frame_desc = "Requires 2 Matter Bins, 1 Manipulators, 1 Capacitor, 1 Console Screen, and 1 Power Cell." + req_components = list( + /obj/item/stock_parts/matter_bin = 2, + /obj/item/stock_parts/manipulator = 1, + /obj/item/stock_parts/capacitor = 1, + /obj/item/stock_parts/console_screen = 1, + /obj/item/stock_parts/cell = 1) + /obj/item/circuitboard/circuit_imprinter name = "Circuit board (Circuit Imprinter)" diff --git a/code/modules/reagents/chemistry/machinery/chem_dispenser.dm b/code/modules/reagents/chemistry/machinery/chem_dispenser.dm index c838c5469c7..9d2fca75fc5 100644 --- a/code/modules/reagents/chemistry/machinery/chem_dispenser.dm +++ b/code/modules/reagents/chemistry/machinery/chem_dispenser.dm @@ -264,10 +264,77 @@ dispensable_reagents = list("water", "ice", "milk", "soymilk", "coffee", "tea", "hot_coco", "cola", "spacemountainwind", "dr_gibb", "space_up", "tonic", "sodawater", "lemon_lime", "grapejuice", "sugar", "orangejuice", "lemonjuice", "limejuice", "tomatojuice", "banana", "watermelonjuice", "carrotjuice", "potato", "berryjuice") + /var/list/special_reagents2 = list(list(""), + list("bananahonk", "milkshake", "cafe_latte", "cafe_mocha"), + list("triple_citrus", "icecoffe","icetea")) hack_message = "You change the mode from 'McNano' to 'Pizza King'." unhack_message = "You change the mode from 'Pizza King' to 'McNano'." hacked_reagents = list("thirteenloko") +/obj/machinery/chem_dispenser/soda/New() + ..() + component_parts = list() + component_parts += new /obj/item/circuitboard/soda(null) + component_parts += new /obj/item/stock_parts/matter_bin(null) + component_parts += new /obj/item/stock_parts/matter_bin(null) + component_parts += new /obj/item/stock_parts/manipulator(null) + component_parts += new /obj/item/stock_parts/capacitor(null) + component_parts += new /obj/item/stock_parts/console_screen(null) + component_parts += new /obj/item/stock_parts/cell/super(null) + RefreshParts() + +/obj/machinery/chem_dispenser/soda/upgraded/New() + ..() + component_parts = list() + component_parts += new /obj/item/circuitboard/soda(null) + component_parts += new /obj/item/stock_parts/matter_bin/super(null) + component_parts += new /obj/item/stock_parts/matter_bin/super(null) + component_parts += new /obj/item/stock_parts/manipulator/pico(null) + component_parts += new /obj/item/stock_parts/capacitor/super(null) + component_parts += new /obj/item/stock_parts/console_screen(null) + component_parts += new /obj/item/stock_parts/cell/hyper(null) + RefreshParts() + +/obj/machinery/chem_dispenser/soda/RefreshParts() + var/i + for(var/obj/item/stock_parts/manipulator/M in component_parts) + for(i=1, i<=M.rating, i++) + dispensable_reagents = sortList(dispensable_reagents | special_reagents2[i]) + +/obj/machinery/chem_dispenser/soda/attackby(obj/item/I, mob/user, params) + if(istype(I, /obj/item/reagent_containers/glass)) + if(panel_open) + to_chat(user, "Close the maintenance panel first.") + return + ..() + else + ..() + + if(default_deconstruction_screwdriver(user, "minidispenser-o", "minidispenser", I)) + return + + if(exchange_parts(user, I)) + return + + if(istype(I, /obj/item/wrench)) + playsound(src, I.usesound, 50, 1) + if(anchored) + anchored = 0 + to_chat(user, "[src] can now be moved.") + else if(!anchored) + anchored = 1 + to_chat(user, "[src] is now secured.") + + if(panel_open) + if(istype(I, /obj/item/crowbar)) + if(beaker) + var/obj/item/reagent_containers/glass/B = beaker + B.forceMove(loc) + beaker = null + default_deconstruction_crowbar(I) + return 1 + + /obj/machinery/chem_dispenser/beer icon_state = "booze_dispenser" name = "booze dispenser" @@ -276,10 +343,76 @@ max_energy = 100 desc = "A technological marvel, supposedly able to mix just the mixture you'd like to drink the moment you ask for one." dispensable_reagents = list("ice", "cream", "cider", "beer", "kahlua", "whiskey", "wine", "vodka", "gin", "rum", "tequila", "vermouth", "cognac", "ale", "mead", "synthanol") + /var/list/special_reagents3 = list(list("iced_beer"), + list("irish_cream", "manhattan",), + list("antihol", "synthignon", "bravebull")) hack_message = "You disable the 'nanotrasen-are-cheap-bastards' lock, enabling hidden and very expensive boozes." unhack_message = "You re-enable the 'nanotrasen-are-cheap-bastards' lock, disabling hidden and very expensive boozes." hacked_reagents = list("goldschlager", "patron", "absinthe", "ethanol", "nothing", "sake") +/obj/machinery/chem_dispenser/beer/New() + ..() + component_parts = list() + component_parts += new /obj/item/circuitboard/beer(null) + component_parts += new /obj/item/stock_parts/matter_bin(null) + component_parts += new /obj/item/stock_parts/matter_bin(null) + component_parts += new /obj/item/stock_parts/manipulator(null) + component_parts += new /obj/item/stock_parts/capacitor(null) + component_parts += new /obj/item/stock_parts/console_screen(null) + component_parts += new /obj/item/stock_parts/cell/super(null) + RefreshParts() + +/obj/machinery/chem_dispenser/beer/upgraded/New() + ..() + component_parts = list() + component_parts += new /obj/item/circuitboard/beer(null) + component_parts += new /obj/item/stock_parts/matter_bin/super(null) + component_parts += new /obj/item/stock_parts/matter_bin/super(null) + component_parts += new /obj/item/stock_parts/manipulator/pico(null) + component_parts += new /obj/item/stock_parts/capacitor/super(null) + component_parts += new /obj/item/stock_parts/console_screen(null) + component_parts += new /obj/item/stock_parts/cell/hyper(null) + RefreshParts() + +/obj/machinery/chem_dispenser/beer/RefreshParts() + var/i + for(var/obj/item/stock_parts/manipulator/M in component_parts) + for(i=1, i<=M.rating, i++) + dispensable_reagents = sortList(dispensable_reagents | special_reagents3[i]) + +/obj/machinery/chem_dispenser/beer/attackby(obj/item/I, mob/user, params) + if(istype(I, /obj/item/reagent_containers/glass)) + if(panel_open) + to_chat(user, "Close the maintenance panel first.") + return + ..() + else + ..() + + if(default_deconstruction_screwdriver(user, "minidispenser-o", "minidispenser", I)) + return + + if(exchange_parts(user, I)) + return + + if(istype(I, /obj/item/wrench)) + playsound(src, I.usesound, 50, 1) + if(anchored) + anchored = 0 + to_chat(user, "[src] can now be moved.") + else if(!anchored) + anchored = 1 + to_chat(user, "[src] is now secured.") + + if(panel_open) + if(istype(I, /obj/item/crowbar)) + if(beaker) + var/obj/item/reagent_containers/glass/B = beaker + B.forceMove(loc) + beaker = null + default_deconstruction_crowbar(I) + return 1 + ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/code/modules/reagents/chemistry/reagents/drinks.dm b/code/modules/reagents/chemistry/reagents/drinks.dm index be5e71d53bd..85205384504 100644 --- a/code/modules/reagents/chemistry/reagents/drinks.dm +++ b/code/modules/reagents/chemistry/reagents/drinks.dm @@ -387,7 +387,7 @@ drink_desc = "No relation to a certain rap artist/ actor." /datum/reagent/consumable/drink/bananahonk - name = "Banana Mama" + name = "Banana Honk" id = "bananahonk" description = "A drink from Clown Heaven." color = "#664300" // rgb: 102, 67, 0