mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-14 04:02:31 +00:00
Seedbags now put their ouputing seeds into your hand
Added "Unload All" button to interface
This commit is contained in:
@@ -52,7 +52,7 @@
|
|||||||
flags = FPRINT | TABLEPASS
|
flags = FPRINT | TABLEPASS
|
||||||
slot_flags = SLOT_BELT
|
slot_flags = SLOT_BELT
|
||||||
w_class = 1
|
w_class = 1
|
||||||
var/item_quants = list()
|
var/list/item_quants = list()
|
||||||
|
|
||||||
/obj/item/weapon/seedbag/attack_self(mob/user as mob)
|
/obj/item/weapon/seedbag/attack_self(mob/user as mob)
|
||||||
user.machine = src
|
user.machine = src
|
||||||
@@ -114,6 +114,7 @@
|
|||||||
dat += "<a href='byond://?src=\ref[src];vend=[O]'>Vend</A>"
|
dat += "<a href='byond://?src=\ref[src];vend=[O]'>Vend</A>"
|
||||||
dat += "<br>"
|
dat += "<br>"
|
||||||
|
|
||||||
|
dat += "<br><a href='byond://?src=\ref[src];unload=1'>Unload All</A>"
|
||||||
dat += "</TT>"
|
dat += "</TT>"
|
||||||
user << browse("<HEAD><TITLE>Seedbag Supplies</TITLE></HEAD><TT>[dat]</TT>", "window=seedbag")
|
user << browse("<HEAD><TITLE>Seedbag Supplies</TITLE></HEAD><TT>[dat]</TT>", "window=seedbag")
|
||||||
onclose(user, "seedbag")
|
onclose(user, "seedbag")
|
||||||
@@ -123,7 +124,7 @@
|
|||||||
return
|
return
|
||||||
|
|
||||||
usr.machine = src
|
usr.machine = src
|
||||||
|
if ( href_list["vend"] )
|
||||||
var/N = 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.
|
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)
|
for(var/obj/O in contents)
|
||||||
if(O.name == N)
|
if(O.name == N)
|
||||||
O.loc = get_turf(src)
|
O.loc = get_turf(src)
|
||||||
|
usr.put_in_hands(O)
|
||||||
break
|
break
|
||||||
|
|
||||||
|
else if ( href_list["unload"] )
|
||||||
|
item_quants.Cut()
|
||||||
|
for(var/obj/O in contents )
|
||||||
|
O.loc = get_turf(src)
|
||||||
|
|
||||||
src.updateUsrDialog()
|
src.updateUsrDialog()
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user