Create 009_Pokemon_Deprecated.rb

This commit is contained in:
Joni Savolainen
2020-09-20 21:24:05 +03:00
parent c73906170a
commit 61ad59afa6
2 changed files with 19 additions and 20 deletions

View File

@@ -1120,23 +1120,3 @@ class Pokemon
end end
end end
end end
#===============================================================================
# Deprecated classes & methods
#===============================================================================
# @deprecated Use {Pokemon} instead. PokeBattle_Pokemon has been turned into an alias
# and is slated to be removed in vXX.
class PokeBattle_Pokemon; end
PokeBattle_Pokemon = Pokemon
# (see Pokemon#initialize)
# @deprecated Use +Pokemon.new+ instead. This method and its aliases are
# slated to be removed in vXX.
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")
return Pokemon.new(species, level, owner, withMoves)
end
alias pbGenPkmn pbNewPkmn
alias pbGenPoke pbNewPkmn

View File

@@ -0,0 +1,19 @@
#===============================================================================
# Deprecated classes & methods for Pokémon
#===============================================================================
# @deprecated Use {Pokemon} instead. PokeBattle_Pokemon has been turned into an alias
# and is slated to be removed in vXX.
class PokeBattle_Pokemon; end
PokeBattle_Pokemon = Pokemon
# (see Pokemon#initialize)
# @deprecated Use +Pokemon.new+ instead. This method and its aliases are
# slated to be removed in vXX.
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")
return Pokemon.new(species, level, owner, withMoves)
end
alias pbGenPkmn pbNewPkmn
alias pbGenPoke pbNewPkmn