mirror of
https://github.com/Sneed-Group/Poodletooth-iLand
synced 2025-01-09 17:53:50 +00:00
These are useless
This commit is contained in:
parent
338d83a907
commit
8352d31504
2 changed files with 1 additions and 27 deletions
|
@ -15,7 +15,6 @@ from toontown.chat.ChatGlobals import *
|
||||||
from toontown.chat.WhisperPopup import WhisperPopup
|
from toontown.chat.WhisperPopup import WhisperPopup
|
||||||
|
|
||||||
class DistributedPlayer(DistributedAvatar.DistributedAvatar, PlayerBase.PlayerBase, TelemetryLimited):
|
class DistributedPlayer(DistributedAvatar.DistributedAvatar, PlayerBase.PlayerBase, TelemetryLimited):
|
||||||
TeleportFailureTimeout = 60.0
|
|
||||||
chatGarbler = ChatGarbler.ChatGarbler({'default': OTPLocalizer.ChatGarblerDefault})
|
chatGarbler = ChatGarbler.ChatGarbler({'default': OTPLocalizer.ChatGarblerDefault})
|
||||||
|
|
||||||
def __init__(self, cr):
|
def __init__(self, cr):
|
||||||
|
@ -30,9 +29,6 @@ class DistributedPlayer(DistributedAvatar.DistributedAvatar, PlayerBase.PlayerBa
|
||||||
self.inventory = None
|
self.inventory = None
|
||||||
self.experience = None
|
self.experience = None
|
||||||
self.friendsList = []
|
self.friendsList = []
|
||||||
self.oldFriendsList = None
|
|
||||||
self.timeFriendsListChanged = None
|
|
||||||
self.lastFailedTeleportMessage = {}
|
|
||||||
self._districtWeAreGeneratedOn = None
|
self._districtWeAreGeneratedOn = None
|
||||||
self.DISLid = 0
|
self.DISLid = 0
|
||||||
self.adminAccess = 0
|
self.adminAccess = 0
|
||||||
|
@ -271,21 +267,9 @@ class DistributedPlayer(DistributedAvatar.DistributedAvatar, PlayerBase.PlayerBa
|
||||||
self.setSystemMessage(requesterId, OTPLocalizer.WhisperComingToVisit % avatar.getName())
|
self.setSystemMessage(requesterId, OTPLocalizer.WhisperComingToVisit % avatar.getName())
|
||||||
messenger.send('teleportQuery', [avatar, self])
|
messenger.send('teleportQuery', [avatar, self])
|
||||||
else:
|
else:
|
||||||
if self.failedTeleportMessageOk(requesterId):
|
|
||||||
self.setSystemMessage(requesterId, OTPLocalizer.WhisperFailedVisit % avatar.getName())
|
self.setSystemMessage(requesterId, OTPLocalizer.WhisperFailedVisit % avatar.getName())
|
||||||
|
|
||||||
self.d_teleportResponse(self.doId, 0, 0, 0, 0, sendToId=requesterId)
|
self.d_teleportResponse(self.doId, 0, 0, 0, 0, sendToId=requesterId)
|
||||||
|
|
||||||
def failedTeleportMessageOk(self, fromId):
|
|
||||||
now = globalClock.getFrameTime()
|
|
||||||
lastTime = self.lastFailedTeleportMessage.get(fromId, None)
|
|
||||||
if lastTime != None:
|
|
||||||
elapsed = now - lastTime
|
|
||||||
if elapsed < self.TeleportFailureTimeout:
|
|
||||||
return 0
|
|
||||||
self.lastFailedTeleportMessage[fromId] = now
|
|
||||||
return 1
|
|
||||||
|
|
||||||
def d_teleportResponse(self, avId, available, shardId, hoodId, zoneId, sendToId):
|
def d_teleportResponse(self, avId, available, shardId, hoodId, zoneId, sendToId):
|
||||||
teleportNotify.debug('sending teleportResponse%s' % ((avId, available,
|
teleportNotify.debug('sending teleportResponse%s' % ((avId, available,
|
||||||
shardId, hoodId, zoneId, sendToId),)
|
shardId, hoodId, zoneId, sendToId),)
|
||||||
|
@ -347,9 +331,7 @@ class DistributedPlayer(DistributedAvatar.DistributedAvatar, PlayerBase.PlayerBa
|
||||||
return self.friendsList
|
return self.friendsList
|
||||||
|
|
||||||
def setFriendsList(self, friendsList):
|
def setFriendsList(self, friendsList):
|
||||||
self.oldFriendsList = self.friendsList
|
|
||||||
self.friendsList = friendsList
|
self.friendsList = friendsList
|
||||||
self.timeFriendsListChanged = globalClock.getFrameTime()
|
|
||||||
messenger.send('friendsListChanged')
|
messenger.send('friendsListChanged')
|
||||||
Avatar.reconsiderAllUnderstandable()
|
Avatar.reconsiderAllUnderstandable()
|
||||||
|
|
||||||
|
|
|
@ -1128,21 +1128,13 @@ class LocalAvatar(DistributedAvatar.DistributedAvatar, DistributedSmoothNode.Dis
|
||||||
|
|
||||||
def __friendOnline(self, doId):
|
def __friendOnline(self, doId):
|
||||||
friend = base.cr.identifyFriend(doId)
|
friend = base.cr.identifyFriend(doId)
|
||||||
if self.oldFriendsList != None:
|
|
||||||
now = globalClock.getFrameTime()
|
|
||||||
elapsed = now - self.timeFriendsListChanged
|
|
||||||
if elapsed < 10.0 and self.oldFriendsList.count(doId) == 0:
|
|
||||||
self.oldFriendsList.append(doId)
|
|
||||||
return
|
|
||||||
if friend != None:
|
if friend != None:
|
||||||
self.setSystemMessage(doId, OTPLocalizer.WhisperFriendComingOnline % friend.getName())
|
self.setSystemMessage(doId, OTPLocalizer.WhisperFriendComingOnline % friend.getName())
|
||||||
return
|
|
||||||
|
|
||||||
def __friendOffline(self, doId):
|
def __friendOffline(self, doId):
|
||||||
friend = base.cr.identifyFriend(doId)
|
friend = base.cr.identifyFriend(doId)
|
||||||
if friend != None:
|
if friend != None:
|
||||||
self.setSystemMessage(0, OTPLocalizer.WhisperFriendLoggedOut % friend.getName())
|
self.setSystemMessage(0, OTPLocalizer.WhisperFriendLoggedOut % friend.getName())
|
||||||
return
|
|
||||||
|
|
||||||
def clickedWhisper(self, doId):
|
def clickedWhisper(self, doId):
|
||||||
friend = base.cr.identifyFriend(doId)
|
friend = base.cr.identifyFriend(doId)
|
||||||
|
|
Loading…
Reference in a new issue