I'm making good #gamedev progress with my Settlers & Warlords game. But I have been waiting for my workers to send items to a new structure, but they never do. The game even gives me a reason: the structure doesn't need any items to work.
But that's not right. It's also referencing the wrong ->
we could do! We could have cured cancer by now. We could have self-driving cars that were actually reliable. We could be using new forms of metals and energy storage that opens new possibilities. We could be exploring the stars by now.
Our government invested in our higher education, but only ->
should get to the last used structure ID (43). Somehow... it's not. So the next step is to fix this to work correctly... whatever that'll be.
That's where I'm at in coding this.
structure name (it should be Farmer's Post, not Item Mover). Why is it getting the name wrong?
The Item Mover (that's responsible for giving items to the Farmer's Post) stores the structure as only its ID (it's easier to store & fetch that way), and the ID of the Farmer's Post is 43. This is ->
the ID that the Item Mover is holding, so why is it picking the wrong structure?
It turns out there are TWO structures with id=43.
I use a lastStructureId to help determine what ID to use next. When I refresh the page (and load a fresh copy of the game from the server), the lastStructureId ->