mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-07 13:15:01 +00:00
Made a set of PBS files for Shadow Pokémon data, grouped shadow_pokemon.txt with it
This commit is contained in:
@@ -13,7 +13,7 @@ module GameData
|
||||
SCHEMA = {
|
||||
"SectionName" => [:id, "e", :Species],
|
||||
"GaugeSize" => [:gauge_size, "v"],
|
||||
"Moves" => [:moves, "*m"], # Not enumerated when compiled
|
||||
"Moves" => [:moves, "*e", :Move],
|
||||
"Flags" => [:flags, "*s"]
|
||||
}
|
||||
HEART_GAUGE_SIZE = 4000 # Default gauge size
|
||||
@@ -21,6 +21,11 @@ module GameData
|
||||
extend ClassMethodsSymbols
|
||||
include InstanceMethods
|
||||
|
||||
alias __orig__load load unless private_method_defined?(:__orig__load)
|
||||
def self.load
|
||||
__orig__load if safeExists?("Data/#{self::DATA_FILENAME}")
|
||||
end
|
||||
|
||||
def initialize(hash)
|
||||
@id = hash[:id]
|
||||
@gauge_size = hash[:gauge_size] || HEART_GAUGE_SIZE
|
||||
|
||||
@@ -127,7 +127,7 @@ class Pokemon
|
||||
# Record this Pokémon's Shadow moves
|
||||
if data
|
||||
data.moves.each do |m|
|
||||
@shadow_moves.push(m.to_sym) if GameData::Move.exists?(m.to_sym)
|
||||
@shadow_moves.push(m) if GameData::Move.exists?(m)
|
||||
break if @shadow_moves.length >= MAX_MOVES
|
||||
end
|
||||
end
|
||||
|
||||
@@ -542,6 +542,7 @@ module Compiler
|
||||
# Compile Shadow Pokémon data
|
||||
#=============================================================================
|
||||
def compile_shadow_pokemon(*paths)
|
||||
return if !safeExists?("PBS/shadow_pokemon.txt")
|
||||
compile_PBS_file_generic(GameData::ShadowPokemon, *paths) do |final_validate, hash|
|
||||
(final_validate) ? validate_all_compiled_shadow_pokemon : validate_compiled_shadow_pokemon(hash)
|
||||
end
|
||||
|
||||
@@ -354,6 +354,7 @@ module Compiler
|
||||
# Save Shadow Pokémon data to PBS file
|
||||
#=============================================================================
|
||||
def write_shadow_pokemon
|
||||
return if GameData::ShadowPokemon::DATA.empty?
|
||||
write_PBS_file_generic(GameData::ShadowPokemon)
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user