habitica-self-host/common/script/fns/getItem.js

12 lines
266 B
JavaScript
Raw Normal View History

2016-03-08 17:58:39 +00:00
import content from '../content/index';
import i18n from '../i18n';
module.exports = function(user, type) {
var item;
item = content.gear.flat[user.items.gear.equipped[type]];
if (!item) {
return content.gear.flat[type + "_base_0"];
}
return item;
};