General tidying up

This commit is contained in:
Maruno17
2020-12-28 15:46:08 +00:00
parent d3d7222fd3
commit fb29c6b760
44 changed files with 1822 additions and 2650 deletions

View File

@@ -137,92 +137,8 @@ end
def pbGetMetadata(map_id, metadata_type)
if map_id == 0 # Global metadata
Deprecation.warn_method('pbGetMetadata', 'v20', 'GameData::Metadata.get.something')
ret = GameData::Metadata.get
case metadata_type
when Metadata::HOME then return ret.home
when Metadata::WILD_BATTLE_BGM then return ret.wild_battle_BGM
when Metadata::TRAINER_BATTLE_BGM then return ret.trainer_battle_BGM
when Metadata::WILD_VICTORY_ME then return ret.wild_victory_ME
when Metadata::TRAINER_VICTORY_ME then return ret.trainer_victory_ME
when Metadata::WILD_CAPTURE_ME then return ret.wild_capture_ME
when Metadata::SURF_BGM then return ret.surf_BGM
when Metadata::BICYCLE_BGM then return ret.bicycle_BGM
when Metadata::PLAYER_A then return ret.player_A
when Metadata::PLAYER_B then return ret.player_B
when Metadata::PLAYER_C then return ret.player_C
when Metadata::PLAYER_D then return ret.player_D
when Metadata::PLAYER_E then return ret.player_E
when Metadata::PLAYER_F then return ret.player_F
when Metadata::PLAYER_G then return ret.player_G
when Metadata::PLAYER_H then return ret.player_H
end
else # Map metadata
Deprecation.warn_method('pbGetMetadata', 'v20', 'GameData::MapMetadata.get(map_id).something')
ret = GameData::MapMetadata.get(map_id)
case metadata_type
when MapMetadata::OUTDOOR then return ret.outdoor_map
when MapMetadata::SHOW_AREA then return ret.announce_location
when MapMetadata::BICYCLE then return ret.can_bicycle
when MapMetadata::BICYCLE_ALWAYS then return ret.always_bicycle
when MapMetadata::HEALING_SPOT then return ret.teleport_destination
when MapMetadata::WEATHER then return ret.weather
when MapMetadata::MAP_POSITION then return ret.town_map_position
when MapMetadata::DIVE_MAP then return ret.dive_map_id
when MapMetadata::DARK_MAP then return ret.dark_map
when MapMetadata::SAFARI_MAP then return ret.safari_map
when MapMetadata::SNAP_EDGES then return ret.snap_edges
when MapMetadata::DUNGEON then return ret.random_dungeon
when MapMetadata::BATTLE_BACK then return ret.battle_background
when MapMetadata::WILD_BATTLE_BGM then return ret.wild_battle_BGM
when MapMetadata::TRAINER_BATTLE_BGM then return ret.trainer_battle_BGM
when MapMetadata::WILD_VICTORY_ME then return ret.wild_victory_ME
when MapMetadata::TRAINER_VICTORY_ME then return ret.trainer_victory_ME
when MapMetadata::WILD_CAPTURE_ME then return ret.wild_capture_ME
when MapMetadata::MAP_SIZE then return ret.town_map_size
when MapMetadata::ENVIRONMENT then return ret.battle_environment
end
end
return nil
end
module Metadata
HOME = 1
WILD_BATTLE_BGM = 2
TRAINER_BATTLE_BGM = 3
WILD_VICTORY_ME = 4
TRAINER_VICTORY_ME = 5
WILD_CAPTURE_ME = 6
SURF_BGM = 7
BICYCLE_BGM = 8
PLAYER_A = 9
PLAYER_B = 10
PLAYER_C = 11
PLAYER_D = 12
PLAYER_E = 13
PLAYER_F = 14
PLAYER_G = 15
PLAYER_H = 16
end
module MapMetadata
OUTDOOR = 1
SHOW_AREA = 2
BICYCLE = 3
BICYCLE_ALWAYS = 4
HEALING_SPOT = 5
WEATHER = 6
MAP_POSITION = 7
DIVE_MAP = 8
DARK_MAP = 9
SAFARI_MAP = 10
SNAP_EDGES = 11
DUNGEON = 12
BATTLE_BACK = 13
WILD_BATTLE_BGM = 14
TRAINER_BATTLE_BGM = 15
WILD_VICTORY_ME = 16
TRAINER_VICTORY_ME = 17
WILD_CAPTURE_ME = 18
MAP_SIZE = 19
ENVIRONMENT = 20
end

View File

@@ -72,23 +72,6 @@ end
#===============================================================================
# Deprecated methods
#===============================================================================
module MoveData
ID = 0
INTERNAL_NAME = 1
NAME = 2
FUNCTION_CODE = 3
BASE_DAMAGE = 4
TYPE = 5
CATEGORY = 6
ACCURACY = 7
TOTAL_PP = 8
EFFECT_CHANCE = 9
TARGET = 10
PRIORITY = 11
FLAGS = 12
DESCRIPTION = 13
end
def pbGetMoveData(move_id, move_data_type = -1)
Deprecation.warn_method('pbGetMoveData', 'v20', 'GameData::Move.get(move_id)')
return GameData::Move.get(move_id)

View File

@@ -56,7 +56,3 @@ module GameData
end
end
end
#===============================================================================
# Deprecated methods
#===============================================================================

View File

