mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-08 05:34:58 +00:00
Deprecate Pokemon#ot and Pokemon#ot=
This commit is contained in:
@@ -94,8 +94,6 @@ class Pokemon
|
|||||||
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
|
|
||||||
attr_accessor :ot
|
|
||||||
# Changes the gender of the original trainer. This is for information only,
|
# Changes the gender of the original trainer. This is for information only,
|
||||||
# and is not used to verify ownership of the Pokémon.
|
# and is not used to verify ownership of the Pokémon.
|
||||||
# @param value [Integer] new value for the original trainer's gender:
|
# @param value [Integer] new value for the original trainer's gender:
|
||||||
@@ -193,7 +191,7 @@ class Pokemon
|
|||||||
# @param trainer [PokeBattle_Trainer] the trainer to compare to the OT
|
# @param trainer [PokeBattle_Trainer] the trainer to compare to the OT
|
||||||
# @return [Boolean] whether the given trainer and this Pokémon's original trainer don't match
|
# @return [Boolean] whether the given trainer and this Pokémon's original trainer don't match
|
||||||
def foreign?(trainer)
|
def foreign?(trainer)
|
||||||
return @trainerID != trainer.id || @ot != trainer.name
|
return @owner.id != trainer.id || @owner.name != trainer.name
|
||||||
end
|
end
|
||||||
alias isForeign? foreign?
|
alias isForeign? foreign?
|
||||||
|
|
||||||
|
|||||||
@@ -30,6 +30,18 @@ class Pokemon
|
|||||||
Deprecation.warn_method('Pokemon#trainerID=', 'vXX', 'Pokemon::Owner#id=')
|
Deprecation.warn_method('Pokemon#trainerID=', 'vXX', 'Pokemon::Owner#id=')
|
||||||
@owner.id = value
|
@owner.id = value
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# @deprecated Use {Owner#name} instead. This alias is slated to be removed in vXX.
|
||||||
|
def ot
|
||||||
|
Deprecation.warn_method('Pokemon#ot', 'vXX', 'Pokemon::Owner#name')
|
||||||
|
return @owner.name
|
||||||
|
end
|
||||||
|
|
||||||
|
# @deprecated Use {Owner#name=} instead. This alias is slated to be removed in vXX.
|
||||||
|
def ot=(value)
|
||||||
|
Deprecation.warn_method('Pokemon#ot=', 'vXX', 'Pokemon::Owner#name=')
|
||||||
|
@owner.name = value
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# (see Pokemon#initialize)
|
# (see Pokemon#initialize)
|
||||||
|
|||||||
Reference in New Issue
Block a user