Finalised input names, added some more save file conversion code

This commit is contained in:
Maruno17
2021-04-11 15:18:04 +01:00
parent 614e0ed9a2
commit e5a0e3acdd
39 changed files with 145 additions and 106 deletions

View File

@@ -1,3 +1,10 @@
#===============================================================================
# class Object
#===============================================================================
class Object
alias full_inspect inspect
end
#===============================================================================
# class Class
#===============================================================================

View File

@@ -47,7 +47,6 @@ def pbPrintException(e)
errorlogline.sub!(pbGetUserName, "USERNAME")
errorlogline = "\r\n" + errorlogline if errorlogline.length > 20
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.")
# Give a ~500ms coyote time to start holding Control
t = System.delta

View File

@@ -1,7 +1,12 @@
module Input
USE = C
BACK = B
SPECIAL = A
USE = C
BACK = B
ACTION = A
AUX1 = X
AUX2 = Y
SPECIAL = Z
JUMPUP = L
JUMPDOWN = R
unless defined?(update_KGC_ScreenCapture)
class << Input

View File

@@ -18,18 +18,18 @@ SaveData.register_conversion(:v19_convert_PokemonSystem) do
display_title 'Updating PokemonSystem class'
to_all do |save_data|
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.battlestyle = save_data[:pokemon_system].battlestyle || new_system.battlestyle
new_system.frame = save_data[:pokemon_system].frame || new_system.frame
new_system.textskin = save_data[:pokemon_system].textskin || new_system.textskin
new_system.font = save_data[:pokemon_system].font || new_system.font
new_system.screensize = save_data[:pokemon_system].screensize || new_system.screensize
new_system.language = save_data[:pokemon_system].language || new_system.language
new_system.runstyle = save_data[:pokemon_system].runstyle || new_system.runstyle
new_system.bgmvolume = save_data[:pokemon_system].bgmvolume || new_system.bgmvolume
new_system.sevolume = save_data[:pokemon_system].sevolume || new_system.sevolume
new_system.textinput = save_data[:pokemon_system].textinput || new_system.textinput
new_system.frame = save_data[:pokemon_system].frame || new_system.frame
new_system.textskin = save_data[:pokemon_system].textskin || new_system.textskin
new_system.font = save_data[:pokemon_system].font || new_system.font
new_system.screensize = save_data[:pokemon_system].screensize || new_system.screensize
new_system.language = save_data[:pokemon_system].language || new_system.language
new_system.runstyle = save_data[:pokemon_system].runstyle || new_system.runstyle
new_system.bgmvolume = save_data[:pokemon_system].bgmvolume || new_system.bgmvolume
new_system.sevolume = save_data[:pokemon_system].sevolume || new_system.sevolume
new_system.textinput = save_data[:pokemon_system].textinput || new_system.textinput
save_data[:pokemon_system] = new_system
end
end
@@ -66,6 +66,9 @@ SaveData.register_conversion(:v19_convert_global_metadata) do
global.mailbox[i] = PokemonMail.convert(mail) if mail
end
end
global.phoneNumbers.each do |contact|
contact[1] = GameData::TrainerType.get(contact[1]) if contact && contact.length == 8
end
if global.partner
global.partner[0] = GameData::TrainerType.get(global.partner[0]).id
global.partner[3].each_with_index do |pkmn, i|
@@ -78,15 +81,21 @@ SaveData.register_conversion(:v19_convert_global_metadata) do
end
end
if global.roamPokemon
global.roamPokemon.each_with_index do |p, i|
global.roamPokemon[i] = PokeBattle_Pokemon.convert(p) if p
global.roamPokemon.each_with_index do |pkmn, i|
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
if global.hallOfFame
global.hallOfFame.each do |team|
next if !team
team.each_with_index do |p, i|
team[i] = PokeBattle_Pokemon.convert(p) if p
team.each_with_index do |pkmn, i|
team[i] = PokeBattle_Pokemon.convert(pkmn) if pkmn
end
end
end
@@ -115,7 +124,7 @@ SaveData.register_conversion(:v19_convert_bag) do
end
pocket.compact!
end
self.registeredIndex
self.registeredIndex # Just to ensure this data exists
self.registeredItems.each_with_index do |item, i|
next if !item
if item == 0
@@ -130,8 +139,8 @@ SaveData.register_conversion(:v19_convert_bag) do
end
end
self.registeredItems.compact!
end # bag.instance_eval
end # to_value
end # bag.instance_eval
end # to_value
end
SaveData.register_conversion(:v19_convert_storage) do
@@ -141,20 +150,31 @@ SaveData.register_conversion(:v19_convert_storage) do
storage.instance_eval do
for box in 0...self.maxBoxes
for i in 0...self.maxPokemon(box)
next unless self[box, i]
self[box, i] = PokeBattle_Pokemon.convert(self[box, i])
self[box, i] = PokeBattle_Pokemon.convert(self[box, i]) if self[box, i]
end
end
end # storage.instance_eval
end # to_value
self.unlockedWallpapers # Just to ensure this data exists
end # storage.instance_eval
end # to_value
end
# TODO: See if there are more conversions needed for this. There may not be.
SaveData.register_conversion(:v19_convert_game_player) do
essentials_version 19
display_title 'Converting game player character'
to_value :game_player do |game_player|
game_player.width = 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

