mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-09-23 15:03:24 +02:00
[Bug] Fix ssui passives (#6362)
Fix passives not being persisted in starter select
This commit is contained in:
parent
908886d78b
commit
053976daec
@ -2095,27 +2095,21 @@ export class StarterSelectUiHandler extends MessageUiHandler {
|
|||||||
const passiveAttr = starterData.passiveAttr;
|
const passiveAttr = starterData.passiveAttr;
|
||||||
if (passiveAttr & PassiveAttr.UNLOCKED) {
|
if (passiveAttr & PassiveAttr.UNLOCKED) {
|
||||||
// this is for enabling and disabling the passive
|
// this is for enabling and disabling the passive
|
||||||
if (!(passiveAttr & PassiveAttr.ENABLED)) {
|
const label = i18next.t(
|
||||||
options.push({
|
passiveAttr & PassiveAttr.ENABLED
|
||||||
label: i18next.t("starterSelectUiHandler:enablePassive"),
|
? "starterSelectUiHandler:disablePassive"
|
||||||
handler: () => {
|
: "starterSelectUiHandler:enablePassive",
|
||||||
starterData.passiveAttr |= PassiveAttr.ENABLED;
|
);
|
||||||
ui.setMode(UiMode.STARTER_SELECT);
|
options.push({
|
||||||
this.setSpeciesDetails(this.lastSpecies);
|
label,
|
||||||
return true;
|
handler: () => {
|
||||||
},
|
starterData.passiveAttr ^= PassiveAttr.ENABLED;
|
||||||
});
|
persistentStarterData.passiveAttr ^= PassiveAttr.ENABLED;
|
||||||
} else {
|
ui.setMode(UiMode.STARTER_SELECT);
|
||||||
options.push({
|
this.setSpeciesDetails(this.lastSpecies);
|
||||||
label: i18next.t("starterSelectUiHandler:disablePassive"),
|
return true;
|
||||||
handler: () => {
|
},
|
||||||
starterData.passiveAttr ^= PassiveAttr.ENABLED;
|
});
|
||||||
ui.setMode(UiMode.STARTER_SELECT);
|
|
||||||
this.setSpeciesDetails(this.lastSpecies);
|
|
||||||
return true;
|
|
||||||
},
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
// if container.favorite is false, show the favorite option
|
// if container.favorite is false, show the favorite option
|
||||||
const isFavorite = starterAttributes?.favorite ?? false;
|
const isFavorite = starterAttributes?.favorite ?? false;
|
||||||
|
Loading…
Reference in New Issue
Block a user