mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-04 23:42:18 +02:00
Make summary-ui-handler use new shinyDescriptor method
This commit is contained in:
parent
c6644cb64a
commit
9afdd037fc
@ -11,6 +11,7 @@ import {
|
|||||||
isNullOrUndefined,
|
isNullOrUndefined,
|
||||||
toReadableString,
|
toReadableString,
|
||||||
formatStat,
|
formatStat,
|
||||||
|
getShinyDescriptor,
|
||||||
} from "#app/utils/common";
|
} from "#app/utils/common";
|
||||||
import type { PlayerPokemon, PokemonMove } from "#app/field/pokemon";
|
import type { PlayerPokemon, PokemonMove } from "#app/field/pokemon";
|
||||||
import { getStarterValueFriendshipCap, speciesStarterCosts } from "#app/data/balance/starters";
|
import { getStarterValueFriendshipCap, speciesStarterCosts } from "#app/data/balance/starters";
|
||||||
@ -444,18 +445,19 @@ export default class SummaryUiHandler extends UiHandler {
|
|||||||
this.shinyIcon.setVisible(this.pokemon.isShiny(false));
|
this.shinyIcon.setVisible(this.pokemon.isShiny(false));
|
||||||
this.shinyIcon.setTint(getVariantTint(baseVariant));
|
this.shinyIcon.setTint(getVariantTint(baseVariant));
|
||||||
if (this.shinyIcon.visible) {
|
if (this.shinyIcon.visible) {
|
||||||
const shinyDescriptor =
|
let shinyDescriptor = "";
|
||||||
doubleShiny || baseVariant
|
if (doubleShiny || baseVariant) {
|
||||||
? `${baseVariant === 2 ? i18next.t("common:epicShiny") : baseVariant === 1 ? i18next.t("common:rareShiny") : i18next.t("common:commonShiny")}${doubleShiny ? `/${this.pokemon.fusionVariant === 2 ? i18next.t("common:epicShiny") : this.pokemon.fusionVariant === 1 ? i18next.t("common:rareShiny") : i18next.t("common:commonShiny")}` : ""}`
|
shinyDescriptor = " (" + getShinyDescriptor(baseVariant);
|
||||||
: "";
|
if (doubleShiny) {
|
||||||
this.shinyIcon.on("pointerover", () =>
|
shinyDescriptor += "/" + getShinyDescriptor(this.pokemon.fusionVariant);
|
||||||
globalScene.ui.showTooltip(
|
}
|
||||||
"",
|
shinyDescriptor += ")";
|
||||||
`${i18next.t("common:shinyOnHover")}${shinyDescriptor ? ` (${shinyDescriptor})` : ""}`,
|
}
|
||||||
true,
|
this.shinyIcon
|
||||||
),
|
.on("pointerover", () =>
|
||||||
);
|
globalScene.ui.showTooltip("", i18next.t("common:shinyOnHover") + shinyDescriptor, true),
|
||||||
this.shinyIcon.on("pointerout", () => globalScene.ui.hideTooltip());
|
)
|
||||||
|
.on("pointerout", () => globalScene.ui.hideTooltip());
|
||||||
}
|
}
|
||||||
|
|
||||||
this.fusionShinyIcon.setPosition(this.shinyIcon.x, this.shinyIcon.y);
|
this.fusionShinyIcon.setPosition(this.shinyIcon.x, this.shinyIcon.y);
|
||||||
|
Loading…
Reference in New Issue
Block a user