UpdateInventory()
var/items = 0
src.viewer = "Inventory"
for(var/obj/Spell_HUD/Spell_Slot/S in src.contents)
del S
for(var/obj/O in src.contents)
winset(src, "inventory", "current-cell=1,[++items]")
src << output(O, "inventory")
winset(src, "inventory", "current-cell=2,[items]")
src << output("[O.count]", "inventory")
winset(src, "inventory", "cells=2x[items]") // cut off any remaining cells
Problem description:
I'm having an issue trying to get the grid to display both an object and the amount of them you have in the same grid. I can get it to either display all of your inventory, or the amount you have of each, but not both. I'm sure I'm just not doing this correctly, so what do I need to change?
Thanks in advance.
My guess is that your grid is set to be a "flexible list of entries", which won't work here.