play-test copies are temporary (levels/.playtest, removed and mod selection restored when the game ends), add to llamamod and keep option in the editor, remove level and open levels folder in the launcher plus --remove-level, unique level mod ids for files differing only in case, esc leaves the waypoint tool

This commit is contained in:
MineTec committed 2026-11-07 09:42:24 +01:00
1 parent 2386443fac
commit 1c8b766454
24 files changed
+823 -87

No files matched your search

+13 -1
View File
@@ -6,7 +6,7 @@ Code: `mods/levels/LevelProjectSource` (a `ModSource`), `LevelProjectMod`, `Leve
| | |
|---|---|
| id | `level-<file name>` (lower case, non-alphanumerics → `-`) |
| id | `level-<file name>` (lower case, non-alphanumerics → `-`); names that collide (`My-level` / `my-level`) get `-2`, `-3`… (first in name order keeps the plain id, a suffix never takes an id another file has) |
| name / description | level name, description and author from the project |
| version | first 16 hex digits of the file's SHA-256 (any change of the file rebuilds) |
| order | 60: after Test World (50, chapter 1), before Mirror (75) and the debug view (100), so those also apply to the level |
@@ -24,6 +24,18 @@ the lowest provided chapter fills all missing chapters 1..49 (the map crashes on
chapter WAD), loading pictures as before. To play chapter n: unlock it in the save editor (or
`--unlock <slot> 9 <n> --cursor`), then select it on the world-9 map.
**Temporary play-test copies**: `levels/.playtest/*.llamalevel` are listed too, as
`playtest-<stem>` (`LevelProjectMod.playtest()`, name "… (play-test)", chapter = the project's
own, not counted for other levels' defaults). The editor deletes them after the play-test
(`LevelProjects.clearPlaytest`), see editor-playtest.md. Files from older play-tests in `levels/`
cannot be told apart from saved levels and are left alone (users remove them).
**Removing** (`LevelProjects.remove`, launcher card "Remove…", CLI `--remove-level <id|file>`):
moves the file to `<data>/backups/levels/<yyyyMMdd-HHmmss>/`, takes the id out of `enabledMods`
(`activeMods` stays → the launcher shows "Apply" pending), refused while the game runs and for
play-test copies. The Levels header has "Open levels folder". Screenshots:
`img/mods/levels_remove_dialog.jpg`, `levels_removed.jpg`.
CLI (`EditorCli`): `--editor-import`, `--editor-new`, `--editor-build`, `--import-level`, see
editor-format.md. The registry reads the folder when it is created (restart the app / create a
new `ModRegistry` after importing).