mob/verb/Inventory()
src.client.screen = null //Clear the inventory before generating everything inside.
for(var/Column = 1 to 13) for(var/Row = 1 to 5)
var/Grid/G = new
G.screen_loc = "Inv:[Row],[Column]"
src.client.screen += G
for(var/obj/item/I in src.contents) src.AddItems(I) //Generate the items on slots.
src.InvVisible = 1
mob/proc/AddItems(obj/item/I)
for(var/Grid/G in src.client.screen)
if(G.used) continue
I.screen_loc = G.screen_loc ; src.client.screen+=I
if(I.amount >= 1)
if(I.stackable == 1)
I.maptext = "<div align=right><font color=white><b>x[I.amount]</div>"
G.used =1 ; return
Problem description:
How would I go about clearing only the inventory grids instead of the entire screen? Seems like a winset fix, but I can't figure it.