From ba8605b93fb2c4bc1ff1e0f0f0bce07e2516afcf Mon Sep 17 00:00:00 2001 From: Open Toontown <57279094+opentoontown@users.noreply.github.com> Date: Mon, 3 Jan 2022 20:18:17 -0500 Subject: [PATCH 01/49] Some minor changes to further support the OTP protocol --- otp/distributed/OTPClientRepository.py | 2 +- otp/login/LoginTTAccount.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/otp/distributed/OTPClientRepository.py b/otp/distributed/OTPClientRepository.py index 047600a..51daf21 100644 --- a/otp/distributed/OTPClientRepository.py +++ b/otp/distributed/OTPClientRepository.py @@ -961,7 +961,7 @@ class OTPClientRepository(ClientRepositoryBase): avNames[1] = di.getString() avNames[2] = di.getString() avNames[3] = di.getString() - avDNA = di.getString() + avDNA = di.getBlob() avPosition = di.getUint8() aname = di.getUint8() potAv = PotentialAvatar(avNum, avNames, avDNA, avPosition, aname) diff --git a/otp/login/LoginTTAccount.py b/otp/login/LoginTTAccount.py index 2961428..b3883c4 100644 --- a/otp/login/LoginTTAccount.py +++ b/otp/login/LoginTTAccount.py @@ -24,7 +24,7 @@ class LoginTTAccount(LoginBase.LoginBase): datagram.addString(cr.serverVersion) datagram.addUint32(cr.hashVal) self.__addTokenType(datagram) - datagram.addString(cr.wantMagicWords) + datagram.addString('YES' if cr.wantMagicWords else 'NO') else: datagram.addUint16(CLIENT_LOGIN_2) self.__addPlayToken(datagram) From 77ac98ad22dd127505440addbacc0be4f2119cb6 Mon Sep 17 00:00:00 2001 From: Rocket Programmer Date: Fri, 14 Jan 2022 14:53:41 -0800 Subject: [PATCH 02/49] otp-distributed: Python 3 fix --- toontown/distributed/ToontownClientRepository.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toontown/distributed/ToontownClientRepository.py b/toontown/distributed/ToontownClientRepository.py index 21a80ed..c614745 100644 --- a/toontown/distributed/ToontownClientRepository.py +++ b/toontown/distributed/ToontownClientRepository.py @@ -917,7 +917,7 @@ class ToontownClientRepository(OTPClientRepository.OTPClientRepository): for i in range(0, count): doId = di.getUint32() name = di.getString() - dnaString = di.getString() + dnaString = di.getBlob() dna = ToonDNA.ToonDNA() dna.makeFromNetString(dnaString) petId = di.getUint32() From e95ab10cef0cfa4a24c2023491ddf8226a33aab1 Mon Sep 17 00:00:00 2001 From: Open Toontown <57279094+opentoontown@users.noreply.github.com> Date: Sun, 16 Jan 2022 15:40:08 -0500 Subject: [PATCH 03/49] otp-distributed: Python 3 fix --- otp/distributed/OTPClientRepository.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/otp/distributed/OTPClientRepository.py b/otp/distributed/OTPClientRepository.py index 51daf21..1fa6f0e 100644 --- a/otp/distributed/OTPClientRepository.py +++ b/otp/distributed/OTPClientRepository.py @@ -1047,7 +1047,7 @@ class OTPClientRepository(ClientRepositoryBase): datagram = PyDatagram() datagram.addUint16(CLIENT_CREATE_AVATAR) datagram.addUint16(0) - datagram.addString(avDNA.makeNetString()) + datagram.addBlob(avDNA.makeNetString()) datagram.addUint8(avPosition) self.newName = avName self.newDNA = avDNA From d2aea84f8abf664db4d825c35bbef99a040f7c3c Mon Sep 17 00:00:00 2001 From: Open Toontown <57279094+opentoontown@users.noreply.github.com> Date: Sun, 16 Jan 2022 15:58:39 -0500 Subject: [PATCH 04/49] toon: Fix crash with DistributedNPCBlocker --- toontown/toon/DistributedNPCBlocker.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toontown/toon/DistributedNPCBlocker.py b/toontown/toon/DistributedNPCBlocker.py index 975985e..d866b3b 100644 --- a/toontown/toon/DistributedNPCBlocker.py +++ b/toontown/toon/DistributedNPCBlocker.py @@ -21,7 +21,7 @@ class DistributedNPCBlocker(DistributedNPCToonBase): def initToonState(self): self.setAnimState('neutral', 0.9, None, None) - posh = NPCToons.BlockerPositions[self.name] + posh = NPCToons.BlockerPositions[self._name] self.setPos(posh[0]) self.setH(posh[1]) return From 8f1f46cfae289d1a03047a204a5578524495218d Mon Sep 17 00:00:00 2001 From: Open Toontown <57279094+opentoontown@users.noreply.github.com> Date: Sun, 16 Jan 2022 17:15:31 -0500 Subject: [PATCH 05/49] toon: Fix camera lerp for DistributedNPCFisherman --- toontown/toon/DistributedNPCFisherman.py | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/toontown/toon/DistributedNPCFisherman.py b/toontown/toon/DistributedNPCFisherman.py index bd99fbf..c7bd8e9 100644 --- a/toontown/toon/DistributedNPCFisherman.py +++ b/toontown/toon/DistributedNPCFisherman.py @@ -16,12 +16,15 @@ class DistributedNPCFisherman(DistributedNPCToonBase): self.button = None self.popupInfo = None self.fishGui = None + self.lerpCameraSeq = None return def disable(self): self.ignoreAll() taskMgr.remove(self.uniqueName('popupFishGUI')) - taskMgr.remove(self.uniqueName('lerpCamera')) + if self.lerpCameraSeq: + self.lerpCameraSeq.finish() + self.lerpCameraSeq = None if self.popupInfo: self.popupInfo.destroy() self.popupInfo = None @@ -73,7 +76,9 @@ class DistributedNPCFisherman(DistributedNPCToonBase): def resetFisherman(self): self.ignoreAll() taskMgr.remove(self.uniqueName('popupFishGUI')) - taskMgr.remove(self.uniqueName('lerpCamera')) + if self.lerpCameraSeq: + self.lerpCameraSeq.finish() + self.lerpCameraSeq = None if self.fishGui: self.fishGui.destroy() self.fishGui = None @@ -93,7 +98,9 @@ class DistributedNPCFisherman(DistributedNPCToonBase): if mode == NPCToons.SELL_MOVIE_CLEAR: return if mode == NPCToons.SELL_MOVIE_TIMEOUT: - taskMgr.remove(self.uniqueName('lerpCamera')) + if self.lerpCameraSeq: + self.lerpCameraSeq.finish() + self.lerpCameraSeq = None if self.isLocalToon: self.ignore(self.fishGuiDoneEvent) if self.popupInfo: @@ -113,7 +120,10 @@ class DistributedNPCFisherman(DistributedNPCToonBase): self.setupAvatars(self.av) if self.isLocalToon: camera.wrtReparentTo(render) - camera.lerpPosHpr(-5, 9, base.localAvatar.getHeight() - 0.5, -150, -2, 0, 1, other=self, blendType='easeOut', task=self.uniqueName('lerpCamera')) + quat = Quat() + quat.setHpr((-150, -2, 0)) + self.lerpCameraSeq = camera.posQuatInterval(1, Point3(-5, 9, base.localAvatar.getHeight() - 0.5), quat, other=self, blendType='easeOut', name=self.uniqueName('lerpCamera')) + self.lerpCameraSeq.start() if self.isLocalToon: taskMgr.doMethodLater(1.0, self.popupFishGUI, self.uniqueName('popupFishGUI')) elif mode == NPCToons.SELL_MOVIE_COMPLETE: From 3666947d2b145752141f97d752711db655f3487d Mon Sep 17 00:00:00 2001 From: Open Toontown <57279094+opentoontown@users.noreply.github.com> Date: Sun, 16 Jan 2022 18:10:51 -0500 Subject: [PATCH 06/49] More fixes --- toontown/shtiker/SuitPage.py | 4 ++-- toontown/toon/DistributedNPCToon.py | 15 ++++++++++++--- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/toontown/shtiker/SuitPage.py b/toontown/shtiker/SuitPage.py index 64976a5..da9a3ae 100644 --- a/toontown/shtiker/SuitPage.py +++ b/toontown/shtiker/SuitPage.py @@ -468,9 +468,9 @@ class SuitPage(ShtikerPage.ShtikerPage): quota = str(COG_QUOTAS[1][index % SuitDNA.suitsPerDept]) panel.quotaLabel['text'] = TTLocalizer.SuitPageQuota % (count, quota) elif status == COG_COMPLETE1: - panel['image_color'] = PANEL_COLORS_COMPLETE1[index / SuitDNA.suitsPerDept] + panel['image_color'] = PANEL_COLORS_COMPLETE1[index // SuitDNA.suitsPerDept] elif status == COG_COMPLETE2: - panel['image_color'] = PANEL_COLORS_COMPLETE2[index / SuitDNA.suitsPerDept] + panel['image_color'] = PANEL_COLORS_COMPLETE2[index // SuitDNA.suitsPerDept] def updateAllCogs(self, status): for index in range(0, len(base.localAvatar.cogs)): diff --git a/toontown/toon/DistributedNPCToon.py b/toontown/toon/DistributedNPCToon.py index 89fb23d..23c7220 100644 --- a/toontown/toon/DistributedNPCToon.py +++ b/toontown/toon/DistributedNPCToon.py @@ -15,6 +15,7 @@ class DistributedNPCToon(DistributedNPCToonBase): self.curQuestMovie = None self.questChoiceGui = None self.trackChoiceGui = None + self.lerpCameraSeq = None return def delayDelete(self): @@ -86,7 +87,9 @@ class DistributedNPCToon(DistributedNPCToonBase): self.detectAvatars() self.initPos() if isLocalToon: - taskMgr.remove(self.uniqueName('lerpCamera')) + if self.lerpCameraSeq: + self.lerpCameraSeq.finish() + self.lerpCameraSeq = None base.localAvatar.posCamera(0, 0) base.cr.playGame.getPlace().setState('walk') self.sendUpdate('setMovieDone', []) @@ -96,9 +99,15 @@ class DistributedNPCToon(DistributedNPCToonBase): def setupCamera(self, mode): camera.wrtReparentTo(render) if mode == NPCToons.QUEST_MOVIE_QUEST_CHOICE or mode == NPCToons.QUEST_MOVIE_TRACK_CHOICE: - camera.lerpPosHpr(5, 9, self.getHeight() - 0.5, 155, -2, 0, 1, other=self, blendType='easeOut', task=self.uniqueName('lerpCamera')) + quat = Quat() + quat.setHpr((155, -2, 0)) + self.lerpCameraSeq = camera.posQuatInterval(1, Point3(5, 9, self.getHeight() - 0.5), quat, other=self, blendType='easeOut', name=self.uniqueName('lerpCamera')) + self.lerpCameraSeq.start() else: - camera.lerpPosHpr(-5, 9, self.getHeight() - 0.5, -150, -2, 0, 1, other=self, blendType='easeOut', task=self.uniqueName('lerpCamera')) + quat = Quat() + quat.setHpr((-150, -2, 0)) + self.lerpCameraSeq = camera.posQuatInterval(1, Point3(-5, 9, self.getHeight() - 0.5), quat, other=self, blendType='easeOut', name=self.uniqueName('lerpCamera')) + self.lerpCameraSeq.start() def setMovie(self, mode, npcId, avId, quests, timestamp): timeStamp = ClockDelta.globalClockDelta.localElapsedTime(timestamp) From 635ea1d3d14967540417cb245137a500f0ad8a29 Mon Sep 17 00:00:00 2001 From: Open Toontown <57279094+opentoontown@users.noreply.github.com> Date: Sun, 16 Jan 2022 22:11:15 -0500 Subject: [PATCH 07/49] Fix more camera lerps --- toontown/estate/DistributedPhone.py | 10 ++++++++-- toontown/toon/LocalToon.py | 12 +++++++++--- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/toontown/estate/DistributedPhone.py b/toontown/estate/DistributedPhone.py index cf93dfd..c4782ca 100644 --- a/toontown/estate/DistributedPhone.py +++ b/toontown/estate/DistributedPhone.py @@ -44,6 +44,7 @@ class DistributedPhone(DistributedFurnitureItem.DistributedFurnitureItem): self.intervalAvatar = None self.phoneInUse = 0 self.origToonHpr = None + self.lerpCameraSeq = None return def announceGenerate(self): @@ -116,7 +117,10 @@ class DistributedPhone(DistributedFurnitureItem.DistributedFurnitureItem): def setupCamera(self, mode): camera.wrtReparentTo(render) if mode == PhoneGlobals.PHONE_MOVIE_PICKUP: - camera.lerpPosHpr(4, -4, base.localAvatar.getHeight() - 0.5, 35, -8, 0, 1, other=base.localAvatar, blendType='easeOut', task=self.uniqueName('lerpCamera')) + quat = Quat() + quat.setHpr((35, -8, 0)) + self.lerpCameraSeq = camera.posQuatInterval(1, Point3(4, -4, base.localAvatar.getHeight() - 0.5), quat, other=base.localAvatar, blendType='easeOut', name=self.uniqueName('lerpCamera')) + self.lerpCameraSeq.start() def setupCord(self): if self.cord: @@ -190,7 +194,9 @@ class DistributedPhone(DistributedFurnitureItem.DistributedFurnitureItem): def freeAvatar(self): if self.hasLocalAvatar: base.localAvatar.speed = 0 - taskMgr.remove(self.uniqueName('lerpCamera')) + if self.lerpCameraSeq: + self.lerpCameraSeq.finish() + self.lerpCameraSeq = None base.localAvatar.posCamera(0, 0) if base.cr.playGame.place != None: base.cr.playGame.getPlace().setState('walk') diff --git a/toontown/toon/LocalToon.py b/toontown/toon/LocalToon.py index 8a52725..5700367 100644 --- a/toontown/toon/LocalToon.py +++ b/toontown/toon/LocalToon.py @@ -167,6 +167,7 @@ class LocalToon(DistributedToon.DistributedToon, LocalAvatar.LocalAvatar): self.physControls.event.addAgainPattern('again%in') self.oldPos = None self.questMap = None + self.lerpFurnitureButton = None def wantLegacyLifter(self): return True @@ -293,7 +294,9 @@ class LocalToon(DistributedToon.DistributedToon, LocalAvatar.LocalAvatar): self.__piePowerMeter.destroy() self.__piePowerMeter = None taskMgr.remove('unlockGardenButtons') - taskMgr.remove('lerpFurnitureButton') + if self.lerpFurnitureButton: + self.lerpFurnitureButton.finish() + self.lerpFurnitureButton = None if self.__furnitureGui: self.__furnitureGui.destroy() del self.__furnitureGui @@ -1179,8 +1182,11 @@ class LocalToon(DistributedToon.DistributedToon, LocalAvatar.LocalAvatar): self.__furnitureGui.setScale(0.06) elif self.cr.furnitureManager != None: self.showFurnitureGui() - taskMgr.remove('lerpFurnitureButton') - self.__furnitureGui.lerpPosHprScale(pos=Point3(-1.19, 0.0, 0.33), hpr=Vec3(0.0, 0.0, 0.0), scale=Vec3(0.04, 0.04, 0.04), time=1.0, blendType='easeInOut', task='lerpFurnitureButton') + if self.lerpFurnitureButton: + self.lerpFurnitureButton.finish() + self.lerpFurnitureButton = None + self.lerpFurnitureButton = self.__furnitureGui.posHprScaleInterval(pos=Point3(-1.19, 0.0, 0.33), hpr=Vec3(0.0, 0.0, 0.0), scale=Vec3(0.04, 0.04, 0.04), duration=1.0, blendType='easeInOut', name='lerpFurnitureButton') + self.lerpFurnitureButton.start() if hasattr(self, 'inEstate') and self.inEstate: self.loadGardeningGui() self.hideGardeningGui() From a2e37e3389e165831364b1807475c61575921cdb Mon Sep 17 00:00:00 2001 From: Open Toontown <57279094+opentoontown@users.noreply.github.com> Date: Sun, 16 Jan 2022 22:47:39 -0500 Subject: [PATCH 08/49] more python3 compat --- toontown/catalog/CatalogItemList.py | 42 +++++++++------------ toontown/estate/DistributedHouseInterior.py | 2 +- 2 files changed, 18 insertions(+), 26 deletions(-) diff --git a/toontown/catalog/CatalogItemList.py b/toontown/catalog/CatalogItemList.py index ec0ed5e..6a946d4 100644 --- a/toontown/catalog/CatalogItemList.py +++ b/toontown/catalog/CatalogItemList.py @@ -2,6 +2,7 @@ from . import CatalogItem from pandac.PandaModules import * from direct.distributed.PyDatagram import PyDatagram from direct.distributed.PyDatagramIterator import PyDatagramIterator +import functools class CatalogItemList: @@ -9,7 +10,7 @@ class CatalogItemList: self.store = store self.__blob = None self.__list = None - if isinstance(source, str): + if isinstance(source, bytes): self.__blob = source elif isinstance(source, list): self.__list = source[:] @@ -156,7 +157,7 @@ class CatalogItemList: if cmpfunc == None: self.__list.sort() else: - self.__list.sort(cmpfunc) + self.__list.sort(key=functools.cmp_to_key(cmpfunc)) self.__blob = None return @@ -166,6 +167,10 @@ class CatalogItemList: return len(self.__list) def __getitem__(self, index): + if isinstance(index, slice): + if self.__list == None: + self.__decodeList() + return CatalogItemList(self.__list[index.start:index.stop], store=self.store) if self.__list == None: self.__decodeList() return self.__list[index] @@ -173,36 +178,23 @@ class CatalogItemList: def __setitem__(self, index, item): if self.__list == None: self.__decodeList() - self.__list[index] = item + if isinstance(index, slice): + if isinstance(item, CatalogItemList): + self.__list[index.start:index.stop] = item.__list + else: + self.__list[index.start:index.stop] = item + else: + self.__list[index] = item self.__blob = None return def __delitem__(self, index): if self.__list == None: self.__decodeList() - del self.__list[index] - self.__blob = None - return - - def __getslice__(self, i, j): - if self.__list == None: - self.__decodeList() - return CatalogItemList(self.__list[i:j], store=self.store) - - def __setslice__(self, i, j, s): - if self.__list == None: - self.__decodeList() - if isinstance(s, CatalogItemList): - self.__list[i:j] = s.__list + if isinstance(index, slice): + del self.__list[index.start:index.stop] else: - self.__list[i:j] = s - self.__blob = None - return - - def __delslice__(self, i, j): - if self.__list == None: - self.__decodeList() - del self.__list[i:j] + del self.__list[index] self.__blob = None return diff --git a/toontown/estate/DistributedHouseInterior.py b/toontown/estate/DistributedHouseInterior.py index bab99dc..acb9c3c 100644 --- a/toontown/estate/DistributedHouseInterior.py +++ b/toontown/estate/DistributedHouseInterior.py @@ -99,7 +99,7 @@ class DistributedHouseInterior(DistributedObject.DistributedObject): return numSurfaceTypes = CatalogSurfaceItem.NUM_ST_TYPES - numRooms = min(len(self.wallpaper) / numSurfaceTypes, len(RoomNames)) + numRooms = min(len(self.wallpaper) // numSurfaceTypes, len(RoomNames)) for room in range(numRooms): roomName = RoomNames[room] roomNode = self.interior.find(roomName) From edff78dbeff88753de945e3f962e449e86ef89ac Mon Sep 17 00:00:00 2001 From: Open Toontown <57279094+opentoontown@users.noreply.github.com> Date: Sun, 16 Jan 2022 22:55:33 -0500 Subject: [PATCH 09/49] cleanup --- toontown/catalog/CatalogItemList.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/toontown/catalog/CatalogItemList.py b/toontown/catalog/CatalogItemList.py index 6a946d4..3f809e8 100644 --- a/toontown/catalog/CatalogItemList.py +++ b/toontown/catalog/CatalogItemList.py @@ -167,12 +167,10 @@ class CatalogItemList: return len(self.__list) def __getitem__(self, index): - if isinstance(index, slice): - if self.__list == None: - self.__decodeList() - return CatalogItemList(self.__list[index.start:index.stop], store=self.store) if self.__list == None: self.__decodeList() + if isinstance(index, slice): + return CatalogItemList(self.__list[index.start:index.stop], store=self.store) return self.__list[index] def __setitem__(self, index, item): From c17cbffc4716e46aa51407bef5f4b7258cc55f31 Mon Sep 17 00:00:00 2001 From: Open Toontown <57279094+opentoontown@users.noreply.github.com> Date: Sun, 16 Jan 2022 23:17:43 -0500 Subject: [PATCH 10/49] more catalog fixes --- toontown/catalog/CatalogFurnitureItem.py | 24 ++++++++++++------------ toontown/catalog/CatalogScreen.py | 8 ++++---- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/toontown/catalog/CatalogFurnitureItem.py b/toontown/catalog/CatalogFurnitureItem.py index dd2f28a..8bebe19 100644 --- a/toontown/catalog/CatalogFurnitureItem.py +++ b/toontown/catalog/CatalogFurnitureItem.py @@ -1152,19 +1152,19 @@ def get50ItemCloset(avatar, duplicateItems): def getMaxClosets(): - list = [] + maxClosets = [] for closetId in MaxClosetIds: - list.append(CatalogFurnitureItem(closetId)) + maxClosets.append(CatalogFurnitureItem(closetId)) - return list + return maxClosets def getAllClosets(): - list = [] + allClosets = [] for closetId in list(ClosetToClothes.keys()): - list.append(CatalogFurnitureItem(closetId)) + allClosets.append(CatalogFurnitureItem(closetId)) - return list + return allClosets def get50ItemTrunk(avatar, duplicateItems): @@ -1180,17 +1180,17 @@ def get50ItemTrunk(avatar, duplicateItems): def getMaxTrunks(): - list = [] + maxTrunks = [] for trunkId in MaxTrunkIds: - list.append(CatalogFurnitureItem(trunkId)) + maxTrunks.append(CatalogFurnitureItem(trunkId)) - return list + return maxTrunks def getAllFurnitures(index): - list = [] + allFurnitures = [] colors = FurnitureTypes[index][FTColorOptions] for n in range(len(colors)): - list.append(CatalogFurnitureItem(index, n)) + allFurnitures.append(CatalogFurnitureItem(index, n)) - return list + return allFurnitures diff --git a/toontown/catalog/CatalogScreen.py b/toontown/catalog/CatalogScreen.py index 2f31d86..426e58e 100644 --- a/toontown/catalog/CatalogScreen.py +++ b/toontown/catalog/CatalogScreen.py @@ -646,17 +646,17 @@ class CatalogScreen(DirectFrame): self.setNumEmblemPages(numPages) currentWeek = base.localAvatar.catalogScheduleCurrentWeek - 1 if currentWeek < 57: - seriesNumber = currentWeek / ToontownGlobals.CatalogNumWeeksPerSeries + 1 + seriesNumber = currentWeek // ToontownGlobals.CatalogNumWeeksPerSeries + 1 weekNumber = currentWeek % ToontownGlobals.CatalogNumWeeksPerSeries + 1 elif currentWeek < 65: seriesNumber = 6 weekNumber = currentWeek - 56 else: - seriesNumber = currentWeek / ToontownGlobals.CatalogNumWeeksPerSeries + 2 + seriesNumber = currentWeek // ToontownGlobals.CatalogNumWeeksPerSeries + 2 weekNumber = currentWeek % ToontownGlobals.CatalogNumWeeksPerSeries + 1 geom = NodePath('cover') cover = guiItems.find('**/cover') - maxSeries = ToontownGlobals.CatalogNumWeeks / ToontownGlobals.CatalogNumWeeksPerSeries + 1 + maxSeries = ToontownGlobals.CatalogNumWeeks // ToontownGlobals.CatalogNumWeeksPerSeries + 1 coverSeries = (seriesNumber - 1) % maxSeries + 1 coverPicture = cover.find('**/cover_picture%s' % coverSeries) if not coverPicture.isEmpty(): @@ -786,7 +786,7 @@ class CatalogScreen(DirectFrame): self.setNumBackPages(numPages) numPages = self.packPages(self.loyaltyPanelList, self.loyaltyPageList, 'loyalty') self.setNumLoyaltyPages(numPages) - seriesNumber = (base.localAvatar.catalogScheduleCurrentWeek - 1) / ToontownGlobals.CatalogNumWeeksPerSeries + 1 + seriesNumber = (base.localAvatar.catalogScheduleCurrentWeek - 1) // ToontownGlobals.CatalogNumWeeksPerSeries + 1 self.catalogSeries['text'] = Localizer.CatalogSeriesLabel % seriesNumber weekNumber = (base.localAvatar.catalogScheduleCurrentWeek - 1) % ToontownGlobals.CatalogNumWeeksPerSeries + 1 self.catalogNumber['text'] = '#%d' % weekNumber From 949fc5e50e64eb40b4e40919626f42cb28b28305 Mon Sep 17 00:00:00 2001 From: Open Toontown <57279094+opentoontown@users.noreply.github.com> Date: Sun, 16 Jan 2022 23:30:45 -0500 Subject: [PATCH 11/49] __cmp__ is deprecated in python3 --- toontown/catalog/CatalogItem.py | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/toontown/catalog/CatalogItem.py b/toontown/catalog/CatalogItem.py index 44258d7..5f01a55 100644 --- a/toontown/catalog/CatalogItem.py +++ b/toontown/catalog/CatalogItem.py @@ -253,11 +253,23 @@ class CatalogItem: def getHashContents(self): return None - def __cmp__(self, other): - c = cmp(self.__class__, other.__class__) - if c != 0: - return c - return self.compareTo(other) + def __lt__(self, other): + c = self.__class__ == other.__class__ + if not c: + return 0 + return self.compareTo(other) < 0 + + def __gt__(self, other): + c = self.__class__ == other.__class__ + if not c: + return 0 + return self.compareTo(other) > 0 + + def __eq__(self, other): + c = self.__class__ == other.__class__ + if not c: + return 0 + return self.compareTo(other) == 0 def __hash__(self): return hash((self.__class__, self.getHashContents())) From c9495aa06d404146f97e82b322b77457850fc12a Mon Sep 17 00:00:00 2001 From: Open Toontown <57279094+opentoontown@users.noreply.github.com> Date: Mon, 17 Jan 2022 15:10:03 -0500 Subject: [PATCH 12/49] fix some estate crashes --- toontown/estate/FlowerBrowser.py | 6 +++--- toontown/estate/FlowerPanel.py | 4 ++-- toontown/estate/FlowerPicker.py | 6 +++--- toontown/estate/SpecialsPhoto.py | 13 ++++++++----- toontown/estate/houseDesign.py | 2 +- 5 files changed, 17 insertions(+), 14 deletions(-) diff --git a/toontown/estate/FlowerBrowser.py b/toontown/estate/FlowerBrowser.py index d594a85..edaf213 100644 --- a/toontown/estate/FlowerBrowser.py +++ b/toontown/estate/FlowerBrowser.py @@ -10,9 +10,9 @@ class FlowerBrowser(DirectScrolledList): notify = DirectNotifyGlobal.directNotify.newCategory('FlowerBrowser') def __init__(self, parent = aspect2d, **kw): - self.parent = parent + self._parent = parent gui = loader.loadModel('phase_3.5/models/gui/friendslist_gui') - optiondefs = (('parent', self.parent, None), + optiondefs = (('parent', self._parent, None), ('relief', None, None), ('incButton_image', (gui.find('**/FndsLst_ScrollUp'), gui.find('**/FndsLst_ScrollDN'), @@ -43,7 +43,7 @@ class FlowerBrowser(DirectScrolledList): def destroy(self): DirectScrolledList.destroy(self) - self.parent = None + self._parent = None return def update(self): diff --git a/toontown/estate/FlowerPanel.py b/toontown/estate/FlowerPanel.py index ab52810..30e978f 100644 --- a/toontown/estate/FlowerPanel.py +++ b/toontown/estate/FlowerPanel.py @@ -27,7 +27,7 @@ class FlowerPanel(DirectFrame): self.initialiseoptions(FlowerPanel) self.doneEvent = doneEvent self.flower = flower - self.parent = parent + self._parent = parent self.photo = None return @@ -37,7 +37,7 @@ class FlowerPanel(DirectFrame): self.photo = None self.flower = None DirectFrame.destroy(self) - self.parent = None + self._parent = None return def load(self): diff --git a/toontown/estate/FlowerPicker.py b/toontown/estate/FlowerPicker.py index dddb2b9..999433b 100644 --- a/toontown/estate/FlowerPicker.py +++ b/toontown/estate/FlowerPicker.py @@ -10,10 +10,10 @@ class FlowerPicker(DirectScrolledList): def __init__(self, parent = aspect2d, **kw): self.flowerList = [] - self.parent = parent + self._parent = parent self.shown = 0 gui = loader.loadModel('phase_3.5/models/gui/friendslist_gui') - optiondefs = (('parent', self.parent, None), + optiondefs = (('parent', self._parent, None), ('relief', None, None), ('incButton_image', (gui.find('**/FndsLst_ScrollUp'), gui.find('**/FndsLst_ScrollDN'), @@ -63,7 +63,7 @@ class FlowerPicker(DirectScrolledList): def destroy(self): DirectScrolledList.destroy(self) - self.parent = None + self._parent = None self.flowerList = [] self.flowerPanel = None return diff --git a/toontown/estate/SpecialsPhoto.py b/toontown/estate/SpecialsPhoto.py index 1180a03..01fd7a8 100644 --- a/toontown/estate/SpecialsPhoto.py +++ b/toontown/estate/SpecialsPhoto.py @@ -28,7 +28,7 @@ class DirectRegion(NodePath): pass def hide(self): - NodePath.NodePath.hide(self) + NodePath.hide(self) def load(self): if not hasattr(self, 'cRender'): @@ -127,9 +127,12 @@ class SpecialsPhoto(NodePath): rotate = pitch.attachNewNode('rotate') scale = rotate.attachNewNode('scale') actor.reparentTo(scale) - bMin, bMax = actor.getTightBounds() - center = (bMin + bMax) / 2.0 - actor.setPos(-center[0], -center[1], -center[2]) + if actor.getTightBounds(): + bMin, bMax = actor.getTightBounds() + center = (bMin + bMax) / 2.0 + actor.setPos(-center[0], -center[1], -center[2]) + else: + actor.setPos(0, 0, 0) pitch.setY(2.5) return frame @@ -193,7 +196,7 @@ class SpecialsPhoto(NodePath): self.background.reparentTo(self.specialsFrame) def hide(self): - NodePath.NodePath.hide(self) + NodePath.hide(self) if hasattr(self, 'specialsDisplayRegion'): self.specialsDisplayRegion.unload() if hasattr(self, 'background'): diff --git a/toontown/estate/houseDesign.py b/toontown/estate/houseDesign.py index e8c5e08..f20801b 100644 --- a/toontown/estate/houseDesign.py +++ b/toontown/estate/houseDesign.py @@ -1449,7 +1449,7 @@ class ObjectManager(NodePath, DirectObject): buttons = loader.loadModel('phase_3/models/gui/dialog_box_buttons_gui') okButtonImage = (buttons.find('**/ChtBx_OKBtn_UP'), buttons.find('**/ChtBx_OKBtn_DN'), buttons.find('**/ChtBx_OKBtn_Rllvr')) cancelButtonImage = (buttons.find('**/CloseBtn_UP'), buttons.find('**/CloseBtn_DN'), buttons.find('**/CloseBtn_Rllvr')) - self.verifyFrame = DirectFrame(pos=(-0.4, 0.1, 0.3), scale=0.75, relief=None, image=DGG.getDefaultDialogGeom(), image_color=ToontownGlobals.GlobalDialogColor, image_scale=(1.2, 1, 1.3), text='', text_wordwrap=19, text_scale=0.06, text_pos=(0, 0.5), textMayChange=1, sortOrder=NO_FADE_SORT_INDEX) + self.verifyFrame = DirectFrame(pos=(-0.4, 0.1, 0.3), scale=0.75, relief=None, image=DGG.getDefaultDialogGeom(), image_color=ToontownGlobals.GlobalDialogColor, image_scale=(1.2, 1, 1.3), text='', text_wordwrap=19, text_scale=0.06, text_pos=(0, 0.5), textMayChange=1, sortOrder=DGG.NO_FADE_SORT_INDEX) self.okButton = DirectButton(parent=self.verifyFrame, image=okButtonImage, relief=None, text=OTPLocalizer.DialogOK, text_scale=0.05, text_pos=(0.0, -0.1), textMayChange=0, pos=(-0.22, 0.0, -0.5)) self.cancelButton = DirectButton(parent=self.verifyFrame, image=cancelButtonImage, relief=None, text=OTPLocalizer.DialogCancel, text_scale=0.05, text_pos=(0.0, -0.1), textMayChange=0, pos=(0.22, 0.0, -0.5)) self.deleteItemText = DirectLabel(parent=self.verifyFrame, relief=None, text='', text_wordwrap=16, pos=(0.0, 0.0, -0.4), scale=0.09) From 1f63c40772485270054952815732bcda81bc39c9 Mon Sep 17 00:00:00 2001 From: Open Toontown <57279094+opentoontown@users.noreply.github.com> Date: Mon, 17 Jan 2022 17:11:45 -0500 Subject: [PATCH 13/49] more estate crash fixes --- otp/avatar/LocalAvatar.py | 12 +++++++++--- toontown/estate/DistributedCloset.py | 18 ++++++++++++++---- toontown/estate/FlowerPhoto.py | 4 ++-- toontown/estate/GardenGlobals.py | 2 +- 4 files changed, 26 insertions(+), 10 deletions(-) diff --git a/otp/avatar/LocalAvatar.py b/otp/avatar/LocalAvatar.py index 4f89053..31cfd45 100644 --- a/otp/avatar/LocalAvatar.py +++ b/otp/avatar/LocalAvatar.py @@ -85,6 +85,7 @@ class LocalAvatar(DistributedAvatar.DistributedAvatar, DistributedSmoothNode.Dis self.nametag2dNormalContents = Nametag.CSpeech self.showNametag2d() self.setPickable(0) + self.posCameraSeq = None return def useSwimControls(self): @@ -137,7 +138,9 @@ class LocalAvatar(DistributedAvatar.DistributedAvatar, DistributedSmoothNode.Dis self.stopJumpLandTask() taskMgr.remove('shadowReach') base.popCTrav() - taskMgr.remove('posCamera') + if self.posCameraSeq: + self.posCameraSeq.finish() + self.posCameraSeq = None self.disableAvatarControls() self.stopTrackAnimToSpeed() self.stopUpdateSmartCamera() @@ -605,8 +608,11 @@ class LocalAvatar(DistributedAvatar.DistributedAvatar, DistributedSmoothNode.Dis r = destHpr[2] camera.setPos(savePos) camera.setHpr(saveHpr) - taskMgr.remove('posCamera') - camera.lerpPosHpr(x, y, z, h, p, r, time, task='posCamera') + if self.posCameraSeq: + self.posCameraSeq.finish() + self.posCameraSeq = None + self.posCameraSeq = camera.posHprInterval(time, Point3(x, y, z), Point3(h, p, r), name='posCamera') + self.posCameraSeq.start() def getClampedAvatarHeight(self): return max(self.getHeight(), 3.0) diff --git a/toontown/estate/DistributedCloset.py b/toontown/estate/DistributedCloset.py index 167139b..21ed2a6 100644 --- a/toontown/estate/DistributedCloset.py +++ b/toontown/estate/DistributedCloset.py @@ -50,6 +50,7 @@ class DistributedCloset(DistributedFurnitureItem.DistributedFurnitureItem): self.topDeleted = 0 self.bottomDeleted = 0 self.closetTrack = None + self.lerpCameraSeq = None self.avMoveTrack = None self.scale = 1.0 self.fsm = ClassicFSM.ClassicFSM('Closet', [State.State('off', self.enterOff, self.exitOff, ['ready', 'open', 'closed']), @@ -105,7 +106,9 @@ class DistributedCloset(DistributedFurnitureItem.DistributedFurnitureItem): self.ignore(self.closetSphereEnterEvent) self.ignoreAll() taskMgr.remove(self.uniqueName('popupChangeClothesGUI')) - taskMgr.remove(self.uniqueName('lerpCamera')) + if self.lerpCameraSeq: + self.lerpCameraSeq.finish() + self.lerpCameraSeq = None taskMgr.remove(self.uniqueName('lerpToon')) if self.closetTrack: self.closetTrack.finish() @@ -154,7 +157,10 @@ class DistributedCloset(DistributedFurnitureItem.DistributedFurnitureItem): self._openDoors() if self.customerId == base.localAvatar.doId: camera.wrtReparentTo(self) - camera.lerpPosHpr(-7.58, -6.02, 6.9, 286.3, 336.8, 0, 1, other=self, blendType='easeOut', task=self.uniqueName('lerpCamera')) + quat = Quat() + quat.setHpr((286.3, 336.8, 0)) + self.lerpCameraSeq = camera.posQuatInterval(1, Point3(-7.58, -6.02, 6.9), quat, other=self, blendType='easeOut', name=self.uniqueName('lerpCamera')) + self.lerpCameraSeq.start() camera.setPosHpr(self, -7.58, -6.02, 6.9, 286.3, 336.8, 0) if self.av: if self.avMoveTrack: @@ -252,7 +258,9 @@ class DistributedCloset(DistributedFurnitureItem.DistributedFurnitureItem): def resetCloset(self): self.ignoreAll() taskMgr.remove(self.uniqueName('popupChangeClothesGUI')) - taskMgr.remove(self.uniqueName('lerpCamera')) + if self.lerpCameraSeq: + self.lerpCameraSeq.finish() + self.lerpCameraSeq = None taskMgr.remove(self.uniqueName('lerpToon')) if self.closetGUI: self.closetGUI.hideButtons() @@ -393,7 +401,9 @@ class DistributedCloset(DistributedFurnitureItem.DistributedFurnitureItem): self.freeAvatar() return elif mode == ClosetGlobals.CLOSET_MOVIE_TIMEOUT: - taskMgr.remove(self.uniqueName('lerpCamera')) + if self.lerpCameraSeq: + self.lerpCameraSeq.finish() + self.lerpCameraSeq = None taskMgr.remove(self.uniqueName('lerpToon')) if self.isLocalToon: self.ignore(self.purchaseDoneEvent) diff --git a/toontown/estate/FlowerPhoto.py b/toontown/estate/FlowerPhoto.py index b8cabae..8ed6803 100644 --- a/toontown/estate/FlowerPhoto.py +++ b/toontown/estate/FlowerPhoto.py @@ -14,7 +14,7 @@ class DirectRegion(NodePath): def destroy(self): self.unload() - self.parent = None + self._parent = None return def setBounds(self, *bounds): @@ -94,7 +94,7 @@ class FlowerPhoto(NodePath): self.fish = None del self.soundTrack del self.track - self.parent = None + self._parent = None return def update(self, species, variety): diff --git a/toontown/estate/GardenGlobals.py b/toontown/estate/GardenGlobals.py index 0fd640f..f813259 100644 --- a/toontown/estate/GardenGlobals.py +++ b/toontown/estate/GardenGlobals.py @@ -503,7 +503,7 @@ def getShovelPower(shovel, shovelSkill): gardenNotify.warning("this shouldn't happen shovelSkill %d >= skill %d" % (shovelSkill, skill)) shovelSkill = skill - 1 skillPtPerBox = skill / curBoxes - numBoxes += 1 + int(shovelSkill) / int(skillPtPerBox) + numBoxes += 1 + int(shovelSkill) // int(skillPtPerBox) else: numBoxes += curBoxes From 556ad03dab7befd93116c33125260986497d73db Mon Sep 17 00:00:00 2001 From: Open Toontown <57279094+opentoontown@users.noreply.github.com> Date: Tue, 18 Jan 2022 16:12:05 -0500 Subject: [PATCH 14/49] a bunch of party fixes --- toontown/parties/CalendarGuiDay.py | 8 ++++---- toontown/parties/DistributedParty.py | 16 ++++++---------- toontown/parties/PartyCogActivity.py | 2 +- toontown/parties/PartyEditorGridElement.py | 22 +++++++++++----------- toontown/parties/PartyEditorListElement.py | 16 ++++++++-------- toontown/parties/PublicPartyGui.py | 3 ++- toontown/parties/ScrolledFriendList.py | 6 +++--- toontown/toon/DistributedNPCPartyPerson.py | 22 ++++++++++++++++------ 8 files changed, 51 insertions(+), 44 deletions(-) diff --git a/toontown/parties/CalendarGuiDay.py b/toontown/parties/CalendarGuiDay.py index 05dae26..0013df3 100644 --- a/toontown/parties/CalendarGuiDay.py +++ b/toontown/parties/CalendarGuiDay.py @@ -531,7 +531,7 @@ class MiniInviteVisual(DirectFrame): DirectFrame.__init__(self, parent, pos=(0.1, 0, -0.018)) self.checkedHeight = True self.partyInfo = partyInfo - self.parent = parent + self._parent = parent self.inviteBackgrounds = loader.loadModel('phase_4/models/parties/partyStickerbook') backgrounds = ['calendar_popup_birthday', 'calendar_popup_fun', @@ -547,9 +547,9 @@ class MiniInviteVisual(DirectFrame): return def show(self): - self.reparentTo(self.parent) + self.reparentTo(self._parent) self.setPos(0.1, 0, -0.018) - newParent = self.parent.getParent().getParent() + newParent = self._parent.getParent().getParent() self.wrtReparentTo(newParent) if self.whosePartyLabel['text'] == ' ': host = base.cr.identifyAvatar(self.partyInfo.hostId) @@ -575,7 +575,7 @@ class MiniInviteVisual(DirectFrame): def destroy(self): del self.checkedHeight del self.partyInfo - del self.parent + del self._parent del self.background del self.whosePartyLabel del self.whenTextLabel diff --git a/toontown/parties/DistributedParty.py b/toontown/parties/DistributedParty.py index f896260..b525471 100644 --- a/toontown/parties/DistributedParty.py +++ b/toontown/parties/DistributedParty.py @@ -1,11 +1,11 @@ import random import time import datetime -from pandac.PandaModules import Vec4, TextNode, CardMaker, NodePath +from panda3d.core import Vec4, TextNode, CardMaker, NodePath from direct.distributed import DistributedObject -from direct.task.Task import Task from direct.gui.DirectGui import DirectLabel from direct.gui import OnscreenText +from direct.interval.IntervalGlobal import * from toontown.toonbase import ToontownGlobals from toontown.parties.PartyInfo import PartyInfo from toontown.toonbase import TTLocalizer @@ -321,8 +321,8 @@ class DistributedParty(DistributedObject.DistributedObject): False]] def fillGrid(x, y, size): - for i in range(-size[1] / 2 + 1, size[1] / 2 + 1): - for j in range(-size[0] / 2 + 1, size[0] / 2 + 1): + for i in range(-size[1] // 2 + 1, size[1] // 2 + 1): + for j in range(-size[0] // 2 + 1, size[0] // 2 + 1): self.grid[i + y][j + x] = False for activityBase in self.partyInfo.activityList: @@ -572,12 +572,8 @@ class DistributedParty(DistributedObject.DistributedObject): self.titleText.setColor(Vec4(*self.titleColor)) self.titleText.clearColorScale() self.titleText.setFg(self.titleColor) - seq = Task.sequence(Task.pause(0.1), Task.pause(6.0), self.titleText.lerpColorScale(Vec4(1.0, 1.0, 1.0, 1.0), Vec4(1.0, 1.0, 1.0, 0.0), 0.5), Task(self.hideTitleTextTask)) - taskMgr.add(seq, 'titleText') - - def hideTitleTextTask(self, task): - self.titleText.hide() - return Task.done + seq = Sequence(Wait(0.1), Wait(6.0), self.titleText.colorScaleInterval(0.5, Vec4(1.0, 1.0, 1.0, 0.0)), Func(self.hideTitleText)) + seq.start() def hideTitleText(self): if self.titleText: diff --git a/toontown/parties/PartyCogActivity.py b/toontown/parties/PartyCogActivity.py index e08dd23..1c67d9b 100644 --- a/toontown/parties/PartyCogActivity.py +++ b/toontown/parties/PartyCogActivity.py @@ -262,7 +262,7 @@ class PartyCogActivity(DirectObject): if not opening: pos = self._doorStartPos[team] else: - pos = (self._doorStartPos[team] + Point3(0, 0, -7.0),) + pos = (self._doorStartPos[team] + Point3(0, 0, -7.0)) ival = self._arenaDoors[team].posInterval(0.75, pos, blendType='easeIn') self._arenaDoorIvals[team] = ival ival.start() diff --git a/toontown/parties/PartyEditorGridElement.py b/toontown/parties/PartyEditorGridElement.py index 1f2c9ea..51a87df 100644 --- a/toontown/parties/PartyEditorGridElement.py +++ b/toontown/parties/PartyEditorGridElement.py @@ -19,14 +19,14 @@ class PartyEditorGridElement(DirectButton): self.isDecoration = isDecoration self.checkSoldOutAndPaidStatusAndAffordability = checkSoldOutAndPaidStatusAndAffordability if self.isDecoration: - self.name = TTLocalizer.PartyDecorationNameDict[self.id]['editor'] + self._name = TTLocalizer.PartyDecorationNameDict[self.id]['editor'] colorList = ((1.0, 1.0, 1.0, 1.0), (0.0, 0.0, 1.0, 1.0), (0.0, 1.0, 1.0, 1.0), (0.5, 0.5, 0.5, 1.0)) self.geom = self.partyEditor.partyPlanner.gui.find('**/%s' % PartyGlobals.DecorationInformationDict[self.id]['gridAsset']) else: - self.name = TTLocalizer.PartyActivityNameDict[self.id]['editor'] + self._name = TTLocalizer.PartyActivityNameDict[self.id]['editor'] colorList = ((1.0, 1.0, 1.0, 1.0), (0.0, 1.0, 0.0, 1.0), (1.0, 1.0, 0.0, 1.0), @@ -42,15 +42,15 @@ class PartyEditorGridElement(DirectButton): self.defineoptions(kw, optiondefs) DirectButton.__init__(self, self.partyEditor.parent) self.initialiseoptions(PartyEditorGridElement) - self.setName('%sGridElement' % self.name) + self.setName('%sGridElement' % self._name) self.bind(DirectGuiGlobals.B1PRESS, self.clicked) self.bind(DirectGuiGlobals.B1RELEASE, self.released) self.bind(DirectGuiGlobals.ENTER, self.mouseEnter) self.bind(DirectGuiGlobals.EXIT, self.mouseExit) - self.uprightNodePath = NodePath('%sUpright' % self.name) + self.uprightNodePath = NodePath('%sUpright' % self._name) self.uprightNodePath.reparentTo(self) rollOverZOffset = self.getGridSize()[1] / 30.0 - self.rolloverTitle = DirectLabel(relief=None, parent=self.uprightNodePath, pos=Point3(0.0, 0.0, rollOverZOffset), text=self.name, text_fg=(1.0, 1.0, 1.0, 1.0), text_shadow=(0.0, 0.0, 0.0, 1.0), text_scale=0.075) + self.rolloverTitle = DirectLabel(relief=None, parent=self.uprightNodePath, pos=Point3(0.0, 0.0, rollOverZOffset), text=self._name, text_fg=(1.0, 1.0, 1.0, 1.0), text_shadow=(0.0, 0.0, 0.0, 1.0), text_scale=0.075) self.rolloverTitle.stash() self.stash() self.overValidSquare = False @@ -84,11 +84,11 @@ class PartyEditorGridElement(DirectButton): self.getCorrectRotation()) def attach(self, mouseEvent): - PartyEditorGridElement.notify.debug('attached grid element %s' % self.name) - taskMgr.remove('gridElementDragTask%s' % self.name) + PartyEditorGridElement.notify.debug('attached grid element %s' % self._name) + taskMgr.remove('gridElementDragTask%s' % self._name) vWidget2render2d = self.getPos(render2d) vMouse2render2d = Point3(mouseEvent.getMouse()[0], 0, mouseEvent.getMouse()[1]) - taskMgr.add(self.elementDragTask, 'gridElementDragTask%s' % self.name) + taskMgr.add(self.elementDragTask, 'gridElementDragTask%s' % self._name) self.unstash() self.rolloverTitle.unstash() self.uprightNodePath.reparentTo(self) @@ -198,7 +198,7 @@ class PartyEditorGridElement(DirectButton): return self.partyEditor.partyEditorGrid.getGridSquare(x, y) def detach(self, mouseEvent): - taskMgr.remove('gridElementDragTask%s' % self.name) + taskMgr.remove('gridElementDragTask%s' % self._name) self.rolloverTitle.stash() if self.overValidSquare: self.partyEditor.partyEditorGrid.registerNewElement(self, self.centerGridSquare, self.getGridSize()) @@ -237,14 +237,14 @@ class PartyEditorGridElement(DirectButton): return def clicked(self, mouseEvent): - PartyEditorGridElement.notify.debug('clicked grid element %s' % self.name) + PartyEditorGridElement.notify.debug('clicked grid element %s' % self._name) if self.centerGridSquare is not None: self.attach(mouseEvent) self.partyEditor.partyEditorGrid.removeElement(self.centerGridSquare, self.getGridSize()) return def released(self, mouseEvent): - PartyEditorGridElement.notify.debug('released grid element %s' % self.name) + PartyEditorGridElement.notify.debug('released grid element %s' % self._name) self.detach(mouseEvent) def mouseEnter(self, mouseEvent): diff --git a/toontown/parties/PartyEditorListElement.py b/toontown/parties/PartyEditorListElement.py index df99cbb..491c563 100644 --- a/toontown/parties/PartyEditorListElement.py +++ b/toontown/parties/PartyEditorListElement.py @@ -16,7 +16,7 @@ class PartyEditorListElement(DirectButton): self.unreleased = self.calcUnreleased(id) self.comingSoonTextScale = 1.0 if self.isDecoration: - self.name = TTLocalizer.PartyDecorationNameDict[self.id]['editor'] + self._name = TTLocalizer.PartyDecorationNameDict[self.id]['editor'] colorList = ((1.0, 0.0, 1.0, 1.0), (0.0, 0.0, 1.0, 1.0), (0.0, 1.0, 1.0, 1.0), @@ -44,7 +44,7 @@ class PartyEditorListElement(DirectButton): geom_pos = (0.0, 0.0, -3.9) scale = Vec3(0.05, 0.0001, 0.05) else: - self.name = TTLocalizer.PartyActivityNameDict[self.id]['editor'] + self._name = TTLocalizer.PartyActivityNameDict[self.id]['editor'] colorList = ((0.0, 0.0, 0.0, 1.0), (0.0, 1.0, 0.0, 1.0), (1.0, 1.0, 0.0, 1.0), @@ -66,7 +66,7 @@ class PartyEditorListElement(DirectButton): self.defineoptions(kw, optiondefs) DirectButton.__init__(self, self.partyEditor.elementList) self.initialiseoptions(PartyEditorListElement) - self.setName('%sListElement' % self.name) + self.setName('%sListElement' % self._name) self.setScale(scale) self.bind(DirectGuiGlobals.B1PRESS, self.clicked) self.bind(DirectGuiGlobals.B1RELEASE, self.released) @@ -104,15 +104,15 @@ class PartyEditorListElement(DirectButton): gridElement.removeFromGrid() def elementSelectedFromList(self): - PartyEditorListElement.notify.debug('Element %s clicked' % self.name) + PartyEditorListElement.notify.debug('Element %s clicked' % self._name) if self.isDecoration: self.partyEditor.partyPlanner.elementDescriptionNode.setText(TTLocalizer.PartyDecorationNameDict[self.id]['description']) self.partyEditor.partyPlanner.elementPriceNode.setText('%d %s' % (PartyGlobals.DecorationInformationDict[self.id]['cost'], TTLocalizer.PartyPlannerBeans)) - self.partyEditor.partyPlanner.elementTitleLabel['text'] = self.name + self.partyEditor.partyPlanner.elementTitleLabel['text'] = self._name else: self.partyEditor.partyPlanner.elementDescriptionNode.setText(TTLocalizer.PartyActivityNameDict[self.id]['description']) self.partyEditor.partyPlanner.elementPriceNode.setText('%d %s' % (PartyGlobals.ActivityInformationDict[self.id]['cost'], TTLocalizer.PartyPlannerBeans)) - self.partyEditor.partyPlanner.elementTitleLabel['text'] = self.name + self.partyEditor.partyPlanner.elementTitleLabel['text'] = self._name self.checkSoldOutAndPaidStatusAndAffordability() def checkSoldOutAndPaidStatusAndAffordability(self): @@ -172,7 +172,7 @@ class PartyEditorListElement(DirectButton): self.partyEditor.partyPlanner.elementBuyButton['state'] = DirectGuiGlobals.DISABLED def clicked(self, mouseEvent): - PartyEditorListElement.notify.debug("Element %s's icon was clicked" % self.name) + PartyEditorListElement.notify.debug("Element %s's icon was clicked" % self._name) self.partyEditor.listElementClicked() for i in range(len(self.partyEditorGridElements)): if not self.partyEditorGridElements[i].overValidSquare: @@ -191,7 +191,7 @@ class PartyEditorListElement(DirectButton): return False def released(self, mouseEvent): - PartyEditorListElement.notify.debug("Element %s's icon was released" % self.name) + PartyEditorListElement.notify.debug("Element %s's icon was released" % self._name) self.partyEditor.listElementReleased() if self.activeGridElementIndex != -1: self.partyEditorGridElements[self.activeGridElementIndex].detach(mouseEvent) diff --git a/toontown/parties/PublicPartyGui.py b/toontown/parties/PublicPartyGui.py index f5ba382..8f881b7 100644 --- a/toontown/parties/PublicPartyGui.py +++ b/toontown/parties/PublicPartyGui.py @@ -8,6 +8,7 @@ from toontown.toonbase import TTLocalizer from toontown.toontowngui import TTDialog from toontown.parties import PartyGlobals from toontown.parties import PartyUtils +import functools class PublicPartyGui(DirectFrame): notify = directNotify.newCategory('PublicPartyGui') @@ -80,7 +81,7 @@ class PublicPartyGui(DirectFrame): else: return 1 - sortedList.sort(cmp, reverse=True) + sortedList.sort(key=functools.cmp_to_key(cmp), reverse=True) indexToCut = -1 for index, partyTuple in enumerate(sortedList): numberOfGuests = partyTuple[2] diff --git a/toontown/parties/ScrolledFriendList.py b/toontown/parties/ScrolledFriendList.py index fd3f9e0..e1f4e71 100644 --- a/toontown/parties/ScrolledFriendList.py +++ b/toontown/parties/ScrolledFriendList.py @@ -10,12 +10,12 @@ class ScrolledFriendList(DirectScrolledList): def __init__(self, parent, gui, clickCallback = None, makeItemsCheckBoxes = False): self.makeItemsCheckBoxes = makeItemsCheckBoxes self.clickCallback = clickCallback - self.parent = parent + self._parent = parent self.gui = gui self.scrollSpeed = 1 DirectScrolledList.__init__(self, parent=parent, relief=None, incButton_image=(self.gui.find('**/inviteButtonDown_up'), self.gui.find('**/inviteButtonDown_down'), self.gui.find('**/inviteButtonDown_rollover')), incButton_relief=None, incButton_pos=(0.0, 0.0, -0.03), incButton_image3_color=Vec4(0.6, 0.6, 0.6, 0.6), decButton_image=(self.gui.find('**/inviteButtonUp_up'), self.gui.find('**/inviteButtonUp_down'), self.gui.find('**/inviteButtonUp_rollover')), decButton_relief=None, decButton_pos=(0.0, 0.0, 0.02), decButton_image3_color=Vec4(0.6, 0.6, 0.6, 0.6), itemFrame_relief=None, forceHeight=0.084, numItemsVisible=8, items=[], incButtonCallback=self.scrollButtonPressed, decButtonCallback=self.scrollButtonPressed, itemFrame_pos=(0.0, 0.0, -0.01)) - self.incButtonCallback = None - self.decButtonCallback = None + self._DirectScrolledList__incButtonCallback = None + self._DirectScrolledList__decButtonCallback = None self.setForceHeight() return diff --git a/toontown/toon/DistributedNPCPartyPerson.py b/toontown/toon/DistributedNPCPartyPerson.py index efcda55..a0d95cb 100644 --- a/toontown/toon/DistributedNPCPartyPerson.py +++ b/toontown/toon/DistributedNPCPartyPerson.py @@ -4,7 +4,7 @@ from toontown.toon import NPCToons from toontown.toonbase import TTLocalizer from direct.task.Task import Task from direct.distributed import ClockDelta -from pandac.PandaModules import Point3 +from panda3d.core import Point3, Quat from panda3d.otp import CFSpeech, CFTimeout from toontown.toontowngui import TTDialog from otp.otpbase import OTPLocalizer @@ -21,12 +21,15 @@ class DistributedNPCPartyPerson(DistributedNPCToonBase): self.button = None self.askGui = None self.teaserDialog = None + self.lerpCameraSeq = None return def disable(self): self.ignoreAll() taskMgr.remove(self.uniqueName('popupAskGUI')) - taskMgr.remove(self.uniqueName('lerpCamera')) + if self.lerpCameraSeq: + self.lerpCameraSeq.finish() + self.lerpCameraSeq = None self.av = None if self.isInteractingWithLocalToon: base.localAvatar.posCamera(0, 0) @@ -85,7 +88,9 @@ class DistributedNPCPartyPerson(DistributedNPCToonBase): def resetPartyPerson(self): self.ignoreAll() taskMgr.remove(self.uniqueName('popupAskGUI')) - taskMgr.remove(self.uniqueName('lerpCamera')) + if self.lerpCameraSeq: + self.lerpCameraSeq.finish() + self.lerpCameraSeq = None if self.askGui: self.askGui.hide() self.show() @@ -105,7 +110,9 @@ class DistributedNPCPartyPerson(DistributedNPCToonBase): if mode == NPCToons.PARTY_MOVIE_CLEAR: return if mode == NPCToons.PARTY_MOVIE_TIMEOUT: - taskMgr.remove(self.uniqueName('lerpCamera')) + if self.lerpCameraSeq: + self.lerpCameraSeq.finish() + self.lerpCameraSeq = None if self.isInteractingWithLocalToon: self.ignore(self.planPartyQuestionGuiDoneEvent) if self.askGui: @@ -123,7 +130,10 @@ class DistributedNPCPartyPerson(DistributedNPCToonBase): self.setupAvatars(self.av) if self.isInteractingWithLocalToon: camera.wrtReparentTo(render) - camera.lerpPosHpr(-5, 9, base.localAvatar.getHeight() - 0.5, -150, -2, 0, 1, other=self, blendType='easeOut', task=self.uniqueName('lerpCamera')) + quat = Quat() + quat.setHpr((-150, -2, 0)) + self.lerpCameraSeq = camera.posQuatInterval(1, Point3(-5, 9, base.localAvatar.getHeight() - 0.5), quat, other=self, blendType='easeOut', name=self.uniqueName('lerpCamera')) + self.lerpCameraSeq.start() taskMgr.doMethodLater(1.0, self.popupAskGUI, self.uniqueName('popupAskGUI')) else: self.setChatAbsolute(TTLocalizer.PartyDoYouWantToPlan, CFSpeech | CFTimeout) @@ -134,7 +144,7 @@ class DistributedNPCPartyPerson(DistributedNPCToonBase): if self.isInteractingWithLocalToon: base.localAvatar.aboutToPlanParty = True base.cr.partyManager.setPartyPlannerStyle(self.style) - base.cr.partyManager.setPartyPlannerName(self.name) + base.cr.partyManager.setPartyPlannerName(self._name) base.localAvatar.creatingNewPartyWithMagicWord = False loaderId = 'safeZoneLoader' whereId = 'party' From 50a3720b83433af4212f21744f409b85ccc13d04 Mon Sep 17 00:00:00 2001 From: Open Toontown <57279094+opentoontown@users.noreply.github.com> Date: Tue, 18 Jan 2022 23:00:30 -0500 Subject: [PATCH 15/49] fix party cannons --- toontown/parties/DistributedPartyCannonActivity.py | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/toontown/parties/DistributedPartyCannonActivity.py b/toontown/parties/DistributedPartyCannonActivity.py index 380941a..6ab579c 100644 --- a/toontown/parties/DistributedPartyCannonActivity.py +++ b/toontown/parties/DistributedPartyCannonActivity.py @@ -261,12 +261,7 @@ class DistributedPartyCannonActivity(DistributedPartyActivity): return Task.done if self.isLocalToonId(toonId): self.inWater = 0 - flightResults = self.__calcFlightResults(cannon, toonId, launchTime) - if not __debug__ or __execWarnings__: - print('EXECWARNING DistributedPartyCannonActivity: %s' % flightResults) - printStack() - for key in flightResults: - exec("%s = flightResults['%s']" % (key, key)) + startPos, startHpr, startVel, trajectory = self.__calcFlightResults(cannon, toonId, launchTime) self.notify.debug('start position: ' + str(startPos)) self.notify.debug('start velocity: ' + str(startVel)) @@ -376,10 +371,7 @@ class DistributedPartyCannonActivity(DistributedPartyActivity): quantizeVec(startVel, self.NetDivisor) trajectory = Trajectory.Trajectory(launchTime, startPos, startVel) self.trajectory = trajectory - return {'startPos': startPos, - 'startHpr': startHpr, - 'startVel': startVel, - 'trajectory': trajectory} + return startPos, startHpr, startVel, trajectory def __shootTask(self, task): task.info['cannon'].fire() From 89104e47d7c383af392ba0bc25aa23fd9d175b9c Mon Sep 17 00:00:00 2001 From: Open Toontown <57279094+opentoontown@users.noreply.github.com> Date: Tue, 18 Jan 2022 23:42:23 -0500 Subject: [PATCH 16/49] fix party fireworks --- toontown/effects/FireworkShowMixin.py | 11 ++++++----- toontown/effects/RocketExplosion.py | 21 ++++++++------------- 2 files changed, 14 insertions(+), 18 deletions(-) diff --git a/toontown/effects/FireworkShowMixin.py b/toontown/effects/FireworkShowMixin.py index 7e79c49..fb7e8e6 100644 --- a/toontown/effects/FireworkShowMixin.py +++ b/toontown/effects/FireworkShowMixin.py @@ -4,7 +4,6 @@ from direct.interval.IntervalGlobal import * from toontown.toonbase.ToontownGlobals import * from toontown.toonbase import TTLocalizer from toontown.parties import PartyGlobals -from toontown.hood import * from . import Fireworks from . import FireworkShows from .FireworkGlobals import skyTransitionDuration, preShowPauseDuration, postShowPauseDuration, preNormalMusicPauseDuration @@ -111,16 +110,16 @@ class FireworkShowMixin: if not self.__checkStreetValidity(): return else: - place.halloweenLights = base.cr.playGame.getPlace().loader.geom.findAllMatches('**/*light*').asList() - place.halloweenLights.extend(base.cr.playGame.getPlace().loader.geom.findAllMatches('**/*lamp*').asList()) + place.halloweenLights = list(base.cr.playGame.getPlace().loader.geom.findAllMatches('**/*light*')) + place.halloweenLights.extend(list(base.cr.playGame.getPlace().loader.geom.findAllMatches('**/*lamp*'))) for light in place.halloweenLights: light.setColorScaleOff(0) elif not self.__checkHoodValidity(): return else: - place.loader.hood.halloweenLights = base.cr.playGame.hood.loader.geom.findAllMatches('**/*light*').asList() - place.loader.hood.halloweenLights.extend(base.cr.playGame.hood.loader.geom.findAllMatches('**/*lamp*').asList()) + place.loader.hood.halloweenLights = list(base.cr.playGame.hood.loader.geom.findAllMatches('**/*light*')) + place.loader.hood.halloweenLights.extend(list(base.cr.playGame.hood.loader.geom.findAllMatches('**/*lamp*'))) for light in base.cr.playGame.hood.halloweenLights: light.setColorScaleOff(0) @@ -135,6 +134,7 @@ class FireworkShowMixin: def restoreCameraLens(self): hood = self.getHood() + from toontown.hood import OZHood, GSHood if isinstance(hood, OZHood.OZHood): base.camLens.setFar(SpeedwayCameraFar) elif isinstance(hood, GSHood.GSHood): @@ -176,6 +176,7 @@ class FireworkShowMixin: self.fireworkShow.begin(timeStamp) self.fireworkShow.reparentTo(root) hood = self.getHood() + from toontown.hood import TTHood, BRHood, MMHood, DGHood, DLHood, GSHood, DDHood, OZHood, PartyHood if isinstance(hood, TTHood.TTHood): self.fireworkShow.setPos(150, 0, 80) self.fireworkShow.setHpr(90, 0, 0) diff --git a/toontown/effects/RocketExplosion.py b/toontown/effects/RocketExplosion.py index dbbf01b..6678c48 100644 --- a/toontown/effects/RocketExplosion.py +++ b/toontown/effects/RocketExplosion.py @@ -19,19 +19,14 @@ class RocketExplosion(NodePath): self.effect = ParticleEffect.ParticleEffect('RocketFire') self.smokeEffect = ParticleEffect.ParticleEffect('RocketSmoke') particleSearchPath = DSearchPath() - if AppRunnerGlobal.appRunner: - particleSearchPath.appendDirectory(Filename.expandFrom('$TT_3_5_ROOT/phase_3.5/etc')) - else: - basePath = os.path.expandvars('$TOONTOWN') or './toontown' - particleSearchPath.appendDirectory(Filename.fromOsSpecific(basePath + '/src/effects')) - particleSearchPath.appendDirectory(Filename('phase_3.5/etc')) - particleSearchPath.appendDirectory(Filename('phase_4/etc')) - particleSearchPath.appendDirectory(Filename('phase_5/etc')) - particleSearchPath.appendDirectory(Filename('phase_6/etc')) - particleSearchPath.appendDirectory(Filename('phase_7/etc')) - particleSearchPath.appendDirectory(Filename('phase_8/etc')) - particleSearchPath.appendDirectory(Filename('phase_9/etc')) - particleSearchPath.appendDirectory(Filename('.')) + if __debug__: + particleSearchPath.appendDirectory(Filename('resources/phase_3.5/etc')) + particleSearchPath.appendDirectory(Filename('resources/phase_4/etc')) + particleSearchPath.appendDirectory(Filename('resources/phase_5/etc')) + particleSearchPath.appendDirectory(Filename('resources/phase_6/etc')) + particleSearchPath.appendDirectory(Filename('resources/phase_7/etc')) + particleSearchPath.appendDirectory(Filename('resources/phase_8/etc')) + particleSearchPath.appendDirectory(Filename('resources/phase_9/etc')) pfile = Filename('tt_p_efx_rocketLaunchFire.ptf') found = vfs.resolveFilename(pfile, particleSearchPath) if not found: From 6bd6ec921268727007f23ca5e417eea714ca9686 Mon Sep 17 00:00:00 2001 From: Open Toontown <57279094+opentoontown@users.noreply.github.com> Date: Wed, 19 Jan 2022 00:03:02 -0500 Subject: [PATCH 17/49] clean up some imports --- toontown/effects/RocketExplosion.py | 4 +--- toontown/hood/StreetSign.py | 6 +----- toontown/shtiker/DisplaySettingsDialog.py | 3 +-- 3 files changed, 3 insertions(+), 10 deletions(-) diff --git a/toontown/effects/RocketExplosion.py b/toontown/effects/RocketExplosion.py index 6678c48..88641c3 100644 --- a/toontown/effects/RocketExplosion.py +++ b/toontown/effects/RocketExplosion.py @@ -1,9 +1,7 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.particles import ParticleEffect from direct.directnotify import DirectNotifyGlobal from direct.interval.IntervalGlobal import * -from direct.showbase import AppRunnerGlobal -import os class RocketExplosion(NodePath): diff --git a/toontown/hood/StreetSign.py b/toontown/hood/StreetSign.py index a0fec90..7b2fc97 100644 --- a/toontown/hood/StreetSign.py +++ b/toontown/hood/StreetSign.py @@ -1,11 +1,7 @@ -import os -import shutil import datetime -from pandac.PandaModules import * +from panda3d.core import * from direct.directnotify import DirectNotifyGlobal from direct.distributed import DistributedObject -from direct.showbase import AppRunnerGlobal -from toontown.toonbase import TTLocalizer class StreetSign(DistributedObject.DistributedObject): RedownloadTaskName = 'RedownloadStreetSign' diff --git a/toontown/shtiker/DisplaySettingsDialog.py b/toontown/shtiker/DisplaySettingsDialog.py index 7e575fb..0577e6f 100644 --- a/toontown/shtiker/DisplaySettingsDialog.py +++ b/toontown/shtiker/DisplaySettingsDialog.py @@ -1,8 +1,7 @@ from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from direct.task.Task import Task from direct.fsm import StateData -from direct.showbase import AppRunnerGlobal from direct.directnotify import DirectNotifyGlobal from toontown.toonbase import TTLocalizer from toontown.toontowngui import TTDialog From b8d582749613bde13b4a58f2d5d13cc6be064195 Mon Sep 17 00:00:00 2001 From: Open Toontown <57279094+opentoontown@users.noreply.github.com> Date: Wed, 19 Jan 2022 00:40:24 -0500 Subject: [PATCH 18/49] start getting rid of DeprecationWarnings --- otp/launcher/LauncherBase.py | 2 +- otp/otpbase/OTPBase.py | 22 ++++---- otp/otpbase/OTPLocalizer.py | 12 +--- toontown/launcher/QuickLauncher.py | 4 +- toontown/toonbase/TTLocalizer.py | 12 +--- toontown/toonbase/ToonBase.py | 88 +++++++++++++++--------------- 6 files changed, 64 insertions(+), 76 deletions(-) diff --git a/otp/launcher/LauncherBase.py b/otp/launcher/LauncherBase.py index b817366..ee99a22 100644 --- a/otp/launcher/LauncherBase.py +++ b/otp/launcher/LauncherBase.py @@ -88,7 +88,7 @@ class LauncherBase(DirectObject): self.setRegistry(self.GameLogFilenameKey, logfile) self.showPhase = 3.5 self.currentPhase = 4 - serverVersion = launcherConfig.GetString('server-version', 'no_version_set') + serverVersion = ConfigVariableString('server-version', 'no_version_set').value if serverVersion == 'no_version_set': self.setPandaErrorCode(10) self.notify.info('Aborting, config did not load!') diff --git a/otp/otpbase/OTPBase.py b/otp/otpbase/OTPBase.py index 22b3681..2c61ef1 100644 --- a/otp/otpbase/OTPBase.py +++ b/otp/otpbase/OTPBase.py @@ -1,5 +1,5 @@ from direct.showbase.ShowBase import ShowBase -from pandac.PandaModules import Camera, TPLow, VBase4, ColorWriteAttrib, Filename, getModelPath, NodePath +from panda3d.core import Camera, TPLow, VBase4, ColorWriteAttrib, Filename, getModelPath, NodePath, ConfigVariableBool, ConfigVariableDouble from . import OTPRender import time import math @@ -10,22 +10,22 @@ class OTPBase(ShowBase): def __init__(self, windowType = None): self.wantEnviroDR = False ShowBase.__init__(self, windowType=windowType) - __builtins__['__astron__'] = self.config.GetBool('astron-support', 1) - __builtins__['__execWarnings__'] = self.config.GetBool('want-exec-warnings', 0) + __builtins__['__astron__'] = ConfigVariableBool('astron-support', 1).value + __builtins__['__execWarnings__'] = ConfigVariableBool('want-exec-warnings', 0).value OTPBase.notify.info('__astron__ == %s' % __astron__) - if config.GetBool('want-phase-checker', 0): + if ConfigVariableBool('want-phase-checker', 0).value: from direct.showbase import Loader Loader.phaseChecker = self.loaderPhaseChecker self.errorAccumulatorBuffer = '' taskMgr.add(self.delayedErrorCheck, 'delayedErrorCheck', priority=10000) - self.idTags = config.GetBool('want-id-tags', 0) + self.idTags = ConfigVariableBool('want-id-tags', 0).value if not self.idTags: del self.idTags - self.wantNametags = self.config.GetBool('want-nametags', 1) - self.slowCloseShard = self.config.GetBool('slow-close-shard', 0) - self.slowCloseShardDelay = self.config.GetFloat('slow-close-shard-delay', 10.0) - self.fillShardsToIdealPop = self.config.GetBool('fill-shards-to-ideal-pop', 1) - self.logPrivateInfo = self.config.GetBool('log-private-info', __dev__) + self.wantNametags = ConfigVariableBool('want-nametags', 1).value + self.slowCloseShard = ConfigVariableBool('slow-close-shard', 0).value + self.slowCloseShardDelay = ConfigVariableDouble('slow-close-shard-delay', 10.0).value + self.fillShardsToIdealPop = ConfigVariableBool('fill-shards-to-ideal-pop', 1).value + self.logPrivateInfo = ConfigVariableBool('log-private-info', __dev__).value self.wantDynamicShadows = 1 self.stereoEnabled = False self.enviroDR = None @@ -227,7 +227,7 @@ class OTPBase(ShowBase): def openMainWindow(self, *args, **kw): result = ShowBase.openMainWindow(self, *args, **kw) if result: - self.wantEnviroDR = not self.win.getGsg().isHardware() or config.GetBool('want-background-region', 1) + self.wantEnviroDR = not self.win.getGsg().isHardware() or ConfigVariableBool('want-background-region', 1).value self.backgroundDrawable = self.win return result diff --git a/otp/otpbase/OTPLocalizer.py b/otp/otpbase/OTPLocalizer.py index 303a243..ebfa5be 100644 --- a/otp/otpbase/OTPLocalizer.py +++ b/otp/otpbase/OTPLocalizer.py @@ -1,13 +1,7 @@ from panda3d.core import * -from direct.showbase import DConfig -import string -import types -try: - language = DConfig.GetString('language', 'english') - checkLanguage = DConfig.GetBool('check-language', 0) -except: - language = simbase.config.GetString('language', 'english') - checkLanguage = simbase.config.GetBool('check-language', 0) + +language = ConfigVariableString('language', 'english').value +checkLanguage = ConfigVariableBool('check-language', 0).value def getLanguage(): return language diff --git a/toontown/launcher/QuickLauncher.py b/toontown/launcher/QuickLauncher.py index d5bb642..26087ab 100644 --- a/toontown/launcher/QuickLauncher.py +++ b/toontown/launcher/QuickLauncher.py @@ -1,6 +1,6 @@ import os from direct.showbase.EventManagerGlobal import * -from pandac.PandaModules import * +from panda3d.core import * from otp.launcher.LauncherBase import LauncherBase from toontown.toonbase import TTLocalizer @@ -12,7 +12,7 @@ class QuickLauncher(LauncherBase): print('Running: ToontownQuickLauncher') self.toontownBlueKey = 'TOONTOWN_BLUE' LauncherBase.__init__(self) - self.useTTSpecificLogin = config.GetBool('tt-specific-login', 0) + self.useTTSpecificLogin = ConfigVariableBool('tt-specific-login', 0).value if self.useTTSpecificLogin: self.toontownPlayTokenKey = 'LOGIN_TOKEN' else: diff --git a/toontown/toonbase/TTLocalizer.py b/toontown/toonbase/TTLocalizer.py index 7dfce6d..0427d15 100644 --- a/toontown/toonbase/TTLocalizer.py +++ b/toontown/toonbase/TTLocalizer.py @@ -1,13 +1,7 @@ from panda3d.core import * -from direct.showbase import DConfig -import string -import types -try: - language = DConfig.GetString('language', 'english') - checkLanguage = DConfig.GetBool('check-language', 0) -except: - language = simbase.config.GetString('language', 'english') - checkLanguage = simbase.config.GetBool('check-language', 0) + +language = ConfigVariableString('language', 'english').value +checkLanguage = ConfigVariableBool('check-language', 0).value def getLanguage(): return language diff --git a/toontown/toonbase/ToonBase.py b/toontown/toonbase/ToonBase.py index 9055e93..0bdc15b 100644 --- a/toontown/toonbase/ToonBase.py +++ b/toontown/toonbase/ToonBase.py @@ -8,7 +8,7 @@ from direct.directnotify import DirectNotifyGlobal from . import ToontownLoader from direct.gui import DirectGuiGlobals from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from panda3d.otp import * import sys import os @@ -23,7 +23,7 @@ class ToonBase(OTPBase.OTPBase): def __init__(self): self.settings = Settings() - if not config.GetInt('ignore-user-options', 0): + if not ConfigVariableInt('ignore-user-options', 0).value: self.settings.readSettings() mode = not self.settings.getSetting('windowed-mode', True) music = self.settings.getSetting('music', True) @@ -49,8 +49,8 @@ class ToonBase(OTPBase.OTPBase): sys.exit(1) self.disableShowbaseMouse() base.debugRunningMultiplier /= OTPGlobals.ToonSpeedFactor - self.toonChatSounds = self.config.GetBool('toon-chat-sounds', 1) - self.placeBeforeObjects = config.GetBool('place-before-objects', 1) + self.toonChatSounds = ConfigVariableBool('toon-chat-sounds', 1).value + self.placeBeforeObjects = ConfigVariableBool('place-before-objects', 1).value self.endlessQuietZone = False self.wantDynamicShadows = 0 self.exitErrorCode = 0 @@ -72,7 +72,7 @@ class ToonBase(OTPBase.OTPBase): if 'launcher' in __builtins__ and launcher: launcher.setPandaErrorCode(11) globalClock.setMaxDt(0.2) - if self.config.GetBool('want-particles', 1) == 1: + if ConfigVariableBool('want-particles', 1).value == 1: self.notify.debug('Enabling particles') self.enableParticles() self.accept(ToontownGlobals.ScreenshotHotkey, self.takeScreenShot) @@ -83,51 +83,51 @@ class ToonBase(OTPBase.OTPBase): oldLoader.destroy() self.accept('PandaPaused', self.disableAllAudio) self.accept('PandaRestarted', self.enableAllAudio) - self.friendMode = self.config.GetBool('switchboard-friends', 0) - self.wantPets = self.config.GetBool('want-pets', 1) - self.wantBingo = self.config.GetBool('want-fish-bingo', 1) - self.wantKarts = self.config.GetBool('want-karts', 1) - self.wantNewSpecies = self.config.GetBool('want-new-species', 0) - self.inactivityTimeout = self.config.GetFloat('inactivity-timeout', ToontownGlobals.KeyboardTimeout) + self.friendMode = ConfigVariableBool('switchboard-friends', 0).value + self.wantPets = ConfigVariableBool('want-pets', 1).value + self.wantBingo = ConfigVariableBool('want-fish-bingo', 1).value + self.wantKarts = ConfigVariableBool('want-karts', 1).value + self.wantNewSpecies = ConfigVariableBool('want-new-species', 0).value + self.inactivityTimeout = ConfigVariableDouble('inactivity-timeout', ToontownGlobals.KeyboardTimeout).value if self.inactivityTimeout: self.notify.debug('Enabling Panda timeout: %s' % self.inactivityTimeout) self.mouseWatcherNode.setInactivityTimeout(self.inactivityTimeout) - self.randomMinigameAbort = self.config.GetBool('random-minigame-abort', 0) - self.randomMinigameDisconnect = self.config.GetBool('random-minigame-disconnect', 0) - self.randomMinigameNetworkPlugPull = self.config.GetBool('random-minigame-netplugpull', 0) - self.autoPlayAgain = self.config.GetBool('auto-play-again', 0) - self.skipMinigameReward = self.config.GetBool('skip-minigame-reward', 0) - self.wantMinigameDifficulty = self.config.GetBool('want-minigame-difficulty', 0) - self.minigameDifficulty = self.config.GetFloat('minigame-difficulty', -1.0) + self.randomMinigameAbort = ConfigVariableBool('random-minigame-abort', 0).value + self.randomMinigameDisconnect = ConfigVariableBool('random-minigame-disconnect', 0).value + self.randomMinigameNetworkPlugPull = ConfigVariableBool('random-minigame-netplugpull', 0).value + self.autoPlayAgain = ConfigVariableBool('auto-play-again', 0).value + self.skipMinigameReward = ConfigVariableBool('skip-minigame-reward', 0).value + self.wantMinigameDifficulty = ConfigVariableBool('want-minigame-difficulty', 0).value + self.minigameDifficulty = ConfigVariableDouble('minigame-difficulty', -1.0).value if self.minigameDifficulty == -1.0: del self.minigameDifficulty - self.minigameSafezoneId = self.config.GetInt('minigame-safezone-id', -1) + self.minigameSafezoneId = ConfigVariableInt('minigame-safezone-id', -1).value if self.minigameSafezoneId == -1: del self.minigameSafezoneId - cogdoGameSafezoneId = self.config.GetInt('cogdo-game-safezone-id', -1) - cogdoGameDifficulty = self.config.GetFloat('cogdo-game-difficulty', -1) + cogdoGameSafezoneId = ConfigVariableInt('cogdo-game-safezone-id', -1).value + cogdoGameDifficulty = ConfigVariableDouble('cogdo-game-difficulty', -1).value if cogdoGameDifficulty != -1: self.cogdoGameDifficulty = cogdoGameDifficulty if cogdoGameSafezoneId != -1: self.cogdoGameSafezoneId = cogdoGameSafezoneId - ToontownBattleGlobals.SkipMovie = self.config.GetBool('skip-battle-movies', 0) - self.creditCardUpFront = self.config.GetInt('credit-card-up-front', -1) + ToontownBattleGlobals.SkipMovie = ConfigVariableBool('skip-battle-movies', 0).value + self.creditCardUpFront = ConfigVariableInt('credit-card-up-front', -1).value if self.creditCardUpFront == -1: del self.creditCardUpFront else: self.creditCardUpFront = self.creditCardUpFront != 0 - self.housingEnabled = self.config.GetBool('want-housing', 1) - self.cannonsEnabled = self.config.GetBool('estate-cannons', 0) - self.fireworksEnabled = self.config.GetBool('estate-fireworks', 0) - self.dayNightEnabled = self.config.GetBool('estate-day-night', 0) - self.cloudPlatformsEnabled = self.config.GetBool('estate-clouds', 0) - self.greySpacing = self.config.GetBool('allow-greyspacing', 0) - self.goonsEnabled = self.config.GetBool('estate-goon', 0) - self.restrictTrialers = self.config.GetBool('restrict-trialers', 1) - self.roamingTrialers = self.config.GetBool('roaming-trialers', 1) - self.slowQuietZone = self.config.GetBool('slow-quiet-zone', 0) - self.slowQuietZoneDelay = self.config.GetFloat('slow-quiet-zone-delay', 5) - self.killInterestResponse = self.config.GetBool('kill-interest-response', 0) + self.housingEnabled = ConfigVariableBool('want-housing', 1).value + self.cannonsEnabled = ConfigVariableBool('estate-cannons', 0).value + self.fireworksEnabled = ConfigVariableBool('estate-fireworks', 0).value + self.dayNightEnabled = ConfigVariableBool('estate-day-night', 0).value + self.cloudPlatformsEnabled = ConfigVariableBool('estate-clouds', 0).value + self.greySpacing = ConfigVariableBool('allow-greyspacing', 0).value + self.goonsEnabled = ConfigVariableBool('estate-goon', 0).value + self.restrictTrialers = ConfigVariableBool('restrict-trialers', 1).value + self.roamingTrialers = ConfigVariableBool('roaming-trialers', 1).value + self.slowQuietZone = ConfigVariableBool('slow-quiet-zone', 0).value + self.slowQuietZoneDelay = ConfigVariableDouble('slow-quiet-zone-delay', 5).value + self.killInterestResponse = ConfigVariableBool('kill-interest-response', 0).value tpMgr = TextPropertiesManager.getGlobalPtr() WLDisplay = TextProperties() WLDisplay.setSlant(0.3) @@ -151,7 +151,7 @@ class ToonBase(OTPBase.OTPBase): def windowEvent(self, win): OTPBase.OTPBase.windowEvent(self, win) - if not config.GetInt('keep-aspect-ratio', 0): + if not ConfigVariableInt('keep-aspect-ratio', 0).value: return x = max(1, win.getXSize()) y = max(1, win.getYSize()) @@ -215,7 +215,7 @@ class ToonBase(OTPBase.OTPBase): self.screenshot(namePrefix=namePrefix) self.lastScreenShotTime = globalClock.getRealTime() return - coordOnScreen = self.config.GetBool('screenshot-coords', 0) + coordOnScreen = ConfigVariableBool('screenshot-coords', 0).value self.localAvatar.stopThisFrame = 1 ctext = self.localAvatar.getAvPosStr() self.screenshotStr = '' @@ -298,7 +298,7 @@ class ToonBase(OTPBase.OTPBase): self.cleanupDownloadWatcher() else: self.acceptOnce('launcherAllPhasesComplete', self.cleanupDownloadWatcher) - gameServer = base.config.GetString('game-server', '') + gameServer = ConfigVariableString('game-server', '').value if gameServer: self.notify.info('Using game-server from Configrc: %s ' % gameServer) elif launcherServer: @@ -306,18 +306,18 @@ class ToonBase(OTPBase.OTPBase): self.notify.info('Using gameServer from launcher: %s ' % gameServer) else: gameServer = '127.0.0.1' - serverPort = base.config.GetInt('server-port', 7198) + serverPort = ConfigVariableInt('server-port', 7198).value serverList = [] for name in gameServer.split(';'): url = URLSpec(name, 1) - if config.GetBool('server-want-ssl', False): + if ConfigVariableBool('server-want-ssl', False).value: url.setScheme('s') if not url.hasPort(): url.setPort(serverPort) serverList.append(url) if len(serverList) == 1: - failover = base.config.GetString('server-failover', '') + failover = ConfigVariableString('server-failover', '').value serverURL = serverList[0] for arg in failover.split(): try: @@ -387,11 +387,11 @@ class ToonBase(OTPBase.OTPBase): def getShardPopLimits(self): if self.cr.productName == 'JP': - return (config.GetInt('shard-low-pop', ToontownGlobals.LOW_POP_JP), config.GetInt('shard-mid-pop', ToontownGlobals.MID_POP_JP), config.GetInt('shard-high-pop', ToontownGlobals.HIGH_POP_JP)) + return (ConfigVariableInt('shard-low-pop', ToontownGlobals.LOW_POP_JP).value, ConfigVariableInt('shard-mid-pop', ToontownGlobals.MID_POP_JP).value, ConfigVariableInt('shard-high-pop', ToontownGlobals.HIGH_POP_JP).value) elif self.cr.productName in ['BR', 'FR']: - return (config.GetInt('shard-low-pop', ToontownGlobals.LOW_POP_INTL), config.GetInt('shard-mid-pop', ToontownGlobals.MID_POP_INTL), config.GetInt('shard-high-pop', ToontownGlobals.HIGH_POP_INTL)) + return (ConfigVariableInt('shard-low-pop', ToontownGlobals.LOW_POP_INTL).value, ConfigVariableInt('shard-mid-pop', ToontownGlobals.MID_POP_INTL).value, ConfigVariableInt('shard-high-pop', ToontownGlobals.HIGH_POP_INTL).value) else: - return (config.GetInt('shard-low-pop', ToontownGlobals.LOW_POP), config.GetInt('shard-mid-pop', ToontownGlobals.MID_POP), config.GetInt('shard-high-pop', ToontownGlobals.HIGH_POP)) + return (ConfigVariableInt('shard-low-pop', ToontownGlobals.LOW_POP).value, ConfigVariableInt('shard-mid-pop', ToontownGlobals.MID_POP).value, ConfigVariableInt('shard-high-pop', ToontownGlobals.HIGH_POP).value) def playMusic(self, music, looping = 0, interrupt = 1, volume = None, time = 0.0): OTPBase.OTPBase.playMusic(self, music, looping, interrupt, volume, time) From e1c842d2354bcc0a41236447acbb5316d64c93c6 Mon Sep 17 00:00:00 2001 From: Open Toontown <57279094+opentoontown@users.noreply.github.com> Date: Wed, 19 Jan 2022 01:29:37 -0500 Subject: [PATCH 19/49] get rid of more DeprecationWarnings --- otp/avatar/Avatar.py | 4 +- otp/chat/ChatManager.py | 8 +- otp/distributed/OTPClientRepository.py | 124 +++++++++--------- otp/launcher/LauncherBase.py | 6 +- otp/speedchat/SCMenu.py | 10 +- .../distributed/ToontownClientRepository.py | 31 +---- toontown/toonbase/ToontownGlobals.py | 2 +- toontown/toonbase/ToontownStart.py | 2 +- 8 files changed, 78 insertions(+), 109 deletions(-) diff --git a/otp/avatar/Avatar.py b/otp/avatar/Avatar.py index 61a8f0e..4ea6bfd 100644 --- a/otp/avatar/Avatar.py +++ b/otp/avatar/Avatar.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from panda3d.otp import Nametag, NametagGroup from panda3d.otp import CFSpeech, CFThought, CFTimeout, CFPageButton, CFNoQuitButton, CFQuitButton from otp.otpbase import OTPGlobals @@ -12,7 +12,7 @@ from otp.otpbase import OTPRender from otp.otpbase.PythonUtil import recordCreationStack teleportNotify = DirectNotifyGlobal.directNotify.newCategory('Teleport') teleportNotify.showTime = True -if config.GetBool('want-teleport-debug', 1): +if ConfigVariableBool('want-teleport-debug', 1).value: teleportNotify.setDebug(1) def reconsiderAllUnderstandable(): diff --git a/otp/chat/ChatManager.py b/otp/chat/ChatManager.py index 2393133..bd57595 100644 --- a/otp/chat/ChatManager.py +++ b/otp/chat/ChatManager.py @@ -1,7 +1,5 @@ import string -import sys from direct.showbase import DirectObject -from otp.otpbase import OTPGlobals from direct.fsm import ClassicFSM from direct.fsm import State from otp.login import SecretFriendsInfoPanel @@ -10,7 +8,7 @@ from otp.otpbase import OTPLocalizer from direct.directnotify import DirectNotifyGlobal from otp.login import LeaveToPayDialog from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * ChatEvent = 'ChatEvent' NormalChatEvent = 'NormalChatEvent' SCChatEvent = 'SCChatEvent' @@ -39,7 +37,7 @@ def removeThoughtPrefix(message): class ChatManager(DirectObject.DirectObject): notify = DirectNotifyGlobal.directNotify.newCategory('ChatManager') - execChat = base.config.GetBool('exec-chat', 0) + execChat = ConfigVariableBool('exec-chat', 0).value def __init__(self, cr, localAvatar): self.cr = cr @@ -323,7 +321,7 @@ class ChatManager(DirectObject.DirectObject): if self.wantBackgroundFocus: self.chatInputNormal.chatEntry['backgroundFocus'] = 1 self.acceptOnce('enterNormalChat', self.fsm.request, ['whisperChat', [avatarName, avatarId]]) - if base.cr.config.GetBool('force-typed-whisper-enabled', 0): + if ConfigVariableBool('force-typed-whisper-enabled', 0).value: self.whisperButton['state'] = 'normal' self.enablewhisperButton() return diff --git a/otp/distributed/OTPClientRepository.py b/otp/distributed/OTPClientRepository.py index 1fa6f0e..90a2867 100644 --- a/otp/distributed/OTPClientRepository.py +++ b/otp/distributed/OTPClientRepository.py @@ -1,12 +1,9 @@ import sys import time -import string -import types import random import gc import os -from pandac.PandaModules import * -from pandac.PandaModules import * +from panda3d.core import * from direct.gui.DirectGui import * from otp.distributed.OtpDoGlobals import * from direct.interval.IntervalGlobal import ivalMgr @@ -16,20 +13,17 @@ from direct.fsm.ClassicFSM import ClassicFSM from direct.fsm.State import State from direct.task import Task from direct.distributed import DistributedSmoothNode -from direct.showbase import PythonUtil, GarbageReport, BulletinBoardWatcher +from direct.showbase import PythonUtil, GarbageReport from direct.showbase.ContainerLeakDetector import ContainerLeakDetector from direct.showbase import MessengerLeakDetector from direct.showbase.GarbageReportScheduler import GarbageReportScheduler from direct.showbase import LeakDetectors from direct.distributed.PyDatagram import PyDatagram -from direct.distributed.PyDatagramIterator import PyDatagramIterator -from otp.avatar import Avatar from otp.avatar.DistributedPlayer import DistributedPlayer from otp.login import LoginTTSpecificDevAccount from otp.login.CreateAccountScreen import CreateAccountScreen from otp.login import LoginScreen from otp.otpgui import OTPDialog -from otp.avatar import DistributedAvatar from otp.otpbase import OTPLocalizer from otp.login import LoginGSAccount from otp.login import LoginGoAccount @@ -60,7 +54,7 @@ class OTPClientRepository(ClientRepositoryBase): self.launcher = launcher base.launcher = launcher self.__currentAvId = 0 - self.productName = config.GetString('product-name', 'DisneyOnline-US') + self.productName = ConfigVariableString('product-name', 'DisneyOnline-US').value self.createAvatarClass = None self.systemMessageSfx = None reg_deployment = '' @@ -84,7 +78,7 @@ class OTPClientRepository(ClientRepositoryBase): if self.launcher: self.blue = self.launcher.getBlue() - fakeBlue = config.GetString('fake-blue', '') + fakeBlue = ConfigVariableString('fake-blue', '').value if fakeBlue: self.blue = fakeBlue @@ -92,7 +86,7 @@ class OTPClientRepository(ClientRepositoryBase): if self.launcher: self.playToken = self.launcher.getPlayToken() - fakePlayToken = config.GetString('fake-playtoken', '') + fakePlayToken = ConfigVariableString('fake-playtoken', '').value if fakePlayToken: self.playToken = fakePlayToken @@ -100,8 +94,8 @@ class OTPClientRepository(ClientRepositoryBase): if self.launcher: self.DISLToken = self.launcher.getDISLToken() - fakeDISLToken = config.GetString('fake-DISLToken', '') - fakeDISLPlayerName = config.GetString('fake-DISL-PlayerName', '') + fakeDISLToken = ConfigVariableString('fake-DISLToken', '').value + fakeDISLPlayerName = ConfigVariableString('fake-DISL-PlayerName', '').value if fakeDISLToken: self.DISLToken = fakeDISLToken elif fakeDISLPlayerName: @@ -109,39 +103,39 @@ class OTPClientRepository(ClientRepositoryBase): defaultNumAvatars = 4 defaultNumAvatarSlots = 4 defaultNumConcur = 1 - subCount = config.GetInt('fake-DISL-NumSubscriptions', 1) - playerAccountId = config.GetInt('fake-DISL-PlayerAccountId', defaultId) + subCount = ConfigVariableInt('fake-DISL-NumSubscriptions', 1).value + playerAccountId = ConfigVariableInt('fake-DISL-PlayerAccountId', defaultId).value self.DISLToken = ('ACCOUNT_NAME=%s' % fakeDISLPlayerName + '&ACCOUNT_NUMBER=%s' % playerAccountId + - '&ACCOUNT_NAME_APPROVAL=%s' % config.GetString('fake-DISL-PlayerNameApproved', 'YES') + - '&SWID=%s' % config.GetString('fake-DISL-SWID', '{1763AC36-D73F-41C2-A54A-B579E58B69C8}') + - '&FAMILY_NUMBER=%s' % config.GetString('fake-DISL-FamilyAccountId', '-1') + - '&familyAdmin=%s' % config.GetString('fake-DISL-FamilyAdmin', '1') + - '&PIRATES_ACCESS=%s' % config.GetString('fake-DISL-PiratesAccess', 'FULL') + - '&PIRATES_MAX_NUM_AVATARS=%s' % config.GetInt('fake-DISL-MaxAvatars', defaultNumAvatars) + - '&PIRATES_NUM_AVATAR_SLOTS=%s' % config.GetInt('fake-DISL-MaxAvatarSlots', defaultNumAvatarSlots) + - '&expires=%s' % config.GetString('fake-DISL-expire', '1577898000') + - '&OPEN_CHAT_ENABLED=%s' % config.GetString('fake-DISL-OpenChatEnabled', 'YES') + - '&CREATE_FRIENDS_WITH_CHAT=%s' % config.GetString('fake-DISL-CreateFriendsWithChat', 'YES') + - '&CHAT_CODE_CREATION_RULE=%s' % config.GetString('fake-DISL-ChatCodeCreation', 'YES') + - '&FAMILY_MEMBERS=%s' % config.GetString('fake-DISL-FamilyMembers') + '&PIRATES_SUB_COUNT=%s' % subCount) + '&ACCOUNT_NAME_APPROVAL=%s' % ConfigVariableString('fake-DISL-PlayerNameApproved', 'YES').value + + '&SWID=%s' % ConfigVariableString('fake-DISL-SWID', '{1763AC36-D73F-41C2-A54A-B579E58B69C8}').value + + '&FAMILY_NUMBER=%s' % ConfigVariableString('fake-DISL-FamilyAccountId', '-1').value + + '&familyAdmin=%s' % ConfigVariableString('fake-DISL-FamilyAdmin', '1').value + + '&PIRATES_ACCESS=%s' % ConfigVariableString('fake-DISL-PiratesAccess', 'FULL').value + + '&PIRATES_MAX_NUM_AVATARS=%s' % ConfigVariableInt('fake-DISL-MaxAvatars', defaultNumAvatars).value + + '&PIRATES_NUM_AVATAR_SLOTS=%s' % ConfigVariableInt('fake-DISL-MaxAvatarSlots', defaultNumAvatarSlots).value + + '&expires=%s' % ConfigVariableString('fake-DISL-expire', '1577898000').value + + '&OPEN_CHAT_ENABLED=%s' % ConfigVariableString('fake-DISL-OpenChatEnabled', 'YES').value + + '&CREATE_FRIENDS_WITH_CHAT=%s' % ConfigVariableString('fake-DISL-CreateFriendsWithChat', 'YES').value + + '&CHAT_CODE_CREATION_RULE=%s' % ConfigVariableString('fake-DISL-ChatCodeCreation', 'YES').value + + '&FAMILY_MEMBERS=%s' % ConfigVariableString('fake-DISL-FamilyMembers').value + '&PIRATES_SUB_COUNT=%s' % subCount) for i in range(subCount): - self.DISLToken += ('&PIRATES_SUB_%s_ACCESS=%s' % (i, config.GetString('fake-DISL-Sub-%s-Access' % i, 'FULL')) + - '&PIRATES_SUB_%s_ACTIVE=%s' % (i, config.GetString('fake-DISL-Sub-%s-Active' % i, 'YES')) + - '&PIRATES_SUB_%s_ID=%s' % (i, config.GetInt('fake-DISL-Sub-%s-Id' % i, playerAccountId) + config.GetInt('fake-DISL-Sub-Id-Offset', 0)) + - '&PIRATES_SUB_%s_LEVEL=%s' % (i, config.GetInt('fake-DISL-Sub-%s-Level' % i, 3)) + - '&PIRATES_SUB_%s_NAME=%s' % (i, config.GetString('fake-DISL-Sub-%s-Name' % i, fakeDISLPlayerName)) + - '&PIRATES_SUB_%s_NUM_AVATARS=%s' % (i, config.GetInt('fake-DISL-Sub-%s-NumAvatars' % i, defaultNumAvatars)) + - '&PIRATES_SUB_%s_NUM_CONCUR=%s' % (i, config.GetInt('fake-DISL-Sub-%s-NumConcur' % i, defaultNumConcur)) + - '&PIRATES_SUB_%s_OWNERID=%s' % (i, config.GetInt('fake-DISL-Sub-%s-OwnerId' % i, playerAccountId)) + - '&PIRATES_SUB_%s_FOUNDER=%s' % (i, config.GetString('fake-DISL-Sub-%s-Founder' % i, 'YES'))) + self.DISLToken += ('&PIRATES_SUB_%s_ACCESS=%s' % (i, ConfigVariableString('fake-DISL-Sub-%s-Access' % i, 'FULL').value) + + '&PIRATES_SUB_%s_ACTIVE=%s' % (i, ConfigVariableString('fake-DISL-Sub-%s-Active' % i, 'YES').value) + + '&PIRATES_SUB_%s_ID=%s' % (i, ConfigVariableInt('fake-DISL-Sub-%s-Id' % i, playerAccountId).value + ConfigVariableInt('fake-DISL-Sub-Id-Offset', 0).value) + + '&PIRATES_SUB_%s_LEVEL=%s' % (i, ConfigVariableInt('fake-DISL-Sub-%s-Level' % i, 3).value) + + '&PIRATES_SUB_%s_NAME=%s' % (i, ConfigVariableString('fake-DISL-Sub-%s-Name' % i, fakeDISLPlayerName).value) + + '&PIRATES_SUB_%s_NUM_AVATARS=%s' % (i, ConfigVariableInt('fake-DISL-Sub-%s-NumAvatars' % i, defaultNumAvatars).value) + + '&PIRATES_SUB_%s_NUM_CONCUR=%s' % (i, ConfigVariableInt('fake-DISL-Sub-%s-NumConcur' % i, defaultNumConcur).value) + + '&PIRATES_SUB_%s_OWNERID=%s' % (i, ConfigVariableInt('fake-DISL-Sub-%s-OwnerId' % i, playerAccountId).value) + + '&PIRATES_SUB_%s_FOUNDER=%s' % (i, ConfigVariableString('fake-DISL-Sub-%s-Founder' % i, 'YES').value)) - self.DISLToken += ('&WL_CHAT_ENABLED=%s' % config.GetString('fake-DISL-WLChatEnabled', 'YES') + + self.DISLToken += ('&WL_CHAT_ENABLED=%s' % ConfigVariableString('fake-DISL-WLChatEnabled', 'YES').value + '&valid=true') if base.logPrivateInfo: print(self.DISLToken) - self.requiredLogin = config.GetString('required-login', 'auto') + self.requiredLogin = ConfigVariableString('required-login', 'auto').value if self.requiredLogin == 'auto': self.notify.info('required-login auto.') elif self.requiredLogin == 'green': @@ -167,10 +161,10 @@ class OTPClientRepository(ClientRepositoryBase): else: self.http = HTTPClient() - self.accountOldAuth = config.GetBool('account-old-auth', 0) - self.accountOldAuth = config.GetBool('%s-account-old-auth' % game.name, - self.accountOldAuth) - self.useNewTTDevLogin = base.config.GetBool('use-tt-specific-dev-login', False) + self.accountOldAuth = ConfigVariableBool('account-old-auth', 0).value + self.accountOldAuth = ConfigVariableBool('%s-account-old-auth' % game.name, + self.accountOldAuth).value + self.useNewTTDevLogin = ConfigVariableBool('use-tt-specific-dev-login', False).value if __astron__: self.loginInterface = LoginAstronAccount.LoginAstronAccount(self) self.notify.info('loginInterface: LoginAstronAccount') @@ -193,11 +187,11 @@ class OTPClientRepository(ClientRepositoryBase): self.loginInterface = LoginTTAccount.LoginTTAccount(self) self.notify.info('loginInterface: LoginTTAccount') - self.secretChatAllowed = base.config.GetBool('allow-secret-chat', 0) - self.openChatAllowed = base.config.GetBool('allow-open-chat', 0) - self.secretChatNeedsParentPassword = base.config.GetBool('secret-chat-needs-parent-password', 0) or (self.launcher and self.launcher.getNeedPwForSecretKey()) - self.parentPasswordSet = base.config.GetBool('parent-password-set', 0) or (self.launcher and self.launcher.getParentPasswordSet()) - self.userSignature = base.config.GetString('signature', 'none') + self.secretChatAllowed = ConfigVariableBool('allow-secret-chat', 0).value + self.openChatAllowed = ConfigVariableBool('allow-open-chat', 0).value + self.secretChatNeedsParentPassword = ConfigVariableBool('secret-chat-needs-parent-password', 0).value or (self.launcher and self.launcher.getNeedPwForSecretKey()) + self.parentPasswordSet = ConfigVariableBool('parent-password-set', 0).value or (self.launcher and self.launcher.getParentPasswordSet()) + self.userSignature = ConfigVariableString('signature', 'none').value self.freeTimeExpiresAt = -1 self.__isPaid = 0 self.periodTimerExpired = 0 @@ -206,18 +200,18 @@ class OTPClientRepository(ClientRepositoryBase): self.parentMgr.registerParent(OTPGlobals.SPRender, base.render) self.parentMgr.registerParent(OTPGlobals.SPHidden, NodePath()) self.timeManager = None - if config.GetBool('detect-leaks', 0) or config.GetBool('client-detect-leaks', 0): + if ConfigVariableBool('detect-leaks', 0).value or ConfigVariableBool('client-detect-leaks', 0).value: self.startLeakDetector() - if config.GetBool('detect-messenger-leaks', 0) or config.GetBool('ai-detect-messenger-leaks', 0): + if ConfigVariableBool('detect-messenger-leaks', 0).value or ConfigVariableBool('ai-detect-messenger-leaks', 0).value: self.messengerLeakDetector = MessengerLeakDetector.MessengerLeakDetector('client messenger leak detector') - if config.GetBool('leak-messages', 0): + if ConfigVariableBool('leak-messages', 0).value: MessengerLeakDetector._leakMessengerObject() - if config.GetBool('run-garbage-reports', 0) or config.GetBool('client-run-garbage-reports', 0): + if ConfigVariableBool('run-garbage-reports', 0).value or ConfigVariableBool('client-run-garbage-reports', 0).value: noneValue = -1.0 - reportWait = config.GetFloat('garbage-report-wait', noneValue) - reportWaitScale = config.GetFloat('garbage-report-wait-scale', noneValue) + reportWait = ConfigVariableDouble('garbage-report-wait', noneValue).value + reportWaitScale = ConfigVariableDouble('garbage-report-wait-scale', noneValue).value if reportWait == noneValue: reportWait = 60.0 * 2.0 if reportWaitScale == noneValue: @@ -225,8 +219,8 @@ class OTPClientRepository(ClientRepositoryBase): self.garbageReportScheduler = GarbageReportScheduler(waitBetween=reportWait, waitScale=reportWaitScale) - self._proactiveLeakChecks = config.GetBool('proactive-leak-checks', 1) or config.GetBool('client-proactive-leak-checks', 1) - self._crashOnProactiveLeakDetect = config.GetBool('crash-on-proactive-leak-detect', 1) + self._proactiveLeakChecks = ConfigVariableBool('proactive-leak-checks', 1).value or ConfigVariableBool('client-proactive-leak-checks', 1).value + self._crashOnProactiveLeakDetect = ConfigVariableBool('crash-on-proactive-leak-detect', 1).value self.activeDistrictMap = {} self.telemetryLimiter = TelemetryLimiter() self.serverVersion = serverVersion @@ -415,8 +409,8 @@ class OTPClientRepository(ClientRepositoryBase): self.playGame = playGame(self.gameFSM, self.gameDoneEvent) self.shardListHandle = None self.uberZoneInterest = None - self.wantSwitchboard = config.GetBool('want-switchboard', 0) - self.wantSwitchboardHacks = base.config.GetBool('want-switchboard-hacks', 0) + self.wantSwitchboard = ConfigVariableBool('want-switchboard', 0).value + self.wantSwitchboardHacks = ConfigVariableBool('want-switchboard-hacks', 0).value self.__pendingGenerates = {} self.__pendingMessages = {} self.__doId2pendingInterest = {} @@ -427,7 +421,7 @@ class OTPClientRepository(ClientRepositoryBase): def startLeakDetector(self): if hasattr(self, 'leakDetector'): return False - firstCheckDelay = config.GetFloat('leak-detector-first-check-delay', 2 * 60.0) + firstCheckDelay = ConfigVariableDouble('leak-detector-first-check-delay', 2 * 60.0).value self.leakDetector = ContainerLeakDetector('client container leak detector', firstCheckDelay=firstCheckDelay) self.objectTypesLeakDetector = LeakDetectors.ObjectTypesLeakDetector() self.garbageLeakDetector = LeakDetectors.GarbageLeakDetector() @@ -685,7 +679,7 @@ class OTPClientRepository(ClientRepositoryBase): @report(types=['args', 'deltaStamp'], dConfigParam='teleport') def waitForGetGameListResponse(self): if self.isGameListCorrect(): - if base.config.GetBool('game-server-tests', 0): + if ConfigVariableBool('game-server-tests', 0).value: from otp.distributed import GameServerTestSuite GameServerTestSuite.GameServerTestSuite(self) self.loginFSM.request('waitForShardList') @@ -1207,7 +1201,7 @@ class OTPClientRepository(ClientRepositoryBase): else: logFunc = self.notify.warning allowExit = False - if base.config.GetBool('direct-gui-edit', 0): + if ConfigVariableBool('direct-gui-edit', 0).value: logFunc('There are leaks: %s tasks, %s events, %s ivals, %s garbage cycles\nLeaked Events may be due to direct gui editing' % (leakedTasks, leakedEvents, leakedIvals, @@ -1624,7 +1618,7 @@ class OTPClientRepository(ClientRepositoryBase): avId = self.handlerArgs['avId'] if not self.SupportTutorial or base.localAvatar.tutorialAck: self.gameFSM.request('playGame', [hoodId, zoneId, avId]) - elif base.config.GetBool('force-tutorial', 1): + elif ConfigVariableBool('force-tutorial', 1).value: if hasattr(self, 'skipTutorialRequest') and self.skipTutorialRequest: self.gameFSM.request('playGame', [hoodId, zoneId, avId]) self.gameFSM.request('skipTutorialRequest', [hoodId, zoneId, avId]) @@ -1698,9 +1692,9 @@ class OTPClientRepository(ClientRepositoryBase): def isFreeTimeExpired(self): if self.accountOldAuth: return 0 - if base.config.GetBool('free-time-expired', 0): + if ConfigVariableBool('free-time-expired', 0).value: return 1 - if base.config.GetBool('unlimited-free-time', 0): + if ConfigVariableBool('unlimited-free-time', 0).value: return 0 if self.freeTimeExpiresAt == -1: return 0 @@ -1726,7 +1720,7 @@ class OTPClientRepository(ClientRepositoryBase): return self.blue != None def isPaid(self): - paidStatus = base.config.GetString('force-paid-status', '') + paidStatus = ConfigVariableString('force-paid-status', '').value if not paidStatus: return self.__isPaid elif paidStatus == 'paid': @@ -1744,7 +1738,7 @@ class OTPClientRepository(ClientRepositoryBase): self.__isPaid = isPaid def allowFreeNames(self): - return base.config.GetInt('allow-free-names', 1) + return ConfigVariableInt('allow-free-names', 1).value def allowSecretChat(self): return self.secretChatAllowed or self.productName == 'Terra-DMC' and self.isBlue() and self.secretChatAllowed diff --git a/otp/launcher/LauncherBase.py b/otp/launcher/LauncherBase.py index ee99a22..b10bc7c 100644 --- a/otp/launcher/LauncherBase.py +++ b/otp/launcher/LauncherBase.py @@ -65,15 +65,13 @@ class LauncherBase(DirectObject): print('Current time: ' + time.asctime(time.localtime(time.time())) + ' ' + time.tzname[0]) print('sys.path = ', sys.path) print('sys.argv = ', sys.argv) - launcherConfig = DConfig - builtins.config = launcherConfig - if config.GetBool('log-private-info', 0): + if ConfigVariableBool('log-private-info', 0).value: print('os.environ = ', os.environ) self.miniTaskMgr = MiniTaskManager() self.nout = MultiplexStream() Notify.ptr().setOstreamPtr(self.nout, 0) self.nout.addFile(Filename(logfile)) - if launcherConfig.GetBool('console-output', 0): + if ConfigVariableBool('console-output', 0).value: self.nout.addStandardOutput() sys.stdout.console = True sys.stderr.console = True diff --git a/otp/speedchat/SCMenu.py b/otp/speedchat/SCMenu.py index 7c37760..84e458c 100644 --- a/otp/speedchat/SCMenu.py +++ b/otp/speedchat/SCMenu.py @@ -1,17 +1,15 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.gui.DirectGui import * from direct.task import Task from .SCConstants import * from direct.interval.IntervalGlobal import * from .SCObject import SCObject from direct.showbase.PythonUtil import makeTuple -import types class SCMenu(SCObject, NodePath): - config = getConfigShowbase() - SpeedChatRolloverTolerance = config.GetFloat('speedchat-rollover-tolerance', 0.08) - WantFade = config.GetBool('want-speedchat-fade', 0) - FadeDuration = config.GetFloat('speedchat-fade-duration', 0.2) + SpeedChatRolloverTolerance = ConfigVariableDouble('speedchat-rollover-tolerance', 0.08).value + WantFade = ConfigVariableBool('want-speedchat-fade', 0).value + FadeDuration = ConfigVariableDouble('speedchat-fade-duration', 0.2).value SerialNum = 0 BackgroundModelName = None GuiModelName = None diff --git a/toontown/distributed/ToontownClientRepository.py b/toontown/distributed/ToontownClientRepository.py index c614745..d2e8764 100644 --- a/toontown/distributed/ToontownClientRepository.py +++ b/toontown/distributed/ToontownClientRepository.py @@ -1,31 +1,14 @@ -import time -from pandac.PandaModules import * +from panda3d.core import * from direct.distributed.ClockDelta import * from direct.gui.DirectGui import * -from pandac.PandaModules import * from direct.interval.IntervalGlobal import ivalMgr -from direct.directnotify import DirectNotifyGlobal -from direct.distributed import DistributedSmoothNode from direct.distributed.PyDatagram import PyDatagram from direct.distributed.PyDatagramIterator import PyDatagramIterator -from direct.task import Task -from direct.fsm import ClassicFSM from direct.fsm import State from direct.showbase.PythonUtil import Functor, ScratchPad -from direct.showbase.InputStateGlobal import inputState from otp.avatar import Avatar -from otp.avatar import DistributedAvatar -from otp.friends import FriendManager -from otp.login import LoginScreen -from otp.login import LoginGSAccount -from otp.login import LoginGoAccount -from otp.login import LoginWebPlayTokenAccount -from otp.login import LoginTTAccount -from otp.login import HTTPUtil from otp.distributed import OTPClientRepository from otp.distributed import PotentialAvatar -from otp.distributed import PotentialShard -from otp.distributed import DistributedDistrict from otp.distributed.OtpDoGlobals import * from otp.distributed import OtpDoGlobals from otp.otpbase import OTPGlobals @@ -39,7 +22,6 @@ from toontown.distributed import DelayDelete from toontown.friends import FriendHandle from toontown.friends import FriendsListPanel from toontown.friends import ToontownFriendSecret -from toontown.uberdog import TTSpeedchatRelay from toontown.login import DateObject from toontown.login import AvatarChooser from toontown.makeatoon import MakeAToon @@ -49,7 +31,6 @@ from toontown.toontowngui import TTDialog from toontown.toon import LocalToon from toontown.toon import ToonDNA from toontown.distributed import ToontownDistrictStats -from toontown.makeatoon import TTPickANamePattern from toontown.parties import ToontownTimeManager from toontown.toon import Toon, DistributedToon from .ToontownMsgTypes import * @@ -101,7 +82,7 @@ class ToontownClientRepository(OTPClientRepository.OTPClientRepository): self.playerFriendsManager = self.generateGlobalObject(OtpDoGlobals.OTP_DO_ID_PLAYER_FRIENDS_MANAGER, 'TTPlayerFriendsManager') 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): + if ConfigVariableBool('want-code-redemption', 1).value: self.codeRedemptionManager = self.generateGlobalObject(OtpDoGlobals.OTP_DO_ID_TOONTOWN_CODE_REDEMPTION_MANAGER, 'TTCodeRedemptionMgr') self.streetSign = None self.furnitureManager = None @@ -127,9 +108,9 @@ class ToontownClientRepository(OTPClientRepository.OTPClientRepository): state.addTransition('skipTutorialRequest') state = self.gameFSM.getStateNamed('playGame') state.addTransition('skipTutorialRequest') - self.wantCogdominiums = base.config.GetBool('want-cogdominiums', 1) - self.wantEmblems = base.config.GetBool('want-emblems', 0) - if base.config.GetBool('tt-node-check', 0): + self.wantCogdominiums = ConfigVariableBool('want-cogdominiums', 1).value + self.wantEmblems = ConfigVariableBool('want-emblems', 0).value + if ConfigVariableBool('tt-node-check', 0).value: for species in ToonDNA.toonSpeciesTypes: for head in ToonDNA.getHeadList(species): for torso in ToonDNA.toonTorsoTypes: @@ -231,7 +212,7 @@ class ToontownClientRepository(OTPClientRepository.OTPClientRepository): self.avChoice.load(self.isPaid()) self.avChoice.enter() self.accept(self.avChoiceDoneEvent, self.__handleAvatarChooserDone, [avList]) - if config.GetBool('want-gib-loader', 1): + if ConfigVariableBool('want-gib-loader', 1).value: self.loadingBlocker = ToontownLoadingBlocker.ToontownLoadingBlocker(avList) return diff --git a/toontown/toonbase/ToontownGlobals.py b/toontown/toonbase/ToontownGlobals.py index 11e1689..e5ea232 100644 --- a/toontown/toonbase/ToontownGlobals.py +++ b/toontown/toonbase/ToontownGlobals.py @@ -1,7 +1,7 @@ from . import TTLocalizer from otp.otpbase.OTPGlobals import * from direct.showbase.PythonUtil import Enum, invertDict -from pandac.PandaModules import BitMask32, Vec4 +from panda3d.core import BitMask32, Vec4 MapHotkeyOn = 'alt' MapHotkeyOff = 'alt-up' MapHotkey = 'alt' diff --git a/toontown/toonbase/ToontownStart.py b/toontown/toonbase/ToontownStart.py index ef358d1..6ecda03 100644 --- a/toontown/toonbase/ToontownStart.py +++ b/toontown/toonbase/ToontownStart.py @@ -71,7 +71,7 @@ if base.musicManagerIsValid: else: music = None from direct.gui.DirectGui import * -serverVersion = base.config.GetString('server-version', 'no_version_set') +serverVersion = ConfigVariableString('server-version', 'no_version_set').value print('ToontownStart: serverVersion: ', serverVersion) version = OnscreenText(serverVersion, pos=(-1.3, -0.975), scale=0.06, fg=Vec4(0, 0, 1, 0.6), align=TextNode.ALeft) loader.beginBulkLoad('init', TTLocalizer.LoaderLabel, 138, 0, TTLocalizer.TIP_NONE) From 8df97582b28d13f069d445f28401bab78ca6d861 Mon Sep 17 00:00:00 2001 From: Open Toontown <57279094+opentoontown@users.noreply.github.com> Date: Wed, 19 Jan 2022 14:31:52 -0500 Subject: [PATCH 20/49] more DeprecationWarning removal --- otp/avatar/DistributedPlayer.py | 16 ++++++---------- otp/avatar/LocalAvatar.py | 23 ++++++++--------------- otp/chat/TalkAssistant.py | 6 +++--- otp/login/LoginScreen.py | 11 +++++------ toontown/battle/BattleBase.py | 8 ++------ toontown/battle/BattleProps.py | 4 ++-- toontown/toon/NPCToons.py | 8 +++----- toontown/toon/Toon.py | 32 ++++++++++++++------------------ toontown/toon/ToonHead.py | 19 +++++++++---------- 9 files changed, 52 insertions(+), 75 deletions(-) diff --git a/otp/avatar/DistributedPlayer.py b/otp/avatar/DistributedPlayer.py index dbfa9c5..b7f6a5c 100644 --- a/otp/avatar/DistributedPlayer.py +++ b/otp/avatar/DistributedPlayer.py @@ -1,20 +1,16 @@ -from pandac.PandaModules import * +from panda3d.core import * from panda3d.otp import WhisperPopup from panda3d.otp import CFQuicktalker, CFPageButton, CFQuitButton, CFSpeech, CFThought, CFTimeout from otp.chat import ChatGarbler -import string -from direct.task import Task from otp.otpbase import OTPLocalizer from otp.speedchat import SCDecoders -from direct.showbase import PythonUtil from otp.avatar import DistributedAvatar -import time from otp.avatar import Avatar, PlayerBase from otp.chat import TalkAssistant from otp.otpbase import OTPGlobals from otp.avatar.Avatar import teleportNotify from otp.distributed.TelemetryLimited import TelemetryLimited -if base.config.GetBool('want-chatfilter-hacks', 0): +if ConfigVariableBool('want-chatfilter-hacks', 0).value: from otp.switchboard import badwordpy import os badwordpy.init(os.environ.get('OTP') + '\\src\\switchboard\\', '') @@ -44,7 +40,7 @@ class DistributedPlayer(DistributedAvatar.DistributedAvatar, PlayerBase.PlayerBa self.DISLid = 0 self.accessLevel = 0 self.autoRun = 0 - self.whiteListEnabled = base.config.GetBool('whitelist-chat-enabled', 1) + self.whiteListEnabled = ConfigVariableBool('whitelist-chat-enabled', 1).value return @@ -224,8 +220,8 @@ class DistributedPlayer(DistributedAvatar.DistributedAvatar, PlayerBase.PlayerBa if self.cr.wantMagicWords and len(chatString) > 0 and chatString[0] == '~': messenger.send('magicWord', [chatString]) else: - if base.config.GetBool('want-chatfilter-hacks', 0): - if base.config.GetBool('want-chatfilter-drop-offending', 0): + if ConfigVariableBool('want-chatfilter-hacks', 0).value: + if ConfigVariableBool('want-chatfilter-drop-offending', 0).value: if badwordpy.test(chatString): return else: @@ -351,7 +347,7 @@ class DistributedPlayer(DistributedAvatar.DistributedAvatar, PlayerBase.PlayerBa teleportNotify.debug('party is ending') self.d_teleportResponse(self.doId, 0, 0, 0, 0, sendToId=requesterId) return - if self.__teleportAvailable and not self.ghostMode and base.config.GetBool('can-be-teleported-to', 1): + if self.__teleportAvailable and not self.ghostMode and ConfigVariableBool('can-be-teleported-to', 1).value: teleportNotify.debug('teleport initiation successful') self.setSystemMessage(requesterId, OTPLocalizer.WhisperComingToVisit % avatar.getName()) messenger.send('teleportQuery', [avatar, self]) diff --git a/otp/avatar/LocalAvatar.py b/otp/avatar/LocalAvatar.py index 31cfd45..2b689cc 100644 --- a/otp/avatar/LocalAvatar.py +++ b/otp/avatar/LocalAvatar.py @@ -1,40 +1,33 @@ -from pandac.PandaModules import * +from panda3d.core import * from panda3d.otp import Nametag, WhisperPopup from direct.gui.DirectGui import * from direct.showbase.PythonUtil import * from direct.interval.IntervalGlobal import * from direct.showbase.InputStateGlobal import inputState -from pandac.PandaModules import * -from . import Avatar from direct.controls import ControlManager from . import DistributedAvatar from direct.task import Task -from . import PositionExaminer from otp.otpbase import OTPGlobals -from otp.otpbase import OTPRender import math -import string import random from direct.directnotify import DirectNotifyGlobal from direct.distributed import DistributedSmoothNode -from direct.gui import DirectGuiGlobals from otp.otpbase import OTPLocalizer from direct.controls.GhostWalker import GhostWalker from direct.controls.GravityWalker import GravityWalker from direct.controls.ObserverWalker import ObserverWalker -from direct.controls.PhysicsWalker import PhysicsWalker from direct.controls.SwimWalker import SwimWalker from direct.controls.TwoDWalker import TwoDWalker class LocalAvatar(DistributedAvatar.DistributedAvatar, DistributedSmoothNode.DistributedSmoothNode): notify = DirectNotifyGlobal.directNotify.newCategory('LocalAvatar') - wantDevCameraPositions = base.config.GetBool('want-dev-camera-positions', 0) - wantMouse = base.config.GetBool('want-mouse', 0) - sleepTimeout = base.config.GetInt('sleep-timeout', 120) - swimTimeout = base.config.GetInt('afk-timeout', 600) - __enableMarkerPlacement = base.config.GetBool('place-markers', 0) - acceptingNewFriends = base.config.GetBool('accepting-new-friends', 1) - acceptingNonFriendWhispers = base.config.GetBool('accepting-non-friend-whispers', 0) + wantDevCameraPositions = ConfigVariableBool('want-dev-camera-positions', 0).value + wantMouse = ConfigVariableBool('want-mouse', 0).value + sleepTimeout = ConfigVariableInt('sleep-timeout', 120).value + swimTimeout = ConfigVariableInt('afk-timeout', 600).value + __enableMarkerPlacement = ConfigVariableBool('place-markers', 0).value + acceptingNewFriends = ConfigVariableBool('accepting-new-friends', 1).value + acceptingNonFriendWhispers = ConfigVariableBool('accepting-non-friend-whispers', 0).value def __init__(self, cr, chatMgr, talkAssistant = None, passMessagesThrough = False): try: diff --git a/otp/chat/TalkAssistant.py b/otp/chat/TalkAssistant.py index 2118a8e..66464d9 100644 --- a/otp/chat/TalkAssistant.py +++ b/otp/chat/TalkAssistant.py @@ -4,7 +4,7 @@ from otp.otpbase import OTPLocalizer from direct.directnotify import DirectNotifyGlobal from otp.otpbase import OTPGlobals from otp.speedchat import SCDecoders -from pandac.PandaModules import * +from panda3d.core import * from otp.chat.TalkMessage import TalkMessage from otp.chat.TalkHandle import TalkHandle import time @@ -16,7 +16,7 @@ ThoughtPrefix = '.' class TalkAssistant(DirectObject.DirectObject): ExecNamespace = None notify = DirectNotifyGlobal.directNotify.newCategory('TalkAssistant') - execChat = base.config.GetBool('exec-chat', 0) + execChat = ConfigVariableBool('exec-chat', 0).value def __init__(self): self.logWhispers = 1 @@ -25,7 +25,7 @@ class TalkAssistant(DirectObject.DirectObject): self.zeroTimeDay = time.time() self.zeroTimeGame = globalClock.getRealTime() self.floodThreshold = 10.0 - self.useWhiteListFilter = base.config.GetBool('white-list-filter-openchat', 0) + self.useWhiteListFilter = ConfigVariableBool('white-list-filter-openchat', 0).value self.lastWhisperDoId = None self.lastWhisperPlayerId = None self.lastWhisper = None diff --git a/otp/login/LoginScreen.py b/otp/login/LoginScreen.py index d0aa927..b13be96 100644 --- a/otp/login/LoginScreen.py +++ b/otp/login/LoginScreen.py @@ -2,14 +2,13 @@ import json import os import time from datetime import datetime -from pandac.PandaModules import * +from panda3d.core import * from direct.distributed.MsgTypes import * from direct.gui.DirectGui import * from direct.fsm import StateData from direct.fsm import ClassicFSM from direct.fsm import State from direct.directnotify import DirectNotifyGlobal -from direct.task import Task from otp.otpgui import OTPDialog from otp.otpbase import OTPLocalizer from otp.otpbase import OTPGlobals @@ -17,8 +16,8 @@ from otp.uberdog.AccountDetailRecord import AccountDetailRecord, SubDetailRecord from . import GuiScreen class LoginScreen(StateData.StateData, GuiScreen.GuiScreen): - AutoLoginName = base.config.GetString('%s-auto-login%s' % (game.name, os.getenv('otp_client', '')), '') - AutoLoginPassword = base.config.GetString('%s-auto-password%s' % (game.name, os.getenv('otp_client', '')), '') + AutoLoginName = ConfigVariableString('%s-auto-login%s' % (game.name, os.getenv('otp_client', '')), '').value + AutoLoginPassword = ConfigVariableString('%s-auto-password%s' % (game.name, os.getenv('otp_client', '')), '').value notify = DirectNotifyGlobal.directNotify.newCategory('LoginScreen') ActiveEntryColor = Vec4(1, 1, 1, 1) InactiveEntryColor = Vec4(0.8, 0.8, 0.8, 1) @@ -439,11 +438,11 @@ class LoginScreen(StateData.StateData, GuiScreen.GuiScreen): self.cr.whiteListChatEnabled = 1 else: self.cr.whiteListChatEnabled = 0 - self.lastLoggedInStr = base.config.GetString('last-logged-in', '') + self.lastLoggedInStr = ConfigVariableString('last-logged-in', '').value self.cr.lastLoggedIn = datetime.now() if hasattr(self.cr, 'toontownTimeManager'): self.cr.lastLoggedIn = self.cr.toontownTimeManager.convertStrToToontownTime(self.lastLoggedInStr) - self.cr.withParentAccount = base.config.GetBool('dev-with-parent-account', 0) + self.cr.withParentAccount = ConfigVariableBool('dev-with-parent-account', 0).value self.notify.info('Login response return code %s' % returnCode) if returnCode == 0: self.__handleLoginSuccess() diff --git a/toontown/battle/BattleBase.py b/toontown/battle/BattleBase.py index 37f883a..eb08e4f 100644 --- a/toontown/battle/BattleBase.py +++ b/toontown/battle/BattleBase.py @@ -1,7 +1,6 @@ -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase.ToontownBattleGlobals import * from direct.task.Timer import * -import math import functools from direct.directnotify import DirectNotifyGlobal from toontown.toon import NPCToons @@ -58,10 +57,7 @@ TOON_FIRE_SUIT_DELAY = 1.0 REWARD_TIMEOUT = 120 FLOOR_REWARD_TIMEOUT = 4 BUILDING_REWARD_TIMEOUT = 300 -try: - CLIENT_INPUT_TIMEOUT = base.config.GetFloat('battle-input-timeout', TTLocalizer.BBbattleInputTimeout) -except: - CLIENT_INPUT_TIMEOUT = simbase.config.GetFloat('battle-input-timeout', TTLocalizer.BBbattleInputTimeout) +CLIENT_INPUT_TIMEOUT = ConfigVariableDouble('battle-input-timeout', TTLocalizer.BBbattleInputTimeout).value def levelAffectsGroup(track, level): return attackAffectsGroup(track, level) diff --git a/toontown/battle/BattleProps.py b/toontown/battle/BattleProps.py index d717b37..d4033fb 100644 --- a/toontown/battle/BattleProps.py +++ b/toontown/battle/BattleProps.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.actor import Actor from direct.directnotify import DirectNotifyGlobal from otp.otpbase import OTPGlobals @@ -237,7 +237,7 @@ class PropPool: self.propCache = [] self.propStrings = {} self.propTypes = {} - self.maxPoolSize = base.config.GetInt('prop-pool-size', 8) + self.maxPoolSize = ConfigVariableInt('prop-pool-size', 8).value for p in Props: phase = p[0] propName = p[1] diff --git a/toontown/toon/NPCToons.py b/toontown/toon/NPCToons.py index f56e0fc..eb53801 100644 --- a/toontown/toon/NPCToons.py +++ b/toontown/toon/NPCToons.py @@ -1,13 +1,11 @@ -from pandac.PandaModules import * +from panda3d.core import * from panda3d.otp import * from toontown.toonbase import ToontownGlobals -import random from toontown.hood import ZoneUtil from . import ToonDNA from toontown.toonbase import TTLocalizer from toontown.toonbase import ToontownBattleGlobals -import sys, os -import string +import os QUEST_MOVIE_CLEAR = 0 QUEST_MOVIE_REJECT = 1 QUEST_MOVIE_COMPLETE = 2 @@ -11488,7 +11486,7 @@ try: except: config = base.config -if config.GetBool('want-new-toonhall', 1): +if ConfigVariableBool('want-new-toonhall', 1).value: NPCToonDict[2001] = (2513, lnames[2001], ('dss', diff --git a/toontown/toon/Toon.py b/toontown/toon/Toon.py index ea017e2..28d2c6a 100644 --- a/toontown/toon/Toon.py +++ b/toontown/toon/Toon.py @@ -4,25 +4,21 @@ from . import ToonDNA from direct.task.Task import Task from toontown.suit import SuitDNA from direct.actor import Actor -import string from .ToonHead import * -from pandac.PandaModules import * +from panda3d.core import * from panda3d.otp import * from direct.interval.IntervalGlobal import * from direct.directnotify import DirectNotifyGlobal from toontown.toonbase import ToontownGlobals from otp.otpbase import OTPLocalizer from toontown.toonbase import TTLocalizer -import random from toontown.effects import Wake -from . import TTEmote from otp.avatar import Emote from . import Motion from toontown.hood import ZoneUtil from toontown.battle import SuitBattleGlobals from otp.otpbase import OTPGlobals from toontown.effects import DustCloud -from direct.showbase.PythonUtil import Functor from toontown.distributed import DelayDelete from . import AccessoryGlobals import importlib @@ -164,7 +160,7 @@ Phase6AnimList = (('headdown-putt', 'headdown-putt'), Phase9AnimList = (('push', 'push'),) Phase10AnimList = (('leverReach', 'leverReach'), ('leverPull', 'leverPull'), ('leverNeutral', 'leverNeutral')) Phase12AnimList = () -if not base.config.GetBool('want-new-anims', 1): +if not ConfigVariableBool('want-new-anims', 1).value: LegDict = {'s': '/models/char/dogSS_Shorts-legs-', 'm': '/models/char/dogMM_Shorts-legs-', 'l': '/models/char/dogLL_Shorts-legs-'} @@ -193,7 +189,7 @@ else: def loadModels(): global Preloaded - preloadAvatars = base.config.GetBool('preload-avatars', 0) + preloadAvatars = ConfigVariableBool('preload-avatars', 0).value if preloadAvatars: def loadTex(path): @@ -461,7 +457,7 @@ def unloadDialog(): class Toon(Avatar.Avatar, ToonHead): notify = DirectNotifyGlobal.directNotify.newCategory('Toon') - afkTimeout = base.config.GetInt('afk-timeout', 600) + afkTimeout = ConfigVariableInt('afk-timeout', 600).value def __init__(self): try: @@ -648,7 +644,7 @@ class Toon(Avatar.Avatar, ToonHead): def parentToonParts(self): if self.hasLOD(): for lodName in self.getLODNames(): - if base.config.GetBool('want-new-anims', 1): + if ConfigVariableBool('want-new-anims', 1).value: if not self.getPart('torso', lodName).find('**/def_head').isEmpty(): self.attach('head', 'torso', 'def_head', lodName) else: @@ -675,12 +671,12 @@ class Toon(Avatar.Avatar, ToonHead): def setLODs(self): self.setLODNode() - levelOneIn = base.config.GetInt('lod1-in', 20) - levelOneOut = base.config.GetInt('lod1-out', 0) - levelTwoIn = base.config.GetInt('lod2-in', 80) - levelTwoOut = base.config.GetInt('lod2-out', 20) - levelThreeIn = base.config.GetInt('lod3-in', 280) - levelThreeOut = base.config.GetInt('lod3-out', 80) + levelOneIn = ConfigVariableInt('lod1-in', 20).value + levelOneOut = ConfigVariableInt('lod1-out', 0).value + levelTwoIn = ConfigVariableInt('lod2-in', 80).value + levelTwoOut = ConfigVariableInt('lod2-out', 20).value + levelThreeIn = ConfigVariableInt('lod3-in', 280).value + levelThreeOut = ConfigVariableInt('lod3-out', 80).value self.addLOD(1000, levelOneIn, levelOneOut) self.addLOD(500, levelTwoIn, levelTwoOut) self.addLOD(250, levelThreeIn, levelThreeOut) @@ -705,14 +701,14 @@ class Toon(Avatar.Avatar, ToonHead): self.leftHand = None for lodName in self.getLODNames(): hand = self.getPart('torso', lodName).find('**/joint_Rhold') - if base.config.GetBool('want-new-anims', 1): + if ConfigVariableBool('want-new-anims', 1).value: if not self.getPart('torso', lodName).find('**/def_joint_right_hold').isEmpty(): hand = self.getPart('torso', lodName).find('**/def_joint_right_hold') else: hand = self.getPart('torso', lodName).find('**/joint_Rhold') self.rightHands.append(hand) rightHand = rightHand.instanceTo(hand) - if base.config.GetBool('want-new-anims', 1): + if ConfigVariableBool('want-new-anims', 1).value: if not self.getPart('torso', lodName).find('**/def_joint_left_hold').isEmpty(): hand = self.getPart('torso', lodName).find('**/def_joint_left_hold') else: @@ -2044,7 +2040,7 @@ class Toon(Avatar.Avatar, ToonHead): self.startLookAround() self.openEyes() self.startBlink() - if config.GetBool('stuck-sleep-fix', 1): + if ConfigVariableBool('stuck-sleep-fix', 1).value: doClear = SLEEP_STRING in (self.nametag.getChat(), self.nametag.getStompText()) else: doClear = self.nametag.getChat() == SLEEP_STRING diff --git a/toontown/toon/ToonHead.py b/toontown/toon/ToonHead.py index 7a0769b..cabe008 100644 --- a/toontown/toon/ToonHead.py +++ b/toontown/toon/ToonHead.py @@ -1,14 +1,13 @@ from direct.actor import Actor from direct.task import Task from toontown.toonbase import ToontownGlobals -import string import random -from pandac.PandaModules import * +from panda3d.core import * from direct.interval.IntervalGlobal import * from direct.fsm.ClassicFSM import ClassicFSM from direct.fsm.State import State from direct.directnotify import DirectNotifyGlobal -if not base.config.GetBool('want-new-anims', 1): +if not ConfigVariableBool('want-new-anims', 1).value: HeadDict = {'dls': '/models/char/dogMM_Shorts-head-', 'dss': '/models/char/dogMM_Skirt-head-', 'dsl': '/models/char/dogSS_Shorts-head-', @@ -567,7 +566,7 @@ class ToonHead(Actor.Actor): if self.hasLOD(): for lodName in self.getLODNames(): self.drawInFront('eyes*', 'head-front*', mode, lodName=lodName) - if base.config.GetBool('want-new-anims', 1): + if ConfigVariableBool('want-new-anims', 1).value: if not self.find('**/joint_pupil*').isEmpty(): self.drawInFront('joint_pupil*', 'eyes*', -1, lodName=lodName) else: @@ -582,7 +581,7 @@ class ToonHead(Actor.Actor): self.__lod500Eyes = None else: self.__lod500Eyes.setColorOff() - if base.config.GetBool('want-new-anims', 1): + if ConfigVariableBool('want-new-anims', 1).value: if not self.find('**/joint_pupilL*').isEmpty(): self.__lod500lPupil = self.__lod500Eyes.find('**/joint_pupilL*') self.__lod500rPupil = self.__lod500Eyes.find('**/joint_pupilR*') @@ -596,7 +595,7 @@ class ToonHead(Actor.Actor): self.__lod250Eyes = None else: self.__lod250Eyes.setColorOff() - if base.config.GetBool('want-new-anims', 1): + if ConfigVariableBool('want-new-anims', 1).value: if not self.find('**/joint_pupilL*').isEmpty(): self.__lod250lPupil = self.__lod250Eyes.find('**/joint_pupilL*') self.__lod250rPupil = self.__lod250Eyes.find('**/joint_pupilR*') @@ -608,7 +607,7 @@ class ToonHead(Actor.Actor): self.__lod250rPupil = self.__lod250Eyes.find('**/joint_pupilR*') else: self.drawInFront('eyes*', 'head-front*', mode) - if base.config.GetBool('want-new-anims', 1): + if ConfigVariableBool('want-new-anims', 1).value: if not self.find('joint_pupil*').isEmpty(): self.drawInFront('joint_pupil*', 'eyes*', -1) else: @@ -620,7 +619,7 @@ class ToonHead(Actor.Actor): self.__eyes.setColorOff() self.__lpupil = None self.__rpupil = None - if base.config.GetBool('want-new-anims', 1): + if ConfigVariableBool('want-new-anims', 1).value: if not self.find('**/joint_pupilL*').isEmpty(): if self.getLOD(1000): lp = self.getLOD(1000).find('**/joint_pupilL*') @@ -1170,7 +1169,7 @@ class ToonHead(Actor.Actor): if lodName == '1000' or lodName == '500': filePrefix = DogMuzzleDict[style.head] muzzles = loader.loadModel('phase_3' + filePrefix + lodName) - if base.config.GetBool('want-new-anims', 1): + if ConfigVariableBool('want-new-anims', 1).value: if not self.find('**/' + lodName + '/**/__Actor_head/def_head').isEmpty(): muzzles.reparentTo(self.find('**/' + lodName + '/**/__Actor_head/def_head')) else: @@ -1196,7 +1195,7 @@ class ToonHead(Actor.Actor): muzzle = self.find('**/muzzle*') filePrefix = DogMuzzleDict[style.head] muzzles = loader.loadModel('phase_3' + filePrefix + '1000') - if base.config.GetBool('want-new-anims', 1): + if ConfigVariableBool('want-new-anims', 1).value: if not self.find('**/def_head').isEmpty(): muzzles.reparentTo(self.find('**/def_head')) else: From d6c0975c056a30dc94097b170c7732526d1181e8 Mon Sep 17 00:00:00 2001 From: Open Toontown <57279094+opentoontown@users.noreply.github.com> Date: Wed, 19 Jan 2022 14:58:38 -0500 Subject: [PATCH 21/49] fix fish bingo crashes Hope you had fun playing Fish Bingo. --- toontown/fishing/BingoCardBase.py | 4 ++-- toontown/fishing/BingoCardGui.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/toontown/fishing/BingoCardBase.py b/toontown/fishing/BingoCardBase.py index 9b58dbb..411937f 100644 --- a/toontown/fishing/BingoCardBase.py +++ b/toontown/fishing/BingoCardBase.py @@ -13,7 +13,7 @@ class BingoCardBase: self.cardSize = cardSize self.cellList = [] self.gameType = None - self.gameState = 1 << self.cardSize / 2 + self.gameState = 1 << self.cardSize // 2 return def destroy(self): @@ -35,7 +35,7 @@ class BingoCardBase: rodId = 0 for index in range(self.cardSize): - if index != self.cardSize / 2: + if index != self.cardSize // 2: choice = rng.randrange(0, len(fishList)) self.cellList.append(fishList.pop(choice)) else: diff --git a/toontown/fishing/BingoCardGui.py b/toontown/fishing/BingoCardGui.py index 7680632..9ff804b 100644 --- a/toontown/fishing/BingoCardGui.py +++ b/toontown/fishing/BingoCardGui.py @@ -32,7 +32,7 @@ class BingoCardGui(DirectFrame): self.initialiseoptions(BingoCardGui) self.game = None self.cellGuiList = [] - self.parent = parent + self._parent = parent self.load() self.hide() self.taskNameFlashFish = 'flashMatchingFishTask' @@ -126,7 +126,7 @@ class BingoCardGui(DirectFrame): self.gameType.hide() self.jpText = DirectLabel(parent=self, pos=(BG.GridXOffset, 0, 0.22), relief=None, state=DGG.NORMAL, text='', text_scale=TTLocalizer.BCGjpText, text_pos=(0, 0, 0), text_fg=(1, 1, 1, 1), text_shadow=(0, 0, 0, 1), text_font=ToontownGlobals.getInterfaceFont(), text_wordwrap=TTLocalizer.BCGjpTextWordwrap) self.gameOver = DirectLabel(parent=self, pos=(BG.GridXOffset, 0, 0), relief=None, state=DGG.NORMAL, text='', text_scale=textScale, text_fg=(1, 1, 1, 1), text_font=ToontownGlobals.getSignFont()) - self.jpSign = DirectFrame(parent=self.parent, relief=None, state=DGG.NORMAL, pos=BG.CardPosition, scale=(0.035, 0.035, 0.035), text=TTLocalizer.FishBingoJackpot, text_scale=2, text_pos=(-1.5, 18.6), text_fg=(1, 1, 1, 1), image=self.model.find('**/jackpot'), image_pos=(0, 0, 0), image_hpr=(0, 90, 0), sortOrder=DGG.BACKGROUND_SORT_INDEX) + self.jpSign = DirectFrame(parent=self._parent, relief=None, state=DGG.NORMAL, pos=BG.CardPosition, scale=(0.035, 0.035, 0.035), text=TTLocalizer.FishBingoJackpot, text_scale=2, text_pos=(-1.5, 18.6), text_fg=(1, 1, 1, 1), image=self.model.find('**/jackpot'), image_pos=(0, 0, 0), image_hpr=(0, 90, 0), sortOrder=DGG.BACKGROUND_SORT_INDEX) self.makeJackpotLights(self.jpSign) self.hideJackpot() self.makeTutorial() From 744f9c4d3be22f434dad82df56b823154a297d89 Mon Sep 17 00:00:00 2001 From: Open Toontown <57279094+opentoontown@users.noreply.github.com> Date: Wed, 19 Jan 2022 15:29:28 -0500 Subject: [PATCH 22/49] fix more fish bingo crashes --- toontown/fishing/BingoCardCell.py | 2 +- toontown/fishing/BingoCardGui.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/toontown/fishing/BingoCardCell.py b/toontown/fishing/BingoCardCell.py index 1071c57..81b5ce3 100644 --- a/toontown/fishing/BingoCardCell.py +++ b/toontown/fishing/BingoCardCell.py @@ -26,7 +26,7 @@ class BingoCardCell(DirectButton, FSM.FSM): DirectButton.__init__(self, parent) FSM.FSM.__init__(self, 'BingoCardCell') self.initialiseoptions(BingoCardCell) - self.parent = parent + self._parent = parent self.fish = fish self.cellId = cellId self.request('Off') diff --git a/toontown/fishing/BingoCardGui.py b/toontown/fishing/BingoCardGui.py index 9ff804b..9739a57 100644 --- a/toontown/fishing/BingoCardGui.py +++ b/toontown/fishing/BingoCardGui.py @@ -194,7 +194,7 @@ class BingoCardGui(DirectFrame): for i in range(rowSize): for j in range(self.game.getColSize()): color = self.getCellColor(i * rowSize + j) - if i * rowSize + j == self.game.getCardSize() / 2: + if i * rowSize + j == self.game.getCardSize() // 2: tmpFish = 'Free' else: choice = rng.randrange(0, len(fishList)) From cb7a8492d999e06e4d5f40f8b1ff0306b9943a40 Mon Sep 17 00:00:00 2001 From: Open Toontown <57279094+opentoontown@users.noreply.github.com> Date: Wed, 19 Jan 2022 16:16:06 -0500 Subject: [PATCH 23/49] use AIStartDefaultDistrict (Sillyville) for default district name --- toontown/ai/AIStart.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/toontown/ai/AIStart.py b/toontown/ai/AIStart.py index 4e1cee8..8d7d3ac 100644 --- a/toontown/ai/AIStart.py +++ b/toontown/ai/AIStart.py @@ -42,8 +42,9 @@ builtins.game = game from otp.ai.AIBaseGlobal import * from toontown.ai.ToontownAIRepository import ToontownAIRepository +from toontown.toonbase import TTLocalizer -simbase.air = ToontownAIRepository(ConfigVariableInt('air-base-channel', 1000000).value, ConfigVariableInt('air-stateserver', 4002).value, ConfigVariableString('district-name', 'Toon Valley').value) +simbase.air = ToontownAIRepository(ConfigVariableInt('air-base-channel', 401000000).value, ConfigVariableInt('air-stateserver', 4002).value, ConfigVariableString('district-name', TTLocalizer.AIStartDefaultDistrict).value) host = ConfigVariableString('air-connect', '127.0.0.1:7199').value port = 7199 From 59968e3cee56e7a66cfea295d98d6e29af7c8ebf Mon Sep 17 00:00:00 2001 From: Open Toontown <57279094+opentoontown@users.noreply.github.com> Date: Wed, 19 Jan 2022 17:20:02 -0500 Subject: [PATCH 24/49] fix crash with debug notify --- otp/distributed/OTPClientRepository.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/otp/distributed/OTPClientRepository.py b/otp/distributed/OTPClientRepository.py index 90a2867..4b14f20 100644 --- a/otp/distributed/OTPClientRepository.py +++ b/otp/distributed/OTPClientRepository.py @@ -2108,7 +2108,7 @@ class OTPClientRepository(ClientRepositoryBase): def handleDatagram(self, di): if self.notify.getDebug(): print('ClientRepository received datagram:') - di.getDatagram().dumpHex(ostream) + di.getDatagram().dumpHex(Notify.out()) msgType = self.getMsgType() if msgType == 65535: self.lostConnection() From 4bdada281681bad31947fde5f495c8899f27c196 Mon Sep 17 00:00:00 2001 From: Open Toontown <57279094+opentoontown@users.noreply.github.com> Date: Wed, 19 Jan 2022 19:50:20 -0500 Subject: [PATCH 25/49] so many DeprecationWarnings --- toontown/battle/BattleSounds.py | 4 ++-- toontown/shtiker/EventsPage.py | 12 +++++------ toontown/shtiker/OptionsPage.py | 6 +++--- toontown/suit/Suit.py | 36 ++++++++++++++------------------- toontown/town/Street.py | 10 ++------- 5 files changed, 28 insertions(+), 40 deletions(-) diff --git a/toontown/battle/BattleSounds.py b/toontown/battle/BattleSounds.py index 2acff8e..6fb7399 100644 --- a/toontown/battle/BattleSounds.py +++ b/toontown/battle/BattleSounds.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.directnotify import DirectNotifyGlobal class BattleSounds: @@ -9,7 +9,7 @@ class BattleSounds: self.isValid = 0 if self.mgr != None and self.mgr.isValid(): self.isValid = 1 - limit = base.config.GetInt('battle-sound-cache-size', 15) + limit = ConfigVariableInt('battle-sound-cache-size', 15).value self.mgr.setCacheLimit(limit) base.addSfxManager(self.mgr) self.setupSearchPath() diff --git a/toontown/shtiker/EventsPage.py b/toontown/shtiker/EventsPage.py index 31ae4d7..7178d25 100644 --- a/toontown/shtiker/EventsPage.py +++ b/toontown/shtiker/EventsPage.py @@ -1,5 +1,5 @@ -import urllib.request, urllib.parse, urllib.error -from pandac.PandaModules import Vec4, Vec3, TextNode, PNMImage, StringStream, Texture, HTTPClient, DocumentSpec, Ramfile, Point3 +import urllib.request +from panda3d.core import Vec4, Vec3, TextNode, PNMImage, StringStream, Texture, HTTPClient, DocumentSpec, Ramfile, Point3 from direct.task.Task import Task from direct.gui.DirectGui import DirectFrame, DirectLabel, DirectButton, DirectScrolledList, DirectCheckButton, OnscreenText from direct.gui import DirectGuiGlobals @@ -22,17 +22,17 @@ EventsPage_News = 3 class EventsPage(ShtikerPage.ShtikerPage): notify = DirectNotifyGlobal.directNotify.newCategory('EventsPage') - UseNewsTab = base.config.GetBool('want-news-tab', 0) + UseNewsTab = ConfigVariableBool('want-news-tab', 0).value DefaultNewsUrl = '/news/news_urls.txt' - NewsUrl = base.config.GetString('news-url', DefaultNewsUrl) + NewsUrl = ConfigVariableString('news-url', DefaultNewsUrl).value DownloadArticlesTaskName = 'downloadArticlesTask' - NonblockingDownload = base.config.GetBool('news-nonblocking', 1) + NonblockingDownload = ConfigVariableBool('news-nonblocking', 1).value def __init__(self): ShtikerPage.ShtikerPage.__init__(self) self.mode = EventsPage_Calendar self.setMode(self.mode) - self.noTeleport = config.GetBool('Parties-page-disable', 0) + self.noTeleport = ConfigVariableBool('Parties-page-disable', 0).value self.isPrivate = True self.gotRssFeed = False self.gotArticles = False diff --git a/toontown/shtiker/OptionsPage.py b/toontown/shtiker/OptionsPage.py index f202b9f..748719c 100644 --- a/toontown/shtiker/OptionsPage.py +++ b/toontown/shtiker/OptionsPage.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from . import ShtikerPage from toontown.toontowngui import TTDialog from direct.gui.DirectGui import * @@ -118,8 +118,8 @@ class OptionsTabPage(DirectFrame): notify = DirectNotifyGlobal.directNotify.newCategory('OptionsTabPage') DisplaySettingsTaskName = 'save-display-settings' DisplaySettingsDelay = 60 - ChangeDisplaySettings = base.config.GetBool('change-display-settings', 1) - ChangeDisplayAPI = base.config.GetBool('change-display-api', 0) + ChangeDisplaySettings = ConfigVariableBool('change-display-settings', 1).value + ChangeDisplayAPI = ConfigVariableBool('change-display-api', 0).value def __init__(self, parent = aspect2d): self._parent = parent diff --git a/toontown/suit/Suit.py b/toontown/suit/Suit.py index 644b2b3..ee6bce0 100644 --- a/toontown/suit/Suit.py +++ b/toontown/suit/Suit.py @@ -2,15 +2,12 @@ from direct.actor import Actor from otp.avatar import Avatar from . import SuitDNA from toontown.toonbase import ToontownGlobals -from pandac.PandaModules import * +from panda3d.core import * from panda3d.otp import * from toontown.battle import SuitBattleGlobals from direct.task.Task import Task from toontown.battle import BattleProps from toontown.toonbase import TTLocalizer -from pandac.PandaModules import VirtualFileMountHTTP, VirtualFileSystem, Filename, DSearchPath -from direct.showbase import AppRunnerGlobal -import os aSize = 6.06 bSize = 5.29 cSize = 4.14 @@ -150,7 +147,7 @@ bw = (('finger-wag', 'fingerwag', 5), ('magic1', 'magic1', 5), ('throw-object', 'throw-object', 5), ('throw-paper', 'throw-paper', 5)) -if not base.config.GetBool('want-new-cogs', 0): +if not ConfigVariableBool('want-new-cogs', 0).value: ModelDict = {'a': ('/models/char/suitA-', 4), 'b': ('/models/char/suitB-', 4), 'c': ('/models/char/suitC-', 3.5)} @@ -186,12 +183,12 @@ def unloadSuits(level): def loadSuitModelsAndAnims(level, flag = 0): for key in list(ModelDict.keys()): model, phase = ModelDict[key] - if base.config.GetBool('want-new-cogs', 0): + if ConfigVariableBool('want-new-cogs', 0).value: headModel, headPhase = HeadModelDict[key] else: headModel, headPhase = ModelDict[key] if flag: - if base.config.GetBool('want-new-cogs', 0): + if ConfigVariableBool('want-new-cogs', 0).value: filepath = 'phase_3.5' + model + 'zero' if cogExists(model + 'zero.bam'): loader.loadModel(filepath).node() @@ -199,7 +196,7 @@ def loadSuitModelsAndAnims(level, flag = 0): loader.loadModel('phase_3.5' + model + 'mod').node() loader.loadModel('phase_' + str(headPhase) + headModel + 'heads').node() else: - if base.config.GetBool('want-new-cogs', 0): + if ConfigVariableBool('want-new-cogs', 0).value: filepath = 'phase_3.5' + model + 'zero' if cogExists(model + 'zero.bam'): loader.unloadModel(filepath) @@ -210,11 +207,8 @@ def loadSuitModelsAndAnims(level, flag = 0): def cogExists(filePrefix): searchPath = DSearchPath() - if AppRunnerGlobal.appRunner: - searchPath.appendDirectory(Filename.expandFrom('$TT_3_5_ROOT/phase_3.5')) - else: - basePath = os.path.expandvars('$TTMODELS') or './ttmodels' - searchPath.appendDirectory(Filename.fromOsSpecific(basePath + '/built/phase_3.5')) + if __debug__: + searchPath.appendDirectory(Filename('resources/phase_3.5')) filePrefix = filePrefix.strip('/') pfile = Filename(filePrefix) found = vfs.resolveFilename(pfile, searchPath) @@ -618,7 +612,7 @@ class Suit(Avatar.Avatar): def generateBody(self): animDict = self.generateAnimDict() filePrefix, bodyPhase = ModelDict[self.style.body] - if base.config.GetBool('want-new-cogs', 0): + if ConfigVariableBool('want-new-cogs', 0).value: if cogExists(filePrefix + 'zero.bam'): self.loadModel('phase_3.5' + filePrefix + 'zero') else: @@ -644,7 +638,7 @@ class Suit(Avatar.Avatar): for anim in AllSuitsBattle: animDict[anim[0]] = 'phase_5' + filePrefix + anim[1] - if not base.config.GetBool('want-new-cogs', 0): + if not ConfigVariableBool('want-new-cogs', 0).value: if self.style.body == 'a': animDict['neutral'] = 'phase_4/models/char/suitA-neutral' for anim in SuitsCEOBattle: @@ -701,7 +695,7 @@ class Suit(Avatar.Avatar): self.shadowJoint = self.find('**/joint_shadow') self.nametagJoint = self.find('**/joint_nameTag') - if base.config.GetBool('want-new-cogs', 0): + if ConfigVariableBool('want-new-cogs', 0).value: if dept == 'c': texType = 'bossbot' elif dept == 'm': @@ -759,14 +753,14 @@ class Suit(Avatar.Avatar): modelRoot.find('**/hands').setTexture(handTex, 1) def generateHead(self, headType): - if base.config.GetBool('want-new-cogs', 0): + if ConfigVariableBool('want-new-cogs', 0).value: filePrefix, phase = HeadModelDict[self.style.body] else: filePrefix, phase = ModelDict[self.style.body] headModel = loader.loadModel('phase_' + str(phase) + filePrefix + 'heads') headReferences = headModel.findAllMatches('**/' + headType) for i in range(0, headReferences.getNumPaths()): - if base.config.GetBool('want-new-cogs', 0): + if ConfigVariableBool('want-new-cogs', 0).value: headPart = self.instance(headReferences.getPath(i), 'modelRoot', 'to_head') if not headPart: headPart = self.instance(headReferences.getPath(i), 'modelRoot', 'joint_head') @@ -806,7 +800,7 @@ class Suit(Avatar.Avatar): def generateCorporateMedallion(self): icons = loader.loadModel('phase_3/models/gui/cog_icons') dept = self.style.dept - if base.config.GetBool('want-new-cogs', 0): + if ConfigVariableBool('want-new-cogs', 0).value: chestNull = self.find('**/def_joint_attachMeter') if chestNull.isEmpty(): chestNull = self.find('**/joint_attachMeter') @@ -831,7 +825,7 @@ class Suit(Avatar.Avatar): button.setScale(3.0) button.setH(180.0) button.setColor(self.healthColors[0]) - if base.config.GetBool('want-new-cogs', 0): + if ConfigVariableBool('want-new-cogs', 0).value: chestNull = self.find('**/def_joint_attachMeter') if chestNull.isEmpty(): chestNull = self.find('**/joint_attachMeter') @@ -909,7 +903,7 @@ class Suit(Avatar.Avatar): return def getLoseActor(self): - if base.config.GetBool('want-new-cogs', 0): + if ConfigVariableBool('want-new-cogs', 0).value: if self.find('**/body'): return self if self.loseActor == None: diff --git a/toontown/town/Street.py b/toontown/town/Street.py index 975b65f..743bcd1 100644 --- a/toontown/town/Street.py +++ b/toontown/town/Street.py @@ -1,26 +1,20 @@ -from pandac.PandaModules import * +from panda3d.core import * from panda3d.otp import * from toontown.battle.BattleProps import * from toontown.battle.BattleSounds import * from toontown.distributed.ToontownMsgTypes import * from direct.gui.DirectGui import cleanupDialog from direct.directnotify import DirectNotifyGlobal -from toontown.hood import Place from toontown.battle import BattlePlace -from direct.showbase import DirectObject -from direct.fsm import StateData from direct.fsm import ClassicFSM, State from direct.task import Task from otp.distributed.TelemetryLimiter import RotationLimitToH, TLGatherAllAvs -from toontown.battle import BattleParticles from toontown.building import Elevator from toontown.hood import ZoneUtil from toontown.toonbase import ToontownGlobals from toontown.toon.Toon import teleportDebug -from toontown.estate import HouseGlobals -from toontown.toonbase import TTLocalizer from direct.interval.IntervalGlobal import * -visualizeZones = base.config.GetBool('visualize-zones', 0) +visualizeZones = ConfigVariableBool('visualize-zones', 0).value class Street(BattlePlace.BattlePlace): notify = DirectNotifyGlobal.directNotify.newCategory('Street') From cd0c03f83f9014414169ff3d9aaed83790684c75 Mon Sep 17 00:00:00 2001 From: Open Toontown <57279094+opentoontown@users.noreply.github.com> Date: Wed, 19 Jan 2022 19:58:35 -0500 Subject: [PATCH 26/49] lol --- toontown/shtiker/EventsPage.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toontown/shtiker/EventsPage.py b/toontown/shtiker/EventsPage.py index 7178d25..b95da74 100644 --- a/toontown/shtiker/EventsPage.py +++ b/toontown/shtiker/EventsPage.py @@ -1,5 +1,5 @@ import urllib.request -from panda3d.core import Vec4, Vec3, TextNode, PNMImage, StringStream, Texture, HTTPClient, DocumentSpec, Ramfile, Point3 +from panda3d.core import Vec4, Vec3, TextNode, PNMImage, StringStream, Texture, HTTPClient, DocumentSpec, Ramfile, Point3, ConfigVariableBool, ConfigVariableString from direct.task.Task import Task from direct.gui.DirectGui import DirectFrame, DirectLabel, DirectButton, DirectScrolledList, DirectCheckButton, OnscreenText from direct.gui import DirectGuiGlobals From 0ca1e8eb62e5cb6a72d2aa167cba156311373cf2 Mon Sep 17 00:00:00 2001 From: Open Toontown <57279094+opentoontown@users.noreply.github.com> Date: Wed, 19 Jan 2022 20:57:56 -0500 Subject: [PATCH 27/49] fix news caching --- toontown/shtiker/DirectNewsFrame.py | 33 +++++++++++++---------------- toontown/shtiker/IssueFrameV2.py | 4 ++-- 2 files changed, 17 insertions(+), 20 deletions(-) diff --git a/toontown/shtiker/DirectNewsFrame.py b/toontown/shtiker/DirectNewsFrame.py index 83349f2..fcb8a59 100644 --- a/toontown/shtiker/DirectNewsFrame.py +++ b/toontown/shtiker/DirectNewsFrame.py @@ -1,13 +1,10 @@ import os -import time import datetime -import functools -from pandac.PandaModules import Filename, DSearchPath, TextNode -from pandac.PandaModules import HTTPClient, Ramfile, DocumentSpec +from panda3d.core import Filename, DSearchPath, ConfigVariableString, ConfigVariableBool +from panda3d.core import HTTPClient, Ramfile, DocumentSpec from direct.showbase import DirectObject from direct.gui.DirectGui import DirectFrame, DGG from direct.directnotify import DirectNotifyGlobal -from direct.task.Task import Task from direct.showbase import AppRunnerGlobal from toontown.shtiker import IssueFrame from toontown.shtiker import IssueFrameV2 @@ -17,15 +14,15 @@ class DirectNewsFrame(DirectObject.DirectObject): TaskName = 'HtmlViewUpdateTask' TaskChainName = 'RedownladTaskChain' RedownloadTaskName = 'RedownloadNewsTask' - NewsBaseDir = config.GetString('news-base-dir', '/httpNews') - NewsStageDir = config.GetString('news-stage-dir', 'news') + NewsBaseDir = ConfigVariableString('news-base-dir', '/httpNews').value + NewsStageDir = ConfigVariableString('news-stage-dir', 'news').value FrameDimensions = (-1.30666637421, 1.30666637421, -0.751666665077, 0.751666665077) notify = DirectNotifyGlobal.directNotify.newCategory('DirectNewsFrame') - NewsIndexFilename = config.GetString('news-index-filename', 'http_news_index.txt') - NewsOverHttp = config.GetBool('news-over-http', True) + NewsIndexFilename = ConfigVariableString('news-index-filename', 'http_news_index.txt').value + NewsOverHttp = ConfigVariableBool('news-over-http', True).value CacheIndexFilename = 'cache_index.txt' SectionIdents = ['hom', 'new', @@ -124,7 +121,7 @@ class DirectNewsFrame(DirectObject.DirectObject): return fileA.getFilename().compareTo(fileB.getFilename()) homeFileNames = list(homeFileNames) - homeFileNames.sort(key=functools.cmp_to_key(fileCmp)) + homeFileNames.sort(cmp=fileCmp) self.notify.debug('returned homeFileNames=%s' % homeFileNames) return homeFileNames @@ -253,7 +250,7 @@ class DirectNewsFrame(DirectObject.DirectObject): self.newsFiles = [] filename = self.rf.readline() while filename: - filename = filename.strip() + filename = filename.decode('utf-8').strip() if filename: self.newsFiles.append(filename) filename = self.rf.readline() @@ -274,7 +271,7 @@ class DirectNewsFrame(DirectObject.DirectObject): return self.downloadNextFile(task) def downloadNextFile(self, task): - while self.nextNewsFile < len(self.newsFiles) and b'aaver' in self.newsFiles[self.nextNewsFile]: + while self.nextNewsFile < len(self.newsFiles) and 'aaver' in self.newsFiles[self.nextNewsFile]: self.nextNewsFile += 1 if self.nextNewsFile >= len(self.newsFiles): @@ -295,7 +292,7 @@ class DirectNewsFrame(DirectObject.DirectObject): self.percentDownloaded = float(self.nextNewsFile) / float(len(self.newsFiles)) self.filename = self.newsFiles[self.nextNewsFile] self.nextNewsFile += 1 - self.url = self.newsUrl + self.filename.decode('utf-8') + self.url = self.newsUrl + self.filename localFilename = Filename(self.newsDir, self.filename) self.notify.info('testing for %s' % localFilename.getFullpath()) doc = DocumentSpec(self.url) @@ -323,7 +320,7 @@ class DirectNewsFrame(DirectObject.DirectObject): del self.newsCache[self.filename] self.saveNewsCache() return self.downloadNextFile(task) - self.notify.info('downloaded %s' % self.filename.decode('utf-8')) + self.notify.info('downloaded %s' % self.filename) size = self.ch.getFileSize() doc = self.ch.getDocumentSpec() date = '' @@ -370,8 +367,8 @@ class DirectNewsFrame(DirectObject.DirectObject): self.redownloadNews() def getInGameNewsUrl(self): - result = base.config.GetString('fallback-news-url', 'http://cdn.toontown.disney.go.com/toontown/en/gamenews/') - override = base.config.GetString('in-game-news-url', '') + result = ConfigVariableString('fallback-news-url', 'http://cdn.toontown.disney.go.com/toontown/en/gamenews/').value + override = ConfigVariableString('in-game-news-url', '').value if override: self.notify.info('got an override url, using %s for in game news' % override) result = override @@ -392,8 +389,8 @@ class DirectNewsFrame(DirectObject.DirectObject): majorVer = 1 minorVer = 0 for entry in self.newsIndexEntries: - if b'aaver' in entry and dateStr.encode('utf-8') in entry: - parts = entry.split(b'_') + if 'aaver' in entry and dateStr in entry: + parts = entry.split('_') if len(parts) > 5: try: majorVer = int(parts[5]) diff --git a/toontown/shtiker/IssueFrameV2.py b/toontown/shtiker/IssueFrameV2.py index 5eaa22c..0355372 100644 --- a/toontown/shtiker/IssueFrameV2.py +++ b/toontown/shtiker/IssueFrameV2.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import Filename +from panda3d.core import Filename from direct.directnotify import DirectNotifyGlobal from direct.gui.DirectGui import DGG, DirectFrame, DirectButton from toontown.shtiker import IssueFrame @@ -33,7 +33,7 @@ class IssueFrameV2(IssueFrame.IssueFrame): def isSectionInIndex(self, sectionIdent): for name in self.newsIndexEntries: - if sectionIdent.encode('utf-8') in name and self.dateStr.encode('utf-8') in name: + if sectionIdent in name and self.dateStr in name: return True return False From e3d2edb4bca7f91596bd9bd54611e80900d8b186 Mon Sep 17 00:00:00 2001 From: Open Toontown <57279094+opentoontown@users.noreply.github.com> Date: Wed, 19 Jan 2022 20:59:55 -0500 Subject: [PATCH 28/49] whoops --- toontown/shtiker/DirectNewsFrame.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/toontown/shtiker/DirectNewsFrame.py b/toontown/shtiker/DirectNewsFrame.py index fcb8a59..9106083 100644 --- a/toontown/shtiker/DirectNewsFrame.py +++ b/toontown/shtiker/DirectNewsFrame.py @@ -1,5 +1,6 @@ import os import datetime +import functools from panda3d.core import Filename, DSearchPath, ConfigVariableString, ConfigVariableBool from panda3d.core import HTTPClient, Ramfile, DocumentSpec from direct.showbase import DirectObject @@ -121,7 +122,7 @@ class DirectNewsFrame(DirectObject.DirectObject): return fileA.getFilename().compareTo(fileB.getFilename()) homeFileNames = list(homeFileNames) - homeFileNames.sort(cmp=fileCmp) + homeFileNames.sort(key=functools.cmp_to_key(fileCmp)) self.notify.debug('returned homeFileNames=%s' % homeFileNames) return homeFileNames From df95510043c3cd4cbad86deb3953c31ab1ff2c55 Mon Sep 17 00:00:00 2001 From: Open Toontown <57279094+opentoontown@users.noreply.github.com> Date: Wed, 19 Jan 2022 22:45:39 -0500 Subject: [PATCH 29/49] Update TTWhiteList.py --- toontown/chat/TTWhiteList.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/toontown/chat/TTWhiteList.py b/toontown/chat/TTWhiteList.py index df81ffe..ca7b993 100644 --- a/toontown/chat/TTWhiteList.py +++ b/toontown/chat/TTWhiteList.py @@ -1,6 +1,6 @@ import os import datetime -from pandac.PandaModules import * +from panda3d.core import * from direct.directnotify import DirectNotifyGlobal from direct.distributed import DistributedObject from otp.chat.WhiteList import WhiteList @@ -8,10 +8,10 @@ from toontown.toonbase import TTLocalizer class TTWhiteList(WhiteList, DistributedObject.DistributedObject): RedownloadTaskName = 'RedownloadWhitelistTask' - WhitelistBaseDir = config.GetString('whitelist-base-dir', '') - WhitelistStageDir = config.GetString('whitelist-stage-dir', 'whitelist') - WhitelistOverHttp = config.GetBool('whitelist-over-http', True) - WhitelistFileName = config.GetString('whitelist-filename', 'twhitelist.dat') + WhitelistBaseDir = ConfigVariableString('whitelist-base-dir', '').value + WhitelistStageDir = ConfigVariableString('whitelist-stage-dir', 'whitelist').value + WhitelistOverHttp = ConfigVariableBool('whitelist-over-http', True).value + WhitelistFileName = ConfigVariableString('whitelist-filename', 'twhitelist.dat').value def __init__(self): self.redownloadingWhitelist = False @@ -72,8 +72,8 @@ class TTWhiteList(WhiteList, DistributedObject.DistributedObject): self.updateWhitelist() def getWhitelistUrl(self): - result = base.config.GetString('fallback-whitelist-url', 'http://cdn.toontown.disney.go.com/toontown/en/') - override = base.config.GetString('whitelist-url', '') + result = ConfigVariableString('fallback-whitelist-url', 'http://cdn.toontown.disney.go.com/toontown/en/').value + override = ConfigVariableString('whitelist-url', '').value if override: self.notify.info('got an override url, using %s for the whitelist' % override) result = override From 3d41e250e31a2af130c1edc367c826bfbfa3bf42 Mon Sep 17 00:00:00 2001 From: Open Toontown <57279094+opentoontown@users.noreply.github.com> Date: Wed, 19 Jan 2022 23:25:49 -0500 Subject: [PATCH 30/49] disable whitelist downloading by default partially addresses #19 --- toontown/chat/TTWhiteList.py | 24 +++++------------------- 1 file changed, 5 insertions(+), 19 deletions(-) diff --git a/toontown/chat/TTWhiteList.py b/toontown/chat/TTWhiteList.py index ca7b993..cad231d 100644 --- a/toontown/chat/TTWhiteList.py +++ b/toontown/chat/TTWhiteList.py @@ -10,7 +10,7 @@ class TTWhiteList(WhiteList, DistributedObject.DistributedObject): RedownloadTaskName = 'RedownloadWhitelistTask' WhitelistBaseDir = ConfigVariableString('whitelist-base-dir', '').value WhitelistStageDir = ConfigVariableString('whitelist-stage-dir', 'whitelist').value - WhitelistOverHttp = ConfigVariableBool('whitelist-over-http', True).value + WhitelistOverHttp = ConfigVariableBool('whitelist-over-http', False).value WhitelistFileName = ConfigVariableString('whitelist-filename', 'twhitelist.dat').value def __init__(self): @@ -30,9 +30,10 @@ class TTWhiteList(WhiteList, DistributedObject.DistributedObject): data = vfs.readFile(filename, 1) lines = data.split(b'\n') WhiteList.__init__(self, lines) - self.redownloadWhitelist() self.defaultWord = TTLocalizer.ChatGarblerDefault[0] - self.accept('updateWhitelist', self.handleNewWhitelist) + if self.WhitelistOverHttp: + self.redownloadWhitelist() + self.accept('updateWhitelist', self.handleNewWhitelist) def unload(self): self.ignore('updateWhitelist') @@ -108,22 +109,7 @@ class TTWhiteList(WhiteList, DistributedObject.DistributedObject): def findWhitelistDir(self): if self.WhitelistOverHttp: return self.WhitelistStageDir - searchPath = DSearchPath() - if AppRunnerGlobal.appRunner: - searchPath.appendDirectory(Filename.expandFrom('$TT_3_5_ROOT/phase_3.5/models/news')) - else: - basePath = os.path.expandvars('$TTMODELS') or './ttmodels' - searchPath.appendDirectory(Filename.fromOsSpecific(basePath + '/built/' + self.NewsBaseDir)) - searchPath.appendDirectory(Filename(self.NewsBaseDir)) - pfile = Filename(self.WhitelistFileName) - found = vfs.resolveFilename(pfile, searchPath) - if not found: - self.notify.warning('findWhitelistDir - no path: %s' % self.WhitelistFileName) - self.setErrorMessage(TTLocalizer.NewsPageErrorDownloadingFile % self.WhitelistFileName) - return None - self.notify.debug('found whitelist file %s' % pfile) - realDir = pfile.getDirname() - return realDir + return None def downloadWhitelistTask(self, task): if self.ch.run(): From 589f014a2eae035bd28f5362edd9f923093d39f4 Mon Sep 17 00:00:00 2001 From: Open Toontown <57279094+opentoontown@users.noreply.github.com> Date: Thu, 20 Jan 2022 00:02:49 -0500 Subject: [PATCH 31/49] chat clean up --- otp/chat/WhiteList.py | 5 +---- toontown/chat/TTChatInputWhiteList.py | 4 ++-- toontown/chat/TTWhiteList.py | 13 ++++++++----- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/otp/chat/WhiteList.py b/otp/chat/WhiteList.py index 8c17a7e..2e717db 100644 --- a/otp/chat/WhiteList.py +++ b/otp/chat/WhiteList.py @@ -14,10 +14,7 @@ class WhiteList: self.numWords = len(self.words) def cleanText(self, text): - if type(text) == bytes: - text = text.decode('utf-8').strip('.,?!') - else: - text = text.strip('.,?!') + text = text.strip('.,?!') text = text.lower().encode('utf-8') return text diff --git a/toontown/chat/TTChatInputWhiteList.py b/toontown/chat/TTChatInputWhiteList.py index 8186cc7..5e6e6a8 100644 --- a/toontown/chat/TTChatInputWhiteList.py +++ b/toontown/chat/TTChatInputWhiteList.py @@ -192,7 +192,7 @@ class TTChatInputWhiteList(ChatInputWhiteListFrame): flag = 1 for word in words: - if word == '' or self.whiteList.isWord(word.encode('utf-8')) or not base.cr.whiteListChatEnabled: + if word == '' or self.whiteList.isWord(word) or not base.cr.whiteListChatEnabled: newwords.append(word) else: if self.checkBeforeSend: @@ -206,7 +206,7 @@ class TTChatInputWhiteList(ChatInputWhiteListFrame): if not strict: lastword = words[-1] - if lastword == '' or self.whiteList.isPrefix(lastword.encode('utf-8')) or not base.cr.whiteListChatEnabled: + if lastword == '' or self.whiteList.isPrefix(lastword) or not base.cr.whiteListChatEnabled: newwords[-1] = lastword elif flag: newwords[-1] = '\x01WLDisplay\x01' + lastword + '\x02' diff --git a/toontown/chat/TTWhiteList.py b/toontown/chat/TTWhiteList.py index cad231d..184ae96 100644 --- a/toontown/chat/TTWhiteList.py +++ b/toontown/chat/TTWhiteList.py @@ -1,12 +1,11 @@ -import os import datetime from panda3d.core import * from direct.directnotify import DirectNotifyGlobal -from direct.distributed import DistributedObject +from direct.showbase.DirectObject import DirectObject from otp.chat.WhiteList import WhiteList from toontown.toonbase import TTLocalizer -class TTWhiteList(WhiteList, DistributedObject.DistributedObject): +class TTWhiteList(WhiteList, DirectObject): RedownloadTaskName = 'RedownloadWhitelistTask' WhitelistBaseDir = ConfigVariableString('whitelist-base-dir', '').value WhitelistStageDir = ConfigVariableString('whitelist-stage-dir', 'whitelist').value @@ -14,6 +13,7 @@ class TTWhiteList(WhiteList, DistributedObject.DistributedObject): WhitelistFileName = ConfigVariableString('whitelist-filename', 'twhitelist.dat').value def __init__(self): + DirectObject.__init__(self) self.redownloadingWhitelist = False self.startRedownload = datetime.datetime.now() self.endRedownload = datetime.datetime.now() @@ -36,10 +36,13 @@ class TTWhiteList(WhiteList, DistributedObject.DistributedObject): self.accept('updateWhitelist', self.handleNewWhitelist) def unload(self): - self.ignore('updateWhitelist') - self.removeDownloadingTextTask() + if self.WhitelistOverHttp: + self.ignore('updateWhitelist') + self.removeDownloadingTextTask() def redownloadWhitelist(self): + if not self.WhitelistOverHttp: + return self.percentDownload = 0.0 self.notify.info('starting redownloadWhitelist') self.startRedownload = datetime.datetime.now() From f1ffad24e14f70819c395570176a597805866637 Mon Sep 17 00:00:00 2001 From: Open Toontown <57279094+opentoontown@users.noreply.github.com> Date: Thu, 20 Jan 2022 00:30:16 -0500 Subject: [PATCH 32/49] remove unused imports from WhiteList.py --- otp/chat/WhiteList.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/otp/chat/WhiteList.py b/otp/chat/WhiteList.py index 2e717db..4c2ab94 100644 --- a/otp/chat/WhiteList.py +++ b/otp/chat/WhiteList.py @@ -1,7 +1,4 @@ from bisect import bisect_left -import string -import sys -import os class WhiteList: From 61a044e2e0d20eacc9bf959255657a2e18c22d3a Mon Sep 17 00:00:00 2001 From: Drew Rogers Date: Thu, 1 Sep 2022 09:59:04 -0500 Subject: [PATCH 33/49] toon: Fix NPC positions including Flippy toon hall --- toontown/toon/NPCToons.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toontown/toon/NPCToons.py b/toontown/toon/NPCToons.py index eb53801..5b9030f 100644 --- a/toontown/toon/NPCToons.py +++ b/toontown/toon/NPCToons.py @@ -155,7 +155,7 @@ def createNPC(air, npcId, desc, zoneId, posIndex = 0, questCallback = None): def createNpcsInZone(air, zoneId): npcs = [] canonicalZoneId = ZoneUtil.getCanonicalZoneId(zoneId) - npcIdList = zone2NpcDict.get(canonicalZoneId, []) + npcIdList = sorted(zone2NpcDict.get(canonicalZoneId, [])) for i in range(len(npcIdList)): npcId = npcIdList[i] npcDesc = NPCToonDict.get(npcId) From 5cdd7f84afaa9775839f2137bb00704bfaa33135 Mon Sep 17 00:00:00 2001 From: Open Toontown <57279094+opentoontown@users.noreply.github.com> Date: Mon, 19 Sep 2022 16:47:30 -0400 Subject: [PATCH 34/49] general: PythonUtil.Enum has been deprecated --- otp/distributed/OTPClientRepository.py | 5 +-- .../cogdominium/CogdoFlyingGameGlobals.py | 14 ++++---- .../cogdominium/CogdoFlyingLocalPlayer.py | 4 +-- toontown/cogdominium/CogdoFlyingObstacles.py | 4 +-- toontown/cogdominium/CogdoMazeGameGlobals.py | 6 ++-- toontown/coghq/CogDisguiseGlobals.py | 4 +-- toontown/effects/DustCloud.py | 4 +-- toontown/minigame/MazeMapGui.py | 4 +-- .../DistributedPartyDanceActivityBase.py | 4 +-- toontown/parties/PartyGlobals.py | 32 +++++++++---------- toontown/pets/Pet.py | 4 +-- toontown/pets/PetConstants.py | 5 ++- toontown/pets/PetTraits.py | 7 ++-- toontown/pets/PetTricks.py | 5 +-- toontown/racing/KartDNA.py | 9 +++--- toontown/racing/KartShopGlobals.py | 4 +-- toontown/racing/KartShopGui.py | 21 ++++++------ toontown/safezone/DistributedPicnicBasket.py | 3 +- toontown/shtiker/GolfPage.py | 4 +-- toontown/shtiker/KartPage.py | 4 +-- toontown/shtiker/OptionsPage.py | 4 +-- toontown/speedchat/TTSCJellybeanJamMenu.py | 4 +-- toontown/toonbase/ToontownGlobals.py | 7 ++-- 23 files changed, 83 insertions(+), 79 deletions(-) diff --git a/otp/distributed/OTPClientRepository.py b/otp/distributed/OTPClientRepository.py index 4b14f20..23240b1 100644 --- a/otp/distributed/OTPClientRepository.py +++ b/otp/distributed/OTPClientRepository.py @@ -39,14 +39,15 @@ from otp.distributed import OtpDoGlobals from otp.distributed.TelemetryLimiter import TelemetryLimiter from otp.ai.GarbageLeakServerEventAggregator import GarbageLeakServerEventAggregator from .PotentialAvatar import PotentialAvatar +from enum import IntEnum class OTPClientRepository(ClientRepositoryBase): notify = directNotify.newCategory('OTPClientRepository') avatarLimit = 6 - WishNameResult = Enum(['Failure', + WishNameResult = IntEnum('WishNameResult', ('Failure', 'PendingApproval', 'Approved', - 'Rejected']) + 'Rejected')) def __init__(self, serverVersion, launcher = None, playGame = None): ClientRepositoryBase.__init__(self) diff --git a/toontown/cogdominium/CogdoFlyingGameGlobals.py b/toontown/cogdominium/CogdoFlyingGameGlobals.py index bf0759d..4b5ee1b 100644 --- a/toontown/cogdominium/CogdoFlyingGameGlobals.py +++ b/toontown/cogdominium/CogdoFlyingGameGlobals.py @@ -1,8 +1,8 @@ -from direct.showbase import PythonUtil from pandac.PandaModules import VBase4, Vec3, Point3 from .CogdoUtil import VariableContainer, DevVariableContainer +from enum import IntEnum AI = VariableContainer() -AI.GameActions = PythonUtil.Enum(('LandOnWinPlatform', 'WinStateFinished', 'GotoWinState', 'HitWhirlwind', 'HitLegalEagle', 'HitMinion', 'DebuffInvul', 'RequestEnterEagleInterest', 'RequestExitEagleInterest', 'RanOutOfTimePenalty', 'Died', 'Spawn', 'SetBlades', 'BladeLost')) +AI.GameActions = IntEnum('GameActions', ('LandOnWinPlatform', 'WinStateFinished', 'GotoWinState', 'HitWhirlwind', 'HitLegalEagle', 'HitMinion', 'DebuffInvul', 'RequestEnterEagleInterest', 'RequestExitEagleInterest', 'RanOutOfTimePenalty', 'Died', 'Spawn', 'SetBlades', 'BladeLost')) AI.BroadcastPeriod = 0.3 AI.SafezoneId2DeathDamage = {2000: 1, 1000: 2, @@ -106,7 +106,7 @@ Gameplay.DepleteFuelStates = ['FlyingUp'] Gameplay.FuelNormalAmt = 1.0 Gameplay.FuelLowAmt = 0.66 Gameplay.FuelVeryLowAmt = 0.33 -Gameplay.FuelStates = PythonUtil.Enum(('FuelNoPropeller', 'FuelEmpty', 'FuelVeryLow', 'FuelLow', 'FuelNormal')) +Gameplay.FuelStates = IntEnum('FuelStates', ('FuelNoPropeller', 'FuelEmpty', 'FuelVeryLow', 'FuelLow', 'FuelNormal')) Gameplay.RefuelPropSpeed = 5.0 Gameplay.OverdrivePropSpeed = 2.5 Gameplay.NormalPropSpeed = 1.5 @@ -116,7 +116,7 @@ Gameplay.TargetedWarningBlinkTime = 3.0 Gameplay.HitKnockbackDist = 15.0 Gameplay.HitKnockbackTime = 0.5 Gameplay.HitCooldownTime = 2.0 -Gameplay.BackpackStates = PythonUtil.Enum(('Normal', 'Targeted', 'Attacked', 'Refuel')) +Gameplay.BackpackStates = IntEnum('BackpackStates', ('Normal', 'Targeted', 'Attacked', 'Refuel')) Gameplay.BackpackRefuelDuration = 4.0 Gameplay.BackpackState2TextureName = {Gameplay.BackpackStates.Normal: 'tt_t_ara_cfg_propellerPack', Gameplay.BackpackStates.Targeted: 'tt_t_ara_cfg_propellerPack_eagleTarget', @@ -200,9 +200,9 @@ Audio.SfxFiles = {'propeller': 'phase_4/audio/sfx/TB_propeller.ogg', 'cogDialogue': 'phase_3.5/audio/dial/COG_VO_statement.ogg', 'toonDialogue': 'phase_3.5/audio/dial/AV_dog_long.ogg'} Level = VariableContainer() -Level.GatherableTypes = PythonUtil.Enum(('Memo', 'Propeller', 'LaffPowerup', 'InvulPowerup')) -Level.ObstacleTypes = PythonUtil.Enum(('Whirlwind', 'Fan', 'Minion')) -Level.PlatformTypes = PythonUtil.Enum(('Platform', 'StartPlatform', 'EndPlatform')) +Level.GatherableTypes = IntEnum('GatherableTypes', ('Memo', 'Propeller', 'LaffPowerup', 'InvulPowerup')) +Level.ObstacleTypes = IntEnum('ObstacleTypes', ('Whirlwind', 'Fan', 'Minion')) +Level.PlatformTypes = IntEnum('PlatformTypes', ('Platform', 'StartPlatform', 'EndPlatform')) Level.PlatformType2SpawnOffset = {Level.PlatformTypes.Platform: 2.5, Level.PlatformTypes.StartPlatform: 5.0, Level.PlatformTypes.EndPlatform: 5.0} diff --git a/toontown/cogdominium/CogdoFlyingLocalPlayer.py b/toontown/cogdominium/CogdoFlyingLocalPlayer.py index 83c551c..65740c9 100644 --- a/toontown/cogdominium/CogdoFlyingLocalPlayer.py +++ b/toontown/cogdominium/CogdoFlyingLocalPlayer.py @@ -1,7 +1,6 @@ import math import random from pandac.PandaModules import Vec3 -from direct.showbase import PythonUtil from direct.directnotify import DirectNotifyGlobal from direct.task.Task import Task from direct.interval.FunctionInterval import Wait @@ -21,13 +20,14 @@ from .CogdoFlyingCameraManager import CogdoFlyingCameraManager from .CogdoFlyingObjects import CogdoFlyingPlatform, CogdoFlyingGatherable from .CogdoFlyingLegalEagle import CogdoFlyingLegalEagle from . import CogdoFlyingGameGlobals as Globals +from enum import IntEnum class CogdoFlyingLocalPlayer(CogdoFlyingPlayer): notify = DirectNotifyGlobal.directNotify.newCategory('CogdoFlyingLocalPlayer') BroadcastPosTask = 'CogdoFlyingLocalPlayerBroadcastPos' PlayWaitingMusicEventName = 'PlayWaitingMusicEvent' RanOutOfTimeEventName = 'RanOutOfTimeEvent' - PropStates = PythonUtil.Enum(('Normal', 'Overdrive', 'Off')) + PropStates = IntEnum('PropStates', ('Normal', 'Overdrive', 'Off')) def __init__(self, toon, game, level, guiMgr): CogdoFlyingPlayer.__init__(self, toon) diff --git a/toontown/cogdominium/CogdoFlyingObstacles.py b/toontown/cogdominium/CogdoFlyingObstacles.py index 4248dff..9c77b92 100644 --- a/toontown/cogdominium/CogdoFlyingObstacles.py +++ b/toontown/cogdominium/CogdoFlyingObstacles.py @@ -3,7 +3,6 @@ from direct.showbase.DirectObject import DirectObject from direct.interval.IntervalGlobal import LerpFunc, ActorInterval, LerpPosInterval from direct.interval.MetaInterval import Sequence from direct.directutil import Mopath -from direct.showbase import PythonUtil from pandac.PandaModules import * from toontown.toonbase import ToontownGlobals from toontown.suit import Suit @@ -15,6 +14,7 @@ from .CogdoFlyingUtil import swapAvatarShadowPlacer from direct.particles import ParticleEffect from direct.particles import Particles from direct.particles import ForceGroup +from enum import IntEnum class CogdoFlyingObtacleFactory: @@ -90,7 +90,7 @@ class CogdoFlyingObtacleFactory: class CogdoFlyingObstacle(DirectObject): EnterEventName = 'CogdoFlyingObstacle_Enter' ExitEventName = 'CogdoFlyingObstacle_Exit' - MotionTypes = PythonUtil.Enum(('BackForth', 'Loop')) + MotionTypes = IntEnum('MotionTypes', ('BackForth', 'Loop')) def __init__(self, type, index, model, collSolid, motionPath = None, motionPattern = None, blendMotion = True, instanceModel = True): self.type = type diff --git a/toontown/cogdominium/CogdoMazeGameGlobals.py b/toontown/cogdominium/CogdoMazeGameGlobals.py index 221c24b..0ae41c4 100644 --- a/toontown/cogdominium/CogdoMazeGameGlobals.py +++ b/toontown/cogdominium/CogdoMazeGameGlobals.py @@ -1,6 +1,6 @@ -from direct.showbase import PythonUtil from pandac.PandaModules import VBase4 -GameActions = PythonUtil.Enum(('EnterDoor', +from enum import IntEnum +GameActions = IntEnum('GameActions', ('EnterDoor', 'RevealDoor', 'OpenDoor', 'Countdown', @@ -81,7 +81,7 @@ PickupsUntilDoorOpens = int(NumPickups * 0.6) SuitCollisionName = 'CogdoMazeSuit_Collision' SuitWalkSameDirectionProb = 1 SuitWalkTurnAroundProb = 100 -SuitTypes = PythonUtil.Enum(('Boss', 'FastMinion', 'SlowMinion')) +SuitTypes = IntEnum('SuitTypes', ('Boss', 'FastMinion', 'SlowMinion')) SuitData = {} SuitData[SuitTypes.Boss] = {'dnaName': 'ms', 'cellWalkPeriod': 192, diff --git a/toontown/coghq/CogDisguiseGlobals.py b/toontown/coghq/CogDisguiseGlobals.py index 46838eb..f3c8ac3 100644 --- a/toontown/coghq/CogDisguiseGlobals.py +++ b/toontown/coghq/CogDisguiseGlobals.py @@ -1,7 +1,7 @@ from toontown.suit import SuitDNA from toontown.toonbase import TTLocalizer -from direct.showbase import PythonUtil from otp.otpbase import OTPGlobals +from enum import IntEnum PartsPerSuit = (17, 14, 12, @@ -428,7 +428,7 @@ PartsQueryNames = ({1: PartNameStrings[0], 16384: PartNameStrings[14], 32768: PartNameStrings[15], 65536: PartNameStrings[15]}) -suitTypes = PythonUtil.Enum(('NoSuit', 'NoMerits', 'FullSuit')) +suitTypes = IntEnum('suitTypes', ('NoSuit', 'NoMerits', 'FullSuit')) def getNextPart(parts, partIndex, dept): dept = dept2deptIndex(dept) diff --git a/toontown/effects/DustCloud.py b/toontown/effects/DustCloud.py index 2cf8d2d..02a5cf9 100644 --- a/toontown/effects/DustCloud.py +++ b/toontown/effects/DustCloud.py @@ -1,9 +1,9 @@ from pandac.PandaModules import * from direct.interval.IntervalGlobal import * -from direct.showbase import PythonUtil from toontown.battle.BattleProps import globalPropPool from direct.directnotify import DirectNotifyGlobal -SFX = PythonUtil.Enum('poof, magic') +from enum import IntEnum +SFX = IntEnum('SFX', ('poof, magic')) SFXPATHS = {SFX.poof: 'phase_4/audio/sfx/firework_distance_02.ogg', SFX.magic: 'phase_4/audio/sfx/SZ_DD_treasure.ogg'} diff --git a/toontown/minigame/MazeMapGui.py b/toontown/minigame/MazeMapGui.py index 877261b..626143d 100644 --- a/toontown/minigame/MazeMapGui.py +++ b/toontown/minigame/MazeMapGui.py @@ -1,12 +1,12 @@ -from direct.showbase.PythonUtil import Enum from direct.gui.DirectGui import DirectFrame, DGG from pandac.PandaModules import Vec2, VBase4F from pandac.PandaModules import CardMaker, NodePath from pandac.PandaModules import Texture, PNMImage +from enum import IntEnum DEFAULT_MASK_RESOLUTION = 32 DEFAULT_RADIUS_RATIO = 0.05 MAP_RESOLUTION = 320 -MazeRevealType = Enum(('SmoothCircle', 'HardCircle', 'Square')) +MazeRevealType = IntEnum('MazeRevealType', ('SmoothCircle', 'HardCircle', 'Square')) MAZE_REVEAL_TYPE = MazeRevealType.SmoothCircle class MazeMapGui(DirectFrame): diff --git a/toontown/parties/DistributedPartyDanceActivityBase.py b/toontown/parties/DistributedPartyDanceActivityBase.py index 235f0a6..3963e0b 100644 --- a/toontown/parties/DistributedPartyDanceActivityBase.py +++ b/toontown/parties/DistributedPartyDanceActivityBase.py @@ -2,7 +2,6 @@ import random from pandac.PandaModules import * from direct.interval.FunctionInterval import Wait, Func from direct.interval.MetaInterval import Sequence, Parallel -from direct.showbase.PythonUtil import lerp, Enum from direct.fsm import FSM from toontown.toonbase import TTLocalizer from toontown.toonbase import ToontownGlobals @@ -17,8 +16,9 @@ from toontown.parties.PartyDanceActivityToonFSM import ToonDancingStates from toontown.parties.KeyCodes import KeyCodes from toontown.parties.KeyCodesGui import KeyCodesGui from toontown.parties import PartyGlobals +from enum import IntEnum DANCE_FLOOR_COLLISION = 'danceFloor_collision' -DanceViews = Enum(('Normal', 'Dancing', 'Isometric')) +DanceViews = IntEnum('DanceViews', ('Normal', 'Dancing', 'Isometric')) class DistributedPartyDanceActivityBase(DistributedPartyActivity): notify = directNotify.newCategory('DistributedPartyDanceActivity') diff --git a/toontown/parties/PartyGlobals.py b/toontown/parties/PartyGlobals.py index 9018cf6..f821da3 100644 --- a/toontown/parties/PartyGlobals.py +++ b/toontown/parties/PartyGlobals.py @@ -1,7 +1,7 @@ from pandac.PandaModules import BitMask32 from pandac.PandaModules import Point3, VBase4 -from direct.showbase import PythonUtil from toontown.toonbase import TTLocalizer +from enum import IntEnum KICK_TO_PLAYGROUND_EVENT = 'parties_kickToPlayground' MaxSetInvites = 1000 MaxSetPartiesInvitedTo = 100 @@ -41,36 +41,36 @@ AvailableGridSquares = 202 TrashCanPosition = (-0.24, 0.0, -0.65) TrashCanScale = 0.7 PartyEditorTrashBounds = ((-0.16, -0.38), (-0.05, -0.56)) -ActivityRequestStatus = PythonUtil.Enum(('Joining', 'Exiting')) -InviteStatus = PythonUtil.Enum(('NotRead', +ActivityRequestStatus = IntEnum('ActivityRequestStatus', ('Joining', 'Exiting')) +InviteStatus = IntEnum('InviteStatus', ('NotRead', 'ReadButNotReplied', 'Accepted', 'Rejected')) -InviteTheme = PythonUtil.Enum(('Birthday', +InviteTheme = IntEnum('InviteTheme', ('Birthday', 'GenericMale', 'GenericFemale', 'Racing', 'Valentoons', 'VictoryParty', 'Winter')) -PartyStatus = PythonUtil.Enum(('Pending', +PartyStatus = IntEnum('PartyStatus', ('Pending', 'Cancelled', 'Finished', 'CanStart', 'Started', 'NeverStarted')) -AddPartyErrorCode = PythonUtil.Enum(('AllOk', +AddPartyErrorCode = IntEnum('AddPartyErrorCode', ('AllOk', 'ValidationError', 'DatabaseError', 'TooManyHostedParties')) -ChangePartyFieldErrorCode = PythonUtil.Enum(('AllOk', +ChangePartyFieldErrorCode = IntEnum('ChangePartyFieldErrorCode', ('AllOk', 'ValidationError', 'DatabaseError', 'AlreadyStarted', 'AlreadyRefunded')) -ActivityTypes = PythonUtil.Enum(('HostInitiated', 'GuestInitiated', 'Continuous')) -PartyGateDenialReasons = PythonUtil.Enum(('Unavailable', 'Full')) -ActivityIds = PythonUtil.Enum(('PartyJukebox', +ActivityTypes = IntEnum('ActivityTypes', ('HostInitiated', 'GuestInitiated', 'Continuous')) +PartyGateDenialReasons = IntEnum('PartyGateDenialReasons', ('Unavailable', 'Full')) +ActivityIds = IntEnum('ActivityIds', ('PartyJukebox', 'PartyCannon', 'PartyTrampoline', 'PartyCatch', @@ -129,7 +129,7 @@ ValentinePartyReplacementActivityIds = frozenset([ActivityIds.PartyDance, ActivityIds.PartyJukebox, ActivityIds.PartyJukebox40, ActivityIds.PartyTrampoline]) -DecorationIds = PythonUtil.Enum(('BalloonAnvil', +DecorationIds = IntEnum('DecorationIds', ('BalloonAnvil', 'BalloonStage', 'Bow', 'Cake', @@ -177,7 +177,7 @@ ValentinePartyDecorationIds = frozenset([DecorationIds.BalloonAnvilValentine, DecorationIds.FlyingHeart]) ValentinePartyReplacementDecorationIds = frozenset([DecorationIds.BalloonAnvil, DecorationIds.BannerJellyBean]) UnreleasedDecorationIds = () -GoToPartyStatus = PythonUtil.Enum(('AllowedToGo', +GoToPartyStatus = IntEnum('GoToPartyStatus', ('AllowedToGo', 'PartyFull', 'PrivateParty', 'PartyOver', @@ -500,8 +500,8 @@ DecorationInformationDict = {DecorationIds.BalloonAnvil: {'cost': int(10 * Party 'paidOnly': False, 'gridAsset': 'decoration_1x1'}} DefaultRulesTimeout = 10.0 -DenialReasons = PythonUtil.Enum(('Default', 'Full', 'SilentFail'), start=0) -FireworkShows = PythonUtil.Enum(('Summer',), start=200) +DenialReasons = IntEnum('DenialReasons', ('Default', 'Full', 'SilentFail'), start=0) +FireworkShows = IntEnum('FireworkShows', ('Summer',), start=200) FireworksGlobalXOffset = 160.0 FireworksGlobalYOffset = -20.0 FireworksPostLaunchDelay = 5.0 @@ -510,7 +510,7 @@ RocketDirectionDelay = 2.0 FireworksStartedEvent = 'PartyFireworksStarted' FireworksFinishedEvent = 'PartyFireworksFinished' FireworksTransitionToDisabledDelay = 3.0 -TeamActivityTeams = PythonUtil.Enum(('LeftTeam', 'RightTeam'), start=0) +TeamActivityTeams = IntEnum('TeamActivityTeams', ('LeftTeam', 'RightTeam'), start=0) TeamActivityNeitherTeam = 3 TeamActivityTextScale = 0.135 TeamActivityStartDelay = 8.0 @@ -730,7 +730,7 @@ DanceReverseLoopAnims = ['left', 'up', 'down', 'good-putt'] -ToonDancingStates = PythonUtil.Enum(('Init', +ToonDancingStates = IntEnum('ToonDancingStates', ('Init', 'DanceMove', 'Run', 'Cleanup')) diff --git a/toontown/pets/Pet.py b/toontown/pets/Pet.py index aec1233..0931f90 100644 --- a/toontown/pets/Pet.py +++ b/toontown/pets/Pet.py @@ -11,7 +11,7 @@ from toontown.pets import PetDNA from .PetDNA import HeadParts, EarParts, NoseParts, TailParts, BodyTypes, BodyTextures, AllPetColors, getColors, ColorScales, PetEyeColors, EarTextures, TailTextures, getFootTexture, getEarTexture, GiraffeTail, LeopardTail, PetGenders from toontown.toonbase import TTLocalizer from toontown.toonbase import ToontownGlobals -from direct.showbase import PythonUtil +from enum import IntEnum import random Component2IconDict = {'boredom': 'Bored', 'restlessness': None, @@ -29,7 +29,7 @@ Component2IconDict = {'boredom': 'Bored', class Pet(Avatar.Avatar): notify = DirectNotifyGlobal.directNotify.newCategory('Pet') SerialNum = 0 - Interactions = PythonUtil.Enum('SCRATCH, BEG, EAT, NEUTRAL') + Interactions = IntEnum('Interactions', ('SCRATCH, BEG, EAT, NEUTRAL')) InteractAnims = {Interactions.SCRATCH: ('toPet', 'pet', 'fromPet'), Interactions.BEG: ('toBeg', 'beg', 'fromBeg'), Interactions.EAT: ('eat', 'swallow', 'neutral'), diff --git a/toontown/pets/PetConstants.py b/toontown/pets/PetConstants.py index 72c4c9e..dcc58a3 100644 --- a/toontown/pets/PetConstants.py +++ b/toontown/pets/PetConstants.py @@ -1,7 +1,6 @@ from pandac.PandaModules import * -from direct.showbase.PythonUtil import Enum, invertDictLossless -import math from toontown.toonbase import ToontownGlobals +from enum import IntEnum OurPetsMoodChangedKey = 'OurPetsMoodChanged' ThinkPeriod = 1.5 MoodDriftPeriod = 300.0 @@ -25,7 +24,7 @@ HungerChaseToonScale = 1.2 FleeFromOwnerScale = 0.5 GettingAttentionGoalScale = 1.2 GettingAttentionGoalScaleDur = 7.0 -AnimMoods = Enum('EXCITED, SAD, NEUTRAL') +AnimMoods = IntEnum('AnimMoods', ('EXCITED, SAD, NEUTRAL')) FwdSpeed = 12.0 RotSpeed = 360.0 _HappyMult = 1.0 diff --git a/toontown/pets/PetTraits.py b/toontown/pets/PetTraits.py index 413e71d..413f61b 100644 --- a/toontown/pets/PetTraits.py +++ b/toontown/pets/PetTraits.py @@ -1,7 +1,8 @@ -from direct.showbase.PythonUtil import randFloat, normalDistrib, Enum +from direct.showbase.PythonUtil import randFloat, normalDistrib from direct.showbase.PythonUtil import clampScalar from toontown.toonbase import TTLocalizer, ToontownGlobals import random, copy +from enum import IntEnum TraitDivisor = 10000 def getTraitNames(): @@ -23,8 +24,8 @@ def gaussian(min, max, rng): class TraitDistribution: - TraitQuality = Enum('VERY_BAD, BAD, AVERAGE, GOOD, VERY_GOOD') - TraitTypes = Enum('INCREASING, DECREASING') + TraitQuality = IntEnum('TraitQuality', ('VERY_BAD, BAD, AVERAGE, GOOD, VERY_GOOD')) + TraitTypes = IntEnum('TraitTypes', ('INCREASING, DECREASING')) Sz2MinMax = None TraitType = None TraitCutoffs = {TraitTypes.INCREASING: {TraitQuality.VERY_BAD: 0.1, diff --git a/toontown/pets/PetTricks.py b/toontown/pets/PetTricks.py index 9d46ba2..951ee4e 100644 --- a/toontown/pets/PetTricks.py +++ b/toontown/pets/PetTricks.py @@ -1,7 +1,8 @@ -from direct.showbase.PythonUtil import Enum, invertDictLossless +from direct.showbase.PythonUtil import invertDictLossless from direct.interval.IntervalGlobal import * import random -Tricks = Enum('JUMP, BEG, PLAYDEAD, ROLLOVER, BACKFLIP, DANCE, SPEAK, BALK,') +from enum import IntEnum +Tricks = IntEnum('Tricks', ('JUMP, BEG, PLAYDEAD, ROLLOVER, BACKFLIP, DANCE, SPEAK, BALK,')) NonHappyMinActualTrickAptitude = 0.1 NonHappyMaxActualTrickAptitude = 0.6 MinActualTrickAptitude = 0.5 diff --git a/toontown/racing/KartDNA.py b/toontown/racing/KartDNA.py index c2f2ca8..a20245a 100644 --- a/toontown/racing/KartDNA.py +++ b/toontown/racing/KartDNA.py @@ -1,16 +1,15 @@ from direct.directnotify import DirectNotifyGlobal -from direct.showbase import PythonUtil from toontown.toonbase import TTLocalizer from pandac.PandaModules import * from .KartShopGlobals import * -import types +from enum import IntEnum if (__debug__): import pdb import copy -KartDNA = PythonUtil.Enum('bodyType, bodyColor, accColor, ebType, spType, fwwType, bwwType, rimsType, decalType') +KartDNA = IntEnum('KartDNA', ('bodyType, bodyColor, accColor, ebType, spType, fwwType, bwwType, rimsType, decalType')) InvalidEntry = -1 -KartInfo = PythonUtil.Enum('name, model, cost, viewDist, decalId, LODmodel1, LODmodel2') -AccInfo = PythonUtil.Enum('name, model, cost, texCard, attach') +KartInfo = IntEnum('KartInfo', ('name, model, cost, viewDist, decalId, LODmodel1, LODmodel2')) +AccInfo = IntEnum('KartInfo', ('name, model, cost, texCard, attach')) kNames = TTLocalizer.KartDNA_KartNames KartDict = {0: (kNames[0], 'phase_6/models/karting/Kart1_Final', diff --git a/toontown/racing/KartShopGlobals.py b/toontown/racing/KartShopGlobals.py index e3037d7..78e14d6 100644 --- a/toontown/racing/KartShopGlobals.py +++ b/toontown/racing/KartShopGlobals.py @@ -1,4 +1,4 @@ -from direct.showbase import PythonUtil +from enum import IntEnum class KartShopGlobals: EVENTDICT = {'guiDone': 'guiDone', @@ -15,7 +15,7 @@ class KartGlobals: COUNTDOWN_TIME = 30 BOARDING_TIME = 10.0 ENTER_RACE_TIME = 6.0 - ERROR_CODE = PythonUtil.Enum('success, eGeneric, eTickets, eBoardOver, eNoKart, eOccupied, eTrackClosed, eTooLate, eUnpaid') + ERROR_CODE = IntEnum('ERROR_CODE', ('success, eGeneric, eTickets, eBoardOver, eNoKart, eOccupied, eTrackClosed, eTooLate, eUnpaid')) FRONT_LEFT_SPOT = 0 FRONT_RIGHT_SPOT = 1 REAR_LEFT_SPOT = 2 diff --git a/toontown/racing/KartShopGui.py b/toontown/racing/KartShopGui.py index 42642a6..947ada9 100644 --- a/toontown/racing/KartShopGui.py +++ b/toontown/racing/KartShopGui.py @@ -4,7 +4,7 @@ from pandac.PandaModules import * from direct.directnotify import DirectNotifyGlobal from direct.gui.DirectGui import * from pandac.PandaModules import * -from direct.showbase import DirectObject, PythonUtil +from direct.showbase import DirectObject from toontown.toonbase import ToontownGlobals, TTLocalizer from toontown.toonbase import TTLocalizer from toontown.toonbase import ToontownTimer @@ -13,17 +13,18 @@ from toontown.racing.Kart import Kart from toontown.shtiker.KartPage import KartViewer from .KartDNA import * from toontown.toontowngui.TeaserPanel import TeaserPanel +from enum import IntEnum if (__debug__): import pdb -MENUS = PythonUtil.Enum('MainMenu, BuyKart, BuyAccessory, ReturnKart, ConfirmBuyAccessory, ConfirmBuyKart, BoughtKart, BoughtAccessory, TeaserPanel') -MM_OPTIONS = PythonUtil.Enum('Cancel, BuyAccessory, BuyKart', -1) -BK_OPTIONS = PythonUtil.Enum('Cancel, BuyKart', -1) -BA_OPTIONS = PythonUtil.Enum('Cancel, BuyAccessory', -1) -RK_OPTIONS = PythonUtil.Enum('Cancel, ReturnKart', -1) -CBK_OPTIONS = PythonUtil.Enum('Cancel, BuyKart', -1) -CBA_OPTIONS = PythonUtil.Enum('Cancel, BuyAccessory', -1) -BTK_OPTIONS = PythonUtil.Enum('Ok', -1) -BTA_OPTIONS = PythonUtil.Enum('Ok', -1) +MENUS = IntEnum('MENUS', ('MainMenu, BuyKart, BuyAccessory, ReturnKart, ConfirmBuyAccessory, ConfirmBuyKart, BoughtKart, BoughtAccessory, TeaserPanel')) +MM_OPTIONS = IntEnum('MM_OPTIONS', ('Cancel, BuyAccessory, BuyKart'), start=-1) +BK_OPTIONS = IntEnum('BK_OPTIONS', ('Cancel, BuyKart'), start=-1) +BA_OPTIONS = IntEnum('BA_OPTIONS', ('Cancel, BuyAccessory'), start=-1) +RK_OPTIONS = IntEnum('RK_OPTIONS', ('Cancel, ReturnKart'), start=-1) +CBK_OPTIONS = IntEnum('CBK_OPTIONS', ('Cancel, BuyKart'), start=-1) +CBA_OPTIONS = IntEnum('CBA_OPTIONS', ('Cancel, BuyAccessory'), start=-1) +BTK_OPTIONS = IntEnum('BTK_OPTIONS', ('Ok'), start=-1) +BTA_OPTIONS = IntEnum('BTA_OPTIONS', ('Ok'), start=-1) KS_TEXT_SIZE_BIG = TTLocalizer.KSGtextSizeBig KS_TEXT_SIZE_SMALL = TTLocalizer.KSGtextSizeSmall diff --git a/toontown/safezone/DistributedPicnicBasket.py b/toontown/safezone/DistributedPicnicBasket.py index d599905..3e115b2 100644 --- a/toontown/safezone/DistributedPicnicBasket.py +++ b/toontown/safezone/DistributedPicnicBasket.py @@ -16,9 +16,10 @@ from direct.showbase import PythonUtil from toontown.toon import ToonDNA from direct.showbase import RandomNumGen from toontown.battle.BattleSounds import * +from enum import IntEnum class DistributedPicnicBasket(DistributedObject.DistributedObject): - seatState = Enum('Empty, Full, Eating') + seatState = IntEnum('seatState', ('Empty, Full, Eating')) notify = DirectNotifyGlobal.directNotify.newCategory('DistributedPicnicBasket') def __init__(self, cr): diff --git a/toontown/shtiker/GolfPage.py b/toontown/shtiker/GolfPage.py index 95a3023..0b0722a 100644 --- a/toontown/shtiker/GolfPage.py +++ b/toontown/shtiker/GolfPage.py @@ -1,16 +1,16 @@ from direct.directnotify import DirectNotifyGlobal from direct.gui.DirectGui import * from pandac.PandaModules import * -from direct.showbase import PythonUtil from direct.task import Task from toontown.fishing.FishPhoto import DirectRegion from toontown.shtiker.ShtikerPage import ShtikerPage from toontown.toonbase import ToontownGlobals, TTLocalizer from .FishPage import FishingTrophy from toontown.golf import GolfGlobals +from enum import IntEnum if (__debug__): import pdb -PageMode = PythonUtil.Enum('Records, Trophy') +PageMode = IntEnum('PageMode', ('Records, Trophy')) class GolfPage(ShtikerPage): notify = DirectNotifyGlobal.directNotify.newCategory('GolfPage') diff --git a/toontown/shtiker/KartPage.py b/toontown/shtiker/KartPage.py index 15b473d..bb830e7 100644 --- a/toontown/shtiker/KartPage.py +++ b/toontown/shtiker/KartPage.py @@ -1,7 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.gui.DirectGui import * from pandac.PandaModules import * -from direct.showbase import PythonUtil from direct.task import Task from toontown.fishing.FishPhoto import DirectRegion from toontown.racing.KartDNA import * @@ -10,9 +9,10 @@ from toontown.racing import RaceGlobals from toontown.shtiker.ShtikerPage import ShtikerPage from toontown.toonbase import ToontownGlobals, TTLocalizer from .FishPage import FishingTrophy +from enum import IntEnum if (__debug__): import pdb -PageMode = PythonUtil.Enum('Customize, Records, Trophy') +PageMode = IntEnum('PageMode', ('Customize, Records, Trophy')) class KartPage(ShtikerPage): notify = DirectNotifyGlobal.directNotify.newCategory('KartPage') diff --git a/toontown/shtiker/OptionsPage.py b/toontown/shtiker/OptionsPage.py index 748719c..dd71b2c 100644 --- a/toontown/shtiker/OptionsPage.py +++ b/toontown/shtiker/OptionsPage.py @@ -8,8 +8,8 @@ from direct.task import Task from otp.speedchat import SpeedChat from otp.speedchat import SCColorScheme from otp.speedchat import SCStaticTextTerminal -from direct.showbase import PythonUtil from direct.directnotify import DirectNotifyGlobal +from enum import IntEnum speedChatStyles = ((2000, (200 / 255.0, 60 / 255.0, 229 / 255.0), (200 / 255.0, 135 / 255.0, 255 / 255.0), @@ -50,7 +50,7 @@ speedChatStyles = ((2000, (170 / 255.0, 120 / 255.0, 20 / 255.0), (165 / 255.0, 120 / 255.0, 50 / 255.0), (210 / 255.0, 200 / 255.0, 180 / 255.0))) -PageMode = PythonUtil.Enum('Options, Codes') +PageMode = IntEnum('PageMode', ('Options, Codes')) class OptionsPage(ShtikerPage.ShtikerPage): notify = DirectNotifyGlobal.directNotify.newCategory('OptionsPage') diff --git a/toontown/speedchat/TTSCJellybeanJamMenu.py b/toontown/speedchat/TTSCJellybeanJamMenu.py index b11ad1d..683f09c 100644 --- a/toontown/speedchat/TTSCJellybeanJamMenu.py +++ b/toontown/speedchat/TTSCJellybeanJamMenu.py @@ -1,8 +1,8 @@ -from direct.showbase import PythonUtil from otp.speedchat.SCMenu import SCMenu from otp.speedchat.SCMenuHolder import SCMenuHolder from otp.speedchat.SCStaticTextTerminal import SCStaticTextTerminal from otp.otpbase import OTPLocalizer +from enum import IntEnum JellybeanJamMenu = [(OTPLocalizer.JellybeanJamMenuSections[0], [30180, 30181, 30182, @@ -13,7 +13,7 @@ JellybeanJamMenu = [(OTPLocalizer.JellybeanJamMenuSections[0], [30180, 30188, 30189, 30190])] -JellybeanJamPhases = PythonUtil.Enum('TROLLEY, FISHING, PARTIES') +JellybeanJamPhases = IntEnum('JellybeanJamPhases', ('TROLLEY, FISHING, PARTIES')) PhaseSpecifPhrases = [30180, 30181, 30182] class TTSCJellybeanJamMenu(SCMenu): diff --git a/toontown/toonbase/ToontownGlobals.py b/toontown/toonbase/ToontownGlobals.py index e5ea232..53bae0c 100644 --- a/toontown/toonbase/ToontownGlobals.py +++ b/toontown/toonbase/ToontownGlobals.py @@ -1,7 +1,8 @@ from . import TTLocalizer from otp.otpbase.OTPGlobals import * -from direct.showbase.PythonUtil import Enum, invertDict +from direct.showbase.PythonUtil import invertDict from panda3d.core import BitMask32, Vec4 +from enum import IntEnum MapHotkeyOn = 'alt' MapHotkeyOff = 'alt-up' MapHotkey = 'alt' @@ -1609,11 +1610,11 @@ gmMagicWordList = ['restock', 'who', 'who all'] NewsPageScaleAdjust = 0.85 -AnimPropTypes = Enum(('Unknown', +AnimPropTypes = IntEnum('AnimPropTypes', ('Unknown', 'Hydrant', 'Mailbox', 'Trashcan'), start=-1) -EmblemTypes = Enum(('Silver', 'Gold')) +EmblemTypes = IntEnum('EmblemTypes', ('Silver', 'Gold')) NumEmblemTypes = 2 DefaultMaxBankMoney = 12000 DefaultBankItemId = 1350 From 64945da5800482121b2928cc2abcd17dae5c969a Mon Sep 17 00:00:00 2001 From: Open Toontown <57279094+opentoontown@users.noreply.github.com> Date: Mon, 19 Sep 2022 17:27:16 -0400 Subject: [PATCH 35/49] fix some enum conversions --- toontown/effects/DustCloud.py | 2 +- toontown/pets/Pet.py | 2 +- toontown/pets/PetConstants.py | 2 +- toontown/pets/PetTraits.py | 4 ++-- toontown/pets/PetTricks.py | 2 +- toontown/racing/KartDNA.py | 6 +++--- toontown/racing/KartShopGlobals.py | 2 +- toontown/safezone/DistributedPicnicBasket.py | 2 +- toontown/shtiker/GolfPage.py | 2 +- toontown/shtiker/KartPage.py | 2 +- toontown/shtiker/OptionsPage.py | 2 +- toontown/speedchat/TTSCJellybeanJamMenu.py | 2 +- 12 files changed, 15 insertions(+), 15 deletions(-) diff --git a/toontown/effects/DustCloud.py b/toontown/effects/DustCloud.py index 02a5cf9..f7882cc 100644 --- a/toontown/effects/DustCloud.py +++ b/toontown/effects/DustCloud.py @@ -3,7 +3,7 @@ from direct.interval.IntervalGlobal import * from toontown.battle.BattleProps import globalPropPool from direct.directnotify import DirectNotifyGlobal from enum import IntEnum -SFX = IntEnum('SFX', ('poof, magic')) +SFX = IntEnum('SFX', ('poof', 'magic')) SFXPATHS = {SFX.poof: 'phase_4/audio/sfx/firework_distance_02.ogg', SFX.magic: 'phase_4/audio/sfx/SZ_DD_treasure.ogg'} diff --git a/toontown/pets/Pet.py b/toontown/pets/Pet.py index 0931f90..86f0ff0 100644 --- a/toontown/pets/Pet.py +++ b/toontown/pets/Pet.py @@ -29,7 +29,7 @@ Component2IconDict = {'boredom': 'Bored', class Pet(Avatar.Avatar): notify = DirectNotifyGlobal.directNotify.newCategory('Pet') SerialNum = 0 - Interactions = IntEnum('Interactions', ('SCRATCH, BEG, EAT, NEUTRAL')) + Interactions = IntEnum('Interactions', ('SCRATCH', 'BEG', 'EAT', 'NEUTRAL')) InteractAnims = {Interactions.SCRATCH: ('toPet', 'pet', 'fromPet'), Interactions.BEG: ('toBeg', 'beg', 'fromBeg'), Interactions.EAT: ('eat', 'swallow', 'neutral'), diff --git a/toontown/pets/PetConstants.py b/toontown/pets/PetConstants.py index dcc58a3..8cb8562 100644 --- a/toontown/pets/PetConstants.py +++ b/toontown/pets/PetConstants.py @@ -24,7 +24,7 @@ HungerChaseToonScale = 1.2 FleeFromOwnerScale = 0.5 GettingAttentionGoalScale = 1.2 GettingAttentionGoalScaleDur = 7.0 -AnimMoods = IntEnum('AnimMoods', ('EXCITED, SAD, NEUTRAL')) +AnimMoods = IntEnum('AnimMoods', ('EXCITED', 'SAD', 'NEUTRAL')) FwdSpeed = 12.0 RotSpeed = 360.0 _HappyMult = 1.0 diff --git a/toontown/pets/PetTraits.py b/toontown/pets/PetTraits.py index 413f61b..1467190 100644 --- a/toontown/pets/PetTraits.py +++ b/toontown/pets/PetTraits.py @@ -24,8 +24,8 @@ def gaussian(min, max, rng): class TraitDistribution: - TraitQuality = IntEnum('TraitQuality', ('VERY_BAD, BAD, AVERAGE, GOOD, VERY_GOOD')) - TraitTypes = IntEnum('TraitTypes', ('INCREASING, DECREASING')) + TraitQuality = IntEnum('TraitQuality', ('VERY_BAD', 'BAD', 'AVERAGE', 'GOOD', 'VERY_GOOD')) + TraitTypes = IntEnum('TraitTypes', ('INCREASING', 'DECREASING')) Sz2MinMax = None TraitType = None TraitCutoffs = {TraitTypes.INCREASING: {TraitQuality.VERY_BAD: 0.1, diff --git a/toontown/pets/PetTricks.py b/toontown/pets/PetTricks.py index 951ee4e..21ed459 100644 --- a/toontown/pets/PetTricks.py +++ b/toontown/pets/PetTricks.py @@ -2,7 +2,7 @@ from direct.showbase.PythonUtil import invertDictLossless from direct.interval.IntervalGlobal import * import random from enum import IntEnum -Tricks = IntEnum('Tricks', ('JUMP, BEG, PLAYDEAD, ROLLOVER, BACKFLIP, DANCE, SPEAK, BALK,')) +Tricks = IntEnum('Tricks', ('JUMP', 'BEG', 'PLAYDEAD', 'ROLLOVER', 'BACKFLIP', 'DANCE', 'SPEAK', 'BALK')) NonHappyMinActualTrickAptitude = 0.1 NonHappyMaxActualTrickAptitude = 0.6 MinActualTrickAptitude = 0.5 diff --git a/toontown/racing/KartDNA.py b/toontown/racing/KartDNA.py index a20245a..72784b4 100644 --- a/toontown/racing/KartDNA.py +++ b/toontown/racing/KartDNA.py @@ -6,10 +6,10 @@ from enum import IntEnum if (__debug__): import pdb import copy -KartDNA = IntEnum('KartDNA', ('bodyType, bodyColor, accColor, ebType, spType, fwwType, bwwType, rimsType, decalType')) +KartDNA = IntEnum('KartDNA', ('bodyType', 'bodyColor', 'accColor', 'ebType', 'spType', 'fwwType', 'bwwType', 'rimsType', 'decalType')) InvalidEntry = -1 -KartInfo = IntEnum('KartInfo', ('name, model, cost, viewDist, decalId, LODmodel1, LODmodel2')) -AccInfo = IntEnum('KartInfo', ('name, model, cost, texCard, attach')) +KartInfo = IntEnum('KartInfo', ('name', 'model', 'cost', 'viewDist', 'decalId', 'LODmodel1', 'LODmodel2')) +AccInfo = IntEnum('AccInfo', ('name', 'model', 'cost', 'texCard', 'attach')) kNames = TTLocalizer.KartDNA_KartNames KartDict = {0: (kNames[0], 'phase_6/models/karting/Kart1_Final', diff --git a/toontown/racing/KartShopGlobals.py b/toontown/racing/KartShopGlobals.py index 78e14d6..fb56d9e 100644 --- a/toontown/racing/KartShopGlobals.py +++ b/toontown/racing/KartShopGlobals.py @@ -15,7 +15,7 @@ class KartGlobals: COUNTDOWN_TIME = 30 BOARDING_TIME = 10.0 ENTER_RACE_TIME = 6.0 - ERROR_CODE = IntEnum('ERROR_CODE', ('success, eGeneric, eTickets, eBoardOver, eNoKart, eOccupied, eTrackClosed, eTooLate, eUnpaid')) + ERROR_CODE = IntEnum('ERROR_CODE', ('success', 'eGeneric', 'eTickets', 'eBoardOver', 'eNoKart', 'eOccupied', 'eTrackClosed', 'eTooLate', 'eUnpaid')) FRONT_LEFT_SPOT = 0 FRONT_RIGHT_SPOT = 1 REAR_LEFT_SPOT = 2 diff --git a/toontown/safezone/DistributedPicnicBasket.py b/toontown/safezone/DistributedPicnicBasket.py index 3e115b2..75af429 100644 --- a/toontown/safezone/DistributedPicnicBasket.py +++ b/toontown/safezone/DistributedPicnicBasket.py @@ -19,7 +19,7 @@ from toontown.battle.BattleSounds import * from enum import IntEnum class DistributedPicnicBasket(DistributedObject.DistributedObject): - seatState = IntEnum('seatState', ('Empty, Full, Eating')) + seatState = IntEnum('seatState', ('Empty', 'Full', 'Eating')) notify = DirectNotifyGlobal.directNotify.newCategory('DistributedPicnicBasket') def __init__(self, cr): diff --git a/toontown/shtiker/GolfPage.py b/toontown/shtiker/GolfPage.py index 0b0722a..dd065d6 100644 --- a/toontown/shtiker/GolfPage.py +++ b/toontown/shtiker/GolfPage.py @@ -10,7 +10,7 @@ from toontown.golf import GolfGlobals from enum import IntEnum if (__debug__): import pdb -PageMode = IntEnum('PageMode', ('Records, Trophy')) +PageMode = IntEnum('PageMode', ('Records', 'Trophy')) class GolfPage(ShtikerPage): notify = DirectNotifyGlobal.directNotify.newCategory('GolfPage') diff --git a/toontown/shtiker/KartPage.py b/toontown/shtiker/KartPage.py index bb830e7..3a00323 100644 --- a/toontown/shtiker/KartPage.py +++ b/toontown/shtiker/KartPage.py @@ -12,7 +12,7 @@ from .FishPage import FishingTrophy from enum import IntEnum if (__debug__): import pdb -PageMode = IntEnum('PageMode', ('Customize, Records, Trophy')) +PageMode = IntEnum('PageMode', ('Customize', 'Records', 'Trophy')) class KartPage(ShtikerPage): notify = DirectNotifyGlobal.directNotify.newCategory('KartPage') diff --git a/toontown/shtiker/OptionsPage.py b/toontown/shtiker/OptionsPage.py index dd71b2c..9ad3c57 100644 --- a/toontown/shtiker/OptionsPage.py +++ b/toontown/shtiker/OptionsPage.py @@ -50,7 +50,7 @@ speedChatStyles = ((2000, (170 / 255.0, 120 / 255.0, 20 / 255.0), (165 / 255.0, 120 / 255.0, 50 / 255.0), (210 / 255.0, 200 / 255.0, 180 / 255.0))) -PageMode = IntEnum('PageMode', ('Options, Codes')) +PageMode = IntEnum('PageMode', ('Options', 'Codes')) class OptionsPage(ShtikerPage.ShtikerPage): notify = DirectNotifyGlobal.directNotify.newCategory('OptionsPage') diff --git a/toontown/speedchat/TTSCJellybeanJamMenu.py b/toontown/speedchat/TTSCJellybeanJamMenu.py index 683f09c..ccfd025 100644 --- a/toontown/speedchat/TTSCJellybeanJamMenu.py +++ b/toontown/speedchat/TTSCJellybeanJamMenu.py @@ -13,7 +13,7 @@ JellybeanJamMenu = [(OTPLocalizer.JellybeanJamMenuSections[0], [30180, 30188, 30189, 30190])] -JellybeanJamPhases = IntEnum('JellybeanJamPhases', ('TROLLEY, FISHING, PARTIES')) +JellybeanJamPhases = IntEnum('JellybeanJamPhases', ('TROLLEY', 'FISHING', 'PARTIES')) PhaseSpecifPhrases = [30180, 30181, 30182] class TTSCJellybeanJamMenu(SCMenu): From e6074917b98e1a0e4c670a57d8136ccf714e89b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tadej=20Glin=C5=A1ek?= Date: Tue, 8 Nov 2022 15:14:06 +0100 Subject: [PATCH 36/49] general: Fix enum starting positions --- otp/distributed/OTPClientRepository.py | 2 +- .../cogdominium/CogdoFlyingGameGlobals.py | 12 +++++----- .../cogdominium/CogdoFlyingLocalPlayer.py | 2 +- toontown/cogdominium/CogdoFlyingObstacles.py | 2 +- toontown/cogdominium/CogdoMazeGameGlobals.py | 4 ++-- toontown/coghq/CogDisguiseGlobals.py | 2 +- toontown/effects/DustCloud.py | 2 +- toontown/minigame/MazeMapGui.py | 2 +- .../DistributedPartyDanceActivityBase.py | 2 +- toontown/parties/PartyGlobals.py | 24 +++++++++---------- toontown/pets/Pet.py | 2 +- toontown/pets/PetConstants.py | 2 +- toontown/pets/PetTraits.py | 4 ++-- toontown/pets/PetTricks.py | 2 +- toontown/racing/KartDNA.py | 6 ++--- toontown/racing/KartShopGlobals.py | 2 +- toontown/racing/KartShopGui.py | 2 +- toontown/safezone/DistributedPicnicBasket.py | 2 +- toontown/shtiker/GolfPage.py | 2 +- toontown/shtiker/KartPage.py | 2 +- toontown/shtiker/OptionsPage.py | 2 +- toontown/speedchat/TTSCJellybeanJamMenu.py | 2 +- toontown/toonbase/ToontownGlobals.py | 2 +- 23 files changed, 43 insertions(+), 43 deletions(-) diff --git a/otp/distributed/OTPClientRepository.py b/otp/distributed/OTPClientRepository.py index 23240b1..f52d47e 100644 --- a/otp/distributed/OTPClientRepository.py +++ b/otp/distributed/OTPClientRepository.py @@ -47,7 +47,7 @@ class OTPClientRepository(ClientRepositoryBase): WishNameResult = IntEnum('WishNameResult', ('Failure', 'PendingApproval', 'Approved', - 'Rejected')) + 'Rejected'), start=0) def __init__(self, serverVersion, launcher = None, playGame = None): ClientRepositoryBase.__init__(self) diff --git a/toontown/cogdominium/CogdoFlyingGameGlobals.py b/toontown/cogdominium/CogdoFlyingGameGlobals.py index 4b5ee1b..5dc4e3a 100644 --- a/toontown/cogdominium/CogdoFlyingGameGlobals.py +++ b/toontown/cogdominium/CogdoFlyingGameGlobals.py @@ -2,7 +2,7 @@ from pandac.PandaModules import VBase4, Vec3, Point3 from .CogdoUtil import VariableContainer, DevVariableContainer from enum import IntEnum AI = VariableContainer() -AI.GameActions = IntEnum('GameActions', ('LandOnWinPlatform', 'WinStateFinished', 'GotoWinState', 'HitWhirlwind', 'HitLegalEagle', 'HitMinion', 'DebuffInvul', 'RequestEnterEagleInterest', 'RequestExitEagleInterest', 'RanOutOfTimePenalty', 'Died', 'Spawn', 'SetBlades', 'BladeLost')) +AI.GameActions = IntEnum('GameActions', ('LandOnWinPlatform', 'WinStateFinished', 'GotoWinState', 'HitWhirlwind', 'HitLegalEagle', 'HitMinion', 'DebuffInvul', 'RequestEnterEagleInterest', 'RequestExitEagleInterest', 'RanOutOfTimePenalty', 'Died', 'Spawn', 'SetBlades', 'BladeLost'), start=0) AI.BroadcastPeriod = 0.3 AI.SafezoneId2DeathDamage = {2000: 1, 1000: 2, @@ -106,7 +106,7 @@ Gameplay.DepleteFuelStates = ['FlyingUp'] Gameplay.FuelNormalAmt = 1.0 Gameplay.FuelLowAmt = 0.66 Gameplay.FuelVeryLowAmt = 0.33 -Gameplay.FuelStates = IntEnum('FuelStates', ('FuelNoPropeller', 'FuelEmpty', 'FuelVeryLow', 'FuelLow', 'FuelNormal')) +Gameplay.FuelStates = IntEnum('FuelStates', ('FuelNoPropeller', 'FuelEmpty', 'FuelVeryLow', 'FuelLow', 'FuelNormal'), start=0) Gameplay.RefuelPropSpeed = 5.0 Gameplay.OverdrivePropSpeed = 2.5 Gameplay.NormalPropSpeed = 1.5 @@ -116,7 +116,7 @@ Gameplay.TargetedWarningBlinkTime = 3.0 Gameplay.HitKnockbackDist = 15.0 Gameplay.HitKnockbackTime = 0.5 Gameplay.HitCooldownTime = 2.0 -Gameplay.BackpackStates = IntEnum('BackpackStates', ('Normal', 'Targeted', 'Attacked', 'Refuel')) +Gameplay.BackpackStates = IntEnum('BackpackStates', ('Normal', 'Targeted', 'Attacked', 'Refuel'), start=0) Gameplay.BackpackRefuelDuration = 4.0 Gameplay.BackpackState2TextureName = {Gameplay.BackpackStates.Normal: 'tt_t_ara_cfg_propellerPack', Gameplay.BackpackStates.Targeted: 'tt_t_ara_cfg_propellerPack_eagleTarget', @@ -200,9 +200,9 @@ Audio.SfxFiles = {'propeller': 'phase_4/audio/sfx/TB_propeller.ogg', 'cogDialogue': 'phase_3.5/audio/dial/COG_VO_statement.ogg', 'toonDialogue': 'phase_3.5/audio/dial/AV_dog_long.ogg'} Level = VariableContainer() -Level.GatherableTypes = IntEnum('GatherableTypes', ('Memo', 'Propeller', 'LaffPowerup', 'InvulPowerup')) -Level.ObstacleTypes = IntEnum('ObstacleTypes', ('Whirlwind', 'Fan', 'Minion')) -Level.PlatformTypes = IntEnum('PlatformTypes', ('Platform', 'StartPlatform', 'EndPlatform')) +Level.GatherableTypes = IntEnum('GatherableTypes', ('Memo', 'Propeller', 'LaffPowerup', 'InvulPowerup'), start=0) +Level.ObstacleTypes = IntEnum('ObstacleTypes', ('Whirlwind', 'Fan', 'Minion'), start=0) +Level.PlatformTypes = IntEnum('PlatformTypes', ('Platform', 'StartPlatform', 'EndPlatform'), start=0) Level.PlatformType2SpawnOffset = {Level.PlatformTypes.Platform: 2.5, Level.PlatformTypes.StartPlatform: 5.0, Level.PlatformTypes.EndPlatform: 5.0} diff --git a/toontown/cogdominium/CogdoFlyingLocalPlayer.py b/toontown/cogdominium/CogdoFlyingLocalPlayer.py index 65740c9..be681ae 100644 --- a/toontown/cogdominium/CogdoFlyingLocalPlayer.py +++ b/toontown/cogdominium/CogdoFlyingLocalPlayer.py @@ -27,7 +27,7 @@ class CogdoFlyingLocalPlayer(CogdoFlyingPlayer): BroadcastPosTask = 'CogdoFlyingLocalPlayerBroadcastPos' PlayWaitingMusicEventName = 'PlayWaitingMusicEvent' RanOutOfTimeEventName = 'RanOutOfTimeEvent' - PropStates = IntEnum('PropStates', ('Normal', 'Overdrive', 'Off')) + PropStates = IntEnum('PropStates', ('Normal', 'Overdrive', 'Off'), start=0) def __init__(self, toon, game, level, guiMgr): CogdoFlyingPlayer.__init__(self, toon) diff --git a/toontown/cogdominium/CogdoFlyingObstacles.py b/toontown/cogdominium/CogdoFlyingObstacles.py index 9c77b92..511c582 100644 --- a/toontown/cogdominium/CogdoFlyingObstacles.py +++ b/toontown/cogdominium/CogdoFlyingObstacles.py @@ -90,7 +90,7 @@ class CogdoFlyingObtacleFactory: class CogdoFlyingObstacle(DirectObject): EnterEventName = 'CogdoFlyingObstacle_Enter' ExitEventName = 'CogdoFlyingObstacle_Exit' - MotionTypes = IntEnum('MotionTypes', ('BackForth', 'Loop')) + MotionTypes = IntEnum('MotionTypes', ('BackForth', 'Loop'), start=0) def __init__(self, type, index, model, collSolid, motionPath = None, motionPattern = None, blendMotion = True, instanceModel = True): self.type = type diff --git a/toontown/cogdominium/CogdoMazeGameGlobals.py b/toontown/cogdominium/CogdoMazeGameGlobals.py index 0ae41c4..8e572e0 100644 --- a/toontown/cogdominium/CogdoMazeGameGlobals.py +++ b/toontown/cogdominium/CogdoMazeGameGlobals.py @@ -4,7 +4,7 @@ GameActions = IntEnum('GameActions', ('EnterDoor', 'RevealDoor', 'OpenDoor', 'Countdown', - 'TimeAlert')) + 'TimeAlert'), start=0) SecondsUntilTimeout = 4.0 * 60.0 SecondsUntilGameEnds = 60.0 SecondsForTimeAlert = 60.0 @@ -81,7 +81,7 @@ PickupsUntilDoorOpens = int(NumPickups * 0.6) SuitCollisionName = 'CogdoMazeSuit_Collision' SuitWalkSameDirectionProb = 1 SuitWalkTurnAroundProb = 100 -SuitTypes = IntEnum('SuitTypes', ('Boss', 'FastMinion', 'SlowMinion')) +SuitTypes = IntEnum('SuitTypes', ('Boss', 'FastMinion', 'SlowMinion'), start=0) SuitData = {} SuitData[SuitTypes.Boss] = {'dnaName': 'ms', 'cellWalkPeriod': 192, diff --git a/toontown/coghq/CogDisguiseGlobals.py b/toontown/coghq/CogDisguiseGlobals.py index f3c8ac3..23321ed 100644 --- a/toontown/coghq/CogDisguiseGlobals.py +++ b/toontown/coghq/CogDisguiseGlobals.py @@ -428,7 +428,7 @@ PartsQueryNames = ({1: PartNameStrings[0], 16384: PartNameStrings[14], 32768: PartNameStrings[15], 65536: PartNameStrings[15]}) -suitTypes = IntEnum('suitTypes', ('NoSuit', 'NoMerits', 'FullSuit')) +suitTypes = IntEnum('suitTypes', ('NoSuit', 'NoMerits', 'FullSuit'), start=0) def getNextPart(parts, partIndex, dept): dept = dept2deptIndex(dept) diff --git a/toontown/effects/DustCloud.py b/toontown/effects/DustCloud.py index f7882cc..9d35826 100644 --- a/toontown/effects/DustCloud.py +++ b/toontown/effects/DustCloud.py @@ -3,7 +3,7 @@ from direct.interval.IntervalGlobal import * from toontown.battle.BattleProps import globalPropPool from direct.directnotify import DirectNotifyGlobal from enum import IntEnum -SFX = IntEnum('SFX', ('poof', 'magic')) +SFX = IntEnum('SFX', ('poof', 'magic'), start=0) SFXPATHS = {SFX.poof: 'phase_4/audio/sfx/firework_distance_02.ogg', SFX.magic: 'phase_4/audio/sfx/SZ_DD_treasure.ogg'} diff --git a/toontown/minigame/MazeMapGui.py b/toontown/minigame/MazeMapGui.py index 626143d..a5f3ba6 100644 --- a/toontown/minigame/MazeMapGui.py +++ b/toontown/minigame/MazeMapGui.py @@ -6,7 +6,7 @@ from enum import IntEnum DEFAULT_MASK_RESOLUTION = 32 DEFAULT_RADIUS_RATIO = 0.05 MAP_RESOLUTION = 320 -MazeRevealType = IntEnum('MazeRevealType', ('SmoothCircle', 'HardCircle', 'Square')) +MazeRevealType = IntEnum('MazeRevealType', ('SmoothCircle', 'HardCircle', 'Square'), start=0) MAZE_REVEAL_TYPE = MazeRevealType.SmoothCircle class MazeMapGui(DirectFrame): diff --git a/toontown/parties/DistributedPartyDanceActivityBase.py b/toontown/parties/DistributedPartyDanceActivityBase.py index 3963e0b..2507f39 100644 --- a/toontown/parties/DistributedPartyDanceActivityBase.py +++ b/toontown/parties/DistributedPartyDanceActivityBase.py @@ -18,7 +18,7 @@ from toontown.parties.KeyCodesGui import KeyCodesGui from toontown.parties import PartyGlobals from enum import IntEnum DANCE_FLOOR_COLLISION = 'danceFloor_collision' -DanceViews = IntEnum('DanceViews', ('Normal', 'Dancing', 'Isometric')) +DanceViews = IntEnum('DanceViews', ('Normal', 'Dancing', 'Isometric'), start=0) class DistributedPartyDanceActivityBase(DistributedPartyActivity): notify = directNotify.newCategory('DistributedPartyDanceActivity') diff --git a/toontown/parties/PartyGlobals.py b/toontown/parties/PartyGlobals.py index f821da3..9330df4 100644 --- a/toontown/parties/PartyGlobals.py +++ b/toontown/parties/PartyGlobals.py @@ -41,35 +41,35 @@ AvailableGridSquares = 202 TrashCanPosition = (-0.24, 0.0, -0.65) TrashCanScale = 0.7 PartyEditorTrashBounds = ((-0.16, -0.38), (-0.05, -0.56)) -ActivityRequestStatus = IntEnum('ActivityRequestStatus', ('Joining', 'Exiting')) +ActivityRequestStatus = IntEnum('ActivityRequestStatus', ('Joining', 'Exiting'), start=0) InviteStatus = IntEnum('InviteStatus', ('NotRead', 'ReadButNotReplied', 'Accepted', - 'Rejected')) + 'Rejected'), start=0) InviteTheme = IntEnum('InviteTheme', ('Birthday', 'GenericMale', 'GenericFemale', 'Racing', 'Valentoons', 'VictoryParty', - 'Winter')) + 'Winter'), start=0) PartyStatus = IntEnum('PartyStatus', ('Pending', 'Cancelled', 'Finished', 'CanStart', 'Started', - 'NeverStarted')) + 'NeverStarted'), start=0) AddPartyErrorCode = IntEnum('AddPartyErrorCode', ('AllOk', 'ValidationError', 'DatabaseError', - 'TooManyHostedParties')) + 'TooManyHostedParties'), start=0) ChangePartyFieldErrorCode = IntEnum('ChangePartyFieldErrorCode', ('AllOk', 'ValidationError', 'DatabaseError', 'AlreadyStarted', - 'AlreadyRefunded')) -ActivityTypes = IntEnum('ActivityTypes', ('HostInitiated', 'GuestInitiated', 'Continuous')) -PartyGateDenialReasons = IntEnum('PartyGateDenialReasons', ('Unavailable', 'Full')) + 'AlreadyRefunded'), start=0) +ActivityTypes = IntEnum('ActivityTypes', ('HostInitiated', 'GuestInitiated', 'Continuous'), start=0) +PartyGateDenialReasons = IntEnum('PartyGateDenialReasons', ('Unavailable', 'Full'), start=0) ActivityIds = IntEnum('ActivityIds', ('PartyJukebox', 'PartyCannon', 'PartyTrampoline', @@ -89,7 +89,7 @@ ActivityIds = IntEnum('ActivityIds', ('PartyJukebox', 'PartyValentineDance20', 'PartyValentineJukebox', 'PartyValentineJukebox40', - 'PartyValentineTrampoline')) + 'PartyValentineTrampoline'), start=0) PartyEditorActivityOrder = [ActivityIds.PartyCog, ActivityIds.PartyWinterCog, ActivityIds.PartyJukebox, @@ -156,7 +156,7 @@ DecorationIds = IntEnum('DecorationIds', ('BalloonAnvil', 'CogStatueWinter', 'snowman', 'snowDoodle', - 'BalloonAnvilValentine')) + 'BalloonAnvilValentine'), start=0) DECORATION_VOLUME = 1.0 DECORATION_CUTOFF = 45 VictoryPartyDecorationIds = frozenset([DecorationIds.Hydra, @@ -181,7 +181,7 @@ GoToPartyStatus = IntEnum('GoToPartyStatus', ('AllowedToGo', 'PartyFull', 'PrivateParty', 'PartyOver', - 'PartyNotActive')) + 'PartyNotActive'), start=0) PlayGroundToPartyClockColors = {'the_burrrgh': (53.0 / 255.0, 116.0 / 255.0, 148.0 / 255.0, @@ -733,7 +733,7 @@ DanceReverseLoopAnims = ['left', ToonDancingStates = IntEnum('ToonDancingStates', ('Init', 'DanceMove', 'Run', - 'Cleanup')) + 'Cleanup'), start=0) JUKEBOX_TIMEOUT = 30.0 MUSIC_PATH = 'phase_%s/audio/bgm/' MUSIC_MIN_LENGTH_SECONDS = 50.0 diff --git a/toontown/pets/Pet.py b/toontown/pets/Pet.py index 86f0ff0..e8bab8f 100644 --- a/toontown/pets/Pet.py +++ b/toontown/pets/Pet.py @@ -29,7 +29,7 @@ Component2IconDict = {'boredom': 'Bored', class Pet(Avatar.Avatar): notify = DirectNotifyGlobal.directNotify.newCategory('Pet') SerialNum = 0 - Interactions = IntEnum('Interactions', ('SCRATCH', 'BEG', 'EAT', 'NEUTRAL')) + Interactions = IntEnum('Interactions', ('SCRATCH', 'BEG', 'EAT', 'NEUTRAL'), start=0) InteractAnims = {Interactions.SCRATCH: ('toPet', 'pet', 'fromPet'), Interactions.BEG: ('toBeg', 'beg', 'fromBeg'), Interactions.EAT: ('eat', 'swallow', 'neutral'), diff --git a/toontown/pets/PetConstants.py b/toontown/pets/PetConstants.py index 8cb8562..33d90fd 100644 --- a/toontown/pets/PetConstants.py +++ b/toontown/pets/PetConstants.py @@ -24,7 +24,7 @@ HungerChaseToonScale = 1.2 FleeFromOwnerScale = 0.5 GettingAttentionGoalScale = 1.2 GettingAttentionGoalScaleDur = 7.0 -AnimMoods = IntEnum('AnimMoods', ('EXCITED', 'SAD', 'NEUTRAL')) +AnimMoods = IntEnum('AnimMoods', ('EXCITED', 'SAD', 'NEUTRAL'), start=0) FwdSpeed = 12.0 RotSpeed = 360.0 _HappyMult = 1.0 diff --git a/toontown/pets/PetTraits.py b/toontown/pets/PetTraits.py index 1467190..7a34b3e 100644 --- a/toontown/pets/PetTraits.py +++ b/toontown/pets/PetTraits.py @@ -24,8 +24,8 @@ def gaussian(min, max, rng): class TraitDistribution: - TraitQuality = IntEnum('TraitQuality', ('VERY_BAD', 'BAD', 'AVERAGE', 'GOOD', 'VERY_GOOD')) - TraitTypes = IntEnum('TraitTypes', ('INCREASING', 'DECREASING')) + TraitQuality = IntEnum('TraitQuality', ('VERY_BAD', 'BAD', 'AVERAGE', 'GOOD', 'VERY_GOOD'), start=0) + TraitTypes = IntEnum('TraitTypes', ('INCREASING', 'DECREASING'), start=0) Sz2MinMax = None TraitType = None TraitCutoffs = {TraitTypes.INCREASING: {TraitQuality.VERY_BAD: 0.1, diff --git a/toontown/pets/PetTricks.py b/toontown/pets/PetTricks.py index 21ed459..02ae1b3 100644 --- a/toontown/pets/PetTricks.py +++ b/toontown/pets/PetTricks.py @@ -2,7 +2,7 @@ from direct.showbase.PythonUtil import invertDictLossless from direct.interval.IntervalGlobal import * import random from enum import IntEnum -Tricks = IntEnum('Tricks', ('JUMP', 'BEG', 'PLAYDEAD', 'ROLLOVER', 'BACKFLIP', 'DANCE', 'SPEAK', 'BALK')) +Tricks = IntEnum('Tricks', ('JUMP', 'BEG', 'PLAYDEAD', 'ROLLOVER', 'BACKFLIP', 'DANCE', 'SPEAK', 'BALK'), start=0) NonHappyMinActualTrickAptitude = 0.1 NonHappyMaxActualTrickAptitude = 0.6 MinActualTrickAptitude = 0.5 diff --git a/toontown/racing/KartDNA.py b/toontown/racing/KartDNA.py index 72784b4..8d3e7fc 100644 --- a/toontown/racing/KartDNA.py +++ b/toontown/racing/KartDNA.py @@ -6,10 +6,10 @@ from enum import IntEnum if (__debug__): import pdb import copy -KartDNA = IntEnum('KartDNA', ('bodyType', 'bodyColor', 'accColor', 'ebType', 'spType', 'fwwType', 'bwwType', 'rimsType', 'decalType')) +KartDNA = IntEnum('KartDNA', ('bodyType', 'bodyColor', 'accColor', 'ebType', 'spType', 'fwwType', 'bwwType', 'rimsType', 'decalType'), start=0) InvalidEntry = -1 -KartInfo = IntEnum('KartInfo', ('name', 'model', 'cost', 'viewDist', 'decalId', 'LODmodel1', 'LODmodel2')) -AccInfo = IntEnum('AccInfo', ('name', 'model', 'cost', 'texCard', 'attach')) +KartInfo = IntEnum('KartInfo', ('name', 'model', 'cost', 'viewDist', 'decalId', 'LODmodel1', 'LODmodel2'), start=0) +AccInfo = IntEnum('AccInfo', ('name', 'model', 'cost', 'texCard', 'attach'), start=0) kNames = TTLocalizer.KartDNA_KartNames KartDict = {0: (kNames[0], 'phase_6/models/karting/Kart1_Final', diff --git a/toontown/racing/KartShopGlobals.py b/toontown/racing/KartShopGlobals.py index fb56d9e..f8ea031 100644 --- a/toontown/racing/KartShopGlobals.py +++ b/toontown/racing/KartShopGlobals.py @@ -15,7 +15,7 @@ class KartGlobals: COUNTDOWN_TIME = 30 BOARDING_TIME = 10.0 ENTER_RACE_TIME = 6.0 - ERROR_CODE = IntEnum('ERROR_CODE', ('success', 'eGeneric', 'eTickets', 'eBoardOver', 'eNoKart', 'eOccupied', 'eTrackClosed', 'eTooLate', 'eUnpaid')) + ERROR_CODE = IntEnum('ERROR_CODE', ('success', 'eGeneric', 'eTickets', 'eBoardOver', 'eNoKart', 'eOccupied', 'eTrackClosed', 'eTooLate', 'eUnpaid'), start=0) FRONT_LEFT_SPOT = 0 FRONT_RIGHT_SPOT = 1 REAR_LEFT_SPOT = 2 diff --git a/toontown/racing/KartShopGui.py b/toontown/racing/KartShopGui.py index 947ada9..41f7b70 100644 --- a/toontown/racing/KartShopGui.py +++ b/toontown/racing/KartShopGui.py @@ -16,7 +16,7 @@ from toontown.toontowngui.TeaserPanel import TeaserPanel from enum import IntEnum if (__debug__): import pdb -MENUS = IntEnum('MENUS', ('MainMenu, BuyKart, BuyAccessory, ReturnKart, ConfirmBuyAccessory, ConfirmBuyKart, BoughtKart, BoughtAccessory, TeaserPanel')) +MENUS = IntEnum('MENUS', ('MainMenu, BuyKart, BuyAccessory, ReturnKart, ConfirmBuyAccessory, ConfirmBuyKart, BoughtKart, BoughtAccessory, TeaserPanel'), start=0) MM_OPTIONS = IntEnum('MM_OPTIONS', ('Cancel, BuyAccessory, BuyKart'), start=-1) BK_OPTIONS = IntEnum('BK_OPTIONS', ('Cancel, BuyKart'), start=-1) BA_OPTIONS = IntEnum('BA_OPTIONS', ('Cancel, BuyAccessory'), start=-1) diff --git a/toontown/safezone/DistributedPicnicBasket.py b/toontown/safezone/DistributedPicnicBasket.py index 75af429..d9d1f46 100644 --- a/toontown/safezone/DistributedPicnicBasket.py +++ b/toontown/safezone/DistributedPicnicBasket.py @@ -19,7 +19,7 @@ from toontown.battle.BattleSounds import * from enum import IntEnum class DistributedPicnicBasket(DistributedObject.DistributedObject): - seatState = IntEnum('seatState', ('Empty', 'Full', 'Eating')) + seatState = IntEnum('seatState', ('Empty', 'Full', 'Eating'), start=0) notify = DirectNotifyGlobal.directNotify.newCategory('DistributedPicnicBasket') def __init__(self, cr): diff --git a/toontown/shtiker/GolfPage.py b/toontown/shtiker/GolfPage.py index dd065d6..f1f3b34 100644 --- a/toontown/shtiker/GolfPage.py +++ b/toontown/shtiker/GolfPage.py @@ -10,7 +10,7 @@ from toontown.golf import GolfGlobals from enum import IntEnum if (__debug__): import pdb -PageMode = IntEnum('PageMode', ('Records', 'Trophy')) +PageMode = IntEnum('PageMode', ('Records', 'Trophy'), start=0) class GolfPage(ShtikerPage): notify = DirectNotifyGlobal.directNotify.newCategory('GolfPage') diff --git a/toontown/shtiker/KartPage.py b/toontown/shtiker/KartPage.py index 3a00323..01d6003 100644 --- a/toontown/shtiker/KartPage.py +++ b/toontown/shtiker/KartPage.py @@ -12,7 +12,7 @@ from .FishPage import FishingTrophy from enum import IntEnum if (__debug__): import pdb -PageMode = IntEnum('PageMode', ('Customize', 'Records', 'Trophy')) +PageMode = IntEnum('PageMode', ('Customize', 'Records', 'Trophy'), start=0) class KartPage(ShtikerPage): notify = DirectNotifyGlobal.directNotify.newCategory('KartPage') diff --git a/toontown/shtiker/OptionsPage.py b/toontown/shtiker/OptionsPage.py index 9ad3c57..a5789d3 100644 --- a/toontown/shtiker/OptionsPage.py +++ b/toontown/shtiker/OptionsPage.py @@ -50,7 +50,7 @@ speedChatStyles = ((2000, (170 / 255.0, 120 / 255.0, 20 / 255.0), (165 / 255.0, 120 / 255.0, 50 / 255.0), (210 / 255.0, 200 / 255.0, 180 / 255.0))) -PageMode = IntEnum('PageMode', ('Options', 'Codes')) +PageMode = IntEnum('PageMode', ('Options', 'Codes'), start=0) class OptionsPage(ShtikerPage.ShtikerPage): notify = DirectNotifyGlobal.directNotify.newCategory('OptionsPage') diff --git a/toontown/speedchat/TTSCJellybeanJamMenu.py b/toontown/speedchat/TTSCJellybeanJamMenu.py index ccfd025..c79e4e8 100644 --- a/toontown/speedchat/TTSCJellybeanJamMenu.py +++ b/toontown/speedchat/TTSCJellybeanJamMenu.py @@ -13,7 +13,7 @@ JellybeanJamMenu = [(OTPLocalizer.JellybeanJamMenuSections[0], [30180, 30188, 30189, 30190])] -JellybeanJamPhases = IntEnum('JellybeanJamPhases', ('TROLLEY', 'FISHING', 'PARTIES')) +JellybeanJamPhases = IntEnum('JellybeanJamPhases', ('TROLLEY', 'FISHING', 'PARTIES'), start=0) PhaseSpecifPhrases = [30180, 30181, 30182] class TTSCJellybeanJamMenu(SCMenu): diff --git a/toontown/toonbase/ToontownGlobals.py b/toontown/toonbase/ToontownGlobals.py index 53bae0c..f449d2c 100644 --- a/toontown/toonbase/ToontownGlobals.py +++ b/toontown/toonbase/ToontownGlobals.py @@ -1614,7 +1614,7 @@ AnimPropTypes = IntEnum('AnimPropTypes', ('Unknown', 'Hydrant', 'Mailbox', 'Trashcan'), start=-1) -EmblemTypes = IntEnum('EmblemTypes', ('Silver', 'Gold')) +EmblemTypes = IntEnum('EmblemTypes', ('Silver', 'Gold'), start=0) NumEmblemTypes = 2 DefaultMaxBankMoney = 12000 DefaultBankItemId = 1350 From 1801d2b9fbd5e2aa794c447e1df014f45c9b1e95 Mon Sep 17 00:00:00 2001 From: Little Cat Date: Fri, 16 Dec 2022 20:40:57 -0400 Subject: [PATCH 37/49] all: replace pandac.PandaModules imports. UD/AI + Client boots up. --- otp/ai/AIBase.py | 5 +++-- otp/ai/AIZoneData.py | 2 +- otp/ai/BanManagerAI.py | 2 +- otp/ai/TimeManager.py | 2 +- otp/avatar/AvatarDNA.py | 2 +- otp/avatar/AvatarPanel.py | 2 +- otp/avatar/DistributedAvatar.py | 2 +- otp/avatar/PositionExaminer.py | 2 +- otp/avatar/ShadowCaster.py | 4 ++-- otp/chat/ChatInputNormal.py | 2 +- otp/chat/ChatInputTyped.py | 4 ++-- otp/chat/ChatInputWhiteListFrame.py | 2 +- otp/distributed/ClsendTracker.py | 2 +- otp/friends/FriendManager.py | 2 +- otp/friends/FriendSecret.py | 2 +- otp/launcher/DownloadWatcher.py | 2 +- otp/launcher/DummyLauncherBase.py | 2 +- otp/level/BasicEntities.py | 2 +- otp/level/CollisionSolidEntity.py | 2 +- otp/level/CutScene.py | 4 ++-- otp/level/DistributedInteractiveEntity.py | 2 +- otp/level/DistributedLevel.py | 2 +- otp/level/EntityTypeRegistry.py | 2 +- otp/level/LocatorEntity.py | 2 +- otp/level/PropSpinner.py | 2 +- otp/login/CreateAccountScreen.py | 4 ++-- otp/login/GuiScreen.py | 2 +- otp/login/HTTPUtil.py | 2 +- otp/login/LeaveToPayDialog.py | 2 +- otp/login/LoginGSAccount.py | 2 +- otp/login/LoginGoAccount.py | 2 +- otp/login/LoginTTAccount.py | 2 +- otp/login/LoginTTSpecificDevAccount.py | 2 +- otp/login/LoginWebPlayTokenAccount.py | 2 +- otp/login/MultiPageTextFrame.py | 2 +- otp/login/PrivacyPolicyPanel.py | 2 +- otp/login/SecretFriendsInfoPanel.py | 2 +- otp/movement/Impulse.py | 2 +- otp/movement/Mover.py | 2 +- otp/movement/PyVec3.py | 2 +- otp/namepanel/NameCheck.py | 4 ++-- otp/namepanel/NameTumbler.py | 2 +- otp/otpbase/OTPGlobals.py | 2 +- otp/otpbase/OTPLocalizerEnglish.py | 4 ++-- otp/otpbase/OTPRender.py | 2 +- otp/otpbase/OTPTimer.py | 2 +- otp/otpbase/PythonUtil.py | 4 ++-- otp/speedchat/SCElement.py | 2 +- otp/speedchat/SCMenuHolder.py | 2 +- otp/speedchat/SpeedChatGMHandler.py | 2 +- otp/uberdog/DistributedChatManager.py | 2 +- toontown/ai/CrashedLeaderBoardDecorator.py | 2 +- toontown/ai/DatabaseObject.py | 2 +- toontown/ai/HalloweenHolidayDecorator.py | 2 +- toontown/ai/HolidayDecorator.py | 2 +- toontown/ai/NewsManager.py | 2 +- toontown/ai/WelcomeValleyManager.py | 2 +- toontown/battle/BattlePlace.py | 2 +- toontown/battle/DistributedBattle.py | 2 +- toontown/battle/DistributedBattleBase.py | 2 +- toontown/battle/DistributedBattleBaseAI.py | 2 +- toontown/battle/DistributedBattleBldg.py | 2 +- toontown/battle/DistributedBattleDiners.py | 2 +- toontown/battle/DistributedBattleFinal.py | 2 +- toontown/battle/DistributedBattleWaiters.py | 2 +- toontown/battle/Fanfare.py | 2 +- toontown/battle/FireCogPanel.py | 2 +- toontown/battle/MovieCamera.py | 2 +- toontown/battle/MovieFire.py | 2 +- toontown/battle/MovieSOS.py | 2 +- toontown/battle/MovieThrow.py | 2 +- toontown/battle/PlayByPlayText.py | 2 +- toontown/battle/RewardPanel.py | 4 ++-- toontown/building/BoardingGroupShow.py | 2 +- toontown/building/DistributedAnimBuilding.py | 2 +- toontown/building/DistributedAnimDoor.py | 2 +- toontown/building/DistributedAnimatedProp.py | 2 +- toontown/building/DistributedBoardingParty.py | 2 +- toontown/building/DistributedBossElevator.py | 2 +- toontown/building/DistributedBuilding.py | 4 ++-- toontown/building/DistributedClubElevator.py | 2 +- toontown/building/DistributedDoor.py | 2 +- toontown/building/DistributedElevator.py | 2 +- toontown/building/DistributedElevatorExt.py | 2 +- toontown/building/DistributedElevatorFSM.py | 2 +- toontown/building/DistributedElevatorFloor.py | 2 +- toontown/building/DistributedElevatorInt.py | 2 +- .../building/DistributedGagshopInterior.py | 2 +- toontown/building/DistributedHQInterior.py | 2 +- .../building/DistributedKartShopInterior.py | 2 +- .../building/DistributedKnockKnockDoor.py | 2 +- .../building/DistributedPetshopInterior.py | 2 +- toontown/building/DistributedToonInterior.py | 2 +- .../building/DistributedTutorialInterior.py | 2 +- toontown/building/Elevator.py | 4 ++-- toontown/building/ElevatorConstants.py | 2 +- toontown/building/ElevatorUtils.py | 2 +- toontown/building/GagshopBuildingAI.py | 2 +- toontown/building/HQBuildingAI.py | 2 +- toontown/building/KartShopBuildingAI.py | 2 +- toontown/building/PetshopBuildingAI.py | 2 +- toontown/building/SuitInterior.py | 2 +- toontown/building/ToonInterior.py | 2 +- toontown/catalog/CatalogAccessoryItem.py | 2 +- toontown/catalog/CatalogChatItem.py | 2 +- toontown/catalog/CatalogChatItemPicker.py | 2 +- toontown/catalog/CatalogClothingItem.py | 2 +- toontown/catalog/CatalogFlooringItem.py | 2 +- toontown/catalog/CatalogGardenItem.py | 2 +- toontown/catalog/CatalogGenerator.py | 2 +- toontown/catalog/CatalogItem.py | 2 +- toontown/catalog/CatalogItemList.py | 2 +- toontown/catalog/CatalogItemPanel.py | 2 +- toontown/catalog/CatalogMouldingItem.py | 2 +- toontown/catalog/CatalogNotifyDialog.py | 2 +- toontown/catalog/CatalogScreen.py | 4 ++-- toontown/catalog/CatalogWainscotingItem.py | 2 +- toontown/catalog/CatalogWallpaperItem.py | 4 ++-- toontown/catalog/CatalogWindowItem.py | 2 +- toontown/catalog/MailboxScreen.py | 2 +- toontown/char/Char.py | 4 ++-- toontown/char/CharDNA.py | 2 +- toontown/chat/ResistanceChat.py | 2 +- toontown/chat/TTChatInputNormal.py | 2 +- toontown/chat/TTChatInputSpeedChat.py | 2 +- toontown/chat/TTChatInputWhiteList.py | 2 +- toontown/chat/TTTalkAssistant.py | 2 +- toontown/chat/ToontownChatManager.py | 2 +- toontown/classicchars/CCharPaths.py | 4 ++-- toontown/classicchars/CharStateDatas.py | 2 +- toontown/classicchars/DistributedCCharBase.py | 2 +- toontown/classicchars/DistributedDonald.py | 2 +- .../classicchars/DistributedDonaldDock.py | 2 +- .../classicchars/DistributedFrankenDonald.py | 2 +- toontown/classicchars/DistributedGoofy.py | 2 +- .../classicchars/DistributedGoofySpeedway.py | 2 +- toontown/classicchars/DistributedMickey.py | 2 +- toontown/classicchars/DistributedMinnie.py | 2 +- toontown/classicchars/DistributedPluto.py | 2 +- .../classicchars/DistributedSuperGoofy.py | 2 +- .../classicchars/DistributedVampireMickey.py | 2 +- .../classicchars/DistributedWesternPluto.py | 2 +- .../classicchars/DistributedWitchMinnie.py | 2 +- toontown/cogdominium/CogdoBarrelRoom.py | 2 +- toontown/cogdominium/CogdoBarrelRoomConsts.py | 2 +- .../cogdominium/CogdoBarrelRoomRewardPanel.py | 2 +- toontown/cogdominium/CogdoElevatorMovie.py | 2 +- .../cogdominium/CogdoExecutiveSuiteMovies.py | 2 +- .../cogdominium/CogdoFlyingCameraManager.py | 6 ++--- toontown/cogdominium/CogdoFlyingCollisions.py | 2 +- .../cogdominium/CogdoFlyingGameGlobals.py | 2 +- toontown/cogdominium/CogdoFlyingGameGuis.py | 2 +- toontown/cogdominium/CogdoFlyingGameMovies.py | 2 +- toontown/cogdominium/CogdoFlyingGuiManager.py | 2 +- .../cogdominium/CogdoFlyingInputManager.py | 2 +- toontown/cogdominium/CogdoFlyingLegalEagle.py | 2 +- toontown/cogdominium/CogdoFlyingLevel.py | 4 ++-- .../cogdominium/CogdoFlyingLevelQuadrant.py | 2 +- .../cogdominium/CogdoFlyingLocalPlayer.py | 2 +- toontown/cogdominium/CogdoFlyingObjects.py | 2 +- toontown/cogdominium/CogdoFlyingObstacles.py | 4 ++-- toontown/cogdominium/CogdoFlyingPlayer.py | 2 +- .../cogdominium/CogdoFlyingShadowPlacer.py | 2 +- toontown/cogdominium/CogdoGameAudioManager.py | 2 +- toontown/cogdominium/CogdoGameExit.py | 2 +- toontown/cogdominium/CogdoGameGatherable.py | 4 ++-- .../cogdominium/CogdoGameMessageDisplay.py | 2 +- toontown/cogdominium/CogdoGameRulesPanel.py | 2 +- toontown/cogdominium/CogdoInterior.py | 2 +- toontown/cogdominium/CogdoMaze.py | 2 +- toontown/cogdominium/CogdoMazeGame.py | 2 +- toontown/cogdominium/CogdoMazeGameGlobals.py | 2 +- toontown/cogdominium/CogdoMazeGameGuis.py | 2 +- toontown/cogdominium/CogdoMazeGameMovies.py | 2 +- toontown/cogdominium/CogdoMazeGameObjects.py | 8 +++---- toontown/cogdominium/CogdoMazeGuiManager.py | 2 +- toontown/cogdominium/CogdoMazeLocalPlayer.py | 2 +- toontown/cogdominium/CogdoMazePlayer.py | 2 +- toontown/cogdominium/CogdoMazeSuits.py | 2 +- toontown/cogdominium/CogdoMemoGui.py | 2 +- toontown/cogdominium/CogdoUtil.py | 4 ++-- toontown/cogdominium/DistCogdoCrane.py | 3 ++- toontown/cogdominium/DistCogdoCraneAI.py | 2 +- .../cogdominium/DistCogdoCraneMoneyBag.py | 2 +- .../cogdominium/DistCogdoCraneMoneyBagAI.py | 2 +- toontown/cogdominium/DistCogdoCraneObject.py | 2 +- .../cogdominium/DistCogdoCraneObjectAI.py | 2 +- toontown/cogdominium/DistCogdoGame.py | 2 +- toontown/cogdominium/DistCogdoMazeGameAI.py | 2 +- .../cogdominium/DistributedCogdoBarrel.py | 2 +- .../cogdominium/DistributedCogdoInterior.py | 2 +- toontown/coghq/ActiveCell.py | 2 +- toontown/coghq/BattleBlocker.py | 4 ++-- toontown/coghq/BossbotCogHQLoader.py | 2 +- toontown/coghq/BossbotHQBossBattle.py | 2 +- toontown/coghq/BossbotHQExterior.py | 2 +- toontown/coghq/BossbotOfficeExterior.py | 2 +- toontown/coghq/CashbotCogHQLoader.py | 2 +- toontown/coghq/CashbotHQBossBattle.py | 2 +- toontown/coghq/CashbotHQExterior.py | 2 +- toontown/coghq/CogHQBossBattle.py | 2 +- toontown/coghq/CogHQExterior.py | 2 +- toontown/coghq/CogHQLoader.py | 2 +- toontown/coghq/CogHQLobby.py | 2 +- toontown/coghq/ConveyorBelt.py | 2 +- toontown/coghq/CountryClubInterior.py | 2 +- toontown/coghq/CountryClubRoom.py | 2 +- toontown/coghq/CrateGlobals.py | 2 +- toontown/coghq/DinerStatusIndicator.py | 2 +- toontown/coghq/DistributedBanquetTable.py | 3 ++- toontown/coghq/DistributedBarrelBase.py | 2 +- toontown/coghq/DistributedBattleFactory.py | 2 +- toontown/coghq/DistributedBeanBarrel.py | 2 +- toontown/coghq/DistributedButton.py | 4 ++-- toontown/coghq/DistributedCashbotBossCrane.py | 4 +++- .../coghq/DistributedCashbotBossCraneAI.py | 2 +- .../coghq/DistributedCashbotBossObject.py | 2 +- .../coghq/DistributedCashbotBossObjectAI.py | 2 +- toontown/coghq/DistributedCashbotBossSafe.py | 2 +- .../coghq/DistributedCashbotBossSafeAI.py | 2 +- .../coghq/DistributedCashbotBossTreasure.py | 2 +- toontown/coghq/DistributedCogKart.py | 2 +- toontown/coghq/DistributedCountryClub.py | 2 +- .../coghq/DistributedCountryClubBattle.py | 2 +- toontown/coghq/DistributedCountryClubRoom.py | 2 +- toontown/coghq/DistributedCrate.py | 2 +- toontown/coghq/DistributedCrushableEntity.py | 2 +- toontown/coghq/DistributedDoorEntity.py | 4 ++-- toontown/coghq/DistributedElevatorMarker.py | 4 ++-- toontown/coghq/DistributedFactory.py | 2 +- .../coghq/DistributedFactoryElevatorExt.py | 2 +- toontown/coghq/DistributedFoodBelt.py | 2 +- toontown/coghq/DistributedGagBarrel.py | 2 +- toontown/coghq/DistributedGolfGreenGame.py | 4 ++-- toontown/coghq/DistributedGolfSpot.py | 3 ++- toontown/coghq/DistributedGrid.py | 2 +- toontown/coghq/DistributedHealBarrel.py | 2 +- toontown/coghq/DistributedInGameEditor.py | 2 +- toontown/coghq/DistributedLaserField.py | 4 ++-- toontown/coghq/DistributedLawOffice.py | 2 +- .../coghq/DistributedLawOfficeElevatorInt.py | 2 +- toontown/coghq/DistributedLawOfficeFloor.py | 2 +- toontown/coghq/DistributedLawbotBossGavel.py | 2 +- .../coghq/DistributedLawbotBossGavelAI.py | 2 +- toontown/coghq/DistributedLawbotCannon.py | 4 ++-- toontown/coghq/DistributedLawbotChair.py | 2 +- toontown/coghq/DistributedLawbotChairAI.py | 2 +- toontown/coghq/DistributedLevelBattle.py | 2 +- toontown/coghq/DistributedLift.py | 2 +- toontown/coghq/DistributedMaze.py | 2 +- toontown/coghq/DistributedMint.py | 2 +- toontown/coghq/DistributedMintBattle.py | 2 +- toontown/coghq/DistributedMintRoom.py | 2 +- toontown/coghq/DistributedMoleField.py | 2 +- toontown/coghq/DistributedMover.py | 4 ++-- toontown/coghq/DistributedSecurityCamera.py | 4 ++-- toontown/coghq/DistributedSinkingPlatform.py | 2 +- toontown/coghq/DistributedStage.py | 2 +- toontown/coghq/DistributedStageAI.py | 2 +- toontown/coghq/DistributedStageBattle.py | 2 +- toontown/coghq/DistributedStageRoom.py | 2 +- toontown/coghq/DistributedStomper.py | 2 +- toontown/coghq/DistributedStomperPair.py | 2 +- toontown/coghq/DistributedSwitch.py | 4 ++-- toontown/coghq/DistributedTrigger.py | 4 ++-- toontown/coghq/FactoryCameraViews.py | 2 +- toontown/coghq/FactoryExterior.py | 2 +- toontown/coghq/FactoryInterior.py | 2 +- toontown/coghq/FactoryUtil.py | 2 +- toontown/coghq/GameSprite3D.py | 2 +- toontown/coghq/GearEntity.py | 2 +- toontown/coghq/GoonClipPlane.py | 2 +- toontown/coghq/InGameEditor.py | 2 +- toontown/coghq/LawbotHQBossBattle.py | 2 +- toontown/coghq/LawbotHQExterior.py | 2 +- toontown/coghq/LawbotOfficeExterior.py | 2 +- toontown/coghq/LevelSuitPlannerAI.py | 2 +- toontown/coghq/LobbyManager.py | 2 +- toontown/coghq/MintInterior.py | 2 +- toontown/coghq/MintRoom.py | 2 +- toontown/coghq/MoleHill.py | 2 +- toontown/coghq/MovingPlatform.py | 2 +- toontown/coghq/PlatformEntity.py | 2 +- toontown/coghq/SellbotCogHQLoader.py | 2 +- toontown/coghq/SellbotHQBossBattle.py | 2 +- toontown/coghq/SpecImports.py | 2 +- toontown/coghq/StageInterior.py | 2 +- toontown/coghq/StageRoom.py | 2 +- toontown/distributed/DistributedTimer.py | 2 +- toontown/distributed/DistributedTimerAI.py | 2 +- toontown/distributed/HoodMgr.py | 2 +- toontown/distributed/PlayGame.py | 2 +- toontown/effects/BlastEffect.py | 2 +- toontown/effects/Bubbles.py | 2 +- toontown/effects/CarSmoke.py | 2 +- toontown/effects/ChrysanthemumEffect.py | 2 +- toontown/effects/Drift.py | 2 +- toontown/effects/DustCloud.py | 2 +- toontown/effects/EffectController.py | 2 +- toontown/effects/Firework.py | 2 +- toontown/effects/FireworkEffect.py | 2 +- toontown/effects/FireworkShow.py | 2 +- toontown/effects/FireworkSparkles.py | 2 +- toontown/effects/Fireworks.py | 2 +- toontown/effects/FlashEffect.py | 2 +- toontown/effects/Glow.py | 2 +- toontown/effects/GlowTrail.py | 2 +- toontown/effects/IceCream.py | 2 +- toontown/effects/NoiseSparkles.py | 2 +- toontown/effects/PeonyEffect.py | 2 +- toontown/effects/PolyTrail.py | 2 +- toontown/effects/PooledEffect.py | 2 +- toontown/effects/RayBurst.py | 2 +- toontown/effects/RingEffect.py | 2 +- toontown/effects/Ripples.py | 2 +- toontown/effects/ScavengerHuntEffects.py | 2 +- toontown/effects/SimpleSparkles.py | 2 +- toontown/effects/SkullBurst.py | 2 +- toontown/effects/SkullFlash.py | 2 +- toontown/effects/Sparks.py | 2 +- toontown/effects/SparksTrail.py | 2 +- toontown/effects/SparksTrailLong.py | 2 +- toontown/effects/Splash.py | 2 +- toontown/effects/StarBurst.py | 2 +- toontown/effects/TrailExplosion.py | 2 +- toontown/effects/Wake.py | 2 +- toontown/estate/BankGUI.py | 2 +- toontown/estate/BeanRecipeGui.py | 2 +- toontown/estate/ClosetGUI.py | 2 +- .../estate/DistributedAnimatedStatuary.py | 2 +- toontown/estate/DistributedBank.py | 4 ++-- toontown/estate/DistributedCannon.py | 4 ++-- .../estate/DistributedChangingStatuary.py | 2 +- toontown/estate/DistributedCloset.py | 4 ++-- toontown/estate/DistributedEstate.py | 4 ++-- toontown/estate/DistributedFireworksCannon.py | 4 ++-- toontown/estate/DistributedGagTree.py | 2 +- toontown/estate/DistributedGarden.py | 4 ++-- toontown/estate/DistributedGardenBox.py | 4 ++-- toontown/estate/DistributedGardenPlot.py | 4 ++-- toontown/estate/DistributedHouse.py | 4 ++-- toontown/estate/DistributedHouseDoor.py | 2 +- toontown/estate/DistributedHouseInterior.py | 2 +- toontown/estate/DistributedLawnDecor.py | 4 ++-- toontown/estate/DistributedMailbox.py | 2 +- toontown/estate/DistributedPhone.py | 2 +- toontown/estate/DistributedStatuary.py | 4 ++-- toontown/estate/DistributedTarget.py | 4 ++-- toontown/estate/DistributedToonStatuary.py | 6 ++--- toontown/estate/DistributedTrunk.py | 2 +- toontown/estate/Estate.py | 2 +- toontown/estate/EstateLoader.py | 2 +- toontown/estate/EstateManager.py | 4 ++-- toontown/estate/FireworkItemPanel.py | 2 +- toontown/estate/FireworksGui.py | 2 +- toontown/estate/FlowerBrowser.py | 2 +- toontown/estate/FlowerPanel.py | 2 +- toontown/estate/FlowerPhoto.py | 2 +- toontown/estate/FlowerPicker.py | 2 +- toontown/estate/FlowerSellGUI.py | 2 +- toontown/estate/FlowerSpeciesPanel.py | 2 +- toontown/estate/GardenDropGame.py | 4 ++-- toontown/estate/GardenProgressMeter.py | 4 ++-- toontown/estate/GardenTutorial.py | 2 +- toontown/estate/House.py | 2 +- toontown/estate/PlantingGUI.py | 2 +- toontown/estate/SpecialsPhoto.py | 2 +- toontown/estate/ToonStatueSelectionGUI.py | 2 +- toontown/estate/TrunkGUI.py | 2 +- toontown/estate/houseDesign.py | 2 +- toontown/fishing/BingoCardCell.py | 2 +- toontown/fishing/BingoCardGui.py | 2 +- toontown/fishing/DistributedFishingPond.py | 2 +- toontown/fishing/DistributedFishingTarget.py | 2 +- .../fishing/DistributedPondBingoManager.py | 2 +- toontown/fishing/FishBrowser.py | 2 +- toontown/fishing/FishPanel.py | 2 +- toontown/fishing/FishPhoto.py | 2 +- toontown/fishing/FishPicker.py | 2 +- toontown/fishing/FishSellGUI.py | 2 +- toontown/fishing/GenusPanel.py | 2 +- toontown/friends/FriendInvitee.py | 2 +- toontown/friends/FriendInviter.py | 4 ++-- toontown/friends/FriendNotifier.py | 2 +- toontown/friends/FriendsListManager.py | 2 +- toontown/friends/FriendsListPanel.py | 4 ++-- toontown/friends/ToontownFriendSecret.py | 2 +- toontown/golf/BuildGeometry.py | 2 +- toontown/golf/DistributedGolfCourse.py | 2 +- toontown/golf/DistributedGolfCourseAI.py | 2 +- toontown/golf/DistributedGolfHole.py | 3 ++- toontown/golf/DistributedGolfHoleAI.py | 2 +- toontown/golf/DistributedPhysicsWorld.py | 2 +- toontown/golf/DistributedPhysicsWorldAI.py | 2 +- toontown/golf/GolfHoleBase.py | 2 +- toontown/golf/GolfManagerAI.py | 2 +- toontown/golf/GolfRewardDialog.py | 2 +- toontown/golf/GolfScoreBoard.py | 4 ++-- toontown/golf/PhysicsWorldBase.py | 2 +- toontown/hood/BRHood.py | 2 +- toontown/hood/BossbotHQDataAI.py | 2 +- toontown/hood/CashbotHQ.py | 2 +- toontown/hood/DDHood.py | 2 +- toontown/hood/DGHood.py | 2 +- toontown/hood/DLHood.py | 2 +- toontown/hood/EstateHood.py | 2 +- toontown/hood/GSHood.py | 2 +- toontown/hood/GSHoodDataAI.py | 2 +- toontown/hood/GZHood.py | 2 +- toontown/hood/GZHoodDataAI.py | 2 +- toontown/hood/Hood.py | 2 +- toontown/hood/HoodDataAI.py | 2 +- toontown/hood/InteractiveAnimatedProp.py | 2 +- toontown/hood/MMHood.py | 2 +- toontown/hood/OZHood.py | 2 +- toontown/hood/OZHoodDataAI.py | 2 +- toontown/hood/PartyHood.py | 2 +- toontown/hood/Place.py | 2 +- toontown/hood/QuietZoneState.py | 2 +- toontown/hood/SkyUtil.py | 2 +- toontown/hood/TTHood.py | 2 +- toontown/hood/ToonHood.py | 2 +- toontown/hood/TrialerForceAcknowledge.py | 2 +- toontown/hood/TutorialHood.py | 2 +- toontown/launcher/DownloadForceAcknowledge.py | 2 +- toontown/login/AvatarChoice.py | 2 +- toontown/login/AvatarChooser.py | 4 ++-- toontown/makeatoon/BodyShop.py | 2 +- toontown/makeatoon/ClothesGUI.py | 4 ++-- toontown/makeatoon/ColorShop.py | 4 ++-- toontown/makeatoon/GenderShop.py | 2 +- toontown/makeatoon/MakeAToon.py | 2 +- toontown/makeatoon/NameGenerator.py | 2 +- toontown/makeatoon/NameShop.py | 6 ++--- toontown/makeatoon/ShuffleButton.py | 2 +- toontown/minigame/ArrowKeys.py | 2 +- toontown/minigame/CatchGameToonSD.py | 2 +- toontown/minigame/CogThief.py | 2 +- toontown/minigame/CogThiefGameGlobals.py | 2 +- toontown/minigame/CogThiefGameToonSD.py | 2 +- toontown/minigame/DistributedCannonGame.py | 4 ++-- toontown/minigame/DistributedCatchGame.py | 2 +- toontown/minigame/DistributedCogThiefGame.py | 2 +- .../minigame/DistributedCogThiefGameAI.py | 2 +- toontown/minigame/DistributedIceGame.py | 2 +- toontown/minigame/DistributedIceGameAI.py | 2 +- toontown/minigame/DistributedIceWorld.py | 4 ++-- toontown/minigame/DistributedMazeGame.py | 2 +- toontown/minigame/DistributedMinigame.py | 4 ++-- .../minigame/DistributedMinigameTemplate.py | 2 +- toontown/minigame/DistributedPairingGame.py | 2 +- toontown/minigame/DistributedPatternGame.py | 4 ++-- toontown/minigame/DistributedPhotoGame.py | 4 ++-- toontown/minigame/DistributedRaceGame.py | 4 ++-- toontown/minigame/DistributedRingGame.py | 2 +- toontown/minigame/DistributedTagGame.py | 2 +- toontown/minigame/DistributedTargetGame.py | 2 +- toontown/minigame/DistributedTravelGame.py | 4 ++-- toontown/minigame/DistributedTugOfWarGame.py | 4 ++-- toontown/minigame/DistributedTwoDGame.py | 2 +- toontown/minigame/DistributedVineGame.py | 3 ++- toontown/minigame/FogOverlay.py | 2 +- toontown/minigame/IceGameGlobals.py | 2 +- toontown/minigame/IceTreasure.py | 2 +- toontown/minigame/MazeBase.py | 2 +- toontown/minigame/MazeMapGui.py | 6 ++--- toontown/minigame/MazeSuit.py | 5 +++-- toontown/minigame/MinigameAvatarScorePanel.py | 4 ++-- toontown/minigame/MinigamePhysicsWorldBase.py | 4 ++-- toontown/minigame/MinigamePowerMeter.py | 4 ++-- toontown/minigame/MinigameRulesPanel.py | 2 +- toontown/minigame/PairingGameCard.py | 2 +- toontown/minigame/PhotoGameGlobals.py | 2 +- toontown/minigame/PlayingCard.py | 2 +- toontown/minigame/PlayingCardGlobals.py | 2 +- toontown/minigame/PurchaseBase.py | 2 +- toontown/minigame/Ring.py | 4 ++-- toontown/minigame/RingGameGlobals.py | 2 +- toontown/minigame/RingGroup.py | 4 ++-- toontown/minigame/RubberBand.py | 2 +- toontown/minigame/SwingVine.py | 2 +- toontown/minigame/TargetGameGlobals.py | 2 +- toontown/minigame/ToonBlitzAssetMgr.py | 4 ++-- toontown/minigame/ToonBlitzGlobals.py | 2 +- toontown/minigame/Trajectory.py | 2 +- toontown/minigame/TwoDBattleMgr.py | 2 +- toontown/minigame/TwoDBlock.py | 2 +- toontown/minigame/TwoDCamera.py | 2 +- toontown/minigame/TwoDEnemy.py | 2 +- toontown/minigame/TwoDEnemyMgr.py | 2 +- toontown/minigame/TwoDGameToonSD.py | 2 +- toontown/minigame/TwoDSection.py | 2 +- toontown/minigame/TwoDSectionMgr.py | 2 +- toontown/minigame/TwoDSpawnPointMgr.py | 2 +- toontown/minigame/TwoDStomperMgr.py | 2 +- toontown/minigame/TwoDTreasureMgr.py | 2 +- toontown/minigame/VineBat.py | 2 +- toontown/minigame/VineGameGlobals.py | 2 +- toontown/minigame/VineHeadFrame.py | 2 +- toontown/minigame/VineSpider.py | 2 +- toontown/minigame/VoteResultsPanel.py | 2 +- toontown/minigame/VoteResultsTrolleyPanel.py | 2 +- toontown/parties/CalendarGuiDay.py | 2 +- toontown/parties/CalendarGuiMonth.py | 2 +- toontown/parties/Cannon.py | 2 +- toontown/parties/Decoration.py | 2 +- toontown/parties/DistributedPartyActivity.py | 4 ++-- toontown/parties/DistributedPartyCannon.py | 2 +- .../parties/DistributedPartyCannonActivity.py | 2 +- .../parties/DistributedPartyCatchActivity.py | 4 ++-- .../parties/DistributedPartyCogActivity.py | 2 +- .../DistributedPartyDanceActivityBase.py | 2 +- .../DistributedPartyFireworksActivity.py | 8 +++---- .../DistributedPartyJukeboxActivityBase.py | 2 +- .../DistributedPartyTrampolineActivity.py | 22 +++++++++---------- .../DistributedPartyTugOfWarActivity.py | 10 ++++----- .../DistributedPartyWinterCatchActivity.py | 2 +- toontown/parties/JellybeanRewardGui.py | 2 +- toontown/parties/JukeboxGui.py | 2 +- toontown/parties/KeyCodes.py | 2 +- toontown/parties/KeyCodesGui.py | 2 +- toontown/parties/Party.py | 2 +- toontown/parties/PartyCatchActivityToonSD.py | 2 +- toontown/parties/PartyCog.py | 4 ++-- toontown/parties/PartyCogActivity.py | 4 ++-- toontown/parties/PartyCogActivityGui.py | 4 ++-- toontown/parties/PartyCogActivityInput.py | 2 +- toontown/parties/PartyCogActivityPlayer.py | 2 +- toontown/parties/PartyCogUtils.py | 2 +- toontown/parties/PartyDanceActivityToonFSM.py | 2 +- toontown/parties/PartyEditor.py | 2 +- toontown/parties/PartyEditorGrid.py | 2 +- toontown/parties/PartyEditorGridElement.py | 2 +- toontown/parties/PartyEditorGridSquare.py | 2 +- toontown/parties/PartyEditorListElement.py | 2 +- toontown/parties/PartyGlobals.py | 4 ++-- toontown/parties/PartyLoader.py | 4 ++-- toontown/parties/PartyPlanner.py | 4 ++-- toontown/parties/PartyUtils.py | 2 +- toontown/parties/PublicPartyGui.py | 2 +- toontown/parties/ScrolledFriendList.py | 2 +- toontown/parties/ServerTimeGui.py | 2 +- toontown/parties/StretchingArrow.py | 2 +- toontown/parties/TeamActivityGui.py | 2 +- .../parties/WinterPartyCatchActivityToonSD.py | 2 +- toontown/pets/DistributedPet.py | 4 ++-- toontown/pets/DistributedPetAI.py | 2 +- toontown/pets/Pet.py | 2 +- toontown/pets/PetAvatarPanel.py | 4 ++-- toontown/pets/PetBrain.py | 2 +- toontown/pets/PetChase.py | 2 +- toontown/pets/PetCollider.py | 2 +- toontown/pets/PetConstants.py | 2 +- toontown/pets/PetDNA.py | 2 +- toontown/pets/PetDetailPanel.py | 4 ++-- toontown/pets/PetFlee.py | 2 +- toontown/pets/PetGoalMgr.py | 2 +- toontown/pets/PetLeash.py | 2 +- toontown/pets/PetLookerAI.py | 2 +- toontown/pets/PetManager.py | 2 +- toontown/pets/PetNameGenerator.py | 2 +- toontown/pets/PetSphere.py | 2 +- toontown/pets/PetTutorial.py | 2 +- toontown/pets/PetWander.py | 2 +- toontown/pets/PetshopGUI.py | 2 +- toontown/quest/BlinkingArrows.py | 2 +- toontown/quest/QuestChoiceGui.py | 2 +- toontown/quest/QuestMap.py | 2 +- toontown/quest/QuestMapGlobals.py | 2 +- toontown/quest/QuestParser.py | 2 +- toontown/quest/QuestPoster.py | 2 +- toontown/quest/QuestRewardCounter.py | 2 +- toontown/quest/TrackChoiceGui.py | 2 +- toontown/racing/DistributedGag.py | 2 +- toontown/racing/DistributedLeaderBoard.py | 2 +- toontown/racing/DistributedProjectile.py | 4 ++-- toontown/racing/DistributedRace.py | 4 ++-- toontown/racing/DistributedVehicle.py | 4 ++-- toontown/racing/DistributedViewPad.py | 2 +- toontown/racing/DroppedGag.py | 4 ++-- toontown/racing/EffectManager.py | 4 ++-- toontown/racing/FlyingGag.py | 4 ++-- toontown/racing/Kart.py | 4 ++-- toontown/racing/KartDNA.py | 2 +- toontown/racing/KartShopGui.py | 4 ++-- toontown/racing/Piejectile.py | 2 +- toontown/racing/PiejectileManager.py | 4 ++-- toontown/racing/RaceEndPanels.py | 2 +- toontown/racing/RaceGUI.py | 4 ++-- toontown/racing/RaceGag.py | 2 +- toontown/racing/RaceHeadFrame.py | 2 +- toontown/safezone/BRPlayground.py | 2 +- toontown/safezone/BRSafeZoneLoader.py | 2 +- toontown/safezone/ButterflyGlobals.py | 2 +- toontown/safezone/DDPlayground.py | 2 +- toontown/safezone/DDSafeZoneLoader.py | 2 +- toontown/safezone/DGPlayground.py | 2 +- toontown/safezone/DGSafeZoneLoader.py | 2 +- toontown/safezone/DLPlayground.py | 2 +- toontown/safezone/DLSafeZoneLoader.py | 2 +- toontown/safezone/DistributedBoat.py | 4 ++-- toontown/safezone/DistributedButterfly.py | 5 +++-- toontown/safezone/DistributedCheckers.py | 2 +- .../safezone/DistributedChineseCheckers.py | 2 +- toontown/safezone/DistributedDGFlower.py | 2 +- .../safezone/DistributedEFlyingTreasure.py | 2 +- toontown/safezone/DistributedFindFour.py | 2 +- toontown/safezone/DistributedFishingSpot.py | 4 ++-- toontown/safezone/DistributedGolfKart.py | 2 +- toontown/safezone/DistributedMMPiano.py | 4 ++-- toontown/safezone/DistributedPartyGate.py | 2 +- toontown/safezone/DistributedPicnicBasket.py | 2 +- toontown/safezone/DistributedPicnicTable.py | 2 +- toontown/safezone/DistributedSZTreasure.py | 2 +- toontown/safezone/DistributedTreasure.py | 2 +- toontown/safezone/DistributedTrolley.py | 2 +- toontown/safezone/GSPlayground.py | 2 +- toontown/safezone/GSSafeZoneLoader.py | 2 +- toontown/safezone/GZPlayground.py | 2 +- toontown/safezone/GZSafeZoneLoader.py | 2 +- toontown/safezone/GameMenu.py | 2 +- toontown/safezone/GameTutorials.py | 2 +- toontown/safezone/GolfKart.py | 4 ++-- toontown/safezone/MMPlayground.py | 2 +- toontown/safezone/MMSafeZoneLoader.py | 2 +- toontown/safezone/OZPlayground.py | 2 +- toontown/safezone/OZSafeZoneLoader.py | 2 +- toontown/safezone/PicnicBasket.py | 4 ++-- toontown/safezone/Playground.py | 2 +- toontown/safezone/PublicWalk.py | 2 +- toontown/safezone/SafeZoneLoader.py | 2 +- toontown/safezone/SafeZoneManager.py | 2 +- toontown/safezone/TTPlayground.py | 2 +- toontown/safezone/TTSafeZoneLoader.py | 2 +- toontown/safezone/Train.py | 2 +- toontown/safezone/Walk.py | 2 +- toontown/shtiker/DeleteManager.py | 2 +- toontown/shtiker/DisguisePage.py | 2 +- toontown/shtiker/FishPage.py | 2 +- toontown/shtiker/GardenPage.py | 2 +- toontown/shtiker/GolfPage.py | 2 +- toontown/shtiker/HtmlView.py | 20 ++++++++--------- toontown/shtiker/InventoryPage.py | 2 +- toontown/shtiker/IssueFrame.py | 8 +++---- toontown/shtiker/KartPage.py | 2 +- toontown/shtiker/MapPage.py | 2 +- toontown/shtiker/NPCFriendPage.py | 2 +- toontown/shtiker/PhotoAlbumPage.py | 4 ++-- toontown/shtiker/PurchaseManager.py | 2 +- toontown/shtiker/PurchaseManagerAI.py | 2 +- toontown/shtiker/QuestPage.py | 4 ++-- toontown/shtiker/ShardPage.py | 4 ++-- toontown/shtiker/ShtikerBook.py | 4 ++-- toontown/shtiker/ShtikerPage.py | 2 +- toontown/shtiker/SuitPage.py | 2 +- toontown/shtiker/SummonCogDialog.py | 2 +- toontown/shtiker/TIPPage.py | 4 ++-- toontown/shtiker/TrackPage.py | 4 ++-- toontown/suit/BossCog.py | 2 +- toontown/suit/DistributedBossCog.py | 2 +- toontown/suit/DistributedBossCogAI.py | 2 +- toontown/suit/DistributedBossbotBoss.py | 2 +- toontown/suit/DistributedBossbotBossAI.py | 2 +- toontown/suit/DistributedCashbotBoss.py | 2 +- toontown/suit/DistributedCashbotBossAI.py | 2 +- toontown/suit/DistributedCashbotBossGoon.py | 2 +- toontown/suit/DistributedCashbotBossGoonAI.py | 2 +- toontown/suit/DistributedFactorySuit.py | 2 +- toontown/suit/DistributedGoon.py | 2 +- toontown/suit/DistributedGridGoon.py | 2 +- toontown/suit/DistributedLawbotBoss.py | 2 +- toontown/suit/DistributedLawbotBossSuit.py | 2 +- toontown/suit/DistributedSellbotBoss.py | 4 ++-- toontown/suit/DistributedStageSuit.py | 2 +- toontown/suit/DistributedSuit.py | 2 +- toontown/suit/DistributedSuitAI.py | 2 +- toontown/suit/DistributedSuitBase.py | 2 +- toontown/suit/DistributedSuitPlanner.py | 2 +- toontown/suit/DistributedTutorialSuit.py | 2 +- toontown/suit/Goon.py | 4 ++-- toontown/suit/GoonDeath.py | 2 +- toontown/suit/GoonGlobals.py | 2 +- toontown/suit/GoonPathData.py | 2 +- toontown/suit/RoguesGallery.py | 2 +- toontown/suit/SellbotBossGlobals.py | 2 +- toontown/suit/SuitAvatarPanel.py | 4 ++-- toontown/suit/SuitBase.py | 4 ++-- toontown/suit/SuitDNA.py | 2 +- toontown/suit/SuitPlannerBase.py | 2 +- toontown/toon/AvatarPanelBase.py | 2 +- toontown/toon/BoardingGroupInviterPanels.py | 2 +- toontown/toon/DeathForceAcknowledge.py | 4 ++-- toontown/toon/DistributedNPCBlocker.py | 4 ++-- toontown/toon/DistributedNPCBlockerAI.py | 2 +- toontown/toon/DistributedNPCClerk.py | 2 +- toontown/toon/DistributedNPCClerkAI.py | 2 +- toontown/toon/DistributedNPCFisherman.py | 4 ++-- toontown/toon/DistributedNPCFishermanAI.py | 2 +- .../toon/DistributedNPCFlippyInToonHall.py | 2 +- toontown/toon/DistributedNPCKartClerk.py | 2 +- toontown/toon/DistributedNPCKartClerkAI.py | 2 +- toontown/toon/DistributedNPCPetclerk.py | 4 ++-- toontown/toon/DistributedNPCPetclerkAI.py | 2 +- toontown/toon/DistributedNPCScientist.py | 2 +- .../toon/DistributedNPCSpecialQuestGiver.py | 2 +- .../toon/DistributedNPCSpecialQuestGiverAI.py | 2 +- toontown/toon/DistributedNPCTailor.py | 4 ++-- toontown/toon/DistributedNPCTailorAI.py | 2 +- toontown/toon/DistributedNPCToon.py | 2 +- toontown/toon/DistributedNPCToonAI.py | 2 +- toontown/toon/DistributedNPCToonBase.py | 2 +- toontown/toon/DistributedNPCToonBaseAI.py | 2 +- toontown/toon/DistributedToon.py | 2 +- toontown/toon/DistributedToonAI.py | 2 +- toontown/toon/ElevatorNotifier.py | 2 +- toontown/toon/Experience.py | 2 +- toontown/toon/GroupInvitee.py | 2 +- toontown/toon/GroupPanel.py | 2 +- toontown/toon/HealthForceAcknowledge.py | 2 +- toontown/toon/InventoryBase.py | 2 +- toontown/toon/InventoryNew.py | 2 +- toontown/toon/LaffMeter.py | 2 +- toontown/toon/LocalToon.py | 2 +- toontown/toon/NPCForceAcknowledge.py | 2 +- toontown/toon/NPCFriendPanel.py | 2 +- toontown/toon/PlayerDetailPanel.py | 4 ++-- toontown/toon/PlayerInfoPanel.py | 4 ++-- toontown/toon/TTEmote.py | 2 +- toontown/toon/ToonAvatarDetailPanel.py | 4 ++-- toontown/toon/ToonAvatarPanel.py | 4 ++-- toontown/toon/ToonDNA.py | 2 +- toontown/toon/ToonHeadFrame.py | 2 +- toontown/toon/ToonTeleportPanel.py | 4 ++-- toontown/toonbase/DisplayOptions.py | 2 +- toontown/toonbase/TTLocalizerEnglish.py | 2 +- toontown/toonbase/ToontownLoader.py | 2 +- toontown/toonbase/ToontownTimer.py | 2 +- toontown/toontowngui/NewsPageButtonManager.py | 2 +- toontown/toontowngui/TeaserPanel.py | 4 ++-- toontown/toontowngui/ToonHeadDialog.py | 2 +- .../toontowngui/ToontownLoadingBlocker.py | 2 +- toontown/toontowngui/ToontownLoadingScreen.py | 2 +- toontown/town/TownBattleAttackPanel.py | 2 +- toontown/town/TownBattleChooseAvatarPanel.py | 2 +- toontown/town/TownBattleSOSPanel.py | 4 ++-- toontown/town/TownBattleSOSPetInfoPanel.py | 4 ++-- toontown/town/TownBattleSOSPetSearchPanel.py | 4 ++-- toontown/town/TownBattleToonPanel.py | 4 ++-- toontown/town/TownBattleWaitPanel.py | 4 ++-- toontown/town/TownLoader.py | 2 +- toontown/trolley/Trolley.py | 4 ++-- toontown/tutorial/TutorialForceAcknowledge.py | 2 +- toontown/tutorial/TutorialManager.py | 2 +- toontown/uberdog/DataStore.py | 2 +- .../uberdog/DistributedDeliveryManager.py | 2 +- 755 files changed, 925 insertions(+), 915 deletions(-) diff --git a/otp/ai/AIBase.py b/otp/ai/AIBase.py index 0e44837..a69faff 100644 --- a/otp/ai/AIBase.py +++ b/otp/ai/AIBase.py @@ -1,5 +1,6 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.directnotify.DirectNotifyGlobal import * +from direct.showbase import DConfig from direct.showbase.MessengerGlobal import * from direct.showbase.BulletinBoardGlobal import * from direct.task.TaskManagerGlobal import * @@ -20,7 +21,7 @@ class AIBase: notify = directNotify.newCategory('AIBase') def __init__(self): - self.config = getConfigShowbase() + self.config = DConfig __builtins__['__dev__'] = self.config.GetBool('want-dev', 0) __builtins__['__astron__'] = self.config.GetBool('astron-support', 1) __builtins__['__execWarnings__'] = self.config.GetBool('want-exec-warnings', 0) diff --git a/otp/ai/AIZoneData.py b/otp/ai/AIZoneData.py index 6c8f2b6..45c4a28 100644 --- a/otp/ai/AIZoneData.py +++ b/otp/ai/AIZoneData.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.distributed import ParentMgr from direct.directnotify.DirectNotifyGlobal import directNotify from direct.task import Task diff --git a/otp/ai/BanManagerAI.py b/otp/ai/BanManagerAI.py index 3665e8b..4352b97 100644 --- a/otp/ai/BanManagerAI.py +++ b/otp/ai/BanManagerAI.py @@ -1,6 +1,6 @@ import urllib.request, urllib.parse, urllib.error import os -from pandac.PandaModules import HTTPClient, Ramfile +from panda3d.core import HTTPClient, Ramfile from direct.directnotify import DirectNotifyGlobal class BanManagerAI: diff --git a/otp/ai/TimeManager.py b/otp/ai/TimeManager.py index 1abe1d3..dd90517 100644 --- a/otp/ai/TimeManager.py +++ b/otp/ai/TimeManager.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.showbase.DirectObject import * from direct.distributed.ClockDelta import * from direct.task import Task diff --git a/otp/avatar/AvatarDNA.py b/otp/avatar/AvatarDNA.py index f7e7f65..20e6f61 100644 --- a/otp/avatar/AvatarDNA.py +++ b/otp/avatar/AvatarDNA.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.directnotify.DirectNotifyGlobal import * import random from direct.distributed.PyDatagram import PyDatagram diff --git a/otp/avatar/AvatarPanel.py b/otp/avatar/AvatarPanel.py index c5b9572..5ac2272 100644 --- a/otp/avatar/AvatarPanel.py +++ b/otp/avatar/AvatarPanel.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.gui.DirectGui import * from direct.showbase import DirectObject from . import Avatar diff --git a/otp/avatar/DistributedAvatar.py b/otp/avatar/DistributedAvatar.py index a8b978e..3e4ce1b 100644 --- a/otp/avatar/DistributedAvatar.py +++ b/otp/avatar/DistributedAvatar.py @@ -1,6 +1,6 @@ import time import string -from pandac.PandaModules import * +from panda3d.core import * from direct.distributed import DistributedNode from direct.actor.DistributedActor import DistributedActor from direct.interval.IntervalGlobal import * diff --git a/otp/avatar/PositionExaminer.py b/otp/avatar/PositionExaminer.py index bcddb03..5ab5ba3 100644 --- a/otp/avatar/PositionExaminer.py +++ b/otp/avatar/PositionExaminer.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.showbase.DirectObject import DirectObject from otp.otpbase import OTPGlobals diff --git a/otp/avatar/ShadowCaster.py b/otp/avatar/ShadowCaster.py index f3e964c..be417ba 100644 --- a/otp/avatar/ShadowCaster.py +++ b/otp/avatar/ShadowCaster.py @@ -1,5 +1,5 @@ -from pandac.PandaModules import * -from pandac.PandaModules import * +from panda3d.core import * +from panda3d.core import * from direct.directnotify import DirectNotifyGlobal from direct.showbase.ShadowPlacer import ShadowPlacer from otp.otpbase import OTPGlobals diff --git a/otp/chat/ChatInputNormal.py b/otp/chat/ChatInputNormal.py index d518757..c6248bb 100644 --- a/otp/chat/ChatInputNormal.py +++ b/otp/chat/ChatInputNormal.py @@ -2,7 +2,7 @@ from direct.showbase import DirectObject from otp.otpbase import OTPGlobals import sys from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from otp.otpbase import OTPLocalizer class ChatInputNormal(DirectObject.DirectObject): diff --git a/otp/chat/ChatInputTyped.py b/otp/chat/ChatInputTyped.py index dc49e46..03027de 100644 --- a/otp/chat/ChatInputTyped.py +++ b/otp/chat/ChatInputTyped.py @@ -2,7 +2,7 @@ from direct.showbase import DirectObject from otp.otpbase import OTPGlobals import sys from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from otp.otpbase import OTPLocalizer class ChatInputTyped(DirectObject.DirectObject): @@ -127,7 +127,7 @@ class ChatInputTyped(DirectObject.DirectObject): def __execMessage(self, message): if not ChatInputTyped.ExecNamespace: ChatInputTyped.ExecNamespace = {} - exec('from pandac.PandaModules import *', globals(), self.ExecNamespace) + exec('from panda3d.core import *', globals(), self.ExecNamespace) self.importExecNamespace() try: if not __debug__ or __execWarnings__: diff --git a/otp/chat/ChatInputWhiteListFrame.py b/otp/chat/ChatInputWhiteListFrame.py index 0d4b1d4..934816c 100644 --- a/otp/chat/ChatInputWhiteListFrame.py +++ b/otp/chat/ChatInputWhiteListFrame.py @@ -3,7 +3,7 @@ from otp.otpbase import OTPGlobals import sys from direct.directnotify import DirectNotifyGlobal from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from otp.otpbase import OTPLocalizer from direct.task import Task from otp.chat.ChatInputTyped import ChatInputTyped diff --git a/otp/distributed/ClsendTracker.py b/otp/distributed/ClsendTracker.py index fdd2995..b6345d8 100644 --- a/otp/distributed/ClsendTracker.py +++ b/otp/distributed/ClsendTracker.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import StringStream +from panda3d.core import StringStream from direct.distributed.PyDatagram import PyDatagram import random diff --git a/otp/friends/FriendManager.py b/otp/friends/FriendManager.py index c581461..0cfa256 100644 --- a/otp/friends/FriendManager.py +++ b/otp/friends/FriendManager.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.distributed import DistributedObject from direct.directnotify import DirectNotifyGlobal from otp.otpbase import OTPGlobals diff --git a/otp/friends/FriendSecret.py b/otp/friends/FriendSecret.py index 9a441ce..0b01bd2 100644 --- a/otp/friends/FriendSecret.py +++ b/otp/friends/FriendSecret.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from panda3d.otp import * from direct.gui.DirectGui import * from direct.directnotify import DirectNotifyGlobal diff --git a/otp/launcher/DownloadWatcher.py b/otp/launcher/DownloadWatcher.py index b7c55fd..f751c47 100644 --- a/otp/launcher/DownloadWatcher.py +++ b/otp/launcher/DownloadWatcher.py @@ -1,7 +1,7 @@ from direct.task import Task from otp.otpbase import OTPLocalizer from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from direct.showbase.DirectObject import DirectObject class DownloadWatcher(DirectObject): diff --git a/otp/launcher/DummyLauncherBase.py b/otp/launcher/DummyLauncherBase.py index ef76e30..0b5047c 100644 --- a/otp/launcher/DummyLauncherBase.py +++ b/otp/launcher/DummyLauncherBase.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.showbase.MessengerGlobal import * from direct.task.TaskManagerGlobal import * from direct.task.Task import Task diff --git a/otp/level/BasicEntities.py b/otp/level/BasicEntities.py index 5f88697..4497692 100644 --- a/otp/level/BasicEntities.py +++ b/otp/level/BasicEntities.py @@ -1,6 +1,6 @@ from . import Entity from . import DistributedEntity -from pandac.PandaModules import NodePath +from panda3d.core import NodePath class NodePathEntityBase: diff --git a/otp/level/CollisionSolidEntity.py b/otp/level/CollisionSolidEntity.py index b1f8fec..63537e7 100644 --- a/otp/level/CollisionSolidEntity.py +++ b/otp/level/CollisionSolidEntity.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from otp.otpbase import OTPGlobals from direct.directnotify import DirectNotifyGlobal from . import BasicEntities diff --git a/otp/level/CutScene.py b/otp/level/CutScene.py index 819192f..0bf759f 100644 --- a/otp/level/CutScene.py +++ b/otp/level/CutScene.py @@ -1,8 +1,8 @@ from direct.showbase import DirectObject from direct.directnotify import DirectNotifyGlobal from . import BasicEntities -from pandac.PandaModules import * -from pandac.PandaModules import * +from panda3d.core import * +from panda3d.core import * from direct.interval.IntervalGlobal import * from direct.distributed.ClockDelta import * from toontown.toonbase import ToontownGlobals diff --git a/otp/level/DistributedInteractiveEntity.py b/otp/level/DistributedInteractiveEntity.py index af1e4eb..774e211 100644 --- a/otp/level/DistributedInteractiveEntity.py +++ b/otp/level/DistributedInteractiveEntity.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.distributed.ClockDelta import * from direct.directnotify import DirectNotifyGlobal from direct.fsm import ClassicFSM diff --git a/otp/level/DistributedLevel.py b/otp/level/DistributedLevel.py index ae0a681..7243f62 100644 --- a/otp/level/DistributedLevel.py +++ b/otp/level/DistributedLevel.py @@ -1,5 +1,5 @@ from direct.distributed.ClockDelta import * -from pandac.PandaModules import * +from panda3d.core import * from direct.showbase.PythonUtil import Functor, sameElements, list2dict, uniqueElements from direct.interval.IntervalGlobal import * from toontown.distributed.ToontownMsgTypes import * diff --git a/otp/level/EntityTypeRegistry.py b/otp/level/EntityTypeRegistry.py index edbbc54..39df663 100644 --- a/otp/level/EntityTypeRegistry.py +++ b/otp/level/EntityTypeRegistry.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.directnotify import DirectNotifyGlobal import types from . import AttribDesc diff --git a/otp/level/LocatorEntity.py b/otp/level/LocatorEntity.py index 579d981..64c1de8 100644 --- a/otp/level/LocatorEntity.py +++ b/otp/level/LocatorEntity.py @@ -1,5 +1,5 @@ from . import Entity, BasicEntities -from pandac.PandaModules import NodePath +from panda3d.core import NodePath from direct.directnotify import DirectNotifyGlobal class LocatorEntity(Entity.Entity, NodePath): diff --git a/otp/level/PropSpinner.py b/otp/level/PropSpinner.py index c1e5862..f75e344 100644 --- a/otp/level/PropSpinner.py +++ b/otp/level/PropSpinner.py @@ -1,6 +1,6 @@ from direct.interval.IntervalGlobal import * from .Entity import Entity -from pandac.PandaModules import Vec3 +from panda3d.core import Vec3 class PropSpinner(Entity): diff --git a/otp/login/CreateAccountScreen.py b/otp/login/CreateAccountScreen.py index 4e31f3c..339fc24 100644 --- a/otp/login/CreateAccountScreen.py +++ b/otp/login/CreateAccountScreen.py @@ -1,6 +1,6 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from direct.fsm import StateData from otp.otpgui import OTPDialog from direct.fsm import ClassicFSM diff --git a/otp/login/GuiScreen.py b/otp/login/GuiScreen.py index 47f587c..038a106 100644 --- a/otp/login/GuiScreen.py +++ b/otp/login/GuiScreen.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from otp.otpbase import OTPGlobals from direct.gui.DirectGui import * from otp.otpgui import OTPDialog diff --git a/otp/login/HTTPUtil.py b/otp/login/HTTPUtil.py index 181fd44..6896bf4 100644 --- a/otp/login/HTTPUtil.py +++ b/otp/login/HTTPUtil.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * class HTTPUtilException(Exception): diff --git a/otp/login/LeaveToPayDialog.py b/otp/login/LeaveToPayDialog.py index f76f2c8..ced699c 100644 --- a/otp/login/LeaveToPayDialog.py +++ b/otp/login/LeaveToPayDialog.py @@ -2,7 +2,7 @@ from otp.otpbase import OTPGlobals from otp.otpbase import OTPLauncherGlobals from otp.otpbase import OTPLocalizer from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * import os class LeaveToPayDialog: diff --git a/otp/login/LoginGSAccount.py b/otp/login/LoginGSAccount.py index 3477a1e..4b953da 100644 --- a/otp/login/LoginGSAccount.py +++ b/otp/login/LoginGSAccount.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.distributed.MsgTypes import * from direct.directnotify import DirectNotifyGlobal from . import LoginBase diff --git a/otp/login/LoginGoAccount.py b/otp/login/LoginGoAccount.py index 272a8d9..8a0bce2 100644 --- a/otp/login/LoginGoAccount.py +++ b/otp/login/LoginGoAccount.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.distributed.MsgTypes import * from direct.directnotify import DirectNotifyGlobal from . import LoginBase diff --git a/otp/login/LoginTTAccount.py b/otp/login/LoginTTAccount.py index b3883c4..6f1974c 100644 --- a/otp/login/LoginTTAccount.py +++ b/otp/login/LoginTTAccount.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.distributed.MsgTypes import * from direct.directnotify import DirectNotifyGlobal from . import LoginBase diff --git a/otp/login/LoginTTSpecificDevAccount.py b/otp/login/LoginTTSpecificDevAccount.py index 9c8bf93..b3e91a6 100644 --- a/otp/login/LoginTTSpecificDevAccount.py +++ b/otp/login/LoginTTSpecificDevAccount.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.distributed.MsgTypes import * from direct.directnotify import DirectNotifyGlobal from . import LoginTTAccount diff --git a/otp/login/LoginWebPlayTokenAccount.py b/otp/login/LoginWebPlayTokenAccount.py index 196655c..0b3715d 100644 --- a/otp/login/LoginWebPlayTokenAccount.py +++ b/otp/login/LoginWebPlayTokenAccount.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.directnotify import DirectNotifyGlobal from . import LoginTTAccount diff --git a/otp/login/MultiPageTextFrame.py b/otp/login/MultiPageTextFrame.py index b7d82c2..b2763a1 100644 --- a/otp/login/MultiPageTextFrame.py +++ b/otp/login/MultiPageTextFrame.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.gui.DirectGui import * from otp.otpbase import OTPLocalizer diff --git a/otp/login/PrivacyPolicyPanel.py b/otp/login/PrivacyPolicyPanel.py index 1502952..662f433 100644 --- a/otp/login/PrivacyPolicyPanel.py +++ b/otp/login/PrivacyPolicyPanel.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from otp.otpbase.OTPGlobals import * from direct.gui.DirectGui import * from .MultiPageTextFrame import * diff --git a/otp/login/SecretFriendsInfoPanel.py b/otp/login/SecretFriendsInfoPanel.py index b618d61..acfb936 100644 --- a/otp/login/SecretFriendsInfoPanel.py +++ b/otp/login/SecretFriendsInfoPanel.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from otp.otpbase.OTPGlobals import * from direct.gui.DirectGui import * from .MultiPageTextFrame import * diff --git a/otp/movement/Impulse.py b/otp/movement/Impulse.py index d03c320..9fc8d08 100644 --- a/otp/movement/Impulse.py +++ b/otp/movement/Impulse.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.showbase import DirectObject class Impulse(DirectObject.DirectObject): diff --git a/otp/movement/Mover.py b/otp/movement/Mover.py index 74f2343..092a27a 100644 --- a/otp/movement/Mover.py +++ b/otp/movement/Mover.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from panda3d.otp import CMover from direct.directnotify import DirectNotifyGlobal from otp.movement.PyVec3 import PyVec3 diff --git a/otp/movement/PyVec3.py b/otp/movement/PyVec3.py index a31fd4f..95a54ca 100644 --- a/otp/movement/PyVec3.py +++ b/otp/movement/PyVec3.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * import types import math diff --git a/otp/namepanel/NameCheck.py b/otp/namepanel/NameCheck.py index 3f275aa..04b1713 100644 --- a/otp/namepanel/NameCheck.py +++ b/otp/namepanel/NameCheck.py @@ -1,8 +1,8 @@ import string from otp.otpbase import OTPLocalizer from direct.directnotify import DirectNotifyGlobal -from pandac.PandaModules import NSError -from pandac.PandaModules import TextEncoder, TextNode +from panda3d.core import NSError +from panda3d.core import TextEncoder, TextNode notify = DirectNotifyGlobal.directNotify.newCategory('NameCheck') def filterString(str, filter): diff --git a/otp/namepanel/NameTumbler.py b/otp/namepanel/NameTumbler.py index fb3e4f3..be5426f 100644 --- a/otp/namepanel/NameTumbler.py +++ b/otp/namepanel/NameTumbler.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.showbase import DirectObject import random from direct.task import Task diff --git a/otp/otpbase/OTPGlobals.py b/otp/otpbase/OTPGlobals.py index 099f61a..d65d447 100644 --- a/otp/otpbase/OTPGlobals.py +++ b/otp/otpbase/OTPGlobals.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * QuietZone = 1 UberZone = 2 WallBitmask = BitMask32(1) diff --git a/otp/otpbase/OTPLocalizerEnglish.py b/otp/otpbase/OTPLocalizerEnglish.py index 41a6819..ef06cdd 100644 --- a/otp/otpbase/OTPLocalizerEnglish.py +++ b/otp/otpbase/OTPLocalizerEnglish.py @@ -84,8 +84,8 @@ WhisperToFormatName = 'To %s' WhisperFromFormatName = '%s whispers' ThoughtOtherFormatName = '%s thinks' ThoughtSelfFormatName = 'You think' -from pandac.PandaModules import TextProperties -from pandac.PandaModules import TextPropertiesManager +from panda3d.core import TextProperties +from panda3d.core import TextPropertiesManager shadow = TextProperties() shadow.setShadow(-0.025, -0.025) shadow.setShadowColor(0, 0, 0, 1) diff --git a/otp/otpbase/OTPRender.py b/otp/otpbase/OTPRender.py index 186d16f..fee55ca 100644 --- a/otp/otpbase/OTPRender.py +++ b/otp/otpbase/OTPRender.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * MainCameraBitmask = BitMask32.bit(0) ReflectionCameraBitmask = BitMask32.bit(1) ShadowCameraBitmask = BitMask32.bit(2) diff --git a/otp/otpbase/OTPTimer.py b/otp/otpbase/OTPTimer.py index 1ad6ffb..6e2a607 100644 --- a/otp/otpbase/OTPTimer.py +++ b/otp/otpbase/OTPTimer.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import Vec4 +from panda3d.core import Vec4 from direct.gui.DirectGui import DirectFrame, DGG from direct.task import Task from direct.showbase.PythonUtil import bound diff --git a/otp/otpbase/PythonUtil.py b/otp/otpbase/PythonUtil.py index 5438f92..423200a 100644 --- a/otp/otpbase/PythonUtil.py +++ b/otp/otpbase/PythonUtil.py @@ -59,8 +59,8 @@ def recordCreationStack(cls): # __dev__ is not defined at import time, call this after it's defined def recordFunctorCreationStacks(): global Functor - from pandac.PandaModules import getConfigShowbase - config = getConfigShowbase() + from direct.showbase import DConfig + config = DConfig # off by default, very slow if __dev__ and config.GetBool('record-functor-creation-stacks', 0): if not hasattr(Functor, '_functorCreationStacksRecorded'): diff --git a/otp/speedchat/SCElement.py b/otp/speedchat/SCElement.py index 975063e..4996f48 100644 --- a/otp/speedchat/SCElement.py +++ b/otp/speedchat/SCElement.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.gui.DirectGui import * from direct.task import Task from .SCConstants import * diff --git a/otp/speedchat/SCMenuHolder.py b/otp/speedchat/SCMenuHolder.py index 3451b3e..85a1279 100644 --- a/otp/speedchat/SCMenuHolder.py +++ b/otp/speedchat/SCMenuHolder.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.gui.DirectGui import * from .SCObject import SCObject from .SCElement import SCElement diff --git a/otp/speedchat/SpeedChatGMHandler.py b/otp/speedchat/SpeedChatGMHandler.py index 35b30e2..e4a006c 100644 --- a/otp/speedchat/SpeedChatGMHandler.py +++ b/otp/speedchat/SpeedChatGMHandler.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.showbase import DirectObject from otp.otpbase import OTPLocalizer diff --git a/otp/uberdog/DistributedChatManager.py b/otp/uberdog/DistributedChatManager.py index 0e138cd..8f3d279 100644 --- a/otp/uberdog/DistributedChatManager.py +++ b/otp/uberdog/DistributedChatManager.py @@ -1,6 +1,6 @@ from direct.distributed.DistributedObject import DistributedObject from direct.distributed.DistributedObjectGlobal import DistributedObjectGlobal -from pandac.PandaModules import * +from panda3d.core import * from otp.otpbase import OTPGlobals class DistributedChatManager(DistributedObjectGlobal): diff --git a/toontown/ai/CrashedLeaderBoardDecorator.py b/toontown/ai/CrashedLeaderBoardDecorator.py index e61bb2f..e55b20c 100644 --- a/toontown/ai/CrashedLeaderBoardDecorator.py +++ b/toontown/ai/CrashedLeaderBoardDecorator.py @@ -3,7 +3,7 @@ from direct.distributed.ClockDelta import * from direct.interval.IntervalGlobal import * from . import HolidayDecorator from toontown.toonbase import ToontownGlobals -from pandac.PandaModules import Vec4, CSDefault, TransformState, NodePath, TransparencyAttrib +from panda3d.core import Vec4, CSDefault, TransformState, NodePath, TransparencyAttrib from panda3d.toontown import loadDNAFile from toontown.hood import GSHood diff --git a/toontown/ai/DatabaseObject.py b/toontown/ai/DatabaseObject.py index 6feae9b..365f23f 100644 --- a/toontown/ai/DatabaseObject.py +++ b/toontown/ai/DatabaseObject.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from .ToontownAIMsgTypes import * from direct.directnotify.DirectNotifyGlobal import * from toontown.toon import DistributedToonAI diff --git a/toontown/ai/HalloweenHolidayDecorator.py b/toontown/ai/HalloweenHolidayDecorator.py index 9204663..4d94de1 100644 --- a/toontown/ai/HalloweenHolidayDecorator.py +++ b/toontown/ai/HalloweenHolidayDecorator.py @@ -6,7 +6,7 @@ from toontown.toonbase import ToontownGlobals from toontown.safezone import Playground from toontown.town import Street from toontown.estate import Estate -from pandac.PandaModules import Vec4, CSDefault, TransformState, NodePath, TransparencyAttrib +from panda3d.core import Vec4, CSDefault, TransformState, NodePath, TransparencyAttrib from panda3d.toontown import loadDNAFile class HalloweenHolidayDecorator(HolidayDecorator.HolidayDecorator): diff --git a/toontown/ai/HolidayDecorator.py b/toontown/ai/HolidayDecorator.py index 9513c4a..73bae17 100644 --- a/toontown/ai/HolidayDecorator.py +++ b/toontown/ai/HolidayDecorator.py @@ -1,6 +1,6 @@ from toontown.toonbase import ToontownGlobals from direct.interval.IntervalGlobal import Parallel, Sequence, Func, Wait -from pandac.PandaModules import Vec4, CSDefault, TransformState, NodePath, TransparencyAttrib +from panda3d.core import Vec4, CSDefault, TransformState, NodePath, TransparencyAttrib from panda3d.toontown import loadDNAFile class HolidayDecorator: diff --git a/toontown/ai/NewsManager.py b/toontown/ai/NewsManager.py index 51d202c..8f70730 100644 --- a/toontown/ai/NewsManager.py +++ b/toontown/ai/NewsManager.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.distributed import DistributedObject from direct.directnotify import DirectNotifyGlobal from toontown.toonbase import ToontownGlobals diff --git a/toontown/ai/WelcomeValleyManager.py b/toontown/ai/WelcomeValleyManager.py index 57bc3ba..1a73d48 100644 --- a/toontown/ai/WelcomeValleyManager.py +++ b/toontown/ai/WelcomeValleyManager.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.distributed import DistributedObject from direct.directnotify import DirectNotifyGlobal from toontown.toonbase import ToontownGlobals diff --git a/toontown/battle/BattlePlace.py b/toontown/battle/BattlePlace.py index fb30e9d..b004e35 100644 --- a/toontown/battle/BattlePlace.py +++ b/toontown/battle/BattlePlace.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from toontown.toon import Toon from toontown.hood import Place from toontown.hood import ZoneUtil diff --git a/toontown/battle/DistributedBattle.py b/toontown/battle/DistributedBattle.py index a36e6ab..1f43358 100644 --- a/toontown/battle/DistributedBattle.py +++ b/toontown/battle/DistributedBattle.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from panda3d.otp import * from direct.interval.IntervalGlobal import * from .BattleBase import * diff --git a/toontown/battle/DistributedBattleBase.py b/toontown/battle/DistributedBattleBase.py index 4218f40..9716ede 100644 --- a/toontown/battle/DistributedBattleBase.py +++ b/toontown/battle/DistributedBattleBase.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase.ToonBaseGlobal import * from direct.interval.IntervalGlobal import * from .BattleBase import * diff --git a/toontown/battle/DistributedBattleBaseAI.py b/toontown/battle/DistributedBattleBaseAI.py index 771cb3b..0cf6d38 100644 --- a/toontown/battle/DistributedBattleBaseAI.py +++ b/toontown/battle/DistributedBattleBaseAI.py @@ -4,7 +4,7 @@ from .BattleBase import * from . import BattleCalculatorAI from toontown.toonbase.ToontownBattleGlobals import * from .SuitBattleGlobals import * -from pandac.PandaModules import * +from panda3d.core import * from . import BattleExperienceAI from direct.distributed import DistributedObjectAI from direct.fsm import ClassicFSM, State diff --git a/toontown/battle/DistributedBattleBldg.py b/toontown/battle/DistributedBattleBldg.py index 2614a43..3033041 100644 --- a/toontown/battle/DistributedBattleBldg.py +++ b/toontown/battle/DistributedBattleBldg.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from panda3d.otp import * from direct.interval.IntervalGlobal import * from .BattleBase import * diff --git a/toontown/battle/DistributedBattleDiners.py b/toontown/battle/DistributedBattleDiners.py index 0cc0dd4..87d9241 100644 --- a/toontown/battle/DistributedBattleDiners.py +++ b/toontown/battle/DistributedBattleDiners.py @@ -1,5 +1,5 @@ import random -from pandac.PandaModules import VBase3, Point3 +from panda3d.core import VBase3, Point3 from direct.interval.IntervalGlobal import Sequence, Wait, Func, Parallel, Track, LerpPosInterval, ProjectileInterval, SoundInterval, ActorInterval from direct.directnotify import DirectNotifyGlobal from toontown.battle import DistributedBattleFinal diff --git a/toontown/battle/DistributedBattleFinal.py b/toontown/battle/DistributedBattleFinal.py index 3cbc2de..3f3f61b 100644 --- a/toontown/battle/DistributedBattleFinal.py +++ b/toontown/battle/DistributedBattleFinal.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from panda3d.otp import * from direct.interval.IntervalGlobal import * from .BattleBase import * diff --git a/toontown/battle/DistributedBattleWaiters.py b/toontown/battle/DistributedBattleWaiters.py index 756d86c..f4c9613 100644 --- a/toontown/battle/DistributedBattleWaiters.py +++ b/toontown/battle/DistributedBattleWaiters.py @@ -1,5 +1,5 @@ import random -from pandac.PandaModules import VBase3, Point3 +from panda3d.core import VBase3, Point3 from direct.interval.IntervalGlobal import Sequence, Wait, Func, Parallel, Track from direct.directnotify import DirectNotifyGlobal from toontown.battle import DistributedBattleFinal diff --git a/toontown/battle/Fanfare.py b/toontown/battle/Fanfare.py index 524a486..63e13e7 100644 --- a/toontown/battle/Fanfare.py +++ b/toontown/battle/Fanfare.py @@ -6,7 +6,7 @@ from toontown.toon.ToonDNA import * from toontown.suit.SuitDNA import * from direct.particles.ParticleEffect import * from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from . import MovieUtil from . import MovieCamera from direct.directnotify import DirectNotifyGlobal diff --git a/toontown/battle/FireCogPanel.py b/toontown/battle/FireCogPanel.py index 6966376..078ef5c 100644 --- a/toontown/battle/FireCogPanel.py +++ b/toontown/battle/FireCogPanel.py @@ -4,7 +4,7 @@ from direct.fsm import StateData from direct.directnotify import DirectNotifyGlobal from toontown.battle import BattleBase from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase import TTLocalizer class FireCogPanel(StateData.StateData): diff --git a/toontown/battle/MovieCamera.py b/toontown/battle/MovieCamera.py index c131a69..0c9c934 100644 --- a/toontown/battle/MovieCamera.py +++ b/toontown/battle/MovieCamera.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.interval.IntervalGlobal import * from .BattleBase import * from .BattleProps import * diff --git a/toontown/battle/MovieFire.py b/toontown/battle/MovieFire.py index 26100cb..c06dce8 100644 --- a/toontown/battle/MovieFire.py +++ b/toontown/battle/MovieFire.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.interval.IntervalGlobal import * from .BattleBase import * from .BattleProps import * diff --git a/toontown/battle/MovieSOS.py b/toontown/battle/MovieSOS.py index f02f0be..4369e70 100644 --- a/toontown/battle/MovieSOS.py +++ b/toontown/battle/MovieSOS.py @@ -2,7 +2,7 @@ from direct.interval.IntervalGlobal import * from . import MovieCamera from direct.directnotify import DirectNotifyGlobal from toontown.toonbase import TTLocalizer -from pandac.PandaModules import * +from panda3d.core import * notify = DirectNotifyGlobal.directNotify.newCategory('MovieSOS') def doSOSs(calls): diff --git a/toontown/battle/MovieThrow.py b/toontown/battle/MovieThrow.py index 07c7eee..43af25b 100644 --- a/toontown/battle/MovieThrow.py +++ b/toontown/battle/MovieThrow.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.interval.IntervalGlobal import * from .BattleBase import * from .BattleProps import * diff --git a/toontown/battle/PlayByPlayText.py b/toontown/battle/PlayByPlayText.py index b48cbff..6d85453 100644 --- a/toontown/battle/PlayByPlayText.py +++ b/toontown/battle/PlayByPlayText.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase import TTLocalizer from toontown.toonbase.ToontownBattleGlobals import * from toontown.toonbase.ToontownGlobals import * diff --git a/toontown/battle/RewardPanel.py b/toontown/battle/RewardPanel.py index c02f3bd..ac38399 100644 --- a/toontown/battle/RewardPanel.py +++ b/toontown/battle/RewardPanel.py @@ -1,6 +1,6 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from direct.interval.IntervalGlobal import * from toontown.toonbase import ToontownBattleGlobals from . import BattleBase diff --git a/toontown/building/BoardingGroupShow.py b/toontown/building/BoardingGroupShow.py index 83b98ec..0c253fd 100644 --- a/toontown/building/BoardingGroupShow.py +++ b/toontown/building/BoardingGroupShow.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.directnotify import DirectNotifyGlobal from toontown.toonbase import ToontownGlobals from direct.task.Task import Task diff --git a/toontown/building/DistributedAnimBuilding.py b/toontown/building/DistributedAnimBuilding.py index f20dc55..b862c82 100644 --- a/toontown/building/DistributedAnimBuilding.py +++ b/toontown/building/DistributedAnimBuilding.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import DecalEffect, DepthWriteAttrib +from panda3d.core import DecalEffect, DepthWriteAttrib from direct.directnotify import DirectNotifyGlobal from toontown.building import DistributedBuilding diff --git a/toontown/building/DistributedAnimDoor.py b/toontown/building/DistributedAnimDoor.py index 7c7a673..0ea43e4 100644 --- a/toontown/building/DistributedAnimDoor.py +++ b/toontown/building/DistributedAnimDoor.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import NodePath, VBase3 +from panda3d.core import NodePath, VBase3 from direct.directnotify import DirectNotifyGlobal from direct.interval.IntervalGlobal import Parallel, Sequence, Wait, HprInterval, LerpHprInterval, SoundInterval from toontown.building import DistributedDoor diff --git a/toontown/building/DistributedAnimatedProp.py b/toontown/building/DistributedAnimatedProp.py index f63f821..c3618c8 100644 --- a/toontown/building/DistributedAnimatedProp.py +++ b/toontown/building/DistributedAnimatedProp.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.distributed.ClockDelta import * from direct.directnotify import DirectNotifyGlobal from direct.fsm import ClassicFSM, State diff --git a/toontown/building/DistributedBoardingParty.py b/toontown/building/DistributedBoardingParty.py index f9e263c..c3562a8 100644 --- a/toontown/building/DistributedBoardingParty.py +++ b/toontown/building/DistributedBoardingParty.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.directnotify import DirectNotifyGlobal from toontown.toonbase import TTLocalizer from toontown.toonbase import ToontownGlobals diff --git a/toontown/building/DistributedBossElevator.py b/toontown/building/DistributedBossElevator.py index 2ef5e94..1f24e0e 100644 --- a/toontown/building/DistributedBossElevator.py +++ b/toontown/building/DistributedBossElevator.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.distributed.ClockDelta import * from direct.interval.IntervalGlobal import * from .ElevatorConstants import * diff --git a/toontown/building/DistributedBuilding.py b/toontown/building/DistributedBuilding.py index a2ca79c..bf24ddc 100644 --- a/toontown/building/DistributedBuilding.py +++ b/toontown/building/DistributedBuilding.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.distributed.ClockDelta import * from direct.interval.IntervalGlobal import * from direct.directtools.DirectGeometry import * @@ -6,7 +6,7 @@ from .ElevatorConstants import * from .ElevatorUtils import * from .SuitBuildingGlobals import * from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase import ToontownGlobals from direct.directnotify import DirectNotifyGlobal from direct.fsm import ClassicFSM, State diff --git a/toontown/building/DistributedClubElevator.py b/toontown/building/DistributedClubElevator.py index 7b938b9..7443c3c 100644 --- a/toontown/building/DistributedClubElevator.py +++ b/toontown/building/DistributedClubElevator.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.distributed.ClockDelta import * from direct.interval.IntervalGlobal import * from toontown.building import ElevatorConstants diff --git a/toontown/building/DistributedDoor.py b/toontown/building/DistributedDoor.py index 05b0c7c..42c27e1 100644 --- a/toontown/building/DistributedDoor.py +++ b/toontown/building/DistributedDoor.py @@ -1,5 +1,5 @@ from toontown.toonbase.ToonBaseGlobal import * -from pandac.PandaModules import * +from panda3d.core import * from direct.interval.IntervalGlobal import * from direct.distributed.ClockDelta import * from toontown.toonbase import ToontownGlobals diff --git a/toontown/building/DistributedElevator.py b/toontown/building/DistributedElevator.py index d853ca3..f1a9b6e 100644 --- a/toontown/building/DistributedElevator.py +++ b/toontown/building/DistributedElevator.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.distributed.ClockDelta import * from direct.interval.IntervalGlobal import * from .ElevatorConstants import * diff --git a/toontown/building/DistributedElevatorExt.py b/toontown/building/DistributedElevatorExt.py index a4f2a48..cb354c5 100644 --- a/toontown/building/DistributedElevatorExt.py +++ b/toontown/building/DistributedElevatorExt.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from panda3d.otp import * from direct.distributed.ClockDelta import * from direct.interval.IntervalGlobal import * diff --git a/toontown/building/DistributedElevatorFSM.py b/toontown/building/DistributedElevatorFSM.py index 0d9c945..34fd308 100644 --- a/toontown/building/DistributedElevatorFSM.py +++ b/toontown/building/DistributedElevatorFSM.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.distributed.ClockDelta import * from direct.interval.IntervalGlobal import * from .ElevatorConstants import * diff --git a/toontown/building/DistributedElevatorFloor.py b/toontown/building/DistributedElevatorFloor.py index 28a825b..0e95f04 100644 --- a/toontown/building/DistributedElevatorFloor.py +++ b/toontown/building/DistributedElevatorFloor.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.distributed.ClockDelta import * from direct.interval.IntervalGlobal import * from .ElevatorConstants import * diff --git a/toontown/building/DistributedElevatorInt.py b/toontown/building/DistributedElevatorInt.py index 094a700..709131c 100644 --- a/toontown/building/DistributedElevatorInt.py +++ b/toontown/building/DistributedElevatorInt.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.distributed.ClockDelta import * from direct.interval.IntervalGlobal import * from .ElevatorConstants import * diff --git a/toontown/building/DistributedGagshopInterior.py b/toontown/building/DistributedGagshopInterior.py index 27a9fa1..1ba03cc 100644 --- a/toontown/building/DistributedGagshopInterior.py +++ b/toontown/building/DistributedGagshopInterior.py @@ -1,5 +1,5 @@ from toontown.toonbase.ToonBaseGlobal import * -from pandac.PandaModules import * +from panda3d.core import * from panda3d.toontown import * from toontown.toonbase.ToontownGlobals import * import random diff --git a/toontown/building/DistributedHQInterior.py b/toontown/building/DistributedHQInterior.py index 187e037..7cf0e7f 100644 --- a/toontown/building/DistributedHQInterior.py +++ b/toontown/building/DistributedHQInterior.py @@ -1,5 +1,5 @@ from toontown.toonbase.ToonBaseGlobal import * -from pandac.PandaModules import * +from panda3d.core import * from panda3d.toontown import * from toontown.toonbase.ToontownGlobals import * import random diff --git a/toontown/building/DistributedKartShopInterior.py b/toontown/building/DistributedKartShopInterior.py index 4c9c519..60e218e 100644 --- a/toontown/building/DistributedKartShopInterior.py +++ b/toontown/building/DistributedKartShopInterior.py @@ -1,6 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObject import DistributedObject -from pandac.PandaModules import * +from panda3d.core import * from toontown.building import ToonInteriorColors from toontown.hood import ZoneUtil from toontown.toonbase.ToonBaseGlobal import * diff --git a/toontown/building/DistributedKnockKnockDoor.py b/toontown/building/DistributedKnockKnockDoor.py index 7b9120a..c984189 100644 --- a/toontown/building/DistributedKnockKnockDoor.py +++ b/toontown/building/DistributedKnockKnockDoor.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from panda3d.otp import * from direct.interval.IntervalGlobal import * from direct.distributed.ClockDelta import * diff --git a/toontown/building/DistributedPetshopInterior.py b/toontown/building/DistributedPetshopInterior.py index bf8b7d3..7e07ce3 100644 --- a/toontown/building/DistributedPetshopInterior.py +++ b/toontown/building/DistributedPetshopInterior.py @@ -1,5 +1,5 @@ from toontown.toonbase.ToonBaseGlobal import * -from pandac.PandaModules import * +from panda3d.core import * from panda3d.toontown import * from toontown.toonbase.ToontownGlobals import * import random diff --git a/toontown/building/DistributedToonInterior.py b/toontown/building/DistributedToonInterior.py index 6ebd00b..0d3a3c2 100644 --- a/toontown/building/DistributedToonInterior.py +++ b/toontown/building/DistributedToonInterior.py @@ -1,5 +1,5 @@ from toontown.toonbase.ToonBaseGlobal import * -from pandac.PandaModules import * +from panda3d.core import * from panda3d.toontown import * from direct.interval.IntervalGlobal import * from direct.distributed.ClockDelta import * diff --git a/toontown/building/DistributedTutorialInterior.py b/toontown/building/DistributedTutorialInterior.py index 2d8b1d1..8fa3ed3 100644 --- a/toontown/building/DistributedTutorialInterior.py +++ b/toontown/building/DistributedTutorialInterior.py @@ -1,5 +1,5 @@ from toontown.toonbase.ToonBaseGlobal import * -from pandac.PandaModules import * +from panda3d.core import * from direct.interval.IntervalGlobal import * from direct.distributed.ClockDelta import * from toontown.toonbase import ToontownGlobals diff --git a/toontown/building/Elevator.py b/toontown/building/Elevator.py index 8aae96c..823bfa5 100644 --- a/toontown/building/Elevator.py +++ b/toontown/building/Elevator.py @@ -1,7 +1,7 @@ -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase.ToonBaseGlobal import * from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from direct.interval.IntervalGlobal import * from direct.fsm import ClassicFSM, State from direct.fsm import State diff --git a/toontown/building/ElevatorConstants.py b/toontown/building/ElevatorConstants.py index a8bbcb2..f5a993f 100644 --- a/toontown/building/ElevatorConstants.py +++ b/toontown/building/ElevatorConstants.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * ELEVATOR_NORMAL = 0 ELEVATOR_VP = 1 ELEVATOR_MINT = 2 diff --git a/toontown/building/ElevatorUtils.py b/toontown/building/ElevatorUtils.py index 2b2cd79..b64230a 100644 --- a/toontown/building/ElevatorUtils.py +++ b/toontown/building/ElevatorUtils.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.interval.IntervalGlobal import * from .ElevatorConstants import * diff --git a/toontown/building/GagshopBuildingAI.py b/toontown/building/GagshopBuildingAI.py index 213bb04..f8ba965 100644 --- a/toontown/building/GagshopBuildingAI.py +++ b/toontown/building/GagshopBuildingAI.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.directnotify import DirectNotifyGlobal from . import DistributedDoorAI, DistributedGagshopInteriorAI, FADoorCodes, DoorTypes from toontown.toon import NPCToons diff --git a/toontown/building/HQBuildingAI.py b/toontown/building/HQBuildingAI.py index 633066b..ce2ec41 100644 --- a/toontown/building/HQBuildingAI.py +++ b/toontown/building/HQBuildingAI.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.directnotify import DirectNotifyGlobal from . import DistributedDoorAI, DistributedHQInteriorAI, FADoorCodes, DoorTypes from toontown.toon import NPCToons diff --git a/toontown/building/KartShopBuildingAI.py b/toontown/building/KartShopBuildingAI.py index fdcfd82..3f8d9b3 100644 --- a/toontown/building/KartShopBuildingAI.py +++ b/toontown/building/KartShopBuildingAI.py @@ -1,5 +1,5 @@ from direct.directnotify import DirectNotifyGlobal -from pandac.PandaModules import * +from panda3d.core import * from toontown.building import FADoorCodes, DoorTypes from toontown.building.DistributedDoorAI import DistributedDoorAI from toontown.building.DistributedKartShopInteriorAI import DistributedKartShopInteriorAI diff --git a/toontown/building/PetshopBuildingAI.py b/toontown/building/PetshopBuildingAI.py index 86dabbf..555e3ee 100644 --- a/toontown/building/PetshopBuildingAI.py +++ b/toontown/building/PetshopBuildingAI.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.directnotify import DirectNotifyGlobal from . import DistributedDoorAI, DistributedPetshopInteriorAI, FADoorCodes, DoorTypes from toontown.toon import NPCToons diff --git a/toontown/building/SuitInterior.py b/toontown/building/SuitInterior.py index c7447f8..c7ef2b3 100644 --- a/toontown/building/SuitInterior.py +++ b/toontown/building/SuitInterior.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase.ToonBaseGlobal import * from direct.directnotify import DirectNotifyGlobal from toontown.hood import Place diff --git a/toontown/building/ToonInterior.py b/toontown/building/ToonInterior.py index 29e41d2..5037f60 100644 --- a/toontown/building/ToonInterior.py +++ b/toontown/building/ToonInterior.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase.ToonBaseGlobal import * from direct.directnotify import DirectNotifyGlobal from toontown.hood import Place diff --git a/toontown/catalog/CatalogAccessoryItem.py b/toontown/catalog/CatalogAccessoryItem.py index 4f93315..69715df 100644 --- a/toontown/catalog/CatalogAccessoryItem.py +++ b/toontown/catalog/CatalogAccessoryItem.py @@ -6,7 +6,7 @@ from toontown.toon import ToonDNA import random from direct.showbase import PythonUtil from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * class CatalogAccessoryItem(CatalogItem.CatalogItem): diff --git a/toontown/catalog/CatalogChatItem.py b/toontown/catalog/CatalogChatItem.py index 0a89e4c..1f161af 100644 --- a/toontown/catalog/CatalogChatItem.py +++ b/toontown/catalog/CatalogChatItem.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from . import CatalogItem from toontown.toonbase import ToontownGlobals from otp.otpbase import OTPLocalizer diff --git a/toontown/catalog/CatalogChatItemPicker.py b/toontown/catalog/CatalogChatItemPicker.py index 655ae02..1355017 100644 --- a/toontown/catalog/CatalogChatItemPicker.py +++ b/toontown/catalog/CatalogChatItemPicker.py @@ -1,5 +1,5 @@ from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from direct.showbase import DirectObject from . import CatalogItem from toontown.toonbase import ToontownGlobals diff --git a/toontown/catalog/CatalogClothingItem.py b/toontown/catalog/CatalogClothingItem.py index 83aac86..c58a7d5 100644 --- a/toontown/catalog/CatalogClothingItem.py +++ b/toontown/catalog/CatalogClothingItem.py @@ -5,7 +5,7 @@ from toontown.toon import ToonDNA import random from direct.showbase import PythonUtil from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * CTArticle = 0 CTString = 1 CTBasePrice = 2 diff --git a/toontown/catalog/CatalogFlooringItem.py b/toontown/catalog/CatalogFlooringItem.py index 984b135..664a7d1 100644 --- a/toontown/catalog/CatalogFlooringItem.py +++ b/toontown/catalog/CatalogFlooringItem.py @@ -83,7 +83,7 @@ class CatalogFlooringItem(CatalogSurfaceItem): return FlooringTypes[self.patternIndex][FTBasePrice] def loadTexture(self): - from pandac.PandaModules import Texture + from panda3d.core import Texture filename = FlooringTypes[self.patternIndex][FTTextureName] texture = loader.loadTexture(filename) texture.setMinfilter(Texture.FTLinearMipmapLinear) diff --git a/toontown/catalog/CatalogGardenItem.py b/toontown/catalog/CatalogGardenItem.py index 6a8e98d..dcaff93 100644 --- a/toontown/catalog/CatalogGardenItem.py +++ b/toontown/catalog/CatalogGardenItem.py @@ -5,7 +5,7 @@ from otp.otpbase import OTPLocalizer from direct.interval.IntervalGlobal import * from toontown.estate import GardenGlobals from direct.actor import Actor -from pandac.PandaModules import NodePath +from panda3d.core import NodePath class CatalogGardenItem(CatalogItem.CatalogItem): sequenceNumber = 0 diff --git a/toontown/catalog/CatalogGenerator.py b/toontown/catalog/CatalogGenerator.py index e686935..61ccc99 100644 --- a/toontown/catalog/CatalogGenerator.py +++ b/toontown/catalog/CatalogGenerator.py @@ -25,7 +25,7 @@ from toontown.toonbase import ToontownGlobals import types import random import time -from pandac.PandaModules import * +from panda3d.core import * MetaItems = {100: getAllClothes(101, 102, 103, 104, 105, 106, 107, 108, 109, 109, 111, 115, 201, 202, 203, 204, 205, 206, 207, 208, 209, 209, 211, 215), 300: getAllClothes(301, 302, 303, 304, 305, 308, 401, 403, 404, 405, 407, 451, 452, 453), 2000: getChatRange(0, 1999), diff --git a/toontown/catalog/CatalogItem.py b/toontown/catalog/CatalogItem.py index 5f01a55..0ed36d2 100644 --- a/toontown/catalog/CatalogItem.py +++ b/toontown/catalog/CatalogItem.py @@ -1,5 +1,5 @@ from direct.directnotify import DirectNotifyGlobal -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase import TTLocalizer from toontown.toonbase import ToontownGlobals from direct.interval.IntervalGlobal import * diff --git a/toontown/catalog/CatalogItemList.py b/toontown/catalog/CatalogItemList.py index 3f809e8..1c3c199 100644 --- a/toontown/catalog/CatalogItemList.py +++ b/toontown/catalog/CatalogItemList.py @@ -1,5 +1,5 @@ from . import CatalogItem -from pandac.PandaModules import * +from panda3d.core import * from direct.distributed.PyDatagram import PyDatagram from direct.distributed.PyDatagramIterator import PyDatagramIterator import functools diff --git a/toontown/catalog/CatalogItemPanel.py b/toontown/catalog/CatalogItemPanel.py index 1d6be69..99deb70 100644 --- a/toontown/catalog/CatalogItemPanel.py +++ b/toontown/catalog/CatalogItemPanel.py @@ -1,5 +1,5 @@ from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase import ToontownGlobals from toontown.toontowngui import TTDialog from toontown.toonbase import TTLocalizer diff --git a/toontown/catalog/CatalogMouldingItem.py b/toontown/catalog/CatalogMouldingItem.py index ca976d0..1341a14 100644 --- a/toontown/catalog/CatalogMouldingItem.py +++ b/toontown/catalog/CatalogMouldingItem.py @@ -68,7 +68,7 @@ class CatalogMouldingItem(CatalogSurfaceItem): return MouldingTypes[self.patternIndex][MTBasePrice] def loadTexture(self): - from pandac.PandaModules import Texture + from panda3d.core import Texture filename = MouldingTypes[self.patternIndex][MTTextureName] texture = loader.loadTexture(filename) texture.setMinfilter(Texture.FTLinearMipmapLinear) diff --git a/toontown/catalog/CatalogNotifyDialog.py b/toontown/catalog/CatalogNotifyDialog.py index 838b6d5..53bdc6b 100644 --- a/toontown/catalog/CatalogNotifyDialog.py +++ b/toontown/catalog/CatalogNotifyDialog.py @@ -2,7 +2,7 @@ from direct.directnotify import DirectNotifyGlobal from toontown.toonbase import ToontownGlobals from toontown.toonbase import TTLocalizer from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * CatalogNotifyBaseXPos = 0.4 class CatalogNotifyDialog: diff --git a/toontown/catalog/CatalogScreen.py b/toontown/catalog/CatalogScreen.py index 426e58e..7b9e3c9 100644 --- a/toontown/catalog/CatalogScreen.py +++ b/toontown/catalog/CatalogScreen.py @@ -1,6 +1,6 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from direct.gui.DirectScrolledList import * from toontown.toonbase import ToontownGlobals from toontown.toontowngui import TTDialog diff --git a/toontown/catalog/CatalogWainscotingItem.py b/toontown/catalog/CatalogWainscotingItem.py index b6b9cad..462571d 100644 --- a/toontown/catalog/CatalogWainscotingItem.py +++ b/toontown/catalog/CatalogWainscotingItem.py @@ -59,7 +59,7 @@ class CatalogWainscotingItem(CatalogSurfaceItem): return WainscotingTypes[self.patternIndex][WSTBasePrice] def loadTexture(self): - from pandac.PandaModules import Texture + from panda3d.core import Texture filename = WainscotingTypes[self.patternIndex][WSTTextureName] texture = loader.loadTexture(filename) texture.setMinfilter(Texture.FTLinearMipmapLinear) diff --git a/toontown/catalog/CatalogWallpaperItem.py b/toontown/catalog/CatalogWallpaperItem.py index fd0f107..77802ed 100644 --- a/toontown/catalog/CatalogWallpaperItem.py +++ b/toontown/catalog/CatalogWallpaperItem.py @@ -620,7 +620,7 @@ class CatalogWallpaperItem(CatalogSurfaceItem): return WallpaperTypes[self.patternIndex][WTBasePrice] def loadTexture(self): - from pandac.PandaModules import Texture + from panda3d.core import Texture filename = WallpaperTypes[self.patternIndex][WTTextureName] texture = loader.loadTexture(filename) texture.setMinfilter(Texture.FTLinearMipmapLinear) @@ -641,7 +641,7 @@ class CatalogWallpaperItem(CatalogSurfaceItem): return def loadBorderTexture(self): - from pandac.PandaModules import Texture + from panda3d.core import Texture if self.borderIndex == None or self.borderIndex == 0: return self.loadTexture() borderInfo = BorderTypes[self.borderIndex] diff --git a/toontown/catalog/CatalogWindowItem.py b/toontown/catalog/CatalogWindowItem.py index 9ad7fab..3d824f2 100644 --- a/toontown/catalog/CatalogWindowItem.py +++ b/toontown/catalog/CatalogWindowItem.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from . import CatalogAtticItem from . import CatalogItem from toontown.toonbase import ToontownGlobals diff --git a/toontown/catalog/MailboxScreen.py b/toontown/catalog/MailboxScreen.py index acbcff5..e4a5eee 100644 --- a/toontown/catalog/MailboxScreen.py +++ b/toontown/catalog/MailboxScreen.py @@ -1,7 +1,7 @@ from direct.directnotify.DirectNotifyGlobal import * from direct.gui.DirectGui import * from direct.showbase import DirectObject, PythonUtil -from pandac.PandaModules import * +from panda3d.core import * from toontown.parties import PartyGlobals from toontown.parties.InviteInfo import InviteInfoBase from toontown.parties.PartyGlobals import InviteStatus diff --git a/toontown/char/Char.py b/toontown/char/Char.py index 1af94f2..8d42300 100644 --- a/toontown/char/Char.py +++ b/toontown/char/Char.py @@ -1,9 +1,9 @@ from otp.avatar import Avatar -from pandac.PandaModules import * +from panda3d.core import * from panda3d.otp import * from direct.task import Task import random -from pandac.PandaModules import * +from panda3d.core import * from direct.directnotify import DirectNotifyGlobal AnimDict = {'mk': (('walk', 'walk', 3), ('run', 'run', 3), diff --git a/toontown/char/CharDNA.py b/toontown/char/CharDNA.py index f48e2bf..0c7c5da 100644 --- a/toontown/char/CharDNA.py +++ b/toontown/char/CharDNA.py @@ -1,5 +1,5 @@ import random -from pandac.PandaModules import * +from panda3d.core import * from direct.directnotify.DirectNotifyGlobal import * import random from direct.distributed.PyDatagram import PyDatagram diff --git a/toontown/chat/ResistanceChat.py b/toontown/chat/ResistanceChat.py index 777753f..aa54c0a 100644 --- a/toontown/chat/ResistanceChat.py +++ b/toontown/chat/ResistanceChat.py @@ -1,5 +1,5 @@ from direct.interval.IntervalGlobal import * -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase import TTLocalizer from toontown.toonbase import ToontownBattleGlobals from toontown.battle import BattleParticles diff --git a/toontown/chat/TTChatInputNormal.py b/toontown/chat/TTChatInputNormal.py index d1f0198..b474e34 100644 --- a/toontown/chat/TTChatInputNormal.py +++ b/toontown/chat/TTChatInputNormal.py @@ -1,5 +1,5 @@ from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from otp.chat import ChatInputNormal from otp.otpbase import OTPLocalizer from otp.otpbase import OTPGlobals diff --git a/toontown/chat/TTChatInputSpeedChat.py b/toontown/chat/TTChatInputSpeedChat.py index 8e74c32..27434db 100644 --- a/toontown/chat/TTChatInputSpeedChat.py +++ b/toontown/chat/TTChatInputSpeedChat.py @@ -1,5 +1,5 @@ from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from otp.speedchat.SpeedChatTypes import * from toontown.speedchat.TTSpeedChatTypes import * from otp.speedchat.SpeedChat import SpeedChat diff --git a/toontown/chat/TTChatInputWhiteList.py b/toontown/chat/TTChatInputWhiteList.py index 5e6e6a8..454593c 100644 --- a/toontown/chat/TTChatInputWhiteList.py +++ b/toontown/chat/TTChatInputWhiteList.py @@ -4,7 +4,7 @@ from direct.showbase import DirectObject from otp.otpbase import OTPGlobals import sys from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from otp.otpbase import OTPLocalizer from direct.directnotify import DirectNotifyGlobal from toontown.toonbase import ToontownGlobals diff --git a/toontown/chat/TTTalkAssistant.py b/toontown/chat/TTTalkAssistant.py index 09b89b6..6913e0a 100644 --- a/toontown/chat/TTTalkAssistant.py +++ b/toontown/chat/TTTalkAssistant.py @@ -6,7 +6,7 @@ from toontown.toonbase import TTLocalizer from direct.directnotify import DirectNotifyGlobal from otp.otpbase import OTPGlobals from otp.speedchat import SCDecoders -from pandac.PandaModules import * +from panda3d.core import * from otp.chat.ChatGlobals import * from otp.chat.TalkGlobals import * from otp.speedchat import SpeedChatGlobals diff --git a/toontown/chat/ToontownChatManager.py b/toontown/chat/ToontownChatManager.py index 70cf67c..579aa83 100644 --- a/toontown/chat/ToontownChatManager.py +++ b/toontown/chat/ToontownChatManager.py @@ -7,7 +7,7 @@ from toontown.toonbase import TTLocalizer from toontown.toontowngui import TeaserPanel from direct.directnotify import DirectNotifyGlobal from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from otp.chat import ChatManager from .TTChatInputSpeedChat import TTChatInputSpeedChat from .TTChatInputNormal import TTChatInputNormal diff --git a/toontown/classicchars/CCharPaths.py b/toontown/classicchars/CCharPaths.py index f69d6ae..8e97a39 100644 --- a/toontown/classicchars/CCharPaths.py +++ b/toontown/classicchars/CCharPaths.py @@ -1,5 +1,5 @@ -from pandac.PandaModules import Point3 -from pandac.PandaModules import Vec3 +from panda3d.core import Point3 +from panda3d.core import Vec3 import copy from toontown.toonbase import TTLocalizer __mickeyPaths = {'a': (Point3(17, -17, 4.025), ('b', 'e')), diff --git a/toontown/classicchars/CharStateDatas.py b/toontown/classicchars/CharStateDatas.py index 031cb42..5ce497b 100644 --- a/toontown/classicchars/CharStateDatas.py +++ b/toontown/classicchars/CharStateDatas.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.interval.IntervalGlobal import * from direct.distributed.ClockDelta import * from direct.fsm import StateData diff --git a/toontown/classicchars/DistributedCCharBase.py b/toontown/classicchars/DistributedCCharBase.py index 89a3f08..f5c908a 100644 --- a/toontown/classicchars/DistributedCCharBase.py +++ b/toontown/classicchars/DistributedCCharBase.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from panda3d.otp import * from direct.interval.IntervalGlobal import * from otp.avatar import Avatar diff --git a/toontown/classicchars/DistributedDonald.py b/toontown/classicchars/DistributedDonald.py index 7f2cde7..67b1be4 100644 --- a/toontown/classicchars/DistributedDonald.py +++ b/toontown/classicchars/DistributedDonald.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.interval.IntervalGlobal import * from . import DistributedCCharBase from direct.directnotify import DirectNotifyGlobal diff --git a/toontown/classicchars/DistributedDonaldDock.py b/toontown/classicchars/DistributedDonaldDock.py index 7ba4567..593af7f 100644 --- a/toontown/classicchars/DistributedDonaldDock.py +++ b/toontown/classicchars/DistributedDonaldDock.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.interval.IntervalGlobal import * from . import DistributedCCharBase from direct.directnotify import DirectNotifyGlobal diff --git a/toontown/classicchars/DistributedFrankenDonald.py b/toontown/classicchars/DistributedFrankenDonald.py index 8ec5baf..bbd193b 100644 --- a/toontown/classicchars/DistributedFrankenDonald.py +++ b/toontown/classicchars/DistributedFrankenDonald.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.interval.IntervalGlobal import * from . import DistributedCCharBase from . import DistributedDonald diff --git a/toontown/classicchars/DistributedGoofy.py b/toontown/classicchars/DistributedGoofy.py index ebcdc07..219e173 100644 --- a/toontown/classicchars/DistributedGoofy.py +++ b/toontown/classicchars/DistributedGoofy.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from . import DistributedCCharBase from direct.directnotify import DirectNotifyGlobal from direct.fsm import ClassicFSM, State diff --git a/toontown/classicchars/DistributedGoofySpeedway.py b/toontown/classicchars/DistributedGoofySpeedway.py index 2f2e946..020e061 100644 --- a/toontown/classicchars/DistributedGoofySpeedway.py +++ b/toontown/classicchars/DistributedGoofySpeedway.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from . import DistributedCCharBase from direct.directnotify import DirectNotifyGlobal from direct.fsm import ClassicFSM, State diff --git a/toontown/classicchars/DistributedMickey.py b/toontown/classicchars/DistributedMickey.py index da8894e..26eb2a8 100644 --- a/toontown/classicchars/DistributedMickey.py +++ b/toontown/classicchars/DistributedMickey.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from . import DistributedCCharBase from direct.directnotify import DirectNotifyGlobal from direct.fsm import ClassicFSM, State diff --git a/toontown/classicchars/DistributedMinnie.py b/toontown/classicchars/DistributedMinnie.py index 1ad09b3..2de823c 100644 --- a/toontown/classicchars/DistributedMinnie.py +++ b/toontown/classicchars/DistributedMinnie.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from . import DistributedCCharBase from direct.directnotify import DirectNotifyGlobal from direct.fsm import ClassicFSM, State diff --git a/toontown/classicchars/DistributedPluto.py b/toontown/classicchars/DistributedPluto.py index cd07da8..9afb7f5 100644 --- a/toontown/classicchars/DistributedPluto.py +++ b/toontown/classicchars/DistributedPluto.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.interval.IntervalGlobal import * from . import DistributedCCharBase from direct.directnotify import DirectNotifyGlobal diff --git a/toontown/classicchars/DistributedSuperGoofy.py b/toontown/classicchars/DistributedSuperGoofy.py index 578c967..b96894e 100644 --- a/toontown/classicchars/DistributedSuperGoofy.py +++ b/toontown/classicchars/DistributedSuperGoofy.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from . import DistributedCCharBase from direct.directnotify import DirectNotifyGlobal from direct.fsm import ClassicFSM, State diff --git a/toontown/classicchars/DistributedVampireMickey.py b/toontown/classicchars/DistributedVampireMickey.py index 0340382..870e0f5 100644 --- a/toontown/classicchars/DistributedVampireMickey.py +++ b/toontown/classicchars/DistributedVampireMickey.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from . import DistributedCCharBase from direct.directnotify import DirectNotifyGlobal from direct.fsm import ClassicFSM, State diff --git a/toontown/classicchars/DistributedWesternPluto.py b/toontown/classicchars/DistributedWesternPluto.py index 5f5768c..94a8bd1 100644 --- a/toontown/classicchars/DistributedWesternPluto.py +++ b/toontown/classicchars/DistributedWesternPluto.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from . import DistributedCCharBase from direct.directnotify import DirectNotifyGlobal from direct.fsm import ClassicFSM, State diff --git a/toontown/classicchars/DistributedWitchMinnie.py b/toontown/classicchars/DistributedWitchMinnie.py index a3fc0b4..249ad73 100644 --- a/toontown/classicchars/DistributedWitchMinnie.py +++ b/toontown/classicchars/DistributedWitchMinnie.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from . import DistributedCCharBase from direct.directnotify import DirectNotifyGlobal from direct.fsm import ClassicFSM, State diff --git a/toontown/cogdominium/CogdoBarrelRoom.py b/toontown/cogdominium/CogdoBarrelRoom.py index bea11d6..ce231b9 100644 --- a/toontown/cogdominium/CogdoBarrelRoom.py +++ b/toontown/cogdominium/CogdoBarrelRoom.py @@ -1,5 +1,5 @@ import random -from pandac.PandaModules import * +from panda3d.core import * from direct.interval.IntervalGlobal import * from direct.directnotify import DirectNotifyGlobal from toontown.toonbase import ToontownGlobals, ToontownTimer diff --git a/toontown/cogdominium/CogdoBarrelRoomConsts.py b/toontown/cogdominium/CogdoBarrelRoomConsts.py index 669399c..c3540c9 100644 --- a/toontown/cogdominium/CogdoBarrelRoomConsts.py +++ b/toontown/cogdominium/CogdoBarrelRoomConsts.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * CollectionTime = 30 BarrelRoomIntroTimeout = 15.0 RewardUiTime = 5.0 diff --git a/toontown/cogdominium/CogdoBarrelRoomRewardPanel.py b/toontown/cogdominium/CogdoBarrelRoomRewardPanel.py index 1ac65d8..c9cf2d7 100644 --- a/toontown/cogdominium/CogdoBarrelRoomRewardPanel.py +++ b/toontown/cogdominium/CogdoBarrelRoomRewardPanel.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.gui.DirectGui import * from toontown.toonbase import ToontownGlobals, TTLocalizer from toontown.cogdominium import CogdoBarrelRoomConsts diff --git a/toontown/cogdominium/CogdoElevatorMovie.py b/toontown/cogdominium/CogdoElevatorMovie.py index ed13921..c76972f 100644 --- a/toontown/cogdominium/CogdoElevatorMovie.py +++ b/toontown/cogdominium/CogdoElevatorMovie.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import NodePath, Point3, PlaneNode, TextNode +from panda3d.core import NodePath, Point3, PlaneNode, TextNode from direct.interval.IntervalGlobal import * from direct.showbase.ShowBase import Plane from direct.directnotify import DirectNotifyGlobal diff --git a/toontown/cogdominium/CogdoExecutiveSuiteMovies.py b/toontown/cogdominium/CogdoExecutiveSuiteMovies.py index 35a072b..0558ba0 100644 --- a/toontown/cogdominium/CogdoExecutiveSuiteMovies.py +++ b/toontown/cogdominium/CogdoExecutiveSuiteMovies.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import NodePath, Point3, PlaneNode, TextNode +from panda3d.core import NodePath, Point3, PlaneNode, TextNode from direct.interval.IntervalGlobal import * from direct.showbase.ShowBase import Plane from direct.directnotify import DirectNotifyGlobal diff --git a/toontown/cogdominium/CogdoFlyingCameraManager.py b/toontown/cogdominium/CogdoFlyingCameraManager.py index 4131851..b139935 100644 --- a/toontown/cogdominium/CogdoFlyingCameraManager.py +++ b/toontown/cogdominium/CogdoFlyingCameraManager.py @@ -1,7 +1,7 @@ import math -from pandac.PandaModules import NodePath, Vec3 -from pandac.PandaModules import CollisionTraverser, CollisionHandlerQueue -from pandac.PandaModules import CollisionRay, CollisionNode +from panda3d.core import NodePath, Vec3 +from panda3d.core import CollisionTraverser, CollisionHandlerQueue +from panda3d.core import CollisionRay, CollisionNode from math import pi, sin, cos from direct.showbase.PythonUtil import bound as clamp from otp.otpbase import OTPGlobals diff --git a/toontown/cogdominium/CogdoFlyingCollisions.py b/toontown/cogdominium/CogdoFlyingCollisions.py index 23fb76b..47a466d 100644 --- a/toontown/cogdominium/CogdoFlyingCollisions.py +++ b/toontown/cogdominium/CogdoFlyingCollisions.py @@ -1,5 +1,5 @@ from direct.controls.GravityWalker import GravityWalker -from pandac.PandaModules import CollisionSphere, CollisionNode, BitMask32, CollisionHandlerEvent, CollisionRay, CollisionHandlerGravity, CollisionHandlerFluidPusher, CollisionHandlerPusher +from panda3d.core import CollisionSphere, CollisionNode, BitMask32, CollisionHandlerEvent, CollisionRay, CollisionHandlerGravity, CollisionHandlerFluidPusher, CollisionHandlerPusher from toontown.toonbase import ToontownGlobals from otp.otpbase import OTPGlobals diff --git a/toontown/cogdominium/CogdoFlyingGameGlobals.py b/toontown/cogdominium/CogdoFlyingGameGlobals.py index 5dc4e3a..e5c9127 100644 --- a/toontown/cogdominium/CogdoFlyingGameGlobals.py +++ b/toontown/cogdominium/CogdoFlyingGameGlobals.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import VBase4, Vec3, Point3 +from panda3d.core import VBase4, Vec3, Point3 from .CogdoUtil import VariableContainer, DevVariableContainer from enum import IntEnum AI = VariableContainer() diff --git a/toontown/cogdominium/CogdoFlyingGameGuis.py b/toontown/cogdominium/CogdoFlyingGameGuis.py index ac51645..4fe2374 100644 --- a/toontown/cogdominium/CogdoFlyingGameGuis.py +++ b/toontown/cogdominium/CogdoFlyingGameGuis.py @@ -1,7 +1,7 @@ from direct.interval.IntervalGlobal import LerpFunctionInterval from direct.gui.DirectGui import DirectLabel, DirectFrame, DGG from direct.showbase.PythonUtil import bound as clamp -from pandac.PandaModules import TextNode, NodePath +from panda3d.core import TextNode, NodePath from toontown.toonbase import ToontownGlobals from . import CogdoUtil from . import CogdoFlyingGameGlobals as Globals diff --git a/toontown/cogdominium/CogdoFlyingGameMovies.py b/toontown/cogdominium/CogdoFlyingGameMovies.py index 6d21e16..64378a5 100644 --- a/toontown/cogdominium/CogdoFlyingGameMovies.py +++ b/toontown/cogdominium/CogdoFlyingGameMovies.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import Point3, PlaneNode +from panda3d.core import Point3, PlaneNode from direct.showbase.ShowBase import Plane from direct.showbase.RandomNumGen import RandomNumGen from direct.interval.MetaInterval import Sequence, Parallel diff --git a/toontown/cogdominium/CogdoFlyingGuiManager.py b/toontown/cogdominium/CogdoFlyingGuiManager.py index 13906c0..8ef23cb 100644 --- a/toontown/cogdominium/CogdoFlyingGuiManager.py +++ b/toontown/cogdominium/CogdoFlyingGuiManager.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import NodePath +from panda3d.core import NodePath from toontown.toonbase import ToontownIntervals from toontown.toonbase.ToontownTimer import ToontownTimer from .CogdoFlyingGameGuis import CogdoFlyingFuelGui, CogdoFlyingProgressGui diff --git a/toontown/cogdominium/CogdoFlyingInputManager.py b/toontown/cogdominium/CogdoFlyingInputManager.py index d771f4c..21ace86 100644 --- a/toontown/cogdominium/CogdoFlyingInputManager.py +++ b/toontown/cogdominium/CogdoFlyingInputManager.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import CollisionSphere, CollisionNode, BitMask32, CollisionHandlerEvent, CollisionRay +from panda3d.core import CollisionSphere, CollisionNode, BitMask32, CollisionHandlerEvent, CollisionRay from toontown.minigame import ArrowKeys class CogdoFlyingInputManager: diff --git a/toontown/cogdominium/CogdoFlyingLegalEagle.py b/toontown/cogdominium/CogdoFlyingLegalEagle.py index e4cbca8..14d3f99 100644 --- a/toontown/cogdominium/CogdoFlyingLegalEagle.py +++ b/toontown/cogdominium/CogdoFlyingLegalEagle.py @@ -6,7 +6,7 @@ from direct.task.Task import Task from direct.interval.IntervalGlobal import Sequence, Parallel, LerpScaleInterval, LerpFunctionInterval, Func, Wait, LerpFunc, SoundInterval, ParallelEndTogether, LerpPosInterval, ActorInterval, LerpPosHprInterval, LerpHprInterval from direct.directutil import Mopath from direct.showbase.PythonUtil import bound as clamp -from pandac.PandaModules import CollisionSphere, CollisionNode, CollisionTube, CollisionPolygon, Vec3, Point3 +from panda3d.core import CollisionSphere, CollisionNode, CollisionTube, CollisionPolygon, Vec3, Point3 from toontown.suit import Suit from toontown.suit import SuitDNA from toontown.toonbase import ToontownGlobals diff --git a/toontown/cogdominium/CogdoFlyingLevel.py b/toontown/cogdominium/CogdoFlyingLevel.py index 1a4f579..1fee577 100644 --- a/toontown/cogdominium/CogdoFlyingLevel.py +++ b/toontown/cogdominium/CogdoFlyingLevel.py @@ -1,5 +1,5 @@ -from pandac.PandaModules import NodePath, Plane, Vec3, Point3 -from pandac.PandaModules import CollisionPlane, CollisionNode +from panda3d.core import NodePath, Plane, Vec3, Point3 +from panda3d.core import CollisionPlane, CollisionNode from direct.showbase.RandomNumGen import RandomNumGen from direct.showbase.DirectObject import DirectObject from direct.showbase.PythonUtil import bound as clamp diff --git a/toontown/cogdominium/CogdoFlyingLevelQuadrant.py b/toontown/cogdominium/CogdoFlyingLevelQuadrant.py index e3f6209..6edf3a7 100644 --- a/toontown/cogdominium/CogdoFlyingLevelQuadrant.py +++ b/toontown/cogdominium/CogdoFlyingLevelQuadrant.py @@ -1,6 +1,6 @@ import math from direct.directutil import Mopath -from pandac.PandaModules import NodePath, Point3, Vec4 +from panda3d.core import NodePath, Point3, Vec4 from .CogdoFlyingObjects import CogdoFlyingPlatform from . import CogdoFlyingGameGlobals as Globals diff --git a/toontown/cogdominium/CogdoFlyingLocalPlayer.py b/toontown/cogdominium/CogdoFlyingLocalPlayer.py index be681ae..bdd22fe 100644 --- a/toontown/cogdominium/CogdoFlyingLocalPlayer.py +++ b/toontown/cogdominium/CogdoFlyingLocalPlayer.py @@ -1,6 +1,6 @@ import math import random -from pandac.PandaModules import Vec3 +from panda3d.core import Vec3 from direct.directnotify import DirectNotifyGlobal from direct.task.Task import Task from direct.interval.FunctionInterval import Wait diff --git a/toontown/cogdominium/CogdoFlyingObjects.py b/toontown/cogdominium/CogdoFlyingObjects.py index 3ffd308..73ac609 100644 --- a/toontown/cogdominium/CogdoFlyingObjects.py +++ b/toontown/cogdominium/CogdoFlyingObjects.py @@ -1,5 +1,5 @@ import random -from pandac.PandaModules import * +from panda3d.core import * from direct.interval.IntervalGlobal import Sequence, Func, Parallel, Wait, LerpHprInterval, LerpScaleInterval, LerpFunctionInterval from otp.otpbase import OTPGlobals from toontown.toonbase import ToontownGlobals diff --git a/toontown/cogdominium/CogdoFlyingObstacles.py b/toontown/cogdominium/CogdoFlyingObstacles.py index 511c582..c189998 100644 --- a/toontown/cogdominium/CogdoFlyingObstacles.py +++ b/toontown/cogdominium/CogdoFlyingObstacles.py @@ -3,7 +3,7 @@ from direct.showbase.DirectObject import DirectObject from direct.interval.IntervalGlobal import LerpFunc, ActorInterval, LerpPosInterval from direct.interval.MetaInterval import Sequence from direct.directutil import Mopath -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase import ToontownGlobals from toontown.suit import Suit from toontown.suit import SuitDNA @@ -191,7 +191,7 @@ class CogdoFlyingObstacle(DirectObject): messenger.send(CogdoFlyingObstacle.ExitEventName, [self, collEntry]) -from pandac.PandaModules import TransformState +from panda3d.core import TransformState class CogdoFlyingWhirlwind(CogdoFlyingObstacle): diff --git a/toontown/cogdominium/CogdoFlyingPlayer.py b/toontown/cogdominium/CogdoFlyingPlayer.py index eed6293..fa5edfc 100644 --- a/toontown/cogdominium/CogdoFlyingPlayer.py +++ b/toontown/cogdominium/CogdoFlyingPlayer.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import DepthOffsetAttrib, NodePath, Vec3, Vec4, TextNode +from panda3d.core import DepthOffsetAttrib, NodePath, Vec3, Vec4, TextNode from direct.directnotify import DirectNotifyGlobal from direct.fsm.FSM import FSM from direct.interval.FunctionInterval import Wait diff --git a/toontown/cogdominium/CogdoFlyingShadowPlacer.py b/toontown/cogdominium/CogdoFlyingShadowPlacer.py index c7554f2..5f6ce59 100644 --- a/toontown/cogdominium/CogdoFlyingShadowPlacer.py +++ b/toontown/cogdominium/CogdoFlyingShadowPlacer.py @@ -1,6 +1,6 @@ from direct.controls.ControlManager import CollisionHandlerRayStart from direct.directnotify import DirectNotifyGlobal -from pandac.PandaModules import * +from panda3d.core import * from direct.task.Task import Task from direct.showbase.DirectObject import DirectObject from direct.showbase.ShadowPlacer import ShadowPlacer diff --git a/toontown/cogdominium/CogdoGameAudioManager.py b/toontown/cogdominium/CogdoGameAudioManager.py index ccfc36a..17ce2cf 100644 --- a/toontown/cogdominium/CogdoGameAudioManager.py +++ b/toontown/cogdominium/CogdoGameAudioManager.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import AudioSound +from panda3d.core import AudioSound from direct.interval.SoundInterval import SoundInterval class CogdoGameSfx: diff --git a/toontown/cogdominium/CogdoGameExit.py b/toontown/cogdominium/CogdoGameExit.py index 586881e..4263c73 100644 --- a/toontown/cogdominium/CogdoGameExit.py +++ b/toontown/cogdominium/CogdoGameExit.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import NodePath, Point3 +from panda3d.core import NodePath, Point3 from direct.interval.MetaInterval import Parallel, Sequence from direct.interval.SoundInterval import SoundInterval from direct.interval.FunctionInterval import Wait, Func diff --git a/toontown/cogdominium/CogdoGameGatherable.py b/toontown/cogdominium/CogdoGameGatherable.py index dd9c671..efe829f 100644 --- a/toontown/cogdominium/CogdoGameGatherable.py +++ b/toontown/cogdominium/CogdoGameGatherable.py @@ -1,5 +1,5 @@ -from pandac.PandaModules import CollisionSphere, CollisionNode -from pandac.PandaModules import NodePath, BitMask32 +from panda3d.core import CollisionSphere, CollisionNode +from panda3d.core import NodePath, BitMask32 from direct.showbase.DirectObject import DirectObject from direct.interval.MetaInterval import Sequence from direct.interval.FunctionInterval import Func, Wait diff --git a/toontown/cogdominium/CogdoGameMessageDisplay.py b/toontown/cogdominium/CogdoGameMessageDisplay.py index 126d470..76b9709 100644 --- a/toontown/cogdominium/CogdoGameMessageDisplay.py +++ b/toontown/cogdominium/CogdoGameMessageDisplay.py @@ -1,7 +1,7 @@ from direct.interval.FunctionInterval import Func from direct.interval.LerpInterval import LerpFunc from direct.interval.MetaInterval import Sequence -from pandac.PandaModules import TextNode +from panda3d.core import TextNode from toontown.toonbase import ToontownGlobals from . import CogdoGameConsts diff --git a/toontown/cogdominium/CogdoGameRulesPanel.py b/toontown/cogdominium/CogdoGameRulesPanel.py index 3f4555e..9aab7bb 100644 --- a/toontown/cogdominium/CogdoGameRulesPanel.py +++ b/toontown/cogdominium/CogdoGameRulesPanel.py @@ -2,7 +2,7 @@ from direct.task import Task from direct.fsm import StateData from toontown.toonbase.ToontownGlobals import * from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase import ToontownTimer from toontown.toonbase import TTLocalizer from toontown.minigame import MinigameGlobals diff --git a/toontown/cogdominium/CogdoInterior.py b/toontown/cogdominium/CogdoInterior.py index 54c724d..c83279f 100644 --- a/toontown/cogdominium/CogdoInterior.py +++ b/toontown/cogdominium/CogdoInterior.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import ModelPool, TexturePool +from panda3d.core import ModelPool, TexturePool from direct.task.Task import Task from direct.directnotify import DirectNotifyGlobal from direct.fsm import ClassicFSM, State diff --git a/toontown/cogdominium/CogdoMaze.py b/toontown/cogdominium/CogdoMaze.py index 1151886..3e58e73 100644 --- a/toontown/cogdominium/CogdoMaze.py +++ b/toontown/cogdominium/CogdoMaze.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import NodePath, VBase4 +from panda3d.core import NodePath, VBase4 from direct.showbase.DirectObject import DirectObject from direct.showbase.RandomNumGen import RandomNumGen from toontown.minigame.MazeBase import MazeBase diff --git a/toontown/cogdominium/CogdoMazeGame.py b/toontown/cogdominium/CogdoMazeGame.py index 64065a1..c62defd 100644 --- a/toontown/cogdominium/CogdoMazeGame.py +++ b/toontown/cogdominium/CogdoMazeGame.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import Point3, CollisionSphere, CollisionNode +from panda3d.core import Point3, CollisionSphere, CollisionNode from direct.showbase.DirectObject import DirectObject from direct.showbase.PythonUtil import Functor from direct.showbase.RandomNumGen import RandomNumGen diff --git a/toontown/cogdominium/CogdoMazeGameGlobals.py b/toontown/cogdominium/CogdoMazeGameGlobals.py index 8e572e0..f05c238 100644 --- a/toontown/cogdominium/CogdoMazeGameGlobals.py +++ b/toontown/cogdominium/CogdoMazeGameGlobals.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import VBase4 +from panda3d.core import VBase4 from enum import IntEnum GameActions = IntEnum('GameActions', ('EnterDoor', 'RevealDoor', diff --git a/toontown/cogdominium/CogdoMazeGameGuis.py b/toontown/cogdominium/CogdoMazeGameGuis.py index 2a53be4..98d017f 100644 --- a/toontown/cogdominium/CogdoMazeGameGuis.py +++ b/toontown/cogdominium/CogdoMazeGameGuis.py @@ -3,7 +3,7 @@ from direct.gui.DirectGui import DirectFrame, DGG from direct.task.Task import Task from direct.interval.MetaInterval import Sequence, Parallel from direct.interval.FunctionInterval import Wait, Func -from pandac.PandaModules import TextNode, NodePath, Point3, CardMaker +from panda3d.core import TextNode, NodePath, Point3, CardMaker from toontown.toonbase import ToontownGlobals from toontown.toonbase import TTLocalizer from toontown.toonbase import ToontownIntervals diff --git a/toontown/cogdominium/CogdoMazeGameMovies.py b/toontown/cogdominium/CogdoMazeGameMovies.py index 9bed1f7..e3b45e5 100644 --- a/toontown/cogdominium/CogdoMazeGameMovies.py +++ b/toontown/cogdominium/CogdoMazeGameMovies.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import NodePath, Point3, PlaneNode +from panda3d.core import NodePath, Point3, PlaneNode from direct.showbase.ShowBase import Plane from direct.showbase.RandomNumGen import RandomNumGen from direct.interval.MetaInterval import Sequence, Parallel diff --git a/toontown/cogdominium/CogdoMazeGameObjects.py b/toontown/cogdominium/CogdoMazeGameObjects.py index bd17c9c..7cdfae9 100644 --- a/toontown/cogdominium/CogdoMazeGameObjects.py +++ b/toontown/cogdominium/CogdoMazeGameObjects.py @@ -1,7 +1,7 @@ -from pandac.PandaModules import CollisionSphere, CollisionTube, CollisionNode -from pandac.PandaModules import NodePath, BitMask32 -from pandac.PandaModules import Point3, Point4, WaitInterval, Vec3, Vec4 -from direct.interval.IntervalGlobal import LerpScaleInterval, LerpColorScaleInterval, LerpPosInterval, LerpFunc +from panda3d.core import CollisionSphere, CollisionTube, CollisionNode +from panda3d.core import NodePath, BitMask32 +from panda3d.core import Point3, Point4, Vec3, Vec4 +from direct.interval.IntervalGlobal import WaitInterval, LerpScaleInterval, LerpColorScaleInterval, LerpPosInterval, LerpFunc from direct.interval.IntervalGlobal import Func, Sequence, Parallel from direct.showbase.DirectObject import DirectObject from direct.task.Task import Task diff --git a/toontown/cogdominium/CogdoMazeGuiManager.py b/toontown/cogdominium/CogdoMazeGuiManager.py index d39899a..b2cfe79 100644 --- a/toontown/cogdominium/CogdoMazeGuiManager.py +++ b/toontown/cogdominium/CogdoMazeGuiManager.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import NodePath +from panda3d.core import NodePath from direct.interval.MetaInterval import Sequence from direct.interval.FunctionInterval import Func from toontown.toonbase.ToontownTimer import ToontownTimer diff --git a/toontown/cogdominium/CogdoMazeLocalPlayer.py b/toontown/cogdominium/CogdoMazeLocalPlayer.py index a02d539..86d3c15 100644 --- a/toontown/cogdominium/CogdoMazeLocalPlayer.py +++ b/toontown/cogdominium/CogdoMazeLocalPlayer.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import Point3, CollisionNode, CollisionSphere, CollisionHandlerEvent +from panda3d.core import Point3, CollisionNode, CollisionSphere, CollisionHandlerEvent from direct.interval.IntervalGlobal import Func, Sequence, Wait from direct.showbase.PythonUtil import bound as clamp from direct.directnotify import DirectNotifyGlobal diff --git a/toontown/cogdominium/CogdoMazePlayer.py b/toontown/cogdominium/CogdoMazePlayer.py index c621189..d4830be 100644 --- a/toontown/cogdominium/CogdoMazePlayer.py +++ b/toontown/cogdominium/CogdoMazePlayer.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import Point3, NodePath +from panda3d.core import Point3, NodePath from direct.fsm.FSM import FSM from direct.interval.IntervalGlobal import ProjectileInterval, Track, ActorInterval from direct.interval.IntervalGlobal import Func, Sequence, Parallel diff --git a/toontown/cogdominium/CogdoMazeSuits.py b/toontown/cogdominium/CogdoMazeSuits.py index 3b9fa2a..d598301 100644 --- a/toontown/cogdominium/CogdoMazeSuits.py +++ b/toontown/cogdominium/CogdoMazeSuits.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import Point3, VBase4 +from panda3d.core import Point3, VBase4 from direct.fsm.FSM import FSM from direct.interval.IntervalGlobal import Sequence, Parallel, ActorInterval, Func, Wait, ParticleInterval, Track, LerpColorScaleInterval, LerpScaleInterval, LerpHprInterval from direct.task.Task import Task diff --git a/toontown/cogdominium/CogdoMemoGui.py b/toontown/cogdominium/CogdoMemoGui.py index 5002d4f..05b75c9 100644 --- a/toontown/cogdominium/CogdoMemoGui.py +++ b/toontown/cogdominium/CogdoMemoGui.py @@ -1,5 +1,5 @@ from direct.gui.DirectGui import DGG, DirectFrame, DirectLabel -from pandac.PandaModules import TextNode +from panda3d.core import TextNode from toontown.toonbase import ToontownGlobals from toontown.toonbase import ToontownIntervals from toontown.toonbase import TTLocalizer diff --git a/toontown/cogdominium/CogdoUtil.py b/toontown/cogdominium/CogdoUtil.py index 1d20843..26bc062 100644 --- a/toontown/cogdominium/CogdoUtil.py +++ b/toontown/cogdominium/CogdoUtil.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import ColorBlendAttrib +from panda3d.core import ColorBlendAttrib ModelPhase = 5 ModelTypes = {'animation': 'a', 'model': 'm', @@ -58,7 +58,7 @@ class CogdoGameMovie: def load(self): from toontown.toonbase import ToontownGlobals - from pandac.PandaModules import TextNode + from panda3d.core import TextNode textNode = TextNode('moviedialogue') textNode.setTextColor(0, 0, 0, 1) textNode.setCardColor(1, 1, 1, 1) diff --git a/toontown/cogdominium/DistCogdoCrane.py b/toontown/cogdominium/DistCogdoCrane.py index eee7525..d1a906f 100644 --- a/toontown/cogdominium/DistCogdoCrane.py +++ b/toontown/cogdominium/DistCogdoCrane.py @@ -1,5 +1,6 @@ from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * +from panda3d.direct import SmoothMover from direct.interval.IntervalGlobal import * from direct.distributed.ClockDelta import * from direct.fsm import FSM diff --git a/toontown/cogdominium/DistCogdoCraneAI.py b/toontown/cogdominium/DistCogdoCraneAI.py index 6b1becb..2f897a2 100644 --- a/toontown/cogdominium/DistCogdoCraneAI.py +++ b/toontown/cogdominium/DistCogdoCraneAI.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.distributed import DistributedObjectAI from toontown.toonbase import ToontownGlobals from otp.otpbase import OTPGlobals diff --git a/toontown/cogdominium/DistCogdoCraneMoneyBag.py b/toontown/cogdominium/DistCogdoCraneMoneyBag.py index 995fb95..cac30d4 100644 --- a/toontown/cogdominium/DistCogdoCraneMoneyBag.py +++ b/toontown/cogdominium/DistCogdoCraneMoneyBag.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.interval.IntervalGlobal import * from direct.directnotify import DirectNotifyGlobal from toontown.toonbase import ToontownGlobals diff --git a/toontown/cogdominium/DistCogdoCraneMoneyBagAI.py b/toontown/cogdominium/DistCogdoCraneMoneyBagAI.py index 29ddfa9..0d34063 100644 --- a/toontown/cogdominium/DistCogdoCraneMoneyBagAI.py +++ b/toontown/cogdominium/DistCogdoCraneMoneyBagAI.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase import ToontownGlobals from otp.otpbase import OTPGlobals from toontown.cogdominium.DistCogdoCraneObjectAI import DistCogdoCraneObjectAI diff --git a/toontown/cogdominium/DistCogdoCraneObject.py b/toontown/cogdominium/DistCogdoCraneObject.py index cbf520d..ee8d887 100644 --- a/toontown/cogdominium/DistCogdoCraneObject.py +++ b/toontown/cogdominium/DistCogdoCraneObject.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.interval.IntervalGlobal import * from direct.directnotify import DirectNotifyGlobal from direct.distributed import DistributedSmoothNode diff --git a/toontown/cogdominium/DistCogdoCraneObjectAI.py b/toontown/cogdominium/DistCogdoCraneObjectAI.py index c754e9f..8af78fb 100644 --- a/toontown/cogdominium/DistCogdoCraneObjectAI.py +++ b/toontown/cogdominium/DistCogdoCraneObjectAI.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.distributed import DistributedSmoothNodeAI from toontown.toonbase import ToontownGlobals from otp.otpbase import OTPGlobals diff --git a/toontown/cogdominium/DistCogdoGame.py b/toontown/cogdominium/DistCogdoGame.py index e93249e..a3737ac 100644 --- a/toontown/cogdominium/DistCogdoGame.py +++ b/toontown/cogdominium/DistCogdoGame.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import VBase4 +from panda3d.core import VBase4 from direct.gui.DirectGui import DirectLabel from direct.directnotify.DirectNotifyGlobal import directNotify from direct.distributed.ClockDelta import globalClockDelta diff --git a/toontown/cogdominium/DistCogdoMazeGameAI.py b/toontown/cogdominium/DistCogdoMazeGameAI.py index 3e06ac0..4cfe8f3 100644 --- a/toontown/cogdominium/DistCogdoMazeGameAI.py +++ b/toontown/cogdominium/DistCogdoMazeGameAI.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import Vec3, NodePath +from panda3d.core import Vec3, NodePath from direct.distributed.ClockDelta import globalClockDelta from otp.avatar.SpeedMonitor import SpeedMonitor from toontown.cogdominium.CogdoMaze import CogdoMazeFactory diff --git a/toontown/cogdominium/DistributedCogdoBarrel.py b/toontown/cogdominium/DistributedCogdoBarrel.py index d6c5c20..6a5b0d9 100644 --- a/toontown/cogdominium/DistributedCogdoBarrel.py +++ b/toontown/cogdominium/DistributedCogdoBarrel.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.directnotify import DirectNotifyGlobal from direct.distributed import DistributedObject from toontown.toonbase import ToontownGlobals, ToontownIntervals diff --git a/toontown/cogdominium/DistributedCogdoInterior.py b/toontown/cogdominium/DistributedCogdoInterior.py index 10092db..e90b8a9 100644 --- a/toontown/cogdominium/DistributedCogdoInterior.py +++ b/toontown/cogdominium/DistributedCogdoInterior.py @@ -3,7 +3,7 @@ from direct.interval.IntervalGlobal import * from direct.distributed.ClockDelta import * from toontown.building.ElevatorConstants import * from toontown.toon import NPCToons -from pandac.PandaModules import NodePath +from panda3d.core import NodePath from panda3d.otp import * from toontown.building import ElevatorUtils from toontown.toonbase import ToontownGlobals diff --git a/toontown/coghq/ActiveCell.py b/toontown/coghq/ActiveCell.py index 4462762..f97eba7 100644 --- a/toontown/coghq/ActiveCell.py +++ b/toontown/coghq/ActiveCell.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from otp.level import BasicEntities from direct.directnotify import DirectNotifyGlobal diff --git a/toontown/coghq/BattleBlocker.py b/toontown/coghq/BattleBlocker.py index ae333c6..e4c68c9 100644 --- a/toontown/coghq/BattleBlocker.py +++ b/toontown/coghq/BattleBlocker.py @@ -1,5 +1,5 @@ -from pandac.PandaModules import * -from pandac.PandaModules import * +from panda3d.core import * +from panda3d.core import * from direct.interval.IntervalGlobal import * from otp.level import BasicEntities from toontown.toonbase import ToontownGlobals diff --git a/toontown/coghq/BossbotCogHQLoader.py b/toontown/coghq/BossbotCogHQLoader.py index 17dc20a..1902298 100644 --- a/toontown/coghq/BossbotCogHQLoader.py +++ b/toontown/coghq/BossbotCogHQLoader.py @@ -10,7 +10,7 @@ from toontown.coghq import BossbotHQExterior from toontown.coghq import BossbotHQBossBattle from toontown.coghq import BossbotOfficeExterior from toontown.coghq import CountryClubInterior -from pandac.PandaModules import DecalEffect, TextEncoder +from panda3d.core import DecalEffect, TextEncoder import random aspectSF = 0.7227 diff --git a/toontown/coghq/BossbotHQBossBattle.py b/toontown/coghq/BossbotHQBossBattle.py index 17bf36f..cd81c04 100644 --- a/toontown/coghq/BossbotHQBossBattle.py +++ b/toontown/coghq/BossbotHQBossBattle.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.interval.IntervalGlobal import * from toontown.suit import DistributedBossbotBoss from direct.directnotify import DirectNotifyGlobal diff --git a/toontown/coghq/BossbotHQExterior.py b/toontown/coghq/BossbotHQExterior.py index 0c05641..637a2bb 100644 --- a/toontown/coghq/BossbotHQExterior.py +++ b/toontown/coghq/BossbotHQExterior.py @@ -4,7 +4,7 @@ from direct.fsm import ClassicFSM, State from direct.fsm import State from toontown.toonbase import ToontownGlobals from toontown.building import Elevator -from pandac.PandaModules import * +from panda3d.core import * from toontown.coghq import CogHQExterior class BossbotHQExterior(CogHQExterior.CogHQExterior): diff --git a/toontown/coghq/BossbotOfficeExterior.py b/toontown/coghq/BossbotOfficeExterior.py index 1765d3b..30f6845 100644 --- a/toontown/coghq/BossbotOfficeExterior.py +++ b/toontown/coghq/BossbotOfficeExterior.py @@ -3,7 +3,7 @@ from direct.fsm import ClassicFSM from direct.fsm import State from toontown.toonbase import ToontownGlobals from toontown.building import Elevator -from pandac.PandaModules import * +from panda3d.core import * from . import FactoryExterior class BossbotOfficeExterior(FactoryExterior.FactoryExterior): diff --git a/toontown/coghq/CashbotCogHQLoader.py b/toontown/coghq/CashbotCogHQLoader.py index 91f0478..f050af9 100644 --- a/toontown/coghq/CashbotCogHQLoader.py +++ b/toontown/coghq/CashbotCogHQLoader.py @@ -8,7 +8,7 @@ from toontown.toon import Toon from direct.fsm import State from . import CashbotHQExterior from . import CashbotHQBossBattle -from pandac.PandaModules import DecalEffect +from panda3d.core import DecalEffect class CashbotCogHQLoader(CogHQLoader.CogHQLoader): notify = DirectNotifyGlobal.directNotify.newCategory('CashbotCogHQLoader') diff --git a/toontown/coghq/CashbotHQBossBattle.py b/toontown/coghq/CashbotHQBossBattle.py index 3eb29f5..fde43f7 100644 --- a/toontown/coghq/CashbotHQBossBattle.py +++ b/toontown/coghq/CashbotHQBossBattle.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.interval.IntervalGlobal import * from toontown.suit import DistributedCashbotBoss from direct.directnotify import DirectNotifyGlobal diff --git a/toontown/coghq/CashbotHQExterior.py b/toontown/coghq/CashbotHQExterior.py index aa985af..1dbc883 100644 --- a/toontown/coghq/CashbotHQExterior.py +++ b/toontown/coghq/CashbotHQExterior.py @@ -1,7 +1,7 @@ from direct.directnotify import DirectNotifyGlobal from direct.interval.IntervalGlobal import * from direct.fsm import State -from pandac.PandaModules import * +from panda3d.core import * from toontown.building import Elevator from toontown.coghq import CogHQExterior from toontown.safezone import Train diff --git a/toontown/coghq/CogHQBossBattle.py b/toontown/coghq/CogHQBossBattle.py index 5622894..baafe44 100644 --- a/toontown/coghq/CogHQBossBattle.py +++ b/toontown/coghq/CogHQBossBattle.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from panda3d.otp import * from direct.interval.IntervalGlobal import * from direct.directnotify import DirectNotifyGlobal diff --git a/toontown/coghq/CogHQExterior.py b/toontown/coghq/CogHQExterior.py index 1628219..7df3905 100644 --- a/toontown/coghq/CogHQExterior.py +++ b/toontown/coghq/CogHQExterior.py @@ -4,7 +4,7 @@ from direct.fsm import ClassicFSM, State from direct.fsm import State from toontown.toonbase import ToontownGlobals from toontown.hood import ZoneUtil -from pandac.PandaModules import * +from panda3d.core import * from panda3d.otp import * from panda3d.toontown import * from otp.distributed.TelemetryLimiter import RotationLimitToH, TLGatherAllAvs diff --git a/toontown/coghq/CogHQLoader.py b/toontown/coghq/CogHQLoader.py index 2b99995..419faa8 100644 --- a/toontown/coghq/CogHQLoader.py +++ b/toontown/coghq/CogHQLoader.py @@ -7,7 +7,7 @@ from toontown.hood import QuietZoneState from toontown.hood import ZoneUtil from toontown.town import TownBattle from toontown.suit import Suit -from pandac.PandaModules import * +from panda3d.core import * class CogHQLoader(StateData.StateData): notify = DirectNotifyGlobal.directNotify.newCategory('CogHQLoader') diff --git a/toontown/coghq/CogHQLobby.py b/toontown/coghq/CogHQLobby.py index 1276da5..f28af14 100644 --- a/toontown/coghq/CogHQLobby.py +++ b/toontown/coghq/CogHQLobby.py @@ -4,7 +4,7 @@ from direct.fsm import State from toontown.hood import Place from toontown.building import Elevator from toontown.toonbase import ToontownGlobals -from pandac.PandaModules import * +from panda3d.core import * from panda3d.otp import * from otp.distributed.TelemetryLimiter import RotationLimitToH, TLGatherAllAvs diff --git a/toontown/coghq/ConveyorBelt.py b/toontown/coghq/ConveyorBelt.py index 4266a46..1f98328 100644 --- a/toontown/coghq/ConveyorBelt.py +++ b/toontown/coghq/ConveyorBelt.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.interval.IntervalGlobal import * from . import MovingPlatform from otp.level import BasicEntities diff --git a/toontown/coghq/CountryClubInterior.py b/toontown/coghq/CountryClubInterior.py index 3f6a920..622caad 100644 --- a/toontown/coghq/CountryClubInterior.py +++ b/toontown/coghq/CountryClubInterior.py @@ -3,7 +3,7 @@ from toontown.battle import BattlePlace from direct.fsm import ClassicFSM, State from direct.fsm import State from direct.showbase import BulletinBoardWatcher -from pandac.PandaModules import * +from panda3d.core import * from panda3d.otp import * from otp.distributed.TelemetryLimiter import RotationLimitToH, TLGatherAllAvs from toontown.toon import Toon diff --git a/toontown/coghq/CountryClubRoom.py b/toontown/coghq/CountryClubRoom.py index 0b12f64..1fb46f8 100644 --- a/toontown/coghq/CountryClubRoom.py +++ b/toontown/coghq/CountryClubRoom.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.showbase import DirectObject from direct.fsm import ClassicFSM, State from toontown.toonbase import ToontownGlobals diff --git a/toontown/coghq/CrateGlobals.py b/toontown/coghq/CrateGlobals.py index 20b4efc..b1625bd 100644 --- a/toontown/coghq/CrateGlobals.py +++ b/toontown/coghq/CrateGlobals.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * CRATE_CLEAR = 0 CRATE_POWERUP = 1 CRATE_PUSH = 2 diff --git a/toontown/coghq/DinerStatusIndicator.py b/toontown/coghq/DinerStatusIndicator.py index 3e578f4..9da937d 100644 --- a/toontown/coghq/DinerStatusIndicator.py +++ b/toontown/coghq/DinerStatusIndicator.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import NodePath, BillboardEffect, Vec3, Point3, TextureStage, TransparencyAttrib, DecalEffect, VBase4 +from panda3d.core import NodePath, BillboardEffect, Vec3, Point3, TextureStage, TransparencyAttrib, DecalEffect, VBase4 from direct.fsm import FSM from direct.gui.DirectGui import DirectFrame, DGG from direct.interval.IntervalGlobal import LerpScaleInterval, LerpColorScaleInterval, Parallel, Sequence, Wait diff --git a/toontown/coghq/DistributedBanquetTable.py b/toontown/coghq/DistributedBanquetTable.py index bb92986..4cf3c73 100644 --- a/toontown/coghq/DistributedBanquetTable.py +++ b/toontown/coghq/DistributedBanquetTable.py @@ -1,6 +1,7 @@ import math import random -from pandac.PandaModules import NodePath, Point3, VBase4, TextNode, Vec3, deg2Rad, CollisionSegment, CollisionHandlerQueue, CollisionNode, BitMask32, SmoothMover +from panda3d.core import NodePath, Point3, VBase4, TextNode, Vec3, deg2Rad, CollisionSegment, CollisionHandlerQueue, CollisionNode, BitMask32 +from panda3d.direct import SmoothMover from direct.fsm import FSM from direct.distributed import DistributedObject from direct.distributed.ClockDelta import globalClockDelta diff --git a/toontown/coghq/DistributedBarrelBase.py b/toontown/coghq/DistributedBarrelBase.py index 9bef264..5781aca 100644 --- a/toontown/coghq/DistributedBarrelBase.py +++ b/toontown/coghq/DistributedBarrelBase.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.interval.IntervalGlobal import * from toontown.toonbase.ToontownGlobals import * from toontown.coghq import BarrelBase diff --git a/toontown/coghq/DistributedBattleFactory.py b/toontown/coghq/DistributedBattleFactory.py index aae1397..d1c1e63 100644 --- a/toontown/coghq/DistributedBattleFactory.py +++ b/toontown/coghq/DistributedBattleFactory.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from panda3d.otp import * from direct.interval.IntervalGlobal import * from toontown.battle.BattleBase import * diff --git a/toontown/coghq/DistributedBeanBarrel.py b/toontown/coghq/DistributedBeanBarrel.py index f80ee0f..668eb7b 100644 --- a/toontown/coghq/DistributedBeanBarrel.py +++ b/toontown/coghq/DistributedBeanBarrel.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.interval.IntervalGlobal import * from toontown.toonbase.ToontownGlobals import * from direct.directnotify import DirectNotifyGlobal diff --git a/toontown/coghq/DistributedButton.py b/toontown/coghq/DistributedButton.py index 0d6de82..63bd0a4 100644 --- a/toontown/coghq/DistributedButton.py +++ b/toontown/coghq/DistributedButton.py @@ -1,5 +1,5 @@ -from pandac.PandaModules import * -from pandac.PandaModules import * +from panda3d.core import * +from panda3d.core import * from direct.interval.IntervalGlobal import * from direct.distributed.ClockDelta import * from . import MovingPlatform diff --git a/toontown/coghq/DistributedCashbotBossCrane.py b/toontown/coghq/DistributedCashbotBossCrane.py index 3420b97..8f10715 100644 --- a/toontown/coghq/DistributedCashbotBossCrane.py +++ b/toontown/coghq/DistributedCashbotBossCrane.py @@ -1,5 +1,7 @@ from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * +from panda3d.direct import * +from panda3d.physics import * from panda3d.otp import * from direct.interval.IntervalGlobal import * from direct.distributed.ClockDelta import * diff --git a/toontown/coghq/DistributedCashbotBossCraneAI.py b/toontown/coghq/DistributedCashbotBossCraneAI.py index 2974ae3..45ff12d 100644 --- a/toontown/coghq/DistributedCashbotBossCraneAI.py +++ b/toontown/coghq/DistributedCashbotBossCraneAI.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.distributed import DistributedObjectAI from toontown.toonbase import ToontownGlobals from otp.otpbase import OTPGlobals diff --git a/toontown/coghq/DistributedCashbotBossObject.py b/toontown/coghq/DistributedCashbotBossObject.py index 9e41c72..4353b34 100644 --- a/toontown/coghq/DistributedCashbotBossObject.py +++ b/toontown/coghq/DistributedCashbotBossObject.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.interval.IntervalGlobal import * from direct.directnotify import DirectNotifyGlobal from direct.distributed import DistributedSmoothNode diff --git a/toontown/coghq/DistributedCashbotBossObjectAI.py b/toontown/coghq/DistributedCashbotBossObjectAI.py index 196c127..1100ff6 100644 --- a/toontown/coghq/DistributedCashbotBossObjectAI.py +++ b/toontown/coghq/DistributedCashbotBossObjectAI.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.distributed import DistributedSmoothNodeAI from toontown.toonbase import ToontownGlobals from otp.otpbase import OTPGlobals diff --git a/toontown/coghq/DistributedCashbotBossSafe.py b/toontown/coghq/DistributedCashbotBossSafe.py index b7c39e4..712b555 100644 --- a/toontown/coghq/DistributedCashbotBossSafe.py +++ b/toontown/coghq/DistributedCashbotBossSafe.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.interval.IntervalGlobal import * from direct.directnotify import DirectNotifyGlobal from toontown.toonbase import ToontownGlobals diff --git a/toontown/coghq/DistributedCashbotBossSafeAI.py b/toontown/coghq/DistributedCashbotBossSafeAI.py index d15e85e..2b141c0 100644 --- a/toontown/coghq/DistributedCashbotBossSafeAI.py +++ b/toontown/coghq/DistributedCashbotBossSafeAI.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase import ToontownGlobals from otp.otpbase import OTPGlobals from . import DistributedCashbotBossObjectAI diff --git a/toontown/coghq/DistributedCashbotBossTreasure.py b/toontown/coghq/DistributedCashbotBossTreasure.py index f5fa0d7..fdddc6e 100644 --- a/toontown/coghq/DistributedCashbotBossTreasure.py +++ b/toontown/coghq/DistributedCashbotBossTreasure.py @@ -1,7 +1,7 @@ from toontown.safezone import DistributedSZTreasure from toontown.toonbase import ToontownGlobals from direct.interval.IntervalGlobal import * -from pandac.PandaModules import Point3 +from panda3d.core import Point3 Models = {ToontownGlobals.ToontownCentral: 'phase_4/models/props/icecream', ToontownGlobals.DonaldsDock: 'phase_6/models/props/starfish_treasure', ToontownGlobals.TheBrrrgh: 'phase_8/models/props/snowflake_treasure', diff --git a/toontown/coghq/DistributedCogKart.py b/toontown/coghq/DistributedCogKart.py index 9e754ab..0ab2b16 100644 --- a/toontown/coghq/DistributedCogKart.py +++ b/toontown/coghq/DistributedCogKart.py @@ -1,5 +1,5 @@ import math -from pandac.PandaModules import CollisionSphere, CollisionNode, Vec3, Point3, deg2Rad +from panda3d.core import CollisionSphere, CollisionNode, Vec3, Point3, deg2Rad from direct.interval.IntervalGlobal import Sequence, Func, Parallel, ActorInterval, Wait, Parallel, LerpHprInterval, ProjectileInterval, LerpPosInterval from direct.directnotify import DirectNotifyGlobal from toontown.building import ElevatorConstants diff --git a/toontown/coghq/DistributedCountryClub.py b/toontown/coghq/DistributedCountryClub.py index e7bac0d..a9ba3b9 100644 --- a/toontown/coghq/DistributedCountryClub.py +++ b/toontown/coghq/DistributedCountryClub.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.distributed.ClockDelta import * from direct.distributed import DistributedObject from direct.directnotify import DirectNotifyGlobal diff --git a/toontown/coghq/DistributedCountryClubBattle.py b/toontown/coghq/DistributedCountryClubBattle.py index 37595c7..c3b037a 100644 --- a/toontown/coghq/DistributedCountryClubBattle.py +++ b/toontown/coghq/DistributedCountryClubBattle.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from panda3d.otp import * from direct.interval.IntervalGlobal import * from toontown.battle.BattleBase import * diff --git a/toontown/coghq/DistributedCountryClubRoom.py b/toontown/coghq/DistributedCountryClubRoom.py index 6493472..7a93def 100644 --- a/toontown/coghq/DistributedCountryClubRoom.py +++ b/toontown/coghq/DistributedCountryClubRoom.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase.ToontownGlobals import * from direct.distributed.ClockDelta import * from direct.interval.IntervalGlobal import * diff --git a/toontown/coghq/DistributedCrate.py b/toontown/coghq/DistributedCrate.py index 4ab8a23..b2ff837 100644 --- a/toontown/coghq/DistributedCrate.py +++ b/toontown/coghq/DistributedCrate.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.interval.IntervalGlobal import * from toontown.toonbase.ToontownGlobals import * from .CrateGlobals import * diff --git a/toontown/coghq/DistributedCrushableEntity.py b/toontown/coghq/DistributedCrushableEntity.py index cd13f12..9e7157f 100644 --- a/toontown/coghq/DistributedCrushableEntity.py +++ b/toontown/coghq/DistributedCrushableEntity.py @@ -1,6 +1,6 @@ from otp.level import DistributedEntity from direct.directnotify import DirectNotifyGlobal -from pandac.PandaModules import NodePath +from panda3d.core import NodePath from otp.level import BasicEntities class DistributedCrushableEntity(DistributedEntity.DistributedEntity, NodePath, BasicEntities.NodePathAttribs): diff --git a/toontown/coghq/DistributedDoorEntity.py b/toontown/coghq/DistributedDoorEntity.py index b225a20..586a259 100644 --- a/toontown/coghq/DistributedDoorEntity.py +++ b/toontown/coghq/DistributedDoorEntity.py @@ -1,5 +1,5 @@ -from pandac.PandaModules import * -from pandac.PandaModules import * +from panda3d.core import * +from panda3d.core import * from direct.interval.IntervalGlobal import * from direct.distributed.ClockDelta import * from toontown.toonbase import ToontownGlobals diff --git a/toontown/coghq/DistributedElevatorMarker.py b/toontown/coghq/DistributedElevatorMarker.py index ab3e404..94d3db6 100644 --- a/toontown/coghq/DistributedElevatorMarker.py +++ b/toontown/coghq/DistributedElevatorMarker.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.interval.IntervalGlobal import * from .StomperGlobals import * from direct.distributed import ClockDelta @@ -6,7 +6,7 @@ from direct.showbase.PythonUtil import lerp import math from otp.level import DistributedEntity from direct.directnotify import DirectNotifyGlobal -from pandac.PandaModules import NodePath +from panda3d.core import NodePath from otp.level import BasicEntities from direct.task import Task from toontown.toonbase import ToontownGlobals diff --git a/toontown/coghq/DistributedFactory.py b/toontown/coghq/DistributedFactory.py index 30eca7f..697805f 100644 --- a/toontown/coghq/DistributedFactory.py +++ b/toontown/coghq/DistributedFactory.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase.ToontownGlobals import * from direct.distributed.ClockDelta import * from direct.interval.IntervalGlobal import * diff --git a/toontown/coghq/DistributedFactoryElevatorExt.py b/toontown/coghq/DistributedFactoryElevatorExt.py index a0264cf..01aa329 100644 --- a/toontown/coghq/DistributedFactoryElevatorExt.py +++ b/toontown/coghq/DistributedFactoryElevatorExt.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.distributed.ClockDelta import * from direct.interval.IntervalGlobal import * from toontown.building.ElevatorConstants import * diff --git a/toontown/coghq/DistributedFoodBelt.py b/toontown/coghq/DistributedFoodBelt.py index 39bf161..63d0adf 100644 --- a/toontown/coghq/DistributedFoodBelt.py +++ b/toontown/coghq/DistributedFoodBelt.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import NodePath, Point3, CollisionTube, CollisionNode +from panda3d.core import NodePath, Point3, CollisionTube, CollisionNode from direct.fsm import FSM from direct.distributed import DistributedObject from direct.directnotify import DirectNotifyGlobal diff --git a/toontown/coghq/DistributedGagBarrel.py b/toontown/coghq/DistributedGagBarrel.py index 011d8f1..a2226a8 100644 --- a/toontown/coghq/DistributedGagBarrel.py +++ b/toontown/coghq/DistributedGagBarrel.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.interval.IntervalGlobal import * from toontown.toonbase.ToontownGlobals import * from direct.directnotify import DirectNotifyGlobal diff --git a/toontown/coghq/DistributedGolfGreenGame.py b/toontown/coghq/DistributedGolfGreenGame.py index 8dd18b2..a9aa3bf 100644 --- a/toontown/coghq/DistributedGolfGreenGame.py +++ b/toontown/coghq/DistributedGolfGreenGame.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.interval.IntervalGlobal import * from direct.particles import ParticleEffect from .StomperGlobals import * @@ -7,7 +7,7 @@ from direct.showbase.PythonUtil import lerp import math from otp.level import DistributedEntity from direct.directnotify import DirectNotifyGlobal -from pandac.PandaModules import NodePath +from panda3d.core import NodePath from otp.level import BasicEntities from direct.task import Task from toontown.toonbase import ToontownGlobals diff --git a/toontown/coghq/DistributedGolfSpot.py b/toontown/coghq/DistributedGolfSpot.py index 05de779..33084f2 100644 --- a/toontown/coghq/DistributedGolfSpot.py +++ b/toontown/coghq/DistributedGolfSpot.py @@ -1,5 +1,6 @@ import math -from pandac.PandaModules import Point3, CollisionSphere, CollisionNode, CollisionHandlerEvent, TextNode, VBase4, SmoothMover, NodePath, BitMask32 +from panda3d.core import Point3, CollisionSphere, CollisionNode, CollisionHandlerEvent, TextNode, VBase4, NodePath, BitMask32 +from panda3d.direct import SmoothMover from direct.fsm import FSM from direct.distributed import DistributedObject from direct.distributed.ClockDelta import globalClockDelta diff --git a/toontown/coghq/DistributedGrid.py b/toontown/coghq/DistributedGrid.py index fe20a8a..bb77083 100644 --- a/toontown/coghq/DistributedGrid.py +++ b/toontown/coghq/DistributedGrid.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.interval.IntervalGlobal import * from toontown.toonbase.ToontownGlobals import * from .CrateGlobals import * diff --git a/toontown/coghq/DistributedHealBarrel.py b/toontown/coghq/DistributedHealBarrel.py index 787dfb1..517e26a 100644 --- a/toontown/coghq/DistributedHealBarrel.py +++ b/toontown/coghq/DistributedHealBarrel.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.interval.IntervalGlobal import * from toontown.toonbase.ToontownGlobals import * from direct.directnotify import DirectNotifyGlobal diff --git a/toontown/coghq/DistributedInGameEditor.py b/toontown/coghq/DistributedInGameEditor.py index 84e3f1f..90452dc 100644 --- a/toontown/coghq/DistributedInGameEditor.py +++ b/toontown/coghq/DistributedInGameEditor.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.interval.IntervalGlobal import * from direct.showbase.PythonUtil import lineInfo, Functor from direct.directnotify import DirectNotifyGlobal diff --git a/toontown/coghq/DistributedLaserField.py b/toontown/coghq/DistributedLaserField.py index acd3561..a865c84 100644 --- a/toontown/coghq/DistributedLaserField.py +++ b/toontown/coghq/DistributedLaserField.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.interval.IntervalGlobal import * from .StomperGlobals import * from direct.distributed import ClockDelta @@ -6,7 +6,7 @@ from direct.showbase.PythonUtil import lerp import math from otp.level import DistributedEntity from direct.directnotify import DirectNotifyGlobal -from pandac.PandaModules import NodePath +from panda3d.core import NodePath from otp.level import BasicEntities from direct.task import Task from toontown.toonbase import ToontownGlobals diff --git a/toontown/coghq/DistributedLawOffice.py b/toontown/coghq/DistributedLawOffice.py index af1b5a4..9189c31 100644 --- a/toontown/coghq/DistributedLawOffice.py +++ b/toontown/coghq/DistributedLawOffice.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase.ToontownGlobals import * from direct.distributed.ClockDelta import * from direct.interval.IntervalGlobal import * diff --git a/toontown/coghq/DistributedLawOfficeElevatorInt.py b/toontown/coghq/DistributedLawOfficeElevatorInt.py index e0e9f5b..c38ebea 100644 --- a/toontown/coghq/DistributedLawOfficeElevatorInt.py +++ b/toontown/coghq/DistributedLawOfficeElevatorInt.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.distributed.ClockDelta import * from direct.interval.IntervalGlobal import * from toontown.building.ElevatorConstants import * diff --git a/toontown/coghq/DistributedLawOfficeFloor.py b/toontown/coghq/DistributedLawOfficeFloor.py index 612abd5..905594b 100644 --- a/toontown/coghq/DistributedLawOfficeFloor.py +++ b/toontown/coghq/DistributedLawOfficeFloor.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase.ToontownGlobals import * from direct.distributed.ClockDelta import * from direct.interval.IntervalGlobal import * diff --git a/toontown/coghq/DistributedLawbotBossGavel.py b/toontown/coghq/DistributedLawbotBossGavel.py index f3522d0..cb55874 100644 --- a/toontown/coghq/DistributedLawbotBossGavel.py +++ b/toontown/coghq/DistributedLawbotBossGavel.py @@ -1,5 +1,5 @@ from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from direct.interval.IntervalGlobal import * from direct.distributed.ClockDelta import * from direct.fsm import FSM diff --git a/toontown/coghq/DistributedLawbotBossGavelAI.py b/toontown/coghq/DistributedLawbotBossGavelAI.py index e48634f..a84587f 100644 --- a/toontown/coghq/DistributedLawbotBossGavelAI.py +++ b/toontown/coghq/DistributedLawbotBossGavelAI.py @@ -1,5 +1,5 @@ from direct.directnotify import DirectNotifyGlobal -from pandac.PandaModules import * +from panda3d.core import * from direct.distributed import DistributedObjectAI from toontown.toonbase import ToontownGlobals from otp.otpbase import OTPGlobals diff --git a/toontown/coghq/DistributedLawbotCannon.py b/toontown/coghq/DistributedLawbotCannon.py index e05231a..557b7e0 100644 --- a/toontown/coghq/DistributedLawbotCannon.py +++ b/toontown/coghq/DistributedLawbotCannon.py @@ -3,12 +3,12 @@ from direct.distributed.ClockDelta import * from direct.task.Task import Task from direct.distributed import DistributedObject from direct.directnotify import DirectNotifyGlobal -from pandac.PandaModules import CollisionSphere, CollisionNode +from panda3d.core import CollisionSphere, CollisionNode from toontown.toonbase import ToontownGlobals from toontown.estate import DistributedCannon from toontown.estate import CannonGlobals from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from panda3d.otp import * from toontown.toon import NPCToons from toontown.toon import ToonHead diff --git a/toontown/coghq/DistributedLawbotChair.py b/toontown/coghq/DistributedLawbotChair.py index b6c5f07..64659a1 100644 --- a/toontown/coghq/DistributedLawbotChair.py +++ b/toontown/coghq/DistributedLawbotChair.py @@ -1,5 +1,5 @@ from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from direct.interval.IntervalGlobal import * from direct.distributed.ClockDelta import * from direct.fsm import FSM diff --git a/toontown/coghq/DistributedLawbotChairAI.py b/toontown/coghq/DistributedLawbotChairAI.py index b9fc048..64b670e 100644 --- a/toontown/coghq/DistributedLawbotChairAI.py +++ b/toontown/coghq/DistributedLawbotChairAI.py @@ -1,5 +1,5 @@ from direct.directnotify import DirectNotifyGlobal -from pandac.PandaModules import * +from panda3d.core import * from direct.distributed import DistributedObjectAI from toontown.toonbase import ToontownGlobals from otp.otpbase import OTPGlobals diff --git a/toontown/coghq/DistributedLevelBattle.py b/toontown/coghq/DistributedLevelBattle.py index 28d5c39..e9e99b2 100644 --- a/toontown/coghq/DistributedLevelBattle.py +++ b/toontown/coghq/DistributedLevelBattle.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from panda3d.otp import * from direct.interval.IntervalGlobal import * from toontown.battle.BattleBase import * diff --git a/toontown/coghq/DistributedLift.py b/toontown/coghq/DistributedLift.py index a79737a..8103d97 100644 --- a/toontown/coghq/DistributedLift.py +++ b/toontown/coghq/DistributedLift.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.distributed.ClockDelta import * from direct.interval.IntervalGlobal import * from otp.level import BasicEntities diff --git a/toontown/coghq/DistributedMaze.py b/toontown/coghq/DistributedMaze.py index a77ce54..0cb828b 100644 --- a/toontown/coghq/DistributedMaze.py +++ b/toontown/coghq/DistributedMaze.py @@ -1,5 +1,5 @@ from otp.level.BasicEntities import DistributedNodePathEntity -from pandac.PandaModules import * +from panda3d.core import * from direct.interval.IntervalGlobal import * from toontown.toonbase.ToontownGlobals import * import random diff --git a/toontown/coghq/DistributedMint.py b/toontown/coghq/DistributedMint.py index fb625ca..43f1910 100644 --- a/toontown/coghq/DistributedMint.py +++ b/toontown/coghq/DistributedMint.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.distributed.ClockDelta import * from direct.distributed import DistributedObject from direct.directnotify import DirectNotifyGlobal diff --git a/toontown/coghq/DistributedMintBattle.py b/toontown/coghq/DistributedMintBattle.py index 032942a..23731b0 100644 --- a/toontown/coghq/DistributedMintBattle.py +++ b/toontown/coghq/DistributedMintBattle.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from panda3d.otp import * from direct.interval.IntervalGlobal import * from toontown.battle.BattleBase import * diff --git a/toontown/coghq/DistributedMintRoom.py b/toontown/coghq/DistributedMintRoom.py index 55a1c60..39b5526 100644 --- a/toontown/coghq/DistributedMintRoom.py +++ b/toontown/coghq/DistributedMintRoom.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase.ToontownGlobals import * from direct.distributed.ClockDelta import * from direct.interval.IntervalGlobal import * diff --git a/toontown/coghq/DistributedMoleField.py b/toontown/coghq/DistributedMoleField.py index 7467505..fbe352a 100644 --- a/toontown/coghq/DistributedMoleField.py +++ b/toontown/coghq/DistributedMoleField.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from otp.level.BasicEntities import DistributedNodePathEntity from direct.directnotify import DirectNotifyGlobal from toontown.coghq import MoleHill diff --git a/toontown/coghq/DistributedMover.py b/toontown/coghq/DistributedMover.py index 4b0ece9..ffe089e 100644 --- a/toontown/coghq/DistributedMover.py +++ b/toontown/coghq/DistributedMover.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.interval.IntervalGlobal import * from .StomperGlobals import * from direct.distributed import ClockDelta @@ -6,7 +6,7 @@ from direct.showbase.PythonUtil import lerp import math from otp.level import DistributedEntity from direct.directnotify import DirectNotifyGlobal -from pandac.PandaModules import NodePath +from panda3d.core import NodePath from otp.level import BasicEntities from direct.task import Task from toontown.toonbase import ToontownGlobals diff --git a/toontown/coghq/DistributedSecurityCamera.py b/toontown/coghq/DistributedSecurityCamera.py index cdfe652..8f0ee4a 100644 --- a/toontown/coghq/DistributedSecurityCamera.py +++ b/toontown/coghq/DistributedSecurityCamera.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.interval.IntervalGlobal import * from .StomperGlobals import * from direct.distributed import ClockDelta @@ -6,7 +6,7 @@ from direct.showbase.PythonUtil import lerp import math from otp.level import DistributedEntity from direct.directnotify import DirectNotifyGlobal -from pandac.PandaModules import NodePath +from panda3d.core import NodePath from otp.level import BasicEntities from direct.task import Task from toontown.toonbase import ToontownGlobals diff --git a/toontown/coghq/DistributedSinkingPlatform.py b/toontown/coghq/DistributedSinkingPlatform.py index 9efc6bf..ea3b6f5 100644 --- a/toontown/coghq/DistributedSinkingPlatform.py +++ b/toontown/coghq/DistributedSinkingPlatform.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.distributed.ClockDelta import * from direct.interval.IntervalGlobal import * from direct.fsm import ClassicFSM, State diff --git a/toontown/coghq/DistributedStage.py b/toontown/coghq/DistributedStage.py index e7fcbed..1e8fc16 100644 --- a/toontown/coghq/DistributedStage.py +++ b/toontown/coghq/DistributedStage.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.distributed.ClockDelta import * from direct.distributed import DistributedObject from direct.directnotify import DirectNotifyGlobal diff --git a/toontown/coghq/DistributedStageAI.py b/toontown/coghq/DistributedStageAI.py index 3dd571a..f6ffd71 100644 --- a/toontown/coghq/DistributedStageAI.py +++ b/toontown/coghq/DistributedStageAI.py @@ -5,7 +5,7 @@ from toontown.toonbase import ToontownGlobals from toontown.coghq import StageLayout, DistributedStageRoomAI from toontown.coghq import BattleExperienceAggregatorAI from toontown.building import DistributedElevatorFloorAI -from pandac.PandaModules import * +from panda3d.core import * class DistributedStageAI(DistributedObjectAI.DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedStageAI') diff --git a/toontown/coghq/DistributedStageBattle.py b/toontown/coghq/DistributedStageBattle.py index add435f..fdd7216 100644 --- a/toontown/coghq/DistributedStageBattle.py +++ b/toontown/coghq/DistributedStageBattle.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from panda3d.otp import * from direct.interval.IntervalGlobal import * from toontown.battle.BattleBase import * diff --git a/toontown/coghq/DistributedStageRoom.py b/toontown/coghq/DistributedStageRoom.py index f67e8ab..e4b6086 100644 --- a/toontown/coghq/DistributedStageRoom.py +++ b/toontown/coghq/DistributedStageRoom.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase.ToontownGlobals import * from direct.distributed.ClockDelta import * from direct.interval.IntervalGlobal import * diff --git a/toontown/coghq/DistributedStomper.py b/toontown/coghq/DistributedStomper.py index 5b7f3ac..e2af9ea 100644 --- a/toontown/coghq/DistributedStomper.py +++ b/toontown/coghq/DistributedStomper.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.interval.IntervalGlobal import * from .StomperGlobals import * from direct.distributed import ClockDelta diff --git a/toontown/coghq/DistributedStomperPair.py b/toontown/coghq/DistributedStomperPair.py index 197e8fb..a3b7897 100644 --- a/toontown/coghq/DistributedStomperPair.py +++ b/toontown/coghq/DistributedStomperPair.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.interval.IntervalGlobal import * import math from . import StomperGlobals diff --git a/toontown/coghq/DistributedSwitch.py b/toontown/coghq/DistributedSwitch.py index 02ab50e..5539f0a 100644 --- a/toontown/coghq/DistributedSwitch.py +++ b/toontown/coghq/DistributedSwitch.py @@ -1,5 +1,5 @@ -from pandac.PandaModules import * -from pandac.PandaModules import * +from panda3d.core import * +from panda3d.core import * from direct.interval.IntervalGlobal import * from direct.distributed.ClockDelta import * from otp.level import BasicEntities diff --git a/toontown/coghq/DistributedTrigger.py b/toontown/coghq/DistributedTrigger.py index ebcde38..9dc01d4 100644 --- a/toontown/coghq/DistributedTrigger.py +++ b/toontown/coghq/DistributedTrigger.py @@ -1,5 +1,5 @@ -from pandac.PandaModules import * -from pandac.PandaModules import * +from panda3d.core import * +from panda3d.core import * from direct.interval.IntervalGlobal import * from direct.distributed.ClockDelta import * from . import MovingPlatform diff --git a/toontown/coghq/FactoryCameraViews.py b/toontown/coghq/FactoryCameraViews.py index ebcf09e..648fccb 100644 --- a/toontown/coghq/FactoryCameraViews.py +++ b/toontown/coghq/FactoryCameraViews.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.showbase.PythonUtil import Functor from toontown.toonbase import ToontownGlobals from direct.directnotify import DirectNotifyGlobal diff --git a/toontown/coghq/FactoryExterior.py b/toontown/coghq/FactoryExterior.py index fc2cab9..3d34355 100644 --- a/toontown/coghq/FactoryExterior.py +++ b/toontown/coghq/FactoryExterior.py @@ -6,7 +6,7 @@ from otp.distributed.TelemetryLimiter import RotationLimitToH, TLGatherAllAvs from toontown.toonbase import ToontownGlobals from toontown.hood import ZoneUtil from toontown.building import Elevator -from pandac.PandaModules import * +from panda3d.core import * from panda3d.otp import * from panda3d.toontown import * diff --git a/toontown/coghq/FactoryInterior.py b/toontown/coghq/FactoryInterior.py index c841630..9c06c86 100644 --- a/toontown/coghq/FactoryInterior.py +++ b/toontown/coghq/FactoryInterior.py @@ -2,7 +2,7 @@ from direct.directnotify import DirectNotifyGlobal from toontown.battle import BattlePlace from direct.fsm import ClassicFSM, State from direct.fsm import State -from pandac.PandaModules import * +from panda3d.core import * from panda3d.otp import * from otp.distributed.TelemetryLimiter import RotationLimitToH, TLGatherAllAvs from toontown.toon import Toon diff --git a/toontown/coghq/FactoryUtil.py b/toontown/coghq/FactoryUtil.py index 5b623f1..9ae171f 100644 --- a/toontown/coghq/FactoryUtil.py +++ b/toontown/coghq/FactoryUtil.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.showbase import DirectObject from direct.interval.IntervalGlobal import * from toontown.toonbase import ToontownGlobals diff --git a/toontown/coghq/GameSprite3D.py b/toontown/coghq/GameSprite3D.py index 52c8847..5afca16 100644 --- a/toontown/coghq/GameSprite3D.py +++ b/toontown/coghq/GameSprite3D.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.interval.IntervalGlobal import * import math import random diff --git a/toontown/coghq/GearEntity.py b/toontown/coghq/GearEntity.py index a114821..175b21c 100644 --- a/toontown/coghq/GearEntity.py +++ b/toontown/coghq/GearEntity.py @@ -1,7 +1,7 @@ from direct.interval.IntervalGlobal import * from otp.level import BasicEntities from . import MovingPlatform -from pandac.PandaModules import Vec3 +from panda3d.core import Vec3 class GearEntity(BasicEntities.NodePathEntity): ModelPaths = {'factory': 'phase_9/models/cogHQ/FactoryGearB', diff --git a/toontown/coghq/GoonClipPlane.py b/toontown/coghq/GoonClipPlane.py index 9a39737..31bfb0a 100644 --- a/toontown/coghq/GoonClipPlane.py +++ b/toontown/coghq/GoonClipPlane.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.interval.IntervalGlobal import * from otp.level import BasicEntities diff --git a/toontown/coghq/InGameEditor.py b/toontown/coghq/InGameEditor.py index 3134283..082e3a3 100644 --- a/toontown/coghq/InGameEditor.py +++ b/toontown/coghq/InGameEditor.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import Point3, Vec3, VBase3 +from panda3d.core import Point3, Vec3, VBase3 from direct.tkwidgets.AppShell import * from direct.showbase.TkGlobal import * from direct.tkwidgets.Tree import * diff --git a/toontown/coghq/LawbotHQBossBattle.py b/toontown/coghq/LawbotHQBossBattle.py index 14fcc35..51805d4 100644 --- a/toontown/coghq/LawbotHQBossBattle.py +++ b/toontown/coghq/LawbotHQBossBattle.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.interval.IntervalGlobal import * from toontown.suit import DistributedLawbotBoss from direct.directnotify import DirectNotifyGlobal diff --git a/toontown/coghq/LawbotHQExterior.py b/toontown/coghq/LawbotHQExterior.py index 2cdb286..bb4dc24 100644 --- a/toontown/coghq/LawbotHQExterior.py +++ b/toontown/coghq/LawbotHQExterior.py @@ -4,7 +4,7 @@ from direct.fsm import ClassicFSM, State from direct.fsm import State from toontown.toonbase import ToontownGlobals from toontown.building import Elevator -from pandac.PandaModules import * +from panda3d.core import * from toontown.coghq import CogHQExterior class LawbotHQExterior(CogHQExterior.CogHQExterior): diff --git a/toontown/coghq/LawbotOfficeExterior.py b/toontown/coghq/LawbotOfficeExterior.py index 0ec31eb..13266c5 100644 --- a/toontown/coghq/LawbotOfficeExterior.py +++ b/toontown/coghq/LawbotOfficeExterior.py @@ -3,7 +3,7 @@ from direct.fsm import ClassicFSM from direct.fsm import State from toontown.toonbase import ToontownGlobals from toontown.building import Elevator -from pandac.PandaModules import * +from panda3d.core import * from . import FactoryExterior class LawbotOfficeExterior(FactoryExterior.FactoryExterior): diff --git a/toontown/coghq/LevelSuitPlannerAI.py b/toontown/coghq/LevelSuitPlannerAI.py index 327a7be..b4d459b 100644 --- a/toontown/coghq/LevelSuitPlannerAI.py +++ b/toontown/coghq/LevelSuitPlannerAI.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.showbase import DirectObject from toontown.suit import SuitDNA from direct.directnotify import DirectNotifyGlobal diff --git a/toontown/coghq/LobbyManager.py b/toontown/coghq/LobbyManager.py index 222991b..34316f6 100644 --- a/toontown/coghq/LobbyManager.py +++ b/toontown/coghq/LobbyManager.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase import ToontownGlobals from direct.distributed import DistributedObject from direct.directnotify import DirectNotifyGlobal diff --git a/toontown/coghq/MintInterior.py b/toontown/coghq/MintInterior.py index 21d75f9..af075a6 100644 --- a/toontown/coghq/MintInterior.py +++ b/toontown/coghq/MintInterior.py @@ -3,7 +3,7 @@ from toontown.battle import BattlePlace from direct.fsm import ClassicFSM, State from direct.fsm import State from direct.showbase import BulletinBoardWatcher -from pandac.PandaModules import * +from panda3d.core import * from panda3d.otp import * from otp.distributed.TelemetryLimiter import RotationLimitToH, TLGatherAllAvs from toontown.toon import Toon diff --git a/toontown/coghq/MintRoom.py b/toontown/coghq/MintRoom.py index 6659de5..c29f493 100644 --- a/toontown/coghq/MintRoom.py +++ b/toontown/coghq/MintRoom.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.showbase import DirectObject from direct.fsm import ClassicFSM, State from toontown.toonbase import ToontownGlobals diff --git a/toontown/coghq/MoleHill.py b/toontown/coghq/MoleHill.py index cbf826d..f389960 100644 --- a/toontown/coghq/MoleHill.py +++ b/toontown/coghq/MoleHill.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import NodePath, Point3, CollisionSphere, CollisionNode, Vec4 +from panda3d.core import NodePath, Point3, CollisionSphere, CollisionNode, Vec4 from direct.interval.IntervalGlobal import Sequence, LerpPosInterval, Parallel, LerpScaleInterval, Track, ParticleInterval, Wait, Func from toontown.toonbase import ToontownGlobals from toontown.coghq import MoleFieldBase diff --git a/toontown/coghq/MovingPlatform.py b/toontown/coghq/MovingPlatform.py index 8587dbd..6c7fa4a 100644 --- a/toontown/coghq/MovingPlatform.py +++ b/toontown/coghq/MovingPlatform.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.interval.IntervalGlobal import * from direct.showbase import DirectObject from toontown.toonbase import ToontownGlobals diff --git a/toontown/coghq/PlatformEntity.py b/toontown/coghq/PlatformEntity.py index df8aaea..477509c 100644 --- a/toontown/coghq/PlatformEntity.py +++ b/toontown/coghq/PlatformEntity.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.interval.IntervalGlobal import * from otp.level import BasicEntities from . import MovingPlatform diff --git a/toontown/coghq/SellbotCogHQLoader.py b/toontown/coghq/SellbotCogHQLoader.py index 2467ad8..b7bc6a8 100644 --- a/toontown/coghq/SellbotCogHQLoader.py +++ b/toontown/coghq/SellbotCogHQLoader.py @@ -10,7 +10,7 @@ from . import FactoryExterior from . import FactoryInterior from . import SellbotHQExterior from . import SellbotHQBossBattle -from pandac.PandaModules import DecalEffect +from panda3d.core import DecalEffect aspectSF = 0.7227 class SellbotCogHQLoader(CogHQLoader.CogHQLoader): diff --git a/toontown/coghq/SellbotHQBossBattle.py b/toontown/coghq/SellbotHQBossBattle.py index 5cda14e..411b067 100644 --- a/toontown/coghq/SellbotHQBossBattle.py +++ b/toontown/coghq/SellbotHQBossBattle.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.interval.IntervalGlobal import * from toontown.suit import DistributedSellbotBoss from direct.directnotify import DirectNotifyGlobal diff --git a/toontown/coghq/SpecImports.py b/toontown/coghq/SpecImports.py index 7148752..6ce2708 100644 --- a/toontown/coghq/SpecImports.py +++ b/toontown/coghq/SpecImports.py @@ -1 +1 @@ -from pandac.PandaModules import * +from panda3d.core import * diff --git a/toontown/coghq/StageInterior.py b/toontown/coghq/StageInterior.py index 672c0d6..48bcb81 100644 --- a/toontown/coghq/StageInterior.py +++ b/toontown/coghq/StageInterior.py @@ -3,7 +3,7 @@ from toontown.battle import BattlePlace from direct.fsm import ClassicFSM, State from direct.fsm import State from direct.showbase import BulletinBoardWatcher -from pandac.PandaModules import * +from panda3d.core import * from panda3d.otp import * from otp.distributed.TelemetryLimiter import RotationLimitToH, TLGatherAllAvs from toontown.toon import Toon diff --git a/toontown/coghq/StageRoom.py b/toontown/coghq/StageRoom.py index 04da9f4..7db85e6 100644 --- a/toontown/coghq/StageRoom.py +++ b/toontown/coghq/StageRoom.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.showbase import DirectObject from direct.fsm import ClassicFSM, State from toontown.toonbase import ToontownGlobals diff --git a/toontown/distributed/DistributedTimer.py b/toontown/distributed/DistributedTimer.py index 22187e2..09c23d1 100644 --- a/toontown/distributed/DistributedTimer.py +++ b/toontown/distributed/DistributedTimer.py @@ -1,7 +1,7 @@ from direct.distributed import DistributedObject from direct.directnotify import DirectNotifyGlobal from toontown.toonbase import ToontownGlobals -from pandac.PandaModules import * +from panda3d.core import * from direct.distributed.ClockDelta import * import time diff --git a/toontown/distributed/DistributedTimerAI.py b/toontown/distributed/DistributedTimerAI.py index 1450554..57399d7 100644 --- a/toontown/distributed/DistributedTimerAI.py +++ b/toontown/distributed/DistributedTimerAI.py @@ -1,7 +1,7 @@ from direct.distributed import DistributedObjectAI from direct.directnotify import DirectNotifyGlobal from toontown.toonbase import ToontownGlobals -from pandac.PandaModules import * +from panda3d.core import * from direct.distributed.ClockDelta import * import time diff --git a/toontown/distributed/HoodMgr.py b/toontown/distributed/HoodMgr.py index dce28f5..d9b9926 100644 --- a/toontown/distributed/HoodMgr.py +++ b/toontown/distributed/HoodMgr.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.showbase import DirectObject from direct.directnotify import DirectNotifyGlobal from toontown.launcher import DownloadForceAcknowledge diff --git a/toontown/distributed/PlayGame.py b/toontown/distributed/PlayGame.py index c25cb9c..f55ce3c 100644 --- a/toontown/distributed/PlayGame.py +++ b/toontown/distributed/PlayGame.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from panda3d.toontown import * from toontown.toonbase.ToonBaseGlobal import * from direct.directnotify import DirectNotifyGlobal diff --git a/toontown/effects/BlastEffect.py b/toontown/effects/BlastEffect.py index 086c747..ef6dd53 100644 --- a/toontown/effects/BlastEffect.py +++ b/toontown/effects/BlastEffect.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.interval.IntervalGlobal import * from .EffectController import EffectController diff --git a/toontown/effects/Bubbles.py b/toontown/effects/Bubbles.py index 3d5dad1..891b4ed 100644 --- a/toontown/effects/Bubbles.py +++ b/toontown/effects/Bubbles.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.interval.IntervalGlobal import * from direct.particles import ParticleEffect from direct.particles import Particles diff --git a/toontown/effects/CarSmoke.py b/toontown/effects/CarSmoke.py index e0ca403..75469d8 100644 --- a/toontown/effects/CarSmoke.py +++ b/toontown/effects/CarSmoke.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.particles import ParticleEffect from direct.directnotify import DirectNotifyGlobal from direct.showbase import AppRunnerGlobal diff --git a/toontown/effects/ChrysanthemumEffect.py b/toontown/effects/ChrysanthemumEffect.py index 1c616f0..d4081cc 100644 --- a/toontown/effects/ChrysanthemumEffect.py +++ b/toontown/effects/ChrysanthemumEffect.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.interval.IntervalGlobal import * from .EffectController import EffectController diff --git a/toontown/effects/Drift.py b/toontown/effects/Drift.py index 262776f..d666f1c 100644 --- a/toontown/effects/Drift.py +++ b/toontown/effects/Drift.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.particles import ParticleEffect from direct.directnotify import DirectNotifyGlobal import os diff --git a/toontown/effects/DustCloud.py b/toontown/effects/DustCloud.py index 9d35826..d77b585 100644 --- a/toontown/effects/DustCloud.py +++ b/toontown/effects/DustCloud.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.interval.IntervalGlobal import * from toontown.battle.BattleProps import globalPropPool from direct.directnotify import DirectNotifyGlobal diff --git a/toontown/effects/EffectController.py b/toontown/effects/EffectController.py index f6ac881..2efdde7 100644 --- a/toontown/effects/EffectController.py +++ b/toontown/effects/EffectController.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * class EffectController: particleDummy = None diff --git a/toontown/effects/Firework.py b/toontown/effects/Firework.py index 3535fc3..86b34da 100644 --- a/toontown/effects/Firework.py +++ b/toontown/effects/Firework.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.interval.IntervalGlobal import * from toontown.effects.FireworkGlobals import * from toontown.effects.FireworkEffect import FireworkEffect diff --git a/toontown/effects/FireworkEffect.py b/toontown/effects/FireworkEffect.py index 80aa298..eb055fb 100644 --- a/toontown/effects/FireworkEffect.py +++ b/toontown/effects/FireworkEffect.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.interval.IntervalGlobal import * import random from toontown.effects.FireworkGlobals import * diff --git a/toontown/effects/FireworkShow.py b/toontown/effects/FireworkShow.py index 6723558..2f1302f 100644 --- a/toontown/effects/FireworkShow.py +++ b/toontown/effects/FireworkShow.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.interval.IntervalGlobal import * from toontown.effects.FireworkGlobals import * from toontown.effects.Firework import Firework diff --git a/toontown/effects/FireworkSparkles.py b/toontown/effects/FireworkSparkles.py index c7a0480..a35325d 100644 --- a/toontown/effects/FireworkSparkles.py +++ b/toontown/effects/FireworkSparkles.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.interval.IntervalGlobal import * from direct.particles import ParticleEffect, Particles, ForceGroup from .EffectController import EffectController diff --git a/toontown/effects/Fireworks.py b/toontown/effects/Fireworks.py index c7aadb2..ee0f7ae 100644 --- a/toontown/effects/Fireworks.py +++ b/toontown/effects/Fireworks.py @@ -2,7 +2,7 @@ from direct.interval.IntervalGlobal import * from direct.particles import ParticleEffect from direct.particles import Particles from direct.particles import ForceGroup -from pandac.PandaModules import * +from panda3d.core import * import random from .FireworkGlobals import * colors = {WHITE: Vec4(1, 1, 1, 1), diff --git a/toontown/effects/FlashEffect.py b/toontown/effects/FlashEffect.py index 10e99a3..ceea5a6 100644 --- a/toontown/effects/FlashEffect.py +++ b/toontown/effects/FlashEffect.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.interval.IntervalGlobal import * from .EffectController import EffectController diff --git a/toontown/effects/Glow.py b/toontown/effects/Glow.py index 00440da..99fe7ed 100644 --- a/toontown/effects/Glow.py +++ b/toontown/effects/Glow.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.interval.IntervalGlobal import * from .EffectController import EffectController from .PooledEffect import PooledEffect diff --git a/toontown/effects/GlowTrail.py b/toontown/effects/GlowTrail.py index 7d69f65..a049897 100644 --- a/toontown/effects/GlowTrail.py +++ b/toontown/effects/GlowTrail.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.interval.IntervalGlobal import * from direct.particles import ParticleEffect, Particles, ForceGroup from .PooledEffect import PooledEffect diff --git a/toontown/effects/IceCream.py b/toontown/effects/IceCream.py index 0d3253c..0f67fd6 100644 --- a/toontown/effects/IceCream.py +++ b/toontown/effects/IceCream.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.interval.IntervalGlobal import * from direct.particles import ParticleEffect, Particles, ForceGroup from .EffectController import EffectController diff --git a/toontown/effects/NoiseSparkles.py b/toontown/effects/NoiseSparkles.py index b00e109..5a6b262 100644 --- a/toontown/effects/NoiseSparkles.py +++ b/toontown/effects/NoiseSparkles.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.interval.IntervalGlobal import * from direct.particles import ParticleEffect, Particles, ForceGroup from .EffectController import EffectController diff --git a/toontown/effects/PeonyEffect.py b/toontown/effects/PeonyEffect.py index fb8d813..8ddeebe 100644 --- a/toontown/effects/PeonyEffect.py +++ b/toontown/effects/PeonyEffect.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.showbase.DirectObject import * from direct.interval.IntervalGlobal import * from .PooledEffect import PooledEffect diff --git a/toontown/effects/PolyTrail.py b/toontown/effects/PolyTrail.py index 63558e8..14c82fe 100644 --- a/toontown/effects/PolyTrail.py +++ b/toontown/effects/PolyTrail.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.motiontrail.MotionTrail import * import random diff --git a/toontown/effects/PooledEffect.py b/toontown/effects/PooledEffect.py index 7bab21b..cd4d83e 100644 --- a/toontown/effects/PooledEffect.py +++ b/toontown/effects/PooledEffect.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.showbase import Pool from direct.showbase.DirectObject import DirectObject import re diff --git a/toontown/effects/RayBurst.py b/toontown/effects/RayBurst.py index 92cca11..b9415f6 100644 --- a/toontown/effects/RayBurst.py +++ b/toontown/effects/RayBurst.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.interval.IntervalGlobal import * from .EffectController import EffectController diff --git a/toontown/effects/RingEffect.py b/toontown/effects/RingEffect.py index b080efb..1c844d2 100644 --- a/toontown/effects/RingEffect.py +++ b/toontown/effects/RingEffect.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.interval.IntervalGlobal import * from direct.particles import ParticleEffect, Particles, ForceGroup from .EffectController import EffectController diff --git a/toontown/effects/Ripples.py b/toontown/effects/Ripples.py index b0aa70e..7bb9e56 100644 --- a/toontown/effects/Ripples.py +++ b/toontown/effects/Ripples.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.interval.IntervalGlobal import * from toontown.battle.BattleProps import globalPropPool diff --git a/toontown/effects/ScavengerHuntEffects.py b/toontown/effects/ScavengerHuntEffects.py index 0d0b19d..bf3968f 100644 --- a/toontown/effects/ScavengerHuntEffects.py +++ b/toontown/effects/ScavengerHuntEffects.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.interval.IntervalGlobal import * from toontown.toonbase import ToontownGlobals from toontown.toonbase import TTLocalizer diff --git a/toontown/effects/SimpleSparkles.py b/toontown/effects/SimpleSparkles.py index 21531ba..8e40a22 100644 --- a/toontown/effects/SimpleSparkles.py +++ b/toontown/effects/SimpleSparkles.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.interval.IntervalGlobal import * from direct.particles import ParticleEffect, Particles, ForceGroup from .EffectController import EffectController diff --git a/toontown/effects/SkullBurst.py b/toontown/effects/SkullBurst.py index 66189d5..1cfc317 100644 --- a/toontown/effects/SkullBurst.py +++ b/toontown/effects/SkullBurst.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.showbase.DirectObject import * from direct.interval.IntervalGlobal import * from .PooledEffect import PooledEffect diff --git a/toontown/effects/SkullFlash.py b/toontown/effects/SkullFlash.py index 1d987b6..5228e1c 100644 --- a/toontown/effects/SkullFlash.py +++ b/toontown/effects/SkullFlash.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.showbase.DirectObject import * from direct.interval.IntervalGlobal import * from .PooledEffect import PooledEffect diff --git a/toontown/effects/Sparks.py b/toontown/effects/Sparks.py index 2b662db..211ed0e 100644 --- a/toontown/effects/Sparks.py +++ b/toontown/effects/Sparks.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.particles import ParticleEffect from direct.directnotify import DirectNotifyGlobal import os diff --git a/toontown/effects/SparksTrail.py b/toontown/effects/SparksTrail.py index f00095a..35323fb 100644 --- a/toontown/effects/SparksTrail.py +++ b/toontown/effects/SparksTrail.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.interval.IntervalGlobal import * from direct.particles import ParticleEffect, Particles, ForceGroup from .PooledEffect import PooledEffect diff --git a/toontown/effects/SparksTrailLong.py b/toontown/effects/SparksTrailLong.py index b4867b3..b16fa58 100644 --- a/toontown/effects/SparksTrailLong.py +++ b/toontown/effects/SparksTrailLong.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.interval.IntervalGlobal import * from direct.particles import ParticleEffect, Particles, ForceGroup from .PooledEffect import PooledEffect diff --git a/toontown/effects/Splash.py b/toontown/effects/Splash.py index 6f74c84..bd34382 100644 --- a/toontown/effects/Splash.py +++ b/toontown/effects/Splash.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.interval.IntervalGlobal import * from .Ripples import * from toontown.battle.BattleProps import globalPropPool diff --git a/toontown/effects/StarBurst.py b/toontown/effects/StarBurst.py index 91598cb..e37ac57 100644 --- a/toontown/effects/StarBurst.py +++ b/toontown/effects/StarBurst.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.interval.IntervalGlobal import * from direct.particles import ParticleEffect, Particles, ForceGroup from .EffectController import EffectController diff --git a/toontown/effects/TrailExplosion.py b/toontown/effects/TrailExplosion.py index 8a3ca28..06e126e 100644 --- a/toontown/effects/TrailExplosion.py +++ b/toontown/effects/TrailExplosion.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.interval.IntervalGlobal import * from .EffectController import EffectController from .PooledEffect import PooledEffect diff --git a/toontown/effects/Wake.py b/toontown/effects/Wake.py index c6a2f4f..6ee5b39 100644 --- a/toontown/effects/Wake.py +++ b/toontown/effects/Wake.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.interval.IntervalGlobal import * from toontown.battle.BattleProps import globalPropPool diff --git a/toontown/estate/BankGUI.py b/toontown/estate/BankGUI.py index 6aa88c0..490b61f 100644 --- a/toontown/estate/BankGUI.py +++ b/toontown/estate/BankGUI.py @@ -1,5 +1,5 @@ from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from direct.directnotify import DirectNotifyGlobal from toontown.toonbase import ToontownGlobals from toontown.toonbase import TTLocalizer diff --git a/toontown/estate/BeanRecipeGui.py b/toontown/estate/BeanRecipeGui.py index 6f5406e..be4d07f 100644 --- a/toontown/estate/BeanRecipeGui.py +++ b/toontown/estate/BeanRecipeGui.py @@ -1,6 +1,6 @@ from direct.gui.DirectGui import * from direct.directnotify import DirectNotifyGlobal -from pandac.PandaModules import * +from panda3d.core import * from toontown.estate import GardenGlobals from toontown.estate import PlantingGUI from toontown.toonbase import TTLocalizer diff --git a/toontown/estate/ClosetGUI.py b/toontown/estate/ClosetGUI.py index 955ba21..1287d30 100644 --- a/toontown/estate/ClosetGUI.py +++ b/toontown/estate/ClosetGUI.py @@ -1,6 +1,6 @@ from direct.showbase.PythonUtil import Functor from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from toontown.makeatoon import ClothesGUI from . import ClosetGlobals from toontown.toonbase import TTLocalizer diff --git a/toontown/estate/DistributedAnimatedStatuary.py b/toontown/estate/DistributedAnimatedStatuary.py index 8e4d749..1b9936d 100644 --- a/toontown/estate/DistributedAnimatedStatuary.py +++ b/toontown/estate/DistributedAnimatedStatuary.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import NodePath +from panda3d.core import NodePath from direct.directnotify import DirectNotifyGlobal from toontown.toonbase import ToontownGlobals from toontown.estate import DistributedStatuary diff --git a/toontown/estate/DistributedBank.py b/toontown/estate/DistributedBank.py index d2d8103..357e574 100644 --- a/toontown/estate/DistributedBank.py +++ b/toontown/estate/DistributedBank.py @@ -1,8 +1,8 @@ from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase.ToontownGlobals import * from toontown.toonbase.ToonBaseGlobal import * -from pandac.PandaModules import * +from panda3d.core import * from direct.interval.IntervalGlobal import * from direct.distributed.ClockDelta import * from toontown.toonbase import ToontownGlobals diff --git a/toontown/estate/DistributedCannon.py b/toontown/estate/DistributedCannon.py index 39901bd..12b07ab 100644 --- a/toontown/estate/DistributedCannon.py +++ b/toontown/estate/DistributedCannon.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase.ToonBaseGlobal import * from toontown.toonbase import ToontownGlobals from direct.distributed.ClockDelta import * @@ -16,7 +16,7 @@ from toontown.effects import DustCloud from toontown.minigame import CannonGameGlobals from . import CannonGlobals from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase import TTLocalizer from direct.distributed import DistributedObject from toontown.effects import Wake diff --git a/toontown/estate/DistributedChangingStatuary.py b/toontown/estate/DistributedChangingStatuary.py index 5a57289..233d6aa 100644 --- a/toontown/estate/DistributedChangingStatuary.py +++ b/toontown/estate/DistributedChangingStatuary.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import NodePath +from panda3d.core import NodePath from direct.directnotify import DirectNotifyGlobal from toontown.toonbase import ToontownGlobals from toontown.estate import DistributedStatuary diff --git a/toontown/estate/DistributedCloset.py b/toontown/estate/DistributedCloset.py index 21ed2a6..b8da80b 100644 --- a/toontown/estate/DistributedCloset.py +++ b/toontown/estate/DistributedCloset.py @@ -1,8 +1,8 @@ from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase.ToontownGlobals import * from toontown.toonbase.ToonBaseGlobal import * -from pandac.PandaModules import * +from panda3d.core import * from direct.interval.IntervalGlobal import * from direct.distributed.ClockDelta import * from toontown.toonbase import ToontownGlobals diff --git a/toontown/estate/DistributedEstate.py b/toontown/estate/DistributedEstate.py index bc98e3e..3ae4661 100644 --- a/toontown/estate/DistributedEstate.py +++ b/toontown/estate/DistributedEstate.py @@ -1,7 +1,7 @@ -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase.ToonBaseGlobal import * from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from direct.distributed.ClockDelta import * from direct.interval.IntervalGlobal import * import math diff --git a/toontown/estate/DistributedFireworksCannon.py b/toontown/estate/DistributedFireworksCannon.py index 94287be..402f0b9 100644 --- a/toontown/estate/DistributedFireworksCannon.py +++ b/toontown/estate/DistributedFireworksCannon.py @@ -5,8 +5,8 @@ from .HouseGlobals import * from toontown.effects import DistributedFireworkShow from toontown.toonbase import ToontownGlobals from toontown.toonbase import TTLocalizer -from pandac.PandaModules import CollisionSphere -from pandac.PandaModules import CollisionNode +from panda3d.core import CollisionSphere +from panda3d.core import CollisionNode from . import FireworksGui class DistributedFireworksCannon(DistributedFireworkShow.DistributedFireworkShow): diff --git a/toontown/estate/DistributedGagTree.py b/toontown/estate/DistributedGagTree.py index 0226374..0f8d65e 100644 --- a/toontown/estate/DistributedGagTree.py +++ b/toontown/estate/DistributedGagTree.py @@ -9,7 +9,7 @@ from toontown.toonbase import TTLocalizer from . import GardenGlobals from . import HouseGlobals from direct.task import Task -from pandac.PandaModules import * +from panda3d.core import * from otp.otpbase import OTPGlobals from toontown.estate import DistributedLawnDecor DIRT_AS_WATER_INDICATOR = True diff --git a/toontown/estate/DistributedGarden.py b/toontown/estate/DistributedGarden.py index 2fa6f04..db02cd5 100644 --- a/toontown/estate/DistributedGarden.py +++ b/toontown/estate/DistributedGarden.py @@ -1,7 +1,7 @@ -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase.ToonBaseGlobal import * from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from direct.distributed.ClockDelta import * from toontown.toonbase import ToontownGlobals from direct.distributed import DistributedObject diff --git a/toontown/estate/DistributedGardenBox.py b/toontown/estate/DistributedGardenBox.py index 57b4247..1be06b7 100644 --- a/toontown/estate/DistributedGardenBox.py +++ b/toontown/estate/DistributedGardenBox.py @@ -6,8 +6,8 @@ from toontown.toonbase import TTLocalizer from toontown.estate import PlantingGUI from toontown.estate import PlantTreeGUI from direct.distributed import DistributedNode -from pandac.PandaModules import NodePath -from pandac.PandaModules import Vec3 +from panda3d.core import NodePath +from panda3d.core import Vec3 class DistributedGardenBox(DistributedLawnDecor.DistributedLawnDecor): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedGardenPlot') diff --git a/toontown/estate/DistributedGardenPlot.py b/toontown/estate/DistributedGardenPlot.py index 9b7bead..cd39b40 100644 --- a/toontown/estate/DistributedGardenPlot.py +++ b/toontown/estate/DistributedGardenPlot.py @@ -8,8 +8,8 @@ from toontown.estate import PlantingGUI from toontown.estate import PlantTreeGUI from toontown.estate import ToonStatueSelectionGUI from toontown.toontowngui import TTDialog -from pandac.PandaModules import Vec4 -from pandac.PandaModules import NodePath +from panda3d.core import Vec4 +from panda3d.core import NodePath import types class DistributedGardenPlot(DistributedLawnDecor.DistributedLawnDecor): diff --git a/toontown/estate/DistributedHouse.py b/toontown/estate/DistributedHouse.py index f4a0109..6856058 100644 --- a/toontown/estate/DistributedHouse.py +++ b/toontown/estate/DistributedHouse.py @@ -1,7 +1,7 @@ -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase.ToonBaseGlobal import * from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from direct.distributed.ClockDelta import * from toontown.minigame.OrthoWalk import * from string import * diff --git a/toontown/estate/DistributedHouseDoor.py b/toontown/estate/DistributedHouseDoor.py index 2823361..65a74f0 100644 --- a/toontown/estate/DistributedHouseDoor.py +++ b/toontown/estate/DistributedHouseDoor.py @@ -1,5 +1,5 @@ from toontown.toonbase.ToonBaseGlobal import * -from pandac.PandaModules import * +from panda3d.core import * from direct.interval.IntervalGlobal import * from direct.distributed.ClockDelta import * from direct.distributed import DistributedObject diff --git a/toontown/estate/DistributedHouseInterior.py b/toontown/estate/DistributedHouseInterior.py index acb9c3c..7454fbc 100644 --- a/toontown/estate/DistributedHouseInterior.py +++ b/toontown/estate/DistributedHouseInterior.py @@ -1,6 +1,6 @@ from toontown.toonbase.ToontownGlobals import * from toontown.toonbase.ToonBaseGlobal import * -from pandac.PandaModules import * +from panda3d.core import * from direct.interval.IntervalGlobal import * from direct.distributed.ClockDelta import * from direct.directnotify import DirectNotifyGlobal diff --git a/toontown/estate/DistributedLawnDecor.py b/toontown/estate/DistributedLawnDecor.py index 88734fc..7575926 100644 --- a/toontown/estate/DistributedLawnDecor.py +++ b/toontown/estate/DistributedLawnDecor.py @@ -1,10 +1,10 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.interval.IntervalGlobal import * from direct.distributed import ClockDelta from direct.showbase.PythonUtil import lerp import math from direct.directnotify import DirectNotifyGlobal -from pandac.PandaModules import NodePath +from panda3d.core import NodePath from direct.task import Task from toontown.toonbase import ToontownGlobals from direct.distributed import DistributedObject diff --git a/toontown/estate/DistributedMailbox.py b/toontown/estate/DistributedMailbox.py index 9585a40..a82d763 100644 --- a/toontown/estate/DistributedMailbox.py +++ b/toontown/estate/DistributedMailbox.py @@ -8,7 +8,7 @@ from toontown.toonbase import TTLocalizer from toontown.catalog import MailboxScreen from direct.directnotify.DirectNotifyGlobal import * from direct.distributed.ClockDelta import * -from pandac.PandaModules import * +from panda3d.core import * import random from direct.interval.IntervalGlobal import SoundInterval FlagPitchEmpty = -70 diff --git a/toontown/estate/DistributedPhone.py b/toontown/estate/DistributedPhone.py index c4782ca..bcf9bee 100644 --- a/toontown/estate/DistributedPhone.py +++ b/toontown/estate/DistributedPhone.py @@ -11,7 +11,7 @@ from direct.distributed import ClockDelta from direct.showbase import PythonUtil from direct.showutil import Rope from direct.directnotify.DirectNotifyGlobal import * -from pandac.PandaModules import * +from panda3d.core import * from direct.interval.IntervalGlobal import * import string from toontown.quest import Quests diff --git a/toontown/estate/DistributedStatuary.py b/toontown/estate/DistributedStatuary.py index ddad537..2b6493c 100644 --- a/toontown/estate/DistributedStatuary.py +++ b/toontown/estate/DistributedStatuary.py @@ -6,8 +6,8 @@ from toontown.toonbase import TTLocalizer from toontown.toonbase import ToontownGlobals from toontown.toontowngui import TTDialog from toontown.toonbase import TTLocalizer -from pandac.PandaModules import NodePath -from pandac.PandaModules import Point3 +from panda3d.core import NodePath +from panda3d.core import Point3 class DistributedStatuary(DistributedLawnDecor.DistributedLawnDecor): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedStatuary') diff --git a/toontown/estate/DistributedTarget.py b/toontown/estate/DistributedTarget.py index c27592f..fc9d7ef 100644 --- a/toontown/estate/DistributedTarget.py +++ b/toontown/estate/DistributedTarget.py @@ -1,6 +1,6 @@ from direct.gui.DirectGui import * -from pandac.PandaModules import * -from pandac.PandaModules import * +from panda3d.core import * +from panda3d.core import * from direct.interval.IntervalGlobal import * from toontown.toonbase.ToontownGlobals import * from toontown.toonbase import ToontownTimer diff --git a/toontown/estate/DistributedToonStatuary.py b/toontown/estate/DistributedToonStatuary.py index c3e5264..c89989d 100644 --- a/toontown/estate/DistributedToonStatuary.py +++ b/toontown/estate/DistributedToonStatuary.py @@ -2,14 +2,14 @@ from toontown.estate import DistributedStatuary from toontown.estate import DistributedLawnDecor from direct.directnotify import DirectNotifyGlobal from direct.showbase.ShowBase import * -from pandac.PandaModules import * +from panda3d.core import * from toontown.toon import Toon from toontown.toon import ToonDNA from . import GardenGlobals from toontown.toonbase import TTLocalizer from toontown.toonbase import ToontownGlobals -from pandac.PandaModules import NodePath -from pandac.PandaModules import Point3 +from panda3d.core import NodePath +from panda3d.core import Point3 def dnaCodeFromToonDNA(dna): diff --git a/toontown/estate/DistributedTrunk.py b/toontown/estate/DistributedTrunk.py index ed081a8..a90d882 100644 --- a/toontown/estate/DistributedTrunk.py +++ b/toontown/estate/DistributedTrunk.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.gui.DirectGui import * from direct.task.Task import Task from direct.interval.IntervalGlobal import * diff --git a/toontown/estate/Estate.py b/toontown/estate/Estate.py index 9f6e979..cec60b3 100644 --- a/toontown/estate/Estate.py +++ b/toontown/estate/Estate.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.interval.IntervalGlobal import * from toontown.toonbase.ToonBaseGlobal import * from toontown.toonbase.ToontownGlobals import * diff --git a/toontown/estate/EstateLoader.py b/toontown/estate/EstateLoader.py index a790976..f57d5c9 100644 --- a/toontown/estate/EstateLoader.py +++ b/toontown/estate/EstateLoader.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase.ToontownGlobals import * from direct.interval.IntervalGlobal import * from direct.fsm import ClassicFSM, State diff --git a/toontown/estate/EstateManager.py b/toontown/estate/EstateManager.py index 4b809bb..a3719c2 100644 --- a/toontown/estate/EstateManager.py +++ b/toontown/estate/EstateManager.py @@ -1,10 +1,10 @@ -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase import ToontownGlobals from direct.distributed import DistributedObject from direct.directnotify import DirectNotifyGlobal import random from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase import TTLocalizer from . import HouseGlobals from . import Estate diff --git a/toontown/estate/FireworkItemPanel.py b/toontown/estate/FireworkItemPanel.py index 26dca1d..1887cae 100644 --- a/toontown/estate/FireworkItemPanel.py +++ b/toontown/estate/FireworkItemPanel.py @@ -1,5 +1,5 @@ from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase import ToontownGlobals from toontown.toonbase import TTLocalizer from toontown.effects import FireworkGlobals diff --git a/toontown/estate/FireworksGui.py b/toontown/estate/FireworksGui.py index c150018..40cb57c 100644 --- a/toontown/estate/FireworksGui.py +++ b/toontown/estate/FireworksGui.py @@ -1,5 +1,5 @@ from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from direct.gui.DirectScrolledList import * from toontown.toonbase import ToontownGlobals from . import FireworkItemPanel diff --git a/toontown/estate/FlowerBrowser.py b/toontown/estate/FlowerBrowser.py index edaf213..00213fe 100644 --- a/toontown/estate/FlowerBrowser.py +++ b/toontown/estate/FlowerBrowser.py @@ -1,7 +1,7 @@ from toontown.toonbase import ToontownGlobals from direct.directnotify import DirectNotifyGlobal from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase import TTLocalizer from . import FlowerSpeciesPanel from . import GardenGlobals diff --git a/toontown/estate/FlowerPanel.py b/toontown/estate/FlowerPanel.py index 30e978f..1830656 100644 --- a/toontown/estate/FlowerPanel.py +++ b/toontown/estate/FlowerPanel.py @@ -1,7 +1,7 @@ from toontown.toonbase import ToontownGlobals from direct.directnotify import DirectNotifyGlobal from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase import TTLocalizer from direct.interval.IntervalGlobal import * from . import GardenGlobals diff --git a/toontown/estate/FlowerPhoto.py b/toontown/estate/FlowerPhoto.py index 8ed6803..a49034e 100644 --- a/toontown/estate/FlowerPhoto.py +++ b/toontown/estate/FlowerPhoto.py @@ -1,5 +1,5 @@ from direct.directnotify import DirectNotifyGlobal -from pandac.PandaModules import * +from panda3d.core import * from direct.interval.IntervalGlobal import * from toontown.fishing import FishGlobals from . import GardenGlobals diff --git a/toontown/estate/FlowerPicker.py b/toontown/estate/FlowerPicker.py index 999433b..8f4474e 100644 --- a/toontown/estate/FlowerPicker.py +++ b/toontown/estate/FlowerPicker.py @@ -1,7 +1,7 @@ from toontown.toonbase import ToontownGlobals from direct.directnotify import DirectNotifyGlobal from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase import TTLocalizer from . import FlowerPanel diff --git a/toontown/estate/FlowerSellGUI.py b/toontown/estate/FlowerSellGUI.py index ad48c79..3ebf1f0 100644 --- a/toontown/estate/FlowerSellGUI.py +++ b/toontown/estate/FlowerSellGUI.py @@ -1,5 +1,5 @@ from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from direct.directnotify import DirectNotifyGlobal from toontown.toonbase import ToontownGlobals from toontown.toonbase import TTLocalizer diff --git a/toontown/estate/FlowerSpeciesPanel.py b/toontown/estate/FlowerSpeciesPanel.py index 9c9bd24..4ffedc7 100644 --- a/toontown/estate/FlowerSpeciesPanel.py +++ b/toontown/estate/FlowerSpeciesPanel.py @@ -1,7 +1,7 @@ from toontown.toonbase import ToontownGlobals from direct.directnotify import DirectNotifyGlobal from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase import TTLocalizer from . import GardenGlobals from . import FlowerPhoto diff --git a/toontown/estate/GardenDropGame.py b/toontown/estate/GardenDropGame.py index 88b1d3b..ed9f72b 100644 --- a/toontown/estate/GardenDropGame.py +++ b/toontown/estate/GardenDropGame.py @@ -1,7 +1,7 @@ -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase.ToonBaseGlobal import * from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from direct.gui.DirectScrolledList import * from direct.distributed.ClockDelta import * from toontown.toontowngui import TTDialog diff --git a/toontown/estate/GardenProgressMeter.py b/toontown/estate/GardenProgressMeter.py index 56d299a..5c67898 100644 --- a/toontown/estate/GardenProgressMeter.py +++ b/toontown/estate/GardenProgressMeter.py @@ -1,7 +1,7 @@ -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase.ToonBaseGlobal import * from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from direct.gui.DirectScrolledList import * from direct.distributed.ClockDelta import * from toontown.toontowngui import TTDialog diff --git a/toontown/estate/GardenTutorial.py b/toontown/estate/GardenTutorial.py index fc0eff4..1659b16 100644 --- a/toontown/estate/GardenTutorial.py +++ b/toontown/estate/GardenTutorial.py @@ -3,7 +3,7 @@ from direct.fsm import FSM from direct.directnotify import DirectNotifyGlobal from toontown.toonbase import ToontownGlobals from toontown.toonbase import TTLocalizer -from pandac.PandaModules import * +from panda3d.core import * class GardenTutorial(DirectFrame, FSM.FSM): notify = DirectNotifyGlobal.directNotify.newCategory('GardenTutorial') diff --git a/toontown/estate/House.py b/toontown/estate/House.py index 20ef593..4e90aa3 100644 --- a/toontown/estate/House.py +++ b/toontown/estate/House.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase.ToonBaseGlobal import * from direct.directnotify import DirectNotifyGlobal from toontown.hood import Place diff --git a/toontown/estate/PlantingGUI.py b/toontown/estate/PlantingGUI.py index 9a1908e..12e3f1d 100644 --- a/toontown/estate/PlantingGUI.py +++ b/toontown/estate/PlantingGUI.py @@ -1,5 +1,5 @@ from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from direct.directnotify import DirectNotifyGlobal from toontown.toonbase import ToontownGlobals from toontown.toonbase import TTLocalizer diff --git a/toontown/estate/SpecialsPhoto.py b/toontown/estate/SpecialsPhoto.py index 01fd7a8..c3caa51 100644 --- a/toontown/estate/SpecialsPhoto.py +++ b/toontown/estate/SpecialsPhoto.py @@ -1,5 +1,5 @@ from direct.directnotify import DirectNotifyGlobal -from pandac.PandaModules import * +from panda3d.core import * from direct.interval.IntervalGlobal import * from toontown.fishing import FishGlobals from . import GardenGlobals diff --git a/toontown/estate/ToonStatueSelectionGUI.py b/toontown/estate/ToonStatueSelectionGUI.py index 589bbd5..f352a3b 100644 --- a/toontown/estate/ToonStatueSelectionGUI.py +++ b/toontown/estate/ToonStatueSelectionGUI.py @@ -1,6 +1,6 @@ from toontown.estate import PlantingGUI from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from direct.directnotify import DirectNotifyGlobal from toontown.toonbase import ToontownGlobals from toontown.toonbase import TTLocalizer diff --git a/toontown/estate/TrunkGUI.py b/toontown/estate/TrunkGUI.py index eedce9d..9332b57 100644 --- a/toontown/estate/TrunkGUI.py +++ b/toontown/estate/TrunkGUI.py @@ -1,6 +1,6 @@ from direct.showbase.PythonUtil import Functor from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from direct.distributed import ClockDelta from direct.fsm import StateData from direct.task.Task import Task diff --git a/toontown/estate/houseDesign.py b/toontown/estate/houseDesign.py index f20801b..162da33 100644 --- a/toontown/estate/houseDesign.py +++ b/toontown/estate/houseDesign.py @@ -2,7 +2,7 @@ from direct.directtools.DirectSelection import * from direct.directtools.DirectUtil import ROUND_TO from direct.directtools.DirectGeometry import LineNodePath from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from direct.showbase.DirectObject import DirectObject from toontown.toonbase import ToontownGlobals from direct.directnotify import DirectNotifyGlobal diff --git a/toontown/fishing/BingoCardCell.py b/toontown/fishing/BingoCardCell.py index 81b5ce3..1a0196f 100644 --- a/toontown/fishing/BingoCardCell.py +++ b/toontown/fishing/BingoCardCell.py @@ -1,6 +1,6 @@ from direct.fsm import FSM from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from direct.directnotify import DirectNotifyGlobal from direct.interval.IntervalGlobal import * from toontown.toonbase import ToontownGlobals diff --git a/toontown/fishing/BingoCardGui.py b/toontown/fishing/BingoCardGui.py index 9739a57..b289d55 100644 --- a/toontown/fishing/BingoCardGui.py +++ b/toontown/fishing/BingoCardGui.py @@ -1,6 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from direct.task import Task import random from toontown.fishing import BingoCardCell diff --git a/toontown/fishing/DistributedFishingPond.py b/toontown/fishing/DistributedFishingPond.py index 026e974..c537115 100644 --- a/toontown/fishing/DistributedFishingPond.py +++ b/toontown/fishing/DistributedFishingPond.py @@ -4,7 +4,7 @@ from toontown.toonbase import ToontownGlobals from toontown.toonbase import TTLocalizer from . import FishGlobals from toontown.fishing import DistributedPondBingoManager -from pandac.PandaModules import Vec3 +from panda3d.core import Vec3 from direct.task import Task class DistributedFishingPond(DistributedObject.DistributedObject): diff --git a/toontown/fishing/DistributedFishingTarget.py b/toontown/fishing/DistributedFishingTarget.py index c89f49d..b534f98 100644 --- a/toontown/fishing/DistributedFishingTarget.py +++ b/toontown/fishing/DistributedFishingTarget.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.distributed.ClockDelta import * from direct.interval.IntervalGlobal import * from direct.directnotify import DirectNotifyGlobal diff --git a/toontown/fishing/DistributedPondBingoManager.py b/toontown/fishing/DistributedPondBingoManager.py index 2a9247c..a9c62a3 100644 --- a/toontown/fishing/DistributedPondBingoManager.py +++ b/toontown/fishing/DistributedPondBingoManager.py @@ -3,7 +3,7 @@ from direct.distributed.ClockDelta import * from direct.directnotify import DirectNotifyGlobal from direct.fsm import FSM from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from direct.task import Task from toontown.fishing import BingoGlobals from toontown.fishing import BingoCardGui diff --git a/toontown/fishing/FishBrowser.py b/toontown/fishing/FishBrowser.py index 226e080..04e012c 100644 --- a/toontown/fishing/FishBrowser.py +++ b/toontown/fishing/FishBrowser.py @@ -1,7 +1,7 @@ from toontown.toonbase import ToontownGlobals from direct.directnotify import DirectNotifyGlobal from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase import TTLocalizer from . import GenusPanel from . import FishGlobals diff --git a/toontown/fishing/FishPanel.py b/toontown/fishing/FishPanel.py index 63450f1..f31fe5d 100644 --- a/toontown/fishing/FishPanel.py +++ b/toontown/fishing/FishPanel.py @@ -1,7 +1,7 @@ from toontown.toonbase import ToontownGlobals from direct.directnotify import DirectNotifyGlobal from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase import TTLocalizer from direct.interval.IntervalGlobal import * from . import FishGlobals diff --git a/toontown/fishing/FishPhoto.py b/toontown/fishing/FishPhoto.py index c4c053d..eee77ac 100644 --- a/toontown/fishing/FishPhoto.py +++ b/toontown/fishing/FishPhoto.py @@ -1,5 +1,5 @@ from direct.directnotify import DirectNotifyGlobal -from pandac.PandaModules import * +from panda3d.core import * from direct.interval.IntervalGlobal import * from . import FishGlobals diff --git a/toontown/fishing/FishPicker.py b/toontown/fishing/FishPicker.py index a8766ea..8e06f95 100644 --- a/toontown/fishing/FishPicker.py +++ b/toontown/fishing/FishPicker.py @@ -1,7 +1,7 @@ from toontown.toonbase import ToontownGlobals from direct.directnotify import DirectNotifyGlobal from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase import TTLocalizer from . import FishPanel diff --git a/toontown/fishing/FishSellGUI.py b/toontown/fishing/FishSellGUI.py index bbb2dab..efe8862 100644 --- a/toontown/fishing/FishSellGUI.py +++ b/toontown/fishing/FishSellGUI.py @@ -1,5 +1,5 @@ from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from direct.directnotify import DirectNotifyGlobal from toontown.toonbase import ToontownGlobals from toontown.toonbase import TTLocalizer diff --git a/toontown/fishing/GenusPanel.py b/toontown/fishing/GenusPanel.py index 4d2b074..7f1f65d 100644 --- a/toontown/fishing/GenusPanel.py +++ b/toontown/fishing/GenusPanel.py @@ -1,7 +1,7 @@ from toontown.toonbase import ToontownGlobals from direct.directnotify import DirectNotifyGlobal from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase import TTLocalizer from . import FishBase from . import FishGlobals diff --git a/toontown/friends/FriendInvitee.py b/toontown/friends/FriendInvitee.py index 5093645..ce3dc21 100644 --- a/toontown/friends/FriendInvitee.py +++ b/toontown/friends/FriendInvitee.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase.ToontownGlobals import * from direct.showbase import DirectObject from direct.directnotify import DirectNotifyGlobal diff --git a/toontown/friends/FriendInviter.py b/toontown/friends/FriendInviter.py index b2242fe..1909e9c 100644 --- a/toontown/friends/FriendInviter.py +++ b/toontown/friends/FriendInviter.py @@ -1,8 +1,8 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.task.Task import Task from toontown.toonbase.ToontownGlobals import * from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from direct.showbase import DirectObject from direct.fsm import ClassicFSM, State from direct.fsm import State diff --git a/toontown/friends/FriendNotifier.py b/toontown/friends/FriendNotifier.py index 8510f98..fbb1fd5 100644 --- a/toontown/friends/FriendNotifier.py +++ b/toontown/friends/FriendNotifier.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase.ToontownGlobals import * from direct.showbase import DirectObject from direct.directnotify import DirectNotifyGlobal diff --git a/toontown/friends/FriendsListManager.py b/toontown/friends/FriendsListManager.py index ed04311..c7c521a 100644 --- a/toontown/friends/FriendsListManager.py +++ b/toontown/friends/FriendsListManager.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from panda3d.otp import * from . import FriendsListPanel from . import FriendInviter diff --git a/toontown/friends/FriendsListPanel.py b/toontown/friends/FriendsListPanel.py index c90ab66..24b79f2 100644 --- a/toontown/friends/FriendsListPanel.py +++ b/toontown/friends/FriendsListPanel.py @@ -1,6 +1,6 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from direct.fsm import StateData from toontown.toon import ToonAvatarPanel from toontown.friends import ToontownFriendSecret diff --git a/toontown/friends/ToontownFriendSecret.py b/toontown/friends/ToontownFriendSecret.py index 647ab7f..491a7ce 100644 --- a/toontown/friends/ToontownFriendSecret.py +++ b/toontown/friends/ToontownFriendSecret.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.gui.DirectGui import * from direct.directnotify import DirectNotifyGlobal from otp.otpbase import OTPLocalizer diff --git a/toontown/golf/BuildGeometry.py b/toontown/golf/BuildGeometry.py index f973f7a..480c334 100644 --- a/toontown/golf/BuildGeometry.py +++ b/toontown/golf/BuildGeometry.py @@ -1,7 +1,7 @@ from direct.distributed import DistributedObject from direct.directnotify import DirectNotifyGlobal from toontown.toonbase import ToontownGlobals -from pandac.PandaModules import * +from panda3d.core import * from math import * import math GEO_ID = 0 diff --git a/toontown/golf/DistributedGolfCourse.py b/toontown/golf/DistributedGolfCourse.py index 6ee34e5..6c2f49f 100644 --- a/toontown/golf/DistributedGolfCourse.py +++ b/toontown/golf/DistributedGolfCourse.py @@ -7,7 +7,7 @@ from toontown.distributed import DelayDelete from toontown.distributed.DelayDeletable import DelayDeletable from toontown.toonbase import ToontownGlobals from toontown.toonbase import TTLocalizer -from pandac.PandaModules import * +from panda3d.core import * from direct.gui.DirectGui import * from direct.distributed.ClockDelta import * from direct.fsm.FSM import FSM diff --git a/toontown/golf/DistributedGolfCourseAI.py b/toontown/golf/DistributedGolfCourseAI.py index eb6dbd5..e7342a7 100644 --- a/toontown/golf/DistributedGolfCourseAI.py +++ b/toontown/golf/DistributedGolfCourseAI.py @@ -2,7 +2,7 @@ from direct.distributed import DistributedObjectAI from direct.directnotify import DirectNotifyGlobal from toontown.toonbase import ToontownGlobals from toontown.golf import DistributedGolfHoleAI -from pandac.PandaModules import * +from panda3d.core import * from direct.fsm.FSM import FSM from toontown.ai.ToonBarrier import * from toontown.golf import GolfGlobals diff --git a/toontown/golf/DistributedGolfHole.py b/toontown/golf/DistributedGolfHole.py index 9cbb809..b39f00b 100644 --- a/toontown/golf/DistributedGolfHole.py +++ b/toontown/golf/DistributedGolfHole.py @@ -1,7 +1,8 @@ import math import random import time -from pandac.PandaModules import TextNode, BitMask32, Point3, Vec3, Vec4, deg2Rad, Mat3, NodePath, VBase4, OdeTriMeshData, OdeTriMeshGeom, OdeRayGeom, CollisionTraverser, CollisionSegment, CollisionNode, CollisionHandlerQueue +from panda3d.core import TextNode, BitMask32, Point3, Vec3, Vec4, deg2Rad, Mat3, NodePath, VBase4, CollisionTraverser, CollisionSegment, CollisionNode, CollisionHandlerQueue +from panda3d.ode import OdeRayGeom from direct.distributed import DistributedObject from direct.directnotify import DirectNotifyGlobal from otp.otpbase import OTPGlobals diff --git a/toontown/golf/DistributedGolfHoleAI.py b/toontown/golf/DistributedGolfHoleAI.py index 41206a9..30c525e 100644 --- a/toontown/golf/DistributedGolfHoleAI.py +++ b/toontown/golf/DistributedGolfHoleAI.py @@ -1,7 +1,7 @@ from direct.distributed import DistributedObjectAI from direct.directnotify import DirectNotifyGlobal from toontown.toonbase import ToontownGlobals -from pandac.PandaModules import * +from panda3d.core import * from . import DistributedPhysicsWorldAI from direct.fsm.FSM import FSM from toontown.ai.ToonBarrier import * diff --git a/toontown/golf/DistributedPhysicsWorld.py b/toontown/golf/DistributedPhysicsWorld.py index 08e5180..a3ad974 100644 --- a/toontown/golf/DistributedPhysicsWorld.py +++ b/toontown/golf/DistributedPhysicsWorld.py @@ -1,7 +1,7 @@ from direct.distributed import DistributedObject from direct.directnotify import DirectNotifyGlobal from toontown.toonbase import ToontownGlobals -from pandac.PandaModules import * +from panda3d.core import * from math import * import math from direct.fsm.FSM import FSM diff --git a/toontown/golf/DistributedPhysicsWorldAI.py b/toontown/golf/DistributedPhysicsWorldAI.py index e602dab..857e663 100644 --- a/toontown/golf/DistributedPhysicsWorldAI.py +++ b/toontown/golf/DistributedPhysicsWorldAI.py @@ -1,7 +1,7 @@ from direct.distributed import DistributedObjectAI from direct.directnotify import DirectNotifyGlobal from toontown.toonbase import ToontownGlobals -from pandac.PandaModules import * +from panda3d.core import * from . import BuildGeometry import random, time from math import * diff --git a/toontown/golf/GolfHoleBase.py b/toontown/golf/GolfHoleBase.py index 85eff7f..3de8ed8 100644 --- a/toontown/golf/GolfHoleBase.py +++ b/toontown/golf/GolfHoleBase.py @@ -1,7 +1,7 @@ from direct.distributed import DistributedObjectAI from direct.directnotify import DirectNotifyGlobal from toontown.toonbase import ToontownGlobals -from pandac.PandaModules import * +from panda3d.core import * from . import DistributedPhysicsWorldAI from direct.fsm.FSM import FSM from toontown.ai.ToonBarrier import * diff --git a/toontown/golf/GolfManagerAI.py b/toontown/golf/GolfManagerAI.py index f0c6632..3995485 100644 --- a/toontown/golf/GolfManagerAI.py +++ b/toontown/golf/GolfManagerAI.py @@ -3,7 +3,7 @@ from direct.showbase import DirectObject from direct.directnotify import DirectNotifyGlobal from toontown.toonbase import ToontownGlobals from toontown.golf import DistributedGolfCourseAI -from pandac.PandaModules import * +from panda3d.core import * RequestHole = {} def GolfManagerAI(): diff --git a/toontown/golf/GolfRewardDialog.py b/toontown/golf/GolfRewardDialog.py index 2158651..bd90ba8 100644 --- a/toontown/golf/GolfRewardDialog.py +++ b/toontown/golf/GolfRewardDialog.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase.ToonBaseGlobal import * from direct.interval.IntervalGlobal import * from direct.task import Task diff --git a/toontown/golf/GolfScoreBoard.py b/toontown/golf/GolfScoreBoard.py index bc05b8a..2664b22 100644 --- a/toontown/golf/GolfScoreBoard.py +++ b/toontown/golf/GolfScoreBoard.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase.ToonBaseGlobal import * from direct.directnotify import DirectNotifyGlobal from direct.interval.IntervalGlobal import * @@ -6,7 +6,7 @@ from direct.task import Task from math import * from direct.distributed.ClockDelta import * from toontown.golf import GolfGlobals -from pandac.PandaModules import LineSegs +from panda3d.core import LineSegs AUTO_HIDE_TIMEOUT = 3 class GolfScoreBoard: diff --git a/toontown/golf/PhysicsWorldBase.py b/toontown/golf/PhysicsWorldBase.py index 5fb5c8c..aa45cfa 100644 --- a/toontown/golf/PhysicsWorldBase.py +++ b/toontown/golf/PhysicsWorldBase.py @@ -1,7 +1,7 @@ from direct.distributed import DistributedObject from direct.directnotify import DirectNotifyGlobal from toontown.toonbase import ToontownGlobals -from pandac.PandaModules import * +from panda3d.core import * from math import * import math from direct.fsm.FSM import FSM diff --git a/toontown/hood/BRHood.py b/toontown/hood/BRHood.py index 18aebfd..b5db747 100644 --- a/toontown/hood/BRHood.py +++ b/toontown/hood/BRHood.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from . import ToonHood from toontown.town import BRTownLoader from toontown.safezone import BRSafeZoneLoader diff --git a/toontown/hood/BossbotHQDataAI.py b/toontown/hood/BossbotHQDataAI.py index ad3a3fe..8299bdd 100644 --- a/toontown/hood/BossbotHQDataAI.py +++ b/toontown/hood/BossbotHQDataAI.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import Point3 +from panda3d.core import Point3 from direct.directnotify import DirectNotifyGlobal from . import HoodDataAI from toontown.toonbase import ToontownGlobals diff --git a/toontown/hood/CashbotHQ.py b/toontown/hood/CashbotHQ.py index 8d0e39c..6a83b1c 100644 --- a/toontown/hood/CashbotHQ.py +++ b/toontown/hood/CashbotHQ.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.directnotify import DirectNotifyGlobal from . import CogHood from toontown.toonbase import ToontownGlobals, TTLocalizer diff --git a/toontown/hood/DDHood.py b/toontown/hood/DDHood.py index 3009c06..473ec8d 100644 --- a/toontown/hood/DDHood.py +++ b/toontown/hood/DDHood.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from . import ToonHood from toontown.town import DDTownLoader from toontown.safezone import DDSafeZoneLoader diff --git a/toontown/hood/DGHood.py b/toontown/hood/DGHood.py index a1c5a9f..08cf157 100644 --- a/toontown/hood/DGHood.py +++ b/toontown/hood/DGHood.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from . import ToonHood from toontown.town import DGTownLoader from toontown.safezone import DGSafeZoneLoader diff --git a/toontown/hood/DLHood.py b/toontown/hood/DLHood.py index a6e574f..b76ae44 100644 --- a/toontown/hood/DLHood.py +++ b/toontown/hood/DLHood.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from . import ToonHood from toontown.town import DLTownLoader from toontown.safezone import DLSafeZoneLoader diff --git a/toontown/hood/EstateHood.py b/toontown/hood/EstateHood.py index 47d94d0..cc147b3 100644 --- a/toontown/hood/EstateHood.py +++ b/toontown/hood/EstateHood.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase.ToonBaseGlobal import * from toontown.toonbase.ToontownGlobals import * from toontown.distributed.ToontownMsgTypes import * diff --git a/toontown/hood/GSHood.py b/toontown/hood/GSHood.py index f30cead..9d046a3 100644 --- a/toontown/hood/GSHood.py +++ b/toontown/hood/GSHood.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from . import ToonHood from toontown.safezone import GSSafeZoneLoader from toontown.toonbase.ToontownGlobals import * diff --git a/toontown/hood/GSHoodDataAI.py b/toontown/hood/GSHoodDataAI.py index ea15ccc..4e126a4 100644 --- a/toontown/hood/GSHoodDataAI.py +++ b/toontown/hood/GSHoodDataAI.py @@ -2,7 +2,7 @@ from direct.directnotify import DirectNotifyGlobal from . import HoodDataAI, ZoneUtil from toontown.toonbase import ToontownGlobals from toontown.racing import DistributedStartingBlockAI -from pandac.PandaModules import * +from panda3d.core import * from panda3d.toontown import * from toontown.racing.RaceGlobals import * from toontown.classicchars import DistributedGoofySpeedwayAI diff --git a/toontown/hood/GZHood.py b/toontown/hood/GZHood.py index 37e36ed..a6bc6eb 100644 --- a/toontown/hood/GZHood.py +++ b/toontown/hood/GZHood.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from . import ToonHood from toontown.safezone import GZSafeZoneLoader from toontown.toonbase.ToontownGlobals import * diff --git a/toontown/hood/GZHoodDataAI.py b/toontown/hood/GZHoodDataAI.py index 6e8f756..e3f55cc 100644 --- a/toontown/hood/GZHoodDataAI.py +++ b/toontown/hood/GZHoodDataAI.py @@ -2,7 +2,7 @@ from direct.directnotify import DirectNotifyGlobal from . import HoodDataAI, ZoneUtil from toontown.toonbase import ToontownGlobals from toontown.racing import DistributedStartingBlockAI -from pandac.PandaModules import * +from panda3d.core import * from panda3d.toontown import * from toontown.racing.RaceGlobals import * from toontown.classicchars import DistributedGoofySpeedwayAI diff --git a/toontown/hood/Hood.py b/toontown/hood/Hood.py index da7a247..6872c50 100644 --- a/toontown/hood/Hood.py +++ b/toontown/hood/Hood.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase.ToonBaseGlobal import * from toontown.toonbase.ToontownGlobals import * from toontown.distributed.ToontownMsgTypes import * diff --git a/toontown/hood/HoodDataAI.py b/toontown/hood/HoodDataAI.py index 72d75d1..5b8cfb2 100644 --- a/toontown/hood/HoodDataAI.py +++ b/toontown/hood/HoodDataAI.py @@ -4,7 +4,7 @@ from toontown.building import DistributedBuildingMgrAI from toontown.suit import DistributedSuitPlannerAI from toontown.safezone import ButterflyGlobals from toontown.safezone import DistributedButterflyAI -from pandac.PandaModules import * +from panda3d.core import * from panda3d.toontown import * from toontown.toon import NPCToons diff --git a/toontown/hood/InteractiveAnimatedProp.py b/toontown/hood/InteractiveAnimatedProp.py index 34e35bb..4eb6bc7 100644 --- a/toontown/hood/InteractiveAnimatedProp.py +++ b/toontown/hood/InteractiveAnimatedProp.py @@ -5,7 +5,7 @@ from direct.actor import Actor from direct.interval.IntervalGlobal import Sequence, ActorInterval, Wait, Func, SoundInterval, Parallel from direct.fsm import FSM from direct.showbase.PythonUtil import weightedChoice -from pandac.PandaModules import TextNode, Vec3 +from panda3d.core import TextNode, Vec3 from toontown.toonbase import ToontownGlobals from toontown.hood import ZoneUtil diff --git a/toontown/hood/MMHood.py b/toontown/hood/MMHood.py index 31b26ae..4b31a1b 100644 --- a/toontown/hood/MMHood.py +++ b/toontown/hood/MMHood.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from . import ToonHood from toontown.town import MMTownLoader from toontown.safezone import MMSafeZoneLoader diff --git a/toontown/hood/OZHood.py b/toontown/hood/OZHood.py index f82fd3a..82f42f9 100644 --- a/toontown/hood/OZHood.py +++ b/toontown/hood/OZHood.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from . import ToonHood from toontown.safezone import OZSafeZoneLoader from toontown.toonbase.ToontownGlobals import * diff --git a/toontown/hood/OZHoodDataAI.py b/toontown/hood/OZHoodDataAI.py index 2371cbc..6d226bb 100644 --- a/toontown/hood/OZHoodDataAI.py +++ b/toontown/hood/OZHoodDataAI.py @@ -3,7 +3,7 @@ from . import HoodDataAI, ZoneUtil from toontown.toonbase import ToontownGlobals from toontown.safezone import OZTreasurePlannerAI from toontown.racing import DistributedStartingBlockAI -from pandac.PandaModules import * +from panda3d.core import * from panda3d.toontown import * from toontown.racing.RaceGlobals import * from toontown.classicchars import DistributedGoofySpeedwayAI diff --git a/toontown/hood/PartyHood.py b/toontown/hood/PartyHood.py index c5226a7..7b3887c 100644 --- a/toontown/hood/PartyHood.py +++ b/toontown/hood/PartyHood.py @@ -1,7 +1,7 @@ from direct.directnotify import DirectNotifyGlobal from direct.fsm import ClassicFSM, State from direct.task.Task import Task -from pandac.PandaModules import * +from panda3d.core import * from otp.avatar import DistributedAvatar from toontown.toonbase.ToonBaseGlobal import * from toontown.toonbase.ToontownGlobals import * diff --git a/toontown/hood/Place.py b/toontown/hood/Place.py index dbc160e..486bb56 100644 --- a/toontown/hood/Place.py +++ b/toontown/hood/Place.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase.ToonBaseGlobal import * from direct.directnotify import DirectNotifyGlobal from direct.fsm import StateData diff --git a/toontown/hood/QuietZoneState.py b/toontown/hood/QuietZoneState.py index 4a1f61e..fc080ed 100644 --- a/toontown/hood/QuietZoneState.py +++ b/toontown/hood/QuietZoneState.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.showbase.PythonUtil import Functor, PriorityCallbacks from direct.task import Task from toontown.distributed.ToontownMsgTypes import * diff --git a/toontown/hood/SkyUtil.py b/toontown/hood/SkyUtil.py index df1af1c..bb17088 100644 --- a/toontown/hood/SkyUtil.py +++ b/toontown/hood/SkyUtil.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase.ToontownGlobals import * from direct.task.Task import Task from direct.directnotify import DirectNotifyGlobal diff --git a/toontown/hood/TTHood.py b/toontown/hood/TTHood.py index 3a72a00..7571370 100644 --- a/toontown/hood/TTHood.py +++ b/toontown/hood/TTHood.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.interval.IntervalGlobal import * from . import ToonHood from toontown.town import TTTownLoader diff --git a/toontown/hood/ToonHood.py b/toontown/hood/ToonHood.py index 89d5d6e..48766d4 100644 --- a/toontown/hood/ToonHood.py +++ b/toontown/hood/ToonHood.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase.ToonBaseGlobal import * from toontown.toonbase.ToontownGlobals import * from toontown.distributed.ToontownMsgTypes import * diff --git a/toontown/hood/TrialerForceAcknowledge.py b/toontown/hood/TrialerForceAcknowledge.py index e259c98..df40ea1 100644 --- a/toontown/hood/TrialerForceAcknowledge.py +++ b/toontown/hood/TrialerForceAcknowledge.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase import TTLocalizer from . import ZoneUtil from toontown.toonbase import ToontownGlobals diff --git a/toontown/hood/TutorialHood.py b/toontown/hood/TutorialHood.py index 5151fc1..c1efa91 100644 --- a/toontown/hood/TutorialHood.py +++ b/toontown/hood/TutorialHood.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from . import ToonHood from toontown.town import TutorialTownLoader from toontown.toonbase.ToontownGlobals import * diff --git a/toontown/launcher/DownloadForceAcknowledge.py b/toontown/launcher/DownloadForceAcknowledge.py index 4154dda..238034e 100644 --- a/toontown/launcher/DownloadForceAcknowledge.py +++ b/toontown/launcher/DownloadForceAcknowledge.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from toontown.toontowngui import TTDialog from toontown.toonbase import TTLocalizer import random diff --git a/toontown/login/AvatarChoice.py b/toontown/login/AvatarChoice.py index ce169fc..4c418f5 100644 --- a/toontown/login/AvatarChoice.py +++ b/toontown/login/AvatarChoice.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase import ToontownGlobals from direct.showbase import DirectObject from toontown.toon import ToonDNA diff --git a/toontown/login/AvatarChooser.py b/toontown/login/AvatarChooser.py index b1c3057..5c21235 100644 --- a/toontown/login/AvatarChooser.py +++ b/toontown/login/AvatarChooser.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase import ToontownGlobals from . import AvatarChoice from direct.fsm import StateData @@ -6,7 +6,7 @@ from direct.fsm import ClassicFSM, State from direct.fsm import State from toontown.launcher import DownloadForceAcknowledge from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase import TTLocalizer from toontown.toonbase import DisplayOptions from direct.directnotify import DirectNotifyGlobal diff --git a/toontown/makeatoon/BodyShop.py b/toontown/makeatoon/BodyShop.py index 2f3663d..4b404e9 100644 --- a/toontown/makeatoon/BodyShop.py +++ b/toontown/makeatoon/BodyShop.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from toontown.toon import ToonDNA from direct.fsm import StateData from direct.gui.DirectGui import * diff --git a/toontown/makeatoon/ClothesGUI.py b/toontown/makeatoon/ClothesGUI.py index 5f21b43..80e6d0b 100644 --- a/toontown/makeatoon/ClothesGUI.py +++ b/toontown/makeatoon/ClothesGUI.py @@ -1,8 +1,8 @@ -from pandac.PandaModules import * +from panda3d.core import * from toontown.toon import ToonDNA from direct.fsm import StateData from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from .MakeAToonGlobals import * from toontown.toonbase import TTLocalizer from direct.directnotify import DirectNotifyGlobal diff --git a/toontown/makeatoon/ColorShop.py b/toontown/makeatoon/ColorShop.py index 4f00250..a607f73 100644 --- a/toontown/makeatoon/ColorShop.py +++ b/toontown/makeatoon/ColorShop.py @@ -1,8 +1,8 @@ -from pandac.PandaModules import * +from panda3d.core import * from toontown.toon import ToonDNA from direct.fsm import StateData from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from .MakeAToonGlobals import * from toontown.toonbase import TTLocalizer from . import ShuffleButton diff --git a/toontown/makeatoon/GenderShop.py b/toontown/makeatoon/GenderShop.py index 38051ef..45fe50b 100644 --- a/toontown/makeatoon/GenderShop.py +++ b/toontown/makeatoon/GenderShop.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.fsm import StateData from direct.gui.DirectGui import * from toontown.toonbase import TTLocalizer diff --git a/toontown/makeatoon/MakeAToon.py b/toontown/makeatoon/MakeAToon.py index 6593e41..a42bbdc 100644 --- a/toontown/makeatoon/MakeAToon.py +++ b/toontown/makeatoon/MakeAToon.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from toontown.distributed.ToontownMsgTypes import * from toontown.char import Char from otp.avatar import Avatar diff --git a/toontown/makeatoon/NameGenerator.py b/toontown/makeatoon/NameGenerator.py index 615722d..2b19c47 100644 --- a/toontown/makeatoon/NameGenerator.py +++ b/toontown/makeatoon/NameGenerator.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * import random import string import copy diff --git a/toontown/makeatoon/NameShop.py b/toontown/makeatoon/NameShop.py index 70d6b56..b4f2188 100644 --- a/toontown/makeatoon/NameShop.py +++ b/toontown/makeatoon/NameShop.py @@ -1,8 +1,8 @@ -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase.ToontownGlobals import * from direct.task.TaskManagerGlobal import * from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from toontown.distributed.ToontownMsgTypes import * from direct.directnotify import DirectNotifyGlobal from direct.gui import OnscreenText @@ -24,7 +24,7 @@ from direct.showbase import PythonUtil from toontown.toon import NPCToons from direct.task import Task from toontown.makeatoon.TTPickANamePattern import TTPickANamePattern -from pandac.PandaModules import TextEncoder +from panda3d.core import TextEncoder MAX_NAME_WIDTH = TTLocalizer.NSmaxNameWidth ServerDialogTimeout = 3.0 diff --git a/toontown/makeatoon/ShuffleButton.py b/toontown/makeatoon/ShuffleButton.py index c0ff666..dd19b97 100644 --- a/toontown/makeatoon/ShuffleButton.py +++ b/toontown/makeatoon/ShuffleButton.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.gui.DirectGui import * from toontown.toonbase import TTLocalizer from toontown.toonbase import ToontownGlobals diff --git a/toontown/minigame/ArrowKeys.py b/toontown/minigame/ArrowKeys.py index 4874301..1c8c488 100644 --- a/toontown/minigame/ArrowKeys.py +++ b/toontown/minigame/ArrowKeys.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import ModifierButtons +from panda3d.core import ModifierButtons from direct.showbase.DirectObject import DirectObject class ArrowKeys(DirectObject): diff --git a/toontown/minigame/CatchGameToonSD.py b/toontown/minigame/CatchGameToonSD.py index 139c43b..8b9b4b2 100644 --- a/toontown/minigame/CatchGameToonSD.py +++ b/toontown/minigame/CatchGameToonSD.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase.ToonBaseGlobal import * from direct.interval.IntervalGlobal import * from toontown.toonbase.ToontownGlobals import * diff --git a/toontown/minigame/CogThief.py b/toontown/minigame/CogThief.py index c352163..10fea25 100644 --- a/toontown/minigame/CogThief.py +++ b/toontown/minigame/CogThief.py @@ -1,5 +1,5 @@ import math -from pandac.PandaModules import CollisionSphere, CollisionNode, Point3, CollisionTube, Vec3, rad2Deg +from panda3d.core import CollisionSphere, CollisionNode, Point3, CollisionTube, Vec3, rad2Deg from direct.showbase.DirectObject import DirectObject from direct.distributed.ClockDelta import globalClockDelta from direct.interval.IntervalGlobal import Parallel, SoundInterval, Sequence, Func, LerpScaleInterval diff --git a/toontown/minigame/CogThiefGameGlobals.py b/toontown/minigame/CogThiefGameGlobals.py index 1b9784a..e2c459a 100644 --- a/toontown/minigame/CogThiefGameGlobals.py +++ b/toontown/minigame/CogThiefGameGlobals.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import VBase3, BitMask32 +from panda3d.core import VBase3, BitMask32 GameTime = 60 NumBarrels = 4 BarrelStartingPositions = (VBase3(4.3, 4, 0), diff --git a/toontown/minigame/CogThiefGameToonSD.py b/toontown/minigame/CogThiefGameToonSD.py index c710808..2270fbc 100644 --- a/toontown/minigame/CogThiefGameToonSD.py +++ b/toontown/minigame/CogThiefGameToonSD.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase.ToonBaseGlobal import * from direct.interval.IntervalGlobal import * from toontown.toonbase.ToontownGlobals import * diff --git a/toontown/minigame/DistributedCannonGame.py b/toontown/minigame/DistributedCannonGame.py index 329b60b..8b75fac 100644 --- a/toontown/minigame/DistributedCannonGame.py +++ b/toontown/minigame/DistributedCannonGame.py @@ -1,5 +1,5 @@ from direct.directnotify import DirectNotifyGlobal -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase.ToonBaseGlobal import * from .DistributedMinigame import * from direct.distributed.ClockDelta import * @@ -16,7 +16,7 @@ from toontown.effects import Splash from toontown.effects import DustCloud from . import CannonGameGlobals from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase import TTLocalizer LAND_TIME = 2 WORLD_SCALE = 2.0 diff --git a/toontown/minigame/DistributedCatchGame.py b/toontown/minigame/DistributedCatchGame.py index 6d94f96..6803a4c 100644 --- a/toontown/minigame/DistributedCatchGame.py +++ b/toontown/minigame/DistributedCatchGame.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase.ToonBaseGlobal import * from .DistributedMinigame import * from direct.interval.IntervalGlobal import * diff --git a/toontown/minigame/DistributedCogThiefGame.py b/toontown/minigame/DistributedCogThiefGame.py index 19cd3cf..5b344dd 100644 --- a/toontown/minigame/DistributedCogThiefGame.py +++ b/toontown/minigame/DistributedCogThiefGame.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import Point3, CollisionSphere, CollisionNode, CollisionHandlerEvent, NodePath, TextNode +from panda3d.core import Point3, CollisionSphere, CollisionNode, CollisionHandlerEvent, NodePath, TextNode from direct.distributed.ClockDelta import globalClockDelta from direct.interval.IntervalGlobal import Wait, LerpFunctionInterval, LerpHprInterval, Sequence, Parallel, Func, SoundInterval, ActorInterval, ProjectileInterval, Track, LerpScaleInterval, WaitInterval, LerpPosHprInterval from direct.gui.DirectGui import DirectLabel diff --git a/toontown/minigame/DistributedCogThiefGameAI.py b/toontown/minigame/DistributedCogThiefGameAI.py index 3972489..2f88b27 100644 --- a/toontown/minigame/DistributedCogThiefGameAI.py +++ b/toontown/minigame/DistributedCogThiefGameAI.py @@ -1,5 +1,5 @@ import random -from pandac.PandaModules import Point3 +from panda3d.core import Point3 from direct.fsm import ClassicFSM from direct.fsm import State from direct.distributed.ClockDelta import globalClockDelta diff --git a/toontown/minigame/DistributedIceGame.py b/toontown/minigame/DistributedIceGame.py index b7dbb64..c90bc7b 100644 --- a/toontown/minigame/DistributedIceGame.py +++ b/toontown/minigame/DistributedIceGame.py @@ -1,5 +1,5 @@ import math -from pandac.PandaModules import Vec3, deg2Rad, Point3, NodePath, VBase4, CollisionHandlerEvent, CollisionNode, CollisionSphere +from panda3d.core import Vec3, deg2Rad, Point3, NodePath, VBase4, CollisionHandlerEvent, CollisionNode, CollisionSphere from direct.fsm import ClassicFSM, State from direct.distributed.ClockDelta import globalClockDelta from direct.gui.DirectGui import DirectLabel diff --git a/toontown/minigame/DistributedIceGameAI.py b/toontown/minigame/DistributedIceGameAI.py index 609943a..30194e8 100644 --- a/toontown/minigame/DistributedIceGameAI.py +++ b/toontown/minigame/DistributedIceGameAI.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import Point3 +from panda3d.core import Point3 from direct.distributed.ClockDelta import globalClockDelta from direct.fsm import ClassicFSM, State from direct.task import Task diff --git a/toontown/minigame/DistributedIceWorld.py b/toontown/minigame/DistributedIceWorld.py index d486003..af40379 100644 --- a/toontown/minigame/DistributedIceWorld.py +++ b/toontown/minigame/DistributedIceWorld.py @@ -1,5 +1,5 @@ -from pandac.PandaModules import Vec4, BitMask32, Quat, Point3, NodePath -from pandac.PandaModules import OdePlaneGeom, OdeBody, OdeSphereGeom, OdeMass, OdeUtil, OdeBoxGeom +from panda3d.core import Vec4, BitMask32, Quat, NodePath +from panda3d.ode import OdePlaneGeom, OdeBody, OdeSphereGeom, OdeMass, OdeUtil, OdeBoxGeom from direct.directnotify import DirectNotifyGlobal from toontown.minigame import DistributedMinigamePhysicsWorld from toontown.minigame import IceGameGlobals diff --git a/toontown/minigame/DistributedMazeGame.py b/toontown/minigame/DistributedMazeGame.py index 019ac30..70ba03d 100644 --- a/toontown/minigame/DistributedMazeGame.py +++ b/toontown/minigame/DistributedMazeGame.py @@ -8,7 +8,7 @@ from direct.fsm import ClassicFSM, State from direct.showbase import RandomNumGen from direct.task.Task import Task from direct.distributed.ClockDelta import globalClockDelta -from pandac.PandaModules import Point3, Vec3 +from panda3d.core import Point3, Vec3 from toontown.toonbase import TTLocalizer from toontown.toonbase import ToontownTimer from .DistributedMinigame import DistributedMinigame diff --git a/toontown/minigame/DistributedMinigame.py b/toontown/minigame/DistributedMinigame.py index 4f3866b..6a36a7c 100644 --- a/toontown/minigame/DistributedMinigame.py +++ b/toontown/minigame/DistributedMinigame.py @@ -1,7 +1,7 @@ -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase.ToonBaseGlobal import * from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from direct.distributed.ClockDelta import * from toontown.toonbase import ToontownGlobals from direct.distributed import DistributedObject diff --git a/toontown/minigame/DistributedMinigameTemplate.py b/toontown/minigame/DistributedMinigameTemplate.py index 4858118..66f69a7 100644 --- a/toontown/minigame/DistributedMinigameTemplate.py +++ b/toontown/minigame/DistributedMinigameTemplate.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase.ToonBaseGlobal import * from .DistributedMinigame import * from direct.fsm import ClassicFSM, State diff --git a/toontown/minigame/DistributedPairingGame.py b/toontown/minigame/DistributedPairingGame.py index 2913d62..0c70f9c 100644 --- a/toontown/minigame/DistributedPairingGame.py +++ b/toontown/minigame/DistributedPairingGame.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase.ToonBaseGlobal import * from .DistributedMinigame import * from direct.fsm import ClassicFSM, State diff --git a/toontown/minigame/DistributedPatternGame.py b/toontown/minigame/DistributedPatternGame.py index a49f908..286ea7e 100644 --- a/toontown/minigame/DistributedPatternGame.py +++ b/toontown/minigame/DistributedPatternGame.py @@ -1,9 +1,9 @@ -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase.ToonBaseGlobal import * from direct.interval.IntervalGlobal import * from .DistributedMinigame import * from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from direct.fsm import ClassicFSM, State from direct.fsm import State from toontown.toonbase import ToontownTimer diff --git a/toontown/minigame/DistributedPhotoGame.py b/toontown/minigame/DistributedPhotoGame.py index 852c890..5321eec 100644 --- a/toontown/minigame/DistributedPhotoGame.py +++ b/toontown/minigame/DistributedPhotoGame.py @@ -1,5 +1,5 @@ from direct.directnotify import DirectNotifyGlobal -from pandac.PandaModules import * +from panda3d.core import * from panda3d.toontown import * from toontown.toonbase.ToonBaseGlobal import * from .DistributedMinigame import * @@ -14,7 +14,7 @@ import math from toontown.toon import ToonHead from . import PhotoGameGlobals from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase import TTLocalizer from toontown.golf import BuildGeometry from toontown.toon import Toon diff --git a/toontown/minigame/DistributedRaceGame.py b/toontown/minigame/DistributedRaceGame.py index 0f6a953..57ca910 100644 --- a/toontown/minigame/DistributedRaceGame.py +++ b/toontown/minigame/DistributedRaceGame.py @@ -1,10 +1,10 @@ -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase.ToonBaseGlobal import * from direct.distributed.ClockDelta import * from direct.interval.IntervalGlobal import * from .DistributedMinigame import * from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from direct.fsm import ClassicFSM, State from direct.fsm import State from direct.task.Task import Task diff --git a/toontown/minigame/DistributedRingGame.py b/toontown/minigame/DistributedRingGame.py index 7204497..f6e65be 100644 --- a/toontown/minigame/DistributedRingGame.py +++ b/toontown/minigame/DistributedRingGame.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase.ToonBaseGlobal import * from direct.interval.IntervalGlobal import * from .DistributedMinigame import * diff --git a/toontown/minigame/DistributedTagGame.py b/toontown/minigame/DistributedTagGame.py index 6981270..59badbc 100644 --- a/toontown/minigame/DistributedTagGame.py +++ b/toontown/minigame/DistributedTagGame.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase.ToonBaseGlobal import * from .DistributedMinigame import * from direct.interval.IntervalGlobal import * diff --git a/toontown/minigame/DistributedTargetGame.py b/toontown/minigame/DistributedTargetGame.py index 47046e2..8a2ee37 100644 --- a/toontown/minigame/DistributedTargetGame.py +++ b/toontown/minigame/DistributedTargetGame.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase.ToonBaseGlobal import * from direct.interval.IntervalGlobal import * from .DistributedMinigame import * diff --git a/toontown/minigame/DistributedTravelGame.py b/toontown/minigame/DistributedTravelGame.py index 89d6973..f935283 100644 --- a/toontown/minigame/DistributedTravelGame.py +++ b/toontown/minigame/DistributedTravelGame.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase.ToonBaseGlobal import * from toontown.toonbase.ToontownGlobals import GlobalDialogColor from .DistributedMinigame import * @@ -8,7 +8,7 @@ from toontown.toonbase import TTLocalizer from toontown.toonbase import ToontownTimer from . import TravelGameGlobals import math -from pandac.PandaModules import rad2Deg +from panda3d.core import rad2Deg from toontown.toontowngui import TTDialog from direct.interval.IntervalGlobal import * from . import VoteResultsPanel diff --git a/toontown/minigame/DistributedTugOfWarGame.py b/toontown/minigame/DistributedTugOfWarGame.py index e8b7a12..7530efe 100644 --- a/toontown/minigame/DistributedTugOfWarGame.py +++ b/toontown/minigame/DistributedTugOfWarGame.py @@ -1,9 +1,9 @@ -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase.ToonBaseGlobal import * from direct.interval.IntervalGlobal import * from .DistributedMinigame import * from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from direct.fsm import ClassicFSM, State from direct.fsm import State from toontown.toonbase import ToontownTimer diff --git a/toontown/minigame/DistributedTwoDGame.py b/toontown/minigame/DistributedTwoDGame.py index f5e2cab..3d3c17b 100644 --- a/toontown/minigame/DistributedTwoDGame.py +++ b/toontown/minigame/DistributedTwoDGame.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.interval.IntervalGlobal import * from toontown.toonbase.ToonBaseGlobal import * from toontown.toonbase import TTLocalizer diff --git a/toontown/minigame/DistributedVineGame.py b/toontown/minigame/DistributedVineGame.py index 874c6e2..49773f7 100644 --- a/toontown/minigame/DistributedVineGame.py +++ b/toontown/minigame/DistributedVineGame.py @@ -1,4 +1,5 @@ -from pandac.PandaModules import Point3, ForceNode, LinearVectorForce, CollisionHandlerEvent, CollisionNode, CollisionSphere, Camera, PerspectiveLens, Vec4, Point2, ActorNode, Vec3, BitMask32 +from panda3d.core import Point3, CollisionHandlerEvent, CollisionNode, CollisionSphere, Camera, PerspectiveLens, Vec4, Point2, Vec3, BitMask32 +from panda3d.physics import ForceNode, LinearVectorForce, ActorNode from direct.interval.IntervalGlobal import Sequence, Parallel, Func, Wait, LerpPosInterval, ActorInterval, LerpScaleInterval, ProjectileInterval, SoundInterval from direct.directnotify import DirectNotifyGlobal from direct.gui.DirectFrame import DirectFrame diff --git a/toontown/minigame/FogOverlay.py b/toontown/minigame/FogOverlay.py index a70e7b7..525a89e 100644 --- a/toontown/minigame/FogOverlay.py +++ b/toontown/minigame/FogOverlay.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase.ToonBaseGlobal import * from direct.interval.IntervalGlobal import * from direct.distributed.ClockDelta import * diff --git a/toontown/minigame/IceGameGlobals.py b/toontown/minigame/IceGameGlobals.py index 572d099..9c56c0a 100644 --- a/toontown/minigame/IceGameGlobals.py +++ b/toontown/minigame/IceGameGlobals.py @@ -1,5 +1,5 @@ import math -from pandac.PandaModules import Point3 +from panda3d.core import Point3 from toontown.toonbase import ToontownGlobals InputTimeout = 15 TireMovieTimeout = 120 diff --git a/toontown/minigame/IceTreasure.py b/toontown/minigame/IceTreasure.py index dafae7b..84b4e51 100644 --- a/toontown/minigame/IceTreasure.py +++ b/toontown/minigame/IceTreasure.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import Point3, CollisionSphere, CollisionNode, BitMask32 +from panda3d.core import Point3, CollisionSphere, CollisionNode, BitMask32 from direct.interval.IntervalGlobal import Sequence, LerpScaleInterval, Parallel, Func, SoundInterval from direct.directnotify import DirectNotifyGlobal from direct.showbase.DirectObject import DirectObject diff --git a/toontown/minigame/MazeBase.py b/toontown/minigame/MazeBase.py index 7dd29cf..32cc19a 100644 --- a/toontown/minigame/MazeBase.py +++ b/toontown/minigame/MazeBase.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import VBase3 +from panda3d.core import VBase3 from direct.showbase.RandomNumGen import RandomNumGen class MazeBase: diff --git a/toontown/minigame/MazeMapGui.py b/toontown/minigame/MazeMapGui.py index a5f3ba6..d2c5145 100644 --- a/toontown/minigame/MazeMapGui.py +++ b/toontown/minigame/MazeMapGui.py @@ -1,7 +1,7 @@ from direct.gui.DirectGui import DirectFrame, DGG -from pandac.PandaModules import Vec2, VBase4F -from pandac.PandaModules import CardMaker, NodePath -from pandac.PandaModules import Texture, PNMImage +from panda3d.core import Vec2, VBase4F +from panda3d.core import CardMaker, NodePath +from panda3d.core import Texture, PNMImage from enum import IntEnum DEFAULT_MASK_RESOLUTION = 32 DEFAULT_RADIUS_RATIO = 0.05 diff --git a/toontown/minigame/MazeSuit.py b/toontown/minigame/MazeSuit.py index 40cc11d..44c5fc4 100644 --- a/toontown/minigame/MazeSuit.py +++ b/toontown/minigame/MazeSuit.py @@ -2,8 +2,9 @@ from direct.showbase.DirectObject import DirectObject from direct.interval.MetaInterval import Parallel from direct.interval.LerpInterval import LerpPosInterval, LerpHprInterval from direct.showbase.RandomNumGen import RandomNumGen -from pandac.PandaModules import Point3, WaitInterval -from pandac.PandaModules import CollisionSphere, CollisionNode +from panda3d.core import Point3 +from panda3d.core import CollisionSphere, CollisionNode +from panda3d.direct import WaitInterval from toontown.suit import Suit from toontown.suit import SuitDNA from toontown.toonbase import ToontownGlobals diff --git a/toontown/minigame/MinigameAvatarScorePanel.py b/toontown/minigame/MinigameAvatarScorePanel.py index 7536c69..45c4e08 100644 --- a/toontown/minigame/MinigameAvatarScorePanel.py +++ b/toontown/minigame/MinigameAvatarScorePanel.py @@ -1,7 +1,7 @@ -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase.ToontownGlobals import * from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from toontown.toon import LaffMeter class MinigameAvatarScorePanel(DirectFrame): diff --git a/toontown/minigame/MinigamePhysicsWorldBase.py b/toontown/minigame/MinigamePhysicsWorldBase.py index 4051515..8a5231c 100644 --- a/toontown/minigame/MinigamePhysicsWorldBase.py +++ b/toontown/minigame/MinigamePhysicsWorldBase.py @@ -1,5 +1,5 @@ -from pandac.PandaModules import Quat -from pandac.PandaModules import OdeWorld, OdeSimpleSpace, OdeJointGroup, OdeUtil +from panda3d.core import Quat +from panda3d.ode import OdeWorld, OdeSimpleSpace, OdeJointGroup, OdeUtil from direct.directnotify import DirectNotifyGlobal from direct.distributed.ClockDelta import globalClockDelta diff --git a/toontown/minigame/MinigamePowerMeter.py b/toontown/minigame/MinigamePowerMeter.py index 6d6b7ad..4391d07 100644 --- a/toontown/minigame/MinigamePowerMeter.py +++ b/toontown/minigame/MinigamePowerMeter.py @@ -1,7 +1,7 @@ -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase.ToontownGlobals import * from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase import TTLocalizer class MinigamePowerMeter(DirectFrame): diff --git a/toontown/minigame/MinigameRulesPanel.py b/toontown/minigame/MinigameRulesPanel.py index 68ced54..50cd8bc 100644 --- a/toontown/minigame/MinigameRulesPanel.py +++ b/toontown/minigame/MinigameRulesPanel.py @@ -2,7 +2,7 @@ from direct.task import Task from direct.fsm import StateData from toontown.toonbase.ToontownGlobals import * from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase import ToontownTimer from toontown.toonbase import TTLocalizer from . import MinigameGlobals diff --git a/toontown/minigame/PairingGameCard.py b/toontown/minigame/PairingGameCard.py index 0a5f91a..a7022f7 100644 --- a/toontown/minigame/PairingGameCard.py +++ b/toontown/minigame/PairingGameCard.py @@ -1,6 +1,6 @@ from .PlayingCard import PlayingCardNodePath from . import PlayingCardGlobals -from pandac.PandaModules import NodePath, Vec3 +from panda3d.core import NodePath, Vec3 from direct.interval.IntervalGlobal import LerpHprInterval, Parallel, SoundInterval class PairingGameCard(PlayingCardNodePath): diff --git a/toontown/minigame/PhotoGameGlobals.py b/toontown/minigame/PhotoGameGlobals.py index a3fba67..66c221b 100644 --- a/toontown/minigame/PhotoGameGlobals.py +++ b/toontown/minigame/PhotoGameGlobals.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase import TTLocalizer from toontown.toonbase import ToontownGlobals GAME_TIME = 60 diff --git a/toontown/minigame/PlayingCard.py b/toontown/minigame/PlayingCard.py index bc76bf1..eac4b83 100644 --- a/toontown/minigame/PlayingCard.py +++ b/toontown/minigame/PlayingCard.py @@ -1,5 +1,5 @@ from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from direct.task import Task from toontown.toonbase import TTLocalizer from . import PlayingCardGlobals diff --git a/toontown/minigame/PlayingCardGlobals.py b/toontown/minigame/PlayingCardGlobals.py index b8cb4f0..38dc5f8 100644 --- a/toontown/minigame/PlayingCardGlobals.py +++ b/toontown/minigame/PlayingCardGlobals.py @@ -1,6 +1,6 @@ from toontown.toonbase import TTLocalizer from toontown.toonbase import ToontownBattleGlobals -from pandac.PandaModules import Vec4 +from panda3d.core import Vec4 Up = 1 Down = 0 MaxRank = 13 diff --git a/toontown/minigame/PurchaseBase.py b/toontown/minigame/PurchaseBase.py index 9dab1c8..d1357c0 100644 --- a/toontown/minigame/PurchaseBase.py +++ b/toontown/minigame/PurchaseBase.py @@ -3,7 +3,7 @@ from toontown.toonbase import ToontownGlobals from direct.fsm import StateData from toontown.shtiker.PurchaseManagerConstants import * from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from direct.task import Task from direct.fsm import State from direct.fsm import ClassicFSM, State diff --git a/toontown/minigame/Ring.py b/toontown/minigame/Ring.py index 594b8ed..cbd403e 100644 --- a/toontown/minigame/Ring.py +++ b/toontown/minigame/Ring.py @@ -1,6 +1,6 @@ -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase.ToonBaseGlobal import * -from pandac.PandaModules import NodePath +from panda3d.core import NodePath from . import RingTrack class Ring(NodePath): diff --git a/toontown/minigame/RingGameGlobals.py b/toontown/minigame/RingGameGlobals.py index 27370b5..518304f 100644 --- a/toontown/minigame/RingGameGlobals.py +++ b/toontown/minigame/RingGameGlobals.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase import TTLocalizer from toontown.toonbase import ToontownGlobals ENDLESS_GAME = config.GetBool('endless-ring-game', 0) diff --git a/toontown/minigame/RingGroup.py b/toontown/minigame/RingGroup.py index 65a69e5..e839536 100644 --- a/toontown/minigame/RingGroup.py +++ b/toontown/minigame/RingGroup.py @@ -1,6 +1,6 @@ -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase.ToonBaseGlobal import * -from pandac.PandaModules import NodePath +from panda3d.core import NodePath from . import Ring from . import RingTrack from . import RingTrackGroup diff --git a/toontown/minigame/RubberBand.py b/toontown/minigame/RubberBand.py index 28f6d3a..630bb81 100644 --- a/toontown/minigame/RubberBand.py +++ b/toontown/minigame/RubberBand.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase.ToonBaseGlobal import * from direct.interval.IntervalGlobal import * from direct.distributed.ClockDelta import * diff --git a/toontown/minigame/SwingVine.py b/toontown/minigame/SwingVine.py index 5451f41..0f84c5c 100644 --- a/toontown/minigame/SwingVine.py +++ b/toontown/minigame/SwingVine.py @@ -1,5 +1,5 @@ from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from direct.directnotify import DirectNotifyGlobal from direct.interval.IntervalGlobal import * from direct.distributed import DistributedObject diff --git a/toontown/minigame/TargetGameGlobals.py b/toontown/minigame/TargetGameGlobals.py index 2adfbd2..f7d55e9 100644 --- a/toontown/minigame/TargetGameGlobals.py +++ b/toontown/minigame/TargetGameGlobals.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase import TTLocalizer from toontown.toonbase import ToontownGlobals ENDLESS_GAME = config.GetBool('endless-ring-game', 0) diff --git a/toontown/minigame/ToonBlitzAssetMgr.py b/toontown/minigame/ToonBlitzAssetMgr.py index c49525f..ea4cfd0 100644 --- a/toontown/minigame/ToonBlitzAssetMgr.py +++ b/toontown/minigame/ToonBlitzAssetMgr.py @@ -1,9 +1,9 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.showbase.DirectObject import DirectObject from toontown.toonbase.ToonBaseGlobal import * from direct.directnotify import DirectNotifyGlobal from toontown.minigame import ToonBlitzGlobals, TwoDBlock -from pandac.PandaModules import CardMaker +from panda3d.core import CardMaker class ToonBlitzAssetMgr(DirectObject): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedToonBlitzAssets') diff --git a/toontown/minigame/ToonBlitzGlobals.py b/toontown/minigame/ToonBlitzGlobals.py index 765082f..4360eb9 100644 --- a/toontown/minigame/ToonBlitzGlobals.py +++ b/toontown/minigame/ToonBlitzGlobals.py @@ -1,5 +1,5 @@ from toontown.toonbase import ToontownGlobals -from pandac.PandaModules import BitMask32 +from panda3d.core import BitMask32 ShowScoresDuration = 4.0 EndlessGame = config.GetBool('endless-2d-game', 0) ScoreToJellyBeansMultiplier = 5 diff --git a/toontown/minigame/Trajectory.py b/toontown/minigame/Trajectory.py index 1b0b53c..d135f0c 100644 --- a/toontown/minigame/Trajectory.py +++ b/toontown/minigame/Trajectory.py @@ -1,5 +1,5 @@ from direct.directnotify import DirectNotifyGlobal -from pandac.PandaModules import * +from panda3d.core import * from math import * class Trajectory: diff --git a/toontown/minigame/TwoDBattleMgr.py b/toontown/minigame/TwoDBattleMgr.py index f0b2d10..7937237 100644 --- a/toontown/minigame/TwoDBattleMgr.py +++ b/toontown/minigame/TwoDBattleMgr.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.showbase.DirectObject import DirectObject from toontown.toonbase.ToonBaseGlobal import * from direct.directnotify import DirectNotifyGlobal diff --git a/toontown/minigame/TwoDBlock.py b/toontown/minigame/TwoDBlock.py index 3ea5066..ff04a59 100644 --- a/toontown/minigame/TwoDBlock.py +++ b/toontown/minigame/TwoDBlock.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.distributed.ClockDelta import * from direct.interval.IntervalGlobal import * from direct.fsm import ClassicFSM, State diff --git a/toontown/minigame/TwoDCamera.py b/toontown/minigame/TwoDCamera.py index 2561db9..4674436 100644 --- a/toontown/minigame/TwoDCamera.py +++ b/toontown/minigame/TwoDCamera.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.interval.IntervalGlobal import * from direct.task.Task import Task from direct.directnotify import DirectNotifyGlobal diff --git a/toontown/minigame/TwoDEnemy.py b/toontown/minigame/TwoDEnemy.py index fec60a8..7eacfaa 100644 --- a/toontown/minigame/TwoDEnemy.py +++ b/toontown/minigame/TwoDEnemy.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.directnotify import DirectNotifyGlobal from direct.showbase.DirectObject import DirectObject from direct.showbase import PythonUtil diff --git a/toontown/minigame/TwoDEnemyMgr.py b/toontown/minigame/TwoDEnemyMgr.py index a1ad4ce..a39f09d 100644 --- a/toontown/minigame/TwoDEnemyMgr.py +++ b/toontown/minigame/TwoDEnemyMgr.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.directnotify import DirectNotifyGlobal from direct.showbase.DirectObject import DirectObject from toontown.minigame import ToonBlitzGlobals diff --git a/toontown/minigame/TwoDGameToonSD.py b/toontown/minigame/TwoDGameToonSD.py index 0f7958d..42de694 100644 --- a/toontown/minigame/TwoDGameToonSD.py +++ b/toontown/minigame/TwoDGameToonSD.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase.ToonBaseGlobal import * from direct.interval.IntervalGlobal import * from toontown.toonbase.ToontownGlobals import * diff --git a/toontown/minigame/TwoDSection.py b/toontown/minigame/TwoDSection.py index 0470fac..39bfb19 100644 --- a/toontown/minigame/TwoDSection.py +++ b/toontown/minigame/TwoDSection.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.directnotify import DirectNotifyGlobal from direct.showbase.DirectObject import DirectObject from toontown.minigame import ToonBlitzGlobals diff --git a/toontown/minigame/TwoDSectionMgr.py b/toontown/minigame/TwoDSectionMgr.py index 6eb8d44..5f2cc69 100644 --- a/toontown/minigame/TwoDSectionMgr.py +++ b/toontown/minigame/TwoDSectionMgr.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.directnotify import DirectNotifyGlobal from direct.showbase.DirectObject import DirectObject from toontown.minigame import ToonBlitzGlobals diff --git a/toontown/minigame/TwoDSpawnPointMgr.py b/toontown/minigame/TwoDSpawnPointMgr.py index 09506ef..87c8963 100644 --- a/toontown/minigame/TwoDSpawnPointMgr.py +++ b/toontown/minigame/TwoDSpawnPointMgr.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.directnotify import DirectNotifyGlobal from direct.showbase.DirectObject import DirectObject from toontown.minigame import ToonBlitzGlobals diff --git a/toontown/minigame/TwoDStomperMgr.py b/toontown/minigame/TwoDStomperMgr.py index b0e58e3..1e1567f 100644 --- a/toontown/minigame/TwoDStomperMgr.py +++ b/toontown/minigame/TwoDStomperMgr.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.directnotify import DirectNotifyGlobal from direct.showbase.DirectObject import DirectObject from toontown.minigame import ToonBlitzGlobals diff --git a/toontown/minigame/TwoDTreasureMgr.py b/toontown/minigame/TwoDTreasureMgr.py index ecd1880..9a805a1 100644 --- a/toontown/minigame/TwoDTreasureMgr.py +++ b/toontown/minigame/TwoDTreasureMgr.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.directnotify import DirectNotifyGlobal from direct.showbase.DirectObject import DirectObject from toontown.minigame import ToonBlitzGlobals diff --git a/toontown/minigame/VineBat.py b/toontown/minigame/VineBat.py index 3e2f280..23d3f1c 100644 --- a/toontown/minigame/VineBat.py +++ b/toontown/minigame/VineBat.py @@ -1,7 +1,7 @@ from direct.showbase.DirectObject import DirectObject from toontown.toonbase.ToontownGlobals import * from direct.directnotify import DirectNotifyGlobal -from pandac.PandaModules import * +from panda3d.core import * from . import VineGameGlobals from direct.interval.SoundInterval import SoundInterval diff --git a/toontown/minigame/VineGameGlobals.py b/toontown/minigame/VineGameGlobals.py index 3c7d264..90c6493 100644 --- a/toontown/minigame/VineGameGlobals.py +++ b/toontown/minigame/VineGameGlobals.py @@ -1,5 +1,5 @@ from toontown.toonbase import ToontownGlobals -from pandac.PandaModules import BitMask32 +from panda3d.core import BitMask32 NumVines = 20 GameDuration = 70 ShowScoresDuration = 4.0 diff --git a/toontown/minigame/VineHeadFrame.py b/toontown/minigame/VineHeadFrame.py index fadec24..3f28516 100644 --- a/toontown/minigame/VineHeadFrame.py +++ b/toontown/minigame/VineHeadFrame.py @@ -1,5 +1,5 @@ from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase import ToontownGlobals from toontown.toon import ToonHead diff --git a/toontown/minigame/VineSpider.py b/toontown/minigame/VineSpider.py index 0c5602d..61d96f2 100644 --- a/toontown/minigame/VineSpider.py +++ b/toontown/minigame/VineSpider.py @@ -1,7 +1,7 @@ from direct.showbase.DirectObject import DirectObject from toontown.toonbase.ToontownGlobals import * from direct.directnotify import DirectNotifyGlobal -from pandac.PandaModules import * +from panda3d.core import * from . import VineGameGlobals class VineSpider(NodePath, DirectObject): diff --git a/toontown/minigame/VoteResultsPanel.py b/toontown/minigame/VoteResultsPanel.py index 8fd50e0..7f55efe 100644 --- a/toontown/minigame/VoteResultsPanel.py +++ b/toontown/minigame/VoteResultsPanel.py @@ -1,7 +1,7 @@ from direct.gui.DirectGui import DirectFrame, DGG, DirectLabel from direct.directnotify import DirectNotifyGlobal from toontown.toonbase import ToontownGlobals -from pandac.PandaModules import Point3, TextNode +from panda3d.core import Point3, TextNode from toontown.minigame import TravelGameGlobals from toontown.toonbase import TTLocalizer from direct.interval.IntervalGlobal import Parallel, Sequence, LerpFunc, Func, Wait diff --git a/toontown/minigame/VoteResultsTrolleyPanel.py b/toontown/minigame/VoteResultsTrolleyPanel.py index 27bd011..8877dc1 100644 --- a/toontown/minigame/VoteResultsTrolleyPanel.py +++ b/toontown/minigame/VoteResultsTrolleyPanel.py @@ -1,7 +1,7 @@ from direct.gui.DirectGui import DirectFrame, DGG, DirectLabel from direct.directnotify import DirectNotifyGlobal from toontown.toonbase import ToontownGlobals -from pandac.PandaModules import Point3, TextNode, Vec4 +from panda3d.core import Point3, TextNode, Vec4 from toontown.minigame import TravelGameGlobals from toontown.toonbase import TTLocalizer from direct.interval.IntervalGlobal import Parallel, Sequence, LerpFunc, Func, Wait, SoundInterval diff --git a/toontown/parties/CalendarGuiDay.py b/toontown/parties/CalendarGuiDay.py index 0013df3..bec5e99 100644 --- a/toontown/parties/CalendarGuiDay.py +++ b/toontown/parties/CalendarGuiDay.py @@ -1,7 +1,7 @@ import datetime import functools import time -from pandac.PandaModules import TextNode, Vec3, Vec4, PlaneNode, Plane, Point3 +from panda3d.core import TextNode, Vec3, Vec4, PlaneNode, Plane, Point3 from direct.gui.DirectGui import DirectFrame, DirectLabel, DirectButton, DirectScrolledList, DGG from direct.directnotify import DirectNotifyGlobal from direct.gui import DirectGuiGlobals diff --git a/toontown/parties/CalendarGuiMonth.py b/toontown/parties/CalendarGuiMonth.py index 9465cc3..1371da3 100644 --- a/toontown/parties/CalendarGuiMonth.py +++ b/toontown/parties/CalendarGuiMonth.py @@ -1,6 +1,6 @@ import calendar from datetime import timedelta, datetime -from pandac.PandaModules import Vec4, TextNode +from panda3d.core import Vec4, TextNode from direct.gui.DirectGui import DirectFrame, DirectLabel, DirectButton, DirectScrolledList, DGG from toontown.toonbase import TTLocalizer from toontown.toonbase import ToontownGlobals diff --git a/toontown/parties/Cannon.py b/toontown/parties/Cannon.py index 9126f95..5b57926 100644 --- a/toontown/parties/Cannon.py +++ b/toontown/parties/Cannon.py @@ -1,5 +1,5 @@ import math -from pandac.PandaModules import * +from panda3d.core import * from direct.interval.MetaInterval import Sequence, Parallel from direct.interval.FunctionInterval import Func from direct.interval.LerpInterval import LerpScaleInterval, LerpColorScaleInterval diff --git a/toontown/parties/Decoration.py b/toontown/parties/Decoration.py index 8382974..e6db7cb 100644 --- a/toontown/parties/Decoration.py +++ b/toontown/parties/Decoration.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.interval.IntervalGlobal import * from direct.actor import Actor from toontown.toonbase import ToontownGlobals diff --git a/toontown/parties/DistributedPartyActivity.py b/toontown/parties/DistributedPartyActivity.py index 26e9b04..f96e492 100644 --- a/toontown/parties/DistributedPartyActivity.py +++ b/toontown/parties/DistributedPartyActivity.py @@ -1,5 +1,5 @@ -from pandac.PandaModules import CollisionSphere, CollisionNode, CollisionTube -from pandac.PandaModules import TextNode, NodePath, Vec3, Point3 +from panda3d.core import CollisionSphere, CollisionNode, CollisionTube +from panda3d.core import TextNode, NodePath, Vec3, Point3 from direct.distributed.ClockDelta import globalClockDelta from direct.distributed import DistributedObject from direct.showbase import RandomNumGen diff --git a/toontown/parties/DistributedPartyCannon.py b/toontown/parties/DistributedPartyCannon.py index 9d12350..0272449 100644 --- a/toontown/parties/DistributedPartyCannon.py +++ b/toontown/parties/DistributedPartyCannon.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.distributed.DistributedObject import DistributedObject from direct.task.Task import Task from toontown.minigame import CannonGameGlobals diff --git a/toontown/parties/DistributedPartyCannonActivity.py b/toontown/parties/DistributedPartyCannonActivity.py index 6ab579c..a2ee0d2 100644 --- a/toontown/parties/DistributedPartyCannonActivity.py +++ b/toontown/parties/DistributedPartyCannonActivity.py @@ -1,5 +1,5 @@ import math -from pandac.PandaModules import * +from panda3d.core import * from direct.distributed.ClockDelta import * from direct.interval.IntervalGlobal import * from otp.otpbase.PythonUtil import quantizeVec diff --git a/toontown/parties/DistributedPartyCatchActivity.py b/toontown/parties/DistributedPartyCatchActivity.py index fdaa025..09093bc 100644 --- a/toontown/parties/DistributedPartyCatchActivity.py +++ b/toontown/parties/DistributedPartyCatchActivity.py @@ -1,5 +1,5 @@ -from pandac.PandaModules import Vec3, Point3, Point4, TextNode, NodePath -from pandac.PandaModules import CollisionHandlerEvent, CollisionNode, CollisionSphere +from panda3d.core import Vec3, Point3, Point4, TextNode, NodePath +from panda3d.core import CollisionHandlerEvent, CollisionNode, CollisionSphere from direct.distributed.ClockDelta import globalClockDelta from direct.interval.IntervalGlobal import Sequence, Parallel from direct.interval.IntervalGlobal import LerpScaleInterval, LerpFunctionInterval, LerpColorScaleInterval, LerpPosInterval diff --git a/toontown/parties/DistributedPartyCogActivity.py b/toontown/parties/DistributedPartyCogActivity.py index 673450f..6db8ffb 100644 --- a/toontown/parties/DistributedPartyCogActivity.py +++ b/toontown/parties/DistributedPartyCogActivity.py @@ -1,5 +1,5 @@ from direct.distributed.ClockDelta import globalClockDelta -from pandac.PandaModules import Point3 +from panda3d.core import Point3 from toontown.toonbase import TTLocalizer from . import PartyGlobals from .DistributedPartyTeamActivity import DistributedPartyTeamActivity diff --git a/toontown/parties/DistributedPartyDanceActivityBase.py b/toontown/parties/DistributedPartyDanceActivityBase.py index 2507f39..c0c940d 100644 --- a/toontown/parties/DistributedPartyDanceActivityBase.py +++ b/toontown/parties/DistributedPartyDanceActivityBase.py @@ -1,5 +1,5 @@ import random -from pandac.PandaModules import * +from panda3d.core import * from direct.interval.FunctionInterval import Wait, Func from direct.interval.MetaInterval import Sequence, Parallel from direct.fsm import FSM diff --git a/toontown/parties/DistributedPartyFireworksActivity.py b/toontown/parties/DistributedPartyFireworksActivity.py index 8dddb0b..b1f672f 100644 --- a/toontown/parties/DistributedPartyFireworksActivity.py +++ b/toontown/parties/DistributedPartyFireworksActivity.py @@ -1,7 +1,7 @@ -from pandac.PandaModules import Vec3 -from pandac.PandaModules import OmniBoundingVolume -from pandac.PandaModules import AlphaTestAttrib -from pandac.PandaModules import RenderAttrib +from panda3d.core import Vec3 +from panda3d.core import OmniBoundingVolume +from panda3d.core import AlphaTestAttrib +from panda3d.core import RenderAttrib from direct.actor.Actor import Actor from direct.interval.IntervalGlobal import * from direct.distributed.ClockDelta import globalClockDelta diff --git a/toontown/parties/DistributedPartyJukeboxActivityBase.py b/toontown/parties/DistributedPartyJukeboxActivityBase.py index d5d4fbf..6706f77 100644 --- a/toontown/parties/DistributedPartyJukeboxActivityBase.py +++ b/toontown/parties/DistributedPartyJukeboxActivityBase.py @@ -1,6 +1,6 @@ from direct.actor.Actor import Actor from direct.task.Task import Task -from pandac.PandaModules import * +from panda3d.core import * from otp.otpbase.OTPBase import OTPBase from toontown.toonbase import ToontownGlobals from toontown.toonbase import TTLocalizer diff --git a/toontown/parties/DistributedPartyTrampolineActivity.py b/toontown/parties/DistributedPartyTrampolineActivity.py index 7113938..964ad53 100644 --- a/toontown/parties/DistributedPartyTrampolineActivity.py +++ b/toontown/parties/DistributedPartyTrampolineActivity.py @@ -12,17 +12,17 @@ from direct.interval.FunctionInterval import Wait from direct.interval.LerpInterval import LerpFunc from direct.interval.MetaInterval import Parallel from direct.interval.MetaInterval import Sequence -from pandac.PandaModules import CardMaker -from pandac.PandaModules import NodePath -from pandac.PandaModules import TextNode -from pandac.PandaModules import Point3 -from pandac.PandaModules import Vec3 -from pandac.PandaModules import VBase3 -from pandac.PandaModules import VBase4 -from pandac.PandaModules import CollisionSphere -from pandac.PandaModules import CollisionTube -from pandac.PandaModules import CollisionNode -from pandac.PandaModules import BitMask32 +from panda3d.core import CardMaker +from panda3d.core import NodePath +from panda3d.core import TextNode +from panda3d.core import Point3 +from panda3d.core import Vec3 +from panda3d.core import VBase3 +from panda3d.core import VBase4 +from panda3d.core import CollisionSphere +from panda3d.core import CollisionTube +from panda3d.core import CollisionNode +from panda3d.core import BitMask32 from otp.otpbase import OTPGlobals from toontown.toonbase import ToontownGlobals from toontown.toonbase import TTLocalizer diff --git a/toontown/parties/DistributedPartyTugOfWarActivity.py b/toontown/parties/DistributedPartyTugOfWarActivity.py index 7d2ed16..bcc2749 100644 --- a/toontown/parties/DistributedPartyTugOfWarActivity.py +++ b/toontown/parties/DistributedPartyTugOfWarActivity.py @@ -1,9 +1,9 @@ import math -from pandac.PandaModules import CollisionTube -from pandac.PandaModules import CollisionNode -from pandac.PandaModules import Point3 -from pandac.PandaModules import VBase3 -from pandac.PandaModules import RopeNode +from panda3d.core import CollisionTube +from panda3d.core import CollisionNode +from panda3d.core import Point3 +from panda3d.core import VBase3 +from panda3d.core import RopeNode from direct.interval.IntervalGlobal import LerpPosHprInterval from direct.interval.IntervalGlobal import LerpPosInterval from direct.interval.IntervalGlobal import Wait diff --git a/toontown/parties/DistributedPartyWinterCatchActivity.py b/toontown/parties/DistributedPartyWinterCatchActivity.py index 9089012..64322f4 100644 --- a/toontown/parties/DistributedPartyWinterCatchActivity.py +++ b/toontown/parties/DistributedPartyWinterCatchActivity.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import NodePath +from panda3d.core import NodePath from toontown.toonbase import TTLocalizer from toontown.parties.DistributedPartyCatchActivity import DistributedPartyCatchActivity from toontown.parties import PartyGlobals diff --git a/toontown/parties/JellybeanRewardGui.py b/toontown/parties/JellybeanRewardGui.py index 5a38040..1a45f26 100644 --- a/toontown/parties/JellybeanRewardGui.py +++ b/toontown/parties/JellybeanRewardGui.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import TextNode +from panda3d.core import TextNode from direct.gui.DirectGui import DirectFrame from direct.gui.DirectGui import DirectButton from direct.gui.DirectGui import DirectLabel diff --git a/toontown/parties/JukeboxGui.py b/toontown/parties/JukeboxGui.py index 2d24650..c23c486 100644 --- a/toontown/parties/JukeboxGui.py +++ b/toontown/parties/JukeboxGui.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.showbase.DirectObject import DirectObject from direct.gui.DirectGui import DirectFrame, DirectButton, DirectLabel from direct.gui.DirectGui import DirectScrolledListItem, DirectScrolledList diff --git a/toontown/parties/KeyCodes.py b/toontown/parties/KeyCodes.py index 977654c..47af387 100644 --- a/toontown/parties/KeyCodes.py +++ b/toontown/parties/KeyCodes.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.showbase.DirectObject import DirectObject ARROW_KEYCODE_MAP = {'arrow_up': 'u', 'arrow_down': 'd', diff --git a/toontown/parties/KeyCodesGui.py b/toontown/parties/KeyCodesGui.py index cca4169..ff043bb 100644 --- a/toontown/parties/KeyCodesGui.py +++ b/toontown/parties/KeyCodesGui.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.showbase.DirectObject import DirectObject from direct.gui.DirectGui import DirectButton from direct.gui.OnscreenText import OnscreenText diff --git a/toontown/parties/Party.py b/toontown/parties/Party.py index 697ba8a..54d12b6 100644 --- a/toontown/parties/Party.py +++ b/toontown/parties/Party.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase.ToonBaseGlobal import * from toontown.toonbase.ToontownGlobals import * from direct.gui.DirectGui import * diff --git a/toontown/parties/PartyCatchActivityToonSD.py b/toontown/parties/PartyCatchActivityToonSD.py index 16bd2de..ee60331 100644 --- a/toontown/parties/PartyCatchActivityToonSD.py +++ b/toontown/parties/PartyCatchActivityToonSD.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import Vec3 +from panda3d.core import Vec3 from direct.interval.IntervalGlobal import Sequence, Parallel, Wait, Func from direct.interval.IntervalGlobal import LerpScaleInterval from direct.interval.IntervalGlobal import WaitInterval, ActorInterval, FunctionInterval diff --git a/toontown/parties/PartyCog.py b/toontown/parties/PartyCog.py index d428c34..2631f26 100644 --- a/toontown/parties/PartyCog.py +++ b/toontown/parties/PartyCog.py @@ -8,8 +8,8 @@ from direct.interval.LerpInterval import LerpScaleInterval, LerpFunc from direct.showbase.PythonUtil import bound as clamp from direct.task import Task from direct.fsm.FSM import FSM -from pandac.PandaModules import CollisionTube, CollisionNode, CollisionSphere -from pandac.PandaModules import Point3, Vec4, NodePath, TextNode, Mat4 +from panda3d.core import CollisionTube, CollisionNode, CollisionSphere +from panda3d.core import Point3, Vec4, NodePath, TextNode, Mat4 from toontown.toonbase import ToontownGlobals from toontown.battle.BattleProps import globalPropPool from toontown.battle.BattleSounds import globalBattleSoundCache diff --git a/toontown/parties/PartyCogActivity.py b/toontown/parties/PartyCogActivity.py index 1c67d9b..d8c9b9b 100644 --- a/toontown/parties/PartyCogActivity.py +++ b/toontown/parties/PartyCogActivity.py @@ -6,8 +6,8 @@ from direct.interval.ProjectileInterval import ProjectileInterval from direct.distributed.ClockDelta import globalClockDelta from direct.showbase.PythonUtil import bound, lerp from direct.showbase.DirectObject import DirectObject -from pandac.PandaModules import NodePath, Point3, TextNode -from pandac.PandaModules import CollisionSphere, CollisionNode, CollisionHandlerEvent +from panda3d.core import NodePath, Point3, TextNode +from panda3d.core import CollisionSphere, CollisionNode, CollisionHandlerEvent from toontown.toonbase import ToontownGlobals from toontown.toonbase import TTLocalizer from toontown.toonbase.ToontownTimer import ToontownTimer diff --git a/toontown/parties/PartyCogActivityGui.py b/toontown/parties/PartyCogActivityGui.py index 74d1af9..e112682 100644 --- a/toontown/parties/PartyCogActivityGui.py +++ b/toontown/parties/PartyCogActivityGui.py @@ -4,8 +4,8 @@ from direct.showbase.DirectObject import DirectObject from direct.interval.LerpInterval import LerpScaleInterval from direct.interval.MetaInterval import Sequence from direct.interval.FunctionInterval import Wait, Func -from pandac.PandaModules import Point3, VBase4 -from pandac.PandaModules import TextNode +from panda3d.core import Point3, VBase4 +from panda3d.core import TextNode from toontown.toonbase import ToontownGlobals from toontown.toonbase import ToontownIntervals from toontown.toonbase import TTLocalizer diff --git a/toontown/parties/PartyCogActivityInput.py b/toontown/parties/PartyCogActivityInput.py index b7a010f..b53cd1e 100644 --- a/toontown/parties/PartyCogActivityInput.py +++ b/toontown/parties/PartyCogActivityInput.py @@ -1,5 +1,5 @@ from direct.showbase.DirectObject import DirectObject -from pandac.PandaModules import ModifierButtons +from panda3d.core import ModifierButtons ROTATE_LEFT_KEY = 'arrow_left' ROTATE_RIGHT_KEY = 'arrow_right' FORWARD_KEY = 'arrow_up' diff --git a/toontown/parties/PartyCogActivityPlayer.py b/toontown/parties/PartyCogActivityPlayer.py index 343f9c6..3262887 100644 --- a/toontown/parties/PartyCogActivityPlayer.py +++ b/toontown/parties/PartyCogActivityPlayer.py @@ -6,7 +6,7 @@ from direct.interval.FunctionInterval import Func, Wait from direct.interval.SoundInterval import SoundInterval from direct.interval.LerpInterval import LerpScaleInterval, LerpFunc from direct.directnotify import DirectNotifyGlobal -from pandac.PandaModules import NodePath, Point3, VBase3 +from panda3d.core import NodePath, Point3, VBase3 from toontown.minigame.OrthoDrive import OrthoDrive from toontown.minigame.OrthoWalk import OrthoWalk from toontown.battle.BattleProps import globalPropPool diff --git a/toontown/parties/PartyCogUtils.py b/toontown/parties/PartyCogUtils.py index 752a523..0ee44c3 100644 --- a/toontown/parties/PartyCogUtils.py +++ b/toontown/parties/PartyCogUtils.py @@ -1,5 +1,5 @@ import math -from pandac.PandaModules import NodePath, Point3 +from panda3d.core import NodePath, Point3 from . import PartyGlobals inverse_e = 1.0 / math.e diff --git a/toontown/parties/PartyDanceActivityToonFSM.py b/toontown/parties/PartyDanceActivityToonFSM.py index d9e106f..a8a6622 100644 --- a/toontown/parties/PartyDanceActivityToonFSM.py +++ b/toontown/parties/PartyDanceActivityToonFSM.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.fsm.FSM import FSM from direct.showbase import PythonUtil from direct.interval.MetaInterval import Sequence diff --git a/toontown/parties/PartyEditor.py b/toontown/parties/PartyEditor.py index 87e37a5..37ff677 100644 --- a/toontown/parties/PartyEditor.py +++ b/toontown/parties/PartyEditor.py @@ -1,5 +1,5 @@ import time -from pandac.PandaModules import Vec3, Vec4, Point3, TextNode, VBase4 +from panda3d.core import Vec3, Vec4, Point3, TextNode, VBase4 from direct.gui.DirectGui import DirectFrame, DirectButton, DirectLabel, DirectScrolledList, DirectCheckButton from direct.gui import DirectGuiGlobals from direct.showbase.DirectObject import DirectObject diff --git a/toontown/parties/PartyEditorGrid.py b/toontown/parties/PartyEditorGrid.py index f11463d..b0450e3 100644 --- a/toontown/parties/PartyEditorGrid.py +++ b/toontown/parties/PartyEditorGrid.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import Vec3, Vec4, Point3, TextNode, VBase4 +from panda3d.core import Vec3, Vec4, Point3, TextNode, VBase4 from direct.gui.DirectGui import DirectFrame, DirectButton, DirectLabel, DirectScrolledList, DirectCheckButton from direct.gui import DirectGuiGlobals from direct.showbase import DirectObject diff --git a/toontown/parties/PartyEditorGridElement.py b/toontown/parties/PartyEditorGridElement.py index 51a87df..8748a1e 100644 --- a/toontown/parties/PartyEditorGridElement.py +++ b/toontown/parties/PartyEditorGridElement.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import Vec3, Vec4, Point3, TextNode, VBase4, NodePath +from panda3d.core import Vec3, Vec4, Point3, TextNode, VBase4, NodePath from direct.gui.DirectGui import DirectFrame, DirectButton, DirectLabel, DirectScrolledList, DirectCheckButton from direct.gui import DirectGuiGlobals from direct.showbase import DirectObject diff --git a/toontown/parties/PartyEditorGridSquare.py b/toontown/parties/PartyEditorGridSquare.py index 66c074d..7c9cfb3 100644 --- a/toontown/parties/PartyEditorGridSquare.py +++ b/toontown/parties/PartyEditorGridSquare.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import Vec3, Vec4, Point3, TextNode, VBase4 +from panda3d.core import Vec3, Vec4, Point3, TextNode, VBase4 from direct.gui.DirectGui import DirectFrame, DirectButton, DirectLabel, DirectScrolledList, DirectCheckButton from direct.gui import DirectGuiGlobals from direct.showbase.DirectObject import DirectObject diff --git a/toontown/parties/PartyEditorListElement.py b/toontown/parties/PartyEditorListElement.py index 491c563..6fd5162 100644 --- a/toontown/parties/PartyEditorListElement.py +++ b/toontown/parties/PartyEditorListElement.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import Vec3 +from panda3d.core import Vec3 from direct.gui.DirectGui import DirectButton, DirectLabel from direct.gui import DirectGuiGlobals from toontown.toonbase import TTLocalizer diff --git a/toontown/parties/PartyGlobals.py b/toontown/parties/PartyGlobals.py index 9330df4..895e54a 100644 --- a/toontown/parties/PartyGlobals.py +++ b/toontown/parties/PartyGlobals.py @@ -1,5 +1,5 @@ -from pandac.PandaModules import BitMask32 -from pandac.PandaModules import Point3, VBase4 +from panda3d.core import BitMask32 +from panda3d.core import Point3, VBase4 from toontown.toonbase import TTLocalizer from enum import IntEnum KICK_TO_PLAYGROUND_EVENT = 'parties_kickToPlayground' diff --git a/toontown/parties/PartyLoader.py b/toontown/parties/PartyLoader.py index c9ac2f6..9360194 100644 --- a/toontown/parties/PartyLoader.py +++ b/toontown/parties/PartyLoader.py @@ -3,8 +3,8 @@ import random from direct.directnotify import DirectNotifyGlobal from direct.interval.IntervalGlobal import * from direct.fsm import ClassicFSM, State -from pandac.PandaModules import * -from pandac.PandaModules import NodePath +from panda3d.core import * +from panda3d.core import NodePath from toontown.toonbase.ToontownGlobals import * from toontown.safezone import SafeZoneLoader from toontown.parties import Party diff --git a/toontown/parties/PartyPlanner.py b/toontown/parties/PartyPlanner.py index 9c75524..b598083 100644 --- a/toontown/parties/PartyPlanner.py +++ b/toontown/parties/PartyPlanner.py @@ -1,7 +1,7 @@ import calendar from datetime import datetime from datetime import timedelta -from pandac.PandaModules import Vec3, Vec4, Point3, TextNode, VBase4 +from panda3d.core import Vec3, Vec4, Point3, TextNode, VBase4 from otp.otpbase import OTPLocalizer from direct.gui.DirectGui import DirectFrame, DirectButton, DirectLabel, DirectScrolledList, DirectCheckButton from direct.gui import DirectGuiGlobals @@ -22,7 +22,7 @@ from toontown.parties.PartyInfo import PartyInfo from toontown.parties import PartyUtils from toontown.parties.PartyEditor import PartyEditor from otp.otpbase import OTPGlobals -from pandac.PandaModules import * +from panda3d.core import * from direct.directnotify import DirectNotifyGlobal class PartyPlanner(DirectFrame, FSM): diff --git a/toontown/parties/PartyUtils.py b/toontown/parties/PartyUtils.py index ad9331a..c163e1c 100644 --- a/toontown/parties/PartyUtils.py +++ b/toontown/parties/PartyUtils.py @@ -3,7 +3,7 @@ import time import datetime from direct.directnotify import DirectNotifyGlobal from direct.interval.LerpInterval import LerpFunc -from pandac.PandaModules import Vec3 +from panda3d.core import Vec3 from toontown.toonbase import TTLocalizer from toontown.toonbase.ToontownTimer import ToontownTimer from toontown.parties import PartyGlobals diff --git a/toontown/parties/PublicPartyGui.py b/toontown/parties/PublicPartyGui.py index 8f881b7..bd7f8a7 100644 --- a/toontown/parties/PublicPartyGui.py +++ b/toontown/parties/PublicPartyGui.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import Vec3, Vec4, Point3, TextNode, VBase4 +from panda3d.core import Vec3, Vec4, Point3, TextNode, VBase4 from direct.gui.DirectGui import DGG, DirectFrame, DirectButton, DirectLabel, DirectScrolledList, DirectCheckButton from direct.gui import DirectGuiGlobals from direct.showbase import DirectObject diff --git a/toontown/parties/ScrolledFriendList.py b/toontown/parties/ScrolledFriendList.py index e1f4e71..1bca984 100644 --- a/toontown/parties/ScrolledFriendList.py +++ b/toontown/parties/ScrolledFriendList.py @@ -3,7 +3,7 @@ from direct.gui.DirectGui import DirectScrolledList, DirectCheckButton from direct.gui.DirectCheckBox import DirectCheckBox from direct.gui import DirectGuiGlobals from toontown.toonbase import ToontownGlobals -from pandac.PandaModules import Vec3, Vec4, PlaneNode, Plane, Point3, TextNode, VBase4, NodePath +from panda3d.core import Vec3, Vec4, PlaneNode, Plane, Point3, TextNode, VBase4, NodePath class ScrolledFriendList(DirectScrolledList): diff --git a/toontown/parties/ServerTimeGui.py b/toontown/parties/ServerTimeGui.py index c657157..c846635 100644 --- a/toontown/parties/ServerTimeGui.py +++ b/toontown/parties/ServerTimeGui.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import TextNode +from panda3d.core import TextNode from direct.gui.DirectGui import DirectFrame, DirectLabel from direct.interval.IntervalGlobal import Func, Sequence, Wait from toontown.toonbase import ToontownGlobals diff --git a/toontown/parties/StretchingArrow.py b/toontown/parties/StretchingArrow.py index 172da01..582cebd 100644 --- a/toontown/parties/StretchingArrow.py +++ b/toontown/parties/StretchingArrow.py @@ -1,6 +1,6 @@ import math from direct.gui.DirectGui import DirectFrame -from pandac.PandaModules import Point3 +from panda3d.core import Point3 class StretchingArrow(DirectFrame): notify = directNotify.newCategory('StretchingArrow') diff --git a/toontown/parties/TeamActivityGui.py b/toontown/parties/TeamActivityGui.py index 0e31bc3..3eeb035 100644 --- a/toontown/parties/TeamActivityGui.py +++ b/toontown/parties/TeamActivityGui.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import TextNode +from panda3d.core import TextNode from direct.gui.DirectButton import DirectButton from direct.gui.OnscreenText import OnscreenText from direct.task.Task import Task diff --git a/toontown/parties/WinterPartyCatchActivityToonSD.py b/toontown/parties/WinterPartyCatchActivityToonSD.py index e0e2aa7..fca8561 100644 --- a/toontown/parties/WinterPartyCatchActivityToonSD.py +++ b/toontown/parties/WinterPartyCatchActivityToonSD.py @@ -1,5 +1,5 @@ from . import PartyCatchActivityToonSD -from pandac.PandaModules import Vec4 +from panda3d.core import Vec4 from direct.directnotify import DirectNotifyGlobal from direct.interval.IntervalGlobal import Sequence, Parallel, Wait, Func from direct.interval.IntervalGlobal import LerpColorScaleInterval diff --git a/toontown/pets/DistributedPet.py b/toontown/pets/DistributedPet.py index 47d77e6..78f5a15 100644 --- a/toontown/pets/DistributedPet.py +++ b/toontown/pets/DistributedPet.py @@ -1,5 +1,5 @@ -from pandac.PandaModules import * -from pandac.PandaModules import * +from panda3d.core import * +from panda3d.core import * from direct.interval.IntervalGlobal import * from direct.showbase.PythonUtil import * from direct.directnotify import DirectNotifyGlobal diff --git a/toontown/pets/DistributedPetAI.py b/toontown/pets/DistributedPetAI.py index 8b6cc22..3092abc 100644 --- a/toontown/pets/DistributedPetAI.py +++ b/toontown/pets/DistributedPetAI.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.showbase.PythonUtil import weightedChoice, randFloat, lerp from direct.showbase.PythonUtil import contains, list2dict, clampScalar from direct.directnotify import DirectNotifyGlobal diff --git a/toontown/pets/Pet.py b/toontown/pets/Pet.py index e8bab8f..241f5f0 100644 --- a/toontown/pets/Pet.py +++ b/toontown/pets/Pet.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.directnotify import DirectNotifyGlobal from direct.interval.IntervalGlobal import * from direct.fsm.ClassicFSM import * diff --git a/toontown/pets/PetAvatarPanel.py b/toontown/pets/PetAvatarPanel.py index 0792e89..d665967 100644 --- a/toontown/pets/PetAvatarPanel.py +++ b/toontown/pets/PetAvatarPanel.py @@ -1,7 +1,7 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.directnotify.DirectNotifyGlobal import * from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from direct.showbase import DirectObject from direct.showbase.PythonUtil import Functor from direct.task.Task import Task diff --git a/toontown/pets/PetBrain.py b/toontown/pets/PetBrain.py index 29fce9b..86cd86f 100644 --- a/toontown/pets/PetBrain.py +++ b/toontown/pets/PetBrain.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from panda3d.toontown import * from direct.showbase.PythonUtil import weightedChoice, randFloat, Functor from direct.showbase.PythonUtil import list2dict diff --git a/toontown/pets/PetChase.py b/toontown/pets/PetChase.py index 599770a..4eb8232 100644 --- a/toontown/pets/PetChase.py +++ b/toontown/pets/PetChase.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.showbase.PythonUtil import reduceAngle from otp.movement import Impulse import math diff --git a/toontown/pets/PetCollider.py b/toontown/pets/PetCollider.py index 7f8d1d8..ad91015 100644 --- a/toontown/pets/PetCollider.py +++ b/toontown/pets/PetCollider.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.showbase.PythonUtil import reduceAngle from otp.movement import Impulse from otp.otpbase import OTPGlobals diff --git a/toontown/pets/PetConstants.py b/toontown/pets/PetConstants.py index 33d90fd..29485e5 100644 --- a/toontown/pets/PetConstants.py +++ b/toontown/pets/PetConstants.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase import ToontownGlobals from enum import IntEnum OurPetsMoodChangedKey = 'OurPetsMoodChanged' diff --git a/toontown/pets/PetDNA.py b/toontown/pets/PetDNA.py index 3de514e..a0b4b09 100644 --- a/toontown/pets/PetDNA.py +++ b/toontown/pets/PetDNA.py @@ -1,5 +1,5 @@ from toontown.toon import ToonDNA -from pandac.PandaModules import VBase4 +from panda3d.core import VBase4 from toontown.toonbase import TTLocalizer, ToontownGlobals from direct.showbase import PythonUtil NumFields = 9 diff --git a/toontown/pets/PetDetailPanel.py b/toontown/pets/PetDetailPanel.py index 5077b9e..220c640 100644 --- a/toontown/pets/PetDetailPanel.py +++ b/toontown/pets/PetDetailPanel.py @@ -1,7 +1,7 @@ -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase.ToontownGlobals import * from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from direct.showbase import DirectObject from direct.directnotify import DirectNotifyGlobal from toontown.toonbase import TTLocalizer diff --git a/toontown/pets/PetFlee.py b/toontown/pets/PetFlee.py index 38ac3a3..d690a91 100644 --- a/toontown/pets/PetFlee.py +++ b/toontown/pets/PetFlee.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.showbase.PythonUtil import reduceAngle from otp.movement import Impulse diff --git a/toontown/pets/PetGoalMgr.py b/toontown/pets/PetGoalMgr.py index 7571082..c601af4 100644 --- a/toontown/pets/PetGoalMgr.py +++ b/toontown/pets/PetGoalMgr.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.directnotify import DirectNotifyGlobal from direct.showbase import DirectObject from direct.showbase.PythonUtil import randFloat, lerp diff --git a/toontown/pets/PetLeash.py b/toontown/pets/PetLeash.py index 94de2f4..27ae805 100644 --- a/toontown/pets/PetLeash.py +++ b/toontown/pets/PetLeash.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from otp.movement import Impulse class PetLeash(Impulse.Impulse): diff --git a/toontown/pets/PetLookerAI.py b/toontown/pets/PetLookerAI.py index 5ef86dc..072bf54 100644 --- a/toontown/pets/PetLookerAI.py +++ b/toontown/pets/PetLookerAI.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.directnotify import DirectNotifyGlobal from direct.showbase import DirectObject from otp.ai.AIZoneData import AIZoneData diff --git a/toontown/pets/PetManager.py b/toontown/pets/PetManager.py index 2544aec..472edab 100644 --- a/toontown/pets/PetManager.py +++ b/toontown/pets/PetManager.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase import ToontownGlobals from direct.task import Task diff --git a/toontown/pets/PetNameGenerator.py b/toontown/pets/PetNameGenerator.py index 5d910ea..8c9a8a6 100644 --- a/toontown/pets/PetNameGenerator.py +++ b/toontown/pets/PetNameGenerator.py @@ -4,7 +4,7 @@ from toontown.toonbase import TTLocalizer import os from direct.showbase import AppRunnerGlobal from direct.directnotify import DirectNotifyGlobal -from pandac.PandaModules import * +from panda3d.core import * class PetNameGenerator: notify = DirectNotifyGlobal.directNotify.newCategory('PetNameGenerator') diff --git a/toontown/pets/PetSphere.py b/toontown/pets/PetSphere.py index e4677b5..f2393d7 100644 --- a/toontown/pets/PetSphere.py +++ b/toontown/pets/PetSphere.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.showbase.PythonUtil import reduceAngle from otp.movement import Impulse from otp.otpbase import OTPGlobals diff --git a/toontown/pets/PetTutorial.py b/toontown/pets/PetTutorial.py index fa2c305..aeac826 100644 --- a/toontown/pets/PetTutorial.py +++ b/toontown/pets/PetTutorial.py @@ -1,5 +1,5 @@ from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from direct.fsm import FSM from direct.directnotify import DirectNotifyGlobal from toontown.toonbase import ToontownGlobals diff --git a/toontown/pets/PetWander.py b/toontown/pets/PetWander.py index 4c95cec..7404d47 100644 --- a/toontown/pets/PetWander.py +++ b/toontown/pets/PetWander.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from panda3d.toontown import * from direct.showbase.PythonUtil import reduceAngle, randFloat, normalDistrib from direct.showbase import DirectObject diff --git a/toontown/pets/PetshopGUI.py b/toontown/pets/PetshopGUI.py index f27abaa..c276c85 100644 --- a/toontown/pets/PetshopGUI.py +++ b/toontown/pets/PetshopGUI.py @@ -1,5 +1,5 @@ from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from direct.directnotify import DirectNotifyGlobal from direct.showbase.DirectObject import DirectObject from toontown.toonbase import ToontownGlobals diff --git a/toontown/quest/BlinkingArrows.py b/toontown/quest/BlinkingArrows.py index 662b1e9..a0d225c 100644 --- a/toontown/quest/BlinkingArrows.py +++ b/toontown/quest/BlinkingArrows.py @@ -1,5 +1,5 @@ from direct.interval.IntervalGlobal import * -from pandac.PandaModules import * +from panda3d.core import * class BlinkingArrows: diff --git a/toontown/quest/QuestChoiceGui.py b/toontown/quest/QuestChoiceGui.py index 44c5e79..d363830 100644 --- a/toontown/quest/QuestChoiceGui.py +++ b/toontown/quest/QuestChoiceGui.py @@ -1,5 +1,5 @@ from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from . import QuestPoster from toontown.toonbase import ToontownTimer from toontown.toonbase import ToontownGlobals diff --git a/toontown/quest/QuestMap.py b/toontown/quest/QuestMap.py index 68897af..5e4afa7 100644 --- a/toontown/quest/QuestMap.py +++ b/toontown/quest/QuestMap.py @@ -1,5 +1,5 @@ import math -from pandac.PandaModules import CardMaker, TextNode +from panda3d.core import CardMaker, TextNode from direct.gui.DirectGui import DirectFrame, DirectLabel, DirectButton from direct.task import Task from toontown.toon import NPCToons diff --git a/toontown/quest/QuestMapGlobals.py b/toontown/quest/QuestMapGlobals.py index f1f042d..fea41e6 100644 --- a/toontown/quest/QuestMapGlobals.py +++ b/toontown/quest/QuestMapGlobals.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import Point3 +from panda3d.core import Point3 CogInfoPosTable = {'toontown_central_2100_english': Point3(-0.3, 0, -0.2), 'toontown_central_2200_english': Point3(0.2, 0, -0.2), 'toontown_central_2300_english': Point3(0.35, 0, -0.2), diff --git a/toontown/quest/QuestParser.py b/toontown/quest/QuestParser.py index 36d4e54..fa3a797 100644 --- a/toontown/quest/QuestParser.py +++ b/toontown/quest/QuestParser.py @@ -4,7 +4,7 @@ import tokenize import copy from direct.interval.IntervalGlobal import * from direct.directnotify import DirectNotifyGlobal -from pandac.PandaModules import * +from panda3d.core import * from direct.showbase import DirectObject from . import BlinkingArrows from toontown.toon import ToonHeadFrame diff --git a/toontown/quest/QuestPoster.py b/toontown/quest/QuestPoster.py index ff30cef..cd8d761 100644 --- a/toontown/quest/QuestPoster.py +++ b/toontown/quest/QuestPoster.py @@ -1,5 +1,5 @@ from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from . import Quests from toontown.toon import NPCToons from toontown.toon import ToonHead diff --git a/toontown/quest/QuestRewardCounter.py b/toontown/quest/QuestRewardCounter.py index 72d68b1..58b1466 100644 --- a/toontown/quest/QuestRewardCounter.py +++ b/toontown/quest/QuestRewardCounter.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.directnotify import DirectNotifyGlobal from . import Quests from toontown.toonbase import ToontownGlobals diff --git a/toontown/quest/TrackChoiceGui.py b/toontown/quest/TrackChoiceGui.py index 72a7c95..76d698c 100644 --- a/toontown/quest/TrackChoiceGui.py +++ b/toontown/quest/TrackChoiceGui.py @@ -1,5 +1,5 @@ from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase import ToontownTimer from toontown.toonbase import ToontownGlobals from toontown.toonbase import ToontownBattleGlobals diff --git a/toontown/racing/DistributedGag.py b/toontown/racing/DistributedGag.py index 515af14..ad035c7 100644 --- a/toontown/racing/DistributedGag.py +++ b/toontown/racing/DistributedGag.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.distributed import DistributedObject from direct.interval.ProjectileInterval import * from direct.interval.IntervalGlobal import * diff --git a/toontown/racing/DistributedLeaderBoard.py b/toontown/racing/DistributedLeaderBoard.py index aa72a4e..ee8b1af 100644 --- a/toontown/racing/DistributedLeaderBoard.py +++ b/toontown/racing/DistributedLeaderBoard.py @@ -4,7 +4,7 @@ from otp.otpbase import OTPTimer from toontown.toonbase import TTLocalizer from toontown.racing import KartShopGlobals from toontown.toonbase.ToonBaseGlobal import * -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase.ToontownGlobals import * import random import pickle diff --git a/toontown/racing/DistributedProjectile.py b/toontown/racing/DistributedProjectile.py index c2c9ced..fd1a73c 100644 --- a/toontown/racing/DistributedProjectile.py +++ b/toontown/racing/DistributedProjectile.py @@ -1,8 +1,8 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.distributed.ClockDelta import * from direct.interval.IntervalGlobal import * from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from direct.fsm import FSM from direct.distributed.DistributedSmoothNode import DistributedSmoothNode from otp.avatar.ShadowCaster import ShadowCaster diff --git a/toontown/racing/DistributedRace.py b/toontown/racing/DistributedRace.py index e62586d..c065083 100644 --- a/toontown/racing/DistributedRace.py +++ b/toontown/racing/DistributedRace.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from panda3d.toontown import * from direct.distributed.ClockDelta import * from direct.distributed import DistributedObject @@ -13,7 +13,7 @@ from .RaceGag import RaceGag from toontown.toonbase import ToontownGlobals, TTLocalizer from toontown.toon import ToonHeadFrame from toontown.racing.KartDNA import InvalidEntry, getAccessory, getDefaultColor -from pandac.PandaModules import CardMaker, OrthographicLens, LineSegs +from panda3d.core import CardMaker, OrthographicLens, LineSegs from direct.distributed import DistributedSmoothNode from math import fmod from math import sqrt diff --git a/toontown/racing/DistributedVehicle.py b/toontown/racing/DistributedVehicle.py index 7668356..e3a303e 100644 --- a/toontown/racing/DistributedVehicle.py +++ b/toontown/racing/DistributedVehicle.py @@ -1,9 +1,9 @@ -from pandac.PandaModules import * +from panda3d.core import * from panda3d.otp import * from direct.distributed.ClockDelta import * from direct.interval.IntervalGlobal import * from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from direct.fsm import FSM from direct.distributed import DistributedSmoothNode from direct.interval.IntervalGlobal import * diff --git a/toontown/racing/DistributedViewPad.py b/toontown/racing/DistributedViewPad.py index e7da249..a87b9bd 100644 --- a/toontown/racing/DistributedViewPad.py +++ b/toontown/racing/DistributedViewPad.py @@ -1,7 +1,7 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.ClockDelta import * from direct.task import Task -from pandac.PandaModules import * +from panda3d.core import * from toontown.racing.DistributedKartPad import DistributedKartPad from toontown.racing.KartShopGlobals import KartGlobals if (__debug__): diff --git a/toontown/racing/DroppedGag.py b/toontown/racing/DroppedGag.py index 9644645..51b5a29 100644 --- a/toontown/racing/DroppedGag.py +++ b/toontown/racing/DroppedGag.py @@ -1,6 +1,6 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from direct.interval.IntervalGlobal import * from otp.avatar import ShadowCaster diff --git a/toontown/racing/EffectManager.py b/toontown/racing/EffectManager.py index 3cc2e49..befb547 100644 --- a/toontown/racing/EffectManager.py +++ b/toontown/racing/EffectManager.py @@ -1,5 +1,5 @@ -from pandac.PandaModules import * -from pandac.PandaModules import * +from panda3d.core import * +from panda3d.core import * from direct.showbase.DirectObject import DirectObject from direct.interval.IntervalGlobal import * from toontown.battle.BattleProps import * diff --git a/toontown/racing/FlyingGag.py b/toontown/racing/FlyingGag.py index 0ca3b85..902521c 100644 --- a/toontown/racing/FlyingGag.py +++ b/toontown/racing/FlyingGag.py @@ -1,6 +1,6 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from direct.interval.IntervalGlobal import * from otp.avatar.ShadowCaster import ShadowCaster diff --git a/toontown/racing/Kart.py b/toontown/racing/Kart.py index a4d551d..fd19504 100644 --- a/toontown/racing/Kart.py +++ b/toontown/racing/Kart.py @@ -1,7 +1,7 @@ from direct.directnotify import DirectNotifyGlobal -from pandac.PandaModules import * +from panda3d.core import * from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from direct.interval.IntervalGlobal import * from otp.avatar import ShadowCaster from toontown.racing.KartDNA import * diff --git a/toontown/racing/KartDNA.py b/toontown/racing/KartDNA.py index 8d3e7fc..a33b049 100644 --- a/toontown/racing/KartDNA.py +++ b/toontown/racing/KartDNA.py @@ -1,6 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from toontown.toonbase import TTLocalizer -from pandac.PandaModules import * +from panda3d.core import * from .KartShopGlobals import * from enum import IntEnum if (__debug__): diff --git a/toontown/racing/KartShopGui.py b/toontown/racing/KartShopGui.py index 41f7b70..547c903 100644 --- a/toontown/racing/KartShopGui.py +++ b/toontown/racing/KartShopGui.py @@ -1,9 +1,9 @@ if __name__ == '__main__': from direct.directbase import DirectStart -from pandac.PandaModules import * +from panda3d.core import * from direct.directnotify import DirectNotifyGlobal from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from direct.showbase import DirectObject from toontown.toonbase import ToontownGlobals, TTLocalizer from toontown.toonbase import TTLocalizer diff --git a/toontown/racing/Piejectile.py b/toontown/racing/Piejectile.py index 2013044..d991f96 100644 --- a/toontown/racing/Piejectile.py +++ b/toontown/racing/Piejectile.py @@ -3,7 +3,7 @@ import random from direct.showbase.PythonUtil import * from direct.showbase.DirectObject import DirectObject from direct.task import Task -from pandac.PandaModules import * +from panda3d.core import * from direct.fsm import FSM from direct.distributed import DistributedSmoothNode from otp.avatar import ShadowCaster diff --git a/toontown/racing/PiejectileManager.py b/toontown/racing/PiejectileManager.py index 93b7ed4..9281a10 100644 --- a/toontown/racing/PiejectileManager.py +++ b/toontown/racing/PiejectileManager.py @@ -1,5 +1,5 @@ -from pandac.PandaModules import * -from pandac.PandaModules import * +from panda3d.core import * +from panda3d.core import * from direct.showbase.DirectObject import DirectObject from direct.interval.IntervalGlobal import * from toontown.battle.BattleProps import * diff --git a/toontown/racing/RaceEndPanels.py b/toontown/racing/RaceEndPanels.py index 21d8da9..b3b5124 100644 --- a/toontown/racing/RaceEndPanels.py +++ b/toontown/racing/RaceEndPanels.py @@ -1,5 +1,5 @@ from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from direct.directnotify import DirectNotifyGlobal from direct.interval.IntervalGlobal import * from toontown.toonbase import ToontownGlobals diff --git a/toontown/racing/RaceGUI.py b/toontown/racing/RaceGUI.py index 90fe4ff..87dd55b 100644 --- a/toontown/racing/RaceGUI.py +++ b/toontown/racing/RaceGUI.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.showbase.PythonUtil import clampScalar from direct.distributed.ClockDelta import * from direct.distributed import DistributedObject @@ -15,7 +15,7 @@ from toontown.racing.RaceHeadFrame import RaceHeadFrame from toontown.racing.RaceGag import RaceGag from toontown.racing.RaceEndPanels import RaceEndPanel from toontown.racing import RaceGlobals -from pandac.PandaModules import CardMaker, OrthographicLens, LineSegs +from panda3d.core import CardMaker, OrthographicLens, LineSegs from direct.particles.ParticleEffect import * from math import fmod from math import sqrt diff --git a/toontown/racing/RaceGag.py b/toontown/racing/RaceGag.py index 4810f73..dd6d658 100644 --- a/toontown/racing/RaceGag.py +++ b/toontown/racing/RaceGag.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.interval.IntervalGlobal import * from direct.showbase import DirectObject from .DroppedGag import * diff --git a/toontown/racing/RaceHeadFrame.py b/toontown/racing/RaceHeadFrame.py index 040fd6c..1b44950 100644 --- a/toontown/racing/RaceHeadFrame.py +++ b/toontown/racing/RaceHeadFrame.py @@ -1,5 +1,5 @@ from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase import ToontownGlobals from toontown.toon import ToonHead diff --git a/toontown/safezone/BRPlayground.py b/toontown/safezone/BRPlayground.py index 09e2a51..dd9bd45 100644 --- a/toontown/safezone/BRPlayground.py +++ b/toontown/safezone/BRPlayground.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from . import Playground from direct.task.Task import Task import random diff --git a/toontown/safezone/BRSafeZoneLoader.py b/toontown/safezone/BRSafeZoneLoader.py index 06a7540..6dfe15a 100644 --- a/toontown/safezone/BRSafeZoneLoader.py +++ b/toontown/safezone/BRSafeZoneLoader.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.interval.IntervalGlobal import * from . import SafeZoneLoader from . import BRPlayground diff --git a/toontown/safezone/ButterflyGlobals.py b/toontown/safezone/ButterflyGlobals.py index 26ade71..cd2d194 100644 --- a/toontown/safezone/ButterflyGlobals.py +++ b/toontown/safezone/ButterflyGlobals.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * import random OFF = 0 FLYING = 1 diff --git a/toontown/safezone/DDPlayground.py b/toontown/safezone/DDPlayground.py index 3ca1996..b99f491 100644 --- a/toontown/safezone/DDPlayground.py +++ b/toontown/safezone/DDPlayground.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from . import Playground from direct.task.Task import Task import random diff --git a/toontown/safezone/DDSafeZoneLoader.py b/toontown/safezone/DDSafeZoneLoader.py index 3c952c9..8cf6d91 100644 --- a/toontown/safezone/DDSafeZoneLoader.py +++ b/toontown/safezone/DDSafeZoneLoader.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from . import SafeZoneLoader from . import DDPlayground from direct.fsm import State diff --git a/toontown/safezone/DGPlayground.py b/toontown/safezone/DGPlayground.py index 582c074..ab988c0 100644 --- a/toontown/safezone/DGPlayground.py +++ b/toontown/safezone/DGPlayground.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from . import Playground import random from direct.task import Task diff --git a/toontown/safezone/DGSafeZoneLoader.py b/toontown/safezone/DGSafeZoneLoader.py index 08e106c..4818757 100644 --- a/toontown/safezone/DGSafeZoneLoader.py +++ b/toontown/safezone/DGSafeZoneLoader.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from . import SafeZoneLoader from . import DGPlayground diff --git a/toontown/safezone/DLPlayground.py b/toontown/safezone/DLPlayground.py index 507d09f..c646d48 100644 --- a/toontown/safezone/DLPlayground.py +++ b/toontown/safezone/DLPlayground.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from . import Playground import random diff --git a/toontown/safezone/DLSafeZoneLoader.py b/toontown/safezone/DLSafeZoneLoader.py index 9f29487..3d9bf8c 100644 --- a/toontown/safezone/DLSafeZoneLoader.py +++ b/toontown/safezone/DLSafeZoneLoader.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from . import SafeZoneLoader from . import DLPlayground diff --git a/toontown/safezone/DistributedBoat.py b/toontown/safezone/DistributedBoat.py index abf92d2..1a9f012 100644 --- a/toontown/safezone/DistributedBoat.py +++ b/toontown/safezone/DistributedBoat.py @@ -1,10 +1,10 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.distributed.ClockDelta import * from direct.interval.IntervalGlobal import * from direct.distributed import DistributedObject from direct.fsm import ClassicFSM, State from direct.fsm import State -from pandac.PandaModules import NodePath +from panda3d.core import NodePath from direct.directutil import Mopath from toontown.toonbase import ToontownGlobals diff --git a/toontown/safezone/DistributedButterfly.py b/toontown/safezone/DistributedButterfly.py index c35ce87..c6be8f2 100644 --- a/toontown/safezone/DistributedButterfly.py +++ b/toontown/safezone/DistributedButterfly.py @@ -1,11 +1,12 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.distributed.ClockDelta import * from direct.interval.IntervalGlobal import * +from panda3d.direct import ShowInterval, HideInterval from direct.directnotify import DirectNotifyGlobal from direct.distributed import DistributedObject from direct.fsm import ClassicFSM, State from direct.fsm import State -from pandac.PandaModules import NodePath +from panda3d.core import NodePath from direct.directutil import Mopath from toontown.toonbase import ToontownGlobals from direct.actor import Actor diff --git a/toontown/safezone/DistributedCheckers.py b/toontown/safezone/DistributedCheckers.py index 632c2a4..5051f79 100644 --- a/toontown/safezone/DistributedCheckers.py +++ b/toontown/safezone/DistributedCheckers.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.distributed.ClockDelta import * from direct.task.Task import Task from direct.interval.IntervalGlobal import * diff --git a/toontown/safezone/DistributedChineseCheckers.py b/toontown/safezone/DistributedChineseCheckers.py index 2b6ee01..d7247fa 100644 --- a/toontown/safezone/DistributedChineseCheckers.py +++ b/toontown/safezone/DistributedChineseCheckers.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.distributed.ClockDelta import * from direct.task.Task import Task from direct.interval.IntervalGlobal import * diff --git a/toontown/safezone/DistributedDGFlower.py b/toontown/safezone/DistributedDGFlower.py index 75b7106..aa0813e 100644 --- a/toontown/safezone/DistributedDGFlower.py +++ b/toontown/safezone/DistributedDGFlower.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.distributed.ClockDelta import * from direct.distributed import DistributedObject from toontown.toonbase import ToontownGlobals diff --git a/toontown/safezone/DistributedEFlyingTreasure.py b/toontown/safezone/DistributedEFlyingTreasure.py index 70b44be..ccc7b83 100644 --- a/toontown/safezone/DistributedEFlyingTreasure.py +++ b/toontown/safezone/DistributedEFlyingTreasure.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase.ToonBaseGlobal import * from . import DistributedSZTreasure from direct.task.Task import Task diff --git a/toontown/safezone/DistributedFindFour.py b/toontown/safezone/DistributedFindFour.py index 15bc53d..9060d17 100644 --- a/toontown/safezone/DistributedFindFour.py +++ b/toontown/safezone/DistributedFindFour.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.distributed.ClockDelta import * from direct.task.Task import Task from direct.interval.IntervalGlobal import * diff --git a/toontown/safezone/DistributedFishingSpot.py b/toontown/safezone/DistributedFishingSpot.py index 7db9a56..a61a5cb 100644 --- a/toontown/safezone/DistributedFishingSpot.py +++ b/toontown/safezone/DistributedFishingSpot.py @@ -1,7 +1,7 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.interval.IntervalGlobal import * from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from direct.directtools.DirectGeometry import LineNodePath from direct.distributed import DistributedObject from direct.directnotify import DirectNotifyGlobal diff --git a/toontown/safezone/DistributedGolfKart.py b/toontown/safezone/DistributedGolfKart.py index 0dfc8f1..11c4bd2 100644 --- a/toontown/safezone/DistributedGolfKart.py +++ b/toontown/safezone/DistributedGolfKart.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.distributed.ClockDelta import * from direct.task.Task import Task from direct.interval.IntervalGlobal import * diff --git a/toontown/safezone/DistributedMMPiano.py b/toontown/safezone/DistributedMMPiano.py index d44e753..e86491a 100644 --- a/toontown/safezone/DistributedMMPiano.py +++ b/toontown/safezone/DistributedMMPiano.py @@ -1,9 +1,9 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.task.Task import Task from direct.distributed.ClockDelta import * from direct.interval.IntervalGlobal import * from direct.distributed import DistributedObject -from pandac.PandaModules import NodePath +from panda3d.core import NodePath from toontown.toonbase import ToontownGlobals ChangeDirectionDebounce = 1.0 ChangeDirectionTime = 1.0 diff --git a/toontown/safezone/DistributedPartyGate.py b/toontown/safezone/DistributedPartyGate.py index 4488220..56c639e 100644 --- a/toontown/safezone/DistributedPartyGate.py +++ b/toontown/safezone/DistributedPartyGate.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import Point3, CollisionSphere, CollisionNode, BitMask32, Vec3, NodePath, TextNode, Vec4 +from panda3d.core import Point3, CollisionSphere, CollisionNode, BitMask32, Vec3, NodePath, TextNode, Vec4 from otp.otpbase import OTPGlobals from otp.otpbase import OTPLocalizer from direct.interval.IntervalGlobal import Sequence, Parallel, SoundInterval diff --git a/toontown/safezone/DistributedPicnicBasket.py b/toontown/safezone/DistributedPicnicBasket.py index d9d1f46..2a4cf5b 100644 --- a/toontown/safezone/DistributedPicnicBasket.py +++ b/toontown/safezone/DistributedPicnicBasket.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.distributed.ClockDelta import * from direct.task.Task import Task from direct.interval.IntervalGlobal import * diff --git a/toontown/safezone/DistributedPicnicTable.py b/toontown/safezone/DistributedPicnicTable.py index 8d4bfc3..055e423 100644 --- a/toontown/safezone/DistributedPicnicTable.py +++ b/toontown/safezone/DistributedPicnicTable.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.distributed.ClockDelta import * from direct.task.Task import Task from direct.interval.IntervalGlobal import * diff --git a/toontown/safezone/DistributedSZTreasure.py b/toontown/safezone/DistributedSZTreasure.py index 5b1c989..1546c01 100644 --- a/toontown/safezone/DistributedSZTreasure.py +++ b/toontown/safezone/DistributedSZTreasure.py @@ -1,5 +1,5 @@ from . import DistributedTreasure -from pandac.PandaModules import VBase3, VBase4 +from panda3d.core import VBase3, VBase4 from direct.interval.IntervalGlobal import Sequence, Wait, Func, LerpColorScaleInterval, LerpScaleInterval from toontown.toonbase import ToontownGlobals diff --git a/toontown/safezone/DistributedTreasure.py b/toontown/safezone/DistributedTreasure.py index 7025ff4..436ec24 100644 --- a/toontown/safezone/DistributedTreasure.py +++ b/toontown/safezone/DistributedTreasure.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.interval.IntervalGlobal import * from toontown.toonbase.ToontownGlobals import * from direct.distributed import DistributedObject diff --git a/toontown/safezone/DistributedTrolley.py b/toontown/safezone/DistributedTrolley.py index 1687a8a..cc955a5 100644 --- a/toontown/safezone/DistributedTrolley.py +++ b/toontown/safezone/DistributedTrolley.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.distributed.ClockDelta import * from direct.task.Task import Task from direct.interval.IntervalGlobal import * diff --git a/toontown/safezone/GSPlayground.py b/toontown/safezone/GSPlayground.py index 8a45cab..20f73c9 100644 --- a/toontown/safezone/GSPlayground.py +++ b/toontown/safezone/GSPlayground.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase import ToontownGlobals from . import Playground from toontown.launcher import DownloadForceAcknowledge diff --git a/toontown/safezone/GSSafeZoneLoader.py b/toontown/safezone/GSSafeZoneLoader.py index ce21cb9..9df77d4 100644 --- a/toontown/safezone/GSSafeZoneLoader.py +++ b/toontown/safezone/GSSafeZoneLoader.py @@ -1,7 +1,7 @@ from direct.directnotify import DirectNotifyGlobal from direct.fsm import ClassicFSM, State from direct.fsm import State -from pandac.PandaModules import * +from panda3d.core import * from toontown.hood import ZoneUtil from toontown.launcher import DownloadForceAcknowledge from toontown.safezone.SafeZoneLoader import SafeZoneLoader diff --git a/toontown/safezone/GZPlayground.py b/toontown/safezone/GZPlayground.py index 106209f..5c1c3c6 100644 --- a/toontown/safezone/GZPlayground.py +++ b/toontown/safezone/GZPlayground.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase import ToontownGlobals from . import Playground from toontown.launcher import DownloadForceAcknowledge diff --git a/toontown/safezone/GZSafeZoneLoader.py b/toontown/safezone/GZSafeZoneLoader.py index 94e255d..2011fe8 100644 --- a/toontown/safezone/GZSafeZoneLoader.py +++ b/toontown/safezone/GZSafeZoneLoader.py @@ -2,7 +2,7 @@ from direct.directnotify import DirectNotifyGlobal from direct.gui import DirectGui from direct.fsm import ClassicFSM, State from direct.fsm import State -from pandac.PandaModules import * +from panda3d.core import * from toontown.hood import ZoneUtil from toontown.launcher import DownloadForceAcknowledge from toontown.safezone.SafeZoneLoader import SafeZoneLoader diff --git a/toontown/safezone/GameMenu.py b/toontown/safezone/GameMenu.py index 5582e4a..fb57262 100644 --- a/toontown/safezone/GameMenu.py +++ b/toontown/safezone/GameMenu.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.distributed.ClockDelta import * from direct.task.Task import Task from direct.interval.IntervalGlobal import * diff --git a/toontown/safezone/GameTutorials.py b/toontown/safezone/GameTutorials.py index b2578c7..0ab80b5 100644 --- a/toontown/safezone/GameTutorials.py +++ b/toontown/safezone/GameTutorials.py @@ -3,7 +3,7 @@ from direct.fsm import FSM from direct.directnotify import DirectNotifyGlobal from toontown.toonbase import ToontownGlobals from toontown.toonbase import TTLocalizer -from pandac.PandaModules import * +from panda3d.core import * from direct.interval.IntervalGlobal import * class ChineseTutorial(DirectFrame, FSM.FSM): diff --git a/toontown/safezone/GolfKart.py b/toontown/safezone/GolfKart.py index b95091b..7e8dc39 100644 --- a/toontown/safezone/GolfKart.py +++ b/toontown/safezone/GolfKart.py @@ -1,7 +1,7 @@ -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase.ToonBaseGlobal import * from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from direct.interval.IntervalGlobal import * from direct.fsm import ClassicFSM, State from direct.fsm import State diff --git a/toontown/safezone/MMPlayground.py b/toontown/safezone/MMPlayground.py index b58b726..a2b9fb6 100644 --- a/toontown/safezone/MMPlayground.py +++ b/toontown/safezone/MMPlayground.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from . import Playground import random from direct.fsm import ClassicFSM, State diff --git a/toontown/safezone/MMSafeZoneLoader.py b/toontown/safezone/MMSafeZoneLoader.py index 21c347d..8d9da0c 100644 --- a/toontown/safezone/MMSafeZoneLoader.py +++ b/toontown/safezone/MMSafeZoneLoader.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from . import SafeZoneLoader from . import MMPlayground from toontown.toonbase import ToontownGlobals diff --git a/toontown/safezone/OZPlayground.py b/toontown/safezone/OZPlayground.py index 383137b..3f85a90 100644 --- a/toontown/safezone/OZPlayground.py +++ b/toontown/safezone/OZPlayground.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase import ToontownGlobals from . import Playground from toontown.launcher import DownloadForceAcknowledge diff --git a/toontown/safezone/OZSafeZoneLoader.py b/toontown/safezone/OZSafeZoneLoader.py index abaf077..d4d6887 100644 --- a/toontown/safezone/OZSafeZoneLoader.py +++ b/toontown/safezone/OZSafeZoneLoader.py @@ -1,7 +1,7 @@ from direct.directnotify import DirectNotifyGlobal from direct.fsm import ClassicFSM, State from direct.fsm import State -from pandac.PandaModules import * +from panda3d.core import * from otp.avatar import Avatar from toontown.hood import ZoneUtil from toontown.launcher import DownloadForceAcknowledge diff --git a/toontown/safezone/PicnicBasket.py b/toontown/safezone/PicnicBasket.py index 93aea6a..9034004 100644 --- a/toontown/safezone/PicnicBasket.py +++ b/toontown/safezone/PicnicBasket.py @@ -1,7 +1,7 @@ -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase.ToonBaseGlobal import * from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from direct.interval.IntervalGlobal import * from direct.fsm import ClassicFSM, State from direct.fsm import State diff --git a/toontown/safezone/Playground.py b/toontown/safezone/Playground.py index 93328d6..2a7a18e 100644 --- a/toontown/safezone/Playground.py +++ b/toontown/safezone/Playground.py @@ -1,5 +1,5 @@ from direct.interval.IntervalGlobal import * -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase.ToonBaseGlobal import * from direct.directnotify import DirectNotifyGlobal from toontown.hood import Place diff --git a/toontown/safezone/PublicWalk.py b/toontown/safezone/PublicWalk.py index 8adba1b..03d8516 100644 --- a/toontown/safezone/PublicWalk.py +++ b/toontown/safezone/PublicWalk.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase.ToontownGlobals import * from direct.directnotify import DirectNotifyGlobal from . import Walk diff --git a/toontown/safezone/SafeZoneLoader.py b/toontown/safezone/SafeZoneLoader.py index 3e5fd62..94c6118 100644 --- a/toontown/safezone/SafeZoneLoader.py +++ b/toontown/safezone/SafeZoneLoader.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase.ToonBaseGlobal import * from toontown.distributed.ToontownMsgTypes import * from toontown.hood import ZoneUtil diff --git a/toontown/safezone/SafeZoneManager.py b/toontown/safezone/SafeZoneManager.py index 6890e03..1f32875 100644 --- a/toontown/safezone/SafeZoneManager.py +++ b/toontown/safezone/SafeZoneManager.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.distributed import DistributedObject from direct.directnotify import DirectNotifyGlobal diff --git a/toontown/safezone/TTPlayground.py b/toontown/safezone/TTPlayground.py index eed2c71..236201f 100644 --- a/toontown/safezone/TTPlayground.py +++ b/toontown/safezone/TTPlayground.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase import ToontownGlobals from . import Playground import random diff --git a/toontown/safezone/TTSafeZoneLoader.py b/toontown/safezone/TTSafeZoneLoader.py index 4c71d23..e9919ca 100644 --- a/toontown/safezone/TTSafeZoneLoader.py +++ b/toontown/safezone/TTSafeZoneLoader.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from . import SafeZoneLoader from . import TTPlayground import random diff --git a/toontown/safezone/Train.py b/toontown/safezone/Train.py index 04d2881..a82b23f 100644 --- a/toontown/safezone/Train.py +++ b/toontown/safezone/Train.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.showbase.DirectObject import DirectObject from direct.interval.IntervalGlobal import * from direct.distributed.ClockDelta import globalClockDelta diff --git a/toontown/safezone/Walk.py b/toontown/safezone/Walk.py index 0ec522b..e5671ef 100644 --- a/toontown/safezone/Walk.py +++ b/toontown/safezone/Walk.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.task.Task import Task from direct.directnotify import DirectNotifyGlobal from direct.fsm import StateData diff --git a/toontown/shtiker/DeleteManager.py b/toontown/shtiker/DeleteManager.py index 46af28f..81f579c 100644 --- a/toontown/shtiker/DeleteManager.py +++ b/toontown/shtiker/DeleteManager.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.distributed import DistributedObject from direct.directnotify import DirectNotifyGlobal diff --git a/toontown/shtiker/DisguisePage.py b/toontown/shtiker/DisguisePage.py index 37ed60e..c8a591f 100644 --- a/toontown/shtiker/DisguisePage.py +++ b/toontown/shtiker/DisguisePage.py @@ -1,6 +1,6 @@ from . import ShtikerPage from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase import ToontownGlobals from toontown.toonbase import TTLocalizer from toontown.suit import SuitDNA diff --git a/toontown/shtiker/FishPage.py b/toontown/shtiker/FishPage.py index f5d17bf..7af5c01 100644 --- a/toontown/shtiker/FishPage.py +++ b/toontown/shtiker/FishPage.py @@ -2,7 +2,7 @@ from toontown.toonbase import ToontownGlobals from . import ShtikerPage from direct.directnotify import DirectNotifyGlobal from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase import TTLocalizer from toontown.fishing import FishPicker from toontown.fishing import FishBrowser diff --git a/toontown/shtiker/GardenPage.py b/toontown/shtiker/GardenPage.py index bcebd92..0bc586e 100644 --- a/toontown/shtiker/GardenPage.py +++ b/toontown/shtiker/GardenPage.py @@ -1,7 +1,7 @@ from direct.directnotify import DirectNotifyGlobal from . import ShtikerPage from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase import TTLocalizer from toontown.estate import FlowerBrowser from toontown.estate import GardenGlobals diff --git a/toontown/shtiker/GolfPage.py b/toontown/shtiker/GolfPage.py index f1f3b34..dc7a07b 100644 --- a/toontown/shtiker/GolfPage.py +++ b/toontown/shtiker/GolfPage.py @@ -1,6 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from direct.task import Task from toontown.fishing.FishPhoto import DirectRegion from toontown.shtiker.ShtikerPage import ShtikerPage diff --git a/toontown/shtiker/HtmlView.py b/toontown/shtiker/HtmlView.py index e05228e..57e5283 100644 --- a/toontown/shtiker/HtmlView.py +++ b/toontown/shtiker/HtmlView.py @@ -2,17 +2,17 @@ import array, sys from direct.showbase.DirectObject import DirectObject from direct.task.Task import Task from direct.directnotify import DirectNotifyGlobal -from pandac.PandaModules import Texture -from pandac.PandaModules import CardMaker -from pandac.PandaModules import NodePath -from pandac.PandaModules import Point3, Vec3, Vec4, VBase4D, Point2 -from pandac.PandaModules import PNMImage -from pandac.PandaModules import TextureStage -from pandac.PandaModules import Texture -from pandac.PandaModules import WindowProperties +from panda3d.core import Texture +from panda3d.core import CardMaker +from panda3d.core import NodePath +from panda3d.core import Point3, Vec3, Vec4, VBase4D, Point2 +from panda3d.core import PNMImage +from panda3d.core import TextureStage +from panda3d.core import Texture +from panda3d.core import WindowProperties from direct.interval.IntervalGlobal import * -from pandac.PandaModules import AwWebView -from pandac.PandaModules import AwWebCore +from panda3d.core import AwWebView +from panda3d.core import AwWebCore WEB_WIDTH_PIXELS = 784 WEB_HEIGHT_PIXELS = 451 WEB_WIDTH = 1024 diff --git a/toontown/shtiker/InventoryPage.py b/toontown/shtiker/InventoryPage.py index 84bb903..a494fa1 100644 --- a/toontown/shtiker/InventoryPage.py +++ b/toontown/shtiker/InventoryPage.py @@ -1,7 +1,7 @@ from . import ShtikerPage from toontown.toonbase import ToontownBattleGlobals from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase import ToontownGlobals from toontown.toonbase import TTLocalizer diff --git a/toontown/shtiker/IssueFrame.py b/toontown/shtiker/IssueFrame.py index 11eee88..58b2f82 100644 --- a/toontown/shtiker/IssueFrame.py +++ b/toontown/shtiker/IssueFrame.py @@ -1,8 +1,8 @@ import os -from pandac.PandaModules import VirtualFileSystem, Filename, DSearchPath -from pandac.PandaModules import Texture, CardMaker, PNMImage, TextureStage -from pandac.PandaModules import NodePath -from pandac.PandaModules import Point2 +from panda3d.core import VirtualFileSystem, Filename, DSearchPath +from panda3d.core import Texture, CardMaker, PNMImage, TextureStage +from panda3d.core import NodePath +from panda3d.core import Point2 from direct.showbase import DirectObject from direct.gui.DirectGui import DirectFrame, DirectButton, DGG, DirectLabel from direct.directnotify import DirectNotifyGlobal diff --git a/toontown/shtiker/KartPage.py b/toontown/shtiker/KartPage.py index 01d6003..2180a78 100644 --- a/toontown/shtiker/KartPage.py +++ b/toontown/shtiker/KartPage.py @@ -1,6 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from direct.task import Task from toontown.fishing.FishPhoto import DirectRegion from toontown.racing.KartDNA import * diff --git a/toontown/shtiker/MapPage.py b/toontown/shtiker/MapPage.py index 3bab03a..26673bf 100644 --- a/toontown/shtiker/MapPage.py +++ b/toontown/shtiker/MapPage.py @@ -4,7 +4,7 @@ from direct.showbase import PythonUtil from otp.otpbase import PythonUtil as OTPPythonUtil from toontown.hood import ZoneUtil from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase import TTLocalizer class MapPage(ShtikerPage.ShtikerPage): diff --git a/toontown/shtiker/NPCFriendPage.py b/toontown/shtiker/NPCFriendPage.py index a12f0cc..a6d5b52 100644 --- a/toontown/shtiker/NPCFriendPage.py +++ b/toontown/shtiker/NPCFriendPage.py @@ -1,6 +1,6 @@ from . import ShtikerPage from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from toontown.toon import NPCFriendPanel from toontown.toonbase import TTLocalizer diff --git a/toontown/shtiker/PhotoAlbumPage.py b/toontown/shtiker/PhotoAlbumPage.py index 24cf619..5352179 100644 --- a/toontown/shtiker/PhotoAlbumPage.py +++ b/toontown/shtiker/PhotoAlbumPage.py @@ -1,7 +1,7 @@ -from pandac.PandaModules import * +from panda3d.core import * from . import ShtikerPage from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase import TTLocalizer import os from toontown.toonbase import ToontownGlobals diff --git a/toontown/shtiker/PurchaseManager.py b/toontown/shtiker/PurchaseManager.py index c67e8eb..455ef85 100644 --- a/toontown/shtiker/PurchaseManager.py +++ b/toontown/shtiker/PurchaseManager.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from .PurchaseManagerConstants import * from direct.distributed.ClockDelta import * from direct.distributed import DistributedObject diff --git a/toontown/shtiker/PurchaseManagerAI.py b/toontown/shtiker/PurchaseManagerAI.py index ac5e33d..78f631d 100644 --- a/toontown/shtiker/PurchaseManagerAI.py +++ b/toontown/shtiker/PurchaseManagerAI.py @@ -1,5 +1,5 @@ from otp.ai.AIBaseGlobal import * -from pandac.PandaModules import * +from panda3d.core import * from direct.distributed.ClockDelta import * from .PurchaseManagerConstants import * import copy diff --git a/toontown/shtiker/QuestPage.py b/toontown/shtiker/QuestPage.py index 0b90c5e..a306a07 100644 --- a/toontown/shtiker/QuestPage.py +++ b/toontown/shtiker/QuestPage.py @@ -1,7 +1,7 @@ -from pandac.PandaModules import * +from panda3d.core import * from . import ShtikerPage from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from toontown.quest import Quests from toontown.toon import NPCToons from toontown.hood import ZoneUtil diff --git a/toontown/shtiker/ShardPage.py b/toontown/shtiker/ShardPage.py index 9525cc3..ebcc726 100644 --- a/toontown/shtiker/ShardPage.py +++ b/toontown/shtiker/ShardPage.py @@ -1,8 +1,8 @@ -from pandac.PandaModules import * +from panda3d.core import * from . import ShtikerPage from direct.task.Task import Task from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase import TTLocalizer from direct.directnotify import DirectNotifyGlobal from toontown.hood import ZoneUtil diff --git a/toontown/shtiker/ShtikerBook.py b/toontown/shtiker/ShtikerBook.py index 7d5728d..d4e2c75 100644 --- a/toontown/shtiker/ShtikerBook.py +++ b/toontown/shtiker/ShtikerBook.py @@ -1,10 +1,10 @@ -from pandac.PandaModules import * +from panda3d.core import * from panda3d.otp import * from toontown.toonbase import ToontownGlobals from direct.showbase import DirectObject from direct.fsm import StateData from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase import TTLocalizer from toontown.effects import DistributedFireworkShow from toontown.parties import DistributedPartyFireworksActivity diff --git a/toontown/shtiker/ShtikerPage.py b/toontown/shtiker/ShtikerPage.py index f09ffa9..8e7c022 100644 --- a/toontown/shtiker/ShtikerPage.py +++ b/toontown/shtiker/ShtikerPage.py @@ -1,7 +1,7 @@ from . import ShtikerBook from direct.fsm import StateData from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * class ShtikerPage(DirectFrame, StateData.StateData): diff --git a/toontown/shtiker/SuitPage.py b/toontown/shtiker/SuitPage.py index da9a3ae..852dbc1 100644 --- a/toontown/shtiker/SuitPage.py +++ b/toontown/shtiker/SuitPage.py @@ -2,7 +2,7 @@ from . import ShtikerPage from direct.task.Task import Task from . import SummonCogDialog from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase import ToontownGlobals from toontown.toonbase import TTLocalizer from toontown.suit import SuitDNA diff --git a/toontown/shtiker/SummonCogDialog.py b/toontown/shtiker/SummonCogDialog.py index a944b6e..1a7a279 100644 --- a/toontown/shtiker/SummonCogDialog.py +++ b/toontown/shtiker/SummonCogDialog.py @@ -1,5 +1,5 @@ from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from direct.directnotify import DirectNotifyGlobal from direct.fsm import StateData from toontown.toonbase import TTLocalizer diff --git a/toontown/shtiker/TIPPage.py b/toontown/shtiker/TIPPage.py index 24c3e7d..c231d28 100644 --- a/toontown/shtiker/TIPPage.py +++ b/toontown/shtiker/TIPPage.py @@ -1,7 +1,7 @@ -from pandac.PandaModules import * +from panda3d.core import * from . import ShtikerPage from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from toontown.toon import NPCToons from toontown.hood import ZoneUtil from toontown.toonbase import ToontownGlobals diff --git a/toontown/shtiker/TrackPage.py b/toontown/shtiker/TrackPage.py index 4a5e5e3..030909a 100644 --- a/toontown/shtiker/TrackPage.py +++ b/toontown/shtiker/TrackPage.py @@ -1,7 +1,7 @@ -from pandac.PandaModules import * +from panda3d.core import * from . import ShtikerPage from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from toontown.quest import Quests from toontown.toonbase import ToontownGlobals from toontown.toonbase import ToontownBattleGlobals diff --git a/toontown/suit/BossCog.py b/toontown/suit/BossCog.py index 89028c4..4765038 100644 --- a/toontown/suit/BossCog.py +++ b/toontown/suit/BossCog.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from panda3d.otp import * from direct.interval.IntervalGlobal import * from direct.actor import Actor diff --git a/toontown/suit/DistributedBossCog.py b/toontown/suit/DistributedBossCog.py index d3759fc..ab17bb9 100644 --- a/toontown/suit/DistributedBossCog.py +++ b/toontown/suit/DistributedBossCog.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from panda3d.otp import * from direct.interval.IntervalGlobal import * from direct.distributed.ClockDelta import * diff --git a/toontown/suit/DistributedBossCogAI.py b/toontown/suit/DistributedBossCogAI.py index 534269e..51b995c 100644 --- a/toontown/suit/DistributedBossCogAI.py +++ b/toontown/suit/DistributedBossCogAI.py @@ -8,7 +8,7 @@ from toontown.battle import DistributedBattleFinalAI from toontown.building import SuitPlannerInteriorAI from toontown.battle import BattleBase from toontown.coghq import CogDisguiseGlobals -from pandac.PandaModules import * +from panda3d.core import * from toontown.suit import SuitDNA import random AllBossCogs = [] diff --git a/toontown/suit/DistributedBossbotBoss.py b/toontown/suit/DistributedBossbotBoss.py index 00769eb..d2edfb5 100644 --- a/toontown/suit/DistributedBossbotBoss.py +++ b/toontown/suit/DistributedBossbotBoss.py @@ -1,6 +1,6 @@ import math import random -from pandac.PandaModules import VBase3, CollisionPlane, CollisionNode, CollisionSphere, CollisionTube, NodePath, Plane, Vec3, Vec2, Point3, BitMask32, CollisionHandlerEvent, TextureStage, VBase4, BoundingSphere +from panda3d.core import VBase3, CollisionPlane, CollisionNode, CollisionSphere, CollisionTube, NodePath, Plane, Vec3, Vec2, Point3, BitMask32, CollisionHandlerEvent, TextureStage, VBase4, BoundingSphere from panda3d.otp import NametagGroup, CFSpeech from direct.interval.IntervalGlobal import Sequence, Wait, Func, LerpHprInterval, Parallel, LerpPosInterval, Track, ActorInterval, ParallelEndTogether, LerpFunctionInterval, LerpScaleInterval, LerpPosHprInterval, SoundInterval from direct.task import Task diff --git a/toontown/suit/DistributedBossbotBossAI.py b/toontown/suit/DistributedBossbotBossAI.py index 0469b41..4bfa03d 100644 --- a/toontown/suit/DistributedBossbotBossAI.py +++ b/toontown/suit/DistributedBossbotBossAI.py @@ -1,5 +1,5 @@ import random, math -from pandac.PandaModules import Point3 +from panda3d.core import Point3 from direct.directnotify import DirectNotifyGlobal from direct.fsm import FSM from direct.interval.IntervalGlobal import LerpPosInterval diff --git a/toontown/suit/DistributedCashbotBoss.py b/toontown/suit/DistributedCashbotBoss.py index 346a14c..db5d9f7 100644 --- a/toontown/suit/DistributedCashbotBoss.py +++ b/toontown/suit/DistributedCashbotBoss.py @@ -18,7 +18,7 @@ from toontown.battle import RewardPanel from toontown.distributed import DelayDelete from toontown.chat import ResistanceChat from toontown.coghq import CogDisguiseGlobals -from pandac.PandaModules import * +from panda3d.core import * from panda3d.otp import * import random import math diff --git a/toontown/suit/DistributedCashbotBossAI.py b/toontown/suit/DistributedCashbotBossAI.py index 8bec91c..25aaab3 100644 --- a/toontown/suit/DistributedCashbotBossAI.py +++ b/toontown/suit/DistributedCashbotBossAI.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.directnotify import DirectNotifyGlobal from toontown.toonbase import ToontownGlobals from toontown.coghq import DistributedCashbotBossCraneAI diff --git a/toontown/suit/DistributedCashbotBossGoon.py b/toontown/suit/DistributedCashbotBossGoon.py index c32fba6..99c04b7 100644 --- a/toontown/suit/DistributedCashbotBossGoon.py +++ b/toontown/suit/DistributedCashbotBossGoon.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.interval.IntervalGlobal import * from direct.task.TaskManagerGlobal import * from direct.distributed.ClockDelta import * diff --git a/toontown/suit/DistributedCashbotBossGoonAI.py b/toontown/suit/DistributedCashbotBossGoonAI.py index 1115fc2..201d0d8 100644 --- a/toontown/suit/DistributedCashbotBossGoonAI.py +++ b/toontown/suit/DistributedCashbotBossGoonAI.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.task.TaskManagerGlobal import * from direct.distributed.ClockDelta import * from direct.interval.IntervalGlobal import * diff --git a/toontown/suit/DistributedFactorySuit.py b/toontown/suit/DistributedFactorySuit.py index 53bc743..d6110f7 100644 --- a/toontown/suit/DistributedFactorySuit.py +++ b/toontown/suit/DistributedFactorySuit.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.interval.IntervalGlobal import * from direct.fsm import ClassicFSM, State from direct.fsm import State diff --git a/toontown/suit/DistributedGoon.py b/toontown/suit/DistributedGoon.py index 03887e5..62e8fc8 100644 --- a/toontown/suit/DistributedGoon.py +++ b/toontown/suit/DistributedGoon.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.interval.IntervalGlobal import * from toontown.battle.BattleProps import * from .GoonGlobals import * diff --git a/toontown/suit/DistributedGridGoon.py b/toontown/suit/DistributedGridGoon.py index 6746618..91da109 100644 --- a/toontown/suit/DistributedGridGoon.py +++ b/toontown/suit/DistributedGridGoon.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.interval.IntervalGlobal import * from toontown.battle.BattleProps import * from direct.directnotify import DirectNotifyGlobal diff --git a/toontown/suit/DistributedLawbotBoss.py b/toontown/suit/DistributedLawbotBoss.py index 81e7748..fbb93ce 100644 --- a/toontown/suit/DistributedLawbotBoss.py +++ b/toontown/suit/DistributedLawbotBoss.py @@ -5,7 +5,7 @@ from direct.distributed.ClockDelta import * from direct.showbase.PythonUtil import Functor from direct.showbase.PythonUtil import StackTrace from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from panda3d.otp import * from direct.fsm import FSM from direct.fsm import ClassicFSM diff --git a/toontown/suit/DistributedLawbotBossSuit.py b/toontown/suit/DistributedLawbotBossSuit.py index 22281d4..179b6d7 100644 --- a/toontown/suit/DistributedLawbotBossSuit.py +++ b/toontown/suit/DistributedLawbotBossSuit.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.interval.IntervalGlobal import * from direct.fsm import ClassicFSM, State from direct.fsm import State diff --git a/toontown/suit/DistributedSellbotBoss.py b/toontown/suit/DistributedSellbotBoss.py index c0b2263..ddbba5b 100644 --- a/toontown/suit/DistributedSellbotBoss.py +++ b/toontown/suit/DistributedSellbotBoss.py @@ -1,11 +1,11 @@ -from pandac.PandaModules import * +from panda3d.core import * from panda3d.otp import * from direct.interval.IntervalGlobal import * from toontown.battle.BattleProps import * from direct.distributed.ClockDelta import * from direct.showbase.PythonUtil import Functor from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from direct.fsm import FSM from direct.fsm import ClassicFSM, State from direct.fsm import State diff --git a/toontown/suit/DistributedStageSuit.py b/toontown/suit/DistributedStageSuit.py index 9bc3594..4bb06be 100644 --- a/toontown/suit/DistributedStageSuit.py +++ b/toontown/suit/DistributedStageSuit.py @@ -5,7 +5,7 @@ from direct.actor import Actor from otp.avatar import Avatar from . import SuitDNA from toontown.toonbase import ToontownGlobals -from pandac.PandaModules import * +from panda3d.core import * from toontown.battle import SuitBattleGlobals from direct.task import Task from toontown.battle import BattleProps diff --git a/toontown/suit/DistributedSuit.py b/toontown/suit/DistributedSuit.py index f8163b3..9e6bce9 100644 --- a/toontown/suit/DistributedSuit.py +++ b/toontown/suit/DistributedSuit.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from panda3d.otp import * from panda3d.toontown import * from direct.interval.IntervalGlobal import * diff --git a/toontown/suit/DistributedSuitAI.py b/toontown/suit/DistributedSuitAI.py index 838461c..1ceefec 100644 --- a/toontown/suit/DistributedSuitAI.py +++ b/toontown/suit/DistributedSuitAI.py @@ -1,5 +1,5 @@ from otp.ai.AIBaseGlobal import * -from pandac.PandaModules import * +from panda3d.core import * from panda3d.toontown import * from direct.distributed.ClockDelta import * from otp.avatar import DistributedAvatarAI diff --git a/toontown/suit/DistributedSuitBase.py b/toontown/suit/DistributedSuitBase.py index 369a1fa..5be2626 100644 --- a/toontown/suit/DistributedSuitBase.py +++ b/toontown/suit/DistributedSuitBase.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from panda3d.otp import * from direct.interval.IntervalGlobal import * from direct.distributed.ClockDelta import * diff --git a/toontown/suit/DistributedSuitPlanner.py b/toontown/suit/DistributedSuitPlanner.py index 18057ef..dac3b81 100644 --- a/toontown/suit/DistributedSuitPlanner.py +++ b/toontown/suit/DistributedSuitPlanner.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.distributed import DistributedObject from . import SuitPlannerBase from toontown.toonbase import ToontownGlobals diff --git a/toontown/suit/DistributedTutorialSuit.py b/toontown/suit/DistributedTutorialSuit.py index 9d7ba46..607d6af 100644 --- a/toontown/suit/DistributedTutorialSuit.py +++ b/toontown/suit/DistributedTutorialSuit.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.fsm import ClassicFSM, State from direct.fsm import State from direct.directnotify import DirectNotifyGlobal diff --git a/toontown/suit/Goon.py b/toontown/suit/Goon.py index dc88bfe..d771895 100644 --- a/toontown/suit/Goon.py +++ b/toontown/suit/Goon.py @@ -1,8 +1,8 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.actor import Actor from otp.avatar import Avatar from toontown.toonbase import ToontownGlobals -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase import TTLocalizer from . import GoonGlobals from . import SuitDNA diff --git a/toontown/suit/GoonDeath.py b/toontown/suit/GoonDeath.py index 70ad3db..c118cbc 100644 --- a/toontown/suit/GoonDeath.py +++ b/toontown/suit/GoonDeath.py @@ -1,5 +1,5 @@ from direct.interval.IntervalGlobal import * -from pandac.PandaModules import * +from panda3d.core import * from direct.particles import ParticleEffect from toontown.battle import BattleParticles diff --git a/toontown/suit/GoonGlobals.py b/toontown/suit/GoonGlobals.py index e633324..6f2a2de 100644 --- a/toontown/suit/GoonGlobals.py +++ b/toontown/suit/GoonGlobals.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import Vec4 +from panda3d.core import Vec4 PG_COLORS = [Vec4(0.95, 0.0, 0.0, 1.0), Vec4(0.75, 0.35, 0.1, 1.0)] SG_COLORS = [Vec4(0.0, 0.0, 0.95, 1.0), Vec4(0.35, 0.0, 0.75, 1.0)] GOON_FORWARD = 1 diff --git a/toontown/suit/GoonPathData.py b/toontown/suit/GoonPathData.py index 8c56206..24b512e 100644 --- a/toontown/suit/GoonPathData.py +++ b/toontown/suit/GoonPathData.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase import ToontownGlobals taskZoneId2pathId = {ToontownGlobals.SellbotFactoryInt: 'sellbotFactory', ToontownGlobals.CashbotMintIntA: 'cashbotMint', diff --git a/toontown/suit/RoguesGallery.py b/toontown/suit/RoguesGallery.py index f22b69c..de3a746 100644 --- a/toontown/suit/RoguesGallery.py +++ b/toontown/suit/RoguesGallery.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.fsm import StateData from . import Suit from . import SuitDNA diff --git a/toontown/suit/SellbotBossGlobals.py b/toontown/suit/SellbotBossGlobals.py index c6deb11..ec1f08d 100644 --- a/toontown/suit/SellbotBossGlobals.py +++ b/toontown/suit/SellbotBossGlobals.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from toontown.coghq import DistributedHealBarrelAI from toontown.coghq import DistributedGagBarrelAI PieToonup = 1 diff --git a/toontown/suit/SuitAvatarPanel.py b/toontown/suit/SuitAvatarPanel.py index 77674e6..11c5f74 100644 --- a/toontown/suit/SuitAvatarPanel.py +++ b/toontown/suit/SuitAvatarPanel.py @@ -1,6 +1,6 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from direct.showbase import DirectObject from otp.avatar import Avatar from direct.distributed import DistributedObject diff --git a/toontown/suit/SuitBase.py b/toontown/suit/SuitBase.py index 9413f26..3e18b75 100644 --- a/toontown/suit/SuitBase.py +++ b/toontown/suit/SuitBase.py @@ -1,9 +1,9 @@ -from pandac.PandaModules import * +from panda3d.core import * from panda3d.toontown import * from direct.distributed.ClockDelta import * import math import random -from pandac.PandaModules import Point3 +from panda3d.core import Point3 from direct.directnotify import DirectNotifyGlobal from toontown.battle import SuitBattleGlobals from . import SuitTimings diff --git a/toontown/suit/SuitDNA.py b/toontown/suit/SuitDNA.py index eda8a1c..0380bd2 100644 --- a/toontown/suit/SuitDNA.py +++ b/toontown/suit/SuitDNA.py @@ -1,5 +1,5 @@ import random -from pandac.PandaModules import * +from panda3d.core import * from direct.directnotify.DirectNotifyGlobal import * from toontown.toonbase import TTLocalizer import random diff --git a/toontown/suit/SuitPlannerBase.py b/toontown/suit/SuitPlannerBase.py index a88c0cc..44c5a5f 100644 --- a/toontown/suit/SuitPlannerBase.py +++ b/toontown/suit/SuitPlannerBase.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from panda3d.toontown import * import random import string diff --git a/toontown/toon/AvatarPanelBase.py b/toontown/toon/AvatarPanelBase.py index abfa145..7a2f576 100644 --- a/toontown/toon/AvatarPanelBase.py +++ b/toontown/toon/AvatarPanelBase.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.gui.DirectGui import * from direct.showbase import DirectObject from otp.avatar import AvatarPanel diff --git a/toontown/toon/BoardingGroupInviterPanels.py b/toontown/toon/BoardingGroupInviterPanels.py index 1f33910..9bc984d 100644 --- a/toontown/toon/BoardingGroupInviterPanels.py +++ b/toontown/toon/BoardingGroupInviterPanels.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase.ToontownGlobals import * from direct.showbase import DirectObject from direct.directnotify import DirectNotifyGlobal diff --git a/toontown/toon/DeathForceAcknowledge.py b/toontown/toon/DeathForceAcknowledge.py index c9e39c8..717b686 100644 --- a/toontown/toon/DeathForceAcknowledge.py +++ b/toontown/toon/DeathForceAcknowledge.py @@ -1,9 +1,9 @@ -from pandac.PandaModules import * +from panda3d.core import * from toontown.toontowngui import TTDialog from toontown.toonbase import TTLocalizer from direct.showbase import Transitions from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from . import LaffMeter class DeathForceAcknowledge: diff --git a/toontown/toon/DistributedNPCBlocker.py b/toontown/toon/DistributedNPCBlocker.py index d866b3b..d6237c9 100644 --- a/toontown/toon/DistributedNPCBlocker.py +++ b/toontown/toon/DistributedNPCBlocker.py @@ -1,7 +1,7 @@ -from pandac.PandaModules import * +from panda3d.core import * from .DistributedNPCToonBase import * from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from . import NPCToons from toontown.toonbase import TTLocalizer from direct.distributed import DistributedObject diff --git a/toontown/toon/DistributedNPCBlockerAI.py b/toontown/toon/DistributedNPCBlockerAI.py index c8f42aa..a79042f 100644 --- a/toontown/toon/DistributedNPCBlockerAI.py +++ b/toontown/toon/DistributedNPCBlockerAI.py @@ -1,5 +1,5 @@ from otp.ai.AIBaseGlobal import * -from pandac.PandaModules import * +from panda3d.core import * from .DistributedNPCToonBaseAI import * from . import NPCToons from direct.task.Task import Task diff --git a/toontown/toon/DistributedNPCClerk.py b/toontown/toon/DistributedNPCClerk.py index e42a428..39f9d9f 100644 --- a/toontown/toon/DistributedNPCClerk.py +++ b/toontown/toon/DistributedNPCClerk.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from .DistributedNPCToonBase import * from toontown.minigame import ClerkPurchase from toontown.shtiker.PurchaseManagerConstants import * diff --git a/toontown/toon/DistributedNPCClerkAI.py b/toontown/toon/DistributedNPCClerkAI.py index 0659ffe..39e452b 100644 --- a/toontown/toon/DistributedNPCClerkAI.py +++ b/toontown/toon/DistributedNPCClerkAI.py @@ -1,6 +1,6 @@ from otp.ai.AIBaseGlobal import * from direct.task.Task import Task -from pandac.PandaModules import * +from panda3d.core import * from .DistributedNPCToonBaseAI import * class DistributedNPCClerkAI(DistributedNPCToonBaseAI): diff --git a/toontown/toon/DistributedNPCFisherman.py b/toontown/toon/DistributedNPCFisherman.py index c7bd8e9..4774fc0 100644 --- a/toontown/toon/DistributedNPCFisherman.py +++ b/toontown/toon/DistributedNPCFisherman.py @@ -1,7 +1,7 @@ -from pandac.PandaModules import * +from panda3d.core import * from .DistributedNPCToonBase import * from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from . import NPCToons from toontown.toonbase import TTLocalizer from toontown.fishing import FishSellGUI diff --git a/toontown/toon/DistributedNPCFishermanAI.py b/toontown/toon/DistributedNPCFishermanAI.py index 2b5d32b..b1f2bd2 100644 --- a/toontown/toon/DistributedNPCFishermanAI.py +++ b/toontown/toon/DistributedNPCFishermanAI.py @@ -1,5 +1,5 @@ from otp.ai.AIBaseGlobal import * -from pandac.PandaModules import * +from panda3d.core import * from .DistributedNPCToonBaseAI import * from toontown.fishing import FishGlobals from toontown.toonbase import TTLocalizer diff --git a/toontown/toon/DistributedNPCFlippyInToonHall.py b/toontown/toon/DistributedNPCFlippyInToonHall.py index 06bb30d..f0f83f5 100644 --- a/toontown/toon/DistributedNPCFlippyInToonHall.py +++ b/toontown/toon/DistributedNPCFlippyInToonHall.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from .DistributedNPCToon import * class DistributedNPCFlippyInToonHall(DistributedNPCToon): diff --git a/toontown/toon/DistributedNPCKartClerk.py b/toontown/toon/DistributedNPCKartClerk.py index 26f3323..8786439 100644 --- a/toontown/toon/DistributedNPCKartClerk.py +++ b/toontown/toon/DistributedNPCKartClerk.py @@ -1,6 +1,6 @@ from .DistributedNPCToonBase import * from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from . import NPCToons from direct.task.Task import Task from toontown.toonbase import TTLocalizer diff --git a/toontown/toon/DistributedNPCKartClerkAI.py b/toontown/toon/DistributedNPCKartClerkAI.py index 45c2090..364fa52 100644 --- a/toontown/toon/DistributedNPCKartClerkAI.py +++ b/toontown/toon/DistributedNPCKartClerkAI.py @@ -1,5 +1,5 @@ from otp.ai.AIBaseGlobal import * -from pandac.PandaModules import * +from panda3d.core import * from .DistributedNPCToonBaseAI import * from toontown.toonbase import TTLocalizer from direct.task import Task diff --git a/toontown/toon/DistributedNPCPetclerk.py b/toontown/toon/DistributedNPCPetclerk.py index 07ed766..c4669cf 100644 --- a/toontown/toon/DistributedNPCPetclerk.py +++ b/toontown/toon/DistributedNPCPetclerk.py @@ -1,7 +1,7 @@ -from pandac.PandaModules import * +from panda3d.core import * from .DistributedNPCToonBase import * from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from . import NPCToons from direct.task.Task import Task from toontown.toonbase import TTLocalizer diff --git a/toontown/toon/DistributedNPCPetclerkAI.py b/toontown/toon/DistributedNPCPetclerkAI.py index 07c875f..9ff2d0a 100644 --- a/toontown/toon/DistributedNPCPetclerkAI.py +++ b/toontown/toon/DistributedNPCPetclerkAI.py @@ -1,5 +1,5 @@ from otp.ai.AIBaseGlobal import * -from pandac.PandaModules import * +from panda3d.core import * from .DistributedNPCToonBaseAI import * from toontown.toonbase import TTLocalizer from direct.task import Task diff --git a/toontown/toon/DistributedNPCScientist.py b/toontown/toon/DistributedNPCScientist.py index 96ae63e..d029c50 100644 --- a/toontown/toon/DistributedNPCScientist.py +++ b/toontown/toon/DistributedNPCScientist.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase import TTLocalizer, ToontownGlobals from . import DistributedNPCToonBase diff --git a/toontown/toon/DistributedNPCSpecialQuestGiver.py b/toontown/toon/DistributedNPCSpecialQuestGiver.py index d7d78d5..ca77b1e 100644 --- a/toontown/toon/DistributedNPCSpecialQuestGiver.py +++ b/toontown/toon/DistributedNPCSpecialQuestGiver.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from .DistributedNPCToonBase import * from toontown.quest import QuestParser from toontown.quest import QuestChoiceGui diff --git a/toontown/toon/DistributedNPCSpecialQuestGiverAI.py b/toontown/toon/DistributedNPCSpecialQuestGiverAI.py index 3f6d01f..1cc67e1 100644 --- a/toontown/toon/DistributedNPCSpecialQuestGiverAI.py +++ b/toontown/toon/DistributedNPCSpecialQuestGiverAI.py @@ -1,6 +1,6 @@ from otp.ai.AIBaseGlobal import * from direct.task.Task import Task -from pandac.PandaModules import * +from panda3d.core import * from .DistributedNPCToonBaseAI import * from toontown.quest import Quests diff --git a/toontown/toon/DistributedNPCTailor.py b/toontown/toon/DistributedNPCTailor.py index 3d3cb85..85b0546 100644 --- a/toontown/toon/DistributedNPCTailor.py +++ b/toontown/toon/DistributedNPCTailor.py @@ -1,7 +1,7 @@ -from pandac.PandaModules import * +from panda3d.core import * from .DistributedNPCToonBase import * from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from . import NPCToons from direct.task.Task import Task from . import TailorClothesGUI diff --git a/toontown/toon/DistributedNPCTailorAI.py b/toontown/toon/DistributedNPCTailorAI.py index 611a905..c5b39f7 100644 --- a/toontown/toon/DistributedNPCTailorAI.py +++ b/toontown/toon/DistributedNPCTailorAI.py @@ -1,5 +1,5 @@ from otp.ai.AIBaseGlobal import * -from pandac.PandaModules import * +from panda3d.core import * from .DistributedNPCToonBaseAI import * from . import ToonDNA from direct.task.Task import Task diff --git a/toontown/toon/DistributedNPCToon.py b/toontown/toon/DistributedNPCToon.py index 23c7220..8ddc61e 100644 --- a/toontown/toon/DistributedNPCToon.py +++ b/toontown/toon/DistributedNPCToon.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from .DistributedNPCToonBase import * from toontown.quest import QuestParser from toontown.quest import QuestChoiceGui diff --git a/toontown/toon/DistributedNPCToonAI.py b/toontown/toon/DistributedNPCToonAI.py index f547567..44a8ecd 100644 --- a/toontown/toon/DistributedNPCToonAI.py +++ b/toontown/toon/DistributedNPCToonAI.py @@ -1,6 +1,6 @@ from otp.ai.AIBaseGlobal import * from direct.task.Task import Task -from pandac.PandaModules import * +from panda3d.core import * from .DistributedNPCToonBaseAI import * from toontown.quest import Quests diff --git a/toontown/toon/DistributedNPCToonBase.py b/toontown/toon/DistributedNPCToonBase.py index 81f248a..b3b687c 100644 --- a/toontown/toon/DistributedNPCToonBase.py +++ b/toontown/toon/DistributedNPCToonBase.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from panda3d.otp import * from direct.directnotify import DirectNotifyGlobal from direct.fsm import ClassicFSM diff --git a/toontown/toon/DistributedNPCToonBaseAI.py b/toontown/toon/DistributedNPCToonBaseAI.py index 2ce8894..8ac54cf 100644 --- a/toontown/toon/DistributedNPCToonBaseAI.py +++ b/toontown/toon/DistributedNPCToonBaseAI.py @@ -1,5 +1,5 @@ from otp.ai.AIBaseGlobal import * -from pandac.PandaModules import * +from panda3d.core import * from . import DistributedToonAI from direct.fsm import ClassicFSM from direct.fsm import State diff --git a/toontown/toon/DistributedToon.py b/toontown/toon/DistributedToon.py index 15366ac..0602211 100644 --- a/toontown/toon/DistributedToon.py +++ b/toontown/toon/DistributedToon.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from panda3d.otp import * from toontown.toonbase.ToontownGlobals import * from direct.distributed.ClockDelta import * diff --git a/toontown/toon/DistributedToonAI.py b/toontown/toon/DistributedToonAI.py index 536300b..bee965d 100644 --- a/toontown/toon/DistributedToonAI.py +++ b/toontown/toon/DistributedToonAI.py @@ -1,5 +1,5 @@ from otp.ai.AIBaseGlobal import * -from pandac.PandaModules import * +from panda3d.core import * from otp.otpbase import OTPGlobals from direct.directnotify import DirectNotifyGlobal from . import ToonDNA diff --git a/toontown/toon/ElevatorNotifier.py b/toontown/toon/ElevatorNotifier.py index 9d23ef5..dcc2739 100644 --- a/toontown/toon/ElevatorNotifier.py +++ b/toontown/toon/ElevatorNotifier.py @@ -2,7 +2,7 @@ from direct.directnotify import DirectNotifyGlobal from toontown.toonbase import ToontownGlobals from toontown.toonbase import TTLocalizer from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from toontown.toontowngui import TTDialog class ElevatorNotifier: diff --git a/toontown/toon/Experience.py b/toontown/toon/Experience.py index 82c9280..a867b11 100644 --- a/toontown/toon/Experience.py +++ b/toontown/toon/Experience.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase.ToontownBattleGlobals import * from direct.directnotify import DirectNotifyGlobal from direct.distributed.PyDatagram import PyDatagram diff --git a/toontown/toon/GroupInvitee.py b/toontown/toon/GroupInvitee.py index 9bd2be2..e9697b2 100644 --- a/toontown/toon/GroupInvitee.py +++ b/toontown/toon/GroupInvitee.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase.ToontownGlobals import * from direct.showbase import DirectObject from direct.directnotify import DirectNotifyGlobal diff --git a/toontown/toon/GroupPanel.py b/toontown/toon/GroupPanel.py index d89473c..ed1fb2e 100644 --- a/toontown/toon/GroupPanel.py +++ b/toontown/toon/GroupPanel.py @@ -2,7 +2,7 @@ from direct.directnotify import DirectNotifyGlobal from toontown.toonbase import ToontownGlobals from toontown.toonbase import TTLocalizer from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from direct.showbase import DirectObject from toontown.toon import ToonAvatarPanel from toontown.toontowngui import TTDialog diff --git a/toontown/toon/HealthForceAcknowledge.py b/toontown/toon/HealthForceAcknowledge.py index 2df18ca..dd9c8dc 100644 --- a/toontown/toon/HealthForceAcknowledge.py +++ b/toontown/toon/HealthForceAcknowledge.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from toontown.toontowngui import TTDialog from toontown.toonbase import TTLocalizer diff --git a/toontown/toon/InventoryBase.py b/toontown/toon/InventoryBase.py index 5179a7b..f4af9c7 100644 --- a/toontown/toon/InventoryBase.py +++ b/toontown/toon/InventoryBase.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase import ToontownGlobals from toontown.toonbase.ToontownBattleGlobals import * from direct.showbase import DirectObject diff --git a/toontown/toon/InventoryNew.py b/toontown/toon/InventoryNew.py index d9fe2c4..e3fe6a9 100644 --- a/toontown/toon/InventoryNew.py +++ b/toontown/toon/InventoryNew.py @@ -1,5 +1,5 @@ from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase.ToontownBattleGlobals import * from . import InventoryBase from toontown.toonbase import TTLocalizer diff --git a/toontown/toon/LaffMeter.py b/toontown/toon/LaffMeter.py index 40ef7d4..a5cf585 100644 --- a/toontown/toon/LaffMeter.py +++ b/toontown/toon/LaffMeter.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import Vec4 +from panda3d.core import Vec4 from direct.gui.DirectGui import DirectFrame, DirectLabel from toontown.toonbase import ToontownGlobals from toontown.toonbase import ToontownIntervals diff --git a/toontown/toon/LocalToon.py b/toontown/toon/LocalToon.py index 5700367..bb49c97 100644 --- a/toontown/toon/LocalToon.py +++ b/toontown/toon/LocalToon.py @@ -11,7 +11,7 @@ from direct.task import Task from direct.showbase import PythonUtil from direct.directnotify import DirectNotifyGlobal from direct.gui import DirectGuiGlobals -from pandac.PandaModules import * +from panda3d.core import * from otp.avatar import LocalAvatar from otp.login import LeaveToPayDialog from otp.avatar import PositionExaminer diff --git a/toontown/toon/NPCForceAcknowledge.py b/toontown/toon/NPCForceAcknowledge.py index 76baa2c..3d5e8f8 100644 --- a/toontown/toon/NPCForceAcknowledge.py +++ b/toontown/toon/NPCForceAcknowledge.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from toontown.toontowngui import TTDialog from toontown.toonbase import TTLocalizer from direct.gui import DirectLabel diff --git a/toontown/toon/NPCFriendPanel.py b/toontown/toon/NPCFriendPanel.py index dfdb158..f527f60 100644 --- a/toontown/toon/NPCFriendPanel.py +++ b/toontown/toon/NPCFriendPanel.py @@ -1,6 +1,6 @@ from direct.gui.DirectGui import * from direct.directnotify import DirectNotifyGlobal -from pandac.PandaModules import * +from panda3d.core import * from . import NPCToons from . import ToonHead from . import ToonDNA diff --git a/toontown/toon/PlayerDetailPanel.py b/toontown/toon/PlayerDetailPanel.py index 7b7b1cc..a4eb669 100644 --- a/toontown/toon/PlayerDetailPanel.py +++ b/toontown/toon/PlayerDetailPanel.py @@ -1,7 +1,7 @@ -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase.ToontownGlobals import * from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from direct.showbase import DirectObject from direct.fsm import ClassicFSM, State from direct.fsm import State diff --git a/toontown/toon/PlayerInfoPanel.py b/toontown/toon/PlayerInfoPanel.py index 0d928c0..739c964 100644 --- a/toontown/toon/PlayerInfoPanel.py +++ b/toontown/toon/PlayerInfoPanel.py @@ -1,6 +1,6 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from direct.showbase import DirectObject from toontown.friends import FriendHandle from otp.avatar import Avatar diff --git a/toontown/toon/TTEmote.py b/toontown/toon/TTEmote.py index ed7c193..e08809f 100644 --- a/toontown/toon/TTEmote.py +++ b/toontown/toon/TTEmote.py @@ -4,7 +4,7 @@ from otp.otpbase import OTPLocalizer from toontown.toonbase import TTLocalizer from otp.otpbase import OTPLocalizer from direct.showbase import PythonUtil -from pandac.PandaModules import * +from panda3d.core import * from panda3d.otp import * from otp.avatar import Emote from direct.directnotify import DirectNotifyGlobal diff --git a/toontown/toon/ToonAvatarDetailPanel.py b/toontown/toon/ToonAvatarDetailPanel.py index ac087eb..e9b8365 100644 --- a/toontown/toon/ToonAvatarDetailPanel.py +++ b/toontown/toon/ToonAvatarDetailPanel.py @@ -1,7 +1,7 @@ -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase.ToontownGlobals import * from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from direct.showbase import DirectObject from direct.fsm import ClassicFSM, State from direct.fsm import State diff --git a/toontown/toon/ToonAvatarPanel.py b/toontown/toon/ToonAvatarPanel.py index 8b6e639..ba42168 100644 --- a/toontown/toon/ToonAvatarPanel.py +++ b/toontown/toon/ToonAvatarPanel.py @@ -1,6 +1,6 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from direct.showbase import DirectObject from . import ToonHead from toontown.friends import FriendHandle diff --git a/toontown/toon/ToonDNA.py b/toontown/toon/ToonDNA.py index 4507efc..2961625 100644 --- a/toontown/toon/ToonDNA.py +++ b/toontown/toon/ToonDNA.py @@ -1,5 +1,5 @@ import random -from pandac.PandaModules import * +from panda3d.core import * from direct.directnotify.DirectNotifyGlobal import * import random from direct.distributed.PyDatagram import PyDatagram diff --git a/toontown/toon/ToonHeadFrame.py b/toontown/toon/ToonHeadFrame.py index 53f1ca1..6cce003 100644 --- a/toontown/toon/ToonHeadFrame.py +++ b/toontown/toon/ToonHeadFrame.py @@ -1,5 +1,5 @@ from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from panda3d.otp import * from . import ToonHead from toontown.distributed import DelayDelete diff --git a/toontown/toon/ToonTeleportPanel.py b/toontown/toon/ToonTeleportPanel.py index ec6b5a1..8857bee 100644 --- a/toontown/toon/ToonTeleportPanel.py +++ b/toontown/toon/ToonTeleportPanel.py @@ -1,6 +1,6 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase import ToontownGlobals from direct.showbase import DirectObject from direct.fsm import ClassicFSM, State diff --git a/toontown/toonbase/DisplayOptions.py b/toontown/toonbase/DisplayOptions.py index c6bf3e4..362185a 100644 --- a/toontown/toonbase/DisplayOptions.py +++ b/toontown/toonbase/DisplayOptions.py @@ -3,7 +3,7 @@ import string import os import sys import datetime -from pandac.PandaModules import loadPrcFileData, WindowProperties +from panda3d.core import loadPrcFileData, WindowProperties from otp.otpgui import OTPDialog from otp.otpbase import OTPGlobals from otp.otpbase import OTPRender diff --git a/toontown/toonbase/TTLocalizerEnglish.py b/toontown/toonbase/TTLocalizerEnglish.py index edc2bd4..925284f 100644 --- a/toontown/toonbase/TTLocalizerEnglish.py +++ b/toontown/toonbase/TTLocalizerEnglish.py @@ -5209,7 +5209,7 @@ PetTutorialPage2 = "Use the new 'Pets' area in the SpeedChat menu to get a Doodl PetTutorialPage3 = "Purchase new Doodle tricks from Clarabelle's Cattlelog. Better tricks give better Toon-Ups!" def getPetGuiAlign(): - from pandac.PandaModules import TextNode + from panda3d.core import TextNode return TextNode.ACenter diff --git a/toontown/toonbase/ToontownLoader.py b/toontown/toonbase/ToontownLoader.py index 1f76fc7..cafa772 100644 --- a/toontown/toonbase/ToontownLoader.py +++ b/toontown/toonbase/ToontownLoader.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from panda3d.toontown import * from direct.directnotify.DirectNotifyGlobal import * from direct.showbase import Loader diff --git a/toontown/toonbase/ToontownTimer.py b/toontown/toonbase/ToontownTimer.py index 28e2e0f..97372d4 100644 --- a/toontown/toonbase/ToontownTimer.py +++ b/toontown/toonbase/ToontownTimer.py @@ -1,5 +1,5 @@ from otp.otpbase.OTPTimer import OTPTimer -from pandac.PandaModules import * +from panda3d.core import * class ToontownTimer(OTPTimer): diff --git a/toontown/toontowngui/NewsPageButtonManager.py b/toontown/toontowngui/NewsPageButtonManager.py index 50d74e0..f09ec2b 100644 --- a/toontown/toontowngui/NewsPageButtonManager.py +++ b/toontown/toontowngui/NewsPageButtonManager.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import VBase4, VBase3 +from panda3d.core import VBase4, VBase3 from direct.fsm import FSM from direct.directnotify import DirectNotifyGlobal from direct.gui.DirectButton import DirectButton diff --git a/toontown/toontowngui/TeaserPanel.py b/toontown/toontowngui/TeaserPanel.py index 21ba569..bffabea 100644 --- a/toontown/toontowngui/TeaserPanel.py +++ b/toontown/toontowngui/TeaserPanel.py @@ -1,7 +1,7 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.gui.DirectGui import * from direct.gui import DirectGuiGlobals -from pandac.PandaModules import * +from panda3d.core import * from direct.directnotify import DirectNotifyGlobal from . import TTDialog from toontown.toonbase import TTLocalizer diff --git a/toontown/toontowngui/ToonHeadDialog.py b/toontown/toontowngui/ToonHeadDialog.py index a6929c7..3855948 100644 --- a/toontown/toontowngui/ToonHeadDialog.py +++ b/toontown/toontowngui/ToonHeadDialog.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase.ToontownGlobals import * from direct.directnotify import DirectNotifyGlobal from . import TTDialog diff --git a/toontown/toontowngui/ToontownLoadingBlocker.py b/toontown/toontowngui/ToontownLoadingBlocker.py index 12d7256..f260798 100644 --- a/toontown/toontowngui/ToontownLoadingBlocker.py +++ b/toontown/toontowngui/ToontownLoadingBlocker.py @@ -1,6 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.gui.DirectGui import * -from pandac.PandaModules import TextNode +from panda3d.core import TextNode from toontown.toonbase import ToontownGlobals from toontown.toonbase import TTLocalizer from toontown.toontowngui import TTDialog diff --git a/toontown/toontowngui/ToontownLoadingScreen.py b/toontown/toontowngui/ToontownLoadingScreen.py index 2bf3e4d..c4de1f6 100644 --- a/toontown/toontowngui/ToontownLoadingScreen.py +++ b/toontown/toontowngui/ToontownLoadingScreen.py @@ -1,5 +1,5 @@ from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase import ToontownGlobals from toontown.toonbase import TTLocalizer import random diff --git a/toontown/town/TownBattleAttackPanel.py b/toontown/town/TownBattleAttackPanel.py index 789ff16..62bf84b 100644 --- a/toontown/town/TownBattleAttackPanel.py +++ b/toontown/town/TownBattleAttackPanel.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.directnotify import DirectNotifyGlobal import string from direct.fsm import StateData diff --git a/toontown/town/TownBattleChooseAvatarPanel.py b/toontown/town/TownBattleChooseAvatarPanel.py index f252902..9021050 100644 --- a/toontown/town/TownBattleChooseAvatarPanel.py +++ b/toontown/town/TownBattleChooseAvatarPanel.py @@ -4,7 +4,7 @@ from direct.fsm import StateData from direct.directnotify import DirectNotifyGlobal from toontown.battle import BattleBase from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase import TTLocalizer class TownBattleChooseAvatarPanel(StateData.StateData): diff --git a/toontown/town/TownBattleSOSPanel.py b/toontown/town/TownBattleSOSPanel.py index 5cd0eb6..5144f7d 100644 --- a/toontown/town/TownBattleSOSPanel.py +++ b/toontown/town/TownBattleSOSPanel.py @@ -1,7 +1,7 @@ -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase.ToontownGlobals import * from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from direct.showbase import DirectObject from direct.directnotify import DirectNotifyGlobal from direct.fsm import StateData diff --git a/toontown/town/TownBattleSOSPetInfoPanel.py b/toontown/town/TownBattleSOSPetInfoPanel.py index af62b05..be0cdb6 100644 --- a/toontown/town/TownBattleSOSPetInfoPanel.py +++ b/toontown/town/TownBattleSOSPetInfoPanel.py @@ -1,7 +1,7 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.fsm import StateData from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase import TTLocalizer from toontown.pets import Pet, PetTricks, PetDetailPanel from toontown.speedchat import TTSCPetTrickMenu diff --git a/toontown/town/TownBattleSOSPetSearchPanel.py b/toontown/town/TownBattleSOSPetSearchPanel.py index dfcb128..9dd52f4 100644 --- a/toontown/town/TownBattleSOSPetSearchPanel.py +++ b/toontown/town/TownBattleSOSPetSearchPanel.py @@ -1,7 +1,7 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.fsm import StateData from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase import TTLocalizer class TownBattleSOSPetSearchPanel(StateData.StateData): diff --git a/toontown/town/TownBattleToonPanel.py b/toontown/town/TownBattleToonPanel.py index 04b516a..cfa885d 100644 --- a/toontown/town/TownBattleToonPanel.py +++ b/toontown/town/TownBattleToonPanel.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase import ToontownGlobals from toontown.toonbase.ToontownBattleGlobals import * from direct.directnotify import DirectNotifyGlobal @@ -6,7 +6,7 @@ import string from toontown.toon import LaffMeter from toontown.battle import BattleBase from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase import TTLocalizer class TownBattleToonPanel(DirectFrame): diff --git a/toontown/town/TownBattleWaitPanel.py b/toontown/town/TownBattleWaitPanel.py index 1dc0444..fb3075d 100644 --- a/toontown/town/TownBattleWaitPanel.py +++ b/toontown/town/TownBattleWaitPanel.py @@ -1,7 +1,7 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.fsm import StateData from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase import TTLocalizer class TownBattleWaitPanel(StateData.StateData): diff --git a/toontown/town/TownLoader.py b/toontown/town/TownLoader.py index fc5280a..71b37a3 100644 --- a/toontown/town/TownLoader.py +++ b/toontown/town/TownLoader.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from toontown.battle.BattleProps import * from toontown.battle.BattleSounds import * from toontown.distributed.ToontownMsgTypes import * diff --git a/toontown/trolley/Trolley.py b/toontown/trolley/Trolley.py index d57cadf..42c759f 100644 --- a/toontown/trolley/Trolley.py +++ b/toontown/trolley/Trolley.py @@ -1,7 +1,7 @@ -from pandac.PandaModules import * +from panda3d.core import * from toontown.toonbase.ToonBaseGlobal import * from direct.gui.DirectGui import * -from pandac.PandaModules import * +from panda3d.core import * from direct.interval.IntervalGlobal import * from direct.fsm import ClassicFSM, State from direct.fsm import State diff --git a/toontown/tutorial/TutorialForceAcknowledge.py b/toontown/tutorial/TutorialForceAcknowledge.py index d967106..5329a2a 100644 --- a/toontown/tutorial/TutorialForceAcknowledge.py +++ b/toontown/tutorial/TutorialForceAcknowledge.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from toontown.toontowngui import TTDialog from toontown.toonbase import TTLocalizer diff --git a/toontown/tutorial/TutorialManager.py b/toontown/tutorial/TutorialManager.py index fd9b928..e8a641e 100644 --- a/toontown/tutorial/TutorialManager.py +++ b/toontown/tutorial/TutorialManager.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.distributed import DistributedObject from direct.directnotify import DirectNotifyGlobal from toontown.hood import ZoneUtil diff --git a/toontown/uberdog/DataStore.py b/toontown/uberdog/DataStore.py index d412a49..7b20d36 100644 --- a/toontown/uberdog/DataStore.py +++ b/toontown/uberdog/DataStore.py @@ -1,5 +1,5 @@ from direct.directnotify import DirectNotifyGlobal -from pandac.PandaModules import ConfigVariableBool +from panda3d.core import ConfigVariableBool from direct.task import Task import pickle import os diff --git a/toontown/uberdog/DistributedDeliveryManager.py b/toontown/uberdog/DistributedDeliveryManager.py index 7132509..2644a37 100644 --- a/toontown/uberdog/DistributedDeliveryManager.py +++ b/toontown/uberdog/DistributedDeliveryManager.py @@ -1,4 +1,4 @@ -from pandac.PandaModules import * +from panda3d.core import * from direct.distributed.DistributedObject import DistributedObject from toontown.catalog import CatalogItemList from toontown.catalog import CatalogItem From ef34d06d05723a1cc791d4011c1345eb10092f10 Mon Sep 17 00:00:00 2001 From: Little Cat Date: Fri, 16 Dec 2022 20:53:57 -0400 Subject: [PATCH 38/49] effects: Fix going to Acorn Acres --- toontown/effects/Bubbles.py | 1 + 1 file changed, 1 insertion(+) diff --git a/toontown/effects/Bubbles.py b/toontown/effects/Bubbles.py index 891b4ed..9b52e0c 100644 --- a/toontown/effects/Bubbles.py +++ b/toontown/effects/Bubbles.py @@ -1,4 +1,5 @@ from panda3d.core import * +from panda3d.physics import * from direct.interval.IntervalGlobal import * from direct.particles import ParticleEffect from direct.particles import Particles From 2f10b2e573f251ccf48ca12006ff8874b656b4a0 Mon Sep 17 00:00:00 2001 From: Little Cat Date: Fri, 16 Dec 2022 21:07:17 -0400 Subject: [PATCH 39/49] otp: fix whisper imports --- otp/uberdog/DistributedChatManager.py | 2 +- toontown/building/DistributedBoardingParty.py | 1 + toontown/safezone/DistributedFindFour.py | 1 + toontown/safezone/DistributedPicnicTable.py | 1 + toontown/toon/LocalToon.py | 1 + 5 files changed, 5 insertions(+), 1 deletion(-) diff --git a/otp/uberdog/DistributedChatManager.py b/otp/uberdog/DistributedChatManager.py index 8f3d279..02053a5 100644 --- a/otp/uberdog/DistributedChatManager.py +++ b/otp/uberdog/DistributedChatManager.py @@ -1,6 +1,6 @@ from direct.distributed.DistributedObject import DistributedObject from direct.distributed.DistributedObjectGlobal import DistributedObjectGlobal -from panda3d.core import * +from panda3d.otp import WhisperPopup from otp.otpbase import OTPGlobals class DistributedChatManager(DistributedObjectGlobal): diff --git a/toontown/building/DistributedBoardingParty.py b/toontown/building/DistributedBoardingParty.py index c3562a8..708f246 100644 --- a/toontown/building/DistributedBoardingParty.py +++ b/toontown/building/DistributedBoardingParty.py @@ -1,4 +1,5 @@ from panda3d.core import * +from panda3d.otp import WhisperPopup from direct.directnotify import DirectNotifyGlobal from toontown.toonbase import TTLocalizer from toontown.toonbase import ToontownGlobals diff --git a/toontown/safezone/DistributedFindFour.py b/toontown/safezone/DistributedFindFour.py index 9060d17..c43ac09 100644 --- a/toontown/safezone/DistributedFindFour.py +++ b/toontown/safezone/DistributedFindFour.py @@ -1,4 +1,5 @@ from panda3d.core import * +from panda3d.otp import WhisperPopup from direct.distributed.ClockDelta import * from direct.task.Task import Task from direct.interval.IntervalGlobal import * diff --git a/toontown/safezone/DistributedPicnicTable.py b/toontown/safezone/DistributedPicnicTable.py index 055e423..6ce7b0d 100644 --- a/toontown/safezone/DistributedPicnicTable.py +++ b/toontown/safezone/DistributedPicnicTable.py @@ -1,4 +1,5 @@ from panda3d.core import * +from panda3d.otp import WhisperPopup from direct.distributed.ClockDelta import * from direct.task.Task import Task from direct.interval.IntervalGlobal import * diff --git a/toontown/toon/LocalToon.py b/toontown/toon/LocalToon.py index bb49c97..86f1f5a 100644 --- a/toontown/toon/LocalToon.py +++ b/toontown/toon/LocalToon.py @@ -12,6 +12,7 @@ from direct.showbase import PythonUtil from direct.directnotify import DirectNotifyGlobal from direct.gui import DirectGuiGlobals from panda3d.core import * +from panda3d.otp import WhisperPopup from otp.avatar import LocalAvatar from otp.login import LeaveToPayDialog from otp.avatar import PositionExaminer From ee8ba390c0580a4802034072e3c7e0961793cd48 Mon Sep 17 00:00:00 2001 From: Little Cat Date: Mon, 19 Dec 2022 04:08:37 -0400 Subject: [PATCH 40/49] minigame: Fix Jungle Vines. --- toontown/minigame/SwingVine.py | 1 + 1 file changed, 1 insertion(+) diff --git a/toontown/minigame/SwingVine.py b/toontown/minigame/SwingVine.py index 0f84c5c..efa7b14 100644 --- a/toontown/minigame/SwingVine.py +++ b/toontown/minigame/SwingVine.py @@ -1,5 +1,6 @@ from direct.gui.DirectGui import * from panda3d.core import * +from panda3d.physics import * from direct.directnotify import DirectNotifyGlobal from direct.interval.IntervalGlobal import * from direct.distributed import DistributedObject From f662371ff8d75f4796e8031961f37114744bd879 Mon Sep 17 00:00:00 2001 From: Little Cat Date: Mon, 19 Dec 2022 04:10:05 -0400 Subject: [PATCH 41/49] spellbook: Add AbortMinigame and RequestMinigame --- toontown/spellbook/MagicWordIndex.py | 42 ++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/toontown/spellbook/MagicWordIndex.py b/toontown/spellbook/MagicWordIndex.py index 5f6cf9f..773d52d 100644 --- a/toontown/spellbook/MagicWordIndex.py +++ b/toontown/spellbook/MagicWordIndex.py @@ -273,6 +273,48 @@ class MaxToon(MagicWord): return f"Successfully maxed {toon.getName()}!" +class AbortMinigame(MagicWord): + aliases = ["exitgame", "exitminigame", "quitgame", "quitminigame"] + desc = "Aborts an ongoing minigame." + execLocation = MagicWordConfig.EXEC_LOC_CLIENT + arguments = [] + + def handleWord(self, invoker, avId, toon, *args): + messenger.send("minigameAbort") + return "Requested minigame abort." + +class RequestMinigame(MagicWord): + aliases = ["minigame"] + desc = "Requests a specified trolley minigame to be loaded." + execLocation = MagicWordConfig.EXEC_LOC_SERVER + arguments = [("minigame", str, True), ("difficulty", float, False, 0)] + + def handleWord(self, invoker, avId, toon, *args): + minigame = args[0] + difficulty = args[1] + + mgId = None + mgDiff = None if args[1] == 0 else args[1] + mgKeep = None + mgSzId = None + + from toontown.toonbase import ToontownGlobals + try: + mgId = int(minigame) + if mgId not in ToontownGlobals.MinigameIDs: + return f"Unknown minigame ID {mgId}." + except: + if minigame not in ToontownGlobals.MinigameNames: + return f"Unknown minigame name \"{minigame}\"." + mgId = ToontownGlobals.MinigameNames.get(minigame) + + from toontown.minigame import MinigameCreatorAI + MinigameCreatorAI.RequestMinigame[avId] = (mgId, mgKeep, mgDiff, mgSzId) + retStr = f"Successfully requested minigame \"{minigame}\"" + if mgDiff: + retStr += f" with difficulty {mgDiff}" + return retStr + "." + # Instantiate all classes defined here to register them. # A bit hacky, but better than the old system for item in list(globals().values()): From 0fafd18927bdecf2a69b9055626d29f22e8bba11 Mon Sep 17 00:00:00 2001 From: Little Cat Date: Mon, 19 Dec 2022 21:07:31 -0400 Subject: [PATCH 42/49] toonbase: Disable news button by default. If you really want it, you can renable it with the 'want-news-page' cfg. --- toontown/toonbase/ToontownGlobals.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toontown/toonbase/ToontownGlobals.py b/toontown/toonbase/ToontownGlobals.py index f449d2c..da6e354 100644 --- a/toontown/toonbase/ToontownGlobals.py +++ b/toontown/toonbase/ToontownGlobals.py @@ -1592,7 +1592,7 @@ DG = 5 BR = 6 OZ = 7 DL = 8 -DefaultWantNewsPageSetting = 1 +DefaultWantNewsPageSetting = 0 gmMagicWordList = ['restock', 'restockUber', 'autoRestock', From f467c491fdb8f4dd9f1b87d45534525fb502c512 Mon Sep 17 00:00:00 2001 From: Little Cat Date: Tue, 20 Dec 2022 01:55:35 -0400 Subject: [PATCH 43/49] general: Fix more missing imports --- otp/chat/ChatInputWhiteListFrame.py | 1 + toontown/coghq/DistributedDoorEntity.py | 2 +- toontown/safezone/DistributedTreasure.py | 1 + toontown/toon/Toon.py | 1 + 4 files changed, 4 insertions(+), 1 deletion(-) diff --git a/otp/chat/ChatInputWhiteListFrame.py b/otp/chat/ChatInputWhiteListFrame.py index 934816c..a40c91b 100644 --- a/otp/chat/ChatInputWhiteListFrame.py +++ b/otp/chat/ChatInputWhiteListFrame.py @@ -4,6 +4,7 @@ import sys from direct.directnotify import DirectNotifyGlobal from direct.gui.DirectGui import * from panda3d.core import * +from panda3d.otp import * from otp.otpbase import OTPLocalizer from direct.task import Task from otp.chat.ChatInputTyped import ChatInputTyped diff --git a/toontown/coghq/DistributedDoorEntity.py b/toontown/coghq/DistributedDoorEntity.py index 586a259..2ecc93a 100644 --- a/toontown/coghq/DistributedDoorEntity.py +++ b/toontown/coghq/DistributedDoorEntity.py @@ -1,6 +1,6 @@ from panda3d.core import * -from panda3d.core import * from direct.interval.IntervalGlobal import * +from panda3d.direct import ShowInterval, HideInterval from direct.distributed.ClockDelta import * from toontown.toonbase import ToontownGlobals from direct.directnotify import DirectNotifyGlobal diff --git a/toontown/safezone/DistributedTreasure.py b/toontown/safezone/DistributedTreasure.py index 436ec24..713c8b4 100644 --- a/toontown/safezone/DistributedTreasure.py +++ b/toontown/safezone/DistributedTreasure.py @@ -1,4 +1,5 @@ from panda3d.core import * +from panda3d.direct import ShowInterval, HideInterval from direct.interval.IntervalGlobal import * from toontown.toonbase.ToontownGlobals import * from direct.distributed import DistributedObject diff --git a/toontown/toon/Toon.py b/toontown/toon/Toon.py index 28d2c6a..caec571 100644 --- a/toontown/toon/Toon.py +++ b/toontown/toon/Toon.py @@ -8,6 +8,7 @@ from .ToonHead import * from panda3d.core import * from panda3d.otp import * from direct.interval.IntervalGlobal import * +from panda3d.direct import ShowInterval, HideInterval from direct.directnotify import DirectNotifyGlobal from toontown.toonbase import ToontownGlobals from otp.otpbase import OTPLocalizer From 984058ce3297b79802836b7197e2a201800aa2e7 Mon Sep 17 00:00:00 2001 From: Little Cat Date: Tue, 20 Dec 2022 01:58:47 -0400 Subject: [PATCH 44/49] cogdominium: Fix Maze Game. --- toontown/cogdominium/DistCogdoMazeGameAI.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/toontown/cogdominium/DistCogdoMazeGameAI.py b/toontown/cogdominium/DistCogdoMazeGameAI.py index 3e06ac0..7932723 100644 --- a/toontown/cogdominium/DistCogdoMazeGameAI.py +++ b/toontown/cogdominium/DistCogdoMazeGameAI.py @@ -242,7 +242,7 @@ class DistCogdoMazeGameAI(DistCogdoGameAI, DistCogdoMazeGameBase): self.logSuspiciousEvent(senderId, 'CogdoMazeGameAI.requestSuitHitByGag outside of Game state') return False - if suitType not in Globals.SuitTypes: + if suitType not in list(Globals.SuitTypes): self.logSuspiciousEvent(senderId, 'CogdoMazeGameAI.requestSuitHitByGag: invalid suit type %s' % suitType) return False @@ -269,7 +269,7 @@ class DistCogdoMazeGameAI(DistCogdoGameAI, DistCogdoMazeGameBase): self.logSuspiciousEvent(senderId, 'CogdoMazeGameAI.requestHitBySuit outside of Game state') return False - if suitType not in Globals.SuitTypes: + if suitType not in list(Globals.SuitTypes): self.logSuspiciousEvent(senderId, 'CogdoMazeGameAI.requestHitBySuit: invalid suit type %s' % suitType) return False From caaaa39a922ff1bd263491ce2fbd6e2a1f2430e5 Mon Sep 17 00:00:00 2001 From: Little Cat Date: Sat, 24 Dec 2022 00:11:13 -0400 Subject: [PATCH 45/49] quest: tutorial: Disney's Quest and Tutorial Mgrs. --- etc/Configrc.prc | 4 + etc/toon.dc | 2 +- otp/otpbase/OTPGlobals.py | 3 +- toontown/ai/BlackCatHolidayMgrAI.py | 18 + toontown/ai/ToontownAIRepository.py | 5 + .../building/DistributedTutorialInterior.py | 3 +- .../building/DistributedTutorialInteriorAI.py | 43 +- toontown/building/ToonInterior.py | 2 +- toontown/building/TutorialBuildingAI.py | 91 ++ toontown/building/TutorialHQBuildingAI.py | 128 +++ toontown/quest/QuestManagerAI.py | 1000 ++++++++++++++++- toontown/quest/QuestParser.py | 3 +- toontown/quest/Quests.py | 14 +- toontown/spellbook/MagicWordIndex.py | 24 + .../spellbook/ToontownMagicWordManagerAI.py | 7 +- toontown/suit/DistributedTutorialSuitAI.py | 58 +- toontown/toon/DistributedToonAI.py | 2 +- toontown/town/Street.py | 2 +- .../tutorial/DistributedBattleTutorialAI.py | 20 +- toontown/tutorial/SuitPlannerTutorialAI.py | 74 ++ toontown/tutorial/TutorialBattleManagerAI.py | 11 + toontown/tutorial/TutorialManagerAI.py | 323 +++++- 22 files changed, 1786 insertions(+), 51 deletions(-) create mode 100644 toontown/ai/BlackCatHolidayMgrAI.py create mode 100644 toontown/building/TutorialBuildingAI.py create mode 100644 toontown/building/TutorialHQBuildingAI.py create mode 100644 toontown/tutorial/SuitPlannerTutorialAI.py create mode 100644 toontown/tutorial/TutorialBattleManagerAI.py diff --git a/etc/Configrc.prc b/etc/Configrc.prc index 32c048c..522e1ba 100644 --- a/etc/Configrc.prc +++ b/etc/Configrc.prc @@ -97,3 +97,7 @@ accept-clock-skew 1 text-minfilter linear_mipmap_linear gc-save-all 0 server-data-folder data + +# TEMPORARY +skip-friend-quest true +skip-phone-quest true diff --git a/etc/toon.dc b/etc/toon.dc index 4f09c30..e972695 100755 --- a/etc/toon.dc +++ b/etc/toon.dc @@ -467,7 +467,7 @@ dclass DistributedToon : DistributedPlayer { setHoodsVisited(uint32[] = [2000]) required ownrecv db; setInterface(blob = []) required ownrecv db; setLastHood(uint32 = 0) required ownrecv db; - setTutorialAck(uint8 = 1) required ownrecv db; + setTutorialAck(uint8 = 0) required ownrecv db; setMaxClothes(uint32 = 10) required ownrecv db; setClothesTopsList(uint8[] = []) required ownrecv db; setClothesBottomsList(uint8[] = []) required ownrecv db; diff --git a/otp/otpbase/OTPGlobals.py b/otp/otpbase/OTPGlobals.py index 099f61a..b9b59e5 100644 --- a/otp/otpbase/OTPGlobals.py +++ b/otp/otpbase/OTPGlobals.py @@ -1,4 +1,5 @@ -from pandac.PandaModules import * +from panda3d.core import * +from panda3d.otp import * QuietZone = 1 UberZone = 2 WallBitmask = BitMask32(1) diff --git a/toontown/ai/BlackCatHolidayMgrAI.py b/toontown/ai/BlackCatHolidayMgrAI.py new file mode 100644 index 0000000..41018c5 --- /dev/null +++ b/toontown/ai/BlackCatHolidayMgrAI.py @@ -0,0 +1,18 @@ +from direct.directnotify import DirectNotifyGlobal +from toontown.ai import HolidayBaseAI +from toontown.toonbase import ToontownGlobals + +class BlackCatHolidayMgrAI(HolidayBaseAI.HolidayBaseAI): + notify = DirectNotifyGlobal.directNotify.newCategory( + 'BlackCatHolidayMgrAI') + + PostName = 'blackCatHoliday' + + def __init__(self, air, holidayId): + HolidayBaseAI.HolidayBaseAI.__init__(self, air, holidayId) + + def start(self): + bboard.post(BlackCatHolidayMgrAI.PostName) + + def stop(self): + bboard.remove(BlackCatHolidayMgrAI.PostName) \ No newline at end of file diff --git a/toontown/ai/ToontownAIRepository.py b/toontown/ai/ToontownAIRepository.py index c6d95bb..340edea 100644 --- a/toontown/ai/ToontownAIRepository.py +++ b/toontown/ai/ToontownAIRepository.py @@ -48,6 +48,7 @@ from toontown.spellbook.ToontownMagicWordManagerAI import ToontownMagicWordManag from toontown.suit.SuitInvasionManagerAI import SuitInvasionManagerAI from toontown.toon import NPCToons from toontown.toonbase import ToontownGlobals +from toontown.tutorial.TutorialManagerAI import TutorialManagerAI from toontown.uberdog.DistributedInGameNewsMgrAI import DistributedInGameNewsMgrAI import os @@ -220,6 +221,10 @@ class ToontownAIRepository(ToontownInternalRepository): self.magicWordManager = ToontownMagicWordManagerAI(self) self.magicWordManager.generateWithRequired(OTP_ZONE_ID_MANAGEMENT) + # Generate our Tutorial manager... + self.tutorialManager = TutorialManagerAI(self) + self.tutorialManager.generateWithRequired(OTP_ZONE_ID_MANAGEMENT) + def generateHood(self, hoodConstructor, zoneId): # Bossbot HQ doesn't use DNA, so we skip over that. if zoneId != ToontownGlobals.BossbotHQ: diff --git a/toontown/building/DistributedTutorialInterior.py b/toontown/building/DistributedTutorialInterior.py index 2d8b1d1..6c92ee1 100644 --- a/toontown/building/DistributedTutorialInterior.py +++ b/toontown/building/DistributedTutorialInterior.py @@ -1,5 +1,6 @@ from toontown.toonbase.ToonBaseGlobal import * -from pandac.PandaModules import * +from panda3d.core import * +from panda3d.toontown import * from direct.interval.IntervalGlobal import * from direct.distributed.ClockDelta import * from toontown.toonbase import ToontownGlobals diff --git a/toontown/building/DistributedTutorialInteriorAI.py b/toontown/building/DistributedTutorialInteriorAI.py index a1f8a2d..49274a6 100644 --- a/toontown/building/DistributedTutorialInteriorAI.py +++ b/toontown/building/DistributedTutorialInteriorAI.py @@ -1,5 +1,40 @@ -from direct.directnotify import DirectNotifyGlobal -from direct.distributed.DistributedObjectAI import DistributedObjectAI +from toontown.toonbase.ToontownGlobals import * +from otp.ai.AIBaseGlobal import * +from direct.distributed.ClockDelta import * -class DistributedTutorialInteriorAI(DistributedObjectAI): - notify = DirectNotifyGlobal.directNotify.newCategory('DistributedTutorialInteriorAI') +from direct.directnotify import DirectNotifyGlobal +from direct.distributed import DistributedObjectAI +from toontown.toon import NPCToons + +class DistributedTutorialInteriorAI(DistributedObjectAI.DistributedObjectAI): + + if __debug__: + notify = DirectNotifyGlobal.directNotify.newCategory('DistributedTutorialInteriorAI') + + def __init__(self, block, air, zoneId, building, npcId): + """blockNumber: the landmark building number (from the name)""" + #self.air=air + DistributedObjectAI.DistributedObjectAI.__init__(self, air) + self.block=block + self.zoneId=zoneId + self.building=building + self.tutorialNpcId = npcId + + + # Make any npcs that may be in this interior zone + # If there are none specified, this will just be an empty list + self.npcs = NPCToons.createNpcsInZone(air, zoneId) + + def delete(self): + self.ignoreAll() + for npc in self.npcs: + npc.requestDelete() + del self.npcs + del self.building + DistributedObjectAI.DistributedObjectAI.delete(self) + + def getZoneIdAndBlock(self): + return [self.zoneId, self.block] + + def getTutorialNpcId(self): + return self.tutorialNpcId \ No newline at end of file diff --git a/toontown/building/ToonInterior.py b/toontown/building/ToonInterior.py index 29e41d2..d77eba3 100644 --- a/toontown/building/ToonInterior.py +++ b/toontown/building/ToonInterior.py @@ -61,7 +61,7 @@ class ToonInterior(Place.Place): State.State('HFA', self.enterHFA, self.exitHFA, ['HFAReject', 'teleportOut', 'tunnelOut']), State.State('HFAReject', self.enterHFAReject, self.exitHFAReject, ['walk']), State.State('doorIn', self.enterDoorIn, self.exitDoorIn, ['walk']), - State.State('doorOut', self.enterDoorOut, self.exitDoorOut, ['walk']), + State.State('doorOut', self.enterDoorOut, self.exitDoorOut, ['walk', 'stopped']), State.State('teleportIn', self.enterTeleportIn, self.exitTeleportIn, ['walk']), State.State('teleportOut', self.enterTeleportOut, self.exitTeleportOut, ['teleportIn']), State.State('quest', self.enterQuest, self.exitQuest, ['walk', 'doorOut']), diff --git a/toontown/building/TutorialBuildingAI.py b/toontown/building/TutorialBuildingAI.py new file mode 100644 index 0000000..552cb9e --- /dev/null +++ b/toontown/building/TutorialBuildingAI.py @@ -0,0 +1,91 @@ +from pandac.PandaModules import * +from direct.directnotify import DirectNotifyGlobal +from . import DistributedDoorAI +from . import DistributedTutorialInteriorAI +from . import FADoorCodes +from . import DoorTypes +from toontown.toon import NPCToons +from toontown.toonbase import TTLocalizer + +# This is not a distributed class... It just owns and manages some distributed +# classes. + +class TutorialBuildingAI: + def __init__(self, air, exteriorZone, interiorZone, blockNumber): + # While this is not a distributed object, it needs to know about + # the repository. + self.air = air + self.exteriorZone = exteriorZone + self.interiorZone = interiorZone + + # This is because we are "pretending" to be a DistributedBuilding. + # The DistributedTutorialInterior takes a peek at savedBy. It really + # should make a function call. Perhaps TutorialBuildingAI and + # DistributedBuildingAI should inherit from each other somehow, + # but I can't see an easy way to do that. + self.savedBy = None + + self.setup(blockNumber) + + def cleanup(self): + self.interior.requestDelete() + del self.interior + self.door.requestDelete() + del self.door + self.insideDoor.requestDelete() + del self.insideDoor + self.gagShopNPC.requestDelete() + del self.gagShopNPC + return + + def setup(self, blockNumber): + # Put an NPC in here. Give him id# 20000. When he has assigned + # his quest, he will unlock the interior door. + self.gagShopNPC = NPCToons.createNPC( + self.air, 20000, + (self.interiorZone, + TTLocalizer.NPCToonNames[20000], + ("dll" ,"ms" ,"m" ,"m" ,7 ,0 ,7 ,7 ,2 ,6 ,2 ,6 ,2 ,16), "m", 1, NPCToons.NPC_REGULAR), + self.interiorZone, + questCallback=self.unlockInteriorDoor) + # Flag him as being part of tutorial + self.gagShopNPC.setTutorial(1) + npcId = self.gagShopNPC.getDoId() + # Toon interior (with tutorial flag set to 1) + self.interior=DistributedTutorialInteriorAI.DistributedTutorialInteriorAI( + blockNumber, self.air, self.interiorZone, self, npcId) + self.interior.generateWithRequired(self.interiorZone) + # Outside door: + door=DistributedDoorAI.DistributedDoorAI(self.air, blockNumber, + DoorTypes.EXT_STANDARD, + lockValue=FADoorCodes.DEFEAT_FLUNKY_TOM) + # Inside door. Locked until you get your gags. + insideDoor=DistributedDoorAI.DistributedDoorAI( + self.air, + blockNumber, + DoorTypes.INT_STANDARD, + lockValue=FADoorCodes.TALK_TO_TOM) + # Tell them about each other: + door.setOtherDoor(insideDoor) + insideDoor.setOtherDoor(door) + door.zoneId=self.exteriorZone + insideDoor.zoneId=self.interiorZone + # Now that they both now about each other, generate them: + door.generateWithRequired(self.exteriorZone) + #door.sendUpdate("setDoorIndex", [door.getDoorIndex()]) + insideDoor.generateWithRequired(self.interiorZone) + #insideDoor.sendUpdate("setDoorIndex", [door.getDoorIndex()]) + # keep track of them: + self.door=door + self.insideDoor=insideDoor + return + + def unlockInteriorDoor(self): + self.insideDoor.setDoorLock(FADoorCodes.UNLOCKED) + + def battleOverCallback(self): + # There is an if statement here because it is possible for + # the callback to get called after cleanup has already taken + # place. + if hasattr(self, "door"): + self.door.setDoorLock(FADoorCodes.TALK_TO_HQ_TOM) \ No newline at end of file diff --git a/toontown/building/TutorialHQBuildingAI.py b/toontown/building/TutorialHQBuildingAI.py new file mode 100644 index 0000000..ffb6704 --- /dev/null +++ b/toontown/building/TutorialHQBuildingAI.py @@ -0,0 +1,128 @@ +from panda3d.core import * +from direct.directnotify import DirectNotifyGlobal +from . import DistributedDoorAI +from . import DistributedHQInteriorAI +from . import FADoorCodes +from . import DoorTypes +from toontown.toon import NPCToons +from toontown.quest import Quests +from toontown.toonbase import TTLocalizer + +# This is not a distributed class... It just owns and manages some distributed +# classes. + +class TutorialHQBuildingAI: + def __init__(self, air, exteriorZone, interiorZone, blockNumber): + # While this is not a distributed object, it needs to know about + # the repository. + self.air = air + self.exteriorZone = exteriorZone + self.interiorZone = interiorZone + + self.setup(blockNumber) + + def cleanup(self): + self.interior.requestDelete() + del self.interior + self.npc.requestDelete() + del self.npc + self.door0.requestDelete() + del self.door0 + self.door1.requestDelete() + del self.door1 + self.insideDoor0.requestDelete() + del self.insideDoor0 + self.insideDoor1.requestDelete() + del self.insideDoor1 + return + + def setup(self, blockNumber): + # The interior + self.interior=DistributedHQInteriorAI.DistributedHQInteriorAI( + blockNumber, self.air, self.interiorZone) + + # We do not use a standard npc toon here becuase these npcs are created on + # the fly for as many tutorials as we need. The interior zone is not known + # until the ai allocates a zone, so we fabricate the description here. + desc = (self.interiorZone, TTLocalizer.TutorialHQOfficerName, ('dls', 'ms', 'm', 'm', 6,0,6,6,0,10,0,10,2,9), "m", 1, 0) + self.npc = NPCToons.createNPC(self.air, Quests.ToonHQ, desc, + self.interiorZone, + questCallback=self.unlockInsideDoor1) + # Flag npc as part of tutorial + self.npc.setTutorial(1) + + self.interior.generateWithRequired(self.interiorZone) + # Outside door 0. Locked til you defeat the Flunky: + door0=DistributedDoorAI.DistributedDoorAI( + self.air, blockNumber, DoorTypes.EXT_HQ, + doorIndex=0, + lockValue=FADoorCodes.DEFEAT_FLUNKY_HQ) + # Outside door 1. Always locked. + door1=DistributedDoorAI.DistributedDoorAI( + self.air, blockNumber, DoorTypes.EXT_HQ, + doorIndex=1, + lockValue=FADoorCodes.GO_TO_PLAYGROUND) + # Inside door 0. Always locked, but the message will change. + insideDoor0=DistributedDoorAI.DistributedDoorAI( + self.air, + blockNumber, + DoorTypes.INT_HQ, + doorIndex=0, + lockValue=FADoorCodes.TALK_TO_HQ) + # Inside door 1. Locked til you get your HQ reward. + insideDoor1=DistributedDoorAI.DistributedDoorAI( + self.air, + blockNumber, + DoorTypes.INT_HQ, + doorIndex=1, + lockValue=FADoorCodes.TALK_TO_HQ) + # Tell them about each other: + door0.setOtherDoor(insideDoor0) + insideDoor0.setOtherDoor(door0) + door1.setOtherDoor(insideDoor1) + insideDoor1.setOtherDoor(door1) + # Put them in the right zones + door0.zoneId=self.exteriorZone + door1.zoneId=self.exteriorZone + insideDoor0.zoneId=self.interiorZone + insideDoor1.zoneId=self.interiorZone + # Now that they both now about each other, generate them: + door0.generateWithRequired(self.exteriorZone) + door1.generateWithRequired(self.exteriorZone) + door0.sendUpdate("setDoorIndex", [door0.getDoorIndex()]) + door1.sendUpdate("setDoorIndex", [door1.getDoorIndex()]) + insideDoor0.generateWithRequired(self.interiorZone) + insideDoor1.generateWithRequired(self.interiorZone) + insideDoor0.sendUpdate("setDoorIndex", [insideDoor0.getDoorIndex()]) + insideDoor1.sendUpdate("setDoorIndex", [insideDoor1.getDoorIndex()]) + # keep track of them: + self.door0=door0 + self.door1=door1 + self.insideDoor0=insideDoor0 + self.insideDoor1=insideDoor1 + # hide the periscope + self.interior.setTutorial(1) + return + + def unlockDoor(self, door): + door.setDoorLock(FADoorCodes.UNLOCKED) + + def battleOverCallback(self): + # There is an if statement here because it is possible for + # the callback to get called after cleanup has already taken + # place. + if hasattr(self, "door0"): + self.unlockDoor(self.door0) + + # This callback type happens to give zoneId. We don't need it. + def unlockInsideDoor1(self): + # There is an if statement here because it is possible for + # the callback to get called after cleanup has already taken + # place. + if hasattr(self, "insideDoor1"): + self.unlockDoor(self.insideDoor1) + # Change the message on this locked door to tell you to go + # through the other door. Maybe this door should not be + # here at all? + if hasattr(self, "insideDoor0"): + self.insideDoor0.setDoorLock(FADoorCodes.WRONG_DOOR_HQ) \ No newline at end of file diff --git a/toontown/quest/QuestManagerAI.py b/toontown/quest/QuestManagerAI.py index 9d7ecd7..8a7d8b7 100644 --- a/toontown/quest/QuestManagerAI.py +++ b/toontown/quest/QuestManagerAI.py @@ -1,41 +1,993 @@ +from otp.ai.AIBaseGlobal import * +from direct.task import Task from direct.directnotify import DirectNotifyGlobal +from . import Quests +from toontown.toon import NPCToons +import random +""" +TODO: (done, tested) + + + Jellybean reward + + + Max Jellybean reward + + + Quest combos + + + Required and optional reward pool + + + Quest page class + + + Integrate chat next buttons + + + Quest multiple choice AI + + + Quest multiple choice gui + + + Quest multiple choice choosing + + + clean up NPC Toon dicts + + + Stolen item list + + + Stolen item quests + + + Stolen item integration into reward panel + + + Stolen item integration into battle + + + Trolley quest + + + Make friend quest + + + sticker book reward + + + non-rejectable quest tiers + + + customize how many quests to choose from + + + gui movies in quest movies + + + Choose track access quest + + + Track access partial rewards + + + Toon HQ integration + + + Multiple NPCs indoors + + + Integrate quest page artwork + + + Cog logos for posters + + + Trolley reward in playground + - - Dynamic timeout lengths based on movie + + New Track order: + Choice 1: Sound or Heal + Choice 2: Drop or Lure + Choice 3: 1' or Trap + Choice 4: 2' or 3' +""" class QuestManagerAI: - notify = DirectNotifyGlobal.directNotify.newCategory('QuestManagerAI') + + notify = DirectNotifyGlobal.directNotify.newCategory("QuestManagerAI") + + # Immediately complete all quests and all visits are to ToonHQ + QuestCheat = simbase.config.GetBool("quest-cheat", 0) + + # table of requests for quests from specific avatars + NextQuestDict = {} def __init__(self, air): self.air = air - def recoverItems(self, toon, suitsKilled, zoneId): - return [], [] # TODO - - def toonKilledCogs(self, toon, suitsKilled, zoneId, activeToonList): - pass # TODO - def requestInteract(self, avId, npc): - npc.rejectAvatar(avId) # TODO + self.notify.debug("requestInteract: avId: %s npcId: %s" % (avId, npc.getNpcId())) + av = self.air.doId2do.get(avId) - def hasTailorClothingTicket(self, toon, npc): - return 0 # TODO + # Sanity check + if av is None: + self.notify.warning("some toon did a requestInteract but is not here: %s" % (avId)) + return - def toonKilledBuilding(self, toon, track, difficulty, numFloors, zoneId, activeToons): - pass # TODO + # If this NPC is busy, free the avatar + if npc.isBusy(): + self.notify.debug("freeing avatar %s because NPC is busy" % (avId)) + npc.freeAvatar(avId) + return - def toonKilledCogdo(self, toon, difficulty, numFloors, zoneId, activeToons): - pass # TODO + # handle unusual cases such as NPC specific quests + # interactionComplete = self.handleSpecialCases(avId, npc) - def toonPlayedMinigame(self, toon, toons): - pass # TODO + # if interactionComplete: + # return - def toonRecoveredCogSuitPart(self, av, zoneId, avList): - pass # TODO + # First, see if any quests are completed before checking for incomplete + # Since the ToonHQ could match multiple quests on the av list, we need + # to prioritize what they give their attention to first. I think it + # makes sense for them to clear complete quests first + for questDesc in av.quests: - def toonDefeatedFactory(self, toon, factoryId, activeVictors): - pass # TODO + # Sanity check for rogue quests + if not Quests.questExists(questDesc[0]): + av.removeAllTracesOfQuest(questDesc[0], questDesc[3]) + self.rejectAvatar(av, npc) + return - def toonDefeatedMint(self, toon, mintId, activeVictors): - pass # TODO + if (self.isQuestComplete(av, npc, questDesc) == Quests.COMPLETE): + self.completeQuest(av, npc, questDesc[0]) + return - def toonDefeatedStage(self, toon, stageId, activeVictors): - pass # TODO + needsQuestButNoneLeft = 0 + if (self.needsQuest(av) and npc.getGivesQuests()): + # bestQuests is a nested list of [questId, rewardId, toNpcId] lists + quests = self.getNextQuestIds(npc, av) + if quests: + if (Quests.getNumChoices(av.getRewardTier()) == 0): + assert(len(quests) == 1) # There should only be one + if npc.getHq(): + fromNpcId = Quests.ToonHQ + else: + fromNpcId = npc.getNpcId() + self.assignQuest(avId, fromNpcId, *quests[0]) + npc.assignQuest(av.getDoId(), *quests[0]) + else: + # if this avatar requested a quest, include it + if avId in self.NextQuestDict: + questId = self.NextQuestDict[avId] + # if it's already in the list of quests, + # we're all set + ids = [] + for q in quests: + ids.append(q[0]) + if questId not in ids: + # add the quest as the first choice + questDesc = Quests.QuestDict[questId] + reward = questDesc[Quests.QuestDictRewardIndex] + toNpcId = questDesc[Quests.QuestDictToNpcIndex] + if reward is Quests.Any: + reward = 604 # some jbs + if toNpcId is Quests.Any: + toNpcId = Quests.ToonHQ + quests[0] = [questId, reward, toNpcId] + + npc.presentQuestChoice(av.getDoId(), quests) + return + else: + needsQuestButNoneLeft = 1 + + # Now see if this npc has any incomplete quests with av + questDesc = self.hasQuest(av, npc) + if questDesc: + completeStatus = self.isQuestComplete(av, npc, questDesc) + questId, fromNpcId, toNpcId, rewardId, toonProgress = questDesc + self.incompleteQuest(av, npc, questId, completeStatus, toNpcId) + return + else: + if needsQuestButNoneLeft: + # If they have quests, tell them to finish their tier + if av.quests: + self.rejectAvatarTierNotDone(av, npc) + # If they do not have any quests, advance their tier + else: + if self.incrementReward(av): + # quests is a nested list of [questId, rewardId, toNpcId] lists + quests = self.getNextQuestIds(npc, av) + if quests: + if (Quests.getNumChoices(av.getRewardTier()) == 0): + assert(len(quests) == 1) # There should only be one + if npc.getHq(): + fromNpcId = Quests.ToonHQ + else: + fromNpcId = npc.getNpcId() + self.assignQuest(avId, fromNpcId, *quests[0]) + npc.assignQuest(av.getDoId(), *quests[0]) + else: + npc.presentQuestChoice(av.getDoId(), quests) + return + else: + # No more quests, sorry + # TODO: put some more meaningful dialog here + self.rejectAvatar(av, npc) + return + else: + # Avatar does not need a quest, goodbye + self.rejectAvatar(av, npc) + return + + def handleSpecialCases(self, avId, npc): + """ handle unusual cases such as NPC specific quests""" + + av = self.air.doId2do.get(avId) + + if npc.getNpcId() == 2018: + # See if this npc has the TIP quest + for questDesc in av.quests: + # Do not use doId, use the NpcId because the doId is different across shards + questId = questDesc[0] + if (questId == 103): + completeStatus = self.isQuestComplete(av, npc, questDesc) + questId, fromNpcId, toNpcId, rewardId, toonProgress = questDesc + self.incompleteQuest(av, npc, questId, completeStatus, toNpcId) + return 1 + + if self.needsQuest(av): + self.assignQuest(avId, npc.npcId, 103, Quests.QuestDict[103][5], Quests.QuestDict[103][4]) + npc.assignQuest(avId, 103, Quests.QuestDict[103][5], Quests.QuestDict[103][4]) + return 1 + + return 0 + + def rejectAvatar(self, av, npc): + self.notify.debug("rejecting avatar: avId: %s" % (av.getDoId())) + npc.rejectAvatar(av.getDoId()) + return + + def rejectAvatarTierNotDone(self, av, npc): + self.notify.debug("rejecting avatar because tier not done: avId: %s" % (av.getDoId())) + npc.rejectAvatarTierNotDone(av.getDoId()) + return + + def hasQuest(self, av, npc): + # Check if this avId has a quest on this npcId + for questDesc in av.quests: + # Do not use doId, use the NpcId because the doId is different across shards + questId = questDesc[0] + fromNpcId = questDesc[1] + toNpcId = questDesc[2] + # If the fromNpc that gave you the quest is involved, or + # if you have a toNpc then return this questId + if (fromNpcId == npc.getNpcId()): + self.notify.debug("hasQuest: found quest: %s avId: %s fromNpcId: %s" % + (questId, av.getDoId(), fromNpcId)) + return questDesc + elif (toNpcId == npc.getNpcId()): + # If the quest has this npc as the toNpc, then we are done + self.notify.debug("hasQuest: found quest with toNpc: %s avId: %s toNpcId: %s" % + (questId, av.getDoId(), toNpcId)) + return questDesc + elif (toNpcId == Quests.Any): + # If the quest has "any" as the toNpc, than this guy will do + self.notify.debug("hasQuest: found quest with any toNpc: %s avId: %s toNpcId: %s" % + (questId, av.getDoId(), toNpcId)) + return questDesc + elif ((toNpcId == Quests.ToonHQ) and (npc.getHq())): + # If the quest is for the HQ, and this toon has HQ powers, its a match + self.notify.debug("hasQuest: found quest with HQ toNpc: %s avId: %s toNpcId: %s" % + (questId, av.getDoId(), toNpcId)) + return questDesc + elif ((toNpcId == Quests.ToonTailor) and (npc.getTailor())): + # If the quest is for a tailor, and this toon is a tailor, its a match + self.notify.debug("hasQuest: found quest with Tailor toNpc: %s avId: %s toNpcId: %s" % + (questId, av.getDoId(), toNpcId)) + return questDesc + self.notify.debug("hasQuest: did not find quest for avId: %s npcId: %s" % + (av.getDoId(), npc.getNpcId())) + return None + + def isQuestComplete(self, av, npc, questDesc): + # The quest in question + quest = Quests.getQuest(questDesc[0]) + if quest == None: + return 0 + self.notify.debug("isQuestComplete: avId: %s, quest: %s" % + (av.getDoId(), quest)) + return quest.getCompletionStatus(av, questDesc, npc) + + def completeQuest(self, av, npc, questId): + self.notify.info("completeQuest: avId: %s, npcId: %s, questId: %s" % + (av.getDoId(), npc.getNpcId(), questId)) + + # If this is a track choice, we do not actually complete the quest, + # We present the track choice gui. This can be cancelled which will + # not complete the quest. + questClass = Quests.getQuestClass(questId) + if questClass == Quests.TrackChoiceQuest: + self.notify.debug("completeQuest: presentTrackChoice avId: %s, npcId: %s, questId: %s" % + (av.getDoId(), npc.getNpcId(), questId)) + quest = Quests.getQuest(questId) + tracks = quest.getChoices() + npc.presentTrackChoice(av.getDoId(), questId, tracks) + # Do not increment reward until avatar has chosen track + # This happens in avatarChoseTrack + return + + # If this is a deliver gag quest, we need to actually remove the + # gags delivered from the player's inventory + if questClass == Quests.DeliverGagQuest: + self.notify.debug("completeQuest: presentTrackChoice avId: %s, npcId: %s, questId: %s" % + (av.getDoId(), npc.getNpcId(), questId)) + # Use the items from the inventory now + quest = Quests.getQuest(questId) + track, level = quest.getGagType() + for i in range(0, quest.getNumGags()): + av.inventory.useItem(track, level) + av.d_setInventory(av.inventory.makeNetString()) + + + # See if this quest is part of a multiquest. If it is, we assign + # the next part of the multiquest. + nextQuestId, nextToNpcId = Quests.getNextQuest(questId, npc, av) + eventLogMessage = "%s|%s|%s|%s" % ( + questId, npc.getNpcId(), questClass.__name__, nextQuestId) + + if nextQuestId == Quests.NA: + rewardId = Quests.getAvatarRewardId(av, questId) + # Update the toon with the reward + reward = Quests.getReward(rewardId) + + # Clothing quests should have been handled by the Tailor. + # Just to make sure + if (reward.getType() == Quests.ClothingTicketReward): + self.notify.warning("completeQuest: rogue ClothingTicketReward avId: %s, npcId: %s, questId: %s" % + (av.getDoId(), npc.getNpcId(), questId)) + npc.freeAvatar(av.getDoId()) + return + + # Nope, this is the end, dish out the reward + av.removeQuest(questId) + # TODO: put this in the movie + reward.sendRewardAI(av) + # Full heal for completing a quest + av.toonUp(av.maxHp) + # Tell the npc to deliver the movie which will + # complete the quest, display the reward, and do nothing else + npc.completeQuest(av.getDoId(), questId, rewardId) + # Bump the reward + self.incrementReward(av) + + eventLogMessage += "|%s|%s" % ( + reward.__class__.__name__, reward.getAmount()) + + else: + # Full heal for completing part of a multistage quest + av.toonUp(av.maxHp) + # The user is not presented with a choice here + av.removeQuest(questId) + nextRewardId = Quests.getQuestReward(nextQuestId, av) + if npc.getHq(): + fromNpcId = Quests.ToonHQ + else: + fromNpcId = npc.getNpcId() + self.assignQuest(av.getDoId(), fromNpcId, nextQuestId, nextRewardId, nextToNpcId, startingQuest = 0) + npc.assignQuest(av.getDoId(), nextQuestId, nextRewardId, nextToNpcId) + eventLogMessage += "|next %s" % (nextQuestId) + + self.air.writeServerEvent('questComplete', av.getDoId(), eventLogMessage) + + def incompleteQuest(self, av, npc, questId, completeStatus, toNpcId): + self.notify.debug("incompleteQuest: avId: %s questId: %s" % + (av.getDoId(), questId)) + npc.incompleteQuest(av.getDoId(), questId, completeStatus, toNpcId) + return + + def needsQuest(self, av): + # Return 0 if this avatar does not need a new quest, 1 if he does + quests = av.quests + carryLimit = av.getQuestCarryLimit() + if (len(quests) >= carryLimit): + self.notify.debug("needsQuest: avId: %s is already full with %s/%s quest(s)" % + (av.getDoId(), len(quests), carryLimit)) + return 0 + else: + self.notify.debug("needsQuest: avId: %s only has %s/%s quest(s), needs another" % + (av.getDoId(), len(quests), carryLimit)) + return 1 + + def getNextQuestIds(self, npc, av): + # Return the quest id, reward id for the next quest + # Return None, None if the search fails for some reason + return Quests.chooseBestQuests(av.getRewardTier(), npc, av) + + def incrementReward(self, av): + # See if we finished a tier + rewardTier = av.getRewardTier() + # Make sure all the rewards have been handed out and + # Make sure we have completed them all + # First, make sure that the list is at least as big as the number of rewards + # Then, make sure we have completed them all + # Then, make sure all the rewards in the tier are in our history + rewardHistory = av.getRewardHistory()[1] + if ( + # We cannot do this short-circuit test anymore because having + # cog suit parts counts as a reward in cashbot + # HQ. Unfortunately we are losing a pretty nice optimization + # here. TODO: revisit and optimize. + # (len(rewardHistory) >= Quests.getNumRewardsInTier(rewardTier)) and + + # We cannot do this because they might still be working on a few + # optional quests from the old tier. + # (len(av.quests) == 0) and + + # Make sure they have all the required rewards + (Quests.avatarHasAllRequiredRewards(av, rewardTier)) and + + # Make sure they are not still working on required rewards + (not Quests.avatarWorkingOnRequiredRewards(av)) + ): + + if not Quests.rewardTierExists(rewardTier+1): + self.notify.info("incrementReward: avId %s, at end of rewards" % + (av.getDoId())) + return 0 + + rewardTier += 1 + self.notify.info("incrementReward: avId %s, new rewardTier: %s" % + (av.getDoId(), rewardTier)) + + # If we have just moved on to the next tier, blow away the + # old history, which is no longer needed. + av.b_setQuestHistory([]) + av.b_setRewardHistory(rewardTier, []) + + # The above will clear the quest history the *first* time + # we cross into the next tier. There may still be some + # quest id's hiding behind visit quests that belong to the + # previous tier; these will find their way onto the quest + # history when we eventually reveal them, but they will + # still be associated with the previous tier. This does + # no harm, so we won't worry about it; but it does mean + # that the questHistory list is not guaranteed to only + # list quests on the current tier. It is simply + # guaranteed to list all the completed and in-progress + # quests on the current tier, with maybe one or two others + # thrown in. + return 1 + else: + self.notify.debug("incrementReward: avId %s, not ready for new tier" % + (av.getDoId())) + return 0 + + + def avatarCancelled(self, avId): + # This is a message that came from the client, through the NPCToonAI. + # It is in response to the avatar picking from a multiple choice menu + self.notify.debug("avatarCancelled: avId: %s" % (avId)) + return + + def avatarChoseTrack(self, avId, npc, questId, trackId): + # This is a message that came from the client, through the NPCToonAI. + # It is in response to the avatar picking from a multiple choice menu + # of track options, along with a cancel option + self.notify.info("avatarChoseTrack: avId: %s trackId: %s" % (avId, trackId)) + av = self.air.doId2do.get(avId) + if av: + # Remove the track choice quest + av.removeQuest(questId) + # Update the toon with the reward + rewardId = Quests.getRewardIdFromTrackId(trackId) + reward = Quests.getReward(rewardId) + reward.sendRewardAI(av) + # Tell the npc to deliver the movie which will + # complete the quest, display the reward, and do nothing else + npc.completeQuest(av.getDoId(), questId, rewardId) + self.incrementReward(av) + else: + self.notify.warning("avatarChoseTrack: av is gone.") + + def avatarChoseQuest(self, avId, npc, questId, rewardId, toNpcId): + # This is a message that came from the client, through the NPCToonAI. + # It is in response to the avatar picking from a multiple choice menu + # of quest options, along with a cancel option + self.notify.debug("avatarChooseQuest: avId: %s questId: %s" % (avId, questId)) + av = self.air.doId2do.get(avId) + if av: + if npc.getHq(): + fromNpcId = Quests.ToonHQ + else: + fromNpcId = npc.getNpcId() + self.assignQuest(avId, fromNpcId, questId, rewardId, toNpcId) + npc.assignQuest(avId, questId, rewardId, toNpcId) + # Do not increment the reward until the quest is completed + else: + self.notify.warning("avatarChoseQuest: av is gone.") + + def assignQuest(self, avId, npcId, questId, rewardId, toNpcId, startingQuest = 1): + self.notify.info("assignQuest: avId: %s npcId: %s questId: %s rewardId: %s toNpcId: %s startingQuest: %s" % + (avId, npcId, questId, rewardId, toNpcId, startingQuest)) + # assign quest to avatar + # A quest is a list with (questId, npcId, toNpcId, rewardId, progress) + av = self.air.doId2do.get(avId) + if av: + if startingQuest: + # Since the first parts or multipart quests have NA for their + # rewardIds, we need to get the final reward of this quest by searching + # down the chain. If this questId is not the start of a multipart + # quest, finalRewardId will come back None, and addQuest will handle it + if rewardId == Quests.NA: + finalRewardId = Quests.getFinalRewardId(questId) + else: + # Do not count the end of multipart quests, even though they + # have a valid rewardId. That rewardId would have been counted + # when the initial quest was given out + if not Quests.isStartingQuest(questId): + finalRewardId = None + else: + finalRewardId = rewardId + # If this was not handed out as a starting quest, make sure you do not + # count the reward twice + else: + finalRewardId = None + # 0 for initial progress + initialProgress = 0 + # To make it easy for testing purposes. + # This should never be on in production + if self.QuestCheat: + # Quest is already compelte + initialProgress = 1000 + # Clothing quests must be handled by the Tailor. + if ((rewardId == Quests.NA) or + (Quests.getRewardClass(rewardId) != Quests.ClothingTicketReward)): + # Visit npc is the HQ + toNpcId = Quests.ToonHQ + if Quests.isLoopingFinalTier(av.getRewardTier()): + # Do not record the history if this is the final looping tier + recordHistory = 0 + else: + recordHistory = 1 + av.addQuest((questId, npcId, toNpcId, rewardId, initialProgress), finalRewardId, recordHistory) + # if this was a requested quest, clear it + if self.NextQuestDict.get(avId) == questId: + del self.NextQuestDict[avId] + else: + self.notify.warning("assignQuest: avatar not found: avId: %s" % (avId)) + return + + + def toonDefeatedFactory(self, av, location, avList): + # factory is telling us that this avatar just defeated it. + # see if this toon has a quest on this factory. If so, + # update the progress. + avQuests = av.quests + avId = av.getDoId() + changed = 0 + + for questDesc in avQuests: + quest = Quests.getQuest(questDesc[0]) + num = quest.doesFactoryCount(avId, location, avList) + if num > 0: + questDesc[4] += num + changed = 1 + + # Now send the quests back to the avatar if the status changed + if changed: + self.notify.debug("toonDefeatedFactory: av made progress") + av.b_setQuests(avQuests) + else: + self.notify.debug("toonDefeatedFactory: av made NO progress") + + def toonDefeatedStage(self, av, location, avList): + self.notify.debug("toonDefeatedStage: av made NO progress") + + def toonRecoveredCogSuitPart(self, av, location, avList): + avQuests = av.quests + avId = av.getDoId() + changed = 0 + + for questDesc in avQuests: + quest = Quests.getQuest(questDesc[0]) + num = quest.doesCogPartCount(avId, location, avList) + if num > 0: + questDesc[4] += num + changed = 1 + + # Now send the quests back to the avatar if the status changed + if changed: + self.notify.debug("toonRecoveredCogSuitPart: av made progress") + av.b_setQuests(avQuests) + else: + self.notify.debug("toonRecoveredCogSuitPart: av made NO progress") + + def toonDefeatedMint(self, av, mintId, avList): + # mint is telling us that this avatar just defeated it. + # see if this toon has a quest on this mint. If so, + # update the progress. + avQuests = av.quests + avId = av.getDoId() + changed = 0 + + for questDesc in avQuests: + quest = Quests.getQuest(questDesc[0]) + num = quest.doesMintCount(avId, mintId, avList) + if num > 0: + questDesc[4] += num + changed = 1 + + # Now send the quests back to the avatar if the status changed + if changed: + self.notify.debug("toonDefeatedMint: av made progress") + av.b_setQuests(avQuests) + else: + self.notify.debug("toonDefeatedMint: av made NO progress") + + def toonDefeatedStage(self, av, stageId, avList): + self.notify.debug("toonDefeatedStage") + pass + + def toonKilledBuilding(self, av, track, difficulty, numFloors, zoneId, avList): + # This is the battle notifying us that a toon has defeated a + # building. See if this toon has a quest on this building. + # If so, update the progress. + avQuests = av.quests + avId = av.getDoId() + changed = 0 + + #self.notify.debug("toonKilledBuilding: avId: %s, track: %s, diff: %s, numFloors: %s, zoneId: %s" % + # (avId, track, difficulty, numFloors, zoneId)) + for questDesc in avQuests: + questClass = Quests.getQuestClass(questDesc[0]) + if ((questClass == Quests.BuildingQuest) or + (questClass == Quests.BuildingNewbieQuest)): + quest = Quests.getQuest(questDesc[0]) + matchedTrack = ((quest.getBuildingTrack() == Quests.Any) or (quest.getBuildingTrack() == track)) + matchedNumFloors = (quest.getNumFloors() <= numFloors) + matchedLocation = quest.isLocationMatch(zoneId) + if matchedTrack and matchedNumFloors and matchedLocation: + num = quest.doesBuildingCount(avId, avList) + if (num > 0): + questDesc[4] += num + changed = 1 + else: + # Do not care about this quest here + continue + + # Now send the quests back to the avatar if the status changed + if changed: + self.notify.debug("toonKilledBuilding: av made progress") + av.b_setQuests(avQuests) + else: + self.notify.debug("toonKilledBuilding: av made NO progress") + return + + def toonKilledCogdo(self, av, difficulty, numFloors, zoneId, avList): + # This is the battle notifying us that a toon has defeated a + # cogdo. See if this toon has a quest on this cogdo. + # If so, update the progress. + avQuests = av.quests + avId = av.getDoId() + changed = 0 + + #self.notify.debug("toonKilledBuilding: avId: %s, track: %s, diff: %s, numFloors: %s, zoneId: %s" % + # (avId, track, difficulty, numFloors, zoneId)) + for questDesc in avQuests: + questClass = Quests.getQuestClass(questDesc[0]) + """ TODO + if ((questClass == Quests.BuildingQuest) or + (questClass == Quests.BuildingNewbieQuest)): + quest = Quests.getQuest(questDesc[0]) + matchedTrack = ((quest.getBuildingTrack() == Quests.Any) or (quest.getBuildingTrack() == track)) + matchedNumFloors = (quest.getNumFloors() <= numFloors) + matchedLocation = quest.isLocationMatch(zoneId) + if matchedTrack and matchedNumFloors and matchedLocation: + num = quest.doesBuildingCount(avId, avList) + if (num > 0): + questDesc[4] += num + changed = 1 + else: + # Do not care about this quest here + continue + """ + + # Now send the quests back to the avatar if the status changed + if changed: + self.notify.debug("toonKilledCogdo: av made progress") + av.b_setQuests(avQuests) + else: + self.notify.debug("toonKilledCogdo: av made NO progress") + return + + def toonKilledCogs(self, av, cogList, zoneId, avList): + # This is the battle notifying us that a toon killed some cogs + # See if this toon has a quest on these cogs. If so, update the progress. + avQuests = av.quests + avId = av.getDoId() + changed = 0 + + self.notify.debug("toonKilledCogs: avId: %s, avQuests: %s, cogList: %s, zoneId: %s" % + (avId, avQuests, cogList, zoneId)) + + for questDesc in avQuests: + quest = Quests.getQuest(questDesc[0]) + if quest != None: + for cogDict in cogList: + if cogDict['isVP']: + num = quest.doesVPCount(avId, cogDict, zoneId, avList) + elif cogDict['isCFO']: + num = quest.doesCFOCount(avId, cogDict, zoneId, avList) + else: + num = quest.doesCogCount(avId, cogDict, zoneId, avList) + if (num > 0): + questDesc[4] += num + changed = 1 + + # Now send the quests back to the avatar if the status changed + if changed: + self.notify.debug("toonKilledCogs: av %s made progress" % (avId)) + av.b_setQuests(avQuests) + else: + self.notify.debug("toonKilledCogs: av %s made NO progress" % (avId)) + return + + def toonRodeTrolleyFirstTime(self, av): + # This is notifying us that a toon has gotten on the + # trolley for the first time. See if this toon has a + # trolley quest. If so, update the progress. + avQuests = av.quests + avId = av.getDoId() + changed = 0 + + for questDesc in avQuests: + questClass = Quests.getQuestClass(questDesc[0]) + if (questClass == Quests.TrolleyQuest): + # Set progress + questDesc[4] = 1 + changed = 1 + else: + # Do not care about this quest here + pass + + # Now send the quests back to the avatar if the status changed + if changed: + self.notify.debug("toonRodeTrolleyFirstTime: av %s made progress" % (avId)) + av.b_setQuests(avQuests) + # log this event + self.air.writeServerEvent('firstTrolleyGame', avId, '') + else: + self.notify.debug("toonRodeTrolleyFirstTime: av %s made NO progress" % (avId)) + return + + def toonPlayedMinigame(self, av, avList): + # This is notifying us that a toon has entered a minigame. + # See if this toon has a minigame quest. If so, update the progress. + avQuests = av.quests + avId = av.getDoId() + changed = 0 + + for questDesc in avQuests: + questClass = Quests.getQuestClass(questDesc[0]) + if (questClass == Quests.MinigameNewbieQuest): + quest = Quests.getQuest(questDesc[0]) + num = quest.doesMinigameCount(av, avList) + if (num > 0): + # Set progress + questDesc[4] += num + changed = 1 + + # Now send the quests back to the avatar if the status changed + if changed: + self.notify.debug("toonPlayedMinigame: av %s made progress" % (avId)) + av.b_setQuests(avQuests) + else: + self.notify.debug("toonPlayedMinigame: av %s made NO progress" % (avId)) + return + + def toonOpenedMailbox(self, av): + # This is notifying us that a toon has opened his mailbox + # See if this toon has a mailbox quest. If so, update the progress. + avQuests = av.quests + avId = av.getDoId() + changed = 0 + for questDesc in avQuests: + questClass = Quests.getQuestClass(questDesc[0]) + if (questClass == Quests.MailboxQuest): + # Set progress + questDesc[4] = 1 + changed = 1 + # Now send the quests back to the avatar if the status changed + if changed: + self.notify.debug("toonOpenedMailbox: av %s made progress" % (avId)) + av.b_setQuests(avQuests) + else: + self.notify.debug("toonOpenedMailbox: av %s made NO progress" % (avId)) + return + + def toonUsedPhone(self, av): + # This is notifying us that a toon used his phone + # See if this toon has a phone quest. If so, update the progress. + avQuests = av.quests + avId = av.getDoId() + changed = 0 + for questDesc in avQuests: + questClass = Quests.getQuestClass(questDesc[0]) + if (questClass == Quests.PhoneQuest): + # Set progress + questDesc[4] = 1 + changed = 1 + # Now send the quests back to the avatar if the status changed + if changed: + self.notify.debug("toonUsedPhone: av %s made progress" % (avId)) + av.b_setQuests(avQuests) + else: + self.notify.debug("toonUsedPhone: av %s made NO progress" % (avId)) + return + + def recoverItems(self, av, cogList, zoneId): + avQuests = av.quests + avId = av.getDoId() + itemsRecovered = [] + itemsNotRecovered = [] + changed = 0 + + for questDesc in avQuests: + questClass = Quests.getQuestClass(questDesc[0]) + if (questClass == Quests.RecoverItemQuest): + quest = Quests.getQuest(questDesc[0]) + # See if the cog that stole the item is in the cogList + questCogType = quest.getHolder() + qualifier = quest.getHolderType() + for cogDict in cogList: + # If the cogType is Quests.Any, that means any cog + # Ok, now check to see if we recovered the item based + # on the percent chance of finding it stored in the quest + # Only find items if we still need them + self.notify.debug("recoverItems: checking against cogDict: %s" % (cogDict)) + if ((questCogType == Quests.Any) or + (questCogType == cogDict[qualifier]) or + # If it is level based, count those higher too + ((qualifier == 'level') and (questCogType <= cogDict[qualifier])) + ): + if avId in cogDict['activeToons']: + if not quest.testDone(questDesc[4]):#if questDesc[4] < quest.getNumItems(): + if quest.isLocationMatch(zoneId): + #rand = random.random() * 100 + #if rand <= quest.getPercentChance(): + check, count = quest.testRecover(questDesc[4]) + if check: + # FOUND IT! Increment progress by one item + #questDesc[4] += 1 + # Keep track of all the items recovered + itemsRecovered.append(quest.getItem()) + #changed = 1 + self.notify.debug("recoverItems: av %s made progress: %s" % (avId, questDesc[4])) + else: + self.notify.debug("recoverItems: av %s made NO progress (item not found) [%s > %s])" % (avId, check, quest.getPercentChance())) + itemsNotRecovered.append(quest.getItem()) + #keeping track of missed items + changed = 1 + questDesc[4] = count + else: + self.notify.debug("recoverItems: av %s made NO progress (wrong location)" % (avId)) + else: + self.notify.debug("recoverItems: av %s made NO progress (have enough already)" % (avId)) + else: + self.notify.debug("recoverItems: av %s made NO progress (av not active)" % (avId)) + else: + self.notify.debug("recoverItems: av %s made NO progress (wrong cog type)" % (avId)) + else: + # Do not care about this quest here + continue + + # Now send the quests back to the avatar if the status changed + + # Note: this means that an avatar will immediately get credit + # for finding an item, even if the item is found in the middle + # floor of a building and the avatar later is killed on a + # later floor, thus failing the building. + if changed: + av.b_setQuests(avQuests) + + return (itemsRecovered, itemsNotRecovered) + + def findItemInWater(self, av, zoneId): + # Similar to recoverItems, but this is called from the + # DistributedFishingSpot to see if there are any quest items + # in the water. No cogs are involved; hence, the only valid + # questCogType is Quests.AnyFish. + + # Only one item at a time is returned by this function; the + # function either returns the item found, or None. + # Note: this does not support two quests with same item + avQuests = av.quests + avId = av.getDoId() + + for questDesc in avQuests: + questClass = Quests.getQuestClass(questDesc[0]) + if (questClass == Quests.RecoverItemQuest): + quest = Quests.getQuest(questDesc[0]) + if ((quest.getType() == Quests.RecoverItemQuest) and + (quest.getHolder() == Quests.AnyFish) and + ((random.random() * 100) <= quest.getPercentChance()) and + (questDesc[4] < quest.getNumItems()) and + quest.isLocationMatch(zoneId) + ): + # FOUND IT! Increment progress by one item + questDesc[4] += 1 + self.notify.debug("findItemInWater: av %s made progress" % (avId)) + av.b_setQuests(avQuests) + # Return the item recovered + return quest.getItem() + else: + # Do not care about this quest here + continue + + self.notify.debug("findItemInWater: av %s made NO progress" % (avId)) + return None + + def completeAllQuestsMagically(self, av): + avQuests = av.quests + for quest in avQuests: + # Make sure the progress is really high so the quest will seem completed + quest[4] = 1000 + av.b_setQuests(avQuests) + return 1 + + def completeQuestMagically(self, av, index): + avQuests = av.quests + # Make sure we are in range + if index < len(av.quests): + # Make sure the progress is really high so the quest will seem completed + avQuests[index][4] = 1000 + av.b_setQuests(avQuests) + return 1 + else: + return 0 + + def toonMadeFriend(self, av, otherAv): + # This is notifying us that a toon has made a friend. + # See if this toon has a friend quest. + # If so, update the progress. + avQuests = av.quests + avId = av.getDoId() + changed = 0 + for questDesc in avQuests: + questClass = Quests.getQuestClass(questDesc[0]) + if ((questClass == Quests.FriendQuest) or + (questClass == Quests.FriendNewbieQuest)): + quest = Quests.getQuest(questDesc[0]) + if (quest.doesFriendCount(av, otherAv)): + # Set progress + questDesc[4] += 1 + changed = 1 + else: + # Do not care about this quest here + continue + # Now send the quests back to the avatar if the status changed + if changed: + self.notify.debug("toonMadeFriend: av %s made progress" % (avId)) + av.b_setQuests(avQuests) + else: + self.notify.debug("toonMadeFriend: av %s made NO progress" % (avId)) + + def hasTailorClothingTicket(self, av, npc): + for questDesc in av.quests: + questId, fromNpcId, toNpcId, rewardId, toonProgress = questDesc + questType = Quests.getQuestClass(questId) + # See if this NPC is the one we are supposed to deliver to + # You by definition have the item + if (questType == Quests.DeliverItemQuest): + if Quests.npcMatches(toNpcId, npc): + rewardId = Quests.getAvatarRewardId(av, questId) + rewardType = Quests.getRewardClass(rewardId) + if (rewardType == Quests.ClothingTicketReward): + return 1 + elif(rewardType == Quests.TIPClothingTicketReward): + return 2 + else: + # Reward was not a clothing ticket + continue + else: + # NPC does not match + continue + else: + # Not a deliver item quest + continue + # Did not find it, avId does not have clothing ticket on this tailor + return 0 + + def removeClothingTicket(self, av, npc): + for questDesc in av.quests: + questId, fromNpcId, toNpcId, rewardId, toonProgress = questDesc + questClass = Quests.getQuestClass(questId) + # See if this NPC is the one we are supposed to deliver to + # You by definition have the item + if (questClass == Quests.DeliverItemQuest): + if Quests.npcMatches(toNpcId, npc): + rewardId = Quests.getAvatarRewardId(av, questId) + rewardClass = Quests.getRewardClass(rewardId) + if (rewardClass == Quests.ClothingTicketReward or rewardClass == Quests.TIPClothingTicketReward): + # This section is much like completeQuest() + av.removeQuest(questId) + # Update the toon with the reward. This reward does nothing right + # now but it may in the future, so it is the right thing to do + reward = Quests.getReward(rewardId) + reward.sendRewardAI(av) + # Bump the reward + self.incrementReward(av) + return 1 + else: + # Reward was not a clothing ticket + continue + else: + # NPC does not match + continue + else: + # Not a deliver item quest + continue + # Did not find it, avId does not have clothing ticket on this tailor + return 0 + + def setNextQuest(self, avId, questId): + # for ~nextQuest: queue up a quest for this avatar + self.NextQuestDict[avId] = questId + + def cancelNextQuest(self, avId): + # cancel any pending quest for this avatar + oldQuest = self.NextQuestDict.get(avId) + if oldQuest: + del self.NextQuestDict[avId] + return oldQuest diff --git a/toontown/quest/QuestParser.py b/toontown/quest/QuestParser.py index 36d4e54..493052b 100644 --- a/toontown/quest/QuestParser.py +++ b/toontown/quest/QuestParser.py @@ -4,7 +4,8 @@ import tokenize import copy from direct.interval.IntervalGlobal import * from direct.directnotify import DirectNotifyGlobal -from pandac.PandaModules import * +from panda3d.core import * +from panda3d.otp import * from direct.showbase import DirectObject from . import BlinkingArrows from toontown.toon import ToonHeadFrame diff --git a/toontown/quest/Quests.py b/toontown/quest/Quests.py index 7f06e2d..655a25b 100644 --- a/toontown/quest/Quests.py +++ b/toontown/quest/Quests.py @@ -1743,11 +1743,10 @@ class TrackChoiceQuest(Quest): class FriendQuest(Quest): def filterFunc(avatar): - if len(avatar.getFriendsList()) == 0: + if not config.GetBool('skip-friend-quest', False) and len(avatar.getFriendsList()) == 0: return 1 else: return 0 - filterFunc = staticmethod(filterFunc) def __init__(self, id, quest): @@ -1889,6 +1888,13 @@ class MailboxQuest(Quest): class PhoneQuest(Quest): + def filterFunc(avatar): + if not config.GetBool('skip-phone-quest', False): + return 1 + else: + return 0 + filterFunc = staticmethod(filterFunc) + def __init__(self, id, quest): Quest.__init__(self, id, quest) @@ -2115,7 +2121,7 @@ QuestDict = { 'type'), ToonHQ, ToonHQ, - NA, + 100, 150, DefaultDialog), 150: (TT_TIER, @@ -2123,7 +2129,7 @@ QuestDict = { (FriendQuest,), Same, Same, - NA, + 100, 175, DefaultDialog), 160: (TT_TIER, diff --git a/toontown/spellbook/MagicWordIndex.py b/toontown/spellbook/MagicWordIndex.py index 773d52d..d0f9cd5 100644 --- a/toontown/spellbook/MagicWordIndex.py +++ b/toontown/spellbook/MagicWordIndex.py @@ -315,6 +315,30 @@ class RequestMinigame(MagicWord): retStr += f" with difficulty {mgDiff}" return retStr + "." +class Quests(MagicWord): + aliases = ["quest", "tasks", "task", "toontasks"] + desc = "Quest manupliation" + execLocation = MagicWordConfig.EXEC_LOC_SERVER + arguments = [("command", str, True), ("index", int, False, -1)] + + def handleWord(self, invoker, avId, toon, *args): + command = args[0] + index = args[1] + """ + Commands: + - "finish": Finish a task (sets the progress to 1000), finishes all by default + """ + if command == "finish": + if index == -1: + self.air.questManager.completeAllQuestsMagically(toon) + return "Finished all quests." + else: + if self.air.questManager.completeQuestMagically(toon, index): + return f"Finished quest {index}." + return f"Quest {index} not found. (Hint: Quest indexes start at 0)" + else: + return "Valid commands: \"finish\"" + # Instantiate all classes defined here to register them. # A bit hacky, but better than the old system for item in list(globals().values()): diff --git a/toontown/spellbook/ToontownMagicWordManagerAI.py b/toontown/spellbook/ToontownMagicWordManagerAI.py index 0973ff2..881caaf 100644 --- a/toontown/spellbook/ToontownMagicWordManagerAI.py +++ b/toontown/spellbook/ToontownMagicWordManagerAI.py @@ -77,11 +77,12 @@ class ToontownMagicWordManagerAI(DistributedObjectAI.DistributedObjectAI): self.notify.warning('requestExecuteMagicWord: Magic Word use requested but invoker avatar is non-existent!') return + # FIXME: # Same thing with the Toontorial. Magic Words are strictly forbidden here # Tell the user they can't use it because they're in the Toontorial - if hasattr(self.air, 'tutorialManager') and avId in list(self.air.tutorialManager.avId2fsm.keys()): - self.generateResponse(avId=avId, responseType="Tutorial") - return + # if hasattr(self.air, 'tutorialManager') and avId in list(self.air.tutorialManager.avId2fsm.keys()): + # self.generateResponse(avId=avId, responseType="Tutorial") + # return # Our Magic Word affectRange is either SELF (the invoker) or BOTH (invoker and a target) # Because of this, we should add the invoker to the target list diff --git a/toontown/suit/DistributedTutorialSuitAI.py b/toontown/suit/DistributedTutorialSuitAI.py index ead3ad0..c92d64d 100644 --- a/toontown/suit/DistributedTutorialSuitAI.py +++ b/toontown/suit/DistributedTutorialSuitAI.py @@ -1,5 +1,55 @@ -from direct.directnotify import DirectNotifyGlobal -from direct.distributed.DistributedObjectAI import DistributedObjectAI +from otp.ai.AIBaseGlobal import * -class DistributedTutorialSuitAI(DistributedObjectAI): - notify = DirectNotifyGlobal.directNotify.newCategory('DistributedTutorialSuitAI') +from direct.directnotify import DirectNotifyGlobal +from toontown.battle import SuitBattleGlobals +from . import DistributedSuitBaseAI + + +class DistributedTutorialSuitAI(DistributedSuitBaseAI.DistributedSuitBaseAI): + + notify = DirectNotifyGlobal.directNotify.newCategory( + 'DistributedTutorialSuitAI') + + def __init__(self, air, suitPlanner): + """__init__(air, suitPlanner)""" + DistributedSuitBaseAI.DistributedSuitBaseAI.__init__(self, air, + suitPlanner) + + def delete(self): + DistributedSuitBaseAI.DistributedSuitBaseAI.delete(self) + self.ignoreAll() + + def requestBattle(self, x, y, z, h, p, r): + """requestBattle(x, y, z, h, p, r) + """ + toonId = self.air.getAvatarIdFromSender() + + if self.notify.getDebug(): + self.notify.debug( str( self.getDoId() ) + \ + str( self.zoneId ) + \ + ': request battle with toon: %d' % toonId ) + + # Store the suit's actual pos and hpr on the client + self.confrontPos = Point3(x, y, z) + self.confrontHpr = Vec3(h, p, r) + + # Request a battle from the suit planner + if (self.sp.requestBattle(self.zoneId, self, toonId)): + self.acceptOnce(self.getDeathEvent(), self._logDeath, [toonId]) + if self.notify.getDebug(): + self.notify.debug( "Suit %d requesting battle in zone %d" % + (self.getDoId(), self.zoneId) ) + else: + # Suit tells toon to get lost + if self.notify.getDebug(): + self.notify.debug('requestBattle from suit %d - denied by battle manager' % (self.getDoId())) + self.b_setBrushOff(SuitDialog.getBrushOffIndex(self.getStyleName())) + self.d_denyBattle( toonId ) + + def getConfrontPosHpr(self): + """ getConfrontPosHpr() + """ + return (self.confrontPos, self.confrontHpr) + + def _logDeath(self, toonId): + self.air.writeServerEvent('beatFirstCog', toonId, '') \ No newline at end of file diff --git a/toontown/toon/DistributedToonAI.py b/toontown/toon/DistributedToonAI.py index 536300b..030373d 100644 --- a/toontown/toon/DistributedToonAI.py +++ b/toontown/toon/DistributedToonAI.py @@ -3781,7 +3781,7 @@ class DistributedToonAI(DistributedPlayerAI.DistributedPlayerAI, DistributedSmoo paidStatus = simbase.config.GetString('force-paid-status', 'none') if paidStatus == 'unpaid': access = 1 - print('Setting Access %s' % access) + self.notify.debug('Setting Access %s' % access) if access == OTPGlobals.AccessInvalid: if not __dev__: self.air.writeServerEvent('Setting Access', self.doId, 'setAccess not being sent by the OTP Server, changing access to unpaid') diff --git a/toontown/town/Street.py b/toontown/town/Street.py index 743bcd1..cf2853e 100644 --- a/toontown/town/Street.py +++ b/toontown/town/Street.py @@ -64,7 +64,7 @@ class Street(BattlePlace.BattlePlace): State.State('WaitForBattle', self.enterWaitForBattle, self.exitWaitForBattle, ['battle', 'walk']), State.State('battle', self.enterBattle, self.exitBattle, ['walk', 'teleportOut', 'died']), State.State('doorIn', self.enterDoorIn, self.exitDoorIn, ['walk']), - State.State('doorOut', self.enterDoorOut, self.exitDoorOut, ['walk']), + State.State('doorOut', self.enterDoorOut, self.exitDoorOut, ['walk', 'stopped']), State.State('elevatorIn', self.enterElevatorIn, self.exitElevatorIn, ['walk']), State.State('elevator', self.enterElevator, self.exitElevator, ['walk']), State.State('trialerFA', self.enterTrialerFA, self.exitTrialerFA, ['trialerFAReject', 'DFA']), diff --git a/toontown/tutorial/DistributedBattleTutorialAI.py b/toontown/tutorial/DistributedBattleTutorialAI.py index 7d1b31f..8b38b35 100644 --- a/toontown/tutorial/DistributedBattleTutorialAI.py +++ b/toontown/tutorial/DistributedBattleTutorialAI.py @@ -1,5 +1,21 @@ +from toontown.battle import DistributedBattleAI from direct.directnotify import DirectNotifyGlobal -from direct.distributed.DistributedObjectAI import DistributedObjectAI -class DistributedBattleTutorialAI(DistributedObjectAI): +class DistributedBattleTutorialAI(DistributedBattleAI.DistributedBattleAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedBattleTutorialAI') + + def __init__(self, air, battleMgr, pos, suit, toonId, zoneId, + finishCallback=None, maxSuits=4, interactivePropTrackBonus = -1): + """__init__(air, battleMgr, pos, suit, toonId, zoneId, + finishCallback, maxSuits) + """ + DistributedBattleAI.DistributedBattleAI.__init__( + self, air, battleMgr, pos, suit, toonId, zoneId, + finishCallback, maxSuits, tutorialFlag=1) + + # There is no timer in the tutorial... The reward movie is random length. + def startRewardTimer(self): + pass + + #def handleRewardDone(self): + # DistributedBattleAI.DistributedBattleAI.handleRewardDone(self) diff --git a/toontown/tutorial/SuitPlannerTutorialAI.py b/toontown/tutorial/SuitPlannerTutorialAI.py new file mode 100644 index 0000000..a5232a2 --- /dev/null +++ b/toontown/tutorial/SuitPlannerTutorialAI.py @@ -0,0 +1,74 @@ +""" SuitPlannerTutorial module: contains the SuitPlannerTutorial class + which handles management of the suit you will fight during the + tutorial.""" + +from otp.ai.AIBaseGlobal import * + +from direct.directnotify import DirectNotifyGlobal +from toontown.suit import DistributedTutorialSuitAI +from . import TutorialBattleManagerAI + +class SuitPlannerTutorialAI: + """ + SuitPlannerTutorialAI: manages the single suit that you fight during + the tutorial. + """ + + notify = DirectNotifyGlobal.directNotify.newCategory( + 'SuitPlannerTutorialAI') + + def __init__(self, air, zoneId, battleOverCallback): + # Store these things + self.zoneId = zoneId + self.air = air + self.battle = None + # This callback will be used to open the HQ doors when the + # battle is over. + self.battleOverCallback = battleOverCallback + + # Create a battle manager + self.battleMgr = TutorialBattleManagerAI.TutorialBattleManagerAI( + self.air) + + # Create a flunky + newSuit = DistributedTutorialSuitAI.DistributedTutorialSuitAI(self.air, self) + newSuit.setupSuitDNA(1, 1, "c") + # This is a special tutorial path state + newSuit.generateWithRequired(self.zoneId) + self.suit = newSuit + + def cleanup(self): + self.zoneId = None + self.air = None + if self.suit: + self.suit.requestDelete() + self.suit = None + if self.battle: + #self.battle.requestDelete() + #RAU made to kill the mem leak when you close the window in the middle of the battle tutorial + cellId = self.battle.battleCellId + battleMgr = self.battle.battleMgr + if cellId in battleMgr.cellId2battle: + battleMgr.destroy(self.battle) + + self.battle = None + + def getDoId(self): + # This is here because the suit expects the suit planner to be + # a distributed object, if it has a suit planner. We want it to + # have a suit planner, but not a distributed one, so we return + # 0 when asked what our DoId is. Kind of hackful, I guess. + return 0 + + def requestBattle(self, zoneId, suit, toonId): + # 70, 20, 0 is a battle cell position that I just made up. + self.battle = self.battleMgr.newBattle( + zoneId, zoneId, Vec3(35, 20, 0), + suit, toonId, + finishCallback=self.battleOverCallback) + return 1 + + def removeSuit(self, suit): + # Get rid of the suit. + suit.requestDelete() + self.suit = None diff --git a/toontown/tutorial/TutorialBattleManagerAI.py b/toontown/tutorial/TutorialBattleManagerAI.py new file mode 100644 index 0000000..b19f20e --- /dev/null +++ b/toontown/tutorial/TutorialBattleManagerAI.py @@ -0,0 +1,11 @@ +from toontown.battle import BattleManagerAI +from direct.directnotify import DirectNotifyGlobal +from . import DistributedBattleTutorialAI + +class TutorialBattleManagerAI(BattleManagerAI.BattleManagerAI): + + notify = DirectNotifyGlobal.directNotify.newCategory('TutorialBattleManagerAI') + + def __init__(self, air): + BattleManagerAI.BattleManagerAI.__init__(self, air) + self.battleConstructor = DistributedBattleTutorialAI.DistributedBattleTutorialAI diff --git a/toontown/tutorial/TutorialManagerAI.py b/toontown/tutorial/TutorialManagerAI.py index 0df746c..ae89ac1 100644 --- a/toontown/tutorial/TutorialManagerAI.py +++ b/toontown/tutorial/TutorialManagerAI.py @@ -1,5 +1,322 @@ +from otp.ai.AIBaseGlobal import * +from panda3d.core import * +from panda3d.toontown import * +from direct.distributed import DistributedObjectAI from direct.directnotify import DirectNotifyGlobal -from direct.distributed.DistributedObjectAI import DistributedObjectAI +from toontown.building import TutorialBuildingAI +from toontown.building import TutorialHQBuildingAI +from . import SuitPlannerTutorialAI +from toontown.toonbase import ToontownBattleGlobals +from toontown.toon import NPCToons +from toontown.ai import BlackCatHolidayMgrAI +from toontown.ai import DistributedBlackCatMgrAI -class TutorialManagerAI(DistributedObjectAI): - notify = DirectNotifyGlobal.directNotify.newCategory('TutorialManagerAI') +class TutorialManagerAI(DistributedObjectAI.DistributedObjectAI): + notify = DirectNotifyGlobal.directNotify.newCategory("TutorialManagerAI") + + # how many seconds do we wait for the toon to appear on AI before we + # nuke his skip tutorial request + WaitTimeForSkipTutorial = 5.0 + + def __init__(self, air): + DistributedObjectAI.DistributedObjectAI.__init__(self, air) + # This is a dictionary of all the players who are currently in + # tutorials. We need to create things when someone requests + # a tutorial, and destroy them when they leave. + self.playerDict = {} + + # There are only two blocks in the tutorial. One for the gag shop + # building, and one for the Toon HQ. If there aren't, something + # is wrong. + self.dnaStore = DNAStorage() + + dnaFile = simbase.air.lookupDNAFileName("tutorial_street.dna") + self.air.loadDNAFileAI(self.dnaStore, dnaFile) + numBlocks = self.dnaStore.getNumBlockNumbers() + assert numBlocks == 2 + # Assumption: the only block that isn't an HQ is the gag shop block. + self.hqBlock = None + self.gagBlock = None + for blockIndex in range (0, numBlocks): + blockNumber = self.dnaStore.getBlockNumberAt(blockIndex) + buildingType = self.dnaStore.getBlockBuildingType(blockNumber) + if (buildingType == 'hq'): + self.hqBlock = blockNumber + else: + self.gagBlock = blockNumber + + assert self.hqBlock and self.gagBlock + + # key is avId, value is real time when the request was made + self.avIdsRequestingSkip = {} + self.accept("avatarEntered", self.waitingToonEntered ) + + return None + + def requestTutorial(self): + # TODO: possible security breach: what if client is repeatedly + # requesting tutorial? can client request tutorial from playground? + # can client request tutorial if hp is at least 16? How do we + # handle these cases? + avId = self.air.getAvatarIdFromSender() + # Handle unexpected exits + self.acceptOnce(self.air.getAvatarExitEvent(avId), + self.__handleUnexpectedExit, + extraArgs=[avId]) + # allocate tutorial objects and zones + zoneDict = self.__createTutorial(avId) + # Tell the player to enter the zone + self.d_enterTutorial(avId, + zoneDict["branchZone"], + zoneDict["streetZone"], + zoneDict["shopZone"], + zoneDict["hqZone"] + ) + self.air.writeServerEvent('startedTutorial', avId, '') + + def toonArrived(self): + avId = self.air.getAvatarIdFromSender() + # Make sure the avatar exists + av = self.air.doId2do.get(avId) + # Clear out the avatar's quests, hp, inventory, and everything else in case + # he made it half way through the tutorial last time. + if av: + # No quests + av.b_setQuests([]) + av.b_setQuestHistory([]) + av.b_setRewardHistory(0, []) + av.b_setQuestCarryLimit(1) + # Starting HP + av.b_setMaxHp(15) + av.b_setHp(15) + # No exp + av.experience.zeroOutExp() + av.d_setExperience(av.experience.makeNetString()) + # One cupcake and one squirting flower + av.inventory.zeroInv() + av.inventory.addItem(ToontownBattleGlobals.THROW_TRACK, 0) + av.inventory.addItem(ToontownBattleGlobals.SQUIRT_TRACK, 0) + av.d_setInventory(av.inventory.makeNetString()) + # No cogs defeated + av.b_setCogStatus([1] * 32) + av.b_setCogCount([0] * 32) + return + + def allDone(self): + avId = self.air.getAvatarIdFromSender() + # No need to worry further about unexpected exits + self.ignore(self.air.getAvatarExitEvent(avId)) + # Make sure the avatar exists + av = self.air.doId2do.get(avId) + if av: + self.air.writeServerEvent('finishedTutorial', avId, '') + av.b_setTutorialAck(1) + self.__destroyTutorial(avId) + else: + self.notify.warning( + "Toon " + + str(avId) + + " isn't here, but just finished a tutorial. " + + "I will ignore this." + ) + return + + def __createTutorial(self, avId): + if self.playerDict.get(avId): + self.notify.warning(str(avId) + " is already in the playerDict!") + + branchZone = self.air.allocateZone() + streetZone = self.air.allocateZone() + shopZone = self.air.allocateZone() + hqZone = self.air.allocateZone() + # Create a building object + building = TutorialBuildingAI.TutorialBuildingAI(self.air, + streetZone, + shopZone, + self.gagBlock) + # Create an HQ object + hqBuilding = TutorialHQBuildingAI.TutorialHQBuildingAI(self.air, + streetZone, + hqZone, + self.hqBlock) + + def battleOverCallback(zoneId): + hqBuilding.battleOverCallback() + building.battleOverCallback() + + # Create a suit planner + suitPlanner = SuitPlannerTutorialAI.SuitPlannerTutorialAI( + self.air, + streetZone, + battleOverCallback) + + # Create the NPC blocking the tunnel to the playground + blockerNPC = NPCToons.createNPC(self.air, 20001, NPCToons.NPCToonDict[20001], streetZone, + questCallback=self.__handleBlockDone) + blockerNPC.setTutorial(1) + + # is the black cat holiday enabled? + blackCatMgr = None + if bboard.has(BlackCatHolidayMgrAI.BlackCatHolidayMgrAI.PostName): + blackCatMgr = DistributedBlackCatMgrAI.DistributedBlackCatMgrAI( + self.air, avId) + blackCatMgr.generateWithRequired(streetZone) + + zoneDict={"branchZone" : branchZone, + "streetZone" : streetZone, + "shopZone" : shopZone, + "hqZone" : hqZone, + "building" : building, + "hqBuilding" : hqBuilding, + "suitPlanner" : suitPlanner, + "blockerNPC" : blockerNPC, + "blackCatMgr" : blackCatMgr, + } + self.playerDict[avId] = zoneDict + return zoneDict + + def __handleBlockDone(self): + return None + + def __destroyTutorial(self, avId): + zoneDict = self.playerDict.get(avId) + if zoneDict: + zoneDict["building"].cleanup() + zoneDict["hqBuilding"].cleanup() + zoneDict["blockerNPC"].requestDelete() + if zoneDict["blackCatMgr"]: + zoneDict["blackCatMgr"].requestDelete() + self.air.deallocateZone(zoneDict["branchZone"]) + self.air.deallocateZone(zoneDict["streetZone"]) + self.air.deallocateZone(zoneDict["shopZone"]) + self.air.deallocateZone(zoneDict["hqZone"]) + zoneDict["suitPlanner"].cleanup() + del self.playerDict[avId] + else: + self.notify.warning("Tried to deallocate zones for " + + str(avId) + + " but none were present in playerDict.") + + def rejectTutorial(self): + avId = self.air.getAvatarIdFromSender() + # Make sure the avatar exists + av = self.air.doId2do.get(avId) + if av: + # Acknowlege that the player has seen a tutorial + self.air.writeServerEvent('finishedTutorial', avId, '') + av.b_setTutorialAck(1) + + self.sendUpdateToAvatarId(avId, "skipTutorialResponse", [1]) + else: + self.notify.warning( + "Toon " + + str(avId) + + " isn't here, but just rejected a tutorial. " + + "I will ignore this." + ) + return + + def respondToSkipTutorial(self, avId, av): + """Reply to the client if we let him skip the tutorial.""" + self.notify.debugStateCall(self) + assert avId + assert av + response = 1 + if av: + if av.tutorialAck: + self.air.writeServerEvent('suspicious', avId, 'requesting skip tutorial, but tutorialAck is 1') + response = 0 + + if av and response: + # Acknowlege that the player has seen a tutorial + self.air.writeServerEvent('skippedTutorial', avId, '') + av.b_setTutorialAck(1) + # these values were taken by running a real tutorial + self.air.questManager.assignQuest(avId, + 20000, + 101, + 100, + 1000, + 1 + ) + + self.air.questManager.completeAllQuestsMagically(av) + av.removeQuest(101) + self.air.questManager.assignQuest(avId, + 1000, + 110, + 2, + 1000, + 0 + ) + self.air.questManager.completeAllQuestsMagically(av) + + # do whatever needs to be done to make his quest state good + elif av: + self.notify.debug("%s requestedSkipTutorial, but tutorialAck is 1") + else: + response = 0 + self.notify.warning( + "Toon " + + str(avId) + + " isn't here, but requested to skip tutorial. " + + "I will ignore this." + ) + self.sendUpdateToAvatarId(avId, "skipTutorialResponse", [response]) + return + + def waitingToonEntered(self, av): + """Check if the avatar is someone who's requested to skip, then proceed accordingly.""" + avId = av.doId + if avId in self.avIdsRequestingSkip: + requestTime = self.avIdsRequestingSkip[avId] + + curTime = globalClock.getFrameTime() + if (curTime - requestTime) <= self.WaitTimeForSkipTutorial: + self.respondToSkipTutorial(avId, av) + else: + self.notify.warning("waited too long for toon %d responding no to skip tutorial request" % avId) + self.sendUpdateToAvatarId(avId, "skipTutorialResponse", [0]) + del self.avIdsRequestingSkip[avId] + self.removeTask("skipTutorialToon-%d" % avId) + + + def waitForToonToEnter(self,avId): + """Mark our toon as requesting to skip, and start a task to timeout for it.""" + self.notify.debugStateCall(self) + self.avIdsRequestingSkip[avId] = globalClock.getFrameTime() + self.doMethodLater(self.WaitTimeForSkipTutorial, self.didNotGetToon, "skipTutorialToon-%d" % avId, [avId]) + + def didNotGetToon(self, avId): + """Just say no since the AI didn't get it.""" + self.notify.debugStateCall(self) + if avId in self.avIdsRequestingSkip: + del self.avIdsRequestingSkip[avId] + self.sendUpdateToAvatarId(avId, "skipTutorialResponse", [0]) + return Task.done + + def requestSkipTutorial(self): + """We are requesting to skip tutorial, add other quest history to be consistent.""" + self.notify.debugStateCall(self) + avId = self.air.getAvatarIdFromSender() + # Make sure the avatar exists + av = self.air.doId2do.get(avId) + if av: + self.respondToSkipTutorial(avId,av) + else: + self.waitForToonToEnter(avId) + + def d_enterTutorial(self, avId, branchZone, streetZone, shopZone, hqZone): + self.sendUpdateToAvatarId(avId, "enterTutorial", [branchZone, + streetZone, + shopZone, + hqZone]) + return + + def __handleUnexpectedExit(self, avId): + self.notify.warning("Avatar: " + str(avId) + + " has exited unexpectedly") + self.__destroyTutorial(avId) + return + + \ No newline at end of file From cee392fa3397e848bda72bdff008cdb2f2d31aff Mon Sep 17 00:00:00 2001 From: Little Cat Date: Wed, 28 Dec 2022 02:42:55 -0400 Subject: [PATCH 46/49] spellbook: Fix preventing MW usage in tutorial. --- toontown/spellbook/ToontownMagicWordManagerAI.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/toontown/spellbook/ToontownMagicWordManagerAI.py b/toontown/spellbook/ToontownMagicWordManagerAI.py index 881caaf..25f50e8 100644 --- a/toontown/spellbook/ToontownMagicWordManagerAI.py +++ b/toontown/spellbook/ToontownMagicWordManagerAI.py @@ -77,12 +77,11 @@ class ToontownMagicWordManagerAI(DistributedObjectAI.DistributedObjectAI): self.notify.warning('requestExecuteMagicWord: Magic Word use requested but invoker avatar is non-existent!') return - # FIXME: # Same thing with the Toontorial. Magic Words are strictly forbidden here # Tell the user they can't use it because they're in the Toontorial - # if hasattr(self.air, 'tutorialManager') and avId in list(self.air.tutorialManager.avId2fsm.keys()): - # self.generateResponse(avId=avId, responseType="Tutorial") - # return + if hasattr(self.air, 'tutorialManager') and avId in self.air.tutorialManager.playerDict: + self.generateResponse(avId=avId, responseType="Tutorial") + return # Our Magic Word affectRange is either SELF (the invoker) or BOTH (invoker and a target) # Because of this, we should add the invoker to the target list From 5c0ca001319de874be4a066f80e0862761932c78 Mon Sep 17 00:00:00 2001 From: Little Cat Date: Wed, 28 Dec 2022 19:10:34 -0400 Subject: [PATCH 47/49] spellbook: Server-sided teleportation. --- etc/toon.dc | 1 + .../spellbook/ToontownMagicWordManager.py | 24 +++++++++++++++++++ .../spellbook/ToontownMagicWordManagerAI.py | 13 +++++++++- 3 files changed, 37 insertions(+), 1 deletion(-) diff --git a/etc/toon.dc b/etc/toon.dc index e972695..9e0fef8 100755 --- a/etc/toon.dc +++ b/etc/toon.dc @@ -1409,6 +1409,7 @@ dclass ToontownMagicWordManager : DistributedObject { requestExecuteMagicWord(int8, int8, int16, uint32, string) airecv clsend; executeMagicWord(string, string, uint32[], blob, int8, int8, int16, uint32); generateResponse(string, string, blob, string, int8, int8, int16, uint32, string); + teleportResponse(string loaderId, string whereId, string how, uint32 hoodId, uint32 zoneId, uint32 avId); }; struct weeklyCalendarHoliday { diff --git a/toontown/spellbook/ToontownMagicWordManager.py b/toontown/spellbook/ToontownMagicWordManager.py index bf32b8b..9a53d36 100644 --- a/toontown/spellbook/ToontownMagicWordManager.py +++ b/toontown/spellbook/ToontownMagicWordManager.py @@ -259,3 +259,27 @@ class ToontownMagicWordManager(DistributedObject.DistributedObject): else: self.generateResponse(responseType="SuccessNoResp", magicWord=word, args=args, affectRange=affectRange, affectType=affectType, affectExtra=affectExtra, lastClickedAvId=lastClickedAvId) + + def teleportResponse(self, loaderId, whereId, how, hoodId, zoneId, avId): + # The AI tells the avatar to go somewhere. This is probably in + # response to a magic word requesting transfer to a zone. + + place = base.cr.playGame.getPlace() + if loaderId == "": + loaderId = ZoneUtil.getBranchLoaderName(zoneId) + if whereId == "": + whereId = ZoneUtil.getToonWhereName(zoneId) + if how == "": + how = "teleportIn" + if hoodId == 0: + hoodId = place.loader.hood.id + if avId == 0: + avId = -1 + place.fsm.forceTransition('teleportOut', + [{"loader": loaderId, + "where": whereId, + "how": how, + "hoodId": hoodId, + "zoneId": zoneId, + "shardId": None, + "avId": avId}]) diff --git a/toontown/spellbook/ToontownMagicWordManagerAI.py b/toontown/spellbook/ToontownMagicWordManagerAI.py index 25f50e8..86583df 100644 --- a/toontown/spellbook/ToontownMagicWordManagerAI.py +++ b/toontown/spellbook/ToontownMagicWordManagerAI.py @@ -273,7 +273,15 @@ class ToontownMagicWordManagerAI(DistributedObjectAI.DistributedObjectAI): returnValue = command.executeWord() # If we have a return value, pass it over to the invoker if returnValue: - self.generateResponse(avId=avId, responseType="Success", returnValue=returnValue) + # If the word returns more than one values, assume that the word wants to teleport the target somewhere. + if type(returnValue) is tuple: + teleportingAvId = avId + if len(returnValue) == 3: + teleportingAvId = returnValue[1] + self.sendTeleportResponse(teleportingAvId, *returnValue[-1]) + self.generateResponse(avId=avId, responseType="Success", returnValue=returnValue[0]) + else: + self.generateResponse(avId=avId, responseType="Success", returnValue=returnValue) # Otherwise just throw a default response to them else: self.generateResponse(avId=avId, responseType="SuccessNoResp", magicWord=magicWord, @@ -296,3 +304,6 @@ class ToontownMagicWordManagerAI(DistributedObjectAI.DistributedObjectAI): # Execute the Magic Word on the client, because it's a client-sided Magic Word self.sendUpdateToAvatarId(avId, "executeMagicWord", [word, commandName, targetIds, parsedArgList, affectRange, affectType, affectExtra, lastClickedAvId]) + + def sendTeleportResponse(self, avId, loaderId, whereId, how, hoodId, zoneId, targetAvId): + self.sendUpdateToAvatarId(avId, "teleportResponse", [loaderId, whereId, how, hoodId, zoneId, targetAvId]) From 8051c15e89398281dc0c4c199dfb49289624d94e Mon Sep 17 00:00:00 2001 From: Little Cat Date: Wed, 28 Dec 2022 19:15:38 -0400 Subject: [PATCH 48/49] spellbook: Boss battle create/manip magic words. --- toontown/battle/DistributedBattleBaseAI.py | 2 - toontown/coghq/BossbotHQBossBattle.py | 2 +- toontown/coghq/CogHQBossBattle.py | 10 ++ toontown/coghq/CogHQLoader.py | 1 + .../coghq/DistributedCashbotBossObject.py | 1 + toontown/coghq/LawbotHQBossBattle.py | 2 +- toontown/coghq/SellbotHQBossBattle.py | 2 +- toontown/distributed/PlayGame.py | 3 +- toontown/spellbook/MagicWordIndex.py | 120 ++++++++++++++++++ toontown/suit/DistributedBossCog.py | 3 + toontown/suit/DistributedBossCogAI.py | 3 + toontown/suit/DistributedBossbotBossAI.py | 28 +++- toontown/suit/DistributedCashbotBoss.py | 10 ++ toontown/suit/DistributedCashbotBossAI.py | 18 +++ toontown/suit/DistributedLawbotBossAI.py | 20 +++ toontown/suit/DistributedSellbotBossAI.py | 20 +++ 16 files changed, 238 insertions(+), 7 deletions(-) diff --git a/toontown/battle/DistributedBattleBaseAI.py b/toontown/battle/DistributedBattleBaseAI.py index 0cf6d38..ab86a50 100644 --- a/toontown/battle/DistributedBattleBaseAI.py +++ b/toontown/battle/DistributedBattleBaseAI.py @@ -714,8 +714,6 @@ class DistributedBattleBaseAI(DistributedObjectAI.DistributedObjectAI, BattleBas empty = InventoryBase.InventoryBase(toon) toon.b_setInventory(empty.makeNetString()) toon.b_setHp(0) - db = DatabaseObject.DatabaseObject(self.air, toonId) - db.storeObject(toon, ['setInventory', 'setHp']) self.notify.info('killing mem leak from temporary DistributedToonAI %d' % toonId) toon.deleteDummy() return diff --git a/toontown/coghq/BossbotHQBossBattle.py b/toontown/coghq/BossbotHQBossBattle.py index cd81c04..781eb6c 100644 --- a/toontown/coghq/BossbotHQBossBattle.py +++ b/toontown/coghq/BossbotHQBossBattle.py @@ -9,7 +9,7 @@ class BossbotHQBossBattle(CogHQBossBattle.CogHQBossBattle): def __init__(self, loader, parentFSM, doneEvent): CogHQBossBattle.CogHQBossBattle.__init__(self, loader, parentFSM, doneEvent) - self.teleportInPosHpr = (88, -214, 0, 210, 0, 0) + self.teleportInPosHpr = (-1.40, 59.78, 0, 360, 0, 0) for stateName in ['movie']: state = self.fsm.getStateNamed(stateName) state.addTransition('crane') diff --git a/toontown/coghq/CogHQBossBattle.py b/toontown/coghq/CogHQBossBattle.py index baafe44..bf0eaa1 100644 --- a/toontown/coghq/CogHQBossBattle.py +++ b/toontown/coghq/CogHQBossBattle.py @@ -110,10 +110,20 @@ class CogHQBossBattle(BattlePlace.BattlePlace): self.bossCog = bossCog if self.bossCog: self.bossCog.d_avatarEnter() + else: + # HACK: For some reason, when teleporting to a boss via a magic word, the place may load + # first instead of the boss cog. So listen to when the boss is generated. + self.acceptOnce('announceBoss', self.__bossGenerate) self._telemLimiter = TLGatherAllAvs('CogHQBossBattle', RotationLimitToH) NametagGlobals.setMasterArrowsOn(1) base.localAvatar.inventory.setRespectInvasions(0) self.fsm.request(requestStatus['how'], [requestStatus]) + + def __bossGenerate(self, boss): + if self.bossCog: + return + self.bossCog = boss + self.bossCog.d_avatarEnter() def exit(self): self.fsm.requestFinalState() diff --git a/toontown/coghq/CogHQLoader.py b/toontown/coghq/CogHQLoader.py index 419faa8..4a48b01 100644 --- a/toontown/coghq/CogHQLoader.py +++ b/toontown/coghq/CogHQLoader.py @@ -143,6 +143,7 @@ class CogHQLoader(StateData.StateData): def enterCogHQBossBattle(self, requestStatus): self.placeClass = self.getBossPlaceClass() self.enterPlace(requestStatus) + self.hood.hideTitleText() def exitCogHQBossBattle(self): self.exitPlace() diff --git a/toontown/coghq/DistributedCashbotBossObject.py b/toontown/coghq/DistributedCashbotBossObject.py index 4353b34..34cc645 100644 --- a/toontown/coghq/DistributedCashbotBossObject.py +++ b/toontown/coghq/DistributedCashbotBossObject.py @@ -1,4 +1,5 @@ from panda3d.core import * +from panda3d.physics import * from direct.interval.IntervalGlobal import * from direct.directnotify import DirectNotifyGlobal from direct.distributed import DistributedSmoothNode diff --git a/toontown/coghq/LawbotHQBossBattle.py b/toontown/coghq/LawbotHQBossBattle.py index 51805d4..2521b3d 100644 --- a/toontown/coghq/LawbotHQBossBattle.py +++ b/toontown/coghq/LawbotHQBossBattle.py @@ -9,7 +9,7 @@ class LawbotHQBossBattle(CogHQBossBattle.CogHQBossBattle): def __init__(self, loader, parentFSM, doneEvent): CogHQBossBattle.CogHQBossBattle.__init__(self, loader, parentFSM, doneEvent) - self.teleportInPosHpr = (88, -214, 0, 210, 0, 0) + self.teleportInPosHpr = (-2.84, -99.47, 0, 360, 0, 0) def load(self): CogHQBossBattle.CogHQBossBattle.load(self) diff --git a/toontown/coghq/SellbotHQBossBattle.py b/toontown/coghq/SellbotHQBossBattle.py index 411b067..a7d8826 100644 --- a/toontown/coghq/SellbotHQBossBattle.py +++ b/toontown/coghq/SellbotHQBossBattle.py @@ -9,7 +9,7 @@ class SellbotHQBossBattle(CogHQBossBattle.CogHQBossBattle): def __init__(self, loader, parentFSM, doneEvent): CogHQBossBattle.CogHQBossBattle.__init__(self, loader, parentFSM, doneEvent) - self.teleportInPosHpr = (0, 95, 18, 180, 0, 0) + self.teleportInPosHpr = (0, 61, 18, 180, 0, 0) def load(self): CogHQBossBattle.CogHQBossBattle.load(self) diff --git a/toontown/distributed/PlayGame.py b/toontown/distributed/PlayGame.py index f55ce3c..af33272 100644 --- a/toontown/distributed/PlayGame.py +++ b/toontown/distributed/PlayGame.py @@ -192,7 +192,8 @@ class PlayGame(StateData.StateData): if how in ['tunnelIn', 'teleportIn', 'doorIn', - 'elevatorIn']: + 'elevatorIn', + 'movie']: self.fsm.request('quietZone', [doneStatus]) else: self.notify.error('Exited hood with unexpected mode %s' % how) diff --git a/toontown/spellbook/MagicWordIndex.py b/toontown/spellbook/MagicWordIndex.py index d0f9cd5..3f3ceff 100644 --- a/toontown/spellbook/MagicWordIndex.py +++ b/toontown/spellbook/MagicWordIndex.py @@ -250,6 +250,9 @@ class MaxToon(MagicWord): def handleWord(self, invoker, avId, toon, *args): from toontown.toonbase import ToontownGlobals + from toontown.quest import Quests + from toontown.suit import SuitDNA + from toontown.coghq import CogDisguiseGlobals # TODO: Handle this better, like giving out all awards, set the quest tier, stuff like that. # This is mainly copied from Anesidora just so I can better work on things. @@ -271,6 +274,14 @@ class MaxToon(MagicWord): toon.b_setMoney(toon.maxMoney) toon.b_setBankMoney(toon.maxBankMoney) + toon.b_setQuests([]) + toon.b_setQuestCarryLimit(ToontownGlobals.MaxQuestCarryLimit) + toon.b_setRewardHistory(Quests.LOOPING_FINAL_TIER, []) + + toon.b_setCogParts([*CogDisguiseGlobals.PartsPerSuitBitmasks]) + toon.b_setCogTypes([SuitDNA.suitsPerDept - 1] * 4) + toon.b_setCogLevels([ToontownGlobals.MaxCogSuitLevel] * 4) + return f"Successfully maxed {toon.getName()}!" class AbortMinigame(MagicWord): @@ -339,6 +350,115 @@ class Quests(MagicWord): else: return "Valid commands: \"finish\"" +class BossBattle(MagicWord): + aliases = ["boss"] + desc = "Create a new or manupliate the current boss battle." + execLocation = MagicWordConfig.EXEC_LOC_SERVER + arguments = [("command", str, True), ("type", str, False, ""), ("start", int, False, 1)] + + def handleWord(self, invoker, avId, toon, *args): + command = args[0].lower() + type = args[1].lower() + start = args[2] + + """ + Commands: + - create [type] [start: 1]: Creates a boss and teleports to it. + - start: Starts/Restarts the battle from the beginning. + - stop: Stops the battle by going to the Frolic state. + - skip: Skips the boss to the next state (needs getNextState to be implemented). + - final: Skips the boss to the final round. + - kill: Skips the boss to the Victory state. + """ + + # create command shortcut: + if command in ("vp", "cfo", "cj", "ceo"): + type = command + command = "create" + try: + start = int(args[1]) + except ValueError: + start = 1 + + from toontown.suit.DistributedBossCogAI import DistributedBossCogAI + boss = None + for do in self.air.doId2do.values(): + if isinstance(do, DistributedBossCogAI): + if do.isToonKnown(invoker.doId): + boss = do + break + + if command == "create": + if boss: + return "You're already in a boss battle. Please finish this one." + if type == "vp": + from toontown.suit.DistributedSellbotBossAI import DistributedSellbotBossAI + boss = DistributedSellbotBossAI(self.air) + elif type == "cfo": + from toontown.suit.DistributedCashbotBossAI import DistributedCashbotBossAI + boss = DistributedCashbotBossAI(self.air) + elif type == "cj": + from toontown.suit.DistributedLawbotBossAI import DistributedLawbotBossAI + boss = DistributedLawbotBossAI(self.air) + elif type == "ceo": + from toontown.suit.DistributedBossbotBossAI import DistributedBossbotBossAI + boss = DistributedBossbotBossAI(self.air) + else: + return f"Unknown boss type: \"{type}\"" + + zoneId = self.air.allocateZone() + boss.generateWithRequired(zoneId) + if start: + boss.addToon(avId) + boss.b_setState('WaitForToons') + else: + boss.b_setState('Frolic') + + respText = f"Created {type.upper()} boss battle" + if not start: + respText += " in Frolic state" + + return respText + ", teleporting...", ["cogHQLoader", "cogHQBossBattle", "movie" if start else "teleportIn", boss.getHoodId(), boss.zoneId, 0] + + # The following commands needs the invoker to be in a boss battle. + if not boss: + return "You ain't in a boss battle! Use the \"create\" command to create a boss battle." + + boss.acceptNewToons() + if command == "start": + boss.b_setState('WaitForToons') + return "Boss battle started!" + + elif command == "stop": + boss.b_setState("Frolic") + return "Boss battle stopped!" + + elif command == "skip": + try: + nextState = boss.getNextState() + except NotImplementedError: + return "\"getNextState\" is not implemented for this boss battle!" + if nextState: + boss.b_setState(nextState) + return f"Skipped to {nextState}!" + return f"Cannot skip \"{boss.getCurrentOrNextState()}\" state." + + elif command in ("final", "pie", "crane"): + if boss.dept == 'c': + boss.b_setState("BattleFour") + else: + boss.b_setState("BattleThree") + return "Skipped to final round!" + + elif command in ("kill", "victory", "finish"): + boss.b_setState("Victory") + return "Killed the boss!" + + # The create command is already described when the invoker is not in a battle. These are the commands + # they can use INSIDE the battle. + return respText + f"Unknown command: \"{command}\". Valid commands: \"start\", \"stop\", \"skip\", \"final\", \"kill\"." + + # Instantiate all classes defined here to register them. # A bit hacky, but better than the old system for item in list(globals().values()): diff --git a/toontown/suit/DistributedBossCog.py b/toontown/suit/DistributedBossCog.py index ab17bb9..aa76277 100644 --- a/toontown/suit/DistributedBossCog.py +++ b/toontown/suit/DistributedBossCog.py @@ -118,6 +118,9 @@ class DistributedBossCog(DistributedAvatar.DistributedAvatar, BossCog.BossCog): self.bubbleF.setTag('attackCode', str(ToontownGlobals.BossCogFrontAttack)) self.bubbleF.stash() + # HACK: See toontown/coghq/CogHQBossBattle.py + messenger.send('announceBoss', [self]) + def disable(self): DistributedAvatar.DistributedAvatar.disable(self) self.battleAId = None diff --git a/toontown/suit/DistributedBossCogAI.py b/toontown/suit/DistributedBossCogAI.py index 51b995c..7dc5461 100644 --- a/toontown/suit/DistributedBossCogAI.py +++ b/toontown/suit/DistributedBossCogAI.py @@ -685,3 +685,6 @@ class DistributedBossCogAI(DistributedAvatarAI.DistributedAvatarAI): def doNextAttack(self, task): self.b_setAttackCode(ToontownGlobals.BossCogNoAttack) + + def getNextState(self): + raise NotImplementedError diff --git a/toontown/suit/DistributedBossbotBossAI.py b/toontown/suit/DistributedBossbotBossAI.py index 4bfa03d..cfabeab 100644 --- a/toontown/suit/DistributedBossbotBossAI.py +++ b/toontown/suit/DistributedBossbotBossAI.py @@ -87,7 +87,7 @@ class DistributedBossbotBossAI(DistributedBossCogAI.DistributedBossCogAI, FSM.FS self.battleOneBattlesMade = True def getHoodId(self): - return ToontownGlobals.LawbotHQ + return ToontownGlobals.BossbotHQ def generateSuits(self, battleNumber): if battleNumber == 1: @@ -885,3 +885,29 @@ class DistributedBossbotBossAI(DistributedBossCogAI.DistributedBossCogAI, FSM.FS def toggleMove(self): self.moveAttackAllowed = not self.moveAttackAllowed return self.moveAttackAllowed + + def getNextState(self): + currState = self.getCurrentOrNextState() + if currState == "Elevator": + return "Introduction" + elif currState == "Introduction": + return "BattleOne" + elif currState == "BattleOne": + return "PrepareBattleTwo" + elif currState == "PrepareBattleTwo": + return "BattleTwo" + elif currState == "BattleTwo": + return "PrepareBattleThree" + elif currState == "PrepareBattleThree": + return "BattleThree" + elif currState == "BattleThree": + return "PrepareBattleFour" + elif currState == "PrepareBattleFour": + return "BattleFour" + elif currState == "BattleFour": + return "Victory" + # Do not skip Victory, weird stuff may happen, like not collecting their rewards. + elif currState == "Reward": + return "Epilogue" + + return None diff --git a/toontown/suit/DistributedCashbotBoss.py b/toontown/suit/DistributedCashbotBoss.py index db5d9f7..b8186b6 100644 --- a/toontown/suit/DistributedCashbotBoss.py +++ b/toontown/suit/DistributedCashbotBoss.py @@ -19,6 +19,7 @@ from toontown.distributed import DelayDelete from toontown.chat import ResistanceChat from toontown.coghq import CogDisguiseGlobals from panda3d.core import * +from panda3d.physics import * from panda3d.otp import * import random import math @@ -481,6 +482,14 @@ class DistributedCashbotBoss(DistributedBossCog.DistributedBossCog, FSM.FSM): track.append(toon.posHprInterval(0.2, pos, hpr)) return track + + def moveLocalToonToBattleThreePos(self): + # This exists because when skipping to the crane round via a magic word, the toon gets + # teleported to the center, taking damage in the progress. This is done to remedy that. + i = self.involvedToons.index(localAvatar.doId) + if not i: + i = 0 + localAvatar.setPosHpr(*ToontownGlobals.CashbotToonsBattleThreeStartPosHpr[i]) def makeBossFleeMovie(self): hadEnough = TTLocalizer.CashbotBossHadEnough @@ -758,6 +767,7 @@ class DistributedCashbotBoss(DistributedBossCog.DistributedBossCog, FSM.FSM): self.evWalls.unstash() self.midVault.stash() self.__hideResistanceToon() + self.moveLocalToonToBattleThreePos() localAvatar.setCameraFov(ToontownGlobals.BossBattleCameraFov) self.generateHealthBar() self.updateHealthBar() diff --git a/toontown/suit/DistributedCashbotBossAI.py b/toontown/suit/DistributedCashbotBossAI.py index 25aaab3..1d3f6f6 100644 --- a/toontown/suit/DistributedCashbotBossAI.py +++ b/toontown/suit/DistributedCashbotBossAI.py @@ -477,3 +477,21 @@ class DistributedCashbotBossAI(DistributedBossCogAI.DistributedBossCogAI, FSM.FS def enterEpilogue(self): DistributedBossCogAI.DistributedBossCogAI.enterEpilogue(self) self.d_setRewardId(self.rewardId) + + def getNextState(self): + currState = self.getCurrentOrNextState() + if currState == "Elevator": + return "Introduction" + elif currState == "Introduction": + return "BattleOne" + elif currState == "BattleOne": + return "PrepareBattleThree" + elif currState == "PrepareBattleThree": + return "BattleThree" + elif currState == "BattleThree": + return "Victory" + # Do not skip Victory, weird stuff may happen, like not collecting their rewards. + elif currState == "Reward": + return "Epilogue" + + return None diff --git a/toontown/suit/DistributedLawbotBossAI.py b/toontown/suit/DistributedLawbotBossAI.py index 3814324..ede2291 100644 --- a/toontown/suit/DistributedLawbotBossAI.py +++ b/toontown/suit/DistributedLawbotBossAI.py @@ -856,3 +856,23 @@ class DistributedLawbotBossAI(DistributedBossCogAI.DistributedBossCogAI, FSM.FSM if battleDifficulty >= numDifficultyLevels: battleDifficulty = numDifficultyLevels - 1 self.b_setBattleDifficulty(battleDifficulty) + + def getNextState(self): + currState = self.getCurrentOrNextState() + if currState == "Elevator": + return "Introduction" + elif currState == "Introduction": + return "BattleOne" + elif currState == "BattleOne": + return "RollToBattleTwo" + elif currState == "RollToBattleTwo": + return "PrepareBattleTwo" + elif currState in ("PrepareBattleTwo", "BattleTwo"): + return "PrepareBattleThree" + elif currState in ("PrepareBattleThree", "BattleThree", "NearVictory"): + return "Victory" + # Do not skip Victory, weird stuff may happen, like not collecting their rewards. + elif currState == "Reward": + return "Epilogue" + + return None diff --git a/toontown/suit/DistributedSellbotBossAI.py b/toontown/suit/DistributedSellbotBossAI.py index dedfcae..9675b7e 100644 --- a/toontown/suit/DistributedSellbotBossAI.py +++ b/toontown/suit/DistributedSellbotBossAI.py @@ -452,3 +452,23 @@ class DistributedSellbotBossAI(DistributedBossCogAI.DistributedBossCogAI, FSM.FS barrel.requestDelete() self.barrels = [] + + def getNextState(self): + currState = self.getCurrentOrNextState() + if currState == "Elevator": + return "Introduction" + elif currState == "Introduction": + return "BattleOne" + elif currState == "BattleOne": + return "RollToBattleTwo" + elif currState == "RollToBattleTwo": + return "PrepareBattleTwo" + elif currState in ("PrepareBattleTwo", "BattleTwo"): + return "PrepareBattleThree" + elif currState in ("PrepareBattleThree", "BattleThree", "NearVictory"): + return "Victory" + # Do not skip Victory, weird stuff may happen, like not collecting their rewards. + elif currState == "Reward": + return "Epilogue" + + return None From d40ac6840bb2c987d70a20ebbc38f596d9834ca8 Mon Sep 17 00:00:00 2001 From: Little Cat Date: Wed, 28 Dec 2022 22:35:58 -0400 Subject: [PATCH 49/49] spellbook: Teleport directly to a minigame. --- toontown/minigame/DistributedDivingGame.py | 2 + toontown/minigame/DivingFishSpawn.py | 1 + toontown/spellbook/MagicWordIndex.py | 80 +++++++++++++++++----- 3 files changed, 65 insertions(+), 18 deletions(-) diff --git a/toontown/minigame/DistributedDivingGame.py b/toontown/minigame/DistributedDivingGame.py index 48a8064..aaa9269 100644 --- a/toontown/minigame/DistributedDivingGame.py +++ b/toontown/minigame/DistributedDivingGame.py @@ -319,6 +319,7 @@ class DistributedDivingGame(DistributedMinigame): for crab in self.crabs: crab.moveLerp.finish() crab.moveLerp = None + crab.cleanup() crab.removeNode() del crab @@ -766,6 +767,7 @@ class DistributedDivingGame(DistributedMinigame): fish.moveLerp.finish() fish.specialLerp = None fish.moveLerp = None + fish.cleanup() fish.removeNode() del fish del self.spawners[spawnerId].fishArray[spawnId] diff --git a/toontown/minigame/DivingFishSpawn.py b/toontown/minigame/DivingFishSpawn.py index 46ffd15..e8f943c 100644 --- a/toontown/minigame/DivingFishSpawn.py +++ b/toontown/minigame/DivingFishSpawn.py @@ -111,6 +111,7 @@ class DivingFishSpawn(DirectObject): fish.sound = None fish.moveLerp = None fish.specialLerp = None + fish.cleanup() fish.removeNode() del fish diff --git a/toontown/spellbook/MagicWordIndex.py b/toontown/spellbook/MagicWordIndex.py index 3f3ceff..d88731b 100644 --- a/toontown/spellbook/MagicWordIndex.py +++ b/toontown/spellbook/MagicWordIndex.py @@ -285,7 +285,7 @@ class MaxToon(MagicWord): return f"Successfully maxed {toon.getName()}!" class AbortMinigame(MagicWord): - aliases = ["exitgame", "exitminigame", "quitgame", "quitminigame"] + aliases = ["exitgame", "exitminigame", "quitgame", "quitminigame", "skipgame", "skipminigame"] desc = "Aborts an ongoing minigame." execLocation = MagicWordConfig.EXEC_LOC_CLIENT arguments = [] @@ -294,22 +294,49 @@ class AbortMinigame(MagicWord): messenger.send("minigameAbort") return "Requested minigame abort." -class RequestMinigame(MagicWord): - aliases = ["minigame"] - desc = "Requests a specified trolley minigame to be loaded." +class Minigame(MagicWord): + aliases = ["mg"] + desc = "Teleport to or request the next trolley minigame." execLocation = MagicWordConfig.EXEC_LOC_SERVER - arguments = [("minigame", str, True), ("difficulty", float, False, 0)] + arguments = [("command", str, True), ("minigame", str, False, ''), ("difficulty", float, False, 0)] def handleWord(self, invoker, avId, toon, *args): - minigame = args[0] - difficulty = args[1] - - mgId = None - mgDiff = None if args[1] == 0 else args[1] - mgKeep = None - mgSzId = None + command = args[0] + minigame = args[1] + difficulty = args[2] from toontown.toonbase import ToontownGlobals + from toontown.hood import ZoneUtil + from toontown.minigame import MinigameCreatorAI + if command in ToontownGlobals.MinigameNames: + # Shortcut + minigame = args[0] + try: + difficulty = float(args[2]) + except ValueError: + difficulty = 0 + + if toon.zoneId in MinigameCreatorAI.MinigameZoneRefs: + # Already in minigame zone, assume request + command = "request" + elif toon.zoneId == ZoneUtil.getSafeZoneId(toon.zoneId): + # Assume teleport + command = "teleport" + else: + # Request by default + command = "request" + + isTeleport = command in ('teleport', 'tp') + isRequest = command in ('request', 'next') + + mgId = None + mgDiff = None if difficulty == 0 else difficulty + mgKeep = None + mgSzId = ZoneUtil.getSafeZoneId(toon.zoneId) if isTeleport else None + + if not any ((isTeleport, isRequest)): + return f"Unknown command or minigame \"{command}\". Valid commands: \"teleport\", \"request\", or a minigame to automatically teleport or request" + try: mgId = int(minigame) if mgId not in ToontownGlobals.MinigameIDs: @@ -319,12 +346,29 @@ class RequestMinigame(MagicWord): return f"Unknown minigame name \"{minigame}\"." mgId = ToontownGlobals.MinigameNames.get(minigame) - from toontown.minigame import MinigameCreatorAI - MinigameCreatorAI.RequestMinigame[avId] = (mgId, mgKeep, mgDiff, mgSzId) - retStr = f"Successfully requested minigame \"{minigame}\"" - if mgDiff: - retStr += f" with difficulty {mgDiff}" - return retStr + "." + if any((isTeleport, isRequest)): + if isTeleport and (ZoneUtil.isDynamicZone(toon.zoneId) or not toon.zoneId == mgSzId): + return "Target needs to be in a playground to teleport to a minigame." + MinigameCreatorAI.RequestMinigame[avId] = (mgId, mgKeep, mgDiff, mgSzId) + if isTeleport: + try: + result = MinigameCreatorAI.createMinigame(self.air, [avId], mgSzId) + except: + return f"Unable to create \"{minigame}\" minigame" + + minigameZone = result['minigameZone'] + retStr = f"Teleporting {toon.getName()} to minigame \"{minigame}\"" + if mgDiff: + retStr += f" with difficulty {mgDiff}" + return retStr + "...", avId, ["minigame", "minigame", "", mgSzId, minigameZone, 0] + + # isRequest + retStr = f"Successfully requested minigame \"{minigame}\"" + if mgDiff: + retStr += f" with difficulty {mgDiff}" + return retStr + "." + + return f"Unknown command or minigame \"{command}\". Valid commands: \"teleport\", \"request\", or a minigame to automatically teleport or request" class Quests(MagicWord): aliases = ["quest", "tasks", "task", "toontasks"]