deepnight / ldtk

Modern, lightweight and efficient 2D level editor
https://ldtk.io
MIT License
3.45k stars 192 forks source link

[Bug] Duplicating a level offsets the indexes of every level after it in the world #828

Closed Tourmi closed 1 year ago

Tourmi commented 1 year ago

Steps to reproduce:

  1. Create a room (Level_0)
  2. Create another room (Level_1)
  3. Right click on Level_0, and press "DUPLICATE"
  4. Level_1 is now renamed to Level_2, the newly duplicated room now being called "Level_1"

What's expected:

This is an issue since it makes merging changes very awkward, especially when saving levels to separate files.

Tourmi commented 1 year ago

Looked a bit more into it, and this is more of an issue with a lack of permanent ID available in the Default Level Identifiers. Having the IID or the UID in the filename would make this a non-issue. Opened a feature request instead #829