From 7c84b1f27d7a0cc233e0315ddfb3ac09eb693147 Mon Sep 17 00:00:00 2001 From: Jennifer Taylor Date: Sun, 13 Nov 2022 02:55:57 +0000 Subject: [PATCH] More correct fallback logic for earning all emblems or not having an emblem catalog. --- bemani/backend/jubeat/base.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/bemani/backend/jubeat/base.py b/bemani/backend/jubeat/base.py index 1c910d3..f543aef 100644 --- a/bemani/backend/jubeat/base.py +++ b/bemani/backend/jubeat/base.py @@ -324,7 +324,18 @@ class JubeatBase(CoreHandler, CardManagerHandler, PASELIHandler, Base): if gameitem.data.get_int("rarity") in {4, 5}: premiumemblems.add(gameitem.id) - # Default to some emblems in case the catalog is not available. + # If they've earned all the premium emblems, give them normal emblems instead. + if normalemblems and not premiumemblems: + premiumemblems = normalemblems + + # Now, try to default to the default emblem, in the case that the person + # has earned every single part (unlikely). + if not normalemblems: + normalemblems = self.default_select_jbox() + if not premiumemblems: + premiumemblems = self.default_select_jbox() + + # Default to some hand-picked emblems in case the catalog is not available. normalindex = 2 premiumindex = 1 if normalemblems: