Fixed the Bag lists having incorrect starting positions when choosing an item from a subset of your Bag

This commit is contained in:
Maruno17
2022-06-15 20:03:43 +01:00
parent b8e9251fb4
commit 3238ff817c
3 changed files with 16 additions and 9 deletions

View File

@@ -202,8 +202,12 @@ class Battle::Scene
# Set Bag starting positions
oldLastPocket = $bag.last_viewed_pocket
oldChoices = $bag.last_pocket_selections.clone
$bag.last_viewed_pocket = @bagLastPocket if @bagLastPocket
$bag.last_pocket_selections = @bagChoices if @bagChoices
if @bagLastPocket
$bag.last_viewed_pocket = @bagLastPocket
$bag.last_pocket_selections = @bagChoices
else
$bag.reset_last_selections
end
# Start Bag screen
itemScene = PokemonBag_Scene.new
itemScene.pbStartScene($bag, true,