diff --git a/polylan_submitter/noita/management/commands/load_objectiv_points.py b/polylan_submitter/noita/management/commands/load_objectiv_points.py index 085cf28..aaf4d20 100644 --- a/polylan_submitter/noita/management/commands/load_objectiv_points.py +++ b/polylan_submitter/noita/management/commands/load_objectiv_points.py @@ -1,6 +1,7 @@ from django.core.management.base import BaseCommand from noita.models import ObjectivPoint from noita.services.decode import POINTS +from noita.services.spells import ALL_PERKS, ALL_SPELLS class Command(BaseCommand): @@ -55,6 +56,20 @@ class Command(BaseCommand): ) ) + for op in ObjectivPoint.objects.filter(objectiv_id__in=ALL_SPELLS): + op.display_string = f"Spell: {op.display_string}" + op.save() + + for op in ObjectivPoint.objects.filter(objectiv_id__in=ALL_PERKS): + op.display_string = f"Perk: {op.display_string}" + op.save() + + for op in ObjectivPoint.objects.filter(objectiv_id__startswith="BOSS_KILL_"): + b, k, c = op.display_string.split(" ") + op.display_string = f"Perk: {op.display_string}" + op.display_string = f"{b} {k} (with {c} orbs)" + op.save() + self.stdout.write(self.style.SUCCESS(f"\nCreated: {created_count}")) self.stdout.write(self.style.SUCCESS(f"Updated: {updated_count}")) self.stdout.write(