I've been working my way toward implementing a Minecraft-like inventory system in which items can be moved and redistributed. It's starting to take shape here:
https://github.com/MovingBlocks/Terasol ... ed-ca1d89e
I'm shooting for a system where after you hit 'i', you get a UI very much like the current one. But you'll be able to drag items around to different locations.
That's about as far as I want to go for now. As I'm working, I'm leaving behind unit tests. So far, I'm just handling the most obvious cases, but as the Inventory feature continues to get built.
One of the biggest changes is that Items no longer keep track of a 'count' property. Instead, the inventory assigns a count to each item delegating through a Cubbyhole (couldn't think of a better name), which maintains stacking/overflow logic.
We'll also need a way to drop items (Minecraft 'q' command), but that's a bit off for me.
https://github.com/MovingBlocks/Terasol ... ed-ca1d89e
I'm shooting for a system where after you hit 'i', you get a UI very much like the current one. But you'll be able to drag items around to different locations.
That's about as far as I want to go for now. As I'm working, I'm leaving behind unit tests. So far, I'm just handling the most obvious cases, but as the Inventory feature continues to get built.
One of the biggest changes is that Items no longer keep track of a 'count' property. Instead, the inventory assigns a count to each item delegating through a Cubbyhole (couldn't think of a better name), which maintains stacking/overflow logic.
We'll also need a way to drop items (Minecraft 'q' command), but that's a bit off for me.