mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2026-02-01 19:11:02 +00:00
Finalised input names, added some more save file conversion code
This commit is contained in:
@@ -1,3 +1,10 @@
|
|||||||
|
#===============================================================================
|
||||||
|
# class Object
|
||||||
|
#===============================================================================
|
||||||
|
class Object
|
||||||
|
alias full_inspect inspect
|
||||||
|
end
|
||||||
|
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
# class Class
|
# class Class
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
|
|||||||
@@ -47,7 +47,6 @@ def pbPrintException(e)
|
|||||||
errorlogline.sub!(pbGetUserName, "USERNAME")
|
errorlogline.sub!(pbGetUserName, "USERNAME")
|
||||||
errorlogline = "\r\n" + errorlogline if errorlogline.length > 20
|
errorlogline = "\r\n" + errorlogline if errorlogline.length > 20
|
||||||
errorlogline.gsub!("/", "\\") if System.platform[/Windows/]
|
errorlogline.gsub!("/", "\\") if System.platform[/Windows/]
|
||||||
|
|
||||||
print("#{message}\r\nThis exception was logged in #{errorlogline}.\r\nHold Ctrl after closing this message to copy it to the clipboard.")
|
print("#{message}\r\nThis exception was logged in #{errorlogline}.\r\nHold Ctrl after closing this message to copy it to the clipboard.")
|
||||||
# Give a ~500ms coyote time to start holding Control
|
# Give a ~500ms coyote time to start holding Control
|
||||||
t = System.delta
|
t = System.delta
|
||||||
|
|||||||
@@ -1,7 +1,12 @@
|
|||||||
module Input
|
module Input
|
||||||
USE = C
|
USE = C
|
||||||
BACK = B
|
BACK = B
|
||||||
SPECIAL = A
|
ACTION = A
|
||||||
|
AUX1 = X
|
||||||
|
AUX2 = Y
|
||||||
|
SPECIAL = Z
|
||||||
|
JUMPUP = L
|
||||||
|
JUMPDOWN = R
|
||||||
|
|
||||||
unless defined?(update_KGC_ScreenCapture)
|
unless defined?(update_KGC_ScreenCapture)
|
||||||
class << Input
|
class << Input
|
||||||
|
|||||||
@@ -18,18 +18,18 @@ SaveData.register_conversion(:v19_convert_PokemonSystem) do
|
|||||||
display_title 'Updating PokemonSystem class'
|
display_title 'Updating PokemonSystem class'
|
||||||
to_all do |save_data|
|
to_all do |save_data|
|
||||||
new_system = PokemonSystem.new
|
new_system = PokemonSystem.new
|
||||||
new_system.textspeed = save_data[:pokemon_system].textspeed || new_system.textspeed
|
new_system.textspeed = save_data[:pokemon_system].textspeed || new_system.textspeed
|
||||||
new_system.battlescene = save_data[:pokemon_system].battlescene || new_system.battlescene
|
new_system.battlescene = save_data[:pokemon_system].battlescene || new_system.battlescene
|
||||||
new_system.battlestyle = save_data[:pokemon_system].battlestyle || new_system.battlestyle
|
new_system.battlestyle = save_data[:pokemon_system].battlestyle || new_system.battlestyle
|
||||||
new_system.frame = save_data[:pokemon_system].frame || new_system.frame
|
new_system.frame = save_data[:pokemon_system].frame || new_system.frame
|
||||||
new_system.textskin = save_data[:pokemon_system].textskin || new_system.textskin
|
new_system.textskin = save_data[:pokemon_system].textskin || new_system.textskin
|
||||||
new_system.font = save_data[:pokemon_system].font || new_system.font
|
new_system.font = save_data[:pokemon_system].font || new_system.font
|
||||||
new_system.screensize = save_data[:pokemon_system].screensize || new_system.screensize
|
new_system.screensize = save_data[:pokemon_system].screensize || new_system.screensize
|
||||||
new_system.language = save_data[:pokemon_system].language || new_system.language
|
new_system.language = save_data[:pokemon_system].language || new_system.language
|
||||||
new_system.runstyle = save_data[:pokemon_system].runstyle || new_system.runstyle
|
new_system.runstyle = save_data[:pokemon_system].runstyle || new_system.runstyle
|
||||||
new_system.bgmvolume = save_data[:pokemon_system].bgmvolume || new_system.bgmvolume
|
new_system.bgmvolume = save_data[:pokemon_system].bgmvolume || new_system.bgmvolume
|
||||||
new_system.sevolume = save_data[:pokemon_system].sevolume || new_system.sevolume
|
new_system.sevolume = save_data[:pokemon_system].sevolume || new_system.sevolume
|
||||||
new_system.textinput = save_data[:pokemon_system].textinput || new_system.textinput
|
new_system.textinput = save_data[:pokemon_system].textinput || new_system.textinput
|
||||||
save_data[:pokemon_system] = new_system
|
save_data[:pokemon_system] = new_system
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -66,6 +66,9 @@ SaveData.register_conversion(:v19_convert_global_metadata) do
|
|||||||
global.mailbox[i] = PokemonMail.convert(mail) if mail
|
global.mailbox[i] = PokemonMail.convert(mail) if mail
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
global.phoneNumbers.each do |contact|
|
||||||
|
contact[1] = GameData::TrainerType.get(contact[1]) if contact && contact.length == 8
|
||||||
|
end
|
||||||
if global.partner
|
if global.partner
|
||||||
global.partner[0] = GameData::TrainerType.get(global.partner[0]).id
|
global.partner[0] = GameData::TrainerType.get(global.partner[0]).id
|
||||||
global.partner[3].each_with_index do |pkmn, i|
|
global.partner[3].each_with_index do |pkmn, i|
|
||||||
@@ -78,15 +81,21 @@ SaveData.register_conversion(:v19_convert_global_metadata) do
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
if global.roamPokemon
|
if global.roamPokemon
|
||||||
global.roamPokemon.each_with_index do |p, i|
|
global.roamPokemon.each_with_index do |pkmn, i|
|
||||||
global.roamPokemon[i] = PokeBattle_Pokemon.convert(p) if p
|
global.roamPokemon[i] = PokeBattle_Pokemon.convert(pkmn) if pkmn && pkmn != true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
global.purifyChamber.sets.each do |set|
|
||||||
|
set.shadow = PokeBattle_Pokemon.convert(set.shadow) if set.shadow
|
||||||
|
set.list.each_with_index do |pkmn, i|
|
||||||
|
set.list[i] = PokeBattle_Pokemon.convert(pkmn) if pkmn
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if global.hallOfFame
|
if global.hallOfFame
|
||||||
global.hallOfFame.each do |team|
|
global.hallOfFame.each do |team|
|
||||||
next if !team
|
next if !team
|
||||||
team.each_with_index do |p, i|
|
team.each_with_index do |pkmn, i|
|
||||||
team[i] = PokeBattle_Pokemon.convert(p) if p
|
team[i] = PokeBattle_Pokemon.convert(pkmn) if pkmn
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -115,7 +124,7 @@ SaveData.register_conversion(:v19_convert_bag) do
|
|||||||
end
|
end
|
||||||
pocket.compact!
|
pocket.compact!
|
||||||
end
|
end
|
||||||
self.registeredIndex
|
self.registeredIndex # Just to ensure this data exists
|
||||||
self.registeredItems.each_with_index do |item, i|
|
self.registeredItems.each_with_index do |item, i|
|
||||||
next if !item
|
next if !item
|
||||||
if item == 0
|
if item == 0
|
||||||
@@ -130,8 +139,8 @@ SaveData.register_conversion(:v19_convert_bag) do
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
self.registeredItems.compact!
|
self.registeredItems.compact!
|
||||||
end # bag.instance_eval
|
end # bag.instance_eval
|
||||||
end # to_value
|
end # to_value
|
||||||
end
|
end
|
||||||
|
|
||||||
SaveData.register_conversion(:v19_convert_storage) do
|
SaveData.register_conversion(:v19_convert_storage) do
|
||||||
@@ -141,20 +150,31 @@ SaveData.register_conversion(:v19_convert_storage) do
|
|||||||
storage.instance_eval do
|
storage.instance_eval do
|
||||||
for box in 0...self.maxBoxes
|
for box in 0...self.maxBoxes
|
||||||
for i in 0...self.maxPokemon(box)
|
for i in 0...self.maxPokemon(box)
|
||||||
next unless self[box, i]
|
self[box, i] = PokeBattle_Pokemon.convert(self[box, i]) if self[box, i]
|
||||||
self[box, i] = PokeBattle_Pokemon.convert(self[box, i])
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end # storage.instance_eval
|
self.unlockedWallpapers # Just to ensure this data exists
|
||||||
end # to_value
|
end # storage.instance_eval
|
||||||
|
end # to_value
|
||||||
end
|
end
|
||||||
|
|
||||||
# TODO: See if there are more conversions needed for this. There may not be.
|
|
||||||
SaveData.register_conversion(:v19_convert_game_player) do
|
SaveData.register_conversion(:v19_convert_game_player) do
|
||||||
essentials_version 19
|
essentials_version 19
|
||||||
display_title 'Converting game player character'
|
display_title 'Converting game player character'
|
||||||
to_value :game_player do |game_player|
|
to_value :game_player do |game_player|
|
||||||
game_player.width = 1
|
game_player.width = 1
|
||||||
game_player.height = 1
|
game_player.height = 1
|
||||||
|
game_player.sprite_size = [Game_Map::TILE_WIDTH, Game_Map::TILE_HEIGHT]
|
||||||
|
game_player.pattern_surf ||= 0
|
||||||
|
game_player.lock_pattern ||= false
|
||||||
|
game_player.move_speed = game_player.move_speed
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
SaveData.register_conversion(:v19_convert_game_screen) do
|
||||||
|
essentials_version 19
|
||||||
|
display_title 'Converting game screen'
|
||||||
|
to_value :game_screen do |game_screen|
|
||||||
|
game_screen.weather(game_screen.weather_type, game_screen.weather_max)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -183,7 +183,7 @@ class Scene_Map
|
|||||||
$game_temp.menu_calling = true
|
$game_temp.menu_calling = true
|
||||||
$game_temp.menu_beep = true
|
$game_temp.menu_beep = true
|
||||||
end
|
end
|
||||||
elsif Input.trigger?(Input::Z)
|
elsif Input.trigger?(Input::SPECIAL)
|
||||||
unless $game_player.moving?
|
unless $game_player.moving?
|
||||||
$PokemonTemp.keyItemCalling = true
|
$PokemonTemp.keyItemCalling = true
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -276,7 +276,7 @@ class Game_System
|
|||||||
|
|
||||||
def update
|
def update
|
||||||
@timer -= 1 if @timer_working and @timer>0
|
@timer -= 1 if @timer_working and @timer>0
|
||||||
if Input.trigger?(Input::Z) && pbCurrentEventCommentInput(1,"Cut Scene")
|
if Input.trigger?(Input::SPECIAL) && pbCurrentEventCommentInput(1,"Cut Scene")
|
||||||
event = @map_interpreter.get_character(0)
|
event = @map_interpreter.get_character(0)
|
||||||
@map_interpreter.pbSetSelfSwitch(event.id,"A",true)
|
@map_interpreter.pbSetSelfSwitch(event.id,"A",true)
|
||||||
@map_interpreter.command_end
|
@map_interpreter.command_end
|
||||||
|
|||||||
@@ -62,7 +62,6 @@ class Game_Map
|
|||||||
for i in @map.events.keys
|
for i in @map.events.keys
|
||||||
@events[i] = Game_Event.new(@map_id, @map.events[i],self)
|
@events[i] = Game_Event.new(@map_id, @map.events[i],self)
|
||||||
end
|
end
|
||||||
# TODO: These should be moved to Spriteset_Global as we only need one copy of them.
|
|
||||||
@common_events = {}
|
@common_events = {}
|
||||||
for i in 1...$data_common_events.size
|
for i in 1...$data_common_events.size
|
||||||
@common_events[i] = Game_CommonEvent.new(i)
|
@common_events[i] = Game_CommonEvent.new(i)
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ class PokemonMapFactory
|
|||||||
raise "No maps in save file... (mapIndex=#{@mapIndex})" if @maps.length==0
|
raise "No maps in save file... (mapIndex=#{@mapIndex})" if @maps.length==0
|
||||||
for i in 0...@maps.length
|
for i in 0...@maps.length
|
||||||
if @maps[i]
|
if @maps[i]
|
||||||
echo("Using next map, may be incorrect (mapIndex=#{@mapIndex}, length=#{@maps.length})")
|
echoln("Using next map, may be incorrect (mapIndex=#{@mapIndex}, length=#{@maps.length})")
|
||||||
return @maps[i]
|
return @maps[i]
|
||||||
end
|
end
|
||||||
raise "No maps in save file... (all maps empty; mapIndex=#{@mapIndex})"
|
raise "No maps in save file... (all maps empty; mapIndex=#{@mapIndex})"
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ class Game_Character
|
|||||||
attr_reader :blend_type
|
attr_reader :blend_type
|
||||||
attr_reader :direction
|
attr_reader :direction
|
||||||
attr_accessor :pattern
|
attr_accessor :pattern
|
||||||
attr_reader :pattern_surf
|
attr_accessor :pattern_surf
|
||||||
attr_accessor :lock_pattern
|
attr_accessor :lock_pattern
|
||||||
attr_reader :move_route_forcing
|
attr_reader :move_route_forcing
|
||||||
attr_accessor :through
|
attr_accessor :through
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ class Game_Player < Game_Character
|
|||||||
return false if $game_temp.in_menu || $game_temp.in_battle ||
|
return false if $game_temp.in_menu || $game_temp.in_battle ||
|
||||||
@move_route_forcing || $game_temp.message_window_showing ||
|
@move_route_forcing || $game_temp.message_window_showing ||
|
||||||
pbMapInterpreterRunning?
|
pbMapInterpreterRunning?
|
||||||
input = ($PokemonSystem.runstyle == 1) ^ Input.press?(Input::SPECIAL)
|
input = ($PokemonSystem.runstyle == 1) ^ Input.press?(Input::ACTION)
|
||||||
return input && $PokemonGlobal.runningShoes && !jumping? &&
|
return input && $PokemonGlobal.runningShoes && !jumping? &&
|
||||||
!$PokemonGlobal.diving && !$PokemonGlobal.surfing &&
|
!$PokemonGlobal.diving && !$PokemonGlobal.surfing &&
|
||||||
!$PokemonGlobal.bicycle && !$game_player.pbTerrainTag.must_walk
|
!$PokemonGlobal.bicycle && !$game_player.pbTerrainTag.must_walk
|
||||||
|
|||||||
@@ -882,7 +882,7 @@ class SpriteWindow_Selectable < SpriteWindow_Base
|
|||||||
update_cursor_rect
|
update_cursor_rect
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
elsif Input.repeat?(Input::L)
|
elsif Input.repeat?(Input::JUMPUP)
|
||||||
if @index > 0
|
if @index > 0
|
||||||
oldindex = @index
|
oldindex = @index
|
||||||
@index = [self.index-self.page_item_max, 0].max
|
@index = [self.index-self.page_item_max, 0].max
|
||||||
@@ -892,7 +892,7 @@ class SpriteWindow_Selectable < SpriteWindow_Base
|
|||||||
update_cursor_rect
|
update_cursor_rect
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
elsif Input.repeat?(Input::R)
|
elsif Input.repeat?(Input::JUMPDOWN)
|
||||||
if @index < @item_max-1
|
if @index < @item_max-1
|
||||||
oldindex = @index
|
oldindex = @index
|
||||||
@index = [self.index+self.page_item_max, @item_max-1].min
|
@index = [self.index+self.page_item_max, @item_max-1].min
|
||||||
|
|||||||
@@ -226,13 +226,13 @@ class Window_TextEntry < SpriteWindow_Base
|
|||||||
self.refresh if (@frame%10)==0
|
self.refresh if (@frame%10)==0
|
||||||
return if !self.active
|
return if !self.active
|
||||||
# Moving cursor
|
# Moving cursor
|
||||||
if Input.repeat?(Input::LEFT) && Input.press?(Input::SPECIAL)
|
if Input.repeat?(Input::LEFT) && Input.press?(Input::ACTION)
|
||||||
if @helper.cursor > 0
|
if @helper.cursor > 0
|
||||||
@helper.cursor -= 1
|
@helper.cursor -= 1
|
||||||
@frame = 0
|
@frame = 0
|
||||||
self.refresh
|
self.refresh
|
||||||
end
|
end
|
||||||
elsif Input.repeat?(Input::RIGHT) && Input.press?(Input::SPECIAL)
|
elsif Input.repeat?(Input::RIGHT) && Input.press?(Input::ACTION)
|
||||||
if @helper.cursor < self.text.scan(/./m).length
|
if @helper.cursor < self.text.scan(/./m).length
|
||||||
@helper.cursor += 1
|
@helper.cursor += 1
|
||||||
@frame = 0
|
@frame = 0
|
||||||
@@ -1311,9 +1311,9 @@ class PokemonEntryScene2
|
|||||||
Input.update
|
Input.update
|
||||||
pbUpdate
|
pbUpdate
|
||||||
next if pbMoveCursor
|
next if pbMoveCursor
|
||||||
if Input.trigger?(Input::Z)
|
if Input.trigger?(Input::SPECIAL)
|
||||||
pbChangeTab
|
pbChangeTab
|
||||||
elsif Input.trigger?(Input::SPECIAL)
|
elsif Input.trigger?(Input::ACTION)
|
||||||
@cursorpos = OK
|
@cursorpos = OK
|
||||||
@sprites["cursor"].setCursorPos(@cursorpos)
|
@sprites["cursor"].setCursorPos(@cursorpos)
|
||||||
elsif Input.trigger?(Input::BACK)
|
elsif Input.trigger?(Input::BACK)
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ module Graphics
|
|||||||
if Graphics.frame_count % 40 == 0
|
if Graphics.frame_count % 40 == 0
|
||||||
count = 0
|
count = 0
|
||||||
ObjectSpace.each_object(Object) { |o| count += 1 }
|
ObjectSpace.each_object(Object) { |o| count += 1 }
|
||||||
echo("Objects: #{count}\r\n")
|
echoln("Objects: #{count}")
|
||||||
end
|
end
|
||||||
=end
|
=end
|
||||||
@@transition.update if @@transition && !@@transition.disposed?
|
@@transition.update if @@transition && !@@transition.disposed?
|
||||||
|
|||||||
@@ -272,7 +272,7 @@ class FightMenuDisplay < BattleMenuBase
|
|||||||
# Create Mega Evolution button
|
# Create Mega Evolution button
|
||||||
@megaButton = SpriteWrapper.new(viewport)
|
@megaButton = SpriteWrapper.new(viewport)
|
||||||
@megaButton.bitmap = @megaEvoBitmap.bitmap
|
@megaButton.bitmap = @megaEvoBitmap.bitmap
|
||||||
@megaButton.x = self.x+146
|
@megaButton.x = self.x+120
|
||||||
@megaButton.y = self.y-@megaEvoBitmap.height/2
|
@megaButton.y = self.y-@megaEvoBitmap.height/2
|
||||||
@megaButton.src_rect.height = @megaEvoBitmap.height/2
|
@megaButton.src_rect.height = @megaEvoBitmap.height/2
|
||||||
addSprite("megaButton",@megaButton)
|
addSprite("megaButton",@megaButton)
|
||||||
@@ -415,6 +415,7 @@ class FightMenuDisplay < BattleMenuBase
|
|||||||
def refreshMegaEvolutionButton
|
def refreshMegaEvolutionButton
|
||||||
return if !USE_GRAPHICS
|
return if !USE_GRAPHICS
|
||||||
@megaButton.src_rect.y = (@mode - 1) * @megaEvoBitmap.height / 2
|
@megaButton.src_rect.y = (@mode - 1) * @megaEvoBitmap.height / 2
|
||||||
|
@megaButton.x = self.x + ((@shiftMode > 0) ? 204 : 120)
|
||||||
@megaButton.z = self.z - 1
|
@megaButton.z = self.z - 1
|
||||||
@visibility["megaButton"] = (@mode > 0)
|
@visibility["megaButton"] = (@mode > 0)
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -119,13 +119,13 @@ class PokeBattle_Scene
|
|||||||
pbPlayCancelSE
|
pbPlayCancelSE
|
||||||
break if yield -1
|
break if yield -1
|
||||||
needRefresh = true
|
needRefresh = true
|
||||||
elsif Input.trigger?(Input::SPECIAL) # Toggle Mega Evolution
|
elsif Input.trigger?(Input::ACTION) # Toggle Mega Evolution
|
||||||
if megaEvoPossible
|
if megaEvoPossible
|
||||||
pbPlayDecisionSE
|
pbPlayDecisionSE
|
||||||
break if yield -2
|
break if yield -2
|
||||||
needRefresh = true
|
needRefresh = true
|
||||||
end
|
end
|
||||||
elsif Input.trigger?(Input::Z) # Shift
|
elsif Input.trigger?(Input::SPECIAL) # Shift
|
||||||
if cw.shiftMode>0
|
if cw.shiftMode>0
|
||||||
pbPlayDecisionSE
|
pbPlayDecisionSE
|
||||||
break if yield -3
|
break if yield -3
|
||||||
|
|||||||
@@ -169,7 +169,8 @@ def pbGetEnvironment
|
|||||||
ret = :None
|
ret = :None
|
||||||
map_metadata = GameData::MapMetadata.try_get($game_map.map_id)
|
map_metadata = GameData::MapMetadata.try_get($game_map.map_id)
|
||||||
ret = map_metadata.battle_environment if map_metadata && map_metadata.battle_environment
|
ret = map_metadata.battle_environment if map_metadata && map_metadata.battle_environment
|
||||||
if GameData::EncounterType.get($PokemonTemp.encounterType).type == :fishing
|
if $PokemonTemp.encounterType &&
|
||||||
|
GameData::EncounterType.get($PokemonTemp.encounterType).type == :fishing
|
||||||
terrainTag = $game_player.pbFacingTerrainTag
|
terrainTag = $game_player.pbFacingTerrainTag
|
||||||
else
|
else
|
||||||
terrainTag = $game_player.terrain_tag
|
terrainTag = $game_player.terrain_tag
|
||||||
|
|||||||
@@ -24,8 +24,8 @@ class ButtonEventScene < EventScene
|
|||||||
addLabelForScreen(2, 134, 84, 352, _INTL("Used to confirm a choice, interact with people and things, and move through text. (Default: C)"))
|
addLabelForScreen(2, 134, 84, 352, _INTL("Used to confirm a choice, interact with people and things, and move through text. (Default: C)"))
|
||||||
addLabelForScreen(2, 134, 212, 352, _INTL("Used to exit, cancel a choice, and cancel a mode. Also used to open the Pause Menu. (Default: X)"))
|
addLabelForScreen(2, 134, 212, 352, _INTL("Used to exit, cancel a choice, and cancel a mode. Also used to open the Pause Menu. (Default: X)"))
|
||||||
|
|
||||||
addImageForScreen(3, 16, 90, "Graphics/Pictures/help_specialkey")
|
addImageForScreen(3, 16, 90, "Graphics/Pictures/help_actionkey")
|
||||||
addImageForScreen(3, 16, 252, "Graphics/Pictures/help_zkey")
|
addImageForScreen(3, 16, 252, "Graphics/Pictures/help_specialkey")
|
||||||
addLabelForScreen(3, 134, 52, 352, _INTL("Has various functions depending on context. While moving around, hold to move at a different speed. (Default: Z)"))
|
addLabelForScreen(3, 134, 52, 352, _INTL("Has various functions depending on context. While moving around, hold to move at a different speed. (Default: Z)"))
|
||||||
addLabelForScreen(3, 134, 212, 352, _INTL("Press to open the Ready Menu, where registered items and available field moves can be used. (Default: D)"))
|
addLabelForScreen(3, 134, 212, 352, _INTL("Press to open the Ready Menu, where registered items and available field moves can be used. (Default: D)"))
|
||||||
|
|
||||||
|
|||||||
@@ -953,7 +953,7 @@ class PokemonPokedex_Scene
|
|||||||
pbPlayCursorSE if index!=oldindex
|
pbPlayCursorSE if index!=oldindex
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if Input.trigger?(Input::SPECIAL)
|
if Input.trigger?(Input::ACTION)
|
||||||
index = -2
|
index = -2
|
||||||
pbPlayCursorSE if index!=oldindex
|
pbPlayCursorSE if index!=oldindex
|
||||||
elsif Input.trigger?(Input::BACK)
|
elsif Input.trigger?(Input::BACK)
|
||||||
@@ -1068,7 +1068,7 @@ class PokemonPokedex_Scene
|
|||||||
elsif index==7 || index==8; index += 1
|
elsif index==7 || index==8; index += 1
|
||||||
end
|
end
|
||||||
pbPlayCursorSE if index!=oldindex
|
pbPlayCursorSE if index!=oldindex
|
||||||
elsif Input.trigger?(Input::SPECIAL)
|
elsif Input.trigger?(Input::ACTION)
|
||||||
index = 8
|
index = 8
|
||||||
pbPlayCursorSE if index!=oldindex
|
pbPlayCursorSE if index!=oldindex
|
||||||
elsif Input.trigger?(Input::BACK)
|
elsif Input.trigger?(Input::BACK)
|
||||||
@@ -1161,7 +1161,7 @@ class PokemonPokedex_Scene
|
|||||||
$PokemonGlobal.pokedexIndex[pbGetSavePositionIndex] = @sprites["pokedex"].index if !@searchResults
|
$PokemonGlobal.pokedexIndex[pbGetSavePositionIndex] = @sprites["pokedex"].index if !@searchResults
|
||||||
pbRefresh
|
pbRefresh
|
||||||
end
|
end
|
||||||
if Input.trigger?(Input::SPECIAL)
|
if Input.trigger?(Input::ACTION)
|
||||||
pbPlayDecisionSE
|
pbPlayDecisionSE
|
||||||
@sprites["pokedex"].active = false
|
@sprites["pokedex"].active = false
|
||||||
pbDexSearch
|
pbDexSearch
|
||||||
|
|||||||
@@ -453,7 +453,7 @@ class PokemonPokedexInfo_Scene
|
|||||||
Input.update
|
Input.update
|
||||||
pbUpdate
|
pbUpdate
|
||||||
dorefresh = false
|
dorefresh = false
|
||||||
if Input.trigger?(Input::SPECIAL)
|
if Input.trigger?(Input::ACTION)
|
||||||
pbSEStop
|
pbSEStop
|
||||||
GameData::Species.play_cry_from_species(@species, @form) if @page == 1
|
GameData::Species.play_cry_from_species(@species, @form) if @page == 1
|
||||||
elsif Input.trigger?(Input::BACK)
|
elsif Input.trigger?(Input::BACK)
|
||||||
@@ -521,7 +521,7 @@ class PokemonPokedexInfo_Scene
|
|||||||
Graphics.update
|
Graphics.update
|
||||||
Input.update
|
Input.update
|
||||||
pbUpdate
|
pbUpdate
|
||||||
if Input.trigger?(Input::SPECIAL)
|
if Input.trigger?(Input::ACTION)
|
||||||
pbSEStop
|
pbSEStop
|
||||||
GameData::Species.play_cry_from_species(@species, @form)
|
GameData::Species.play_cry_from_species(@species, @form)
|
||||||
elsif Input.trigger?(Input::BACK)
|
elsif Input.trigger?(Input::BACK)
|
||||||
|
|||||||
@@ -706,10 +706,10 @@ class PokemonParty_Scene
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
cancelsprite = Settings::MAX_PARTY_SIZE + ((@multiselect) ? 1 : 0)
|
cancelsprite = Settings::MAX_PARTY_SIZE + ((@multiselect) ? 1 : 0)
|
||||||
if Input.trigger?(Input::SPECIAL) && canswitch==1 && @activecmd!=cancelsprite
|
if Input.trigger?(Input::ACTION) && canswitch==1 && @activecmd!=cancelsprite
|
||||||
pbPlayDecisionSE
|
pbPlayDecisionSE
|
||||||
return [1,@activecmd]
|
return [1,@activecmd]
|
||||||
elsif Input.trigger?(Input::SPECIAL) && canswitch==2
|
elsif Input.trigger?(Input::ACTION) && canswitch==2
|
||||||
return -1
|
return -1
|
||||||
elsif Input.trigger?(Input::BACK)
|
elsif Input.trigger?(Input::BACK)
|
||||||
pbPlayCloseMenuSE if !switching
|
pbPlayCloseMenuSE if !switching
|
||||||
|
|||||||
@@ -1256,7 +1256,7 @@ class PokemonSummary_Scene
|
|||||||
Input.update
|
Input.update
|
||||||
pbUpdate
|
pbUpdate
|
||||||
dorefresh = false
|
dorefresh = false
|
||||||
if Input.trigger?(Input::SPECIAL)
|
if Input.trigger?(Input::ACTION)
|
||||||
pbSEStop
|
pbSEStop
|
||||||
GameData::Species.play_cry_from_pokemon(@pokemon)
|
GameData::Species.play_cry_from_pokemon(@pokemon)
|
||||||
elsif Input.trigger?(Input::BACK)
|
elsif Input.trigger?(Input::BACK)
|
||||||
|
|||||||
@@ -355,7 +355,7 @@ class PokemonBag_Scene
|
|||||||
pbRefresh
|
pbRefresh
|
||||||
end
|
end
|
||||||
if itemwindow.sorting
|
if itemwindow.sorting
|
||||||
if Input.trigger?(Input::SPECIAL) ||
|
if Input.trigger?(Input::ACTION) ||
|
||||||
Input.trigger?(Input::USE)
|
Input.trigger?(Input::USE)
|
||||||
itemwindow.sorting = false
|
itemwindow.sorting = false
|
||||||
pbPlayDecisionSE
|
pbPlayDecisionSE
|
||||||
@@ -405,7 +405,7 @@ class PokemonBag_Scene
|
|||||||
pbPlayCursorSE
|
pbPlayCursorSE
|
||||||
pbRefresh
|
pbRefresh
|
||||||
end
|
end
|
||||||
# elsif Input.trigger?(Input::Z) # Register/unregister selected item
|
# elsif Input.trigger?(Input::SPECIAL) # Register/unregister selected item
|
||||||
# if !@choosing && itemwindow.index<thispocket.length
|
# if !@choosing && itemwindow.index<thispocket.length
|
||||||
# if @bag.pbIsRegistered?(itemwindow.item)
|
# if @bag.pbIsRegistered?(itemwindow.item)
|
||||||
# @bag.pbUnregisterItem(itemwindow.item)
|
# @bag.pbUnregisterItem(itemwindow.item)
|
||||||
@@ -415,7 +415,7 @@ class PokemonBag_Scene
|
|||||||
# pbPlayDecisionSE
|
# pbPlayDecisionSE
|
||||||
# pbRefresh
|
# pbRefresh
|
||||||
# end
|
# end
|
||||||
elsif Input.trigger?(Input::SPECIAL) # Start switching the selected item
|
elsif Input.trigger?(Input::ACTION) # Start switching the selected item
|
||||||
if !@choosing
|
if !@choosing
|
||||||
if thispocket.length>1 && itemwindow.index<thispocket.length &&
|
if thispocket.length>1 && itemwindow.index<thispocket.length &&
|
||||||
!Settings::BAG_POCKET_AUTO_SORT[itemwindow.pocket]
|
!Settings::BAG_POCKET_AUTO_SORT[itemwindow.pocket]
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ class PokemonSystem
|
|||||||
@font = 0 # Font (see also Settings::FONT_OPTIONS)
|
@font = 0 # Font (see also Settings::FONT_OPTIONS)
|
||||||
@screensize = (Settings::SCREEN_SCALE * 2).floor - 1 # 0=half size, 1=full size, 2=full-and-a-half size, 3=double size
|
@screensize = (Settings::SCREEN_SCALE * 2).floor - 1 # 0=half size, 1=full size, 2=full-and-a-half size, 3=double size
|
||||||
@language = 0 # Language (see also Settings::LANGUAGES in script PokemonSystem)
|
@language = 0 # Language (see also Settings::LANGUAGES in script PokemonSystem)
|
||||||
@runstyle = 0 # Run key functionality (0=hold to run, 1=toggle auto-run)
|
@runstyle = 0 # Default movement speed (0=walk, 1=run)
|
||||||
@bgmvolume = 100 # Volume of background music and ME
|
@bgmvolume = 100 # Volume of background music and ME
|
||||||
@sevolume = 100 # Volume of sound effects
|
@sevolume = 100 # Volume of sound effects
|
||||||
@textinput = 0 # Text input mode (0=cursor, 1=keyboard)
|
@textinput = 0 # Text input mode (0=cursor, 1=keyboard)
|
||||||
|
|||||||
@@ -844,21 +844,21 @@ class PokemonStorageScene
|
|||||||
pbSetMosaic(selection)
|
pbSetMosaic(selection)
|
||||||
end
|
end
|
||||||
self.update
|
self.update
|
||||||
if Input.trigger?(Input::L)
|
if Input.trigger?(Input::JUMPUP)
|
||||||
pbPlayCursorSE
|
pbPlayCursorSE
|
||||||
nextbox = (@storage.currentBox+@storage.maxBoxes-1)%@storage.maxBoxes
|
nextbox = (@storage.currentBox+@storage.maxBoxes-1)%@storage.maxBoxes
|
||||||
pbSwitchBoxToLeft(nextbox)
|
pbSwitchBoxToLeft(nextbox)
|
||||||
@storage.currentBox = nextbox
|
@storage.currentBox = nextbox
|
||||||
pbUpdateOverlay(selection)
|
pbUpdateOverlay(selection)
|
||||||
pbSetMosaic(selection)
|
pbSetMosaic(selection)
|
||||||
elsif Input.trigger?(Input::R)
|
elsif Input.trigger?(Input::JUMPDOWN)
|
||||||
pbPlayCursorSE
|
pbPlayCursorSE
|
||||||
nextbox = (@storage.currentBox+1)%@storage.maxBoxes
|
nextbox = (@storage.currentBox+1)%@storage.maxBoxes
|
||||||
pbSwitchBoxToRight(nextbox)
|
pbSwitchBoxToRight(nextbox)
|
||||||
@storage.currentBox = nextbox
|
@storage.currentBox = nextbox
|
||||||
pbUpdateOverlay(selection)
|
pbUpdateOverlay(selection)
|
||||||
pbSetMosaic(selection)
|
pbSetMosaic(selection)
|
||||||
elsif Input.trigger?(Input::Z) # Jump to box name
|
elsif Input.trigger?(Input::SPECIAL) # Jump to box name
|
||||||
if selection!=-1
|
if selection!=-1
|
||||||
pbPlayCursorSE
|
pbPlayCursorSE
|
||||||
selection = -1
|
selection = -1
|
||||||
@@ -866,7 +866,7 @@ class PokemonStorageScene
|
|||||||
pbUpdateOverlay(selection)
|
pbUpdateOverlay(selection)
|
||||||
pbSetMosaic(selection)
|
pbSetMosaic(selection)
|
||||||
end
|
end
|
||||||
elsif Input.trigger?(Input::SPECIAL) && @command==0 # Organize only
|
elsif Input.trigger?(Input::ACTION) && @command==0 # Organize only
|
||||||
pbPlayDecisionSE
|
pbPlayDecisionSE
|
||||||
pbSetQuickSwap(!@quickswap)
|
pbSetQuickSwap(!@quickswap)
|
||||||
elsif Input.trigger?(Input::BACK)
|
elsif Input.trigger?(Input::BACK)
|
||||||
@@ -945,7 +945,7 @@ class PokemonStorageScene
|
|||||||
pbSetMosaic(selection)
|
pbSetMosaic(selection)
|
||||||
end
|
end
|
||||||
self.update
|
self.update
|
||||||
if Input.trigger?(Input::SPECIAL) && @command == 0 # Organize only
|
if Input.trigger?(Input::ACTION) && @command == 0 # Organize only
|
||||||
pbPlayDecisionSE
|
pbPlayDecisionSE
|
||||||
pbSetQuickSwap(!@quickswap)
|
pbSetQuickSwap(!@quickswap)
|
||||||
elsif Input.trigger?(Input::BACK)
|
elsif Input.trigger?(Input::BACK)
|
||||||
|
|||||||
@@ -38,8 +38,9 @@ end
|
|||||||
#
|
#
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PurifyChamberSet
|
class PurifyChamberSet
|
||||||
attr_reader :facing
|
attr_reader :shadow # The Shadow Pokémon in the middle
|
||||||
attr_reader :shadow
|
attr_reader :list # The other Pokémon placed around
|
||||||
|
attr_reader :facing # Index in list of Pokémon the Shadow Pokémon is facing
|
||||||
|
|
||||||
def partialSum(x)
|
def partialSum(x)
|
||||||
return (x*x+x)/2 # pattern: 1, 3, 6, 10, 15, 21, 28, ...
|
return (x*x+x)/2 # pattern: 1, 3, 6, 10, 15, 21, 28, ...
|
||||||
@@ -144,11 +145,12 @@ end
|
|||||||
#
|
#
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PurifyChamber
|
class PurifyChamber
|
||||||
NUMSETS=9
|
attr_reader :sets
|
||||||
SETSIZE=4
|
attr_reader :currentSet
|
||||||
attr_reader :currentSet # German: das Forum
|
NUMSETS = 9
|
||||||
|
SETSIZE = 4
|
||||||
|
|
||||||
def self.maximumTempo() # Calculates the maximum possible tempo
|
def self.maximumTempo() # Calculates the maximum possible tempo
|
||||||
x=SETSIZE+1
|
x=SETSIZE+1
|
||||||
return ((x*x+x)/2)-1
|
return ((x*x+x)/2)-1
|
||||||
end
|
end
|
||||||
@@ -173,7 +175,7 @@ class PurifyChamber
|
|||||||
return @sets[set].list
|
return @sets[set].list
|
||||||
end
|
end
|
||||||
|
|
||||||
def chamberFlow(chamber) # for speeding up purification. German: Fluidum
|
def chamberFlow(chamber) # for speeding up purification
|
||||||
return 0 if chamber<0 || chamber>=NUMSETS
|
return 0 if chamber<0 || chamber>=NUMSETS
|
||||||
return @sets[chamber].flow
|
return @sets[chamber].flow
|
||||||
end
|
end
|
||||||
@@ -183,7 +185,7 @@ class PurifyChamber
|
|||||||
return @sets[chamber].shadow
|
return @sets[chamber].shadow
|
||||||
end
|
end
|
||||||
|
|
||||||
def setShadow(chamber,value)# allow only "shadow" Pokemon
|
def setShadow(chamber,value) # allow only "shadow" Pokemon
|
||||||
return if chamber<0 || chamber>=NUMSETS
|
return if chamber<0 || chamber>=NUMSETS
|
||||||
@sets[chamber].shadow=value
|
@sets[chamber].shadow=value
|
||||||
end
|
end
|
||||||
@@ -1179,11 +1181,11 @@ class PurifyChamberScene
|
|||||||
pbPlayCursorSE()
|
pbPlayCursorSE()
|
||||||
@sprites["setview"].moveCursor(btn)
|
@sprites["setview"].moveCursor(btn)
|
||||||
end
|
end
|
||||||
if Input.repeat?(Input::L)
|
if Input.repeat?(Input::JUMPUP)
|
||||||
nextset=(@sprites["setview"].set==0) ? PurifyChamber::NUMSETS-1 : @sprites["setview"].set-1
|
nextset=(@sprites["setview"].set==0) ? PurifyChamber::NUMSETS-1 : @sprites["setview"].set-1
|
||||||
pbPlayCursorSE()
|
pbPlayCursorSE()
|
||||||
return [1,nextset]
|
return [1,nextset]
|
||||||
elsif Input.repeat?(Input::R)
|
elsif Input.repeat?(Input::JUMPDOWN)
|
||||||
nextset=(@sprites["setview"].set==PurifyChamber::NUMSETS-1) ? 0 : @sprites["setview"].set+1
|
nextset=(@sprites["setview"].set==PurifyChamber::NUMSETS-1) ? 0 : @sprites["setview"].set+1
|
||||||
pbPlayCursorSE()
|
pbPlayCursorSE()
|
||||||
return [1,nextset]
|
return [1,nextset]
|
||||||
|
|||||||
@@ -428,7 +428,7 @@ class TriadScene
|
|||||||
elsif Input.trigger?(Input::USE)
|
elsif Input.trigger?(Input::USE)
|
||||||
pbPlayDecisionSE
|
pbPlayDecisionSE
|
||||||
break
|
break
|
||||||
elsif Input.trigger?(Input::SPECIAL) && @battle.openHand
|
elsif Input.trigger?(Input::ACTION) && @battle.openHand
|
||||||
pbPlayDecisionSE
|
pbPlayDecisionSE
|
||||||
pbViewOpponentCards(numCards)
|
pbViewOpponentCards(numCards)
|
||||||
@sprites["helpwindow"].text = _INTL("Choose a card, or check opponent with Z.")
|
@sprites["helpwindow"].text = _INTL("Choose a card, or check opponent with Z.")
|
||||||
|
|||||||
@@ -394,7 +394,7 @@ class VoltorbFlip
|
|||||||
pbDisposeSpriteHash(@sprites)
|
pbDisposeSpriteHash(@sprites)
|
||||||
pbNewGame
|
pbNewGame
|
||||||
end
|
end
|
||||||
elsif Input.trigger?(Input::CTRL)
|
elsif Input.trigger?(Input::ACTION)
|
||||||
pbPlayDecisionSE
|
pbPlayDecisionSE
|
||||||
@sprites["cursor"].bitmap.clear
|
@sprites["cursor"].bitmap.clear
|
||||||
if @cursor[0][3]==0 # If in normal mode
|
if @cursor[0][3]==0 # If in normal mode
|
||||||
|
|||||||
@@ -561,7 +561,7 @@ class MiningGameScene
|
|||||||
pbSEPlay("Mining cursor")
|
pbSEPlay("Mining cursor")
|
||||||
@sprites["cursor"].position+=1
|
@sprites["cursor"].position+=1
|
||||||
end
|
end
|
||||||
elsif Input.trigger?(Input::SPECIAL) # Change tool mode
|
elsif Input.trigger?(Input::ACTION) # Change tool mode
|
||||||
pbSEPlay("Mining tool change")
|
pbSEPlay("Mining tool change")
|
||||||
newmode=(@sprites["cursor"].mode+1)%2
|
newmode=(@sprites["cursor"].mode+1)%2
|
||||||
@sprites["cursor"].mode=newmode
|
@sprites["cursor"].mode=newmode
|
||||||
|
|||||||
@@ -537,8 +537,8 @@ class TilePuzzleScene
|
|||||||
end
|
end
|
||||||
elsif (@game==1 || @game==2) && Input.trigger?(Input::USE)
|
elsif (@game==1 || @game==2) && Input.trigger?(Input::USE)
|
||||||
pbGrabTile(@sprites["cursor"].position)
|
pbGrabTile(@sprites["cursor"].position)
|
||||||
elsif (@game==2 && Input.trigger?(Input::SPECIAL)) ||
|
elsif (@game==2 && Input.trigger?(Input::ACTION)) ||
|
||||||
(@game==5 && Input.trigger?(Input::SPECIAL)) ||
|
(@game==5 && Input.trigger?(Input::ACTION)) ||
|
||||||
(@game==7 && Input.trigger?(Input::USE))
|
(@game==7 && Input.trigger?(Input::USE))
|
||||||
pbRotateTile(@sprites["cursor"].position)
|
pbRotateTile(@sprites["cursor"].position)
|
||||||
elsif Input.trigger?(Input::BACK)
|
elsif Input.trigger?(Input::BACK)
|
||||||
|
|||||||
@@ -309,7 +309,7 @@ DebugMenuCommands.register("testtrainerbattleadvanced", {
|
|||||||
pbMessage(_INTL("No trainers were chosen, cannot start battle."))
|
pbMessage(_INTL("No trainers were chosen, cannot start battle."))
|
||||||
next
|
next
|
||||||
elsif size1 < trainers.length
|
elsif size1 < trainers.length
|
||||||
pbMessage(_INTL("Opposing side size is invalid. It should be at least {1}", trainers.length))
|
pbMessage(_INTL("Opposing side size is invalid. It should be at least {1}.", trainers.length))
|
||||||
next
|
next
|
||||||
elsif size1 > trainers.length && trainers[0][1].party_count == 1
|
elsif size1 > trainers.length && trainers[0][1].party_count == 1
|
||||||
pbMessage(
|
pbMessage(
|
||||||
|
|||||||
@@ -173,7 +173,7 @@ def pbDebugVariables(mode)
|
|||||||
elsif Input.repeat?(Input::RIGHT)
|
elsif Input.repeat?(Input::RIGHT)
|
||||||
pbDebugSetVariable(current_id,1)
|
pbDebugSetVariable(current_id,1)
|
||||||
right_window.refresh
|
right_window.refresh
|
||||||
elsif Input.trigger?(Input::SPECIAL)
|
elsif Input.trigger?(Input::ACTION)
|
||||||
if $game_variables[current_id]==0
|
if $game_variables[current_id]==0
|
||||||
$game_variables[current_id] = ""
|
$game_variables[current_id] = ""
|
||||||
elsif $game_variables[current_id]==""
|
elsif $game_variables[current_id]==""
|
||||||
@@ -449,7 +449,7 @@ def pbDebugRoamers
|
|||||||
Graphics.update
|
Graphics.update
|
||||||
Input.update
|
Input.update
|
||||||
pbUpdateSpriteHash(sprites)
|
pbUpdateSpriteHash(sprites)
|
||||||
if Input.trigger?(Input::SPECIAL) && cmdwindow.index<cmdwindow.roamerCount &&
|
if Input.trigger?(Input::ACTION) && cmdwindow.index<cmdwindow.roamerCount &&
|
||||||
(pkmn[2]<=0 || $game_switches[pkmn[2]]) &&
|
(pkmn[2]<=0 || $game_switches[pkmn[2]]) &&
|
||||||
$PokemonGlobal.roamPokemon[cmdwindow.index]!=true
|
$PokemonGlobal.roamPokemon[cmdwindow.index]!=true
|
||||||
# Roam selected Pokémon
|
# Roam selected Pokémon
|
||||||
|
|||||||
@@ -356,7 +356,7 @@ def pbTrainerTypeEditor
|
|||||||
]
|
]
|
||||||
pbListScreenBlock(_INTL("Trainer Types"), TrainerTypeLister.new(0, true)) { |button, tr_type|
|
pbListScreenBlock(_INTL("Trainer Types"), TrainerTypeLister.new(0, true)) { |button, tr_type|
|
||||||
if tr_type
|
if tr_type
|
||||||
if button == Input::SPECIAL
|
if button == Input::ACTION
|
||||||
if tr_type.is_a?(Symbol)
|
if tr_type.is_a?(Symbol)
|
||||||
if pbConfirmMessageSerious("Delete this trainer type?")
|
if pbConfirmMessageSerious("Delete this trainer type?")
|
||||||
id_number = GameData::TrainerType.get(tr_type).id_number
|
id_number = GameData::TrainerType.get(tr_type).id_number
|
||||||
@@ -504,7 +504,7 @@ def pbTrainerBattleEditor
|
|||||||
modified = false
|
modified = false
|
||||||
pbListScreenBlock(_INTL("Trainer Battles"), TrainerBattleLister.new(0, true)) { |button, trainer_id|
|
pbListScreenBlock(_INTL("Trainer Battles"), TrainerBattleLister.new(0, true)) { |button, trainer_id|
|
||||||
if trainer_id
|
if trainer_id
|
||||||
if button == Input::SPECIAL
|
if button == Input::ACTION
|
||||||
if trainer_id.is_a?(Array)
|
if trainer_id.is_a?(Array)
|
||||||
if pbConfirmMessageSerious("Delete this trainer battle?")
|
if pbConfirmMessageSerious("Delete this trainer battle?")
|
||||||
tr_data = GameData::Trainer::DATA[trainer_id]
|
tr_data = GameData::Trainer::DATA[trainer_id]
|
||||||
@@ -829,7 +829,7 @@ def pbItemEditor
|
|||||||
]
|
]
|
||||||
pbListScreenBlock(_INTL("Items"), ItemLister.new(0, true)) { |button, item|
|
pbListScreenBlock(_INTL("Items"), ItemLister.new(0, true)) { |button, item|
|
||||||
if item
|
if item
|
||||||
if button == Input::SPECIAL
|
if button == Input::ACTION
|
||||||
if item.is_a?(Symbol)
|
if item.is_a?(Symbol)
|
||||||
if pbConfirmMessageSerious("Delete this item?")
|
if pbConfirmMessageSerious("Delete this item?")
|
||||||
id_number = GameData::Item.get(item).id_number
|
id_number = GameData::Item.get(item).id_number
|
||||||
@@ -996,7 +996,7 @@ def pbPokemonEditor
|
|||||||
]
|
]
|
||||||
pbListScreenBlock(_INTL("Pokémon species"), SpeciesLister.new(0, false)) { |button, species|
|
pbListScreenBlock(_INTL("Pokémon species"), SpeciesLister.new(0, false)) { |button, species|
|
||||||
if species
|
if species
|
||||||
if button == Input::SPECIAL
|
if button == Input::ACTION
|
||||||
if species.is_a?(Symbol)
|
if species.is_a?(Symbol)
|
||||||
if pbConfirmMessageSerious("Delete this species?")
|
if pbConfirmMessageSerious("Delete this species?")
|
||||||
id_number = GameData::Species.get(species).id_number
|
id_number = GameData::Species.get(species).id_number
|
||||||
|
|||||||
@@ -1478,7 +1478,7 @@ def pbPropertyList(title,data,properties,saveprompt=false)
|
|||||||
desc.text = properties[list.index][2]
|
desc.text = properties[list.index][2]
|
||||||
selectedmap = list.index
|
selectedmap = list.index
|
||||||
end
|
end
|
||||||
if Input.trigger?(Input::SPECIAL)
|
if Input.trigger?(Input::ACTION)
|
||||||
propobj = properties[selectedmap][1]
|
propobj = properties[selectedmap][1]
|
||||||
if propobj!=ReadOnlyProperty && !propobj.is_a?(ReadOnlyProperty) &&
|
if propobj!=ReadOnlyProperty && !propobj.is_a?(ReadOnlyProperty) &&
|
||||||
pbConfirmMessage(_INTL("Reset the setting {1}?",properties[selectedmap][0]))
|
pbConfirmMessage(_INTL("Reset the setting {1}?",properties[selectedmap][0]))
|
||||||
|
|||||||
@@ -88,8 +88,8 @@ def pbListScreenBlock(title,lister)
|
|||||||
lister.refresh(list.index)
|
lister.refresh(list.index)
|
||||||
selectedmap = list.index
|
selectedmap = list.index
|
||||||
end
|
end
|
||||||
if Input.trigger?(Input::SPECIAL)
|
if Input.trigger?(Input::ACTION)
|
||||||
yield(Input::SPECIAL, lister.value(selectedmap))
|
yield(Input::ACTION, lister.value(selectedmap))
|
||||||
list.commands = lister.commands
|
list.commands = lister.commands
|
||||||
if list.index==list.commands.length
|
if list.index==list.commands.length
|
||||||
list.index = list.commands.length
|
list.index = list.commands.length
|
||||||
|
|||||||
@@ -113,7 +113,7 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Displays a list of all Pokémon species, and returns the ID of the species
|
# Displays a list of all Pokémon species, and returns the ID of the species
|
||||||
# selected (or nil if the selection was canceled). "default", if specified, is
|
# selected (or nil if the selection was canceled). "default", if specified, is
|
||||||
# the ID of the species to initially select. Pressing Input::SPECIAL will toggle
|
# the ID of the species to initially select. Pressing Input::ACTION will toggle
|
||||||
# the list sorting between numerical and alphabetical.
|
# the list sorting between numerical and alphabetical.
|
||||||
def pbChooseSpeciesList(default = nil)
|
def pbChooseSpeciesList(default = nil)
|
||||||
commands = []
|
commands = []
|
||||||
@@ -132,7 +132,7 @@ end
|
|||||||
|
|
||||||
# Displays a list of all moves, and returns the ID of the move selected (or nil
|
# Displays a list of all moves, and returns the ID of the move selected (or nil
|
||||||
# if the selection was canceled). "default", if specified, is the ID of the move
|
# if the selection was canceled). "default", if specified, is the ID of the move
|
||||||
# to initially select. Pressing Input::SPECIAL will toggle the list sorting
|
# to initially select. Pressing Input::ACTION will toggle the list sorting
|
||||||
# between numerical and alphabetical.
|
# between numerical and alphabetical.
|
||||||
def pbChooseMoveList(default = nil)
|
def pbChooseMoveList(default = nil)
|
||||||
commands = []
|
commands = []
|
||||||
@@ -178,7 +178,7 @@ end
|
|||||||
|
|
||||||
# Displays a list of all types, and returns the ID of the type selected (or nil
|
# Displays a list of all types, and returns the ID of the type selected (or nil
|
||||||
# if the selection was canceled). "default", if specified, is the ID of the type
|
# if the selection was canceled). "default", if specified, is the ID of the type
|
||||||
# to initially select. Pressing Input::SPECIAL will toggle the list sorting
|
# to initially select. Pressing Input::ACTION will toggle the list sorting
|
||||||
# between numerical and alphabetical.
|
# between numerical and alphabetical.
|
||||||
def pbChooseTypeList(default = nil)
|
def pbChooseTypeList(default = nil)
|
||||||
commands = []
|
commands = []
|
||||||
@@ -188,7 +188,7 @@ end
|
|||||||
|
|
||||||
# Displays a list of all items, and returns the ID of the item selected (or nil
|
# Displays a list of all items, and returns the ID of the item selected (or nil
|
||||||
# if the selection was canceled). "default", if specified, is the ID of the item
|
# if the selection was canceled). "default", if specified, is the ID of the item
|
||||||
# to initially select. Pressing Input::SPECIAL will toggle the list sorting
|
# to initially select. Pressing Input::ACTION will toggle the list sorting
|
||||||
# between numerical and alphabetical.
|
# between numerical and alphabetical.
|
||||||
def pbChooseItemList(default = nil)
|
def pbChooseItemList(default = nil)
|
||||||
commands = []
|
commands = []
|
||||||
@@ -198,7 +198,7 @@ end
|
|||||||
|
|
||||||
# Displays a list of all abilities, and returns the ID of the ability selected
|
# Displays a list of all abilities, and returns the ID of the ability selected
|
||||||
# (or nil if the selection was canceled). "default", if specified, is the ID of
|
# (or nil if the selection was canceled). "default", if specified, is the ID of
|
||||||
# the ability to initially select. Pressing Input::SPECIAL will toggle the list
|
# the ability to initially select. Pressing Input::ACTION will toggle the list
|
||||||
# sorting between numerical and alphabetical.
|
# sorting between numerical and alphabetical.
|
||||||
def pbChooseAbilityList(default = nil)
|
def pbChooseAbilityList(default = nil)
|
||||||
commands = []
|
commands = []
|
||||||
@@ -290,10 +290,10 @@ def pbCommands3(cmdwindow,commands,cmdIfCancel,defaultindex=-1,noresize=false)
|
|||||||
Graphics.update
|
Graphics.update
|
||||||
Input.update
|
Input.update
|
||||||
cmdwindow.update
|
cmdwindow.update
|
||||||
if Input.trigger?(Input::Z)
|
if Input.trigger?(Input::SPECIAL)
|
||||||
command = [5,cmdwindow.index]
|
command = [5,cmdwindow.index]
|
||||||
break
|
break
|
||||||
elsif Input.press?(Input::SPECIAL)
|
elsif Input.press?(Input::ACTION)
|
||||||
if Input.repeat?(Input::UP)
|
if Input.repeat?(Input::UP)
|
||||||
command = [1,cmdwindow.index]
|
command = [1,cmdwindow.index]
|
||||||
break
|
break
|
||||||
@@ -381,7 +381,7 @@ def pbCommandsSortable(cmdwindow,commands,cmdIfCancel,defaultindex=-1,sortable=f
|
|||||||
Graphics.update
|
Graphics.update
|
||||||
Input.update
|
Input.update
|
||||||
cmdwindow.update
|
cmdwindow.update
|
||||||
if Input.trigger?(Input::SPECIAL) && sortable
|
if Input.trigger?(Input::ACTION) && sortable
|
||||||
command = [1,cmdwindow.index]
|
command = [1,cmdwindow.index]
|
||||||
break
|
break
|
||||||
elsif Input.trigger?(Input::BACK)
|
elsif Input.trigger?(Input::BACK)
|
||||||
|
|||||||
@@ -153,11 +153,11 @@ class PokemonTilesetScene
|
|||||||
update_cursor_position(-1, 0)
|
update_cursor_position(-1, 0)
|
||||||
elsif Input.repeat?(Input::RIGHT)
|
elsif Input.repeat?(Input::RIGHT)
|
||||||
update_cursor_position(1, 0)
|
update_cursor_position(1, 0)
|
||||||
elsif Input.repeat?(Input::L)
|
elsif Input.repeat?(Input::JUMPUP)
|
||||||
update_cursor_position(0, -Graphics.height / TILE_SIZE)
|
update_cursor_position(0, -Graphics.height / TILE_SIZE)
|
||||||
elsif Input.repeat?(Input::R)
|
elsif Input.repeat?(Input::JUMPDOWN)
|
||||||
update_cursor_position(0, Graphics.height / TILE_SIZE)
|
update_cursor_position(0, Graphics.height / TILE_SIZE)
|
||||||
elsif Input.trigger?(Input::SPECIAL)
|
elsif Input.trigger?(Input::ACTION)
|
||||||
commands = [
|
commands = [
|
||||||
_INTL("Go to bottom"),
|
_INTL("Go to bottom"),
|
||||||
_INTL("Go to top"),
|
_INTL("Go to top"),
|
||||||
|
|||||||
@@ -419,24 +419,24 @@ class MapScreenScene
|
|||||||
end
|
end
|
||||||
|
|
||||||
def onRightClick(mapid,x,y)
|
def onRightClick(mapid,x,y)
|
||||||
# echo("rightclick (#{mapid})\r\n")
|
# echoln("rightclick (#{mapid})")
|
||||||
end
|
end
|
||||||
|
|
||||||
def onMouseUp(mapid)
|
def onMouseUp(mapid)
|
||||||
# echo("mouseup (#{mapid})\r\n")
|
# echoln("mouseup (#{mapid})")
|
||||||
@dragging=false if @dragging
|
@dragging=false if @dragging
|
||||||
end
|
end
|
||||||
|
|
||||||
def onRightMouseUp(mapid)
|
def onRightMouseUp(mapid)
|
||||||
# echo("rightmouseup (#{mapid})\r\n")
|
# echoln("rightmouseup (#{mapid})")
|
||||||
end
|
end
|
||||||
|
|
||||||
def onMouseOver(mapid,x,y)
|
def onMouseOver(mapid,x,y)
|
||||||
# echo("mouseover (#{mapid},#{x},#{y})\r\n")
|
# echoln("mouseover (#{mapid},#{x},#{y})")
|
||||||
end
|
end
|
||||||
|
|
||||||
def onMouseMove(mapid,x,y)
|
def onMouseMove(mapid,x,y)
|
||||||
# echo("mousemove (#{mapid},#{x},#{y})\r\n")
|
# echoln("mousemove (#{mapid},#{x},#{y})")
|
||||||
if @dragging
|
if @dragging
|
||||||
if @dragmapid>=0
|
if @dragmapid>=0
|
||||||
sprite=getMapSprite(@dragmapid)
|
sprite=getMapSprite(@dragmapid)
|
||||||
|
|||||||
@@ -195,7 +195,7 @@ class SpritePositioner
|
|||||||
pbChangeSpecies(@species)
|
pbChangeSpecies(@species)
|
||||||
refresh
|
refresh
|
||||||
end
|
end
|
||||||
if Input.trigger?(Input::SPECIAL) # Cycle to next option
|
if Input.trigger?(Input::ACTION) # Cycle to next option
|
||||||
pbPlayDecisionSE
|
pbPlayDecisionSE
|
||||||
@metricsChanged = true if species_data.shadow_size != oldval
|
@metricsChanged = true if species_data.shadow_size != oldval
|
||||||
ret = true
|
ret = true
|
||||||
@@ -266,7 +266,7 @@ class SpritePositioner
|
|||||||
end
|
end
|
||||||
refresh
|
refresh
|
||||||
end
|
end
|
||||||
if Input.repeat?(Input::SPECIAL) && param != 3 # Cycle to next option
|
if Input.repeat?(Input::ACTION) && param != 3 # Cycle to next option
|
||||||
@metricsChanged = true if xpos != oldxpos || ypos != oldypos
|
@metricsChanged = true if xpos != oldxpos || ypos != oldypos
|
||||||
ret = true
|
ret = true
|
||||||
pbPlayDecisionSE
|
pbPlayDecisionSE
|
||||||
|
|||||||
@@ -179,7 +179,12 @@
|
|||||||
// constants in the scripts.
|
// constants in the scripts.
|
||||||
"bindingNames": {"c": "Use",
|
"bindingNames": {"c": "Use",
|
||||||
"b": "Back",
|
"b": "Back",
|
||||||
"a": "Special"},
|
"a": "Action",
|
||||||
|
"x": "(unused)",
|
||||||
|
"y": "(unused)",
|
||||||
|
"z": "Special",
|
||||||
|
"l": "JumpUp",
|
||||||
|
"r": "JumpDown"},
|
||||||
|
|
||||||
|
|
||||||
// Allow symlinks for game assets to be followed
|
// Allow symlinks for game assets to be followed
|
||||||
|
|||||||
Reference in New Issue
Block a user