From 9773dc48a985915dcf48386aadbd029681b98abb Mon Sep 17 00:00:00 2001 From: bangonicdd <157843588+bangonicdd2@users.noreply.github.com> Date: Sat, 15 Feb 2025 00:41:15 +0900 Subject: [PATCH 1/3] fix: adjust pipelineness in prev PR for easing further managing --- src/ts/process/modules.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ts/process/modules.ts b/src/ts/process/modules.ts index 73a9b80d..8b870f6e 100644 --- a/src/ts/process/modules.ts +++ b/src/ts/process/modules.ts @@ -268,7 +268,10 @@ function getModuleByIds(ids:string[]){ modules.push(module) } } - return deduplicateModuleById(modules) + if(db.moduleIntergration){ + modules = deduplicateModuleById(modules) + } + return modules } function deduplicateModuleById(modules:RisuModule[]){ From 7c3563679e776c7c5b78bbcf7bdfa64bfb89b23a Mon Sep 17 00:00:00 2001 From: bangonicdd <157843588+bangonicdd2@users.noreply.github.com> Date: Sun, 16 Feb 2025 03:56:15 +0900 Subject: [PATCH 2/3] fix: make asset names case-insensitive --- src/ts/parser.svelte.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ts/parser.svelte.ts b/src/ts/parser.svelte.ts index 87f46090..1cc5b002 100644 --- a/src/ts/parser.svelte.ts +++ b/src/ts/parser.svelte.ts @@ -303,11 +303,11 @@ async function replaceAsync(string, regexp, replacerFunction) { } async function getAssetSrc(assetArr: string[][], name: string, assetPaths: {[key: string]:{path: string, ext?: string}}) { - name = name.toLocaleLowerCase() + const lowerName = name.toLocaleLowerCase() for (const asset of assetArr) { - if (trimmer(asset[0].toLocaleLowerCase()) !== trimmer(name)) continue + if (trimmer(asset[0].toLocaleLowerCase()) !== trimmer(lowerName)) continue const assetPath = await getFileSrc(asset[1]) - assetPaths[asset[0].toLocaleLowerCase()] = { + assetPaths[name] = { path: assetPath, ext: asset[2] } From ff76776c1010694da7d9e62fb99e448f3dff05c8 Mon Sep 17 00:00:00 2001 From: bangonicdd <157843588+bangonicdd2@users.noreply.github.com> Date: Sun, 16 Feb 2025 16:51:39 +0900 Subject: [PATCH 3/3] fix: also make emo case-insensitive as well --- src/ts/parser.svelte.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ts/parser.svelte.ts b/src/ts/parser.svelte.ts index 1cc5b002..50f304ff 100644 --- a/src/ts/parser.svelte.ts +++ b/src/ts/parser.svelte.ts @@ -303,11 +303,10 @@ async function replaceAsync(string, regexp, replacerFunction) { } async function getAssetSrc(assetArr: string[][], name: string, assetPaths: {[key: string]:{path: string, ext?: string}}) { - const lowerName = name.toLocaleLowerCase() for (const asset of assetArr) { - if (trimmer(asset[0].toLocaleLowerCase()) !== trimmer(lowerName)) continue + if (trimmer(asset[0].toLocaleLowerCase()) !== trimmer(name)) continue const assetPath = await getFileSrc(asset[1]) - assetPaths[name] = { + assetPaths[asset[0].toLocaleLowerCase()] = { path: assetPath, ext: asset[2] } @@ -341,6 +340,7 @@ async function parseAdditionalAssets(data:string, char:simpleCharacterArgument|c let needsSourceAccess = false data = await replaceAsync(data, assetRegex, async (full:string, type:string, name:string) => { + name = name.toLocaleLowerCase() const moduleAssets = getModuleAssets() if (char.additionalAssets) { await getAssetSrc(char.additionalAssets, name, assetPaths)