koishi-plugin-delta-force 1.3.2 → 1.3.3

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.
@@ -1 +1 @@
1
- {"version":3,"file":"personalData.d.ts","sourceRoot":"","sources":["../../../src/commands/info/personalData.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAA;AAChC,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAA;AACtC,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAGxC,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AAEvC;;GAEG;AACH,wBAAgB,4BAA4B,CAC1C,GAAG,EAAE,OAAO,EACZ,GAAG,EAAE,UAAU,EACf,WAAW,EAAE,WAAW,EACxB,QAAQ,EAAE,QAAQ,QAiWnB"}
1
+ {"version":3,"file":"personalData.d.ts","sourceRoot":"","sources":["../../../src/commands/info/personalData.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAA;AAChC,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAA;AACtC,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAGxC,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AAEvC;;GAEG;AACH,wBAAgB,4BAA4B,CAC1C,GAAG,EAAE,OAAO,EACZ,GAAG,EAAE,UAAU,EACf,WAAW,EAAE,WAAW,EACxB,QAAQ,EAAE,QAAQ,QA6VnB"}
package/lib/index.js CHANGED
@@ -5967,8 +5967,8 @@ function registerPersonalDataCommands(ctx, api, dataManager, renderer) {
5967
5967
  const mapImage = dataManager.getMapImagePath(mapName, "sol");
5968
5968
  const baseMapName = mapName.replace(/-?(常规|机密|绝密|水淹|适应)$/, "");
5969
5969
  return {
5970
- mapID: map.mapID,
5971
- totalCount: map.totalCount || 0,
5970
+ ...map,
5971
+ // 保留原始 API 字段(包括 leaveCount)
5972
5972
  mapName,
5973
5973
  baseMapName,
5974
5974
  mapImage
@@ -6039,20 +6039,20 @@ function registerPersonalDataCommands(ctx, api, dataManager, renderer) {
6039
6039
  }
6040
6040
  }
6041
6041
  const solRedCollection = (solData.redCollectionDetail || []).map((item) => ({
6042
- objectID: item.objectID,
6042
+ ...item,
6043
+ // 保留原始 API 字段(包括 count)
6043
6044
  objectName: objectNameMap[String(item.objectID)] || item.objectName || `物品(${item.objectID})`,
6044
6045
  imageUrl: `https://playerhub.df.qq.com/playerhub/60004/object/${item.objectID}.png`,
6045
- price: item.price || 0,
6046
6046
  priceFormatted: formatPrice3(item.price)
6047
- })).sort((a, b) => b.price - a.price).slice(0, 10);
6047
+ })).sort((a, b) => (b.price || 0) - (a.price || 0)).slice(0, 10);
6048
6048
  const solGunPlayList = (solData.gunPlayList || []).map((weapon) => ({
6049
- objectID: weapon.objectID,
6049
+ ...weapon,
6050
+ // 保留原始 API 字段
6050
6051
  weaponName: objectNameMap[String(weapon.objectID)] || `武器(${weapon.objectID})`,
6051
6052
  imageUrl: `https://playerhub.df.qq.com/playerhub/60004/object/${weapon.objectID}.png`,
6052
- totalPrice: weapon.totalPrice || 0,
6053
6053
  totalPriceFormatted: weapon.totalPrice ? (weapon.totalPrice / 1e6).toFixed(2) + "M" : "-",
6054
6054
  escapeRate: weapon.fightCount > 0 ? (weapon.escapeCount / weapon.fightCount * 100).toFixed(1) + "%" : "-"
6055
- })).sort((a, b) => b.totalPrice - a.totalPrice).slice(0, 10);
6055
+ })).sort((a, b) => (b.totalPrice || 0) - (a.totalPrice || 0)).slice(0, 10);
6056
6056
  templateData.solDetail = {
6057
6057
  ...solData,
6058
6058
  totalGameTime: totalGameTime(solData.totalGameTime),
@@ -6079,12 +6079,12 @@ function registerPersonalDataCommands(ctx, api, dataManager, renderer) {
6079
6079
  const mapName = dataManager.getMapName(map.mapID);
6080
6080
  const mapImage = dataManager.getMapImagePath(mapName, "mp");
6081
6081
  return {
6082
- mapID: map.mapID,
6083
- totalCount: map.totalCount || 0,
6082
+ ...map,
6083
+ // 保留原始 API 字段(包括 leaveCount)
6084
6084
  mapName,
6085
6085
  mapImage
6086
6086
  };
6087
- }).sort((a, b) => b.totalCount - a.totalCount).slice(0, 10);
6087
+ }).sort((a, b) => (b.totalCount || 0) - (a.totalCount || 0)).slice(0, 10);
6088
6088
  const formatMPGameTime = /* @__PURE__ */ __name((minutes) => {
6089
6089
  if (!minutes || isNaN(minutes)) return "0分钟";
6090
6090
  const hours = Math.floor(minutes / 60);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "koishi-plugin-delta-force",
3
3
  "description": "三角洲行动游戏数据查询插件",
4
- "version": "1.3.2",
4
+ "version": "1.3.3",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "files": [