Boarding Group messages are now clickable

This commit is contained in:
John 2015-08-12 14:21:39 +03:00
parent 9d43264adc
commit bacd4b365c

View file

@ -145,7 +145,7 @@ class DistributedBoardingParty(DistributedObject.DistributedObject, BoardingPart
if removedMember: if removedMember:
removedMemberName = removedMember.name removedMemberName = removedMember.name
messageText = TTLocalizer.BoardingMessageLeftGroup % removedMemberName messageText = TTLocalizer.BoardingMessageLeftGroup % removedMemberName
localAvatar.setSystemMessage(0, messageText, WTToontownBoardingGroup) localAvatar.setSystemMessage(removedMemberId, messageText, WTToontownBoardingGroup)
elif localAvatar.doId in oldMemberList and localAvatar.doId not in memberList: elif localAvatar.doId in oldMemberList and localAvatar.doId not in memberList:
messenger.send('updateGroupStatus') messenger.send('updateGroupStatus')
@ -172,7 +172,7 @@ class DistributedBoardingParty(DistributedObject.DistributedObject, BoardingPart
def postKick(self, leaderId): def postKick(self, leaderId):
self.notify.debug('%s was kicked out of the Boarding Group by %s' % (localAvatar.doId, leaderId)) self.notify.debug('%s was kicked out of the Boarding Group by %s' % (localAvatar.doId, leaderId))
localAvatar.setSystemMessage(0, TTLocalizer.BoardingMessageKickedOut, WTToontownBoardingGroup) localAvatar.setSystemMessage(leaderId, TTLocalizer.BoardingMessageKickedOut, WTToontownBoardingGroup)
def postSizeReject(self, leaderId, inviterId, inviteeId): def postSizeReject(self, leaderId, inviterId, inviteeId):
self.notify.debug('%s was not invited because the group is full' % inviteeId) self.notify.debug('%s was not invited because the group is full' % inviteeId)
@ -252,7 +252,7 @@ class DistributedBoardingParty(DistributedObject.DistributedObject, BoardingPart
if invitee: if invitee:
inviteeName = invitee.name inviteeName = invitee.name
messageText = TTLocalizer.BoardingMessageInvited % (inviterName, inviteeName) messageText = TTLocalizer.BoardingMessageInvited % (inviterName, inviteeName)
localAvatar.setSystemMessage(0, messageText, WTToontownBoardingGroup) localAvatar.setSystemMessage(inviteeId, messageText, WTToontownBoardingGroup)
def postMessageInvitationFailed(self, inviterId): def postMessageInvitationFailed(self, inviterId):
inviterName = '' inviterName = ''
@ -261,7 +261,7 @@ class DistributedBoardingParty(DistributedObject.DistributedObject, BoardingPart
inviterName = inviter.name inviterName = inviter.name
if self.invitationFailedMessageOk(inviterId): if self.invitationFailedMessageOk(inviterId):
messageText = TTLocalizer.BoardingMessageInvitationFailed % inviterName messageText = TTLocalizer.BoardingMessageInvitationFailed % inviterName
localAvatar.setSystemMessage(0, messageText, WTToontownBoardingGroup) localAvatar.setSystemMessage(inviterId, messageText, WTToontownBoardingGroup)
def postMessageAcceptanceFailed(self, inviteeId, reason): def postMessageAcceptanceFailed(self, inviteeId, reason):
inviteeName = '' inviteeName = ''
@ -271,7 +271,7 @@ class DistributedBoardingParty(DistributedObject.DistributedObject, BoardingPart
inviteeName = invitee.name inviteeName = invitee.name
if reason == BoardingPartyBase.INVITE_ACCEPT_FAIL_GROUP_FULL: if reason == BoardingPartyBase.INVITE_ACCEPT_FAIL_GROUP_FULL:
messageText = TTLocalizer.BoardingMessageGroupFull % inviteeName messageText = TTLocalizer.BoardingMessageGroupFull % inviteeName
localAvatar.setSystemMessage(0, messageText, WTToontownBoardingGroup) localAvatar.setSystemMessage(inviteeId, messageText, WTToontownBoardingGroup)
if self.inviterPanels.isInvitingPanelIdCorrect(inviteeId): if self.inviterPanels.isInvitingPanelIdCorrect(inviteeId):
self.inviterPanels.destroyInvitingPanel() self.inviterPanels.destroyInvitingPanel()
@ -364,17 +364,17 @@ class DistributedBoardingParty(DistributedObject.DistributedObject, BoardingPart
if groupFormed: if groupFormed:
if leaderId == quitterId: if leaderId == quitterId:
if not localAvatar.doId == leaderId: if not localAvatar.doId == leaderId:
localAvatar.setSystemMessage(0, TTLocalizer.BoardingMessageGroupDissolved, WTToontownBoardingGroup) localAvatar.setSystemMessage(leaderId, TTLocalizer.BoardingMessageGroupDissolved, WTToontownBoardingGroup)
elif not kick: elif not kick:
if not localAvatar.doId == quitterId: if not localAvatar.doId == quitterId:
quitter = base.cr.doId2do.get(quitterId) quitter = base.cr.doId2do.get(quitterId)
if quitter: if quitter:
quitterName = quitter.name quitterName = quitter.name
messageText = TTLocalizer.BoardingMessageLeftGroup % quitterName messageText = TTLocalizer.BoardingMessageLeftGroup % quitterName
localAvatar.setSystemMessage(0, messageText, WTToontownBoardingGroup) localAvatar.setSystemMessage(quitterId, messageText, WTToontownBoardingGroup)
else: else:
messageText = TTLocalizer.BoardingMessageGroupDisbandedGeneric messageText = TTLocalizer.BoardingMessageGroupDisbandedGeneric
localAvatar.setSystemMessage(0, messageText, WTToontownBoardingGroup) localAvatar.setSystemMessage(quitterId, messageText, WTToontownBoardingGroup)
return return
def requestInvite(self, inviteeId): def requestInvite(self, inviteeId):