mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-08 13:44:59 +00:00
Rename MAX_POKEMON_NAME_SIZE to MAX_NAME_SIZE
in Pokemon
This commit is contained in:
@@ -450,7 +450,7 @@ class PokeBattle_Scene
|
|||||||
# Opens the nicknaming screen for a newly caught Pokémon
|
# Opens the nicknaming screen for a newly caught Pokémon
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
def pbNameEntry(helpText,pkmn)
|
def pbNameEntry(helpText,pkmn)
|
||||||
return pbEnterPokemonName(helpText, 0, Pokemon::MAX_POKEMON_NAME_SIZE, "", pkmn)
|
return pbEnterPokemonName(helpText, 0, Pokemon::MAX_NAME_SIZE, "", pkmn)
|
||||||
end
|
end
|
||||||
|
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
|
|||||||
@@ -115,7 +115,7 @@ class Pokemon
|
|||||||
# Max EVs that a single stat can have
|
# Max EVs that a single stat can have
|
||||||
EV_STAT_LIMIT = 252
|
EV_STAT_LIMIT = 252
|
||||||
# Maximum length a Pokémon's nickname can be
|
# Maximum length a Pokémon's nickname can be
|
||||||
MAX_POKEMON_NAME_SIZE = 10
|
MAX_NAME_SIZE = 10
|
||||||
|
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# Ownership, obtained information
|
# Ownership, obtained information
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ def pbPurify(pokemon,scene)
|
|||||||
speciesname = PBSpecies.getName(pokemon.species)
|
speciesname = PBSpecies.getName(pokemon.species)
|
||||||
if scene.pbConfirm(_INTL("Would you like to give a nickname to {1}?",speciesname))
|
if scene.pbConfirm(_INTL("Would you like to give a nickname to {1}?",speciesname))
|
||||||
newname = pbEnterPokemonName(_INTL("{1}'s nickname?",speciesname),
|
newname = pbEnterPokemonName(_INTL("{1}'s nickname?",speciesname),
|
||||||
0, Pokemon::MAX_POKEMON_NAME_SIZE, "", pokemon)
|
0, Pokemon::MAX_NAME_SIZE, "", pokemon)
|
||||||
pokemon.name = newname if newname!=""
|
pokemon.name = newname if newname!=""
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -8,6 +8,11 @@ class PokeBattle_Pokemon; end
|
|||||||
|
|
||||||
PokeBattle_Pokemon = Pokemon
|
PokeBattle_Pokemon = Pokemon
|
||||||
|
|
||||||
|
class Pokemon
|
||||||
|
# @deprecated Use {MAX_NAME_SIZE} instead. This alias is slated to be removed in vXX.
|
||||||
|
MAX_POKEMON_NAME_SIZE = MAX_NAME_SIZE
|
||||||
|
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.
|
||||||
|
|||||||
@@ -109,7 +109,7 @@ class PokemonEggHatch_Scene
|
|||||||
if pbConfirmMessage(
|
if pbConfirmMessage(
|
||||||
_INTL("Would you like to nickname the newly hatched {1}?",@pokemon.name)) { update }
|
_INTL("Would you like to nickname the newly hatched {1}?",@pokemon.name)) { update }
|
||||||
nickname=pbEnterPokemonName(_INTL("{1}'s nickname?",@pokemon.name),
|
nickname=pbEnterPokemonName(_INTL("{1}'s nickname?",@pokemon.name),
|
||||||
0, Pokemon::MAX_POKEMON_NAME_SIZE, "", @pokemon, true)
|
0, Pokemon::MAX_NAME_SIZE, "", @pokemon, true)
|
||||||
@pokemon.name=nickname if nickname!=""
|
@pokemon.name=nickname if nickname!=""
|
||||||
@nicknamed=true
|
@nicknamed=true
|
||||||
end
|
end
|
||||||
@@ -209,7 +209,7 @@ def pbHatch(pokemon)
|
|||||||
pbMessage(_INTL("{1} hatched from the Egg!",speciesname))
|
pbMessage(_INTL("{1} hatched from the Egg!",speciesname))
|
||||||
if pbConfirmMessage(_INTL("Would you like to nickname the newly hatched {1}?",speciesname))
|
if pbConfirmMessage(_INTL("Would you like to nickname the newly hatched {1}?",speciesname))
|
||||||
nickname = pbEnterPokemonName(_INTL("{1}'s nickname?",speciesname),
|
nickname = pbEnterPokemonName(_INTL("{1}'s nickname?",speciesname),
|
||||||
0, Pokemon::MAX_POKEMON_NAME_SIZE, "", pokemon)
|
0, Pokemon::MAX_NAME_SIZE, "", pokemon)
|
||||||
pokemon.name = nickname if nickname!=""
|
pokemon.name = nickname if nickname!=""
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ def pbNickname(pokemon)
|
|||||||
speciesname = PBSpecies.getName(pokemon.species)
|
speciesname = PBSpecies.getName(pokemon.species)
|
||||||
if pbConfirmMessage(_INTL("Would you like to give a nickname to {1}?",speciesname))
|
if pbConfirmMessage(_INTL("Would you like to give a nickname to {1}?",speciesname))
|
||||||
helptext = _INTL("{1}'s nickname?",speciesname)
|
helptext = _INTL("{1}'s nickname?",speciesname)
|
||||||
newname = pbEnterPokemonName(helptext, 0, Pokemon::MAX_POKEMON_NAME_SIZE, "", pokemon)
|
newname = pbEnterPokemonName(helptext, 0, Pokemon::MAX_NAME_SIZE, "", pokemon)
|
||||||
pokemon.name = newname if newname!=""
|
pokemon.name = newname if newname!=""
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -146,7 +146,7 @@ def pbAddForeignPokemon(pokemon,level=nil,ownerName=nil,nickname=nil,ownerGender
|
|||||||
pokemon.otgender = ownerGender
|
pokemon.otgender = ownerGender
|
||||||
end
|
end
|
||||||
# Set nickname
|
# Set nickname
|
||||||
pokemon.name = nickname[0, Pokemon::MAX_POKEMON_NAME_SIZE] if nickname && nickname!=""
|
pokemon.name = nickname[0, Pokemon::MAX_NAME_SIZE] if nickname && nickname!=""
|
||||||
# Recalculate stats
|
# Recalculate stats
|
||||||
pokemon.calcStats
|
pokemon.calcStats
|
||||||
if ownerName
|
if ownerName
|
||||||
|
|||||||
@@ -601,7 +601,7 @@ module PokemonDebugMixin
|
|||||||
when 0 # Rename
|
when 0 # Rename
|
||||||
oldname = (pkmn.name && pkmn.name!=speciesname) ? pkmn.name : ""
|
oldname = (pkmn.name && pkmn.name!=speciesname) ? pkmn.name : ""
|
||||||
newname = pbEnterPokemonName(_INTL("{1}'s nickname?",speciesname),
|
newname = pbEnterPokemonName(_INTL("{1}'s nickname?",speciesname),
|
||||||
0, Pokemon::MAX_POKEMON_NAME_SIZE, oldname, pkmn)
|
0, Pokemon::MAX_NAME_SIZE, oldname, pkmn)
|
||||||
if newname && newname!=""
|
if newname && newname!=""
|
||||||
pkmn.name = newname
|
pkmn.name = newname
|
||||||
pbRefreshSingle(pkmnid)
|
pbRefreshSingle(pkmnid)
|
||||||
|
|||||||
@@ -741,7 +741,7 @@ def pbPokemonEditor
|
|||||||
metrics = pbLoadSpeciesMetrics
|
metrics = pbLoadSpeciesMetrics
|
||||||
selection = 0
|
selection = 0
|
||||||
species = [
|
species = [
|
||||||
[_INTL("Name"), LimitStringProperty.new(Pokemon::MAX_POKEMON_NAME_SIZE), _INTL("Name of the Pokémon.")],
|
[_INTL("Name"), LimitStringProperty.new(Pokemon::MAX_NAME_SIZE), _INTL("Name of the Pokémon.")],
|
||||||
[_INTL("InternalName"),ReadOnlyProperty,_INTL("Internal name of the Pokémon.")],
|
[_INTL("InternalName"),ReadOnlyProperty,_INTL("Internal name of the Pokémon.")],
|
||||||
[_INTL("Type1"),TypeProperty,_INTL("Pokémon's type. If same as Type2, this Pokémon has a single type.")],
|
[_INTL("Type1"),TypeProperty,_INTL("Pokémon's type. If same as Type2, this Pokémon has a single type.")],
|
||||||
[_INTL("Type2"),TypeProperty,_INTL("Pokémon's type. If same as Type1, this Pokémon has a single type.")],
|
[_INTL("Type2"),TypeProperty,_INTL("Pokémon's type. If same as Type1, this Pokémon has a single type.")],
|
||||||
|
|||||||
@@ -1465,8 +1465,8 @@ def pbCompileTrainers
|
|||||||
raise _INTL("Bad happiness: {1} (must be 0-255)\r\n{2}",record,FileLineData.linereport)
|
raise _INTL("Bad happiness: {1} (must be 0-255)\r\n{2}",record,FileLineData.linereport)
|
||||||
end
|
end
|
||||||
when "Name"
|
when "Name"
|
||||||
if record.length>Pokemon::MAX_POKEMON_NAME_SIZE
|
if record.length>Pokemon::MAX_NAME_SIZE
|
||||||
raise _INTL("Bad nickname: {1} (must be 1-{2} characters)\r\n{3}", record, Pokemon::MAX_POKEMON_NAME_SIZE, FileLineData.linereport)
|
raise _INTL("Bad nickname: {1} (must be 1-{2} characters)\r\n{3}", record, Pokemon::MAX_NAME_SIZE, FileLineData.linereport)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
# Record XXX=YYY setting
|
# Record XXX=YYY setting
|
||||||
@@ -1555,8 +1555,8 @@ def pbCompileTrainers
|
|||||||
raise _INTL("Bad happiness: {1} (must be 0-255)\r\n{2}",record[i],FileLineData.linereport)
|
raise _INTL("Bad happiness: {1} (must be 0-255)\r\n{2}",record[i],FileLineData.linereport)
|
||||||
end
|
end
|
||||||
when TPNAME+3
|
when TPNAME+3
|
||||||
if record[i].length>Pokemon::MAX_POKEMON_NAME_SIZE
|
if record[i].length>Pokemon::MAX_NAME_SIZE
|
||||||
raise _INTL("Bad nickname: {1} (must be 1-{2} characters)\r\n{3}", record[i], Pokemon::MAX_POKEMON_NAME_SIZE, FileLineData.linereport)
|
raise _INTL("Bad nickname: {1} (must be 1-{2} characters)\r\n{3}", record[i], Pokemon::MAX_NAME_SIZE, FileLineData.linereport)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user