mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 21:18:37 +01:00
Vending machines respects all_products_free (#92665)
## About The Pull Request - Fixes #92657
This commit is contained in:
+3
-2
@@ -396,11 +396,12 @@
|
||||
|
||||
/obj/machinery/vending/vv_edit_var(vname, vval)
|
||||
. = ..()
|
||||
if (vname == NAMEOF(src, all_products_free))
|
||||
if(vname == NAMEOF(src, all_products_free))
|
||||
if (all_products_free)
|
||||
RemoveComponentSource(src, /datum/component/payment)
|
||||
qdel(GetComponent(/datum/component/payment))
|
||||
else
|
||||
AddComponent(/datum/component/payment, 0, SSeconomy.get_dep_account(payment_department), PAYMENT_VENDING)
|
||||
update_static_data_for_all_viewers()
|
||||
|
||||
/obj/machinery/vending/emp_act(severity)
|
||||
. = ..()
|
||||
|
||||
+1
-1
@@ -161,7 +161,7 @@
|
||||
speak("Sold out of [item_record.name].")
|
||||
flick(icon_deny, src)
|
||||
return
|
||||
if(onstation)
|
||||
if(!all_products_free)
|
||||
// Here we do additional handing ahead of the payment component's logic, such as age restrictions and additional logging
|
||||
var/obj/item/card/id/card_used
|
||||
var/mob/living/living_user
|
||||
|
||||
-1
@@ -12,7 +12,6 @@
|
||||
ui = new(user, src, "Vending", name)
|
||||
ui.open()
|
||||
|
||||
|
||||
/**
|
||||
* Returns a list of given product records of the vendor to be used in UI.
|
||||
* arguments:
|
||||
|
||||
Reference in New Issue
Block a user