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

@@ -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