mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2026-01-30 18:21:03 +00:00
Initial testing of deprecation
This commit is contained in:
@@ -96,7 +96,7 @@ class Pokemon
|
|||||||
# Otherwise returns 0.
|
# Otherwise returns 0.
|
||||||
# @return [Integer] the map ID where egg was hatched (0 by default)
|
# @return [Integer] the map ID where egg was hatched (0 by default)
|
||||||
attr_accessor :hatchedMap
|
attr_accessor :hatchedMap
|
||||||
# @param value [Integer] new language
|
# @param value [Integer] new language
|
||||||
attr_writer :language
|
attr_writer :language
|
||||||
# @return [String] the name of the original trainer
|
# @return [String] the name of the original trainer
|
||||||
attr_accessor :ot
|
attr_accessor :ot
|
||||||
@@ -122,7 +122,7 @@ class Pokemon
|
|||||||
#=============================================================================
|
#=============================================================================
|
||||||
|
|
||||||
# @return [Integer] the public portion of the original trainer's ID
|
# @return [Integer] the public portion of the original trainer's ID
|
||||||
def publicID
|
def public_id
|
||||||
return @trainerID & 0xFFFF
|
return @trainerID & 0xFFFF
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -131,7 +131,6 @@ class Pokemon
|
|||||||
def foreign?(trainer)
|
def foreign?(trainer)
|
||||||
return @trainerID != trainer.id || @ot != trainer.name
|
return @trainerID != trainer.id || @ot != trainer.name
|
||||||
end
|
end
|
||||||
alias isForeign? foreign?
|
|
||||||
|
|
||||||
# @return [0, 1, 2] the gender of this Pokémon original trainer (0 = male, 1 = female, 2 = unknown)
|
# @return [0, 1, 2] the gender of this Pokémon original trainer (0 = male, 1 = female, 2 = unknown)
|
||||||
def otgender
|
def otgender
|
||||||
@@ -139,7 +138,7 @@ class Pokemon
|
|||||||
end
|
end
|
||||||
|
|
||||||
# @return [Integer] this Pokémon's level when it was obtained
|
# @return [Integer] this Pokémon's level when it was obtained
|
||||||
def obtainLevel
|
def obtain_level
|
||||||
return @obtainLevel || 0
|
return @obtainLevel || 0
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -12,14 +12,17 @@ PokeBattle_Pokemon = Pokemon
|
|||||||
class Pokemon
|
class Pokemon
|
||||||
# @deprecated Use {MAX_NAME_SIZE} instead. This alias is slated to be removed in vXX.
|
# @deprecated Use {MAX_NAME_SIZE} instead. This alias is slated to be removed in vXX.
|
||||||
MAX_POKEMON_NAME_SIZE = MAX_NAME_SIZE
|
MAX_POKEMON_NAME_SIZE = MAX_NAME_SIZE
|
||||||
|
|
||||||
|
deprecated_instance_method_alias :publicID, :public_id, 'vXX'
|
||||||
|
deprecated_instance_method_alias :isForeign?, :foreign?, 'vXX'
|
||||||
end
|
end
|
||||||
|
|
||||||
# (see Pokemon#initialize)
|
# (see Pokemon#initialize)
|
||||||
# @deprecated Use +Pokemon.new+ instead. This method and its aliases are
|
# @deprecated Use +Pokemon.new+ instead. This method and its aliases are
|
||||||
# slated to be removed in vXX.
|
# slated to be removed in vXX.
|
||||||
def pbNewPkmn(species, level, owner = $Trainer, withMoves = true)
|
def pbNewPkmn(species, level, owner = $Trainer, withMoves = true)
|
||||||
Kernel.echoln("WARN: pbNewPkmn and its aliases are deprecated and slated to be removed in Essentials vXX")
|
Deprecation.warn_method('pbNewPkmn', 'vXX', 'Pokemon.new')
|
||||||
return Pokemon.new(species, level, owner, withMoves)
|
return Pokemon.new(species, level, owner, withMoves)
|
||||||
end
|
end
|
||||||
alias pbGenPkmn pbNewPkmn
|
alias pbGenPkmn pbNewPkmn
|
||||||
alias pbGenPoke pbNewPkmn
|
alias pbGenPoke pbNewPkmn
|
||||||
|
|||||||
Reference in New Issue
Block a user