friends: Create a ToontownFriendsManager
This commit is contained in:
parent
5c9adca456
commit
039a33d7e0
|
|
@ -27,6 +27,10 @@ uberdogs:
|
|||
id: 4687
|
||||
anonymous: false
|
||||
|
||||
- class: ToontownFriendsManager
|
||||
id: 4707
|
||||
anonymous: false
|
||||
|
||||
- class: TTSpeedchatRelay
|
||||
id: 4712
|
||||
anonymous: false
|
||||
|
|
|
|||
|
|
@ -256,6 +256,7 @@ from toontown.parties import DistributedPartyJukebox40Activity/AI
|
|||
from toontown.parties import DistributedPartyValentineJukeboxActivity/AI
|
||||
from toontown.parties import DistributedPartyValentineJukebox40Activity/AI
|
||||
from toontown.friends import TTPlayerFriendsManager/UD
|
||||
from toontown.friends import ToontownFriendsManager/AI/UD
|
||||
from toontown.uberdog import TTSpeedchatRelay/UD
|
||||
from toontown.safezone import DistributedGolfKart/AI
|
||||
from toontown.safezone import DistributedPicnicBasket/AI
|
||||
|
|
@ -2845,6 +2846,9 @@ dclass TTAvatarFriendsManager : AvatarFriendsManager {
|
|||
dclass TTPlayerFriendsManager : PlayerFriendsManager {
|
||||
};
|
||||
|
||||
dclass ToontownFriendsManager : DistributedObject {
|
||||
};
|
||||
|
||||
dclass TTSpeedchatRelay : SpeedchatRelay {
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -55,6 +55,7 @@ OTP_DO_ID_PIRATES_CODE_REDEMPTION = 4703
|
|||
OTP_DO_ID_PIRATES_SETTINGS_MANAGER = 4704
|
||||
OTP_DO_ID_PIRATES_HOLIDAY_MANAGER = 4705
|
||||
OTP_DO_ID_PIRATES_CREW_MATCH_MANAGER = 4706
|
||||
OTP_DO_ID_TOONTOWN_FRIENDS_MANAGER = 4707
|
||||
OTP_DO_ID_PIRATES_AVATAR_ACCESSORIES_MANAGER = 4710
|
||||
OTP_DO_ID_TOONTOWN_CPU_INFO_MANAGER = 4713
|
||||
OTP_DO_ID_TOONTOWN_SECURITY_MANAGER = 4714
|
||||
|
|
|
|||
|
|
@ -166,6 +166,17 @@ class FriendManagerAI(DistributedObjectGlobalAI):
|
|||
self.sendUpdateToAvatarId(recipient, "inviteeCancelFriendQuery", [context])
|
||||
self.notify.debug("AI: inviteeCancelFriendQuery(%d)" % (context))
|
||||
|
||||
### Messages involving secrets
|
||||
|
||||
def requestSecret(self):
|
||||
"""requestSecret(self)
|
||||
|
||||
Sent by the client to the AI to request a new "secret" for the
|
||||
user.
|
||||
"""
|
||||
# TODO
|
||||
self.notify.info('TODO: requestSecret')
|
||||
|
||||
### Messages sent from AI to inviter client
|
||||
|
||||
def down_friendConsidering(self, recipient, yesNoAlready, context):
|
||||
|
|
|
|||
|
|
@ -87,6 +87,7 @@ class ToontownAIRepository(ToontownInternalRepository):
|
|||
self.safeZoneManager = None
|
||||
self.magicWordManager = None
|
||||
self.friendManager = None
|
||||
self.toontownFriendsManager = None
|
||||
self.zoneTable = {}
|
||||
self.dnaStoreMap = {}
|
||||
self.dnaDataMap = {}
|
||||
|
|
@ -212,6 +213,11 @@ class ToontownAIRepository(ToontownInternalRepository):
|
|||
# Generate our friend manager...
|
||||
self.friendManager = self.generateGlobalObject(OTP_DO_ID_FRIEND_MANAGER, 'FriendManager')
|
||||
|
||||
if __astron__:
|
||||
# Create our Toontown friends manager...
|
||||
# TODO: Is this Astron specific?
|
||||
self.toontownFriendsManager = self.generateGlobalObject(OTP_DO_ID_TOONTOWN_FRIENDS_MANAGER, 'ToontownFriendsManager')
|
||||
|
||||
def generateHood(self, hoodConstructor, zoneId):
|
||||
# Bossbot HQ doesn't use DNA, so we skip over that.
|
||||
if zoneId != ToontownGlobals.BossbotHQ:
|
||||
|
|
|
|||
|
|
@ -98,6 +98,7 @@ class ToontownClientRepository(OTPClientRepository.OTPClientRepository):
|
|||
self.toontownTimeManager = ToontownTimeManager.ToontownTimeManager()
|
||||
self.avatarFriendsManager = self.generateGlobalObject(OtpDoGlobals.OTP_DO_ID_AVATAR_FRIENDS_MANAGER, 'AvatarFriendsManager')
|
||||
self.playerFriendsManager = self.generateGlobalObject(OtpDoGlobals.OTP_DO_ID_PLAYER_FRIENDS_MANAGER, 'TTPlayerFriendsManager')
|
||||
self.toontownFriendsManager = self.generateGlobalObject(OtpDoGlobals.OTP_DO_ID_TOONTOWN_FRIENDS_MANAGER, 'ToontownFriendsManager')
|
||||
self.speedchatRelay = self.generateGlobalObject(OtpDoGlobals.OTP_DO_ID_TOONTOWN_SPEEDCHAT_RELAY, 'TTSpeedchatRelay')
|
||||
self.deliveryManager = self.generateGlobalObject(OtpDoGlobals.OTP_DO_ID_TOONTOWN_DELIVERY_MANAGER, 'DistributedDeliveryManager')
|
||||
if config.GetBool('want-code-redemption', 1):
|
||||
|
|
|
|||
|
|
@ -0,0 +1,6 @@
|
|||
from direct.directnotify import DirectNotifyGlobal
|
||||
from direct.distributed.DistributedObjectGlobal import DistributedObjectGlobal
|
||||
|
||||
|
||||
class ToontownFriendsManager(DistributedObjectGlobal):
|
||||
notify = DirectNotifyGlobal.directNotify.newCategory('ToontownFriendsManager')
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
from direct.directnotify import DirectNotifyGlobal
|
||||
from direct.distributed.DistributedObjectGlobalAI import DistributedObjectGlobalAI
|
||||
|
||||
|
||||
class ToontownFriendsManagerAI(DistributedObjectGlobalAI):
|
||||
notify = DirectNotifyGlobal.directNotify.newCategory('ToontownFriendsManagerAI')
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
from direct.directnotify import DirectNotifyGlobal
|
||||
from direct.distributed.DistributedObjectGlobalUD import DistributedObjectGlobalUD
|
||||
|
||||
|
||||
class ToontownFriendsManagerUD(DistributedObjectGlobalUD):
|
||||
notify = DirectNotifyGlobal.directNotify.newCategory('ToontownFriendsManagerUD')
|
||||
|
|
@ -17,6 +17,7 @@ class ToontownUDRepository(ToontownInternalRepository):
|
|||
ToontownInternalRepository.__init__(self, baseChannel, serverId, dcSuffix='UD')
|
||||
self.toontownTimeManager = None
|
||||
self.astronLoginManager = None
|
||||
self.toontownFriendsManager = None
|
||||
|
||||
def handleConnected(self):
|
||||
ToontownInternalRepository.handleConnected(self)
|
||||
|
|
@ -45,3 +46,7 @@ class ToontownUDRepository(ToontownInternalRepository):
|
|||
if __astron__:
|
||||
# Create our Astron login manager...
|
||||
self.astronLoginManager = self.generateGlobalObject(OTP_DO_ID_ASTRON_LOGIN_MANAGER, 'AstronLoginManager')
|
||||
|
||||
# Create our Toontown friends manager...
|
||||
# TODO: Is this Astron specific?
|
||||
self.toontownFriendsManager = self.generateGlobalObject(OTP_DO_ID_TOONTOWN_FRIENDS_MANAGER, 'ToontownFriendsManager')
|
||||
|
|
|
|||
Loading…
Reference in New Issue