mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 15:17:25 +01:00
Move potion and armoire into separate modules
This commit is contained in:
20
common/script/src/content/armoire.js
Normal file
20
common/script/src/content/armoire.js
Normal file
@@ -0,0 +1,20 @@
|
||||
import {contains} from 'lodash';
|
||||
import {translator as t} from './helpers';
|
||||
|
||||
let armoire = {
|
||||
type: 'armoire',
|
||||
text: t('armoireText'),
|
||||
notes: ((user, count) => {
|
||||
if (user.flags.armoireEmpty) {
|
||||
return t('armoireNotesEmpty')();
|
||||
}
|
||||
return t('armoireNotesFull')() + count;
|
||||
}),
|
||||
value: 100,
|
||||
key: 'armoire',
|
||||
canOwn: ((user) => {
|
||||
return contains(user.achievements.ultimateGearSets, true);
|
||||
})
|
||||
};
|
||||
|
||||
export default armoire;
|
||||
11
common/script/src/content/health-potion.js
Normal file
11
common/script/src/content/health-potion.js
Normal file
@@ -0,0 +1,11 @@
|
||||
import {translator as t} from './helpers';
|
||||
|
||||
let potion = {
|
||||
type: 'potion',
|
||||
text: t('potionText'),
|
||||
notes: t('potionNotes'),
|
||||
value: 25,
|
||||
key: 'potion',
|
||||
};
|
||||
|
||||
export default potion;
|
||||
Reference in New Issue
Block a user