mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-06 06:01:46 +00:00
display spriter credits in fusion screen and pokedex
This commit is contained in:
1
Data/.~lock.credits.csv#
Normal file
1
Data/.~lock.credits.csv#
Normal file
@@ -0,0 +1 @@
|
|||||||
|
Charles Dubois,DESKTOP-U5METSR/charl,DESKTOP-U5METSR,07.04.2023 22:25,file:///C:/Users/charl/AppData/Roaming/OpenOffice/4;
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -26,6 +26,7 @@ module Settings
|
|||||||
BATTLERS_FOLDER = "Graphics/Battlers/"
|
BATTLERS_FOLDER = "Graphics/Battlers/"
|
||||||
DOWNLOADED_SPRITES_FOLDER = "Graphics/temp/"
|
DOWNLOADED_SPRITES_FOLDER = "Graphics/temp/"
|
||||||
DEFAULT_SPRITE_PATH = "Graphics/Battlers/Special/000.png"
|
DEFAULT_SPRITE_PATH = "Graphics/Battlers/Special/000.png"
|
||||||
|
CREDITS_FILE_PATH = "Data/credits.csv"
|
||||||
FRONTSPRITE_POSITION_OFFSET = 20
|
FRONTSPRITE_POSITION_OFFSET = 20
|
||||||
FRONTSPRITE_SCALE = 0.6666666666
|
FRONTSPRITE_SCALE = 0.6666666666
|
||||||
BACKRPSPRITE_SCALE = 1
|
BACKRPSPRITE_SCALE = 1
|
||||||
|
|||||||
@@ -414,6 +414,10 @@ class IconSprite < SpriteWrapper
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def getBitmap
|
||||||
|
return @_iconbitmap
|
||||||
|
end
|
||||||
|
|
||||||
def clearBitmaps
|
def clearBitmaps
|
||||||
@_iconbitmap.dispose if @_iconbitmap
|
@_iconbitmap.dispose if @_iconbitmap
|
||||||
@_iconbitmap = nil
|
@_iconbitmap = nil
|
||||||
|
|||||||
@@ -1195,6 +1195,7 @@ end
|
|||||||
def pbDrawTextPositions(bitmap,textpos)
|
def pbDrawTextPositions(bitmap,textpos)
|
||||||
for i in textpos
|
for i in textpos
|
||||||
textsize = bitmap.text_size(i[0])
|
textsize = bitmap.text_size(i[0])
|
||||||
|
|
||||||
x = i[1]
|
x = i[1]
|
||||||
y = i[2] + 6
|
y = i[2] + 6
|
||||||
if i[3]==true || i[3]==1 # right align
|
if i[3]==true || i[3]==1 # right align
|
||||||
|
|||||||
@@ -25,6 +25,10 @@ class PokemonSprite < SpriteWrapper
|
|||||||
changeOrigin
|
changeOrigin
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def filename
|
||||||
|
return @bitmap
|
||||||
|
end
|
||||||
|
|
||||||
def changeOrigin
|
def changeOrigin
|
||||||
return if !self.bitmap
|
return if !self.bitmap
|
||||||
@offset = PictureOrigin::Center if !@offset
|
@offset = PictureOrigin::Center if !@offset
|
||||||
@@ -76,6 +80,10 @@ class PokemonSprite < SpriteWrapper
|
|||||||
changeOrigin
|
changeOrigin
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def getBitmap
|
||||||
|
return @_iconbitmap
|
||||||
|
end
|
||||||
|
|
||||||
def update
|
def update
|
||||||
super
|
super
|
||||||
if @_iconbitmap
|
if @_iconbitmap
|
||||||
|
|||||||
@@ -688,9 +688,12 @@ class PokemonFusionScene
|
|||||||
newspeciesname = newSpecies.real_name
|
newspeciesname = newSpecies.real_name
|
||||||
oldspeciesname = GameData::Species.get(@pokemon1.species).real_name
|
oldspeciesname = GameData::Species.get(@pokemon1.species).real_name
|
||||||
|
|
||||||
|
overlay = BitmapSprite.new(Graphics.width, Graphics.height, @viewport).bitmap
|
||||||
|
drawSpriteCredits(@sprites["rsprite2"].getBitmap.filename, overlay)
|
||||||
Kernel.pbMessageDisplay(@sprites["msgwindow"],
|
Kernel.pbMessageDisplay(@sprites["msgwindow"],
|
||||||
_INTL("\\se[]Congratulations! Your Pokémon were fused into {2}!\\wt[80]", @pokemon1.name, newspeciesname))
|
_INTL("\\se[]Congratulations! Your Pokémon were fused into {2}!\\wt[80]", @pokemon1.name, newspeciesname))
|
||||||
|
|
||||||
|
|
||||||
#exp
|
#exp
|
||||||
@pokemon1.exp_when_fused_head = @pokemon2.exp
|
@pokemon1.exp_when_fused_head = @pokemon2.exp
|
||||||
@pokemon1.exp_when_fused_body = @pokemon1.exp
|
@pokemon1.exp_when_fused_body = @pokemon1.exp
|
||||||
@@ -705,7 +708,7 @@ class PokemonFusionScene
|
|||||||
@pokemon1.debug_shiny = true if @pokemon1.debug_shiny || @pokemon2.debug_shiny
|
@pokemon1.debug_shiny = true if @pokemon1.debug_shiny || @pokemon2.debug_shiny
|
||||||
|
|
||||||
setFusionIVs(superSplicer)
|
setFusionIVs(superSplicer)
|
||||||
#add to pokedex
|
#add to pokedex
|
||||||
if !$Trainer.pokedex.owned?(newSpecies)
|
if !$Trainer.pokedex.owned?(newSpecies)
|
||||||
$Trainer.pokedex.set_seen(newSpecies)
|
$Trainer.pokedex.set_seen(newSpecies)
|
||||||
$Trainer.pokedex.set_owned(newSpecies)
|
$Trainer.pokedex.set_owned(newSpecies)
|
||||||
@@ -713,6 +716,7 @@ class PokemonFusionScene
|
|||||||
_INTL("{1}'s data was added to the Pokédex", newspeciesname))
|
_INTL("{1}'s data was added to the Pokédex", newspeciesname))
|
||||||
@scene.pbShowPokedex(@newspecies)
|
@scene.pbShowPokedex(@newspecies)
|
||||||
end
|
end
|
||||||
|
overlay.dispose
|
||||||
#first check if hidden ability
|
#first check if hidden ability
|
||||||
# getAbilityList format: [[:ABILITY, index],...]
|
# getAbilityList format: [[:ABILITY, index],...]
|
||||||
hiddenAbility1 = @pokemon1.ability == @pokemon1.getAbilityList[-1][0]
|
hiddenAbility1 = @pokemon1.ability == @pokemon1.getAbilityList[-1][0]
|
||||||
@@ -763,6 +767,25 @@ class PokemonFusionScene
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def drawSpriteCredits(filename,overlay)
|
||||||
|
x= Graphics.width/2
|
||||||
|
y=240
|
||||||
|
spritename = File.basename(filename,'.*')
|
||||||
|
discord_name = getSpriteCredits(spritename)
|
||||||
|
return if !discord_name
|
||||||
|
|
||||||
|
author_name = File.basename(discord_name,'#*')
|
||||||
|
return if author_name == nil
|
||||||
|
|
||||||
|
label_base_color = Color.new(98, 231, 110)
|
||||||
|
label_shadow_color = Color.new(27, 169, 40)
|
||||||
|
|
||||||
|
#label_shadow_color = Color.new(33, 209, 50)
|
||||||
|
text = _INTL("Sprite by {1}",author_name)
|
||||||
|
textpos = [[text, x, y, 2, label_base_color, label_shadow_color]]
|
||||||
|
pbDrawTextPositions(overlay, textpos)
|
||||||
|
end
|
||||||
|
|
||||||
def clearUIForMoves
|
def clearUIForMoves
|
||||||
addBackgroundOrColoredPlane(@sprites, "background", "DNAbg",
|
addBackgroundOrColoredPlane(@sprites, "background", "DNAbg",
|
||||||
Color.new(248, 248, 248), @viewport)
|
Color.new(248, 248, 248), @viewport)
|
||||||
|
|||||||
@@ -412,6 +412,15 @@ def customSpriteExistsBase(body,head)
|
|||||||
return download_custom_sprite(head, body) != nil
|
return download_custom_sprite(head, body) != nil
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def getSpriteCredits(spriteName)
|
||||||
|
File.foreach(Settings::CREDITS_FILE_PATH) do |line|
|
||||||
|
row = line.split(';')
|
||||||
|
if row[0].include?(spriteName)
|
||||||
|
return row[1]
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return nil
|
||||||
|
end
|
||||||
|
|
||||||
def getArceusPlateType(heldItem)
|
def getArceusPlateType(heldItem)
|
||||||
return :NORMAL if heldItem == nil
|
return :NORMAL if heldItem == nil
|
||||||
|
|||||||
@@ -46,6 +46,8 @@ class PokemonPokedexInfo_Scene
|
|||||||
@sprites["bgSelected_next"].setBitmap(_INTL("Graphics/Pictures/Pokedex/bg_forms_selected_small"))
|
@sprites["bgSelected_next"].setBitmap(_INTL("Graphics/Pictures/Pokedex/bg_forms_selected_small"))
|
||||||
@sprites["bgSelected_next"].visible = false
|
@sprites["bgSelected_next"].visible = false
|
||||||
|
|
||||||
|
@creditsOverlay = BitmapSprite.new(Graphics.width, Graphics.height, @viewport).bitmap
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def initializeSpritesPage(altsList)
|
def initializeSpritesPage(altsList)
|
||||||
@@ -129,10 +131,27 @@ class PokemonPokedexInfo_Scene
|
|||||||
@sprites["previousSprite"].setBitmap(@available[previousIndex]) if previousIndex != nextIndex
|
@sprites["previousSprite"].setBitmap(@available[previousIndex]) if previousIndex != nextIndex
|
||||||
@sprites["selectedSprite"].setBitmap(@available[@selected_index])
|
@sprites["selectedSprite"].setBitmap(@available[@selected_index])
|
||||||
@sprites["nextSprite"].setBitmap(@available[nextIndex])
|
@sprites["nextSprite"].setBitmap(@available[nextIndex])
|
||||||
|
showSpriteCredits(@sprites["selectedSprite"].getBitmap.filename)
|
||||||
update_selected
|
update_selected
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def showSpriteCredits(filename)
|
||||||
|
@creditsOverlay.dispose
|
||||||
|
|
||||||
|
x= Graphics.width/2 -60
|
||||||
|
y=Graphics.height - 60
|
||||||
|
spritename = File.basename(filename,'.*')
|
||||||
|
discord_name = getSpriteCredits(spritename)
|
||||||
|
return if !discord_name
|
||||||
|
|
||||||
|
author_name = File.basename(discord_name,'#*')
|
||||||
|
|
||||||
|
label_base_color = Color.new(248, 248, 248)
|
||||||
|
label_shadow_color = Color.new(104, 104, 104)
|
||||||
|
@creditsOverlay = BitmapSprite.new(Graphics.width, Graphics.height, @viewport).bitmap
|
||||||
|
textpos = [[author_name, x, y, 0, label_base_color, label_shadow_color]]
|
||||||
|
pbDrawTextPositions(@creditsOverlay, textpos)
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
def pbChooseForm
|
def pbChooseForm
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user