HabitRPG / habitica

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

Enchanted Armoire empty flag should be calculated dynamically #12937

Open SabreCat opened 3 years ago

SabreCat commented 3 years ago

Description

The Habitica clients use user.flags.armoireEmpty to tell if they should display a message stating that there are no more gear pieces available to obtain from the Enchanted Armoire. The flag needs to be manually returned to false via database update or migration each time new gear pieces are added. That bit of administrative overhead is easy to miss, leading to reports that the Armoire is not correctly updating in arbitrary months.

We should really calculate this value dynamically based on whether the user has all the available items or not, and return that in queries for the user, rather than leaning on this failure-prone approach.

danikyl commented 3 years ago

Hi! Is it okay if I handle this one?

Alys commented 3 years ago

@danikyl Yes, thank you! Post here if you have questions.

danikyl commented 3 years ago

Okay! I'm on it

danikyl commented 3 years ago

does anyone have a idea of how to simulate a user with access to Enchanted Armoire?

SabreCat commented 3 years ago

@danikyl: Have you got a local environment running? Any user you create there should be able to buy from the Armoire, and you can use the debug functions to quickly award lots of Gold, etc.!

danikyl commented 3 years ago

@SabreCat Got it, thanks!

shanaqui commented 3 years ago

@danikyl Hi! Just checking in whether you're still working on this issue, or whether we should mark it as help wanted again! Please check in within about a week in order to keep the issue. :)

TheSeally commented 2 years ago

Hello. Can I take this issue?

SabreCat commented 2 years ago

@TheSeally Hi, sorry for the delay! If you're still interested, I can definitely hand this off to you. Let us know what questions you have, here or in the Aspiring Blacksmiths Guild!

CuriousMagpie commented 2 years ago

@TheSeally Hey, are you still working on this?

TheSeally commented 2 years ago

@CuriousMagpie, sorry for a long fix. Yeah I want to fix this issue after holidays.

I have already looked at code and have questions:

CuriousMagpie commented 2 years ago

No worries, we just wanted to be sure you were still working on it. @SabreCat is in a better place to answer your questions than I am.

SabreCat commented 2 years ago

@TheSeally ah, apologies that I didn't notice these questions!

SabreCat commented 2 years ago

No response in a long while, opening this back up.

Dhia52 commented 1 year ago

Hello @SabreCat!

Is that a good issue for a first-time Habitica contributor? I'd like to work on it.

CuriousMagpie commented 1 year ago

Hi @Dhia52! Since you already are working on another issue, we'd like to leave this one for someone else to take care of--if it's still open when you finish the other one, let us know here if you're still interested! Thanks!

CuriousMagpie commented 1 year ago

Hey there @shuldrox! This should be relatively straight-forward. I'll assign it to you. Thanks for the nudge! 😄

CuriousMagpie commented 1 year ago

You should ignore those two files. :smile: Those are scripts that the devs use and don't actually populate the armoire each month. We do a content build every month--here's part of my cheat sheet for that process:


Image File Name:

 broad_armor_armoire_fancyPirateSuit.png

Gear Variables:

const armor = { 
  fancyPirateSuit: {
    con: 4,
    int: 4,
    set: 'fancyPirate',
  },
};
"armorArmoireFancyPirateSuitText": "Fancy Pirate Jacket",
"armorArmoireFancyPirateSuitNotes": "Wear this fine jacket well as you organize your ship’s library or talk it through as a crew. Increases Constitution by <%= con %>. Increases Intelligence by <%= int %>. Enchanted Armoire: Fancy Pirate Set (Item 1 of 3).",

And @SabreCat would have a much better idea how the flag is calculated in the database than I would!

CuriousMagpie commented 1 year ago

Thanks for letting us know!

mhreid commented 1 year ago

I would love to take a stab at this issue! Can I be assigned?

CuriousMagpie commented 1 year ago

@mhreid Sure thing! Thanks so much!