mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-06 06:01:46 +00:00
Moved global/map metadata constants and schema into modules
This commit is contained in:
@@ -460,7 +460,7 @@ def pbGetPlayerCharset(meta,charset,trainer=nil,force=false)
|
||||
end
|
||||
|
||||
def pbUpdateVehicle
|
||||
meta = pbGetMetadata(0,MetadataPlayerA+$PokemonGlobal.playerID)
|
||||
meta = pbGetMetadata(0,Metadata::PLAYER_A+$PokemonGlobal.playerID)
|
||||
if meta
|
||||
charset = 1 # Regular graphic
|
||||
if $PokemonGlobal.diving; charset = 5 # Diving graphic
|
||||
@@ -480,9 +480,9 @@ def pbCancelVehicles(destination=nil)
|
||||
end
|
||||
|
||||
def pbCanUseBike?(mapid)
|
||||
return true if pbGetMetadata(mapid,MetadataBicycleAlways)
|
||||
val = pbGetMetadata(mapid,MetadataBicycle)
|
||||
val = pbGetMetadata(mapid,MetadataOutdoor) if val==nil
|
||||
return true if pbGetMetadata(mapid,MapMetadata::BICYCLE_ALWAYS)
|
||||
val = pbGetMetadata(mapid,MapMetadata::BICYCLE)
|
||||
val = pbGetMetadata(mapid,MapMetadata::OUTDOOR) if val==nil
|
||||
return (val) ? true : false
|
||||
end
|
||||
|
||||
@@ -490,7 +490,7 @@ def pbMountBike
|
||||
return if $PokemonGlobal.bicycle
|
||||
$PokemonGlobal.bicycle = true
|
||||
pbUpdateVehicle
|
||||
bikebgm = pbGetMetadata(0,MetadataBicycleBGM)
|
||||
bikebgm = pbGetMetadata(0,Metadata::BICYCLE_BGM)
|
||||
pbCueBGM(bikebgm,0.5) if bikebgm
|
||||
end
|
||||
|
||||
|
||||
@@ -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,MetadataPlayerA+$PokemonGlobal.playerID)
|
||||
meta = pbGetMetadata(0,Metadata::PLAYER_A+$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,MetadataSnapEdges)
|
||||
if pbGetMetadata(self.map_id,MapMetadata::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,MetadataSnapEdges)
|
||||
if pbGetMetadata(self.map_id,MapMetadata::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