HabitRPG / habitica

A habit tracker app which treats your goals like a Role Playing Game.
https://habitica.com
Other
11.95k stars 4.08k forks source link

no quest completion modal is shown for quests with no completion text #9769

Closed Alys closed 6 years ago

Alys commented 6 years ago

When a quest does not have "completion" text, players never see the quest completed modal because this error occurs: TypeError: e.questData.completion is not a function

This affects these quests, none of which have completion text:

As an example of what completion text is, this is what we have in questsContent.json for the vice3 quest, which does not have this bug: "questVice3Completion": "The shadows dissipate from the cavern and a steely silence falls. My word, you've done it! You have defeated Vice! You and your party may finally breathe a sigh of relief. Enjoy your victory, brave Habiteers, but take the lessons you've learned from battling Vice and move forward. There are still Habits to be done and potentially worse evils to conquer!",

Text like that does not exists for the eight quests listed above.

The code that tries to use the completion text is https://github.com/HabitRPG/habitica/blob/17fb681671a098e0595e03c80aa91feb3b3c354d/website/client/components/achievements/questCompleted.vue

EDIT 2018-01-10: The desired fix is to adjust the code so that if the completion text does not exist, the modal can still appear. As described by Lemoness in a comment below, we'll also add completion text for the quests that are missing it, but that can be done separately to the fix for this issue.

~There's two possible solutions:~

~Or both. :) Even if the first is done, doing the second too would be safest in case future quests aren't given completion text.~

~I'm marking this suggestion-discussion for a few days. If there's no decision about whether to add text to those quests, we'll just go with the second option.~

lemoness commented 6 years ago

It would be fairly straightforward to add a sentence of completion text to those quests, and the consistency would be nice, but the second is definitely something that should be done as well so that we don't run into this issue in the future.

On Fri, Jan 5, 2018 at 5:28 PM, Alys notifications@github.com wrote:

When a quest does not have "completion" text, players never see the quest completed modal because this error occurs: TypeError: e.questData.completion is not a function

This affects these quests, none of which have completion text:

  • vice1 (Vice, Part 1: Free Yourself of the Dragon's Influence)
  • vice2 (Vice, Part 2: Find the Lair of the Wyrm)
  • atom1 (Attack of the Mundane, Part 1: Dish Disaster!)
  • atom2 (Attack of the Mundane, Part 2: The SnackLess Monster)
  • moonstone1 (Recidivate, Part 1: The Moonstone Chain)
  • moonstone2 (Recidivate, Part 2: Recidivate the Necromancer)
  • goldenknight1 (The Golden Knight, Part 1: A Stern Talking-To)
  • goldenknight2 (The Golden Knight, Part 2: Gold Knight)

As an example of what completion text is, this is what we have in questsContent.json for the vice3 quest, which does not have this bug: "questVice3Completion": "The shadows dissipate from the cavern and a steely silence falls. My word, you've done it! You have defeated Vice! You and your party may finally breathe a sigh of relief. Enjoy your victory, brave Habiteers, but take the lessons you've learned from battling Vice and move forward. There are still Habits to be done and potentially worse evils to conquer!",

Text like that does not exists for the eight quests listed above.

The code that tries to use the completion text is https://github.com/HabitRPG/habitica/blob/17fb681671a098e0595e03c80aa91f eb3b3c354d/website/client/components/achievements/questCompleted.vue

There's two possible solutions:

  • Provide competion text for those eight quests (@lemoness https://github.com/lemoness Should there be completion text for all quests?)
  • Adjust the code so that if the completion text does not exist, the modal can still appear.

Or both. :) Even if the first is done, doing the second too would be safest in case future quests aren't given completion text.

I'm marking this suggestion-discussion for a few days. If there's no decision about whether to add text to those quests, we'll just go with the second option.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/HabitRPG/habitica/issues/9769, or mute the thread https://github.com/notifications/unsubscribe-auth/ADVQwTfk-EU6YWiIaAcHr5PFkjgLZSrKks5tHswugaJpZM4RVJMi .