market fixes 28th nov (#9593)

* list special gear by the `specialClass` - fixes #9485

* only disable the currencly label + value not the amount input - fixes #9492

* disable transformations on equipment previews - fixes #9497

* show boss strength - fixes #9522

* pin time travelers animals - closes #9382

* clean up + package-lock ?

* fix quest info
This commit is contained in:
negue
2017-12-05 21:09:34 +01:00
committed by Sabe Jones
parent 4b610ba3f1
commit c56c69d464
12 changed files with 136 additions and 77 deletions

View File

@@ -7,14 +7,14 @@
// Buffs that cause visual changes to avatar: Snowman, Ghost, Flower, etc
template(v-for="(klass, item) in visualBuffs")
span(v-if="member.stats.buffs[item]", :class="klass")
span(v-if="member.stats.buffs[item] && showVisualBuffs", :class="klass")
// Show flower ALL THE TIME!!!
// See https://github.com/HabitRPG/habitica/issues/7133
span(:class="'hair_flower_' + member.preferences.hair.flower")
// Show avatar only if not currently affected by visual buff
template(v-if!="!member.stats.buffs.snowball && !member.stats.buffs.spookySparkles && !member.stats.buffs.shinySeed && !member.stats.buffs.seafoam")
template(v-if="showAvatar()")
span(:class="'chair_' + member.preferences.chair")
span(:class="getGearClass('back')")
span(:class="skinClass")
@@ -111,6 +111,10 @@ export default {
overrideTopPadding: {
type: String,
},
showVisualBuffs: {
type: Boolean,
default: true,
},
},
computed: {
hasClass () {
@@ -179,6 +183,14 @@ export default {
if (!this.$store.state.spellOptions.castingSpell) return;
this.$root.$emit('castEnd', this.member, 'user', e);
},
showAvatar () {
if (!this.showVisualBuffs)
return true;
let buffs = this.member.stats.buffs;
return !buffs.snowball && !buffs.spookySparkles && !buffs.shinySeed && !buffs.seafoam;
},
},
};
</script>

View File

@@ -17,6 +17,7 @@
:withBackground="true",
:overrideAvatarGear="memberOverrideAvatarGear(item)",
:spritesMargin='"0px auto auto -1px"',
:showVisualBuffs="false",
)
h4.title {{ itemText }}

View File

@@ -18,6 +18,7 @@
slot(name="item", :item="item")
div(v-if="showAvatar")
avatar(
:showVisualBuffs="false",
:member="user",
:avatarOnly="true",
:hideClassBadge="true",
@@ -41,14 +42,15 @@
:item="item"
)
.purchase-amount(:class="{'notEnough': !this.enoughCurrency(getPriceClass(), item.value * selectedAmountToBuy)}")
.purchase-amount
.how-many-to-buy(v-if='showAmountToBuy(item)')
strong {{ $t('howManyToBuy') }}
div(v-if='showAmountToBuy(item)')
.box
input(type='number', min='0', v-model='selectedAmountToBuy')
span.svg-icon.inline.icon-32(aria-hidden="true", v-html="icons[getPriceClass()]")
span.value(:class="getPriceClass()") {{ item.value }}
span(:class="{'notEnough': notEnoughCurrency}")
span.svg-icon.inline.icon-32(aria-hidden="true", v-html="icons[getPriceClass()]")
span.value(:class="getPriceClass()") {{ item.value }}
.gems-left(v-if='item.key === "gem"')
strong(v-if='gemsLeft > 0') {{ gemsLeft }} {{ $t('gemsRemaining') }}
@@ -356,6 +358,9 @@
if (this.item && this.item.key && this.item.key === 'gem' && this.selectedAmountToBuy > this.gemsLeft) return true;
return false;
},
notEnoughCurrency () {
return !this.enoughCurrency(this.getPriceClass(), this.item.value * this.selectedAmountToBuy);
},
},
watch: {
item: function itemChanged () {

View File

@@ -1,11 +1,14 @@
<template lang="pug">
div.row
span.col-4(v-if="quest.collect") {{ $t('collect') }}
span.col-4(v-if="quest.collect") {{ $t('collect') + ':' }}
span.col-8(v-if="quest.collect")
div(v-for="(collect, key) of quest.collect")
span {{ collect.count }} {{ getCollectText(collect) }}
span.col-4 {{ $t('difficulty') }}
span.col-4(v-if="quest.boss") {{ $t('bossHP') + ':' }}
span.col-8(v-if="quest.boss") {{ quest.boss.hp }}
span.col-4 {{ $t('difficulty') + ':' }}
span.col-8
span.svg-icon.inline.icon-16(v-for="star of stars()", v-html="icons[star]")
</template>
@@ -22,7 +25,7 @@
}
.col-8 {
text-align: right;
text-align: left;
}
.col-8:not(:last-child) {

View File

@@ -310,15 +310,6 @@
return c.identifier === 'mounts' || c.identifier === 'pets';
});
normalGroups.map((group) => {
group.items = group.items.map((item) => {
return {
...item,
class: `shop_${group.identifier}_${item.key}`,
};
});
});
let setGroups = _filter(apiCategories, (c) => {
return c.identifier !== 'mounts' && c.identifier !== 'pets';
});