mirror of
https://github.com/babalae/bettergi-scripts-list.git
synced 2026-05-22 22:45:50 +08:00
自动购买商品 3.3.6 (#3217)
* Remove update_settings.py and generate settings.json for automated item purchasing configuration * feat: 在快速购买中添加容量上限日志记录 * 自动购买商品 3.3.6 * chore: 更新版本号至 3.3.6 * fix: 修复周四商品刷新时间计算错误及购买记录覆盖问题
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
- **每周刷新商品**:每周刷新,可指定购买日
|
||||
- **记录系统**:避免重复购买,只购买刷新后的商品
|
||||
- **标签系统**:支持按标签批量禁用商人
|
||||
- **智能容量限制处理**(v3.3.4):当某个商品因“背包内容量已达上限”而购买失败时,脚本会自动记录该商品,**本次运行后续所有商人**都不会再尝试购买该商品,避免反复无效操作。
|
||||
|
||||
## ⚡ 快速开始
|
||||
|
||||
@@ -252,6 +253,29 @@ A: 游戏内的刷新时间是**每天凌晨4点**。脚本会考虑这个时间
|
||||
- 如果当前时间在4点前,视为前一天
|
||||
- 购买记录基于4点刷新时间计算
|
||||
|
||||
## 📅 更新日志
|
||||
<details>
|
||||
|
||||
- **修复**:周四刷新商品(狗粮商人)刷新时间计算错误
|
||||
- 之前周一至周三尝试购买周四商品时,刷新时间会被错误记录到下周四
|
||||
- 现在正确记录为本周四,购买成功后更新为下周四
|
||||
- **修复**:购买记录被覆盖的问题
|
||||
- 同类型商品的购买记录现在改为合并去重,不再覆盖原有记录
|
||||
|
||||
### v3.3.5
|
||||
- **新增**:已售罄商品识别与记录。
|
||||
- 自动识别售罄商品,会当作正常购买,正常记录 CD。
|
||||
- 即使运行前手动购买过,脚本也能正确识别并跳过,避免重复尝试购买。
|
||||
- **回退**:移除多选商品项目、回退至手动输入商品名称
|
||||
|
||||
### v3.3.4
|
||||
- **新增**:背包容量上限智能处理机制。
|
||||
- 当购买某商品时出现"当前物品在背包内的容量已达上限",脚本会自动将该商品加入黑名单。
|
||||
- 黑名单商品在**本次脚本运行的后续所有商人**中均会被跳过,不再尝试购买。
|
||||
- 该机制可避免因背包满而反复卡住,大幅提升执行效率。
|
||||
|
||||
</details>
|
||||
|
||||
## 🤝 贡献指南
|
||||
|
||||
欢迎提交新的商人和商品配置!
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 9.0 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 9.0 KiB |
@@ -9,7 +9,7 @@
|
||||
"bgi_version": "0.45.0",
|
||||
"description": "",
|
||||
"enable_monster_loot_split": false,
|
||||
"last_modified_time": 1766154459290,
|
||||
"last_modified_time": 1779104226494,
|
||||
"map_match_method": "",
|
||||
"map_name": "Teyvat",
|
||||
"name": "璃月-璃月港-张顺",
|
||||
@@ -42,6 +42,15 @@
|
||||
"id": 3,
|
||||
"move_mode": "dash",
|
||||
"type": "path",
|
||||
"x": 341.619140625,
|
||||
"y": -472.4951171875
|
||||
},
|
||||
{
|
||||
"action": "combat_script",
|
||||
"action_params": "wait(0.2)",
|
||||
"id": 4,
|
||||
"move_mode": "dash",
|
||||
"type": "target",
|
||||
"x": 340.1533203125,
|
||||
"y": -471.30517578125
|
||||
}
|
||||
|
||||
@@ -1,35 +1,49 @@
|
||||
{
|
||||
"info": {
|
||||
"name": "神奇的霍普金斯",
|
||||
"type": "collect",
|
||||
"authors": [],
|
||||
"version": "1.0",
|
||||
"description": "",
|
||||
"map_name": "Teyvat",
|
||||
"authors": [
|
||||
{
|
||||
"links": "",
|
||||
"name": "蜜柑魚"
|
||||
}
|
||||
],
|
||||
"bgi_version": "0.45.0",
|
||||
"tags": [],
|
||||
"last_modified_time": 1755552575866,
|
||||
"description": "",
|
||||
"enable_monster_loot_split": false,
|
||||
"map_match_method": ""
|
||||
"last_modified_time": 1775689234271,
|
||||
"map_match_method": "",
|
||||
"map_name": "Teyvat",
|
||||
"name": "蒙德-清泉镇-神奇的霍普金斯",
|
||||
"tags": [],
|
||||
"type": "collect",
|
||||
"version": "1.0"
|
||||
},
|
||||
"positions": [
|
||||
{
|
||||
"id": 1,
|
||||
"action": "",
|
||||
"action_params": "",
|
||||
"id": 1,
|
||||
"move_mode": "walk",
|
||||
"type": "teleport",
|
||||
"x": -867.2578125,
|
||||
"y": 1992.55078125,
|
||||
"action_params": ""
|
||||
"y": 1992.55078125
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"x": -874.9453125,
|
||||
"y": 1974.10888671875,
|
||||
"type": "target",
|
||||
"move_mode": "dash",
|
||||
"action": "",
|
||||
"action_params": ""
|
||||
"action_params": "",
|
||||
"id": 2,
|
||||
"move_mode": "dash",
|
||||
"type": "path",
|
||||
"x": -872.0007201646076,
|
||||
"y": 1981.375
|
||||
},
|
||||
{
|
||||
"action": "combat_script",
|
||||
"action_params": "wait(0.2)",
|
||||
"id": 3,
|
||||
"move_mode": "walk",
|
||||
"type": "target",
|
||||
"x": -874.9453125,
|
||||
"y": 1974.10888671875
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,3 +1,5 @@
|
||||
//3.3.6
|
||||
|
||||
// fakeLog 函数,使用方法:将本函数放在主函数前,调用时请务必使用await,否则可能出现v8白框报错
|
||||
// 在js开头处伪造该js结束运行的日志信息,如 await fakeLog("js脚本", true, true, 0);
|
||||
// 在js结尾处伪造该js开始运行的日志信息,如 await fakeLog("js脚本", true, false, 2333);
|
||||
@@ -114,6 +116,7 @@ let userFoodsToBuy = new Set();
|
||||
let userTagsToBuy = new Set(); // 标签名
|
||||
let allTags = new Set(); // 所有可用标签(从 npcs.json 收集)
|
||||
let requiredFoods = new Set(); // 所有需要加载图片的商品
|
||||
let capacityLimitedFoods = new Set(); // 存储因背包容量已达上限而不再购买的商品名
|
||||
|
||||
async function loadExternalData() {
|
||||
try {
|
||||
@@ -132,18 +135,9 @@ async function loadExternalData() {
|
||||
logConditional(`共收集到 ${allTags.size} 个标签`);
|
||||
|
||||
// ========== 解析用户输入 ==========
|
||||
let items = [];
|
||||
// 优先尝试读取新的列表配置
|
||||
if (settings.foodsToBuyList) {
|
||||
items = Array.from(settings.foodsToBuyList);
|
||||
} else if (typeof settings.foodsToBuy === 'string') {
|
||||
// 兼容旧配置
|
||||
items = (settings.foodsToBuy || "").trim().split(/[,\s、]+/).filter(item => item.trim() !== "");
|
||||
} else if (settings.foodsToBuy) {
|
||||
items = Array.from(settings.foodsToBuy);
|
||||
}
|
||||
|
||||
if (items.length > 0) {
|
||||
const foodsInput = (settings.foodsToBuy || "").trim();
|
||||
if (foodsInput) {
|
||||
const items = foodsInput.split(/[,\s、]+/).filter(item => item.trim() !== "");
|
||||
const enabledFoodsList = [];
|
||||
const enabledTagsList = [];
|
||||
|
||||
@@ -221,6 +215,50 @@ function filterUserFoods(foodList) {
|
||||
});
|
||||
}
|
||||
|
||||
// ==================== 辅助函数:检查容量上限消息 ====================
|
||||
async function checkCapacityLimitMessage() {
|
||||
let captureRegion = null;
|
||||
let returnValue = false;
|
||||
try {
|
||||
await sleep(100);
|
||||
captureRegion = captureGameRegion();
|
||||
// 在指定区域进行 OCR 识别
|
||||
let ocrObject = RecognitionObject.Ocr(1305, 860, 500, 100);
|
||||
let ocrResult = captureRegion.Find(ocrObject);
|
||||
if (ocrResult.isExist() && ocrResult.text.includes("当前物品在背包内的容量已达上限")) {
|
||||
returnValue = true;
|
||||
}
|
||||
} catch (e) {
|
||||
log.warn(`检查容量上限消息时出错: ${e.message}`);
|
||||
returnValue = false;
|
||||
} finally {
|
||||
if (captureRegion) captureRegion.dispose();
|
||||
}
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
// ==================== 辅助函数:检查“已售罄”消息 ====================
|
||||
async function checkSoldOutMessage() {
|
||||
let captureRegion = null;
|
||||
let returnValue = false;
|
||||
try {
|
||||
await sleep(100);
|
||||
captureRegion = captureGameRegion();
|
||||
// 在指定区域进行 OCR 识别(与容量上限提示区域相同,也可根据需要调整)
|
||||
let ocrObject = RecognitionObject.Ocr(1305, 860, 500, 100);
|
||||
let ocrResult = captureRegion.Find(ocrObject);
|
||||
if (ocrResult.isExist() && (ocrResult.text.includes("售罄"))) {
|
||||
returnValue = true;
|
||||
}
|
||||
} catch (e) {
|
||||
log.warn(`检查已售罄消息时出错: ${e.message}`);
|
||||
returnValue = false;
|
||||
} finally {
|
||||
if (captureRegion) captureRegion.dispose();
|
||||
}
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
// ==================== 辅助函数:获取调整后的星期几(1-7,周一为1) ====================
|
||||
function getAdjustedDayOfWeek() {
|
||||
const now = new Date();
|
||||
@@ -263,12 +301,16 @@ function getThursdayOfWeek(date) {
|
||||
d.setDate(d.getDate() - 1);
|
||||
}
|
||||
const day = d.getDay(); // 0=周日, 1=周一, 2=周二, 3=周三, 4=周四, 5=周五, 6=周六
|
||||
// 目标周四:如果当前<=周四,则取本周四;否则取下周四
|
||||
let targetDay = 4; // 周四对应的getDay值为4
|
||||
if (day <= targetDay) {
|
||||
let targetDay = 4;
|
||||
if (day < targetDay) {
|
||||
// 本周四
|
||||
d.setDate(d.getDate() + (targetDay - day));
|
||||
} else {
|
||||
} else if (day > targetDay) {
|
||||
// 下周四
|
||||
d.setDate(d.getDate() + (7 - day + targetDay));
|
||||
} else {
|
||||
// 当天是周四,已经过了4点,返回下周四
|
||||
d.setDate(d.getDate() + 7);
|
||||
}
|
||||
d.setHours(4, 0, 0, 0);
|
||||
return d;
|
||||
@@ -359,15 +401,7 @@ const ignoreRecords = settings.ignoreRecords || false;
|
||||
const recordDebug = settings.recordDebug || false;
|
||||
|
||||
// 解析禁用的标签列表
|
||||
let disabledTags = [];
|
||||
if (settings.disabledTagsList) {
|
||||
disabledTags = Array.from(settings.disabledTagsList);
|
||||
} else if (typeof settings.disabledTags === 'string') {
|
||||
disabledTags = (settings.disabledTags || "").split(/[,\s、]+/).filter(tag => tag.trim() !== "");
|
||||
} else if (settings.disabledTags) {
|
||||
disabledTags = Array.from(settings.disabledTags);
|
||||
}
|
||||
|
||||
const disabledTags = (settings.disabledTags || "").split(/[,\s、]+/).filter(tag => tag.trim() !== "");
|
||||
if (disabledTags.length > 0) {
|
||||
log.info(`已禁用标签: ${disabledTags.join(", ")}`);
|
||||
}
|
||||
@@ -447,24 +481,16 @@ function updateNpcRecord(records, npcName, refreshType, purchasedItems) {
|
||||
}
|
||||
|
||||
let record = getNpcRecord(records, npcName);
|
||||
|
||||
if (!record) {
|
||||
record = {
|
||||
npcname: npcName,
|
||||
"1d": [],
|
||||
"1d_time": null,
|
||||
"3d": [],
|
||||
"3d_time": null,
|
||||
"7d": [],
|
||||
"7d_time": null,
|
||||
"thu": [],
|
||||
"thu_time": null,
|
||||
"month": [],
|
||||
"month_time": null
|
||||
};
|
||||
record = { npcname: npcName };
|
||||
records.push(record);
|
||||
}
|
||||
|
||||
// 合并已购商品(去重),而非覆盖
|
||||
const existing = record[refreshType] || [];
|
||||
const merged = [...new Set([...existing, ...purchasedItems])];
|
||||
record[refreshType] = merged;
|
||||
|
||||
const now = new Date();
|
||||
let refreshTime;
|
||||
|
||||
@@ -510,14 +536,11 @@ function updateNpcRecord(records, npcName, refreshType, purchasedItems) {
|
||||
} else if (refreshType === "thu") {
|
||||
// 周四刷新商品:下次刷新是下周四
|
||||
refreshTime = getThursdayOfWeek(now);
|
||||
refreshTime.setDate(refreshTime.getDate() + 7);
|
||||
} else if (refreshType === "month") {
|
||||
// 每月1号刷新商品:下次刷新是下个月1号
|
||||
refreshTime = getNextMonthFirstDay(now);
|
||||
}
|
||||
|
||||
// 只更新实际购买的商品
|
||||
record[refreshType] = purchasedItems;
|
||||
record[`${refreshType}_time`] = formatDateToLocalISO(refreshTime);
|
||||
|
||||
// 计算下次刷新日期
|
||||
@@ -568,7 +591,6 @@ function shouldBuyFoods(npc, npcRecord, currentPeriod, forceRefresh = false) {
|
||||
|
||||
// 首先检查禁用(此处假设之前已检查过,但为防止遗漏,可再加一道保险)
|
||||
// 实际上禁用检查在更外层(initNpcData 和主循环)已经处理,这里可以省略
|
||||
|
||||
if (forceRefresh) {
|
||||
// 强制刷新:决定使用完整列表还是具体商品列表
|
||||
// 先判断是否命中标签
|
||||
@@ -576,20 +598,24 @@ function shouldBuyFoods(npc, npcRecord, currentPeriod, forceRefresh = false) {
|
||||
if (npc.tags && Array.isArray(npc.tags)) {
|
||||
useAll = npc.tags.some(tag => userTagsToBuy.has(tag));
|
||||
}
|
||||
|
||||
// 定义过滤函数
|
||||
const filterCapacity = (list) => (list || []).filter(food => !capacityLimitedFoods.has(food));
|
||||
|
||||
if (useAll) {
|
||||
// 标签商人:购买所有商品
|
||||
if (npc._1d_foods) foodsToBuy["1d"] = npc._1d_foods;
|
||||
if (npc._3d_foods) foodsToBuy["3d"] = npc._3d_foods;
|
||||
if (npc._7d_foods) foodsToBuy["7d"] = npc._7d_foods;
|
||||
if (npc._thu_foods) foodsToBuy["thu"] = npc._thu_foods;
|
||||
if (npc._month_foods) foodsToBuy["month"] = npc._month_foods;
|
||||
if (npc._1d_foods) foodsToBuy["1d"] = filterCapacity(npc._1d_foods);
|
||||
if (npc._3d_foods) foodsToBuy["3d"] = filterCapacity(npc._3d_foods);
|
||||
if (npc._7d_foods) foodsToBuy["7d"] = filterCapacity(npc._7d_foods);
|
||||
if (npc._thu_foods) foodsToBuy["thu"] = filterCapacity(npc._thu_foods);
|
||||
if (npc._month_foods) foodsToBuy["month"] = filterCapacity(npc._month_foods);
|
||||
} else {
|
||||
// 非标签商人:只购买用户明确指定的商品
|
||||
if (npc._1d_foods) foodsToBuy["1d"] = filterUserFoods(npc._1d_foods);
|
||||
if (npc._3d_foods) foodsToBuy["3d"] = filterUserFoods(npc._3d_foods);
|
||||
if (npc._7d_foods) foodsToBuy["7d"] = filterUserFoods(npc._7d_foods);
|
||||
if (npc._thu_foods) foodsToBuy["thu"] = filterUserFoods(npc._thu_foods);
|
||||
if (npc._month_foods) foodsToBuy["month"] = filterUserFoods(npc._month_foods);
|
||||
if (npc._1d_foods) foodsToBuy["1d"] = filterCapacity(filterUserFoods(npc._1d_foods));
|
||||
if (npc._3d_foods) foodsToBuy["3d"] = filterCapacity(filterUserFoods(npc._3d_foods));
|
||||
if (npc._7d_foods) foodsToBuy["7d"] = filterCapacity(filterUserFoods(npc._7d_foods));
|
||||
if (npc._thu_foods) foodsToBuy["thu"] = filterCapacity(filterUserFoods(npc._thu_foods));
|
||||
if (npc._month_foods) foodsToBuy["month"] = filterCapacity(filterUserFoods(npc._month_foods));
|
||||
}
|
||||
return foodsToBuy;
|
||||
}
|
||||
@@ -607,6 +633,8 @@ function shouldBuyFoods(npc, npcRecord, currentPeriod, forceRefresh = false) {
|
||||
|
||||
// 确定要购买的候选商品列表
|
||||
let candidateList = useAll ? fullList : filterUserFoods(fullList);
|
||||
// 过滤掉已标记容量上限的商品
|
||||
candidateList = candidateList.filter(food => !capacityLimitedFoods.has(food));
|
||||
if (candidateList.length === 0) return [];
|
||||
|
||||
// 获取已购买列表
|
||||
@@ -737,7 +765,7 @@ async function nextFoodsPage() {
|
||||
}
|
||||
|
||||
// 快速购买
|
||||
async function qucikBuy() {
|
||||
async function quickBuy(itemName) {
|
||||
//设置脚本环境的游戏分辨率和DPI缩放
|
||||
setGameMetrics(3840, 2160, 1.5);
|
||||
|
||||
@@ -755,8 +783,22 @@ async function qucikBuy() {
|
||||
captureRegion.dispose();
|
||||
|
||||
if (buyBtn.isEmpty()) {
|
||||
log.warn("未找到购买按钮");
|
||||
return false;
|
||||
// 未找到购买按钮 -> 可能容量已满或售罄
|
||||
let isCapacityFull = await checkCapacityLimitMessage();
|
||||
if (isCapacityFull) {
|
||||
capacityLimitedFoods.add(itemName);
|
||||
log.info(`[容量上限] 商品 "${itemName}" 触发背包容量已达上限,后续将不再购买。`);
|
||||
// 交互或拾取:"XXXX"
|
||||
await fakeLog(`${itemName} 已达上限`, false, false, 23333);
|
||||
return 'capacity';
|
||||
}
|
||||
// 非容量问题,可能售罄导致按钮消失?仍尝试检测售罄消息
|
||||
let isSoldOut = await checkSoldOutMessage();
|
||||
if (isSoldOut) {
|
||||
log.info(`[已售罄] 商品 "${itemName}" 已售罄`);
|
||||
return 'sold_out';
|
||||
}
|
||||
return 'error';
|
||||
}
|
||||
|
||||
// 点击购买按钮
|
||||
@@ -785,10 +827,10 @@ async function qucikBuy() {
|
||||
click(buyBtnX, buyBtnY);
|
||||
await sleep(200);
|
||||
|
||||
return true;
|
||||
return 'success';
|
||||
} catch (error) {
|
||||
log.error(`快速购买失败: ${error.message}`);
|
||||
return false;
|
||||
return 'error';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -815,16 +857,18 @@ async function spikChat(npcName) {
|
||||
|
||||
// 点击有什么卖的
|
||||
let captureRegion = captureGameRegion()
|
||||
let resList = captureRegion.findMulti(RecognitionObject.ocrThis);
|
||||
for (let i = 0; i < resList.count; i++) {
|
||||
if (resList[i].text.includes("有什么卖的") || resList[i].text.includes("可以卖一些")) {
|
||||
await sleep(500);
|
||||
click(resList[i].x + 30, resList[i].y + 30); // 点击有什么卖的
|
||||
await sleep(500);
|
||||
|
||||
// 使用完后释放资源
|
||||
captureRegion.dispose();
|
||||
try {
|
||||
let resList = captureRegion.findMulti(RecognitionObject.ocrThis);
|
||||
for (let i = 0; i < resList.count; i++) {
|
||||
if (resList[i].text.includes("有什么卖的") || resList[i].text.includes("可以卖一些")) {
|
||||
await sleep(500);
|
||||
click(resList[i].x + 30, resList[i].y + 30);
|
||||
await sleep(500);
|
||||
break; // 找到后跳出循环
|
||||
}
|
||||
}
|
||||
} finally {
|
||||
captureRegion.dispose();
|
||||
}
|
||||
|
||||
await sleep(1500);
|
||||
@@ -955,6 +999,11 @@ async function buyFoods(npcName, npcRecords, currentPeriod) {
|
||||
|
||||
// 匹配商品
|
||||
for (let item of tempFoods) {
|
||||
if (capacityLimitedFoods.has(item)) {
|
||||
if (recordDebug) log.info(`[调试] 跳过已容量上限的商品: ${item}`);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (recordDebug) {
|
||||
log.info(`[调试] 尝试购买: ${item}`);
|
||||
}
|
||||
@@ -976,10 +1025,22 @@ async function buyFoods(npcName, npcRecords, currentPeriod) {
|
||||
boughtFoods.add(item);
|
||||
// 点击商品
|
||||
click(res.x * 2 + res.width, res.y * 2 + res.height);
|
||||
if (await qucikBuy()) {
|
||||
log.info(`购买成功: ${item}`);
|
||||
// 交互或拾取:"XXXX"
|
||||
await fakeLog(item, false, false, 23333);
|
||||
let buyResult = await quickBuy(item);
|
||||
if (buyResult === 'success' || buyResult === 'sold_out') {
|
||||
if (buyResult === 'success') {
|
||||
log.info(`购买成功: ${item}`);
|
||||
} else {
|
||||
log.info(`商品已售罄,已记录CD: ${item}`);
|
||||
}
|
||||
// 交互或拾取提示(售罄时已在 quickBuy 中调用 fakeLog,此处避免重复)
|
||||
if (buyResult === 'success') {
|
||||
// 交互或拾取:"XXXX"
|
||||
await fakeLog(item, false, false, 23333);
|
||||
} else if (buyResult === 'sold_out') {
|
||||
// 交互或拾取:"XXXX 已销售"
|
||||
await fakeLog(`${item} 已销售`, false, false, 23333);
|
||||
}
|
||||
|
||||
|
||||
// 记录购买的商品
|
||||
purchasedFoods.push(item);
|
||||
@@ -994,10 +1055,19 @@ async function buyFoods(npcName, npcRecords, currentPeriod) {
|
||||
|
||||
await sleep(1500);
|
||||
// 重新截图
|
||||
captureRegion = captureGameRegion();
|
||||
captureRegion.dispose(); // 释放旧截图
|
||||
captureRegion = captureGameRegion(); // 重新截图
|
||||
}
|
||||
else {
|
||||
else if (buyResult === 'capacity') {
|
||||
log.info(`购买失败: ${item}, 背包已经满或商品已售罄`);
|
||||
// 如果失败是因为容量上限(quickBuy 内部已加入黑名单),立即从临时列表中移除
|
||||
if (capacityLimitedFoods.has(item)) {
|
||||
tempFoods = tempFoods.filter(f => f !== item);
|
||||
// 因为数组改变了,需要重新截图并跳出本次循环重新开始
|
||||
captureRegion.dispose(); // 释放旧截图
|
||||
captureRegion = captureGameRegion(); // 重新截图
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1020,9 +1090,9 @@ async function buyFoods(npcName, npcRecords, currentPeriod) {
|
||||
}
|
||||
|
||||
if (purchasedFoods.length > 0) {
|
||||
log.info(`${displayName} 购买完成,成功购买: ${purchasedFoods.join(", ")}`);
|
||||
log.info(`${displayName} 购买完成,已购买: ${purchasedFoods.join(", ")}`);
|
||||
} else {
|
||||
logConditional(`${displayName} 没有成功购买任何商品`);
|
||||
logConditional(`${displayName} 没有购买任何商品`);
|
||||
}
|
||||
|
||||
// 返回购买结果
|
||||
@@ -1076,6 +1146,8 @@ async function initNpcData(records) {
|
||||
}
|
||||
|
||||
(async function () {
|
||||
// 重置容量限制集合
|
||||
capacityLimitedFoods.clear();
|
||||
try {
|
||||
// ==================== 确定账号名 ====================
|
||||
let rawUserName = settings.userName ? settings.userName.trim() : "";
|
||||
@@ -1150,6 +1222,21 @@ async function initNpcData(records) {
|
||||
let npcIndex = 0;
|
||||
for (let [key, npc] of Object.entries(npcData)) {
|
||||
if (npc.enable) {
|
||||
|
||||
// 动态检查:考虑当前黑名单后,是否还有商品需要购买
|
||||
const npcRecord = getNpcRecord(npcRecords, npc.name);
|
||||
const foodsToBuyNow = shouldBuyFoods(npc, npcRecord, currentPeriod, ignoreRecords);
|
||||
const hasAnyToBuy = foodsToBuyNow["1d"].length > 0 ||
|
||||
foodsToBuyNow["3d"].length > 0 ||
|
||||
foodsToBuyNow["7d"].length > 0 ||
|
||||
foodsToBuyNow["thu"].length > 0 ||
|
||||
foodsToBuyNow["month"].length > 0;
|
||||
|
||||
if (!hasAnyToBuy) {
|
||||
logConditional(`跳过商人 ${getDisplayNameFromPath(npc.path)}:所有需要购买的商品均已被容量上限限制`);
|
||||
continue;
|
||||
}
|
||||
|
||||
npcIndex++;
|
||||
// 获取显示名称(从路径中提取)
|
||||
const displayName = getDisplayNameFromPath(npc.path);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"manifest_version": 1,
|
||||
"name": "自动购买商品",
|
||||
"version": "3.3.3",
|
||||
"version": "3.3.6",
|
||||
"bgi_version": "0.60.1",
|
||||
"description": "自动购买商品\n每天刷新商品:自动购买商品\n3天刷新商品:未到刷新日不购买该商品\n每周刷新商品:可指定每周购买商品",
|
||||
"authors": [
|
||||
@@ -20,7 +20,4 @@
|
||||
],
|
||||
"settings_ui": "settings.json",
|
||||
"main": "main.js"
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
|
||||
@@ -2,157 +2,22 @@
|
||||
{
|
||||
"name": "userName",
|
||||
"type": "input-text",
|
||||
"label": "账号名(用于区分不同账户的记录)\\n为空则读取uid作为自定义CD记录标识",
|
||||
"label": "账号名(用于区分不同账户的记录)\n为空则读取uid作为自定义CD记录标识",
|
||||
"default": "默认账户"
|
||||
},
|
||||
{
|
||||
"name": "foodsToBuyList",
|
||||
"type": "multi-checkbox",
|
||||
"label": "要购买的商品",
|
||||
"options": [
|
||||
"「四方八方之网」",
|
||||
"「皮拉米达的夜莺」",
|
||||
"云岩裂叶",
|
||||
"兽肉",
|
||||
"冒险家之花",
|
||||
"冒险家头带",
|
||||
"冒险家尾羽",
|
||||
"冒险家怀表",
|
||||
"冒险家金杯",
|
||||
"冰钩钩果汁",
|
||||
"冰雾花花朵",
|
||||
"劫波莲",
|
||||
"卷心菜",
|
||||
"发酵果实汁",
|
||||
"咖啡豆",
|
||||
"嘟嘟莲",
|
||||
"团子牛奶",
|
||||
"土豆",
|
||||
"圣水",
|
||||
"培根",
|
||||
"堇瓜",
|
||||
"塞西莉亚花",
|
||||
"墩墩桃",
|
||||
"夜泊石",
|
||||
"大碗茶",
|
||||
"奶油",
|
||||
"奶酪",
|
||||
"宿影花",
|
||||
"小灯草",
|
||||
"小麦",
|
||||
"帕蒂沙兰",
|
||||
"幸运儿之杯",
|
||||
"幸运儿沙漏",
|
||||
"幸运儿绿花",
|
||||
"幸运儿银冠",
|
||||
"幸运儿鹰羽",
|
||||
"微光角菌",
|
||||
"慕风蘑菇",
|
||||
"日落果",
|
||||
"星蕈",
|
||||
"星螺",
|
||||
"杏仁",
|
||||
"松茸",
|
||||
"果酱",
|
||||
"枣椰",
|
||||
"枫达",
|
||||
"树王圣体菇",
|
||||
"树莓薄荷饮",
|
||||
"气泡酸莓汁",
|
||||
"水晶块",
|
||||
"汐藻",
|
||||
"沉玉仙茗",
|
||||
"泡泡桔",
|
||||
"洋葱",
|
||||
"浪沫羽鳃",
|
||||
"海灵芝",
|
||||
"海草",
|
||||
"海露花",
|
||||
"清心",
|
||||
"清水玉",
|
||||
"游医的怀钟",
|
||||
"游医的方巾",
|
||||
"游医的枭羽",
|
||||
"游医的药壶",
|
||||
"游医的银莲",
|
||||
"澄晶实",
|
||||
"火腿",
|
||||
"灼灼彩菊",
|
||||
"烈焰花花蕊",
|
||||
"烛伞蘑菇",
|
||||
"烬芯花",
|
||||
"熏禽肉",
|
||||
"牛奶",
|
||||
"特制风味烤蘑菇披萨",
|
||||
"珊瑚真珠",
|
||||
"琉璃百合",
|
||||
"琉璃袋",
|
||||
"琉鳞石",
|
||||
"甜甜花",
|
||||
"电气水晶",
|
||||
"番茄",
|
||||
"白萝卜",
|
||||
"白铁块",
|
||||
"盐",
|
||||
"石珀",
|
||||
"禽肉",
|
||||
"秃秃豆",
|
||||
"稻米",
|
||||
"竹笋",
|
||||
"糖",
|
||||
"绝云椒椒",
|
||||
"肉龙掌",
|
||||
"胡椒",
|
||||
"胡萝卜",
|
||||
"苍晶螺",
|
||||
"苦种",
|
||||
"苹果",
|
||||
"苹果酿",
|
||||
"茉洁草",
|
||||
"莲蓬",
|
||||
"萃凝晶",
|
||||
"落落莓",
|
||||
"蒲公英籽",
|
||||
"薄荷",
|
||||
"蘑菇",
|
||||
"虹彩蔷薇",
|
||||
"虾仁",
|
||||
"螃蟹",
|
||||
"蟹黄",
|
||||
"豆腐",
|
||||
"边陲之地",
|
||||
"野浆果之路",
|
||||
"金鱼草",
|
||||
"钩钩果",
|
||||
"铁块",
|
||||
"霄灯",
|
||||
"霓裳花",
|
||||
"霜盏花",
|
||||
"青蜜莓",
|
||||
"面粉",
|
||||
"颗粒果",
|
||||
"风车菊",
|
||||
"香肠",
|
||||
"香辛料",
|
||||
"香辛果",
|
||||
"马尾",
|
||||
"鱼肉",
|
||||
"鱼肉2",
|
||||
"鳗肉",
|
||||
"鸟蛋",
|
||||
"鸣草",
|
||||
"黄油",
|
||||
"黑麦"
|
||||
],
|
||||
"default": [
|
||||
"小麦",
|
||||
"黑麦"
|
||||
]
|
||||
"type": "separator"
|
||||
},
|
||||
{
|
||||
"name": "foodsToBuy",
|
||||
"type": "input-text",
|
||||
"label": "支援的 商人与商品详细 请前往 README.md 查看\n建议直接复制商品名称贴上输入栏\n\n要购买的商品(多个商品用空格分隔)\n示例:\"小麦 黑麦\"",
|
||||
"default": "小麦 黑麦"
|
||||
},
|
||||
{
|
||||
"name": "AKF",
|
||||
"type": "select",
|
||||
"label": "每周商品购买方式\\n0=跟随系统周期自动判定\\n1-7=指定星期几购买(1=周一,7=周日)",
|
||||
"label": "每周商品购买方式\n0=跟随系统周期自动判定\n1-7=指定星期几购买(1=周一,7=周日)",
|
||||
"options": [
|
||||
"0",
|
||||
"1",
|
||||
@@ -166,127 +31,13 @@
|
||||
"default": "0"
|
||||
},
|
||||
{
|
||||
"name": "disabledTagsList",
|
||||
"type": "multi-checkbox",
|
||||
"label": "禁用标签",
|
||||
"options": [
|
||||
"东升",
|
||||
"丰泰",
|
||||
"丽切娅",
|
||||
"伊蜜",
|
||||
"克洛莎",
|
||||
"克罗丽丝",
|
||||
"兰巴德",
|
||||
"兰巴德酒馆",
|
||||
"兰玛尼",
|
||||
"凯叔",
|
||||
"化城郭",
|
||||
"博来",
|
||||
"卡嘉",
|
||||
"卡琵莉亚",
|
||||
"卯师父",
|
||||
"哈马维",
|
||||
"圣火竞技场",
|
||||
"坚岩隘谷",
|
||||
"夏安卡",
|
||||
"天使的馈赠",
|
||||
"奥摩斯港",
|
||||
"安特曼",
|
||||
"小畑",
|
||||
"小白",
|
||||
"山城健太",
|
||||
"巴巴克",
|
||||
"布兰琪",
|
||||
"布希柯",
|
||||
"布特罗斯",
|
||||
"布纳马",
|
||||
"张顺",
|
||||
"德波大饭店",
|
||||
"德米安",
|
||||
"志村勘兵卫",
|
||||
"恩忒卡",
|
||||
"悠悠度假村",
|
||||
"拉玛",
|
||||
"挪德卡莱",
|
||||
"旗舰",
|
||||
"普斯帕咖啡馆",
|
||||
"智树",
|
||||
"望舒客栈",
|
||||
"木南杏奈",
|
||||
"朱特",
|
||||
"朱老板",
|
||||
"杜拉夫",
|
||||
"枫丹",
|
||||
"枫丹廷",
|
||||
"查尔斯",
|
||||
"桑格内蒂",
|
||||
"桓那兰那(梦境)",
|
||||
"欧仁妮",
|
||||
"海祇岛",
|
||||
"清子",
|
||||
"清泉镇",
|
||||
"灰河",
|
||||
"狗粮商人",
|
||||
"独立地图",
|
||||
"珀姆",
|
||||
"琳琅",
|
||||
"琼玑野",
|
||||
"璃月",
|
||||
"璃月港",
|
||||
"白淞镇",
|
||||
"白狐之野",
|
||||
"皮托",
|
||||
"皮拉米达城",
|
||||
"石头",
|
||||
"石榴",
|
||||
"石门",
|
||||
"神奇的霍普金斯",
|
||||
"离岛",
|
||||
"秋月",
|
||||
"秋蔚",
|
||||
"科菲策",
|
||||
"移动",
|
||||
"稀少商品",
|
||||
"稻妻",
|
||||
"稻妻城",
|
||||
"穆托莉娜",
|
||||
"纳塔",
|
||||
"老周叔",
|
||||
"老孙",
|
||||
"老高",
|
||||
"艾库瓦",
|
||||
"芙萝拉",
|
||||
"若紫",
|
||||
"莎拉",
|
||||
"菲尔戈黛特",
|
||||
"葵",
|
||||
"蒙德",
|
||||
"蒙德城",
|
||||
"路易",
|
||||
"轻策庄",
|
||||
"连芳",
|
||||
"遗珑埠",
|
||||
"那夏镇",
|
||||
"采若",
|
||||
"钦特利",
|
||||
"锈舵酒馆",
|
||||
"长顺",
|
||||
"阿什帕齐",
|
||||
"阿夫辛",
|
||||
"阿如村",
|
||||
"阿山婆",
|
||||
"阿扎莱",
|
||||
"阿桂",
|
||||
"阿鲁埃",
|
||||
"雷科",
|
||||
"须弥",
|
||||
"须弥城",
|
||||
"风起地",
|
||||
"黑心商人"
|
||||
],
|
||||
"default": [
|
||||
"卡琵莉亚"
|
||||
]
|
||||
"name": "disabledTags",
|
||||
"type": "input-text",
|
||||
"label": "禁用标签\n(多个标签以空格分隔,如: 挪德卡莱 黑心商人 卡琵莉亚)",
|
||||
"default": "卡琵莉亚"
|
||||
},
|
||||
{
|
||||
"type": "separator"
|
||||
},
|
||||
{
|
||||
"name": "skip",
|
||||
@@ -297,7 +48,7 @@
|
||||
{
|
||||
"name": "ignoreRecords",
|
||||
"type": "checkbox",
|
||||
"label": "-----------------\\n无视记录强制购买(不推荐)",
|
||||
"label": "无视记录强制购买(不推荐)",
|
||||
"default": false
|
||||
},
|
||||
{
|
||||
|
||||
@@ -1,750 +0,0 @@
|
||||
import json
|
||||
import os
|
||||
|
||||
# Content of npcs.json
|
||||
npcs_content = """
|
||||
{
|
||||
"克罗丽丝": {
|
||||
"name": "克罗丽丝",
|
||||
"enable": true,
|
||||
"page": 1,
|
||||
"time": "any",
|
||||
"path": "assets/path/蒙德-风起地-克罗丽丝.json",
|
||||
"_3d_foods": ["金鱼草", "薄荷", "钩钩果","落落莓","慕风蘑菇"],
|
||||
"tags": ["蒙德", "风起地", "克罗丽丝", "移动"]
|
||||
},
|
||||
"神奇的霍普金斯": {
|
||||
"name": "神奇的霍普金斯",
|
||||
"enable": true,
|
||||
"page": 2,
|
||||
"time": "day",
|
||||
"path": "assets/path/蒙德-清泉镇-神奇的霍普金斯.json",
|
||||
"_1d_foods": ["圣水"],
|
||||
"tags": ["蒙德", "清泉镇", "神奇的霍普金斯", "稀少商品"]
|
||||
},
|
||||
"杜拉夫": {
|
||||
"name": "杜拉夫",
|
||||
"enable": true,
|
||||
"page": 1,
|
||||
"time": "day",
|
||||
"path": "assets/path/蒙德-清泉镇-杜拉夫.json",
|
||||
"_1d_foods": ["兽肉", "禽肉", "鸟蛋"],
|
||||
"tags": ["蒙德", "清泉镇", "杜拉夫"]
|
||||
},
|
||||
"Blanche": {
|
||||
"name": "布兰琪",
|
||||
"enable": true,
|
||||
"page": 2,
|
||||
"time": "night",
|
||||
"path": "assets/path/蒙德-蒙德城-布兰琪.json",
|
||||
"_1d_foods": ["盐", "胡椒", "洋葱", "牛奶", "番茄", "卷心菜", "土豆", "小麦"],
|
||||
"tags": ["蒙德", "蒙德城", "布兰琪"]
|
||||
},
|
||||
"莎拉": {
|
||||
"name": "莎拉",
|
||||
"enable": true,
|
||||
"page": 4,
|
||||
"time": "night",
|
||||
"path": "assets/path/蒙德-蒙德城-莎拉.json",
|
||||
"_7d_foods": ["面粉","奶油","熏禽肉","黄油","火腿","糖","蟹黄","果酱","奶酪","培根","香肠"],
|
||||
"tags": ["蒙德", "蒙德城", "莎拉"]
|
||||
},
|
||||
"芙萝拉": {
|
||||
"name": "芙萝拉",
|
||||
"enable": true,
|
||||
"page": 1,
|
||||
"time": "day",
|
||||
"path": "assets/path/蒙德-蒙德城-芙萝拉.json",
|
||||
"_3d_foods": ["甜甜花", "风车菊", "塞西莉亚花", "小灯草", "嘟嘟莲"],
|
||||
"tags": ["蒙德", "蒙德城", "芙萝拉"]
|
||||
},
|
||||
"石榴": {
|
||||
"name": "石榴",
|
||||
"enable": true,
|
||||
"page": 1,
|
||||
"time": "any",
|
||||
"path": "assets/path/蒙德-蒙德城-石榴.json",
|
||||
"_thu_foods": ["冒险家金杯", "冒险家尾羽", "冒险家头带", "冒险家之花", "冒险家怀表"],
|
||||
"tags": ["蒙德", "蒙德城", "石榴", "狗粮商人"]
|
||||
},
|
||||
"查尔斯": {
|
||||
"name": "查尔斯",
|
||||
"enable": true,
|
||||
"page": 1,
|
||||
"time": "any",
|
||||
"path": "assets/path/蒙德-蒙德城-天使的馈赠-查尔斯.json",
|
||||
"_1d_foods": ["冰钩钩果汁", "树莓薄荷饮", "苹果酿", "气泡酸莓汁"],
|
||||
"tags": ["蒙德", "蒙德城", "天使的馈赠", "查尔斯", "独立地图", "稀少商品"]
|
||||
},
|
||||
"阿山婆": {
|
||||
"name": "阿山婆",
|
||||
"enable": true,
|
||||
"page": 2,
|
||||
"time": "any",
|
||||
"path": "assets/path/璃月-璃月港-阿山婆.json",
|
||||
"_1d_foods": ["霄灯"],
|
||||
"tags": ["璃月", "璃月港", "阿山婆"]
|
||||
},
|
||||
"石头": {
|
||||
"name": "石头",
|
||||
"enable": true,
|
||||
"page": 1,
|
||||
"time": "any",
|
||||
"path": "assets/path/璃月-璃月港-石头.json",
|
||||
"_1d_foods": ["铁块", "白铁块", "夜泊石"],
|
||||
"tags": ["璃月", "璃月港", "石头"]
|
||||
},
|
||||
"DongSheng": {
|
||||
"name": "东升",
|
||||
"enable": true,
|
||||
"page": 2,
|
||||
"time": "any",
|
||||
"path": "assets/path/璃月-璃月港-东升.json",
|
||||
"_1d_foods": ["盐", "胡椒", "洋葱", "牛奶", "番茄", "卷心菜", "土豆", "小麦", "稻米", "虾仁", "豆腐", "杏仁" ],
|
||||
"tags": ["璃月", "璃月港", "东升"]
|
||||
},
|
||||
"ChefMao": {
|
||||
"name": "卯师父",
|
||||
"enable": true,
|
||||
"page": 5,
|
||||
"time": "any",
|
||||
"path": "assets/path/璃月-璃月港-卯师父.json",
|
||||
"_1d_foods": ["鱼肉", "螃蟹"],
|
||||
"_3d_foods": ["竹笋", "莲蓬", "松茸", "蘑菇", "胡萝卜", "白萝卜", "绝云椒椒"],
|
||||
"_7d_foods": ["面粉","糖","香肠","火腿"],
|
||||
"tags": ["璃月", "璃月港", "卯师父"]
|
||||
},
|
||||
"UncleSun": {
|
||||
"name": "老孙",
|
||||
"enable": true,
|
||||
"page": 1,
|
||||
"time": "day",
|
||||
"path": "assets/path/璃月-璃月港-老孙.json",
|
||||
"_1d_foods": ["鱼肉", "螃蟹", "虾仁"],
|
||||
"tags": ["璃月", "璃月港", "老孙"]
|
||||
},
|
||||
"UncleGao": {
|
||||
"name": "老高",
|
||||
"enable": true,
|
||||
"page": 1,
|
||||
"time": "day",
|
||||
"path": "assets/path/璃月-璃月港-老高.json",
|
||||
"_1d_foods": ["鱼肉","鱼肉2"],
|
||||
"tags": ["璃月", "璃月港", "老高"]
|
||||
},
|
||||
"长顺": {
|
||||
"name": "长顺",
|
||||
"enable": true,
|
||||
"page": 1,
|
||||
"time": "day",
|
||||
"path": "assets/path/璃月-璃月港-长顺.json",
|
||||
"_1d_foods": ["土豆"],
|
||||
"_3d_foods": ["石珀", "电气水晶"],
|
||||
"_7d_foods": ["糖", "奶酪"],
|
||||
"tags": ["璃月", "璃月港", "长顺"]
|
||||
},
|
||||
"琳琅": {
|
||||
"name": "琳琅",
|
||||
"enable": true,
|
||||
"page": 1,
|
||||
"time": "night",
|
||||
"path": "assets/path/璃月-璃月港-琳琅.json",
|
||||
"_thu_foods": ["游医的药壶" ,"游医的枭羽" ,"游医的方巾" ,"游医的银莲" ,"游医的怀钟"],
|
||||
"tags": ["璃月", "璃月港", "琳琅", "狗粮商人"]
|
||||
},
|
||||
"张顺": {
|
||||
"name": "张顺",
|
||||
"enable": true,
|
||||
"page": 1,
|
||||
"time": "any",
|
||||
"path": "assets/path/璃月-璃月港-张顺.json",
|
||||
"_thu_foods": ["幸运儿之杯", "幸运儿鹰羽", "幸运儿银冠", "幸运儿绿花", "幸运儿沙漏"],
|
||||
"tags": ["璃月", "璃月港", "张顺", "狗粮商人"]
|
||||
},
|
||||
"博来": {
|
||||
"name": "博来",
|
||||
"enable": true,
|
||||
"page": 1,
|
||||
"time": "any",
|
||||
"path": "assets/path/璃月-璃月港-博来.json",
|
||||
"_3d_foods": ["苹果", "日落果", "鱼肉", "星螺"],
|
||||
"tags": ["璃月", "璃月港", "博来"]
|
||||
},
|
||||
"阿桂": {
|
||||
"name": "阿桂",
|
||||
"enable": true,
|
||||
"page": 2,
|
||||
"time": "night",
|
||||
"path": "assets/path/璃月-璃月港-阿桂.json",
|
||||
"_3d_foods": ["清心", "琉璃袋", "马尾", "莲蓬", "冰雾花花朵", "烈焰花花蕊"],
|
||||
"tags": ["璃月", "璃月港", "阿桂"]
|
||||
},
|
||||
"朱老板": {
|
||||
"name": "朱老板",
|
||||
"enable": true,
|
||||
"page": 1,
|
||||
"time": "any",
|
||||
"path": "assets/path/璃月-琼玑野-朱老板.json",
|
||||
"_1d_foods": ["大碗茶"],
|
||||
"tags": ["璃月", "琼玑野", "朱老板", "稀少商品"]
|
||||
},
|
||||
"菲尔戈黛特": {
|
||||
"name": "菲尔戈黛特",
|
||||
"enable": true,
|
||||
"page": 2,
|
||||
"time": "any",
|
||||
"path": "assets/path/璃月-望舒客栈-菲尔戈黛特.json",
|
||||
"_3d_foods": ["松茸","霓裳花", "琉璃袋"],
|
||||
"_7d_foods": ["黄油", "香肠"],
|
||||
"tags": ["璃月", "望舒客栈", "菲尔戈黛特"]
|
||||
},
|
||||
"老周叔": {
|
||||
"name": "老周叔",
|
||||
"enable": true,
|
||||
"page": 1,
|
||||
"time": "any",
|
||||
"path": "assets/path/璃月-石门-老周叔.json",
|
||||
"_1d_foods": ["大碗茶"],
|
||||
"tags": ["璃月", "石门", "老周叔", "稀少商品"]
|
||||
},
|
||||
"小白": {
|
||||
"name": "小白",
|
||||
"enable": true,
|
||||
"page": 2,
|
||||
"time": "any",
|
||||
"path": "assets/path/璃月-轻策庄-小白.json",
|
||||
"_3d_foods": ["豆腐", "杏仁", "霓裳花"],
|
||||
"_month_foods": ["琉璃百合"],
|
||||
"tags": ["璃月", "轻策庄", "小白"]
|
||||
},
|
||||
"凯叔": {
|
||||
"name": "凯叔",
|
||||
"enable": true,
|
||||
"page": 1,
|
||||
"time": "day",
|
||||
"path": "assets/path/璃月-轻策庄-凯叔.json",
|
||||
"_1d_foods": ["大碗茶"],
|
||||
"tags": ["璃月", "轻策庄", "凯叔", "稀少商品"]
|
||||
},
|
||||
"丰泰": {
|
||||
"name": "丰泰",
|
||||
"enable": true,
|
||||
"page": 2,
|
||||
"time": "any",
|
||||
"path": "assets/path/璃月-遗珑埠-丰泰.json",
|
||||
"_1d_foods": ["稻米","豆腐"],
|
||||
"_3d_foods": [ "清水玉","石珀","夜泊石","琉璃袋", "霓裳花", "绝云椒椒","沉玉仙茗"],
|
||||
"_7d_foods": ["蟹黄"],
|
||||
"tags": ["璃月", "遗珑埠", "丰泰"]
|
||||
},
|
||||
"连芳": {
|
||||
"name": "连芳",
|
||||
"enable": true,
|
||||
"page": 2,
|
||||
"time": "any",
|
||||
"path": "assets/path/璃月-遗珑埠-连芳.json",
|
||||
"_3d_foods": ["沉玉仙茗"],
|
||||
"tags": ["璃月", "遗珑埠", "连芳"]
|
||||
},
|
||||
"Obata": {
|
||||
"name": "小畑",
|
||||
"enable": true,
|
||||
"page": 1,
|
||||
"time": "any",
|
||||
"path": "assets/path/稻妻-离岛-小畑.json",
|
||||
"_1d_foods": ["螃蟹","鱼肉", "虾仁"],
|
||||
"_3d_foods": ["海灵芝"],
|
||||
"tags": ["稻妻", "离岛", "小畑"]
|
||||
},
|
||||
"秋月": {
|
||||
"name": "秋月",
|
||||
"enable": true,
|
||||
"page": 1,
|
||||
"time": "any",
|
||||
"path": "assets/path/稻妻-离岛-秋月.json",
|
||||
"_1d_foods": ["铁块", "白铁块", "电气水晶"],
|
||||
"tags": ["稻妻", "离岛", "秋月"]
|
||||
},
|
||||
"山城健太": {
|
||||
"name": "山城健太",
|
||||
"enable": true,
|
||||
"page": 1,
|
||||
"time": "any",
|
||||
"path": "assets/path/稻妻-离岛-山城健太.json",
|
||||
"_1d_foods": ["鳗肉"],
|
||||
"_3d_foods": ["珊瑚真珠"],
|
||||
"_thu_foods": ["幸运儿之杯", "幸运儿鹰羽", "幸运儿银冠", "幸运儿绿花", "幸运儿沙漏"],
|
||||
"tags": ["稻妻", "离岛", "山城健太", "狗粮商人"]
|
||||
},
|
||||
"卡琵莉亚": {
|
||||
"name": "卡琵莉亚",
|
||||
"enable": true,
|
||||
"page": 1,
|
||||
"time": "any",
|
||||
"path": "assets/path/稻妻-离岛-卡琵莉亚.json",
|
||||
"_3d_foods": ["蒲公英籽"],
|
||||
"tags": ["稻妻", "离岛", "卡琵莉亚"]
|
||||
},
|
||||
"若紫": {
|
||||
"name": "若紫",
|
||||
"enable": true,
|
||||
"page": 1,
|
||||
"time": "any",
|
||||
"path": "assets/path/稻妻-白狐之野-若紫.json",
|
||||
"_7d_foods": ["「四方八方之网」"],
|
||||
"tags": ["稻妻", "白狐之野", "若紫"]
|
||||
},
|
||||
"Aoi": {
|
||||
"name": "葵",
|
||||
"enable": true,
|
||||
"page": 2,
|
||||
"time": "any",
|
||||
"path": "assets/path/稻妻-稻妻城-葵.json",
|
||||
"_1d_foods": ["盐", "胡椒", "洋葱", "牛奶", "番茄", "卷心菜", "土豆", "小麦", "稻米", "虾仁", "豆腐"],
|
||||
"_3d_foods": ["鸣草"],
|
||||
"tags": ["稻妻", "稻妻城", "葵"]
|
||||
},
|
||||
"ShimuraKanbei": {
|
||||
"name": "志村勘兵卫",
|
||||
"enable": true,
|
||||
"page": 4,
|
||||
"time": "any",
|
||||
"path": "assets/path/稻妻-稻妻城-志村勘兵卫.json",
|
||||
"_1d_foods": ["鱼肉", "螃蟹"],
|
||||
"_3d_foods": ["海草", "堇瓜", "白萝卜"],
|
||||
"_7d_foods": ["香肠", "培根", "面粉", "糖"],
|
||||
"tags": ["稻妻", "稻妻城", "志村勘兵卫"]
|
||||
},
|
||||
"智树": {
|
||||
"name": "智树",
|
||||
"enable": true,
|
||||
"page": 1,
|
||||
"time": "any",
|
||||
"path": "assets/path/稻妻-稻妻城-智树.json",
|
||||
"_1d_foods": ["团子牛奶"],
|
||||
"tags": ["稻妻", "稻妻城", "智树", "稀少商品"]
|
||||
},
|
||||
"木南杏奈": {
|
||||
"name": "木南杏奈",
|
||||
"enable": true,
|
||||
"page": 2,
|
||||
"time": "any",
|
||||
"path": "assets/path/稻妻-稻妻城-木南杏奈.json",
|
||||
"_1d_foods": ["特制风味烤蘑菇披萨"],
|
||||
"tags": ["稻妻", "稻妻城", "木南杏奈", "稀少商品"]
|
||||
},
|
||||
"清子": {
|
||||
"name": "清子",
|
||||
"enable": true,
|
||||
"page": 1,
|
||||
"time": "any",
|
||||
"path": "assets/path/稻妻-海祇岛-清子.json",
|
||||
"_7d_foods": ["牛奶", "番茄", "土豆", "小麦", "豆腐"],
|
||||
"tags": ["稻妻", "海祇岛", "清子"]
|
||||
},
|
||||
"阿什帕齐": {
|
||||
"name": "阿什帕齐",
|
||||
"enable": true,
|
||||
"page": 1,
|
||||
"time": "any",
|
||||
"path": "assets/path/须弥-化城郭-阿什帕齐.json",
|
||||
"_1d_foods": ["兽肉", "禽肉"],
|
||||
"_3d_foods": ["鸟蛋", "树王圣体菇"],
|
||||
"_7d_foods": ["香辛料"],
|
||||
"tags": ["须弥", "化城郭", "阿什帕齐"]
|
||||
},
|
||||
"Zhute": {
|
||||
"name": "朱特",
|
||||
"enable": true,
|
||||
"page": 1,
|
||||
"time": "any",
|
||||
"path": "assets/path/须弥-须弥城-朱特.json",
|
||||
"_3d_foods": ["香辛果", "帕蒂沙兰"],
|
||||
"_7d_foods": ["香辛料"],
|
||||
"tags": ["须弥", "须弥城", "朱特"]
|
||||
},
|
||||
"阿夫辛": {
|
||||
"name": "阿夫辛",
|
||||
"enable": true,
|
||||
"page": 1,
|
||||
"time": "any",
|
||||
"path": "assets/path/须弥-须弥城-阿夫辛.json",
|
||||
"_thu_foods": ["冒险家金杯", "冒险家尾羽", "冒险家头带", "冒险家之花", "冒险家怀表"],
|
||||
"tags": ["须弥", "须弥城", "阿夫辛", "狗粮商人"]
|
||||
},
|
||||
"Pam": {
|
||||
"name": "珀姆",
|
||||
"enable": true,
|
||||
"page": 1,
|
||||
"time": "any",
|
||||
"path": "assets/path/须弥-须弥城-珀姆.json",
|
||||
"_1d_foods": ["鱼肉", "螃蟹", "虾仁"],
|
||||
"_3d_foods": ["海草"],
|
||||
"tags": ["须弥", "须弥城", "珀姆"]
|
||||
},
|
||||
"Hamawi": {
|
||||
"name": "哈马维",
|
||||
"enable": true,
|
||||
"page": 2,
|
||||
"time": "any",
|
||||
"path": "assets/path/须弥-须弥城-哈马维.json",
|
||||
"_1d_foods": ["盐", "胡椒", "洋葱", "牛奶", "番茄", "卷心菜", "土豆", "小麦", "稻米", "豆腐", "虾仁"],
|
||||
"_3d_foods": ["香辛果", "墩墩桃"],
|
||||
"tags": ["须弥", "须弥城", "哈马维"]
|
||||
},
|
||||
"Lambad": {
|
||||
"name": "兰巴德",
|
||||
"enable": true,
|
||||
"page": 3,
|
||||
"time": "any",
|
||||
"path": "assets/path/须弥-须弥城-兰巴德酒馆-兰巴德.json",
|
||||
"_1d_foods": ["鱼肉", "螃蟹", "秃秃豆"],
|
||||
"_3d_foods": ["星蕈"],
|
||||
"_7d_foods": ["面粉", "香肠", "培根", "香辛料", "糖"],
|
||||
"tags": ["须弥", "须弥城", "兰巴德酒馆", "兰巴德", "独立地图"]
|
||||
},
|
||||
"Enteka": {
|
||||
"name": "恩忒卡",
|
||||
"enable": true,
|
||||
"page": 2,
|
||||
"time": "any",
|
||||
"path": "assets/path/须弥-须弥城-普斯帕咖啡馆-恩忒卡.json",
|
||||
"_1d_foods": ["咖啡豆"],
|
||||
"tags": ["须弥", "须弥城", "普斯帕咖啡馆", "恩忒卡", "独立地图"]
|
||||
},
|
||||
"拉玛": {
|
||||
"name": "拉玛",
|
||||
"enable": true,
|
||||
"page": 1,
|
||||
"time": "any",
|
||||
"path": "assets/path/须弥-奥摩斯港-拉玛.json",
|
||||
"_1d_foods": ["盐", "胡椒"],
|
||||
"_7d_foods": ["香辛料", "糖", "黄油", "奶酪"],
|
||||
"tags": ["须弥", "奥摩斯港", "拉玛"]
|
||||
},
|
||||
"Butrus": {
|
||||
"name": "布特罗斯",
|
||||
"enable": true,
|
||||
"page": 1,
|
||||
"time": "any",
|
||||
"path": "assets/path/须弥-奥摩斯港-布特罗斯.json",
|
||||
"_1d_foods": ["鱼肉", "螃蟹", "虾仁"],
|
||||
"tags": ["须弥", "奥摩斯港", "布特罗斯"]
|
||||
},
|
||||
"秋蔚": {
|
||||
"name": "秋蔚",
|
||||
"enable": true,
|
||||
"page": 1,
|
||||
"time": "any",
|
||||
"path": "assets/path/须弥-奥摩斯港-秋蔚.json",
|
||||
"_3d_foods": ["水晶块", "石珀", "夜泊石", "霓裳花"],
|
||||
"tags": ["须弥", "奥摩斯港", "秋蔚"]
|
||||
},
|
||||
"巴巴克": {
|
||||
"name": "巴巴克",
|
||||
"enable": true,
|
||||
"page": 1,
|
||||
"time": "any",
|
||||
"path": "assets/path/须弥-奥摩斯港-巴巴克.json",
|
||||
"_3d_foods": ["慕风蘑菇" ,"蒲公英籽" ,"琉璃袋", "清心", "鸣草", "珊瑚真珠"],
|
||||
"tags": ["须弥", "奥摩斯港", "巴巴克"]
|
||||
},
|
||||
"兰玛尼": {
|
||||
"name": "兰玛尼",
|
||||
"enable": true,
|
||||
"page": 1,
|
||||
"time": "any",
|
||||
"path": "assets/path/须弥-桓那兰那(梦境)-兰玛尼.json",
|
||||
"_3d_foods": ["日落果", "香辛果", "墩墩桃", "树王圣体菇", "劫波莲"],
|
||||
"tags": ["须弥", "桓那兰那(梦境)", "兰玛尼", "桓那兰那(梦境)"]
|
||||
},
|
||||
"Azalai": {
|
||||
"name": "阿扎莱",
|
||||
"enable": true,
|
||||
"page": 2,
|
||||
"time": "night",
|
||||
"path": "assets/path/须弥-阿如村-阿扎莱.json",
|
||||
"_1d_foods": ["鱼肉", "兽肉", "秃秃豆"],
|
||||
"_3d_foods": ["星蕈", "枣椰", "墩墩桃"],
|
||||
"_7d_foods": ["面粉", "香辛料", "糖"],
|
||||
"tags": ["须弥", "阿如村", "阿扎莱", "黑心商人"]
|
||||
},
|
||||
"Boucicaut": {
|
||||
"name": "布希柯",
|
||||
"enable": true,
|
||||
"page": 2,
|
||||
"time": "any",
|
||||
"path": "assets/path/枫丹-枫丹廷-布希柯.json",
|
||||
"_1d_foods": ["枫达", "盐", "胡椒", "洋葱", "牛奶", "番茄", "卷心菜", "土豆", "小麦", "秃秃豆", "杏仁", "发酵果实汁"],
|
||||
"_3d_foods": ["蘑菇", "茉洁草"],
|
||||
"tags": ["枫丹", "枫丹廷", "布希柯"]
|
||||
},
|
||||
"Arouet": {
|
||||
"name": "阿鲁埃",
|
||||
"enable": true,
|
||||
"page": 2,
|
||||
"time": "any",
|
||||
"path": "assets/path/枫丹-枫丹廷-阿鲁埃.json",
|
||||
"_1d_foods": ["枫达", "咖啡豆"],
|
||||
"tags": ["枫丹", "枫丹廷", "阿鲁埃"]
|
||||
},
|
||||
"路易": {
|
||||
"name": "路易",
|
||||
"enable": true,
|
||||
"page": 2,
|
||||
"time": "any",
|
||||
"path": "assets/path/枫丹-枫丹廷-路易.json",
|
||||
"_1d_foods": ["枫达"],
|
||||
"tags": ["枫丹", "枫丹廷", "路易"]
|
||||
},
|
||||
"欧仁妮": {
|
||||
"name": "欧仁妮",
|
||||
"enable": true,
|
||||
"page": 2,
|
||||
"time": "any",
|
||||
"path": "assets/path/枫丹-枫丹廷-欧仁妮.json",
|
||||
"_1d_foods": ["番茄", "卷心菜"],
|
||||
"_3d_foods": ["泡泡桔", "茉洁草", "日落果", "墩墩桃", "枣椰", "落落莓", "虹彩蔷薇"],
|
||||
"tags": ["枫丹", "枫丹廷", "欧仁妮"]
|
||||
},
|
||||
"桑格内蒂": {
|
||||
"name": "桑格内蒂",
|
||||
"enable": true,
|
||||
"page": 5,
|
||||
"time": "any",
|
||||
"path": "assets/path/枫丹-枫丹廷-德波大饭店-桑格内蒂.json",
|
||||
"_1d_foods": ["枫达"],
|
||||
"_7d_foods": ["面粉","奶油","黄油","火腿","糖","蟹黄","果酱","奶酪","培根","香肠"],
|
||||
"tags": ["枫丹", "枫丹廷", "德波大饭店", "桑格内蒂", "独立地图"]
|
||||
},
|
||||
"克洛莎": {
|
||||
"name": "克洛莎",
|
||||
"enable": true,
|
||||
"page": 1,
|
||||
"time": "any",
|
||||
"path": "assets/path/枫丹-枫丹廷-灰河-克洛莎.json",
|
||||
"_thu_foods": ["幸运儿之杯", "幸运儿鹰羽", "幸运儿银冠", "幸运儿绿花", "幸运儿沙漏"],
|
||||
"tags": ["枫丹", "枫丹廷", "灰河", "克洛莎", "狗粮商人"]
|
||||
},
|
||||
"Antman": {
|
||||
"name": "安特曼",
|
||||
"enable": true,
|
||||
"page": 1,
|
||||
"time": "any",
|
||||
"path": "assets/path/枫丹-白淞镇-安特曼.json",
|
||||
"_1d_foods": ["鱼肉", "螃蟹", "虾仁"],
|
||||
"_3d_foods": ["海露花", "汐藻", "苍晶螺"],
|
||||
"tags": ["枫丹", "白淞镇", "安特曼"]
|
||||
},
|
||||
"皮托": {
|
||||
"name": "皮托",
|
||||
"enable": true,
|
||||
"page": 1,
|
||||
"time": "any",
|
||||
"path": "assets/path/枫丹-锈舵酒馆-皮托.json",
|
||||
"_1d_foods": ["牛奶"],
|
||||
"_7d_foods": ["培根", "火腿", "香肠", "奶酪"],
|
||||
"tags": ["枫丹", "锈舵酒馆", "皮托", "黑心商人"]
|
||||
},
|
||||
"艾库瓦": {
|
||||
"name": "艾库瓦",
|
||||
"enable": true,
|
||||
"page": 1,
|
||||
"time": "any",
|
||||
"path": "assets/path/纳塔-圣火竞技场-艾库瓦.json",
|
||||
"_thu_foods": ["幸运儿之杯", "幸运儿鹰羽", "幸运儿银冠", "幸运儿绿花", "幸运儿沙漏"],
|
||||
"tags": ["纳塔", "圣火竞技场", "艾库瓦", "狗粮商人"]
|
||||
},
|
||||
"钦特利": {
|
||||
"name": "钦特利",
|
||||
"enable": true,
|
||||
"page": 1,
|
||||
"time": "any",
|
||||
"path": "assets/path/纳塔-圣火竞技场-钦特利.json",
|
||||
"_1d_foods": ["土豆"],
|
||||
"_3d_foods": ["烛伞蘑菇", "颗粒果", "苦种", "烬芯花", "青蜜莓", "肉龙掌"],
|
||||
"tags": ["纳塔", "圣火竞技场", "钦特利"]
|
||||
},
|
||||
"Bunama": {
|
||||
"name": "布纳马",
|
||||
"enable": true,
|
||||
"page": 2,
|
||||
"time": "any",
|
||||
"path": "assets/path/纳塔-圣火竞技场-布纳马.json",
|
||||
"_1d_foods": ["盐", "胡椒", "小麦", "洋葱", "牛奶", "番茄", "卷心菜", "土豆", "秃秃豆"],
|
||||
"tags": ["纳塔", "圣火竞技场", "布纳马"]
|
||||
},
|
||||
"夏安卡": {
|
||||
"name": "夏安卡",
|
||||
"enable": true,
|
||||
"page": 3,
|
||||
"time": "any",
|
||||
"path": "assets/path/纳塔-圣火竞技场-夏安卡.json",
|
||||
"_7d_foods": ["面粉", "奶油", "黄油", "火腿", "糖", "蟹黄", "果酱", "奶酪", "培根", "香肠"],
|
||||
"tags": ["纳塔", "圣火竞技场", "夏安卡"]
|
||||
},
|
||||
"伊蜜": {
|
||||
"name": "伊蜜",
|
||||
"enable": true,
|
||||
"page": 1,
|
||||
"time": "any",
|
||||
"path": "assets/path/纳塔-坚岩隘谷-伊蜜.json",
|
||||
"_3d_foods": ["铁块", "白铁块", "水晶块", "萃凝晶", "澄晶实"],
|
||||
"tags": ["纳塔", "坚岩隘谷", "伊蜜"]
|
||||
},
|
||||
"穆托莉娜": {
|
||||
"name": "穆托莉娜",
|
||||
"enable": true,
|
||||
"page": 1,
|
||||
"time": "any",
|
||||
"path": "assets/path/纳塔-悠悠度假村-穆托莉娜.json",
|
||||
"_3d_foods": ["灼灼彩菊", "肉龙掌", "云岩裂叶", "浪沫羽鳃"],
|
||||
"tags": ["纳塔", "悠悠度假村", "穆托莉娜"]
|
||||
},
|
||||
"采若": {
|
||||
"name": "采若",
|
||||
"enable": true,
|
||||
"page": 3,
|
||||
"time": "any",
|
||||
"path": "assets/path/挪德卡莱-那夏镇-采若.json",
|
||||
"_1d_foods": ["盐", "胡椒", "洋葱", "牛奶", "番茄", "卷心菜", "土豆", "小麦", "黑麦"],
|
||||
"tags": ["挪德卡莱", "那夏镇", "采若"]
|
||||
},
|
||||
"丽切娅": {
|
||||
"name": "丽切娅",
|
||||
"enable": true,
|
||||
"page": 1,
|
||||
"time": "any",
|
||||
"path": "assets/path/挪德卡莱-那夏镇-丽切娅.json",
|
||||
"_3d_foods": ["甜甜花", "宿影花", "霜盏花"],
|
||||
"tags": ["挪德卡莱", "那夏镇", "丽切娅"]
|
||||
},
|
||||
"卡嘉": {
|
||||
"name": "卡嘉",
|
||||
"enable": true,
|
||||
"page": 4,
|
||||
"time": "any",
|
||||
"path": "assets/path/挪德卡莱-那夏镇-卡嘉.json",
|
||||
"_7d_foods": ["面粉", "奶油", "熏禽肉", "黄油", "火腿", "糖", "蟹黄", "果酱", "奶酪", "培根", "香肠"],
|
||||
"tags": ["挪德卡莱", "那夏镇", "卡嘉"]
|
||||
},
|
||||
"雷科": {
|
||||
"name": "雷科",
|
||||
"enable": true,
|
||||
"page": 1,
|
||||
"time": "any",
|
||||
"path": "assets/path/挪德卡莱-那夏镇-雷科.json",
|
||||
"_thu_foods": ["幸运儿之杯", "幸运儿鹰羽", "幸运儿银冠", "幸运儿绿花", "幸运儿沙漏"],
|
||||
"tags": ["挪德卡莱", "那夏镇", "雷科", "狗粮商人"]
|
||||
},
|
||||
"德米安": {
|
||||
"name": "德米安",
|
||||
"enable": true,
|
||||
"page": 1,
|
||||
"time": "any",
|
||||
"path": "assets/path/挪德卡莱-那夏镇-旗舰-德米安.json",
|
||||
"_1d_foods": ["「皮拉米达的夜莺」", "边陲之地", "野浆果之路"],
|
||||
"tags": ["挪德卡莱", "那夏镇", "旗舰", "德米安", "稀少商品", "独立地图"]
|
||||
},
|
||||
"科菲策": {
|
||||
"name": "科菲策",
|
||||
"enable": true,
|
||||
"page": 1,
|
||||
"time": "any",
|
||||
"path": "assets/path/挪德卡莱-皮拉米达城-科菲策.json",
|
||||
"_1d_foods": ["牛奶", "咖啡豆"],
|
||||
"_3d_foods": ["微光角菌", "琉鳞石"],
|
||||
"tags": ["挪德卡莱", "皮拉米达城", "科菲策", "黑心商人"]
|
||||
}
|
||||
}
|
||||
"""
|
||||
|
||||
data = json.loads(npcs_content)
|
||||
|
||||
all_foods = set()
|
||||
all_tags = set()
|
||||
|
||||
for npc in data.values():
|
||||
if "_1d_foods" in npc:
|
||||
for food in npc["_1d_foods"]:
|
||||
all_foods.add(food)
|
||||
if "_3d_foods" in npc:
|
||||
for food in npc["_3d_foods"]:
|
||||
all_foods.add(food)
|
||||
if "_7d_foods" in npc:
|
||||
for food in npc["_7d_foods"]:
|
||||
all_foods.add(food)
|
||||
if "_thu_foods" in npc:
|
||||
for food in npc["_thu_foods"]:
|
||||
all_foods.add(food)
|
||||
if "_month_foods" in npc:
|
||||
for food in npc["_month_foods"]:
|
||||
all_foods.add(food)
|
||||
|
||||
if "tags" in npc:
|
||||
for tag in npc["tags"]:
|
||||
all_tags.add(tag)
|
||||
|
||||
# Sort lists
|
||||
sorted_foods = sorted(list(all_foods))
|
||||
sorted_tags = sorted(list(all_tags))
|
||||
|
||||
settings = [
|
||||
{
|
||||
"name": "userName",
|
||||
"type": "input-text",
|
||||
"label": "账号名(用于区分不同账户的记录)\\n为空则读取uid作为自定义CD记录标识",
|
||||
"default": "默认账户"
|
||||
},
|
||||
{
|
||||
"name": "foodsToBuyList",
|
||||
"type": "multi-checkbox",
|
||||
"label": "要购买的商品",
|
||||
"options": sorted_foods,
|
||||
"default": ["小麦", "黑麦"]
|
||||
},
|
||||
{
|
||||
"name": "AKF",
|
||||
"type": "select",
|
||||
"label": "每周商品购买方式\\n0=跟随系统周期自动判定\\n1-7=指定星期几购买(1=周一,7=周日)",
|
||||
"options": [
|
||||
"0",
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"7"
|
||||
],
|
||||
"default": "0"
|
||||
},
|
||||
{
|
||||
"name": "disabledTagsList",
|
||||
"type": "multi-checkbox",
|
||||
"label": "禁用标签",
|
||||
"options": sorted_tags,
|
||||
"default": ["卡琵莉亚"]
|
||||
},
|
||||
{
|
||||
"name": "skip",
|
||||
"type": "checkbox",
|
||||
"label": "跳过调整时间动画",
|
||||
"default": False
|
||||
},
|
||||
{
|
||||
"name": "ignoreRecords",
|
||||
"type": "checkbox",
|
||||
"label": "-----------------\\n无视记录强制购买(不推荐)",
|
||||
"default": False
|
||||
},
|
||||
{
|
||||
"name": "recordDebug",
|
||||
"type": "checkbox",
|
||||
"label": "调试模式(显示详细日志)",
|
||||
"default": False
|
||||
}
|
||||
]
|
||||
|
||||
with open('repo/js/自动购买商品/settings.json', 'w', encoding='utf-8') as f:
|
||||
json.dump(settings, f, indent=4, ensure_ascii=False)
|
||||
Reference in New Issue
Block a user