View File

@@ -183,7 +183,7 @@ class Scene_Map
$game_temp.menu_calling = true
$game_temp.menu_beep = true
end
elsif Input.trigger?(Input::Z)
elsif Input.trigger?(Input::SPECIAL)
unless $game_player.moving?
$PokemonTemp.keyItemCalling = true
end

View File

@@ -276,7 +276,7 @@ class Game_System
def update
@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)
@map_interpreter.pbSetSelfSwitch(event.id,"A",true)
@map_interpreter.command_end

View File

@@ -62,7 +62,6 @@ class Game_Map
for i in @map.events.keys
@events[i] = Game_Event.new(@map_id, @map.events[i],self)
end
# TODO: These should be moved to Spriteset_Global as we only need one copy of them.
@common_events = {}
for i in 1...$data_common_events.size
@common_events[i] = Game_CommonEvent.new(i)

View File

@@ -32,7 +32,7 @@ class PokemonMapFactory
raise "No maps in save file... (mapIndex=#{@mapIndex})" if @maps.length==0
for i in 0...@maps.length
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]
end
raise "No maps in save file... (all maps empty; mapIndex=#{@mapIndex})"

View File

@@ -16,7 +16,7 @@ class Game_Character
attr_reader :blend_type
attr_reader :direction
attr_accessor :pattern
attr_reader :pattern_surf
attr_accessor :pattern_surf
attr_accessor :lock_pattern
attr_reader :move_route_forcing
attr_accessor :through

View File

@@ -23,7 +23,7 @@ class Game_Player < Game_Character
return false if $game_temp.in_menu || $game_temp.in_battle ||
@move_route_forcing || $game_temp.message_window_showing ||
pbMapInterpreterRunning?
input = ($PokemonSystem.runstyle == 1) ^ Input.press?(Input::SPECIAL)
input = ($PokemonSystem.runstyle == 1) ^ Input.press?(Input::ACTION)
return input && $PokemonGlobal.runningShoes && !jumping? &&
!$PokemonGlobal.diving && !$PokemonGlobal.surfing &&
!$PokemonGlobal.bicycle && !$game_player.pbTerrainTag.must_walk

View File

@@ -882,7 +882,7 @@ class SpriteWindow_Selectable < SpriteWindow_Base
update_cursor_rect
end
end
elsif Input.repeat?(Input::L)
elsif Input.repeat?(Input::JUMPUP)
if @index > 0
oldindex = @index
@index = [self.index-self.page_item_max, 0].max
@@ -892,7 +892,7 @@ class SpriteWindow_Selectable < SpriteWindow_Base
update_cursor_rect
end
end
elsif Input.repeat?(Input::R)
elsif Input.repeat?(Input::JUMPDOWN)
if @index < @item_max-1
oldindex = @index
@index = [self.index+self.page_item_max, @item_max-1].min

