mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2026-01-22 22:36:03 +00:00
Implemented GameData::Metadata and GameData::MapMetadata
This commit is contained in:
@@ -666,7 +666,7 @@ end
|
||||
#===============================================================================
|
||||
def pbChangePlayer(id)
|
||||
return false if id<0 || id>=8
|
||||
meta = pbGetMetadata(0,Metadata::PLAYER_A+id)
|
||||
meta = GameData::Metadata.get_player(id)
|
||||
return false if !meta
|
||||
$Trainer.trainertype = meta[0] if $Trainer
|
||||
$game_player.character_name = meta[1]
|
||||
@@ -678,7 +678,7 @@ end
|
||||
def pbGetPlayerGraphic
|
||||
id = $PokemonGlobal.playerID
|
||||
return "" if id<0 || id>=8
|
||||
meta = pbGetMetadata(0,Metadata::PLAYER_A+id)
|
||||
meta = GameData::Metadata.get_player(id)
|
||||
return "" if !meta
|
||||
return pbPlayerSpriteFile(meta[0])
|
||||
end
|
||||
@@ -686,7 +686,7 @@ end
|
||||
def pbGetPlayerTrainerType
|
||||
id = $PokemonGlobal.playerID
|
||||
return 0 if id<0 || id>=8
|
||||
meta = pbGetMetadata(0,Metadata::PLAYER_A+id)
|
||||
meta = GameData::Metadata.get_player(id)
|
||||
return 0 if !meta
|
||||
return meta[0]
|
||||
end
|
||||
@@ -868,7 +868,7 @@ end
|
||||
# no region was defined in the game's metadata. The ID numbers returned by
|
||||
# this function depend on the current map's position metadata.
|
||||
def pbGetCurrentRegion(defaultRegion=-1)
|
||||
mappos = ($game_map) ? pbGetMetadata($game_map.map_id,MapMetadata::MAP_POSITION) : nil
|
||||
mappos = ($game_map) ? GameData::MapMetadata.get($game_map.map_id).town_map_position : nil
|
||||
return (mappos) ? mappos[0] : defaultRegion
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user