Update class mechanics, stat rulesets, and CoA reference catalogs
This commit is contained in:
1 parent
b16821e92e
commit
39458d5de6
221 files changed
+2584962
-568
No files matched your search
@@ -13,7 +13,8 @@ const wow335GeneratedPath = path.join(projectRoot, "src", "game", "wow335Ability
|
||||
const manastormAffixesPath = path.join(projectRoot, "src", "game", "generated", "manastormAffixes.json");
|
||||
const manastormRuntimePath = path.join(projectRoot, "src", "game", "generated", "manastormRuntimeCatalog.json");
|
||||
const defaultSource = path.resolve(projectRoot, "..", "LadiksMPQEditor", "patch-I", "Interface", "Icons");
|
||||
const sourceDirectory = path.resolve(process.argv[2] ?? defaultSource);
|
||||
const sourceDirectory = path.resolve(process.argv.slice(2).find((argument) => !argument.startsWith("--")) ?? defaultSource);
|
||||
const missingOnly = process.argv.includes("--missing-only");
|
||||
const outputDirectory = path.join(projectRoot, "public", "assets", "ui", "spells");
|
||||
|
||||
const catalogSources = catalogPaths.map((catalogPath) => fs.readFileSync(catalogPath, "utf8"));
|
||||
@@ -278,8 +279,10 @@ function encodePng({ width, height, pixels }) {
|
||||
fs.mkdirSync(outputDirectory, { recursive: true });
|
||||
const fallbackSourcePath = path.join(sourceDirectory, "inv_misc_questionmark.blp");
|
||||
let fallbacks = 0;
|
||||
let exported = 0;
|
||||
const fallbackDetails = [];
|
||||
for (const basename of iconBasenames) {
|
||||
if (missingOnly && fs.existsSync(path.join(outputDirectory, `${basename}.png`))) continue;
|
||||
const sourcePath = path.join(sourceDirectory, `${basename}.blp`);
|
||||
const missingSource = !fs.existsSync(sourcePath);
|
||||
const resolvedSourcePath = missingSource ? fallbackSourcePath : sourcePath;
|
||||
@@ -297,10 +300,11 @@ for (const basename of iconBasenames) {
|
||||
png = encodePng(decodeBlp2(fs.readFileSync(fallbackSourcePath), fallbackSourcePath));
|
||||
}
|
||||
fs.writeFileSync(path.join(outputDirectory, `${basename}.png`), png);
|
||||
exported += 1;
|
||||
}
|
||||
|
||||
console.log(JSON.stringify({
|
||||
exported: iconBasenames.length,
|
||||
exported,
|
||||
fallbacks,
|
||||
fallbackDetails,
|
||||
sourceDirectory,
|
||||
|
||||
Reference in new issue
Block a user