Datafix worlds: world type variants for the level.dat generator settings

This commit is contained in:
Ludovic Marie
2026-10-13 00:46:45 +02:00
parent 26462a168b
commit 951b43daac
3 changed files with 41 additions and 22 deletions
+1 -1
View File
@@ -214,7 +214,7 @@ def main():
WORLDS.parent.mkdir(parents=True, exist_ok=True)
with open(WORLDS.parent / 'generate.lock', 'w') as lock:
fcntl.flock(lock, fcntl.LOCK_EX) # another worktree may be generating them
missing = [v for v in datafix_worlds.VERSIONS if not (WORLDS / v / 'level.dat').exists()]
missing = [v for v in [*datafix_worlds.VERSIONS, *datafix_worlds.VARIANTS] if not (WORLDS / v / 'level.dat').exists()]
if missing:
print('generating sample worlds:', ' '.join(missing), flush=True)
subprocess.run([sys.executable, str(ROOT / 'tools' / 'datafix_worlds.py'), *missing], cwd=ROOT, check=True)