feat: 发布咸鱼喵喵全能助手,加入全收集地图与图文说明

This commit is contained in:
Kitasami_Nya
2026-10-24 01:37:15 +08:00
parent 8f6ac4ff04
commit 3823e38b07
39 changed files with 2918 additions and 194 deletions
+9
View File
@@ -20,6 +20,15 @@ function contains(a, b) {
}
function validateConfig(config, gameDir) {
const next = { ...config };
// 独立工作区可显式指定游戏;旧版放在游戏/aitemp 下的布局仍然可用。
if (next.gameDir !== undefined) {
next.gameDir = canonical(String(next.gameDir).trim());
for (const name of ['package.json', 'index.html']) {
const file = path.join(next.gameDir, name);
if (!fs.existsSync(file) || !fs.statSync(file).isFile()) throw new Error('游戏目录不完整,缺少:' + file);
}
gameDir = next.gameDir;
}
for (const key of ['cdpPort', 'webPort']) {
const n = Number(next[key]);
if (!Number.isInteger(n) || n < 1024 || n > 65535) throw new Error(`${key} 必须是 1024~65535 的整数`);