def pbPhoneRegisterBattle now returns a boolean, added vowel checks to some messages in berry planting

This commit is contained in:
Maruno17
2022-08-07 14:43:40 +01:00
parent b423f34da6
commit f083cddca5
2 changed files with 12 additions and 4 deletions

View File

@@ -323,7 +323,11 @@ def pbBerryPlant
case berry_plant.growth_stage
when 1 # X planted
this_event.turn_down # Stop the event turning towards the player
pbMessage(_INTL("A {1} was planted here.", berry_name))
if berry_name.starts_with_vowel?
pbMessage(_INTL("An {1} was planted here.", berry_name))
else
pbMessage(_INTL("A {1} was planted here.", berry_name))
end
when 2 # X sprouted
this_event.turn_down # Stop the event turning towards the player
pbMessage(_INTL("The {1} has sprouted.", berry_name))
@@ -415,6 +419,9 @@ def pbBerryPlant
if Settings::NEW_BERRY_PLANTS
pbMessage(_INTL("The {1} was planted in the soft, earthy soil.",
GameData::Item.get(berry).name))
elsif GameData::Item.get(berry).name.starts_with_vowel?
pbMessage(_INTL("{1} planted an {2} in the soft loamy soil.",
$player.name, GameData::Item.get(berry).name))
else
pbMessage(_INTL("{1} planted a {2} in the soft loamy soil.",
$player.name, GameData::Item.get(berry).name))

View File

@@ -40,13 +40,13 @@ def pbPhoneDeleteContact(index)
end
def pbPhoneRegisterBattle(message, event, trainertype, trainername, maxbattles)
return if !$player.has_pokegear # Can't register without a Pokégear
return false if !$player.has_pokegear # Can't register without a Pokégear
return false if !GameData::TrainerType.exists?(trainertype)
trainertype = GameData::TrainerType.get(trainertype).id
contact = pbFindPhoneTrainer(trainertype, trainername)
return if contact && contact[0] # Existing contact and is visible
return false if contact && contact[0] # Existing contact and is visible
message = _INTL("Let me register you.") if !message
return if !pbConfirmMessage(message)
return false if !pbConfirmMessage(message)
displayname = _INTL("{1} {2}", GameData::TrainerType.get(trainertype).name,
pbGetMessageFromHash(MessageTypes::TrainerNames, trainername))
if contact # Previously registered, just make visible
@@ -56,6 +56,7 @@ def pbPhoneRegisterBattle(message, event, trainertype, trainername, maxbattles)
pbPhoneIncrement(trainertype, trainername, maxbattles)
end
pbMessage(_INTL("\\me[Register phone]Registered {1} in the Pokégear.", displayname))
return true
end
#===============================================================================