poi-plugin-quest-info-2 0.8.9 → 0.9.1
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/.changeset/README.md +8 -0
- package/.changeset/config.json +11 -0
- package/CHANGELOG.md +20 -0
- package/README.md +3 -2
- package/build/kcQuestsData/DATA_VERSION +1 -1
- package/build/kcQuestsData/index.ts +1 -1
- package/build/kcQuestsData/quests-scn-new.json +1 -0
- package/build/kcQuestsData/quests-scn.json +57 -16
- package/build/kcanotifyGamedata/DATA_VERSION +1 -1
- package/build/kcanotifyGamedata/index.ts +1 -1
- package/build/prePostQuest.json +40 -5
- package/build/questCodeMap.json +6 -2
- package/i18n/en-US.json +8 -3
- package/i18n/index.ts +23 -4
- package/i18n/ja-JP.json +3 -3
- package/i18n/ko-KR.json +3 -2
- package/i18n/zh-CN.json +3 -3
- package/i18n/zh-TW.json +3 -3
- package/package.json +4 -2
- package/shims/globals.d.ts +6 -0
- package/src/Settings.tsx +67 -7
- package/src/Toolbar.tsx +53 -33
- package/src/__tests__/fixtures/firstLoginWithOneComplete.json +72 -0
- package/src/__tests__/fixtures/questList.json +338 -0
- package/src/__tests__/kcanotifyData.spec.ts +1 -1
- package/src/__tests__/kcwikiData.spec.ts +1 -1
- package/src/components/QuestCard/index.tsx +3 -3
- package/src/components/QuestCard/utils.tsx +3 -3
- package/src/patch.ts +3 -4
- package/src/poi/env.ts +4 -0
- package/src/poi/hooks.ts +55 -2
- package/src/poi/store.ts +25 -8
- package/src/poi/utils.ts +50 -0
- package/src/store/filterTags.ts +34 -13
- package/src/store/gameQuest.tsx +108 -5
- package/src/store/quest.ts +27 -83
- package/src/store/store.tsx +25 -19
- package/src/tags.tsx +83 -24
- package/tsconfig.json +1 -1
package/src/Settings.tsx
CHANGED
|
@@ -1,15 +1,25 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import {
|
|
2
|
+
AnchorButton,
|
|
3
|
+
Button,
|
|
4
|
+
Checkbox,
|
|
5
|
+
Intent,
|
|
6
|
+
Text,
|
|
7
|
+
TextArea,
|
|
8
|
+
} from '@blueprintjs/core'
|
|
3
9
|
import { IconNames } from '@blueprintjs/icons'
|
|
10
|
+
import type { ChangeEvent } from 'react'
|
|
11
|
+
import React, { StrictMode, useCallback, useState } from 'react'
|
|
4
12
|
import styled from 'styled-components'
|
|
5
|
-
import { version as PACKAGE_VERSION, homepage } from '../package.json'
|
|
6
13
|
import { version as DATA_VERSION } from '../build/kcanotifyGamedata'
|
|
7
|
-
import {
|
|
14
|
+
import { homepage, version as PACKAGE_VERSION } from '../package.json'
|
|
15
|
+
import { IN_POI } from './poi/env'
|
|
16
|
+
import { usePluginTranslation, useStateExporter } from './poi/hooks'
|
|
17
|
+
import { tips } from './poi/utils'
|
|
8
18
|
import {
|
|
9
|
-
useRemoveStorage,
|
|
10
19
|
StoreProvider,
|
|
11
20
|
useLanguage,
|
|
12
21
|
usePreferKcwiki,
|
|
22
|
+
useRemoveStorage,
|
|
13
23
|
} from './store'
|
|
14
24
|
|
|
15
25
|
const Container = styled.div`
|
|
@@ -25,6 +35,54 @@ const Container = styled.div`
|
|
|
25
35
|
|
|
26
36
|
const useIsSimplifiedChinese = () => useLanguage() === 'zh-CN'
|
|
27
37
|
|
|
38
|
+
const DataExportArea = () => {
|
|
39
|
+
const [text, setText] = useState<string>('')
|
|
40
|
+
const { t } = usePluginTranslation()
|
|
41
|
+
const { exportQuestDataToClipboard, importAsPoiState } = useStateExporter()
|
|
42
|
+
|
|
43
|
+
const handleChange = useCallback((e: ChangeEvent<HTMLTextAreaElement>) => {
|
|
44
|
+
setText(e.target.value)
|
|
45
|
+
}, [])
|
|
46
|
+
|
|
47
|
+
const handleImportData = useCallback(() => {
|
|
48
|
+
importAsPoiState(text)
|
|
49
|
+
setText('')
|
|
50
|
+
tips.success(t('Import data success'))
|
|
51
|
+
}, [importAsPoiState, t, text])
|
|
52
|
+
|
|
53
|
+
const handleExportData = useCallback(async () => {
|
|
54
|
+
try {
|
|
55
|
+
await exportQuestDataToClipboard()
|
|
56
|
+
tips.success(t('Copied data to clipboard'))
|
|
57
|
+
} catch (error) {
|
|
58
|
+
console.error(error)
|
|
59
|
+
tips.error(t('Failed to export quest data! Please sync quest data first'))
|
|
60
|
+
}
|
|
61
|
+
}, [exportQuestDataToClipboard, t])
|
|
62
|
+
|
|
63
|
+
return IN_POI ? (
|
|
64
|
+
<Button
|
|
65
|
+
icon={IconNames.EXPORT}
|
|
66
|
+
text={t('Export quest data')}
|
|
67
|
+
onClick={handleExportData}
|
|
68
|
+
/>
|
|
69
|
+
) : (
|
|
70
|
+
<>
|
|
71
|
+
<TextArea
|
|
72
|
+
growVertically={false}
|
|
73
|
+
intent={Intent.PRIMARY}
|
|
74
|
+
onChange={handleChange}
|
|
75
|
+
value={text}
|
|
76
|
+
/>
|
|
77
|
+
<Button
|
|
78
|
+
icon={IconNames.IMPORT}
|
|
79
|
+
text={t('Import quest data')}
|
|
80
|
+
onClick={handleImportData}
|
|
81
|
+
/>
|
|
82
|
+
</>
|
|
83
|
+
)
|
|
84
|
+
}
|
|
85
|
+
|
|
28
86
|
const SettingsMain = () => {
|
|
29
87
|
const { t } = usePluginTranslation()
|
|
30
88
|
const isSimplifiedChinese = useIsSimplifiedChinese()
|
|
@@ -52,13 +110,15 @@ const SettingsMain = () => {
|
|
|
52
110
|
text={t('View source code on GitHub')}
|
|
53
111
|
href={homepage}
|
|
54
112
|
target="_blank"
|
|
55
|
-
|
|
113
|
+
/>
|
|
56
114
|
|
|
57
115
|
<Button
|
|
58
116
|
icon={IconNames.TRASH}
|
|
59
117
|
text={t('Restore defaults')}
|
|
60
118
|
onClick={removeStorage}
|
|
61
|
-
|
|
119
|
+
/>
|
|
120
|
+
|
|
121
|
+
<DataExportArea />
|
|
62
122
|
</>
|
|
63
123
|
)
|
|
64
124
|
}
|
package/src/Toolbar.tsx
CHANGED
|
@@ -1,14 +1,18 @@
|
|
|
1
|
-
import { Button, InputGroup
|
|
1
|
+
import { Button, InputGroup } from '@blueprintjs/core'
|
|
2
2
|
import { IconNames } from '@blueprintjs/icons'
|
|
3
3
|
import type { ChangeEvent } from 'react'
|
|
4
4
|
import React, { useCallback } from 'react'
|
|
5
5
|
import { useThrottle } from 'react-use'
|
|
6
6
|
import styled from 'styled-components'
|
|
7
|
-
import { IN_POI } from './poi/env'
|
|
8
7
|
import { usePluginTranslation } from './poi/hooks'
|
|
9
|
-
import
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
8
|
+
import { QUEST_STATUS, UnionQuest } from './questHelper'
|
|
9
|
+
import { PROGRESS_TAG, useQuest } from './store'
|
|
10
|
+
import {
|
|
11
|
+
useFilterProgressTag,
|
|
12
|
+
useFilterTags,
|
|
13
|
+
useSyncGameTagEffect,
|
|
14
|
+
} from './store/filterTags'
|
|
15
|
+
import { useGlobalQuestStatusQuery } from './store/gameQuest'
|
|
12
16
|
import { useSearchInput } from './store/search'
|
|
13
17
|
import { CategoryTags, CATEGORY_TAGS, TypeTags, TYPE_TAGS } from './tags'
|
|
14
18
|
import { And, Or } from './utils'
|
|
@@ -23,30 +27,6 @@ const ToolbarWrapper = styled.div`
|
|
|
23
27
|
}
|
|
24
28
|
`
|
|
25
29
|
|
|
26
|
-
const SyncButton = () => {
|
|
27
|
-
const { t } = usePluginTranslation()
|
|
28
|
-
const { searchInput } = useSearchInput()
|
|
29
|
-
const { syncWithGame, toggleSyncWithGame } = useSyncWithGame()
|
|
30
|
-
const handleClick = useCallback(() => {
|
|
31
|
-
toggleSyncWithGame()
|
|
32
|
-
}, [toggleSyncWithGame])
|
|
33
|
-
const intent = syncWithGame
|
|
34
|
-
? searchInput
|
|
35
|
-
? Intent.WARNING
|
|
36
|
-
: Intent.SUCCESS
|
|
37
|
-
: Intent.NONE
|
|
38
|
-
return (
|
|
39
|
-
<Tooltip content={t('Sync with game')}>
|
|
40
|
-
<Button
|
|
41
|
-
icon={IconNames.EXCHANGE}
|
|
42
|
-
intent={intent}
|
|
43
|
-
disabled={!IN_POI}
|
|
44
|
-
onClick={handleClick}
|
|
45
|
-
/>
|
|
46
|
-
</Tooltip>
|
|
47
|
-
)
|
|
48
|
-
}
|
|
49
|
-
|
|
50
30
|
export const SearchInput: React.FC = () => {
|
|
51
31
|
const { t } = usePluginTranslation()
|
|
52
32
|
const { searchInput, setSearchInput } = useSearchInput()
|
|
@@ -70,7 +50,6 @@ export const SearchInput: React.FC = () => {
|
|
|
70
50
|
{!!searchInput && (
|
|
71
51
|
<Button icon={IconNames.CROSS} onClick={handleClear} />
|
|
72
52
|
)}
|
|
73
|
-
<SyncButton></SyncButton>
|
|
74
53
|
</>
|
|
75
54
|
}
|
|
76
55
|
type="text"
|
|
@@ -79,6 +58,7 @@ export const SearchInput: React.FC = () => {
|
|
|
79
58
|
}
|
|
80
59
|
|
|
81
60
|
export const Toolbar = () => {
|
|
61
|
+
// TODO remove
|
|
82
62
|
useSyncGameTagEffect()
|
|
83
63
|
|
|
84
64
|
return (
|
|
@@ -116,10 +96,43 @@ const useInputStringFilter = () => {
|
|
|
116
96
|
return stringFilter
|
|
117
97
|
}
|
|
118
98
|
|
|
119
|
-
const useToolbarFilter = () => {
|
|
120
|
-
const
|
|
99
|
+
const useToolbarFilter = (): ((quest: UnionQuest) => boolean) => {
|
|
100
|
+
const searchFilter = useInputStringFilter()
|
|
121
101
|
const { typeTags, categoryTags } = useFilterTags()
|
|
122
102
|
|
|
103
|
+
const { progressTag } = useFilterProgressTag()
|
|
104
|
+
const questStatusQuery = useGlobalQuestStatusQuery()
|
|
105
|
+
|
|
106
|
+
const progressTagFilter = useCallback(
|
|
107
|
+
(quest: UnionQuest): boolean => {
|
|
108
|
+
const questStatus = questStatusQuery(quest.gameId)
|
|
109
|
+
switch (progressTag) {
|
|
110
|
+
case PROGRESS_TAG.All:
|
|
111
|
+
return true
|
|
112
|
+
case PROGRESS_TAG.Locked:
|
|
113
|
+
return (
|
|
114
|
+
questStatus === QUEST_STATUS.LOCKED ||
|
|
115
|
+
questStatus === QUEST_STATUS.UNKNOWN
|
|
116
|
+
)
|
|
117
|
+
case PROGRESS_TAG.Unlocked:
|
|
118
|
+
return (
|
|
119
|
+
questStatus === QUEST_STATUS.DEFAULT ||
|
|
120
|
+
questStatus === QUEST_STATUS.IN_PROGRESS ||
|
|
121
|
+
questStatus === QUEST_STATUS.COMPLETED
|
|
122
|
+
)
|
|
123
|
+
case PROGRESS_TAG.AlreadyCompleted:
|
|
124
|
+
return (
|
|
125
|
+
questStatus === QUEST_STATUS.COMPLETED ||
|
|
126
|
+
questStatus === QUEST_STATUS.ALREADY_COMPLETED
|
|
127
|
+
)
|
|
128
|
+
default:
|
|
129
|
+
console.warn('Unknown progressTag type!', progressTag)
|
|
130
|
+
}
|
|
131
|
+
return true
|
|
132
|
+
},
|
|
133
|
+
[progressTag, questStatusQuery]
|
|
134
|
+
)
|
|
135
|
+
|
|
123
136
|
const typeTagsFilter = Or(
|
|
124
137
|
...TYPE_TAGS.filter((tag) => typeTags[tag.name]).map((tag) => tag.filter)
|
|
125
138
|
)
|
|
@@ -128,7 +141,14 @@ const useToolbarFilter = () => {
|
|
|
128
141
|
(tag) => tag.filter
|
|
129
142
|
)
|
|
130
143
|
)
|
|
131
|
-
|
|
144
|
+
|
|
145
|
+
const toolbarFilter = And(
|
|
146
|
+
searchFilter,
|
|
147
|
+
typeTagsFilter,
|
|
148
|
+
categoryTagsFilter,
|
|
149
|
+
progressTagFilter
|
|
150
|
+
)
|
|
151
|
+
|
|
132
152
|
return toolbarFilter
|
|
133
153
|
}
|
|
134
154
|
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"api_no": 101,
|
|
4
|
+
"api_category": 1,
|
|
5
|
+
"api_type": 4,
|
|
6
|
+
"api_label_type": 1,
|
|
7
|
+
"api_state": 2,
|
|
8
|
+
"api_title": "はじめての「編成」!",
|
|
9
|
+
"api_detail": "2隻以上の艦で構成される「艦隊」を編成せよ!",
|
|
10
|
+
"api_voice_id": 0,
|
|
11
|
+
"api_get_material": [20, 20, 0, 0],
|
|
12
|
+
"api_bonus_flag": 1,
|
|
13
|
+
"api_progress_flag": 0,
|
|
14
|
+
"api_invalid_flag": 0
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"api_no": 202,
|
|
18
|
+
"api_category": 2,
|
|
19
|
+
"api_type": 4,
|
|
20
|
+
"api_label_type": 1,
|
|
21
|
+
"api_state": 2,
|
|
22
|
+
"api_title": "はじめての「出撃」!",
|
|
23
|
+
"api_detail": "艦隊を出撃させ、敵艦隊と交戦せよ!",
|
|
24
|
+
"api_voice_id": 0,
|
|
25
|
+
"api_get_material": [20, 20, 0, 0],
|
|
26
|
+
"api_bonus_flag": 1,
|
|
27
|
+
"api_progress_flag": 0,
|
|
28
|
+
"api_invalid_flag": 0
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"api_no": 301,
|
|
32
|
+
"api_category": 3,
|
|
33
|
+
"api_type": 4,
|
|
34
|
+
"api_label_type": 1,
|
|
35
|
+
"api_state": 3,
|
|
36
|
+
"api_title": "はじめての「演習」!",
|
|
37
|
+
"api_detail": "他の提督(プレイヤー)の艦隊と「演習」を行おう!",
|
|
38
|
+
"api_voice_id": 0,
|
|
39
|
+
"api_get_material": [10, 10, 0, 0],
|
|
40
|
+
"api_bonus_flag": 1,
|
|
41
|
+
"api_progress_flag": 0,
|
|
42
|
+
"api_invalid_flag": 0
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"api_no": 601,
|
|
46
|
+
"api_category": 6,
|
|
47
|
+
"api_type": 4,
|
|
48
|
+
"api_label_type": 1,
|
|
49
|
+
"api_state": 2,
|
|
50
|
+
"api_title": "はじめての「建造」!",
|
|
51
|
+
"api_detail": "「工廠」で鋼材などの資材を使って新しい艦を「建造」しよう!",
|
|
52
|
+
"api_voice_id": 0,
|
|
53
|
+
"api_get_material": [50, 50, 50, 50],
|
|
54
|
+
"api_bonus_flag": 1,
|
|
55
|
+
"api_progress_flag": 0,
|
|
56
|
+
"api_invalid_flag": 0
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"api_no": 701,
|
|
60
|
+
"api_category": 7,
|
|
61
|
+
"api_type": 4,
|
|
62
|
+
"api_label_type": 1,
|
|
63
|
+
"api_state": 1,
|
|
64
|
+
"api_title": "はじめての「近代化改修」!",
|
|
65
|
+
"api_detail": "任意の艦を近代化改修(合成)して、強化せよ!",
|
|
66
|
+
"api_voice_id": 0,
|
|
67
|
+
"api_get_material": [0, 0, 50, 30],
|
|
68
|
+
"api_bonus_flag": 1,
|
|
69
|
+
"api_progress_flag": 0,
|
|
70
|
+
"api_invalid_flag": 0
|
|
71
|
+
}
|
|
72
|
+
]
|
|
@@ -0,0 +1,338 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"api_no": 106,
|
|
4
|
+
"api_category": 1,
|
|
5
|
+
"api_type": 4,
|
|
6
|
+
"api_label_type": 1,
|
|
7
|
+
"api_state": 2,
|
|
8
|
+
"api_title": "「重巡戦隊」を編成せよ!",
|
|
9
|
+
"api_detail": "重巡洋艦2隻を擁する重巡艦隊を編成せよ!",
|
|
10
|
+
"api_voice_id": 0,
|
|
11
|
+
"api_get_material": [0, 70, 0, 30],
|
|
12
|
+
"api_bonus_flag": 1,
|
|
13
|
+
"api_progress_flag": 0,
|
|
14
|
+
"api_invalid_flag": 0
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"api_no": 108,
|
|
18
|
+
"api_category": 1,
|
|
19
|
+
"api_type": 4,
|
|
20
|
+
"api_label_type": 1,
|
|
21
|
+
"api_state": 1,
|
|
22
|
+
"api_title": "「天龍」型軽巡姉妹の全2艦を編成せよ!",
|
|
23
|
+
"api_detail": "天龍型軽巡洋艦「天龍」「龍田」を同一艦隊に配属せよ!",
|
|
24
|
+
"api_voice_id": 0,
|
|
25
|
+
"api_get_material": [100, 100, 100, 50],
|
|
26
|
+
"api_bonus_flag": 1,
|
|
27
|
+
"api_progress_flag": 0,
|
|
28
|
+
"api_invalid_flag": 0
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"api_no": 116,
|
|
32
|
+
"api_category": 1,
|
|
33
|
+
"api_type": 4,
|
|
34
|
+
"api_label_type": 1,
|
|
35
|
+
"api_state": 1,
|
|
36
|
+
"api_title": "「水上機母艦」を配備せよ!",
|
|
37
|
+
"api_detail": "多数の水上偵察機を運用する「水上機母艦」を艦隊に配備せよ!",
|
|
38
|
+
"api_voice_id": 0,
|
|
39
|
+
"api_get_material": [0, 0, 0, 200],
|
|
40
|
+
"api_bonus_flag": 1,
|
|
41
|
+
"api_progress_flag": 0,
|
|
42
|
+
"api_invalid_flag": 0
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"api_no": 117,
|
|
46
|
+
"api_category": 1,
|
|
47
|
+
"api_type": 4,
|
|
48
|
+
"api_label_type": 1,
|
|
49
|
+
"api_state": 1,
|
|
50
|
+
"api_title": "第2艦隊で空母機動部隊を編成せよ!",
|
|
51
|
+
"api_detail": "第2艦隊に空母を配備して、空母機動部隊を編成せよ!",
|
|
52
|
+
"api_voice_id": 0,
|
|
53
|
+
"api_get_material": [100, 0, 0, 100],
|
|
54
|
+
"api_bonus_flag": 1,
|
|
55
|
+
"api_progress_flag": 0,
|
|
56
|
+
"api_invalid_flag": 0
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"api_no": 201,
|
|
60
|
+
"api_category": 2,
|
|
61
|
+
"api_type": 1,
|
|
62
|
+
"api_label_type": 2,
|
|
63
|
+
"api_state": 1,
|
|
64
|
+
"api_title": "敵艦隊を撃破せよ!",
|
|
65
|
+
"api_detail": "艦隊を出撃させ、敵艦隊を捕捉、これを撃滅せよ!",
|
|
66
|
+
"api_voice_id": 0,
|
|
67
|
+
"api_get_material": [50, 50, 0, 0],
|
|
68
|
+
"api_bonus_flag": 1,
|
|
69
|
+
"api_progress_flag": 0,
|
|
70
|
+
"api_invalid_flag": 0
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"api_no": 205,
|
|
74
|
+
"api_category": 2,
|
|
75
|
+
"api_type": 4,
|
|
76
|
+
"api_label_type": 1,
|
|
77
|
+
"api_state": 1,
|
|
78
|
+
"api_title": "接近する「敵前衛艦隊」を迎撃せよ!",
|
|
79
|
+
"api_detail": "南西諸島沖に接近する「敵前衛艦隊」を捕捉、これを撃滅せよ!",
|
|
80
|
+
"api_voice_id": 0,
|
|
81
|
+
"api_get_material": [50, 0, 50, 0],
|
|
82
|
+
"api_bonus_flag": 1,
|
|
83
|
+
"api_progress_flag": 0,
|
|
84
|
+
"api_invalid_flag": 0
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"api_no": 254,
|
|
88
|
+
"api_category": 2,
|
|
89
|
+
"api_type": 4,
|
|
90
|
+
"api_label_type": 1,
|
|
91
|
+
"api_state": 1,
|
|
92
|
+
"api_title": "「軽空母」戦隊、出撃せよ!",
|
|
93
|
+
"api_detail": "軽空母1~2隻、軽巡1隻、駆逐艦3~4隻の艦隊で南西諸島近海の敵を撃滅せよ!",
|
|
94
|
+
"api_voice_id": 0,
|
|
95
|
+
"api_get_material": [0, 300, 0, 300],
|
|
96
|
+
"api_bonus_flag": 1,
|
|
97
|
+
"api_progress_flag": 0,
|
|
98
|
+
"api_invalid_flag": 0
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"api_no": 303,
|
|
102
|
+
"api_category": 3,
|
|
103
|
+
"api_type": 1,
|
|
104
|
+
"api_label_type": 2,
|
|
105
|
+
"api_state": 1,
|
|
106
|
+
"api_title": "「演習」で練度向上!",
|
|
107
|
+
"api_detail": "本日中に他の司令官の艦隊に対して3回「演習」を挑もう!",
|
|
108
|
+
"api_voice_id": 0,
|
|
109
|
+
"api_get_material": [50, 0, 50, 0],
|
|
110
|
+
"api_bonus_flag": 1,
|
|
111
|
+
"api_progress_flag": 0,
|
|
112
|
+
"api_invalid_flag": 0
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"api_no": 320,
|
|
116
|
+
"api_category": 3,
|
|
117
|
+
"api_type": 4,
|
|
118
|
+
"api_label_type": 1,
|
|
119
|
+
"api_state": 1,
|
|
120
|
+
"api_title": "駆逐隊、特訓始め!",
|
|
121
|
+
"api_detail": "駆逐隊演習任務:駆逐艦4隻で編成される駆逐隊。この駆逐隊を含む艦隊を編成。<br>特訓を開始する!同艦隊で本日中に演習にて4回以上勝利せよ!",
|
|
122
|
+
"api_voice_id": 0,
|
|
123
|
+
"api_get_material": [100, 100, 0, 0],
|
|
124
|
+
"api_bonus_flag": 1,
|
|
125
|
+
"api_progress_flag": 0,
|
|
126
|
+
"api_invalid_flag": 0
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
"api_no": 348,
|
|
130
|
+
"api_category": 3,
|
|
131
|
+
"api_type": 5,
|
|
132
|
+
"api_label_type": 102,
|
|
133
|
+
"api_state": 1,
|
|
134
|
+
"api_title": "「精鋭軽巡」演習!",
|
|
135
|
+
"api_detail": "旗艦に軽巡級(雷巡を除く)、旗艦含む3隻以上の軽巡級と随伴駆逐艦2隻を配備した軽巡演習艦隊を<br>編成、同艦隊により本日中に演習で【A判定】以上の勝利を4回以上達成せよ!",
|
|
136
|
+
"api_voice_id": 0,
|
|
137
|
+
"api_get_material": [200, 0, 200, 200],
|
|
138
|
+
"api_bonus_flag": 1,
|
|
139
|
+
"api_progress_flag": 0,
|
|
140
|
+
"api_invalid_flag": 0
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
"api_no": 401,
|
|
144
|
+
"api_category": 4,
|
|
145
|
+
"api_type": 4,
|
|
146
|
+
"api_label_type": 1,
|
|
147
|
+
"api_state": 1,
|
|
148
|
+
"api_title": "はじめての「遠征」!",
|
|
149
|
+
"api_detail": "艦隊を「遠征」に出発させよう!",
|
|
150
|
+
"api_voice_id": 0,
|
|
151
|
+
"api_get_material": [30, 30, 30, 30],
|
|
152
|
+
"api_bonus_flag": 1,
|
|
153
|
+
"api_progress_flag": 0,
|
|
154
|
+
"api_invalid_flag": 0
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
"api_no": 503,
|
|
158
|
+
"api_category": 5,
|
|
159
|
+
"api_type": 1,
|
|
160
|
+
"api_label_type": 2,
|
|
161
|
+
"api_state": 1,
|
|
162
|
+
"api_title": "艦隊大整備!",
|
|
163
|
+
"api_detail": "各艦隊から整備が必要な艦を5隻以上ドック入りさせ、大規模な整備をしよう!",
|
|
164
|
+
"api_voice_id": 0,
|
|
165
|
+
"api_get_material": [30, 30, 30, 30],
|
|
166
|
+
"api_bonus_flag": 1,
|
|
167
|
+
"api_progress_flag": 0,
|
|
168
|
+
"api_invalid_flag": 0
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
"api_no": 605,
|
|
172
|
+
"api_category": 6,
|
|
173
|
+
"api_type": 1,
|
|
174
|
+
"api_label_type": 2,
|
|
175
|
+
"api_state": 1,
|
|
176
|
+
"api_title": "新装備「開発」指令",
|
|
177
|
+
"api_detail": "「工廠」で装備アイテムを新たに「開発」しよう(失敗もOK)!",
|
|
178
|
+
"api_voice_id": 0,
|
|
179
|
+
"api_get_material": [40, 40, 40, 40],
|
|
180
|
+
"api_bonus_flag": 1,
|
|
181
|
+
"api_progress_flag": 0,
|
|
182
|
+
"api_invalid_flag": 0
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
"api_no": 612,
|
|
186
|
+
"api_category": 6,
|
|
187
|
+
"api_type": 4,
|
|
188
|
+
"api_label_type": 1,
|
|
189
|
+
"api_state": 1,
|
|
190
|
+
"api_title": "輸送用ドラム缶の準備",
|
|
191
|
+
"api_detail": "「工廠」で装備アイテムを3回「廃棄」して、輸送用のドラム缶を準備します。",
|
|
192
|
+
"api_voice_id": 0,
|
|
193
|
+
"api_get_material": [0, 0, 30, 0],
|
|
194
|
+
"api_bonus_flag": 1,
|
|
195
|
+
"api_progress_flag": 0,
|
|
196
|
+
"api_invalid_flag": 0
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
"api_no": 617,
|
|
200
|
+
"api_category": 6,
|
|
201
|
+
"api_type": 4,
|
|
202
|
+
"api_label_type": 1,
|
|
203
|
+
"api_state": 1,
|
|
204
|
+
"api_title": "「伊良湖」の準備",
|
|
205
|
+
"api_detail": "「工廠」で不要な装備アイテムをいくつか「廃棄」して、新型給糧艦召喚の準備をしましょう!",
|
|
206
|
+
"api_voice_id": 0,
|
|
207
|
+
"api_get_material": [100, 0, 0, 0],
|
|
208
|
+
"api_bonus_flag": 1,
|
|
209
|
+
"api_progress_flag": 0,
|
|
210
|
+
"api_invalid_flag": 0
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
"api_no": 634,
|
|
214
|
+
"api_category": 6,
|
|
215
|
+
"api_type": 4,
|
|
216
|
+
"api_label_type": 1,
|
|
217
|
+
"api_state": 1,
|
|
218
|
+
"api_title": "新家具の準備",
|
|
219
|
+
"api_detail": "「工廠」で装備アイテムを9つ「廃棄」して、新家具の準備をします。",
|
|
220
|
+
"api_voice_id": 0,
|
|
221
|
+
"api_get_material": [0, 0, 90, 0],
|
|
222
|
+
"api_bonus_flag": 1,
|
|
223
|
+
"api_progress_flag": 0,
|
|
224
|
+
"api_invalid_flag": 0
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
"api_no": 679,
|
|
228
|
+
"api_category": 6,
|
|
229
|
+
"api_type": 4,
|
|
230
|
+
"api_label_type": 1,
|
|
231
|
+
"api_state": 1,
|
|
232
|
+
"api_title": "対空兵装の拡充",
|
|
233
|
+
"api_detail": "対空兵装の整備拡充を実施する!「中口径主砲」系装備x6、「副砲」系装備x3を廃棄、<br>ボーキサイト900を準備せよ! ※任務達成後、準備した資源は消費します。",
|
|
234
|
+
"api_voice_id": 0,
|
|
235
|
+
"api_get_material": [0, 100, 0, 0],
|
|
236
|
+
"api_bonus_flag": 1,
|
|
237
|
+
"api_progress_flag": 0,
|
|
238
|
+
"api_invalid_flag": 0
|
|
239
|
+
},
|
|
240
|
+
{
|
|
241
|
+
"api_no": 691,
|
|
242
|
+
"api_category": 6,
|
|
243
|
+
"api_type": 4,
|
|
244
|
+
"api_label_type": 1,
|
|
245
|
+
"api_state": 1,
|
|
246
|
+
"api_title": "提督室のリフォーム",
|
|
247
|
+
"api_detail": "提督室のリフォームを実施する!まずは装備の整理から!「中口径主砲」系装備x4、「副砲」系装備x4、<br>「機銃」系装備x4を廃棄、ボーキサイト1,600を準備せよ! ※任務達成後、準備した資源は消費します。",
|
|
248
|
+
"api_voice_id": 0,
|
|
249
|
+
"api_get_material": [200, 0, 0, 0],
|
|
250
|
+
"api_bonus_flag": 1,
|
|
251
|
+
"api_progress_flag": 0,
|
|
252
|
+
"api_invalid_flag": 0
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
"api_no": 692,
|
|
256
|
+
"api_category": 6,
|
|
257
|
+
"api_type": 4,
|
|
258
|
+
"api_label_type": 1,
|
|
259
|
+
"api_state": 1,
|
|
260
|
+
"api_title": "水上艦艇装備工廠の整備",
|
|
261
|
+
"api_detail": "水上艦艇装備工廠の整備を実施する!「小口径主砲」系装備x5、「大口径主砲」系装備x5、<br>「水偵」系装備x5を廃棄、鋼材3,000を準備せよ! ※任務達成後、準備した資源は消費します。",
|
|
262
|
+
"api_voice_id": 0,
|
|
263
|
+
"api_get_material": [0, 0, 0, 100],
|
|
264
|
+
"api_bonus_flag": 1,
|
|
265
|
+
"api_progress_flag": 0,
|
|
266
|
+
"api_invalid_flag": 0
|
|
267
|
+
},
|
|
268
|
+
{
|
|
269
|
+
"api_no": 702,
|
|
270
|
+
"api_category": 7,
|
|
271
|
+
"api_type": 1,
|
|
272
|
+
"api_label_type": 2,
|
|
273
|
+
"api_state": 1,
|
|
274
|
+
"api_title": "艦の「近代化改修」を実施せよ!",
|
|
275
|
+
"api_detail": "近代化改修を実施して、2回以上これを成功させよ!",
|
|
276
|
+
"api_voice_id": 0,
|
|
277
|
+
"api_get_material": [20, 20, 50, 0],
|
|
278
|
+
"api_bonus_flag": 1,
|
|
279
|
+
"api_progress_flag": 0,
|
|
280
|
+
"api_invalid_flag": 0
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
"api_no": 810,
|
|
284
|
+
"api_category": 8,
|
|
285
|
+
"api_type": 4,
|
|
286
|
+
"api_label_type": 1,
|
|
287
|
+
"api_state": 1,
|
|
288
|
+
"api_title": "製油所地帯を防衛せよ!",
|
|
289
|
+
"api_detail": "水雷戦隊を製油所地帯沿岸に展開!同海域に出没する敵艦隊を三回以上撃滅せよ!",
|
|
290
|
+
"api_voice_id": 0,
|
|
291
|
+
"api_get_material": [400, 0, 0, 0],
|
|
292
|
+
"api_bonus_flag": 1,
|
|
293
|
+
"api_progress_flag": 0,
|
|
294
|
+
"api_invalid_flag": 0
|
|
295
|
+
},
|
|
296
|
+
{
|
|
297
|
+
"api_no": 817,
|
|
298
|
+
"api_category": 8,
|
|
299
|
+
"api_type": 4,
|
|
300
|
+
"api_label_type": 1,
|
|
301
|
+
"api_state": 2,
|
|
302
|
+
"api_title": "新編艦隊、南西諸島防衛線へ急行せよ!",
|
|
303
|
+
"api_detail": "水雷戦隊を含む新編艦隊を南西諸島防衛線に展開、同方面に来襲する敵艦隊を撃破せよ!",
|
|
304
|
+
"api_voice_id": 0,
|
|
305
|
+
"api_get_material": [300, 300, 300, 0],
|
|
306
|
+
"api_bonus_flag": 1,
|
|
307
|
+
"api_progress_flag": 0,
|
|
308
|
+
"api_invalid_flag": 0
|
|
309
|
+
},
|
|
310
|
+
{
|
|
311
|
+
"api_no": 831,
|
|
312
|
+
"api_category": 8,
|
|
313
|
+
"api_type": 4,
|
|
314
|
+
"api_label_type": 1,
|
|
315
|
+
"api_state": 1,
|
|
316
|
+
"api_title": "春の海上警備行動!艦隊、抜錨せよ!",
|
|
317
|
+
"api_detail": "春季特別任務:旗艦に軽巡級・軽空母・水上機母艦を配備、駆逐艦・海防艦計4隻以上を含む艦隊を編成、<br>鎮守府正面海域、南西諸島沖、製油所地帯沿岸、南西諸島防衛線の海上警備を実施、敵を発見撃滅せよ!",
|
|
318
|
+
"api_voice_id": 0,
|
|
319
|
+
"api_get_material": [250, 250, 0, 250],
|
|
320
|
+
"api_bonus_flag": 1,
|
|
321
|
+
"api_progress_flag": 0,
|
|
322
|
+
"api_invalid_flag": 0
|
|
323
|
+
},
|
|
324
|
+
{
|
|
325
|
+
"api_no": 1112,
|
|
326
|
+
"api_category": 11,
|
|
327
|
+
"api_type": 4,
|
|
328
|
+
"api_label_type": 1,
|
|
329
|
+
"api_state": 2,
|
|
330
|
+
"api_title": "鎮守府「大掃除」祭り!",
|
|
331
|
+
"api_detail": "「小口径主砲」「中口径主砲」「大口径主砲」各x4装備を廃棄、ドラム缶(輸送用)x1、開発資材x10<br>鋼材1,800を準備せよ!(任務達成後、準備した資源・ドラム缶(輸送用)・開発資材は消費)",
|
|
332
|
+
"api_voice_id": 0,
|
|
333
|
+
"api_get_material": [0, 650, 0, 550],
|
|
334
|
+
"api_bonus_flag": 1,
|
|
335
|
+
"api_progress_flag": 0,
|
|
336
|
+
"api_invalid_flag": 0
|
|
337
|
+
}
|
|
338
|
+
]
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { version, QuestData } from '../../build/kcanotifyGamedata'
|
|
2
2
|
|
|
3
3
|
test('should Kcanotify Game data version correct', () => {
|
|
4
|
-
expect(version).toMatchInlineSnapshot(`"
|
|
4
|
+
expect(version).toMatchInlineSnapshot(`"2022091101"`)
|
|
5
5
|
})
|
|
6
6
|
|
|
7
7
|
test('should Kcanotify Game data keys correct', () => {
|
|
@@ -4,7 +4,7 @@ import newQuestData from '../../build/kcQuestsData/quests-scn-new.json'
|
|
|
4
4
|
describe('should version correct', () => {
|
|
5
5
|
test('should KcwikiQuestData Game data version correct', () => {
|
|
6
6
|
expect(version).toMatchInlineSnapshot(
|
|
7
|
-
`"
|
|
7
|
+
`"e510419a4a52a1253139d82c3c8022497ab00b0d"`
|
|
8
8
|
)
|
|
9
9
|
})
|
|
10
10
|
|
|
@@ -19,7 +19,6 @@ import {
|
|
|
19
19
|
TagsWrapper,
|
|
20
20
|
} from './styles'
|
|
21
21
|
import { questIconMap, questStatusMap } from './utils'
|
|
22
|
-
import { IN_POI } from '../../poi/env'
|
|
23
22
|
|
|
24
23
|
export type QuestCardProps = {
|
|
25
24
|
gameId: number
|
|
@@ -71,7 +70,6 @@ export const QuestCard = forwardRef<
|
|
|
71
70
|
const status = useQuestStatus(gameId)
|
|
72
71
|
const headIcon = questIconMap[guessQuestCategory(code).type]
|
|
73
72
|
const TailIcon = questStatusMap[status]
|
|
74
|
-
const inPoi = IN_POI
|
|
75
73
|
|
|
76
74
|
return (
|
|
77
75
|
<FlexCard
|
|
@@ -90,7 +88,9 @@ export const QuestCard = forwardRef<
|
|
|
90
88
|
<CardAction gameId={gameId}></CardAction>
|
|
91
89
|
</CardBody>
|
|
92
90
|
|
|
93
|
-
<CardTail>
|
|
91
|
+
<CardTail>
|
|
92
|
+
<TailIcon />
|
|
93
|
+
</CardTail>
|
|
94
94
|
</FlexCard>
|
|
95
95
|
)
|
|
96
96
|
})
|