View File

@@ -226,13 +226,13 @@ class Window_TextEntry < SpriteWindow_Base
self.refresh if (@frame%10)==0
return if !self.active
# Moving cursor
if Input.repeat?(Input::LEFT) && Input.press?(Input::SPECIAL)
if Input.repeat?(Input::LEFT) && Input.press?(Input::ACTION)
if @helper.cursor > 0
@helper.cursor -= 1
@frame = 0
self.refresh
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
@helper.cursor += 1
@frame = 0
@@ -1311,9 +1311,9 @@ class PokemonEntryScene2
Input.update
pbUpdate
next if pbMoveCursor
if Input.trigger?(Input::Z)
if Input.trigger?(Input::SPECIAL)
pbChangeTab
elsif Input.trigger?(Input::SPECIAL)
elsif Input.trigger?(Input::ACTION)
@cursorpos = OK
@sprites["cursor"].setCursorPos(@cursorpos)
elsif Input.trigger?(Input::BACK)

View File

@@ -38,7 +38,7 @@ module Graphics
if Graphics.frame_count % 40 == 0
count = 0
ObjectSpace.each_object(Object) { |o| count += 1 }
echo("Objects: #{count}\r\n")
echoln("Objects: #{count}")
end
=end
@@transition.update if @@transition && !@@transition.disposed?

View File

@@ -272,7 +272,7 @@ class FightMenuDisplay < BattleMenuBase
# Create Mega Evolution button
@megaButton = SpriteWrapper.new(viewport)
@megaButton.bitmap = @megaEvoBitmap.bitmap
@megaButton.x = self.x+146
@megaButton.x = self.x+120
@megaButton.y = self.y-@megaEvoBitmap.height/2
@megaButton.src_rect.height = @megaEvoBitmap.height/2
addSprite("megaButton",@megaButton)
@@ -415,6 +415,7 @@ class FightMenuDisplay < BattleMenuBase
def refreshMegaEvolutionButton
return if !USE_GRAPHICS
@megaButton.src_rect.y = (@mode - 1) * @megaEvoBitmap.height / 2
@megaButton.x = self.x + ((@shiftMode > 0) ? 204 : 120)
@megaButton.z = self.z - 1
@visibility["megaButton"] = (@mode > 0)
end

View File

@@ -119,13 +119,13 @@ class PokeBattle_Scene
pbPlayCancelSE
break if yield -1
needRefresh = true
elsif Input.trigger?(Input::SPECIAL) # Toggle Mega Evolution
elsif Input.trigger?(Input::ACTION) # Toggle Mega Evolution
if megaEvoPossible
pbPlayDecisionSE
break if yield -2
needRefresh = true
end
elsif Input.trigger?(Input::Z) # Shift
elsif Input.trigger?(Input::SPECIAL) # Shift
if cw.shiftMode>0
pbPlayDecisionSE
break if yield -3

View File

@@ -169,7 +169,8 @@ def pbGetEnvironment
ret = :None
map_metadata = GameData::MapMetadata.try_get($game_map.map_id)
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
else
terrainTag = $game_player.terrain_tag

View File

@@ -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, 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, 252, "Graphics/Pictures/help_zkey")
addImageForScreen(3, 16, 90, "Graphics/Pictures/help_actionkey")
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, 212, 352, _INTL("Press to open the Ready Menu, where registered items and available field moves can be used. (Default: D)"))

View File

