diff --git a/astron/config/astrond.yml b/astron/config/astrond.yml index 3af6939..2835b30 100644 --- a/astron/config/astrond.yml +++ b/astron/config/astrond.yml @@ -27,6 +27,10 @@ uberdogs: id: 4687 anonymous: false + - class: ToontownFriendsManager + id: 4707 + anonymous: false + - class: TTSpeedchatRelay id: 4712 anonymous: false diff --git a/etc/toon.dc b/etc/toon.dc index 6c9936d..62b6c26 100755 --- a/etc/toon.dc +++ b/etc/toon.dc @@ -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 { }; diff --git a/otp/distributed/OtpDoGlobals.py b/otp/distributed/OtpDoGlobals.py index c456edf..1a46f23 100644 --- a/otp/distributed/OtpDoGlobals.py +++ b/otp/distributed/OtpDoGlobals.py @@ -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 diff --git a/otp/friends/FriendManagerAI.py b/otp/friends/FriendManagerAI.py index fe4f2ba..ce62963 100644 --- a/otp/friends/FriendManagerAI.py +++ b/otp/friends/FriendManagerAI.py @@ -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): diff --git a/toontown/ai/ToontownAIRepository.py b/toontown/ai/ToontownAIRepository.py index ae74e88..dba02dc 100644 --- a/toontown/ai/ToontownAIRepository.py +++ b/toontown/ai/ToontownAIRepository.py @@ -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: diff --git a/toontown/distributed/ToontownClientRepository.py b/toontown/distributed/ToontownClientRepository.py index e17f146..5d99de3 100644 --- a/toontown/distributed/ToontownClientRepository.py +++ b/toontown/distributed/ToontownClientRepository.py @@ -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): diff --git a/toontown/friends/ToontownFriendsManager.py b/toontown/friends/ToontownFriendsManager.py new file mode 100644 index 0000000..874a648 --- /dev/null +++ b/toontown/friends/ToontownFriendsManager.py @@ -0,0 +1,6 @@ +from direct.directnotify import DirectNotifyGlobal +from direct.distributed.DistributedObjectGlobal import DistributedObjectGlobal + + +class ToontownFriendsManager(DistributedObjectGlobal): + notify = DirectNotifyGlobal.directNotify.newCategory('ToontownFriendsManager') diff --git a/toontown/friends/ToontownFriendsManagerAI.py b/toontown/friends/ToontownFriendsManagerAI.py new file mode 100644 index 0000000..07fcae0 --- /dev/null +++ b/toontown/friends/ToontownFriendsManagerAI.py @@ -0,0 +1,6 @@ +from direct.directnotify import DirectNotifyGlobal +from direct.distributed.DistributedObjectGlobalAI import DistributedObjectGlobalAI + + +class ToontownFriendsManagerAI(DistributedObjectGlobalAI): + notify = DirectNotifyGlobal.directNotify.newCategory('ToontownFriendsManagerAI') diff --git a/toontown/friends/ToontownFriendsManagerUD.py b/toontown/friends/ToontownFriendsManagerUD.py new file mode 100644 index 0000000..e42b6b2 --- /dev/null +++ b/toontown/friends/ToontownFriendsManagerUD.py @@ -0,0 +1,6 @@ +from direct.directnotify import DirectNotifyGlobal +from direct.distributed.DistributedObjectGlobalUD import DistributedObjectGlobalUD + + +class ToontownFriendsManagerUD(DistributedObjectGlobalUD): + notify = DirectNotifyGlobal.directNotify.newCategory('ToontownFriendsManagerUD') diff --git a/toontown/uberdog/ToontownUDRepository.py b/toontown/uberdog/ToontownUDRepository.py index 9ee9b85..b07dca5 100644 --- a/toontown/uberdog/ToontownUDRepository.py +++ b/toontown/uberdog/ToontownUDRepository.py @@ -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')