fixes pumps and reverts this small vending change

This commit is contained in:
Letter N
2020-08-07 16:12:44 +08:00
parent 5b63f0acce
commit 9eb7aaa2d1
2 changed files with 10 additions and 7 deletions
@@ -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()
+7 -3
View File
@@ -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("<span class='danger'>[C]'s legs shatter with a sickening crunch!</span>", \
"<span class='userdanger'>Your legs shatter with a sickening crunch!</span>")
@@ -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, "<span class='notice'>You take [R.name] out of the slot.</span>")
else
to_chat(usr, "<span class='warning'>[capitalize(R.name)] falls onto the floor!</span>")
SSblackbox.record_feedback("nested tally", "vending_machine_usage", 1, list("[type]", "[R.product_path]"))
vend_ready = TRUE