fortnite-replay-analysis 1.1.2 → 1.1.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.
Files changed (2) hide show
  1. package/index.js +6 -2
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -40,7 +40,7 @@ function ReplayAnalysis(inputPath, { bot = false, sort = true } = {}) { // Fortn
40
40
  }
41
41
  const binPath = getBinaryPath();
42
42
 
43
- execFile(binPath, [replayFilePath], (error, stdout, stderr) => {
43
+ execFile(binPath, [replayFilePath], { maxBuffer: 1024 * 1024 * 20 }, (error, stdout, stderr) => {
44
44
  if (error) {
45
45
  reject(new Error(`Execution error: ${error.message}`));
46
46
  return;
@@ -184,10 +184,12 @@ function mergeScores(scoreArrays) { // 複数マッチの結果をマージし
184
184
  partyVictoryRoyaleCount: p.partyVictoryRoyale ? 1 : 0,
185
185
  matchList: [p.matchName],
186
186
  partyMemberList: [...p.partyMemberList],
187
+ partyDiscordInfo: p.partyDiscordInfo ? { ...p.partyDiscordInfo } : undefined,
187
188
  partyAliveTimeByMatch: [
188
189
  { match: p.matchName, times: [...(p.partyAliveTimeList || [])] }
189
190
  ],
190
191
  partyPlacementList: [p.partyPlacement],
192
+ blockNames: p.blockName ? [p.blockName] : [],
191
193
  matchs: { [p.matchName]: { ...p } }
192
194
  });
193
195
  } else {
@@ -204,6 +206,9 @@ function mergeScores(scoreArrays) { // 複数マッチの結果をマージし
204
206
  });
205
207
  ex.partyPlacementList.push(p.partyPlacement);
206
208
  ex.matchs[p.matchName] = { ...p };
209
+ if (p.blockName && !ex.blockNames.includes(p.blockName)) {
210
+ ex.blockNames.push(p.blockName);
211
+ }
207
212
  }
208
213
  })
209
214
  );
@@ -212,7 +217,6 @@ function mergeScores(scoreArrays) { // 複数マッチの結果をマージし
212
217
  }
213
218
 
214
219
  function sortScores(arr) { // 公式準拠のスコアソート関数
215
- // リザルトとしてpoint, ビクロイ数, マッチ数, 平均撃破数, 平均順位, 合計生存時間を追加したい
216
220
  if (!Array.isArray(arr) || arr.length === 0) return arr;
217
221
 
218
222
  arr.forEach(p => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fortnite-replay-analysis",
3
- "version": "1.1.2",
3
+ "version": "1.1.4",
4
4
  "description": "Fortnite replay analysis tool (Node.js用Fortniteリプレイ解析バイナリラッパー)",
5
5
  "repository": {
6
6
  "type": "git",