mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-07 13:15:01 +00:00
Overhauled text translations
This commit is contained in:
@@ -15,7 +15,7 @@ module GameData
|
||||
"SectionName" => [:id, "u"],
|
||||
"Name" => [:real_name, "s"],
|
||||
"Filename" => [:filename, "s"],
|
||||
"Point" => [:point, "^uussUUUU"],
|
||||
"Point" => [:point, "^uusSUUUU"],
|
||||
"Flags" => [:flags, "*s"]
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ module GameData
|
||||
|
||||
# @return [String] the translated name of this region
|
||||
def name
|
||||
return pbGetMessage(MessageTypes::RegionNames, @id)
|
||||
return pbGetMessageFromHash(MessageTypes::Regions, @real_name)
|
||||
end
|
||||
|
||||
def has_flag?(flag)
|
||||
|
||||
@@ -35,7 +35,7 @@ module GameData
|
||||
|
||||
# @return [String] the translated description of this ability
|
||||
def description
|
||||
return pbGetMessageFromHash(MessageTypes::AbilityDescs, @real_description)
|
||||
return pbGetMessageFromHash(MessageTypes::AbilityDescriptions, @real_description)
|
||||
end
|
||||
|
||||
def has_flag?(flag)
|
||||
|
||||
@@ -143,13 +143,13 @@ module GameData
|
||||
|
||||
# @return [String] the translated portion name of this item
|
||||
def portion_name
|
||||
return pbGetMessageFromHash(MessageTypes::ItemPortionNames, @real_portion_name) if @real_portion_name
|
||||
return pbGetMessageFromHash(MessageTypes::ItemPortions, @real_portion_name) if @real_portion_name
|
||||
return name
|
||||
end
|
||||
|
||||
# @return [String] the translated plural version of the portion name of this item
|
||||
def portion_name_plural
|
||||
return pbGetMessageFromHash(MessageTypes::ItemPortionNamePlurals, @real_portion_name_plural) if @real_portion_name_plural
|
||||
return pbGetMessageFromHash(MessageTypes::ItemPortionPlurals, @real_portion_name_plural) if @real_portion_name_plural
|
||||
return name_plural
|
||||
end
|
||||
|
||||
|
||||
@@ -225,17 +225,17 @@ module GameData
|
||||
|
||||
# @return [String] the translated name of this form of this species
|
||||
def form_name
|
||||
return pbGetMessageFromHash(MessageTypes::FormNames, @real_form_name)
|
||||
return pbGetMessageFromHash(MessageTypes::SpeciesForms, @real_form_name)
|
||||
end
|
||||
|
||||
# @return [String] the translated Pokédex category of this species
|
||||
def category
|
||||
return pbGetMessageFromHash(MessageTypes::Kinds, @real_category)
|
||||
return pbGetMessageFromHash(MessageTypes::SpeciesCategories, @real_category)
|
||||
end
|
||||
|
||||
# @return [String] the translated Pokédex entry of this species
|
||||
def pokedex_entry
|
||||
return pbGetMessageFromHash(MessageTypes::Entries, @real_pokedex_entry)
|
||||
return pbGetMessageFromHash(MessageTypes::PokedexEntries, @real_pokedex_entry)
|
||||
end
|
||||
|
||||
def default_form
|
||||
|
||||
@@ -107,7 +107,7 @@ module GameData
|
||||
|
||||
# @return [String] the translated in-battle lose message of this trainer
|
||||
def lose_text
|
||||
return pbGetMessageFromHash(MessageTypes::TrainerLoseText, @real_lose_text)
|
||||
return pbGetMessageFromHash(MessageTypes::TrainerLoseTexts, @real_lose_text)
|
||||
end
|
||||
|
||||
# Creates a battle-ready version of a trainer's data.
|
||||
|
||||
@@ -115,7 +115,10 @@ module GameData
|
||||
|
||||
# @return [String] the translated name of this map
|
||||
def name
|
||||
return pbGetMapNameFromId(@id)
|
||||
ret = pbGetMessageFromHash(MessageTypes::MapNames, @real_name)
|
||||
ret = pbGetBasicMapNameFromId(@id) if nil_or_empty?(ret)
|
||||
ret.gsub!(/\\PN/, $player.name) if $player
|
||||
return ret
|
||||
end
|
||||
|
||||
def has_flag?(flag)
|
||||
|
||||
Reference in New Issue
Block a user