mirror of
https://github.com/zkldi/Tachi.git
synced 2026-09-29 02:18:09 +03:00
fix: make-things-available-in-inf: chart.data.inGameID can be an array (#1192)
This commit is contained in:
@@ -1,10 +1,25 @@
|
||||
const { MutateCollection } = require("../../util");
|
||||
|
||||
function idMatch(idSet, inGameID) {
|
||||
if (Array.isArray(inGameID)) {
|
||||
inGameID.forEach((id) => {
|
||||
if (idSet.includes(id)) {
|
||||
return true;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
if (idSet.includes(inGameID)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
module.exports = (idSet) =>
|
||||
MutateCollection("charts-iidx.json", (charts) => {
|
||||
for (const chart of charts) {
|
||||
if (
|
||||
idSet.includes(chart.data.inGameID) &&
|
||||
idMatch(idSet, chart.data.inGameID) &&
|
||||
!chart.versions.includes("inf") &&
|
||||
chart.data["2dxtraSet"] === null &&
|
||||
chart.difficulty !== "LEGGENDARIA" &&
|
||||
|
||||
Reference in New Issue
Block a user