mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-19 15:48:04 +01:00
feat(event): April Foolin
This commit is contained in:
@@ -79,9 +79,8 @@
|
||||
></span>
|
||||
<!-- Pet-->
|
||||
<span
|
||||
v-if="member.items.currentPet"
|
||||
class="current-pet"
|
||||
:class="'Pet-' + member.items.currentPet"
|
||||
:class="foolPet(member.items.currentPet)"
|
||||
></span>
|
||||
</template>
|
||||
</div>
|
||||
@@ -124,6 +123,7 @@
|
||||
</style>
|
||||
|
||||
<script>
|
||||
import includes from 'lodash/includes';
|
||||
import { mapState } from '@/libs/store';
|
||||
|
||||
import ClassBadge from '@/components/members/classBadge';
|
||||
@@ -189,7 +189,7 @@ export default {
|
||||
let val = '27px';
|
||||
|
||||
if (!this.avatarOnly) {
|
||||
if (this.member.items.currentPet) val = '24px';
|
||||
// if (this.member.items.currentPet) val = '24px';
|
||||
if (this.member.items.currentMount) val = '0px';
|
||||
}
|
||||
|
||||
@@ -276,6 +276,52 @@ export default {
|
||||
|
||||
return !buffs.snowball && !buffs.spookySparkles && !buffs.shinySeed && !buffs.seafoam;
|
||||
},
|
||||
foolPet (pet) {
|
||||
const SPECIAL_PETS = [
|
||||
'Wolf-Veteran',
|
||||
'Wolf-Cerberus',
|
||||
'Dragon-Hydra',
|
||||
'Turkey-Base',
|
||||
'BearCub-Polar',
|
||||
'MantisShrimp-Base',
|
||||
'JackOLantern-Base',
|
||||
'Mammoth-Base',
|
||||
'Tiger-Veteran',
|
||||
'Phoenix-Base',
|
||||
'Turkey-Gilded',
|
||||
'MagicalBee-Base',
|
||||
'Lion-Veteran',
|
||||
'Gryphon-RoyalPurple',
|
||||
'JackOLantern-Ghost',
|
||||
'Jackalope-RoyalPurple',
|
||||
'Orca-Base',
|
||||
'Bear-Veteran',
|
||||
'Hippogriff-Hopeful',
|
||||
'Fox-Veteran',
|
||||
'JackOLantern-Glow',
|
||||
'Gryphon-Gryphatrice',
|
||||
];
|
||||
const BASE_PETS = [
|
||||
'Wolf',
|
||||
'TigerCub',
|
||||
'PandaCub',
|
||||
'LionCub',
|
||||
'Fox',
|
||||
'FlyingPig',
|
||||
'BearCub',
|
||||
'Dragon',
|
||||
'Cactus',
|
||||
];
|
||||
if (!pet) return 'Pet-Cactus-Dessert';
|
||||
if (SPECIAL_PETS.indexOf(pet) !== -1) {
|
||||
return 'Pet-LionCub-Dessert';
|
||||
}
|
||||
const species = pet.slice(0, pet.indexOf('-'));
|
||||
if (includes(BASE_PETS, species)) {
|
||||
return `Pet-${species}-Dessert`;
|
||||
}
|
||||
return 'Pet-FlyingPig-Dessert';
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user