Open SabreCat opened 3 years ago
Hi! Is it okay if I handle this one?
@danikyl Yes, thank you! Post here if you have questions.
Okay! I'm on it
does anyone have a idea of how to simulate a user with access to Enchanted Armoire?
@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.!
@SabreCat Got it, thanks!
@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. :)
Hello. Can I take this issue?
@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!
@TheSeally Hey, are you still working on this?
@CuriousMagpie, sorry for a long fix. Yeah I want to fix this issue after holidays.
I have already looked at code and have questions:
pre
for example)?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.
@TheSeally ah, apologies that I didn't notice these questions!
No response in a long while, opening this back up.
Hello @SabreCat!
Is that a good issue for a first-time Habitica contributor? I'd like to work on it.
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!
Hey there @shuldrox! This should be relatively straight-forward. I'll assign it to you. Thanks for the nudge! 😄
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:
website/common/script/content/gear/sets/armoire.js
in the appropriate variable for each piece. Be sure to name them the same as the image name without the slot & armoire signifiers at the beginning. Image names will use underscores, the gear variables use camelCase.Image File Name:
broad_armor_armoire_fancyPirateSuit.png
Gear Variables:
const armor = {
fancyPirateSuit: {
con: 4,
int: 4,
set: 'fancyPirate',
},
};
website/common/locales/en/gear.json
"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!
Thanks for letting us know!
I would love to take a stab at this issue! Can I be assigned?
@mhreid Sure thing! Thanks so much!
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 tofalse
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.