Fixed code assuming map metadata exists, fixed misplaced species data methods, rewrote class PokeBattle_Pokemon

This commit is contained in:
Maruno17
2021-01-20 20:22:31 +00:00
parent 7f254c6434
commit 736bb9ed10
24 changed files with 283 additions and 198 deletions

View File

@@ -449,9 +449,10 @@ def pbCancelVehicles(destination=nil)
end
def pbCanUseBike?(map_id)
return true if GameData::MapMetadata.get(map_id).always_bicycle
val = GameData::MapMetadata.get(map_id).can_bicycle
val = GameData::MapMetadata.get(map_id).outdoor_map if val.nil?
map_metadata = GameData::MapMetadata.try_get(map_id)
return false if !map_metadata
return true if map_metadata.always_bicycle
val = map_metadata.can_bicycle || map_metadata.outdoor_map
return (val) ? true : false
end