-
Notifications
You must be signed in to change notification settings - Fork 6
Fix wardrobe length after loading local wardrobe #90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: beta
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for wce ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site configuration. |
|
Having
That's not true. I've just confirmed, that it works correctly. |
|
Nope, seems to work correctly too. If there should be a bug, please report it with proper repdrocutions steps. This is at least not the correct fix and seems to 'fix' a non-issue. |
|
Indeed, but the I found this after investigating why someone still only had 96 slots even after enabling the local wardrobe option. Repro steps:
This is testing on chrome. How are you testing? Is it possible you already have local wardrobe data set? It works fine in this case as the wardrobe data is loaded with the right number of slots, effectively. |
|
The only thing slightly fragile about the legacy settings code is, that the side effect handling assumes that https://github.com/KittenApps/WCE/blob/beta/src/util/settings.ts#L946-L962 |
|
Ah, if it's reliant on iteration order, this will be insertion order in this case, ie. order they appear in the JSON: probably how the settings have been saved rather than javascript engine differences. That might explain the difference. For all my accounts / test accounts I've looked at, I only started looking at this because someone reported their extra local wardrobe slots weren't appearing, and then I noticed the option didn't work for me either, so this is definitely a problem in practice (I got them to run I've reproduced the same problem on a completely fresh browser environment and new BC account. So, new repro steps:
If you'd rather fix this a different way, eg. run |
c4a004f to
2e3f08a
Compare
04500b6 to
6715c47
Compare
Additional slots were not getting added when the local wardrobe was enabled, so player that didn't already have local wardrobe data saved wouldn't get any extra wardrobe slots.
loadExtendedWardrobecallsWardrobeFixLength()to add the new slots butloadLocalWardrobedoesn't. I've added it to settings in the same place that the wardrobe size is adjusted for the local wardrobe, although for extended wardrobes this is all done inloadExtendedWardrobe.