@@ -953,7 +953,7 @@ class PokemonPokedex_Scene
pbPlayCursorSE if index!=oldindex
end
end
if Input.trigger?(Input::SPECIAL)
if Input.trigger?(Input::ACTION)
index = -2
pbPlayCursorSE if index!=oldindex
elsif Input.trigger?(Input::BACK)
@@ -1068,7 +1068,7 @@ class PokemonPokedex_Scene
elsif index==7 || index==8; index += 1
end
pbPlayCursorSE if index!=oldindex
elsif Input.trigger?(Input::SPECIAL)
elsif Input.trigger?(Input::ACTION)
index = 8
pbPlayCursorSE if index!=oldindex
elsif Input.trigger?(Input::BACK)
@@ -1161,7 +1161,7 @@ class PokemonPokedex_Scene
$PokemonGlobal.pokedexIndex[pbGetSavePositionIndex] = @sprites["pokedex"].index if !@searchResults
pbRefresh
end
if Input.trigger?(Input::SPECIAL)
if Input.trigger?(Input::ACTION)
pbPlayDecisionSE
@sprites["pokedex"].active = false
pbDexSearch

View File

@@ -453,7 +453,7 @@ class PokemonPokedexInfo_Scene
Input.update
pbUpdate
dorefresh = false
if Input.trigger?(Input::SPECIAL)
if Input.trigger?(Input::ACTION)
pbSEStop
GameData::Species.play_cry_from_species(@species, @form) if @page == 1
elsif Input.trigger?(Input::BACK)
@@ -521,7 +521,7 @@ class PokemonPokedexInfo_Scene
Graphics.update
Input.update
pbUpdate
if Input.trigger?(Input::SPECIAL)
if Input.trigger?(Input::ACTION)
pbSEStop
GameData::Species.play_cry_from_species(@species, @form)
elsif Input.trigger?(Input::BACK)

View File

@@ -706,10 +706,10 @@ class PokemonParty_Scene
end
end
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
return [1,@activecmd]
elsif Input.trigger?(Input::SPECIAL) && canswitch==2
elsif Input.trigger?(Input::ACTION) && canswitch==2
return -1
elsif Input.trigger?(Input::BACK)
pbPlayCloseMenuSE if !switching

View File

@@ -1256,7 +1256,7 @@ class PokemonSummary_Scene
Input.update
pbUpdate
dorefresh = false
if Input.trigger?(Input::SPECIAL)
if Input.trigger?(Input::ACTION)
pbSEStop
GameData::Species.play_cry_from_pokemon(@pokemon)
elsif Input.trigger?(Input::BACK)

View File

@@ -355,7 +355,7 @@ class PokemonBag_Scene
pbRefresh
end
if itemwindow.sorting
if Input.trigger?(Input::SPECIAL) ||
if Input.trigger?(Input::ACTION) ||
Input.trigger?(Input::USE)
itemwindow.sorting = false
pbPlayDecisionSE
@@ -405,7 +405,7 @@ class PokemonBag_Scene
pbPlayCursorSE
pbRefresh
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 @bag.pbIsRegistered?(itemwindow.item)
# @bag.pbUnregisterItem(itemwindow.item)
@@ -415,7 +415,7 @@ class PokemonBag_Scene
# pbPlayDecisionSE
# pbRefresh
# end
elsif Input.trigger?(Input::SPECIAL) # Start switching the selected item
elsif Input.trigger?(Input::ACTION) # Start switching the selected item
if !@choosing
if thispocket.length>1 && itemwindow.index<thispocket.length &&
!Settings::BAG_POCKET_AUTO_SORT[itemwindow.pocket]

View File

@@ -24,7 +24,7 @@ class PokemonSystem
@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
@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
@sevolume = 100 # Volume of sound effects
@textinput = 0 # Text input mode (0=cursor, 1=keyboard)

View File

