mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-06 06:01:46 +00:00
random wip stuff
This commit is contained in:
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.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -206,6 +206,7 @@ module GameData
|
|||||||
end
|
end
|
||||||
|
|
||||||
def replaceSingleSpeciesModeIfApplicable(species)
|
def replaceSingleSpeciesModeIfApplicable(species)
|
||||||
|
return species if getDexNumberForSpecies(species) >= Settings::ZAPMOLCUNO_NB
|
||||||
if $game_switches[SWITCH_SINGLE_POKEMON_MODE]
|
if $game_switches[SWITCH_SINGLE_POKEMON_MODE]
|
||||||
if $game_switches[SWITCH_SINGLE_POKEMON_MODE_HEAD]
|
if $game_switches[SWITCH_SINGLE_POKEMON_MODE_HEAD]
|
||||||
return replaceFusionsHeadWithSpecies(species)
|
return replaceFusionsHeadWithSpecies(species)
|
||||||
|
|||||||
@@ -782,6 +782,8 @@ end
|
|||||||
|
|
||||||
def pbEndSurf(_xOffset, _yOffset)
|
def pbEndSurf(_xOffset, _yOffset)
|
||||||
return false if !$PokemonGlobal.surfing
|
return false if !$PokemonGlobal.surfing
|
||||||
|
return false if !$PokemonGlobal.diving
|
||||||
|
|
||||||
x = $game_player.x
|
x = $game_player.x
|
||||||
y = $game_player.y
|
y = $game_player.y
|
||||||
if $game_map.terrain_tag(x, y).can_surf && !$game_player.pbFacingTerrainTag.can_surf || !$game_map.terrain_tag(x, y).can_surf
|
if $game_map.terrain_tag(x, y).can_surf && !$game_player.pbFacingTerrainTag.can_surf || !$game_map.terrain_tag(x, y).can_surf
|
||||||
|
|||||||
@@ -28,7 +28,7 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
#GYM_TYPES_ARRAY = [0,5,11,13,12,3,14,10,4,1,0,6,2,16,7,15,1,8,15,1,7,16,18,17,7,16]
|
#GYM_TYPES_ARRAY = [0,5,11,13,12,3,14,10,4,1,0,6,2,16,7,15,1,8,15,1,7,16,18,17,7,16]
|
||||||
GYM_TYPES_CLASSIC = [:NORMAL, :ROCK, :WATER, :ELECTRIC, :GRASS, :POISON, :PSYCHIC, :FIRE, :GROUND, :FIGHTING, :NORMAL, :BUG, :FLYING, :DRAGON, :GHOST, :ICE, :FIGHTING, :STEEL, :ICE, :FIGHTING, :GHOST, :DRAGON, :FAIRY, :DARK, :GHOST, :DRAGON]
|
GYM_TYPES_CLASSIC = [:NORMAL, :ROCK, :WATER, :ELECTRIC, :GRASS, :POISON, :PSYCHIC, :FIRE, :GROUND, :FIGHTING, :NORMAL, :BUG, :FLYING, :DRAGON, :GHOST, :ICE, :FIGHTING, :STEEL, :ICE, :FIGHTING, :GHOST, :DRAGON, :FAIRY, :DARK, :GHOST, :ROCK]
|
||||||
GYM_TYPES_MODERN = [:NORMAL, :STEEL, :ICE, :FIGHTING, :BUG, :DARK, :FAIRY, :PSYCHIC, :NORMAL, :FIGHTING, :FAIRY, :GRASS, :BUG, :DRAGON, :FIRE, :GHOST, :GROUND, :ELECTRIC, :WATER, :ROCK, :POISON, :FLYING, :FAIRY, :DARK, :GHOST, :DRAGON]
|
GYM_TYPES_MODERN = [:NORMAL, :STEEL, :ICE, :FIGHTING, :BUG, :DARK, :FAIRY, :PSYCHIC, :NORMAL, :FIGHTING, :FAIRY, :GRASS, :BUG, :DRAGON, :FIRE, :GHOST, :GROUND, :ELECTRIC, :WATER, :ROCK, :POISON, :FLYING, :FAIRY, :DARK, :GHOST, :DRAGON]
|
||||||
GYM_TYPES_ARRAY = ($game_switches && $game_switches[SWITCH_MODERN_MODE]) ? GYM_TYPES_MODERN : GYM_TYPES_CLASSIC
|
GYM_TYPES_ARRAY = ($game_switches && $game_switches[SWITCH_MODERN_MODE]) ? GYM_TYPES_MODERN : GYM_TYPES_CLASSIC
|
||||||
|
|
||||||
|
|||||||
@@ -100,6 +100,7 @@ module SaveData
|
|||||||
# should never reach here since the original file should always exist
|
# should never reach here since the original file should always exist
|
||||||
return file
|
return file
|
||||||
end
|
end
|
||||||
|
|
||||||
# See self.get_next_slot
|
# See self.get_next_slot
|
||||||
def self.get_prev_slot(file_list, file)
|
def self.get_prev_slot(file_list, file)
|
||||||
return self.get_next_slot(file_list.reverse, file)
|
return self.get_next_slot(file_list.reverse, file)
|
||||||
@@ -141,7 +142,7 @@ module SaveData
|
|||||||
# This is used in a hidden function (ctrl+down+cancel on title screen) or if the save file is corrupt
|
# This is used in a hidden function (ctrl+down+cancel on title screen) or if the save file is corrupt
|
||||||
# Pass nil to delete everything, or a file path to just delete that one
|
# Pass nil to delete everything, or a file path to just delete that one
|
||||||
# @raise [Error::ENOENT]
|
# @raise [Error::ENOENT]
|
||||||
def self.delete_file(file_path=nil)
|
def self.delete_file(file_path = nil)
|
||||||
if file_path
|
if file_path
|
||||||
File.delete(file_path) if File.file?(file_path)
|
File.delete(file_path) if File.file?(file_path)
|
||||||
else
|
else
|
||||||
@@ -203,53 +204,53 @@ class PokemonLoad_Scene
|
|||||||
if Input.trigger?(Input::USE)
|
if Input.trigger?(Input::USE)
|
||||||
return @sprites["cmdwindow"].index
|
return @sprites["cmdwindow"].index
|
||||||
elsif @sprites["cmdwindow"].index == continue_idx
|
elsif @sprites["cmdwindow"].index == continue_idx
|
||||||
@sprites["leftarrow"].visible=true
|
@sprites["leftarrow"].visible = true
|
||||||
@sprites["rightarrow"].visible=true
|
@sprites["rightarrow"].visible = true
|
||||||
if Input.trigger?(Input::LEFT)
|
if Input.trigger?(Input::LEFT)
|
||||||
return -3
|
return -3
|
||||||
elsif Input.trigger?(Input::RIGHT)
|
elsif Input.trigger?(Input::RIGHT)
|
||||||
return -2
|
return -2
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
@sprites["leftarrow"].visible=false
|
@sprites["leftarrow"].visible = false
|
||||||
@sprites["rightarrow"].visible=false
|
@sprites["rightarrow"].visible = false
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def pbStartScene(commands, show_continue, trainer, frame_count, map_id)
|
def pbStartScene(commands, show_continue, trainer, frame_count, map_id)
|
||||||
@commands = commands
|
@commands = commands
|
||||||
@sprites = {}
|
@sprites = {}
|
||||||
@viewport = Viewport.new(0, 0, Graphics.width, Graphics.height)
|
@viewport = Viewport.new(0, 0, Graphics.width, Graphics.height)
|
||||||
@viewport.z = 99998
|
@viewport.z = 99998
|
||||||
addBackgroundOrColoredPlane(@sprites,"background","loadbg",Color.new(248,248,248),@viewport)
|
addBackgroundOrColoredPlane(@sprites, "background", "loadbg", Color.new(248, 248, 248), @viewport)
|
||||||
|
|
||||||
@sprites["leftarrow"] = AnimatedSprite.new("Graphics/Pictures/leftarrow",8,40,28,2,@viewport)
|
@sprites["leftarrow"] = AnimatedSprite.new("Graphics/Pictures/leftarrow", 8, 40, 28, 2, @viewport)
|
||||||
@sprites["leftarrow"].x=10
|
@sprites["leftarrow"].x = 10
|
||||||
@sprites["leftarrow"].y=140
|
@sprites["leftarrow"].y = 140
|
||||||
@sprites["leftarrow"].play
|
@sprites["leftarrow"].play
|
||||||
|
|
||||||
#@sprites["leftarrow"].visible=true
|
#@sprites["leftarrow"].visible=true
|
||||||
|
|
||||||
@sprites["rightarrow"] = AnimatedSprite.new("Graphics/Pictures/rightarrow",8,40,28,2,@viewport)
|
@sprites["rightarrow"] = AnimatedSprite.new("Graphics/Pictures/rightarrow", 8, 40, 28, 2, @viewport)
|
||||||
@sprites["rightarrow"].x = 460
|
@sprites["rightarrow"].x = 460
|
||||||
@sprites["rightarrow"].y = 140
|
@sprites["rightarrow"].y = 140
|
||||||
@sprites["rightarrow"].play
|
@sprites["rightarrow"].play
|
||||||
#@sprites["rightarrow"].visible=true
|
#@sprites["rightarrow"].visible=true
|
||||||
|
|
||||||
y = 16*2
|
y = 16 * 2
|
||||||
for i in 0...commands.length
|
for i in 0...commands.length
|
||||||
@sprites["panel#{i}"] = PokemonLoadPanel.new(i,commands[i],
|
@sprites["panel#{i}"] = PokemonLoadPanel.new(i, commands[i],
|
||||||
(show_continue) ? (i==0) : false,trainer,frame_count,map_id,@viewport)
|
(show_continue) ? (i == 0) : false, trainer, frame_count, map_id, @viewport)
|
||||||
@sprites["panel#{i}"].x = 24*2
|
@sprites["panel#{i}"].x = 24 * 2
|
||||||
@sprites["panel#{i}"].y = y
|
@sprites["panel#{i}"].y = y
|
||||||
@sprites["panel#{i}"].pbRefresh
|
@sprites["panel#{i}"].pbRefresh
|
||||||
y += (show_continue && i==0) ? 112*2 : 24*2
|
y += (show_continue && i == 0) ? 112 * 2 : 24 * 2
|
||||||
end
|
|
||||||
@sprites["cmdwindow"] = Window_CommandPokemon.new([])
|
|
||||||
@sprites["cmdwindow"].viewport = @viewport
|
|
||||||
@sprites["cmdwindow"].visible = false
|
|
||||||
end
|
end
|
||||||
|
@sprites["cmdwindow"] = Window_CommandPokemon.new([])
|
||||||
|
@sprites["cmdwindow"].viewport = @viewport
|
||||||
|
@sprites["cmdwindow"].visible = false
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -289,7 +290,7 @@ class PokemonLoadScreen
|
|||||||
end
|
end
|
||||||
|
|
||||||
# nil deletes all, otherwise just the given file
|
# nil deletes all, otherwise just the given file
|
||||||
def delete_save_data(file_path=nil)
|
def delete_save_data(file_path = nil)
|
||||||
begin
|
begin
|
||||||
SaveData.delete_file(file_path)
|
SaveData.delete_file(file_path)
|
||||||
pbMessage(_INTL("The save data was deleted."))
|
pbMessage(_INTL("The save data was deleted."))
|
||||||
@@ -298,120 +299,144 @@ class PokemonLoadScreen
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def checkEnableSpritesDownload
|
||||||
|
if $PokemonSystem.download_sprites && $PokemonSystem.download_sprites != 0
|
||||||
|
customSprites = getCustomSpeciesList
|
||||||
|
if !customSprites
|
||||||
|
promptEnableSpritesDownload
|
||||||
|
else
|
||||||
|
if customSprites.length < 1000
|
||||||
|
promptEnableSpritesDownload
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def promptEnableSpritesDownload
|
||||||
|
message = "Some sprites appear to be missing from your game. \nWould you like the game to download sprites automatically while playing? (this requires an internet connection)"
|
||||||
|
if pbConfirmMessage(message)
|
||||||
|
$PokemonSystem.download_sprites = 0
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
def pbStartLoadScreen
|
def pbStartLoadScreen
|
||||||
if($game_temp.unimportedSprites && $game_temp.unimportedSprites.size >0)
|
if ($game_temp.unimportedSprites && $game_temp.unimportedSprites.size > 0)
|
||||||
handleReplaceExistingSprites()
|
handleReplaceExistingSprites()
|
||||||
end
|
end
|
||||||
if ($game_temp.nb_imported_sprites && $game_temp.nb_imported_sprites > 0)
|
if ($game_temp.nb_imported_sprites && $game_temp.nb_imported_sprites > 0)
|
||||||
pbMessage(_INTL("{1} new custom sprites were imported into the game",$game_temp.nb_imported_sprites.to_s))
|
pbMessage(_INTL("{1} new custom sprites were imported into the game", $game_temp.nb_imported_sprites.to_s))
|
||||||
end
|
end
|
||||||
$game_temp.nb_imported_sprites=nil
|
checkEnableSpritesDownload
|
||||||
|
|
||||||
|
$game_temp.nb_imported_sprites = nil
|
||||||
|
|
||||||
copyKeybindings()
|
copyKeybindings()
|
||||||
save_file_list = SaveData::AUTO_SLOTS + SaveData::MANUAL_SLOTS
|
save_file_list = SaveData::AUTO_SLOTS + SaveData::MANUAL_SLOTS
|
||||||
first_time = true
|
first_time = true
|
||||||
loop do # Outer loop is used for switching save files
|
loop do
|
||||||
if @selected_file
|
# Outer loop is used for switching save files
|
||||||
@save_data = load_save_file(SaveData.get_full_path(@selected_file))
|
if @selected_file
|
||||||
else
|
@save_data = load_save_file(SaveData.get_full_path(@selected_file))
|
||||||
@save_data = {}
|
else
|
||||||
end
|
@save_data = {}
|
||||||
commands = []
|
|
||||||
cmd_continue = -1
|
|
||||||
cmd_new_game = -1
|
|
||||||
cmd_options = -1
|
|
||||||
cmd_language = -1
|
|
||||||
cmd_mystery_gift = -1
|
|
||||||
cmd_debug = -1
|
|
||||||
cmd_quit = -1
|
|
||||||
show_continue = !@save_data.empty?
|
|
||||||
new_game_plus = show_continue && (@save_data[:player].new_game_plus_unlocked || $DEBUG)
|
|
||||||
|
|
||||||
if show_continue
|
|
||||||
commands[cmd_continue = commands.length] = "#{@selected_file}"
|
|
||||||
if @save_data[:player].mystery_gift_unlocked
|
|
||||||
commands[cmd_mystery_gift = commands.length] = _INTL('Mystery Gift') # Honestly I have no idea how to make Mystery Gift work well with this.
|
|
||||||
end
|
end
|
||||||
end
|
commands = []
|
||||||
|
cmd_continue = -1
|
||||||
|
cmd_new_game = -1
|
||||||
|
cmd_options = -1
|
||||||
|
cmd_language = -1
|
||||||
|
cmd_mystery_gift = -1
|
||||||
|
cmd_debug = -1
|
||||||
|
cmd_quit = -1
|
||||||
|
show_continue = !@save_data.empty?
|
||||||
|
new_game_plus = show_continue && (@save_data[:player].new_game_plus_unlocked || $DEBUG)
|
||||||
|
|
||||||
commands[cmd_new_game = commands.length] = _INTL('New Game')
|
|
||||||
if new_game_plus
|
|
||||||
commands[cmd_new_game_plus = commands.length] = _INTL('New Game +')
|
|
||||||
end
|
|
||||||
commands[cmd_options = commands.length] = _INTL('Options')
|
|
||||||
commands[cmd_language = commands.length] = _INTL('Language') if Settings::LANGUAGES.length >= 2
|
|
||||||
commands[cmd_debug = commands.length] = _INTL('Debug') if $DEBUG
|
|
||||||
commands[cmd_quit = commands.length] = _INTL('Quit Game')
|
|
||||||
cmd_left = -3
|
|
||||||
cmd_right = -2
|
|
||||||
|
|
||||||
map_id = show_continue ? @save_data[:map_factory].map.map_id : 0
|
|
||||||
@scene.pbStartScene(commands, show_continue, @save_data[:player],
|
|
||||||
@save_data[:frame_count] || 0, map_id)
|
|
||||||
@scene.pbSetParty(@save_data[:player]) if show_continue
|
|
||||||
if first_time
|
|
||||||
@scene.pbStartScene2
|
|
||||||
first_time = false
|
|
||||||
else
|
|
||||||
@scene.pbUpdate
|
|
||||||
end
|
|
||||||
|
|
||||||
loop do # Inner loop is used for going to other menus and back and stuff (vanilla)
|
|
||||||
command = @scene.pbChoose(commands, cmd_continue)
|
|
||||||
pbPlayDecisionSE if command != cmd_quit
|
|
||||||
|
|
||||||
case command
|
|
||||||
when cmd_continue
|
|
||||||
@scene.pbEndScene
|
|
||||||
Game.load(@save_data)
|
|
||||||
$game_switches[SWITCH_V5_1]=true
|
|
||||||
return
|
|
||||||
when cmd_new_game
|
|
||||||
@scene.pbEndScene
|
|
||||||
Game.start_new
|
|
||||||
return
|
|
||||||
when cmd_new_game_plus
|
|
||||||
@scene.pbEndScene
|
|
||||||
Game.start_new(@save_data[:bag],@save_data[:storage_system],@save_data[:player])
|
|
||||||
@save_data[:player].new_game_plus_unlocked=true
|
|
||||||
return
|
|
||||||
when cmd_mystery_gift
|
|
||||||
pbFadeOutIn { pbDownloadMysteryGift(@save_data[:player]) }
|
|
||||||
when cmd_options
|
|
||||||
pbFadeOutIn do
|
|
||||||
scene = PokemonOption_Scene.new
|
|
||||||
screen = PokemonOptionScreen.new(scene)
|
|
||||||
screen.pbStartScreen(true)
|
|
||||||
end
|
|
||||||
when cmd_language
|
|
||||||
@scene.pbEndScene
|
|
||||||
$PokemonSystem.language = pbChooseLanguage
|
|
||||||
pbLoadMessages('Data/' + Settings::LANGUAGES[$PokemonSystem.language][1])
|
|
||||||
if show_continue
|
if show_continue
|
||||||
@save_data[:pokemon_system] = $PokemonSystem
|
commands[cmd_continue = commands.length] = "#{@selected_file}"
|
||||||
File.open(SaveData.get_full_path(@selected_file), 'wb') { |file| Marshal.dump(@save_data, file) }
|
if @save_data[:player].mystery_gift_unlocked
|
||||||
|
commands[cmd_mystery_gift = commands.length] = _INTL('Mystery Gift') # Honestly I have no idea how to make Mystery Gift work well with this.
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
commands[cmd_new_game = commands.length] = _INTL('New Game')
|
||||||
|
if new_game_plus
|
||||||
|
commands[cmd_new_game_plus = commands.length] = _INTL('New Game +')
|
||||||
|
end
|
||||||
|
commands[cmd_options = commands.length] = _INTL('Options')
|
||||||
|
commands[cmd_language = commands.length] = _INTL('Language') if Settings::LANGUAGES.length >= 2
|
||||||
|
commands[cmd_debug = commands.length] = _INTL('Debug') if $DEBUG
|
||||||
|
commands[cmd_quit = commands.length] = _INTL('Quit Game')
|
||||||
|
cmd_left = -3
|
||||||
|
cmd_right = -2
|
||||||
|
|
||||||
|
map_id = show_continue ? @save_data[:map_factory].map.map_id : 0
|
||||||
|
@scene.pbStartScene(commands, show_continue, @save_data[:player],
|
||||||
|
@save_data[:frame_count] || 0, map_id)
|
||||||
|
@scene.pbSetParty(@save_data[:player]) if show_continue
|
||||||
|
if first_time
|
||||||
|
@scene.pbStartScene2
|
||||||
|
first_time = false
|
||||||
|
else
|
||||||
|
@scene.pbUpdate
|
||||||
|
end
|
||||||
|
|
||||||
|
loop do
|
||||||
|
# Inner loop is used for going to other menus and back and stuff (vanilla)
|
||||||
|
command = @scene.pbChoose(commands, cmd_continue)
|
||||||
|
pbPlayDecisionSE if command != cmd_quit
|
||||||
|
|
||||||
|
case command
|
||||||
|
when cmd_continue
|
||||||
|
@scene.pbEndScene
|
||||||
|
Game.load(@save_data)
|
||||||
|
$game_switches[SWITCH_V5_1] = true
|
||||||
|
return
|
||||||
|
when cmd_new_game
|
||||||
|
@scene.pbEndScene
|
||||||
|
Game.start_new
|
||||||
|
return
|
||||||
|
when cmd_new_game_plus
|
||||||
|
@scene.pbEndScene
|
||||||
|
Game.start_new(@save_data[:bag], @save_data[:storage_system], @save_data[:player])
|
||||||
|
@save_data[:player].new_game_plus_unlocked = true
|
||||||
|
return
|
||||||
|
when cmd_mystery_gift
|
||||||
|
pbFadeOutIn { pbDownloadMysteryGift(@save_data[:player]) }
|
||||||
|
when cmd_options
|
||||||
|
pbFadeOutIn do
|
||||||
|
scene = PokemonOption_Scene.new
|
||||||
|
screen = PokemonOptionScreen.new(scene)
|
||||||
|
screen.pbStartScreen(true)
|
||||||
|
end
|
||||||
|
when cmd_language
|
||||||
|
@scene.pbEndScene
|
||||||
|
$PokemonSystem.language = pbChooseLanguage
|
||||||
|
pbLoadMessages('Data/' + Settings::LANGUAGES[$PokemonSystem.language][1])
|
||||||
|
if show_continue
|
||||||
|
@save_data[:pokemon_system] = $PokemonSystem
|
||||||
|
File.open(SaveData.get_full_path(@selected_file), 'wb') { |file| Marshal.dump(@save_data, file) }
|
||||||
|
end
|
||||||
|
$scene = pbCallTitle
|
||||||
|
return
|
||||||
|
when cmd_debug
|
||||||
|
pbFadeOutIn { pbDebugMenu(false) }
|
||||||
|
when cmd_quit
|
||||||
|
pbPlayCloseMenuSE
|
||||||
|
@scene.pbEndScene
|
||||||
|
$scene = nil
|
||||||
|
return
|
||||||
|
when cmd_left
|
||||||
|
@scene.pbCloseScene
|
||||||
|
@selected_file = SaveData.get_prev_slot(save_file_list, @selected_file)
|
||||||
|
break # to outer loop
|
||||||
|
when cmd_right
|
||||||
|
@scene.pbCloseScene
|
||||||
|
@selected_file = SaveData.get_next_slot(save_file_list, @selected_file)
|
||||||
|
break # to outer loop
|
||||||
|
else
|
||||||
|
pbPlayBuzzerSE
|
||||||
|
end
|
||||||
end
|
end
|
||||||
$scene = pbCallTitle
|
|
||||||
return
|
|
||||||
when cmd_debug
|
|
||||||
pbFadeOutIn { pbDebugMenu(false) }
|
|
||||||
when cmd_quit
|
|
||||||
pbPlayCloseMenuSE
|
|
||||||
@scene.pbEndScene
|
|
||||||
$scene = nil
|
|
||||||
return
|
|
||||||
when cmd_left
|
|
||||||
@scene.pbCloseScene
|
|
||||||
@selected_file = SaveData.get_prev_slot(save_file_list, @selected_file)
|
|
||||||
break # to outer loop
|
|
||||||
when cmd_right
|
|
||||||
@scene.pbCloseScene
|
|
||||||
@selected_file = SaveData.get_next_slot(save_file_list, @selected_file)
|
|
||||||
break # to outer loop
|
|
||||||
else
|
|
||||||
pbPlayBuzzerSE
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -422,12 +447,12 @@ end
|
|||||||
class PokemonSave_Scene
|
class PokemonSave_Scene
|
||||||
def pbUpdateSlotInfo(slottext)
|
def pbUpdateSlotInfo(slottext)
|
||||||
pbDisposeSprite(@sprites, "slotinfo")
|
pbDisposeSprite(@sprites, "slotinfo")
|
||||||
@sprites["slotinfo"]=Window_AdvancedTextPokemon.new(slottext)
|
@sprites["slotinfo"] = Window_AdvancedTextPokemon.new(slottext)
|
||||||
@sprites["slotinfo"].viewport=@viewport
|
@sprites["slotinfo"].viewport = @viewport
|
||||||
@sprites["slotinfo"].x=0
|
@sprites["slotinfo"].x = 0
|
||||||
@sprites["slotinfo"].y=160
|
@sprites["slotinfo"].y = 160
|
||||||
@sprites["slotinfo"].width=228 if @sprites["slotinfo"].width<228
|
@sprites["slotinfo"].width = 228 if @sprites["slotinfo"].width < 228
|
||||||
@sprites["slotinfo"].visible=true
|
@sprites["slotinfo"].visible = true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -458,7 +483,7 @@ class PokemonSaveScreen
|
|||||||
_INTL("Save to another slot"),
|
_INTL("Save to another slot"),
|
||||||
_INTL("Don't save")
|
_INTL("Don't save")
|
||||||
]
|
]
|
||||||
opt = pbMessage(_INTL('Would you like to save the game?'),choices,3)
|
opt = pbMessage(_INTL('Would you like to save the game?'), choices, 3)
|
||||||
if opt == 0
|
if opt == 0
|
||||||
pbSEPlay('GUI save choice')
|
pbSEPlay('GUI save choice')
|
||||||
ret = doSave($Trainer.save_slot)
|
ret = doSave($Trainer.save_slot)
|
||||||
@@ -495,7 +520,7 @@ class PokemonSaveScreen
|
|||||||
|
|
||||||
# Handles the UI for the save slot select screen. Returns the index of the chosen slot, or -1.
|
# Handles the UI for the save slot select screen. Returns the index of the chosen slot, or -1.
|
||||||
# Based on pbShowCommands
|
# Based on pbShowCommands
|
||||||
def slotSelectCommands(choices, choice_info, defaultCmd=0)
|
def slotSelectCommands(choices, choice_info, defaultCmd = 0)
|
||||||
msgwindow = Window_AdvancedTextPokemon.new(_INTL("Which slot to save in?"))
|
msgwindow = Window_AdvancedTextPokemon.new(_INTL("Which slot to save in?"))
|
||||||
msgwindow.z = 99999
|
msgwindow.z = 99999
|
||||||
msgwindow.visible = true
|
msgwindow.visible = true
|
||||||
@@ -509,9 +534,9 @@ class PokemonSaveScreen
|
|||||||
cmdwindow.z = 99999
|
cmdwindow.z = 99999
|
||||||
cmdwindow.visible = true
|
cmdwindow.visible = true
|
||||||
cmdwindow.resizeToFit(cmdwindow.commands)
|
cmdwindow.resizeToFit(cmdwindow.commands)
|
||||||
pbPositionNearMsgWindow(cmdwindow,msgwindow,:right)
|
pbPositionNearMsgWindow(cmdwindow, msgwindow, :right)
|
||||||
cmdwindow.index=defaultCmd
|
cmdwindow.index = defaultCmd
|
||||||
command=0
|
command = 0
|
||||||
loop do
|
loop do
|
||||||
@scene.pbUpdateSlotInfo(choice_info[cmdwindow.index])
|
@scene.pbUpdateSlotInfo(choice_info[cmdwindow.index])
|
||||||
Graphics.update
|
Graphics.update
|
||||||
@@ -568,8 +593,8 @@ class PokemonSaveScreen
|
|||||||
elapsed_str = _INTL("Time<r>{1}m<br>", min)
|
elapsed_str = _INTL("Time<r>{1}m<br>", min)
|
||||||
end
|
end
|
||||||
|
|
||||||
return "<c3=3050C8,D0D0C8>#{datetime_str}</c3>"+ # blue
|
return "<c3=3050C8,D0D0C8>#{datetime_str}</c3>" + # blue
|
||||||
"<ac><c3=209808,90F090>#{map_str}</c3></ac>"+ # green
|
"<ac><c3=209808,90F090>#{map_str}</c3></ac>" + # green
|
||||||
"#{elapsed_str}"
|
"#{elapsed_str}"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -635,7 +660,7 @@ module Game
|
|||||||
# @param safe [Boolean] whether $PokemonGlobal.safesave should be set to true
|
# @param safe [Boolean] whether $PokemonGlobal.safesave should be set to true
|
||||||
# @return [Boolean] whether the operation was successful
|
# @return [Boolean] whether the operation was successful
|
||||||
# @raise [SaveData::InvalidValueError] if an invalid value is being saved
|
# @raise [SaveData::InvalidValueError] if an invalid value is being saved
|
||||||
def self.save(slot=nil, auto=false, safe: false)
|
def self.save(slot = nil, auto = false, safe: false)
|
||||||
slot = $Trainer.save_slot if slot.nil?
|
slot = $Trainer.save_slot if slot.nil?
|
||||||
return false if slot.nil?
|
return false if slot.nil?
|
||||||
|
|
||||||
|
|||||||
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