Skip to content

Commit

Permalink
重新将各元件的起始 id 改回 0
Browse files Browse the repository at this point in the history
  • Loading branch information
MisaLiu committed Oct 22, 2022
1 parent 9737d0e commit b816799
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/chart/convert/official.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export default function OfficialChartConverter(_chart)

rawChart.judgeLineList.forEach((_judgeline, index) =>
{
let judgeline = new Judgeline({ id: index + 1 });
let judgeline = new Judgeline({ id: index });
let events = new EventLayer();
let notes = [];

Expand Down Expand Up @@ -76,7 +76,7 @@ export default function OfficialChartConverter(_chart)
notes.sort((a, b) => a.time - b.time);
notes.forEach((note, noteIndex) =>
{
note.id = noteIndex + 1;
note.id = noteIndex;
chart.notes.push(note);
});

Expand Down
4 changes: 2 additions & 2 deletions src/chart/convert/phiedit.js
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ export default function PhiEditChartConverter(_chart)
}
if (!judgelines[event.lineId])
{
judgelines[event.lineId] = new Judgeline({ id: event.lineId + 1 });
judgelines[event.lineId] = new Judgeline({ id: event.lineId });
judgelines[event.lineId].eventLayers.push(new EventLayer());
}

Expand Down Expand Up @@ -427,7 +427,7 @@ export default function PhiEditChartConverter(_chart)
commands.notePerLine[lineId].sort((a, b) => a.time - b.time);
commands.notePerLine[lineId].forEach((note, noteIndex) =>
{
note.id = noteIndex + 1;
note.id = noteIndex;
notes.push(note);
});
}
Expand Down
4 changes: 2 additions & 2 deletions src/chart/convert/rephiedit.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ export default function RePhiEditChartConverter(_chart)
rawChart.judgeLineList.forEach((_judgeline, judgelineIndex) =>
{
let judgeline = new Judgeline({
id : judgelineIndex + 1,
id : judgelineIndex,
texture : _judgeline.Texture != 'line.png' ? _judgeline.Texture : null,
parentLine : _judgeline.father >= 0 ? _judgeline.father + 1 : null,
isCover : _judgeline.isCover == 1
Expand Down Expand Up @@ -327,7 +327,7 @@ export default function RePhiEditChartConverter(_chart)

// 推送 Note
chart.notes.push(new Note({
id : noteIndex + 1,
id : noteIndex,
type : (
_note.type == 1 ? 1 :
_note.type == 2 ? 3 :
Expand Down

0 comments on commit b816799

Please sign in to comment.