From adc76f71029f1a1ce7e707fc49130b688c41c57a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Thu, 28 Mar 2024 15:11:31 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9A=82=E5=AD=98=E7=89=A9=E7=BC=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package-lock.json | 78 ++++++++++++++++++++ package.json | 7 +- src/constants.ts | 4 +- src/editorTable/CSVeditor.ts | 87 +++++++++++++++++++---- src/editorTable/CSVimporter.ts | 45 +++++------- src/editorTable/templateGenerator.ts | 20 ++++-- src/extension.ts | 14 ++-- src/utility.ts | 17 +++-- template/csv_template/ability/selecor.csv | 2 +- template/csv_template/sound/base_info.csv | 5 +- template/json_template/item.json | 4 +- 11 files changed, 217 insertions(+), 66 deletions(-) diff --git a/package-lock.json b/package-lock.json index c974c71..116d264 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,6 +11,7 @@ "@types/fs-extra": "^11.0.4", "@types/uuid": "^9.0.8", "csv-parser": "^3.0.0", + "fast-csv": "^5.0.1", "fast-xml-parser": "^4.3.5", "fs-extra": "^11.2.0", "jszip": "^3.10.1", @@ -112,6 +113,31 @@ "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, + "node_modules/@fast-csv/format": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@fast-csv/format/-/format-5.0.0.tgz", + "integrity": "sha512-IyMpHwYIOGa2f0BJi6Wk55UF0oBA5urdIydoEDYxPo88LFbeb3Yr4rgpu98OAO1glUWheSnNtUgS80LE+/dqmw==", + "dependencies": { + "lodash.escaperegexp": "^4.1.2", + "lodash.isboolean": "^3.0.3", + "lodash.isequal": "^4.5.0", + "lodash.isfunction": "^3.0.9", + "lodash.isnil": "^4.0.0" + } + }, + "node_modules/@fast-csv/parse": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@fast-csv/parse/-/parse-5.0.0.tgz", + "integrity": "sha512-ecF8tCm3jVxeRjEB6VPzmA+1wGaJ5JgaUX2uesOXdXD6qQp0B3EdshOIed4yT1Xlj/F2f8v4zHSo0Oi31L697g==", + "dependencies": { + "lodash.escaperegexp": "^4.1.2", + "lodash.groupby": "^4.6.0", + "lodash.isfunction": "^3.0.9", + "lodash.isnil": "^4.0.0", + "lodash.isundefined": "^3.0.1", + "lodash.uniq": "^4.5.0" + } + }, "node_modules/@humanwhocodes/config-array": { "version": "0.11.14", "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", @@ -1160,6 +1186,18 @@ "node": ">=0.10.0" } }, + "node_modules/fast-csv": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/fast-csv/-/fast-csv-5.0.1.tgz", + "integrity": "sha512-Q43zC4NdQD5MAWOVQOF8KA+D6ddvTJjX2ib8zqysm74jZhtk6+dc8C75/OqRV6Y9CLc4kgvbC3PLG8YL4YZfgw==", + "dependencies": { + "@fast-csv/format": "5.0.0", + "@fast-csv/parse": "5.0.0" + }, + "engines": { + "node": ">=10.0.0" + } + }, "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", @@ -1773,12 +1811,52 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/lodash.escaperegexp": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/lodash.escaperegexp/-/lodash.escaperegexp-4.1.2.tgz", + "integrity": "sha512-TM9YBvyC84ZxE3rgfefxUWiQKLilstD6k7PTGt6wfbtXF8ixIJLOL3VYyV/z+ZiPLsVxAsKAFVwWlWeb2Y8Yyw==" + }, + "node_modules/lodash.groupby": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/lodash.groupby/-/lodash.groupby-4.6.0.tgz", + "integrity": "sha512-5dcWxm23+VAoz+awKmBaiBvzox8+RqMgFhi7UvX9DHZr2HdxHXM/Wrf8cfKpsW37RNrvtPn6hSwNqurSILbmJw==" + }, + "node_modules/lodash.isboolean": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz", + "integrity": "sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg==" + }, + "node_modules/lodash.isequal": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", + "integrity": "sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ==" + }, + "node_modules/lodash.isfunction": { + "version": "3.0.9", + "resolved": "https://registry.npmjs.org/lodash.isfunction/-/lodash.isfunction-3.0.9.tgz", + "integrity": "sha512-AirXNj15uRIMMPihnkInB4i3NHeb4iBtNg9WRWuK2o31S+ePwwNmDPaTL3o7dTJ+VXNZim7rFs4rxN4YU1oUJw==" + }, + "node_modules/lodash.isnil": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/lodash.isnil/-/lodash.isnil-4.0.0.tgz", + "integrity": "sha512-up2Mzq3545mwVnMhTDMdfoG1OurpA/s5t88JmQX809eH3C8491iu2sfKhTfhQtKY78oPNhiaHJUpT/dUDAAtng==" + }, + "node_modules/lodash.isundefined": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/lodash.isundefined/-/lodash.isundefined-3.0.1.tgz", + "integrity": "sha512-MXB1is3s899/cD8jheYYE2V9qTHwKvt+npCwpD+1Sxm3Q3cECXCiYHjeHWXNwr6Q0SOBPrYUDxendrO6goVTEA==" + }, "node_modules/lodash.merge": { "version": "4.6.2", "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", "dev": true }, + "node_modules/lodash.uniq": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz", + "integrity": "sha512-xfBaXQd9ryd9dlSDvnvI0lvxfLJlYAZzXomUYzLKtUeOQvOP5piqAWuGtrhWeqaXK9hhoM/iyJc5AV+XfsX3HQ==" + }, "node_modules/log-symbols": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", diff --git a/package.json b/package.json index 45988f1..b58669d 100644 --- a/package.json +++ b/package.json @@ -194,11 +194,12 @@ "@types/fs-extra": "^11.0.4", "@types/uuid": "^9.0.8", "csv-parser": "^3.0.0", + "fast-csv": "^5.0.1", + "fast-xml-parser": "^4.3.5", "fs-extra": "^11.2.0", - "uuid": "^9.0.1", - "winreg": "^1.2.5", "jszip": "^3.10.1", - "fast-xml-parser": "^4.3.5" + "uuid": "^9.0.1", + "winreg": "^1.2.5" }, "devDependencies": { "@types/mocha": "^10.0.3", diff --git a/src/constants.ts b/src/constants.ts index 8e8c314..1e646e5 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -33,7 +33,7 @@ export const englishPathToChinese: Readonly<{ [key: string]: string } >= { /** * 物编数据种类对应的中文名 */ -export const englishToChinese: Readonly<{ [key: string]: string } >= { +export const englishTypeNameToChineseTypeName: Readonly<{ [key: string]: string } >= { "unit": "单位", "decoration": "装饰物", "item": "物品", @@ -48,7 +48,7 @@ export const englishToChinese: Readonly<{ [key: string]: string } >= { /** * 物编数据种类对应的英文名 */ -export const chineseToEnglish:Readonly< { [key: string]: string } >= { +export const chineseTypeNameToEnglishTypeName:Readonly< { [key: string]: string } >= { "单位": "unit", "装饰物": "decoration", "物品": "item", diff --git a/src/editorTable/CSVeditor.ts b/src/editorTable/CSVeditor.ts index cc6d297..16d8847 100644 --- a/src/editorTable/CSVeditor.ts +++ b/src/editorTable/CSVeditor.ts @@ -1,15 +1,15 @@ import { Env } from "../env"; -import csvParser from 'csv-parser'; -import { EditorTableType,editorTableTypeToFolderName } from '../constants'; +import * as csv from 'fast-csv'; +import { EditorTableType, editorTableTypeToFolderName, englishTypeNameToChineseTypeName,chineseTypeNameToEnglishTypeName } from '../constants'; import * as vscode from 'vscode'; import * as path from 'path'; import * as fs from 'fs'; -import { isPathValid, isJson, getFileNameByVscodeUri } from '../utility'; +import { hash, isJson, getFileNameByVscodeUri, isCSV, isPathValid } from '../utility'; /** * 物编数据CSV表格的编辑器 */ export class CSVeditor { - constructor(private readonly env: Env) { + constructor(private env: Env) { } @@ -20,8 +20,66 @@ export class CSVeditor { /** * 从工程文件添加 */ - public addEditorTableItemFromProject(editorTableItem:vscode.QuickPickItem) { - + public addEditorTableItemFromProject(editorTableItem: vscode.QuickPickItem) { + if (!editorTableItem.description || !this.env.scriptUri) { + vscode.window.showErrorMessage("未初始化Y3项目"); + return; + } + let englishEditorTableType = chineseTypeNameToEnglishTypeName[editorTableItem.description]; + let csvRelativePath = this.env.tableTypeToCSVfolderPath[englishEditorTableType]; + let csvPath = vscode.Uri.joinPath(this.env.scriptUri, csvRelativePath); + if (!isPathValid(csvPath.fsPath)) { + vscode.window.showErrorMessage("未找到CSV文件,请先生成"); + return; + } + const files = fs.readdirSync(csvPath.fsPath); + files.forEach(file => { + if (!isCSV(file)) { + return; + } + const rows: any[] = []; + const filePath = path.join(csvPath.fsPath, file); + const fileReadStream = fs.createReadStream(filePath); + let haveItem: boolean = false; + let haveError: boolean = false; + let i = 0;//行号 + csv.parseStream(fileReadStream,{ headers: true }) + .on( + 'data', (row) => { + if (!row.hasOwnProperty('uid')) { + haveError = true; + vscode.window.showErrorMessage('提供的CSV文件格式错误,缺少uid字段,文件路径为:'+filePath); + return; + } + if (row['uid'] === editorTableItem.detail) { + haveItem = true; + } + rows.push(row); + + i++; + } + ) + .on('end', () => { + if (!haveItem) { + let newRow: any={}; + newRow['uid'] = editorTableItem.detail; + newRow['key'] = editorTableItem.detail; + newRow['name'] = editorTableItem.label; + rows.push(newRow); + } + if (!haveError) { + const fileWriteStream = fs.createWriteStream(filePath); + csv.write(rows, { headers: true }) + .pipe(fileWriteStream); + } + }) + .on('error', (error) => { + console.error('CSV解析错误', error.message); + console.error('CSV解析出错的行行号:' + (i - 1) + ""); + let message = 'CSV解析错误:' + filePath + '\n' + '出错的CSV行,其行号为:' + i; + vscode.window.showErrorMessage(message); + }); + }); } public searchAllEditorTableItemInProject(query: string): vscode.QuickPickItem[]{ @@ -31,7 +89,8 @@ export class CSVeditor { } //只搜索九类物编数据的文件夹下的物编数据 不递归搜索 for (let type in EditorTableType) { - let folderName = editorTableTypeToFolderName[type]; + let typeStr = EditorTableType[type as keyof typeof EditorTableType]; + let folderName: string = editorTableTypeToFolderName[typeStr]; res = res.concat(this.searchEditorTableItemsInFolder(type,path.join(this.env.editorTablePath, folderName), query)); } return res; @@ -40,6 +99,7 @@ export class CSVeditor { private searchEditorTableItemsInFolder(editorTableType:string,pathStr: string, query: string): vscode.QuickPickItem[] { let res: vscode.QuickPickItem[] = []; const files = fs.readdirSync(pathStr); + editorTableType=editorTableType.toLowerCase(); files.forEach(file => { const filePath: string = path.join(pathStr, file); const stat = fs.statSync(filePath); @@ -67,18 +127,21 @@ export class CSVeditor { let nameKey: any = editorTableJson['name']; name = this.env.zhlanguageJson[nameKey]; } + let uid = editorTableJson['uid']; + if (!uid || typeof uid !=='number') { + uid = label.substring(0, label.length - 5); + } if (name !== undefined && typeof name === "string") { - label = name + "(" + label.substring(0, label.length - 5) + ")";//显示为"这是一个单位(134219828)"的格式 + label = name + "(" + uid + ")";//转为"这是一个单位(134219828)"的格式 } if (label.includes(query)) { - let editorTableJsonName:string = label; let editorTableJsonUri: vscode.Uri = vscode.Uri.file(filePath); let quickPickItem: vscode.QuickPickItem = { - label: editorTableJsonName, - description: editorTableType, - detail: editorTableJsonUri.fsPath, + label: name, + description: englishTypeNameToChineseTypeName[editorTableType], + detail: uid, }; res.push(quickPickItem); } diff --git a/src/editorTable/CSVimporter.ts b/src/editorTable/CSVimporter.ts index ce623dd..b25416e 100644 --- a/src/editorTable/CSVimporter.ts +++ b/src/editorTable/CSVimporter.ts @@ -7,11 +7,10 @@ import csvParser from 'csv-parser'; import * as fs from 'fs'; import { Env } from "../env"; -import { isInDirectory, isFileValid, isPathValid, removeSpacesAndNewlines, toUnicodeIgnoreASCII, getFileNameByVscodeUri, hash } from '../utility'; +import { isInDirectory, isPathValid, toUnicodeIgnoreASCII, hash } from '../utility'; import { csvTypeToPath } from "../constants"; import * as path from 'path'; import { v4 as uuidv4 } from 'uuid'; -import { log } from 'console'; export class CSVimporter { @@ -22,20 +21,6 @@ export class CSVimporter this.csvTypeToPath = csvTypeToPath; } - // 默认情况下的文件夹名与其存放的物编数据类型的对应关系 - private readonly defaultFolderNameToTableType: { [key: string]: string } = { - "单位": "unit", - "装饰物": "decoration", - "物品": "item", - "技能":"ability", - "魔法效果": "modifier", - "投射物": "projectile", - "科技": "technology", - "可破坏物": "destructible", - "声音":"sound" - }; - - /** * 从插件配置中指定的文件夹 导入对应类型的物编数据CSV文件 * @returns true or false 成功或失败 @@ -88,9 +73,16 @@ export class CSVimporter } - - private async saveRowToTargetPath(row:any,target_path:vscode.Uri,tableType:string):Promise{ - if(!isPathValid(target_path.fsPath)){ + /** + * 导入CSV文件中的一行数据 + * 一行为一个物编数据项目的部分属性 + * @param row 行号 + * @param targetPath 目标路径 + * @param tableType 物编表类型 + * @returns + */ + private async saveRowToTargetPath(row:any,targetPath:vscode.Uri,tableType:string):Promise{ + if(!isPathValid(targetPath.fsPath)){ vscode.window.showErrorMessage('保存Json的路径非有效路径'); return false; } @@ -105,8 +97,8 @@ export class CSVimporter uid = uid.substring(1); } - let jsonFilePath=target_path.fsPath+'\\'+uid+'.json'; - if(!isInDirectory(target_path.fsPath,uid+'.json')){ + let jsonFilePath=targetPath.fsPath+'\\'+uid+'.json'; + if(!isInDirectory(targetPath.fsPath,uid+'.json')){ console.log("没有检测到对应物品的Json,从模板新建了Json文件存储物编数据:" + jsonFilePath); let templateJson = await fs.readFileSync(path.dirname(__dirname) + "\\template\\json_template\\" + tableType + ".json"); await fs.writeFileSync(jsonFilePath,templateJson); @@ -317,7 +309,7 @@ export class CSVimporter console.log("开始读取csv文件:" + csvFilePath); let i=0;// 当前读取行号 - await fs.createReadStream(csvFilePath) + fs.createReadStream(csvFilePath) .pipe(csvParser()) .on('data', async (row) => { @@ -340,12 +332,13 @@ export class CSVimporter }) .on('end', () => { vscode.window.showInformationMessage("全部导入成功"); -; console.log('Parsed CSV data Length:', i); + console.log('Parsed CSV data Length:', i); }) .on('error', (error) => { - console.error('CSV解析错误 Error parsing CSV', error.message); - console.error('Error parsing CSV row number:' + (i-1) + ""); - let message = 'CSV解析错误 Error parsing CSV:' + csvFilePath + '\n' + '出错的CSV行,其行号为:' + i; + console.error('CSV解析错误', error.message); + console.error('CSV解析出错的行行号:' + (i-1) + ""); + let message = 'CSV解析错误:' + csvFilePath + '\n' + '出错的CSV行,其行号为:' + i; + vscode.window.showErrorMessage(message); }); return true; } diff --git a/src/editorTable/templateGenerator.ts b/src/editorTable/templateGenerator.ts index 4d1cc1a..e05981b 100644 --- a/src/editorTable/templateGenerator.ts +++ b/src/editorTable/templateGenerator.ts @@ -2,16 +2,16 @@ import * as vscode from 'vscode'; import * as fs from 'fs-extra'; import { Env } from '../env'; import * as path from 'path'; -import { isInDirectory, isFileValid, isPathValid, removeSpacesAndNewlines, toUnicodeIgnoreASCII } from '../utility'; -import { chineseToEnglish,englishToChinese } from '../constants'; +import { isPathValid } from '../utility'; +import { chineseTypeNameToEnglishTypeName,englishTypeNameToChineseTypeName } from '../constants'; export class TemplateGenerator{ private env: Env; private readonly englishToChinese; private readonly chineseToEnglish; public constructor(env: Env) { this.env = env; - this.chineseToEnglish = chineseToEnglish; - this.englishToChinese = englishToChinese; + this.chineseToEnglish = chineseTypeNameToEnglishTypeName; + this.englishToChinese = englishTypeNameToChineseTypeName; } @@ -36,7 +36,7 @@ export class TemplateGenerator{ try { await this.renameTemplateCSVtoChinese(); - await fs.copySync(path.join(__dirname, "../../template/csv_template"), targetPath.fsPath, { overwrite: false }); + fs.copySync(path.join(__dirname, "../../template/csv_template"), targetPath.fsPath, { overwrite: false }); await this.renameTemplateCSVtoEnglish(); } catch (error) { @@ -56,7 +56,10 @@ export class TemplateGenerator{ let newFileName: string = this.englishToChinese[key]; oldFileName = path.join(__dirname, "../../template/csv_template/" + oldFileName); newFileName = path.join(__dirname, "../../template/csv_template/" + newFileName); - await fs.renameSync(oldFileName, newFileName); + if (isPathValid(newFileName)) { + continue; + } + fs.renameSync(oldFileName, newFileName); } } @@ -66,7 +69,10 @@ export class TemplateGenerator{ let newFileName: string = this.chineseToEnglish[key]; oldFileName = path.join(__dirname, "../../template/csv_template/" + oldFileName); newFileName = path.join(__dirname, "../../template/csv_template/" + newFileName); - await fs.renameSync(oldFileName, newFileName); + if (isPathValid(newFileName)) { + continue; + } + fs.renameSync(oldFileName, newFileName); } } } \ No newline at end of file diff --git a/src/extension.ts b/src/extension.ts index 83ef451..2e114d3 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -244,9 +244,10 @@ class Helper { * 注册CSVeditor相关的命令 */ private registerCommandOfCSVeditor() { - + // 在CSV表格中添加物编项目的命令 let addNewDataInCSVcommand = vscode.commands.registerCommand('y3-helper.addNewDataInCSV', async () => { + await this.env.waitReady(); const editorTableTypes: vscode.QuickPickItem[] = [ { label: '单位', description: 'unit' }, { label: '装饰物', description: 'decoration' }, @@ -277,7 +278,7 @@ class Helper { }; vscode.window.showInputBox(inputOptions).then(value => { if (value) { - let csvEditor: CSVeditor = new CSVeditor(this.env); + // todo:分配一个uid并新建到csv中 @@ -289,9 +290,10 @@ class Helper { // 把Y3工程项目中已有的物编数据的UID和名称添加到CSV表格以便填写和导入的命令 let addUIDandNameToCSVfromProjectCommand = vscode.commands.registerCommand("y3-helper.addUIDandNameToCSVfromProject", async () => { + await this.env.waitReady(); const inputOptions: vscode.InputBoxOptions = { prompt: 'UID或名称', - placeHolder: '字符串', + placeHolder: 'UID或名称', validateInput: (text: string) => { if (text.length === 0) { return "输入的内容为空"; @@ -302,21 +304,23 @@ class Helper { vscode.window.showInputBox(inputOptions).then(value => { if (value) { + let csvEditor: CSVeditor = new CSVeditor(this.env); - - let pickItems:vscode.QuickPickItem[]=csvEditor.searchAllEditorTableItemInProject(value); + let pickItems: vscode.QuickPickItem[] = csvEditor.searchAllEditorTableItemInProject(value); vscode.window.showQuickPick(pickItems, { placeHolder: '选择你要添加的物编数据的UID和名称' }).then((selectedItem) => { if (selectedItem) { vscode.window.showInformationMessage(`你选择了: ${selectedItem.label}`); + csvEditor.addEditorTableItemFromProject(selectedItem); } }); } }); }); + this.context.subscriptions.push(addUIDandNameToCSVfromProjectCommand); } diff --git a/src/utility.ts b/src/utility.ts index f4f87c8..1ddca02 100644 --- a/src/utility.ts +++ b/src/utility.ts @@ -4,12 +4,21 @@ import * as vscode from 'vscode'; import * as fs from 'fs'; /** - * 判断一个uri是否为指向一个json文件 - * @param uri + * 判断一个路径是否为指向一个json文件 + * @param path + * @returns + */ +export function isJson(path:string):boolean { + return path.toLowerCase().endsWith(".json"); +} + +/** + * 判断一个uri是否为指向一个CSV文件 + * @param path * @returns */ -export function isJson(uri:string):boolean { - return uri.toLowerCase().endsWith(".json"); +export function isCSV(path: string): boolean { + return path.toLowerCase().endsWith(".csv"); } /** * 检查路径是否有效 diff --git a/template/csv_template/ability/selecor.csv b/template/csv_template/ability/selecor.csv index c6fbf3c..04fa440 100644 --- a/template/csv_template/ability/selecor.csv +++ b/template/csv_template/ability/selecor.csv @@ -1,3 +1,3 @@ key,uid,name,arrow_length,arrow_width,circle_radius,filter_condition_camp,filter_condition_type,filter_item_tags,filter_unit_tags,magicbook_list,sector_angle,sector_radius,sight_type,target_attribute ID,UID,名称,长度,宽度,圆形半径,阵营,类型,物品标签要求,单位标签要求,魔法书技能,角度,扇形半径,指示器类型,特殊筛选 -134265579,134265579,这是一个技能,"("5")","("2")","("5")",5,7,(),(),(),"("0")","("15.114514")",0,0 +134265579,134265579,这是一个技能,"(""5"")","(""2"")","(""5"")",5,7,(),(),(),"(""0"")","(""15.114514"")",0,0 diff --git a/template/csv_template/sound/base_info.csv b/template/csv_template/sound/base_info.csv index 8ee1c34..1d32ac9 100644 --- a/template/csv_template/sound/base_info.csv +++ b/template/csv_template/sound/base_info.csv @@ -1,6 +1,3 @@ key,uid,name,trigger,description,fade_in_time,fade_out_time,icon,kv,max_dist,min_dist,priority,sound_id,sound_id_list,speed,suffix,tags,total_time,type,volume ID,UID,名称,触发器,描述,淡入时间,淡出时间,图标,玩家自定义,最大距离,最小距离,优先级,2D声音,2D声音,播放速度,编辑器后缀,标签,总时间,类型,音量 -134265385,134265385,40000584,134265385,这是一个声音,0,0,100000,{},1000,0,,104168,"[ - {""sound_id"": 104168, ""volume"": 100 - } -]",1,,(),0.411414514,1,100 +134265385,134265385,40000584,134265385,这是一个声音,0,0,100000,{},1000,0,,104168,"[{""sound_id"": 104168, ""volume"": 100}]",1,,(),0.411414514,1,100 diff --git a/template/json_template/item.json b/template/json_template/item.json index e22a343..eddd35d 100644 --- a/template/json_template/item.json +++ b/template/json_template/item.json @@ -461,8 +461,8 @@ "tags": { "__tuple__": true, "items": [ - "\u6cd5\u672f", - "\u6cd5\u7a7f" + "", + "" ] }, "uid": "134218218",