mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-06 06:01:46 +00:00
Adds option for toggling custom eggs
This commit is contained in:
@@ -63,6 +63,7 @@ module GameData
|
||||
# return (ret) ? ret : pbResolveBitmap("Graphics/Pokemon/Eggs/000")
|
||||
# end
|
||||
def self.egg_sprite_filename(species, form)
|
||||
return "Graphics/Battlers/Eggs/000" if $PokemonSystem.use_custom_eggs
|
||||
dexNum = getDexNumberForSpecies(species)
|
||||
bitmapFileName = sprintf("Graphics/Battlers/Eggs/%03d", dexNum) rescue nil
|
||||
if !pbResolveBitmap(bitmapFileName)
|
||||
@@ -261,7 +262,6 @@ module GameData
|
||||
end
|
||||
end
|
||||
def self.play_fusion_cry(head_id,body_id, volume = 90, pitch = 100)
|
||||
echoln "fusion"
|
||||
head_cry_filename = self.check_cry_file(head_id,nil)
|
||||
body_cry_filename = self.check_cry_file(body_id,nil)
|
||||
|
||||
|
||||
@@ -23,6 +23,7 @@ class PokemonSystem
|
||||
attr_accessor :on_mobile
|
||||
attr_accessor :type_icons
|
||||
attr_accessor :use_generated_dex_entries
|
||||
attr_accessor :use_custom_eggs
|
||||
|
||||
def initialize
|
||||
@textspeed = 1 # Text speed (0=slow, 1=normal, 2=fast)
|
||||
@@ -45,6 +46,7 @@ class PokemonSystem
|
||||
@on_mobile = false
|
||||
@type_icons = true
|
||||
@use_generated_dex_entries = true
|
||||
@use_custom_eggs = true
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -124,6 +124,16 @@ class PokemonGameOption_Scene < PokemonOption_Scene
|
||||
]
|
||||
)
|
||||
|
||||
custom_eggs_option_selected = $PokemonSystem.use_custom_eggs ? 1 : 0
|
||||
options << EnumOption.new(_INTL("Custom Eggs"), [_INTL("On"), _INTL("Off")],
|
||||
proc { custom_eggs_option_selected },
|
||||
proc { |value|
|
||||
$PokemonSystem.use_custom_eggs = value == 1
|
||||
},
|
||||
["Eggs have different sprites for each Pokémon.",
|
||||
"Eggs all use the same sprite."]
|
||||
)
|
||||
|
||||
if $game_switches && ($game_switches[SWITCH_NEW_GAME_PLUS] || $game_switches[SWITCH_BEAT_THE_LEAGUE]) # beat the league
|
||||
options <<
|
||||
EnumOption.new(_INTL("Battle type"), [_INTL("1v1"), _INTL("2v2"), _INTL("3v3")],
|
||||
@@ -190,8 +200,6 @@ class PokemonGameOption_Scene < PokemonOption_Scene
|
||||
"Display the enemy Pokémon type in battles."
|
||||
)
|
||||
|
||||
|
||||
|
||||
end
|
||||
options << EnumOption.new(_INTL("Screen Size"), [_INTL("S"), _INTL("M"), _INTL("L"), _INTL("XL"), _INTL("Full")],
|
||||
proc { [$PokemonSystem.screensize, 4].min },
|
||||
|
||||
@@ -46,6 +46,7 @@ def pbLoadPokemonBitmap(pokemon, species, back = false)
|
||||
end
|
||||
|
||||
def getEggBitmapPath(pokemon)
|
||||
return "Graphics/Battlers/Eggs/000" if $PokemonSystem.use_custom_eggs
|
||||
bitmapFileName = sprintf("Graphics/Battlers/Eggs/%s", getConstantName(PBSpecies, pokemon.species)) rescue nil
|
||||
if !pbResolveBitmap(bitmapFileName)
|
||||
if pokemon.species >= NUM_ZAPMOLCUNO
|
||||
|
||||
Reference in New Issue
Block a user