mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-07 13:15:01 +00:00
Created and implemented GameData::Type
This commit is contained in:
@@ -271,7 +271,7 @@ def pbItemIconFile(item)
|
||||
if !pbResolveBitmap(bitmapFileName) && itm.is_machine?
|
||||
move = itm.move
|
||||
type = GameData::Move.get(move).type
|
||||
bitmapFileName = sprintf("Graphics/Icons/itemMachine%s",getConstantName(PBTypes,type)) rescue nil
|
||||
bitmapFileName = sprintf("Graphics/Icons/itemMachine%s",type.to_s) rescue nil
|
||||
if !pbResolveBitmap(bitmapFileName)
|
||||
bitmapFileName = sprintf("Graphics/Icons/itemMachine%03d",type)
|
||||
end
|
||||
|
||||
@@ -358,7 +358,7 @@ end
|
||||
|
||||
# Returns true if there is a Pokémon with the given type in the player's party.
|
||||
def pbHasType?(type)
|
||||
type = getID(PBTypes,type)
|
||||
type = GameData::Type.get(type).id
|
||||
for pokemon in $Trainer.pokemonParty
|
||||
return true if pokemon.hasType?(type)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user