mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-07-13 23:42:12 +00:00
[WIP] Make saddles not sellable
This commit is contained in:
parent
0fdfc4081e
commit
c39f53c224
1 changed files with 4 additions and 0 deletions
|
|
@ -43,6 +43,10 @@ module.exports = function sell (user, req = {}) {
|
|||
throw new NotFound(i18n.t('userItemsNotEnough', {type}, req.language));
|
||||
}
|
||||
|
||||
if (content[type][key].sellWarningNote) {
|
||||
throw new NotAuthorized(i18n.t('positiveAmountRequired', req.language));
|
||||
}
|
||||
|
||||
user.items[type][key] -= amount;
|
||||
if (user.markModified) user.markModified(`items.${type}`);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue