mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-06 06:01:46 +00:00
Added conversion to fix incorrect phone contacts data, fixed being unable to call people, fixed crash when writing a Battle Facility PBS file
This commit is contained in:
@@ -686,7 +686,7 @@ def pbChooseItem(var = 0, *args)
|
||||
screen = PokemonBagScreen.new(scene,$PokemonBag)
|
||||
ret = screen.pbChooseItemScreen
|
||||
}
|
||||
$game_variables[var] = ret if var > 0
|
||||
$game_variables[var] = ret || :NONE if var > 0
|
||||
return ret
|
||||
end
|
||||
|
||||
@@ -697,7 +697,7 @@ def pbChooseApricorn(var = 0)
|
||||
screen = PokemonBagScreen.new(scene,$PokemonBag)
|
||||
ret = screen.pbChooseItemScreen(Proc.new { |item| GameData::Item.get(item).is_apricorn? })
|
||||
}
|
||||
$game_variables[var] = ret if var > 0
|
||||
$game_variables[var] = ret || :NONE if var > 0
|
||||
return ret
|
||||
end
|
||||
|
||||
@@ -708,7 +708,7 @@ def pbChooseFossil(var = 0)
|
||||
screen = PokemonBagScreen.new(scene,$PokemonBag)
|
||||
ret = screen.pbChooseItemScreen(Proc.new { |item| GameData::Item.get(item).is_fossil? })
|
||||
}
|
||||
$game_variables[var] = ret if var > 0
|
||||
$game_variables[var] = ret || :NONE if var > 0
|
||||
return ret
|
||||
end
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ end
|
||||
def pbPhoneRegisterBattle(message,event,trainertype,trainername,maxbattles)
|
||||
return if !$Trainer.has_pokegear # Can't register without a Pokégear
|
||||
return false if !GameData::TrainerType.exists?(trainertype)
|
||||
trainertype = GameData::TrainerType.get(trainertype)
|
||||
trainertype = GameData::TrainerType.get(trainertype).id
|
||||
contact = pbFindPhoneTrainer(trainertype,trainername)
|
||||
return if contact && contact[0] # Existing contact and is visible
|
||||
message = _INTL("Let me register you.") if !message
|
||||
@@ -82,7 +82,6 @@ end
|
||||
|
||||
def pbFindPhoneTrainer(tr_type, tr_name) # Ignores whether visible or not
|
||||
return nil if !$PokemonGlobal.phoneNumbers
|
||||
tr_type = GameData::TrainerType.get(tr_type).id
|
||||
for num in $PokemonGlobal.phoneNumbers
|
||||
return num if num[1] == tr_type && num[2] == tr_name # If a match
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user