diff options
author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2017-10-04 23:03:58 -0400 |
---|---|---|
committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2017-10-04 23:03:58 -0400 |
commit | 52bac73894ad0fe20d7aec907bbd7f07e83ca477 (patch) | |
tree | d7a36c160c1b5ecf1d738c5cd60cf1f388ff5196 /app/models | |
parent | 353b170392892a1f9bdde74550112b5131c99fd2 (diff) | |
download | pokeviewer-52bac73894ad0fe20d7aec907bbd7f07e83ca477.tar.gz pokeviewer-52bac73894ad0fe20d7aec907bbd7f07e83ca477.tar.bz2 pokeviewer-52bac73894ad0fe20d7aec907bbd7f07e83ca477.zip |
Added generic met message for Pokémon from Orre
Pokémon from Orre now display "Met in a trade" instead of an entirely incorrect met location, because we're not currently equipped to display the proper met data for them (see hatkirby/gen3uploader#6).
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/pokeviewer/pokemon.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/app/models/pokeviewer/pokemon.rb b/app/models/pokeviewer/pokemon.rb index 3818f58..18d1533 100644 --- a/app/models/pokeviewer/pokemon.rb +++ b/app/models/pokeviewer/pokemon.rb | |||
@@ -49,7 +49,8 @@ module Pokeviewer | |||
49 | if: Proc.new { |a| a.met_type == :normal } | 49 | if: Proc.new { |a| a.met_type == :normal } |
50 | 50 | ||
51 | validates :met_type, presence: true | 51 | validates :met_type, presence: true |
52 | enumerize :met_type, in: [:normal, :hatched, :npc_trade, :fateful_encounter] | 52 | enumerize :met_type, |
53 | in: [:normal, :hatched, :npc_trade, :fateful_encounter, :orre] | ||
53 | 54 | ||
54 | belongs_to :location, optional: true | 55 | belongs_to :location, optional: true |
55 | validates :location, presence: true, | 56 | validates :location, presence: true, |
@@ -153,6 +154,8 @@ module Pokeviewer | |||
153 | "Met in a trade." | 154 | "Met in a trade." |
154 | elsif met_type == :fateful_encounter | 155 | elsif met_type == :fateful_encounter |
155 | "Obtained in a fateful encounter at Lv. #{met_level}." | 156 | "Obtained in a fateful encounter at Lv. #{met_level}." |
157 | elsif met_type == :orre | ||
158 | "Met in a trade." | ||
156 | end | 159 | end |
157 | end | 160 | end |
158 | 161 | ||