ldtk
ldtk copied to clipboard
Date-based id generation
This PR is just a cherry pick of @BretHudson's changes to generate ids.
The way the id is generated could probably be improved further, like by adding some actual randomness that is not depending on current time, in addition to the date-based logic, but I preferred to keep the changes as is.
Feel free to update the branch directly (you can push to it) if you have a better idea in how ids should be generated here.
Agreed on 'it could be better" :)
I kept nextUid++ to reduce the chance of a collision, in the case that some sort of batch operation generates a bunch of ids