[Enhancement] Avoids 'flashbanging' for players in Shop UI (#2504)

* Fix - Avoids 'flashbanging' for players playing at x5 speed by making the transition time constant regardless of the speed chosen

* Forgot to delete a debugging value
This commit is contained in:
Dakurei 2024-06-22 15:58:07 +02:00 committed by GitHub
parent f0422fa7d9
commit c818f0e1df
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 2 deletions

View File

@ -183,7 +183,8 @@ export default class ModifierSelectUiHandler extends AwaitableUiHandler {
/* Force updateModifiers without pokemonSpecificModifiers */ /* Force updateModifiers without pokemonSpecificModifiers */
this.scene.getModifierBar().updateModifiers(this.scene.modifiers, true); this.scene.getModifierBar().updateModifiers(this.scene.modifiers, true);
this.scene.showShopOverlay(750); /* Multiplies the appearance duration by the speed parameter so that it is always constant, and avoids "flashbangs" at game speed x5 */
this.scene.showShopOverlay(750 * this.scene.gameSpeed);
this.scene.updateAndShowText(750); this.scene.updateAndShowText(750);
this.scene.updateBiomeWaveText(); this.scene.updateBiomeWaveText();
this.scene.updateMoneyText(); this.scene.updateMoneyText();
@ -476,7 +477,8 @@ export default class ModifierSelectUiHandler extends AwaitableUiHandler {
this.getUi().clearText(); this.getUi().clearText();
this.eraseCursor(); this.eraseCursor();
this.scene.hideShopOverlay(750); /* Multiplies the fade time duration by the speed parameter so that it is always constant, and avoids "flashbangs" at game speed x5 */
this.scene.hideShopOverlay(750 * this.scene.gameSpeed);
this.scene.hideLuckText(250); this.scene.hideLuckText(250);
/* Normally already called just after the shop, but not sure if it happens in 100% of cases */ /* Normally already called just after the shop, but not sure if it happens in 100% of cases */