Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
ydarissep authored Apr 14, 2024
1 parent ccec18f commit 319ef7b
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/speciesPanelUtility.js
Original file line number Diff line number Diff line change
Expand Up @@ -491,6 +491,13 @@ function createClickableImgAndName(speciesName, evoConditions = false, showName


async function manageSpeciesPanelHistory(speciesName){
for(let i = 0; i < speciesPanelHistory.length; i++){
if(!(speciesPanelHistory[i][0] in species) || species[speciesPanelHistory[i][0]]["baseSpeed"] == 0){
speciesPanelHistory.splice(i, 1)
i--
}
}

if(speciesPanelHistoryContainer.children.length != speciesPanelHistory.length){
displaySpeciesPanelHistory()
}
Expand Down Expand Up @@ -553,11 +560,6 @@ function displaySpeciesPanelHistory(){
const sprite = document.createElement("img")
const speciesName = speciesPanelHistory[i][0]

if(!(speciesName in species) || species[speciesName]["baseSpeed"] == 0){
speciesPanelHistory.splice(i, 1)
continue
}

sprite.src = getSpeciesSpriteSrc(speciesName)
sprite.className = `sprite${speciesName} historyAnimation`
if(speciesPanelHistory[i][1] == true){
Expand Down

0 comments on commit 319ef7b

Please sign in to comment.