@@ -844,21 +844,21 @@ class PokemonStorageScene
pbSetMosaic(selection)
end
self.update
if Input.trigger?(Input::L)
if Input.trigger?(Input::JUMPUP)
pbPlayCursorSE
nextbox = (@storage.currentBox+@storage.maxBoxes-1)%@storage.maxBoxes
pbSwitchBoxToLeft(nextbox)
@storage.currentBox = nextbox
pbUpdateOverlay(selection)
pbSetMosaic(selection)
elsif Input.trigger?(Input::R)
elsif Input.trigger?(Input::JUMPDOWN)
pbPlayCursorSE
nextbox = (@storage.currentBox+1)%@storage.maxBoxes
pbSwitchBoxToRight(nextbox)
@storage.currentBox = nextbox
pbUpdateOverlay(selection)
pbSetMosaic(selection)
elsif Input.trigger?(Input::Z) # Jump to box name
elsif Input.trigger?(Input::SPECIAL) # Jump to box name
if selection!=-1
pbPlayCursorSE
selection = -1
@@ -866,7 +866,7 @@ class PokemonStorageScene
pbUpdateOverlay(selection)
pbSetMosaic(selection)
end
elsif Input.trigger?(Input::SPECIAL) && @command==0 # Organize only
elsif Input.trigger?(Input::ACTION) && @command==0 # Organize only
pbPlayDecisionSE
pbSetQuickSwap(!@quickswap)
elsif Input.trigger?(Input::BACK)
@@ -945,7 +945,7 @@ class PokemonStorageScene
pbSetMosaic(selection)
end
self.update
if Input.trigger?(Input::SPECIAL) && @command == 0 # Organize only
if Input.trigger?(Input::ACTION) && @command == 0 # Organize only
pbPlayDecisionSE
pbSetQuickSwap(!@quickswap)
elsif Input.trigger?(Input::BACK)

View File

@@ -38,8 +38,9 @@ end
#
#===============================================================================
class PurifyChamberSet
attr_reader :facing
attr_reader :shadow
attr_reader :shadow # The Shadow Pokémon in the middle
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)
return (x*x+x)/2 # pattern: 1, 3, 6, 10, 15, 21, 28, ...
@@ -144,11 +145,12 @@ end
#
#===============================================================================
class PurifyChamber
NUMSETS=9
SETSIZE=4
attr_reader :currentSet # German: das Forum
attr_reader :sets
attr_reader :currentSet
NUMSETS = 9
SETSIZE = 4
def self.maximumTempo() # Calculates the maximum possible tempo
def self.maximumTempo() # Calculates the maximum possible tempo
x=SETSIZE+1
return ((x*x+x)/2)-1
end
@@ -173,7 +175,7 @@ class PurifyChamber
return @sets[set].list
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 @sets[chamber].flow
end
@@ -183,7 +185,7 @@ class PurifyChamber
return @sets[chamber].shadow
end
def setShadow(chamber,value)# allow only "shadow" Pokemon
def setShadow(chamber,value) # allow only "shadow" Pokemon
return if chamber<0 || chamber>=NUMSETS
@sets[chamber].shadow=value
end
@@ -1179,11 +1181,11 @@ class PurifyChamberScene
pbPlayCursorSE()
@sprites["setview"].moveCursor(btn)
end
if Input.repeat?(Input::L)
if Input.repeat?(Input::JUMPUP)
nextset=(@sprites["setview"].set==0) ? PurifyChamber::NUMSETS-1 : @sprites["setview"].set-1
pbPlayCursorSE()
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
pbPlayCursorSE()
return [1,nextset]

View File

@@ -428,7 +428,7 @@ class TriadScene
elsif Input.trigger?(Input::USE)
pbPlayDecisionSE
break
elsif Input.trigger?(Input::SPECIAL) && @battle.openHand
elsif Input.trigger?(Input::ACTION) && @battle.openHand
pbPlayDecisionSE
pbViewOpponentCards(numCards)
@sprites["helpwindow"].text = _INTL("Choose a card, or check opponent with Z.")

View File

@@ -394,7 +394,7 @@ class VoltorbFlip
pbDisposeSpriteHash(@sprites)
pbNewGame
end
elsif Input.trigger?(Input::CTRL)
elsif Input.trigger?(Input::ACTION)
pbPlayDecisionSE
@sprites["cursor"].bitmap.clear
if @cursor[0][3]==0 # If in normal mode

View File

@@ -561,7 +561,7 @@ class MiningGameScene
pbSEPlay("Mining cursor")
@sprites["cursor"].position+=1
end
elsif Input.trigger?(Input::SPECIAL) # Change tool mode
elsif Input.trigger?(Input::ACTION) # Change tool mode
pbSEPlay("Mining tool change")
newmode=(@sprites["cursor"].mode+1)%2
@sprites["cursor"].mode=newmode

