poi-plugin-quest-info-2 0.6.1 → 0.6.2
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/build/assets.ts +2 -1
- package/build/kcQuestsData/DATA_VERSION +1 -1
- package/build/kcQuestsData/index.ts +1 -1
- package/build/kcQuestsData/quests-scn.json +10 -10
- package/build/questCategory.json +600 -0
- package/i18n/en-US.json +2 -1
- package/i18n/ja-JP.json +1 -0
- package/i18n/zh-CN.json +1 -0
- package/i18n/zh-TW.json +1 -0
- package/package.json +3 -2
- package/scripts/convertAssets.ts +3 -2
- package/scripts/genQuestCategory.ts +58 -0
- package/src/__tests__/__snapshots__/questCategory.spec.ts.snap +582 -0
- package/src/__tests__/kcwikiData.spec.ts +1 -1
- package/src/__tests__/questCategory.spec.ts +37 -0
- package/src/questHelper.ts +23 -18
- package/src/store/quest.ts +3 -0
- package/src/tags.ts +2 -1
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { writeFileSync } from 'fs'
|
|
2
|
+
import path from 'path'
|
|
3
|
+
import { QuestData } from '../build/kcanotifyGamedata'
|
|
4
|
+
import { KcwikiQuestData } from '../build/kcQuestsData'
|
|
5
|
+
|
|
6
|
+
const OUTPUT_PATH = path.resolve('build', 'questCategory.json')
|
|
7
|
+
|
|
8
|
+
const questStartsFilter = (str: string) =>
|
|
9
|
+
Object.entries(QuestData['zh-CN'])
|
|
10
|
+
.filter(([, quest]) => quest.name.startsWith(str))
|
|
11
|
+
.map(([gameId]) => gameId)
|
|
12
|
+
|
|
13
|
+
const kcwikiDataSelector = () => Object.entries(KcwikiQuestData['zh-CN'])
|
|
14
|
+
const mergeDataSelector = () =>
|
|
15
|
+
Object.entries({ ...QuestData['zh-CN'], ...KcwikiQuestData['zh-CN'] })
|
|
16
|
+
|
|
17
|
+
const main = () => {
|
|
18
|
+
const dailyQuest = questStartsFilter('(日任)')
|
|
19
|
+
const weeklyQuest = questStartsFilter('(周任)')
|
|
20
|
+
const monthlyQuest = questStartsFilter('(月任)')
|
|
21
|
+
const quarterlyQuest = [
|
|
22
|
+
...new Set([
|
|
23
|
+
...questStartsFilter('(季任)'),
|
|
24
|
+
...kcwikiDataSelector()
|
|
25
|
+
.filter(([, quest]) => quest.desc.includes('季常任务'))
|
|
26
|
+
.map(([gameId]) => gameId),
|
|
27
|
+
]),
|
|
28
|
+
].sort((a, b) => +a - +b)
|
|
29
|
+
// (年任) (年任 / x 月)
|
|
30
|
+
const yearlyQuest = kcwikiDataSelector()
|
|
31
|
+
.filter(([, quest]) => quest.desc.includes('❀备注:年常任务'))
|
|
32
|
+
.map(([gameId]) => gameId)
|
|
33
|
+
const singleQuest = mergeDataSelector()
|
|
34
|
+
.filter(
|
|
35
|
+
([gameId]) =>
|
|
36
|
+
![
|
|
37
|
+
...dailyQuest,
|
|
38
|
+
...weeklyQuest,
|
|
39
|
+
...monthlyQuest,
|
|
40
|
+
...quarterlyQuest,
|
|
41
|
+
...yearlyQuest,
|
|
42
|
+
].includes(gameId)
|
|
43
|
+
)
|
|
44
|
+
.map(([gameId]) => gameId)
|
|
45
|
+
|
|
46
|
+
const data = {
|
|
47
|
+
dailyQuest,
|
|
48
|
+
weeklyQuest,
|
|
49
|
+
monthlyQuest,
|
|
50
|
+
quarterlyQuest,
|
|
51
|
+
yearlyQuest,
|
|
52
|
+
singleQuest,
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
writeFileSync(OUTPUT_PATH, JSON.stringify(data, null, 2))
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
main()
|
|
@@ -0,0 +1,582 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`should questCategory correct snapshot 1`] = `
|
|
4
|
+
Object {
|
|
5
|
+
"dailyQuest": Array [
|
|
6
|
+
Object {
|
|
7
|
+
"code": "Bd1",
|
|
8
|
+
"gameId": "201",
|
|
9
|
+
"name": "击破敌舰队!",
|
|
10
|
+
},
|
|
11
|
+
Object {
|
|
12
|
+
"code": "Bd3",
|
|
13
|
+
"gameId": "210",
|
|
14
|
+
"name": "击破 10 回敌舰队!",
|
|
15
|
+
},
|
|
16
|
+
Object {
|
|
17
|
+
"code": "Bd4",
|
|
18
|
+
"gameId": "211",
|
|
19
|
+
"name": "击沉三艘敌空母!",
|
|
20
|
+
},
|
|
21
|
+
Object {
|
|
22
|
+
"code": "Bd6",
|
|
23
|
+
"gameId": "212",
|
|
24
|
+
"name": "打击敌方输送船团!",
|
|
25
|
+
},
|
|
26
|
+
Object {
|
|
27
|
+
"code": "Bd2",
|
|
28
|
+
"gameId": "216",
|
|
29
|
+
"name": "击破敌舰队主力!",
|
|
30
|
+
},
|
|
31
|
+
Object {
|
|
32
|
+
"code": "Bd5",
|
|
33
|
+
"gameId": "218",
|
|
34
|
+
"name": "击沉三艘敌方补给舰!",
|
|
35
|
+
},
|
|
36
|
+
Object {
|
|
37
|
+
"code": "Bd7",
|
|
38
|
+
"gameId": "226",
|
|
39
|
+
"name": "掌握南西诸岛海域制海权!",
|
|
40
|
+
},
|
|
41
|
+
Object {
|
|
42
|
+
"code": "Bd8",
|
|
43
|
+
"gameId": "230",
|
|
44
|
+
"name": "压制敌方潜水舰!",
|
|
45
|
+
},
|
|
46
|
+
Object {
|
|
47
|
+
"code": "C2",
|
|
48
|
+
"gameId": "303",
|
|
49
|
+
"name": "「演习」锻炼能力!",
|
|
50
|
+
},
|
|
51
|
+
Object {
|
|
52
|
+
"code": "C3",
|
|
53
|
+
"gameId": "304",
|
|
54
|
+
"name": "在「演习」战胜其他提督!",
|
|
55
|
+
},
|
|
56
|
+
Object {
|
|
57
|
+
"code": "D2",
|
|
58
|
+
"gameId": "402",
|
|
59
|
+
"name": "「远征」3 次成功!",
|
|
60
|
+
},
|
|
61
|
+
Object {
|
|
62
|
+
"code": "D3",
|
|
63
|
+
"gameId": "403",
|
|
64
|
+
"name": "「远征」10 次成功!",
|
|
65
|
+
},
|
|
66
|
+
Object {
|
|
67
|
+
"code": "E3",
|
|
68
|
+
"gameId": "503",
|
|
69
|
+
"name": "舰队大整备!",
|
|
70
|
+
},
|
|
71
|
+
Object {
|
|
72
|
+
"code": "E4",
|
|
73
|
+
"gameId": "504",
|
|
74
|
+
"name": "舰队酒保节!",
|
|
75
|
+
},
|
|
76
|
+
Object {
|
|
77
|
+
"code": "F5",
|
|
78
|
+
"gameId": "605",
|
|
79
|
+
"name": "新装备「开发」指令",
|
|
80
|
+
},
|
|
81
|
+
Object {
|
|
82
|
+
"code": "F6",
|
|
83
|
+
"gameId": "606",
|
|
84
|
+
"name": "新造舰「建造」指令",
|
|
85
|
+
},
|
|
86
|
+
Object {
|
|
87
|
+
"code": "F7",
|
|
88
|
+
"gameId": "607",
|
|
89
|
+
"name": "装备「开发」集中強化!",
|
|
90
|
+
},
|
|
91
|
+
Object {
|
|
92
|
+
"code": "F8",
|
|
93
|
+
"gameId": "608",
|
|
94
|
+
"name": "舰娘「建造」舰队强化!",
|
|
95
|
+
},
|
|
96
|
+
Object {
|
|
97
|
+
"code": "F9",
|
|
98
|
+
"gameId": "609",
|
|
99
|
+
"name": "对应裁军条约!",
|
|
100
|
+
},
|
|
101
|
+
Object {
|
|
102
|
+
"code": "F18",
|
|
103
|
+
"gameId": "619",
|
|
104
|
+
"name": "装备的改修强化",
|
|
105
|
+
},
|
|
106
|
+
Object {
|
|
107
|
+
"code": "F65",
|
|
108
|
+
"gameId": "673",
|
|
109
|
+
"name": "装备开发力的整备",
|
|
110
|
+
},
|
|
111
|
+
Object {
|
|
112
|
+
"code": "F66",
|
|
113
|
+
"gameId": "674",
|
|
114
|
+
"name": "工厂环境的整备",
|
|
115
|
+
},
|
|
116
|
+
Object {
|
|
117
|
+
"code": "G2",
|
|
118
|
+
"gameId": "702",
|
|
119
|
+
"name": "实施舰船的「近代化改修」!",
|
|
120
|
+
},
|
|
121
|
+
],
|
|
122
|
+
"monthlyQuest": Array [
|
|
123
|
+
Object {
|
|
124
|
+
"code": "Bm1",
|
|
125
|
+
"gameId": "249",
|
|
126
|
+
"name": "「第五战队」出击!",
|
|
127
|
+
},
|
|
128
|
+
Object {
|
|
129
|
+
"code": "Bm2",
|
|
130
|
+
"gameId": "256",
|
|
131
|
+
"name": "「潜水舰队」出击!",
|
|
132
|
+
},
|
|
133
|
+
Object {
|
|
134
|
+
"code": "Bm3",
|
|
135
|
+
"gameId": "257",
|
|
136
|
+
"name": "「水雷战队」前往南西!",
|
|
137
|
+
},
|
|
138
|
+
Object {
|
|
139
|
+
"code": "Bm4",
|
|
140
|
+
"gameId": "259",
|
|
141
|
+
"name": "「水上打击部队」前往南方!",
|
|
142
|
+
},
|
|
143
|
+
Object {
|
|
144
|
+
"code": "Bm6",
|
|
145
|
+
"gameId": "264",
|
|
146
|
+
"name": "「空母机动部队」前往西方!",
|
|
147
|
+
},
|
|
148
|
+
Object {
|
|
149
|
+
"code": "Bm5",
|
|
150
|
+
"gameId": "265",
|
|
151
|
+
"name": "海上护卫强化月",
|
|
152
|
+
},
|
|
153
|
+
Object {
|
|
154
|
+
"code": "Bm7",
|
|
155
|
+
"gameId": "266",
|
|
156
|
+
"name": "「水上反击部队」突入!",
|
|
157
|
+
},
|
|
158
|
+
Object {
|
|
159
|
+
"code": "Bm8",
|
|
160
|
+
"gameId": "280",
|
|
161
|
+
"name": "确保后勤线!强化实施海上警备!",
|
|
162
|
+
},
|
|
163
|
+
Object {
|
|
164
|
+
"code": "C8",
|
|
165
|
+
"gameId": "311",
|
|
166
|
+
"name": "精锐舰队演习",
|
|
167
|
+
},
|
|
168
|
+
Object {
|
|
169
|
+
"code": "F25",
|
|
170
|
+
"gameId": "628",
|
|
171
|
+
"name": "机种转换",
|
|
172
|
+
},
|
|
173
|
+
Object {
|
|
174
|
+
"code": "F41",
|
|
175
|
+
"gameId": "645",
|
|
176
|
+
"name": "“洋上补给” 物资的调拨",
|
|
177
|
+
},
|
|
178
|
+
],
|
|
179
|
+
"quarterlyQuest": Array [
|
|
180
|
+
Object {
|
|
181
|
+
"code": "Bq11",
|
|
182
|
+
"gameId": "284",
|
|
183
|
+
"name": "南西诸岛方面 “海上警备行动” 发令!",
|
|
184
|
+
},
|
|
185
|
+
Object {
|
|
186
|
+
"code": "C38",
|
|
187
|
+
"gameId": "337",
|
|
188
|
+
"name": "「十八驱」演习!",
|
|
189
|
+
},
|
|
190
|
+
Object {
|
|
191
|
+
"code": "C42",
|
|
192
|
+
"gameId": "339",
|
|
193
|
+
"name": "「十九驱」演习!",
|
|
194
|
+
},
|
|
195
|
+
Object {
|
|
196
|
+
"code": "C44",
|
|
197
|
+
"gameId": "342",
|
|
198
|
+
"name": "小舰艇群演习强化任务",
|
|
199
|
+
},
|
|
200
|
+
Object {
|
|
201
|
+
"code": "D24",
|
|
202
|
+
"gameId": "426",
|
|
203
|
+
"name": "强化海上通商航路警戒!",
|
|
204
|
+
},
|
|
205
|
+
Object {
|
|
206
|
+
"code": "F35",
|
|
207
|
+
"gameId": "637",
|
|
208
|
+
"name": "「熟练搭乘员」养成",
|
|
209
|
+
},
|
|
210
|
+
Object {
|
|
211
|
+
"code": "F39",
|
|
212
|
+
"gameId": "643",
|
|
213
|
+
"name": "主力 “陆攻” 的采购",
|
|
214
|
+
},
|
|
215
|
+
Object {
|
|
216
|
+
"code": "F90",
|
|
217
|
+
"gameId": "653",
|
|
218
|
+
"name": "工厂运转!为下期作战做准备!",
|
|
219
|
+
},
|
|
220
|
+
Object {
|
|
221
|
+
"code": "F55",
|
|
222
|
+
"gameId": "663",
|
|
223
|
+
"name": "继续研究新型舾装",
|
|
224
|
+
},
|
|
225
|
+
Object {
|
|
226
|
+
"code": "F67",
|
|
227
|
+
"gameId": "675",
|
|
228
|
+
"name": "运用装备的综合整备",
|
|
229
|
+
},
|
|
230
|
+
Object {
|
|
231
|
+
"code": "F70",
|
|
232
|
+
"gameId": "678",
|
|
233
|
+
"name": "主力舰上战斗机的更新",
|
|
234
|
+
},
|
|
235
|
+
Object {
|
|
236
|
+
"code": "F72",
|
|
237
|
+
"gameId": "680",
|
|
238
|
+
"name": "对空兵装的整备扩充",
|
|
239
|
+
},
|
|
240
|
+
Object {
|
|
241
|
+
"code": "F79",
|
|
242
|
+
"gameId": "688",
|
|
243
|
+
"name": "强化航空战力",
|
|
244
|
+
},
|
|
245
|
+
Object {
|
|
246
|
+
"code": "Bq1",
|
|
247
|
+
"gameId": "822",
|
|
248
|
+
"name": "冲之岛海域迎击战!",
|
|
249
|
+
},
|
|
250
|
+
Object {
|
|
251
|
+
"code": "Bq12",
|
|
252
|
+
"gameId": "845",
|
|
253
|
+
"name": "发令!「西方海域作战」",
|
|
254
|
+
},
|
|
255
|
+
Object {
|
|
256
|
+
"code": "Bq2",
|
|
257
|
+
"gameId": "854",
|
|
258
|
+
"name": "战果扩张任务!「Z 作战」前段作战",
|
|
259
|
+
},
|
|
260
|
+
Object {
|
|
261
|
+
"code": "Bq3",
|
|
262
|
+
"gameId": "861",
|
|
263
|
+
"name": "强行运输舰队,拔锚!",
|
|
264
|
+
},
|
|
265
|
+
Object {
|
|
266
|
+
"code": "Bq4",
|
|
267
|
+
"gameId": "862",
|
|
268
|
+
"name": "实施前线航空侦察!",
|
|
269
|
+
},
|
|
270
|
+
Object {
|
|
271
|
+
"code": "Bq10",
|
|
272
|
+
"gameId": "872",
|
|
273
|
+
"name": "战果扩张任务!“Z 作战” 后段作战",
|
|
274
|
+
},
|
|
275
|
+
Object {
|
|
276
|
+
"code": "Bq5",
|
|
277
|
+
"gameId": "873",
|
|
278
|
+
"name": "实施北方海域警备吧!",
|
|
279
|
+
},
|
|
280
|
+
Object {
|
|
281
|
+
"code": "Bq6",
|
|
282
|
+
"gameId": "875",
|
|
283
|
+
"name": "精锐「三一驱」,突入铁底海域!",
|
|
284
|
+
},
|
|
285
|
+
Object {
|
|
286
|
+
"code": "Bq7",
|
|
287
|
+
"gameId": "888",
|
|
288
|
+
"name": "新编成「三川舰队」,突入铁底海峡!",
|
|
289
|
+
},
|
|
290
|
+
Object {
|
|
291
|
+
"code": "Bq8",
|
|
292
|
+
"gameId": "893",
|
|
293
|
+
"name": "彻底确保泊地周边海域的安全!",
|
|
294
|
+
},
|
|
295
|
+
Object {
|
|
296
|
+
"code": "Bq9",
|
|
297
|
+
"gameId": "894",
|
|
298
|
+
"name": "投入空母战力进行补给线的战斗警戒",
|
|
299
|
+
},
|
|
300
|
+
Object {
|
|
301
|
+
"code": "Bq13",
|
|
302
|
+
"gameId": "903",
|
|
303
|
+
"name": "扩张「六水战」,向最前线!",
|
|
304
|
+
},
|
|
305
|
+
],
|
|
306
|
+
"singleQuest": Any<Array>,
|
|
307
|
+
"weeklyQuest": Array [
|
|
308
|
+
Object {
|
|
309
|
+
"code": "Bw3",
|
|
310
|
+
"gameId": "213",
|
|
311
|
+
"name": "海上通商破坏作战",
|
|
312
|
+
},
|
|
313
|
+
Object {
|
|
314
|
+
"code": "Bw1",
|
|
315
|
+
"gameId": "214",
|
|
316
|
+
"name": "あ号作战",
|
|
317
|
+
},
|
|
318
|
+
Object {
|
|
319
|
+
"code": "Bw2",
|
|
320
|
+
"gameId": "220",
|
|
321
|
+
"name": "い号作战",
|
|
322
|
+
},
|
|
323
|
+
Object {
|
|
324
|
+
"code": "Bw4",
|
|
325
|
+
"gameId": "221",
|
|
326
|
+
"name": "ろ (Ro) 号作战",
|
|
327
|
+
},
|
|
328
|
+
Object {
|
|
329
|
+
"code": "Bw5",
|
|
330
|
+
"gameId": "228",
|
|
331
|
+
"name": "海上护卫战",
|
|
332
|
+
},
|
|
333
|
+
Object {
|
|
334
|
+
"code": "Bw6",
|
|
335
|
+
"gameId": "229",
|
|
336
|
+
"name": "消灭敌东方舰队!",
|
|
337
|
+
},
|
|
338
|
+
Object {
|
|
339
|
+
"code": "Bw7",
|
|
340
|
+
"gameId": "241",
|
|
341
|
+
"name": "消灭敌北方舰队主力!",
|
|
342
|
+
},
|
|
343
|
+
Object {
|
|
344
|
+
"code": "Bw8",
|
|
345
|
+
"gameId": "242",
|
|
346
|
+
"name": "击破敌东方中枢舰队!",
|
|
347
|
+
},
|
|
348
|
+
Object {
|
|
349
|
+
"code": "Bw9",
|
|
350
|
+
"gameId": "243",
|
|
351
|
+
"name": "掌握南方海域珊瑚诸岛的制空权!",
|
|
352
|
+
},
|
|
353
|
+
Object {
|
|
354
|
+
"code": "Bw10",
|
|
355
|
+
"gameId": "261",
|
|
356
|
+
"name": "努力确保海上输送的安全!",
|
|
357
|
+
},
|
|
358
|
+
Object {
|
|
359
|
+
"code": "C4",
|
|
360
|
+
"gameId": "302",
|
|
361
|
+
"name": "大规模演习",
|
|
362
|
+
},
|
|
363
|
+
Object {
|
|
364
|
+
"code": "D4",
|
|
365
|
+
"gameId": "404",
|
|
366
|
+
"name": "大规模远征作战、宣布!",
|
|
367
|
+
},
|
|
368
|
+
Object {
|
|
369
|
+
"code": "D9",
|
|
370
|
+
"gameId": "410",
|
|
371
|
+
"name": "使向南方的输送作战成功!",
|
|
372
|
+
},
|
|
373
|
+
Object {
|
|
374
|
+
"code": "D11",
|
|
375
|
+
"gameId": "411",
|
|
376
|
+
"name": "继续实施往南方的鼠輸送!",
|
|
377
|
+
},
|
|
378
|
+
Object {
|
|
379
|
+
"code": "F12",
|
|
380
|
+
"gameId": "613",
|
|
381
|
+
"name": "资源的再利用",
|
|
382
|
+
},
|
|
383
|
+
Object {
|
|
384
|
+
"code": "F34",
|
|
385
|
+
"gameId": "638",
|
|
386
|
+
"name": "对空机枪量产!",
|
|
387
|
+
},
|
|
388
|
+
Object {
|
|
389
|
+
"code": "G3",
|
|
390
|
+
"gameId": "703",
|
|
391
|
+
"name": "推进「近代化改修」、整顿战备!",
|
|
392
|
+
},
|
|
393
|
+
],
|
|
394
|
+
"yearlyQuest": Array [
|
|
395
|
+
Object {
|
|
396
|
+
"code": "C49",
|
|
397
|
+
"gameId": "345",
|
|
398
|
+
"name": "演习的下午茶时间!",
|
|
399
|
+
},
|
|
400
|
+
Object {
|
|
401
|
+
"code": "C50",
|
|
402
|
+
"gameId": "346",
|
|
403
|
+
"name": "精锐至极!主力中的主力,演习开始!",
|
|
404
|
+
},
|
|
405
|
+
Object {
|
|
406
|
+
"code": "C53",
|
|
407
|
+
"gameId": "348",
|
|
408
|
+
"name": "「精锐轻巡」演习!",
|
|
409
|
+
},
|
|
410
|
+
Object {
|
|
411
|
+
"code": "C55",
|
|
412
|
+
"gameId": "350",
|
|
413
|
+
"name": "精锐「第七驱逐队」演习开始!",
|
|
414
|
+
},
|
|
415
|
+
Object {
|
|
416
|
+
"code": "C58",
|
|
417
|
+
"gameId": "353",
|
|
418
|
+
"name": "「巡洋舰战队」演习",
|
|
419
|
+
},
|
|
420
|
+
Object {
|
|
421
|
+
"code": "C60",
|
|
422
|
+
"gameId": "354",
|
|
423
|
+
"name": "「改装特务空母」任务部队演习!",
|
|
424
|
+
},
|
|
425
|
+
Object {
|
|
426
|
+
"code": "C62",
|
|
427
|
+
"gameId": "355",
|
|
428
|
+
"name": "精锐「第十五驱逐队」第一小队演习!",
|
|
429
|
+
},
|
|
430
|
+
Object {
|
|
431
|
+
"code": "D32",
|
|
432
|
+
"gameId": "434",
|
|
433
|
+
"name": "特设护卫船团司令部,开始活动!",
|
|
434
|
+
},
|
|
435
|
+
Object {
|
|
436
|
+
"code": "D33",
|
|
437
|
+
"gameId": "436",
|
|
438
|
+
"name": "实施练习航海与警备任务!",
|
|
439
|
+
},
|
|
440
|
+
Object {
|
|
441
|
+
"code": "D34",
|
|
442
|
+
"gameId": "437",
|
|
443
|
+
"name": "实行小笠原近海警戒线强化!",
|
|
444
|
+
},
|
|
445
|
+
Object {
|
|
446
|
+
"code": "D35",
|
|
447
|
+
"gameId": "438",
|
|
448
|
+
"name": "实行南西诸岛方面海上护卫强化!",
|
|
449
|
+
},
|
|
450
|
+
Object {
|
|
451
|
+
"code": "D36",
|
|
452
|
+
"gameId": "439",
|
|
453
|
+
"name": "兵站強化远征任务【基本作战】",
|
|
454
|
+
},
|
|
455
|
+
Object {
|
|
456
|
+
"code": "D37",
|
|
457
|
+
"gameId": "440",
|
|
458
|
+
"name": "兵站強化远征任务【扩张作战】",
|
|
459
|
+
},
|
|
460
|
+
Object {
|
|
461
|
+
"code": "D38",
|
|
462
|
+
"gameId": "442",
|
|
463
|
+
"name": "实施西方联络作战准备!",
|
|
464
|
+
},
|
|
465
|
+
Object {
|
|
466
|
+
"code": "D40",
|
|
467
|
+
"gameId": "444",
|
|
468
|
+
"name": "新兵装开发资材输送与船团护卫!",
|
|
469
|
+
},
|
|
470
|
+
Object {
|
|
471
|
+
"code": "F93",
|
|
472
|
+
"gameId": "654",
|
|
473
|
+
"name": "编成精锐双翼机飞行队",
|
|
474
|
+
},
|
|
475
|
+
Object {
|
|
476
|
+
"code": "F94",
|
|
477
|
+
"gameId": "655",
|
|
478
|
+
"name": "工厂完全运作!开发新兵装!",
|
|
479
|
+
},
|
|
480
|
+
Object {
|
|
481
|
+
"code": "F92",
|
|
482
|
+
"gameId": "657",
|
|
483
|
+
"name": "新型兵装的开发整备的强化",
|
|
484
|
+
},
|
|
485
|
+
Object {
|
|
486
|
+
"code": "F95",
|
|
487
|
+
"gameId": "681",
|
|
488
|
+
"name": "航空战力再编成与强化准备",
|
|
489
|
+
},
|
|
490
|
+
Object {
|
|
491
|
+
"code": "G6",
|
|
492
|
+
"gameId": "714",
|
|
493
|
+
"name": "实施「驱逐舰」的改修工事!",
|
|
494
|
+
},
|
|
495
|
+
Object {
|
|
496
|
+
"code": "G7",
|
|
497
|
+
"gameId": "715",
|
|
498
|
+
"name": "续:实施「驱逐舰」的改修工事",
|
|
499
|
+
},
|
|
500
|
+
Object {
|
|
501
|
+
"code": "G8",
|
|
502
|
+
"gameId": "716",
|
|
503
|
+
"name": "实施「轻巡」级改修工事",
|
|
504
|
+
},
|
|
505
|
+
Object {
|
|
506
|
+
"code": "G9",
|
|
507
|
+
"gameId": "717",
|
|
508
|
+
"name": "续: 实施「轻巡」级改修工事",
|
|
509
|
+
},
|
|
510
|
+
Object {
|
|
511
|
+
"code": "By1",
|
|
512
|
+
"gameId": "904",
|
|
513
|
+
"name": "精锐「十九驱」,闪亮出击!",
|
|
514
|
+
},
|
|
515
|
+
Object {
|
|
516
|
+
"code": "By2",
|
|
517
|
+
"gameId": "905",
|
|
518
|
+
"name": "「海防舰」,防卫大海!",
|
|
519
|
+
},
|
|
520
|
+
Object {
|
|
521
|
+
"code": "By3",
|
|
522
|
+
"gameId": "912",
|
|
523
|
+
"name": "工作舰「明石」护卫任务",
|
|
524
|
+
},
|
|
525
|
+
Object {
|
|
526
|
+
"code": "By4",
|
|
527
|
+
"gameId": "914",
|
|
528
|
+
"name": "重巡战队,向西!",
|
|
529
|
+
},
|
|
530
|
+
Object {
|
|
531
|
+
"code": "By5",
|
|
532
|
+
"gameId": "928",
|
|
533
|
+
"name": "历战「第十方面舰队」,全力出击!",
|
|
534
|
+
},
|
|
535
|
+
Object {
|
|
536
|
+
"code": "By6",
|
|
537
|
+
"gameId": "944",
|
|
538
|
+
"name": "实施镇守府近海海域哨戒!",
|
|
539
|
+
},
|
|
540
|
+
Object {
|
|
541
|
+
"code": "By7",
|
|
542
|
+
"gameId": "945",
|
|
543
|
+
"name": "保护南西方面的运输航路安全!",
|
|
544
|
+
},
|
|
545
|
+
Object {
|
|
546
|
+
"code": "By8",
|
|
547
|
+
"gameId": "946",
|
|
548
|
+
"name": "空母机动部队,出击!迎击敌舰队!",
|
|
549
|
+
},
|
|
550
|
+
Object {
|
|
551
|
+
"code": "By9",
|
|
552
|
+
"gameId": "947",
|
|
553
|
+
"name": "AL 作战",
|
|
554
|
+
},
|
|
555
|
+
Object {
|
|
556
|
+
"code": "By10",
|
|
557
|
+
"gameId": "948",
|
|
558
|
+
"name": "机动部队决战",
|
|
559
|
+
},
|
|
560
|
+
Object {
|
|
561
|
+
"code": "F98",
|
|
562
|
+
"gameId": "1103",
|
|
563
|
+
"name": "量产潜水舰强化兵装",
|
|
564
|
+
},
|
|
565
|
+
Object {
|
|
566
|
+
"code": "F99",
|
|
567
|
+
"gameId": "1104",
|
|
568
|
+
"name": "量产潜水舰电子兵装",
|
|
569
|
+
},
|
|
570
|
+
Object {
|
|
571
|
+
"code": "F100",
|
|
572
|
+
"gameId": "1105",
|
|
573
|
+
"name": "夏日格纳库整备 & 航空基地整备",
|
|
574
|
+
},
|
|
575
|
+
Object {
|
|
576
|
+
"code": "F102 ",
|
|
577
|
+
"gameId": "1107",
|
|
578
|
+
"name": "【钢材出口】增加陆基航空队的兵力吧!",
|
|
579
|
+
},
|
|
580
|
+
],
|
|
581
|
+
}
|
|
582
|
+
`;
|
|
@@ -2,7 +2,7 @@ import { version, KcwikiQuestData } from '../../build/kcQuestsData'
|
|
|
2
2
|
|
|
3
3
|
test('should KcwikiQuestData Game data version correct', () => {
|
|
4
4
|
expect(version).toMatchInlineSnapshot(
|
|
5
|
-
`"
|
|
5
|
+
`"be5db381c0cca84ede0166eb8c582d19afe0aec1"`
|
|
6
6
|
)
|
|
7
7
|
})
|
|
8
8
|
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import questCategory from '../../build/questCategory.json'
|
|
2
|
+
import { KcwikiQuestData } from '../../build/kcQuestsData'
|
|
3
|
+
import { QuestData as KcaQuestData } from '../../build/kcanotifyGamedata'
|
|
4
|
+
|
|
5
|
+
describe('should questCategory correct', () => {
|
|
6
|
+
test('length', () => {
|
|
7
|
+
expect(questCategory.dailyQuest.length).toMatchInlineSnapshot(`23`)
|
|
8
|
+
expect(questCategory.weeklyQuest.length).toMatchInlineSnapshot(`17`)
|
|
9
|
+
expect(questCategory.monthlyQuest.length).toMatchInlineSnapshot(`11`)
|
|
10
|
+
expect(questCategory.quarterlyQuest.length).toMatchInlineSnapshot(`25`)
|
|
11
|
+
expect(questCategory.yearlyQuest.length).toMatchInlineSnapshot(`37`)
|
|
12
|
+
expect(questCategory.singleQuest.length).toMatchInlineSnapshot(`473`)
|
|
13
|
+
})
|
|
14
|
+
|
|
15
|
+
test('snapshot', () => {
|
|
16
|
+
const mergeData = {
|
|
17
|
+
...KcaQuestData['zh-CN'],
|
|
18
|
+
...KcwikiQuestData['zh-CN'],
|
|
19
|
+
}
|
|
20
|
+
const humanReadableData = Object.fromEntries(
|
|
21
|
+
Object.entries(questCategory).map(([key, val]) => [
|
|
22
|
+
key,
|
|
23
|
+
val
|
|
24
|
+
.sort((a, b) => +a - +b)
|
|
25
|
+
.map((gameId) => ({
|
|
26
|
+
gameId,
|
|
27
|
+
code: mergeData[gameId as keyof typeof mergeData]?.code,
|
|
28
|
+
name: mergeData[gameId as keyof typeof mergeData]?.name,
|
|
29
|
+
})),
|
|
30
|
+
])
|
|
31
|
+
)
|
|
32
|
+
|
|
33
|
+
expect(humanReadableData).toMatchSnapshot({
|
|
34
|
+
singleQuest: expect.any(Array),
|
|
35
|
+
})
|
|
36
|
+
})
|
|
37
|
+
})
|