mirror of
https://github.com/smogon/pokemon-showdown-client.git
synced 2026-04-26 18:18:46 -05:00
Hide nicknames in battle tooltip (#2508)
Some checks failed
Node.js CI / build (22.x) (push) Has been cancelled
Some checks failed
Node.js CI / build (22.x) (push) Has been cancelled
--------- Co-authored-by: Guangcong Luo <guangcongluo@gmail.com>
This commit is contained in:
parent
2598694835
commit
c779bd581d
|
|
@ -830,8 +830,10 @@ export class BattleTooltips {
|
||||||
genderBuf = ` <img src="${Dex.fxPrefix}gender-${gender.toLowerCase()}.png" alt="${gender}" width="7" height="10" class="pixelated" /> `;
|
genderBuf = ` <img src="${Dex.fxPrefix}gender-${gender.toLowerCase()}.png" alt="${gender}" width="7" height="10" class="pixelated" /> `;
|
||||||
}
|
}
|
||||||
|
|
||||||
let name = BattleLog.escapeHTML(pokemon.name);
|
const ignoreNicks = this.battle.ignoreNicks || this.battle.ignoreOpponent;
|
||||||
if (pokemon.speciesForme !== pokemon.name) {
|
const nickname = ignoreNicks ? Dex.species.get(pokemon.speciesForme).baseSpecies : pokemon.name;
|
||||||
|
let name = BattleLog.escapeHTML(nickname);
|
||||||
|
if (pokemon.speciesForme !== nickname) {
|
||||||
name += ` <small>(${BattleLog.escapeHTML(pokemon.speciesForme)})</small>`;
|
name += ` <small>(${BattleLog.escapeHTML(pokemon.speciesForme)})</small>`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user