diff --git a/Data/CommonEvents.rxdata b/Data/CommonEvents.rxdata index c7fd43e69..df0365480 100644 Binary files a/Data/CommonEvents.rxdata and b/Data/CommonEvents.rxdata differ diff --git a/Data/Map105.rxdata b/Data/Map105.rxdata index c7a099d83..ab94d8012 100644 Binary files a/Data/Map105.rxdata and b/Data/Map105.rxdata differ diff --git a/Data/Map192.rxdata b/Data/Map192.rxdata index 11700dc67..56e461d90 100644 Binary files a/Data/Map192.rxdata and b/Data/Map192.rxdata differ diff --git a/Data/MapInfos.rxdata b/Data/MapInfos.rxdata index cd5f1e706..fc3eff463 100644 Binary files a/Data/MapInfos.rxdata and b/Data/MapInfos.rxdata differ diff --git a/Data/Scripts/001_Settings.rb b/Data/Scripts/001_Settings.rb index 4cc95134a..f61f78792 100644 --- a/Data/Scripts/001_Settings.rb +++ b/Data/Scripts/001_Settings.rb @@ -6,7 +6,7 @@ module Settings # The version of your game. It has to adhere to the MAJOR.MINOR.PATCH format. GAME_VERSION = '5.0.0' - GAME_VERSION_NUMBER = "5.2.1" + GAME_VERSION_NUMBER = "5.3.0" POKERADAR_LIGHT_ANIMATION_RED_ID = 17 POKERADAR_LIGHT_ANIMATION_GREEN_ID = 18 diff --git a/Data/Scripts/013_Items/008_PokemonBag.rb b/Data/Scripts/013_Items/008_PokemonBag.rb index ed7e9a6f9..d9a22ab21 100644 --- a/Data/Scripts/013_Items/008_PokemonBag.rb +++ b/Data/Scripts/013_Items/008_PokemonBag.rb @@ -13,6 +13,7 @@ class PokemonBag end def initialize + @descending_sort=false @lastpocket = 1 @pockets = [] @choices = [] @@ -42,6 +43,36 @@ class PokemonBag end end + def sort_pocket_alphabetically() + current_pocket = @pockets[@lastpocket] + sorted = current_pocket.sort_by do |item| + GameData::Item.get(item[0]).name + end + sorted.reverse! if @descending_sort + + @descending_sort = !@descending_sort + @pockets[@lastpocket] = sorted + end + + def sort_pocket_by_quantity() + current_pocket = @pockets[@lastpocket] + sorted = current_pocket.sort_by do |item| + if @descending_sort + -item[1] + else + item[1] + end + end + @descending_sort = !@descending_sort + @pockets[@lastpocket] = sorted + end + + def sort_pocket_by_last_used() + end + + def sort_pocket_by_frequent_use() + end + def clear @pockets.each { |pocket| pocket.clear } end diff --git a/Data/Scripts/016_UI/006_UI_Summary.rb b/Data/Scripts/016_UI/006_UI_Summary.rb index 9dfb2c604..6c0a90aee 100644 --- a/Data/Scripts/016_UI/006_UI_Summary.rb +++ b/Data/Scripts/016_UI/006_UI_Summary.rb @@ -676,19 +676,19 @@ class PokemonSummary_Scene ability = @pokemon.ability ability2 = @pokemon.ability2 - # if ability - # textpos.push([ability.name, 362, 278, 0, Color.new(64, 64, 64), Color.new(176, 176, 176)]) - # drawTextEx(overlay, 224, 320, 282, 2, ability.description, Color.new(64, 64, 64), Color.new(176, 176, 176)) - # end - - #fixme temp if ability textpos.push([ability.name, 362, 278, 0, Color.new(64, 64, 64), Color.new(176, 176, 176)]) - if ability2 - drawTextEx(overlay, 224, 320, 282, 2, ability2.name, Color.new(64, 64, 64), Color.new(176, 176, 176)) - end + drawTextEx(overlay, 224, 320, 282, 2, ability.description, Color.new(64, 64, 64), Color.new(176, 176, 176)) end + #fixme temp double abilities + # if ability + # textpos.push([ability.name, 362, 278, 0, Color.new(64, 64, 64), Color.new(176, 176, 176)]) + # if ability2 + # drawTextEx(overlay, 224, 320, 282, 2, ability2.name, Color.new(64, 64, 64), Color.new(176, 176, 176)) + # end + # end + # Draw all text pbDrawTextPositions(overlay, textpos) diff --git a/Data/Scripts/016_UI/007_UI_Bag.rb b/Data/Scripts/016_UI/007_UI_Bag.rb index 1a06701b3..16b52b741 100644 --- a/Data/Scripts/016_UI/007_UI_Bag.rb +++ b/Data/Scripts/016_UI/007_UI_Bag.rb @@ -330,6 +330,11 @@ class PokemonBag_Scene end end + def get_current_pocket + itemwindow = @sprites["itemlist"] + return @bag.pockets[itemwindow.pocket] + end + # Called when the item screen wants an item to be chosen from the screen def pbChooseItem @sprites["helpwindow"].visible = false @@ -459,6 +464,7 @@ class PokemonBagScreen cmdRegister = -1 cmdGive = -1 cmdToss = -1 + cmdSort = -1 cmdDebug = -1 commands = [] # Generate command list @@ -477,6 +483,7 @@ class PokemonBagScreen elsif pbCanRegisterItem?(item) commands[cmdRegister = commands.length] = _INTL("Register") end + commands[cmdSort = commands.length] = _INTL("Sort bag") commands[cmdDebug = commands.length] = _INTL("Debug") if $DEBUG commands[commands.length] = _INTL("Cancel") # Show commands generated above @@ -526,6 +533,24 @@ class PokemonBagScreen @bag.pbRegisterItem(item) end @scene.pbRefresh + elsif cmdSort >=0 && command == cmdSort # Sort bag + command = @scene.pbShowCommands(_INTL("How to sort?",itemname),[ + _INTL("Alphabetically"), + _INTL("By quantity"), + # _INTL("Recently used"), + # _INTL("Recently obtained"), + _INTL("Cancel") + ],0) + case command + ### Cancel ### + when -1, 3 + next + when 0 + @bag.sort_pocket_alphabetically() + when 1 + @bag.sort_pocket_by_quantity() + end + @scene.pbRefresh elsif cmdDebug>=0 && command==cmdDebug # Debug command = 0 loop do diff --git a/Data/Scripts/050_AddOns/GuessPokemonQuiz.rb b/Data/Scripts/050_AddOns/GuessPokemonQuiz.rb index fefab5762..5dcc179cc 100644 --- a/Data/Scripts/050_AddOns/GuessPokemonQuiz.rb +++ b/Data/Scripts/050_AddOns/GuessPokemonQuiz.rb @@ -55,7 +55,7 @@ class FusionQuiz end round_multiplier += round_multiplier_increase else - pbMessage(_INTL("That concludes our quiz! You've cumulated {1} points in total.", @score)) + pbMessage(_INTL("This concludes our quiz! You've cumulated {1} points in total.", @score)) pbMessage("Thanks for playing with us today!") end end @@ -185,7 +185,7 @@ class FusionQuiz pbSEPlay("buzzer", 80) break_streak pbMessage("Unfortunately, that was a wrong answer.") - pbMessage("But you'll get another chance!") if other_chance_later + pbMessage("But you'll get another chance at it!") if other_chance_later end end diff --git a/Data/System.rxdata b/Data/System.rxdata index 80b93e6b3..f687cf27e 100644 Binary files a/Data/System.rxdata and b/Data/System.rxdata differ diff --git a/Data/messages.dat b/Data/messages.dat index dd1e9b2b9..82427ae21 100644 Binary files a/Data/messages.dat and b/Data/messages.dat differ