From 470f7e9fea1525c65cd9e105d3a4b7479fdbae09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Tue, 26 Mar 2024 18:22:40 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=BC=E5=85=A5=E7=BC=BA=E5=A4=B1=E7=9A=84?= =?UTF-8?q?=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/preset/ui.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/preset/ui.ts b/src/preset/ui.ts index ac5f786..b45f6df 100644 --- a/src/preset/ui.ts +++ b/src/preset/ui.ts @@ -14,6 +14,7 @@ interface TextureInfo { xml: { [key: string]: any }; icon?: string; texture?: Buffer; + textureWhat?: Buffer; noUse?: boolean; } @@ -75,6 +76,7 @@ export class UI { xml: item, icon: await this.zip!.file(`editor_table/editoricon/${name.toString()}.json`)?.async('string'), texture: await this.zip!.file(`custom/CustomImportRepo.local/Texture/${guid.slice(0, 2)}/{${guid}}/texture`)?.async('nodebuffer'), + textureWhat: await this.zip!.file(`custom/CustomImportRepo.local/Texture/${guid.slice(0, 2)}/{${guid}}/${guid}.1`)?.async('nodebuffer'), }); } } @@ -218,6 +220,11 @@ export class UI { let textureUri = vscode.Uri.joinPath(this.env.projectUri!, 'custom/CustomImportRepo.local/Texture', textureInfo.newGuid.slice(0, 2), `{${textureInfo.newGuid}}`, 'texture'); pushTask(vscode.workspace.fs.writeFile(textureUri, texture)); } + let textureWhat = textureInfo.textureWhat; + if (textureWhat !== undefined) { + let textureWhatUri = vscode.Uri.joinPath(this.env.projectUri!, 'custom/CustomImportRepo.local/Texture', textureInfo.newGuid.slice(0, 2), `{${textureInfo.newGuid}}`, `${textureInfo.newGuid}.1`); + pushTask(vscode.workspace.fs.writeFile(textureWhatUri, textureWhat)); + } } // 收集oldName和newName的对应关系