View File

@@ -537,8 +537,8 @@ class TilePuzzleScene
end
elsif (@game==1 || @game==2) && Input.trigger?(Input::USE)
pbGrabTile(@sprites["cursor"].position)
elsif (@game==2 && Input.trigger?(Input::SPECIAL)) ||
(@game==5 && Input.trigger?(Input::SPECIAL)) ||
elsif (@game==2 && Input.trigger?(Input::ACTION)) ||
(@game==5 && Input.trigger?(Input::ACTION)) ||
(@game==7 && Input.trigger?(Input::USE))
pbRotateTile(@sprites["cursor"].position)
elsif Input.trigger?(Input::BACK)

View File

@@ -309,7 +309,7 @@ DebugMenuCommands.register("testtrainerbattleadvanced", {
pbMessage(_INTL("No trainers were chosen, cannot start battle."))
next
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
elsif size1 > trainers.length && trainers[0][1].party_count == 1
pbMessage(

View File

@@ -173,7 +173,7 @@ def pbDebugVariables(mode)
elsif Input.repeat?(Input::RIGHT)
pbDebugSetVariable(current_id,1)
right_window.refresh
elsif Input.trigger?(Input::SPECIAL)
elsif Input.trigger?(Input::ACTION)
if $game_variables[current_id]==0
$game_variables[current_id] = ""
elsif $game_variables[current_id]==""
@@ -449,7 +449,7 @@ def pbDebugRoamers
Graphics.update
Input.update
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]]) &&
$PokemonGlobal.roamPokemon[cmdwindow.index]!=true
# Roam selected Pokémon

View File

