poi-plugin-remodel-assistant 1.2.6-beta.1 → 1.2.6
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 +25 -17
- package/assets/main.css +8 -6
- package/i18n/en-US.json +3 -3
- package/i18n/ja-JP.json +3 -3
- package/i18n/zh-CN.json +3 -3
- package/i18n/zh-TW.json +3 -3
- package/package.json +2 -2
- package/views/new-interface/equipment/components/equipment-detail.js +52 -7
package/README.md
CHANGED
|
@@ -1,34 +1,42 @@
|
|
|
1
1
|
# 改修助手
|
|
2
2
|
|
|
3
|
-
Poi
|
|
3
|
+
Poi plugin for planning Kantai Collection equipment improvements.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Tell the plugin the equipment you ultimately want, the target improvement level, and quantity. It will combine that goal with your current inventory to organize routes, intermediate equipment, material requirements, and what you can improve today.
|
|
6
6
|
|
|
7
7
|
## Features
|
|
8
8
|
|
|
9
|
-
-
|
|
10
|
-
-
|
|
11
|
-
-
|
|
12
|
-
- Review acquisition sources
|
|
13
|
-
-
|
|
14
|
-
-
|
|
15
|
-
-
|
|
9
|
+
- Create improvement plans directly from **Equipment library**.
|
|
10
|
+
- Match plans against your current inventory to determine the practical starting point.
|
|
11
|
+
- Manage complete improvement routes, with explicit user choice when more than one valid route exists.
|
|
12
|
+
- Review acquisition sources for missing prerequisite equipment, including development, quests, and ship initial/remodel equipment when available.
|
|
13
|
+
- Use **Today** to see plans that can be advanced now, together with assistant ships, available days, materials, and remaining routes.
|
|
14
|
+
- Filter and sort equipment, manage low-priority equipment, and customize ordinary detail sections.
|
|
15
|
+
- Back up and restore plans, route choices, and interface settings.
|
|
16
16
|
|
|
17
17
|
## Quick Start
|
|
18
18
|
|
|
19
|
-
1. Open **Equipment library
|
|
20
|
-
2.
|
|
21
|
-
3.
|
|
19
|
+
1. Open **Equipment library** and select your target equipment.
|
|
20
|
+
2. Set the target improvement level and quantity, then create a plan.
|
|
21
|
+
3. If more than one route is available, choose the route you want.
|
|
22
|
+
4. Open **Today** and follow the current guidance.
|
|
22
23
|
|
|
23
|
-
The in-plugin **Help** entry contains
|
|
24
|
+
The in-plugin **Help** entry contains illustrated guides.
|
|
24
25
|
|
|
25
|
-
##
|
|
26
|
+
## Data Sources
|
|
26
27
|
|
|
27
|
-
|
|
28
|
+
Improvement information is based on:
|
|
29
|
+
|
|
30
|
+
- Akashi-List
|
|
31
|
+
- wikiwiki.jp
|
|
32
|
+
- KcWiki-Api
|
|
33
|
+
- KC3
|
|
28
34
|
|
|
29
|
-
|
|
35
|
+
The plugin uses the latest available data and shows the active data version and update time in **Help**.
|
|
30
36
|
|
|
31
|
-
|
|
37
|
+
## Installation
|
|
38
|
+
|
|
39
|
+
Install `poi-plugin-remodel-assistant` from the Poi plugin manager.
|
|
32
40
|
|
|
33
41
|
## License
|
|
34
42
|
|
package/assets/main.css
CHANGED
|
@@ -11011,13 +11011,13 @@ body.decision-modal-is-dragging * {
|
|
|
11011
11011
|
|
|
11012
11012
|
#item-improvement .decision-detail-related-plan-group-label {
|
|
11013
11013
|
width: fit-content;
|
|
11014
|
-
padding:
|
|
11014
|
+
padding: 2px 8px;
|
|
11015
11015
|
border-radius: 999px;
|
|
11016
11016
|
background: rgba(103, 198, 193, 0.09);
|
|
11017
11017
|
color: #67c6c1;
|
|
11018
|
-
font-size: var(--improvement-font-
|
|
11018
|
+
font-size: var(--improvement-font-small);
|
|
11019
11019
|
font-weight: 700;
|
|
11020
|
-
line-height: 1.
|
|
11020
|
+
line-height: 1.5;
|
|
11021
11021
|
}
|
|
11022
11022
|
|
|
11023
11023
|
#item-improvement .decision-detail-related-plan-list {
|
|
@@ -11057,11 +11057,13 @@ body.decision-modal-is-dragging * {
|
|
|
11057
11057
|
display: flex;
|
|
11058
11058
|
align-items: center;
|
|
11059
11059
|
gap: 5px;
|
|
11060
|
-
padding
|
|
11060
|
+
padding: 2px 8px 0 10px;
|
|
11061
11061
|
color: #c8d2d7;
|
|
11062
|
-
font-size: var(--improvement-font-body);
|
|
11062
|
+
font-size: var(--improvement-font-body-large);
|
|
11063
11063
|
font-weight: 650;
|
|
11064
|
-
|
|
11064
|
+
line-height: 1.45;
|
|
11065
|
+
white-space: normal;
|
|
11066
|
+
overflow-wrap: anywhere;
|
|
11065
11067
|
}
|
|
11066
11068
|
|
|
11067
11069
|
#item-improvement .decision-detail-related-plan-parent-arrow {
|
package/i18n/en-US.json
CHANGED
|
@@ -1596,8 +1596,8 @@
|
|
|
1596
1596
|
"data.Backup summary %p plans %r routes %l low priority": "%p plans · %r routes · %l low-priority equipment",
|
|
1597
1597
|
"equipment.Search equipment name": "Search equipment name",
|
|
1598
1598
|
"workbench.Search equipment name": "Search equipment name",
|
|
1599
|
-
"app.changelog_1_2_6_1": "
|
|
1600
|
-
"app.changelog_1_2_6_2": "Fixed
|
|
1599
|
+
"app.changelog_1_2_6_1": "Improved plan calculation and startup speed.",
|
|
1600
|
+
"app.changelog_1_2_6_2": "Fixed plan-count and equipment-allocation issues that could occur in rare edge cases.",
|
|
1601
1601
|
"shared.Show parent plans": "Show parent plans",
|
|
1602
|
-
"app.changelog_1_2_6_3": "Improved related-
|
|
1602
|
+
"app.changelog_1_2_6_3": "Improved related-plan and consumable-plan display for better readability."
|
|
1603
1603
|
}
|
package/i18n/ja-JP.json
CHANGED
|
@@ -1596,8 +1596,8 @@
|
|
|
1596
1596
|
"data.Backup summary %p plans %r routes %l low priority": "プラン %p · ルート %r · 低優先装備 %l",
|
|
1597
1597
|
"equipment.Search equipment name": "装備名を検索",
|
|
1598
1598
|
"workbench.Search equipment name": "装備名を検索",
|
|
1599
|
-
"app.changelog_1_2_6_1": "
|
|
1600
|
-
"app.changelog_1_2_6_2": "
|
|
1599
|
+
"app.changelog_1_2_6_1": "計画計算と起動速度を改善しました。",
|
|
1600
|
+
"app.changelog_1_2_6_2": "ごくまれな条件で計画数や装備割り当てが正しくならない問題を修正しました。",
|
|
1601
1601
|
"shared.Show parent plans": "親計画を表示",
|
|
1602
|
-
"app.changelog_1_2_6_3": "
|
|
1602
|
+
"app.changelog_1_2_6_3": "関連計画と消耗品計画の表示を改善し、読みやすくしました。"
|
|
1603
1603
|
}
|
package/i18n/zh-CN.json
CHANGED
|
@@ -1596,8 +1596,8 @@
|
|
|
1596
1596
|
"data.Backup summary %p plans %r routes %l low priority": "计划 %p · 路线 %r · 低优先装备 %l",
|
|
1597
1597
|
"equipment.Search equipment name": "搜索装备名称",
|
|
1598
1598
|
"workbench.Search equipment name": "搜索装备名称",
|
|
1599
|
-
"app.changelog_1_2_6_1": "
|
|
1600
|
-
"app.changelog_1_2_6_2": "
|
|
1599
|
+
"app.changelog_1_2_6_1": "优化计划计算与启动速度。",
|
|
1600
|
+
"app.changelog_1_2_6_2": "修复极端情况下计划数量和装备分配异常的问题。",
|
|
1601
1601
|
"shared.Show parent plans": "显示父计划",
|
|
1602
|
-
"app.changelog_1_2_6_3": "
|
|
1602
|
+
"app.changelog_1_2_6_3": "优化相关计划与耗材计划的显示,提高可读性。"
|
|
1603
1603
|
}
|
package/i18n/zh-TW.json
CHANGED
|
@@ -1596,8 +1596,8 @@
|
|
|
1596
1596
|
"data.Backup summary %p plans %r routes %l low priority": "計畫 %p · 路線 %r · 低優先裝備 %l",
|
|
1597
1597
|
"equipment.Search equipment name": "搜尋裝備名稱",
|
|
1598
1598
|
"workbench.Search equipment name": "搜尋裝備名稱",
|
|
1599
|
-
"app.changelog_1_2_6_1": "
|
|
1600
|
-
"app.changelog_1_2_6_2": "
|
|
1599
|
+
"app.changelog_1_2_6_1": "最佳化計畫計算與啟動速度。",
|
|
1600
|
+
"app.changelog_1_2_6_2": "修復極端情況下計畫數量與裝備分配異常的問題。",
|
|
1601
1601
|
"shared.Show parent plans": "顯示父計畫",
|
|
1602
|
-
"app.changelog_1_2_6_3": "
|
|
1602
|
+
"app.changelog_1_2_6_3": "最佳化相關計畫與耗材計畫的顯示,提高可讀性。"
|
|
1603
1603
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "poi-plugin-remodel-assistant",
|
|
3
|
-
"version": "1.2.6
|
|
3
|
+
"version": "1.2.6",
|
|
4
4
|
"description": "View enhanced KanColle improvement data, manage improvement plans, and receive improvement recommendations.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"author": {
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"icon": "fa/wrench",
|
|
28
28
|
"id": "poi-plugin-remodel-assistant",
|
|
29
29
|
"priority": 50,
|
|
30
|
-
"releaseChannel": "
|
|
30
|
+
"releaseChannel": "stable",
|
|
31
31
|
"title": "改修助手",
|
|
32
32
|
"runtimeFlags": {
|
|
33
33
|
"forceFullDecisionRebuild": false,
|
|
@@ -49,6 +49,8 @@ const __ = (key, ...args) => translate(`equipment.${key}`, ...args);
|
|
|
49
49
|
|
|
50
50
|
const localizedName = name => window.i18n.resources.__(name || '');
|
|
51
51
|
|
|
52
|
+
const PLAN_ADD_QUEUE_STEP_MS = 180;
|
|
53
|
+
|
|
52
54
|
const inventoryEntries = levels => {
|
|
53
55
|
const counts = {};
|
|
54
56
|
const normalizedLevels = levels || [];
|
|
@@ -97,8 +99,12 @@ class EquipmentPlanSection extends _react.default.Component {
|
|
|
97
99
|
this.state = {
|
|
98
100
|
observedItemId: Number(props.item && props.item.id) || null,
|
|
99
101
|
star: allowed.includes(10) ? 10 : allowed[0] || 0,
|
|
100
|
-
count: 1
|
|
102
|
+
count: 1,
|
|
103
|
+
addPendingCount: 0
|
|
101
104
|
};
|
|
105
|
+
this.addPlanQueue = [];
|
|
106
|
+
this.addPlanProcessing = false;
|
|
107
|
+
this.addPlanDrainTimer = null;
|
|
102
108
|
}
|
|
103
109
|
|
|
104
110
|
static getDerivedStateFromProps({
|
|
@@ -114,6 +120,10 @@ class EquipmentPlanSection extends _react.default.Component {
|
|
|
114
120
|
};
|
|
115
121
|
}
|
|
116
122
|
|
|
123
|
+
componentWillUnmount() {
|
|
124
|
+
if (this.addPlanDrainTimer) clearTimeout(this.addPlanDrainTimer);
|
|
125
|
+
}
|
|
126
|
+
|
|
117
127
|
render() {
|
|
118
128
|
const {
|
|
119
129
|
item,
|
|
@@ -122,7 +132,8 @@ class EquipmentPlanSection extends _react.default.Component {
|
|
|
122
132
|
} = this.props;
|
|
123
133
|
const {
|
|
124
134
|
star,
|
|
125
|
-
count
|
|
135
|
+
count,
|
|
136
|
+
addPendingCount
|
|
126
137
|
} = this.state;
|
|
127
138
|
const rows = (0, _planManagementDomain.buildPlanOccurrenceDisplayRows)(item);
|
|
128
139
|
const ownedEntries = inventoryEntries(item.levels);
|
|
@@ -209,8 +220,9 @@ class EquipmentPlanSection extends _react.default.Component {
|
|
|
209
220
|
bsStyle: "success",
|
|
210
221
|
bsSize: "small",
|
|
211
222
|
disabled: !canAdd,
|
|
223
|
+
"aria-busy": addPendingCount > 0,
|
|
212
224
|
onClick: this.handleAdd
|
|
213
|
-
}, __('Add plan')))));
|
|
225
|
+
}, addPendingCount > 0 ? `${__('Add plan')} (${addPendingCount})` : __('Add plan')))));
|
|
214
226
|
}
|
|
215
227
|
|
|
216
228
|
}
|
|
@@ -228,14 +240,40 @@ Object.defineProperty(EquipmentPlanSection, "propTypes", {
|
|
|
228
240
|
});
|
|
229
241
|
|
|
230
242
|
var _initialiseProps = function () {
|
|
243
|
+
Object.defineProperty(this, "drainAddPlanQueue", {
|
|
244
|
+
configurable: true,
|
|
245
|
+
enumerable: true,
|
|
246
|
+
writable: true,
|
|
247
|
+
value: () => {
|
|
248
|
+
if (this.addPlanProcessing || this.addPlanQueue.length === 0) return;
|
|
249
|
+
const request = this.addPlanQueue.shift();
|
|
250
|
+
this.addPlanProcessing = true;
|
|
251
|
+
this.setState({
|
|
252
|
+
addPendingCount: this.addPlanQueue.length + 1
|
|
253
|
+
});
|
|
254
|
+
|
|
255
|
+
try {
|
|
256
|
+
(0, _planStorage.incrementEquipPlan)(request.itemId, request.star, request.count);
|
|
257
|
+
this.props.onPlanChanged(request.itemId, 'concrete');
|
|
258
|
+
} finally {
|
|
259
|
+
if (this.addPlanDrainTimer) clearTimeout(this.addPlanDrainTimer);
|
|
260
|
+
this.addPlanDrainTimer = setTimeout(() => {
|
|
261
|
+
this.addPlanProcessing = false;
|
|
262
|
+
this.addPlanDrainTimer = null;
|
|
263
|
+
this.setState({
|
|
264
|
+
addPendingCount: this.addPlanQueue.length
|
|
265
|
+
}, this.drainAddPlanQueue);
|
|
266
|
+
}, PLAN_ADD_QUEUE_STEP_MS);
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
});
|
|
231
270
|
Object.defineProperty(this, "handleAdd", {
|
|
232
271
|
configurable: true,
|
|
233
272
|
enumerable: true,
|
|
234
273
|
writable: true,
|
|
235
274
|
value: () => {
|
|
236
275
|
const {
|
|
237
|
-
item
|
|
238
|
-
onPlanChanged
|
|
276
|
+
item
|
|
239
277
|
} = this.props;
|
|
240
278
|
const {
|
|
241
279
|
star,
|
|
@@ -243,8 +281,15 @@ var _initialiseProps = function () {
|
|
|
243
281
|
} = this.state;
|
|
244
282
|
const allowed = item && item.planPolicy ? item.planPolicy.allowedStars || [] : [];
|
|
245
283
|
if (!allowed.includes(Number(star)) || !(0, _planStorage.isValidPlanAddCount)(Number(count))) return;
|
|
246
|
-
|
|
247
|
-
|
|
284
|
+
this.addPlanQueue.push({
|
|
285
|
+
itemId: Number(item.id),
|
|
286
|
+
star: Number(star),
|
|
287
|
+
count: Number(count)
|
|
288
|
+
});
|
|
289
|
+
this.setState({
|
|
290
|
+
addPendingCount: this.addPlanQueue.length + (this.addPlanProcessing ? 1 : 0)
|
|
291
|
+
});
|
|
292
|
+
this.drainAddPlanQueue();
|
|
248
293
|
}
|
|
249
294
|
});
|
|
250
295
|
Object.defineProperty(this, "handleClearAll", {
|