diff options
author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2018-01-29 21:13:35 -0500 |
---|---|---|
committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2018-01-29 21:13:35 -0500 |
commit | 5ade37d852bd1e96f9451ab98619359a5a048cee (patch) | |
tree | 251c6bf7c24b7be69b2e908590a733a808165e4c /app/jobs | |
parent | 30cd66e1521bc760df45908adb2f7d3ba6683900 (diff) | |
download | pokeviewer-5ade37d852bd1e96f9451ab98619359a5a048cee.tar.gz pokeviewer-5ade37d852bd1e96f9451ab98619359a5a048cee.tar.bz2 pokeviewer-5ade37d852bd1e96f9451ab98619359a5a048cee.zip |
Added Pokédex viewing page
Currently a work in progress. The queries used to display the Pokémon for each species are very inefficient. The text at the top of the page is also very specific to the author.
Diffstat (limited to 'app/jobs')
-rw-r--r-- | app/jobs/pokeviewer/extract_save_data_job.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/app/jobs/pokeviewer/extract_save_data_job.rb b/app/jobs/pokeviewer/extract_save_data_job.rb index b0999ef..bb18d68 100644 --- a/app/jobs/pokeviewer/extract_save_data_job.rb +++ b/app/jobs/pokeviewer/extract_save_data_job.rb | |||
@@ -173,6 +173,16 @@ module Pokeviewer | |||
173 | rev.save! | 173 | rev.save! |
174 | end | 174 | end |
175 | end | 175 | end |
176 | |||
177 | game.pokedex_entries.clear | ||
178 | |||
179 | args["seen"].each do |param| | ||
180 | game.pokedex_entries.create(species_id: param, caught: false) | ||
181 | end | ||
182 | |||
183 | args["caught"].each do |param| | ||
184 | game.pokedex_entries.create(species_id: param, caught: true) | ||
185 | end | ||
176 | end | 186 | end |
177 | end | 187 | end |
178 | end | 188 | end |