mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-19 14:52:19 +02:00
update requested changes from opaquer and tinylad and walker
This commit is contained in:
parent
2c782ddf55
commit
fc30d07709
@ -163,9 +163,9 @@ export default class BattleScene extends SceneBase {
|
||||
public skipSeenDialogues: boolean = false;
|
||||
/**
|
||||
* Determines if the egg hatching animation should be skipped
|
||||
* - 0 = Never
|
||||
* - 1 = Always
|
||||
* - 2 = Ask
|
||||
* - 0 = Never (skip animation)
|
||||
* - 1 = Ask (ask to skip animation when hatching 2 or more eggs)
|
||||
* - 2 = Always (automatically skip animation when hatching 2 or more eggs)
|
||||
*/
|
||||
public eggSkipPreference: number = 0;
|
||||
|
||||
|
@ -17,7 +17,7 @@ import { EggHatchData } from "#app/data/egg-hatch-data";
|
||||
export class EggLapsePhase extends Phase {
|
||||
|
||||
private eggHatchData: EggHatchData[] = [];
|
||||
private readonly minEggsToPromptSkip: number = 5;
|
||||
private readonly maxEggsNotToSkip: number = 1;
|
||||
constructor(scene: BattleScene) {
|
||||
super(scene);
|
||||
}
|
||||
@ -31,7 +31,7 @@ export class EggLapsePhase extends Phase {
|
||||
this.eggHatchData= [];
|
||||
|
||||
if (eggsToHatchCount > 0) {
|
||||
if (eggsToHatchCount >= this.minEggsToPromptSkip && this.scene.eggSkipPreference === 2) {
|
||||
if (eggsToHatchCount > this.maxEggsNotToSkip && this.scene.eggSkipPreference === 1) {
|
||||
this.scene.ui.showText(i18next.t("battle:eggHatching"), 0, () => {
|
||||
// show prompt for skip
|
||||
this.scene.ui.showText(i18next.t("battle:eggSkipPrompt"), 0);
|
||||
@ -44,7 +44,7 @@ export class EggLapsePhase extends Phase {
|
||||
}
|
||||
);
|
||||
}, 100, true);
|
||||
} else if (eggsToHatchCount >= this.minEggsToPromptSkip && this.scene.eggSkipPreference === 1) {
|
||||
} else if (eggsToHatchCount > this.maxEggsNotToSkip && this.scene.eggSkipPreference === 2) {
|
||||
this.scene.queueMessage(i18next.t("battle:eggHatching"));
|
||||
this.hatchEggsSkipped(eggsToHatch);
|
||||
this.showSummary();
|
||||
|
@ -290,16 +290,16 @@ export const Setting: Array<Setting> = [
|
||||
value: "Never",
|
||||
label: i18next.t("settings:never")
|
||||
},
|
||||
{
|
||||
value: "Always",
|
||||
label: i18next.t("settings:always")
|
||||
},
|
||||
{
|
||||
value: "Ask",
|
||||
label: i18next.t("settings:ask")
|
||||
},
|
||||
{
|
||||
value: "Always",
|
||||
label: i18next.t("settings:always")
|
||||
}
|
||||
],
|
||||
default: 2,
|
||||
default: 1,
|
||||
type: SettingType.GENERAL
|
||||
},
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user