mirror of
https://github.com/sudoxnym/habitica-self-host.git
synced 2026-07-14 10:12:21 +00:00
Merge branch 'khipkin/party-badges' into develop
Conflicts: common/dist/sprites/spritesmith-main-10.png common/dist/sprites/spritesmith-main-11.png common/dist/sprites/spritesmith-main-5.css common/dist/sprites/spritesmith-main-5.png common/dist/sprites/spritesmith-main-6.png common/dist/sprites/spritesmith-main-7.png common/dist/sprites/spritesmith-main-8.png common/dist/sprites/spritesmith-main-9.png
This commit is contained in:
commit
beb86ea4bd
11 changed files with 429 additions and 347 deletions
710
common/dist/sprites/spritesmith-main-0.css
vendored
710
common/dist/sprites/spritesmith-main-0.css
vendored
File diff suppressed because it is too large
Load diff
BIN
common/dist/sprites/spritesmith-main-0.png
vendored
BIN
common/dist/sprites/spritesmith-main-0.png
vendored
Binary file not shown.
|
Before Width: | Height: | Size: 291 KiB After Width: | Height: | Size: 291 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 3.8 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 3.7 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 3.3 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 3.4 KiB |
|
|
@ -147,6 +147,10 @@
|
|||
"partyChatEmpty": "Your party chat is empty! Type a message in the box above to start chatting.",
|
||||
"guildChatEmpty": "This guild's chat is empty! Type a message in the box above to start chatting.",
|
||||
"possessiveParty": "<%= name %>'s Party",
|
||||
"requestAcceptGuidelines": "If you would like to post messages in the Tavern or any party or guild chat, please first read our <%= linkStart %>Community Guidelines<%= linkEnd %> and then click the button below to indicate that you accept them."
|
||||
"requestAcceptGuidelines": "If you would like to post messages in the Tavern or any party or guild chat, please first read our <%= linkStart %>Community Guidelines<%= linkEnd %> and then click the button below to indicate that you accept them.",
|
||||
"partyUpName": "Party Up",
|
||||
"partyOnName": "Party On",
|
||||
"partyUpAchievement": "Joined a Party with another person! Have fun battling monsters and supporting each other.",
|
||||
"partyOnAchievement": "Joined a Party with at least four people! Enjoy your increased accountability as you unite with your friends to vanquish your foes!"
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2,6 +2,9 @@
|
|||
|
||||
habitrpg.controller("PartyCtrl", ['$rootScope','$scope','Groups','Chat','User','Challenges','$state','$compile','Analytics','Quests','Social',
|
||||
function($rootScope,$scope,Groups,Chat,User,Challenges,$state,$compile,Analytics,Quests,Social) {
|
||||
|
||||
var user = User.user;
|
||||
|
||||
$scope.type = 'party';
|
||||
$scope.text = window.env.t('party');
|
||||
$scope.group = $rootScope.party = Groups.party();
|
||||
|
|
@ -11,6 +14,20 @@ habitrpg.controller("PartyCtrl", ['$rootScope','$scope','Groups','Chat','User','
|
|||
|
||||
if ($state.is('options.social.party')) {
|
||||
$scope.group.$syncParty(); // Sync party automatically when navigating to party page
|
||||
|
||||
// Checks if user's party has reached 2 players for the first time.
|
||||
if(!user.achievements.partyUp
|
||||
&& $scope.group.memberCount >= 2) {
|
||||
User.set({'achievements.partyUp':true});
|
||||
$rootScope.openModal('achievements/partyUp', {controller:'UserCtrl', size:'sm'});
|
||||
}
|
||||
|
||||
// Checks if user's party has reached 4 players for the first time.
|
||||
if(!user.achievements.partyOn
|
||||
&& $scope.group.memberCount >= 4) {
|
||||
User.set({'achievements.partyOn':true});
|
||||
$rootScope.openModal('achievements/partyOn', {controller:'UserCtrl', size:'sm'});
|
||||
}
|
||||
}
|
||||
|
||||
Chat.seenMessage($scope.group._id);
|
||||
|
|
|
|||
|
|
@ -59,7 +59,9 @@ var UserSchema = new Schema({
|
|||
greeting: Number,
|
||||
thankyou: Number,
|
||||
costumeContests: Number,
|
||||
birthday: Number
|
||||
birthday: Number,
|
||||
partyUp: Boolean,
|
||||
partyOn: Boolean
|
||||
},
|
||||
auth: {
|
||||
blocked: Boolean,
|
||||
|
|
@ -526,7 +528,7 @@ UserSchema.pre('save', function(next) {
|
|||
var mountMasterProgress = shared.count.mountMasterProgress(this.items.mounts);
|
||||
|
||||
if (mountMasterProgress >= 90 || this.achievements.mountMasterCount > 0) {
|
||||
this.achievements.mountMaster = true
|
||||
this.achievements.mountMaster = true;
|
||||
}
|
||||
|
||||
// Determines if Triad Bingo should be awarded
|
||||
|
|
|
|||
|
|
@ -83,7 +83,6 @@ script(id='modals/achievements/beastMaster.html', type='text/ng-template')
|
|||
button.btn.btn-primary(ng-click='$close()')=env.t('huzzah')
|
||||
+achievementFooter
|
||||
|
||||
|
||||
// Mount Master
|
||||
script(id='modals/achievements/mountMaster.html', type='text/ng-template')
|
||||
.modal-content(style='min-width:28em')
|
||||
|
|
@ -132,3 +131,25 @@ script(id='modals/achievements/rebirth.html', type='text/ng-template')
|
|||
br
|
||||
button.btn.btn-primary(ng-click='$close()')=env.t('huzzah')
|
||||
+achievementFooter
|
||||
|
||||
// Party Up
|
||||
script(id='modals/achievements/partyUp.html', type='text/ng-template')
|
||||
.modal-content(style='min-width:28em')
|
||||
.modal-body.text-center
|
||||
h3(style='margin-bottom:0')=env.t('modalAchievement')
|
||||
+achievementAvatar('partyUp',0)
|
||||
p=env.t('partyUpAchievement')
|
||||
br
|
||||
button.btn.btn-primary(ng-click='$close()')=env.t('huzzah')
|
||||
+achievementFooter
|
||||
|
||||
// Party On
|
||||
script(id='modals/achievements/partyOn.html', type='text/ng-template')
|
||||
.modal-content(style='min-width:28em')
|
||||
.modal-body.text-center
|
||||
h3(style='margin-bottom:0')=env.t('modalAchievement')
|
||||
+achievementAvatar('partyOn',0)
|
||||
p=env.t('partyOnAchievement')
|
||||
br
|
||||
button.btn.btn-primary(ng-click='$close()')=env.t('huzzah')
|
||||
+achievementFooter
|
||||
|
|
|
|||
|
|
@ -87,6 +87,20 @@ div(ng-if='(user._id == profile._id) || #{ultimateGearCheck}')
|
|||
=env.t('warrior')
|
||||
hr
|
||||
|
||||
div(ng-if='::profile.achievements.partyUp || user._id == profile._id')
|
||||
.achievement.achievement-partyUp(ng-if='::profile.achievements.partyUp')
|
||||
div(ng-class='::{muted: !profile.achievements.partyUp}')
|
||||
h5=env.t('partyUpName')
|
||||
small=env.t('partyUpAchievement')
|
||||
hr
|
||||
|
||||
div(ng-if='::profile.achievements.partyOn || user._id == profile._id')
|
||||
.achievement.achievement-partyOn(ng-if='::profile.achievements.partyOn')
|
||||
div(ng-class='::{muted: !profile.achievements.partyOn}')
|
||||
h5=env.t('partyOnName')
|
||||
small=env.t('partyOnAchievement')
|
||||
hr
|
||||
|
||||
div(ng-if='::profile.achievements.beastMaster || user._id == profile._id')
|
||||
.achievement.achievement-rat(ng-if='::profile.achievements.beastMaster')
|
||||
div(ng-class='::{muted: !profile.achievements.beastMaster}')
|
||||
|
|
|
|||
Loading…
Reference in a new issue