silphscope 1.3.4 → 1.3.6

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.
package/README.md CHANGED
@@ -25,7 +25,8 @@ await renderAllGraphics(rom, {
25
25
  outputMonDir: "./Assets/monImages", // must I explain?
26
26
  outputIconDir: "./Assets/Icons", // same thing here :p
27
27
  outputTrainerDir: "./Assets/Trainers", // ...
28
- outputMoveDir: "./Assets/Moves"
28
+ outputMoveDir: "./Assets/Moves",
29
+ sortUnusedMoves: true // just sorts the unused moves into a sub-directory
29
30
  });
30
31
  ```
31
32
 
@@ -77,5 +78,7 @@ import { renderAllMoves } from "silphscope" // :O
77
78
  const rom = fs.readFileSync("pokefirered.gba") // stuff stuff stuff (more stuff!)
78
79
  await renderAllMoves(rom, {
79
80
  outputDir: "./Assets/trainers", // (incredibly) more stuff
81
+ renderMasterImage: true, // kinda forgot about this... basically it renders a uncut image of the move anim if you like
82
+ sortUnused: true, // sorts unused moves into a sub-directory
80
83
  })
81
84
  ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "silphscope",
3
- "version": "1.3.4",
3
+ "version": "1.3.6",
4
4
  "description": "A firered/leafgreen ROM asset extractor for use in web applications",
5
5
  "main": "main.js",
6
6
  "exports": {
@@ -133,7 +133,7 @@ export async function renderAllGraphics(rom, options = {}) { // eventually I wil
133
133
  outputIconDir = "./out/icons",
134
134
  outputTrainerDir = "./out/trainers",
135
135
  outputMoveDir = "./out/moves",
136
- sortUnused = true,
136
+ sortUnusedMoves = true,
137
137
  } = options;
138
138
 
139
139
  await renderAllMons(rom, {
@@ -154,7 +154,7 @@ export async function renderAllGraphics(rom, options = {}) { // eventually I wil
154
154
  await renderAllMoves(rom, {
155
155
  outputDir: outputMoveDir,
156
156
  renderMasterImage: true,
157
- sortUnused,
157
+ sortUnused: sortUnusedMoves,
158
158
  })
159
159
  }
160
160
 
@@ -69,7 +69,7 @@ export async function renderMove(moveName, moves, reader, rom, options = {}) {
69
69
  });
70
70
 
71
71
  if (outputDir) { // I will update this later but in theory it should also work... eventually though it will need a split inside to handle full image generation :p
72
- const rootDir = (move?.unused === true)? `${outputDir}/unused` : `${outputDir}`
72
+ const rootDir = (sortUnused && move?.unused === true)? `${outputDir}/unused` : `${outputDir}`
73
73
  const dir = `${rootDir}/${moveName}`;
74
74
  if (!fs.existsSync(dir)) fs.mkdirSync(dir, { recursive: true });
75
75
  if (renderMasterImage) {