Seedbags now put their ouputing seeds into your hand

Added "Unload All" button to interface
This commit is contained in:
GauHelldragon
2013-01-02 11:27:51 -08:00
parent b1dd8f50f3
commit 3d12d0b234

View File

@@ -52,7 +52,7 @@
flags = FPRINT | TABLEPASS
slot_flags = SLOT_BELT
w_class = 1
var/item_quants = list()
var/list/item_quants = list()
/obj/item/weapon/seedbag/attack_self(mob/user as mob)
user.machine = src
@@ -114,6 +114,7 @@
dat += "<a href='byond://?src=\ref[src];vend=[O]'>Vend</A>"
dat += "<br>"
dat += "<br><a href='byond://?src=\ref[src];unload=1'>Unload All</A>"
dat += "</TT>"
user << browse("<HEAD><TITLE>Seedbag Supplies</TITLE></HEAD><TT>[dat]</TT>", "window=seedbag")
onclose(user, "seedbag")
@@ -123,7 +124,7 @@
return
usr.machine = src
if ( href_list["vend"] )
var/N = href_list["vend"]
if(item_quants[N] <= 0) // Sanity check, there are probably ways to press the button when it shouldn't be possible.
@@ -133,7 +134,14 @@
for(var/obj/O in contents)
if(O.name == N)
O.loc = get_turf(src)
usr.put_in_hands(O)
break
else if ( href_list["unload"] )
item_quants.Cut()
for(var/obj/O in contents )
O.loc = get_turf(src)
src.updateUsrDialog()
return