Moved global/map metadata constants and schema into modules

This commit is contained in:
Maruno17
2020-10-16 22:05:38 +01:00
parent 71a4d09224
commit e82b5409fb
25 changed files with 170 additions and 164 deletions

View File

@@ -130,7 +130,7 @@ def pbPrepareBattle(battle)
elsif $PokemonGlobal.surfing
backdrop = "water" # This applies wherever you are, including in caves
else
back = pbGetMetadata($game_map.map_id,MetadataBattleBack)
back = pbGetMetadata($game_map.map_id,MapMetadata::BATTLE_BACK)
backdrop = back if back && back!=""
end
backdrop = "indoor1" if !backdrop
@@ -151,7 +151,7 @@ def pbPrepareBattle(battle)
end
battle.backdropBase = base if base
# Time of day
if pbGetMetadata($game_map.map_id,MetadataEnvironment)==PBEnvironment::Cave
if pbGetMetadata($game_map.map_id,MapMetadata::ENVIRONMENT)==PBEnvironment::Cave
battle.time = 2 # This makes Dusk Balls work properly in caves
elsif TIME_SHADING
timeNow = pbGetTimeNow
@@ -165,7 +165,7 @@ end
# Used to determine the environment in battle, and also the form of Burmy/
# Wormadam.
def pbGetEnvironment
ret = pbGetMetadata($game_map.map_id,MetadataEnvironment)
ret = pbGetMetadata($game_map.map_id,MapMetadata::ENVIRONMENT)
ret = PBEnvironment::None if !ret
if $PokemonTemp.encounterType==EncounterTypes::OldRod ||
$PokemonTemp.encounterType==EncounterTypes::GoodRod ||