diff --git a/dependencies/astron/dclass/stride.dc b/dependencies/astron/dclass/stride.dc index 34077943..1625d1f1 100644 --- a/dependencies/astron/dclass/stride.dc +++ b/dependencies/astron/dclass/stride.dc @@ -173,8 +173,6 @@ dclass DistributedPlayer : DistributedAvatar { setWhisperSCCustomFrom(DoId fromAv, uint16 msgIndex) ownrecv clsend; setWhisperSCEmoteFrom(DoId fromAv, uint16 emoteId) ownrecv clsend; setSystemMessage(DoId aboutId, string(0-256) chatString) ownrecv; - setCommonChatFlags(uint8) broadcast ownrecv ram airecv; - setWhitelistChatFlags(uint8) broadcast ownrecv ram airecv; setSC(uint16 msgIndex) broadcast ownsend airecv; setSCCustom(uint16 msgIndex) broadcast ownsend airecv; setFriendsList(FriendEntry[] = []) ownrecv required db airecv; @@ -3363,7 +3361,7 @@ dclass TTSFriendsManager : DistributedObjectGlobal { friendInfo(Friend); friendList(Friend []); - friendOnline(uint32, uint8, uint8); + friendOnline(uint32); friendOffline(uint32); goingOffline(uint32 avId); diff --git a/otp/avatar/Avatar.py b/otp/avatar/Avatar.py index 121886ef..1cfaea32 100755 --- a/otp/avatar/Avatar.py +++ b/otp/avatar/Avatar.py @@ -67,7 +67,6 @@ class Avatar(Actor, ShadowCaster): self.battleTubeHeight = 0.0 self.battleTubeRadius = 0.0 self.style = None - self.commonChatFlags = 0 self.understandable = 1 self.setPlayerType(NametagGlobals.CCNormal) self.ghostMode = 0 @@ -81,7 +80,6 @@ class Avatar(Actor, ShadowCaster): self.__chatLocal = 0 self.__chatQuitButton = False self.__currentDialogue = None - self.whitelistChatFlags = 0 def delete(self): try: @@ -127,50 +125,34 @@ class Avatar(Actor, ShadowCaster): chatColor = NametagGlobals.ChatColors[self.playerType] self.nametag.setChatColor(chatColor) else: - nametagColor = NametagGlobals.NametagColors[NametagGlobals.CCNoChat] + nametagColor = NametagGlobals.NametagColors[NametagGlobals.CCNonPlayer] self.nametag.setNametagColor(nametagColor) - chatColor = NametagGlobals.ChatColors[NametagGlobals.CCNoChat] + chatColor = NametagGlobals.ChatColors[NametagGlobals.CCNonPlayer] self.nametag.setChatColor(chatColor) self.nametag.updateAll() - def setCommonChatFlags(self, commonChatFlags): - self.commonChatFlags = commonChatFlags - self.considerUnderstandable() - if self == base.localAvatar: - reconsiderAllUnderstandable() - - def setWhitelistChatFlags(self, whitelistChatFlags): - self.whitelistChatFlags = whitelistChatFlags - self.considerUnderstandable() - if self == base.localAvatar: - reconsiderAllUnderstandable() - def considerUnderstandable(self): - if self.playerType in (NametagGlobals.CCNormal, NametagGlobals.CCFreeChat, NametagGlobals.CCSpeedChat): + if self.playerType in (NametagGlobals.CCNormal, NametagGlobals.CCSpeedChat): self.setPlayerType(NametagGlobals.CCSpeedChat) if hasattr(base, 'localAvatar') and (self == base.localAvatar): self.understandable = 1 - self.setPlayerType(NametagGlobals.CCFreeChat) + self.setPlayerType(NametagGlobals.CCNormal) elif self.playerType == NametagGlobals.CCSuit: self.understandable = 1 self.setPlayerType(NametagGlobals.CCSuit) - elif self.playerType not in (NametagGlobals.CCNormal, NametagGlobals.CCFreeChat, NametagGlobals.CCSpeedChat): + elif self.playerType not in (NametagGlobals.CCNormal, NametagGlobals.CCSpeedChat): self.understandable = 1 - self.setPlayerType(NametagGlobals.CCNoChat) - elif hasattr(base, 'localAvatar') and self.commonChatFlags & base.localAvatar.commonChatFlags & OTPGlobals.CommonChat: + self.setPlayerType(NametagGlobals.CCNonPlayer) + elif False and hasattr(self, 'adminAccess') and self.adminAccess >= CATEGORY_COMMUNITY_MANAGER: + print 'admin' self.understandable = 1 - self.setPlayerType(NametagGlobals.CCFreeChat) - elif self.commonChatFlags & OTPGlobals.SuperChat: + self.setPlayerType(NametagGlobals.CCNormal) + elif settings['trueFriends'] and base.cr.getFriendFlags(self.doId) & OTPGlobals.FriendChat: self.understandable = 1 - self.setPlayerType(NametagGlobals.CCFreeChat) - elif hasattr(base, 'localAvatar') and base.localAvatar.commonChatFlags & OTPGlobals.SuperChat: - self.understandable = 1 - self.setPlayerType(NametagGlobals.CCFreeChat) - elif base.cr.getFriendFlags(self.doId) & OTPGlobals.FriendChat: - self.understandable = 1 - self.setPlayerType(NametagGlobals.CCFreeChat) - elif hasattr(base, 'localAvatar') and self.whitelistChatFlags & base.localAvatar.whitelistChatFlags: + self.setPlayerType(NametagGlobals.CCNormal) + elif settings['speedchatPlus']: self.understandable = 1 + self.setPlayerType(NametagGlobals.CCSpeedChat) else: self.understandable = 0 if not hasattr(self, 'nametag'): diff --git a/otp/avatar/DistributedPlayerAI.py b/otp/avatar/DistributedPlayerAI.py index 147240bd..102a6463 100755 --- a/otp/avatar/DistributedPlayerAI.py +++ b/otp/avatar/DistributedPlayerAI.py @@ -71,12 +71,6 @@ class DistributedPlayerAI(DistributedAvatarAI.DistributedAvatarAI, PlayerBase.Pl def d_setSystemMessage(self, aboutId, chatString): self.sendUpdate('setSystemMessage', [aboutId, chatString]) - def d_setCommonChatFlags(self, flags): - self.sendUpdate('setCommonChatFlags', [flags]) - - def setCommonChatFlags(self, flags): - pass - def d_friendsNotify(self, avId, status): self.sendUpdate('friendsNotify', [avId, status]) diff --git a/otp/avatar/LocalAvatar.py b/otp/avatar/LocalAvatar.py index cf29d310..3dbfaa4b 100755 --- a/otp/avatar/LocalAvatar.py +++ b/otp/avatar/LocalAvatar.py @@ -54,7 +54,6 @@ class LocalAvatar(DistributedAvatar.DistributedAvatar, DistributedSmoothNode.Dis self.customMessages = [] self.chatMgr = chatMgr base.talkAssistant = talkAssistant - self.commonChatFlags = 0 self.garbleChat = 1 self.teleportAllowed = 1 self.lockedDown = 0 @@ -1128,10 +1127,8 @@ class LocalAvatar(DistributedAvatar.DistributedAvatar, DistributedSmoothNode.Dis self.ccPusherTrav.traverse(n) return - def __friendOnline(self, doId, commonChatFlags = 0, whitelistChatFlags = 0): + def __friendOnline(self, doId): friend = base.cr.identifyFriend(doId) - if friend != None and hasattr(friend, 'setCommonAndWhitelistChatFlags'): - friend.setCommonAndWhitelistChatFlags(commonChatFlags, whitelistChatFlags) if self.oldFriendsList != None: now = globalClock.getFrameTime() elapsed = now - self.timeFriendsListChanged diff --git a/otp/chat/ChatInputTyped.py b/otp/chat/ChatInputTyped.py index f17bd94e..89e45817 100755 --- a/otp/chat/ChatInputTyped.py +++ b/otp/chat/ChatInputTyped.py @@ -77,9 +77,6 @@ class ChatInputTyped(DirectObject.DirectObject): self.cancelButton.show() self.typedChatButton.hide() self.typedChatBar.hide() - if self.whisperId and not base.talkAssistant.checkWhisperTypedChatAvatar(self.whisperId): - messenger.send('Chat-Failed avatar typed chat test') - self.deactivate() def deactivate(self): self.chatEntry.set('') diff --git a/otp/chat/ChatInputWhiteListFrame.py b/otp/chat/ChatInputWhiteListFrame.py index 437366a0..60f63104 100755 --- a/otp/chat/ChatInputWhiteListFrame.py +++ b/otp/chat/ChatInputWhiteListFrame.py @@ -79,19 +79,6 @@ class ChatInputWhiteListFrame(FSM.FSM, DirectFrame): def requestMode(self, mode, *args): return self.request(mode, *args) - def defaultFilter(self, request, *args): - if request == 'AllChat': - if not base.talkAssistant.checkAnyTypedChat(): - messenger.send('Chat-Failed open typed chat test') - self.notify.warning('Chat-Failed open typed chat test') - return None - elif request == 'AvatarWhisper': - if not base.talkAssistant.checkWhisperTypedChatAvatar(self.whisperId): - messenger.send('Chat-Failed avatar typed chat test') - self.notify.warning('Chat-Failed avatar typed chat test') - return None - return FSM.FSM.defaultFilter(self, request, *args) - def enterOff(self): self.deactivate() localAvatar.chatMgr.fsm.request('mainMenu') diff --git a/otp/chat/TalkAssistant.py b/otp/chat/TalkAssistant.py index f041e5df..8b59a433 100755 --- a/otp/chat/TalkAssistant.py +++ b/otp/chat/TalkAssistant.py @@ -204,45 +204,6 @@ class TalkAssistant(DirectObject.DirectObject): message.getSenderAccountName(), message.getBody()) - def checkOpenTypedChat(self): - if base.localAvatar.commonChatFlags & OTPGlobals.CommonChat: - return True - return False - - def checkAnyTypedChat(self): - if base.localAvatar.commonChatFlags & OTPGlobals.CommonChat: - return True - if base.localAvatar.canChat(): - return True - return False - - def checkOpenSpeedChat(self): - return True - - def checkWhisperTypedChatAvatar(self, avatarId): - remoteAvatar = base.cr.doId2do.get(avatarId) - if remoteAvatar: - if remoteAvatar.isUnderstandable(): - return True - if base.localAvatar.commonChatFlags & OTPGlobals.SuperChat: - return True - remoteAvatarOrHandleOrInfo = base.cr.identifyAvatar(avatarId) - if remoteAvatarOrHandleOrInfo and hasattr(remoteAvatarOrHandleOrInfo, 'isUnderstandable'): - if remoteAvatarOrHandleOrInfo.isUnderstandable(): - return True - if base.cr.getFriendFlags(avatarId) & OTPGlobals.FriendChat: - return True - return False - - def checkWhisperSpeedChatAvatar(self, avatarId): - return True - - def checkOpenSpeedChat(self): - return True - - def checkWhisperSpeedChatAvatar(self, avatarId): - return True - def receiveOpenTalk(self, senderAvId, avatarName, accountId, accountName, message, scrubbed = 0): error = None if not avatarName and senderAvId: diff --git a/otp/friends/FriendManager.py b/otp/friends/FriendManager.py index 824b36ce..e4155eb2 100755 --- a/otp/friends/FriendManager.py +++ b/otp/friends/FriendManager.py @@ -50,7 +50,7 @@ class FriendManager(DistributedObject.DistributedObject): def up_inviteeFriendResponse(self, yesNoMaybe, context): if yesNoMaybe == 1: - base.cr.ttsFriendsManager.friendOnline(self.otherToon, 0, 0) + base.cr.ttsFriendsManager.friendOnline(self.otherToon) self.sendUpdate('inviteeFriendResponse', [yesNoMaybe, context]) self.notify.debug('Client: inviteeFriendResponse(%d, %d)' % (yesNoMaybe, context)) @@ -64,7 +64,7 @@ class FriendManager(DistributedObject.DistributedObject): def friendResponse(self, yesNoMaybe, context): if yesNoMaybe == 1: - base.cr.ttsFriendsManager.friendOnline(self.otherToon, 0, 0) + base.cr.ttsFriendsManager.friendOnline(self.otherToon) self.notify.debug('Client: friendResponse(%d, %d)' % (yesNoMaybe, context)) messenger.send('friendResponse', [yesNoMaybe, context]) diff --git a/otp/otpbase/OTPGlobals.py b/otp/otpbase/OTPGlobals.py index 24ef7a83..b61ad034 100755 --- a/otp/otpbase/OTPGlobals.py +++ b/otp/otpbase/OTPGlobals.py @@ -19,7 +19,6 @@ AICollMovePriority = 8 MaxFriends = 200 MaxBackCatalog = 48 FriendChat = 1 -CommonChat = 1 SuperChat = 2 MaxCustomMessages = 25 SPInvalid = 0 diff --git a/toontown/catalog/CatalogScreen.py b/toontown/catalog/CatalogScreen.py index a2e8e16b..20f32919 100755 --- a/toontown/catalog/CatalogScreen.py +++ b/toontown/catalog/CatalogScreen.py @@ -1024,7 +1024,7 @@ class CatalogScreen(DirectFrame): def __makeFFlist(self): for id, handle in base.cr.friendsMap.items(): - self.ffList.append((id, handle.getName(), NametagGlobals.CCFreeChat)) + self.ffList.append((id, handle.getName(), NametagGlobals.getFriendColor(id))) def __makeScrollList(self): for ff in self.ffList: diff --git a/toontown/distributed/ToontownClientRepository.py b/toontown/distributed/ToontownClientRepository.py index 32c7e94b..1f1b36ea 100755 --- a/toontown/distributed/ToontownClientRepository.py +++ b/toontown/distributed/ToontownClientRepository.py @@ -94,7 +94,6 @@ class ToontownClientRepository(OTPClientRepository.OTPClientRepository): self.friendsOnline = {} self.friendsMapPending = 0 self.friendsListError = 0 - self.friendPendingChatSettings = {} self.elderFriendsMap = {} self.__queryAvatarMap = {} self.hoodMgr = HoodMgr.HoodMgr(self) @@ -762,9 +761,6 @@ class ToontownClientRepository(OTPClientRepository.OTPClientRepository): self.friendsMap[doId] = handle if doId in self.friendsOnline: self.friendsOnline[doId] = handle - if doId in self.friendPendingChatSettings: - self.notify.debug('calling setCommonAndWL %s' % str(self.friendPendingChatSettings[doId])) - handle.setCommonAndWhitelistChatFlags(*self.friendPendingChatSettings[doId]) if base.wantPets and base.localAvatar.hasPet(): @@ -798,13 +794,11 @@ class ToontownClientRepository(OTPClientRepository.OTPClientRepository): if avatarHandleList: messenger.send('gotExtraFriendHandles', [avatarHandleList]) - def handleFriendOnline(self, doId, commonChatFlags, whitelistChatFlags): - self.notify.debug('Friend %d now online. common=%d whitelist=%d' % (doId, commonChatFlags, whitelistChatFlags)) + def handleFriendOnline(self, doId): + self.notify.debug('Friend %d now online.' % doId) if doId not in self.friendsOnline: self.friendsOnline[doId] = self.identifyFriend(doId) - messenger.send('friendOnline', [doId, commonChatFlags, whitelistChatFlags]) - if not self.friendsOnline[doId]: - self.friendPendingChatSettings[doId] = (commonChatFlags, whitelistChatFlags) + messenger.send('friendOnline', [doId]) def handleFriendOffline(self, doId): self.notify.debug('Friend %d now offline.' % doId) diff --git a/toontown/estate/ToonStatueSelectionGUI.py b/toontown/estate/ToonStatueSelectionGUI.py index 4a39416a..49c6de85 100755 --- a/toontown/estate/ToonStatueSelectionGUI.py +++ b/toontown/estate/ToonStatueSelectionGUI.py @@ -112,7 +112,7 @@ class ToonStatueSelectionGUI(DirectFrame): if hasattr(handle, 'getName'): colorCode = NametagGlobals.CCSpeedChat if flags & ToontownGlobals.FriendChat: - colorCode = NametagGlobals.CCFreeChat + colorCode = NametagGlobals.CCNormal newFF = (friendPair[0], handle.getName(), colorCode) self.ffList.append(newFF) else: diff --git a/toontown/friends/FriendHandle.py b/toontown/friends/FriendHandle.py index 7a3e376f..a92abe1f 100755 --- a/toontown/friends/FriendHandle.py +++ b/toontown/friends/FriendHandle.py @@ -8,8 +8,6 @@ class FriendHandle: def __init__(self, doId, name, style, petId, isAPet = False): self.doId = doId self.style = style - self.commonChatFlags = 0 - self.whitelistChatFlags = 0 self.petId = petId self.isAPet = isAPet self.chatGarbler = ToonChatGarbler.ToonChatGarbler() @@ -62,19 +60,11 @@ class FriendHandle: base.cr.ttsFriendsManager.d_teleportGiveup(self.doId) def isUnderstandable(self): - if self.commonChatFlags & base.localAvatar.commonChatFlags & ToontownGlobals.CommonChat: - understandable = 1 - elif self.commonChatFlags & ToontownGlobals.SuperChat: - understandable = 1 - elif base.localAvatar.commonChatFlags & ToontownGlobals.SuperChat: - understandable = 1 - elif base.cr.getFriendFlags(self.doId) & ToontownGlobals.FriendChat: - understandable = 1 - elif self.whitelistChatFlags & base.localAvatar.whitelistChatFlags: - understandable = 1 - else: - understandable = 0 - return understandable + if settings['speedchatPlus']: + return 1 + elif settings['trueFriends'] and base.cr.getFriendFlags(self.doId) & ToontownGlobals.FriendChat: + return 1 + return 0 def scrubTalk(self, message, mods): scrubbed = 0 @@ -117,7 +107,3 @@ class FriendHandle: newText = ' '.join(newwords) return newText - - def setCommonAndWhitelistChatFlags(self, commonChatFlags, whitelistChatFlags): - self.commonChatFlags = commonChatFlags - self.whitelistChatFlags = whitelistChatFlags diff --git a/toontown/friends/FriendsListPanel.py b/toontown/friends/FriendsListPanel.py index f5a792f7..cf8bc5ea 100755 --- a/toontown/friends/FriendsListPanel.py +++ b/toontown/friends/FriendsListPanel.py @@ -377,7 +377,7 @@ class FriendsListPanel(DirectFrame, StateData.StateData): else: self.right['state'] = 'normal' - def __friendOnline(self, doId, commonChatFlags, whitelistChatFlags): + def __friendOnline(self, doId): if self.panelType == FLPOnline: self.__updateScrollList() diff --git a/toontown/friends/TTSFriendsManager.py b/toontown/friends/TTSFriendsManager.py index 2dead968..36a624ee 100755 --- a/toontown/friends/TTSFriendsManager.py +++ b/toontown/friends/TTSFriendsManager.py @@ -18,8 +18,8 @@ class TTSFriendsManager(DistributedObjectGlobal): def friendList(self, resp): base.cr.handleGetFriendsList(resp) - def friendOnline(self, id, commonChatFlags, whitelistChatFlags): - base.cr.handleFriendOnline(id, commonChatFlags, whitelistChatFlags) + def friendOnline(self, id): + base.cr.handleFriendOnline(id) def friendOffline(self, id): base.cr.handleFriendOffline(id) diff --git a/toontown/friends/TTSFriendsManagerUD.py b/toontown/friends/TTSFriendsManagerUD.py index 75b23311..2342fa93 100755 --- a/toontown/friends/TTSFriendsManagerUD.py +++ b/toontown/friends/TTSFriendsManagerUD.py @@ -248,8 +248,7 @@ class TTSFriendsManagerUD(DistributedObjectGlobalUD): dnaString = fields['setDNAString'][0] experience = fields['setExperience'][0] trackBonusLevel = fields['setTrackBonusLevel'][0] - # We need an actual way to send the fields to the client............... - # Inventory, trackAccess, trophies, Hp, maxHp, defaultshard, lastHood, dnastring + self.sendUpdateToAvatarId(senderId, 'friendDetails', [avId, inventory, trackAccess, trophies, hp, maxHp, defaultShard, lastHood, dnaString, experience, trackBonusLevel]) self.air.dbInterface.queryObject(self.air.dbId, avId, handleToon) @@ -287,8 +286,8 @@ class TTSFriendsManagerUD(DistributedObjectGlobalUD): for friend in friendsList: friendId = friend[0] if friend[0] in self.onlineToons: - self.sendUpdateToAvatarId(doId, 'friendOnline', [friendId, 0, 0]) - self.sendUpdateToAvatarId(friendId, 'friendOnline', [doId, 0, 0]) + self.sendUpdateToAvatarId(doId, 'friendOnline', [friendId]) + self.sendUpdateToAvatarId(friendId, 'friendOnline', [doId]) def goingOffline(self, avId): self.toonOffline(avId) diff --git a/toontown/nametag/NametagGlobals.py b/toontown/nametag/NametagGlobals.py index b8b62a6c..a564791d 100755 --- a/toontown/nametag/NametagGlobals.py +++ b/toontown/nametag/NametagGlobals.py @@ -1,15 +1,13 @@ from pandac.PandaModules import VBase4 - +from otp.otpbase import OTPGlobals CCNormal = 0 -CCNoChat = 1 -CCNonPlayer = 2 -CCSuit = 3 -CCToonBuilding = 4 -CCSuitBuilding = 5 -CCHouseBuilding = 6 -CCSpeedChat = 7 -CCFreeChat = 8 +CCNonPlayer = 1 +CCSuit = 2 +CCToonBuilding = 3 +CCSuitBuilding = 4 +CCHouseBuilding = 5 +CCSpeedChat = 6 CHAT = 0 SPEEDCHAT = 1 @@ -135,22 +133,18 @@ def getModelWidthHeight(model): height = maxPoint.getZ() - minPoint.getZ() return (width, height) +def getFriendColor(id): + return CCNormal if settings['trueFriends'] and base.cr.getFriendFlags(id) & OTPGlobals.FriendChat else CCNormal # Foreground, background: NametagColors = { - CCNormal: ( + CCNormal: ( # Blue (VBase4(0.3, 0.3, 0.7, 1.0), VBase4(0.8, 0.8, 0.8, 0.375)), # Normal (VBase4(0.3, 0.3, 0.7, 1.0), VBase4(0.2, 0.2, 0.2, 0.1875)), # Down (VBase4(0.5, 0.5, 1.0, 1.0), VBase4(1.0, 1.0, 1.0, 0.5625)), # Rollover (VBase4(0.3, 0.3, 0.7, 1.0), VBase4(1.0, 1.0, 1.0, 0.375)) # Disabled ), - CCNoChat: ( - (VBase4(0.8, 0.4, 0.0, 1.0), VBase4(0.8, 0.8, 0.8, 0.375)), # Normal - (VBase4(1.0, 0.5, 0.5, 1.0), VBase4(0.2, 0.2, 0.2, 0.1875)), # Click - (VBase4(1.0, 0.5, 0.0, 1.0), VBase4(1.0, 1.0, 1.0, 0.5625)), # Rollover - (VBase4(0.8, 0.4, 0.0, 1.0), VBase4(0.8, 0.8, 0.8, 0.375)) # Disabled - ), - CCNonPlayer: ( + CCNonPlayer: ( # Orange (VBase4(0.8, 0.4, 0.0, 1.0), VBase4(0.8, 0.8, 0.8, 0.375)), # Normal (VBase4(0.8, 0.4, 0.0, 1.0), VBase4(0.8, 0.8, 0.8, 0.1875)), # Down (VBase4(0.8, 0.4, 0.0, 1.0), VBase4(0.8, 0.8, 0.8, 0.5625)), # Rollover @@ -181,17 +175,11 @@ NametagColors = { (VBase4(0.5, 0.5, 1.0, 1.0), VBase4(1.0, 1.0, 1.0, 0.5625)), # Rollover (VBase4(0.0, 0.6, 0.2, 1.0), VBase4(0.8, 0.8, 0.8, 0.375)) # Disabled ), - CCSpeedChat: ( + CCSpeedChat: ( # Green (VBase4(0.0, 0.6, 0.2, 1.0), VBase4(0.8, 0.8, 0.8, 0.375)), # Normal (VBase4(0.0, 0.5, 0.0, 1.0), VBase4(0.5, 0.5, 0.5, 0.1875)), # Down (VBase4(0.0, 0.7, 0.2, 1.0), VBase4(1.0, 1.0, 1.0, 0.5625)), # Rollover (VBase4(0.0, 0.6, 0.2, 1.0), VBase4(0.8, 0.8, 0.8, 0.375)) # Disabled - ), - CCFreeChat: ( - (VBase4(0.3, 0.3, 0.7, 1.0), VBase4(0.8, 0.8, 0.8, 0.375)), # Normal - (VBase4(0.2, 0.2, 0.5, 1.0), VBase4(0.2, 0.2, 0.2, 0.1875)), # Down - (VBase4(0.5, 0.5, 1.0, 1.0), VBase4(1.0, 1.0, 1.0, 0.5625)), # Rollover - (VBase4(0.3, 0.3, 0.7, 1.0), VBase4(0.8, 0.8, 0.8, 0.375)) # Disabled ) } @@ -203,12 +191,6 @@ ChatColors = { (VBase4(0.0, 0.6, 0.6, 1.0), VBase4(1.0, 1.0, 1.0, 1.0)), # Rollover (VBase4(0.0, 0.0, 0.0, 1.0), VBase4(1.0, 1.0, 1.0, 1.0)) # Disabled ), - CCNoChat: ( - (VBase4(0.0, 0.0, 0.0, 1.0), VBase4(1.0, 1.0, 1.0, 1.0)), # Normal - (VBase4(1.0, 0.5, 0.5, 1.0), VBase4(1.0, 1.0, 1.0, 1.0)), # Click - (VBase4(0.0, 0.6, 0.6, 1.0), VBase4(1.0, 1.0, 1.0, 1.0)), # Rollover - (VBase4(0.0, 0.0, 0.0, 1.0), VBase4(1.0, 1.0, 1.0, 1.0)) # Disabled - ), CCNonPlayer: ( (VBase4(0.0, 0.0, 0.0, 1.0), VBase4(1.0, 1.0, 1.0, 1.0)), # Normal (VBase4(1.0, 0.5, 0.5, 1.0), VBase4(1.0, 1.0, 1.0, 1.0)), # Click @@ -244,11 +226,5 @@ ChatColors = { (VBase4(1.0, 0.5, 0.5, 1.0), VBase4(1.0, 1.0, 1.0, 1.0)), # Down (VBase4(0.0, 0.6, 0.6, 1.0), VBase4(1.0, 1.0, 1.0, 1.0)), # Rollover (VBase4(0.0, 0.0, 0.0, 1.0), VBase4(1.0, 1.0, 1.0, 1.0)) # Disabled - ), - CCFreeChat: ( - (VBase4(0.0, 0.0, 0.0, 1.0), VBase4(1.0, 1.0, 1.0, 1.0)), # Normal - (VBase4(1.0, 0.5, 0.5, 1.0), VBase4(1.0, 1.0, 1.0, 1.0)), # Down - (VBase4(0.0, 0.6, 0.6, 1.0), VBase4(1.0, 1.0, 1.0, 1.0)), # Rollover - (VBase4(0.0, 0.0, 0.0, 1.0), VBase4(1.0, 1.0, 1.0, 1.0)) # Disabled ) } diff --git a/toontown/shtiker/OptionsPage.py b/toontown/shtiker/OptionsPage.py index 359c9fdd..b63026a2 100755 --- a/toontown/shtiker/OptionsPage.py +++ b/toontown/shtiker/OptionsPage.py @@ -6,6 +6,7 @@ from pandac.PandaModules import * import DisplaySettingsDialog import ShtikerPage +from otp.avatar import Avatar from otp.speedchat import SCColorScheme from otp.speedchat import SCStaticTextTerminal from otp.speedchat import SpeedChat @@ -762,10 +763,32 @@ class ExtraOptionsTabPage(DirectFrame): self.settingsChanged = 1 self.__setCogLevelGuiButton() + def __doToggleSpeedchatPlus(self): + messenger.send('wakeup') + settings['speedchatPlus'] = not settings['speedchatPlus'] + Avatar.reconsiderAllUnderstandable() + self.settingsChanged = 1 + self.__setSpeedchatPlusButton() + def __setCogLevelGuiButton(self): self.cogLevel_label['text'] = TTLocalizer.CogLevelLabelOn if settings['cogLevel'] else TTLocalizer.CogLevelLabelOff self.cogLevel_toggleButton['text'] = TTLocalizer.OptionsPageToggleOff if settings['cogLevel'] else TTLocalizer.OptionsPageToggleOn + def __setSpeedchatPlusButton(self): + self.speedchatPlus_label['text'] = TTLocalizer.SpeedchatPlusLabelOn if settings['speedchatPlus'] else TTLocalizer.SpeedchatPlusLabelOff + self.speedchatPlus_toggleButton['text'] = TTLocalizer.OptionsPageToggleOff if settings['speedchatPlus'] else TTLocalizer.OptionsPageToggleOn + + def __doToggleTrueFriends(self): + messenger.send('wakeup') + settings['trueFriends'] = not settings['trueFriends'] + Avatar.reconsiderAllUnderstandable() + self.settingsChanged = 1 + self.__setTrueFriendsButton() + + def __setTrueFriendsButton(self): + self.trueFriends_label['text'] = TTLocalizer.TrueFriendsLabelOn if settings['trueFriends'] else TTLocalizer.TrueFriendsLabelOff + self.trueFriends_toggleButton['text'] = TTLocalizer.OptionsPageToggleOff if settings['trueFriends'] else TTLocalizer.OptionsPageToggleOn + def showReportNotice(self): self.dialog = TTDialog.TTDialog(style=TTDialog.YesNo, text=TTLocalizer.BugReportNotice, command=self.confirmBugReport) self.dialog.show() diff --git a/toontown/town/TownBattleSOSPanel.py b/toontown/town/TownBattleSOSPanel.py index 91c3094e..6ea76e17 100755 --- a/toontown/town/TownBattleSOSPanel.py +++ b/toontown/town/TownBattleSOSPanel.py @@ -204,7 +204,7 @@ class TownBattleSOSPanel(DirectFrame, StateData.StateData): else: self.title['text'] = TTLocalizer.TownBattleSOSWhichFriend - def __friendOnline(self, doId, commonChatFlags, whitelistChatFlags): + def __friendOnline(self, doId): self.__updateScrollList() self.__updateTitleText()