mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-10 14:44:58 +00:00
Rearranged some code relating to data and its caching
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
#===============================================================================
|
||||
# Trainers data
|
||||
#===============================================================================
|
||||
TPSPECIES = 0
|
||||
TPLEVEL = 1
|
||||
TPITEM = 2
|
||||
@@ -15,6 +18,32 @@ TPBALL = 13
|
||||
TPEV = 14
|
||||
TPLOSETEXT = 15
|
||||
|
||||
module TrainersMetadata
|
||||
InfoTypes = {
|
||||
"Items" => [0, "eEEEEEEE", PBItems, PBItems, PBItems, PBItems,
|
||||
PBItems, PBItems, PBItems, PBItems],
|
||||
"Pokemon" => [TPSPECIES, "ev", PBSpecies,nil], # Species, level
|
||||
"Item" => [TPITEM, "e", PBItems],
|
||||
"Moves" => [TPMOVES, "eEEE", PBMoves, PBMoves, PBMoves, PBMoves],
|
||||
"Ability" => [TPABILITY, "u"],
|
||||
"Gender" => [TPGENDER, "e", { "M" => 0, "m" => 0, "Male" => 0, "male" => 0, "0" => 0,
|
||||
"F" => 1, "f" => 1, "Female" => 1, "female" => 1, "1" => 1 }],
|
||||
"Form" => [TPFORM, "u"],
|
||||
"Shiny" => [TPSHINY, "b"],
|
||||
"Nature" => [TPNATURE, "e", PBNatures],
|
||||
"IV" => [TPIV, "uUUUUU"],
|
||||
"Happiness" => [TPHAPPINESS, "u"],
|
||||
"Name" => [TPNAME, "s"],
|
||||
"Shadow" => [TPSHADOW, "b"],
|
||||
"Ball" => [TPBALL, "u"],
|
||||
"EV" => [TPEV, "uUUUUU"],
|
||||
"LoseText" => [TPLOSETEXT, "s"]
|
||||
}
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
def pbLoadTrainer(trainerid,trainername,partyid=0)
|
||||
if trainerid.is_a?(String) || trainerid.is_a?(Symbol)
|
||||
if !hasConst?(PBTrainers,trainerid)
|
||||
|
||||
Reference in New Issue
Block a user