poi-plugin-equips-farm 1.0.2 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -0
- package/index.es +9 -2
- package/initial_equip_ships.json +5502 -0
- package/lib/data-processor.es +147 -18
- package/lib/master-cache.es +56 -0
- package/package.json +13 -2
- package/views/components/ShipList.es +12 -3
package/README.md
CHANGED
|
@@ -97,6 +97,12 @@ ln -s /path/to/poi-plugin-equips-farm poi-plugin-equips-farm
|
|
|
97
97
|
|
|
98
98
|
### 更新日志
|
|
99
99
|
|
|
100
|
+
#### v1.0.4
|
|
101
|
+
- 🏗️ **重构数据架构**: 引入 Block 1-2-3 三层数据体系,彻底解决新船数据滞后问题。
|
|
102
|
+
- ⚡ **本地缓存支持**: 自动缓存游戏 `api_start2` 数据(Block 2),确保舰娘改名、新实装舰娘能即时被插件识别。
|
|
103
|
+
- 🔄 **外部数据挂载**: 支持通过 `initial_equip_ships.json`(Block 3)补充初始装备数据,即使 WCTF 尚未收录也能正确显示名字和头像。
|
|
104
|
+
- 🐛 **修复**: 修复了因新船数据缺失导致的插件崩溃或“空白”显示问题。
|
|
105
|
+
|
|
100
106
|
#### v4.2.1
|
|
101
107
|
- ✨ 新增多语言搜索支持(中文、日文、平假名、罗马音)
|
|
102
108
|
- 🔧 优化通知格式,显示舰娘和装备名称
|
package/index.es
CHANGED
|
@@ -26,6 +26,14 @@ const handleGameResponse = (e) => {
|
|
|
26
26
|
}
|
|
27
27
|
} else if (path === '/kcsapi/api_req_kousyou/getship') {
|
|
28
28
|
gotShipId = body.api_ship_id
|
|
29
|
+
} else if (path === '/kcsapi/api_start2/getData') {
|
|
30
|
+
// Block 2: Save Master Data Cache
|
|
31
|
+
try {
|
|
32
|
+
const { saveMasterCache } = require('./lib/master-cache')
|
|
33
|
+
saveMasterCache(body)
|
|
34
|
+
} catch (e) {
|
|
35
|
+
console.error('[Farming Plugin] Error saving master cache', e)
|
|
36
|
+
}
|
|
29
37
|
}
|
|
30
38
|
|
|
31
39
|
if (gotShipId > 0 && window.store) {
|
|
@@ -36,8 +44,7 @@ const handleGameResponse = (e) => {
|
|
|
36
44
|
const userShips = userShipsSelector(state)
|
|
37
45
|
const $ships = masterShipsSelector(state)
|
|
38
46
|
const $equipments = masterEquipmentsSelector(state)
|
|
39
|
-
|
|
40
|
-
const farmingMap = getFarmingMap(wctf)
|
|
47
|
+
const farmingMap = getFarmingMap(wctf, $ships)
|
|
41
48
|
const shipInfo = farmingMap[gotShipId]
|
|
42
49
|
|
|
43
50
|
if (shipInfo && shipInfo.provides) {
|