Revert rename of Pokemon#publicID & #obtainLevel

These changes should be done in their own branch.
This commit is contained in:
Joni Savolainen
2020-09-24 08:34:23 +03:00
parent 8a5b141a8d
commit ca761640f8
2 changed files with 7 additions and 9 deletions

View File

@@ -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 public_id def publicID
return @trainerID & 0xFFFF return @trainerID & 0xFFFF
end end
@@ -131,6 +131,7 @@ 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
@@ -138,7 +139,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 obtain_level def obtainLevel
return @obtainLevel || 0 return @obtainLevel || 0
end end

View File

@@ -12,9 +12,6 @@ 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)