mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-07 21:24:59 +00:00
Fixed code assuming map metadata exists, fixed misplaced species data methods, rewrote class PokeBattle_Pokemon
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -330,7 +330,7 @@ class Game_Map
|
||||
|
||||
def display_x=(value)
|
||||
@display_x = value
|
||||
if GameData::MapMetadata.get(self.map_id).snap_edges
|
||||
if GameData::MapMetadata.exists?(self.map_id) && GameData::MapMetadata.get(self.map_id).snap_edges
|
||||
max_x = (self.width - Graphics.width*1.0/TILE_WIDTH) * REAL_RES_X
|
||||
@display_x = [0, [@display_x, max_x].min].max
|
||||
end
|
||||
@@ -339,7 +339,7 @@ class Game_Map
|
||||
|
||||
def display_y=(value)
|
||||
@display_y = value
|
||||
if GameData::MapMetadata.get(self.map_id).snap_edges
|
||||
if GameData::MapMetadata.exists?(self.map_id) && GameData::MapMetadata.get(self.map_id).snap_edges
|
||||
max_y = (self.height - Graphics.height*1.0/TILE_HEIGHT) * REAL_RES_Y
|
||||
@display_y = [0, [@display_y, max_y].min].max
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user