From 164d9864f9393c556fd55710e4e52e1bb87a092a Mon Sep 17 00:00:00 2001 From: Lajos Meszaros Date: Sat, 25 May 2024 20:30:28 +0200 Subject: [PATCH] fix(compile): don't forget to tell arx-convert about the fts compression too --- src/compile.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/compile.ts b/src/compile.ts index 5d1c85cc..bf5adc57 100644 --- a/src/compile.ts +++ b/src/compile.ts @@ -16,11 +16,13 @@ const { through, transformSplitBy, splitAt, transformIdentity } = stream const compileFTS = async (settings: Settings, fts: ArxFTS) => { const ftsPath = path.join(settings.outputDir, `game/graph/levels/level${settings.levelIdx}`) - const repackedFts = FTS.save(fts) - if (settings.uncompressedFTS) { + const repackedFts = FTS.save(fts, false) + return fs.promises.writeFile(path.join(ftsPath, 'fast.fts'), repackedFts) } else { + const repackedFts = FTS.save(fts, true) + const { total: ftsHeaderSize } = getHeaderSize(repackedFts, 'fts') return new Promise((resolve, reject) => {