mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2026-01-22 14:26:01 +00:00
Implemented GameData::Ribbon
This commit is contained in:
@@ -35,9 +35,9 @@ module Compiler
|
||||
Graphics.update
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
#=============================================================================
|
||||
# Save map connections to PBS file
|
||||
#===============================================================================
|
||||
#=============================================================================
|
||||
def normalize_connection(conn)
|
||||
ret = conn.clone
|
||||
if conn[1] < 0 && conn[4] < 0
|
||||
@@ -96,9 +96,9 @@ module Compiler
|
||||
Graphics.update
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
#=============================================================================
|
||||
# Save phone messages to PBS file
|
||||
#===============================================================================
|
||||
#=============================================================================
|
||||
def write_phone
|
||||
data = load_data("Data/phone.dat") rescue nil
|
||||
return if !data
|
||||
@@ -129,9 +129,9 @@ module Compiler
|
||||
Graphics.update
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
#=============================================================================
|
||||
# Save type data to PBS file
|
||||
#===============================================================================
|
||||
#=============================================================================
|
||||
def write_types
|
||||
File.open("PBS/types.txt", "wb") { |f|
|
||||
add_PBS_header_to_file(f)
|
||||
@@ -151,9 +151,9 @@ module Compiler
|
||||
Graphics.update
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
#=============================================================================
|
||||
# Save ability data to PBS file
|
||||
#===============================================================================
|
||||
#=============================================================================
|
||||
def write_abilities
|
||||
File.open("PBS/abilities.txt", "wb") { |f|
|
||||
add_PBS_header_to_file(f)
|
||||
@@ -170,9 +170,9 @@ module Compiler
|
||||
Graphics.update
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
#=============================================================================
|
||||
# Save move data to PBS file
|
||||
#===============================================================================
|
||||
#=============================================================================
|
||||
def write_moves
|
||||
File.open("PBS/moves.txt", "wb") { |f|
|
||||
add_PBS_header_to_file(f)
|
||||
@@ -203,9 +203,9 @@ module Compiler
|
||||
Graphics.update
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
#=============================================================================
|
||||
# Save item data to PBS file
|
||||
#===============================================================================
|
||||
#=============================================================================
|
||||
def write_items
|
||||
File.open("PBS/items.txt", "wb") { |f|
|
||||
add_PBS_header_to_file(f)
|
||||
@@ -236,9 +236,9 @@ module Compiler
|
||||
Graphics.update
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
#=============================================================================
|
||||
# Save berry plant data to PBS file
|
||||
#===============================================================================
|
||||
#=============================================================================
|
||||
def write_berry_plants
|
||||
File.open("PBS/berryplants.txt", "wb") { |f|
|
||||
add_PBS_header_to_file(f)
|
||||
@@ -256,9 +256,9 @@ module Compiler
|
||||
Graphics.update
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
#=============================================================================
|
||||
# Save Pokémon data to PBS file
|
||||
#===============================================================================
|
||||
#=============================================================================
|
||||
def write_pokemon
|
||||
File.open("PBS/pokemon.txt", "wb") { |f|
|
||||
add_PBS_header_to_file(f)
|
||||
@@ -351,9 +351,9 @@ module Compiler
|
||||
Graphics.update
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
#=============================================================================
|
||||
# Save Pokémon forms data to PBS file
|
||||
#===============================================================================
|
||||
#=============================================================================
|
||||
def write_pokemon_forms
|
||||
File.open("PBS/pokemonforms.txt", "wb") { |f|
|
||||
add_PBS_header_to_file(f)
|
||||
@@ -455,9 +455,9 @@ module Compiler
|
||||
Graphics.update
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
#=============================================================================
|
||||
# Save Shadow movesets to PBS file
|
||||
#===============================================================================
|
||||
#=============================================================================
|
||||
def write_shadow_movesets
|
||||
shadow_movesets = pbLoadShadowMovesets
|
||||
File.open("PBS/shadowmoves.txt", "wb") { |f|
|
||||
@@ -472,9 +472,9 @@ module Compiler
|
||||
Graphics.update
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
#=============================================================================
|
||||
# Save Regional Dexes to PBS file
|
||||
#===============================================================================
|
||||
#=============================================================================
|
||||
def write_regional_dexes
|
||||
dex_lists = pbLoadRegionalDexes
|
||||
File.open("PBS/regionaldexes.txt", "wb") { |f|
|
||||
@@ -503,9 +503,28 @@ module Compiler
|
||||
Graphics.update
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
#=============================================================================
|
||||
# Save ability data to PBS file
|
||||
#=============================================================================
|
||||
def write_ribbons
|
||||
File.open("PBS/ribbons.txt", "wb") { |f|
|
||||
add_PBS_header_to_file(f)
|
||||
f.write("\#-------------------------------\r\n")
|
||||
GameData::Ribbon.each do |r|
|
||||
f.write(sprintf("%d,%s,%s,%s\r\n",
|
||||
r.id_number,
|
||||
csvQuote(r.id.to_s),
|
||||
csvQuote(r.real_name),
|
||||
csvQuoteAlways(r.real_description)
|
||||
))
|
||||
end
|
||||
}
|
||||
Graphics.update
|
||||
end
|
||||
|
||||
#=============================================================================
|
||||
# Save wild encounter data to PBS file
|
||||
#===============================================================================
|
||||
#=============================================================================
|
||||
def write_encounters
|
||||
map_infos = load_data("Data/MapInfos.rxdata")
|
||||
File.open("PBS/encounters.txt", "wb") { |f|
|
||||
@@ -538,9 +557,9 @@ module Compiler
|
||||
Graphics.update
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
#=============================================================================
|
||||
# Save trainer type data to PBS file
|
||||
#===============================================================================
|
||||
#=============================================================================
|
||||
def write_trainer_types
|
||||
File.open("PBS/trainertypes.txt", "wb") { |f|
|
||||
add_PBS_header_to_file(f)
|
||||
@@ -563,9 +582,9 @@ module Compiler
|
||||
Graphics.update
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
#=============================================================================
|
||||
# Save individual trainer data to PBS file
|
||||
#===============================================================================
|
||||
#=============================================================================
|
||||
def write_trainers
|
||||
File.open("PBS/trainers.txt", "wb") { |f|
|
||||
add_PBS_header_to_file(f)
|
||||
@@ -607,9 +626,9 @@ module Compiler
|
||||
Graphics.update
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
#=============================================================================
|
||||
# Save trainer list data to PBS file
|
||||
#===============================================================================
|
||||
#=============================================================================
|
||||
def write_trainer_lists
|
||||
trainerlists = load_data("Data/trainer_lists.dat") rescue nil
|
||||
return if !trainerlists
|
||||
@@ -628,9 +647,9 @@ module Compiler
|
||||
Graphics.update
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
#=============================================================================
|
||||
# Save Battle Tower trainer data to PBS file
|
||||
#===============================================================================
|
||||
#=============================================================================
|
||||
def write_battle_tower_trainers(bttrainers, filename)
|
||||
return if !bttrainers || !filename
|
||||
btTrainersRequiredTypes = {
|
||||
@@ -666,9 +685,9 @@ module Compiler
|
||||
Graphics.update
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
#=============================================================================
|
||||
# Save Battle Tower Pokémon data to PBS file
|
||||
#===============================================================================
|
||||
#=============================================================================
|
||||
def write_battle_tower_pokemon(btpokemon,filename)
|
||||
return if !btpokemon || !filename
|
||||
species = { 0 => "" }
|
||||
@@ -703,9 +722,9 @@ module Compiler
|
||||
Graphics.update
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
#=============================================================================
|
||||
# Save metadata data to PBS file
|
||||
#===============================================================================
|
||||
#=============================================================================
|
||||
def write_metadata
|
||||
File.open("PBS/metadata.txt", "wb") { |f|
|
||||
add_PBS_header_to_file(f)
|
||||
@@ -744,9 +763,9 @@ module Compiler
|
||||
Graphics.update
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
#=============================================================================
|
||||
# Save all data to PBS files
|
||||
#===============================================================================
|
||||
#=============================================================================
|
||||
def write_all
|
||||
write_town_map
|
||||
write_connections
|
||||
@@ -760,6 +779,7 @@ module Compiler
|
||||
write_pokemon_forms
|
||||
write_shadow_movesets
|
||||
write_regional_dexes
|
||||
write_ribbons
|
||||
write_encounters
|
||||
write_trainer_types
|
||||
write_trainers
|
||||
|
||||
Reference in New Issue
Block a user