mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 22:57:21 +01:00
Add item list to common constants module
This commit is contained in:
@@ -34,3 +34,19 @@ export const GEAR_TYPES = [
|
|||||||
'headAccessory',
|
'headAccessory',
|
||||||
'eyewear',
|
'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,
|
CLASSES,
|
||||||
EVENTS,
|
EVENTS,
|
||||||
GEAR_TYPES,
|
GEAR_TYPES,
|
||||||
|
ITEM_LIST,
|
||||||
} from './constants';
|
} from './constants';
|
||||||
|
|
||||||
import mysterySets from './mystery-sets';
|
import mysterySets from './mystery-sets';
|
||||||
@@ -25,60 +26,7 @@ import mysterySets from './mystery-sets';
|
|||||||
|
|
||||||
api.mystery = mysterySets;
|
api.mystery = mysterySets;
|
||||||
|
|
||||||
api.itemList = {
|
api.itemList = 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
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
gear = {
|
gear = {
|
||||||
weapon: {
|
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