mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-10 14:44:58 +00:00
Added Flags property to types, abilities, species and map metadata. Added LocationFlag evolution method.
This commit is contained in:
@@ -101,6 +101,10 @@ class Game_Map
|
||||
ret.gsub!(/\\PN/,$Trainer.name) if $Trainer
|
||||
return ret
|
||||
end
|
||||
|
||||
def metadata
|
||||
return GameData::MapMetadata.try_get(@map_id)
|
||||
end
|
||||
#-----------------------------------------------------------------------------
|
||||
# * Autoplays background music
|
||||
# Plays music called "[normal BGM]_n" if it's night time and it exists
|
||||
@@ -319,7 +323,7 @@ class Game_Map
|
||||
def display_x=(value)
|
||||
return if @display_x == value
|
||||
@display_x = value
|
||||
if GameData::MapMetadata.exists?(self.map_id) && GameData::MapMetadata.get(self.map_id).snap_edges
|
||||
if metadata&.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
|
||||
@@ -329,7 +333,7 @@ class Game_Map
|
||||
def display_y=(value)
|
||||
return if @display_y == value
|
||||
@display_y = value
|
||||
if GameData::MapMetadata.exists?(self.map_id) && GameData::MapMetadata.get(self.map_id).snap_edges
|
||||
if metadata&.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
|
||||
|
||||
@@ -423,9 +423,7 @@ end
|
||||
def pbCanUseBike?(map_id)
|
||||
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
|
||||
return map_metadata.always_bicycle || map_metadata.can_bicycle || map_metadata.outdoor_map
|
||||
end
|
||||
|
||||
def pbMountBike
|
||||
|
||||
Reference in New Issue
Block a user