about summary refs log tree commit diff stats
path: root/app/jobs
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2017-09-29 18:36:57 -0400
committerKelly Rauchenberger <fefferburbia@gmail.com>2017-09-29 18:36:57 -0400
commit6dff23b065bd933ff2f571d2264c86902173d40b (patch)
tree1b7853fce373897068d244cd2ae1487bf49cef6e /app/jobs
parentdc4a4d2f9a338e3d3560c514b0c97cb8bfea36b1 (diff)
downloadpokeviewer-6dff23b065bd933ff2f571d2264c86902173d40b.tar.gz
pokeviewer-6dff23b065bd933ff2f571d2264c86902173d40b.tar.bz2
pokeviewer-6dff23b065bd933ff2f571d2264c86902173d40b.zip
Added ribbons
Gift ribbons currently partially work: the correct ribbon image and name
is shown, but the ribbon description is not yet extracted from the game
and thus is just blank.
Diffstat (limited to 'app/jobs')
-rw-r--r--app/jobs/pokeviewer/extract_save_data_job.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/app/jobs/pokeviewer/extract_save_data_job.rb b/app/jobs/pokeviewer/extract_save_data_job.rb index be8f64d..f7b8f8f 100644 --- a/app/jobs/pokeviewer/extract_save_data_job.rb +++ b/app/jobs/pokeviewer/extract_save_data_job.rb
@@ -109,6 +109,24 @@ module Pokeviewer
109 rev.move_4_pp_bonuses = param["moves"][3]["ppBonuses"] 109 rev.move_4_pp_bonuses = param["moves"][3]["ppBonuses"]
110 end 110 end
111 111
112 rev.cool_ribbons = param["coolRibbons"]
113 rev.beauty_ribbons = param["beautyRibbons"]
114 rev.cute_ribbons = param["cuteRibbons"]
115 rev.smart_ribbons = param["smartRibbons"]
116 rev.tough_ribbons = param["toughRibbons"]
117 rev.champion_ribbon = param.fetch "championRibbon", false
118 rev.winning_ribbon = param.fetch "winningRibbon", false
119 rev.victory_ribbon = param.fetch "victoryRibbon", false
120 rev.artist_ribbon = param.fetch "artistRibbon", false
121 rev.effort_ribbon = param.fetch "effortRibbon", false
122 rev.marine_ribbon = param.fetch "marineRibbon", false
123 rev.land_ribbon = param.fetch "landRibbon", false
124 rev.sky_ribbon = param.fetch "skyRibbon", false
125 rev.country_ribbon = param.fetch "countryRibbon", false
126 rev.national_ribbon = param.fetch "nationalRibbon", false
127 rev.earth_ribbon = param.fetch "earthRibbon", false
128 rev.world_ribbon = param.fetch "worldRibbon", false
129
112 if pk.revisions.empty? or rev.diff?(pk.revisions.last) 130 if pk.revisions.empty? or rev.diff?(pk.revisions.last)
113 rev.save! 131 rev.save!
114 end 132 end