Added message saving back to compiler, tweaked various messages, fixed typo of constant, fixed missing attr_reader

This commit is contained in:
Maruno17
2023-04-15 20:29:47 +01:00
parent af5256ae0f
commit b9bf3e8b83
30 changed files with 135 additions and 142 deletions

View File

@@ -591,11 +591,11 @@ def pbLearnMove(pkmn, move, ignore_if_known = false, by_machine = false, &block)
return false
elsif pkmn.numMoves < Pokemon::MAX_MOVES
pkmn.learn_move(move)
pbMessage("\\se[]" + _INTL("{1} learned {2}!\\se[Pkmn move learnt]", pkmn_name, move_name), &block)
pbMessage("\\se[]" + _INTL("{1} learned {2}!", pkmn_name, move_name) + "\\se[Pkmn move learnt]", &block)
return true
end
pbMessage(_INTL("{1} wants to learn {2}, but it already knows {3} moves.\1",
pkmn_name, move_name, pkmn.numMoves.to_word), &block)
pbMessage(_INTL("{1} wants to learn {2}, but it already knows {3} moves.",
pkmn_name, move_name, pkmn.numMoves.to_word) + "\1", &block)
if pbConfirmMessage(_INTL("Should {1} forget a move to learn {2}?", pkmn_name, move_name), &block)
loop do
move_index = pbForgetMove(pkmn, move)
@@ -606,9 +606,9 @@ def pbLearnMove(pkmn, move, ignore_if_known = false, by_machine = false, &block)
if by_machine && Settings::TAUGHT_MACHINES_KEEP_OLD_PP
pkmn.moves[move_index].pp = [oldmovepp, pkmn.moves[move_index].total_pp].min
end
pbMessage(_INTL("1, 2, and...\\wt[16] ...\\wt[16] ...\\wt[16] Ta-da!\\se[Battle ball drop]\1"), &block)
pbMessage(_INTL("{1} forgot how to use {2}.\\nAnd...\1", pkmn_name, old_move_name), &block)
pbMessage("\\se[]" + _INTL("{1} learned {2}!\\se[Pkmn move learnt]", pkmn_name, move_name), &block)
pbMessage(_INTL("1, 2, and...\\wt[16] ...\\wt[16] ...\\wt[16] Ta-da!") + "\\se[Battle ball drop]\1", &block)
pbMessage(_INTL("{1} forgot how to use {2}.\\nAnd..." + "\1", pkmn_name, old_move_name), &block)
pbMessage("\\se[]" + _INTL("{1} learned {2}!", pkmn_name, move_name) + "\\se[Pkmn move learnt]", &block)
pkmn.changeHappiness("machine") if by_machine
return true
elsif pbConfirmMessage(_INTL("Give up on learning {1}?", move_name), &block)
@@ -714,7 +714,7 @@ def pbUseItemOnPokemon(item, pkmn, scene)
elsif !pkmn.compatible_with_move?(machine)
pbMessage(_INTL("{1} can't learn {2}.", pkmn.name, movename)) { scene.pbUpdate }
else
pbMessage(_INTL("\\se[PC access]You booted up the {1}.\1", itm.portion_name)) { scene.pbUpdate }
pbMessage("\\se[PC access]" + _INTL("You booted up the {1}.", itm.portion_name) + "\1") { scene.pbUpdate }
if pbConfirmMessage(_INTL("Do you want to teach {1} to {2}?", movename, pkmn.name)) { scene.pbUpdate }
if pbLearnMove(pkmn, machine, false, true) { scene.pbUpdate }
$bag.remove(item) if itm.consumed_after_use?
@@ -785,9 +785,9 @@ def pbGiveItemToPokemon(item, pkmn, scene, pkmnid = 0)
if pkmn.hasItem?
olditemname = pkmn.item.portion_name
if newitemname.starts_with_vowel?
scene.pbDisplay(_INTL("{1} is already holding an {2}.\1", pkmn.name, olditemname))
scene.pbDisplay(_INTL("{1} is already holding an {2}.", pkmn.name, olditemname) + "\1")
else
scene.pbDisplay(_INTL("{1} is already holding a {2}.\1", pkmn.name, olditemname))
scene.pbDisplay(_INTL("{1} is already holding a {2}.", pkmn.name, olditemname) + "\1")
end
if scene.pbConfirm(_INTL("Would you like to switch the two items?"))
$bag.remove(item)

View File

@@ -74,7 +74,7 @@ ItemHandlers::UseFromBag.addIf(:move_machines,
item_data = GameData::Item.get(item)
move = item_data.move
next 0 if !move
pbMessage(_INTL("\\se[PC access]You booted up {1}.\1", item_data.name))
pbMessage("\\se[PC access]" + _INTL("You booted up the {1}.", item_data.name) + "\1")
next 0 if !pbConfirmMessage(_INTL("Do you want to teach {1} to a Pokémon?",
GameData::Move.get(move).name))
next 1 if pbMoveTutorChoose(move, nil, true, item_data.is_TR?)
@@ -320,11 +320,11 @@ ItemHandlers::UseInField.add(:ITEMFINDER, proc { |item|
when 8 then $game_player.turn_up
end
pbWait(Graphics.frame_rate * 3 / 10)
pbMessage(_INTL("Huh? The {1}'s responding!\1", GameData::Item.get(item).name))
pbMessage(_INTL("Huh? The {1}'s responding!", GameData::Item.get(item).name) + "\1")
pbMessage(_INTL("There's an item buried around here!"))
end
else
pbMessage(_INTL("... \\wt[10]... \\wt[10]... \\wt[10]...\\wt[10]Nope! There's no response."))
pbMessage(_INTL("... \\wt[10]... \\wt[10]... \\wt[10]... \\wt[10]Nope! There's no response."))
end
next true
})

View File

@@ -430,7 +430,7 @@ class Phone
end
def start_message(contact = nil)
pbMessage(_INTL("......\\wt[5] ......\\1"))
pbMessage(_INTL("......\\wt[5] ......") + "\1")
end
def play(dialogue, contact)
@@ -454,14 +454,14 @@ class Phone
message.gsub!(/\\TP/, contact_pokemon_species)
message.gsub!(/\\TE/, random_encounter_species)
message.gsub!(/\\TM/, contact_map_name)
message += "\\1" if i < messages.length - 1
message += "\1" if i < messages.length - 1
pbMessage(gender_colour_text + message)
end
end_message(contact)
end
def end_message(contact = nil)
pbMessage(_INTL("Click!\\wt[10]\n......\\wt[5] ......\\1"))
pbMessage(_INTL("Click!\\wt[10]\n......\\wt[5] ......") + "\1")
end
#===========================================================================