HabitRPG/habitrpg — pull request #4393 by Alys (2014-12-20 21:33:04+00:00)
Title: Difficulty setting: Hide Health Potion

Requires https://github.com/HabitRPG/habitrpg-shared/pull/399

* Adds support for a difficulty setting that prevents health potions appearing in the Rewards column. Potions could still be bought through the API but I don't think that's worth changing since it would be easier to untick this setting than use the API.

* Moves the `difficulty` object in src/models/user.js into `preferences.difficulty` because that allows us to take advantage of all the existing code for reading and saving preferences. Disagreements are welcome, especially if they are accompanied by the extra code required to keep `difficulty` separate. ;) I do think it makes sense to think of these settings as preferences.

* Changes the `difficulty.potionHealing` setting to `difficulty.hidePotionHealing` because that allows for simpler code.

Note that this is going into the 'difficulty' feature branch, so merging it won't make it live. I'll merge it myself in a couple of days if no objections.