mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-06 06:01:46 +00:00
custom sprites
This commit is contained in:
@@ -29,14 +29,17 @@ module GameData
|
||||
|
||||
def self.sprite_filename(dex_number)
|
||||
if dex_number <= Settings::NB_POKEMON
|
||||
filename = sprintf("%s/%s.png", dex_number, dex_number)
|
||||
folder = dex_number.to_s
|
||||
filename = sprintf("%s.png", dex_number)
|
||||
else
|
||||
body_id = getBodyID(dex_number)
|
||||
head_id = getHeadID(dex_number, body_id)
|
||||
filename = sprintf("%s/%s.%s.png", head_id, head_id, body_id)
|
||||
folder = head_id.to_s
|
||||
filename = sprintf("%s.%s.png", head_id, body_id)
|
||||
end
|
||||
customPath = pbResolveBitmap(Settings::CUSTOM_BATTLERS_FOLDER + filename)
|
||||
return customPath ? customPath : pbResolveBitmap(Settings::BATTLERS_FOLDER + filename)
|
||||
regularPath = Settings::BATTLERS_FOLDER + folder + "/" + filename
|
||||
return customPath ? customPath : pbResolveBitmap(regularPath)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user