Skip to content

Commit

Permalink
Remove dead code for dex initialization (#10793)
Browse files Browse the repository at this point in the history
As of PR #10641, these are no longer necessary.
  • Loading branch information
larry-the-table-guy authored Jan 4, 2025
1 parent d8689df commit b790eb8
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion server/chat-plugins/datasearch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2595,7 +2595,7 @@ function runLearn(target: string, cmd: string, canAll: boolean, formatid: string
// can happen if you hotpatch formats without hotpatching chat
return {error: `"${formatid}" is not a supported format.`};
}
const dex = Dex.mod(formatid).includeData();
const dex = Dex.mod(formatid);
gen = dex.gen;
formatName = `Gen ${gen}`;
format = new Dex.Format({mod: formatid, effectType: 'Format', exists: true});
Expand Down
1 change: 0 additions & 1 deletion sim/tools/exhaustive-runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ export class ExhaustiveRunner {

async run() {
const dex = Dex.forFormat(this.format);
dex.loadData(); // FIXME: This is required for `dex.gen` to be set properly...

const seed = this.prng.seed;
const pools = this.createPools(dex);
Expand Down
2 changes: 1 addition & 1 deletion test/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const DEFAULT_SEED = [0x09917, 0x06924, 0x0e1c8, 0x06af0];
class TestTools {
constructor(mod = 'base') {
this.currentMod = mod;
this.dex = Dex.mod(mod).includeData(); // ensure that gen is initialized
this.dex = Dex.mod(mod);

this.modPrefix = this.dex.isBase ? `[gen9] ` : `[${mod}] `;
}
Expand Down

0 comments on commit b790eb8

Please sign in to comment.