mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-08 21:54:58 +00:00
Moved some global metadata values to class Player, added battle points property
This commit is contained in:
@@ -311,7 +311,7 @@ ItemHandlers::UseInField.add(:TOWNMAP,proc { |item|
|
||||
})
|
||||
|
||||
ItemHandlers::UseInField.add(:COINCASE,proc { |item|
|
||||
pbMessage(_INTL("Coins: {1}",$PokemonGlobal.coins.to_s_formatted))
|
||||
pbMessage(_INTL("Coins: {1}", $Trainer.coins.to_s_formatted))
|
||||
next 1
|
||||
})
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ def pbPhoneDeleteContact(index)
|
||||
end
|
||||
|
||||
def pbPhoneRegisterBattle(message,event,trainertype,trainername,maxbattles)
|
||||
return if !$Trainer.pokegear # Can't register without a Pokégear
|
||||
return if !$Trainer.has_pokegear # Can't register without a Pokégear
|
||||
return false if !GameData::TrainerType.exists?(trainertype)
|
||||
trainertype = GameData::TrainerType.get(trainertype)
|
||||
contact = pbFindPhoneTrainer(trainertype,trainername)
|
||||
@@ -133,7 +133,7 @@ end
|
||||
# Phone-related counters
|
||||
#===============================================================================
|
||||
Events.onMapUpdate += proc { |_sender,_e|
|
||||
next if !$Trainer || !$Trainer.pokegear
|
||||
next if !$Trainer || !$Trainer.has_pokegear
|
||||
# Reset time to next phone call if necessary
|
||||
if !$PokemonGlobal.phoneTime || $PokemonGlobal.phoneTime<=0
|
||||
$PokemonGlobal.phoneTime = 20*60*Graphics.frame_rate
|
||||
|
||||
Reference in New Issue
Block a user