about summary refs log tree commit diff stats
path: root/app/jobs
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2017-09-30 08:23:48 -0400
committerKelly Rauchenberger <fefferburbia@gmail.com>2017-09-30 08:23:48 -0400
commita7060addea52af313ed85336dc37949ad8e69f05 (patch)
treee2a65669c9f30788c22635800180f5393c9ec49c /app/jobs
parent6dff23b065bd933ff2f571d2264c86902173d40b (diff)
downloadpokeviewer-a7060addea52af313ed85336dc37949ad8e69f05.tar.gz
pokeviewer-a7060addea52af313ed85336dc37949ad8e69f05.tar.bz2
pokeviewer-a7060addea52af313ed85336dc37949ad8e69f05.zip
Added gift ribbon descriptions
This is basically just for completeness because it is unknown whether
gift ribbons other than the National Ribbon and Earth Ribbon from
Pokémon Colosseum were ever distributed.
Diffstat (limited to 'app/jobs')
-rw-r--r--app/jobs/pokeviewer/extract_save_data_job.rb30
1 files changed, 30 insertions, 0 deletions
diff --git a/app/jobs/pokeviewer/extract_save_data_job.rb b/app/jobs/pokeviewer/extract_save_data_job.rb index f7b8f8f..b60a8c5 100644 --- a/app/jobs/pokeviewer/extract_save_data_job.rb +++ b/app/jobs/pokeviewer/extract_save_data_job.rb
@@ -22,6 +22,36 @@ module Pokeviewer
22 end 22 end
23 end 23 end
24 24
25 if args.key? "marineRibbon"
26 game.marine_ribbon = GiftRibbon.find_by_id(args["marineRibbon"])
27 end
28
29 if args.key? "landRibbon"
30 game.land_ribbon = GiftRibbon.find_by_id(args["landRibbon"])
31 end
32
33 if args.key? "skyRibbon"
34 game.sky_ribbon = GiftRibbon.find_by_id(args["skyRibbon"])
35 end
36
37 if args.key? "countryRibbon"
38 game.country_ribbon = GiftRibbon.find_by_id(args["countryRibbon"])
39 end
40
41 if args.key? "nationalRibbon"
42 game.national_ribbon = GiftRibbon.find_by_id(args["nationalRibbon"])
43 end
44
45 if args.key? "earthRibbon"
46 game.earth_ribbon = GiftRibbon.find_by_id(args["earthRibbon"])
47 end
48
49 if args.key? "worldRibbon"
50 game.world_ribbon = GiftRibbon.find_by_id(args["worldRibbon"])
51 end
52
53 game.save! if game.changed?
54
25 args["boxes"].each_with_index do |box_name,index| 55 args["boxes"].each_with_index do |box_name,index|
26 box = Box.find_or_initialize_by(trainer: game, number: index) 56 box = Box.find_or_initialize_by(trainer: game, number: index)
27 box.name = box_name 57 box.name = box_name