Fix starter select issue with gender forms

This commit is contained in:
Flashfyre 2024-04-15 17:34:36 -04:00
parent 3571ab2748
commit 7275876120
1 changed files with 7 additions and 0 deletions

View File

@ -1304,6 +1304,13 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
this.dexAttrCursor = 0n; this.dexAttrCursor = 0n;
this.natureCursor = -1; this.natureCursor = -1;
if (species?.forms?.find(f => f.formKey === 'female')) {
if (female !== undefined)
formIndex = female ? 1 : 0;
else if (formIndex !== undefined)
female = formIndex === 1;
}
if (species) { if (species) {
this.dexAttrCursor |= (shiny !== undefined ? !shiny : !(shiny = oldProps.shiny)) ? DexAttr.NON_SHINY : DexAttr.SHINY; this.dexAttrCursor |= (shiny !== undefined ? !shiny : !(shiny = oldProps.shiny)) ? DexAttr.NON_SHINY : DexAttr.SHINY;
this.dexAttrCursor |= (female !== undefined ? !female : !(female = oldProps.female)) ? DexAttr.MALE : DexAttr.FEMALE; this.dexAttrCursor |= (female !== undefined ? !female : !(female = oldProps.female)) ? DexAttr.MALE : DexAttr.FEMALE;