koishi-plugin-warframe 1.6.3 → 1.6.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/lib/assets/warframeAlias.json +67 -0
- package/lib/index.d.ts +101 -8
- package/lib/index.js +436 -328
- package/lib/index.tsbuildinfo +1 -1
- package/package.json +4 -5
package/lib/index.js
CHANGED
|
@@ -693,9 +693,9 @@ var require_LocalDatastore = __commonJS({
|
|
|
693
693
|
return _this2.Promise.resolve();
|
|
694
694
|
})();
|
|
695
695
|
}
|
|
696
|
-
yieldLoop(
|
|
696
|
+
yieldLoop(t2 = 0) {
|
|
697
697
|
return new this.Promise(function(resolve2, reject) {
|
|
698
|
-
return setTimeout(resolve2,
|
|
698
|
+
return setTimeout(resolve2, t2);
|
|
699
699
|
});
|
|
700
700
|
}
|
|
701
701
|
computePenalty() {
|
|
@@ -4208,6 +4208,48 @@ function HotRivenComponent(data) {
|
|
|
4208
4208
|
}
|
|
4209
4209
|
__name(HotRivenComponent, "HotRivenComponent");
|
|
4210
4210
|
|
|
4211
|
+
// src/messages.ts
|
|
4212
|
+
var messages = {
|
|
4213
|
+
"common.fetchFailed": "内部错误,获取最新信息失败",
|
|
4214
|
+
"relic.invalidName": "请提供正确的遗物名称",
|
|
4215
|
+
"relic.dataLoading": "遗物数据未加载完成,请稍后再试",
|
|
4216
|
+
"relic.notFound": "未找到对应遗物信息",
|
|
4217
|
+
"arbitration.invalidDayRange": "天数需小于等于14且大于0",
|
|
4218
|
+
"voidTrader.drifting": "虚空商人仍在未知地带漂流...",
|
|
4219
|
+
"voidTrader.arriving": "距离虚空商人到达还有: {time}",
|
|
4220
|
+
"riven.imageNotFound": "未检测到图片",
|
|
4221
|
+
"riven.ocrNotConfigured": "未配置 OCR,请在插件设置中配置。",
|
|
4222
|
+
"riven.imageFetchFailed": "获取图片失败",
|
|
4223
|
+
"riven.imageParseFailed": "解析图片失败",
|
|
4224
|
+
"riven.weaponNotFound": "未找到武器: {weapon}",
|
|
4225
|
+
"riven.dispositionError": "裂罅倾向错误",
|
|
4226
|
+
"riven.weaponTypeError": "武器类型错误",
|
|
4227
|
+
"riven.statTypeError": "词条类型错误",
|
|
4228
|
+
"riven.invalidParams": "请输入正确参数",
|
|
4229
|
+
"riven.noWeeklyData": "没有找到符合条件的紫卡参考数据",
|
|
4230
|
+
"wfm.inputItemName": "请输入物品名称",
|
|
4231
|
+
"wfm.itemNotFound": "未找到物品: {input}",
|
|
4232
|
+
"wfm.orderFetchFailed": "订单获取失败,请稍后重试",
|
|
4233
|
+
"wfm.noOnlineSeller": "当前没有在线游戏中的卖家",
|
|
4234
|
+
"wfm.rivenWeaponNotFound": "未找到紫卡武器: {input}",
|
|
4235
|
+
"wfm.rivenOrderFetchFailed": "紫卡订单获取失败,请稍后重试",
|
|
4236
|
+
"wfm.noOnlineRivenSeller": "当前没有在线出售的紫卡",
|
|
4237
|
+
"miscs.hotRiven.noData": "暂无热门紫卡数据",
|
|
4238
|
+
"miscs.hotRiven.fetchFailed": "获取热门紫卡数据失败",
|
|
4239
|
+
"miscs.inDevelopment": "功能暂未开放"
|
|
4240
|
+
};
|
|
4241
|
+
function t(messageOrResult, params) {
|
|
4242
|
+
if (typeof messageOrResult !== "string") {
|
|
4243
|
+
return t(messageOrResult.message, messageOrResult.params);
|
|
4244
|
+
}
|
|
4245
|
+
let text = messages[messageOrResult];
|
|
4246
|
+
for (const [key, value] of Object.entries(params ?? {})) {
|
|
4247
|
+
text = text.replaceAll(`{${key}}`, String(value));
|
|
4248
|
+
}
|
|
4249
|
+
return text;
|
|
4250
|
+
}
|
|
4251
|
+
__name(t, "t");
|
|
4252
|
+
|
|
4211
4253
|
// src/utils/assets.ts
|
|
4212
4254
|
var import_node_fs = require("node:fs");
|
|
4213
4255
|
var import_node_path = require("node:path");
|
|
@@ -4311,8 +4353,8 @@ var dictToKeyDict = /* @__PURE__ */ __name((dict, predict) => {
|
|
|
4311
4353
|
}, "dictToKeyDict");
|
|
4312
4354
|
|
|
4313
4355
|
// src/utils/color.ts
|
|
4314
|
-
function lerp(start, end,
|
|
4315
|
-
return Math.round(start + (end - start) *
|
|
4356
|
+
function lerp(start, end, t2) {
|
|
4357
|
+
return Math.round(start + (end - start) * t2);
|
|
4316
4358
|
}
|
|
4317
4359
|
__name(lerp, "lerp");
|
|
4318
4360
|
function hexToRgb(hex) {
|
|
@@ -4484,11 +4526,11 @@ async function getHotRivenWeapons2() {
|
|
|
4484
4526
|
try {
|
|
4485
4527
|
const result = await globalHotRivenWeapons.get();
|
|
4486
4528
|
if (!result || result.length === 0) {
|
|
4487
|
-
return { ok: false, message: "
|
|
4529
|
+
return { ok: false, message: "miscs.hotRiven.noData" };
|
|
4488
4530
|
}
|
|
4489
4531
|
return { ok: true, data: result };
|
|
4490
4532
|
} catch {
|
|
4491
|
-
return { ok: false, message: "
|
|
4533
|
+
return { ok: false, message: "miscs.hotRiven.fetchFailed" };
|
|
4492
4534
|
}
|
|
4493
4535
|
}
|
|
4494
4536
|
__name(getHotRivenWeapons2, "getHotRivenWeapons");
|
|
@@ -4509,6 +4551,7 @@ var arbitrationScheduleText = loadAssetText("arbys.txt");
|
|
|
4509
4551
|
var arbyRewards = loadAssetJson("arbyRewards.json");
|
|
4510
4552
|
var Baro = loadAssetText("baro.txt");
|
|
4511
4553
|
var BaroParsed = loadAssetJson("baroParsed.json");
|
|
4554
|
+
var warframeAlias = loadAssetJson("warframeAlias.json");
|
|
4512
4555
|
|
|
4513
4556
|
// src/data/wf/arbitrationSchedule.ts
|
|
4514
4557
|
var arbitrationSchedule = arbitrationScheduleText.split("\n").map((line) => line.split(",")).filter((arr) => arr.length === 2).map((arr) => {
|
|
@@ -5242,7 +5285,7 @@ async function getTextFromTencentOCR(image, secret) {
|
|
|
5242
5285
|
const { TextDetections } = await client.GeneralAccurateOCR({
|
|
5243
5286
|
ImageBase64: image
|
|
5244
5287
|
});
|
|
5245
|
-
const result = TextDetections?.map((
|
|
5288
|
+
const result = TextDetections?.map((t2) => t2.DetectedText).filter(
|
|
5246
5289
|
Boolean
|
|
5247
5290
|
);
|
|
5248
5291
|
return result;
|
|
@@ -5266,14 +5309,14 @@ __name(extractTextFromImage, "extractTextFromImage");
|
|
|
5266
5309
|
// src/services/wf-service.ts
|
|
5267
5310
|
async function getRelic(input) {
|
|
5268
5311
|
if (!input) {
|
|
5269
|
-
return { ok: false, message: "
|
|
5312
|
+
return { ok: false, message: "relic.invalidName" };
|
|
5270
5313
|
}
|
|
5271
5314
|
input = normalizeName(input);
|
|
5272
5315
|
if (!input) {
|
|
5273
|
-
return { ok: false, message: "
|
|
5316
|
+
return { ok: false, message: "relic.invalidName" };
|
|
5274
5317
|
}
|
|
5275
5318
|
if (!relics) {
|
|
5276
|
-
return { ok: false, message: "
|
|
5319
|
+
return { ok: false, message: "relic.dataLoading" };
|
|
5277
5320
|
}
|
|
5278
5321
|
const tierListForMatch = [
|
|
5279
5322
|
"古纪",
|
|
@@ -5288,10 +5331,10 @@ async function getRelic(input) {
|
|
|
5288
5331
|
"Axi",
|
|
5289
5332
|
"Requiem",
|
|
5290
5333
|
"Vanguard"
|
|
5291
|
-
].map((
|
|
5292
|
-
const tier = tierListForMatch.find((
|
|
5334
|
+
].map((t2) => normalizeName(t2));
|
|
5335
|
+
const tier = tierListForMatch.find((t2) => input.startsWith(t2));
|
|
5293
5336
|
if (!tier) {
|
|
5294
|
-
return { ok: false, message: "
|
|
5337
|
+
return { ok: false, message: "relic.invalidName" };
|
|
5295
5338
|
}
|
|
5296
5339
|
const category = input.replace(new RegExp(`^${tier}`), "").replace(/遗物$|relic$/, "");
|
|
5297
5340
|
const zhTierMap = {
|
|
@@ -5304,12 +5347,12 @@ async function getRelic(input) {
|
|
|
5304
5347
|
};
|
|
5305
5348
|
const enTier = zhTierMap[tier] ?? tier;
|
|
5306
5349
|
const key = normalizeName(enTier + category);
|
|
5307
|
-
return relics[key] ? { ok: true, data: relics[key] } : { ok: false, message: "
|
|
5350
|
+
return relics[key] ? { ok: true, data: relics[key] } : { ok: false, message: "relic.notFound" };
|
|
5308
5351
|
}
|
|
5309
5352
|
__name(getRelic, "getRelic");
|
|
5310
5353
|
function getArbitrations(day = 3) {
|
|
5311
5354
|
if (day > 14 || day <= 0) {
|
|
5312
|
-
return { ok: false, message: "
|
|
5355
|
+
return { ok: false, message: "arbitration.invalidDayRange" };
|
|
5313
5356
|
}
|
|
5314
5357
|
const currentHourTimeStamp = Math.floor(
|
|
5315
5358
|
(/* @__PURE__ */ new Date()).setUTCMinutes(0, 0, 0) / 1e3
|
|
@@ -5348,7 +5391,7 @@ __name(getArbitrations, "getArbitrations");
|
|
|
5348
5391
|
async function getWeekly() {
|
|
5349
5392
|
const { raw: worldState } = await globalWorldState.get();
|
|
5350
5393
|
if (!worldState) {
|
|
5351
|
-
return { ok: false, message: "
|
|
5394
|
+
return { ok: false, message: "common.fetchFailed" };
|
|
5352
5395
|
}
|
|
5353
5396
|
const archon = {
|
|
5354
5397
|
name: import_warframe_public_export_plus6.dict_zh[`/Lotus/Language/Narmer/${removeSpace(worldState.archonHunt.boss)}`],
|
|
@@ -5485,45 +5528,44 @@ function getCircuitWeek() {
|
|
|
5485
5528
|
__name(getCircuitWeek, "getCircuitWeek");
|
|
5486
5529
|
async function getFissures() {
|
|
5487
5530
|
const { fissures } = await globalWorldState.get();
|
|
5488
|
-
return fissures ? { ok: true, data: fissures } : { ok: false, message: "
|
|
5531
|
+
return fissures ? { ok: true, data: fissures } : { ok: false, message: "common.fetchFailed" };
|
|
5489
5532
|
}
|
|
5490
5533
|
__name(getFissures, "getFissures");
|
|
5491
5534
|
async function getSteelPathFissures() {
|
|
5492
5535
|
const { spFissures } = await globalWorldState.get();
|
|
5493
|
-
return spFissures ? { ok: true, data: spFissures } : { ok: false, message: "
|
|
5536
|
+
return spFissures ? { ok: true, data: spFissures } : { ok: false, message: "common.fetchFailed" };
|
|
5494
5537
|
}
|
|
5495
5538
|
__name(getSteelPathFissures, "getSteelPathFissures");
|
|
5496
5539
|
async function getRailjackFissures() {
|
|
5497
5540
|
const { rjFissures } = await globalWorldState.get();
|
|
5498
|
-
return rjFissures ? { ok: true, data: rjFissures } : { ok: false, message: "
|
|
5541
|
+
return rjFissures ? { ok: true, data: rjFissures } : { ok: false, message: "common.fetchFailed" };
|
|
5499
5542
|
}
|
|
5500
5543
|
__name(getRailjackFissures, "getRailjackFissures");
|
|
5501
5544
|
async function getAnalyzedRiven(secret, url) {
|
|
5502
5545
|
const img = await fetchAsyncImage(url);
|
|
5503
5546
|
if (!img) {
|
|
5504
|
-
return { ok: false, message: "
|
|
5547
|
+
return { ok: false, message: "riven.imageFetchFailed" };
|
|
5505
5548
|
}
|
|
5506
5549
|
const extractResult = await extractTextFromImage(img, secret);
|
|
5507
5550
|
if (!extractResult) {
|
|
5508
|
-
return { ok: false, message: "
|
|
5551
|
+
return { ok: false, message: "riven.imageParseFailed" };
|
|
5509
5552
|
}
|
|
5510
5553
|
const parseResult = await parseOCRResult(extractResult);
|
|
5511
5554
|
if (!parseResult || parseResult.attributes.length < 2 || parseResult.attributes.length > 4) {
|
|
5512
|
-
return { ok: false, message: "
|
|
5555
|
+
return { ok: false, message: "riven.imageParseFailed" };
|
|
5513
5556
|
}
|
|
5514
|
-
|
|
5515
|
-
return typeof analyzed === "string" ? { ok: false, message: analyzed } : { ok: true, data: analyzed };
|
|
5557
|
+
return analyzeRivenStat(parseResult);
|
|
5516
5558
|
}
|
|
5517
5559
|
__name(getAnalyzedRiven, "getAnalyzedRiven");
|
|
5518
5560
|
async function getVoidTrader() {
|
|
5519
5561
|
const { raw: worldState } = await globalWorldState.get();
|
|
5520
5562
|
if (worldState.voidTraders.length === 0) {
|
|
5521
|
-
return { ok: false, message: "
|
|
5563
|
+
return { ok: false, message: "voidTrader.drifting" };
|
|
5522
5564
|
}
|
|
5523
5565
|
const trader = worldState.voidTraders[0];
|
|
5524
5566
|
if (trader && trader.activation && trader.activation.getTime() > Date.now()) {
|
|
5525
5567
|
const diff2 = trader.activation.getTime() - Date.now();
|
|
5526
|
-
return { ok: false, message:
|
|
5568
|
+
return { ok: false, message: "voidTrader.arriving", params: { time: msToHumanReadable(diff2) } };
|
|
5527
5569
|
}
|
|
5528
5570
|
const diff = trader.expiry.getTime() - Date.now();
|
|
5529
5571
|
const items = trader.inventory.map(getVoidTraderItem);
|
|
@@ -5566,7 +5608,7 @@ async function getWeeklyRivens(minPrice) {
|
|
|
5566
5608
|
__name(getWeeklyRivens, "getWeeklyRivens");
|
|
5567
5609
|
async function getStaticRivenStats(weaponType, statType, disposition) {
|
|
5568
5610
|
if (disposition > 1.55 || disposition < 0.5) {
|
|
5569
|
-
return { ok: false, message: "
|
|
5611
|
+
return { ok: false, message: "riven.dispositionError" };
|
|
5570
5612
|
}
|
|
5571
5613
|
const weaponTypes = [
|
|
5572
5614
|
"步枪",
|
|
@@ -5584,7 +5626,7 @@ async function getStaticRivenStats(weaponType, statType, disposition) {
|
|
|
5584
5626
|
(v) => normalizeName(v).startsWith(normalizeName(weaponType))
|
|
5585
5627
|
);
|
|
5586
5628
|
if (!matchedWeaponType) {
|
|
5587
|
-
return { ok: false, message: "
|
|
5629
|
+
return { ok: false, message: "riven.weaponTypeError" };
|
|
5588
5630
|
}
|
|
5589
5631
|
const weaponTypeKeys = {
|
|
5590
5632
|
步枪: "Rifle",
|
|
@@ -5596,7 +5638,7 @@ async function getStaticRivenStats(weaponType, statType, disposition) {
|
|
|
5596
5638
|
const weaponTypeKey = weaponTypeKeys[matchedWeaponType] ?? matchedWeaponType;
|
|
5597
5639
|
const statTypes = ["2", "3", "21", "31"];
|
|
5598
5640
|
if (!statTypes.includes(statType)) {
|
|
5599
|
-
return { ok: false, message: "
|
|
5641
|
+
return { ok: false, message: "riven.statTypeError" };
|
|
5600
5642
|
}
|
|
5601
5643
|
const rivenAttrValues2 = rivenAttrValueDict[weaponTypeKey];
|
|
5602
5644
|
const factor = rivenStatFixFactor[statType];
|
|
@@ -5671,20 +5713,20 @@ async function parseOCRResult(ocrResult) {
|
|
|
5671
5713
|
if (standard.includes(input) || input.includes(standard) || standard.split("/").some((x) => !!x && input.includes(x))) {
|
|
5672
5714
|
return 1;
|
|
5673
5715
|
}
|
|
5674
|
-
const
|
|
5716
|
+
const t2 = tokenSimilarity(standard, input);
|
|
5675
5717
|
const s = normalSimilarity(standard, input);
|
|
5676
|
-
return Math.max(
|
|
5718
|
+
return Math.max(t2, s);
|
|
5677
5719
|
}
|
|
5678
5720
|
__name(similarity, "similarity");
|
|
5679
5721
|
const texts = list;
|
|
5680
5722
|
const attributes = [];
|
|
5681
5723
|
const statLines = [];
|
|
5682
|
-
for (const
|
|
5683
|
-
if (!
|
|
5724
|
+
for (const t2 of texts) {
|
|
5725
|
+
if (!t2 || !/^[x+-]|^\d/.test(t2)) {
|
|
5684
5726
|
continue;
|
|
5685
5727
|
}
|
|
5686
|
-
const prefix = /^[x+-]/.test(
|
|
5687
|
-
const attrNamePart = removeSpace(
|
|
5728
|
+
const prefix = /^[x+-]/.test(t2) ? t2[0] : "";
|
|
5729
|
+
const attrNamePart = removeSpace(t2 ?? "").replace(/^[^\u4E00-\u9FA5]+/u, "");
|
|
5688
5730
|
const attr = globalRivenAttributeList.find((a) => {
|
|
5689
5731
|
if (!a)
|
|
5690
5732
|
return false;
|
|
@@ -5699,24 +5741,24 @@ async function parseOCRResult(ocrResult) {
|
|
|
5699
5741
|
if (!attr) {
|
|
5700
5742
|
continue;
|
|
5701
5743
|
}
|
|
5702
|
-
statLines.push(
|
|
5744
|
+
statLines.push(t2);
|
|
5703
5745
|
const value = (/* @__PURE__ */ __name((function extractStatValue(text) {
|
|
5704
|
-
const
|
|
5705
|
-
const multMatch =
|
|
5746
|
+
const t3 = text.replace(/\s+/g, "");
|
|
5747
|
+
const multMatch = t3.match(/x(\d+(?:\.\d+)?)/i);
|
|
5706
5748
|
if (multMatch) {
|
|
5707
5749
|
return {
|
|
5708
5750
|
value: Number.parseFloat(multMatch[1]),
|
|
5709
5751
|
type: "multiply"
|
|
5710
5752
|
};
|
|
5711
5753
|
}
|
|
5712
|
-
const percentMatch =
|
|
5754
|
+
const percentMatch = t3.match(/([+-]?\d+(?:\.\d+)?)%/);
|
|
5713
5755
|
if (percentMatch) {
|
|
5714
5756
|
return {
|
|
5715
5757
|
value: Number.parseFloat(percentMatch[1]),
|
|
5716
5758
|
type: "percent"
|
|
5717
5759
|
};
|
|
5718
5760
|
}
|
|
5719
|
-
const numMatch =
|
|
5761
|
+
const numMatch = t3.match(/([+-]?\d+(?:\.\d+)?)/);
|
|
5720
5762
|
if (numMatch) {
|
|
5721
5763
|
return {
|
|
5722
5764
|
value: Number.parseFloat(numMatch[1]),
|
|
@@ -5724,7 +5766,7 @@ async function parseOCRResult(ocrResult) {
|
|
|
5724
5766
|
};
|
|
5725
5767
|
}
|
|
5726
5768
|
return void 0;
|
|
5727
|
-
}), "extractStatValue"))(
|
|
5769
|
+
}), "extractStatValue"))(t2);
|
|
5728
5770
|
if (!value) {
|
|
5729
5771
|
return void 0;
|
|
5730
5772
|
}
|
|
@@ -5770,7 +5812,7 @@ async function parseOCRResult(ocrResult) {
|
|
|
5770
5812
|
}
|
|
5771
5813
|
__name(removeRivenSuffix, "removeRivenSuffix");
|
|
5772
5814
|
return merged ? removeRivenSuffix(merged) : null;
|
|
5773
|
-
}), "extractWeaponName"))(texts.filter((
|
|
5815
|
+
}), "extractWeaponName"))(texts.filter((t2) => !statLines.includes(t2)));
|
|
5774
5816
|
if (!weaponName || !attributes.length) {
|
|
5775
5817
|
return void 0;
|
|
5776
5818
|
}
|
|
@@ -5783,7 +5825,11 @@ __name(parseOCRResult, "parseOCRResult");
|
|
|
5783
5825
|
function analyzeRivenStat(parseResult) {
|
|
5784
5826
|
const weaponRiven = getWeaponRivenDisposition(parseResult.name);
|
|
5785
5827
|
if (!weaponRiven) {
|
|
5786
|
-
return
|
|
5828
|
+
return {
|
|
5829
|
+
ok: false,
|
|
5830
|
+
message: "riven.weaponNotFound",
|
|
5831
|
+
params: { weapon: parseResult.name }
|
|
5832
|
+
};
|
|
5787
5833
|
}
|
|
5788
5834
|
const disposition = weaponRiven.calc.disposition;
|
|
5789
5835
|
const weaponType = weaponRiven.calc.riventype;
|
|
@@ -5837,15 +5883,18 @@ function analyzeRivenStat(parseResult) {
|
|
|
5837
5883
|
}
|
|
5838
5884
|
}
|
|
5839
5885
|
return {
|
|
5840
|
-
|
|
5841
|
-
|
|
5842
|
-
|
|
5843
|
-
|
|
5886
|
+
ok: true,
|
|
5887
|
+
data: {
|
|
5888
|
+
name: weaponRiven.name.zh,
|
|
5889
|
+
disposition,
|
|
5890
|
+
buffs,
|
|
5891
|
+
curses
|
|
5892
|
+
}
|
|
5844
5893
|
};
|
|
5845
5894
|
}
|
|
5846
5895
|
__name(analyzeRivenStat, "analyzeRivenStat");
|
|
5847
5896
|
|
|
5848
|
-
// src/services/wfm-service.ts
|
|
5897
|
+
// src/services/wfm-service/index.ts
|
|
5849
5898
|
var import_warframe_public_export_plus7 = require("warframe-public-export-plus");
|
|
5850
5899
|
|
|
5851
5900
|
// src/data/wfm/globalDucatnator.ts
|
|
@@ -5858,6 +5907,46 @@ var globalDucatnatorIDDict = createAsyncCache(async () => {
|
|
|
5858
5907
|
}, 36e5);
|
|
5859
5908
|
|
|
5860
5909
|
// src/data/wfm/globalItem.ts
|
|
5910
|
+
function normalizeWordPrefixName(input) {
|
|
5911
|
+
return fullWidthToHalfWidth(input).toLowerCase().replace(/[·'()+【】[\]{},。!?;:_]/g, " ").replace(/[-/\\]/g, " ").replace(/\s+/g, " ").trim();
|
|
5912
|
+
}
|
|
5913
|
+
__name(normalizeWordPrefixName, "normalizeWordPrefixName");
|
|
5914
|
+
function splitWordPrefixTokens(input) {
|
|
5915
|
+
const normalized = normalizeWordPrefixName(input);
|
|
5916
|
+
if (!normalized) {
|
|
5917
|
+
return [];
|
|
5918
|
+
}
|
|
5919
|
+
return normalized.split(" ").filter(Boolean);
|
|
5920
|
+
}
|
|
5921
|
+
__name(splitWordPrefixTokens, "splitWordPrefixTokens");
|
|
5922
|
+
function buildGlobalItemWordPrefixCandidates(globalItemList) {
|
|
5923
|
+
const candidates = [];
|
|
5924
|
+
const seen = /* @__PURE__ */ new Set();
|
|
5925
|
+
for (const item of globalItemList) {
|
|
5926
|
+
const names = [
|
|
5927
|
+
item.i18n?.en?.name,
|
|
5928
|
+
item.i18n?.["zh-hans"]?.name
|
|
5929
|
+
].filter((name2) => typeof name2 === "string" && name2.length > 0);
|
|
5930
|
+
for (const name2 of names) {
|
|
5931
|
+
const normalizedName = normalizeWordPrefixName(name2.toLowerCase());
|
|
5932
|
+
if (!normalizedName || seen.has(`${item.slug}:${normalizedName}`)) {
|
|
5933
|
+
continue;
|
|
5934
|
+
}
|
|
5935
|
+
const tokens = splitWordPrefixTokens(normalizedName);
|
|
5936
|
+
if (tokens.length === 0) {
|
|
5937
|
+
continue;
|
|
5938
|
+
}
|
|
5939
|
+
seen.add(`${item.slug}:${normalizedName}`);
|
|
5940
|
+
candidates.push({
|
|
5941
|
+
item,
|
|
5942
|
+
normalizedName,
|
|
5943
|
+
tokens
|
|
5944
|
+
});
|
|
5945
|
+
}
|
|
5946
|
+
}
|
|
5947
|
+
return candidates;
|
|
5948
|
+
}
|
|
5949
|
+
__name(buildGlobalItemWordPrefixCandidates, "buildGlobalItemWordPrefixCandidates");
|
|
5861
5950
|
async function globalItemDataFactory(response) {
|
|
5862
5951
|
response ??= await wfmClient.items.getList();
|
|
5863
5952
|
if (!response) {
|
|
@@ -5865,7 +5954,8 @@ async function globalItemDataFactory(response) {
|
|
|
5865
5954
|
globalItemList: [],
|
|
5866
5955
|
globalItemDict: {},
|
|
5867
5956
|
globalItemNameToSlugDict: {},
|
|
5868
|
-
globalItemGameRefDict: {}
|
|
5957
|
+
globalItemGameRefDict: {},
|
|
5958
|
+
globalItemWordPrefixCandidates: []
|
|
5869
5959
|
};
|
|
5870
5960
|
}
|
|
5871
5961
|
const data = response;
|
|
@@ -5887,111 +5977,281 @@ async function globalItemDataFactory(response) {
|
|
|
5887
5977
|
return result;
|
|
5888
5978
|
})(globalItemList);
|
|
5889
5979
|
const globalItemGameRefDict = listToDict(data, (i) => [i.gameRef]);
|
|
5980
|
+
const globalItemWordPrefixCandidates = buildGlobalItemWordPrefixCandidates(
|
|
5981
|
+
globalItemList
|
|
5982
|
+
);
|
|
5890
5983
|
return {
|
|
5891
5984
|
globalItemList,
|
|
5892
5985
|
globalItemDict,
|
|
5893
5986
|
globalItemNameToSlugDict,
|
|
5894
|
-
globalItemGameRefDict
|
|
5987
|
+
globalItemGameRefDict,
|
|
5988
|
+
globalItemWordPrefixCandidates
|
|
5895
5989
|
};
|
|
5896
5990
|
}
|
|
5897
5991
|
__name(globalItemDataFactory, "globalItemDataFactory");
|
|
5898
5992
|
var globalItemData = createAsyncCache(globalItemDataFactory, -1);
|
|
5899
5993
|
|
|
5900
|
-
// src/services/wfm-service.ts
|
|
5901
|
-
var
|
|
5902
|
-
|
|
5903
|
-
|
|
5904
|
-
|
|
5905
|
-
"
|
|
5906
|
-
|
|
5907
|
-
|
|
5908
|
-
|
|
5909
|
-
|
|
5910
|
-
|
|
5911
|
-
|
|
5912
|
-
|
|
5913
|
-
|
|
5914
|
-
|
|
5915
|
-
|
|
5916
|
-
|
|
5917
|
-
|
|
5918
|
-
|
|
5919
|
-
|
|
5920
|
-
|
|
5921
|
-
|
|
5922
|
-
|
|
5923
|
-
|
|
5924
|
-
|
|
5925
|
-
|
|
5926
|
-
|
|
5927
|
-
|
|
5928
|
-
|
|
5929
|
-
|
|
5930
|
-
|
|
5931
|
-
|
|
5932
|
-
|
|
5933
|
-
|
|
5934
|
-
|
|
5935
|
-
|
|
5936
|
-
|
|
5937
|
-
|
|
5938
|
-
|
|
5939
|
-
|
|
5940
|
-
|
|
5941
|
-
|
|
5942
|
-
|
|
5943
|
-
|
|
5944
|
-
|
|
5945
|
-
|
|
5946
|
-
|
|
5947
|
-
|
|
5948
|
-
|
|
5949
|
-
|
|
5950
|
-
|
|
5951
|
-
|
|
5952
|
-
|
|
5953
|
-
|
|
5954
|
-
|
|
5955
|
-
|
|
5956
|
-
|
|
5957
|
-
|
|
5958
|
-
|
|
5959
|
-
|
|
5960
|
-
|
|
5961
|
-
|
|
5962
|
-
|
|
5963
|
-
}
|
|
5964
|
-
|
|
5965
|
-
|
|
5966
|
-
|
|
5967
|
-
|
|
5968
|
-
|
|
5969
|
-
|
|
5970
|
-
|
|
5971
|
-
|
|
5972
|
-
|
|
5994
|
+
// src/services/wfm-service/wfm-service.item-matcher.ts
|
|
5995
|
+
var wfmItemMatcher = (() => {
|
|
5996
|
+
const setSuffix = "一套";
|
|
5997
|
+
const bpSuffix = "蓝图";
|
|
5998
|
+
const primeSuffix = "prime";
|
|
5999
|
+
const warframePartSuffix = ["系统", "头部神经光元", "机体"];
|
|
6000
|
+
const weaponPartSuffix = [
|
|
6001
|
+
"枪管",
|
|
6002
|
+
"枪托",
|
|
6003
|
+
"枪机",
|
|
6004
|
+
"弓弦",
|
|
6005
|
+
"上弓臂",
|
|
6006
|
+
"下弓臂",
|
|
6007
|
+
"刀刃",
|
|
6008
|
+
"握柄",
|
|
6009
|
+
"拳套",
|
|
6010
|
+
"圆盘",
|
|
6011
|
+
"连接器"
|
|
6012
|
+
];
|
|
6013
|
+
const warframeAliasDict = ((aliasObject) => {
|
|
6014
|
+
const transformedObject = {};
|
|
6015
|
+
for (const [key, aliases] of Object.entries(aliasObject)) {
|
|
6016
|
+
const normalizedKey = normalizeName(key);
|
|
6017
|
+
transformedObject[normalizedKey] = normalizedKey;
|
|
6018
|
+
for (const alias of aliases) {
|
|
6019
|
+
if (typeof alias !== "string" || alias.length === 0) {
|
|
6020
|
+
continue;
|
|
6021
|
+
}
|
|
6022
|
+
const normalizedAlias = normalizeName(alias);
|
|
6023
|
+
transformedObject[normalizedAlias] = normalizedKey;
|
|
6024
|
+
const warframeNameWithSuffix = normalizeName(`${alias}甲`);
|
|
6025
|
+
transformedObject[warframeNameWithSuffix] = normalizedKey;
|
|
6026
|
+
}
|
|
6027
|
+
}
|
|
6028
|
+
return transformedObject;
|
|
6029
|
+
})(warframeAlias);
|
|
6030
|
+
function removeNameSuffix2(input) {
|
|
6031
|
+
let hasBPSuffix = false;
|
|
6032
|
+
if (input.endsWith(bpSuffix)) {
|
|
6033
|
+
input = input.replace(new RegExp(`${bpSuffix}$`), "");
|
|
6034
|
+
hasBPSuffix = true;
|
|
6035
|
+
}
|
|
6036
|
+
if (input.endsWith(setSuffix)) {
|
|
6037
|
+
input = input.replace(new RegExp(`${setSuffix}$`), "");
|
|
6038
|
+
}
|
|
6039
|
+
if (input.endsWith(bpSuffix)) {
|
|
6040
|
+
input = input.replace(new RegExp(`${bpSuffix}$`), "");
|
|
6041
|
+
hasBPSuffix = true;
|
|
6042
|
+
}
|
|
6043
|
+
const suffix = warframePartSuffix.find((value) => input.endsWith(value)) ?? weaponPartSuffix.find((value) => input.endsWith(value)) ?? (input.endsWith("头") ? "头部神经光元" : void 0) ?? (hasBPSuffix ? bpSuffix : void 0) ?? "";
|
|
6044
|
+
if (suffix) {
|
|
6045
|
+
input = input.endsWith("头") ? input.replace(/头$/, "") : input;
|
|
6046
|
+
const pure = input.replace(new RegExp(`${suffix}$`), "");
|
|
6047
|
+
return {
|
|
6048
|
+
pure,
|
|
6049
|
+
suffix
|
|
6050
|
+
};
|
|
6051
|
+
} else {
|
|
6052
|
+
return {
|
|
6053
|
+
pure: input,
|
|
6054
|
+
suffix
|
|
6055
|
+
};
|
|
6056
|
+
}
|
|
6057
|
+
}
|
|
6058
|
+
__name(removeNameSuffix2, "removeNameSuffix");
|
|
6059
|
+
function shortHandProcess2(input, lookup) {
|
|
6060
|
+
const { pure: inputNoSuffix, suffix } = removeNameSuffix2(input);
|
|
6061
|
+
if (inputNoSuffix === input) {
|
|
6062
|
+
const fixSet = input + setSuffix;
|
|
6063
|
+
const fixSetRes = lookup.globalItemNameToSlugDict[fixSet];
|
|
6064
|
+
if (fixSetRes)
|
|
6065
|
+
return lookup.globalItemDict[fixSetRes];
|
|
6066
|
+
const fixPrime = input.endsWith(primeSuffix) ? input : input.endsWith("p") ? input.slice(0, input.length - 1) + primeSuffix : input + primeSuffix;
|
|
6067
|
+
const fixPrimeRes = lookup.globalItemNameToSlugDict[fixPrime];
|
|
6068
|
+
if (fixPrimeRes)
|
|
6069
|
+
return lookup.globalItemDict[fixPrimeRes];
|
|
6070
|
+
const fixPrimeSet = fixPrime + setSuffix;
|
|
6071
|
+
const fixPrimeSetRes = lookup.globalItemNameToSlugDict[fixPrimeSet];
|
|
6072
|
+
if (fixPrimeSetRes)
|
|
6073
|
+
return lookup.globalItemDict[fixPrimeSetRes];
|
|
6074
|
+
const fixBP = input + bpSuffix;
|
|
6075
|
+
const fixBPRes = lookup.globalItemNameToSlugDict[fixBP];
|
|
6076
|
+
if (fixBPRes)
|
|
6077
|
+
return lookup.globalItemDict[fixBPRes];
|
|
6078
|
+
const fixPrimeBP = fixPrime + bpSuffix;
|
|
6079
|
+
const fixPrimeBPRes = lookup.globalItemNameToSlugDict[fixPrimeBP];
|
|
6080
|
+
if (fixPrimeBPRes)
|
|
6081
|
+
return lookup.globalItemDict[fixPrimeBPRes];
|
|
6082
|
+
} else {
|
|
6083
|
+
const fixBP = inputNoSuffix + suffix + bpSuffix;
|
|
6084
|
+
const fixBPRes = lookup.globalItemNameToSlugDict[fixBP];
|
|
6085
|
+
if (fixBPRes)
|
|
6086
|
+
return lookup.globalItemDict[fixBPRes];
|
|
6087
|
+
const fixPrime = inputNoSuffix.endsWith(primeSuffix) ? inputNoSuffix : inputNoSuffix.endsWith("p") ? inputNoSuffix.slice(0, inputNoSuffix.length - 1) + primeSuffix : inputNoSuffix + primeSuffix;
|
|
6088
|
+
const fixPrimeRes = lookup.globalItemNameToSlugDict[fixPrime + suffix];
|
|
6089
|
+
if (fixPrimeRes)
|
|
6090
|
+
return lookup.globalItemDict[fixPrimeRes];
|
|
6091
|
+
const fixPrimeBP = fixPrime + suffix + bpSuffix;
|
|
6092
|
+
const fixPrimeBPRes = lookup.globalItemNameToSlugDict[fixPrimeBP];
|
|
6093
|
+
if (fixPrimeBPRes)
|
|
6094
|
+
return lookup.globalItemDict[fixPrimeBPRes];
|
|
6095
|
+
}
|
|
6096
|
+
}
|
|
6097
|
+
__name(shortHandProcess2, "shortHandProcess");
|
|
6098
|
+
function matchBySlugDict2(input, lookup) {
|
|
6099
|
+
const slug = lookup.globalItemNameToSlugDict[input];
|
|
6100
|
+
return slug ? lookup.globalItemDict[slug] : void 0;
|
|
6101
|
+
}
|
|
6102
|
+
__name(matchBySlugDict2, "matchBySlugDict");
|
|
6103
|
+
function matchByShortHand2(input, lookup) {
|
|
6104
|
+
return shortHandProcess2(input, lookup);
|
|
6105
|
+
}
|
|
6106
|
+
__name(matchByShortHand2, "matchByShortHand");
|
|
6107
|
+
function transformByWarframeAlias2(input) {
|
|
6108
|
+
const { pure: inputNoSuffix, suffix } = removeNameSuffix2(input);
|
|
6109
|
+
const aliasHasEndP = inputNoSuffix.endsWith(primeSuffix) ? inputNoSuffix.replace(new RegExp(`${primeSuffix}$`), "") : inputNoSuffix;
|
|
6110
|
+
const mappedAliasHasEndP = warframeAliasDict[aliasHasEndP];
|
|
6111
|
+
if (mappedAliasHasEndP) {
|
|
6112
|
+
return normalizeName(mappedAliasHasEndP) + suffix;
|
|
6113
|
+
}
|
|
6114
|
+
if (inputNoSuffix.endsWith("p")) {
|
|
6115
|
+
const aliasNoEndP = inputNoSuffix.replace(/p$/, "");
|
|
6116
|
+
const mappedAliasNoEndP = warframeAliasDict[aliasNoEndP];
|
|
6117
|
+
if (mappedAliasNoEndP) {
|
|
6118
|
+
return normalizeName(mappedAliasNoEndP) + suffix;
|
|
6119
|
+
}
|
|
6120
|
+
}
|
|
6121
|
+
return void 0;
|
|
6122
|
+
}
|
|
6123
|
+
__name(transformByWarframeAlias2, "transformByWarframeAlias");
|
|
6124
|
+
function buildSuffixVariantCandidates2(input) {
|
|
6125
|
+
const candidates = /* @__PURE__ */ new Set();
|
|
6126
|
+
const { pure, suffix } = removeNameSuffix2(input);
|
|
6127
|
+
candidates.add(input);
|
|
6128
|
+
candidates.add(input + bpSuffix);
|
|
6129
|
+
candidates.add(`${input}blueprint`);
|
|
6130
|
+
candidates.add(input + setSuffix);
|
|
6131
|
+
candidates.add(`${input}set`);
|
|
6132
|
+
if (suffix) {
|
|
6133
|
+
const base = pure + suffix;
|
|
6134
|
+
candidates.add(base);
|
|
6135
|
+
candidates.add(base + bpSuffix);
|
|
6136
|
+
candidates.add(`${base}blueprint`);
|
|
6137
|
+
candidates.add(base + setSuffix);
|
|
6138
|
+
candidates.add(`${base}set`);
|
|
6139
|
+
}
|
|
6140
|
+
return [...candidates];
|
|
6141
|
+
}
|
|
6142
|
+
__name(buildSuffixVariantCandidates2, "buildSuffixVariantCandidates");
|
|
6143
|
+
function matchBySuffixVariantLookup2(input, lookup) {
|
|
6144
|
+
for (const candidate of buildSuffixVariantCandidates2(input)) {
|
|
6145
|
+
const slug = lookup.globalItemNameToSlugDict[candidate];
|
|
6146
|
+
if (slug)
|
|
6147
|
+
return lookup.globalItemDict[slug];
|
|
6148
|
+
}
|
|
6149
|
+
return void 0;
|
|
6150
|
+
}
|
|
6151
|
+
__name(matchBySuffixVariantLookup2, "matchBySuffixVariantLookup");
|
|
6152
|
+
function normalizeWordPrefixName3(input) {
|
|
6153
|
+
return fullWidthToHalfWidth(input).toLowerCase().replace(/[·'()+【】[\]{},。!?;:_]/g, " ").replace(/[-/\\]/g, " ").replace(/\s+/g, " ").trim();
|
|
6154
|
+
}
|
|
6155
|
+
__name(normalizeWordPrefixName3, "normalizeWordPrefixName");
|
|
6156
|
+
function splitWordPrefixTokens3(input) {
|
|
6157
|
+
const normalized = normalizeWordPrefixName3(input);
|
|
6158
|
+
if (!normalized) {
|
|
6159
|
+
return [];
|
|
6160
|
+
}
|
|
6161
|
+
return normalized.split(" ").filter(Boolean);
|
|
6162
|
+
}
|
|
6163
|
+
__name(splitWordPrefixTokens3, "splitWordPrefixTokens");
|
|
6164
|
+
function compareWordPrefixCandidates(left, right, inputTokens) {
|
|
6165
|
+
const leftExtraTokenCount = left.tokens.length - inputTokens.length;
|
|
6166
|
+
const rightExtraTokenCount = right.tokens.length - inputTokens.length;
|
|
6167
|
+
if (leftExtraTokenCount !== rightExtraTokenCount) {
|
|
6168
|
+
return leftExtraTokenCount - rightExtraTokenCount;
|
|
6169
|
+
}
|
|
6170
|
+
const leftRemainderKey = inputTokens.map((token, index) => left.tokens[index].slice(token.length)).join("\0");
|
|
6171
|
+
const rightRemainderKey = inputTokens.map((token, index) => right.tokens[index].slice(token.length)).join("\0");
|
|
6172
|
+
if (leftRemainderKey !== rightRemainderKey) {
|
|
6173
|
+
return leftRemainderKey.localeCompare(rightRemainderKey);
|
|
6174
|
+
}
|
|
6175
|
+
return left.normalizedName.localeCompare(right.normalizedName);
|
|
6176
|
+
}
|
|
6177
|
+
__name(compareWordPrefixCandidates, "compareWordPrefixCandidates");
|
|
6178
|
+
function matchByWordPrefixSequence2(input, lookup) {
|
|
6179
|
+
const inputTokens = splitWordPrefixTokens3(input);
|
|
6180
|
+
if (inputTokens.length < 2) {
|
|
6181
|
+
return void 0;
|
|
6182
|
+
}
|
|
6183
|
+
const matchedCandidates = lookup.globalItemWordPrefixCandidates.filter((candidate) => {
|
|
6184
|
+
if (candidate.tokens.length < inputTokens.length) {
|
|
6185
|
+
return false;
|
|
5973
6186
|
}
|
|
6187
|
+
return inputTokens.every(
|
|
6188
|
+
(token, index) => candidate.tokens[index].startsWith(token)
|
|
6189
|
+
);
|
|
6190
|
+
}).sort((left, right) => compareWordPrefixCandidates(left, right, inputTokens));
|
|
6191
|
+
return matchedCandidates[0]?.item;
|
|
6192
|
+
}
|
|
6193
|
+
__name(matchByWordPrefixSequence2, "matchByWordPrefixSequence");
|
|
6194
|
+
async function stringToWFMItem2(input) {
|
|
6195
|
+
const { globalItemDict, globalItemNameToSlugDict, globalItemWordPrefixCandidates } = await globalItemData.get();
|
|
6196
|
+
const normalizedInput = normalizeName(input);
|
|
6197
|
+
const lookup = {
|
|
6198
|
+
globalItemDict,
|
|
6199
|
+
globalItemNameToSlugDict,
|
|
6200
|
+
globalItemWordPrefixCandidates
|
|
6201
|
+
};
|
|
6202
|
+
const slugMatchedItem = matchBySlugDict2(normalizedInput, lookup);
|
|
6203
|
+
if (slugMatchedItem)
|
|
6204
|
+
return slugMatchedItem;
|
|
6205
|
+
const shortHandMatchedItem = matchByShortHand2(normalizedInput, lookup);
|
|
6206
|
+
if (shortHandMatchedItem)
|
|
6207
|
+
return shortHandMatchedItem;
|
|
6208
|
+
const aliasInput = transformByWarframeAlias2(normalizedInput);
|
|
6209
|
+
if (aliasInput) {
|
|
6210
|
+
const aliasShortHandMatchedItem = matchByShortHand2(aliasInput, lookup);
|
|
6211
|
+
if (aliasShortHandMatchedItem)
|
|
6212
|
+
return aliasShortHandMatchedItem;
|
|
6213
|
+
}
|
|
6214
|
+
const suffixMatchedItem = matchBySuffixVariantLookup2(normalizedInput, lookup);
|
|
6215
|
+
if (suffixMatchedItem)
|
|
6216
|
+
return suffixMatchedItem;
|
|
6217
|
+
if (aliasInput) {
|
|
6218
|
+
const aliasSuffixMatchedItem = matchBySuffixVariantLookup2(aliasInput, lookup);
|
|
6219
|
+
if (aliasSuffixMatchedItem)
|
|
6220
|
+
return aliasSuffixMatchedItem;
|
|
5974
6221
|
}
|
|
6222
|
+
const wordPrefixMatchedItem = matchByWordPrefixSequence2(input, lookup);
|
|
6223
|
+
if (wordPrefixMatchedItem)
|
|
6224
|
+
return wordPrefixMatchedItem;
|
|
6225
|
+
return void 0;
|
|
5975
6226
|
}
|
|
5976
|
-
|
|
5977
|
-
|
|
5978
|
-
|
|
5979
|
-
|
|
5980
|
-
|
|
5981
|
-
|
|
5982
|
-
|
|
5983
|
-
|
|
5984
|
-
|
|
5985
|
-
|
|
5986
|
-
|
|
5987
|
-
|
|
5988
|
-
|
|
5989
|
-
|
|
5990
|
-
|
|
5991
|
-
|
|
5992
|
-
|
|
5993
|
-
|
|
5994
|
-
|
|
6227
|
+
__name(stringToWFMItem2, "stringToWFMItem");
|
|
6228
|
+
return {
|
|
6229
|
+
buildSuffixVariantCandidates: buildSuffixVariantCandidates2,
|
|
6230
|
+
matchByShortHand: matchByShortHand2,
|
|
6231
|
+
matchBySlugDict: matchBySlugDict2,
|
|
6232
|
+
matchBySuffixVariantLookup: matchBySuffixVariantLookup2,
|
|
6233
|
+
matchByWordPrefixSequence: matchByWordPrefixSequence2,
|
|
6234
|
+
removeNameSuffix: removeNameSuffix2,
|
|
6235
|
+
splitWordPrefixTokens: splitWordPrefixTokens3,
|
|
6236
|
+
shortHandProcess: shortHandProcess2,
|
|
6237
|
+
stringToWFMItem: stringToWFMItem2,
|
|
6238
|
+
transformByWarframeAlias: transformByWarframeAlias2,
|
|
6239
|
+
normalizeWordPrefixName: normalizeWordPrefixName3
|
|
6240
|
+
};
|
|
6241
|
+
})();
|
|
6242
|
+
var buildSuffixVariantCandidates = wfmItemMatcher.buildSuffixVariantCandidates;
|
|
6243
|
+
var matchByShortHand = wfmItemMatcher.matchByShortHand;
|
|
6244
|
+
var matchBySlugDict = wfmItemMatcher.matchBySlugDict;
|
|
6245
|
+
var matchBySuffixVariantLookup = wfmItemMatcher.matchBySuffixVariantLookup;
|
|
6246
|
+
var matchByWordPrefixSequence = wfmItemMatcher.matchByWordPrefixSequence;
|
|
6247
|
+
var normalizeWordPrefixName2 = wfmItemMatcher.normalizeWordPrefixName;
|
|
6248
|
+
var removeNameSuffix = wfmItemMatcher.removeNameSuffix;
|
|
6249
|
+
var splitWordPrefixTokens2 = wfmItemMatcher.splitWordPrefixTokens;
|
|
6250
|
+
var shortHandProcess = wfmItemMatcher.shortHandProcess;
|
|
6251
|
+
var stringToWFMItem = wfmItemMatcher.stringToWFMItem;
|
|
6252
|
+
var transformByWarframeAlias = wfmItemMatcher.transformByWarframeAlias;
|
|
6253
|
+
|
|
6254
|
+
// src/services/wfm-service/index.ts
|
|
5995
6255
|
async function updateCache() {
|
|
5996
6256
|
const updateTasks = [
|
|
5997
6257
|
{ name: "globalItemData", fn: globalItemData.update() },
|
|
@@ -6012,32 +6272,32 @@ async function updateCache() {
|
|
|
6012
6272
|
}
|
|
6013
6273
|
__name(updateCache, "updateCache");
|
|
6014
6274
|
async function getItemOrders(input) {
|
|
6275
|
+
input = input.trim();
|
|
6015
6276
|
if (!input) {
|
|
6016
|
-
return { ok: false, message: "
|
|
6277
|
+
return { ok: false, message: "wfm.inputItemName" };
|
|
6017
6278
|
}
|
|
6018
|
-
|
|
6019
|
-
const isFullLevel = /^满级|满级$/.test(input);
|
|
6279
|
+
const isFullLevel = /^满级|满级$/.test(normalizeName(input));
|
|
6020
6280
|
if (isFullLevel) {
|
|
6021
6281
|
if (input.startsWith("满级")) {
|
|
6022
|
-
input = input.slice(2, input.length);
|
|
6282
|
+
input = input.slice(2, input.length).trimStart();
|
|
6023
6283
|
} else if (input.endsWith("满级")) {
|
|
6024
|
-
input = input.slice(0, input.length - 2);
|
|
6284
|
+
input = input.slice(0, input.length - 2).trimEnd();
|
|
6025
6285
|
}
|
|
6026
6286
|
}
|
|
6027
6287
|
const targetItem = await stringToWFMItem(input);
|
|
6028
6288
|
if (!targetItem) {
|
|
6029
|
-
return { ok: false, message:
|
|
6289
|
+
return { ok: false, message: "wfm.itemNotFound", params: { input } };
|
|
6030
6290
|
}
|
|
6031
6291
|
const itemId = targetItem.slug;
|
|
6032
6292
|
const data = await wfmClient.items.getOrders(itemId);
|
|
6033
6293
|
if (!data) {
|
|
6034
|
-
return { ok: false, message: "
|
|
6294
|
+
return { ok: false, message: "wfm.orderFetchFailed" };
|
|
6035
6295
|
}
|
|
6036
6296
|
const result = data.filter(
|
|
6037
6297
|
(order) => order.user.status === "ingame" && order.visible && order.type === "sell" && (!isFullLevel || order.rank === targetItem.maxRank)
|
|
6038
6298
|
).sort((a, b) => toTimeStamp(b.updatedAt) - toTimeStamp(a.updatedAt)).sort((a, b) => a.platinum - b.platinum).slice(0, 5);
|
|
6039
6299
|
if (result.length === 0) {
|
|
6040
|
-
return { ok: false, message: "
|
|
6300
|
+
return { ok: false, message: "wfm.noOnlineSeller" };
|
|
6041
6301
|
}
|
|
6042
6302
|
return {
|
|
6043
6303
|
ok: true,
|
|
@@ -6054,18 +6314,18 @@ async function getRivenOrders(input) {
|
|
|
6054
6314
|
(item) => compareRivenItemName(input, item.i18n?.en?.name ?? "")
|
|
6055
6315
|
);
|
|
6056
6316
|
if (!targetItem) {
|
|
6057
|
-
return { ok: false, message:
|
|
6317
|
+
return { ok: false, message: "wfm.rivenWeaponNotFound", params: { input } };
|
|
6058
6318
|
}
|
|
6059
6319
|
const itemId = targetItem.slug;
|
|
6060
6320
|
const data = await wfmClient.rivens.getOrders(itemId);
|
|
6061
6321
|
if (!data) {
|
|
6062
|
-
return { ok: false, message: "
|
|
6322
|
+
return { ok: false, message: "wfm.rivenOrderFetchFailed" };
|
|
6063
6323
|
}
|
|
6064
6324
|
const top5 = data.filter(
|
|
6065
6325
|
(order) => order.owner.status === "ingame" && order.visible && !order.private && !order.closed && order.is_direct_sell
|
|
6066
6326
|
).sort((a, b) => toTimeStamp(b.updated) - toTimeStamp(a.updated)).sort((a, b) => a.starting_price - b.starting_price).slice(0, 5);
|
|
6067
6327
|
if (top5.length === 0) {
|
|
6068
|
-
return { ok: false, message: "
|
|
6328
|
+
return { ok: false, message: "wfm.noOnlineRivenSeller" };
|
|
6069
6329
|
}
|
|
6070
6330
|
const orders = top5.map((e) => {
|
|
6071
6331
|
const transformed = e.item.attributes.map(
|
|
@@ -6168,159 +6428,6 @@ var primedModHistory = createAsyncCache(async () => {
|
|
|
6168
6428
|
}
|
|
6169
6429
|
return result;
|
|
6170
6430
|
}, 432e5);
|
|
6171
|
-
async function stringToWFMItem(input) {
|
|
6172
|
-
const { globalItemList, globalItemDict, globalItemNameToSlugDict } = await globalItemData.get();
|
|
6173
|
-
input = normalizeName(input);
|
|
6174
|
-
const slug = globalItemNameToSlugDict[input];
|
|
6175
|
-
if (slug)
|
|
6176
|
-
return globalItemDict[slug];
|
|
6177
|
-
const normalShortHandRes = await shortHandProcess(input);
|
|
6178
|
-
if (normalShortHandRes)
|
|
6179
|
-
return normalShortHandRes;
|
|
6180
|
-
const { pure: inputNoSuffix, suffix } = removeNameSuffix(input);
|
|
6181
|
-
const aliasHasEndP = inputNoSuffix.endsWith(primeSuffix) ? inputNoSuffix.replace(new RegExp(`${primeSuffix}$`), "") : inputNoSuffix;
|
|
6182
|
-
const mappedAliasHasEndP = warframeAliasDict[aliasHasEndP];
|
|
6183
|
-
if (mappedAliasHasEndP) {
|
|
6184
|
-
const aliasHasEndPRes = await shortHandProcess(
|
|
6185
|
-
normalizeName(mappedAliasHasEndP) + primeSuffix + suffix
|
|
6186
|
-
);
|
|
6187
|
-
if (aliasHasEndPRes)
|
|
6188
|
-
return aliasHasEndPRes;
|
|
6189
|
-
}
|
|
6190
|
-
if (inputNoSuffix.endsWith("p")) {
|
|
6191
|
-
const aliasNoEndP = inputNoSuffix.replace(/p$/, "");
|
|
6192
|
-
const mappedAliasNoEndP = warframeAliasDict[aliasNoEndP];
|
|
6193
|
-
if (mappedAliasNoEndP) {
|
|
6194
|
-
const aliasNoEndPRes = await shortHandProcess(
|
|
6195
|
-
normalizeName(mappedAliasNoEndP) + primeSuffix + suffix
|
|
6196
|
-
);
|
|
6197
|
-
if (aliasNoEndPRes)
|
|
6198
|
-
return aliasNoEndPRes;
|
|
6199
|
-
}
|
|
6200
|
-
}
|
|
6201
|
-
const compareCNOrderName = /* @__PURE__ */ __name((input2, standard) => {
|
|
6202
|
-
if (!input2 || !standard || typeof input2 !== "string" || typeof standard !== "string") {
|
|
6203
|
-
return false;
|
|
6204
|
-
}
|
|
6205
|
-
const normalizedInput = normalizeName(input2);
|
|
6206
|
-
const normalizedStandard = normalizeName(standard);
|
|
6207
|
-
if (!normalizedInput || !normalizedStandard)
|
|
6208
|
-
return false;
|
|
6209
|
-
const normalizedStandardNoSet = normalizedStandard.replace(/一套/g, "");
|
|
6210
|
-
const normalizedStandardNoSetSimplifiedPrime = normalizedStandardNoSet.replace(/prime/g, "p");
|
|
6211
|
-
const normalizedStandardNoBlueprint = normalizedStandard.replace(
|
|
6212
|
-
/蓝图/g,
|
|
6213
|
-
""
|
|
6214
|
-
);
|
|
6215
|
-
const normalizedStandardNoBlueprintSimplifiedPrime = normalizedStandardNoBlueprint.replace(/prime/g, "p");
|
|
6216
|
-
const normalizedStandardNoNeu = normalizedStandardNoBlueprintSimplifiedPrime.replace(
|
|
6217
|
-
/头部神经光元/g,
|
|
6218
|
-
"头"
|
|
6219
|
-
);
|
|
6220
|
-
return normalizedInput === normalizedStandard || normalizedInput === normalizedStandardNoSet || normalizedInput === normalizedStandardNoSetSimplifiedPrime || normalizedInput === normalizedStandardNoBlueprintSimplifiedPrime || normalizedInput === normalizedStandardNoNeu;
|
|
6221
|
-
}, "compareCNOrderName");
|
|
6222
|
-
const compareENOrderName = /* @__PURE__ */ __name((input2, standard) => {
|
|
6223
|
-
if (!input2 || !standard || typeof input2 !== "string" || typeof standard !== "string") {
|
|
6224
|
-
return false;
|
|
6225
|
-
}
|
|
6226
|
-
const endWithSet = standard.toLowerCase().endsWith(" set");
|
|
6227
|
-
const standardNoSet = endWithSet ? standard.slice(0, -4) : standard;
|
|
6228
|
-
const endWithBlueprint = standard.toLocaleLowerCase().endsWith("blueprint");
|
|
6229
|
-
const standardNoBlueprint = endWithBlueprint ? standard.slice(0, -10) : standard;
|
|
6230
|
-
const standardSimplifiedPrime = standardNoSet.replace(/ Prime/g, "p");
|
|
6231
|
-
const standardNoBlueprintSimplifiedPrime = standardNoBlueprint.replace(
|
|
6232
|
-
/ Prime/g,
|
|
6233
|
-
"p"
|
|
6234
|
-
);
|
|
6235
|
-
const normalizedInput = normalizeName(input2);
|
|
6236
|
-
const normalizedStandard = normalizeName(standard);
|
|
6237
|
-
if (!normalizedInput || !normalizedStandard)
|
|
6238
|
-
return false;
|
|
6239
|
-
const normalizedStandardNoSet = normalizeName(standardNoSet);
|
|
6240
|
-
const normalizedStandardSimplifiedPrime = normalizeName(
|
|
6241
|
-
standardSimplifiedPrime
|
|
6242
|
-
);
|
|
6243
|
-
const normalizedStandardNoBlueprint = normalizeName(
|
|
6244
|
-
standardNoBlueprintSimplifiedPrime
|
|
6245
|
-
);
|
|
6246
|
-
return normalizedInput === normalizedStandard || normalizedInput === normalizedStandardNoSet || normalizedInput === normalizedStandardSimplifiedPrime || normalizedInput === normalizedStandardNoBlueprint;
|
|
6247
|
-
}, "compareENOrderName");
|
|
6248
|
-
return globalItemList.find(
|
|
6249
|
-
(item) => compareCNOrderName(input, item.i18n?.["zh-hans"]?.name ?? "")
|
|
6250
|
-
) ?? globalItemList.find(
|
|
6251
|
-
(item) => compareENOrderName(input, item.i18n?.en?.name ?? "")
|
|
6252
|
-
);
|
|
6253
|
-
}
|
|
6254
|
-
__name(stringToWFMItem, "stringToWFMItem");
|
|
6255
|
-
function removeNameSuffix(input) {
|
|
6256
|
-
let hasBPSuffix = false;
|
|
6257
|
-
if (input.endsWith(bpSuffix)) {
|
|
6258
|
-
input = input.replace(new RegExp(`${bpSuffix}$`), "");
|
|
6259
|
-
hasBPSuffix = true;
|
|
6260
|
-
}
|
|
6261
|
-
if (input.endsWith(setSuffix)) {
|
|
6262
|
-
input = input.replace(new RegExp(`${setSuffix}$`), "");
|
|
6263
|
-
}
|
|
6264
|
-
if (input.endsWith(bpSuffix)) {
|
|
6265
|
-
input = input.replace(new RegExp(`${bpSuffix}$`), "");
|
|
6266
|
-
hasBPSuffix = true;
|
|
6267
|
-
}
|
|
6268
|
-
const suffix = warframePartSuffix.find((value) => input.endsWith(value)) ?? weaponPartSuffix.find((value) => input.endsWith(value)) ?? (input.endsWith("头") ? "头部神经光元" : void 0) ?? (hasBPSuffix ? bpSuffix : void 0) ?? "";
|
|
6269
|
-
if (suffix) {
|
|
6270
|
-
input = input.endsWith("头") ? input.replace(/头$/, "") : input;
|
|
6271
|
-
const pure = input.replace(new RegExp(`${suffix}$`), "");
|
|
6272
|
-
return {
|
|
6273
|
-
pure,
|
|
6274
|
-
suffix
|
|
6275
|
-
};
|
|
6276
|
-
} else {
|
|
6277
|
-
return {
|
|
6278
|
-
pure: input,
|
|
6279
|
-
suffix
|
|
6280
|
-
};
|
|
6281
|
-
}
|
|
6282
|
-
}
|
|
6283
|
-
__name(removeNameSuffix, "removeNameSuffix");
|
|
6284
|
-
async function shortHandProcess(input) {
|
|
6285
|
-
const { globalItemDict, globalItemNameToSlugDict } = await globalItemData.get();
|
|
6286
|
-
const { pure: inputNoSuffix, suffix } = removeNameSuffix(input);
|
|
6287
|
-
if (inputNoSuffix === input) {
|
|
6288
|
-
const fixSet = input + setSuffix;
|
|
6289
|
-
const fixSetRes = globalItemNameToSlugDict[fixSet];
|
|
6290
|
-
if (fixSetRes)
|
|
6291
|
-
return globalItemDict[fixSetRes];
|
|
6292
|
-
const fixPrime = input.endsWith(primeSuffix) ? input : input.endsWith("p") ? input.slice(0, input.length - 1) + primeSuffix : input + primeSuffix;
|
|
6293
|
-
const fixPrimeRes = globalItemNameToSlugDict[fixPrime];
|
|
6294
|
-
if (fixPrimeRes)
|
|
6295
|
-
return globalItemDict[fixPrimeRes];
|
|
6296
|
-
const fixPrimeSet = fixPrime + setSuffix;
|
|
6297
|
-
const fixPrimeSetRes = globalItemNameToSlugDict[fixPrimeSet];
|
|
6298
|
-
if (fixPrimeSetRes)
|
|
6299
|
-
return globalItemDict[fixPrimeSetRes];
|
|
6300
|
-
const fixBP = input + bpSuffix;
|
|
6301
|
-
const fixBPRes = globalItemNameToSlugDict[fixBP];
|
|
6302
|
-
if (fixBPRes)
|
|
6303
|
-
return globalItemDict[fixBPRes];
|
|
6304
|
-
const fixPrimeBP = fixPrime + bpSuffix;
|
|
6305
|
-
const fixPrimeBPRes = globalItemNameToSlugDict[fixPrimeBP];
|
|
6306
|
-
if (fixPrimeBPRes)
|
|
6307
|
-
return globalItemDict[fixPrimeBPRes];
|
|
6308
|
-
} else {
|
|
6309
|
-
const fixBP = inputNoSuffix + suffix + bpSuffix;
|
|
6310
|
-
const fixBPRes = globalItemNameToSlugDict[fixBP];
|
|
6311
|
-
if (fixBPRes)
|
|
6312
|
-
return globalItemDict[fixBPRes];
|
|
6313
|
-
const fixPrime = inputNoSuffix.endsWith(primeSuffix) ? inputNoSuffix : inputNoSuffix.endsWith("p") ? inputNoSuffix.slice(0, inputNoSuffix.length - 1) + primeSuffix : inputNoSuffix + primeSuffix;
|
|
6314
|
-
const fixPrimeRes = globalItemNameToSlugDict[fixPrime + suffix];
|
|
6315
|
-
if (fixPrimeRes)
|
|
6316
|
-
return globalItemDict[fixPrimeRes];
|
|
6317
|
-
const fixPrimeBP = fixPrime + suffix + bpSuffix;
|
|
6318
|
-
const fixPrimeBPRes = globalItemNameToSlugDict[fixPrimeBP];
|
|
6319
|
-
if (fixPrimeBPRes)
|
|
6320
|
-
return globalItemDict[fixPrimeBPRes];
|
|
6321
|
-
}
|
|
6322
|
-
}
|
|
6323
|
-
__name(shortHandProcess, "shortHandProcess");
|
|
6324
6431
|
function compareRivenItemName(input, standard) {
|
|
6325
6432
|
if (!input || !standard || typeof input !== "string" || typeof standard !== "string") {
|
|
6326
6433
|
return false;
|
|
@@ -6334,13 +6441,18 @@ function compareRivenItemName(input, standard) {
|
|
|
6334
6441
|
__name(compareRivenItemName, "compareRivenItemName");
|
|
6335
6442
|
|
|
6336
6443
|
// src/commands/miscs.ts
|
|
6444
|
+
function inDevelopment() {
|
|
6445
|
+
return t("miscs.inDevelopment");
|
|
6446
|
+
}
|
|
6447
|
+
__name(inDevelopment, "inDevelopment");
|
|
6337
6448
|
function createMiscsCommands(deps) {
|
|
6338
6449
|
const { render } = deps;
|
|
6339
6450
|
return {
|
|
6451
|
+
inDevelopment,
|
|
6340
6452
|
hotRivenCommand: /* @__PURE__ */ __name(async () => {
|
|
6341
6453
|
const result = await getHotRivenWeapons2();
|
|
6342
6454
|
if (!result.ok) {
|
|
6343
|
-
return result
|
|
6455
|
+
return t(result);
|
|
6344
6456
|
}
|
|
6345
6457
|
return render(
|
|
6346
6458
|
HotRivenComponent(result.data)
|
|
@@ -7947,7 +8059,7 @@ function createWfCommands(deps) {
|
|
|
7947
8059
|
arbitrationCommand: /* @__PURE__ */ __name(async (_action, input) => {
|
|
7948
8060
|
const result = getArbitrations(input);
|
|
7949
8061
|
if (!result.ok) {
|
|
7950
|
-
return result
|
|
8062
|
+
return t(result);
|
|
7951
8063
|
}
|
|
7952
8064
|
return render(ArbitrationComponent(result.data));
|
|
7953
8065
|
}, "arbitrationCommand"),
|
|
@@ -7965,69 +8077,69 @@ function createWfCommands(deps) {
|
|
|
7965
8077
|
voidtraderCommand: /* @__PURE__ */ __name(async (_action) => {
|
|
7966
8078
|
const result = await getVoidTrader();
|
|
7967
8079
|
if (!result.ok) {
|
|
7968
|
-
return result
|
|
8080
|
+
return t(result);
|
|
7969
8081
|
}
|
|
7970
8082
|
return render(VoidTraderComponent(result.data));
|
|
7971
8083
|
}, "voidtraderCommand"),
|
|
7972
8084
|
fissureCommand: /* @__PURE__ */ __name(async (_action) => {
|
|
7973
8085
|
const result = await getFissures();
|
|
7974
8086
|
if (!result.ok) {
|
|
7975
|
-
return result
|
|
8087
|
+
return t(result);
|
|
7976
8088
|
}
|
|
7977
8089
|
return render(FissureComponent(result.data, "fissure"));
|
|
7978
8090
|
}, "fissureCommand"),
|
|
7979
8091
|
steelPathFissureCommand: /* @__PURE__ */ __name(async (_action) => {
|
|
7980
8092
|
const result = await getSteelPathFissures();
|
|
7981
8093
|
if (!result.ok) {
|
|
7982
|
-
return result
|
|
8094
|
+
return t(result);
|
|
7983
8095
|
}
|
|
7984
8096
|
return render(FissureComponent(result.data, "sp-fissure"));
|
|
7985
8097
|
}, "steelPathFissureCommand"),
|
|
7986
8098
|
railjackFissureCommand: /* @__PURE__ */ __name(async (_action) => {
|
|
7987
8099
|
const result = await getRailjackFissures();
|
|
7988
8100
|
if (!result.ok) {
|
|
7989
|
-
return result
|
|
8101
|
+
return t(result);
|
|
7990
8102
|
}
|
|
7991
8103
|
return render(FissureComponent(result.data, "rj-fissure"));
|
|
7992
8104
|
}, "railjackFissureCommand"),
|
|
7993
8105
|
relicCommand: /* @__PURE__ */ __name(async (_action, input) => {
|
|
7994
8106
|
const result = await getRelic(input);
|
|
7995
8107
|
if (!result.ok) {
|
|
7996
|
-
return result
|
|
8108
|
+
return t(result);
|
|
7997
8109
|
}
|
|
7998
8110
|
const relic = await applyRelicData(result.data);
|
|
7999
8111
|
return render(RelicComponent(relic));
|
|
8000
8112
|
}, "relicCommand"),
|
|
8001
8113
|
rivenCommand: /* @__PURE__ */ __name(async (_action, input) => {
|
|
8002
8114
|
if (!input?.src) {
|
|
8003
|
-
return "
|
|
8115
|
+
return t("riven.imageNotFound");
|
|
8004
8116
|
}
|
|
8005
8117
|
if (!config.ocrAPISecret?.id || !config.ocrAPISecret?.key) {
|
|
8006
|
-
return "
|
|
8118
|
+
return t("riven.ocrNotConfigured");
|
|
8007
8119
|
}
|
|
8008
8120
|
const result = await getAnalyzedRiven(
|
|
8009
8121
|
config.ocrAPISecret,
|
|
8010
8122
|
input.src
|
|
8011
8123
|
);
|
|
8012
8124
|
if (!result.ok) {
|
|
8013
|
-
return result
|
|
8125
|
+
return t(result);
|
|
8014
8126
|
}
|
|
8015
8127
|
return render(RivenComponent(result.data));
|
|
8016
8128
|
}, "rivenCommand"),
|
|
8017
8129
|
rivenStatCommand: /* @__PURE__ */ __name(async (_action, weaponType, statType, disposition) => {
|
|
8018
8130
|
if (!weaponType || !statType || !disposition) {
|
|
8019
|
-
return "
|
|
8131
|
+
return t("riven.invalidParams");
|
|
8020
8132
|
}
|
|
8021
8133
|
const result = await getStaticRivenStats(weaponType, statType, disposition);
|
|
8022
8134
|
if (!result.ok) {
|
|
8023
|
-
return result
|
|
8135
|
+
return t(result);
|
|
8024
8136
|
}
|
|
8025
8137
|
return render(RivenStatComponent(result.data));
|
|
8026
8138
|
}, "rivenStatCommand"),
|
|
8027
8139
|
weeklyCommand: /* @__PURE__ */ __name(async (_action) => {
|
|
8028
8140
|
const result = await getWeekly();
|
|
8029
8141
|
if (!result.ok) {
|
|
8030
|
-
return result
|
|
8142
|
+
return t(result);
|
|
8031
8143
|
}
|
|
8032
8144
|
return render(
|
|
8033
8145
|
WeeklyComponent(
|
|
@@ -8041,7 +8153,7 @@ function createWfCommands(deps) {
|
|
|
8041
8153
|
const threshold = minPrice && minPrice > 0 ? minPrice : 100;
|
|
8042
8154
|
const result = await getWeeklyRivens(threshold);
|
|
8043
8155
|
if (result.length === 0) {
|
|
8044
|
-
return "
|
|
8156
|
+
return t("riven.noWeeklyData");
|
|
8045
8157
|
}
|
|
8046
8158
|
return render(WeeklyRivenComponent(result.slice(0, 20), threshold));
|
|
8047
8159
|
}, "weeklyRivenCommand"),
|
|
@@ -8561,14 +8673,14 @@ function createWfmCommands(deps) {
|
|
|
8561
8673
|
wmCommand: /* @__PURE__ */ __name(async (_action, input) => {
|
|
8562
8674
|
const result = await getItemOrders(input);
|
|
8563
8675
|
if (!result.ok) {
|
|
8564
|
-
return result
|
|
8676
|
+
return t(result);
|
|
8565
8677
|
}
|
|
8566
8678
|
return render(ItemOrderComponent(result.data.item, result.data.orders));
|
|
8567
8679
|
}, "wmCommand"),
|
|
8568
8680
|
wmrCommand: /* @__PURE__ */ __name(async (_action, input) => {
|
|
8569
8681
|
const result = await getRivenOrders(input);
|
|
8570
8682
|
if (!result.ok) {
|
|
8571
|
-
return result
|
|
8683
|
+
return t(result);
|
|
8572
8684
|
}
|
|
8573
8685
|
return render(RivenOrderComponent(result.data.item, result.data.orders));
|
|
8574
8686
|
}, "wmrCommand"),
|
|
@@ -8679,17 +8791,13 @@ function setupCommands(ctx, deps) {
|
|
|
8679
8791
|
"武器类型: 步枪, 手枪, 霰弹枪, 近战, Archwing枪械\n词条类型: 2, 3, 21, 31"
|
|
8680
8792
|
).example("riven-stat 步枪 31 0.7").alias("rivenstat").alias("紫卡数值").action(wf.rivenStatCommand);
|
|
8681
8793
|
ctx.command("void-trader", "虚空商人").alias("voidtrader").alias("虚空商人").alias("奸商").action(wf.voidtraderCommand);
|
|
8682
|
-
ctx.command("lich-c", "c系玄骸武器", { hidden: true }).alias("lichc").action(inDevelopment);
|
|
8683
|
-
ctx.command("lich-i", "i系玄骸武器", { hidden: true }).alias("lichi").action(inDevelopment);
|
|
8794
|
+
ctx.command("lich-c", "c系玄骸武器", { hidden: true }).alias("lichc").action(miscs.inDevelopment);
|
|
8795
|
+
ctx.command("lich-i", "i系玄骸武器", { hidden: true }).alias("lichi").action(miscs.inDevelopment);
|
|
8684
8796
|
ctx.command("riven-weekly [minPrice:number]", "每周高价值紫卡参考 (未洗中位价)").alias("weeklyriven").alias("周紫卡").alias("周卡").action(wf.weeklyRivenCommand);
|
|
8685
8797
|
ctx.command("riven-hot", "热门紫卡").alias("hotriven").action(miscs.hotRivenCommand);
|
|
8686
8798
|
ctx.command("pmod-history", "Primed MOD 历史").alias("pmodhistory").alias("pmod").alias("P卡").alias("p卡").alias("P卡历史").alias("p卡历史").action(wfm.pmodhistoryCommand);
|
|
8687
8799
|
}
|
|
8688
8800
|
__name(setupCommands, "setupCommands");
|
|
8689
|
-
function inDevelopment() {
|
|
8690
|
-
return "功能暂未开放";
|
|
8691
|
-
}
|
|
8692
|
-
__name(inDevelopment, "inDevelopment");
|
|
8693
8801
|
// Annotate the CommonJS export names for ESM import in node:
|
|
8694
8802
|
0 && (module.exports = {
|
|
8695
8803
|
Config,
|