mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-08-02 07:49:39 +00:00
36 lines
1.4 KiB
Text
36 lines
1.4 KiB
Text
include generated_avatar
|
|
|
|
mixin avatar(opts)
|
|
.character-sprites
|
|
.addthis_native_toolbox(ng-if='::profile._id==user._id',
|
|
data-url="#{env.BASE_URL}/static/front/#?memberId={{::profile._id}}",
|
|
data-title=env.t('checkOutProgress'))
|
|
|
|
// Mount Body
|
|
if !opts.minimal
|
|
span(ng-if='profile.items.currentMount', class='Mount_Body_{{profile.items.currentMount}}')
|
|
|
|
// Buffs that cause visual changes to avatar: Snowman, Ghost, Flower, etc
|
|
- var visualBuffs = { snowball: 'snowman', spookySparkles: 'ghost', shinySeed: 'avatar_floral_{{profile.stats.class}}', seafoam: 'seafoam_star' }
|
|
each klass, item in visualBuffs
|
|
span(ng-if='profile.stats.buffs.#{item}', class='#{klass}')
|
|
|
|
// Show flower ALL THE TIME!!!
|
|
// See https://github.com/HabitRPG/habitrpg/issues/7133
|
|
span(class='hair_flower_{{profile.preferences.hair.flower}}')
|
|
|
|
// Show avatar only if not currently affected by visual buff
|
|
- var buffs = '!profile.stats.buffs'
|
|
span(ng-if='#{buffs}.snowball && #{buffs}.spookySparkles && #{buffs}.shinySeed && #{buffs}.seafoam')
|
|
+generatedAvatar
|
|
|
|
// Mount Head
|
|
if !opts.minimal
|
|
span.current-mount(ng-if='profile.items.currentMount', class='Mount_Head_{{profile.items.currentMount}}')
|
|
|
|
// Resting
|
|
span(ng-class='{zzz:profile.preferences.sleep}')
|
|
|
|
// Pet
|
|
if !opts.minimal
|
|
span.current-pet(class='Pet-{{profile.items.currentPet}}', ng-show='profile.items.currentPet')
|