var item = JSON.stringify(inv_array[key]);
item = JSON.parse(item);
Do this:
item = inv_array[key];
That's not relevant to your issue, just a good idea in general.
For the icons not being different, that's really strange. If they do have different icon states and those states are represented in the icon, then the code that retrieves the img src should always be pulling the right one. If you can zip up your project into a little demo and send it to me, I can take a look.
I probably did forget to document byond.fillAtomIcons(); it's basically a way to tell the webclient to update images as soon as the atom and icon info it needs is available.
But it seems that the src for each img is the same, even though the ID's are different... am I doing something wrong?
I'm picking up different icon_states: "stone" and "redstone", and it always shows the src for "stone"
I couldn't find any documentation on byond.fillAtomIcons(); to see if i was triggering it wrong either...
https://gyazo.com/8b8f6bb42d3bc4a6140ff3566d6a0223