fix(noita): better display name
This commit is contained in:
parent
89faa7cd40
commit
bf21a5eae6
@ -1,6 +1,7 @@
|
|||||||
from django.core.management.base import BaseCommand
|
from django.core.management.base import BaseCommand
|
||||||
from noita.models import ObjectivPoint
|
from noita.models import ObjectivPoint
|
||||||
from noita.services.decode import POINTS
|
from noita.services.decode import POINTS
|
||||||
|
from noita.services.spells import ALL_PERKS, ALL_SPELLS
|
||||||
|
|
||||||
|
|
||||||
class Command(BaseCommand):
|
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"\nCreated: {created_count}"))
|
||||||
self.stdout.write(self.style.SUCCESS(f"Updated: {updated_count}"))
|
self.stdout.write(self.style.SUCCESS(f"Updated: {updated_count}"))
|
||||||
self.stdout.write(
|
self.stdout.write(
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user