From c9c70bbed062aaa1d8849d1f33399a188c9d81da Mon Sep 17 00:00:00 2001 From: Sparky Date: Tue, 11 Jun 2024 09:45:33 +0100 Subject: [PATCH] Barista QoL Expansion (#19395) Adds the ability to use pens to write names and orders on takeaway cups. Allows you to click on syrup dispensers with a cup to dispense the syrup, rather than having to pick them up. Moves the chemical heater from the bar backroom to the front, so bartenders don't need to walk away and come back every time they need to make steamed milk. --- code/__DEFINES/flags.dm | 2 ++ code/modules/reagents/reagent_containers.dm | 5 +++- .../reagent_containers/food/drinks.dm | 20 ++++++++++++++++ .../reagent_containers/glass/bottle.dm | 2 +- html/changelogs/barista-expansion.yml | 8 +++++++ maps/sccv_horizon/sccv_horizon-2_deck_2.dmm | 23 +++++++++---------- 6 files changed, 46 insertions(+), 14 deletions(-) create mode 100644 html/changelogs/barista-expansion.yml diff --git a/code/__DEFINES/flags.dm b/code/__DEFINES/flags.dm index 399c334dab4..cc3757691a8 100644 --- a/code/__DEFINES/flags.dm +++ b/code/__DEFINES/flags.dm @@ -51,6 +51,8 @@ var/list/mimic_defines = list( #define ATOM_FLAG_HTML_USE_INITIAL_ICON FLAG(6) /// If a dense atom like a platform does not allow movement through it like a window pane BUT allows pickup. #define ATOM_FLAG_ALWAYS_ALLOW_PICKUP FLAG(7) +/// A reagent container that can dispense when being attacked by another container. +#define ATOM_FLAG_DISPENSER FLAG(8) #define ATOM_AWAITING_OVERLAY_UPDATE FLAG(10) diff --git a/code/modules/reagents/reagent_containers.dm b/code/modules/reagents/reagent_containers.dm index c41223370dc..9e22ad1a883 100644 --- a/code/modules/reagents/reagent_containers.dm +++ b/code/modules/reagents/reagent_containers.dm @@ -327,7 +327,10 @@ return 0 // Ensure we don't splash beakers and similar containers. - if(!target.is_open_container() && istype(target, /obj/item/reagent_containers)) + if(!target.is_open_container()) + if(target.atom_flags & ATOM_FLAG_DISPENSER && istype(target, /obj/item/reagent_containers)) + var/obj/item/reagent_containers/dispenser = target + return dispenser.standard_pour_into(user, src) to_chat(user, SPAN_NOTICE("\The [target] is closed.")) return 1 // Otherwise don't care about splashing. diff --git a/code/modules/reagents/reagent_containers/food/drinks.dm b/code/modules/reagents/reagent_containers/food/drinks.dm index bc2c3642439..33ee44a35d1 100644 --- a/code/modules/reagents/reagent_containers/food/drinks.dm +++ b/code/modules/reagents/reagent_containers/food/drinks.dm @@ -299,6 +299,26 @@ If you add a drink with an empty icon sprite, ensure it is in the same folder, e pickup_sound = 'sound/items/pickup/papercup.ogg' possible_transfer_amounts = null volume = 30 + /** + * Details written on the cup, a la IRL coffee places + */ + var/list/details = list("Customer" = null, "Order" = null) + +/obj/item/reagent_containers/food/drinks/takeaway_cup_idris/attackby(obj/item/attacking_item, mob/user) + if(attacking_item.ispen() && !use_check_and_message(user)) + var/choice = tgui_input_list(user, "Which detail do you want to edit?", "Detail Editor", list("Customer", "Order")) + switch(choice) + if("Customer") + details["Customer"] = sanitize(tgui_input_text(user, "What is the customer's name?", "Enter Customer Name")) + if("Order") + details["Order"] = sanitize(tgui_input_text(user, "What is the ordered drink?", "Enter Ordered Drink")) + return + return ..() + +/obj/item/reagent_containers/food/drinks/takeaway_cup_idris/get_examine_text(mob/user, distance, is_adjacent, infix, suffix, get_extended) + . = ..() + . += "Order: [details["Order"]]" + . += "For: [details["Customer"]]" //////////////////////////drinkingglass and shaker// //Note by Darem: This code handles the mixing of drinks. New drinks go in three places: In Chemistry-Reagents.dm (for the drink diff --git a/code/modules/reagents/reagent_containers/glass/bottle.dm b/code/modules/reagents/reagent_containers/glass/bottle.dm index cd5bd886da1..cecc4f94059 100644 --- a/code/modules/reagents/reagent_containers/glass/bottle.dm +++ b/code/modules/reagents/reagent_containers/glass/bottle.dm @@ -245,7 +245,7 @@ desc = "A small bottle dispenser." icon_state = "syrup" filling_states = "20;40;60;80;100" - atom_flags = ATOM_FLAG_POUR_CONTAINER + atom_flags = ATOM_FLAG_POUR_CONTAINER | ATOM_FLAG_DISPENSER volume = 50 /obj/item/reagent_containers/glass/bottle/syrup/chocolate diff --git a/html/changelogs/barista-expansion.yml b/html/changelogs/barista-expansion.yml new file mode 100644 index 00000000000..4e32e336e23 --- /dev/null +++ b/html/changelogs/barista-expansion.yml @@ -0,0 +1,8 @@ +author: Sparky_hotdog + +delete-after: True + +changes: + - rscadd: "You can now use pens to add customer names and their orders to takeaway cups." + - qol: "Moved the chemical heater to the front of the bar." + - qol: "You can now use reagent containers on closed syrup dispensers to dispense syrup into the container without picking up the syrup." diff --git a/maps/sccv_horizon/sccv_horizon-2_deck_2.dmm b/maps/sccv_horizon/sccv_horizon-2_deck_2.dmm index 354cb30b7da..10002cec7a3 100644 --- a/maps/sccv_horizon/sccv_horizon-2_deck_2.dmm +++ b/maps/sccv_horizon/sccv_horizon-2_deck_2.dmm @@ -254,12 +254,12 @@ /turf/simulated/floor/tiled, /area/horizon/hallway/deck_two/fore) "aec" = ( -/obj/effect/floor_decal/corner/grey{ - dir = 10 - }, /obj/machinery/atmospherics/unary/vent_pump/on{ dir = 1 }, +/obj/effect/floor_decal/corner/grey{ + dir = 8 + }, /turf/simulated/floor/lino, /area/horizon/bar) "aem" = ( @@ -14870,7 +14870,7 @@ /obj/effect/floor_decal/spline/fancy/wood{ dir = 4 }, -/obj/machinery/vending/dinnerware/bar, +/obj/machinery/chem_heater, /turf/simulated/floor/wood, /area/horizon/bar) "gHV" = ( @@ -30279,6 +30279,9 @@ pixel_x = 9; pixel_y = 4 }, +/obj/machinery/vending/dinnerware/bar{ + pixel_y = 16 + }, /turf/simulated/floor/tiled/dark, /area/horizon/bar) "nUN" = ( @@ -47307,12 +47310,7 @@ /obj/effect/floor_decal/corner/grey{ dir = 6 }, -/obj/machinery/chem_master/condimaster, -/obj/effect/floor_decal/corner/grey{ - dir = 10 - }, -/obj/effect/floor_decal/industrial/hatch/grey, -/turf/simulated/floor/tiled/dark/full, +/turf/simulated/floor/lino, /area/horizon/bar) "vUK" = ( /obj/structure/bed/stool/chair/office/light{ @@ -51562,8 +51560,9 @@ /turf/simulated/floor/carpet/rubber, /area/rnd/xenobiology/dissection) "xPY" = ( -/obj/machinery/chem_heater, /obj/effect/floor_decal/industrial/hatch/grey, +/obj/machinery/chem_master/condimaster, +/obj/effect/floor_decal/corner/grey/full, /turf/simulated/floor/tiled/dark/full, /area/horizon/bar) "xQj" = ( @@ -71853,8 +71852,8 @@ uZh nxI uws bKX -exU vUm +exU sKJ gHV uTY