mirror of
https://github.com/smogon/pokemon-showdown-client.git
synced 2026-10-02 15:53:11 -05:00
Override sprite generation with preferences
This commit is contained in:
@@ -847,8 +847,13 @@ var Tools = {
|
||||
facing = 'back';
|
||||
}
|
||||
|
||||
// Decide what gen sprites to use.
|
||||
var gen = {1:'rby', 2:'gsc', 3:'rse', 4:'dpp', 5:'bw', 6:'xy'}[options.gen];
|
||||
if (Tools.prefs('nopastgens')) gen = 'xy';
|
||||
if (Tools.prefs('bwgfx') && gen === 'xy') gen = 'bw';
|
||||
|
||||
var animationData = {};
|
||||
if (options.gen === 5 && window.BattlePokemonSpritesBW) {
|
||||
if (gen === 'bw' && window.BattlePokemonSpritesBW) {
|
||||
animationData = BattlePokemonSpritesBW && window.BattlePokemonSpritesBW[pokemon.speciesid];
|
||||
} else {
|
||||
animationData = BattlePokemonSprites && window.BattlePokemonSprites[pokemon.speciesid];
|
||||
@@ -869,11 +874,6 @@ var Tools = {
|
||||
return spriteData;
|
||||
}
|
||||
|
||||
// Decide what gen sprites to use.
|
||||
var gen = {1:'rby', 2:'gsc', 3:'rse', 4:'dpp', 5:'bw', 6:'xy'}[options.gen];
|
||||
if (Tools.prefs('nopastgens')) gen = 'xy';
|
||||
if (Tools.prefs('bwgfx') && gen === 'xy') gen = 'bw';
|
||||
|
||||
if (animationData && animationData[facing]) {
|
||||
var spriteType = '';
|
||||
if (animationData[facing]['anif'] && pokemon.gender === 'F') {
|
||||
|
||||
Reference in New Issue
Block a user