@@ -72,7 +72,6 @@ module GameData
return (DATA.has_key?(species_form)) ? DATA[species_form] : nil
end
# TODO: Needs tidying up.
def self.schema(compiling_forms = false)
ret = {
"FormName" => [0, "q"],
@@ -224,92 +223,11 @@ end
#===============================================================================
# Deprecated methods
#===============================================================================
module SpeciesData
TYPE1 = 0
TYPE2 = 1
BASE_STATS = 2
GENDER_RATE = 3
GROWTH_RATE = 4
BASE_EXP = 5
EFFORT_POINTS = 6
RARENESS = 7
HAPPINESS = 8
ABILITIES = 9
HIDDEN_ABILITY = 10
COMPATIBILITY = 11
STEPS_TO_HATCH = 12
HEIGHT = 13
WEIGHT = 14
COLOR = 15
SHAPE = 16
HABITAT = 17
WILD_ITEM_COMMON = 18
WILD_ITEM_UNCOMMON = 19
WILD_ITEM_RARE = 20
INCENSE = 21
POKEDEX_FORM = 22 # For alternate forms
MEGA_STONE = 23 # For alternate forms
MEGA_MOVE = 24 # For alternate forms
UNMEGA_FORM = 25 # For alternate forms
MEGA_MESSAGE = 26 # For alternate forms
METRIC_PLAYER_X = 27
METRIC_PLAYER_Y = 28
METRIC_ENEMY_X = 29
METRIC_ENEMY_Y = 30
METRIC_ALTITUDE = 31
METRIC_SHADOW_X = 32
METRIC_SHADOW_SIZE = 33
end
#===============================================================================
# Methods to get Pokémon species data.
#===============================================================================
def pbGetSpeciesData(species, form = 0, species_data_type = -1)
Deprecation.warn_method('pbGetSpeciesData', 'v20', 'GameData::Species.get_species_form(species, form).something')
ret = GameData::Species.get_species_form(species, form)
return ret if species_data_type == -1
case species_data_type
when SpeciesData::TYPE1 then return ret.type1
when SpeciesData::TYPE2 then return ret.type2
when SpeciesData::BASE_STATS then return ret.base_stats
when SpeciesData::GENDER_RATE then return ret.gender_rate
when SpeciesData::GROWTH_RATE then return ret.growth_rate
when SpeciesData::BASE_EXP then return ret.base_exp
when SpeciesData::EFFORT_POINTS then return ret.evs
when SpeciesData::RARENESS then return ret.catch_rate
when SpeciesData::HAPPINESS then return ret.happiness
when SpeciesData::ABILITIES then return ret.abilities
when SpeciesData::HIDDEN_ABILITY then return ret.hidden_abilities
when SpeciesData::COMPATIBILITY then return ret.egg_groups
when SpeciesData::STEPS_TO_HATCH then return ret.hatch_steps
when SpeciesData::HEIGHT then return ret.height
when SpeciesData::WEIGHT then return ret.weight
when SpeciesData::COLOR then return ret.color
when SpeciesData::SHAPE then return ret.shape
when SpeciesData::HABITAT then return ret.habitat
when SpeciesData::WILD_ITEM_COMMON then return ret.wild_item_common
when SpeciesData::WILD_ITEM_UNCOMMON then return ret.wild_item_uncommon
when SpeciesData::WILD_ITEM_RARE then return ret.wild_item_rare
when SpeciesData::INCENSE then return ret.incense
when SpeciesData::POKEDEX_FORM then return ret.pokedex_form
when SpeciesData::MEGA_STONE then return ret.mega_stone
when SpeciesData::MEGA_MOVE then return ret.mega_move
when SpeciesData::UNMEGA_FORM then return ret.unmega_form
when SpeciesData::MEGA_MESSAGE then return ret.mega_message
when SpeciesData::METRIC_PLAYER_X then return ret.back_sprite_x
when SpeciesData::METRIC_PLAYER_Y then return ret.back_sprite_y
when SpeciesData::METRIC_ENEMY_X then return ret.front_sprite_x
when SpeciesData::METRIC_ENEMY_Y then return ret.front_sprite_y
when SpeciesData::METRIC_ALTITUDE then return ret.front_sprite_altitude
when SpeciesData::METRIC_SHADOW_X then return ret.shadow_x
when SpeciesData::METRIC_SHADOW_SIZE then return ret.shadow_size
end
return 0
return GameData::Species.get_species_form(species, form)
end
#===============================================================================
# Methods to get Pokémon moves data.
#===============================================================================
def pbGetSpeciesEggMoves(species, form = 0)
Deprecation.warn_method('pbGetSpeciesEggMoves', 'v20', 'GameData::Species.get_species_form(species, form).egg_moves')
return GameData::Species.get_species_form(species, form).egg_moves
@@ -325,9 +243,6 @@ def pbGetEvolutionData(species)
return GameData::Species.get(species).evolutions
end
#===============================================================================
# Method to get Pokémon species metrics (sprite positioning) data.
#===============================================================================
def pbApplyBattlerMetricsToSprite(sprite, index, species_data, shadow = false, metrics = nil)
Deprecation.warn_method('pbApplyBattlerMetricsToSprite', 'v20', 'GameData::Species.get(species).apply_metrics_to_sprite')
GameData::Species.get(species).apply_metrics_to_sprite(sprite, index, shadow)

View File

@@ -268,7 +268,7 @@ module GameData
end
#===============================================================================
# Deprecated
# Deprecated methods
#===============================================================================
def pbLoadSpeciesBitmap(species, gender = 0, form = 0, shiny = false, shadow = false, back = false , egg = false)
Deprecation.warn_method('pbLoadSpeciesBitmap', 'v20', 'GameData::Species.sprite_bitmap(species, form, gender, shiny, shadow, back, egg)')