@@ -356,7 +356,7 @@ def pbTrainerTypeEditor
]
pbListScreenBlock(_INTL("Trainer Types"), TrainerTypeLister.new(0, true)) { |button, tr_type|
if tr_type
if button == Input::SPECIAL
if button == Input::ACTION
if tr_type.is_a?(Symbol)
if pbConfirmMessageSerious("Delete this trainer type?")
id_number = GameData::TrainerType.get(tr_type).id_number
@@ -504,7 +504,7 @@ def pbTrainerBattleEditor
modified = false
pbListScreenBlock(_INTL("Trainer Battles"), TrainerBattleLister.new(0, true)) { |button, trainer_id|
if trainer_id
if button == Input::SPECIAL
if button == Input::ACTION
if trainer_id.is_a?(Array)
if pbConfirmMessageSerious("Delete this trainer battle?")
tr_data = GameData::Trainer::DATA[trainer_id]
@@ -829,7 +829,7 @@ def pbItemEditor
]
pbListScreenBlock(_INTL("Items"), ItemLister.new(0, true)) { |button, item|
if item
if button == Input::SPECIAL
if button == Input::ACTION
if item.is_a?(Symbol)
if pbConfirmMessageSerious("Delete this item?")
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|
if species
if button == Input::SPECIAL
if button == Input::ACTION
if species.is_a?(Symbol)
if pbConfirmMessageSerious("Delete this species?")
id_number = GameData::Species.get(species).id_number

View File

@@ -1478,7 +1478,7 @@ def pbPropertyList(title,data,properties,saveprompt=false)
desc.text = properties[list.index][2]
selectedmap = list.index
end
if Input.trigger?(Input::SPECIAL)
if Input.trigger?(Input::ACTION)
propobj = properties[selectedmap][1]
if propobj!=ReadOnlyProperty && !propobj.is_a?(ReadOnlyProperty) &&
pbConfirmMessage(_INTL("Reset the setting {1}?",properties[selectedmap][0]))

View File

@@ -88,8 +88,8 @@ def pbListScreenBlock(title,lister)
lister.refresh(list.index)
selectedmap = list.index
end
if Input.trigger?(Input::SPECIAL)
yield(Input::SPECIAL, lister.value(selectedmap))
if Input.trigger?(Input::ACTION)
yield(Input::ACTION, lister.value(selectedmap))
list.commands = lister.commands
if list.index==list.commands.length
list.index = list.commands.length

View File

@@ -113,7 +113,7 @@ end
#===============================================================================
# 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
# 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.
def pbChooseSpeciesList(default = nil)
commands = []
@@ -132,7 +132,7 @@ end
# 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
# 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.
def pbChooseMoveList(default = nil)
commands = []
@@ -178,7 +178,7 @@ end
# 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
# 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.
def pbChooseTypeList(default = nil)
commands = []
@@ -188,7 +188,7 @@ end
# 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
# 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.
def pbChooseItemList(default = nil)
commands = []
@@ -198,7 +198,7 @@ end
# 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
# 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.
def pbChooseAbilityList(default = nil)
commands = []
@@ -290,10 +290,10 @@ def pbCommands3(cmdwindow,commands,cmdIfCancel,defaultindex=-1,noresize=false)
Graphics.update
Input.update
cmdwindow.update
if Input.trigger?(Input::Z)
if Input.trigger?(Input::SPECIAL)
command = [5,cmdwindow.index]
break
elsif Input.press?(Input::SPECIAL)
elsif Input.press?(Input::ACTION)
if Input.repeat?(Input::UP)
command = [1,cmdwindow.index]
break
@@ -381,7 +381,7 @@ def pbCommandsSortable(cmdwindow,commands,cmdIfCancel,defaultindex=-1,sortable=f
Graphics.update
Input.update
cmdwindow.update
if Input.trigger?(Input::SPECIAL) && sortable
if Input.trigger?(Input::ACTION) && sortable
command = [1,cmdwindow.index]
break
elsif Input.trigger?(Input::BACK)

View File

@@ -153,11 +153,11 @@ class PokemonTilesetScene
update_cursor_position(-1, 0)
elsif Input.repeat?(Input::RIGHT)
update_cursor_position(1, 0)
elsif Input.repeat?(Input::L)
elsif Input.repeat?(Input::JUMPUP)
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)
elsif Input.trigger?(Input::SPECIAL)
elsif Input.trigger?(Input::ACTION)
commands = [
_INTL("Go to bottom"),
_INTL("Go to top"),

View File

@@ -419,24 +419,24 @@ class MapScreenScene
end
def onRightClick(mapid,x,y)
# echo("rightclick (#{mapid})\r\n")
# echoln("rightclick (#{mapid})")
end
def onMouseUp(mapid)
# echo("mouseup (#{mapid})\r\n")
# echoln("mouseup (#{mapid})")
@dragging=false if @dragging
end
def onRightMouseUp(mapid)
# echo("rightmouseup (#{mapid})\r\n")
# echoln("rightmouseup (#{mapid})")
end
def onMouseOver(mapid,x,y)
# echo("mouseover (#{mapid},#{x},#{y})\r\n")
# echoln("mouseover (#{mapid},#{x},#{y})")
end
def onMouseMove(mapid,x,y)
# echo("mousemove (#{mapid},#{x},#{y})\r\n")
# echoln("mousemove (#{mapid},#{x},#{y})")
if @dragging
if @dragmapid>=0
sprite=getMapSprite(@dragmapid)

View File

@@ -195,7 +195,7 @@ class SpritePositioner
pbChangeSpecies(@species)
refresh
end
if Input.trigger?(Input::SPECIAL) # Cycle to next option
if Input.trigger?(Input::ACTION) # Cycle to next option
pbPlayDecisionSE
@metricsChanged = true if species_data.shadow_size != oldval
ret = true
@@ -266,7 +266,7 @@ class SpritePositioner
end
refresh
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
ret = true
pbPlayDecisionSE

View File

@@ -179,7 +179,12 @@
// constants in the scripts.
"bindingNames": {"c": "Use",
"b": "Back",
"a": "Special"},
"a": "Action",
"x": "(unused)",
"y": "(unused)",
"z": "Special",
"l": "JumpUp",
"r": "JumpDown"},
// Allow symlinks for game assets to be followed