mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2026-07-22 07:37:00 +00:00
Update 6.8
This commit is contained in:
+3
-2
@@ -182,6 +182,7 @@ class PokemonStorageScene
|
||||
end
|
||||
|
||||
def pbSetCursorMode(value)
|
||||
return unless @sprites["arrow"]
|
||||
@cursormode = value
|
||||
@sprites["arrow"].cursormode = value
|
||||
if @screen.multiSelectRange
|
||||
@@ -296,9 +297,9 @@ class PokemonStorageScene
|
||||
def pbHardRefresh
|
||||
oldPartyY = @sprites["boxparty"].y
|
||||
@sprites["box"].dispose
|
||||
@sprites["box"] = PokemonBoxSprite.new(@storage, @storage.currentBox, @boxviewport)
|
||||
@sprites["box"] = PokemonBoxSprite.new(@storage, @storage.currentBox, @boxviewport, @screen.filterProc)
|
||||
@sprites["boxparty"].dispose
|
||||
@sprites["boxparty"] = PokemonBoxPartySprite.new(@storage.party, @boxsidesviewport)
|
||||
@sprites["boxparty"] = PokemonBoxPartySprite.new(@storage.party, @boxsidesviewport,@screen.filterProc)
|
||||
@sprites["boxparty"].y = oldPartyY
|
||||
end
|
||||
|
||||
|
||||
+20
-6
@@ -64,7 +64,6 @@ class PokemonStorageScreen
|
||||
elsif @fusionMode
|
||||
pbFusionCommands(selected)
|
||||
else
|
||||
echoln "pcOrganizeCommand?"
|
||||
organizeActions(selected, pokemon, heldpoke, isTransferBox)
|
||||
end
|
||||
end
|
||||
@@ -101,8 +100,8 @@ class PokemonStorageScreen
|
||||
commands = []
|
||||
commands << cmd_jump
|
||||
commands << cmd_select unless is_holding_pokemon
|
||||
commands << cmd_wallpaper
|
||||
commands << cmd_name if !@storage[@storage.currentBox].is_a?(StorageTransferBox)
|
||||
commands << cmd_wallpaper unless @storage[@storage.currentBox].is_a?(StorageTransferBox)
|
||||
commands << cmd_name unless @storage[@storage.currentBox].is_a?(StorageTransferBox)
|
||||
commands << cmd_info if @storage[@storage.currentBox].is_a?(StorageTransferBox)
|
||||
commands << cmd_cancel
|
||||
|
||||
@@ -116,7 +115,7 @@ class PokemonStorageScreen
|
||||
when cmd_name
|
||||
boxCommandName
|
||||
when cmd_info
|
||||
boxCommandTransferInfo
|
||||
transferBoxTutorial
|
||||
when cmd_select
|
||||
selectAllBox
|
||||
end
|
||||
@@ -204,6 +203,10 @@ class PokemonStorageScreen
|
||||
# --- Screen-side game-rule methods (validate, commit, then animate) ---
|
||||
# Validate & pick up a selection of multiple Pokémon (logical)
|
||||
def pbHoldMulti(box, selected_index)
|
||||
if @scene.inTransferBox && box != -1
|
||||
pbPlayBuzzerSE
|
||||
return
|
||||
end
|
||||
selected = getMultiSelection(box, nil)
|
||||
return if selected.length == 0
|
||||
selected_pos = getBoxPosition(box, selected_index)
|
||||
@@ -243,6 +246,9 @@ class PokemonStorageScreen
|
||||
@scene.animate_hold_multi(box, final_selected, selected_index) # animation
|
||||
@multiheldpkmn = new_held
|
||||
@storage.pbDeleteMulti(box, final_selected)
|
||||
if @storage[box].is_a?(StorageTransferBox)
|
||||
@saveWhenPlaceDown = true
|
||||
end
|
||||
@scene.pbRefresh
|
||||
end
|
||||
|
||||
@@ -250,7 +256,10 @@ class PokemonStorageScreen
|
||||
# Commit them to storage and animate the placement.
|
||||
def pbPlaceMulti(box, selected_index)
|
||||
return if @multiheldpkmn.nil? || @multiheldpkmn.empty?
|
||||
|
||||
if @scene.inTransferBox && box != -1
|
||||
pbPlayBuzzerSE
|
||||
return
|
||||
end
|
||||
selected_pos = getBoxPosition(box, selected_index)
|
||||
if box >= 0
|
||||
# Validate every target slot is in-bounds and unoccupied
|
||||
@@ -304,6 +313,11 @@ class PokemonStorageScreen
|
||||
@storage.party.push(pokemon)
|
||||
end
|
||||
end
|
||||
if @saveWhenPlaceDown
|
||||
@saveWhenPlaceDown = false
|
||||
Game.save()
|
||||
end
|
||||
|
||||
@scene.pbRefresh
|
||||
@multiheldpkmn = []
|
||||
end
|
||||
@@ -413,4 +427,4 @@ class PokemonStorageScreen
|
||||
box_width = box == BOX_NAME ? 2 : PokemonBox::BOX_WIDTH
|
||||
[index % box_width, (index.to_f / box_width).floor]
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -32,6 +32,12 @@ class PokemonStorageScreen
|
||||
value_proc: ->(p) { (p.name || "").downcase },
|
||||
friendly: [_INTL("A to Z"), _INTL("Z to A")]
|
||||
},
|
||||
{
|
||||
key: :level,
|
||||
label: _INTL("By base stats"),
|
||||
value_proc: ->(p) { p.bst || 0 },
|
||||
friendly: [_INTL("Lowest to Highest BST"), _INTL("Highest to Lowest BST")]
|
||||
},
|
||||
{
|
||||
key: :level,
|
||||
label: _INTL("By level"),
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
# frozen_string_literal: true
|
||||
COMMAND_SELECT_POKEMON = 3
|
||||
|
||||
class PokemonBoxIcon
|
||||
def refresh()
|
||||
return if !@pokemon
|
||||
if useRegularIcon(@pokemon.species) || @pokemon.egg?
|
||||
self.setBitmap(GameData::Species.icon_filename_from_pokemon(@pokemon))
|
||||
else
|
||||
self.setBitmapDirectly(createFusionIcon(@pokemon.species, @pokemon.spriteform_head, @pokemon.spriteform_body, @pokemon.bodyShiny?, @pokemon.headShiny?))
|
||||
end
|
||||
self.src_rect = Rect.new(0, 0, self.bitmap.height, self.bitmap.height)
|
||||
end
|
||||
|
||||
def apply_filter(filterProc = nil)
|
||||
if filterProc && @pokemon
|
||||
if filterProc.call(@pokemon)
|
||||
self.opacity = 255
|
||||
@enabled = true
|
||||
else
|
||||
self.opacity = 80
|
||||
@enabled = false
|
||||
end
|
||||
else
|
||||
self.opacity = 255
|
||||
@enabled = true
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user