diff options
author | Daniel Weipert <code@drogueronin.de> | 2023-08-26 20:46:22 +0200 |
---|---|---|
committer | Daniel Weipert <code@drogueronin.de> | 2023-08-26 20:46:22 +0200 |
commit | 36a5d5862c3744f899fe6a5712f81171af144795 (patch) | |
tree | ba3c4782ca2da1bdd6b9271371b3bab87f2816a8 /resources/js/memory.js | |
parent | b7db43abcaf8c9d9ccb4bcaff07c5416cb21ff62 (diff) |
evolution items and shop interface
Diffstat (limited to 'resources/js/memory.js')
-rw-r--r-- | resources/js/memory.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/resources/js/memory.js b/resources/js/memory.js index 35da905..6450136 100644 --- a/resources/js/memory.js +++ b/resources/js/memory.js @@ -212,7 +212,12 @@ const Memory = { Memory.state.opponent.activeMonster = Memory.state.opponent.monsters[loadedState.opponent.activeMonsterIdx]; Memory.state.rivalMonster = loadedState.rivalMonster; Memory.state.activeTechnique = await loadTechnique(loadedState.activeTechnique); - Memory.state.activeBall = await loadInventoryItem(loadedState.activeBall); + + if (Memory.state.activeBall instanceof String) { // backwards compat: TODO: remove check later + Memory.state.activeBall = loadedState.activeBall; + } else { + Memory.state.activeBall = loadedState.activeBall && loadedState.activeBall.slug; + } // draw game if (!Game.isTown(Memory.state.currentArea)) { |