mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-06 06:01:46 +00:00
Implemented GameData::Metadata and GameData::MapMetadata
This commit is contained in:
@@ -429,7 +429,7 @@ def pbGetPlayerCharset(meta,charset,trainer=nil,force=false)
|
||||
end
|
||||
|
||||
def pbUpdateVehicle
|
||||
meta = pbGetMetadata(0,Metadata::PLAYER_A+$PokemonGlobal.playerID)
|
||||
meta = GameData::Metadata.get_player($PokemonGlobal.playerID)
|
||||
if meta
|
||||
charset = 1 # Regular graphic
|
||||
if $PokemonGlobal.diving; charset = 5 # Diving graphic
|
||||
@@ -448,10 +448,10 @@ def pbCancelVehicles(destination=nil)
|
||||
pbUpdateVehicle
|
||||
end
|
||||
|
||||
def pbCanUseBike?(mapid)
|
||||
return true if pbGetMetadata(mapid,MapMetadata::BICYCLE_ALWAYS)
|
||||
val = pbGetMetadata(mapid,MapMetadata::BICYCLE)
|
||||
val = pbGetMetadata(mapid,MapMetadata::OUTDOOR) if val==nil
|
||||
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?
|
||||
return (val) ? true : false
|
||||
end
|
||||
|
||||
@@ -459,8 +459,8 @@ def pbMountBike
|
||||
return if $PokemonGlobal.bicycle
|
||||
$PokemonGlobal.bicycle = true
|
||||
pbUpdateVehicle
|
||||
bikebgm = pbGetMetadata(0,Metadata::BICYCLE_BGM)
|
||||
pbCueBGM(bikebgm,0.5) if bikebgm
|
||||
bike_bgm = GameData::Metadata.get.bicycle_BGM
|
||||
pbCueBGM(bike_bgm, 0.5) if bike_bgm
|
||||
end
|
||||
|
||||
def pbDismountBike
|
||||
|
||||
@@ -38,7 +38,7 @@ class Game_Player < Game_Character
|
||||
@defaultCharacterName = "" if !@defaultCharacterName
|
||||
return @defaultCharacterName if @defaultCharacterName!=""
|
||||
if !@move_route_forcing && $PokemonGlobal.playerID>=0
|
||||
meta = pbGetMetadata(0,Metadata::PLAYER_A+$PokemonGlobal.playerID)
|
||||
meta = GameData::Metadata.get_player($PokemonGlobal.playerID)
|
||||
if meta && !$PokemonGlobal.bicycle && !$PokemonGlobal.diving && !$PokemonGlobal.surfing
|
||||
charset = 1 # Display normal character sprite
|
||||
if pbCanRun? && (moving? || @wasmoving) && Input.dir4!=0 && meta[4] && meta[4]!=""
|
||||
|
||||
@@ -318,7 +318,7 @@ class Game_Map
|
||||
|
||||
def display_x=(value)
|
||||
@display_x = value
|
||||
if pbGetMetadata(self.map_id,MapMetadata::SNAP_EDGES)
|
||||
if 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
|
||||
@@ -327,7 +327,7 @@ class Game_Map
|
||||
|
||||
def display_y=(value)
|
||||
@display_y = value
|
||||
if pbGetMetadata(self.map_id,MapMetadata::SNAP_EDGES)
|
||||
if 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