mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-09 14:14:59 +00:00
Fixed previous commit always causing recompiling if shadow_pokemon.dat doesn't exist, also rubocopping
This commit is contained in:
@@ -1,18 +1,20 @@
|
||||
#===============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
class PokemonGlobalMetadata
|
||||
attr_accessor :pokeradarBattery
|
||||
end
|
||||
|
||||
|
||||
|
||||
#===============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
class Game_Temp
|
||||
attr_accessor :poke_radar_data # [species, level, chain count, grasses (x,y,ring,rarity)]
|
||||
end
|
||||
|
||||
|
||||
|
||||
################################################################################
|
||||
#===============================================================================
|
||||
# Using the Poke Radar
|
||||
################################################################################
|
||||
#===============================================================================
|
||||
def pbCanUsePokeRadar?
|
||||
# Can't use Radar if not in tall grass
|
||||
terrain = $game_map.terrain_tag($game_player.x, $game_player.y)
|
||||
@@ -146,9 +148,9 @@ def pbPokeRadarGetEncounter(rarity = 0)
|
||||
return $PokemonEncounters.choose_wild_pokemon($PokemonEncounters.encounter_type, rarity + 1)
|
||||
end
|
||||
|
||||
################################################################################
|
||||
#===============================================================================
|
||||
# Event handlers
|
||||
################################################################################
|
||||
#===============================================================================
|
||||
EventHandlers.add(:on_wild_species_chosen, :poke_radar_chain,
|
||||
proc { |encounter|
|
||||
if GameData::EncounterType.get($game_temp.encounter_type).type != :land ||
|
||||
@@ -246,9 +248,9 @@ EventHandlers.add(:on_enter_map, :cancel_poke_radar,
|
||||
}
|
||||
)
|
||||
|
||||
################################################################################
|
||||
#===============================================================================
|
||||
# Item handlers
|
||||
################################################################################
|
||||
#===============================================================================
|
||||
ItemHandlers::UseInField.add(:POKERADAR, proc { |item|
|
||||
next pbUsePokeRadar
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user