poi-plugin-yulaiyulai 1.3.2 → 1.3.4
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 +1 -1
- package/data/equipment.js +46 -1
- package/lib/core.js +34 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -32,7 +32,7 @@ poi 的“安装插件”输入框本质上是 `npm install`,可以输入以
|
|
|
32
32
|
2. **本地 npm tarball 的绝对路径**(当前工作区里的版本可直接这样装):
|
|
33
33
|
|
|
34
34
|
```text
|
|
35
|
-
C:\Users\Soul\Downloads\poi-plugin-yulaiyulai-1.3.
|
|
35
|
+
C:\Users\Soul\Downloads\poi-plugin-yulaiyulai-1.3.4.tgz
|
|
36
36
|
```
|
|
37
37
|
|
|
38
38
|
注意路径要以 `.tgz` 结尾,并且文件在当前机器上真实存在。如果移动了文件,把上面的路径换成实际位置即可。
|
package/data/equipment.js
CHANGED
|
@@ -280,7 +280,7 @@ module.exports = {
|
|
|
280
280
|
{
|
|
281
281
|
id: 'seaplane-bomber',
|
|
282
282
|
title: '双座水上爆击机(辅助装备)',
|
|
283
|
-
hint: '
|
|
283
|
+
hint: '瑞云系双座水爆;蓝字为 kcwiki 未逐项列出的其他双座水爆。',
|
|
284
284
|
items: [
|
|
285
285
|
{ id: 'zuiun', name: '瑞云', match: ['瑞雲', '瑞云'], color: 'red' },
|
|
286
286
|
{
|
|
@@ -321,6 +321,51 @@ module.exports = {
|
|
|
321
321
|
match: ['瑞雲改二(六三四空/熟練)', '瑞云改二(六三四空/熟练)'],
|
|
322
322
|
color: 'green',
|
|
323
323
|
},
|
|
324
|
+
{
|
|
325
|
+
id: 'seiran-prototype',
|
|
326
|
+
name: '试制晴岚',
|
|
327
|
+
match: ['試製晴嵐', '试制晴岚'],
|
|
328
|
+
color: 'blue',
|
|
329
|
+
note: '其他双座水爆;第三类',
|
|
330
|
+
},
|
|
331
|
+
{
|
|
332
|
+
id: 'seiran-631',
|
|
333
|
+
name: '晴岚(六三一空)',
|
|
334
|
+
match: ['晴嵐(六三一空)', '晴岚(六三一空)'],
|
|
335
|
+
color: 'blue',
|
|
336
|
+
note: '其他双座水爆;第三类',
|
|
337
|
+
},
|
|
338
|
+
{
|
|
339
|
+
id: 'late-298b',
|
|
340
|
+
name: 'Laté 298B',
|
|
341
|
+
match: ['Laté 298B'],
|
|
342
|
+
color: 'blue',
|
|
343
|
+
note: '其他双座水爆;第三类',
|
|
344
|
+
},
|
|
345
|
+
{
|
|
346
|
+
id: 'swordfish-seaplane',
|
|
347
|
+
name: 'Swordfish(水上机型)',
|
|
348
|
+
match: ['Swordfish(水上機型)', 'Swordfish(水上机型)'],
|
|
349
|
+
color: 'blue',
|
|
350
|
+
note: '其他双座水爆;第三类',
|
|
351
|
+
},
|
|
352
|
+
{
|
|
353
|
+
id: 'swordfish-mk3-seaplane',
|
|
354
|
+
name: 'Swordfish Mk.III改(水上机型)',
|
|
355
|
+
match: ['Swordfish Mk.III改(水上機型)', 'Swordfish Mk.III改(水上机型)'],
|
|
356
|
+
color: 'blue',
|
|
357
|
+
note: '其他双座水爆;第三类',
|
|
358
|
+
},
|
|
359
|
+
{
|
|
360
|
+
id: 'swordfish-mk3-seaplane-skilled',
|
|
361
|
+
name: 'Swordfish Mk.III改(水上机型/熟练)',
|
|
362
|
+
match: [
|
|
363
|
+
'Swordfish Mk.III改(水上機型/熟練)',
|
|
364
|
+
'Swordfish Mk.III改(水上机型/熟练)',
|
|
365
|
+
],
|
|
366
|
+
color: 'blue',
|
|
367
|
+
note: '其他双座水爆;第三类',
|
|
368
|
+
},
|
|
324
369
|
],
|
|
325
370
|
},
|
|
326
371
|
{
|
package/lib/core.js
CHANGED
|
@@ -7,6 +7,8 @@
|
|
|
7
7
|
|
|
8
8
|
const bundledRoutes = require('../data/map-routes.json')
|
|
9
9
|
const fallbackRewards = require('../data/rewards-2025')
|
|
10
|
+
const baseEquipment = require('../data/equipment')
|
|
11
|
+
const baseDropAreas = require('../data/drop-areas')
|
|
10
12
|
|
|
11
13
|
const DATA_VERSION = 1
|
|
12
14
|
const MAX_ARCHIVE = 100
|
|
@@ -433,6 +435,35 @@ function sanitizeHistory(raw) {
|
|
|
433
435
|
.sort((a, b) => b.year - a.year)
|
|
434
436
|
}
|
|
435
437
|
|
|
438
|
+
function clone(value) {
|
|
439
|
+
return JSON.parse(JSON.stringify(value))
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
function ensureCurrentReference(season) {
|
|
443
|
+
if (!season || season.year !== baseEquipment.year) return
|
|
444
|
+
const currentCatalog = season.equipmentCatalog
|
|
445
|
+
const baseRecon = baseEquipment.categories.find((category) => category.id === 'recon')
|
|
446
|
+
const baseBomber = baseEquipment.categories.find((category) => category.id === 'seaplane-bomber')
|
|
447
|
+
const currentCategories =
|
|
448
|
+
currentCatalog && Array.isArray(currentCatalog.categories) ? currentCatalog.categories : []
|
|
449
|
+
const currentRecon = currentCategories.find((category) => category.id === 'recon')
|
|
450
|
+
const currentBomber = currentCategories.find((category) => category.id === 'seaplane-bomber')
|
|
451
|
+
const catalogOutdated =
|
|
452
|
+
!currentCatalog ||
|
|
453
|
+
Number(currentCatalog.year) < baseEquipment.year ||
|
|
454
|
+
!currentRecon ||
|
|
455
|
+
!Array.isArray(currentRecon.items) ||
|
|
456
|
+
currentRecon.items.length < (baseRecon ? baseRecon.items.length : 0) ||
|
|
457
|
+
!currentBomber ||
|
|
458
|
+
!Array.isArray(currentBomber.items) ||
|
|
459
|
+
currentBomber.items.length < (baseBomber ? baseBomber.items.length : 0)
|
|
460
|
+
if (catalogOutdated) season.equipmentCatalog = clone(baseEquipment)
|
|
461
|
+
|
|
462
|
+
if (!season.dropAreas || Number(season.dropAreas.year) < baseDropAreas.year) {
|
|
463
|
+
season.dropAreas = clone(baseDropAreas)
|
|
464
|
+
}
|
|
465
|
+
}
|
|
466
|
+
|
|
436
467
|
function sanitizeState(raw, now) {
|
|
437
468
|
const fallback = createInitialState(now)
|
|
438
469
|
if (!raw || typeof raw !== 'object') return fallback
|
|
@@ -450,9 +481,11 @@ function sanitizeState(raw, now) {
|
|
|
450
481
|
})
|
|
451
482
|
}
|
|
452
483
|
if (undoStack.length > MAX_ARCHIVE) undoStack.splice(0, undoStack.length - MAX_ARCHIVE)
|
|
484
|
+
const season = sanitizeSeason(raw.season, now)
|
|
485
|
+
ensureCurrentReference(season)
|
|
453
486
|
return {
|
|
454
487
|
version: DATA_VERSION,
|
|
455
|
-
season
|
|
488
|
+
season,
|
|
456
489
|
history,
|
|
457
490
|
undoStack,
|
|
458
491
|
ui: raw.ui && typeof raw.ui === 'object' ? { tab: String(raw.ui.tab || 'stats') } : fallback.ui,
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "poi-plugin-yulaiyulai",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.4",
|
|
4
4
|
"_requested": {
|
|
5
|
-
"raw": "poi-plugin-yulaiyulai-1.3.
|
|
5
|
+
"raw": "poi-plugin-yulaiyulai-1.3.4.tgz"
|
|
6
6
|
},
|
|
7
7
|
"description": "鱼来鱼来:秋刀鱼活动渔获统计,按图/点记录,同步任务与奖励,按年度结账。",
|
|
8
8
|
"main": "index.es",
|