mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-30 07:27:57 +01:00
Vending machines can now be refilled
This commit is contained in:
@@ -169,6 +169,13 @@
|
||||
usr << "\icon[src]<span class='warning'>Unable to connect to linked account.</span>"
|
||||
else
|
||||
usr << "\icon[src]<span class='warning'>Unable to connect to accounts database.</span>"
|
||||
else if(src.panel_open)
|
||||
for(var/datum/data/vending_product/R in product_records)
|
||||
if(istype(W, R.product_path))
|
||||
stock(R, user)
|
||||
del(W)
|
||||
|
||||
|
||||
else
|
||||
..()
|
||||
|
||||
@@ -428,6 +435,14 @@
|
||||
|
||||
src.updateUsrDialog()
|
||||
|
||||
|
||||
/obj/machinery/vending/proc/stock(var/datum/data/vending_product/R, var/mob/user)
|
||||
if(src.panel_open)
|
||||
user << "\blue You stock the [src] with \a [R.product_name]"
|
||||
R.amount++
|
||||
src.updateUsrDialog()
|
||||
|
||||
|
||||
/obj/machinery/vending/process()
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user