Closed dmecke closed 4 years ago
I found the change to be really easy so I went ahead and created #465. Please feel free to request changes or reject it completely if you don't want to have it in the export.
Hello. Yes, that's a simple change
Please note it's committed into Dev branch, not Prod.
Thanks for merging! Yes, I wasn't sure whether you want new features to be in dev or master.
In dev, it's ok
Description
It would be useful for the json export to contain the neighbouring cell ids for every cell. I use the json export as the base for a browsergame. To implement something like pathfinding based on the cells or the habitat of creatures, it would be very useful to have the neighbouring cells (their ids) in the metadata next to biome, population, etc. I would be very happy to create a pull request if you like the addition.
Steps to reproduce
Create a json export of a map.
Expected behaviour
Next to the metadata like "biome", "population", etc for every cell, there is also the key "neighbours" with an array of cell ids, that are next to this cell.
Actual behaviour
No neighbours key. ;-)
.map file
Not relevant, features request.
Generator version
Not relevant, features request.
Browser version
Not relevant, features request.