This commit is contained in:
Greenlamp 2024-05-20 14:27:26 +02:00
parent bb332aed19
commit 1c2e528b5c

View File

@ -9,7 +9,6 @@ const deepCopy = (data) => {
}
describe("check if every variant's sprite are correctly set", () => {
let masterlist;
let expVariant;
@ -59,10 +58,7 @@ describe("check if every variant's sprite are correctly set", () => {
if (!mlist.hasOwnProperty(id)) errors.push(`missing key ${id} in masterlist for ${filePath}`);
else if (mlist[id][parseInt(variant, 10) - 1] !== 2) errors.push(`the value should be 2 for the index ${parseInt(variant, 10) - 1} - ${filePath}`);
}
} else if (!mlist.hasOwnProperty(name)) {
errors.push(`named - missing key ${name} in masterlist for ${filePath}`);
}
else {
} else if (!mlist.hasOwnProperty(name)) errors.push(`named - missing key ${name} in masterlist for ${filePath}`);else {
const raw = fs.readFileSync(filePath, {encoding: 'utf8', flag: 'r'});
const data = JSON.parse(raw);
for (const key of Object.keys(data)) {
@ -89,8 +85,7 @@ describe("check if every variant's sprite are correctly set", () => {
if (!data.hasOwnProperty(index)) {
errors.push(`index: ${index} - ${filePath}`);
}
}
else if (elm ===2) {
} else if (elm === 2) {
url = `${key}_${parseInt(index, 10) + 1}.png`;
let filePath = `${dirPath}${url}`;
if (!fs.existsSync(filePath)) {