mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-08 13:44:59 +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
|
||||
|
||||
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_HEAD]
|
||||
return replaceFusionsHeadWithSpecies(species)
|
||||
|
||||
@@ -782,6 +782,8 @@ end
|
||||
|
||||
def pbEndSurf(_xOffset, _yOffset)
|
||||
return false if !$PokemonGlobal.surfing
|
||||
return false if !$PokemonGlobal.diving
|
||||
|
||||
x = $game_player.x
|
||||
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
|
||||
|
||||
@@ -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_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_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
|
||||
return file
|
||||
end
|
||||
|
||||
# See self.get_next_slot
|
||||
def self.get_prev_slot(file_list, 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
|
||||
# Pass nil to delete everything, or a file path to just delete that one
|
||||
# @raise [Error::ENOENT]
|
||||
def self.delete_file(file_path=nil)
|
||||
def self.delete_file(file_path = nil)
|
||||
if file_path
|
||||
File.delete(file_path) if File.file?(file_path)
|
||||
else
|
||||
@@ -203,16 +204,16 @@ class PokemonLoad_Scene
|
||||
if Input.trigger?(Input::USE)
|
||||
return @sprites["cmdwindow"].index
|
||||
elsif @sprites["cmdwindow"].index == continue_idx
|
||||
@sprites["leftarrow"].visible=true
|
||||
@sprites["rightarrow"].visible=true
|
||||
@sprites["leftarrow"].visible = true
|
||||
@sprites["rightarrow"].visible = true
|
||||
if Input.trigger?(Input::LEFT)
|
||||
return -3
|
||||
elsif Input.trigger?(Input::RIGHT)
|
||||
return -2
|
||||
end
|
||||
else
|
||||
@sprites["leftarrow"].visible=false
|
||||
@sprites["rightarrow"].visible=false
|
||||
@sprites["leftarrow"].visible = false
|
||||
@sprites["rightarrow"].visible = false
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -222,29 +223,29 @@ class PokemonLoad_Scene
|
||||
@sprites = {}
|
||||
@viewport = Viewport.new(0, 0, Graphics.width, Graphics.height)
|
||||
@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"].x=10
|
||||
@sprites["leftarrow"].y=140
|
||||
@sprites["leftarrow"] = AnimatedSprite.new("Graphics/Pictures/leftarrow", 8, 40, 28, 2, @viewport)
|
||||
@sprites["leftarrow"].x = 10
|
||||
@sprites["leftarrow"].y = 140
|
||||
@sprites["leftarrow"].play
|
||||
|
||||
#@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"].y = 140
|
||||
@sprites["rightarrow"].play
|
||||
#@sprites["rightarrow"].visible=true
|
||||
|
||||
y = 16*2
|
||||
y = 16 * 2
|
||||
for i in 0...commands.length
|
||||
@sprites["panel#{i}"] = PokemonLoadPanel.new(i,commands[i],
|
||||
(show_continue) ? (i==0) : false,trainer,frame_count,map_id,@viewport)
|
||||
@sprites["panel#{i}"].x = 24*2
|
||||
@sprites["panel#{i}"] = PokemonLoadPanel.new(i, commands[i],
|
||||
(show_continue) ? (i == 0) : false, trainer, frame_count, map_id, @viewport)
|
||||
@sprites["panel#{i}"].x = 24 * 2
|
||||
@sprites["panel#{i}"].y = y
|
||||
@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
|
||||
@@ -289,7 +290,7 @@ class PokemonLoadScreen
|
||||
end
|
||||
|
||||
# nil deletes all, otherwise just the given file
|
||||
def delete_save_data(file_path=nil)
|
||||
def delete_save_data(file_path = nil)
|
||||
begin
|
||||
SaveData.delete_file(file_path)
|
||||
pbMessage(_INTL("The save data was deleted."))
|
||||
@@ -298,19 +299,42 @@ class PokemonLoadScreen
|
||||
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
|
||||
if($game_temp.unimportedSprites && $game_temp.unimportedSprites.size >0)
|
||||
if ($game_temp.unimportedSprites && $game_temp.unimportedSprites.size > 0)
|
||||
handleReplaceExistingSprites()
|
||||
end
|
||||
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
|
||||
$game_temp.nb_imported_sprites=nil
|
||||
checkEnableSpritesDownload
|
||||
|
||||
$game_temp.nb_imported_sprites = nil
|
||||
|
||||
copyKeybindings()
|
||||
save_file_list = SaveData::AUTO_SLOTS + SaveData::MANUAL_SLOTS
|
||||
first_time = true
|
||||
loop do # Outer loop is used for switching save files
|
||||
loop do
|
||||
# Outer loop is used for switching save files
|
||||
if @selected_file
|
||||
@save_data = load_save_file(SaveData.get_full_path(@selected_file))
|
||||
else
|
||||
@@ -356,7 +380,8 @@ class PokemonLoadScreen
|
||||
@scene.pbUpdate
|
||||
end
|
||||
|
||||
loop do # Inner loop is used for going to other menus and back and stuff (vanilla)
|
||||
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
|
||||
|
||||
@@ -364,7 +389,7 @@ class PokemonLoadScreen
|
||||
when cmd_continue
|
||||
@scene.pbEndScene
|
||||
Game.load(@save_data)
|
||||
$game_switches[SWITCH_V5_1]=true
|
||||
$game_switches[SWITCH_V5_1] = true
|
||||
return
|
||||
when cmd_new_game
|
||||
@scene.pbEndScene
|
||||
@@ -372,8 +397,8 @@ class PokemonLoadScreen
|
||||
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
|
||||
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]) }
|
||||
@@ -422,12 +447,12 @@ end
|
||||
class PokemonSave_Scene
|
||||
def pbUpdateSlotInfo(slottext)
|
||||
pbDisposeSprite(@sprites, "slotinfo")
|
||||
@sprites["slotinfo"]=Window_AdvancedTextPokemon.new(slottext)
|
||||
@sprites["slotinfo"].viewport=@viewport
|
||||
@sprites["slotinfo"].x=0
|
||||
@sprites["slotinfo"].y=160
|
||||
@sprites["slotinfo"].width=228 if @sprites["slotinfo"].width<228
|
||||
@sprites["slotinfo"].visible=true
|
||||
@sprites["slotinfo"] = Window_AdvancedTextPokemon.new(slottext)
|
||||
@sprites["slotinfo"].viewport = @viewport
|
||||
@sprites["slotinfo"].x = 0
|
||||
@sprites["slotinfo"].y = 160
|
||||
@sprites["slotinfo"].width = 228 if @sprites["slotinfo"].width < 228
|
||||
@sprites["slotinfo"].visible = true
|
||||
end
|
||||
end
|
||||
|
||||
@@ -458,7 +483,7 @@ class PokemonSaveScreen
|
||||
_INTL("Save to another slot"),
|
||||
_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
|
||||
pbSEPlay('GUI save choice')
|
||||
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.
|
||||
# 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.z = 99999
|
||||
msgwindow.visible = true
|
||||
@@ -509,9 +534,9 @@ class PokemonSaveScreen
|
||||
cmdwindow.z = 99999
|
||||
cmdwindow.visible = true
|
||||
cmdwindow.resizeToFit(cmdwindow.commands)
|
||||
pbPositionNearMsgWindow(cmdwindow,msgwindow,:right)
|
||||
cmdwindow.index=defaultCmd
|
||||
command=0
|
||||
pbPositionNearMsgWindow(cmdwindow, msgwindow, :right)
|
||||
cmdwindow.index = defaultCmd
|
||||
command = 0
|
||||
loop do
|
||||
@scene.pbUpdateSlotInfo(choice_info[cmdwindow.index])
|
||||
Graphics.update
|
||||
@@ -568,8 +593,8 @@ class PokemonSaveScreen
|
||||
elapsed_str = _INTL("Time<r>{1}m<br>", min)
|
||||
end
|
||||
|
||||
return "<c3=3050C8,D0D0C8>#{datetime_str}</c3>"+ # blue
|
||||
"<ac><c3=209808,90F090>#{map_str}</c3></ac>"+ # green
|
||||
return "<c3=3050C8,D0D0C8>#{datetime_str}</c3>" + # blue
|
||||
"<ac><c3=209808,90F090>#{map_str}</c3></ac>" + # green
|
||||
"#{elapsed_str}"
|
||||
end
|
||||
end
|
||||
@@ -635,7 +660,7 @@ module Game
|
||||
# @param safe [Boolean] whether $PokemonGlobal.safesave should be set to true
|
||||
# @return [Boolean] whether the operation was successful
|
||||
# @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?
|
||||
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