Removed commented code

This commit is contained in:
Milly Wang 2024-05-17 10:38:15 -06:00
parent 452004f8dc
commit 36b05ee80d

View File

@ -821,19 +821,12 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
} }
} else if (this.randomizeMode){ } else if (this.randomizeMode){
switch (button){ switch (button){
// Going up, down, left, or right, will take it back to start
case Button.UP: case Button.UP:
this.startCursorObj.setVisible(false); this.startCursorObj.setVisible(false);
this.setGenMode(true); this.setGenMode(true);
this.setRandomizeMode(false); this.setRandomizeMode(false);
success = true; success = true;
break; break;
// case Button.DOWN:
// this.startCursorObj.setVisible(false);
// this.setGenMode(true);
// this.setRandomizeMode(false);
// success = true;
// break;
case Button.LEFT: case Button.LEFT:
this.startCursorObj.setVisible(false); this.startCursorObj.setVisible(false);
this.setGenMode(false); this.setGenMode(false);
@ -849,10 +842,6 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
break; break;
case Button.ACTION: case Button.ACTION:
this.generateRandomStarterTeam(); this.generateRandomStarterTeam();
// if (this.tryStart(true))
// success = true;
// else
// error = true;
success = true; success = true;
break; break;
} }
@ -867,7 +856,6 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
handler: () => { handler: () => {
ui.setMode(Mode.STARTER_SELECT); ui.setMode(Mode.STARTER_SELECT);
// this.generateRandomStarter();
let isDupe = false; let isDupe = false;
for (let s = 0; s < this.starterCursors.length; s++) { for (let s = 0; s < this.starterCursors.length; s++) {
if (this.starterGens[s] === this.getGenCursorWithScroll() && this.starterCursors[s] === this.cursor) { if (this.starterGens[s] === this.getGenCursorWithScroll() && this.starterCursors[s] === this.cursor) {
@ -1333,11 +1321,6 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
} }
else if (this.randomizeMode){ else if (this.randomizeMode){
changed = super.setCursor(cursor); changed = super.setCursor(cursor);
// this.cursorObj.setPosition(54, 160);
// this.setSpecies(this.randomSpecies[cursor]);
this.updateInstructions(); this.updateInstructions();
} }
else { else {
@ -1354,7 +1337,6 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
} }
getGenCursorWithScroll(): integer { getGenCursorWithScroll(): integer {
// return this.genCursor + this.genScrollCursor;
return this.genCursor !== undefined return this.genCursor !== undefined
? this.genCursor + this.genScrollCursor ? this.genCursor + this.genScrollCursor
: undefined; : undefined;
@ -1382,8 +1364,6 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
if (randomizeMode !== this.randomizeMode) { if (randomizeMode !== this.randomizeMode) {
this.randomizeMode = randomizeMode; this.randomizeMode = randomizeMode;
// this.setCursor(this.cursor);
if (randomizeMode) if (randomizeMode)
this.setSpecies(null); this.setSpecies(null);
@ -1907,10 +1887,8 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
while (!generatedValidPokemon) { while (!generatedValidPokemon) {
// Create a random number for gens 0 - 8 // Create a random number for gens 0 - 8
const gen = Utils.randInt(8, 0); const gen = Utils.randInt(8, 0);
// const gen = 3;
// Create a random pokemon id based off of how many pokemon are in the gen // Create a random pokemon id based off of how many pokemon are in the gen
const speciesId = Utils.randInt(this.genSpecies[gen].length - 1, 0); const speciesId = Utils.randInt(this.genSpecies[gen].length - 1, 0);
// const speciesId = 2;
const species = this.genSpecies[gen][speciesId]; const species = this.genSpecies[gen][speciesId];
// Ownership check // Ownership check
@ -1926,7 +1904,6 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
} }
} }
// Update value // Update value
if (!isDupe && this.tryUpdateValue(this.scene.gameData.getSpeciesStarterValue(species.speciesId))){ if (!isDupe && this.tryUpdateValue(this.scene.gameData.getSpeciesStarterValue(species.speciesId))){
// < 6 pokemon and the value is less than the limit check // < 6 pokemon and the value is less than the limit check
@ -2031,7 +2008,6 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
this.statsContainer.updateIvs(this.speciesStarterDexEntry.ivs); this.statsContainer.updateIvs(this.speciesStarterDexEntry.ivs);
} }
clearText() { clearText() {
this.starterSelectMessageBoxContainer.setVisible(false); this.starterSelectMessageBoxContainer.setVisible(false);
super.clearText(); super.clearText();