refactor(tools): 更新 JSON to Lua 转换工具

- 移除了未使用的 NpcTransConf 配置项
- 优化了 scope 数组,使用 filter(Boolean) 过滤掉注释掉的项
- 调整了代码格式,提高可读性
This commit is contained in:
aixianling
2025-01-22 15:33:57 +08:00
parent 89d5a0eeda
commit 88bde2df69

View File

@@ -7,9 +7,9 @@ const scope = [
"Monster",
"ItemMergeConfig",
"MergeConfig",
"NpcTransConf"
// "NpcTransConf"
// "MergeTotal", "RecyclingSettingConfig", "UpstarConfig",
];
].filter(Boolean);
const strKey = (key) => (isNaN(key) ? `${key}` : `[${key}]`);
function jsonToLua(jsonObj, indent = "", linefeed = "\n") {
let luaStr = "";