diff --git a/ui/workers/gather_evolutions_worker.py b/ui/workers/gather_evolutions_worker.py index 46431f4..91550ab 100644 --- a/ui/workers/gather_evolutions_worker.py +++ b/ui/workers/gather_evolutions_worker.py @@ -115,6 +115,19 @@ class GatherEvolutions(QRunnable): } evolution_tree["evolves_to"].append(node) + if evolution_tree["pokemon"] == "Flabébé": + def fix_form(node, new_form): + node["form"] = new_form + for next in node["evolves_to"]: + fix_form(next, new_form) + + flower_form = get_form_name(pokemon_form) + if "female" in flower_form.lower(): + flower_form = flower_form.replace("Female", "").replace("female", "").strip() + else: + flower_form = flower_form.replace("Male", "").replace("male", "").strip() + fix_form(evolution_tree, flower_form) + cacheable_container = {} if evolution_tree: self.traverse_and_store(evolution_tree, cacheable_container, gender)