mob/proc/UpdateInventory()
var/items = 0
var/skills = 0
var/col = 1
for(var/obj/O in src)
if(O.skill == 1)
winset(src, "SkillGrid", "current-cell=[++skills]")
src << output(O, "SkillGrid")
if(skills >= 4)
skills = 0
continue
if(equipment && O.slot && equipment[O.slot]==O)
continue
winset(src, "inventory", "current-cell=[++items]")
src << output(O, "inventory")
winset(src, "inventory", "cells=[items]")
Problem description:
I'm kind of new to grids, so here it goes.
For the skills part of the grid, I want it to have only four "skills" across, and then move down, and repeat the process. Right now, it just adds a whole bunch across the very top of the grid.
It's has a flexible list of entries.
Recap: Fill in four skill objects, then move down a row, and do four more and repeat.