From a7060addea52af313ed85336dc37949ad8e69f05 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Sat, 30 Sep 2017 08:23:48 -0400 Subject: Added gift ribbon descriptions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- app/jobs/pokeviewer/extract_save_data_job.rb | 30 ++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'app/jobs') 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 end end + if args.key? "marineRibbon" + game.marine_ribbon = GiftRibbon.find_by_id(args["marineRibbon"]) + end + + if args.key? "landRibbon" + game.land_ribbon = GiftRibbon.find_by_id(args["landRibbon"]) + end + + if args.key? "skyRibbon" + game.sky_ribbon = GiftRibbon.find_by_id(args["skyRibbon"]) + end + + if args.key? "countryRibbon" + game.country_ribbon = GiftRibbon.find_by_id(args["countryRibbon"]) + end + + if args.key? "nationalRibbon" + game.national_ribbon = GiftRibbon.find_by_id(args["nationalRibbon"]) + end + + if args.key? "earthRibbon" + game.earth_ribbon = GiftRibbon.find_by_id(args["earthRibbon"]) + end + + if args.key? "worldRibbon" + game.world_ribbon = GiftRibbon.find_by_id(args["worldRibbon"]) + end + + game.save! if game.changed? + args["boxes"].each_with_index do |box_name,index| box = Box.find_or_initialize_by(trainer: game, number: index) box.name = box_name -- cgit 1.4.1