mirror of
https://github.com/veekun/pokedex.git
synced 2024-08-20 18:16:34 +00:00
Unbreak SaveFilePokemon slightly
The schema has changed a little in the past, uh, seven years. Works well enough to parse and display one of my pokemon in the gts plugin. Updates veekun/spline-pokedex#72
This commit is contained in:
parent
57915f656b
commit
ffb0638ef5
1 changed files with 2 additions and 2 deletions
|
@ -107,11 +107,11 @@ class SaveFilePokemon(object):
|
||||||
self._pokemon = session.query(tables.Pokemon).get(st.national_id)
|
self._pokemon = session.query(tables.Pokemon).get(st.national_id)
|
||||||
self._pokemon_form = session.query(tables.PokemonForm) \
|
self._pokemon_form = session.query(tables.PokemonForm) \
|
||||||
.with_parent(self._pokemon) \
|
.with_parent(self._pokemon) \
|
||||||
.filter_by(name=st.alternate_form) \
|
.filter_by(form_identifier=st.alternate_form) \
|
||||||
.one()
|
.one()
|
||||||
self._ability = self._session.query(tables.Ability).get(st.ability_id)
|
self._ability = self._session.query(tables.Ability).get(st.ability_id)
|
||||||
|
|
||||||
growth_rate = self._pokemon.evolution_chain.growth_rate
|
growth_rate = self._pokemon.species.growth_rate
|
||||||
self._experience_rung = session.query(tables.Experience) \
|
self._experience_rung = session.query(tables.Experience) \
|
||||||
.filter(tables.Experience.growth_rate == growth_rate) \
|
.filter(tables.Experience.growth_rate == growth_rate) \
|
||||||
.filter(tables.Experience.experience <= st.exp) \
|
.filter(tables.Experience.experience <= st.exp) \
|
||||||
|
|
Loading…
Reference in a new issue