diff --git a/_sprites/cut.txt b/_sprites/cut.txt new file mode 100644 index 0000000..9e5a111 --- /dev/null +++ b/_sprites/cut.txt @@ -0,0 +1,5 @@ +Для того, чтобы спрайт не шёл в учёт неготовых нужно написать его название в списке ниже! +Просто название спрайта, без каких-либо дополнительных символов. + +Вырезня: +spr_ch3_gameshow_round \ No newline at end of file diff --git a/_sprites/unready/spr_ch3_gameshow_round.png b/_sprites/unready/spr_ch3_gameshow_round.png deleted file mode 100644 index b379463..0000000 Binary files a/_sprites/unready/spr_ch3_gameshow_round.png and /dev/null differ diff --git a/scripts/unready.ts b/scripts/unready.ts index ccebe19..0524ecb 100644 --- a/scripts/unready.ts +++ b/scripts/unready.ts @@ -2,6 +2,17 @@ import fs from "node:fs"; const CHAPTERS = JSON.parse(fs.readFileSync("./data.json", "utf-8")); +const CUTS = fs + .readFileSync("../_sprites/cut.txt", "utf-8") + .split("Вырезня:") + .at(-1) + ?.split("\n"); + +CUTS?.shift(); +if (CUTS?.at(-1) == "") CUTS?.pop(); + +console.log(CUTS); + for (const chapter of Object.keys(CHAPTERS)) { const OriginalPath = `../_sprites/original/${chapter}`; const UnreadyPath = `../_sprites/unready`; @@ -29,3 +40,18 @@ for (const sprite of TRANSLATED) { }); } } + +if (CUTS != undefined) { + for (const cut of CUTS) { + if (fs.existsSync(`../_sprites/unready/${cut}`)) + fs.rmSync(`../_sprites/unready/${cut}`, { + recursive: true, + force: true, + }); + else if (fs.existsSync(`../_sprites/unready/${cut}.png`)) + fs.rmSync(`../_sprites/unready/${cut}.png`, { + recursive: true, + force: true, + }); + } +}