mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2026-07-22 15:47:00 +00:00
Update 6.8
This commit is contained in:
@@ -50,6 +50,19 @@ class PokemonSprite < SpriteWrapper
|
||||
end
|
||||
end
|
||||
|
||||
def setPokemonBitmapPIFSprite(pif_sprite)
|
||||
@_iconbitmap.dispose if @_iconbitmap
|
||||
@_iconbitmap = nil
|
||||
spriteLoader = BattleSpriteLoader.new
|
||||
animatedBitmap = spriteLoader.load_pif_sprite_directly(pif_sprite)
|
||||
@_iconbitmap = SpriteWrapper.new
|
||||
@_iconbitmap.bitmap = animatedBitmap.bitmap if animatedBitmap&.bitmap
|
||||
|
||||
self.bitmap = (@_iconbitmap) ? @_iconbitmap.bitmap : nil
|
||||
self.color = Color.new(0, 0, 0, 0)
|
||||
changeOrigin
|
||||
end
|
||||
|
||||
def setPokemonBitmap(pokemon, back = false)
|
||||
# Dispose of existing icon bitmap if it exists
|
||||
@_iconbitmap.dispose if @_iconbitmap
|
||||
@@ -82,13 +95,20 @@ class PokemonSprite < SpriteWrapper
|
||||
changeOrigin
|
||||
end
|
||||
|
||||
def setPokemonBitmapSpecies(pokemon, species, back = false)
|
||||
def setPokemonBitmapSpecies(species, back = false)
|
||||
@_iconbitmap.dispose if @_iconbitmap
|
||||
@_iconbitmap = (pokemon) ? GameData::Species.sprite_bitmap_from_pokemon(pokemon, back, species) : nil
|
||||
@_iconbitmap = GameData::Species.front_sprite_bitmap(species)
|
||||
self.bitmap = (@_iconbitmap) ? @_iconbitmap.bitmap : nil
|
||||
changeOrigin
|
||||
end
|
||||
|
||||
def setBitmapDirectly(bitmap)
|
||||
@_iconbitmap.dispose if @_iconbitmap
|
||||
@_iconbitmap = nil
|
||||
self.bitmap = bitmap
|
||||
changeOrigin
|
||||
end
|
||||
|
||||
def setSpeciesBitmap(species, gender = 0, form = 0, shiny = false, shadow = false, back = false, egg = false)
|
||||
@_iconbitmap.dispose if @_iconbitmap
|
||||
@_iconbitmap = GameData::Species.sprite_bitmap(species, form, gender, shiny, shadow, back, egg)
|
||||
@@ -96,6 +116,13 @@ class PokemonSprite < SpriteWrapper
|
||||
changeOrigin
|
||||
end
|
||||
|
||||
def setAnimatedBitmap(animated_bitmap)
|
||||
@_iconbitmap.dispose if @_iconbitmap
|
||||
@_iconbitmap = animated_bitmap
|
||||
self.bitmap = animated_bitmap ? animated_bitmap.bitmap : nil
|
||||
changeOrigin
|
||||
end
|
||||
|
||||
def getBitmap
|
||||
return @_iconbitmap
|
||||
end
|
||||
@@ -124,7 +151,11 @@ class PokemonIconSprite < SpriteWrapper
|
||||
@numFrames = 0
|
||||
@currentFrame = 0
|
||||
@counter = 0
|
||||
self.pokemon = pokemon
|
||||
if pokemon.is_a?(Symbol)
|
||||
self.pokemon = Pokemon.new(pokemon,1)
|
||||
else
|
||||
self.pokemon = pokemon
|
||||
end
|
||||
@logical_x = 0 # Actual x coordinate
|
||||
@logical_y = 0 # Actual y coordinate
|
||||
@adjusted_x = 0 # Offset due to "jumping" animation in party screen
|
||||
@@ -343,7 +374,6 @@ class PokemonSpeciesIconSprite < SpriteWrapper
|
||||
end
|
||||
|
||||
def shiny=(value)
|
||||
print "wut"
|
||||
@shiny = value
|
||||
refresh
|
||||
end
|
||||
|
||||
@@ -58,6 +58,8 @@ class PokemonStorage
|
||||
attr_accessor :transfer_box
|
||||
attr_accessor :currentBox
|
||||
attr_writer :unlockedWallpapers
|
||||
attr_accessor :filterProc
|
||||
|
||||
BASICWALLPAPERQTY = 16
|
||||
|
||||
def initialize(maxBoxes = Settings::NUM_STORAGE_BOXES, maxPokemon = PokemonBox::BOX_SIZE)
|
||||
@@ -100,11 +102,12 @@ class PokemonStorage
|
||||
_INTL("Norman"),_INTL("Roxanne"),_INTL("Tate & Liza"),_INTL("Wallace"), #52-55
|
||||
_INTL("Rotom Dex 1"),_INTL("Rotom Dex 2"),_INTL("Happy Hypno"),_INTL("Fossil Shark"), #56-59
|
||||
_INTL("Camping"),_INTL("Swimming"),_INTL("Nostalgic 3"),_INTL("Graffiti"), #60-63
|
||||
_INTL("Ruins"),_INTL("Digital"),_INTL("Galactic"),_INTL("Sinnoh"), #64-67
|
||||
_INTL("Ruins"),_INTL("Marsh"),_INTL("Galactic"),_INTL("Sinnoh"), #64-67
|
||||
_INTL("PC"),_INTL("Ancient Sea"),_INTL("Cat Playroom"),_INTL("Softboiled"), #68-71
|
||||
_INTL("Electric Mouse"),_INTL("Sailing"),_INTL("Forest 2"),_INTL("Graveyard"), #72-75
|
||||
_INTL("Eon"),_INTL("Quest"),_INTL("Pink Stars"),_INTL("Party Hard"), #76-79
|
||||
_INTL("Espurr"),_INTL("Nostalgic 4"),_INTL("Dark Forest"), #80-82
|
||||
_INTL("My Bud Skipun")
|
||||
]
|
||||
end
|
||||
|
||||
@@ -116,6 +119,7 @@ class PokemonStorage
|
||||
|
||||
def isAvailableWallpaper?(i)
|
||||
@unlockedWallpapers = [] if !@unlockedWallpapers
|
||||
return true if i == "transfer" #transfer box wallpaper is hardcoded
|
||||
return true if i<BASICWALLPAPERQTY
|
||||
return true if @unlockedWallpapers[i]
|
||||
return false
|
||||
@@ -390,9 +394,9 @@ class RegionalStorage
|
||||
getCurrentStorage.pbStoreCaught(pkmn)
|
||||
end
|
||||
|
||||
def pbDelete(box,index)
|
||||
getCurrentStorage.pbDelete(pkmn)
|
||||
end
|
||||
# def pbDelete(box,index)
|
||||
# getCurrentStorage.pbDelete(pkmn)
|
||||
# end
|
||||
end
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user