ldtk icon indicating copy to clipboard operation
ldtk copied to clipboard

Date-based id generation

Open jeremyfa opened this issue 2 months ago • 1 comments

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.

jeremyfa avatar Oct 21 '25 20:10 jeremyfa

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

BretHudson avatar Oct 21 '25 20:10 BretHudson