From 3e88c4ed19e79560f52e5f7bdbbdf6f677b28a0f Mon Sep 17 00:00:00 2001 From: snus xD Date: Sat, 16 Aug 2025 21:38:38 +0300 Subject: [PATCH] added uniques support for unreadys --- scripts/sort.ts | 4 +++- scripts/unready.ts | 6 ++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/scripts/sort.ts b/scripts/sort.ts index 20ba694..85dcfe3 100644 --- a/scripts/sort.ts +++ b/scripts/sort.ts @@ -19,6 +19,8 @@ UNIQUES_FRAMES?.shift(); while (UNIQUES_NAMES?.at(-1) == "") UNIQUES_NAMES?.pop(); while (UNIQUES_FRAMES?.at(-1) == "") UNIQUES_FRAMES?.pop(); +export const SHARED = UNIQUES_FRAMES; + function add_singles(chapter, sprite_name) { const img_name = `${sprite_name}.png`; if (!fs.existsSync(`../_sprites/translation/${img_name}`)) return; @@ -133,4 +135,4 @@ if (UNIQUES_NAMES != undefined) { } } -// :P \ No newline at end of file +// :P diff --git a/scripts/unready.ts b/scripts/unready.ts index 0f7b328..a404ba8 100644 --- a/scripts/unready.ts +++ b/scripts/unready.ts @@ -1,4 +1,5 @@ import fs from "node:fs"; +import { SHARED } from "./sort"; const CHAPTERS = JSON.parse(fs.readFileSync("./data.json", "utf-8")); @@ -31,8 +32,9 @@ for (const sprite of TRANSLATED) { } else { if ( fs.existsSync(`../_sprites/unready/${sprite}`) && - fs.readdirSync(`../_sprites/unready/${sprite}`).length == - fs.readdirSync(`../_sprites/translation/${sprite}`).length + (SHARED.includes(sprite) || + fs.readdirSync(`../_sprites/unready/${sprite}`).length == + fs.readdirSync(`../_sprites/translation/${sprite}`).length) ) fs.rmSync(`../_sprites/unready/${sprite}`, { recursive: true,