mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-07 21:24:59 +00:00
Fixed previous commit always causing recompiling if shadow_pokemon.dat doesn't exist, also rubocopping
This commit is contained in:
@@ -14,10 +14,10 @@ module GameData
|
||||
include InstanceMethods
|
||||
|
||||
SCHEMA = {
|
||||
"SectionName" => [:id, "m"],
|
||||
"Name" => [:real_name, "s"],
|
||||
"Description" => [:real_description, "q"],
|
||||
"Flags" => [:flags, "*s"]
|
||||
"SectionName" => [:id, "m"],
|
||||
"Name" => [:real_name, "s"],
|
||||
"Description" => [:real_description, "q"],
|
||||
"Flags" => [:flags, "*s"]
|
||||
}
|
||||
|
||||
def initialize(hash)
|
||||
|
||||
@@ -31,10 +31,10 @@ module GameData
|
||||
"Price" => [:price, "u"],
|
||||
"SellPrice" => [:sell_price, "u"],
|
||||
"BPPrice" => [:bp_price, "u"],
|
||||
"FieldUse" => [:field_use, "e", { "OnPokemon" => 1, "Direct" => 2,
|
||||
"TM" => 3, "HM" => 4, "TR" => 5 }],
|
||||
"BattleUse" => [:battle_use, "e", { "OnPokemon" => 1, "OnMove" => 2,
|
||||
"OnBattler" => 3, "OnFoe" => 4, "Direct" => 5 }],
|
||||
"FieldUse" => [:field_use, "e", {"OnPokemon" => 1, "Direct" => 2,
|
||||
"TM" => 3, "HM" => 4, "TR" => 5}],
|
||||
"BattleUse" => [:battle_use, "e", {"OnPokemon" => 1, "OnMove" => 2,
|
||||
"OnBattler" => 3, "OnFoe" => 4, "Direct" => 5}],
|
||||
"Flags" => [:flags, "*s"],
|
||||
"Consumable" => [:consumable, "b"],
|
||||
"Move" => [:move, "e", :Move],
|
||||
|
||||
@@ -38,7 +38,7 @@ module GameData
|
||||
if form > 0
|
||||
trial = sprintf("%s_%d", species, form).to_sym
|
||||
if !DATA.has_key?(trial)
|
||||
self.register({ :id => species }) if !DATA[species]
|
||||
self.register({:id => species}) if !DATA[species]
|
||||
self.register({
|
||||
:id => trial,
|
||||
:species => species,
|
||||
@@ -52,7 +52,7 @@ module GameData
|
||||
end
|
||||
return DATA[trial]
|
||||
end
|
||||
self.register({ :id => species }) if !DATA[species]
|
||||
self.register({:id => species}) if !DATA[species]
|
||||
return DATA[species]
|
||||
end
|
||||
|
||||
|
||||
@@ -18,10 +18,10 @@ module GameData
|
||||
SCHEMA = {
|
||||
"SectionName" => [:id, "m"],
|
||||
"Name" => [:real_name, "s"],
|
||||
"Gender" => [:gender, "e", { "Male" => 0, "male" => 0, "M" => 0, "m" => 0, "0" => 0,
|
||||
"Female" => 1, "female" => 1, "F" => 1, "f" => 1, "1" => 1,
|
||||
"Unknown" => 2, "unknown" => 2, "Other" => 2, "other" => 2,
|
||||
"Mixed" => 2, "mixed" => 2, "X" => 2, "x" => 2, "2" => 2 }],
|
||||
"Gender" => [:gender, "e", {"Male" => 0, "male" => 0, "M" => 0, "m" => 0, "0" => 0,
|
||||
"Female" => 1, "female" => 1, "F" => 1, "f" => 1, "1" => 1,
|
||||
"Unknown" => 2, "unknown" => 2, "Other" => 2, "other" => 2,
|
||||
"Mixed" => 2, "mixed" => 2, "X" => 2, "x" => 2, "2" => 2}],
|
||||
"BaseMoney" => [:base_money, "u"],
|
||||
"SkillLevel" => [:skill_level, "u"],
|
||||
"Flags" => [:flags, "*s"],
|
||||
|
||||
@@ -30,8 +30,8 @@ module GameData
|
||||
"Ability" => [:ability, "e", :Ability],
|
||||
"AbilityIndex" => [:ability_index, "u"],
|
||||
"Item" => [:item, "e", :Item],
|
||||
"Gender" => [:gender, "e", { "M" => 0, "m" => 0, "Male" => 0, "male" => 0, "0" => 0,
|
||||
"F" => 1, "f" => 1, "Female" => 1, "female" => 1, "1" => 1 }],
|
||||
"Gender" => [:gender, "e", {"M" => 0, "m" => 0, "Male" => 0, "male" => 0, "0" => 0,
|
||||
"F" => 1, "f" => 1, "Female" => 1, "female" => 1, "1" => 1}],
|
||||
"Nature" => [:nature, "e", :Nature],
|
||||
"IV" => [:iv, "uUUUUU"],
|
||||
"EV" => [:ev, "uUUUUU"],
|
||||
|
||||
@@ -42,7 +42,7 @@ module GameData
|
||||
validate tr_type => [Symbol, String]
|
||||
validate tr_name => [String, NilClass]
|
||||
key = [tr_type.to_sym, tr_name, tr_version]
|
||||
key = key[0] if key[1] == nil
|
||||
key = key[0] if key[1].nil?
|
||||
return !self::DATA[key].nil?
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user