Skip to content

Commit

Permalink
chore: add more item types
Browse files Browse the repository at this point in the history
  • Loading branch information
feildmaster committed Oct 19, 2023
1 parent dc1d755 commit 80fb652
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions src/structures/constants/item.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
import Constant from './constant.js';
import * as api from '../../utils/4.api.js';

export default class Item extends Constant {
static GOLD = new Item('Gold', 'gold', 'GOLD', 'reward-gold');
static UCP = new Item('UCP', 'ucp');
static UCP = new Item('UCP', 'ucp', 'reward-ucp');
static DUST = new Item('Dust', 'dust', 'DUST', 'reward-dust');
static UT_PACK = new Item('Pack', 'pack', 'PACK', 'reward-pack');
static DR_PACK = new Item('DR Pack', 'dr pack', 'DRPack', 'DR_PACK', 'reward-dr-pack');
static SHINY_PACK = new Item('Shiny Pack', 'SinyPack', 'shiny pack', 'reward-shiny-pack');
static SUPER_PACK = new Item('Super Pack', 'SuperPack', 'super pack');
static FINAL_PACK = new Item('Final Pack', 'FinalPack', 'final pack');
static SUPER_PACK = new Item('Super Pack', 'SuperPack', 'super pack', 'reward-super-pack');
static FINAL_PACK = new Item('Final Pack', 'FinalPack', 'final pack', 'reward-final-pack');
static DT_FRAGMENT = new Item('DT Fragment', 'ragment', 'dt fragment', 'reward-dt-fragment');
static EMOTE = new Item('Emote', 'emote', 'reward-emote');
static CARD = new Item('Card', 'card');
static SKIN = new Item('Card Skin', 'Skin', 'card skin', 'skin', 'reward-card-skin');
static AVATAR = new Item('Avatar', 'avatar', 'reward-avatar');
static PROFILE = new Item('Profile Skin', 'Profile', 'profile skin', 'profile', 'reward-profile-skin');

static find(name) {
if (!Item.find.values) {
Expand All @@ -19,8 +23,3 @@ export default class Item extends Constant {
return Item.find.values.find((item) => item.equals(name));
}
}

const constants = api.mod.constants;
Object.keys(Item).forEach((key) => {
constants[key] = Item[key];
});

0 comments on commit 80fb652

Please sign in to comment.