mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-14 13:17:24 +01:00
fix exports
This commit is contained in:
@@ -41,7 +41,7 @@ import axios from 'axios';
|
|||||||
import Avatar from '../avatar';
|
import Avatar from '../avatar';
|
||||||
import { mapState } from '@/libs/store';
|
import { mapState } from '@/libs/store';
|
||||||
import percent from '@/../../common/script/libs/percent';
|
import percent from '@/../../common/script/libs/percent';
|
||||||
import {maxHealth} from '@/../../common/script/index';
|
import {MAX_HEALTH as maxHealth} from '@/../../common/script/constants';
|
||||||
import revive from '@/../../common/script/ops/revive';
|
import revive from '@/../../common/script/ops/revive';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapState } from '@/libs/store';
|
import { mapState } from '@/libs/store';
|
||||||
import eggs from '@/../../common/script/content/eggs';
|
import * as eggs from '@/../../common/script/content/eggs';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data () {
|
data () {
|
||||||
|
|||||||
@@ -116,7 +116,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import Avatar from '../avatar';
|
import Avatar from '../avatar';
|
||||||
import { mapState } from '@/libs/store';
|
import { mapState } from '@/libs/store';
|
||||||
import {maxHealth} from '@/../../common/script/index';
|
import {MAX_HEALTH as maxHealth} from '@/../../common/script/constants';
|
||||||
import styleHelper from '@/mixins/styleHelper';
|
import styleHelper from '@/mixins/styleHelper';
|
||||||
import twitter from '@/assets/svg/twitter.svg';
|
import twitter from '@/assets/svg/twitter.svg';
|
||||||
import facebook from '@/assets/svg/facebook.svg';
|
import facebook from '@/assets/svg/facebook.svg';
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ b-modal#login-incentives(:title="data.message", size='md', :hide-footer="true")
|
|||||||
<script>
|
<script>
|
||||||
import { mapState } from '@/libs/store';
|
import { mapState } from '@/libs/store';
|
||||||
import Avatar from '../avatar';
|
import Avatar from '../avatar';
|
||||||
import {loginIncentives} from '@/../../common/script/content/index';
|
import content from '@/../../common/script/content/index';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
@@ -62,7 +62,7 @@ export default {
|
|||||||
props: ['data'],
|
props: ['data'],
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
loginIncentives,
|
loginIncentives: content.loginIncentives,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
|||||||
@@ -59,7 +59,7 @@
|
|||||||
import Avatar from '../avatar';
|
import Avatar from '../avatar';
|
||||||
import { mapState } from '@/libs/store';
|
import { mapState } from '@/libs/store';
|
||||||
import percent from '@/../../common/script/libs/percent';
|
import percent from '@/../../common/script/libs/percent';
|
||||||
import {maxHealth} from '@/../../common/script/index';
|
import {MAX_HEALTH as maxHealth} from '@/../../common/script/constants';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
|
|||||||
@@ -23,12 +23,12 @@
|
|||||||
</style>
|
</style>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import quests from '@/../../common/script/content/quests';
|
import * as quests from '@/../../common/script/content/quests';
|
||||||
import questDialogDrops from '@/components/shops/quests/questDialogDrops';
|
import questDialogDrops from '@/components/shops/quests/questDialogDrops';
|
||||||
|
|
||||||
import { mapState } from '@/libs/store';
|
import { mapState } from '@/libs/store';
|
||||||
import percent from '@/../../common/script/libs/percent';
|
import percent from '@/../../common/script/libs/percent';
|
||||||
import { maxHealth } from '@/../../common/script/index';
|
import {MAX_HEALTH as maxHealth} from '@/../../common/script/constants';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
|
|||||||
@@ -45,10 +45,10 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import quests from '@/../../common/script/content/quests';
|
import * as quests from '@/../../common/script/content/quests';
|
||||||
import { mapState } from '@/libs/store';
|
import { mapState } from '@/libs/store';
|
||||||
import percent from '@/../../common/script/libs/percent';
|
import percent from '@/../../common/script/libs/percent';
|
||||||
import {maxHealth} from '@/../../common/script/index';
|
import {MAX_HEALTH as maxHealth} from '@/../../common/script/constants';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data () {
|
data () {
|
||||||
|
|||||||
@@ -709,7 +709,7 @@ import map from 'lodash/map';
|
|||||||
import { mapState } from '@/libs/store';
|
import { mapState } from '@/libs/store';
|
||||||
import avatar from './avatar';
|
import avatar from './avatar';
|
||||||
import usernameForm from './settings/usernameForm';
|
import usernameForm from './settings/usernameForm';
|
||||||
import { getBackgroundShopSets } from '@/../../common/script/libs/shops';
|
import shops from '@/../../common/script/libs/shops';
|
||||||
import guide from '@/mixins/guide';
|
import guide from '@/mixins/guide';
|
||||||
import notifications from '@/mixins/notifications';
|
import notifications from '@/mixins/notifications';
|
||||||
import toggleSwitch from '@/components/ui/toggleSwitch';
|
import toggleSwitch from '@/components/ui/toggleSwitch';
|
||||||
@@ -754,7 +754,7 @@ export default {
|
|||||||
this.$root.$on('buyModal::boughtItem', this.backgroundPurchased);
|
this.$root.$on('buyModal::boughtItem', this.backgroundPurchased);
|
||||||
},
|
},
|
||||||
data () {
|
data () {
|
||||||
let backgroundShopSets = getBackgroundShopSets();
|
let backgroundShopSets = shops.getBackgroundShopSets();
|
||||||
|
|
||||||
return {
|
return {
|
||||||
loading: false,
|
loading: false,
|
||||||
|
|||||||
@@ -135,7 +135,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapState, mapGetters } from '@/libs/store';
|
import { mapState, mapGetters } from '@/libs/store';
|
||||||
import quests from '@/../../common/script/content/quests';
|
import * as quests from '@/../../common/script/content/quests';
|
||||||
|
|
||||||
import copyIcon from '@/assets/svg/copy.svg';
|
import copyIcon from '@/assets/svg/copy.svg';
|
||||||
import greyBadgeIcon from '@/assets/svg/grey-badge.svg';
|
import greyBadgeIcon from '@/assets/svg/grey-badge.svg';
|
||||||
|
|||||||
@@ -163,27 +163,27 @@ sidebar-section(:title="$t('questDetailsTitle')")
|
|||||||
|
|
||||||
span {
|
span {
|
||||||
margin-top: .3em;
|
margin-top: .3em;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
.accept, .reject {
|
.accept, .reject {
|
||||||
padding: .2em 1em;
|
padding: .2em 1em;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
height: 24px;
|
height: 24px;
|
||||||
border-radius: 2px;
|
border-radius: 2px;
|
||||||
box-shadow: 0 2px 2px 0 rgba(26, 24, 29, 0.16), 0 1px 4px 0 rgba(26, 24, 29, 0.12);
|
box-shadow: 0 2px 2px 0 rgba(26, 24, 29, 0.16), 0 1px 4px 0 rgba(26, 24, 29, 0.12);
|
||||||
}
|
}
|
||||||
|
|
||||||
.accept {
|
.accept {
|
||||||
background-color: #24cc8f;
|
background-color: #24cc8f;
|
||||||
margin-left: 4em;
|
margin-left: 4em;
|
||||||
margin-right: .5em;
|
margin-right: .5em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.reject {
|
.reject {
|
||||||
border-radius: 2px;
|
border-radius: 2px;
|
||||||
background-color: #f74e52;
|
background-color: #f74e52;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -191,7 +191,7 @@ sidebar-section(:title="$t('questDetailsTitle')")
|
|||||||
<script>
|
<script>
|
||||||
import { mapState } from '@/libs/store';
|
import { mapState } from '@/libs/store';
|
||||||
|
|
||||||
import quests from '@/../../common/script/content/quests';
|
import * as quests from '@/../../common/script/content/quests';
|
||||||
import percent from '@/../../common/script/libs/percent';
|
import percent from '@/../../common/script/libs/percent';
|
||||||
import sidebarSection from '../sidebarSection';
|
import sidebarSection from '../sidebarSection';
|
||||||
|
|
||||||
|
|||||||
@@ -108,7 +108,7 @@
|
|||||||
import { mapState } from '@/libs/store';
|
import { mapState } from '@/libs/store';
|
||||||
import * as Analytics from '@/libs/analytics';
|
import * as Analytics from '@/libs/analytics';
|
||||||
|
|
||||||
import quests from '@/../../common/script/content/quests';
|
import * as quests from '@/../../common/script/content/quests';
|
||||||
|
|
||||||
import copyIcon from '@/assets/svg/copy.svg';
|
import copyIcon from '@/assets/svg/copy.svg';
|
||||||
import greyBadgeIcon from '@/assets/svg/grey-badge.svg';
|
import greyBadgeIcon from '@/assets/svg/grey-badge.svg';
|
||||||
|
|||||||
@@ -458,7 +458,7 @@ import tierMod from '@/assets/svg/tier-mod.svg';
|
|||||||
import tierNPC from '@/assets/svg/tier-npc.svg';
|
import tierNPC from '@/assets/svg/tier-npc.svg';
|
||||||
import tierStaff from '@/assets/svg/tier-staff.svg';
|
import tierStaff from '@/assets/svg/tier-staff.svg';
|
||||||
|
|
||||||
import quests from '@/../../common/script/content/quests';
|
import * as quests from '@/../../common/script/content/quests';
|
||||||
import staffList from '../../libs/staffList';
|
import staffList from '../../libs/staffList';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|||||||
@@ -111,9 +111,9 @@ import each from 'lodash/each';
|
|||||||
import markdownDirective from '@/directives/markdown';
|
import markdownDirective from '@/directives/markdown';
|
||||||
import styleHelper from '@/mixins/styleHelper';
|
import styleHelper from '@/mixins/styleHelper';
|
||||||
import { mapState } from '@/libs/store';
|
import { mapState } from '@/libs/store';
|
||||||
import quests from '@/../../common/script/content/quests';
|
import * as quests from '@/../../common/script/content/quests';
|
||||||
import { mountInfo, petInfo } from '@/../../common/script/content/stable';
|
import { mountInfo, petInfo } from '@/../../common/script/content/stable';
|
||||||
import { food, hatchingPotions, special } from '@/../../common/script/content';
|
import content from '@/../../common/script/content';
|
||||||
import gear from '@/../../common/script/content/gear';
|
import gear from '@/../../common/script/content/gear';
|
||||||
import notifications from '@/mixins/notifications';
|
import notifications from '@/mixins/notifications';
|
||||||
import userLink from '../userLink';
|
import userLink from '../userLink';
|
||||||
@@ -133,9 +133,9 @@ export default {
|
|||||||
quests,
|
quests,
|
||||||
mountInfo,
|
mountInfo,
|
||||||
petInfo,
|
petInfo,
|
||||||
food,
|
food: content.food,
|
||||||
hatchingPotions,
|
hatchingPotions: content.hatchingPotions,
|
||||||
special,
|
special: content.special,
|
||||||
gear,
|
gear,
|
||||||
expandItems: false,
|
expandItems: false,
|
||||||
expandAuth: false,
|
expandAuth: false,
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ base-notification(
|
|||||||
<script>
|
<script>
|
||||||
import BaseNotification from './base';
|
import BaseNotification from './base';
|
||||||
import { mapState } from '@/libs/store';
|
import { mapState } from '@/libs/store';
|
||||||
import quests from '@/../../common/script/content/quests';
|
import * as quests from '@/../../common/script/content/quests';
|
||||||
import questInfo from '@/components/shops/quests/questInfo';
|
import questInfo from '@/components/shops/quests/questInfo';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|||||||
@@ -134,7 +134,7 @@ base-notification(
|
|||||||
</style>
|
</style>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import quests from '@/../../common/script/content/quests';
|
import * as quests from '@/../../common/script/content/quests';
|
||||||
|
|
||||||
import { mapState } from '@/libs/store';
|
import { mapState } from '@/libs/store';
|
||||||
import BaseNotification from './base';
|
import BaseNotification from './base';
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ menu-dropdown.item-notifications(:right="true", @toggled="handleOpenStatusChange
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapState, mapActions } from '@/libs/store';
|
import { mapState, mapActions } from '@/libs/store';
|
||||||
import quests from '@/../../common/script/content/quests';
|
import * as quests from '@/../../common/script/content/quests';
|
||||||
import notificationsIcon from '@/assets/svg/notifications.svg';
|
import notificationsIcon from '@/assets/svg/notifications.svg';
|
||||||
import MenuDropdown from '../ui/customMenuDropdown';
|
import MenuDropdown from '../ui/customMenuDropdown';
|
||||||
import MessageCount from './messageCount';
|
import MessageCount from './messageCount';
|
||||||
|
|||||||
@@ -61,7 +61,7 @@
|
|||||||
import { mapState } from '@/libs/store';
|
import { mapState } from '@/libs/store';
|
||||||
import ShopItem from '../shopItem';
|
import ShopItem from '../shopItem';
|
||||||
|
|
||||||
import count from '@/../../common/script/count';
|
import { beastCount, mountMasterProgress } from '@/../../common/script/count';
|
||||||
|
|
||||||
import notifications from '@/mixins/notifications';
|
import notifications from '@/mixins/notifications';
|
||||||
|
|
||||||
@@ -147,10 +147,10 @@ export default {
|
|||||||
computed: {
|
computed: {
|
||||||
...mapState({user: 'user.data'}),
|
...mapState({user: 'user.data'}),
|
||||||
userHasAllPets () {
|
userHasAllPets () {
|
||||||
return count.beastCount(this.user.items.pets) === 90;
|
return beastCount(this.user.items.pets) === 90;
|
||||||
},
|
},
|
||||||
userHasAllMounts () {
|
userHasAllMounts () {
|
||||||
return count.mountMasterProgress(this.user.items.mounts) === 90;
|
return mountMasterProgress(this.user.items.mounts) === 90;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|||||||
@@ -177,7 +177,7 @@ import Drawer from '@/components/ui/drawer';
|
|||||||
import MouseMoveDirective from '@/directives/mouseposition.directive';
|
import MouseMoveDirective from '@/directives/mouseposition.directive';
|
||||||
|
|
||||||
import mana from '@/assets/svg/mana.svg';
|
import mana from '@/assets/svg/mana.svg';
|
||||||
import quests from '@/../../common/script/content/quests';
|
import * as quests from '@/../../common/script/content/quests';
|
||||||
import { CONSTANTS, setLocalSetting, getLocalSetting } from '@/libs/userlocalManager';
|
import { CONSTANTS, setLocalSetting, getLocalSetting } from '@/libs/userlocalManager';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|||||||
@@ -250,4 +250,4 @@ each(achievementsData, (value, key) => {
|
|||||||
value.key = key;
|
value.key = key;
|
||||||
});
|
});
|
||||||
|
|
||||||
module.exports = achievementsData;
|
export default achievementsData;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import prefill from '../prefill.js';
|
import prefill from '../prefill.js';
|
||||||
|
|
||||||
module.exports = prefill({
|
export default prefill({
|
||||||
0: {},
|
0: {},
|
||||||
1: {},
|
1: {},
|
||||||
2: {},
|
2: {},
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import prefill from '../prefill.js';
|
import prefill from '../prefill.js';
|
||||||
import sets from '../sets.js';
|
import sets from '../sets.js';
|
||||||
|
|
||||||
module.exports = prefill({
|
export default prefill({
|
||||||
0: {},
|
0: {},
|
||||||
1: {},
|
1: {},
|
||||||
2: {price: 2, set: sets.baseHair1},
|
2: {price: 2, set: sets.baseHair1},
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import sets from '../sets.js';
|
import sets from '../sets.js';
|
||||||
import prefill from '../prefill.js';
|
import prefill from '../prefill.js';
|
||||||
|
|
||||||
module.exports = prefill({
|
export default prefill({
|
||||||
0: {},
|
0: {},
|
||||||
1: {price: 2, set: sets.facialHair},
|
1: {price: 2, set: sets.facialHair},
|
||||||
2: {price: 2, set: sets.facialHair},
|
2: {price: 2, set: sets.facialHair},
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import sets from '../sets.js';
|
import sets from '../sets.js';
|
||||||
import prefill from '../prefill.js';
|
import prefill from '../prefill.js';
|
||||||
|
|
||||||
module.exports = prefill({
|
export default prefill({
|
||||||
white: {},
|
white: {},
|
||||||
brown: {},
|
brown: {},
|
||||||
blond: {},
|
blond: {},
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import prefill from '../prefill.js';
|
import prefill from '../prefill.js';
|
||||||
|
|
||||||
module.exports = prefill({
|
export default prefill({
|
||||||
0: {},
|
0: {},
|
||||||
1: {},
|
1: {},
|
||||||
2: {},
|
2: {},
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import color from './color.js';
|
|||||||
import flower from './flower.js';
|
import flower from './flower.js';
|
||||||
import mustache from './mustache.js';
|
import mustache from './mustache.js';
|
||||||
|
|
||||||
module.exports = {
|
export default {
|
||||||
color,
|
color,
|
||||||
base,
|
base,
|
||||||
bangs,
|
bangs,
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import sets from '../sets.js';
|
import sets from '../sets.js';
|
||||||
import prefill from '../prefill.js';
|
import prefill from '../prefill.js';
|
||||||
|
|
||||||
module.exports = prefill({
|
export default prefill({
|
||||||
0: {},
|
0: {},
|
||||||
1: {price: 2, set: sets.facialHair},
|
1: {price: 2, set: sets.facialHair},
|
||||||
2: {price: 2, set: sets.facialHair},
|
2: {price: 2, set: sets.facialHair},
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import prefill from '../prefill.js';
|
import prefill from '../prefill.js';
|
||||||
import sets from '../sets.js';
|
import sets from '../sets.js';
|
||||||
|
|
||||||
module.exports = prefill({
|
export default prefill({
|
||||||
0: {},
|
0: {},
|
||||||
1: {price: 2, set: sets.topHair},
|
1: {price: 2, set: sets.topHair},
|
||||||
2: {price: 2, set: sets.topHair},
|
2: {price: 2, set: sets.topHair},
|
||||||
|
|||||||
@@ -31,4 +31,4 @@ let appearances = {
|
|||||||
background: reorderedBgs,
|
background: reorderedBgs,
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports = appearances;
|
export default appearances;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import forOwn from 'lodash/forOwn';
|
import forOwn from 'lodash/forOwn';
|
||||||
|
|
||||||
module.exports = function prefillAppearances (obj) {
|
export default function prefillAppearances (obj) {
|
||||||
forOwn(obj, function prefillAppearance (value, key) {
|
forOwn(obj, function prefillAppearance (value, key) {
|
||||||
value.key = key;
|
value.key = key;
|
||||||
if (!value.price) {
|
if (!value.price) {
|
||||||
@@ -8,4 +8,4 @@ module.exports = function prefillAppearances (obj) {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
return obj;
|
return obj;
|
||||||
};
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import t from '../translation';
|
import t from '../translation';
|
||||||
import prefill from './prefill.js';
|
import prefill from './prefill.js';
|
||||||
|
|
||||||
module.exports = prefill({
|
export default prefill({
|
||||||
baseHair1: {setPrice: 5, text: t('hairSet1')},
|
baseHair1: {setPrice: 5, text: t('hairSet1')},
|
||||||
baseHair2: {setPrice: 5, text: t('hairSet2')},
|
baseHair2: {setPrice: 5, text: t('hairSet2')},
|
||||||
baseHair3: {setPrice: 5, text: t('hairSet3')},
|
baseHair3: {setPrice: 5, text: t('hairSet3')},
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import sets from './sets.js';
|
import sets from './sets.js';
|
||||||
import prefill from './prefill.js';
|
import prefill from './prefill.js';
|
||||||
|
|
||||||
module.exports = prefill({
|
export default prefill({
|
||||||
black: {},
|
black: {},
|
||||||
blue: {},
|
blue: {},
|
||||||
green: {},
|
green: {},
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import prefill from './prefill.js';
|
import prefill from './prefill.js';
|
||||||
|
|
||||||
module.exports = prefill({
|
export default prefill({
|
||||||
slim: {},
|
slim: {},
|
||||||
broad: {},
|
broad: {},
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import prefill from './prefill.js';
|
import prefill from './prefill.js';
|
||||||
import sets from './sets.js';
|
import sets from './sets.js';
|
||||||
|
|
||||||
module.exports = prefill({
|
export default prefill({
|
||||||
/* eslint-disable quote-props */
|
/* eslint-disable quote-props */
|
||||||
'ddc994': {},
|
'ddc994': {},
|
||||||
'f5a76e': {},
|
'f5a76e': {},
|
||||||
|
|||||||
@@ -408,7 +408,7 @@ applyEggDefaults(quests, {
|
|||||||
|
|
||||||
let all = assign({}, drops, quests);
|
let all = assign({}, drops, quests);
|
||||||
|
|
||||||
module.exports = {
|
export {
|
||||||
drops,
|
drops,
|
||||||
quests,
|
quests,
|
||||||
all,
|
all,
|
||||||
|
|||||||
@@ -25,4 +25,4 @@ for (let i = 0; i <= NUMBER_OF_QUESTIONS; i++) {
|
|||||||
faq.questions.push(question);
|
faq.questions.push(question);
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = faq;
|
export default faq;
|
||||||
|
|||||||
@@ -22,4 +22,4 @@ let armor = {
|
|||||||
armoire: armoireArmor,
|
armoire: armoireArmor,
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports = armor;
|
export default armor;
|
||||||
|
|||||||
@@ -9,5 +9,5 @@ let back = {
|
|||||||
special: specialBack,
|
special: specialBack,
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports = back;
|
export default back;
|
||||||
|
|
||||||
|
|||||||
@@ -11,4 +11,4 @@ let body = {
|
|||||||
armoire: armoireBody,
|
armoire: armoireBody,
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports = body;
|
export default body;
|
||||||
|
|||||||
@@ -11,4 +11,4 @@ let eyewear = {
|
|||||||
armoire: armoireEyewear,
|
armoire: armoireEyewear,
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports = eyewear;
|
export default eyewear;
|
||||||
|
|||||||
@@ -11,5 +11,5 @@ let headAccessory = {
|
|||||||
armoire: armoireHeadAccessory,
|
armoire: armoireHeadAccessory,
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports = headAccessory;
|
export default headAccessory;
|
||||||
|
|
||||||
|
|||||||
@@ -22,4 +22,4 @@ let head = {
|
|||||||
armoire: armoireHead,
|
armoire: armoireHead,
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports = head;
|
export default head;
|
||||||
|
|||||||
@@ -81,7 +81,7 @@ each(GEAR_TYPES, (type) => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
module.exports = {
|
export default {
|
||||||
tree: gear,
|
tree: gear,
|
||||||
flat,
|
flat,
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1713,7 +1713,7 @@ let weapon = {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
let armoireSet = {
|
export {
|
||||||
armor,
|
armor,
|
||||||
body,
|
body,
|
||||||
eyewear,
|
eyewear,
|
||||||
@@ -1721,6 +1721,4 @@ let armoireSet = {
|
|||||||
headAccessory,
|
headAccessory,
|
||||||
shield,
|
shield,
|
||||||
weapon,
|
weapon,
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports = armoireSet;
|
|
||||||
@@ -66,7 +66,7 @@ let weapon = {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
let baseSet = {
|
export {
|
||||||
armor,
|
armor,
|
||||||
back,
|
back,
|
||||||
body,
|
body,
|
||||||
@@ -75,6 +75,4 @@ let baseSet = {
|
|||||||
headAccessory,
|
headAccessory,
|
||||||
shield,
|
shield,
|
||||||
weapon,
|
weapon,
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports = baseSet;
|
|
||||||
@@ -148,11 +148,9 @@ let weapon = {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
let healerSet = {
|
export {
|
||||||
armor,
|
armor,
|
||||||
head,
|
head,
|
||||||
shield,
|
shield,
|
||||||
weapon,
|
weapon,
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports = healerSet;
|
|
||||||
@@ -942,7 +942,7 @@ let weapon = {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
let mysterySet = {
|
export {
|
||||||
armor,
|
armor,
|
||||||
back,
|
back,
|
||||||
body,
|
body,
|
||||||
@@ -951,6 +951,4 @@ let mysterySet = {
|
|||||||
headAccessory,
|
headAccessory,
|
||||||
shield,
|
shield,
|
||||||
weapon,
|
weapon,
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports = mysterySet;
|
|
||||||
@@ -160,11 +160,9 @@ let shield = {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
let rogueSet = {
|
export {
|
||||||
armor,
|
armor,
|
||||||
head,
|
head,
|
||||||
shield,
|
shield,
|
||||||
weapon,
|
weapon,
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports = rogueSet;
|
|
||||||
@@ -2,10 +2,10 @@ import {
|
|||||||
EVENTS,
|
EVENTS,
|
||||||
} from '../../../constants';
|
} from '../../../constants';
|
||||||
import { ownsItem } from '../../gear-helper';
|
import { ownsItem } from '../../gear-helper';
|
||||||
import backerGear from './special-backer';
|
import * as backerGear from './special-backer';
|
||||||
import contributorGear from './special-contributor';
|
import * as contributorGear from './special-contributor';
|
||||||
import takeThisGear from './special-takeThis';
|
import * as takeThisGear from './special-takeThis';
|
||||||
import wonderconGear from './special-wondercon';
|
import * as wonderconGear from './special-wondercon';
|
||||||
import t from '../../../translation';
|
import t from '../../../translation';
|
||||||
|
|
||||||
const CURRENT_SEASON = 'fall';
|
const CURRENT_SEASON = 'fall';
|
||||||
@@ -5368,7 +5368,7 @@ let weapon = {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
let specialSet = {
|
export {
|
||||||
armor,
|
armor,
|
||||||
back,
|
back,
|
||||||
body,
|
body,
|
||||||
@@ -5377,6 +5377,4 @@ let specialSet = {
|
|||||||
headAccessory,
|
headAccessory,
|
||||||
shield,
|
shield,
|
||||||
weapon,
|
weapon,
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports = specialSet;
|
|
||||||
@@ -79,7 +79,7 @@ let weaponSpecial3 = {
|
|||||||
canOwn: isBackerOfLevel(300, 'weapon_special_3'),
|
canOwn: isBackerOfLevel(300, 'weapon_special_3'),
|
||||||
};
|
};
|
||||||
|
|
||||||
let backerSet = {
|
export {
|
||||||
armorSpecial0,
|
armorSpecial0,
|
||||||
armorSpecial2,
|
armorSpecial2,
|
||||||
headSpecial0,
|
headSpecial0,
|
||||||
@@ -88,6 +88,4 @@ let backerSet = {
|
|||||||
weaponSpecial0,
|
weaponSpecial0,
|
||||||
weaponSpecial2,
|
weaponSpecial2,
|
||||||
weaponSpecial3,
|
weaponSpecial3,
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports = backerSet;
|
|
||||||
@@ -68,12 +68,10 @@ let weaponSpecialCritical = {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
let contributorSet = {
|
export {
|
||||||
armorSpecial1,
|
armorSpecial1,
|
||||||
headSpecial1,
|
headSpecial1,
|
||||||
shieldSpecial1,
|
shieldSpecial1,
|
||||||
weaponSpecial1,
|
weaponSpecial1,
|
||||||
weaponSpecialCritical,
|
weaponSpecialCritical,
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports = contributorSet;
|
|
||||||
@@ -60,13 +60,11 @@ let weaponSpecialTakeThis = {
|
|||||||
str: 5,
|
str: 5,
|
||||||
};
|
};
|
||||||
|
|
||||||
let takeThisSet = {
|
export {
|
||||||
armorSpecialTakeThis,
|
armorSpecialTakeThis,
|
||||||
backSpecialTakeThis,
|
backSpecialTakeThis,
|
||||||
bodySpecialTakeThis,
|
bodySpecialTakeThis,
|
||||||
headSpecialTakeThis,
|
headSpecialTakeThis,
|
||||||
shieldSpecialTakeThis,
|
shieldSpecialTakeThis,
|
||||||
weaponSpecialTakeThis,
|
weaponSpecialTakeThis,
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports = takeThisSet;
|
|
||||||
@@ -49,7 +49,7 @@ let eyewearSpecialWonderconBlack = {
|
|||||||
mystery: 'wondercon',
|
mystery: 'wondercon',
|
||||||
};
|
};
|
||||||
|
|
||||||
let wonderconSet = {
|
export {
|
||||||
backSpecialWonderconRed,
|
backSpecialWonderconRed,
|
||||||
backSpecialWonderconBlack,
|
backSpecialWonderconBlack,
|
||||||
bodySpecialWonderconRed,
|
bodySpecialWonderconRed,
|
||||||
@@ -57,6 +57,4 @@ let wonderconSet = {
|
|||||||
bodySpecialWonderconBlack,
|
bodySpecialWonderconBlack,
|
||||||
eyewearSpecialWonderconRed,
|
eyewearSpecialWonderconRed,
|
||||||
eyewearSpecialWonderconBlack,
|
eyewearSpecialWonderconBlack,
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports = wonderconSet;
|
|
||||||
@@ -145,11 +145,9 @@ let weapon = {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
let warriorSet = {
|
export {
|
||||||
armor,
|
armor,
|
||||||
head,
|
head,
|
||||||
shield,
|
shield,
|
||||||
weapon,
|
weapon,
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports = warriorSet;
|
|
||||||
@@ -131,11 +131,9 @@ let weapon = {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
let wizardSet = {
|
export {
|
||||||
armor,
|
armor,
|
||||||
head,
|
head,
|
||||||
shield,
|
shield,
|
||||||
weapon,
|
weapon,
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports = wizardSet;
|
|
||||||
@@ -26,4 +26,4 @@ let shield = {
|
|||||||
armoire: armoireShield,
|
armoire: armoireShield,
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports = shield;
|
export default shield;
|
||||||
|
|||||||
@@ -64,4 +64,4 @@ for (let key in weapon) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = weapon;
|
export default weapon;
|
||||||
|
|||||||
@@ -281,7 +281,7 @@ each(wacky, (pot, key) => {
|
|||||||
|
|
||||||
let all = assign({}, drops, premium, wacky);
|
let all = assign({}, drops, premium, wacky);
|
||||||
|
|
||||||
module.exports = {
|
export {
|
||||||
drops,
|
drops,
|
||||||
premium,
|
premium,
|
||||||
wacky,
|
wacky,
|
||||||
|
|||||||
@@ -12,13 +12,13 @@ import {
|
|||||||
ANIMAL_COLOR_ACHIEVEMENTS,
|
ANIMAL_COLOR_ACHIEVEMENTS,
|
||||||
} from './constants';
|
} from './constants';
|
||||||
|
|
||||||
let api = module.exports;
|
const api = {};
|
||||||
|
|
||||||
import achievements from './achievements';
|
import achievements from './achievements';
|
||||||
|
|
||||||
import eggs from './eggs';
|
import * as eggs from './eggs';
|
||||||
import hatchingPotions from './hatching-potions';
|
import * as hatchingPotions from './hatching-potions';
|
||||||
import stable from './stable';
|
import * as stable from './stable';
|
||||||
import gear from './gear';
|
import gear from './gear';
|
||||||
import {
|
import {
|
||||||
quests,
|
quests,
|
||||||
@@ -912,3 +912,5 @@ api.userDefaultsMobile = {
|
|||||||
api.faq = faq;
|
api.faq = faq;
|
||||||
|
|
||||||
api.loginIncentives = loginIncentives(api);
|
api.loginIncentives = loginIncentives(api);
|
||||||
|
|
||||||
|
export default api;
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import { MAX_INCENTIVES } from '../constants';
|
|||||||
|
|
||||||
// NOTE do not import this file alone but only access it through common.content
|
// NOTE do not import this file alone but only access it through common.content
|
||||||
// so that it's already compiled
|
// so that it's already compiled
|
||||||
module.exports = function getLoginIncentives (api) {
|
export default function getLoginIncentives (api) {
|
||||||
let loginIncentives = {
|
let loginIncentives = {
|
||||||
1: {
|
1: {
|
||||||
rewardKey: ['armor_special_bardRobes'],
|
rewardKey: ['armor_special_bardRobes'],
|
||||||
@@ -665,4 +665,4 @@ module.exports = function getLoginIncentives (api) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
return loginIncentives;
|
return loginIncentives;
|
||||||
};
|
}
|
||||||
|
|||||||
@@ -303,4 +303,4 @@ each(mysterySets, (value, key) => {
|
|||||||
value.class = `shop_set_mystery_${key}`;
|
value.class = `shop_set_mystery_${key}`;
|
||||||
});
|
});
|
||||||
|
|
||||||
module.exports = mysterySets;
|
export default mysterySets;
|
||||||
|
|||||||
@@ -3531,7 +3531,7 @@ let questsByLevel = sortBy(quests, (quest) => {
|
|||||||
return quest.lvl || 0;
|
return quest.lvl || 0;
|
||||||
});
|
});
|
||||||
|
|
||||||
module.exports = {
|
export {
|
||||||
quests,
|
quests,
|
||||||
questsByLevel,
|
questsByLevel,
|
||||||
userCanOwnQuestCategories,
|
userCanOwnQuestCategories,
|
||||||
|
|||||||
@@ -677,4 +677,4 @@ each(spells, (spellClass) => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
module.exports = spells;
|
export default spells;
|
||||||
|
|||||||
@@ -141,7 +141,7 @@ each(specialMounts, (translationString, key) => {
|
|||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
module.exports = {
|
export {
|
||||||
dropPets,
|
dropPets,
|
||||||
premiumPets,
|
premiumPets,
|
||||||
questPets,
|
questPets,
|
||||||
|
|||||||
@@ -54,4 +54,4 @@ each(subscriptionBlocks, function createKeys (b, k) {
|
|||||||
return b.key = k;
|
return b.key = k;
|
||||||
});
|
});
|
||||||
|
|
||||||
module.exports = subscriptionBlocks;
|
export default subscriptionBlocks;
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ let timeTravelerStore = (user) => {
|
|||||||
}, {});
|
}, {});
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports = {
|
export default {
|
||||||
timeTravelerStore,
|
timeTravelerStore,
|
||||||
mystery,
|
mystery,
|
||||||
};
|
};
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
import i18n from '../i18n';
|
import i18n from '../i18n';
|
||||||
|
|
||||||
module.exports = function translator (string, vars = { a: 'a' }) {
|
export default function translator (string, vars = { a: 'a' }) {
|
||||||
function func (lang) {
|
function func (lang) {
|
||||||
return i18n.t(string, vars, lang);
|
return i18n.t(string, vars, lang);
|
||||||
}
|
}
|
||||||
@@ -8,4 +8,4 @@ module.exports = function translator (string, vars = { a: 'a' }) {
|
|||||||
func.i18nLangFunc = true; // Trick to recognize this type of function
|
func.i18nLangFunc = true; // Trick to recognize this type of function
|
||||||
|
|
||||||
return func;
|
return func;
|
||||||
};
|
}
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import content from './content/index';
|
|||||||
|
|
||||||
const DROP_ANIMALS = keys(content.pets);
|
const DROP_ANIMALS = keys(content.pets);
|
||||||
|
|
||||||
function beastMasterProgress (pets = {}) {
|
export function beastMasterProgress (pets = {}) {
|
||||||
let count = 0;
|
let count = 0;
|
||||||
|
|
||||||
each(DROP_ANIMALS, (animal) => {
|
each(DROP_ANIMALS, (animal) => {
|
||||||
@@ -17,7 +17,7 @@ function beastMasterProgress (pets = {}) {
|
|||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
|
|
||||||
function beastCount (pets = {}) {
|
export function beastCount (pets = {}) {
|
||||||
let count = 0;
|
let count = 0;
|
||||||
|
|
||||||
each(DROP_ANIMALS, (animal) => {
|
each(DROP_ANIMALS, (animal) => {
|
||||||
@@ -27,7 +27,7 @@ function beastCount (pets = {}) {
|
|||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
|
|
||||||
function dropPetsCurrentlyOwned (pets = {}) {
|
export function dropPetsCurrentlyOwned (pets = {}) {
|
||||||
let count = 0;
|
let count = 0;
|
||||||
|
|
||||||
each(DROP_ANIMALS, (animal) => {
|
each(DROP_ANIMALS, (animal) => {
|
||||||
@@ -38,7 +38,7 @@ function dropPetsCurrentlyOwned (pets = {}) {
|
|||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
|
|
||||||
function mountMasterProgress (mounts = {}) {
|
export function mountMasterProgress (mounts = {}) {
|
||||||
let count = 0;
|
let count = 0;
|
||||||
|
|
||||||
each(DROP_ANIMALS, (animal) => {
|
each(DROP_ANIMALS, (animal) => {
|
||||||
@@ -49,7 +49,7 @@ function mountMasterProgress (mounts = {}) {
|
|||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
|
|
||||||
function remainingGearInSet (userGear = {}, set) {
|
export function remainingGearInSet (userGear = {}, set) {
|
||||||
let gear = filter(content.gear.flat, (item) => {
|
let gear = filter(content.gear.flat, (item) => {
|
||||||
let setMatches = item.klass === set;
|
let setMatches = item.klass === set;
|
||||||
let hasItem = userGear[item.key];
|
let hasItem = userGear[item.key];
|
||||||
@@ -62,7 +62,7 @@ function remainingGearInSet (userGear = {}, set) {
|
|||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
|
|
||||||
function questsOfCategory (userQuests = {}, category) {
|
export function questsOfCategory (userQuests = {}, category) {
|
||||||
let quests = filter(content.quests, (quest) => {
|
let quests = filter(content.quests, (quest) => {
|
||||||
let categoryMatches = quest.category === category;
|
let categoryMatches = quest.category === category;
|
||||||
let hasQuest = userQuests[quest.key];
|
let hasQuest = userQuests[quest.key];
|
||||||
@@ -73,13 +73,4 @@ function questsOfCategory (userQuests = {}, category) {
|
|||||||
let count = size(quests);
|
let count = size(quests);
|
||||||
|
|
||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = {
|
|
||||||
beastMasterProgress,
|
|
||||||
beastCount,
|
|
||||||
dropPetsCurrentlyOwned,
|
|
||||||
mountMasterProgress,
|
|
||||||
remainingGearInSet,
|
|
||||||
questsOfCategory,
|
|
||||||
};
|
|
||||||
@@ -75,8 +75,8 @@ function getStatToAllocate (user) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = function autoAllocate (user) {
|
export default function autoAllocate (user) {
|
||||||
let statToIncrease = getStatToAllocate(user);
|
let statToIncrease = getStatToAllocate(user);
|
||||||
|
|
||||||
return user.stats[statToIncrease]++;
|
return user.stats[statToIncrease]++;
|
||||||
};
|
}
|
||||||
|
|||||||
@@ -10,4 +10,4 @@ function crit (user, stat = 'str', chance = 0.03) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = { crit };
|
export default { crit };
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import content from '../content/index';
|
import content from '../content/index';
|
||||||
import i18n from '../i18n';
|
import i18n from '../i18n';
|
||||||
|
|
||||||
module.exports = function handleTwoHanded (user, item, type = 'equipped', req = {}) {
|
export default function handleTwoHanded (user, item, type = 'equipped', req = {}) {
|
||||||
let currentShield = content.gear.flat[user.items.gear[type].shield];
|
let currentShield = content.gear.flat[user.items.gear[type].shield];
|
||||||
let currentWeapon = content.gear.flat[user.items.gear[type].weapon];
|
let currentWeapon = content.gear.flat[user.items.gear[type].weapon];
|
||||||
|
|
||||||
@@ -20,4 +20,4 @@ module.exports = function handleTwoHanded (user, item, type = 'equipped', req =
|
|||||||
}
|
}
|
||||||
|
|
||||||
return message;
|
return message;
|
||||||
};
|
}
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import autoAllocate from './autoAllocate';
|
|||||||
import updateStats from './updateStats';
|
import updateStats from './updateStats';
|
||||||
import ultimateGear from './ultimateGear';
|
import ultimateGear from './ultimateGear';
|
||||||
|
|
||||||
module.exports = {
|
export default {
|
||||||
handleTwoHanded,
|
handleTwoHanded,
|
||||||
predictableRandom,
|
predictableRandom,
|
||||||
crit,
|
crit,
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import isNumber from 'lodash/isNumber';
|
|||||||
// Because the same op needs to be performed on the client and the server (critical hits, item drops, etc),
|
// Because the same op needs to be performed on the client and the server (critical hits, item drops, etc),
|
||||||
// we need things to be "random", but technically predictable so that they don't go out-of-sync
|
// we need things to be "random", but technically predictable so that they don't go out-of-sync
|
||||||
|
|
||||||
module.exports = function predictableRandom (user, seed) {
|
export default function predictableRandom (user, seed) {
|
||||||
if (!seed || seed === Math.PI) {
|
if (!seed || seed === Math.PI) {
|
||||||
let stats = user.stats.toObject ? user.stats.toObject() : user.stats;
|
let stats = user.stats.toObject ? user.stats.toObject() : user.stats;
|
||||||
// These items are not part of the stat object but exists on the server (see controllers/user#getUser)
|
// These items are not part of the stat object but exists on the server (see controllers/user#getUser)
|
||||||
@@ -23,4 +23,4 @@ module.exports = function predictableRandom (user, seed) {
|
|||||||
|
|
||||||
let x = Math.sin(seed++) * 10000;
|
let x = Math.sin(seed++) * 10000;
|
||||||
return x - Math.floor(x);
|
return x - Math.floor(x);
|
||||||
};
|
}
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ function trueRandom () {
|
|||||||
return Math.random();
|
return Math.random();
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = function randomDrop (user, options, req = {}, analytics) {
|
export default function randomDrop (user, options, req = {}, analytics) {
|
||||||
let acceptableDrops;
|
let acceptableDrops;
|
||||||
let drop;
|
let drop;
|
||||||
let dropMultiplier;
|
let dropMultiplier;
|
||||||
@@ -133,4 +133,4 @@ module.exports = function randomDrop (user, options, req = {}, analytics) {
|
|||||||
user.items.lastDrop.date = Number(new Date());
|
user.items.lastDrop.date = Number(new Date());
|
||||||
user.items.lastDrop.count++;
|
user.items.lastDrop.count++;
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import each from 'lodash/each';
|
import each from 'lodash/each';
|
||||||
import content from '../content/index';
|
import content from '../content/index';
|
||||||
|
|
||||||
module.exports = function resetGear (user) {
|
export default function resetGear (user) {
|
||||||
let gear = user.items.gear;
|
let gear = user.items.gear;
|
||||||
|
|
||||||
each(['equipped', 'costume'], function resetUserGear (type) {
|
each(['equipped', 'costume'], function resetUserGear (type) {
|
||||||
@@ -24,4 +24,4 @@ module.exports = function resetGear (user) {
|
|||||||
if (user.markModified) user.markModified('items.gear.owned');
|
if (user.markModified) user.markModified('items.gear.owned');
|
||||||
|
|
||||||
user.preferences.costume = false;
|
user.preferences.costume = false;
|
||||||
};
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import lodashFind from 'lodash/find';
|
|||||||
import reduce from 'lodash/reduce';
|
import reduce from 'lodash/reduce';
|
||||||
import includes from 'lodash/includes';
|
import includes from 'lodash/includes';
|
||||||
|
|
||||||
module.exports = function ultimateGear (user) {
|
export default function ultimateGear (user) {
|
||||||
let owned = user.items.gear.owned.toObject ? user.items.gear.owned.toObject() : user.items.gear.owned;
|
let owned = user.items.gear.owned.toObject ? user.items.gear.owned.toObject() : user.items.gear.owned;
|
||||||
|
|
||||||
content.classes.forEach((klass) => {
|
content.classes.forEach((klass) => {
|
||||||
@@ -35,4 +35,4 @@ module.exports = function ultimateGear (user) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
};
|
}
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import {
|
|||||||
import { toNextLevel } from '../statHelpers';
|
import { toNextLevel } from '../statHelpers';
|
||||||
import autoAllocate from './autoAllocate';
|
import autoAllocate from './autoAllocate';
|
||||||
|
|
||||||
module.exports = function updateStats (user, stats, req = {}, analytics) {
|
export default function updateStats (user, stats, req = {}, analytics) {
|
||||||
let allocatedStatPoints;
|
let allocatedStatPoints;
|
||||||
let totalStatPoints;
|
let totalStatPoints;
|
||||||
let experienceToNextLevel;
|
let experienceToNextLevel;
|
||||||
@@ -111,4 +111,4 @@ module.exports = function updateStats (user, stats, req = {}, analytics) {
|
|||||||
if (user.addNotification) user.addNotification('REBIRTH_ENABLED');
|
if (user.addNotification) user.addNotification('REBIRTH_ENABLED');
|
||||||
user.flags.rebirthEnabled = true;
|
user.flags.rebirthEnabled = true;
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import isString from 'lodash/isString';
|
|||||||
import clone from 'lodash/clone';
|
import clone from 'lodash/clone';
|
||||||
import template from 'lodash/template';
|
import template from 'lodash/template';
|
||||||
|
|
||||||
let i18n = {
|
const i18n = {
|
||||||
strings: null,
|
strings: null,
|
||||||
translations: {},
|
translations: {},
|
||||||
t, // eslint-disable-line no-use-before-define
|
t, // eslint-disable-line no-use-before-define
|
||||||
@@ -62,4 +62,4 @@ function t (stringName) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = i18n;
|
export default i18n;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
// When using a common module from the website or the server NEVER import the module directly
|
// When using a common module from the website or the server NEVER import the module directly
|
||||||
// but access it through `api` (the main common) module, otherwise you would require the non transpiled version of the file in production.
|
// but access it through `api` (the main common) module, otherwise you would require the non transpiled version of the file in production.
|
||||||
let api = module.exports = {};
|
const api = {};
|
||||||
|
|
||||||
import content from './content/index';
|
import content from './content/index';
|
||||||
api.content = content;
|
api.content = content;
|
||||||
@@ -101,7 +101,7 @@ api.appliedTags = appliedTags;
|
|||||||
import pickDeep from './libs/pickDeep';
|
import pickDeep from './libs/pickDeep';
|
||||||
api.pickDeep = pickDeep;
|
api.pickDeep = pickDeep;
|
||||||
|
|
||||||
import count from './count';
|
import * as count from './count';
|
||||||
api.count = count;
|
api.count = count;
|
||||||
|
|
||||||
import statsComputed from './libs/statsComputed';
|
import statsComputed from './libs/statsComputed';
|
||||||
@@ -164,7 +164,7 @@ import blockUser from './ops/blockUser';
|
|||||||
import reroll from './ops/reroll';
|
import reroll from './ops/reroll';
|
||||||
import reset from './ops/reset';
|
import reset from './ops/reset';
|
||||||
import markPmsRead from './ops/markPMSRead';
|
import markPmsRead from './ops/markPMSRead';
|
||||||
import pinnedGearUtils from './ops/pinnedGearUtils';
|
import * as pinnedGearUtils from './ops/pinnedGearUtils';
|
||||||
|
|
||||||
api.ops = {
|
api.ops = {
|
||||||
scoreTask,
|
scoreTask,
|
||||||
@@ -194,3 +194,5 @@ api.ops = {
|
|||||||
markPmsRead,
|
markPmsRead,
|
||||||
pinnedGearUtils,
|
pinnedGearUtils,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export default api;
|
||||||
|
|||||||
@@ -328,4 +328,4 @@ achievs.getAchievementsForProfile = function getAchievementsForProfile (user, la
|
|||||||
|
|
||||||
achievs.getContribText = contribText;
|
achievs.getContribText = contribText;
|
||||||
|
|
||||||
module.exports = achievs;
|
export default achievs;
|
||||||
|
|||||||
@@ -4,11 +4,11 @@ Are there tags applied?
|
|||||||
|
|
||||||
// TODO move to client
|
// TODO move to client
|
||||||
|
|
||||||
module.exports = function appliedTags (userTags, taskTags = []) {
|
export default function appliedTags (userTags, taskTags = []) {
|
||||||
let arr = userTags.filter(tag => {
|
let arr = userTags.filter(tag => {
|
||||||
return taskTags.indexOf(tag.id) !== -1;
|
return taskTags.indexOf(tag.id) !== -1;
|
||||||
}).map(tag => {
|
}).map(tag => {
|
||||||
return tag.name;
|
return tag.name;
|
||||||
});
|
});
|
||||||
return arr.join(', ');
|
return arr.join(', ');
|
||||||
};
|
}
|
||||||
|
|||||||
@@ -2,4 +2,4 @@ import get from 'lodash/get';
|
|||||||
|
|
||||||
// TODO remove completely, only used in client
|
// TODO remove completely, only used in client
|
||||||
|
|
||||||
module.exports = get;
|
export default get;
|
||||||
|
|||||||
@@ -2,4 +2,4 @@ import set from 'lodash/set';
|
|||||||
|
|
||||||
// TODO remove completely, only used in client
|
// TODO remove completely, only used in client
|
||||||
|
|
||||||
module.exports = set;
|
export default set;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
// Babel 6 doesn't support extending native class (Error, Array, ...)
|
// Babel 6 doesn't support extending native class (Error, Array, ...)
|
||||||
// This function makes it possible to extend native classes with the same results as Babel 5
|
// This function makes it possible to extend native classes with the same results as Babel 5
|
||||||
module.exports = function extendableBuiltin (klass) {
|
export default function extendableBuiltin (klass) {
|
||||||
function ExtendableBuiltin () {
|
function ExtendableBuiltin () {
|
||||||
klass.apply(this, arguments);
|
klass.apply(this, arguments);
|
||||||
}
|
}
|
||||||
@@ -8,4 +8,4 @@ module.exports = function extendableBuiltin (klass) {
|
|||||||
Object.setPrototypeOf(ExtendableBuiltin, klass);
|
Object.setPrototypeOf(ExtendableBuiltin, klass);
|
||||||
|
|
||||||
return ExtendableBuiltin;
|
return ExtendableBuiltin;
|
||||||
};
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import content from '../content/index';
|
import content from '../content/index';
|
||||||
import get from 'lodash/get';
|
import get from 'lodash/get';
|
||||||
|
|
||||||
module.exports = function getItemByPathAndType (type, path) {
|
export default function getItemByPathAndType (type, path) {
|
||||||
let item = get(content, path);
|
let item = get(content, path);
|
||||||
|
|
||||||
if (type === 'timeTravelersStable') {
|
if (type === 'timeTravelersStable') {
|
||||||
@@ -14,4 +14,4 @@ module.exports = function getItemByPathAndType (type, path) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return item;
|
return item;
|
||||||
};
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import i18n from '../i18n';
|
import i18n from '../i18n';
|
||||||
import content from '../content/index';
|
import content from '../content/index';
|
||||||
import { BadRequest } from './errors';
|
import { BadRequest } from './errors';
|
||||||
import count from '../count';
|
import * as count from '../count';
|
||||||
|
|
||||||
import isPinned from './isPinned';
|
import isPinned from './isPinned';
|
||||||
import isFreeRebirth from './isFreeRebirth';
|
import isFreeRebirth from './isFreeRebirth';
|
||||||
@@ -46,7 +46,7 @@ function getDefaultGearProps (item, language) {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = function getItemInfo (user, type, item, officialPinnedItems, language = 'en') {
|
export default function getItemInfo (user, type, item, officialPinnedItems, language = 'en') {
|
||||||
if (officialPinnedItems === undefined) {
|
if (officialPinnedItems === undefined) {
|
||||||
officialPinnedItems = getOfficialPinnedItems(user);
|
officialPinnedItems = getOfficialPinnedItems(user);
|
||||||
}
|
}
|
||||||
@@ -124,7 +124,7 @@ module.exports = function getItemInfo (user, type, item, officialPinnedItems, la
|
|||||||
};
|
};
|
||||||
break;
|
break;
|
||||||
case 'quests': // eslint-disable-line no-case-declarations
|
case 'quests': // eslint-disable-line no-case-declarations
|
||||||
const locked = lockQuest(item, user);
|
const locked = lockQuest(item, user); // eslint-disable-line no-case-declarations
|
||||||
|
|
||||||
itemInfo = {
|
itemInfo = {
|
||||||
key: item.key,
|
key: item.key,
|
||||||
@@ -351,4 +351,4 @@ module.exports = function getItemInfo (user, type, item, officialPinnedItems, la
|
|||||||
}
|
}
|
||||||
|
|
||||||
return itemInfo;
|
return itemInfo;
|
||||||
};
|
}
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ const officialPinnedItems = content.officialPinnedItems;
|
|||||||
|
|
||||||
let flatGearArray = toArray(content.gear.flat);
|
let flatGearArray = toArray(content.gear.flat);
|
||||||
|
|
||||||
module.exports = function getOfficialPinnedItems (user) {
|
export default function getOfficialPinnedItems (user) {
|
||||||
let officialItemsArray = [...officialPinnedItems];
|
let officialItemsArray = [...officialPinnedItems];
|
||||||
|
|
||||||
if (SeasonalShopConfig.pinnedSets && Boolean(user) && user.stats.class) {
|
if (SeasonalShopConfig.pinnedSets && Boolean(user) && user.stats.class) {
|
||||||
@@ -25,4 +25,4 @@ module.exports = function getOfficialPinnedItems (user) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return officialItemsArray;
|
return officialItemsArray;
|
||||||
};
|
}
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
// TODO move to client
|
// TODO move to client
|
||||||
|
|
||||||
module.exports = function gold (num) {
|
export default function gold (num) {
|
||||||
if (num) {
|
if (num) {
|
||||||
return Math.floor(num);
|
return Math.floor(num);
|
||||||
} else {
|
} else {
|
||||||
return '0';
|
return '0';
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
// Check if user has Class system enabled
|
// Check if user has Class system enabled
|
||||||
module.exports = function hasClass (member) {
|
export default function hasClass (member) {
|
||||||
return (
|
return (
|
||||||
member.stats.lvl >= 10 &&
|
member.stats.lvl >= 10 &&
|
||||||
!member.preferences.disableClasses &&
|
!member.preferences.disableClasses &&
|
||||||
member.flags.classSelected
|
member.flags.classSelected
|
||||||
);
|
);
|
||||||
};
|
}
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ function sortInAppRewards (user, items) {
|
|||||||
return orderedItems;
|
return orderedItems;
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = function getPinnedItems (user) {
|
export default function getPinnedItems (user) {
|
||||||
checkPinnedAreasForNullEntries(user);
|
checkPinnedAreasForNullEntries(user);
|
||||||
|
|
||||||
let officialPinnedItems = getOfficialPinnedItems(user);
|
let officialPinnedItems = getOfficialPinnedItems(user);
|
||||||
@@ -55,4 +55,4 @@ module.exports = function getPinnedItems (user) {
|
|||||||
|
|
||||||
let orderedItems = sortInAppRewards(user, items);
|
let orderedItems = sortInAppRewards(user, items);
|
||||||
return orderedItems;
|
return orderedItems;
|
||||||
};
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
import { MAX_LEVEL } from '../constants';
|
import { MAX_LEVEL } from '../constants';
|
||||||
|
|
||||||
module.exports = function isFreeRebirth (user) {
|
export default function isFreeRebirth (user) {
|
||||||
let daysFromLastFreeRebirth = user.flags.lastFreeRebirth;
|
let daysFromLastFreeRebirth = user.flags.lastFreeRebirth;
|
||||||
|
|
||||||
if (daysFromLastFreeRebirth) {
|
if (daysFromLastFreeRebirth) {
|
||||||
@@ -11,4 +11,4 @@ module.exports = function isFreeRebirth (user) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return user.stats.lvl >= MAX_LEVEL && daysFromLastFreeRebirth > 45;
|
return user.stats.lvl >= MAX_LEVEL && daysFromLastFreeRebirth > 45;
|
||||||
};
|
}
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
|
export default function isPinned (user, item, checkOfficialPinnedItems /* getOfficialPinnedItems */) {
|
||||||
module.exports = function isPinned (user, item, checkOfficialPinnedItems /* getOfficialPinnedItems */) {
|
|
||||||
if (user === null)
|
if (user === null)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
@@ -11,4 +10,4 @@ module.exports = function isPinned (user, item, checkOfficialPinnedItems /* getO
|
|||||||
return true;
|
return true;
|
||||||
|
|
||||||
return isItemPinned;
|
return isItemPinned;
|
||||||
};
|
}
|
||||||
|
|||||||
@@ -7,8 +7,8 @@ are any tags active?
|
|||||||
|
|
||||||
// TODO move to client
|
// TODO move to client
|
||||||
|
|
||||||
module.exports = function noTags (tags) {
|
export default function noTags (tags) {
|
||||||
return isEmpty(tags) || isEmpty(filter(tags, (t) => {
|
return isEmpty(tags) || isEmpty(filter(tags, (t) => {
|
||||||
return t;
|
return t;
|
||||||
}));
|
}));
|
||||||
};
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
// TODO move to client
|
// TODO move to client
|
||||||
|
|
||||||
module.exports = function percent (x, y, dir) {
|
export default function percent (x, y, dir) {
|
||||||
let roundFn;
|
let roundFn;
|
||||||
switch (dir) {
|
switch (dir) {
|
||||||
case 'up':
|
case 'up':
|
||||||
@@ -16,4 +16,4 @@ module.exports = function percent (x, y, dir) {
|
|||||||
x = 1;
|
x = 1;
|
||||||
}
|
}
|
||||||
return Math.max(0, roundFn(x / y * 100));
|
return Math.max(0, roundFn(x / y * 100));
|
||||||
};
|
}
|
||||||
|
|||||||
@@ -5,11 +5,11 @@ import each from 'lodash/each';
|
|||||||
import set from 'lodash/set';
|
import set from 'lodash/set';
|
||||||
import get from 'lodash/get';
|
import get from 'lodash/get';
|
||||||
|
|
||||||
module.exports = function pickDeep (obj, properties) {
|
export default function pickDeep (obj, properties) {
|
||||||
if (!Array.isArray(properties)) throw new Error('"properties" must be an array');
|
if (!Array.isArray(properties)) throw new Error('"properties" must be an array');
|
||||||
|
|
||||||
let result = {};
|
let result = {};
|
||||||
each(properties, (prop) => set(result, prop, get(obj, prop)));
|
each(properties, (prop) => set(result, prop, get(obj, prop)));
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
};
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
module.exports = {
|
export default {
|
||||||
convRate: 20,
|
convRate: 20,
|
||||||
convCap: 25,
|
convCap: 25,
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -3,10 +3,10 @@ import filter from 'lodash/filter';
|
|||||||
|
|
||||||
// TODO used only in v2
|
// TODO used only in v2
|
||||||
|
|
||||||
module.exports = function preenTodos (tasks) {
|
export default function preenTodos (tasks) {
|
||||||
return filter(tasks, (t) => {
|
return filter(tasks, (t) => {
|
||||||
return !t.completed || t.challenge && t.challenge.id || moment(t.dateCompleted).isAfter(moment().subtract({
|
return !t.completed || t.challenge && t.challenge.id || moment(t.dateCompleted).isAfter(moment().subtract({
|
||||||
days: 3,
|
days: 3,
|
||||||
}));
|
}));
|
||||||
});
|
});
|
||||||
};
|
}
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
import values from 'lodash/values';
|
import values from 'lodash/values';
|
||||||
import keys from 'lodash/keys';
|
import keys from 'lodash/keys';
|
||||||
|
|
||||||
function trueRandom () {
|
export function trueRandom () {
|
||||||
return Math.random();
|
return Math.random();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get a random property from an object
|
// Get a random property from an object
|
||||||
// returns random property (the value)
|
// returns random property (the value)
|
||||||
module.exports = function randomVal (obj, options = {}) {
|
export default function randomVal (obj, options = {}) {
|
||||||
let array = options.key ? keys(obj) : values(obj);
|
let array = options.key ? keys(obj) : values(obj);
|
||||||
let random = options.predictableRandom || trueRandom();
|
let random = options.predictableRandom || trueRandom();
|
||||||
|
|
||||||
@@ -16,6 +16,4 @@ module.exports = function randomVal (obj, options = {}) {
|
|||||||
let randomIndex = Math.floor(random * array.length);
|
let randomIndex = Math.floor(random * array.length);
|
||||||
|
|
||||||
return array[randomIndex];
|
return array[randomIndex];
|
||||||
};
|
}
|
||||||
|
|
||||||
module.exports.trueRandom = trueRandom;
|
|
||||||
@@ -9,7 +9,7 @@ import uuid from './uuid';
|
|||||||
no problem. To maintain sorting, we use these helper functions:
|
no problem. To maintain sorting, we use these helper functions:
|
||||||
*/
|
*/
|
||||||
|
|
||||||
module.exports = function refPush (reflist, item) {
|
export default function refPush (reflist, item) {
|
||||||
item.sort = isEmpty(reflist) ? 0 : maxBy(values(reflist), 'sort').sort + 1;
|
item.sort = isEmpty(reflist) ? 0 : maxBy(values(reflist), 'sort').sort + 1;
|
||||||
|
|
||||||
if (!(item.id && !reflist[item.id])) {
|
if (!(item.id && !reflist[item.id])) {
|
||||||
@@ -19,4 +19,4 @@ module.exports = function refPush (reflist, item) {
|
|||||||
reflist[item.id] = item;
|
reflist[item.id] = item;
|
||||||
|
|
||||||
return reflist[item.id];
|
return reflist[item.id];
|
||||||
};
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { SEASONAL_SETS } from '../content/constants';
|
import { SEASONAL_SETS } from '../content/constants';
|
||||||
|
|
||||||
module.exports = {
|
export default {
|
||||||
opened: true,
|
opened: true,
|
||||||
|
|
||||||
currentSeason: 'Fall',
|
currentSeason: 'Fall',
|
||||||
|
|||||||
@@ -539,4 +539,4 @@ shops.getBackgroundShopSets = function getBackgroundShopSets (language) {
|
|||||||
return sets;
|
return sets;
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports = shops;
|
export default shops;
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user