mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 22:57:21 +01:00
split user.fns
This commit is contained in:
11
common/script/fns/getItem.js
Normal file
11
common/script/fns/getItem.js
Normal file
@@ -0,0 +1,11 @@
|
||||
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;
|
||||
};
|
||||
Reference in New Issue
Block a user