mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 14:47:53 +01:00
Add item list to common constants module
This commit is contained in:
@@ -34,3 +34,19 @@ export const GEAR_TYPES = [
|
||||
'headAccessory',
|
||||
'eyewear',
|
||||
];
|
||||
|
||||
export const ITEM_LIST = {
|
||||
weapon: { localeKey: 'weapon', isEquipment: true },
|
||||
armor: { localeKey: 'armor', isEquipment: true },
|
||||
head: { localeKey: 'headgear', isEquipment: true },
|
||||
shield: { localeKey: 'offhand', isEquipment: true },
|
||||
back: { localeKey: 'back', isEquipment: true },
|
||||
body: { localeKey: 'body', isEquipment: true },
|
||||
headAccessory: { localeKey: 'headAccessory', isEquipment: true },
|
||||
eyewear: { localeKey: 'eyewear', isEquipment: true },
|
||||
hatchingPotions: { localeKey: 'hatchingPotion', isEquipment: false },
|
||||
eggs: { localeKey: 'eggSingular', isEquipment: false },
|
||||
quests: { localeKey: 'quest', isEquipment: false },
|
||||
food: { localeKey: 'foodText', isEquipment: false },
|
||||
Saddle: { localeKey: 'foodSaddleText', isEquipment: false },
|
||||
};
|
||||
|
||||
@@ -12,6 +12,7 @@ import {
|
||||
CLASSES,
|
||||
EVENTS,
|
||||
GEAR_TYPES,
|
||||
ITEM_LIST,
|
||||
} from './constants';
|
||||
|
||||
import mysterySets from './mystery-sets';
|
||||
@@ -25,60 +26,7 @@ import mysterySets from './mystery-sets';
|
||||
|
||||
api.mystery = mysterySets;
|
||||
|
||||
api.itemList = {
|
||||
'weapon': {
|
||||
localeKey: 'weapon',
|
||||
isEquipment: true
|
||||
},
|
||||
'armor': {
|
||||
localeKey: 'armor',
|
||||
isEquipment: true
|
||||
},
|
||||
'head': {
|
||||
localeKey: 'headgear',
|
||||
isEquipment: true
|
||||
},
|
||||
'shield': {
|
||||
localeKey: 'offhand',
|
||||
isEquipment: true
|
||||
},
|
||||
'back': {
|
||||
localeKey: 'back',
|
||||
isEquipment: true
|
||||
},
|
||||
'body': {
|
||||
localeKey: 'body',
|
||||
isEquipment: true
|
||||
},
|
||||
'headAccessory': {
|
||||
localeKey: 'headAccessory',
|
||||
isEquipment: true
|
||||
},
|
||||
'eyewear': {
|
||||
localeKey: 'eyewear',
|
||||
isEquipment: true
|
||||
},
|
||||
'hatchingPotions': {
|
||||
localeKey: 'hatchingPotion',
|
||||
isEquipment: false
|
||||
},
|
||||
'eggs': {
|
||||
localeKey: 'eggSingular',
|
||||
isEquipment: false
|
||||
},
|
||||
'quests': {
|
||||
localeKey: 'quest',
|
||||
isEquipment: false
|
||||
},
|
||||
'food': {
|
||||
localeKey: 'foodText',
|
||||
isEquipment: false
|
||||
},
|
||||
'Saddle': {
|
||||
localeKey: 'foodSaddleText',
|
||||
isEquipment: false
|
||||
}
|
||||
};
|
||||
api.itemList = ITEM_LIST;
|
||||
|
||||
gear = {
|
||||
weapon: {
|
||||
|
||||
@@ -1,56 +0,0 @@
|
||||
let itemList = {
|
||||
'weapon': {
|
||||
localeKey: 'weapon',
|
||||
isEquipment: true
|
||||
},
|
||||
'armor': {
|
||||
localeKey: 'armor',
|
||||
isEquipment: true
|
||||
},
|
||||
'head': {
|
||||
localeKey: 'headgear',
|
||||
isEquipment: true
|
||||
},
|
||||
'shield': {
|
||||
localeKey: 'offhand',
|
||||
isEquipment: true
|
||||
},
|
||||
'back': {
|
||||
localeKey: 'back',
|
||||
isEquipment: true
|
||||
},
|
||||
'body': {
|
||||
localeKey: 'body',
|
||||
isEquipment: true
|
||||
},
|
||||
'headAccessory': {
|
||||
localeKey: 'headAccessory',
|
||||
isEquipment: true
|
||||
},
|
||||
'eyewear': {
|
||||
localeKey: 'eyewear',
|
||||
isEquipment: true
|
||||
},
|
||||
'hatchingPotions': {
|
||||
localeKey: 'hatchingPotion',
|
||||
isEquipment: false
|
||||
},
|
||||
'eggs': {
|
||||
localeKey: 'eggSingular',
|
||||
isEquipment: false
|
||||
},
|
||||
'quests': {
|
||||
localeKey: 'quest',
|
||||
isEquipment: false
|
||||
},
|
||||
'food': {
|
||||
localeKey: 'foodText',
|
||||
isEquipment: false
|
||||
},
|
||||
'Saddle': {
|
||||
localeKey: 'foodSaddleText',
|
||||
isEquipment: false
|
||||
}
|
||||
};
|
||||
|
||||
export default itemList;
|
||||
Reference in New Issue
Block a user