refactor(config): 更新物品合成配置并扩展 JSON 转换脚本
- 修改 ItemMergeConfig.json 中的 second_index 字段值 - 更新 json2lua.js 脚本,使其支持更多的 JSON 文件转换
This commit is contained in:
@@ -4134,7 +4134,7 @@
|
|||||||
"index": 3,
|
"index": 3,
|
||||||
"text": "兑换",
|
"text": "兑换",
|
||||||
"Eid": 3301,
|
"Eid": 3301,
|
||||||
"second_index": 1,
|
"second_index": 3,
|
||||||
"buttontxt10": "合成10次",
|
"buttontxt10": "合成10次",
|
||||||
"mergebutton10": 1,
|
"mergebutton10": 1,
|
||||||
"table": [
|
"table": [
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ const start = () => {
|
|||||||
const files = fs.readdirSync(folderPath);
|
const files = fs.readdirSync(folderPath);
|
||||||
|
|
||||||
// 过滤出所有的 JSON 文件
|
// 过滤出所有的 JSON 文件
|
||||||
const jsonFiles = files.filter(file => path.extname(file) === '.json').filter(file => ["StdItems","ItemMergeConfig"].map(e => `${e}.json`).includes(file));
|
const jsonFiles = files.filter(file => path.extname(file) === '.json').filter(file => ["StdItems","ItemMergeConfig","MergeConfig","MergeTotal"].map(e => `${e}.json`).includes(file));
|
||||||
jsonFiles.forEach(file => {
|
jsonFiles.forEach(file => {
|
||||||
const json = JSON.parse(fs.readFileSync(path.join(folderPath, file), 'utf8'))
|
const json = JSON.parse(fs.readFileSync(path.join(folderPath, file), 'utf8'))
|
||||||
const filename = path.basename(file, path.extname(file));
|
const filename = path.basename(file, path.extname(file));
|
||||||
|
|||||||
Reference in New Issue
Block a user