From 9eb7aaa2d1894aa436441dcd5d80291a1915c43f Mon Sep 17 00:00:00 2001 From: Letter N <24603524+LetterN@users.noreply.github.com> Date: Fri, 7 Aug 2020 16:12:44 +0800 Subject: [PATCH] fixes pumps and reverts this small vending change --- .../machinery/components/binary_devices/volume_pump.dm | 7 +++---- code/modules/vending/_vending.dm | 10 +++++++--- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/code/modules/atmospherics/machinery/components/binary_devices/volume_pump.dm b/code/modules/atmospherics/machinery/components/binary_devices/volume_pump.dm index d95e4ec123..1b049322a1 100644 --- a/code/modules/atmospherics/machinery/components/binary_devices/volume_pump.dm +++ b/code/modules/atmospherics/machinery/components/binary_devices/volume_pump.dm @@ -92,11 +92,10 @@ )) radio_connection.post_signal(src, signal) -/obj/machinery/atmospherics/components/binary/volume_pump/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \ - datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state) - ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open) +/obj/machinery/atmospherics/components/binary/volume_pump/ui_interact(mob/user, datum/tgui/ui) + ui = SStgui.try_update_ui(user, src, ui) if(!ui) - ui = new(user, src, ui_key, "AtmosPump", name, 310, 115, master_ui, state) + ui = new(user, src, "AtmosPump", name) ui.open() /obj/machinery/atmospherics/components/binary/volume_pump/ui_data() diff --git a/code/modules/vending/_vending.dm b/code/modules/vending/_vending.dm index 219f1daf78..461aacc74d 100644 --- a/code/modules/vending/_vending.dm +++ b/code/modules/vending/_vending.dm @@ -501,10 +501,10 @@ GLOBAL_LIST_EMPTY(vending_products) C.bleed(150) var/obj/item/bodypart/l_leg/l = C.get_bodypart(BODY_ZONE_L_LEG) if(l) - l.receive_damage(brute=200) + l.receive_damage(brute=200, updating_health=TRUE) var/obj/item/bodypart/r_leg/r = C.get_bodypart(BODY_ZONE_R_LEG) if(r) - r.receive_damage(brute=200) + r.receive_damage(brute=200, updating_health=TRUE) if(l || r) C.visible_message("[C]'s legs shatter with a sickening crunch!", \ "Your legs shatter with a sickening crunch!") @@ -824,8 +824,12 @@ GLOBAL_LIST_EMPTY(vending_products) if(icon_vend) //Show the vending animation if needed flick(icon_vend,src) playsound(src, 'sound/machines/machine_vend.ogg', 50, TRUE, extrarange = -3) - new R.product_path(get_turf(src)) + var/obj/item/vended = new R.product_path(get_turf(src)) R.amount-- + if(usr.CanReach(src) && usr.put_in_hands(vended)) + to_chat(usr, "You take [R.name] out of the slot.") + else + to_chat(usr, "[capitalize(R.name)] falls onto the floor!") SSblackbox.record_feedback("nested tally", "vending_machine_usage", 1, list("[type]", "[R.product_path]")) vend_ready = TRUE