From 522e5c888d2ff5ed8730236da129f187422c6199 Mon Sep 17 00:00:00 2001 From: ZomgPonies Date: Mon, 28 Oct 2013 06:05:54 -0400 Subject: [PATCH] Vending machine refilling --- code/game/machinery/vending.dm | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/code/game/machinery/vending.dm b/code/game/machinery/vending.dm index 95b05cef6f5..9752fd56dfb 100644 --- a/code/game/machinery/vending.dm +++ b/code/game/machinery/vending.dm @@ -157,6 +157,13 @@ coin = W user << "\blue You insert the [W] into the [src]" return + + 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 if(istype(W, /obj/item/weapon/card) && currently_vending) //attempt to connect to a new db, and if that doesn't work then fail if(!linked_db) @@ -169,11 +176,7 @@ usr << "\icon[src]Unable to connect to linked account." else usr << "\icon[src]Unable to connect to accounts database." - 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