From 9c022576fa053fd32aaebc7acb2bb44884a623d7 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Sat, 30 Sep 2017 19:01:56 -0400 Subject: Added hold items MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit An items model was created, but the seed only contains items that can be held, which excludes key items and HMs. Berry Juice, while unobtainable, is still included. The item model contains three description fields: one for Ruby/Sapphire, one for FireRed/LeafGreen, and one for Emerald. This is because the descriptions for items are different between the games. In a lot of cases, the Emerald description is the same as the Ruby/Sapphire one, so in those cases, the Emerald description is nil. The purpose of having the different descriptions is so that when a Pokémon holds an item, the website can display the description that is accurate to the game that that Pokémon is currently in. In order to fully support TMs, the move model was improved to additionally contain type and also the three description fields which operate similarly to those of the item model. For TMs, the description fields on the item are usually nil. However, some TMs in Ruby/Sapphire, as well as Emerald, have different descriptions than the moves that they correspond with. In these cases, those descriptions are in the item model, and override the move descriptions when the move is looked at as a TM. --- app/jobs/pokeviewer/extract_save_data_job.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (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 b60a8c5..546e6d2 100644 --- a/app/jobs/pokeviewer/extract_save_data_job.rb +++ b/app/jobs/pokeviewer/extract_save_data_job.rb @@ -120,7 +120,7 @@ module Pokeviewer rev.smartness = param["smartness"] rev.toughness = param["toughness"] rev.sheen = param["sheen"] - rev.hold_item = param["heldItem"] + rev.item_id = param["heldItem"] if param.key? "heldItem" rev.move_1_id = param["moves"][0]["id"] rev.move_1_pp_bonuses = param["moves"][0]["ppBonuses"] -- cgit 1.4.1