From 406fcc97864a1507383788b64b8f717187563c51 Mon Sep 17 00:00:00 2001 From: Dakota Smith Date: Wed, 15 Nov 2023 21:20:39 -0800 Subject: [PATCH] pre-commit: Implement pre-commit script, config and run isort on codebase --- .pre-commit-config.yaml | 15 ++++ README.md | 2 +- etc/Configrc.prc | 2 +- otp/ai/AIBase.py | 32 +++---- otp/ai/AIBaseGlobal.py | 2 + otp/ai/AIMsgTypes.py | 4 +- otp/ai/AIZoneData.py | 16 ++-- otp/ai/BanManagerAI.py | 7 +- otp/ai/Barrier.py | 9 +- otp/ai/GarbageLeakServerEventAggregator.py | 3 +- otp/ai/TimeManager.py | 27 +++--- otp/avatar/Avatar.py | 14 +-- otp/avatar/AvatarDNA.py | 7 +- otp/avatar/AvatarDetail.py | 2 + otp/avatar/AvatarPanel.py | 5 +- otp/avatar/DistributedAvatar.py | 33 +++---- otp/avatar/DistributedAvatarAI.py | 9 +- otp/avatar/DistributedAvatarUD.py | 1 + otp/avatar/DistributedPlayer.py | 19 ++-- otp/avatar/DistributedPlayerAI.py | 5 +- otp/avatar/Emote.py | 1 + otp/avatar/LocalAvatar.py | 30 ++++--- otp/avatar/PositionExaminer.py | 3 + otp/avatar/ShadowCaster.py | 4 +- otp/avatar/SpeedMonitor.py | 1 + otp/chat/ChatGarbler.py | 4 +- otp/chat/ChatGlobals.py | 1 + otp/chat/ChatInputNormal.py | 11 ++- otp/chat/ChatInputTyped.py | 11 ++- otp/chat/ChatInputWhiteListFrame.py | 13 +-- otp/chat/ChatManager.py | 19 ++-- otp/chat/TalkAssistant.py | 23 ++--- otp/chat/TalkHandle.py | 1 + otp/chat/WhiteList.py | 1 + otp/distributed/Account.py | 1 + otp/distributed/CentralLogger.py | 1 + otp/distributed/ClsendTracker.py | 7 +- otp/distributed/DistributedDirectory.py | 1 + otp/distributed/DistributedDistrict.py | 1 + otp/distributed/DistributedTestObject.py | 1 + otp/distributed/GameServerTestSuite.py | 1 + otp/distributed/OTPClientRepository.py | 58 ++++++------- otp/distributed/OTPInternalRepository.py | 5 +- otp/distributed/ObjectServer.py | 1 + otp/distributed/OtpDoGlobals.py | 1 + otp/distributed/TelemetryLimiter.py | 4 +- otp/friends/AvatarFriendInfo.py | 1 + otp/friends/AvatarFriendsManager.py | 7 +- otp/friends/AvatarFriendsManagerUD.py | 1 + otp/friends/FriendInfo.py | 1 + otp/friends/FriendManager.py | 5 +- otp/friends/FriendManagerAI.py | 1 + otp/friends/FriendSecret.py | 8 +- otp/friends/GuildManager.py | 12 +-- otp/friends/GuildManagerAI.py | 1 + otp/friends/GuildManagerUD.py | 1 + otp/friends/PlayerFriendsManager.py | 6 +- otp/friends/PlayerFriendsManagerUD.py | 1 + otp/launcher/DownloadWatcher.py | 9 +- otp/launcher/DummyLauncherBase.py | 4 +- otp/launcher/LauncherBase.py | 11 ++- otp/level/AmbientSound.py | 7 +- otp/level/BasicEntities.py | 5 +- otp/level/CollisionSolidEntity.py | 6 +- otp/level/CutScene.py | 16 ++-- otp/level/DistributedEntity.py | 6 +- otp/level/DistributedEntityAI.py | 6 +- otp/level/DistributedInteractiveEntity.py | 5 +- otp/level/DistributedInteractiveEntityAI.py | 1 + otp/level/DistributedLevel.py | 27 +++--- otp/level/DistributedLevelAI.py | 13 +-- otp/level/EditMgr.py | 1 + otp/level/EditMgrAI.py | 2 + otp/level/EditMgrBase.py | 4 +- otp/level/EditorGlobals.py | 1 + otp/level/Entity.py | 3 +- otp/level/EntityCreator.py | 19 +--- otp/level/EntityCreatorAI.py | 8 +- otp/level/EntityCreatorBase.py | 1 + otp/level/EntityStateVarSet.py | 2 + otp/level/EntityTypeDesc.py | 4 +- otp/level/EntityTypeRegistry.py | 17 ++-- otp/level/EntityTypes.py | 4 +- otp/level/EntrancePoint.py | 5 +- otp/level/Level.py | 9 +- otp/level/LevelMgr.py | 2 + otp/level/LevelMgrAI.py | 2 + otp/level/LevelMgrBase.py | 1 + otp/level/LevelSpec.py | 13 +-- otp/level/LevelUtil.py | 2 + otp/level/LocatorEntity.py | 5 +- otp/level/LogicGate.py | 4 +- otp/level/ModelEntity.py | 5 +- otp/level/PathEntity.py | 9 +- otp/level/PropSpinner.py | 7 +- otp/level/VisibilityBlocker.py | 1 + otp/level/VisibilityExtender.py | 1 + otp/level/ZoneEntity.py | 4 +- otp/level/ZoneEntityAI.py | 1 + otp/level/ZoneEntityBase.py | 4 +- otp/login/AstronLoginManagerUD.py | 16 ++-- otp/login/CreateAccountScreen.py | 18 ++-- otp/login/GuiScreen.py | 10 ++- otp/login/HTTPUtil.py | 1 + otp/login/LeaveToPayDialog.py | 12 +-- otp/login/LoginAstronAccount.py | 6 +- otp/login/LoginDISLTokenAccount.py | 8 +- otp/login/LoginGSAccount.py | 7 +- otp/login/LoginGoAccount.py | 7 +- otp/login/LoginScreen.py | 16 ++-- otp/login/LoginTTAccount.py | 7 +- otp/login/LoginTTSpecificDevAccount.py | 7 +- otp/login/LoginWebPlayTokenAccount.py | 3 + otp/login/MultiPageTextFrame.py | 3 + otp/login/PrivacyPolicyPanel.py | 10 ++- otp/login/SecretFriendsInfoPanel.py | 8 +- otp/movement/Impulse.py | 2 + otp/movement/Mover.py | 8 +- otp/movement/PyVec3.py | 6 +- otp/namepanel/NameCheck.py | 9 +- otp/namepanel/NameTumbler.py | 11 ++- otp/otpbase/OTPBase.py | 13 ++- otp/otpbase/OTPGlobals.py | 1 + otp/otpbase/OTPLocalizer.py | 1 + otp/otpbase/OTPLocalizerEnglish.py | 6 +- otp/otpbase/OTPRender.py | 1 + otp/otpbase/OTPTimer.py | 7 +- otp/otpbase/ObjectCount.py | 4 +- otp/otpbase/PythonUtil.py | 2 +- otp/otpgui/OTPDialog.py | 10 ++- otp/snapshot/SnapshotDispatcher.py | 3 +- otp/snapshot/SnapshotDispatcherAI.py | 1 + otp/snapshot/SnapshotDispatcherUD.py | 1 + otp/snapshot/SnapshotRenderer.py | 3 +- otp/snapshot/SnapshotRendererAI.py | 1 + otp/snapshot/SnapshotRendererUD.py | 1 + otp/speedchat/ColorSpace.py | 1 + otp/speedchat/SCColorScheme.py | 1 + otp/speedchat/SCCustomMenu.py | 6 +- otp/speedchat/SCCustomTerminal.py | 4 +- otp/speedchat/SCDecoders.py | 2 +- otp/speedchat/SCElement.py | 8 +- otp/speedchat/SCEmoteMenu.py | 3 +- otp/speedchat/SCEmoteTerminal.py | 7 +- otp/speedchat/SCGMTextTerminal.py | 4 +- otp/speedchat/SCMenu.py | 12 ++- otp/speedchat/SCMenuHolder.py | 8 +- otp/speedchat/SCObject.py | 1 + otp/speedchat/SCSettings.py | 4 +- otp/speedchat/SCStaticTextTerminal.py | 4 +- otp/speedchat/SCTerminal.py | 11 ++- otp/speedchat/SpeedChat.py | 7 +- otp/speedchat/SpeedChatGMHandler.py | 3 + otp/speedchat/SpeedChatGlobals.py | 7 +- otp/speedchat/SpeedChatTypes.py | 22 ++--- otp/status/StatusDatabase.py | 5 +- otp/status/StatusDatabaseUD.py | 1 + otp/uberdog/AccountDetailRecord.py | 1 + otp/uberdog/DistributedChatManager.py | 5 +- otp/uberdog/DistributedChatManagerAI.py | 1 + otp/uberdog/DistributedChatManagerUD.py | 1 + otp/uberdog/OtpAvatarManager.py | 6 +- otp/uberdog/OtpAvatarManagerAI.py | 1 + otp/uberdog/OtpAvatarManagerUD.py | 1 + otp/uberdog/SpeedchatRelay.py | 4 +- otp/uberdog/SpeedchatRelayUD.py | 1 + otp/web/SettingsMgr.py | 4 +- otp/web/SettingsMgrAI.py | 1 + otp/web/SettingsMgrBase.py | 1 + otp/web/SettingsMgrUD.py | 1 + pyproject.toml | 14 +++ toontown/ai/AIStart.py | 5 +- toontown/ai/BlackCatHolidayMgrAI.py | 4 +- toontown/ai/CrashedLeaderBoardDecorator.py | 12 ++- toontown/ai/DatabaseObject.py | 11 ++- toontown/ai/DistributedBlackCatMgr.py | 2 + toontown/ai/DistributedBlackCatMgrAI.py | 1 + toontown/ai/DistributedGreenToonEffectMgr.py | 3 + .../ai/DistributedGreenToonEffectMgrAI.py | 1 + toontown/ai/DistributedHydrantZeroMgr.py | 2 + toontown/ai/DistributedHydrantZeroMgrAI.py | 1 + toontown/ai/DistributedMailboxZeroMgr.py | 2 + toontown/ai/DistributedMailboxZeroMgrAI.py | 1 + toontown/ai/DistributedPhaseEventMgr.py | 4 +- toontown/ai/DistributedPhaseEventMgrAI.py | 1 + toontown/ai/DistributedPolarPlaceEffectMgr.py | 3 + .../ai/DistributedPolarPlaceEffectMgrAI.py | 1 + toontown/ai/DistributedResistanceEmoteMgr.py | 5 +- .../ai/DistributedResistanceEmoteMgrAI.py | 1 + toontown/ai/DistributedScavengerHuntTarget.py | 2 + .../ai/DistributedScavengerHuntTargetAI.py | 1 + toontown/ai/DistributedSillyMeterMgr.py | 5 +- toontown/ai/DistributedSillyMeterMgrAI.py | 1 + toontown/ai/DistributedTrashcanZeroMgr.py | 2 + toontown/ai/DistributedTrashcanZeroMgrAI.py | 1 + toontown/ai/DistributedTrickOrTreatTarget.py | 3 + .../ai/DistributedTrickOrTreatTargetAI.py | 1 + .../ai/DistributedWinterCarolingTarget.py | 3 + .../ai/DistributedWinterCarolingTargetAI.py | 1 + toontown/ai/HalloweenHolidayDecorator.py | 16 ++-- toontown/ai/HolidayBaseAI.py | 5 +- toontown/ai/HolidayDecorator.py | 9 +- toontown/ai/NewsManager.py | 23 ++--- toontown/ai/NewsManagerAI.py | 1 + toontown/ai/ToonBarrier.py | 9 +- toontown/ai/ToontownAIMsgTypes.py | 1 + toontown/ai/ToontownAIRepository.py | 18 ++-- toontown/ai/WelcomeValleyManager.py | 7 +- toontown/battle/BattleBase.py | 10 ++- toontown/battle/BattleCalculatorAI.py | 19 ++-- toontown/battle/BattleExperience.py | 1 + toontown/battle/BattleExperienceAI.py | 4 +- toontown/battle/BattleManagerAI.py | 4 +- toontown/battle/BattleParticles.py | 4 +- toontown/battle/BattlePlace.py | 5 +- toontown/battle/BattleProps.py | 6 +- toontown/battle/BattleSounds.py | 2 + toontown/battle/DistributedBattle.py | 25 +++--- toontown/battle/DistributedBattleAI.py | 15 ++-- toontown/battle/DistributedBattleBase.py | 30 ++----- toontown/battle/DistributedBattleBaseAI.py | 38 ++++---- toontown/battle/DistributedBattleBldg.py | 26 +++--- toontown/battle/DistributedBattleBldgAI.py | 24 ++--- toontown/battle/DistributedBattleDiners.py | 12 ++- toontown/battle/DistributedBattleDinersAI.py | 2 + toontown/battle/DistributedBattleFinal.py | 22 ++--- toontown/battle/DistributedBattleFinalAI.py | 22 +++-- toontown/battle/DistributedBattleWaiters.py | 8 +- toontown/battle/DistributedBattleWaitersAI.py | 2 + toontown/battle/Fanfare.py | 23 ++--- toontown/battle/FireCogPanel.py | 16 ++-- toontown/battle/HealJokes.py | 1 + toontown/battle/Movie.py | 52 ++++------- toontown/battle/MovieCamera.py | 13 ++- toontown/battle/MovieDrop.py | 13 +-- toontown/battle/MovieFire.py | 22 +++-- toontown/battle/MovieHeal.py | 26 +++--- toontown/battle/MovieLure.py | 17 ++-- toontown/battle/MovieNPCSOS.py | 19 ++-- toontown/battle/MoviePetSOS.py | 18 ++-- toontown/battle/MovieSOS.py | 12 ++- toontown/battle/MovieSound.py | 12 +-- toontown/battle/MovieSquirt.py | 27 +++--- toontown/battle/MovieSuitAttacks.py | 22 ++--- toontown/battle/MovieThrow.py | 18 ++-- toontown/battle/MovieToonVictory.py | 12 ++- toontown/battle/MovieTrap.py | 17 ++-- toontown/battle/MovieUtil.py | 15 ++-- toontown/battle/PlayByPlayText.py | 15 ++-- toontown/battle/RewardPanel.py | 36 ++++---- toontown/battle/SuitBattleGlobals.py | 7 +- toontown/building/BoardingGroupShow.py | 8 +- toontown/building/BoardingPartyBase.py | 7 +- toontown/building/DistributedAnimBuilding.py | 3 + .../building/DistributedAnimBuildingAI.py | 6 +- toontown/building/DistributedAnimDoor.py | 8 +- toontown/building/DistributedAnimDoorAI.py | 2 + toontown/building/DistributedAnimatedProp.py | 6 +- .../building/DistributedAnimatedPropAI.py | 9 +- toontown/building/DistributedBBElevator.py | 8 +- toontown/building/DistributedBBElevatorAI.py | 3 +- toontown/building/DistributedBoardingParty.py | 18 ++-- .../building/DistributedBoardingPartyAI.py | 22 ++--- toontown/building/DistributedBossElevator.py | 19 ++-- .../building/DistributedBossElevatorAI.py | 19 ++-- toontown/building/DistributedBuilding.py | 34 ++++---- toontown/building/DistributedBuildingAI.py | 27 +++--- toontown/building/DistributedBuildingMgrAI.py | 20 +++-- toontown/building/DistributedCFOElevator.py | 8 +- toontown/building/DistributedCFOElevatorAI.py | 3 +- toontown/building/DistributedCJElevator.py | 8 +- toontown/building/DistributedCJElevatorAI.py | 3 +- toontown/building/DistributedClubElevator.py | 23 +++-- .../building/DistributedClubElevatorAI.py | 14 +-- toontown/building/DistributedDoor.py | 22 +---- toontown/building/DistributedDoorAI.py | 12 +-- toontown/building/DistributedElevator.py | 21 +++-- toontown/building/DistributedElevatorAI.py | 20 +++-- toontown/building/DistributedElevatorExt.py | 18 ++-- toontown/building/DistributedElevatorExtAI.py | 19 ++-- toontown/building/DistributedElevatorFSM.py | 22 ++--- toontown/building/DistributedElevatorFSMAI.py | 16 ++-- toontown/building/DistributedElevatorFloor.py | 20 +++-- .../building/DistributedElevatorFloorAI.py | 16 ++-- toontown/building/DistributedElevatorInt.py | 16 ++-- toontown/building/DistributedElevatorIntAI.py | 19 ++-- .../building/DistributedGagshopInterior.py | 15 ++-- .../building/DistributedGagshopInteriorAI.py | 3 +- toontown/building/DistributedHQInterior.py | 9 +- toontown/building/DistributedHQInteriorAI.py | 6 +- .../building/DistributedKartShopInterior.py | 5 +- .../building/DistributedKartShopInteriorAI.py | 1 + .../building/DistributedKnockKnockDoor.py | 15 ++-- .../building/DistributedKnockKnockDoorAI.py | 12 +-- .../building/DistributedPetshopInterior.py | 17 ++-- .../building/DistributedPetshopInteriorAI.py | 3 +- toontown/building/DistributedSuitInterior.py | 17 ++-- .../building/DistributedSuitInteriorAI.py | 26 +++--- .../building/DistributedToonHallInterior.py | 35 ++++---- .../building/DistributedToonHallInteriorAI.py | 4 +- toontown/building/DistributedToonInterior.py | 26 +++--- .../building/DistributedToonInteriorAI.py | 13 +-- toontown/building/DistributedTrophyMgr.py | 4 +- .../building/DistributedTutorialInterior.py | 23 ++--- .../building/DistributedTutorialInteriorAI.py | 12 +-- toontown/building/DistributedVPElevator.py | 8 +- toontown/building/DistributedVPElevatorAI.py | 7 +- toontown/building/Elevator.py | 12 +-- toontown/building/ElevatorConstants.py | 1 + toontown/building/ElevatorUtils.py | 3 + toontown/building/FADoorCodes.py | 1 + toontown/building/GagshopBuildingAI.py | 8 +- toontown/building/HQBuildingAI.py | 8 +- toontown/building/KartShopBuildingAI.py | 7 +- toontown/building/KnockKnockJokes.py | 1 + toontown/building/PetshopBuildingAI.py | 12 ++- toontown/building/SuitBuildingGlobals.py | 1 + toontown/building/SuitInterior.py | 22 ++--- toontown/building/SuitPlannerInteriorAI.py | 12 ++- toontown/building/ToonInteriorColors.py | 1 + toontown/building/TutorialBuildingAI.py | 16 ++-- toontown/building/TutorialHQBuildingAI.py | 16 ++-- toontown/catalog/CatalogAccessoryItem.py | 18 ++-- .../catalog/CatalogAnimatedFurnitureItem.py | 1 + toontown/catalog/CatalogAtticItem.py | 10 ++- toontown/catalog/CatalogBeanItem.py | 11 ++- toontown/catalog/CatalogChatItem.py | 9 +- toontown/catalog/CatalogChatItemPicker.py | 12 ++- toontown/catalog/CatalogClothingItem.py | 16 ++-- toontown/catalog/CatalogEmoteItem.py | 21 ++--- toontown/catalog/CatalogFlooringItem.py | 1 + toontown/catalog/CatalogFurnitureItem.py | 9 +- toontown/catalog/CatalogGardenItem.py | 18 ++-- toontown/catalog/CatalogGardenStarterItem.py | 14 +-- toontown/catalog/CatalogGenerator.py | 54 ++++++------ toontown/catalog/CatalogInvalidItem.py | 8 +- toontown/catalog/CatalogItem.py | 13 +-- toontown/catalog/CatalogItemList.py | 8 +- toontown/catalog/CatalogItemPanel.py | 24 ++--- toontown/catalog/CatalogItemTypes.py | 26 ++---- toontown/catalog/CatalogManager.py | 3 +- toontown/catalog/CatalogManagerAI.py | 1 + toontown/catalog/CatalogMouldingItem.py | 1 + toontown/catalog/CatalogNametagItem.py | 13 +-- toontown/catalog/CatalogNotifyDialog.py | 10 ++- toontown/catalog/CatalogPetTrickItem.py | 15 ++-- toontown/catalog/CatalogPoleItem.py | 10 ++- toontown/catalog/CatalogRentalItem.py | 12 ++- toontown/catalog/CatalogScreen.py | 27 +++--- toontown/catalog/CatalogSurfaceItem.py | 8 +- toontown/catalog/CatalogToonStatueItem.py | 11 ++- toontown/catalog/CatalogWainscotingItem.py | 1 + toontown/catalog/CatalogWallpaperItem.py | 1 + toontown/catalog/CatalogWindowItem.py | 9 +- toontown/catalog/MailboxScreen.py | 12 ++- toontown/char/Char.py | 11 ++- toontown/char/CharDNA.py | 5 +- toontown/char/DistributedChar.py | 2 + toontown/chat/ResistanceChat.py | 15 ++-- toontown/chat/TTChatInputNormal.py | 8 +- toontown/chat/TTChatInputSpeedChat.py | 34 ++++---- toontown/chat/TTChatInputWhiteList.py | 16 ++-- toontown/chat/TTSCWhiteListTerminal.py | 3 +- toontown/chat/TTTalkAssistant.py | 29 ++++--- toontown/chat/TTWhiteList.py | 5 ++ toontown/chat/ToonChatGarbler.py | 9 +- toontown/chat/ToontownChatManager.py | 21 +++-- toontown/classicchars/CCharChatter.py | 4 +- toontown/classicchars/CCharPaths.py | 6 +- toontown/classicchars/CharStateDatas.py | 10 ++- toontown/classicchars/CharStateDatasAI.py | 11 ++- toontown/classicchars/DistributedCCharBase.py | 27 +++--- .../classicchars/DistributedCCharBaseAI.py | 12 ++- toontown/classicchars/DistributedChip.py | 14 +-- toontown/classicchars/DistributedChipAI.py | 20 +++-- toontown/classicchars/DistributedDaisy.py | 14 +-- toontown/classicchars/DistributedDaisyAI.py | 20 +++-- toontown/classicchars/DistributedDale.py | 14 +-- toontown/classicchars/DistributedDaleAI.py | 20 +++-- toontown/classicchars/DistributedDonald.py | 14 +-- toontown/classicchars/DistributedDonaldAI.py | 16 ++-- .../classicchars/DistributedDonaldDock.py | 16 ++-- .../classicchars/DistributedDonaldDockAI.py | 12 +-- .../classicchars/DistributedFrankenDonald.py | 15 ++-- .../DistributedFrankenDonaldAI.py | 1 + toontown/classicchars/DistributedGoofy.py | 11 +-- toontown/classicchars/DistributedGoofyAI.py | 16 ++-- .../classicchars/DistributedGoofySpeedway.py | 11 +-- .../DistributedGoofySpeedwayAI.py | 16 ++-- .../classicchars/DistributedJailbirdDale.py | 15 ++-- .../classicchars/DistributedJailbirdDaleAI.py | 1 + toontown/classicchars/DistributedMickey.py | 11 +-- toontown/classicchars/DistributedMickeyAI.py | 16 ++-- toontown/classicchars/DistributedMinnie.py | 11 +-- toontown/classicchars/DistributedMinnieAI.py | 16 ++-- toontown/classicchars/DistributedPluto.py | 16 ++-- toontown/classicchars/DistributedPlutoAI.py | 12 +-- .../classicchars/DistributedPoliceChip.py | 15 ++-- .../classicchars/DistributedPoliceChipAI.py | 1 + .../classicchars/DistributedSockHopDaisy.py | 15 ++-- .../classicchars/DistributedSockHopDaisyAI.py | 1 + .../classicchars/DistributedSuperGoofy.py | 12 +-- .../classicchars/DistributedSuperGoofyAI.py | 1 + .../classicchars/DistributedVampireMickey.py | 12 +-- .../DistributedVampireMickeyAI.py | 1 + .../classicchars/DistributedWesternPluto.py | 12 +-- .../classicchars/DistributedWesternPlutoAI.py | 1 + .../classicchars/DistributedWitchMinnie.py | 12 +-- .../classicchars/DistributedWitchMinnieAI.py | 1 + .../coderedemption/TTCodeRedemptionMgr.py | 3 +- .../coderedemption/TTCodeRedemptionMgrAI.py | 1 + .../coderedemption/TTCodeRedemptionMgrUD.py | 1 + toontown/cogdominium/CogdoBarrelRoom.py | 8 +- toontown/cogdominium/CogdoBarrelRoomAI.py | 6 +- toontown/cogdominium/CogdoBarrelRoomConsts.py | 1 + .../cogdominium/CogdoBarrelRoomRewardPanel.py | 5 +- .../cogdominium/CogdoBoardroomGameBase.py | 3 +- .../cogdominium/CogdoBoardroomGameConsts.py | 3 + .../cogdominium/CogdoBoardroomGameSpec.py | 1 + toontown/cogdominium/CogdoCraneGameBase.py | 3 +- toontown/cogdominium/CogdoCraneGameConsts.py | 5 +- toontown/cogdominium/CogdoCraneGameSpec.py | 1 + toontown/cogdominium/CogdoElevatorMovie.py | 22 +++-- toontown/cogdominium/CogdoEntityCreator.py | 6 +- toontown/cogdominium/CogdoEntityCreatorAI.py | 6 +- toontown/cogdominium/CogdoEntityTypes.py | 1 + .../cogdominium/CogdoExecutiveSuiteMovies.py | 22 +++-- .../cogdominium/CogdoFlyingCameraManager.py | 12 ++- toontown/cogdominium/CogdoFlyingCollisions.py | 9 +- toontown/cogdominium/CogdoFlyingGame.py | 23 ++--- .../cogdominium/CogdoFlyingGameGlobals.py | 7 +- toontown/cogdominium/CogdoFlyingGameGuis.py | 10 ++- toontown/cogdominium/CogdoFlyingGameMovies.py | 16 ++-- toontown/cogdominium/CogdoFlyingGuiManager.py | 5 +- .../cogdominium/CogdoFlyingInputManager.py | 4 +- toontown/cogdominium/CogdoFlyingLegalEagle.py | 26 +++--- toontown/cogdominium/CogdoFlyingLevel.py | 15 ++-- .../cogdominium/CogdoFlyingLevelQuadrant.py | 8 +- .../cogdominium/CogdoFlyingLocalPlayer.py | 26 +++--- toontown/cogdominium/CogdoFlyingObjects.py | 15 ++-- toontown/cogdominium/CogdoFlyingObstacles.py | 27 +++--- toontown/cogdominium/CogdoFlyingPlayer.py | 14 +-- .../cogdominium/CogdoFlyingShadowPlacer.py | 6 +- toontown/cogdominium/CogdoFlyingUtil.py | 2 + toontown/cogdominium/CogdoGameAudioManager.py | 2 + toontown/cogdominium/CogdoGameConsts.py | 4 +- toontown/cogdominium/CogdoGameExit.py | 12 +-- toontown/cogdominium/CogdoGameGatherable.py | 11 ++- .../cogdominium/CogdoGameMessageDisplay.py | 6 +- toontown/cogdominium/CogdoGameRulesPanel.py | 14 +-- toontown/cogdominium/CogdoInterior.py | 12 +-- toontown/cogdominium/CogdoLayout.py | 1 + toontown/cogdominium/CogdoLevelGameBase.py | 5 +- toontown/cogdominium/CogdoLevelMgr.py | 5 +- toontown/cogdominium/CogdoLevelMgrAI.py | 1 + toontown/cogdominium/CogdoMaze.py | 8 +- .../cogdominium/CogdoMazeCameraManager.py | 7 +- toontown/cogdominium/CogdoMazeGame.py | 27 +++--- toontown/cogdominium/CogdoMazeGameGlobals.py | 4 +- toontown/cogdominium/CogdoMazeGameGuis.py | 16 ++-- toontown/cogdominium/CogdoMazeGameMovies.py | 16 ++-- toontown/cogdominium/CogdoMazeGameObjects.py | 25 +++--- toontown/cogdominium/CogdoMazeGuiManager.py | 12 ++- toontown/cogdominium/CogdoMazeLocalPlayer.py | 13 +-- toontown/cogdominium/CogdoMazePlayer.py | 13 +-- toontown/cogdominium/CogdoMazeSuits.py | 23 +++-- toontown/cogdominium/CogdoMemoGui.py | 13 +-- toontown/cogdominium/CogdoUtil.py | 4 +- .../cogdominium/DistCogdoBoardroomGame.py | 6 +- .../cogdominium/DistCogdoBoardroomGameAI.py | 4 +- toontown/cogdominium/DistCogdoCrane.py | 18 ++-- toontown/cogdominium/DistCogdoCraneAI.py | 8 +- toontown/cogdominium/DistCogdoCraneCog.py | 3 + toontown/cogdominium/DistCogdoCraneCogAI.py | 1 + toontown/cogdominium/DistCogdoCraneGame.py | 9 +- toontown/cogdominium/DistCogdoCraneGameAI.py | 14 +-- .../cogdominium/DistCogdoCraneMoneyBag.py | 10 ++- .../cogdominium/DistCogdoCraneMoneyBagAI.py | 7 +- toontown/cogdominium/DistCogdoCraneObject.py | 10 ++- .../cogdominium/DistCogdoCraneObjectAI.py | 8 +- toontown/cogdominium/DistCogdoFlyingGame.py | 7 +- toontown/cogdominium/DistCogdoFlyingGameAI.py | 5 +- toontown/cogdominium/DistCogdoGame.py | 11 ++- toontown/cogdominium/DistCogdoGameAI.py | 5 +- toontown/cogdominium/DistCogdoLevelGame.py | 10 ++- toontown/cogdominium/DistCogdoLevelGameAI.py | 5 +- toontown/cogdominium/DistCogdoMazeGame.py | 11 ++- toontown/cogdominium/DistCogdoMazeGameAI.py | 9 +- toontown/cogdominium/DistCogdoMazeGameBase.py | 3 + .../cogdominium/DistributedCogdoBarrel.py | 5 +- .../cogdominium/DistributedCogdoBarrelAI.py | 3 + .../cogdominium/DistributedCogdoBattleBldg.py | 4 +- .../DistributedCogdoBattleBldgAI.py | 2 + .../DistributedCogdoElevatorExt.py | 1 + .../DistributedCogdoElevatorExtAI.py | 2 + .../DistributedCogdoElevatorInt.py | 1 + .../DistributedCogdoElevatorIntAI.py | 1 + .../cogdominium/DistributedCogdoInterior.py | 31 +++---- .../cogdominium/DistributedCogdoInteriorAI.py | 23 ++--- .../cogdominium/SuitPlannerCogdoInteriorAI.py | 1 + toontown/coghq/ActiveCell.py | 5 +- toontown/coghq/ActiveCellAI.py | 4 +- toontown/coghq/BarrelBase.py | 1 + toontown/coghq/BattleBlocker.py | 11 ++- toontown/coghq/BattleBlockerAI.py | 4 +- toontown/coghq/BossbotCogHQLoader.py | 26 +++--- .../BossbotCountryClubEntrance_Action00.py | 1 + .../BossbotCountryClubFairwayRoom_Battle00.py | 1 + ...botCountryClubFairwayRoom_Battle00_Cogs.py | 4 +- .../BossbotCountryClubGreenRoom_Action00.py | 1 + .../BossbotCountryClubGreenRoom_Action01.py | 1 + .../BossbotCountryClubGreenRoom_Action02.py | 1 + .../BossbotCountryClubKartRoom_Battle00.py | 1 + ...ossbotCountryClubKartRoom_Battle00_Cogs.py | 4 +- .../BossbotCountryClubMazeRoom_Battle00.py | 1 + ...ossbotCountryClubMazeRoom_Battle00_Cogs.py | 4 +- .../BossbotCountryClubMazeRoom_Battle01.py | 1 + ...ossbotCountryClubMazeRoom_Battle01_Cogs.py | 4 +- .../BossbotCountryClubMazeRoom_Battle02.py | 1 + ...ossbotCountryClubMazeRoom_Battle02_Cogs.py | 4 +- ...ossbotCountryClubMazeRoom_Battle03_Cogs.py | 4 +- ...ossbotCountryClubPresidentRoom_Battle00.py | 1 + ...tCountryClubPresidentRoom_Battle00_Cogs.py | 4 +- .../BossbotCountryClubTeeOffRoom_Action00.py | 1 + .../BossbotCountryClubTeeOffRoom_Action01.py | 1 + .../BossbotCountryClubTeeOffRoom_Action02.py | 1 + toontown/coghq/BossbotHQBossBattle.py | 7 +- toontown/coghq/BossbotHQExterior.py | 14 +-- toontown/coghq/BossbotOfficeExterior.py | 13 +-- toontown/coghq/CashbotCogHQLoader.py | 20 ++--- toontown/coghq/CashbotHQBossBattle.py | 7 +- toontown/coghq/CashbotHQExterior.py | 9 +- .../coghq/CashbotMintBoilerRoom_Action00.py | 1 + .../coghq/CashbotMintBoilerRoom_Battle00.py | 1 + .../CashbotMintBoilerRoom_Battle00_Cogs.py | 4 +- .../coghq/CashbotMintBoilerRoom_Battle01.py | 1 + .../CashbotMintBoilerRoom_Battle01_Cogs.py | 4 +- .../coghq/CashbotMintControlRoom_Battle00.py | 1 + .../CashbotMintControlRoom_Battle00_Cogs.py | 4 +- .../coghq/CashbotMintDuctRoom_Action00.py | 1 + .../coghq/CashbotMintDuctRoom_Battle00.py | 1 + .../CashbotMintDuctRoom_Battle00_Cogs.py | 4 +- .../coghq/CashbotMintDuctRoom_Battle01.py | 1 + .../CashbotMintDuctRoom_Battle01_Cogs.py | 4 +- .../coghq/CashbotMintEntrance_Action00.py | 1 + .../coghq/CashbotMintGearRoom_Action00.py | 1 + .../coghq/CashbotMintGearRoom_Battle00.py | 1 + .../CashbotMintGearRoom_Battle00_Cogs.py | 4 +- .../coghq/CashbotMintGearRoom_Battle01.py | 1 + .../CashbotMintGearRoom_Battle01_Cogs.py | 4 +- .../CashbotMintLavaRoomFoyer_Action00.py | 1 + .../CashbotMintLavaRoomFoyer_Action01.py | 1 + .../CashbotMintLavaRoomFoyer_Battle00.py | 1 + .../CashbotMintLavaRoomFoyer_Battle00_Cogs.py | 4 +- .../CashbotMintLavaRoomFoyer_Battle01.py | 1 + .../CashbotMintLavaRoomFoyer_Battle01_Cogs.py | 4 +- .../coghq/CashbotMintLavaRoom_Action00.py | 1 + toontown/coghq/CashbotMintLobby_Action00.py | 1 + toontown/coghq/CashbotMintLobby_Battle00.py | 1 + .../coghq/CashbotMintLobby_Battle00_Cogs.py | 4 +- toontown/coghq/CashbotMintLobby_Battle01.py | 1 + .../coghq/CashbotMintLobby_Battle01_Cogs.py | 4 +- toontown/coghq/CashbotMintOilRoom_Battle00.py | 1 + .../coghq/CashbotMintOilRoom_Battle00_Cogs.py | 4 +- .../CashbotMintPaintMixerReward_Battle00.py | 1 + ...shbotMintPaintMixerReward_Battle00_Cogs.py | 4 +- .../coghq/CashbotMintPaintMixer_Action00.py | 1 + .../coghq/CashbotMintPipeRoom_Action00.py | 1 + .../coghq/CashbotMintPipeRoom_Battle00.py | 1 + .../CashbotMintPipeRoom_Battle00_Cogs.py | 4 +- .../coghq/CashbotMintPipeRoom_Battle01.py | 1 + .../CashbotMintPipeRoom_Battle01_Cogs.py | 4 +- .../coghq/CashbotMintStomperAlley_Action00.py | 1 + toontown/coghq/CogDisguiseGlobals.py | 7 +- toontown/coghq/CogHQBossBattle.py | 17 ++-- toontown/coghq/CogHQExterior.py | 15 ++-- toontown/coghq/CogHQLoader.py | 21 ++--- toontown/coghq/CogHQLobby.py | 15 ++-- toontown/coghq/CogSuitManagerAI.py | 9 +- toontown/coghq/ConveyorBelt.py | 6 +- toontown/coghq/CountryClubInterior.py | 28 +++--- toontown/coghq/CountryClubLayout.py | 8 +- toontown/coghq/CountryClubManagerAI.py | 14 +-- toontown/coghq/CountryClubRoom.py | 16 ++-- toontown/coghq/CountryClubRoomBase.py | 4 +- toontown/coghq/CountryClubRoomSpecs.py | 14 ++- toontown/coghq/CrateGlobals.py | 1 + toontown/coghq/CrusherCell.py | 4 +- toontown/coghq/CrusherCellAI.py | 4 +- toontown/coghq/DinerStatusIndicator.py | 8 +- toontown/coghq/DirectionalCell.py | 4 +- toontown/coghq/DirectionalCellAI.py | 4 +- toontown/coghq/DistributedBanquetTable.py | 23 ++--- toontown/coghq/DistributedBanquetTableAI.py | 5 +- toontown/coghq/DistributedBarrelBase.py | 12 ++- toontown/coghq/DistributedBarrelBaseAI.py | 5 +- toontown/coghq/DistributedBattleFactory.py | 18 ++-- toontown/coghq/DistributedBattleFactoryAI.py | 10 ++- toontown/coghq/DistributedBeanBarrel.py | 8 +- toontown/coghq/DistributedBeanBarrelAI.py | 4 +- toontown/coghq/DistributedButton.py | 15 ++-- toontown/coghq/DistributedButtonAI.py | 4 +- toontown/coghq/DistributedCashbotBossCrane.py | 20 +++-- .../coghq/DistributedCashbotBossCraneAI.py | 8 +- .../coghq/DistributedCashbotBossObject.py | 10 ++- .../coghq/DistributedCashbotBossObjectAI.py | 8 +- toontown/coghq/DistributedCashbotBossSafe.py | 9 +- .../coghq/DistributedCashbotBossSafeAI.py | 6 +- .../coghq/DistributedCashbotBossTreasure.py | 7 +- .../coghq/DistributedCashbotBossTreasureAI.py | 1 + toontown/coghq/DistributedCogHQDoor.py | 14 +-- toontown/coghq/DistributedCogHQDoorAI.py | 18 ++-- toontown/coghq/DistributedCogKart.py | 21 ++--- toontown/coghq/DistributedCogKartAI.py | 5 +- toontown/coghq/DistributedCountryClub.py | 22 ++--- toontown/coghq/DistributedCountryClubAI.py | 12 +-- .../coghq/DistributedCountryClubBattle.py | 18 ++-- .../coghq/DistributedCountryClubBattleAI.py | 14 +-- toontown/coghq/DistributedCountryClubRoom.py | 19 ++-- .../coghq/DistributedCountryClubRoomAI.py | 13 +-- toontown/coghq/DistributedCrate.py | 17 ++-- toontown/coghq/DistributedCrateAI.py | 7 +- toontown/coghq/DistributedCrushableEntity.py | 8 +- .../coghq/DistributedCrushableEntityAI.py | 4 +- toontown/coghq/DistributedCrusherEntity.py | 4 +- toontown/coghq/DistributedCrusherEntityAI.py | 4 +- toontown/coghq/DistributedDoorEntity.py | 22 ++--- toontown/coghq/DistributedDoorEntityAI.py | 15 ++-- toontown/coghq/DistributedElevatorMarker.py | 21 +++-- toontown/coghq/DistributedElevatorMarkerAI.py | 10 +-- toontown/coghq/DistributedFactory.py | 24 ++--- toontown/coghq/DistributedFactoryAI.py | 14 +-- .../coghq/DistributedFactoryElevatorExt.py | 12 +-- .../coghq/DistributedFactoryElevatorExtAI.py | 14 +-- toontown/coghq/DistributedFoodBelt.py | 15 ++-- toontown/coghq/DistributedFoodBeltAI.py | 4 +- toontown/coghq/DistributedGagBarrel.py | 8 +- toontown/coghq/DistributedGagBarrelAI.py | 7 +- toontown/coghq/DistributedGolfGreenGame.py | 51 ++++++----- toontown/coghq/DistributedGolfGreenGameAI.py | 19 ++-- toontown/coghq/DistributedGolfSpot.py | 19 ++-- toontown/coghq/DistributedGolfSpotAI.py | 1 + toontown/coghq/DistributedGrid.py | 13 ++- toontown/coghq/DistributedGridAI.py | 7 +- toontown/coghq/DistributedHealBarrel.py | 8 +- toontown/coghq/DistributedHealBarrelAI.py | 4 +- toontown/coghq/DistributedInGameEditor.py | 21 +++-- toontown/coghq/DistributedInGameEditorAI.py | 4 +- toontown/coghq/DistributedLaserField.py | 30 ++++--- toontown/coghq/DistributedLaserFieldAI.py | 20 ++--- toontown/coghq/DistributedLawOffice.py | 26 +++--- toontown/coghq/DistributedLawOfficeAI.py | 27 +++--- .../coghq/DistributedLawOfficeElevatorExt.py | 13 ++- .../DistributedLawOfficeElevatorExtAI.py | 14 +-- .../coghq/DistributedLawOfficeElevatorInt.py | 12 +-- .../DistributedLawOfficeElevatorIntAI.py | 15 ++-- toontown/coghq/DistributedLawOfficeFloor.py | 22 ++--- toontown/coghq/DistributedLawOfficeFloorAI.py | 20 ++--- toontown/coghq/DistributedLawbotBossGavel.py | 16 ++-- .../coghq/DistributedLawbotBossGavelAI.py | 10 ++- toontown/coghq/DistributedLawbotCannon.py | 28 +++--- toontown/coghq/DistributedLawbotCannonAI.py | 10 +-- toontown/coghq/DistributedLawbotChair.py | 22 +++-- toontown/coghq/DistributedLawbotChairAI.py | 17 ++-- toontown/coghq/DistributedLevelBattle.py | 19 ++-- toontown/coghq/DistributedLevelBattleAI.py | 13 +-- toontown/coghq/DistributedLift.py | 14 +-- toontown/coghq/DistributedLiftAI.py | 10 ++- toontown/coghq/DistributedMaze.py | 23 ++--- toontown/coghq/DistributedMazeAI.py | 7 +- toontown/coghq/DistributedMint.py | 12 ++- toontown/coghq/DistributedMintAI.py | 10 ++- toontown/coghq/DistributedMintBattle.py | 18 ++-- toontown/coghq/DistributedMintBattleAI.py | 14 +-- toontown/coghq/DistributedMintElevatorExt.py | 14 +-- .../coghq/DistributedMintElevatorExtAI.py | 15 ++-- toontown/coghq/DistributedMintRoom.py | 19 ++-- toontown/coghq/DistributedMintRoomAI.py | 13 +-- toontown/coghq/DistributedMoleField.py | 26 +++--- toontown/coghq/DistributedMoleFieldAI.py | 9 +- toontown/coghq/DistributedMover.py | 29 ++++--- toontown/coghq/DistributedMoverAI.py | 18 ++-- toontown/coghq/DistributedSecurityCamera.py | 29 ++++--- toontown/coghq/DistributedSecurityCameraAI.py | 18 ++-- toontown/coghq/DistributedSellbotHQDoor.py | 3 + toontown/coghq/DistributedSellbotHQDoorAI.py | 13 +-- toontown/coghq/DistributedSinkingPlatform.py | 18 ++-- .../coghq/DistributedSinkingPlatformAI.py | 5 +- toontown/coghq/DistributedStage.py | 28 +++--- toontown/coghq/DistributedStageAI.py | 17 ++-- toontown/coghq/DistributedStageBattle.py | 18 ++-- toontown/coghq/DistributedStageBattleAI.py | 15 ++-- toontown/coghq/DistributedStageRoom.py | 19 ++-- toontown/coghq/DistributedStageRoomAI.py | 13 +-- toontown/coghq/DistributedStomper.py | 18 ++-- toontown/coghq/DistributedStomperAI.py | 9 +- toontown/coghq/DistributedStomperPair.py | 11 ++- toontown/coghq/DistributedStomperPairAI.py | 9 +- toontown/coghq/DistributedSwitch.py | 18 ++-- toontown/coghq/DistributedSwitchAI.py | 10 ++- toontown/coghq/DistributedTrigger.py | 15 ++-- toontown/coghq/DistributedTriggerAI.py | 2 + toontown/coghq/FactoryBase.py | 8 +- toontown/coghq/FactoryCameraViews.py | 7 +- toontown/coghq/FactoryEntityCreator.py | 15 +--- toontown/coghq/FactoryEntityCreatorAI.py | 20 +++-- toontown/coghq/FactoryEntityTypes.py | 1 + toontown/coghq/FactoryExterior.py | 19 ++-- toontown/coghq/FactoryInterior.py | 21 ++--- toontown/coghq/FactoryLevelMgr.py | 8 +- toontown/coghq/FactoryLevelMgrAI.py | 1 + toontown/coghq/FactoryManagerAI.py | 7 +- toontown/coghq/FactoryMockupCogs.py | 1 + toontown/coghq/FactoryMockupSpec.py | 1 + toontown/coghq/FactorySpecs.py | 7 +- toontown/coghq/FactoryUtil.py | 13 +-- toontown/coghq/GameSprite3D.py | 7 +- toontown/coghq/GearEntity.py | 10 ++- toontown/coghq/GoonClipPlane.py | 3 + toontown/coghq/InGameEditor.py | 33 +++---- toontown/coghq/InGameEditorDCImports.py | 1 + toontown/coghq/InGameEditorDCImportsAI.py | 1 + toontown/coghq/InGameEditorElements.py | 1 + toontown/coghq/LaserGameAvoid.py | 7 +- toontown/coghq/LaserGameBase.py | 4 +- toontown/coghq/LaserGameDrag.py | 7 +- toontown/coghq/LaserGameMineSweeper.py | 7 +- toontown/coghq/LaserGameRoll.py | 7 +- toontown/coghq/LawOfficeBase.py | 8 +- toontown/coghq/LawOfficeLayout.py | 8 +- toontown/coghq/LawOfficeManagerAI.py | 10 ++- toontown/coghq/LawOffice_Spec_Tier0_a.py | 1 + toontown/coghq/LawOffice_Spec_Tier0_b.py | 1 + toontown/coghq/LawbotCogHQLoader.py | 15 ++-- toontown/coghq/LawbotHQBossBattle.py | 7 +- toontown/coghq/LawbotHQExterior.py | 14 +-- toontown/coghq/LawbotLegFactoryCogs.py | 1 + toontown/coghq/LawbotLegFactorySpec.py | 1 + .../coghq/LawbotOfficeBoilerRoom_Action01.py | 1 + .../coghq/LawbotOfficeBoilerRoom_Battle00.py | 1 + .../LawbotOfficeBoilerRoom_Battle00_Cogs.py | 4 +- .../LawbotOfficeBoilerRoom_Security00.py | 1 + .../coghq/LawbotOfficeBoilerRoom_Trap00.py | 1 + .../LawbotOfficeBoilerRoom_Trap00_Cogs.py | 4 +- .../coghq/LawbotOfficeDiamondRoom_Action00.py | 1 + .../coghq/LawbotOfficeDiamondRoom_Action01.py | 1 + .../coghq/LawbotOfficeDiamondRoom_Battle00.py | 1 + .../LawbotOfficeDiamondRoom_Battle00_Cogs.py | 4 +- .../LawbotOfficeDiamondRoom_Security00.py | 1 + .../coghq/LawbotOfficeDiamondRoom_Trap00.py | 1 + .../LawbotOfficeDiamondRoom_Trap00_Cogs.py | 4 +- .../coghq/LawbotOfficeEntrance_Action00.py | 4 +- toontown/coghq/LawbotOfficeExterior.py | 13 +-- .../coghq/LawbotOfficeGearRoom_Action00.py | 1 + .../coghq/LawbotOfficeGearRoom_Battle00.py | 1 + .../LawbotOfficeGearRoom_Battle00_Cogs.py | 4 +- .../coghq/LawbotOfficeGearRoom_Platform00.py | 1 + .../coghq/LawbotOfficeGearRoom_Security00.py | 1 + toontown/coghq/LawbotOfficeLobby_Action00.py | 1 + toontown/coghq/LawbotOfficeLobby_Action01.py | 1 + toontown/coghq/LawbotOfficeLobby_Lights00.py | 1 + toontown/coghq/LawbotOfficeLobby_Trap00.py | 1 + .../coghq/LawbotOfficeLobby_Trap00_Cogs.py | 4 +- .../coghq/LawbotOfficeOilRoom_Battle00.py | 4 +- .../LawbotOfficeOilRoom_Battle00_Cogs.py | 4 +- .../coghq/LawbotOfficeOilRoom_Battle01.py | 4 +- .../LawbotOfficeOilRoom_Battle01_Cogs.py | 4 +- toontown/coghq/LevelBattleManagerAI.py | 4 +- toontown/coghq/LevelSuitPlannerAI.py | 16 ++-- toontown/coghq/LobbyManager.py | 8 +- toontown/coghq/LobbyManagerAI.py | 4 +- toontown/coghq/MintInterior.py | 23 ++--- toontown/coghq/MintLayout.py | 8 +- toontown/coghq/MintManagerAI.py | 14 +-- toontown/coghq/MintProduct.py | 4 +- toontown/coghq/MintProductPallet.py | 3 +- toontown/coghq/MintRoom.py | 14 +-- toontown/coghq/MintRoomBase.py | 4 +- toontown/coghq/MintRoomSpecs.py | 26 +++--- toontown/coghq/MintShelf.py | 3 +- toontown/coghq/MoleFieldBase.py | 1 + toontown/coghq/MoleHill.py | 15 ++-- toontown/coghq/MovingPlatform.py | 5 +- toontown/coghq/NullCogs.py | 1 + toontown/coghq/PaintMixer.py | 1 + toontown/coghq/PathMasterEntity.py | 9 +- toontown/coghq/PlatformEntity.py | 4 + toontown/coghq/PromotionManagerAI.py | 15 ++-- toontown/coghq/RenderingEntity.py | 9 +- toontown/coghq/SellbotCogHQLoader.py | 22 +++-- toontown/coghq/SellbotHQBossBattle.py | 7 +- toontown/coghq/SellbotHQExterior.py | 2 + toontown/coghq/SellbotLegFactoryCogs.py | 1 + toontown/coghq/SellbotLegFactorySpec.py | 3 +- toontown/coghq/StageInterior.py | 25 +++--- toontown/coghq/StageLayout.py | 8 +- toontown/coghq/StageManagerAI.py | 14 +-- toontown/coghq/StageRoom.py | 14 +-- toontown/coghq/StageRoomBase.py | 4 +- toontown/coghq/StageRoomSpecs.py | 15 ++-- toontown/distributed/DelayDeletable.py | 3 +- toontown/distributed/DistributedTimer.py | 14 +-- toontown/distributed/DistributedTimerAI.py | 14 +-- toontown/distributed/HoodMgr.py | 14 +-- .../NonRepeatableRandomSourceAI.py | 5 +- .../NonRepeatableRandomSourceUD.py | 6 +- toontown/distributed/PlayGame.py | 34 +++----- .../distributed/ToontownClientRepository.py | 53 +++++------ toontown/distributed/ToontownDistrict.py | 2 + toontown/distributed/ToontownDistrictAI.py | 2 + toontown/distributed/ToontownDistrictStats.py | 7 +- .../distributed/ToontownDistrictStatsAI.py | 1 + .../distributed/ToontownInternalRepository.py | 4 +- toontown/effects/BlastEffect.py | 3 + toontown/effects/Bubbles.py | 9 +- toontown/effects/CarSmoke.py | 11 ++- toontown/effects/ChrysanthemumEffect.py | 3 + toontown/effects/DistributedFireworkShow.py | 2 + toontown/effects/DistributedFireworkShowAI.py | 18 ++-- toontown/effects/Drift.py | 9 +- toontown/effects/DustCloud.py | 12 ++- toontown/effects/EffectController.py | 1 + toontown/effects/Firework.py | 12 ++- toontown/effects/FireworkEffect.py | 34 ++++---- toontown/effects/FireworkShow.py | 16 ++-- toontown/effects/FireworkShowMixin.py | 19 ++-- toontown/effects/FireworkShows.py | 6 +- toontown/effects/FireworkSparkles.py | 8 +- toontown/effects/Fireworks.py | 12 +-- toontown/effects/FlashEffect.py | 3 + toontown/effects/Glow.py | 3 + toontown/effects/GlowTrail.py | 7 +- toontown/effects/IceCream.py | 5 +- toontown/effects/NoiseSparkles.py | 8 +- toontown/effects/PeonyEffect.py | 7 +- toontown/effects/PolyTrail.py | 7 +- toontown/effects/PooledEffect.py | 5 +- toontown/effects/RayBurst.py | 3 + toontown/effects/RingEffect.py | 8 +- toontown/effects/Ripples.py | 3 + toontown/effects/RocketExplosion.py | 4 +- toontown/effects/ScavengerHuntEffects.py | 8 +- toontown/effects/SimpleSparkles.py | 8 +- toontown/effects/SkullBurst.py | 7 +- toontown/effects/SkullFlash.py | 7 +- toontown/effects/Sparks.py | 9 +- toontown/effects/SparksTrail.py | 7 +- toontown/effects/SparksTrailLong.py | 7 +- toontown/effects/Splash.py | 8 +- toontown/effects/StarBurst.py | 5 +- toontown/effects/TrailExplosion.py | 9 +- toontown/effects/Wake.py | 3 + toontown/estate/BankGUI.py | 8 +- toontown/estate/BeanRecipeGui.py | 10 ++- toontown/estate/ClosetGUI.py | 14 +-- .../estate/DistributedAnimatedStatuary.py | 10 ++- .../estate/DistributedAnimatedStatuaryAI.py | 1 + toontown/estate/DistributedBank.py | 24 ++--- toontown/estate/DistributedBankAI.py | 1 + toontown/estate/DistributedBankMgr.py | 4 +- toontown/estate/DistributedBankMgrAI.py | 1 + toontown/estate/DistributedCannon.py | 37 ++++---- toontown/estate/DistributedCannonAI.py | 15 ++-- .../estate/DistributedChangingStatuary.py | 6 +- .../estate/DistributedChangingStatuaryAI.py | 1 + toontown/estate/DistributedCloset.py | 24 ++--- toontown/estate/DistributedClosetAI.py | 1 + toontown/estate/DistributedEstate.py | 46 +++++----- toontown/estate/DistributedEstateAI.py | 1 + toontown/estate/DistributedFireworksCannon.py | 16 ++-- .../estate/DistributedFireworksCannonAI.py | 1 + toontown/estate/DistributedFlower.py | 8 +- toontown/estate/DistributedFlowerAI.py | 1 + toontown/estate/DistributedFurnitureItem.py | 18 ++-- toontown/estate/DistributedFurnitureItemAI.py | 1 + .../estate/DistributedFurnitureManager.py | 7 +- .../estate/DistributedFurnitureManagerAI.py | 1 + toontown/estate/DistributedGagTree.py | 22 ++--- toontown/estate/DistributedGagTreeAI.py | 1 + toontown/estate/DistributedGarden.py | 35 ++++---- toontown/estate/DistributedGardenAI.py | 1 + toontown/estate/DistributedGardenBox.py | 17 ++-- toontown/estate/DistributedGardenBoxAI.py | 1 + toontown/estate/DistributedGardenPlot.py | 25 +++--- toontown/estate/DistributedGardenPlotAI.py | 1 + toontown/estate/DistributedHouse.py | 39 +++++---- toontown/estate/DistributedHouseAI.py | 1 + toontown/estate/DistributedHouseDoor.py | 19 ++-- toontown/estate/DistributedHouseDoorAI.py | 1 + toontown/estate/DistributedHouseInterior.py | 21 +++-- toontown/estate/DistributedHouseInteriorAI.py | 1 + toontown/estate/DistributedHouseItem.py | 11 +-- toontown/estate/DistributedLawnDecor.py | 27 +++--- toontown/estate/DistributedLawnDecorAI.py | 1 + toontown/estate/DistributedMailbox.py | 24 ++--- toontown/estate/DistributedMailboxAI.py | 1 + toontown/estate/DistributedPhone.py | 27 +++--- toontown/estate/DistributedPhoneAI.py | 1 + toontown/estate/DistributedPlantBase.py | 8 +- toontown/estate/DistributedPlantBaseAI.py | 1 + toontown/estate/DistributedStatuary.py | 14 +-- toontown/estate/DistributedStatuaryAI.py | 1 + toontown/estate/DistributedTarget.py | 15 ++-- toontown/estate/DistributedTargetAI.py | 1 + toontown/estate/DistributedToonStatuary.py | 18 ++-- toontown/estate/DistributedToonStatuaryAI.py | 1 + toontown/estate/DistributedTrunk.py | 13 +-- toontown/estate/DistributedTrunkAI.py | 1 + toontown/estate/Estate.py | 32 ++++--- toontown/estate/EstateLoader.py | 26 +++--- toontown/estate/EstateManager.py | 18 ++-- toontown/estate/EstateManagerAI.py | 1 + toontown/estate/FireworkItemPanel.py | 12 +-- toontown/estate/FireworksGui.py | 15 ++-- toontown/estate/FlowerBase.py | 7 +- toontown/estate/FlowerBasket.py | 5 +- toontown/estate/FlowerBrowser.py | 12 +-- toontown/estate/FlowerCollection.py | 5 +- toontown/estate/FlowerPanel.py | 12 +-- toontown/estate/FlowerPhoto.py | 12 ++- toontown/estate/FlowerPicker.py | 9 +- toontown/estate/FlowerSellGUI.py | 12 +-- toontown/estate/FlowerSpeciesPanel.py | 12 +-- toontown/estate/GameSprite.py | 1 + toontown/estate/GardenDropGame.py | 41 +++++---- toontown/estate/GardenGlobals.py | 7 +- toontown/estate/GardenProgressMeter.py | 38 ++++---- toontown/estate/GardenTutorial.py | 12 +-- toontown/estate/House.py | 15 ++-- toontown/estate/PlantTreeGUI.py | 9 +- toontown/estate/PlantingGUI.py | 13 +-- toontown/estate/SpecialsPhoto.py | 17 ++-- toontown/estate/ToonStatueSelectionGUI.py | 21 +++-- toontown/estate/TrunkGUI.py | 19 ++-- toontown/estate/houseDesign.py | 22 ++--- toontown/fishing/BingoCardBase.py | 10 ++- toontown/fishing/BingoCardCell.py | 13 +-- toontown/fishing/BingoCardGui.py | 19 ++-- toontown/fishing/BingoGlobals.py | 1 + toontown/fishing/BlockoutBingo.py | 5 +- toontown/fishing/DiagonalBingo.py | 5 +- toontown/fishing/DistributedFishingPond.py | 15 ++-- toontown/fishing/DistributedFishingPondAI.py | 1 + toontown/fishing/DistributedFishingTarget.py | 28 +++--- .../fishing/DistributedFishingTargetAI.py | 1 + .../fishing/DistributedPondBingoManager.py | 26 +++--- .../fishing/DistributedPondBingoManagerAI.py | 1 + toontown/fishing/FishBase.py | 7 +- toontown/fishing/FishBrowser.py | 12 +-- toontown/fishing/FishCollection.py | 4 +- toontown/fishing/FishGlobals.py | 9 +- toontown/fishing/FishPanel.py | 12 +-- toontown/fishing/FishPhoto.py | 5 +- toontown/fishing/FishPicker.py | 9 +- toontown/fishing/FishSellGUI.py | 12 +-- toontown/fishing/FishTank.py | 4 +- toontown/fishing/FishingTargetGlobals.py | 1 + toontown/fishing/FourCornerBingo.py | 5 +- toontown/fishing/GenusPanel.py | 13 +-- toontown/fishing/NormalBingo.py | 5 +- toontown/fishing/ThreewayBingo.py | 5 +- toontown/friends/FriendHandle.py | 7 +- toontown/friends/FriendInvitee.py | 14 +-- toontown/friends/FriendInviter.py | 27 +++--- toontown/friends/FriendNotifier.py | 14 +-- toontown/friends/FriendsListManager.py | 22 ++--- toontown/friends/FriendsListPanel.py | 21 +++-- toontown/friends/TTPlayerFriendsManager.py | 6 +- toontown/friends/TTPlayerFriendsManagerUD.py | 1 + toontown/friends/ToontownFriendSecret.py | 19 ++-- toontown/golf/BuildGeometry.py | 14 +-- toontown/golf/DistributedGolfCourse.py | 26 +++--- toontown/golf/DistributedGolfCourseAI.py | 19 ++-- toontown/golf/DistributedGolfHole.py | 37 ++++---- toontown/golf/DistributedGolfHoleAI.py | 22 +++-- toontown/golf/DistributedPhysicsWorld.py | 27 +++--- toontown/golf/DistributedPhysicsWorldAI.py | 20 +++-- toontown/golf/GolfGlobals.py | 4 +- toontown/golf/GolfHoleBase.py | 19 ++-- toontown/golf/GolfManagerAI.py | 9 +- toontown/golf/GolfRewardDialog.py | 12 ++- toontown/golf/GolfScoreBoard.py | 12 ++- toontown/golf/PhysicsWorldBase.py | 27 +++--- toontown/hood/AnimatedProp.py | 3 +- toontown/hood/BRHood.py | 7 +- toontown/hood/BRHoodDataAI.py | 10 ++- toontown/hood/BossbotHQ.py | 6 +- toontown/hood/BossbotHQDataAI.py | 20 ++--- toontown/hood/CSHoodDataAI.py | 17 ++-- toontown/hood/CashbotHQ.py | 10 ++- toontown/hood/CashbotHQDataAI.py | 16 ++-- toontown/hood/CogHood.py | 3 +- toontown/hood/DDHood.py | 7 +- toontown/hood/DDHoodDataAI.py | 11 +-- toontown/hood/DGHood.py | 8 +- toontown/hood/DGHoodDataAI.py | 13 ++- toontown/hood/DLHood.py | 7 +- toontown/hood/DLHoodDataAI.py | 11 +-- toontown/hood/EstateHood.py | 23 ++--- toontown/hood/FishAnimatedProp.py | 10 ++- toontown/hood/GSHood.py | 8 +- toontown/hood/GSHoodDataAI.py | 14 +-- toontown/hood/GZHood.py | 8 +- toontown/hood/GZHoodDataAI.py | 14 +-- toontown/hood/GenericAnimatedBuilding.py | 1 + toontown/hood/GenericAnimatedProp.py | 10 ++- toontown/hood/HQPeriscopeAnimatedProp.py | 4 +- toontown/hood/HQTelescopeAnimatedProp.py | 4 +- toontown/hood/Hood.py | 14 +-- toontown/hood/HoodDataAI.py | 15 ++-- toontown/hood/HoodUtil.py | 1 + toontown/hood/HydrantInteractiveProp.py | 9 +- toontown/hood/HydrantOneAnimatedProp.py | 4 +- toontown/hood/HydrantTwoAnimatedProp.py | 4 +- toontown/hood/HydrantZeroAnimatedProp.py | 4 +- toontown/hood/InteractiveAnimatedProp.py | 17 ++-- toontown/hood/LawbotHQ.py | 6 +- toontown/hood/LawbotHQDataAI.py | 19 ++-- toontown/hood/MMHood.py | 7 +- toontown/hood/MMHoodDataAI.py | 11 +-- toontown/hood/MailboxInteractiveProp.py | 9 +- toontown/hood/MailboxOneAnimatedProp.py | 4 +- toontown/hood/MailboxTwoAnimatedProp.py | 4 +- toontown/hood/MailboxZeroAnimatedProp.py | 4 +- toontown/hood/OZHood.py | 8 +- toontown/hood/OZHoodDataAI.py | 25 +++--- toontown/hood/PartyHood.py | 17 ++-- toontown/hood/PetShopFishAnimatedProp.py | 4 +- toontown/hood/Place.py | 3 +- toontown/hood/QuietZoneState.py | 21 +++-- toontown/hood/SellbotHQ.py | 6 +- toontown/hood/SkyUtil.py | 7 +- toontown/hood/SleepingHydrantAnimatedProp.py | 7 +- toontown/hood/StreetSign.py | 3 + toontown/hood/TTHood.py | 11 ++- toontown/hood/TTHoodDataAI.py | 13 +-- toontown/hood/ToonHood.py | 16 ++-- toontown/hood/TrashcanInteractiveProp.py | 7 +- toontown/hood/TrashcanOneAnimatedProp.py | 4 +- toontown/hood/TrashcanTwoAnimatedProp.py | 4 +- toontown/hood/TrashcanZeroAnimatedProp.py | 4 +- toontown/hood/TrialerForceAcknowledge.py | 8 +- toontown/hood/TutorialHood.py | 8 +- toontown/hood/ZeroAnimatedProp.py | 18 ++-- toontown/hood/ZoneUtil.py | 4 +- toontown/launcher/DownloadForceAcknowledge.py | 9 +- toontown/launcher/QuickLauncher.py | 7 +- toontown/launcher/QuickStartLauncher.py | 1 + toontown/launcher/ToontownDownloadWatcher.py | 3 + toontown/launcher/ToontownDummyLauncher.py | 3 + toontown/launcher/ToontownLauncher.py | 5 +- toontown/login/AvatarChoice.py | 16 ++-- toontown/login/AvatarChooser.py | 26 +++--- toontown/login/DateObject.py | 1 + toontown/makeatoon/BodyShop.py | 13 ++- toontown/makeatoon/ClothesGUI.py | 14 +-- toontown/makeatoon/ColorShop.py | 14 +-- toontown/makeatoon/GenderShop.py | 15 ++-- toontown/makeatoon/MakeAToon.py | 46 +++++----- toontown/makeatoon/MakeClothesGUI.py | 4 +- toontown/makeatoon/NameGenerator.py | 13 +-- toontown/makeatoon/NameShop.py | 40 +++++---- toontown/makeatoon/ShuffleButton.py | 18 ++-- toontown/makeatoon/TTPickANamePattern.py | 10 ++- toontown/minigame/ArrowKeys.py | 2 + toontown/minigame/CatchGameToonSD.py | 18 ++-- toontown/minigame/ClerkPurchase.py | 4 +- toontown/minigame/CogThief.py | 17 ++-- toontown/minigame/CogThiefGameGlobals.py | 3 +- toontown/minigame/CogThiefGameToonSD.py | 13 +-- toontown/minigame/CogThiefWalk.py | 1 + toontown/minigame/DistributedCannonGame.py | 12 ++- toontown/minigame/DistributedCannonGameAI.py | 5 +- toontown/minigame/DistributedCatchGame.py | 43 ++++----- toontown/minigame/DistributedCatchGameAI.py | 11 +-- toontown/minigame/DistributedCogThiefGame.py | 28 +++--- .../minigame/DistributedCogThiefGameAI.py | 11 +-- toontown/minigame/DistributedDivingGame.py | 44 ++++------ toontown/minigame/DistributedDivingGameAI.py | 17 ++-- toontown/minigame/DistributedIceGame.py | 27 +++--- toontown/minigame/DistributedIceGameAI.py | 10 ++- toontown/minigame/DistributedIceWorld.py | 10 ++- toontown/minigame/DistributedMazeGame.py | 38 ++++---- toontown/minigame/DistributedMazeGameAI.py | 9 +- toontown/minigame/DistributedMinigame.py | 36 ++++---- toontown/minigame/DistributedMinigameAI.py | 25 +++--- .../DistributedMinigamePhysicsWorld.py | 4 +- .../minigame/DistributedMinigameTemplate.py | 9 +- .../minigame/DistributedMinigameTemplateAI.py | 5 +- toontown/minigame/DistributedPairingGame.py | 24 ++--- toontown/minigame/DistributedPairingGameAI.py | 13 ++- toontown/minigame/DistributedPatternGame.py | 19 ++-- toontown/minigame/DistributedPatternGameAI.py | 15 ++-- toontown/minigame/DistributedPhotoGame.py | 51 +++++------ toontown/minigame/DistributedPhotoGameAI.py | 11 ++- toontown/minigame/DistributedRaceGame.py | 18 ++-- toontown/minigame/DistributedRaceGameAI.py | 8 +- toontown/minigame/DistributedRingGame.py | 24 +++-- toontown/minigame/DistributedRingGameAI.py | 12 +-- toontown/minigame/DistributedTagGame.py | 31 +++---- toontown/minigame/DistributedTagGameAI.py | 12 +-- toontown/minigame/DistributedTagTreasure.py | 1 + toontown/minigame/DistributedTagTreasureAI.py | 4 +- toontown/minigame/DistributedTargetGame.py | 27 +++--- toontown/minigame/DistributedTargetGameAI.py | 12 +-- toontown/minigame/DistributedTravelGame.py | 23 ++--- toontown/minigame/DistributedTravelGameAI.py | 13 +-- toontown/minigame/DistributedTugOfWarGame.py | 20 ++--- .../minigame/DistributedTugOfWarGameAI.py | 14 +-- toontown/minigame/DistributedTwoDGame.py | 21 +++-- toontown/minigame/DistributedTwoDGameAI.py | 14 +-- toontown/minigame/DistributedVineGame.py | 26 +++--- toontown/minigame/DistributedVineGameAI.py | 5 +- toontown/minigame/DivingFishSpawn.py | 12 ++- toontown/minigame/DivingGameGlobals.py | 1 + toontown/minigame/DivingGameToonSD.py | 15 ++-- toontown/minigame/DivingTreasure.py | 7 +- toontown/minigame/DropPlacer.py | 6 +- toontown/minigame/FogOverlay.py | 19 ++-- toontown/minigame/IceGameGlobals.py | 3 + toontown/minigame/IceTreasure.py | 9 +- toontown/minigame/Maze.py | 3 +- toontown/minigame/MazeBase.py | 2 + toontown/minigame/MazeGameGlobals.py | 1 + toontown/minigame/MazeMapGui.py | 9 +- toontown/minigame/MazeSuit.py | 25 +++--- toontown/minigame/MazeTreasure.py | 6 +- toontown/minigame/MinigameAvatarScorePanel.py | 6 +- toontown/minigame/MinigameCreatorAI.py | 27 ++---- toontown/minigame/MinigameGlobals.py | 4 +- toontown/minigame/MinigamePhysicsWorldBase.py | 4 +- toontown/minigame/MinigamePowerMeter.py | 6 +- toontown/minigame/MinigameRulesPanel.py | 15 ++-- toontown/minigame/OrthoWalk.py | 11 ++- toontown/minigame/PairingGameCard.py | 7 +- toontown/minigame/PairingGameGlobals.py | 1 + toontown/minigame/PatternGameGlobals.py | 1 + toontown/minigame/PhotoGameBase.py | 4 +- toontown/minigame/PhotoGameGlobals.py | 5 +- toontown/minigame/PlayingCard.py | 6 +- toontown/minigame/PlayingCardDeck.py | 5 +- toontown/minigame/PlayingCardGlobals.py | 5 +- toontown/minigame/Purchase.py | 17 ++-- toontown/minigame/PurchaseBase.py | 16 ++-- toontown/minigame/RaceGameGlobals.py | 1 + toontown/minigame/Ring.py | 5 +- toontown/minigame/RingAction.py | 2 + toontown/minigame/RingGameGlobals.py | 5 +- toontown/minigame/RingGroup.py | 10 +-- toontown/minigame/RingTrack.py | 2 + toontown/minigame/RingTrackGroups.py | 9 +- toontown/minigame/RingTracks.py | 5 +- toontown/minigame/RubberBand.py | 15 ++-- toontown/minigame/SwingVine.py | 14 +-- toontown/minigame/TagTreasurePlannerAI.py | 5 +- toontown/minigame/TargetGameGlobals.py | 5 +- toontown/minigame/TempMinigameAI.py | 1 + toontown/minigame/ToonBlitzGlobals.py | 4 +- toontown/minigame/Trajectory.py | 7 +- toontown/minigame/TreasureScorePanel.py | 6 +- toontown/minigame/TrolleyHolidayMgrAI.py | 4 +- toontown/minigame/TrolleyWeekendMgrAI.py | 4 +- toontown/minigame/TwoDBattleMgr.py | 16 +--- toontown/minigame/TwoDBlock.py | 16 ++-- toontown/minigame/TwoDCamera.py | 10 ++- toontown/minigame/TwoDEnemy.py | 28 +++--- toontown/minigame/TwoDEnemyMgr.py | 6 +- toontown/minigame/TwoDGameToonSD.py | 19 ++-- toontown/minigame/TwoDSection.py | 11 ++- toontown/minigame/TwoDSectionMgr.py | 13 ++- toontown/minigame/TwoDSpawnPointMgr.py | 3 + toontown/minigame/TwoDStomper.py | 6 +- toontown/minigame/TwoDStomperMgr.py | 6 +- toontown/minigame/TwoDTreasure.py | 11 ++- toontown/minigame/TwoDTreasureMgr.py | 9 +- toontown/minigame/TwoDWalk.py | 1 + toontown/minigame/VineBat.py | 12 ++- toontown/minigame/VineGameGlobals.py | 4 +- toontown/minigame/VineHeadFrame.py | 7 +- toontown/minigame/VineSpider.py | 10 ++- toontown/minigame/VineTreasure.py | 6 +- toontown/minigame/VoteResultsPanel.py | 12 +-- toontown/minigame/VoteResultsTrolleyPanel.py | 15 ++-- toontown/parties/BaseActivityFSM.py | 3 +- toontown/parties/CalendarGuiDay.py | 15 ++-- toontown/parties/CalendarGuiMonth.py | 13 +-- toontown/parties/Cannon.py | 15 ++-- toontown/parties/CannonGui.py | 6 +- toontown/parties/Decoration.py | 12 ++- toontown/parties/DistributedParty.py | 18 ++-- toontown/parties/DistributedPartyAI.py | 1 + toontown/parties/DistributedPartyActivity.py | 22 ++--- .../parties/DistributedPartyActivityAI.py | 1 + toontown/parties/DistributedPartyCannon.py | 5 +- toontown/parties/DistributedPartyCannonAI.py | 1 + .../parties/DistributedPartyCannonActivity.py | 30 +++---- .../DistributedPartyCannonActivityAI.py | 1 + .../parties/DistributedPartyCatchActivity.py | 36 ++++---- .../DistributedPartyCatchActivityAI.py | 1 + .../DistributedPartyCatchActivityBase.py | 5 +- .../parties/DistributedPartyCogActivity.py | 6 +- .../parties/DistributedPartyCogActivityAI.py | 1 + .../DistributedPartyDance20Activity.py | 1 + .../DistributedPartyDance20ActivityAI.py | 1 + .../parties/DistributedPartyDanceActivity.py | 1 + .../DistributedPartyDanceActivityAI.py | 1 + .../DistributedPartyDanceActivityBase.py | 21 ++--- .../DistributedPartyDanceActivityBaseAI.py | 1 + .../DistributedPartyFireworksActivity.py | 25 +++--- .../DistributedPartyFireworksActivityAI.py | 1 + .../DistributedPartyJukebox40Activity.py | 3 +- .../DistributedPartyJukebox40ActivityAI.py | 1 + .../DistributedPartyJukeboxActivity.py | 3 +- .../DistributedPartyJukeboxActivityAI.py | 1 + .../DistributedPartyJukeboxActivityBase.py | 13 +-- .../DistributedPartyJukeboxActivityBaseAI.py | 1 + .../parties/DistributedPartyTeamActivity.py | 6 +- .../parties/DistributedPartyTeamActivityAI.py | 1 + .../DistributedPartyTrampolineActivity.py | 40 ++++----- .../DistributedPartyTrampolineActivityAI.py | 1 + .../DistributedPartyTugOfWarActivity.py | 31 +++---- .../DistributedPartyTugOfWarActivityAI.py | 1 + ...istributedPartyValentineDance20Activity.py | 1 + ...tributedPartyValentineDance20ActivityAI.py | 1 + .../DistributedPartyValentineDanceActivity.py | 1 + ...istributedPartyValentineDanceActivityAI.py | 1 + ...tributedPartyValentineJukebox40Activity.py | 3 +- ...ibutedPartyValentineJukebox40ActivityAI.py | 1 + ...istributedPartyValentineJukeboxActivity.py | 3 +- ...tributedPartyValentineJukeboxActivityAI.py | 1 + ...ributedPartyValentineTrampolineActivity.py | 1 + ...butedPartyValentineTrampolineActivityAI.py | 1 + ...stributedPartyVictoryTrampolineActivity.py | 1 + ...ributedPartyVictoryTrampolineActivityAI.py | 1 + .../DistributedPartyWinterCatchActivity.py | 7 +- .../DistributedPartyWinterCatchActivityAI.py | 1 + .../DistributedPartyWinterCogActivity.py | 1 + .../DistributedPartyWinterCogActivityAI.py | 1 + ...istributedPartyWinterTrampolineActivity.py | 1 + ...tributedPartyWinterTrampolineActivityAI.py | 1 + toontown/parties/InviteInfo.py | 5 +- toontown/parties/InviteVisual.py | 14 +-- toontown/parties/JellybeanRewardGui.py | 10 +-- toontown/parties/JukeboxGui.py | 10 ++- toontown/parties/KeyCodes.py | 2 + toontown/parties/KeyCodesGui.py | 7 +- toontown/parties/Party.py | 27 +++--- toontown/parties/PartyCatchActivityToonSD.py | 15 ++-- toontown/parties/PartyCog.py | 16 ++-- toontown/parties/PartyCogActivity.py | 30 +++---- toontown/parties/PartyCogActivityGui.py | 17 ++-- toontown/parties/PartyCogActivityInput.py | 4 +- toontown/parties/PartyCogActivityPlayer.py | 26 +++--- toontown/parties/PartyCogUtils.py | 3 + toontown/parties/PartyDanceActivityToonFSM.py | 5 +- toontown/parties/PartyEditor.py | 22 ++--- toontown/parties/PartyEditorGrid.py | 18 ++-- toontown/parties/PartyEditorGridElement.py | 16 ++-- toontown/parties/PartyEditorGridSquare.py | 15 ++-- toontown/parties/PartyEditorListElement.py | 7 +- toontown/parties/PartyGlobals.py | 8 +- toontown/parties/PartyInfo.py | 7 +- toontown/parties/PartyLoader.py | 16 ++-- toontown/parties/PartyPlanner.py | 40 ++++----- toontown/parties/PartyUtils.py | 10 ++- toontown/parties/PublicPartyGui.py | 21 ++--- toontown/parties/ScrolledFriendList.py | 10 ++- toontown/parties/ServerTimeGui.py | 3 + toontown/parties/StretchingArrow.py | 5 +- toontown/parties/TeamActivityGui.py | 9 +- toontown/parties/ToontownTimeManager.py | 6 +- .../parties/WinterPartyCatchActivityToonSD.py | 10 ++- toontown/parties/activityFSMMixins.py | 1 + toontown/parties/activityFSMs.py | 13 +-- toontown/pets/DistributedPet.py | 19 ++-- toontown/pets/DistributedPetAI.py | 46 +++++----- toontown/pets/DistributedPetProxy.py | 12 +-- toontown/pets/DistributedPetProxyAI.py | 20 +++-- toontown/pets/Pet.py | 25 ++++-- toontown/pets/PetActionFSM.py | 6 +- toontown/pets/PetAvatarPanel.py | 14 +-- toontown/pets/PetBase.py | 6 +- toontown/pets/PetBrain.py | 19 ++-- toontown/pets/PetChase.py | 10 ++- toontown/pets/PetCollider.py | 3 + toontown/pets/PetConstants.py | 7 +- toontown/pets/PetDNA.py | 7 +- toontown/pets/PetDetail.py | 3 + toontown/pets/PetDetailPanel.py | 17 ++-- toontown/pets/PetFlee.py | 3 + toontown/pets/PetGoal.py | 8 +- toontown/pets/PetGoalMgr.py | 8 +- toontown/pets/PetHandle.py | 3 +- toontown/pets/PetLeash.py | 2 + toontown/pets/PetLookerAI.py | 6 +- toontown/pets/PetManager.py | 5 +- toontown/pets/PetManagerAI.py | 1 + toontown/pets/PetMood.py | 9 +- toontown/pets/PetNameGenerator.py | 13 +-- toontown/pets/PetObserve.py | 9 +- toontown/pets/PetSphere.py | 3 + toontown/pets/PetTraits.py | 11 ++- toontown/pets/PetTricks.py | 6 +- toontown/pets/PetTutorial.py | 10 ++- toontown/pets/PetUtil.py | 8 +- toontown/pets/PetWander.py | 8 +- toontown/pets/PetshopGUI.py | 37 ++++---- toontown/quest/BlinkingArrows.py | 4 +- toontown/quest/QuestBookPoster.py | 1 + toontown/quest/QuestChoiceGui.py | 12 +-- toontown/quest/QuestManagerAI.py | 14 +-- toontown/quest/QuestMap.py | 11 ++- toontown/quest/QuestMapGlobals.py | 1 + toontown/quest/QuestParser.py | 35 ++++---- toontown/quest/QuestPoster.py | 32 +++---- toontown/quest/QuestRewardCounter.py | 14 +-- toontown/quest/Quests.py | 24 ++--- toontown/quest/TrackChoiceGui.py | 10 +-- toontown/racing/DistributedGag.py | 8 +- toontown/racing/DistributedKartPad.py | 1 + toontown/racing/DistributedLeaderBoard.py | 7 +- toontown/racing/DistributedProjectile.py | 10 ++- toontown/racing/DistributedProjectileAI.py | 1 + toontown/racing/DistributedRace.py | 48 +++++----- toontown/racing/DistributedRaceAI.py | 17 ++-- toontown/racing/DistributedRacePad.py | 12 +-- toontown/racing/DistributedStartingBlock.py | 30 +++---- toontown/racing/DistributedStartingBlockAI.py | 16 ++-- toontown/racing/DistributedVehicle.py | 35 ++++---- toontown/racing/DistributedVehicleAI.py | 11 ++- toontown/racing/DistributedViewPad.py | 5 +- toontown/racing/DroppedGag.py | 4 +- toontown/racing/EffectManager.py | 8 +- toontown/racing/FlyingGag.py | 4 +- toontown/racing/Kart.py | 6 +- toontown/racing/KartDNA.py | 15 +++- toontown/racing/KartShopGlobals.py | 1 + toontown/racing/KartShopGui.py | 17 ++-- toontown/racing/Piejectile.py | 15 ++-- toontown/racing/PiejectileManager.py | 6 +- toontown/racing/RaceEndPanels.py | 9 +- toontown/racing/RaceGUI.py | 49 ++++++----- toontown/racing/RaceGag.py | 3 + toontown/racing/RaceHeadFrame.py | 7 +- toontown/racing/RaceManagerAI.py | 15 ++-- toontown/rpc/AwardManager.py | 1 + toontown/rpc/AwardManagerUD.py | 1 + toontown/rpc/RATManager.py | 1 + toontown/rpc/RATManagerUD.py | 1 + toontown/safezone/BRPlayground.py | 11 ++- toontown/safezone/BRSafeZoneLoader.py | 7 +- toontown/safezone/BRTreasurePlannerAI.py | 4 +- toontown/safezone/ButterflyGlobals.py | 4 +- toontown/safezone/DDPlayground.py | 15 ++-- toontown/safezone/DDSafeZoneLoader.py | 10 ++- toontown/safezone/DDTreasurePlannerAI.py | 4 +- toontown/safezone/DGPlayground.py | 8 +- toontown/safezone/DGSafeZoneLoader.py | 5 +- toontown/safezone/DGTreasurePlannerAI.py | 4 +- toontown/safezone/DLPlayground.py | 7 +- toontown/safezone/DLSafeZoneLoader.py | 5 +- toontown/safezone/DLTreasurePlannerAI.py | 4 +- toontown/safezone/DistributedBRTreasure.py | 1 + toontown/safezone/DistributedBRTreasureAI.py | 1 + toontown/safezone/DistributedBoat.py | 12 +-- toontown/safezone/DistributedBoatAI.py | 10 ++- toontown/safezone/DistributedButterfly.py | 32 ++++--- toontown/safezone/DistributedButterflyAI.py | 19 ++-- toontown/safezone/DistributedCheckers.py | 28 +++--- toontown/safezone/DistributedCheckersAI.py | 9 +- .../safezone/DistributedChineseCheckers.py | 30 ++++--- .../safezone/DistributedChineseCheckersAI.py | 9 +- toontown/safezone/DistributedDDTreasure.py | 1 + toontown/safezone/DistributedDDTreasureAI.py | 1 + toontown/safezone/DistributedDGFlower.py | 7 +- toontown/safezone/DistributedDGFlowerAI.py | 9 +- toontown/safezone/DistributedDGTreasure.py | 1 + toontown/safezone/DistributedDGTreasureAI.py | 1 + toontown/safezone/DistributedDLTreasure.py | 1 + toontown/safezone/DistributedDLTreasureAI.py | 1 + .../safezone/DistributedEFlyingTreasure.py | 13 ++- .../safezone/DistributedEFlyingTreasureAI.py | 1 + toontown/safezone/DistributedETreasure.py | 1 + toontown/safezone/DistributedETreasureAI.py | 1 + toontown/safezone/DistributedFindFour.py | 31 ++++--- toontown/safezone/DistributedFindFourAI.py | 8 +- toontown/safezone/DistributedFishingSpot.py | 41 ++++----- toontown/safezone/DistributedFishingSpotAI.py | 1 + toontown/safezone/DistributedGolfKart.py | 26 +++--- toontown/safezone/DistributedGolfKartAI.py | 30 ++++--- toontown/safezone/DistributedMMPiano.py | 9 +- toontown/safezone/DistributedMMPianoAI.py | 9 +- toontown/safezone/DistributedMMTreasure.py | 1 + toontown/safezone/DistributedMMTreasureAI.py | 1 + toontown/safezone/DistributedOZTreasure.py | 1 + toontown/safezone/DistributedOZTreasureAI.py | 1 + toontown/safezone/DistributedPartyGate.py | 24 ++--- toontown/safezone/DistributedPartyGateAI.py | 1 + toontown/safezone/DistributedPicnicBasket.py | 38 ++++---- .../safezone/DistributedPicnicBasketAI.py | 27 +++--- toontown/safezone/DistributedPicnicTable.py | 31 ++++--- toontown/safezone/DistributedPicnicTableAI.py | 12 ++- toontown/safezone/DistributedSZTreasure.py | 8 +- toontown/safezone/DistributedSZTreasureAI.py | 4 +- toontown/safezone/DistributedTTTreasure.py | 1 + toontown/safezone/DistributedTTTreasureAI.py | 1 + toontown/safezone/DistributedTreasure.py | 11 ++- toontown/safezone/DistributedTreasureAI.py | 6 +- toontown/safezone/DistributedTrolley.py | 18 ++-- toontown/safezone/DistributedTrolleyAI.py | 23 ++--- toontown/safezone/GSPlayground.py | 17 ++-- toontown/safezone/GSSafeZoneLoader.py | 13 +-- toontown/safezone/GZPlayground.py | 17 ++-- toontown/safezone/GZSafeZoneLoader.py | 18 ++-- toontown/safezone/GameMenu.py | 13 +-- toontown/safezone/GameTutorials.py | 12 +-- toontown/safezone/GolfKart.py | 15 ++-- toontown/safezone/MMPlayground.py | 11 ++- toontown/safezone/MMSafeZoneLoader.py | 6 +- toontown/safezone/MMTreasurePlannerAI.py | 4 +- toontown/safezone/OZPlayground.py | 20 +++-- toontown/safezone/OZSafeZoneLoader.py | 29 ++++--- toontown/safezone/OZTreasurePlannerAI.py | 4 +- toontown/safezone/PicnicBasket.py | 15 ++-- toontown/safezone/Playground.py | 3 +- toontown/safezone/PublicWalk.py | 6 +- toontown/safezone/RegenTreasurePlannerAI.py | 7 +- toontown/safezone/SafeZoneLoader.py | 19 ++-- toontown/safezone/SafeZoneManager.py | 4 +- toontown/safezone/TTPlayground.py | 13 ++- toontown/safezone/TTSafeZoneLoader.py | 9 +- toontown/safezone/TTTreasurePlannerAI.py | 4 +- toontown/safezone/Train.py | 24 ++--- toontown/safezone/TreasurePlannerAI.py | 6 +- toontown/safezone/Walk.py | 8 +- toontown/shtiker/DeleteManager.py | 4 +- toontown/shtiker/DeleteManagerAI.py | 1 + toontown/shtiker/DirectNewsFrame.py | 18 ++-- toontown/shtiker/DisguisePage.py | 15 ++-- toontown/shtiker/DisplaySettingsDialog.py | 14 +-- toontown/shtiker/EventsPage.py | 26 +++--- toontown/shtiker/FishPage.py | 15 ++-- toontown/shtiker/GardenPage.py | 15 ++-- toontown/shtiker/GolfPage.py | 11 ++- toontown/shtiker/HtmlView.py | 22 ++--- toontown/shtiker/InGameNewsFrame.py | 2 + toontown/shtiker/InventoryPage.py | 12 +-- toontown/shtiker/IssueFrame.py | 17 ++-- toontown/shtiker/IssueFrameV2.py | 5 +- toontown/shtiker/KartPage.py | 13 ++- toontown/shtiker/MapPage.py | 18 ++-- toontown/shtiker/NPCFriendPage.py | 8 +- toontown/shtiker/NewbiePurchaseManager.py | 4 +- toontown/shtiker/NewbiePurchaseManagerAI.py | 1 + toontown/shtiker/NewsPage.py | 11 ++- toontown/shtiker/OptionsPage.py | 25 +++--- toontown/shtiker/PhotoAlbumPage.py | 15 ++-- toontown/shtiker/PurchaseManager.py | 10 ++- toontown/shtiker/PurchaseManagerAI.py | 21 +++-- toontown/shtiker/QuestPage.py | 19 ++-- toontown/shtiker/ShardPage.py | 25 +++--- toontown/shtiker/ShtikerBook.py | 11 +-- toontown/shtiker/ShtikerPage.py | 7 +- toontown/shtiker/SuitPage.py | 17 ++-- toontown/shtiker/SummonCogDialog.py | 13 +-- toontown/shtiker/TIPPage.py | 12 +-- toontown/shtiker/TrackPage.py | 11 +-- toontown/speedchat/TTSCAprilToonsMenu.py | 4 +- toontown/speedchat/TTSCBoardingMenu.py | 4 +- toontown/speedchat/TTSCCogMenu.py | 1 + toontown/speedchat/TTSCDecoders.py | 2 +- toontown/speedchat/TTSCFactoryMenu.py | 7 +- toontown/speedchat/TTSCGolfMenu.py | 4 +- toontown/speedchat/TTSCHalloweenMenu.py | 4 +- toontown/speedchat/TTSCIdesOfMarchMenu.py | 4 +- toontown/speedchat/TTSCIndexedTerminal.py | 3 +- toontown/speedchat/TTSCJellybeanJamMenu.py | 6 +- toontown/speedchat/TTSCKartRacingMenu.py | 4 +- toontown/speedchat/TTSCPetTrickMenu.py | 9 +- toontown/speedchat/TTSCPromotionalMenu.py | 9 +- toontown/speedchat/TTSCResistanceMenu.py | 4 + toontown/speedchat/TTSCResistanceTerminal.py | 2 + .../speedchat/TTSCSellbotFieldOfficeMenu.py | 7 +- toontown/speedchat/TTSCSellbotInvasionMenu.py | 5 +- toontown/speedchat/TTSCSellbotNerfMenu.py | 4 +- toontown/speedchat/TTSCSillyPhaseFiveMenu.py | 4 +- toontown/speedchat/TTSCSillyPhaseFourMenu.py | 4 +- toontown/speedchat/TTSCSillyPhaseOneMenu.py | 4 +- toontown/speedchat/TTSCSillyPhaseThreeMenu.py | 4 +- toontown/speedchat/TTSCSillyPhaseTwoMenu.py | 4 +- toontown/speedchat/TTSCSingingMenu.py | 5 +- toontown/speedchat/TTSCSingingTerminal.py | 3 +- toontown/speedchat/TTSCToontaskMenu.py | 5 +- toontown/speedchat/TTSCToontaskTerminal.py | 2 + toontown/speedchat/TTSCVictoryPartiesMenu.py | 7 +- toontown/speedchat/TTSCWinterMenu.py | 5 +- toontown/speedchat/TTSpeedChatGlobals.py | 2 +- toontown/speedchat/TTSpeedChatTypes.py | 42 ++++----- toontown/spellbook/MagicWordIndex.py | 85 +++++++++--------- .../spellbook/ToontownMagicWordManager.py | 18 ++-- .../spellbook/ToontownMagicWordManagerAI.py | 8 +- toontown/suit/BossCog.py | 26 +++--- toontown/suit/DistributedBossCog.py | 32 +++---- toontown/suit/DistributedBossCogAI.py | 28 +++--- toontown/suit/DistributedBossbotBoss.py | 36 ++++---- toontown/suit/DistributedBossbotBossAI.py | 28 +++--- toontown/suit/DistributedCashbotBoss.py | 50 +++++------ toontown/suit/DistributedCashbotBossAI.py | 24 ++--- toontown/suit/DistributedCashbotBossGoon.py | 22 +++-- toontown/suit/DistributedCashbotBossGoonAI.py | 21 +++-- toontown/suit/DistributedFactorySuit.py | 21 +++-- toontown/suit/DistributedFactorySuitAI.py | 10 ++- toontown/suit/DistributedGoon.py | 34 ++++---- toontown/suit/DistributedGoonAI.py | 15 ++-- toontown/suit/DistributedGridGoon.py | 12 ++- toontown/suit/DistributedGridGoonAI.py | 17 ++-- toontown/suit/DistributedLawbotBoss.py | 48 +++++----- toontown/suit/DistributedLawbotBossAI.py | 45 +++++----- toontown/suit/DistributedLawbotBossSuit.py | 13 +-- toontown/suit/DistributedLawbotBossSuitAI.py | 17 ++-- toontown/suit/DistributedMintSuit.py | 4 +- toontown/suit/DistributedMintSuitAI.py | 4 +- toontown/suit/DistributedSellbotBoss.py | 42 ++++----- toontown/suit/DistributedSellbotBossAI.py | 32 ++++--- toontown/suit/DistributedStageSuit.py | 24 ++--- toontown/suit/DistributedStageSuitAI.py | 4 +- toontown/suit/DistributedSuit.py | 39 ++++----- toontown/suit/DistributedSuitAI.py | 20 +++-- toontown/suit/DistributedSuitBase.py | 39 ++++----- toontown/suit/DistributedSuitBaseAI.py | 8 +- toontown/suit/DistributedSuitPlanner.py | 6 +- toontown/suit/DistributedSuitPlannerAI.py | 33 +++---- toontown/suit/DistributedTutorialSuit.py | 7 +- toontown/suit/DistributedTutorialSuitAI.py | 8 +- toontown/suit/Goon.py | 19 ++-- toontown/suit/GoonDeath.py | 5 +- toontown/suit/GoonGlobals.py | 1 + toontown/suit/GoonPathData.py | 2 + toontown/suit/RoguesGallery.py | 14 +-- toontown/suit/SellbotBossGlobals.py | 5 +- toontown/suit/Suit.py | 17 ++-- toontown/suit/SuitAvatarPanel.py | 17 ++-- toontown/suit/SuitBase.py | 14 +-- toontown/suit/SuitDNA.py | 8 +- toontown/suit/SuitDialog.py | 4 + toontown/suit/SuitInvasionManagerAI.py | 1 + toontown/suit/SuitPlannerBase.py | 14 +-- toontown/toon/AvatarPanelBase.py | 6 +- toontown/toon/BoardingGroupInviterPanels.py | 14 +-- toontown/toon/DeathForceAcknowledge.py | 11 ++- toontown/toon/DistributedNPCBlocker.py | 13 +-- toontown/toon/DistributedNPCBlockerAI.py | 10 ++- toontown/toon/DistributedNPCClerk.py | 12 ++- toontown/toon/DistributedNPCClerkAI.py | 8 +- toontown/toon/DistributedNPCFisherman.py | 13 +-- toontown/toon/DistributedNPCFishermanAI.py | 12 ++- .../toon/DistributedNPCFlippyInToonHall.py | 2 + .../toon/DistributedNPCFlippyInToonHallAI.py | 1 + toontown/toon/DistributedNPCKartClerk.py | 14 +-- toontown/toon/DistributedNPCKartClerkAI.py | 13 ++- toontown/toon/DistributedNPCPartyPerson.py | 21 +++-- toontown/toon/DistributedNPCPartyPersonAI.py | 12 +-- toontown/toon/DistributedNPCPetclerk.py | 13 +-- toontown/toon/DistributedNPCPetclerkAI.py | 13 ++- toontown/toon/DistributedNPCScientist.py | 5 +- toontown/toon/DistributedNPCScientistAI.py | 9 +- .../toon/DistributedNPCSpecialQuestGiver.py | 11 +-- .../toon/DistributedNPCSpecialQuestGiverAI.py | 11 ++- toontown/toon/DistributedNPCTailor.py | 13 +-- toontown/toon/DistributedNPCTailorAI.py | 11 ++- toontown/toon/DistributedNPCToon.py | 11 +-- toontown/toon/DistributedNPCToonAI.py | 11 ++- toontown/toon/DistributedNPCToonBase.py | 22 ++--- toontown/toon/DistributedNPCToonBaseAI.py | 15 ++-- toontown/toon/DistributedToon.py | 82 ++++++++--------- toontown/toon/DistributedToonAI.py | 83 ++++++++---------- toontown/toon/DistributedToonUD.py | 1 + toontown/toon/ElevatorNotifier.py | 10 ++- toontown/toon/Experience.py | 6 +- toontown/toon/GroupInvitee.py | 14 +-- toontown/toon/GroupPanel.py | 10 ++- toontown/toon/HealthForceAcknowledge.py | 4 +- toontown/toon/InventoryBase.py | 9 +- toontown/toon/InventoryNew.py | 18 ++-- toontown/toon/LaffMeter.py | 6 +- toontown/toon/LocalToon.py | 87 ++++++++----------- toontown/toon/Motion.py | 12 +-- toontown/toon/NPCForceAcknowledge.py | 7 +- toontown/toon/NPCFriendPanel.py | 16 ++-- toontown/toon/NPCToons.py | 25 +++--- toontown/toon/PlayerDetailPanel.py | 21 ++--- toontown/toon/PlayerInfoPanel.py | 24 ++--- toontown/toon/TTEmote.py | 18 ++-- toontown/toon/TailorClothesGUI.py | 2 + toontown/toon/Toon.py | 59 +++++++------ toontown/toon/ToonAvatarDetailPanel.py | 21 ++--- toontown/toon/ToonAvatarPanel.py | 27 +++--- toontown/toon/ToonDNA.py | 5 +- toontown/toon/ToonDetail.py | 3 + toontown/toon/ToonHead.py | 14 +-- toontown/toon/ToonHeadFrame.py | 8 +- toontown/toon/ToonTeleportPanel.py | 18 ++-- toontown/toonbase/DisplayOptions.py | 17 ++-- toontown/toonbase/TTLocalizer.py | 1 + toontown/toonbase/TTLocalizerEnglish.py | 8 +- toontown/toonbase/ToonBase.py | 33 +++---- toontown/toonbase/ToontownAccess.py | 1 + toontown/toonbase/ToontownAccessAI.py | 6 +- toontown/toonbase/ToontownBattleGlobals.py | 4 +- toontown/toonbase/ToontownGlobals.py | 14 ++- toontown/toonbase/ToontownIntervals.py | 3 +- toontown/toonbase/ToontownLoader.py | 3 + toontown/toonbase/ToontownStart.py | 31 ++++--- toontown/toonbase/ToontownTimer.py | 4 +- toontown/toontowngui/NewsPageButtonManager.py | 10 ++- toontown/toontowngui/TTDialog.py | 1 + toontown/toontowngui/TeaserPanel.py | 14 +-- toontown/toontowngui/ToonHeadDialog.py | 8 +- .../toontowngui/ToontownLoadingBlocker.py | 20 +++-- toontown/toontowngui/ToontownLoadingScreen.py | 11 ++- toontown/town/BRStreet.py | 1 + toontown/town/BRTownLoader.py | 5 +- toontown/town/DDStreet.py | 1 + toontown/town/DDTownLoader.py | 5 +- toontown/town/DGStreet.py | 1 + toontown/town/DGTownLoader.py | 5 +- toontown/town/DLStreet.py | 1 + toontown/town/DLTownLoader.py | 5 +- toontown/town/MMStreet.py | 1 + toontown/town/MMTownLoader.py | 5 +- toontown/town/Street.py | 22 +++-- toontown/town/TTStreet.py | 1 + toontown/town/TTTownLoader.py | 5 +- toontown/town/TownBattle.py | 31 +++---- toontown/town/TownBattleAttackPanel.py | 10 ++- toontown/town/TownBattleChooseAvatarPanel.py | 16 ++-- toontown/town/TownBattleSOSPanel.py | 20 ++--- toontown/town/TownBattleSOSPetInfoPanel.py | 13 +-- toontown/town/TownBattleSOSPetSearchPanel.py | 4 +- toontown/town/TownBattleToonPanel.py | 18 ++-- toontown/town/TownBattleWaitPanel.py | 4 +- toontown/town/TownLoader.py | 31 ++++--- toontown/town/TutorialStreet.py | 1 + toontown/town/TutorialTownLoader.py | 8 +- toontown/trolley/Trolley.py | 19 ++-- .../tutorial/DistributedBattleTutorial.py | 4 +- .../tutorial/DistributedBattleTutorialAI.py | 6 +- toontown/tutorial/SuitPlannerTutorialAI.py | 7 +- toontown/tutorial/TutorialBattleManagerAI.py | 5 +- toontown/tutorial/TutorialForceAcknowledge.py | 4 +- toontown/tutorial/TutorialManager.py | 5 +- toontown/tutorial/TutorialManagerAI.py | 45 +++++----- toontown/uberdog/DataStore.py | 15 ++-- toontown/uberdog/DataStoreGlobals.py | 3 +- toontown/uberdog/DistributedCpuInfoMgr.py | 1 + toontown/uberdog/DistributedCpuInfoMgrAI.py | 1 + toontown/uberdog/DistributedCpuInfoMgrUD.py | 1 + .../uberdog/DistributedDataStoreManager.py | 2 + .../uberdog/DistributedDataStoreManagerAI.py | 1 + .../uberdog/DistributedDataStoreManagerUD.py | 1 + .../uberdog/DistributedDeliveryManager.py | 6 +- .../uberdog/DistributedDeliveryManagerAI.py | 1 + .../uberdog/DistributedDeliveryManagerUD.py | 1 + toontown/uberdog/DistributedInGameNewsMgr.py | 7 +- .../uberdog/DistributedInGameNewsMgrAI.py | 1 + .../uberdog/DistributedInGameNewsMgrUD.py | 1 + toontown/uberdog/DistributedMailManager.py | 1 + toontown/uberdog/DistributedMailManagerAI.py | 1 + toontown/uberdog/DistributedMailManagerUD.py | 1 + toontown/uberdog/DistributedPartyManager.py | 10 ++- toontown/uberdog/DistributedPartyManagerAI.py | 1 + toontown/uberdog/DistributedPartyManagerUD.py | 1 + toontown/uberdog/DistributedSecurityMgr.py | 7 +- toontown/uberdog/DistributedSecurityMgrAI.py | 1 + toontown/uberdog/DistributedSecurityMgrUD.py | 1 + toontown/uberdog/DistributedWhitelistMgr.py | 7 +- toontown/uberdog/DistributedWhitelistMgrAI.py | 1 + toontown/uberdog/DistributedWhitelistMgrUD.py | 1 + toontown/uberdog/ScavengerHuntDataStore.py | 2 + toontown/uberdog/TTSpeedchatRelay.py | 6 +- toontown/uberdog/TTSpeedchatRelayUD.py | 1 + toontown/uberdog/ToontownUDRepository.py | 2 +- toontown/uberdog/UDStart.py | 5 +- vscode.code-workspace | 2 +- win32/.vscode/tasks.json | 2 +- 1685 files changed, 10245 insertions(+), 7203 deletions(-) create mode 100644 .pre-commit-config.yaml create mode 100644 pyproject.toml diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..3de1bbb --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,15 @@ +# See https://pre-commit.com for more information +# See https://pre-commit.com/hooks.html for more hooks +repos: +- repo: https://github.com/pre-commit/pre-commit-hooks + rev: v3.2.0 + hooks: + - id: trailing-whitespace + - id: end-of-file-fixer + - id: check-yaml + - id: check-added-large-files +- repo: https://github.com/pycqa/isort + rev: 5.12.0 + hooks: + - id: isort + name: isort (python) diff --git a/README.md b/README.md index a886a48..098a23c 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ If you install Panda3D outside the default directory (or use the x86 installer), ## macOS 10.9+ [Panda3D Wheel for macOS 10.9+ (Python3.9, x86_64)](https://drive.google.com/file/d/1_6WJxrkNfwisK5pe5ubJJy1psEp0IIft/view?usp=sharing) -Installing the provided Panda3D wheel requires Python 3.9, which is not installed on your system by default whatsoever. We recommend installing Python 3.9 through [Homebrew](https://brew.sh/) (Make sure that the xcode command line tools are installed first `xcode-select --install`): +Installing the provided Panda3D wheel requires Python 3.9, which is not installed on your system by default whatsoever. We recommend installing Python 3.9 through [Homebrew](https://brew.sh/) (Make sure that the xcode command line tools are installed first `xcode-select --install`): ```shell $ brew install python@3.9 ``` diff --git a/etc/Configrc.prc b/etc/Configrc.prc index 522e1ba..9511453 100644 --- a/etc/Configrc.prc +++ b/etc/Configrc.prc @@ -56,7 +56,7 @@ default-directnotify-level info console-output 1 # Panda3D/DirectX -# Configure this true if you have a buggy graphics driver that doesn't correctly implement the third parameter, NumVertices, of DrawIndexedPrimitive(). In particular, the NVIDIA Quadro driver version 6.14.10.7184 seems to treat this as a maximum vertex index, rather than a delta between the maximum and minimum vertex index. Turn this on if you are seeing stray triangles, or you are not seeing all of your triangles. Enabling this should work around this bug, at the cost of some additional rendering overhead on the GPU. +# Configure this true if you have a buggy graphics driver that doesn't correctly implement the third parameter, NumVertices, of DrawIndexedPrimitive(). In particular, the NVIDIA Quadro driver version 6.14.10.7184 seems to treat this as a maximum vertex index, rather than a delta between the maximum and minimum vertex index. Turn this on if you are seeing stray triangles, or you are not seeing all of your triangles. Enabling this should work around this bug, at the cost of some additional rendering overhead on the GPU. dx-broken-max-index 1 # Set this true to show ime texts on the chat panel and hide the IME default windows. This is a mechanism to work around DX8/9 interface. ime-aware 1 diff --git a/otp/ai/AIBase.py b/otp/ai/AIBase.py index a69faff..bfbf3ae 100644 --- a/otp/ai/AIBase.py +++ b/otp/ai/AIBase.py @@ -1,21 +1,23 @@ -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 * -from direct.showbase.JobManagerGlobal import * -from direct.showbase.EventManagerGlobal import * -from direct.showbase.PythonUtil import * -from otp.otpbase import PythonUtil -from direct.interval.IntervalManager import ivalMgr -from direct.task import Task -from direct.showbase import EventManager -from direct.showbase import ExceptionVarDump +import gc import math import sys import time -import gc + +from panda3d.core import * + +from direct.directnotify.DirectNotifyGlobal import * +from direct.interval.IntervalManager import ivalMgr +from direct.showbase import DConfig, EventManager, ExceptionVarDump +from direct.showbase.BulletinBoardGlobal import * +from direct.showbase.EventManagerGlobal import * +from direct.showbase.JobManagerGlobal import * +from direct.showbase.MessengerGlobal import * +from direct.showbase.PythonUtil import * +from direct.task import Task +from direct.task.TaskManagerGlobal import * + +from otp.otpbase import PythonUtil + class AIBase: notify = directNotify.newCategory('AIBase') diff --git a/otp/ai/AIBaseGlobal.py b/otp/ai/AIBaseGlobal.py index 7d8f8fc..ba5e1af 100644 --- a/otp/ai/AIBaseGlobal.py +++ b/otp/ai/AIBaseGlobal.py @@ -1,4 +1,5 @@ from .AIBase import * + __builtins__['simbase'] = AIBase() __builtins__['ostream'] = Notify.out() __builtins__['run'] = simbase.run @@ -10,6 +11,7 @@ __builtins__['bboard'] = simbase.bboard __builtins__['config'] = simbase.config __builtins__['directNotify'] = directNotify from direct.showbase import Loader + simbase.loader = Loader.Loader(simbase) __builtins__['loader'] = simbase.loader directNotify.setDconfigLevels() diff --git a/otp/ai/AIMsgTypes.py b/otp/ai/AIMsgTypes.py index 06bd641..7b7b7ea 100644 --- a/otp/ai/AIMsgTypes.py +++ b/otp/ai/AIMsgTypes.py @@ -1,5 +1,7 @@ -from otp.distributed.OtpDoGlobals import * from direct.showbase.PythonUtil import invertDictLossless + +from otp.distributed.OtpDoGlobals import * + OTP_SERVER_ROOT_DO_ID = 4007 CHANNEL_CLIENT_BROADCAST = 4014 BAD_CHANNEL_ID = 0 diff --git a/otp/ai/AIZoneData.py b/otp/ai/AIZoneData.py index 45c4a28..1c9a640 100644 --- a/otp/ai/AIZoneData.py +++ b/otp/ai/AIZoneData.py @@ -1,11 +1,15 @@ -from panda3d.core import * -from direct.distributed import ParentMgr -from direct.directnotify.DirectNotifyGlobal import directNotify -from direct.task import Task -from direct.showbase import LeakDetectors -from otp.otpbase import OTPGlobals import random +from panda3d.core import * + +from direct.directnotify.DirectNotifyGlobal import directNotify +from direct.distributed import ParentMgr +from direct.showbase import LeakDetectors +from direct.task import Task + +from otp.otpbase import OTPGlobals + + class AIZoneData: notify = directNotify.newCategory('AIZoneData') diff --git a/otp/ai/BanManagerAI.py b/otp/ai/BanManagerAI.py index 4352b97..64451ab 100644 --- a/otp/ai/BanManagerAI.py +++ b/otp/ai/BanManagerAI.py @@ -1,8 +1,13 @@ -import urllib.request, urllib.parse, urllib.error import os +import urllib.error +import urllib.parse +import urllib.request + from panda3d.core import HTTPClient, Ramfile + from direct.directnotify import DirectNotifyGlobal + class BanManagerAI: notify = DirectNotifyGlobal.directNotify.newCategory('BanManagerAI') BanUrl = simbase.config.GetString('ban-base-url', 'http://vapps.disl.starwave.com:8005/dis-hold/action/event') diff --git a/otp/ai/Barrier.py b/otp/ai/Barrier.py index dce9a04..e140270 100644 --- a/otp/ai/Barrier.py +++ b/otp/ai/Barrier.py @@ -1,8 +1,11 @@ -from otp.ai.AIBase import * -from direct.task import Task -from direct.showbase import DirectObject import random +from direct.showbase import DirectObject +from direct.task import Task + +from otp.ai.AIBase import * + + class Barrier(DirectObject.DirectObject): notify = directNotify.newCategory('Barrier') diff --git a/otp/ai/GarbageLeakServerEventAggregator.py b/otp/ai/GarbageLeakServerEventAggregator.py index 5a92d74..3b01b71 100644 --- a/otp/ai/GarbageLeakServerEventAggregator.py +++ b/otp/ai/GarbageLeakServerEventAggregator.py @@ -1,5 +1,6 @@ -from direct.showbase.DirectObject import DirectObject from direct.showbase import GarbageReport +from direct.showbase.DirectObject import DirectObject + class GarbageLeakServerEventAggregator(DirectObject): diff --git a/otp/ai/TimeManager.py b/otp/ai/TimeManager.py index dd90517..37d8e15 100644 --- a/otp/ai/TimeManager.py +++ b/otp/ai/TimeManager.py @@ -1,18 +1,21 @@ -from panda3d.core import * -from direct.showbase.DirectObject import * -from direct.distributed.ClockDelta import * -from direct.task import Task -from direct.distributed import DistributedObject -from direct.directnotify import DirectNotifyGlobal -from otp.otpbase import OTPGlobals -from direct.showbase import PythonUtil -from otp.otpbase.PythonUtil import describeException -from direct.showbase import GarbageReport import base64 -import time import os -import sys import re +import sys +import time + +from panda3d.core import * + +from direct.directnotify import DirectNotifyGlobal +from direct.distributed import DistributedObject +from direct.distributed.ClockDelta import * +from direct.showbase import GarbageReport, PythonUtil +from direct.showbase.DirectObject import * +from direct.task import Task + +from otp.otpbase import OTPGlobals +from otp.otpbase.PythonUtil import describeException + class TimeManager(DistributedObject.DistributedObject): notify = DirectNotifyGlobal.directNotify.newCategory('TimeManager') diff --git a/otp/avatar/Avatar.py b/otp/avatar/Avatar.py index f80e89b..02927dc 100644 --- a/otp/avatar/Avatar.py +++ b/otp/avatar/Avatar.py @@ -1,15 +1,17 @@ +import random + 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 -from otp.otpbase import OTPLocalizer +from panda3d.otp import (CFNoQuitButton, CFPageButton, CFQuitButton, CFSpeech, CFThought, CFTimeout, Nametag, + NametagGroup) + from direct.actor.Actor import Actor from direct.directnotify import DirectNotifyGlobal from direct.distributed import ClockDelta + from otp.avatar.ShadowCaster import ShadowCaster -import random -from otp.otpbase import OTPRender +from otp.otpbase import OTPGlobals, OTPLocalizer, OTPRender from otp.otpbase.PythonUtil import recordCreationStack + teleportNotify = DirectNotifyGlobal.directNotify.newCategory('Teleport') teleportNotify.showTime = True if ConfigVariableBool('want-teleport-debug', 1).value: diff --git a/otp/avatar/AvatarDNA.py b/otp/avatar/AvatarDNA.py index 20e6f61..7562812 100644 --- a/otp/avatar/AvatarDNA.py +++ b/otp/avatar/AvatarDNA.py @@ -1,8 +1,11 @@ -from panda3d.core import * -from direct.directnotify.DirectNotifyGlobal import * import random + +from panda3d.core import * + +from direct.directnotify.DirectNotifyGlobal import * from direct.distributed.PyDatagram import PyDatagram from direct.distributed.PyDatagramIterator import PyDatagramIterator + notify = directNotify.newCategory('AvatarDNA') class AvatarDNA: diff --git a/otp/avatar/AvatarDetail.py b/otp/avatar/AvatarDetail.py index 662fe6f..c1dc4f0 100644 --- a/otp/avatar/AvatarDetail.py +++ b/otp/avatar/AvatarDetail.py @@ -1,6 +1,8 @@ from direct.directnotify.DirectNotifyGlobal import directNotify + from otp.avatar import Avatar + class AvatarDetail: notify = directNotify.newCategory('AvatarDetail') diff --git a/otp/avatar/AvatarPanel.py b/otp/avatar/AvatarPanel.py index 5ac2272..5c337c7 100644 --- a/otp/avatar/AvatarPanel.py +++ b/otp/avatar/AvatarPanel.py @@ -1,8 +1,11 @@ from panda3d.core import * + +from direct.distributed import DistributedObject from direct.gui.DirectGui import * from direct.showbase import DirectObject + from . import Avatar -from direct.distributed import DistributedObject + class AvatarPanel(DirectObject.DirectObject): currentAvatarPanel = None diff --git a/otp/avatar/DistributedAvatar.py b/otp/avatar/DistributedAvatar.py index 3e4ce1b..523952f 100644 --- a/otp/avatar/DistributedAvatar.py +++ b/otp/avatar/DistributedAvatar.py @@ -1,20 +1,23 @@ -import time -import string -from panda3d.core import * -from direct.distributed import DistributedNode -from direct.actor.DistributedActor import DistributedActor -from direct.interval.IntervalGlobal import * -from direct.task import Task -from direct.showbase import PythonUtil -from panda3d.otp import Nametag -from otp.otpbase import OTPGlobals -from otp.otpbase import OTPLocalizer -from otp.speedchat import SCDecoders -from otp.chat import ChatGarbler -from otp.chat import ChatManager import random -from .Avatar import Avatar +import string +import time + +from panda3d.core import * +from panda3d.otp import Nametag + +from direct.actor.DistributedActor import DistributedActor +from direct.distributed import DistributedNode +from direct.interval.IntervalGlobal import * +from direct.showbase import PythonUtil +from direct.task import Task + +from otp.chat import ChatGarbler, ChatManager +from otp.otpbase import OTPGlobals, OTPLocalizer +from otp.speedchat import SCDecoders + from . import AvatarDNA +from .Avatar import Avatar + class DistributedAvatar(DistributedActor, Avatar): HpTextGenerator = TextNode('HpTextGenerator') diff --git a/otp/avatar/DistributedAvatarAI.py b/otp/avatar/DistributedAvatarAI.py index 6e5bb17..da03c97 100644 --- a/otp/avatar/DistributedAvatarAI.py +++ b/otp/avatar/DistributedAvatarAI.py @@ -1,9 +1,10 @@ +from direct.distributed import DistributedNodeAI +from direct.fsm import ClassicFSM, State +from direct.task import Task + from otp.ai.AIBaseGlobal import * from otp.otpbase import OTPGlobals -from direct.fsm import ClassicFSM -from direct.fsm import State -from direct.distributed import DistributedNodeAI -from direct.task import Task + class DistributedAvatarAI(DistributedNodeAI.DistributedNodeAI): diff --git a/otp/avatar/DistributedAvatarUD.py b/otp/avatar/DistributedAvatarUD.py index 0c8b347..cb4dd9b 100644 --- a/otp/avatar/DistributedAvatarUD.py +++ b/otp/avatar/DistributedAvatarUD.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectUD import DistributedObjectUD + class DistributedAvatarUD(DistributedObjectUD): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedAvatarUD') diff --git a/otp/avatar/DistributedPlayer.py b/otp/avatar/DistributedPlayer.py index b7f6a5c..3b598ea 100644 --- a/otp/avatar/DistributedPlayer.py +++ b/otp/avatar/DistributedPlayer.py @@ -1,18 +1,17 @@ from panda3d.core import * -from panda3d.otp import WhisperPopup -from panda3d.otp import CFQuicktalker, CFPageButton, CFQuitButton, CFSpeech, CFThought, CFTimeout -from otp.chat import ChatGarbler -from otp.otpbase import OTPLocalizer -from otp.speedchat import SCDecoders -from otp.avatar import DistributedAvatar -from otp.avatar import Avatar, PlayerBase -from otp.chat import TalkAssistant -from otp.otpbase import OTPGlobals +from panda3d.otp import CFPageButton, CFQuicktalker, CFQuitButton, CFSpeech, CFThought, CFTimeout, WhisperPopup + +from otp.avatar import Avatar, DistributedAvatar, PlayerBase from otp.avatar.Avatar import teleportNotify +from otp.chat import ChatGarbler, TalkAssistant from otp.distributed.TelemetryLimited import TelemetryLimited +from otp.otpbase import OTPGlobals, OTPLocalizer +from otp.speedchat import SCDecoders + if ConfigVariableBool('want-chatfilter-hacks', 0).value: - from otp.switchboard import badwordpy import os + + from otp.switchboard import badwordpy badwordpy.init(os.environ.get('OTP') + '\\src\\switchboard\\', '') class DistributedPlayer(DistributedAvatar.DistributedAvatar, PlayerBase.PlayerBase, TelemetryLimited): diff --git a/otp/avatar/DistributedPlayerAI.py b/otp/avatar/DistributedPlayerAI.py index 0bde086..2278ca0 100644 --- a/otp/avatar/DistributedPlayerAI.py +++ b/otp/avatar/DistributedPlayerAI.py @@ -1,10 +1,11 @@ from direct.showbase import GarbageReport + from otp.ai.AIBaseGlobal import * -from otp.avatar import DistributedAvatarAI -from otp.avatar import PlayerBase +from otp.avatar import DistributedAvatarAI, PlayerBase from otp.distributed.ClsendTracker import ClsendTracker from otp.otpbase import OTPGlobals + class DistributedPlayerAI(DistributedAvatarAI.DistributedAvatarAI, PlayerBase.PlayerBase, ClsendTracker): def __init__(self, air): diff --git a/otp/avatar/Emote.py b/otp/avatar/Emote.py index 6c36dca..5f7ba00 100644 --- a/otp/avatar/Emote.py +++ b/otp/avatar/Emote.py @@ -1,5 +1,6 @@ from otp.otpbase import OTPLocalizer + class Emote: EmoteClear = -1 EmoteEnableStateChanged = 'EmoteEnableStateChanged' diff --git a/otp/avatar/LocalAvatar.py b/otp/avatar/LocalAvatar.py index 8af6d4b..907d95a 100644 --- a/otp/avatar/LocalAvatar.py +++ b/otp/avatar/LocalAvatar.py @@ -1,23 +1,27 @@ -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 direct.controls import ControlManager -from . import DistributedAvatar -from direct.task import Task -from otp.otpbase import OTPGlobals import math import random -from direct.directnotify import DirectNotifyGlobal -from direct.distributed import DistributedSmoothNode -from otp.otpbase import OTPLocalizer + +from panda3d.core import * +from panda3d.otp import Nametag, WhisperPopup + +from direct.controls import ControlManager from direct.controls.GhostWalker import GhostWalker from direct.controls.GravityWalker import GravityWalker from direct.controls.ObserverWalker import ObserverWalker from direct.controls.SwimWalker import SwimWalker from direct.controls.TwoDWalker import TwoDWalker +from direct.directnotify import DirectNotifyGlobal +from direct.distributed import DistributedSmoothNode +from direct.gui.DirectGui import * +from direct.interval.IntervalGlobal import * +from direct.showbase.InputStateGlobal import inputState +from direct.showbase.PythonUtil import * +from direct.task import Task + +from otp.otpbase import OTPGlobals, OTPLocalizer + +from . import DistributedAvatar + class LocalAvatar(DistributedAvatar.DistributedAvatar, DistributedSmoothNode.DistributedSmoothNode): notify = DirectNotifyGlobal.directNotify.newCategory('LocalAvatar') diff --git a/otp/avatar/PositionExaminer.py b/otp/avatar/PositionExaminer.py index 5ab5ba3..d11ba5a 100644 --- a/otp/avatar/PositionExaminer.py +++ b/otp/avatar/PositionExaminer.py @@ -1,7 +1,10 @@ from panda3d.core import * + from direct.showbase.DirectObject import DirectObject + from otp.otpbase import OTPGlobals + class PositionExaminer(DirectObject, NodePath): def __init__(self): diff --git a/otp/avatar/ShadowCaster.py b/otp/avatar/ShadowCaster.py index be417ba..b69571e 100644 --- a/otp/avatar/ShadowCaster.py +++ b/otp/avatar/ShadowCaster.py @@ -1,8 +1,10 @@ from panda3d.core import * -from panda3d.core import * + from direct.directnotify import DirectNotifyGlobal from direct.showbase.ShadowPlacer import ShadowPlacer + from otp.otpbase import OTPGlobals + globalDropShadowFlag = 1 def setGlobalDropShadowFlag(flag): diff --git a/otp/avatar/SpeedMonitor.py b/otp/avatar/SpeedMonitor.py index 3167081..a67c31d 100644 --- a/otp/avatar/SpeedMonitor.py +++ b/otp/avatar/SpeedMonitor.py @@ -1,6 +1,7 @@ from direct.showbase.PythonUtil import SerialNumGen from direct.task import Task + class SpeedMonitor: notify = directNotify.newCategory('SpeedMonitor') SerialGen = SerialNumGen() diff --git a/otp/chat/ChatGarbler.py b/otp/chat/ChatGarbler.py index 1503131..db8ae93 100644 --- a/otp/chat/ChatGarbler.py +++ b/otp/chat/ChatGarbler.py @@ -1,7 +1,9 @@ -import string import random +import string + from otp.otpbase import OTPLocalizer + class ChatGarbler: def garble(self, avatar, message): diff --git a/otp/chat/ChatGlobals.py b/otp/chat/ChatGlobals.py index b7248b1..4fb9bdc 100644 --- a/otp/chat/ChatGlobals.py +++ b/otp/chat/ChatGlobals.py @@ -1,4 +1,5 @@ import string + NORMAL_CHAT = 1 WHISPER_CHAT = 2 GUILD_CHAT = 3 diff --git a/otp/chat/ChatInputNormal.py b/otp/chat/ChatInputNormal.py index c6248bb..0a24933 100644 --- a/otp/chat/ChatInputNormal.py +++ b/otp/chat/ChatInputNormal.py @@ -1,9 +1,12 @@ -from direct.showbase import DirectObject -from otp.otpbase import OTPGlobals import sys -from direct.gui.DirectGui import * + from panda3d.core import * -from otp.otpbase import OTPLocalizer + +from direct.gui.DirectGui import * +from direct.showbase import DirectObject + +from otp.otpbase import OTPGlobals, OTPLocalizer + class ChatInputNormal(DirectObject.DirectObject): ExecNamespace = None diff --git a/otp/chat/ChatInputTyped.py b/otp/chat/ChatInputTyped.py index 03027de..4437d9e 100644 --- a/otp/chat/ChatInputTyped.py +++ b/otp/chat/ChatInputTyped.py @@ -1,9 +1,12 @@ -from direct.showbase import DirectObject -from otp.otpbase import OTPGlobals import sys -from direct.gui.DirectGui import * + from panda3d.core import * -from otp.otpbase import OTPLocalizer + +from direct.gui.DirectGui import * +from direct.showbase import DirectObject + +from otp.otpbase import OTPGlobals, OTPLocalizer + class ChatInputTyped(DirectObject.DirectObject): ExecNamespace = None diff --git a/otp/chat/ChatInputWhiteListFrame.py b/otp/chat/ChatInputWhiteListFrame.py index a40c91b..7ed94fa 100644 --- a/otp/chat/ChatInputWhiteListFrame.py +++ b/otp/chat/ChatInputWhiteListFrame.py @@ -1,13 +1,16 @@ -from direct.fsm import FSM -from otp.otpbase import OTPGlobals 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.directnotify import DirectNotifyGlobal +from direct.fsm import FSM +from direct.gui.DirectGui import * from direct.task import Task + from otp.chat.ChatInputTyped import ChatInputTyped +from otp.otpbase import OTPGlobals, OTPLocalizer + class ChatInputWhiteListFrame(FSM.FSM, DirectFrame): notify = DirectNotifyGlobal.directNotify.newCategory('ChatInputWhiteList') diff --git a/otp/chat/ChatManager.py b/otp/chat/ChatManager.py index bd57595..61e3f1e 100644 --- a/otp/chat/ChatManager.py +++ b/otp/chat/ChatManager.py @@ -1,14 +1,15 @@ import string -from direct.showbase import DirectObject -from direct.fsm import ClassicFSM -from direct.fsm import State -from otp.login import SecretFriendsInfoPanel -from otp.login import PrivacyPolicyPanel -from otp.otpbase import OTPLocalizer -from direct.directnotify import DirectNotifyGlobal -from otp.login import LeaveToPayDialog -from direct.gui.DirectGui import * + from panda3d.core import * + +from direct.directnotify import DirectNotifyGlobal +from direct.fsm import ClassicFSM, State +from direct.gui.DirectGui import * +from direct.showbase import DirectObject + +from otp.login import LeaveToPayDialog, PrivacyPolicyPanel, SecretFriendsInfoPanel +from otp.otpbase import OTPLocalizer + ChatEvent = 'ChatEvent' NormalChatEvent = 'NormalChatEvent' SCChatEvent = 'SCChatEvent' diff --git a/otp/chat/TalkAssistant.py b/otp/chat/TalkAssistant.py index 66464d9..327c1ef 100644 --- a/otp/chat/TalkAssistant.py +++ b/otp/chat/TalkAssistant.py @@ -1,16 +1,19 @@ import sys -from direct.showbase import DirectObject -from otp.otpbase import OTPLocalizer -from direct.directnotify import DirectNotifyGlobal -from otp.otpbase import OTPGlobals -from otp.speedchat import SCDecoders -from panda3d.core import * -from otp.chat.TalkMessage import TalkMessage -from otp.chat.TalkHandle import TalkHandle import time -from otp.chat.TalkGlobals import * + +from panda3d.core import * +from panda3d.otp import CFSpeech, CFThought, CFTimeout + +from direct.directnotify import DirectNotifyGlobal +from direct.showbase import DirectObject + from otp.chat.ChatGlobals import * -from panda3d.otp import CFSpeech, CFTimeout, CFThought +from otp.chat.TalkGlobals import * +from otp.chat.TalkHandle import TalkHandle +from otp.chat.TalkMessage import TalkMessage +from otp.otpbase import OTPGlobals, OTPLocalizer +from otp.speedchat import SCDecoders + ThoughtPrefix = '.' class TalkAssistant(DirectObject.DirectObject): diff --git a/otp/chat/TalkHandle.py b/otp/chat/TalkHandle.py index 527cd67..21203c9 100644 --- a/otp/chat/TalkHandle.py +++ b/otp/chat/TalkHandle.py @@ -1,5 +1,6 @@ from otp.avatar.AvatarHandle import AvatarHandle + class TalkHandle(AvatarHandle): def __init__(self, doId, message): diff --git a/otp/chat/WhiteList.py b/otp/chat/WhiteList.py index 4c2ab94..05d507a 100644 --- a/otp/chat/WhiteList.py +++ b/otp/chat/WhiteList.py @@ -1,5 +1,6 @@ from bisect import bisect_left + class WhiteList: def __init__(self, wordlist): diff --git a/otp/distributed/Account.py b/otp/distributed/Account.py index 6f0648b..8736148 100644 --- a/otp/distributed/Account.py +++ b/otp/distributed/Account.py @@ -1,5 +1,6 @@ from direct.distributed import DistributedObject + class Account(DistributedObject.DistributedObject): def __init__(self, cr): diff --git a/otp/distributed/CentralLogger.py b/otp/distributed/CentralLogger.py index 651ecf3..082b461 100644 --- a/otp/distributed/CentralLogger.py +++ b/otp/distributed/CentralLogger.py @@ -1,4 +1,5 @@ from direct.distributed.DistributedObjectGlobal import DistributedObjectGlobal + REPORT_PLAYER = 'REPORT_PLAYER' ReportFoulLanguage = 'MODERATION_FOUL_LANGUAGE' ReportPersonalInfo = 'MODERATION_PERSONAL_INFO' diff --git a/otp/distributed/ClsendTracker.py b/otp/distributed/ClsendTracker.py index b6345d8..97c38f5 100644 --- a/otp/distributed/ClsendTracker.py +++ b/otp/distributed/ClsendTracker.py @@ -1,7 +1,10 @@ -from panda3d.core import StringStream -from direct.distributed.PyDatagram import PyDatagram import random +from panda3d.core import StringStream + +from direct.distributed.PyDatagram import PyDatagram + + class ClsendTracker: clsendNotify = directNotify.newCategory('clsend') NumTrackersLoggingOverflow = 0 diff --git a/otp/distributed/DistributedDirectory.py b/otp/distributed/DistributedDirectory.py index 4863db7..a1d1bcc 100644 --- a/otp/distributed/DistributedDirectory.py +++ b/otp/distributed/DistributedDirectory.py @@ -1,4 +1,5 @@ from direct.distributed.DistributedObject import DistributedObject + class DistributedDirectory(DistributedObject): pass diff --git a/otp/distributed/DistributedDistrict.py b/otp/distributed/DistributedDistrict.py index 560ae39..501f5e6 100644 --- a/otp/distributed/DistributedDistrict.py +++ b/otp/distributed/DistributedDistrict.py @@ -1,6 +1,7 @@ from direct.directnotify.DirectNotifyGlobal import directNotify from direct.distributed.DistributedObject import DistributedObject + class DistributedDistrict(DistributedObject): notify = directNotify.newCategory('DistributedDistrict') neverDisable = 1 diff --git a/otp/distributed/DistributedTestObject.py b/otp/distributed/DistributedTestObject.py index 0adf004..e200c3a 100644 --- a/otp/distributed/DistributedTestObject.py +++ b/otp/distributed/DistributedTestObject.py @@ -1,5 +1,6 @@ from direct.distributed import DistributedObject + class DistributedTestObject(DistributedObject.DistributedObject): def setRequiredField(self, r): diff --git a/otp/distributed/GameServerTestSuite.py b/otp/distributed/GameServerTestSuite.py index b555155..404b903 100644 --- a/otp/distributed/GameServerTestSuite.py +++ b/otp/distributed/GameServerTestSuite.py @@ -1,6 +1,7 @@ from direct.directnotify.DirectNotifyGlobal import directNotify from direct.showbase import DirectObject, TaskThreaded + class GameServerTestSuite(DirectObject.DirectObject, TaskThreaded.TaskThreaded): notify = directNotify.newCategory('GarbageReport') diff --git a/otp/distributed/OTPClientRepository.py b/otp/distributed/OTPClientRepository.py index f169ed1..341001f 100644 --- a/otp/distributed/OTPClientRepository.py +++ b/otp/distributed/OTPClientRepository.py @@ -1,45 +1,41 @@ -import sys -import time -import random import gc import os +import random +import sys +import time +from enum import IntEnum + from panda3d.core import * -from direct.gui.DirectGui import * -from otp.distributed.OtpDoGlobals import * -from direct.interval.IntervalGlobal import ivalMgr + from direct.directnotify.DirectNotifyGlobal import directNotify +from direct.distributed import DistributedSmoothNode from direct.distributed.ClientRepositoryBase import ClientRepositoryBase +from direct.distributed.PyDatagram import PyDatagram 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 +from direct.gui.DirectGui import * +from direct.interval.IntervalGlobal import ivalMgr +from direct.showbase import GarbageReport, LeakDetectors, MessengerLeakDetector, PythonUtil 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 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.otpbase import OTPLocalizer -from otp.login import LoginGSAccount -from otp.login import LoginGoAccount -from otp.login.LoginWebPlayTokenAccount import LoginWebPlayTokenAccount -from otp.login.LoginDISLTokenAccount import LoginDISLTokenAccount -from otp.login import LoginTTAccount -from otp.login import LoginAstronAccount -from otp.login import HTTPUtil -from otp.otpbase import OTPGlobals -from otp.otpbase import OTPLauncherGlobals -from otp.uberdog import OtpAvatarManager -from otp.distributed import OtpDoGlobals -from otp.distributed.TelemetryLimiter import TelemetryLimiter +from direct.task import Task + from otp.ai.GarbageLeakServerEventAggregator import GarbageLeakServerEventAggregator +from otp.avatar.DistributedPlayer import DistributedPlayer +from otp.distributed import OtpDoGlobals +from otp.distributed.OtpDoGlobals import * +from otp.distributed.TelemetryLimiter import TelemetryLimiter +from otp.login import (HTTPUtil, LoginAstronAccount, LoginGoAccount, LoginGSAccount, LoginScreen, LoginTTAccount, + LoginTTSpecificDevAccount) +from otp.login.CreateAccountScreen import CreateAccountScreen +from otp.login.LoginDISLTokenAccount import LoginDISLTokenAccount +from otp.login.LoginWebPlayTokenAccount import LoginWebPlayTokenAccount +from otp.otpbase import OTPGlobals, OTPLauncherGlobals, OTPLocalizer +from otp.otpgui import OTPDialog +from otp.uberdog import OtpAvatarManager + from .PotentialAvatar import PotentialAvatar -from enum import IntEnum + class OTPClientRepository(ClientRepositoryBase): notify = directNotify.newCategory('OTPClientRepository') diff --git a/otp/distributed/OTPInternalRepository.py b/otp/distributed/OTPInternalRepository.py index 4341a48..873e165 100644 --- a/otp/distributed/OTPInternalRepository.py +++ b/otp/distributed/OTPInternalRepository.py @@ -1,10 +1,9 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.AstronInternalRepository import AstronInternalRepository -from direct.distributed.PyDatagram import * from direct.distributed.MsgTypes import * +from direct.distributed.PyDatagram import * from direct.showbase.PythonUtil import makeList - # TODO: Remove Astron dependence. class OTPInternalRepository(AstronInternalRepository): @@ -43,7 +42,7 @@ class OTPInternalRepository(AstronInternalRepository): dg.addUint16(fieldId) self.send(dg) - + def _getMsgName(self, msgId): # TODO: Remove Astron dependence. return makeList(MsgId2Names.get(msgId, f'UNKNOWN MESSAGE: {msgId}'))[0] diff --git a/otp/distributed/ObjectServer.py b/otp/distributed/ObjectServer.py index 18c8087..d7b52a7 100644 --- a/otp/distributed/ObjectServer.py +++ b/otp/distributed/ObjectServer.py @@ -1,6 +1,7 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed import DistributedObject + class ObjectServer(DistributedObject.DistributedObject): notify = DirectNotifyGlobal.directNotify.newCategory('ObjectServer') diff --git a/otp/distributed/OtpDoGlobals.py b/otp/distributed/OtpDoGlobals.py index c456edf..34198a2 100644 --- a/otp/distributed/OtpDoGlobals.py +++ b/otp/distributed/OtpDoGlobals.py @@ -1,4 +1,5 @@ from direct.distributed.MsgTypes import * + OTP_DO_ID_SERVER_ROOT = 4007 OTP_DO_ID_FRIEND_MANAGER = 4501 OTP_DO_ID_LEADERBOARD_MANAGER = 4502 diff --git a/otp/distributed/TelemetryLimiter.py b/otp/distributed/TelemetryLimiter.py index 6a104bc..d168b76 100644 --- a/otp/distributed/TelemetryLimiter.py +++ b/otp/distributed/TelemetryLimiter.py @@ -1,7 +1,9 @@ from direct.showbase.DirectObject import DirectObject -from otp.avatar.DistributedPlayer import DistributedPlayer from direct.task.Task import Task +from otp.avatar.DistributedPlayer import DistributedPlayer + + class TelemetryLimiter(DirectObject): TaskName = 'TelemetryLimiterEnforce' LeakDetectEventName = 'telemetryLimiter' diff --git a/otp/friends/AvatarFriendInfo.py b/otp/friends/AvatarFriendInfo.py index e52e2fd..b5a1fbc 100644 --- a/otp/friends/AvatarFriendInfo.py +++ b/otp/friends/AvatarFriendInfo.py @@ -1,5 +1,6 @@ from otp.avatar.AvatarHandle import AvatarHandle + class AvatarFriendInfo(AvatarHandle): def __init__(self, avatarName = '', playerName = '', playerId = 0, onlineYesNo = 0, openChatEnabledYesNo = 0, openChatFriendshipYesNo = 0, wlChatEnabledYesNo = 0): diff --git a/otp/friends/AvatarFriendsManager.py b/otp/friends/AvatarFriendsManager.py index 4d8f7a1..27e7b17 100644 --- a/otp/friends/AvatarFriendsManager.py +++ b/otp/friends/AvatarFriendsManager.py @@ -1,8 +1,9 @@ -from direct.distributed.DistributedObjectGlobal import DistributedObjectGlobal from direct.directnotify.DirectNotifyGlobal import directNotify +from direct.distributed.DistributedObjectGlobal import DistributedObjectGlobal + +from otp.otpbase import OTPGlobals, OTPLocalizer from otp.uberdog.RejectCode import RejectCode -from otp.otpbase import OTPGlobals -from otp.otpbase import OTPLocalizer + class AvatarFriendsManager(DistributedObjectGlobal): notify = directNotify.newCategory('AvatarFriendsManager') diff --git a/otp/friends/AvatarFriendsManagerUD.py b/otp/friends/AvatarFriendsManagerUD.py index f8352ee..f1801a8 100644 --- a/otp/friends/AvatarFriendsManagerUD.py +++ b/otp/friends/AvatarFriendsManagerUD.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectUD import DistributedObjectUD + class AvatarFriendsManagerUD(DistributedObjectUD): notify = DirectNotifyGlobal.directNotify.newCategory('AvatarFriendsManagerUD') diff --git a/otp/friends/FriendInfo.py b/otp/friends/FriendInfo.py index 5d60562..2c784de 100644 --- a/otp/friends/FriendInfo.py +++ b/otp/friends/FriendInfo.py @@ -1,5 +1,6 @@ from otp.avatar.AvatarHandle import AvatarHandle + class FriendInfo(AvatarHandle): def __init__(self, avatarName = '', playerName = '', onlineYesNo = 0, openChatEnabledYesNo = 0, openChatFriendshipYesNo = 0, wlChatEnabledYesNo = 0, location = '', sublocation = '', timestamp = 0, avatarId = 0, friendPrivs = 0, tokenPrivs = 0): diff --git a/otp/friends/FriendManager.py b/otp/friends/FriendManager.py index 0cfa256..c97ecd3 100644 --- a/otp/friends/FriendManager.py +++ b/otp/friends/FriendManager.py @@ -1,8 +1,11 @@ from panda3d.core import * -from direct.distributed import DistributedObject + from direct.directnotify import DirectNotifyGlobal +from direct.distributed import DistributedObject + from otp.otpbase import OTPGlobals + class FriendManager(DistributedObject.DistributedObject): notify = DirectNotifyGlobal.directNotify.newCategory('FriendManager') neverDisable = 1 diff --git a/otp/friends/FriendManagerAI.py b/otp/friends/FriendManagerAI.py index 616cfbc..96088d2 100644 --- a/otp/friends/FriendManagerAI.py +++ b/otp/friends/FriendManagerAI.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectAI import DistributedObjectAI + class FriendManagerAI(DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('FriendManagerAI') diff --git a/otp/friends/FriendSecret.py b/otp/friends/FriendSecret.py index 0b01bd2..659e4f4 100644 --- a/otp/friends/FriendSecret.py +++ b/otp/friends/FriendSecret.py @@ -1,11 +1,13 @@ from panda3d.core import * from panda3d.otp import * -from direct.gui.DirectGui import * + from direct.directnotify import DirectNotifyGlobal from direct.fsm import StateData -from otp.otpbase import OTPLocalizer -from otp.otpbase import OTPGlobals +from direct.gui.DirectGui import * + +from otp.otpbase import OTPGlobals, OTPLocalizer from otp.uberdog import RejectCode + globalFriendSecret = None AccountSecret = 0 AvatarSecret = 1 diff --git a/otp/friends/GuildManager.py b/otp/friends/GuildManager.py index b3a98ac..f4d00de 100644 --- a/otp/friends/GuildManager.py +++ b/otp/friends/GuildManager.py @@ -1,16 +1,18 @@ -from direct.distributed.DistributedObjectGlobal import DistributedObjectGlobal from direct.directnotify.DirectNotifyGlobal import directNotify -from otp.distributed import OtpDoGlobals -from otp.otpbase import OTPLocalizer -from otp.otpbase import OTPGlobals -from otp.avatar.AvatarHandle import AvatarHandle +from direct.distributed.DistributedObjectGlobal import DistributedObjectGlobal + from otp.ai import AIInterestHandles +from otp.avatar.AvatarHandle import AvatarHandle +from otp.distributed import OtpDoGlobals +from otp.otpbase import OTPGlobals, OTPLocalizer + GUILDRANK_VETERAN = 4 GUILDRANK_GM = 3 GUILDRANK_OFFICER = 2 GUILDRANK_MEMBER = 1 import queue + class GuildMemberInfo(AvatarHandle): def __init__(self, name, isOnline, rank, bandId): diff --git a/otp/friends/GuildManagerAI.py b/otp/friends/GuildManagerAI.py index fff20ef..21393cc 100644 --- a/otp/friends/GuildManagerAI.py +++ b/otp/friends/GuildManagerAI.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectAI import DistributedObjectAI + class GuildManagerAI(DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('GuildManagerAI') diff --git a/otp/friends/GuildManagerUD.py b/otp/friends/GuildManagerUD.py index 3be98c4..ab8ff04 100644 --- a/otp/friends/GuildManagerUD.py +++ b/otp/friends/GuildManagerUD.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectUD import DistributedObjectUD + class GuildManagerUD(DistributedObjectUD): notify = DirectNotifyGlobal.directNotify.newCategory('GuildManagerUD') diff --git a/otp/friends/PlayerFriendsManager.py b/otp/friends/PlayerFriendsManager.py index e766404..de8c03f 100644 --- a/otp/friends/PlayerFriendsManager.py +++ b/otp/friends/PlayerFriendsManager.py @@ -1,8 +1,10 @@ -from direct.distributed.DistributedObjectGlobal import DistributedObjectGlobal from direct.directnotify.DirectNotifyGlobal import directNotify -from otp.otpbase import OTPGlobals +from direct.distributed.DistributedObjectGlobal import DistributedObjectGlobal + from otp.avatar.Avatar import teleportNotify from otp.friends import FriendResponseCodes +from otp.otpbase import OTPGlobals + class PlayerFriendsManager(DistributedObjectGlobal): notify = directNotify.newCategory('PlayerFriendsManager') diff --git a/otp/friends/PlayerFriendsManagerUD.py b/otp/friends/PlayerFriendsManagerUD.py index a590d8a..a0708ab 100644 --- a/otp/friends/PlayerFriendsManagerUD.py +++ b/otp/friends/PlayerFriendsManagerUD.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectUD import DistributedObjectUD + class PlayerFriendsManagerUD(DistributedObjectUD): notify = DirectNotifyGlobal.directNotify.newCategory('PlayerFriendsManagerUD') diff --git a/otp/launcher/DownloadWatcher.py b/otp/launcher/DownloadWatcher.py index f751c47..b51817a 100644 --- a/otp/launcher/DownloadWatcher.py +++ b/otp/launcher/DownloadWatcher.py @@ -1,8 +1,11 @@ -from direct.task import Task -from otp.otpbase import OTPLocalizer -from direct.gui.DirectGui import * from panda3d.core import * + +from direct.gui.DirectGui import * from direct.showbase.DirectObject import DirectObject +from direct.task import Task + +from otp.otpbase import OTPLocalizer + class DownloadWatcher(DirectObject): diff --git a/otp/launcher/DummyLauncherBase.py b/otp/launcher/DummyLauncherBase.py index 0b5047c..151adbb 100644 --- a/otp/launcher/DummyLauncherBase.py +++ b/otp/launcher/DummyLauncherBase.py @@ -1,7 +1,9 @@ from panda3d.core import * + from direct.showbase.MessengerGlobal import * -from direct.task.TaskManagerGlobal import * from direct.task.Task import Task +from direct.task.TaskManagerGlobal import * + class DummyLauncherBase: diff --git a/otp/launcher/LauncherBase.py b/otp/launcher/LauncherBase.py index b10bc7c..1d30550 100644 --- a/otp/launcher/LauncherBase.py +++ b/otp/launcher/LauncherBase.py @@ -1,12 +1,15 @@ -import sys -import os -import time import builtins +import os +import sys +import time + from panda3d.core import * + +from direct.directnotify.DirectNotifyGlobal import * from direct.showbase import DConfig from direct.showbase.DirectObject import DirectObject from direct.task.MiniTask import MiniTaskManager -from direct.directnotify.DirectNotifyGlobal import * + class LogAndOutput: diff --git a/otp/level/AmbientSound.py b/otp/level/AmbientSound.py index 019bcfc..fa3f86a 100644 --- a/otp/level/AmbientSound.py +++ b/otp/level/AmbientSound.py @@ -1,7 +1,10 @@ -from direct.interval.IntervalGlobal import * -from . import BasicEntities import random +from direct.interval.IntervalGlobal import * + +from . import BasicEntities + + class AmbientSound(BasicEntities.NodePathEntity): def __init__(self, level, entId): diff --git a/otp/level/BasicEntities.py b/otp/level/BasicEntities.py index 4497692..c92de08 100644 --- a/otp/level/BasicEntities.py +++ b/otp/level/BasicEntities.py @@ -1,7 +1,8 @@ -from . import Entity -from . import DistributedEntity from panda3d.core import NodePath +from . import DistributedEntity, Entity + + class NodePathEntityBase: def initNodePathAttribs(self, doReparent = 1): diff --git a/otp/level/CollisionSolidEntity.py b/otp/level/CollisionSolidEntity.py index 63537e7..67fd918 100644 --- a/otp/level/CollisionSolidEntity.py +++ b/otp/level/CollisionSolidEntity.py @@ -1,8 +1,12 @@ from panda3d.core import * -from otp.otpbase import OTPGlobals + from direct.directnotify import DirectNotifyGlobal + +from otp.otpbase import OTPGlobals + from . import BasicEntities + class CollisionSolidEntity(BasicEntities.NodePathEntity): notify = DirectNotifyGlobal.directNotify.newCategory('CollisionSolidEntity') diff --git a/otp/level/CutScene.py b/otp/level/CutScene.py index 0bf759f..f0e0c7a 100644 --- a/otp/level/CutScene.py +++ b/otp/level/CutScene.py @@ -1,13 +1,15 @@ -from direct.showbase import DirectObject +from panda3d.core import * + from direct.directnotify import DirectNotifyGlobal -from . import BasicEntities -from panda3d.core import * -from panda3d.core import * -from direct.interval.IntervalGlobal import * from direct.distributed.ClockDelta import * -from toontown.toonbase import ToontownGlobals -from direct.directnotify import DirectNotifyGlobal from direct.fsm import ClassicFSM +from direct.interval.IntervalGlobal import * +from direct.showbase import DirectObject + +from toontown.toonbase import ToontownGlobals + +from . import BasicEntities + def nothing(self, track, subjectNodePath, duration): return track diff --git a/otp/level/DistributedEntity.py b/otp/level/DistributedEntity.py index f2d746b..49d6d2e 100644 --- a/otp/level/DistributedEntity.py +++ b/otp/level/DistributedEntity.py @@ -1,6 +1,8 @@ -from direct.distributed import DistributedObject -from . import Entity from direct.directnotify import DirectNotifyGlobal +from direct.distributed import DistributedObject + +from . import Entity + class DistributedEntity(DistributedObject.DistributedObject, Entity.Entity): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedEntity') diff --git a/otp/level/DistributedEntityAI.py b/otp/level/DistributedEntityAI.py index f7f0353..763cd49 100644 --- a/otp/level/DistributedEntityAI.py +++ b/otp/level/DistributedEntityAI.py @@ -1,6 +1,8 @@ -from direct.distributed import DistributedObjectAI -from . import Entity from direct.directnotify import DirectNotifyGlobal +from direct.distributed import DistributedObjectAI + +from . import Entity + class DistributedEntityAI(DistributedObjectAI.DistributedObjectAI, Entity.Entity): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedEntityAI') diff --git a/otp/level/DistributedInteractiveEntity.py b/otp/level/DistributedInteractiveEntity.py index 774e211..6629505 100644 --- a/otp/level/DistributedInteractiveEntity.py +++ b/otp/level/DistributedInteractiveEntity.py @@ -1,9 +1,12 @@ from panda3d.core import * -from direct.distributed.ClockDelta import * + from direct.directnotify import DirectNotifyGlobal +from direct.distributed.ClockDelta import * from direct.fsm import ClassicFSM + from . import DistributedEntity + class DistributedInteractiveEntity(DistributedEntity.DistributedEntity): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedInteractiveEntity') diff --git a/otp/level/DistributedInteractiveEntityAI.py b/otp/level/DistributedInteractiveEntityAI.py index 79ad592..9a9d223 100644 --- a/otp/level/DistributedInteractiveEntityAI.py +++ b/otp/level/DistributedInteractiveEntityAI.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectAI import DistributedObjectAI + class DistributedInteractiveEntityAI(DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedInteractiveEntityAI') diff --git a/otp/level/DistributedLevel.py b/otp/level/DistributedLevel.py index 9adf7b7..a2c6fdb 100644 --- a/otp/level/DistributedLevel.py +++ b/otp/level/DistributedLevel.py @@ -1,19 +1,22 @@ -from direct.distributed.ClockDelta import * +import random + from panda3d.core import * -from direct.showbase.PythonUtil import Functor, sameElements, list2dict, uniqueElements + +from direct.directnotify import DirectNotifyGlobal +from direct.distributed import DistributedObject +from direct.distributed.ClockDelta import * +from direct.gui import OnscreenText from direct.interval.IntervalGlobal import * +from direct.showbase.PythonUtil import Functor, list2dict, sameElements, uniqueElements +from direct.task import Task + +from otp.otpbase import OTPGlobals + from toontown.distributed.ToontownMsgTypes import * from toontown.toonbase import ToontownGlobals -from otp.otpbase import OTPGlobals -from direct.distributed import DistributedObject -from . import Level -from . import LevelConstants -from direct.directnotify import DirectNotifyGlobal -from . import EntityCreator -from direct.gui import OnscreenText -from direct.task import Task -from . import LevelUtil -import random + +from . import EntityCreator, Level, LevelConstants, LevelUtil + class DistributedLevel(DistributedObject.DistributedObject, Level.Level): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedLevel') diff --git a/otp/level/DistributedLevelAI.py b/otp/level/DistributedLevelAI.py index a0f66e3..7b7d2f8 100644 --- a/otp/level/DistributedLevelAI.py +++ b/otp/level/DistributedLevelAI.py @@ -1,12 +1,15 @@ from panda3d.core import * -from otp.ai.AIBaseGlobal import * -from direct.distributed.ClockDelta import * -from direct.distributed import DistributedObjectAI -from . import Level + from direct.directnotify import DirectNotifyGlobal -from . import EntityCreatorAI +from direct.distributed import DistributedObjectAI +from direct.distributed.ClockDelta import * from direct.showbase.PythonUtil import Functor, weightedChoice +from otp.ai.AIBaseGlobal import * + +from . import EntityCreatorAI, Level + + class DistributedLevelAI(DistributedObjectAI.DistributedObjectAI, Level.Level): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedLevelAI') diff --git a/otp/level/EditMgr.py b/otp/level/EditMgr.py index 11297a2..9224235 100644 --- a/otp/level/EditMgr.py +++ b/otp/level/EditMgr.py @@ -1,4 +1,5 @@ from . import EditMgrBase + class EditMgr(EditMgrBase.EditMgrBase): pass diff --git a/otp/level/EditMgrAI.py b/otp/level/EditMgrAI.py index cfaf83c..62c2a7c 100644 --- a/otp/level/EditMgrAI.py +++ b/otp/level/EditMgrAI.py @@ -1,6 +1,8 @@ from . import EditMgrBase + if __dev__: from direct.showbase.PythonUtil import list2dict + from . import EditorGlobals class EditMgrAI(EditMgrBase.EditMgrBase): diff --git a/otp/level/EditMgrBase.py b/otp/level/EditMgrBase.py index 81fcf7f..91a9bd2 100644 --- a/otp/level/EditMgrBase.py +++ b/otp/level/EditMgrBase.py @@ -1,6 +1,8 @@ -from . import Entity from direct.directnotify import DirectNotifyGlobal +from . import Entity + + class EditMgrBase(Entity.Entity): notify = DirectNotifyGlobal.directNotify.newCategory('EditMgr') diff --git a/otp/level/EditorGlobals.py b/otp/level/EditorGlobals.py index 7edb648..814385b 100644 --- a/otp/level/EditorGlobals.py +++ b/otp/level/EditorGlobals.py @@ -1,4 +1,5 @@ from direct.showbase.PythonUtil import uniqueElements + EditTargetPostName = 'inGameEditTarget' EntIdRange = 10000 username2entIdBase = {'darren': 1 * EntIdRange, diff --git a/otp/level/Entity.py b/otp/level/Entity.py index 985dd84..cba801c 100644 --- a/otp/level/Entity.py +++ b/otp/level/Entity.py @@ -1,6 +1,7 @@ +from direct.directnotify import DirectNotifyGlobal from direct.showbase.DirectObject import DirectObject from direct.showbase.PythonUtil import lineInfo -from direct.directnotify import DirectNotifyGlobal + class Entity(DirectObject): notify = DirectNotifyGlobal.directNotify.newCategory('Entity') diff --git a/otp/level/EntityCreator.py b/otp/level/EntityCreator.py index ec20345..85f3bb8 100644 --- a/otp/level/EntityCreator.py +++ b/otp/level/EntityCreator.py @@ -1,19 +1,8 @@ -from . import CutScene -from . import EntityCreatorBase -from . import BasicEntities from direct.directnotify import DirectNotifyGlobal -from . import EditMgr -from . import EntrancePoint -from . import LevelMgr -from . import LogicGate -from . import ZoneEntity -from . import ModelEntity -from . import PathEntity -from . import VisibilityExtender -from . import PropSpinner -from . import AmbientSound -from . import LocatorEntity -from . import CollisionSolidEntity + +from . import (AmbientSound, BasicEntities, CollisionSolidEntity, CutScene, EditMgr, EntityCreatorBase, EntrancePoint, + LevelMgr, LocatorEntity, LogicGate, ModelEntity, PathEntity, PropSpinner, VisibilityExtender, ZoneEntity) + def nothing(*args): return 'nothing' diff --git a/otp/level/EntityCreatorAI.py b/otp/level/EntityCreatorAI.py index d7e89cf..3c5c13f 100644 --- a/otp/level/EntityCreatorAI.py +++ b/otp/level/EntityCreatorAI.py @@ -1,10 +1,8 @@ -from . import EntityCreatorBase -from . import LogicGate -from . import EditMgrAI -from . import LevelMgrAI -from . import ZoneEntityAI from direct.showbase.PythonUtil import Functor +from . import EditMgrAI, EntityCreatorBase, LevelMgrAI, LogicGate, ZoneEntityAI + + def createDistributedEntity(AIclass, level, entId, zoneId): ent = AIclass(level, entId) ent.generateWithRequired(zoneId) diff --git a/otp/level/EntityCreatorBase.py b/otp/level/EntityCreatorBase.py index a3fc934..95be673 100644 --- a/otp/level/EntityCreatorBase.py +++ b/otp/level/EntityCreatorBase.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal + class EntityCreatorBase: notify = DirectNotifyGlobal.directNotify.newCategory('EntityCreator') diff --git a/otp/level/EntityStateVarSet.py b/otp/level/EntityStateVarSet.py index 8c471ae..ff8550f 100644 --- a/otp/level/EntityStateVarSet.py +++ b/otp/level/EntityStateVarSet.py @@ -1,7 +1,9 @@ from direct.fsm.StatePush import StateVar from direct.showbase.PythonUtil import getSetterName + from otp.level.Entity import Entity + class EntityStateVarSet(Entity): def __init__(self, entType): diff --git a/otp/level/EntityTypeDesc.py b/otp/level/EntityTypeDesc.py index c229690..0cea6b8 100644 --- a/otp/level/EntityTypeDesc.py +++ b/otp/level/EntityTypeDesc.py @@ -1,7 +1,9 @@ from direct.directnotify import DirectNotifyGlobal -from . import AttribDesc from direct.showbase.PythonUtil import mostDerivedLast +from . import AttribDesc + + class EntityTypeDesc: notify = DirectNotifyGlobal.directNotify.newCategory('EntityTypeDesc') output = None diff --git a/otp/level/EntityTypeRegistry.py b/otp/level/EntityTypeRegistry.py index 39df663..38571a5 100644 --- a/otp/level/EntityTypeRegistry.py +++ b/otp/level/EntityTypeRegistry.py @@ -1,12 +1,15 @@ -from panda3d.core import * -from direct.directnotify import DirectNotifyGlobal -import types -from . import AttribDesc -from . import EntityTypeDesc -from direct.showbase.PythonUtil import mostDerivedLast +import importlib import os import string -import importlib +import types + +from panda3d.core import * + +from direct.directnotify import DirectNotifyGlobal +from direct.showbase.PythonUtil import mostDerivedLast + +from . import AttribDesc, EntityTypeDesc + class EntityTypeRegistry: notify = DirectNotifyGlobal.directNotify.newCategory('EntityTypeRegistry') diff --git a/otp/level/EntityTypes.py b/otp/level/EntityTypes.py index 0ee03a7..38cc3aa 100644 --- a/otp/level/EntityTypes.py +++ b/otp/level/EntityTypes.py @@ -1,6 +1,8 @@ -from .EntityTypeDesc import EntityTypeDesc from toontown.coghq.SpecImports import * +from .EntityTypeDesc import EntityTypeDesc + + class Entity(EntityTypeDesc): abstract = 1 type = 'entity' diff --git a/otp/level/EntrancePoint.py b/otp/level/EntrancePoint.py index 3a5797f..f691c16 100644 --- a/otp/level/EntrancePoint.py +++ b/otp/level/EntrancePoint.py @@ -1,7 +1,10 @@ -from toontown.toonbase.ToontownGlobals import * from direct.directnotify import DirectNotifyGlobal + +from toontown.toonbase.ToontownGlobals import * + from . import BasicEntities + class EntrancePoint(BasicEntities.NodePathEntity): def __init__(self, level, entId): diff --git a/otp/level/Level.py b/otp/level/Level.py index ed57433..749131a 100644 --- a/otp/level/Level.py +++ b/otp/level/Level.py @@ -1,9 +1,12 @@ -from direct.directnotify import DirectNotifyGlobal import string -from . import LevelConstants -from direct.showbase.PythonUtil import lineInfo, uniqueElements import types +from direct.directnotify import DirectNotifyGlobal +from direct.showbase.PythonUtil import lineInfo, uniqueElements + +from . import LevelConstants + + class Level: notify = DirectNotifyGlobal.directNotify.newCategory('Level') diff --git a/otp/level/LevelMgr.py b/otp/level/LevelMgr.py index d3fbe25..7fa392c 100644 --- a/otp/level/LevelMgr.py +++ b/otp/level/LevelMgr.py @@ -1,6 +1,8 @@ from direct.showbase.PythonUtil import Functor + from . import LevelMgrBase + class LevelMgr(LevelMgrBase.LevelMgrBase): def __init__(self, level, entId): diff --git a/otp/level/LevelMgrAI.py b/otp/level/LevelMgrAI.py index e9d7edf..0d985b6 100644 --- a/otp/level/LevelMgrAI.py +++ b/otp/level/LevelMgrAI.py @@ -1,6 +1,8 @@ from direct.showbase.PythonUtil import Functor + from . import LevelMgrBase + class LevelMgrAI(LevelMgrBase.LevelMgrBase): def __init__(self, level, entId): diff --git a/otp/level/LevelMgrBase.py b/otp/level/LevelMgrBase.py index 430265d..cb2cab7 100644 --- a/otp/level/LevelMgrBase.py +++ b/otp/level/LevelMgrBase.py @@ -1,5 +1,6 @@ from . import Entity + class LevelMgrBase(Entity.Entity): def __init__(self, level, entId): diff --git a/otp/level/LevelSpec.py b/otp/level/LevelSpec.py index 2339edc..68a537d 100644 --- a/otp/level/LevelSpec.py +++ b/otp/level/LevelSpec.py @@ -1,10 +1,14 @@ +import importlib +import string +import types + from panda3d.core import * + from direct.directnotify import DirectNotifyGlobal from direct.showbase.PythonUtil import list2dict, uniqueElements -import string + from . import LevelConstants -import types -import importlib + if __dev__: import os @@ -35,8 +39,7 @@ class LevelSpec: self.setScenario(scenario) if __dev__: if newSpec: - from . import EntityTypes - from . import EntityTypeRegistry + from . import EntityTypeRegistry, EntityTypes etr = EntityTypeRegistry.EntityTypeRegistry(EntityTypes) self.setEntityTypeReg(etr) entId = LevelConstants.UberZoneEntId diff --git a/otp/level/LevelUtil.py b/otp/level/LevelUtil.py index 15ddd82..7784ede 100644 --- a/otp/level/LevelUtil.py +++ b/otp/level/LevelUtil.py @@ -1,6 +1,8 @@ import string + from . import LevelConstants + def getZoneNum2Node(levelModel, logFunc = lambda str: str): def findNumberedNodes(baseString, model, caseInsens = 1): diff --git a/otp/level/LocatorEntity.py b/otp/level/LocatorEntity.py index 64c1de8..3541571 100644 --- a/otp/level/LocatorEntity.py +++ b/otp/level/LocatorEntity.py @@ -1,7 +1,10 @@ -from . import Entity, BasicEntities from panda3d.core import NodePath + from direct.directnotify import DirectNotifyGlobal +from . import BasicEntities, Entity + + class LocatorEntity(Entity.Entity, NodePath): notify = DirectNotifyGlobal.directNotify.newCategory('LocatorEntity') diff --git a/otp/level/LogicGate.py b/otp/level/LogicGate.py index 7faf017..09b8eb7 100644 --- a/otp/level/LogicGate.py +++ b/otp/level/LogicGate.py @@ -1,7 +1,9 @@ -from direct.showbase import DirectObject from direct.directnotify import DirectNotifyGlobal +from direct.showbase import DirectObject + from . import Entity + def andTest(self, a, b): if b: messenger.send(self.getOutputEventName(), [a]) diff --git a/otp/level/ModelEntity.py b/otp/level/ModelEntity.py index cb3b147..630f62a 100644 --- a/otp/level/ModelEntity.py +++ b/otp/level/ModelEntity.py @@ -1,7 +1,10 @@ -from toontown.toonbase.ToontownGlobals import * from direct.directnotify import DirectNotifyGlobal + +from toontown.toonbase.ToontownGlobals import * + from . import BasicEntities + class ModelEntity(BasicEntities.NodePathEntity): LoadFuncs = {'loadModelCopy': loader.loadModelCopy, 'loadModel': loader.loadModel, diff --git a/otp/level/PathEntity.py b/otp/level/PathEntity.py index 418c632..64b2e78 100644 --- a/otp/level/PathEntity.py +++ b/otp/level/PathEntity.py @@ -1,8 +1,11 @@ -from toontown.toonbase.ToontownGlobals import * -from direct.interval.IntervalGlobal import * from direct.directnotify import DirectNotifyGlobal -from . import BasicEntities +from direct.interval.IntervalGlobal import * + from toontown.suit import GoonPathData +from toontown.toonbase.ToontownGlobals import * + +from . import BasicEntities + class PathEntity(BasicEntities.NodePathEntity): notify = DirectNotifyGlobal.directNotify.newCategory('PathEntity') diff --git a/otp/level/PropSpinner.py b/otp/level/PropSpinner.py index f75e344..5b2975b 100644 --- a/otp/level/PropSpinner.py +++ b/otp/level/PropSpinner.py @@ -1,7 +1,10 @@ -from direct.interval.IntervalGlobal import * -from .Entity import Entity from panda3d.core import Vec3 +from direct.interval.IntervalGlobal import * + +from .Entity import Entity + + class PropSpinner(Entity): def __init__(self, level, entId): diff --git a/otp/level/VisibilityBlocker.py b/otp/level/VisibilityBlocker.py index 797f72f..f76e252 100644 --- a/otp/level/VisibilityBlocker.py +++ b/otp/level/VisibilityBlocker.py @@ -1,5 +1,6 @@ from . import Entity + class VisibilityBlocker: def __init__(self): diff --git a/otp/level/VisibilityExtender.py b/otp/level/VisibilityExtender.py index 90bdbe1..11a6014 100644 --- a/otp/level/VisibilityExtender.py +++ b/otp/level/VisibilityExtender.py @@ -1,5 +1,6 @@ from . import Entity + class VisibilityExtender(Entity.Entity): def __init__(self, level, entId): diff --git a/otp/level/ZoneEntity.py b/otp/level/ZoneEntity.py index 96a6d0c..251079e 100644 --- a/otp/level/ZoneEntity.py +++ b/otp/level/ZoneEntity.py @@ -1,5 +1,5 @@ -from . import ZoneEntityBase -from . import BasicEntities +from . import BasicEntities, ZoneEntityBase + class ZoneEntity(ZoneEntityBase.ZoneEntityBase, BasicEntities.NodePathAttribs): diff --git a/otp/level/ZoneEntityAI.py b/otp/level/ZoneEntityAI.py index cfb269a..3600db6 100644 --- a/otp/level/ZoneEntityAI.py +++ b/otp/level/ZoneEntityAI.py @@ -1,5 +1,6 @@ from . import ZoneEntityBase + class ZoneEntityAI(ZoneEntityBase.ZoneEntityBase): def __init__(self, level, entId): diff --git a/otp/level/ZoneEntityBase.py b/otp/level/ZoneEntityBase.py index 46986c8..45a3c7a 100644 --- a/otp/level/ZoneEntityBase.py +++ b/otp/level/ZoneEntityBase.py @@ -1,5 +1,5 @@ -from . import Entity -from . import LevelConstants +from . import Entity, LevelConstants + class ZoneEntityBase(Entity.Entity): diff --git a/otp/login/AstronLoginManagerUD.py b/otp/login/AstronLoginManagerUD.py index 3f905c9..17318ec 100644 --- a/otp/login/AstronLoginManagerUD.py +++ b/otp/login/AstronLoginManagerUD.py @@ -1,21 +1,15 @@ import json -import time import os +import time from datetime import datetime from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectGlobalUD import DistributedObjectGlobalUD +from direct.distributed.MsgTypes import (CLIENTAGENT_ADD_POST_REMOVE, CLIENTAGENT_CLEAR_POST_REMOVES, + CLIENTAGENT_CLOSE_CHANNEL, CLIENTAGENT_EJECT, CLIENTAGENT_OPEN_CHANNEL, + CLIENTAGENT_REMOVE_SESSION_OBJECT, CLIENTAGENT_SET_CLIENT_ID, + STATESERVER_OBJECT_DELETE_RAM) from direct.distributed.PyDatagram import PyDatagram -from direct.distributed.MsgTypes import ( - CLIENTAGENT_ADD_POST_REMOVE, - CLIENTAGENT_CLEAR_POST_REMOVES, - CLIENTAGENT_CLOSE_CHANNEL, - CLIENTAGENT_EJECT, - CLIENTAGENT_OPEN_CHANNEL, - CLIENTAGENT_REMOVE_SESSION_OBJECT, - CLIENTAGENT_SET_CLIENT_ID, - STATESERVER_OBJECT_DELETE_RAM -) from otp.otpbase import OTPGlobals diff --git a/otp/login/CreateAccountScreen.py b/otp/login/CreateAccountScreen.py index 339fc24..c6149b5 100644 --- a/otp/login/CreateAccountScreen.py +++ b/otp/login/CreateAccountScreen.py @@ -1,15 +1,15 @@ from panda3d.core import * -from direct.gui.DirectGui import * -from panda3d.core import * -from direct.fsm import StateData -from otp.otpgui import OTPDialog -from direct.fsm import ClassicFSM -from direct.fsm import State + from direct.directnotify import DirectNotifyGlobal -from otp.otpbase import OTPLocalizer -from . import GuiScreen -from otp.otpbase import OTPGlobals from direct.distributed.MsgTypes import * +from direct.fsm import ClassicFSM, State, StateData +from direct.gui.DirectGui import * + +from otp.otpbase import OTPGlobals, OTPLocalizer +from otp.otpgui import OTPDialog + +from . import GuiScreen + class CreateAccountScreen(StateData.StateData, GuiScreen.GuiScreen): notify = DirectNotifyGlobal.directNotify.newCategory('CreateAccountScreen') diff --git a/otp/login/GuiScreen.py b/otp/login/GuiScreen.py index 038a106..a3a4962 100644 --- a/otp/login/GuiScreen.py +++ b/otp/login/GuiScreen.py @@ -1,11 +1,13 @@ from panda3d.core import * -from otp.otpbase import OTPGlobals -from direct.gui.DirectGui import * -from otp.otpgui import OTPDialog + from direct.directnotify import DirectNotifyGlobal -from otp.otpbase import OTPLocalizer +from direct.gui.DirectGui import * from direct.task.Task import Task +from otp.otpbase import OTPGlobals, OTPLocalizer +from otp.otpgui import OTPDialog + + class GuiScreen: notify = DirectNotifyGlobal.directNotify.newCategory('GuiScreen') DGG.ENTERPRESS_ADVANCE = 0 diff --git a/otp/login/HTTPUtil.py b/otp/login/HTTPUtil.py index 6896bf4..0939801 100644 --- a/otp/login/HTTPUtil.py +++ b/otp/login/HTTPUtil.py @@ -1,5 +1,6 @@ from panda3d.core import * + class HTTPUtilException(Exception): def __init__(self, what): diff --git a/otp/login/LeaveToPayDialog.py b/otp/login/LeaveToPayDialog.py index ced699c..6d45993 100644 --- a/otp/login/LeaveToPayDialog.py +++ b/otp/login/LeaveToPayDialog.py @@ -1,10 +1,12 @@ -from otp.otpbase import OTPGlobals -from otp.otpbase import OTPLauncherGlobals -from otp.otpbase import OTPLocalizer -from direct.gui.DirectGui import * -from panda3d.core import * import os +from panda3d.core import * + +from direct.gui.DirectGui import * + +from otp.otpbase import OTPGlobals, OTPLauncherGlobals, OTPLocalizer + + class LeaveToPayDialog: def __init__(self, paidUser, destructorHook = None, doneFunc = None): diff --git a/otp/login/LoginAstronAccount.py b/otp/login/LoginAstronAccount.py index e42441a..4112f79 100644 --- a/otp/login/LoginAstronAccount.py +++ b/otp/login/LoginAstronAccount.py @@ -1,7 +1,9 @@ from direct.directnotify import DirectNotifyGlobal -from otp.login.LoginBase import LoginBase -from direct.distributed.PyDatagram import PyDatagram from direct.distributed.MsgTypes import * +from direct.distributed.PyDatagram import PyDatagram + +from otp.login.LoginBase import LoginBase + class LoginAstronAccount(LoginBase): notify = DirectNotifyGlobal.directNotify.newCategory('LoginAstronAccount') diff --git a/otp/login/LoginDISLTokenAccount.py b/otp/login/LoginDISLTokenAccount.py index 3c8a4ef..6300408 100644 --- a/otp/login/LoginDISLTokenAccount.py +++ b/otp/login/LoginDISLTokenAccount.py @@ -1,8 +1,10 @@ -from direct.showbase.ShowBaseGlobal import * -from direct.distributed.MsgTypes import * from direct.directnotify import DirectNotifyGlobal -from . import LoginBase +from direct.distributed.MsgTypes import * from direct.distributed.PyDatagram import PyDatagram +from direct.showbase.ShowBaseGlobal import * + +from . import LoginBase + class LoginDISLTokenAccount(LoginBase.LoginBase): diff --git a/otp/login/LoginGSAccount.py b/otp/login/LoginGSAccount.py index 4b953da..fb6b0d0 100644 --- a/otp/login/LoginGSAccount.py +++ b/otp/login/LoginGSAccount.py @@ -1,9 +1,12 @@ from panda3d.core import * -from direct.distributed.MsgTypes import * + from direct.directnotify import DirectNotifyGlobal -from . import LoginBase +from direct.distributed.MsgTypes import * from direct.distributed.PyDatagram import PyDatagram +from . import LoginBase + + class LoginGSAccount(LoginBase.LoginBase): def __init__(self, cr): diff --git a/otp/login/LoginGoAccount.py b/otp/login/LoginGoAccount.py index 8a0bce2..0ec3bae 100644 --- a/otp/login/LoginGoAccount.py +++ b/otp/login/LoginGoAccount.py @@ -1,9 +1,12 @@ from panda3d.core import * -from direct.distributed.MsgTypes import * + from direct.directnotify import DirectNotifyGlobal -from . import LoginBase +from direct.distributed.MsgTypes import * from direct.distributed.PyDatagram import PyDatagram +from . import LoginBase + + class LoginGoAccount(LoginBase.LoginBase): def __init__(self, cr): diff --git a/otp/login/LoginScreen.py b/otp/login/LoginScreen.py index b13be96..1ee7546 100644 --- a/otp/login/LoginScreen.py +++ b/otp/login/LoginScreen.py @@ -2,19 +2,21 @@ import json import os import time from datetime import datetime + 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.distributed.MsgTypes import * +from direct.fsm import ClassicFSM, State, StateData +from direct.gui.DirectGui import * + +from otp.otpbase import OTPGlobals, OTPLocalizer from otp.otpgui import OTPDialog -from otp.otpbase import OTPLocalizer -from otp.otpbase import OTPGlobals from otp.uberdog.AccountDetailRecord import AccountDetailRecord, SubDetailRecord + from . import GuiScreen + class LoginScreen(StateData.StateData, GuiScreen.GuiScreen): 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 diff --git a/otp/login/LoginTTAccount.py b/otp/login/LoginTTAccount.py index 6f1974c..fed66e7 100644 --- a/otp/login/LoginTTAccount.py +++ b/otp/login/LoginTTAccount.py @@ -1,9 +1,12 @@ from panda3d.core import * -from direct.distributed.MsgTypes import * + from direct.directnotify import DirectNotifyGlobal -from . import LoginBase +from direct.distributed.MsgTypes import * from direct.distributed.PyDatagram import PyDatagram +from . import LoginBase + + class LoginTTAccount(LoginBase.LoginBase): notify = DirectNotifyGlobal.directNotify.newCategory('LoginTTAcct') diff --git a/otp/login/LoginTTSpecificDevAccount.py b/otp/login/LoginTTSpecificDevAccount.py index b3e91a6..b75748d 100644 --- a/otp/login/LoginTTSpecificDevAccount.py +++ b/otp/login/LoginTTSpecificDevAccount.py @@ -1,9 +1,12 @@ from panda3d.core import * -from direct.distributed.MsgTypes import * + from direct.directnotify import DirectNotifyGlobal -from . import LoginTTAccount +from direct.distributed.MsgTypes import * from direct.distributed.PyDatagram import PyDatagram +from . import LoginTTAccount + + class LoginTTSpecificDevAccount(LoginTTAccount.LoginTTAccount): notify = DirectNotifyGlobal.directNotify.newCategory('LoginTTSpecificDevAccount') diff --git a/otp/login/LoginWebPlayTokenAccount.py b/otp/login/LoginWebPlayTokenAccount.py index 0b3715d..7bc95a5 100644 --- a/otp/login/LoginWebPlayTokenAccount.py +++ b/otp/login/LoginWebPlayTokenAccount.py @@ -1,7 +1,10 @@ from panda3d.core import * + from direct.directnotify import DirectNotifyGlobal + from . import LoginTTAccount + class LoginWebPlayTokenAccount(LoginTTAccount.LoginTTAccount): notify = DirectNotifyGlobal.directNotify.newCategory('LoginWebPlayTokenAccount') diff --git a/otp/login/MultiPageTextFrame.py b/otp/login/MultiPageTextFrame.py index b2763a1..4a6c866 100644 --- a/otp/login/MultiPageTextFrame.py +++ b/otp/login/MultiPageTextFrame.py @@ -1,7 +1,10 @@ from panda3d.core import * + from direct.gui.DirectGui import * + from otp.otpbase import OTPLocalizer + class MultiPageTextFrame(DirectFrame): defWidth = 1.8 defHeight = 0.9 diff --git a/otp/login/PrivacyPolicyPanel.py b/otp/login/PrivacyPolicyPanel.py index 662f433..c936c18 100644 --- a/otp/login/PrivacyPolicyPanel.py +++ b/otp/login/PrivacyPolicyPanel.py @@ -1,11 +1,15 @@ from panda3d.core import * -from otp.otpbase.OTPGlobals import * -from direct.gui.DirectGui import * -from .MultiPageTextFrame import * + from direct.directnotify import DirectNotifyGlobal +from direct.gui.DirectGui import * + from otp.otpbase import OTPLocalizer +from otp.otpbase.OTPGlobals import * from otp.otpgui import OTPDialog +from .MultiPageTextFrame import * + + class PrivacyPolicyTextPanel(getGlobalDialogClass()): notify = DirectNotifyGlobal.directNotify.newCategory('PrivacyPolicyTextPanel') diff --git a/otp/login/SecretFriendsInfoPanel.py b/otp/login/SecretFriendsInfoPanel.py index acfb936..5a23c8b 100644 --- a/otp/login/SecretFriendsInfoPanel.py +++ b/otp/login/SecretFriendsInfoPanel.py @@ -1,10 +1,14 @@ from panda3d.core import * -from otp.otpbase.OTPGlobals import * + from direct.gui.DirectGui import * -from .MultiPageTextFrame import * + from otp.otpbase import OTPLocalizer +from otp.otpbase.OTPGlobals import * from otp.otpgui import OTPDialog +from .MultiPageTextFrame import * + + class SecretFriendsInfoPanel(getGlobalDialogClass()): def __init__(self, doneEvent, hidePageNum = 0, pageChangeCallback = None): diff --git a/otp/movement/Impulse.py b/otp/movement/Impulse.py index 9fc8d08..82e3d2a 100644 --- a/otp/movement/Impulse.py +++ b/otp/movement/Impulse.py @@ -1,6 +1,8 @@ from panda3d.core import * + from direct.showbase import DirectObject + class Impulse(DirectObject.DirectObject): def __init__(self): diff --git a/otp/movement/Mover.py b/otp/movement/Mover.py index 092a27a..46b3b73 100644 --- a/otp/movement/Mover.py +++ b/otp/movement/Mover.py @@ -1,9 +1,13 @@ +import builtins + from panda3d.core import * from panda3d.otp import CMover + from direct.directnotify import DirectNotifyGlobal -from otp.movement.PyVec3 import PyVec3 from direct.showbase import PythonUtil -import builtins + +from otp.movement.PyVec3 import PyVec3 + class Mover(CMover): notify = DirectNotifyGlobal.directNotify.newCategory('Mover') diff --git a/otp/movement/PyVec3.py b/otp/movement/PyVec3.py index 95a54ca..1131d69 100644 --- a/otp/movement/PyVec3.py +++ b/otp/movement/PyVec3.py @@ -1,6 +1,8 @@ -from panda3d.core import * -import types import math +import types + +from panda3d.core import * + class PyVec3: Epsilon = 0.0001 diff --git a/otp/namepanel/NameCheck.py b/otp/namepanel/NameCheck.py index 04b1713..83469fc 100644 --- a/otp/namepanel/NameCheck.py +++ b/otp/namepanel/NameCheck.py @@ -1,8 +1,11 @@ import string -from otp.otpbase import OTPLocalizer + +from panda3d.core import NSError, TextEncoder, TextNode + from direct.directnotify import DirectNotifyGlobal -from panda3d.core import NSError -from panda3d.core import TextEncoder, TextNode + +from otp.otpbase import OTPLocalizer + notify = DirectNotifyGlobal.directNotify.newCategory('NameCheck') def filterString(str, filter): diff --git a/otp/namepanel/NameTumbler.py b/otp/namepanel/NameTumbler.py index be5426f..d7096b4 100644 --- a/otp/namepanel/NameTumbler.py +++ b/otp/namepanel/NameTumbler.py @@ -1,10 +1,13 @@ -from panda3d.core import * -from direct.showbase import DirectObject import random -from direct.task import Task -from direct.gui.DirectGui import * import string + +from panda3d.core import * + from direct.gui import OnscreenText +from direct.gui.DirectGui import * +from direct.showbase import DirectObject +from direct.task import Task + class NameTumbler(DirectFrame): diff --git a/otp/otpbase/OTPBase.py b/otp/otpbase/OTPBase.py index 2c61ef1..18de5ec 100644 --- a/otp/otpbase/OTPBase.py +++ b/otp/otpbase/OTPBase.py @@ -1,9 +1,14 @@ -from direct.showbase.ShowBase import ShowBase -from panda3d.core import Camera, TPLow, VBase4, ColorWriteAttrib, Filename, getModelPath, NodePath, ConfigVariableBool, ConfigVariableDouble -from . import OTPRender -import time import math import re +import time + +from panda3d.core import (Camera, ColorWriteAttrib, ConfigVariableBool, ConfigVariableDouble, Filename, NodePath, TPLow, + VBase4, getModelPath) + +from direct.showbase.ShowBase import ShowBase + +from . import OTPRender + class OTPBase(ShowBase): diff --git a/otp/otpbase/OTPGlobals.py b/otp/otpbase/OTPGlobals.py index b9b59e5..352615b 100644 --- a/otp/otpbase/OTPGlobals.py +++ b/otp/otpbase/OTPGlobals.py @@ -1,5 +1,6 @@ from panda3d.core import * from panda3d.otp import * + QuietZone = 1 UberZone = 2 WallBitmask = BitMask32(1) diff --git a/otp/otpbase/OTPLocalizer.py b/otp/otpbase/OTPLocalizer.py index ebfa5be..59da432 100644 --- a/otp/otpbase/OTPLocalizer.py +++ b/otp/otpbase/OTPLocalizer.py @@ -15,6 +15,7 @@ else: _languageModule = 'otp.otpbase.OTPLocalizer_' + language print('from ' + _languageModule + ' import *') from otp.otpbase.OTPLocalizerEnglish import * + if checkLanguage: l = {} g = {} diff --git a/otp/otpbase/OTPLocalizerEnglish.py b/otp/otpbase/OTPLocalizerEnglish.py index ef06cdd..7543bba 100644 --- a/otp/otpbase/OTPLocalizerEnglish.py +++ b/otp/otpbase/OTPLocalizerEnglish.py @@ -1,5 +1,7 @@ import string + from otp.otpbase.OTPLocalizerEnglishProperty import * + lTheBrrrgh = 'The Brrrgh' lDaisyGardens = 'Daisy Gardens' lDonaldsDock = "Donald's Dock" @@ -84,8 +86,8 @@ WhisperToFormatName = 'To %s' WhisperFromFormatName = '%s whispers' ThoughtOtherFormatName = '%s thinks' ThoughtSelfFormatName = 'You think' -from panda3d.core import TextProperties -from panda3d.core import TextPropertiesManager +from panda3d.core import TextProperties, 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 fee55ca..a86c514 100644 --- a/otp/otpbase/OTPRender.py +++ b/otp/otpbase/OTPRender.py @@ -1,4 +1,5 @@ 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 6e2a607..243868d 100644 --- a/otp/otpbase/OTPTimer.py +++ b/otp/otpbase/OTPTimer.py @@ -1,9 +1,12 @@ from panda3d.core import Vec4 -from direct.gui.DirectGui import DirectFrame, DGG -from direct.task import Task + +from direct.gui.DirectGui import DGG, DirectFrame from direct.showbase.PythonUtil import bound +from direct.task import Task + from otp.otpbase import OTPGlobals + class OTPTimer(DirectFrame): ClockImage = None TimerId = 0 diff --git a/otp/otpbase/ObjectCount.py b/otp/otpbase/ObjectCount.py index 2c1053a..e40c16b 100644 --- a/otp/otpbase/ObjectCount.py +++ b/otp/otpbase/ObjectCount.py @@ -1,6 +1,8 @@ -from direct.showbase.Job import Job import gc +from direct.showbase.Job import Job + + class ObjectCount(Job): """ logs a count of the number of each type of object found in gc.get_objects() """ def __init__(self, name, immediate=False, doneCallback=None): diff --git a/otp/otpbase/PythonUtil.py b/otp/otpbase/PythonUtil.py index 423200a..ad2cec4 100644 --- a/otp/otpbase/PythonUtil.py +++ b/otp/otpbase/PythonUtil.py @@ -1,7 +1,7 @@ import builtins -import sys import math import random +import sys import time __all__ = ['enumerate', 'nonRepeatingRandomList', 'describeException', 'pdir', 'choice', 'cmp', 'lerp', 'triglerp'] diff --git a/otp/otpgui/OTPDialog.py b/otp/otpgui/OTPDialog.py index 80ffa7c..95e3b2e 100644 --- a/otp/otpgui/OTPDialog.py +++ b/otp/otpgui/OTPDialog.py @@ -1,8 +1,10 @@ -from direct.gui.DirectGui import * -from direct.directnotify import DirectNotifyGlobal import string -from otp.otpbase import OTPGlobals -from otp.otpbase import OTPLocalizer + +from direct.directnotify import DirectNotifyGlobal +from direct.gui.DirectGui import * + +from otp.otpbase import OTPGlobals, OTPLocalizer + NoButtons = 0 Acknowledge = 1 CancelOnly = 2 diff --git a/otp/snapshot/SnapshotDispatcher.py b/otp/snapshot/SnapshotDispatcher.py index cbc751c..dc56f45 100644 --- a/otp/snapshot/SnapshotDispatcher.py +++ b/otp/snapshot/SnapshotDispatcher.py @@ -1,5 +1,6 @@ -from direct.distributed.DistributedObjectGlobal import DistributedObjectGlobal from direct.directnotify.DirectNotifyGlobal import directNotify +from direct.distributed.DistributedObjectGlobal import DistributedObjectGlobal + class SnapshotDispatcher(DistributedObjectGlobal): pass diff --git a/otp/snapshot/SnapshotDispatcherAI.py b/otp/snapshot/SnapshotDispatcherAI.py index fc1c402..d9568dd 100644 --- a/otp/snapshot/SnapshotDispatcherAI.py +++ b/otp/snapshot/SnapshotDispatcherAI.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectAI import DistributedObjectAI + class SnapshotDispatcherAI(DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('SnapshotDispatcherAI') diff --git a/otp/snapshot/SnapshotDispatcherUD.py b/otp/snapshot/SnapshotDispatcherUD.py index 1ce7acc..56eb167 100644 --- a/otp/snapshot/SnapshotDispatcherUD.py +++ b/otp/snapshot/SnapshotDispatcherUD.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectUD import DistributedObjectUD + class SnapshotDispatcherUD(DistributedObjectUD): notify = DirectNotifyGlobal.directNotify.newCategory('SnapshotDispatcherUD') diff --git a/otp/snapshot/SnapshotRenderer.py b/otp/snapshot/SnapshotRenderer.py index fa69b32..f1b8b90 100644 --- a/otp/snapshot/SnapshotRenderer.py +++ b/otp/snapshot/SnapshotRenderer.py @@ -1,5 +1,6 @@ -from direct.distributed.DistributedObjectGlobal import DistributedObjectGlobal from direct.directnotify.DirectNotifyGlobal import directNotify +from direct.distributed.DistributedObjectGlobal import DistributedObjectGlobal + class SnapshotRenderer(DistributedObjectGlobal): pass diff --git a/otp/snapshot/SnapshotRendererAI.py b/otp/snapshot/SnapshotRendererAI.py index e5b2d53..228647e 100644 --- a/otp/snapshot/SnapshotRendererAI.py +++ b/otp/snapshot/SnapshotRendererAI.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectAI import DistributedObjectAI + class SnapshotRendererAI(DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('SnapshotRendererAI') diff --git a/otp/snapshot/SnapshotRendererUD.py b/otp/snapshot/SnapshotRendererUD.py index 63d7f82..48925c9 100644 --- a/otp/snapshot/SnapshotRendererUD.py +++ b/otp/snapshot/SnapshotRendererUD.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectUD import DistributedObjectUD + class SnapshotRendererUD(DistributedObjectUD): notify = DirectNotifyGlobal.directNotify.newCategory('SnapshotRendererUD') diff --git a/otp/speedchat/ColorSpace.py b/otp/speedchat/ColorSpace.py index c078bfd..89414a7 100644 --- a/otp/speedchat/ColorSpace.py +++ b/otp/speedchat/ColorSpace.py @@ -1,5 +1,6 @@ import math + def rgb2hsv(r, g, b): _min = float(min(r, g, b)) _max = float(max(r, g, b)) diff --git a/otp/speedchat/SCColorScheme.py b/otp/speedchat/SCColorScheme.py index 3b5d591..c6571fe 100644 --- a/otp/speedchat/SCColorScheme.py +++ b/otp/speedchat/SCColorScheme.py @@ -1,5 +1,6 @@ from .ColorSpace import * + class SCColorScheme: def __init__(self, arrowColor = (0.5, 0.5, 1), rolloverColor = (0.53, 0.9, 0.53), frameColor = None, pressedColor = None, menuHolderActiveColor = None, emoteIconColor = None, textColor = (0, 0, 0), emoteIconDisabledColor = (0.5, 0.5, 0.5), textDisabledColor = (0.4, 0.4, 0.4), alpha = 0.95): diff --git a/otp/speedchat/SCCustomMenu.py b/otp/speedchat/SCCustomMenu.py index 0578287..96f37a4 100644 --- a/otp/speedchat/SCCustomMenu.py +++ b/otp/speedchat/SCCustomMenu.py @@ -1,7 +1,9 @@ -from .SCMenu import SCMenu -from .SCCustomTerminal import SCCustomTerminal from otp.otpbase.OTPLocalizer import CustomSCStrings +from .SCCustomTerminal import SCCustomTerminal +from .SCMenu import SCMenu + + class SCCustomMenu(SCMenu): def __init__(self): diff --git a/otp/speedchat/SCCustomTerminal.py b/otp/speedchat/SCCustomTerminal.py index 3ceec76..018cdd6 100644 --- a/otp/speedchat/SCCustomTerminal.py +++ b/otp/speedchat/SCCustomTerminal.py @@ -1,5 +1,7 @@ -from .SCTerminal import SCTerminal from otp.otpbase.OTPLocalizer import CustomSCStrings + +from .SCTerminal import SCTerminal + SCCustomMsgEvent = 'SCCustomMsg' def decodeSCCustomMsg(textId): diff --git a/otp/speedchat/SCDecoders.py b/otp/speedchat/SCDecoders.py index aa368ce..7f2ea16 100644 --- a/otp/speedchat/SCDecoders.py +++ b/otp/speedchat/SCDecoders.py @@ -1,3 +1,3 @@ -from .SCStaticTextTerminal import decodeSCStaticTextMsg from .SCCustomTerminal import decodeSCCustomMsg from .SCEmoteTerminal import decodeSCEmoteWhisperMsg +from .SCStaticTextTerminal import decodeSCStaticTextMsg diff --git a/otp/speedchat/SCElement.py b/otp/speedchat/SCElement.py index 4996f48..9014355 100644 --- a/otp/speedchat/SCElement.py +++ b/otp/speedchat/SCElement.py @@ -1,10 +1,14 @@ from panda3d.core import * + from direct.gui.DirectGui import * +from direct.showbase.PythonUtil import boolEqual from direct.task import Task + +from otp.otpbase import OTPGlobals + from .SCConstants import * from .SCObject import SCObject -from direct.showbase.PythonUtil import boolEqual -from otp.otpbase import OTPGlobals + class SCElement(SCObject, NodePath): font = OTPGlobals.getInterfaceFont() diff --git a/otp/speedchat/SCEmoteMenu.py b/otp/speedchat/SCEmoteMenu.py index a26784c..21fa3c2 100644 --- a/otp/speedchat/SCEmoteMenu.py +++ b/otp/speedchat/SCEmoteMenu.py @@ -1,5 +1,6 @@ -from .SCMenu import SCMenu from .SCEmoteTerminal import SCEmoteTerminal +from .SCMenu import SCMenu + class SCEmoteMenu(SCMenu): diff --git a/otp/speedchat/SCEmoteTerminal.py b/otp/speedchat/SCEmoteTerminal.py index b3a3a8a..189e70f 100644 --- a/otp/speedchat/SCEmoteTerminal.py +++ b/otp/speedchat/SCEmoteTerminal.py @@ -1,7 +1,10 @@ from direct.gui.DirectGui import * -from .SCTerminal import SCTerminal -from otp.otpbase.OTPLocalizer import EmoteList, EmoteWhispers + from otp.avatar import Emote +from otp.otpbase.OTPLocalizer import EmoteList, EmoteWhispers + +from .SCTerminal import SCTerminal + SCEmoteMsgEvent = 'SCEmoteMsg' SCEmoteNoAccessEvent = 'SCEmoteNoAccess' diff --git a/otp/speedchat/SCGMTextTerminal.py b/otp/speedchat/SCGMTextTerminal.py index 159269c..b1f05d7 100644 --- a/otp/speedchat/SCGMTextTerminal.py +++ b/otp/speedchat/SCGMTextTerminal.py @@ -1,5 +1,7 @@ -from .SCTerminal import SCTerminal from otp.speedchat import SpeedChatGMHandler + +from .SCTerminal import SCTerminal + SCGMTextMsgEvent = 'SCGMTextMsg' class SCGMTextTerminal(SCTerminal): diff --git a/otp/speedchat/SCMenu.py b/otp/speedchat/SCMenu.py index 84e458c..2e4ec00 100644 --- a/otp/speedchat/SCMenu.py +++ b/otp/speedchat/SCMenu.py @@ -1,10 +1,13 @@ 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 +from direct.task import Task + +from .SCConstants import * +from .SCObject import SCObject + class SCMenu(SCObject, NodePath): SpeedChatRolloverTolerance = ConfigVariableDouble('speedchat-rollover-tolerance', 0.08).value @@ -92,9 +95,10 @@ class SCMenu(SCObject, NodePath): self.appendFromStructure(structure) def appendFromStructure(self, structure): - from .SpeedChatTypes import SCMenuHolder, SCStaticTextTerminal, SCGMTextTerminal from otp.otpbase import OTPLocalizer + from .SpeedChatTypes import SCGMTextTerminal, SCMenuHolder, SCStaticTextTerminal + def addChildren(menu, childList): for child in childList: emote = None diff --git a/otp/speedchat/SCMenuHolder.py b/otp/speedchat/SCMenuHolder.py index 85a1279..fba96c1 100644 --- a/otp/speedchat/SCMenuHolder.py +++ b/otp/speedchat/SCMenuHolder.py @@ -1,9 +1,13 @@ +import types + from panda3d.core import * + from direct.gui.DirectGui import * -from .SCObject import SCObject + from .SCElement import SCElement from .SCMenu import SCMenu -import types +from .SCObject import SCObject + class SCMenuHolder(SCElement): N = 0.9 diff --git a/otp/speedchat/SCObject.py b/otp/speedchat/SCObject.py index 5b37ba7..e84ae61 100644 --- a/otp/speedchat/SCObject.py +++ b/otp/speedchat/SCObject.py @@ -1,6 +1,7 @@ from direct.directnotify import DirectNotifyGlobal from direct.showbase.DirectObject import DirectObject + class SCObject(DirectObject): notify = DirectNotifyGlobal.directNotify.newCategory('SpeedChat') diff --git a/otp/speedchat/SCSettings.py b/otp/speedchat/SCSettings.py index ca76a22..ee24a21 100644 --- a/otp/speedchat/SCSettings.py +++ b/otp/speedchat/SCSettings.py @@ -1,6 +1,8 @@ -from .SCColorScheme import SCColorScheme from otp.otpbase import OTPLocalizer +from .SCColorScheme import SCColorScheme + + class SCSettings: def __init__(self, eventPrefix, whisperMode = 0, colorScheme = None, submenuOverlap = OTPLocalizer.SCOsubmenuOverlap, topLevelOverlap = None): diff --git a/otp/speedchat/SCStaticTextTerminal.py b/otp/speedchat/SCStaticTextTerminal.py index 993f330..0d9efe5 100644 --- a/otp/speedchat/SCStaticTextTerminal.py +++ b/otp/speedchat/SCStaticTextTerminal.py @@ -1,5 +1,7 @@ -from .SCTerminal import SCTerminal from otp.otpbase.OTPLocalizer import SpeedChatStaticText + +from .SCTerminal import SCTerminal + SCStaticTextMsgEvent = 'SCStaticTextMsg' def decodeSCStaticTextMsg(textId): diff --git a/otp/speedchat/SCTerminal.py b/otp/speedchat/SCTerminal.py index 4674a28..5eb1521 100644 --- a/otp/speedchat/SCTerminal.py +++ b/otp/speedchat/SCTerminal.py @@ -1,9 +1,12 @@ -from .SCElement import SCElement -from .SCObject import SCObject -from .SCMenu import SCMenu -from direct.fsm.StatePush import StateVar, FunctionCall +from direct.fsm.StatePush import FunctionCall, StateVar from direct.showbase.DirectObject import DirectObject + from otp.avatar import Emote + +from .SCElement import SCElement +from .SCMenu import SCMenu +from .SCObject import SCObject + SCTerminalSelectedEvent = 'SCTerminalSelected' SCTerminalLinkedEmoteEvent = 'SCTerminalLinkedEmoteEvent' SCWhisperModeChangeEvent = 'SCWhisperModeChange' diff --git a/otp/speedchat/SpeedChat.py b/otp/speedchat/SpeedChat.py index 523e36d..f59027a 100644 --- a/otp/speedchat/SpeedChat.py +++ b/otp/speedchat/SpeedChat.py @@ -1,8 +1,11 @@ from direct.showbase.PythonUtil import boolEqual -from .SpeedChatTypes import * + +from otp.otpbase import OTPLocalizer + from .SCSettings import SCSettings from .SCTerminal import SCWhisperModeChangeEvent -from otp.otpbase import OTPLocalizer +from .SpeedChatTypes import * + class SpeedChat(SCMenu): diff --git a/otp/speedchat/SpeedChatGMHandler.py b/otp/speedchat/SpeedChatGMHandler.py index e4a006c..28cad67 100644 --- a/otp/speedchat/SpeedChatGMHandler.py +++ b/otp/speedchat/SpeedChatGMHandler.py @@ -1,7 +1,10 @@ from panda3d.core import * + from direct.showbase import DirectObject + from otp.otpbase import OTPLocalizer + class SpeedChatGMHandler(DirectObject.DirectObject): scStructure = None scList = {} diff --git a/otp/speedchat/SpeedChatGlobals.py b/otp/speedchat/SpeedChatGlobals.py index 96bd2a4..a5759c0 100644 --- a/otp/speedchat/SpeedChatGlobals.py +++ b/otp/speedchat/SpeedChatGlobals.py @@ -1,6 +1,5 @@ -from .SCTerminal import SCTerminalSelectedEvent -from .SCTerminal import SCTerminalLinkedEmoteEvent -from .SCStaticTextTerminal import SCStaticTextMsgEvent -from .SCGMTextTerminal import SCGMTextMsgEvent from .SCCustomTerminal import SCCustomMsgEvent from .SCEmoteTerminal import SCEmoteMsgEvent, SCEmoteNoAccessEvent +from .SCGMTextTerminal import SCGMTextMsgEvent +from .SCStaticTextTerminal import SCStaticTextMsgEvent +from .SCTerminal import SCTerminalLinkedEmoteEvent, SCTerminalSelectedEvent diff --git a/otp/speedchat/SpeedChatTypes.py b/otp/speedchat/SpeedChatTypes.py index cb28435..7252fe6 100644 --- a/otp/speedchat/SpeedChatTypes.py +++ b/otp/speedchat/SpeedChatTypes.py @@ -1,12 +1,12 @@ -from .SCObject import SCObject -from .SCMenu import SCMenu -from .SCElement import SCElement -from .SCMenuHolder import SCMenuHolder -from .SCTerminal import SCTerminal -from .SCCustomMenu import SCCustomMenu -from .SCEmoteMenu import SCEmoteMenu -from .SCStaticTextTerminal import SCStaticTextTerminal -from .SCGMTextTerminal import SCGMTextTerminal -from .SCCustomTerminal import SCCustomTerminal -from .SCEmoteTerminal import SCEmoteTerminal from .SCColorScheme import SCColorScheme +from .SCCustomMenu import SCCustomMenu +from .SCCustomTerminal import SCCustomTerminal +from .SCElement import SCElement +from .SCEmoteMenu import SCEmoteMenu +from .SCEmoteTerminal import SCEmoteTerminal +from .SCGMTextTerminal import SCGMTextTerminal +from .SCMenu import SCMenu +from .SCMenuHolder import SCMenuHolder +from .SCObject import SCObject +from .SCStaticTextTerminal import SCStaticTextTerminal +from .SCTerminal import SCTerminal diff --git a/otp/status/StatusDatabase.py b/otp/status/StatusDatabase.py index 75083a8..819ae65 100644 --- a/otp/status/StatusDatabase.py +++ b/otp/status/StatusDatabase.py @@ -1,9 +1,12 @@ import datetime import time -from direct.distributed.DistributedObjectGlobal import DistributedObjectGlobal + from direct.directnotify.DirectNotifyGlobal import directNotify +from direct.distributed.DistributedObjectGlobal import DistributedObjectGlobal + from otp.otpbase import OTPLocalizer + class StatusDatabase(DistributedObjectGlobal): notify = directNotify.newCategory('StatusDatabase') diff --git a/otp/status/StatusDatabaseUD.py b/otp/status/StatusDatabaseUD.py index 60884fd..afcbd0f 100644 --- a/otp/status/StatusDatabaseUD.py +++ b/otp/status/StatusDatabaseUD.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectUD import DistributedObjectUD + class StatusDatabaseUD(DistributedObjectUD): notify = DirectNotifyGlobal.directNotify.newCategory('StatusDatabaseUD') diff --git a/otp/uberdog/AccountDetailRecord.py b/otp/uberdog/AccountDetailRecord.py index 7969f13..e04c15d 100644 --- a/otp/uberdog/AccountDetailRecord.py +++ b/otp/uberdog/AccountDetailRecord.py @@ -1,5 +1,6 @@ from otp.otpbase import OTPGlobals + class SubDetailRecord: def __init__(self): diff --git a/otp/uberdog/DistributedChatManager.py b/otp/uberdog/DistributedChatManager.py index 02053a5..0f5ead2 100644 --- a/otp/uberdog/DistributedChatManager.py +++ b/otp/uberdog/DistributedChatManager.py @@ -1,8 +1,11 @@ +from panda3d.otp import WhisperPopup + from direct.distributed.DistributedObject import DistributedObject from direct.distributed.DistributedObjectGlobal import DistributedObjectGlobal -from panda3d.otp import WhisperPopup + from otp.otpbase import OTPGlobals + class DistributedChatManager(DistributedObjectGlobal): def __init__(self, cr): diff --git a/otp/uberdog/DistributedChatManagerAI.py b/otp/uberdog/DistributedChatManagerAI.py index 5182697..6f988a3 100644 --- a/otp/uberdog/DistributedChatManagerAI.py +++ b/otp/uberdog/DistributedChatManagerAI.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectAI import DistributedObjectAI + class DistributedChatManagerAI(DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedChatManagerAI') diff --git a/otp/uberdog/DistributedChatManagerUD.py b/otp/uberdog/DistributedChatManagerUD.py index b59eeb9..56e5d71 100644 --- a/otp/uberdog/DistributedChatManagerUD.py +++ b/otp/uberdog/DistributedChatManagerUD.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectUD import DistributedObjectUD + class DistributedChatManagerUD(DistributedObjectUD): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedChatManagerUD') diff --git a/otp/uberdog/OtpAvatarManager.py b/otp/uberdog/OtpAvatarManager.py index 645bfd8..2c461fb 100644 --- a/otp/uberdog/OtpAvatarManager.py +++ b/otp/uberdog/OtpAvatarManager.py @@ -1,6 +1,8 @@ -from pickle import loads, dumps -from direct.distributed import DistributedObject +from pickle import dumps, loads + from direct.directnotify import DirectNotifyGlobal +from direct.distributed import DistributedObject + notify = DirectNotifyGlobal.directNotify.newCategory('AvatarManager') class OtpAvatarManager(DistributedObject.DistributedObject): diff --git a/otp/uberdog/OtpAvatarManagerAI.py b/otp/uberdog/OtpAvatarManagerAI.py index 2d77d36..6ed5974 100644 --- a/otp/uberdog/OtpAvatarManagerAI.py +++ b/otp/uberdog/OtpAvatarManagerAI.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectAI import DistributedObjectAI + class OtpAvatarManagerAI(DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('OtpAvatarManagerAI') diff --git a/otp/uberdog/OtpAvatarManagerUD.py b/otp/uberdog/OtpAvatarManagerUD.py index 5d1b21f..95885dd 100644 --- a/otp/uberdog/OtpAvatarManagerUD.py +++ b/otp/uberdog/OtpAvatarManagerUD.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectUD import DistributedObjectUD + class OtpAvatarManagerUD(DistributedObjectUD): notify = DirectNotifyGlobal.directNotify.newCategory('OtpAvatarManagerUD') diff --git a/otp/uberdog/SpeedchatRelay.py b/otp/uberdog/SpeedchatRelay.py index 30d7997..334c2ca 100644 --- a/otp/uberdog/SpeedchatRelay.py +++ b/otp/uberdog/SpeedchatRelay.py @@ -1,8 +1,10 @@ -from direct.distributed.DistributedObjectGlobal import DistributedObjectGlobal from direct.directnotify.DirectNotifyGlobal import directNotify +from direct.distributed.DistributedObjectGlobal import DistributedObjectGlobal + from otp.otpbase import OTPGlobals from otp.uberdog import SpeedchatRelayGlobals + class SpeedchatRelay(DistributedObjectGlobal): def __init__(self, cr): diff --git a/otp/uberdog/SpeedchatRelayUD.py b/otp/uberdog/SpeedchatRelayUD.py index 8cdbba7..ef6b5fa 100644 --- a/otp/uberdog/SpeedchatRelayUD.py +++ b/otp/uberdog/SpeedchatRelayUD.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectUD import DistributedObjectUD + class SpeedchatRelayUD(DistributedObjectUD): notify = DirectNotifyGlobal.directNotify.newCategory('SpeedchatRelayUD') diff --git a/otp/web/SettingsMgr.py b/otp/web/SettingsMgr.py index 18ff3c7..dbd1d83 100644 --- a/otp/web/SettingsMgr.py +++ b/otp/web/SettingsMgr.py @@ -1,7 +1,9 @@ -from direct.distributed.DistributedObjectGlobal import DistributedObjectGlobal from direct.directnotify.DirectNotifyGlobal import directNotify +from direct.distributed.DistributedObjectGlobal import DistributedObjectGlobal + from otp.web.SettingsMgrBase import SettingsMgrBase + class SettingsMgr(DistributedObjectGlobal, SettingsMgrBase): notify = directNotify.newCategory('SettingsMgr') diff --git a/otp/web/SettingsMgrAI.py b/otp/web/SettingsMgrAI.py index afee637..4c3cf85 100644 --- a/otp/web/SettingsMgrAI.py +++ b/otp/web/SettingsMgrAI.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectAI import DistributedObjectAI + class SettingsMgrAI(DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('SettingsMgrAI') diff --git a/otp/web/SettingsMgrBase.py b/otp/web/SettingsMgrBase.py index f51784c..ee2acaf 100644 --- a/otp/web/SettingsMgrBase.py +++ b/otp/web/SettingsMgrBase.py @@ -1,5 +1,6 @@ from direct.directnotify.DirectNotifyGlobal import directNotify + class SettingsMgrBase: notify = directNotify.newCategory('SettingsMgrBase') diff --git a/otp/web/SettingsMgrUD.py b/otp/web/SettingsMgrUD.py index cc6689d..49fc63a 100644 --- a/otp/web/SettingsMgrUD.py +++ b/otp/web/SettingsMgrUD.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectUD import DistributedObjectUD + class SettingsMgrUD(DistributedObjectUD): notify = DirectNotifyGlobal.directNotify.newCategory('SettingsMgrUD') diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..52df711 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,14 @@ +[tool.isort] + # Limit length of import statements + line_length = 120 + + # Import order + # Import from low level on top (Python) all the way down to high level on bottom (Toontown) + known_panda = ['panda3d'] + known_direct = ['direct'] + known_otp = ['otp'] + known_toontown = ['toontown'] + sections = ['FUTURE', 'STDLIB', 'PANDA', 'DIRECT', 'THIRDPARTY', 'OTP', 'TOONTOWN', 'LOCALFOLDER'] + + # Put any files here which may have custom import orders to skip + skip = ['toontown/ai/HolidayManagerAI.py'] \ No newline at end of file diff --git a/toontown/ai/AIStart.py b/toontown/ai/AIStart.py index 8d7d3ac..a6b7dc1 100644 --- a/toontown/ai/AIStart.py +++ b/toontown/ai/AIStart.py @@ -1,7 +1,7 @@ -from panda3d.core import * +import argparse import builtins -import argparse +from panda3d.core import * parser = argparse.ArgumentParser(description='Open Toontown - AI Server') parser.add_argument('--base-channel', help='The base channel that the server will use.') @@ -41,6 +41,7 @@ class game: builtins.game = game from otp.ai.AIBaseGlobal import * + from toontown.ai.ToontownAIRepository import ToontownAIRepository from toontown.toonbase import TTLocalizer diff --git a/toontown/ai/BlackCatHolidayMgrAI.py b/toontown/ai/BlackCatHolidayMgrAI.py index 41018c5..70ad31b 100644 --- a/toontown/ai/BlackCatHolidayMgrAI.py +++ b/toontown/ai/BlackCatHolidayMgrAI.py @@ -1,7 +1,9 @@ from direct.directnotify import DirectNotifyGlobal + from toontown.ai import HolidayBaseAI from toontown.toonbase import ToontownGlobals + class BlackCatHolidayMgrAI(HolidayBaseAI.HolidayBaseAI): notify = DirectNotifyGlobal.directNotify.newCategory( 'BlackCatHolidayMgrAI') @@ -15,4 +17,4 @@ class BlackCatHolidayMgrAI(HolidayBaseAI.HolidayBaseAI): bboard.post(BlackCatHolidayMgrAI.PostName) def stop(self): - bboard.remove(BlackCatHolidayMgrAI.PostName) \ No newline at end of file + bboard.remove(BlackCatHolidayMgrAI.PostName) diff --git a/toontown/ai/CrashedLeaderBoardDecorator.py b/toontown/ai/CrashedLeaderBoardDecorator.py index e55b20c..286cfbe 100644 --- a/toontown/ai/CrashedLeaderBoardDecorator.py +++ b/toontown/ai/CrashedLeaderBoardDecorator.py @@ -1,11 +1,15 @@ +from panda3d.core import CSDefault, NodePath, TransformState, TransparencyAttrib, Vec4 +from panda3d.toontown import loadDNAFile + from direct.directnotify import DirectNotifyGlobal from direct.distributed.ClockDelta import * from direct.interval.IntervalGlobal import * -from . import HolidayDecorator -from toontown.toonbase import ToontownGlobals -from panda3d.core import Vec4, CSDefault, TransformState, NodePath, TransparencyAttrib -from panda3d.toontown import loadDNAFile + from toontown.hood import GSHood +from toontown.toonbase import ToontownGlobals + +from . import HolidayDecorator + class CrashedLeaderBoardDecorator(HolidayDecorator.HolidayDecorator): notify = DirectNotifyGlobal.directNotify.newCategory('CrashedLeaderBoardDecorator') diff --git a/toontown/ai/DatabaseObject.py b/toontown/ai/DatabaseObject.py index 365f23f..4bce9ce 100644 --- a/toontown/ai/DatabaseObject.py +++ b/toontown/ai/DatabaseObject.py @@ -1,10 +1,15 @@ +import types + from panda3d.core import * -from .ToontownAIMsgTypes import * + from direct.directnotify.DirectNotifyGlobal import * -from toontown.toon import DistributedToonAI from direct.distributed.PyDatagram import PyDatagram from direct.distributed.PyDatagramIterator import PyDatagramIterator -import types + +from toontown.toon import DistributedToonAI + +from .ToontownAIMsgTypes import * + class DatabaseObject: notify = directNotify.newCategory('DatabaseObject') diff --git a/toontown/ai/DistributedBlackCatMgr.py b/toontown/ai/DistributedBlackCatMgr.py index a39a37e..18fcf3c 100644 --- a/toontown/ai/DistributedBlackCatMgr.py +++ b/toontown/ai/DistributedBlackCatMgr.py @@ -1,8 +1,10 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed import DistributedObject from direct.interval.IntervalGlobal import * + from toontown.effects import DustCloud + def getDustCloudIval(toon): dustCloud = DustCloud.DustCloud(fBillboard=0) dustCloud.setBillboardAxis(2.0) diff --git a/toontown/ai/DistributedBlackCatMgrAI.py b/toontown/ai/DistributedBlackCatMgrAI.py index 1ab8c8f..cfe9cd5 100644 --- a/toontown/ai/DistributedBlackCatMgrAI.py +++ b/toontown/ai/DistributedBlackCatMgrAI.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectAI import DistributedObjectAI + class DistributedBlackCatMgrAI(DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedBlackCatMgrAI') diff --git a/toontown/ai/DistributedGreenToonEffectMgr.py b/toontown/ai/DistributedGreenToonEffectMgr.py index 2046332..d61abb5 100644 --- a/toontown/ai/DistributedGreenToonEffectMgr.py +++ b/toontown/ai/DistributedGreenToonEffectMgr.py @@ -1,9 +1,12 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed import DistributedObject from direct.interval.IntervalGlobal import * + from otp.speedchat import SpeedChatGlobals + from toontown.toonbase import TTLocalizer + class DistributedGreenToonEffectMgr(DistributedObject.DistributedObject): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedGreenToonEffectMgr') diff --git a/toontown/ai/DistributedGreenToonEffectMgrAI.py b/toontown/ai/DistributedGreenToonEffectMgrAI.py index e7a495c..af01ac6 100644 --- a/toontown/ai/DistributedGreenToonEffectMgrAI.py +++ b/toontown/ai/DistributedGreenToonEffectMgrAI.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectAI import DistributedObjectAI + class DistributedGreenToonEffectMgrAI(DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedGreenToonEffectMgrAI') diff --git a/toontown/ai/DistributedHydrantZeroMgr.py b/toontown/ai/DistributedHydrantZeroMgr.py index f951882..c101588 100644 --- a/toontown/ai/DistributedHydrantZeroMgr.py +++ b/toontown/ai/DistributedHydrantZeroMgr.py @@ -1,7 +1,9 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed import DistributedObject + from toontown.ai import DistributedPhaseEventMgr + class DistributedHydrantZeroMgr(DistributedPhaseEventMgr.DistributedPhaseEventMgr): neverDisable = 1 notify = DirectNotifyGlobal.directNotify.newCategory('DistributedHydrantZeroMgr') diff --git a/toontown/ai/DistributedHydrantZeroMgrAI.py b/toontown/ai/DistributedHydrantZeroMgrAI.py index 83d19ba..7cf8984 100644 --- a/toontown/ai/DistributedHydrantZeroMgrAI.py +++ b/toontown/ai/DistributedHydrantZeroMgrAI.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectAI import DistributedObjectAI + class DistributedHydrantZeroMgrAI(DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedHydrantZeroMgrAI') diff --git a/toontown/ai/DistributedMailboxZeroMgr.py b/toontown/ai/DistributedMailboxZeroMgr.py index 71058c1..10d827b 100644 --- a/toontown/ai/DistributedMailboxZeroMgr.py +++ b/toontown/ai/DistributedMailboxZeroMgr.py @@ -1,7 +1,9 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed import DistributedObject + from toontown.ai import DistributedPhaseEventMgr + class DistributedMailboxZeroMgr(DistributedPhaseEventMgr.DistributedPhaseEventMgr): neverDisable = 1 notify = DirectNotifyGlobal.directNotify.newCategory('DistributedMailboxZeroMgr') diff --git a/toontown/ai/DistributedMailboxZeroMgrAI.py b/toontown/ai/DistributedMailboxZeroMgrAI.py index c508ba3..c1836a2 100644 --- a/toontown/ai/DistributedMailboxZeroMgrAI.py +++ b/toontown/ai/DistributedMailboxZeroMgrAI.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectAI import DistributedObjectAI + class DistributedMailboxZeroMgrAI(DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedMailboxZeroMgrAI') diff --git a/toontown/ai/DistributedPhaseEventMgr.py b/toontown/ai/DistributedPhaseEventMgr.py index 5ec42fe..c0a5261 100644 --- a/toontown/ai/DistributedPhaseEventMgr.py +++ b/toontown/ai/DistributedPhaseEventMgr.py @@ -1,6 +1,8 @@ +import datetime + from direct.directnotify import DirectNotifyGlobal from direct.distributed import DistributedObject -import datetime + class DistributedPhaseEventMgr(DistributedObject.DistributedObject): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedPhaseEventMgr') diff --git a/toontown/ai/DistributedPhaseEventMgrAI.py b/toontown/ai/DistributedPhaseEventMgrAI.py index 907995f..9e3ee6b 100644 --- a/toontown/ai/DistributedPhaseEventMgrAI.py +++ b/toontown/ai/DistributedPhaseEventMgrAI.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectAI import DistributedObjectAI + class DistributedPhaseEventMgrAI(DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedPhaseEventMgrAI') diff --git a/toontown/ai/DistributedPolarPlaceEffectMgr.py b/toontown/ai/DistributedPolarPlaceEffectMgr.py index 0c30fee..fa38deb 100644 --- a/toontown/ai/DistributedPolarPlaceEffectMgr.py +++ b/toontown/ai/DistributedPolarPlaceEffectMgr.py @@ -1,9 +1,12 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed import DistributedObject from direct.interval.IntervalGlobal import * + from otp.speedchat import SpeedChatGlobals + from toontown.toonbase import TTLocalizer + class DistributedPolarPlaceEffectMgr(DistributedObject.DistributedObject): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedPolarPlaceEffectMgr') diff --git a/toontown/ai/DistributedPolarPlaceEffectMgrAI.py b/toontown/ai/DistributedPolarPlaceEffectMgrAI.py index 4320ac2..5ec6bbb 100644 --- a/toontown/ai/DistributedPolarPlaceEffectMgrAI.py +++ b/toontown/ai/DistributedPolarPlaceEffectMgrAI.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectAI import DistributedObjectAI + class DistributedPolarPlaceEffectMgrAI(DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedPolarPlaceEffectMgrAI') diff --git a/toontown/ai/DistributedResistanceEmoteMgr.py b/toontown/ai/DistributedResistanceEmoteMgr.py index cec26df..f662d4e 100644 --- a/toontown/ai/DistributedResistanceEmoteMgr.py +++ b/toontown/ai/DistributedResistanceEmoteMgr.py @@ -1,9 +1,12 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed import DistributedObject from direct.interval.IntervalGlobal import * -from otp.speedchat import SpeedChatGlobals + from otp.otpbase.OTPLocalizerEnglish import EmoteFuncDict +from otp.speedchat import SpeedChatGlobals + from toontown.toonbase import TTLocalizer + RESIST_INDEX = EmoteFuncDict['Resistance Salute'] class DistributedResistanceEmoteMgr(DistributedObject.DistributedObject): diff --git a/toontown/ai/DistributedResistanceEmoteMgrAI.py b/toontown/ai/DistributedResistanceEmoteMgrAI.py index f961933..e759f4a 100644 --- a/toontown/ai/DistributedResistanceEmoteMgrAI.py +++ b/toontown/ai/DistributedResistanceEmoteMgrAI.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectAI import DistributedObjectAI + class DistributedResistanceEmoteMgrAI(DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedResistanceEmoteMgrAI') diff --git a/toontown/ai/DistributedScavengerHuntTarget.py b/toontown/ai/DistributedScavengerHuntTarget.py index 3406e2a..e0671fb 100644 --- a/toontown/ai/DistributedScavengerHuntTarget.py +++ b/toontown/ai/DistributedScavengerHuntTarget.py @@ -1,7 +1,9 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed import DistributedObject + from otp.speedchat import SpeedChatGlobals + class DistributedScavengerHuntTarget(DistributedObject.DistributedObject): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedScavengerHuntTarget') diff --git a/toontown/ai/DistributedScavengerHuntTargetAI.py b/toontown/ai/DistributedScavengerHuntTargetAI.py index 78ecc39..173e638 100644 --- a/toontown/ai/DistributedScavengerHuntTargetAI.py +++ b/toontown/ai/DistributedScavengerHuntTargetAI.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectAI import DistributedObjectAI + class DistributedScavengerHuntTargetAI(DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedScavengerHuntTarget') diff --git a/toontown/ai/DistributedSillyMeterMgr.py b/toontown/ai/DistributedSillyMeterMgr.py index a45f474..02f008b 100644 --- a/toontown/ai/DistributedSillyMeterMgr.py +++ b/toontown/ai/DistributedSillyMeterMgr.py @@ -1,7 +1,10 @@ +import time + from direct.directnotify import DirectNotifyGlobal from direct.distributed import DistributedObject + from toontown.ai import DistributedPhaseEventMgr -import time + class DistributedSillyMeterMgr(DistributedPhaseEventMgr.DistributedPhaseEventMgr): neverDisable = 1 diff --git a/toontown/ai/DistributedSillyMeterMgrAI.py b/toontown/ai/DistributedSillyMeterMgrAI.py index f046ef2..81c03f3 100644 --- a/toontown/ai/DistributedSillyMeterMgrAI.py +++ b/toontown/ai/DistributedSillyMeterMgrAI.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectAI import DistributedObjectAI + class DistributedSillyMeterMgrAI(DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedSillyMeterMgrAI') diff --git a/toontown/ai/DistributedTrashcanZeroMgr.py b/toontown/ai/DistributedTrashcanZeroMgr.py index 9dd7a2e..e336fdf 100644 --- a/toontown/ai/DistributedTrashcanZeroMgr.py +++ b/toontown/ai/DistributedTrashcanZeroMgr.py @@ -1,7 +1,9 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed import DistributedObject + from toontown.ai import DistributedPhaseEventMgr + class DistributedTrashcanZeroMgr(DistributedPhaseEventMgr.DistributedPhaseEventMgr): neverDisable = 1 notify = DirectNotifyGlobal.directNotify.newCategory('DistributedTrashcanZeroMgr') diff --git a/toontown/ai/DistributedTrashcanZeroMgrAI.py b/toontown/ai/DistributedTrashcanZeroMgrAI.py index 86df21e..de617ee 100644 --- a/toontown/ai/DistributedTrashcanZeroMgrAI.py +++ b/toontown/ai/DistributedTrashcanZeroMgrAI.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectAI import DistributedObjectAI + class DistributedTrashcanZeroMgrAI(DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedTrashcanZeroMgrAI') diff --git a/toontown/ai/DistributedTrickOrTreatTarget.py b/toontown/ai/DistributedTrickOrTreatTarget.py index c5340ce..50ba444 100644 --- a/toontown/ai/DistributedTrickOrTreatTarget.py +++ b/toontown/ai/DistributedTrickOrTreatTarget.py @@ -1,8 +1,11 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed import DistributedObject + from otp.speedchat import SpeedChatGlobals + from . import DistributedScavengerHuntTarget + class DistributedTrickOrTreatTarget(DistributedScavengerHuntTarget.DistributedScavengerHuntTarget): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedTrickOrTreatTarget') diff --git a/toontown/ai/DistributedTrickOrTreatTargetAI.py b/toontown/ai/DistributedTrickOrTreatTargetAI.py index de934ca..a403344 100644 --- a/toontown/ai/DistributedTrickOrTreatTargetAI.py +++ b/toontown/ai/DistributedTrickOrTreatTargetAI.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectAI import DistributedObjectAI + class DistributedTrickOrTreatTargetAI(DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedTrickOrTreatTargetAI') diff --git a/toontown/ai/DistributedWinterCarolingTarget.py b/toontown/ai/DistributedWinterCarolingTarget.py index fe861e1..8470f63 100644 --- a/toontown/ai/DistributedWinterCarolingTarget.py +++ b/toontown/ai/DistributedWinterCarolingTarget.py @@ -1,8 +1,11 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed import DistributedObject + from toontown.speedchat.TTSCIndexedTerminal import TTSCIndexedMsgEvent + from . import DistributedScavengerHuntTarget + class DistributedWinterCarolingTarget(DistributedScavengerHuntTarget.DistributedScavengerHuntTarget): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedWinterCarolingTarget') diff --git a/toontown/ai/DistributedWinterCarolingTargetAI.py b/toontown/ai/DistributedWinterCarolingTargetAI.py index 21e9a26..aaec7ba 100644 --- a/toontown/ai/DistributedWinterCarolingTargetAI.py +++ b/toontown/ai/DistributedWinterCarolingTargetAI.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectAI import DistributedObjectAI + class DistributedWinterCarolingTargetAI(DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedWinterCarolingTargetAI') diff --git a/toontown/ai/HalloweenHolidayDecorator.py b/toontown/ai/HalloweenHolidayDecorator.py index 4d94de1..260b3ac 100644 --- a/toontown/ai/HalloweenHolidayDecorator.py +++ b/toontown/ai/HalloweenHolidayDecorator.py @@ -1,13 +1,17 @@ +from panda3d.core import CSDefault, NodePath, TransformState, TransparencyAttrib, Vec4 +from panda3d.toontown import loadDNAFile + from direct.directnotify import DirectNotifyGlobal from direct.distributed.ClockDelta import * from direct.interval.IntervalGlobal import * -from . import HolidayDecorator -from toontown.toonbase import ToontownGlobals -from toontown.safezone import Playground -from toontown.town import Street + from toontown.estate import Estate -from panda3d.core import Vec4, CSDefault, TransformState, NodePath, TransparencyAttrib -from panda3d.toontown import loadDNAFile +from toontown.safezone import Playground +from toontown.toonbase import ToontownGlobals +from toontown.town import Street + +from . import HolidayDecorator + class HalloweenHolidayDecorator(HolidayDecorator.HolidayDecorator): notify = DirectNotifyGlobal.directNotify.newCategory('HalloweenHolidayDecorator') diff --git a/toontown/ai/HolidayBaseAI.py b/toontown/ai/HolidayBaseAI.py index 2578e36..2582474 100644 --- a/toontown/ai/HolidayBaseAI.py +++ b/toontown/ai/HolidayBaseAI.py @@ -1,8 +1,11 @@ -from direct.directnotify import DirectNotifyGlobal import random + +from direct.directnotify import DirectNotifyGlobal from direct.task import Task + from toontown.effects import DistributedFireworkShowAI + class HolidayBaseAI: def __init__(self, air, holidayId): diff --git a/toontown/ai/HolidayDecorator.py b/toontown/ai/HolidayDecorator.py index 73bae17..943161f 100644 --- a/toontown/ai/HolidayDecorator.py +++ b/toontown/ai/HolidayDecorator.py @@ -1,8 +1,11 @@ -from toontown.toonbase import ToontownGlobals -from direct.interval.IntervalGlobal import Parallel, Sequence, Func, Wait -from panda3d.core import Vec4, CSDefault, TransformState, NodePath, TransparencyAttrib +from panda3d.core import CSDefault, NodePath, TransformState, TransparencyAttrib, Vec4 from panda3d.toontown import loadDNAFile +from direct.interval.IntervalGlobal import Func, Parallel, Sequence, Wait + +from toontown.toonbase import ToontownGlobals + + class HolidayDecorator: def __init__(self): diff --git a/toontown/ai/NewsManager.py b/toontown/ai/NewsManager.py index 8f70730..17febe9 100644 --- a/toontown/ai/NewsManager.py +++ b/toontown/ai/NewsManager.py @@ -1,17 +1,18 @@ -from panda3d.core import * -from direct.distributed import DistributedObject -from direct.directnotify import DirectNotifyGlobal -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import ToontownBattleGlobals -from toontown.battle import SuitBattleGlobals -from toontown.toonbase import TTLocalizer -from . import HolidayDecorator -from . import HalloweenHolidayDecorator -from . import CrashedLeaderBoardDecorator -from direct.interval.IntervalGlobal import * import calendar from copy import deepcopy + +from panda3d.core import * + +from direct.directnotify import DirectNotifyGlobal +from direct.distributed import DistributedObject +from direct.interval.IntervalGlobal import * + +from toontown.battle import SuitBattleGlobals from toontown.speedchat import TTSCJellybeanJamMenu +from toontown.toonbase import ToontownBattleGlobals, ToontownGlobals, TTLocalizer + +from . import CrashedLeaderBoardDecorator, HalloweenHolidayDecorator, HolidayDecorator + decorationHolidays = [ToontownGlobals.WINTER_DECORATIONS, ToontownGlobals.WACKY_WINTER_DECORATIONS, ToontownGlobals.HALLOWEEN_PROPS, diff --git a/toontown/ai/NewsManagerAI.py b/toontown/ai/NewsManagerAI.py index 67e5d56..71decbb 100644 --- a/toontown/ai/NewsManagerAI.py +++ b/toontown/ai/NewsManagerAI.py @@ -1,6 +1,7 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectAI import DistributedObjectAI + class NewsManagerAI(DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('NewsManagerAI') diff --git a/toontown/ai/ToonBarrier.py b/toontown/ai/ToonBarrier.py index 14e18c6..cb103da 100644 --- a/toontown/ai/ToonBarrier.py +++ b/toontown/ai/ToonBarrier.py @@ -1,8 +1,11 @@ -from otp.ai.AIBase import * -from direct.task import Task -from direct.showbase import DirectObject import random +from direct.showbase import DirectObject +from direct.task import Task + +from otp.ai.AIBase import * + + class ToonBarrier(DirectObject.DirectObject): notify = directNotify.newCategory('ToonBarrier') diff --git a/toontown/ai/ToontownAIMsgTypes.py b/toontown/ai/ToontownAIMsgTypes.py index 6b37e20..6f94a6f 100644 --- a/toontown/ai/ToontownAIMsgTypes.py +++ b/toontown/ai/ToontownAIMsgTypes.py @@ -1,4 +1,5 @@ from otp.ai.AIMsgTypes import * + TTAIMsgName2Id = {'DBSERVER_GET_ESTATE': 1040, 'DBSERVER_GET_ESTATE_RESP': 1041, 'PARTY_MANAGER_UD_TO_ALL_AI': 1042, diff --git a/toontown/ai/ToontownAIRepository.py b/toontown/ai/ToontownAIRepository.py index 19e549c..4b08614 100644 --- a/toontown/ai/ToontownAIRepository.py +++ b/toontown/ai/ToontownAIRepository.py @@ -1,10 +1,14 @@ -from direct.directnotify import DirectNotifyGlobal +import os + from panda3d.core import * from panda3d.toontown import * +from direct.directnotify import DirectNotifyGlobal + from otp.ai.AIZoneData import AIZoneDataStore from otp.ai.TimeManagerAI import TimeManagerAI from otp.distributed.OtpDoGlobals import * + from toontown.ai.HolidayManagerAI import HolidayManagerAI from toontown.ai.NewsManagerAI import NewsManagerAI from toontown.ai.WelcomeValleyManagerAI import WelcomeValleyManagerAI @@ -19,11 +23,12 @@ from toontown.coghq.PromotionManagerAI import PromotionManagerAI from toontown.distributed.ToontownDistrictAI import ToontownDistrictAI from toontown.distributed.ToontownDistrictStatsAI import ToontownDistrictStatsAI from toontown.distributed.ToontownInternalRepository import ToontownInternalRepository +from toontown.fishing.DistributedFishingPondAI import DistributedFishingPondAI from toontown.hood import ZoneUtil -from toontown.hood.BRHoodDataAI import BRHoodDataAI from toontown.hood.BossbotHQDataAI import BossbotHQDataAI -from toontown.hood.CSHoodDataAI import CSHoodDataAI +from toontown.hood.BRHoodDataAI import BRHoodDataAI from toontown.hood.CashbotHQDataAI import CashbotHQDataAI +from toontown.hood.CSHoodDataAI import CSHoodDataAI from toontown.hood.DDHoodDataAI import DDHoodDataAI from toontown.hood.DGHoodDataAI import DGHoodDataAI from toontown.hood.DLHoodDataAI import DLHoodDataAI @@ -36,14 +41,11 @@ from toontown.hood.TTHoodDataAI import TTHoodDataAI from toontown.pets.PetManagerAI import PetManagerAI from toontown.quest.QuestManagerAI import QuestManagerAI from toontown.racing import RaceGlobals -from toontown.fishing.DistributedFishingPondAI import DistributedFishingPondAI from toontown.racing.DistributedLeaderBoardAI import DistributedLeaderBoardAI from toontown.racing.DistributedRacePadAI import DistributedRacePadAI -from toontown.racing.DistributedStartingBlockAI import DistributedStartingBlockAI -from toontown.racing.DistributedStartingBlockAI import DistributedViewingBlockAI +from toontown.racing.DistributedStartingBlockAI import DistributedStartingBlockAI, DistributedViewingBlockAI from toontown.racing.DistributedViewPadAI import DistributedViewPadAI from toontown.racing.RaceManagerAI import RaceManagerAI -from toontown.uberdog.DistributedPartyManagerAI import DistributedPartyManagerAI from toontown.safezone.SafeZoneManagerAI import SafeZoneManagerAI from toontown.shtiker.CogPageManagerAI import CogPageManagerAI from toontown.spellbook.ToontownMagicWordManagerAI import ToontownMagicWordManagerAI @@ -52,7 +54,7 @@ from toontown.toon import NPCToons from toontown.toonbase import ToontownGlobals from toontown.tutorial.TutorialManagerAI import TutorialManagerAI from toontown.uberdog.DistributedInGameNewsMgrAI import DistributedInGameNewsMgrAI -import os +from toontown.uberdog.DistributedPartyManagerAI import DistributedPartyManagerAI class ToontownAIRepository(ToontownInternalRepository): diff --git a/toontown/ai/WelcomeValleyManager.py b/toontown/ai/WelcomeValleyManager.py index 1a73d48..7243ace 100644 --- a/toontown/ai/WelcomeValleyManager.py +++ b/toontown/ai/WelcomeValleyManager.py @@ -1,9 +1,12 @@ from panda3d.core import * -from direct.distributed import DistributedObject + from direct.directnotify import DirectNotifyGlobal -from toontown.toonbase import ToontownGlobals +from direct.distributed import DistributedObject from direct.showbase import PythonUtil +from toontown.toonbase import ToontownGlobals + + class WelcomeValleyManager(DistributedObject.DistributedObject): notify = DirectNotifyGlobal.directNotify.newCategory('WelcomeValleyManager') neverDisable = 1 diff --git a/toontown/battle/BattleBase.py b/toontown/battle/BattleBase.py index eb08e4f..b3b455b 100644 --- a/toontown/battle/BattleBase.py +++ b/toontown/battle/BattleBase.py @@ -1,10 +1,14 @@ -from panda3d.core import * -from toontown.toonbase.ToontownBattleGlobals import * -from direct.task.Timer import * import functools + +from panda3d.core import * + from direct.directnotify import DirectNotifyGlobal +from direct.task.Timer import * + from toontown.toon import NPCToons from toontown.toonbase import TTLocalizer +from toontown.toonbase.ToontownBattleGlobals import * + TOON_ID_COL = 0 TOON_TRACK_COL = 1 TOON_LVL_COL = 2 diff --git a/toontown/battle/BattleCalculatorAI.py b/toontown/battle/BattleCalculatorAI.py index 0ed39aa..a497094 100644 --- a/toontown/battle/BattleCalculatorAI.py +++ b/toontown/battle/BattleCalculatorAI.py @@ -1,13 +1,16 @@ -from .BattleBase import * -from .DistributedBattleAI import * -from toontown.toonbase.ToontownBattleGlobals import * import random -from toontown.suit import DistributedSuitBaseAI -from . import SuitBattleGlobals, BattleExperienceAI -from toontown.toon import NPCToons -from toontown.pets import PetTricks, DistributedPetProxyAI + from direct.showbase.PythonUtil import lerp +from toontown.pets import DistributedPetProxyAI, PetTricks +from toontown.suit import DistributedSuitBaseAI +from toontown.toon import NPCToons +from toontown.toonbase.ToontownBattleGlobals import * + +from . import BattleExperienceAI, SuitBattleGlobals +from .BattleBase import * + + class BattleCalculatorAI: AccuracyBonuses = [ 0, 20, 40, 60] @@ -166,7 +169,7 @@ class BattleCalculatorAI: prevAtkId = self.toonAtkOrder[currAtk - 1] prevAttack = self.battle.toonAttacks[prevAtkId] prevAtkTrack = self.__getActualTrack(prevAttack) - lure = atkTrack == LURE and (not attackAffectsGroup(atkTrack, atkLevel, + lure = atkTrack == LURE and (not attackAffectsGroup(atkTrack, atkLevel, attack[TOON_TRACK_COL]) and attack[TOON_TGT_COL] in self.successfulLures or attackAffectsGroup(atkTrack, atkLevel, attack[TOON_TRACK_COL])) if atkTrack == prevAtkTrack and (attack[TOON_TGT_COL] == prevAttack[TOON_TGT_COL] or lure): if prevAttack[TOON_ACCBONUS_COL] == 1: diff --git a/toontown/battle/BattleExperience.py b/toontown/battle/BattleExperience.py index 61ce72f..df92442 100644 --- a/toontown/battle/BattleExperience.py +++ b/toontown/battle/BattleExperience.py @@ -1,5 +1,6 @@ from toontown.toonbase import ToontownBattleGlobals + def genRewardDicts(entries): toonRewardDicts = [] for toonId, origExp, earnedExp, origQuests, items, missedItems, origMerits, merits, parts in entries: diff --git a/toontown/battle/BattleExperienceAI.py b/toontown/battle/BattleExperienceAI.py index c70e991..2f78a56 100644 --- a/toontown/battle/BattleExperienceAI.py +++ b/toontown/battle/BattleExperienceAI.py @@ -1,6 +1,8 @@ from direct.directnotify import DirectNotifyGlobal -from toontown.toonbase import ToontownBattleGlobals + from toontown.suit import SuitDNA +from toontown.toonbase import ToontownBattleGlobals + BattleExperienceAINotify = DirectNotifyGlobal.directNotify.newCategory('BattleExprienceAI') def getSkillGained(toonSkillPtsGained, toonId, track): diff --git a/toontown/battle/BattleManagerAI.py b/toontown/battle/BattleManagerAI.py index 07705e2..c21431d 100644 --- a/toontown/battle/BattleManagerAI.py +++ b/toontown/battle/BattleManagerAI.py @@ -1,6 +1,8 @@ -from . import DistributedBattleAI from direct.directnotify import DirectNotifyGlobal +from . import DistributedBattleAI + + class BattleManagerAI: notify = DirectNotifyGlobal.directNotify.newCategory('BattleManagerAI') diff --git a/toontown/battle/BattleParticles.py b/toontown/battle/BattleParticles.py index 77992e6..4797e77 100644 --- a/toontown/battle/BattleParticles.py +++ b/toontown/battle/BattleParticles.py @@ -1,6 +1,8 @@ -from direct.particles.ParticleEffect import * import os + from direct.directnotify import DirectNotifyGlobal +from direct.particles.ParticleEffect import * + notify = DirectNotifyGlobal.directNotify.newCategory('BattleParticles') TutorialParticleEffects = ('gearExplosionBig.ptf', 'gearExplosionSmall.ptf', 'gearExplosion.ptf') ParticleNames = ('audit-div', 'audit-five', 'audit-four', 'audit-minus', 'audit-mult', 'audit-one', 'audit-plus', 'audit-six', 'audit-three', 'audit-two', 'blah', 'brainstorm-box', 'brainstorm-env', 'brainstorm-track', 'buzzwords-crash', 'buzzwords-inc', 'buzzwords-main', 'buzzwords-over', 'buzzwords-syn', 'confetti', 'doubletalk-double', 'doubletalk-dup', 'doubletalk-good', 'filibuster-cut', 'filibuster-fiscal', 'filibuster-impeach', 'filibuster-inc', 'jargon-brow', 'jargon-deep', 'jargon-hoop', 'jargon-ipo', 'legalese-hc', 'legalese-qpq', 'legalese-vd', 'mumbojumbo-boiler', 'mumbojumbo-creative', 'mumbojumbo-deben', 'mumbojumbo-high', 'mumbojumbo-iron', 'poundsign', 'schmooze-genius', 'schmooze-instant', 'schmooze-master', 'schmooze-viz', 'roll-o-dex', 'rollodex-card', 'dagger', 'fire', 'snow-particle', 'raindrop', 'gear', 'checkmark', 'dollar-sign', 'spark') diff --git a/toontown/battle/BattlePlace.py b/toontown/battle/BattlePlace.py index e504cf8..571246b 100644 --- a/toontown/battle/BattlePlace.py +++ b/toontown/battle/BattlePlace.py @@ -1,9 +1,10 @@ from panda3d.core import * + +from toontown.hood import Place, ZoneUtil from toontown.toon import Toon -from toontown.hood import Place -from toontown.hood import ZoneUtil from toontown.toonbase import ToontownGlobals + class BattlePlace(Place.Place): def __init__(self, loader, doneEvent): diff --git a/toontown/battle/BattleProps.py b/toontown/battle/BattleProps.py index aa29387..7ba9cb4 100644 --- a/toontown/battle/BattleProps.py +++ b/toontown/battle/BattleProps.py @@ -1,8 +1,12 @@ +import random + from panda3d.core import * + from direct.actor import Actor from direct.directnotify import DirectNotifyGlobal + from otp.otpbase import OTPGlobals -import random + Props = ((5, 'partyBall', 'partyBall'), (5, 'feather', diff --git a/toontown/battle/BattleSounds.py b/toontown/battle/BattleSounds.py index 6fb7399..fdfde59 100644 --- a/toontown/battle/BattleSounds.py +++ b/toontown/battle/BattleSounds.py @@ -1,6 +1,8 @@ from panda3d.core import * + from direct.directnotify import DirectNotifyGlobal + class BattleSounds: notify = DirectNotifyGlobal.directNotify.newCategory('BattleSounds') diff --git a/toontown/battle/DistributedBattle.py b/toontown/battle/DistributedBattle.py index 1f43358..b694797 100644 --- a/toontown/battle/DistributedBattle.py +++ b/toontown/battle/DistributedBattle.py @@ -1,19 +1,22 @@ +import random + from panda3d.core import * from panda3d.otp import * -from direct.interval.IntervalGlobal import * -from .BattleBase import * -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import ToontownBattleGlobals -from . import DistributedBattleBase -from direct.directnotify import DirectNotifyGlobal -from . import MovieUtil -from toontown.suit import Suit + from direct.actor import Actor -from toontown.toon import TTEmote +from direct.directnotify import DirectNotifyGlobal +from direct.interval.IntervalGlobal import * + from otp.avatar import Emote -from . import SuitBattleGlobals + from toontown.distributed import DelayDelete -import random +from toontown.suit import Suit +from toontown.toon import TTEmote +from toontown.toonbase import ToontownBattleGlobals, ToontownGlobals + +from . import DistributedBattleBase, MovieUtil, SuitBattleGlobals +from .BattleBase import * + class DistributedBattle(DistributedBattleBase.DistributedBattleBase): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedBattle') diff --git a/toontown/battle/DistributedBattleAI.py b/toontown/battle/DistributedBattleAI.py index 76c0ac9..852f66b 100644 --- a/toontown/battle/DistributedBattleAI.py +++ b/toontown/battle/DistributedBattleAI.py @@ -1,12 +1,17 @@ +import random + +from direct.directnotify import DirectNotifyGlobal +from direct.task import Task + from otp.ai.AIBase import * + +from toontown.toonbase.ToontownBattleGlobals import * + +from . import DistributedBattleBaseAI from .BattleBase import * from .BattleCalculatorAI import * -from toontown.toonbase.ToontownBattleGlobals import * from .SuitBattleGlobals import * -from . import DistributedBattleBaseAI -from direct.task import Task -from direct.directnotify import DirectNotifyGlobal -import random + class DistributedBattleAI(DistributedBattleBaseAI.DistributedBattleBaseAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedBattleAI') diff --git a/toontown/battle/DistributedBattleBase.py b/toontown/battle/DistributedBattleBase.py index 5e886b1..3d09f3b 100644 --- a/toontown/battle/DistributedBattleBase.py +++ b/toontown/battle/DistributedBattleBase.py @@ -15,36 +15,16 @@ from direct.task.Timer import Timer from otp.avatar.Emote import globalEmote -from toontown.battle import BattleParticles -from toontown.battle import MovieUtil -from toontown.battle.BattleBase import ( - attackAffectsGroup, - BattleBase, - BATTLE_SMALL_VALUE, - CLIENT_INPUT_TIMEOUT, - FIRE, - HEAL, - levelAffectsGroup, - LURE, - MAX_JOIN_T, - NO_ATTACK, - NO_TRAP, - NPCSOS, - PASS, - PASS_ATTACK, - PETSOS, - SOS, - TRAP, - UN_ATTACK -) - +from toontown.battle import BattleParticles, MovieUtil +from toontown.battle.BattleBase import (BATTLE_SMALL_VALUE, CLIENT_INPUT_TIMEOUT, FIRE, HEAL, LURE, MAX_JOIN_T, + NO_ATTACK, NO_TRAP, NPCSOS, PASS, PASS_ATTACK, PETSOS, SOS, TRAP, UN_ATTACK, + BattleBase, attackAffectsGroup, levelAffectsGroup) from toontown.battle.BattleProps import globalPropPool from toontown.battle.Movie import Movie from toontown.distributed.DelayDelete import DelayDelete, cleanupDelayDeletes from toontown.hood import ZoneUtil from toontown.suit.Suit import Suit -from toontown.toonbase import ToontownBattleGlobals -from toontown.toonbase import ToontownGlobals +from toontown.toonbase import ToontownBattleGlobals, ToontownGlobals from toontown.toonbase.ToonBaseGlobal import base diff --git a/toontown/battle/DistributedBattleBaseAI.py b/toontown/battle/DistributedBattleBaseAI.py index ab86a50..dcebf43 100644 --- a/toontown/battle/DistributedBattleBaseAI.py +++ b/toontown/battle/DistributedBattleBaseAI.py @@ -1,22 +1,24 @@ -from otp.ai.AIBase import * -from direct.distributed.ClockDelta import * -from .BattleBase import * -from . import BattleCalculatorAI -from toontown.toonbase.ToontownBattleGlobals import * -from .SuitBattleGlobals import * -from panda3d.core import * -from . import BattleExperienceAI -from direct.distributed import DistributedObjectAI -from direct.fsm import ClassicFSM, State -from direct.fsm import State -from direct.task import Task -from direct.directnotify import DirectNotifyGlobal -from toontown.ai import DatabaseObject -from toontown.toon import DistributedToonAI -from toontown.toon import InventoryBase -from toontown.toonbase import ToontownGlobals import random -from toontown.toon import NPCToons + +from panda3d.core import * + +from direct.directnotify import DirectNotifyGlobal +from direct.distributed import DistributedObjectAI +from direct.distributed.ClockDelta import * +from direct.fsm import ClassicFSM, State +from direct.task import Task + +from otp.ai.AIBase import * + +from toontown.ai import DatabaseObject +from toontown.toon import DistributedToonAI, InventoryBase, NPCToons +from toontown.toonbase import ToontownGlobals +from toontown.toonbase.ToontownBattleGlobals import * + +from . import BattleCalculatorAI, BattleExperienceAI +from .BattleBase import * +from .SuitBattleGlobals import * + class DistributedBattleBaseAI(DistributedObjectAI.DistributedObjectAI, BattleBase): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedBattleBaseAI') diff --git a/toontown/battle/DistributedBattleBldg.py b/toontown/battle/DistributedBattleBldg.py index 3033041..2e80b1e 100644 --- a/toontown/battle/DistributedBattleBldg.py +++ b/toontown/battle/DistributedBattleBldg.py @@ -1,20 +1,22 @@ +import random + from panda3d.core import * from panda3d.otp import * -from direct.interval.IntervalGlobal import * -from .BattleBase import * + from direct.actor import Actor -from toontown.suit import SuitDNA from direct.directnotify import DirectNotifyGlobal -from . import DistributedBattleBase -from toontown.toon import TTEmote -from otp.avatar import Emote -from toontown.toonbase import TTLocalizer -from . import MovieUtil from direct.fsm import State -from toontown.suit import Suit -from . import SuitBattleGlobals -import random -from toontown.toonbase import ToontownGlobals +from direct.interval.IntervalGlobal import * + +from otp.avatar import Emote + +from toontown.suit import Suit, SuitDNA +from toontown.toon import TTEmote +from toontown.toonbase import ToontownGlobals, TTLocalizer + +from . import DistributedBattleBase, MovieUtil, SuitBattleGlobals +from .BattleBase import * + class DistributedBattleBldg(DistributedBattleBase.DistributedBattleBase): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedBattleBldg') diff --git a/toontown/battle/DistributedBattleBldgAI.py b/toontown/battle/DistributedBattleBldgAI.py index 8aa5b87..c318d1e 100644 --- a/toontown/battle/DistributedBattleBldgAI.py +++ b/toontown/battle/DistributedBattleBldgAI.py @@ -1,17 +1,21 @@ -from otp.ai.AIBase import * +import random + +from direct.directnotify import DirectNotifyGlobal from direct.distributed.ClockDelta import * +from direct.fsm import ClassicFSM, State +from direct.showbase.PythonUtil import addListsByValue +from direct.task import Task + +from otp.ai.AIBase import * +from otp.otpbase import PythonUtil + +from toontown.toonbase.ToontownBattleGlobals import * + +from . import DistributedBattleBaseAI from .BattleBase import * from .BattleCalculatorAI import * -from toontown.toonbase.ToontownBattleGlobals import * from .SuitBattleGlobals import * -from direct.showbase.PythonUtil import addListsByValue -from . import DistributedBattleBaseAI -from direct.task import Task -from direct.directnotify import DirectNotifyGlobal -import random -from direct.fsm import State -from direct.fsm import ClassicFSM, State -from otp.otpbase import PythonUtil + class DistributedBattleBldgAI(DistributedBattleBaseAI.DistributedBattleBaseAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedBattleBldgAI') diff --git a/toontown/battle/DistributedBattleDiners.py b/toontown/battle/DistributedBattleDiners.py index 87d9241..f0bb6ac 100644 --- a/toontown/battle/DistributedBattleDiners.py +++ b/toontown/battle/DistributedBattleDiners.py @@ -1,11 +1,15 @@ import random -from panda3d.core import VBase3, Point3 -from direct.interval.IntervalGlobal import Sequence, Wait, Func, Parallel, Track, LerpPosInterval, ProjectileInterval, SoundInterval, ActorInterval + +from panda3d.core import Point3, VBase3 + from direct.directnotify import DirectNotifyGlobal -from toontown.battle import DistributedBattleFinal +from direct.interval.IntervalGlobal import (ActorInterval, Func, LerpPosInterval, Parallel, ProjectileInterval, + Sequence, SoundInterval, Track, Wait) + +from toontown.battle import BattleProps, DistributedBattleFinal from toontown.suit import SuitTimings from toontown.toonbase import ToontownGlobals -from toontown.battle import BattleProps + class DistributedBattleDiners(DistributedBattleFinal.DistributedBattleFinal): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedBattleDiners') diff --git a/toontown/battle/DistributedBattleDinersAI.py b/toontown/battle/DistributedBattleDinersAI.py index 5b689d4..bbc0090 100644 --- a/toontown/battle/DistributedBattleDinersAI.py +++ b/toontown/battle/DistributedBattleDinersAI.py @@ -1,6 +1,8 @@ from direct.directnotify import DirectNotifyGlobal + from toontown.battle import DistributedBattleFinalAI + class DistributedBattleDinersAI(DistributedBattleFinalAI.DistributedBattleFinalAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedBattleDinersAI') diff --git a/toontown/battle/DistributedBattleFinal.py b/toontown/battle/DistributedBattleFinal.py index 3f3f61b..0042ba5 100644 --- a/toontown/battle/DistributedBattleFinal.py +++ b/toontown/battle/DistributedBattleFinal.py @@ -1,18 +1,20 @@ +import random + from panda3d.core import * from panda3d.otp import * -from direct.interval.IntervalGlobal import * -from .BattleBase import * + from direct.actor import Actor -from toontown.distributed import DelayDelete from direct.directnotify import DirectNotifyGlobal -from . import DistributedBattleBase -from . import MovieUtil -from toontown.suit import Suit -from . import SuitBattleGlobals -from toontown.toonbase import ToontownBattleGlobals -from toontown.toonbase import ToontownGlobals from direct.fsm import State -import random +from direct.interval.IntervalGlobal import * + +from toontown.distributed import DelayDelete +from toontown.suit import Suit +from toontown.toonbase import ToontownBattleGlobals, ToontownGlobals + +from . import DistributedBattleBase, MovieUtil, SuitBattleGlobals +from .BattleBase import * + class DistributedBattleFinal(DistributedBattleBase.DistributedBattleBase): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedBattleFinal') diff --git a/toontown/battle/DistributedBattleFinalAI.py b/toontown/battle/DistributedBattleFinalAI.py index bb4ef70..f436ec2 100644 --- a/toontown/battle/DistributedBattleFinalAI.py +++ b/toontown/battle/DistributedBattleFinalAI.py @@ -1,14 +1,20 @@ -from otp.ai.AIBase import * -from .BattleBase import * -from .BattleCalculatorAI import * -from toontown.toonbase.ToontownBattleGlobals import * -from .SuitBattleGlobals import * -from . import DistributedBattleBaseAI -from direct.task import Task +import random +import types + from direct.directnotify import DirectNotifyGlobal from direct.fsm import State from direct.showbase.PythonUtil import addListsByValue -import random, types +from direct.task import Task + +from otp.ai.AIBase import * + +from toontown.toonbase.ToontownBattleGlobals import * + +from . import DistributedBattleBaseAI +from .BattleBase import * +from .BattleCalculatorAI import * +from .SuitBattleGlobals import * + class DistributedBattleFinalAI(DistributedBattleBaseAI.DistributedBattleBaseAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedBattleFinalAI') diff --git a/toontown/battle/DistributedBattleWaiters.py b/toontown/battle/DistributedBattleWaiters.py index f4c9613..dd52ba0 100644 --- a/toontown/battle/DistributedBattleWaiters.py +++ b/toontown/battle/DistributedBattleWaiters.py @@ -1,11 +1,15 @@ import random -from panda3d.core import VBase3, Point3 -from direct.interval.IntervalGlobal import Sequence, Wait, Func, Parallel, Track + +from panda3d.core import Point3, VBase3 + from direct.directnotify import DirectNotifyGlobal +from direct.interval.IntervalGlobal import Func, Parallel, Sequence, Track, Wait + from toontown.battle import DistributedBattleFinal from toontown.suit import SuitTimings from toontown.toonbase import ToontownGlobals + class DistributedBattleWaiters(DistributedBattleFinal.DistributedBattleFinal): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedBattleWaiters') diff --git a/toontown/battle/DistributedBattleWaitersAI.py b/toontown/battle/DistributedBattleWaitersAI.py index 66f312e..d9ba047 100644 --- a/toontown/battle/DistributedBattleWaitersAI.py +++ b/toontown/battle/DistributedBattleWaitersAI.py @@ -1,6 +1,8 @@ from direct.directnotify import DirectNotifyGlobal + from toontown.battle import DistributedBattleFinalAI + class DistributedBattleWaitersAI(DistributedBattleFinalAI.DistributedBattleFinalAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedBattleWaitersAI') diff --git a/toontown/battle/Fanfare.py b/toontown/battle/Fanfare.py index 63e13e7..3da567e 100644 --- a/toontown/battle/Fanfare.py +++ b/toontown/battle/Fanfare.py @@ -1,18 +1,19 @@ +from panda3d.core import * + +from direct.directnotify import DirectNotifyGlobal +from direct.gui.DirectGui import * from direct.interval.IntervalGlobal import * +from direct.particles.ParticleEffect import * + +from toontown.suit.SuitDNA import * +from toontown.toon.ToonDNA import * +from toontown.toonbase import ToontownGlobals + +from . import BattleParticles, MovieCamera, MovieUtil, RewardPanel from .BattleBase import * from .BattleProps import * from .BattleSounds import * -from toontown.toon.ToonDNA import * -from toontown.suit.SuitDNA import * -from direct.particles.ParticleEffect import * -from direct.gui.DirectGui import * -from panda3d.core import * -from . import MovieUtil -from . import MovieCamera -from direct.directnotify import DirectNotifyGlobal -from . import BattleParticles -from toontown.toonbase import ToontownGlobals -from . import RewardPanel + notify = DirectNotifyGlobal.directNotify.newCategory('Fanfare') def makePanel(toon, showToonName): diff --git a/toontown/battle/FireCogPanel.py b/toontown/battle/FireCogPanel.py index 078ef5c..1e98ae1 100644 --- a/toontown/battle/FireCogPanel.py +++ b/toontown/battle/FireCogPanel.py @@ -1,11 +1,13 @@ -from toontown.toonbase.ToontownBattleGlobals import * -from toontown.toonbase import ToontownGlobals -from direct.fsm import StateData -from direct.directnotify import DirectNotifyGlobal -from toontown.battle import BattleBase -from direct.gui.DirectGui import * from panda3d.core import * -from toontown.toonbase import TTLocalizer + +from direct.directnotify import DirectNotifyGlobal +from direct.fsm import StateData +from direct.gui.DirectGui import * + +from toontown.battle import BattleBase +from toontown.toonbase import ToontownGlobals, TTLocalizer +from toontown.toonbase.ToontownBattleGlobals import * + class FireCogPanel(StateData.StateData): notify = DirectNotifyGlobal.directNotify.newCategory('ChooseAvatarPanel') diff --git a/toontown/battle/HealJokes.py b/toontown/battle/HealJokes.py index 3c081bb..0048ca8 100644 --- a/toontown/battle/HealJokes.py +++ b/toontown/battle/HealJokes.py @@ -1,2 +1,3 @@ from toontown.toonbase import TTLocalizer + toonHealJokes = TTLocalizer.ToonHealJokes diff --git a/toontown/battle/Movie.py b/toontown/battle/Movie.py index e402c62..bb77def 100644 --- a/toontown/battle/Movie.py +++ b/toontown/battle/Movie.py @@ -1,36 +1,23 @@ -from toontown.toonbase.ToontownBattleGlobals import * -from .BattleBase import * -from direct.interval.IntervalGlobal import * -from direct.showbase import DirectObject -from . import MovieFire -from . import MovieSOS -from . import MovieNPCSOS -from . import MoviePetSOS -from . import MovieHeal -from . import MovieTrap -from . import MovieLure -from . import MovieSound -from . import MovieThrow -from . import MovieSquirt -from . import MovieDrop -from . import MovieSuitAttacks -from . import MovieToonVictory -from . import PlayByPlayText -from . import BattleParticles -from toontown.distributed import DelayDelete -from . import BattleExperience -from .SuitBattleGlobals import * -from direct.directnotify import DirectNotifyGlobal -from . import RewardPanel -import random -from . import MovieUtil -from toontown.toon import Toon -from toontown.toonbase import ToontownGlobals -from toontown.toontowngui import TTDialog import copy import functools -from toontown.toonbase import TTLocalizer -from toontown.toon import NPCToons +import random + +from direct.directnotify import DirectNotifyGlobal +from direct.interval.IntervalGlobal import * +from direct.showbase import DirectObject + +from toontown.distributed import DelayDelete +from toontown.toon import NPCToons, Toon +from toontown.toonbase import ToontownGlobals, TTLocalizer +from toontown.toonbase.ToontownBattleGlobals import * +from toontown.toontowngui import TTDialog + +from . import (BattleExperience, BattleParticles, MovieDrop, MovieFire, MovieHeal, MovieLure, MovieNPCSOS, MoviePetSOS, + MovieSOS, MovieSound, MovieSquirt, MovieSuitAttacks, MovieThrow, MovieToonVictory, MovieTrap, MovieUtil, + PlayByPlayText, RewardPanel) +from .BattleBase import * +from .SuitBattleGlobals import * + camPos = Point3(14, 0, 10) camHpr = Vec3(89, -30, 0) randomBattleTimestamp = base.config.GetBool('random-battle-timestamp', 0) @@ -336,8 +323,7 @@ class Movie(DirectObject.DirectObject): def playTutorialReward_3(self, value): self.tutRewardDialog_2.cleanup() - from toontown.toon import Toon - from toontown.toon import ToonDNA + from toontown.toon import Toon, ToonDNA def doneChat1(page, elapsed = 0): self.track2.start() diff --git a/toontown/battle/MovieCamera.py b/toontown/battle/MovieCamera.py index 0c9c934..861f223 100644 --- a/toontown/battle/MovieCamera.py +++ b/toontown/battle/MovieCamera.py @@ -1,12 +1,17 @@ +import random + from panda3d.core import * + +from direct.directnotify import DirectNotifyGlobal from direct.interval.IntervalGlobal import * + +from toontown.toonbase.ToontownBattleGlobals import * + +from . import MovieUtil from .BattleBase import * from .BattleProps import * -from toontown.toonbase.ToontownBattleGlobals import * from .SuitBattleGlobals import * -from direct.directnotify import DirectNotifyGlobal -import random -from . import MovieUtil + notify = DirectNotifyGlobal.directNotify.newCategory('MovieCamera') def chooseHealShot(heals, attackDuration): diff --git a/toontown/battle/MovieDrop.py b/toontown/battle/MovieDrop.py index b9b7629..664fd20 100644 --- a/toontown/battle/MovieDrop.py +++ b/toontown/battle/MovieDrop.py @@ -1,14 +1,15 @@ +import functools + +from direct.directnotify import DirectNotifyGlobal from direct.interval.IntervalGlobal import * +from direct.showutil import Effects + +from . import MovieCamera, MovieNPCSOS, MovieUtil from .BattleBase import * from .BattleProps import * from .BattleSounds import * -from . import MovieCamera -from direct.directnotify import DirectNotifyGlobal -from . import MovieUtil -from . import MovieNPCSOS from .MovieUtil import calcAvgSuitPos -from direct.showutil import Effects -import functools + notify = DirectNotifyGlobal.directNotify.newCategory('MovieDrop') hitSoundFiles = ('AA_drop_flowerpot.ogg', 'AA_drop_sandbag.ogg', 'AA_drop_anvil.ogg', 'AA_drop_bigweight.ogg', 'AA_drop_safe.ogg', 'AA_drop_piano.ogg', 'AA_drop_boat.ogg') missSoundFiles = ('AA_drop_flowerpot_miss.ogg', 'AA_drop_sandbag_miss.ogg', 'AA_drop_anvil_miss.ogg', 'AA_drop_bigweight_miss.ogg', 'AA_drop_safe_miss.ogg', 'AA_drop_piano_miss.ogg', 'AA_drop_boat_miss.ogg') diff --git a/toontown/battle/MovieFire.py b/toontown/battle/MovieFire.py index c06dce8..238b2aa 100644 --- a/toontown/battle/MovieFire.py +++ b/toontown/battle/MovieFire.py @@ -1,16 +1,20 @@ +import functools +import random + from panda3d.core import * + +from direct.directnotify import DirectNotifyGlobal from direct.interval.IntervalGlobal import * + +from toontown.suit.SuitDNA import * +from toontown.toon.ToonDNA import * + +from . import MovieCamera, MovieUtil from .BattleBase import * from .BattleProps import * from .BattleSounds import * -from toontown.toon.ToonDNA import * -from toontown.suit.SuitDNA import * -from direct.directnotify import DirectNotifyGlobal -import random -import functools -from . import MovieCamera -from . import MovieUtil from .MovieUtil import calcAvgSuitPos + notify = DirectNotifyGlobal.directNotify.newCategory('MovieThrow') hitSoundFiles = ('AA_tart_only.ogg', 'AA_slice_only.ogg', 'AA_slice_only.ogg', 'AA_slice_only.ogg', 'AA_slice_only.ogg', 'AA_wholepie_only.ogg', 'AA_wholepie_only.ogg') tPieLeavesHand = 2.7 @@ -319,7 +323,7 @@ def __throwPie(throw, delay, hitCount, showCannon = 1): playSoundCannonAdjust = SoundInterval(soundCannonAdjust, duration=0.6, node=cannonHolder) soundCogPanic = base.loader.loadSfx('phase_5/audio/sfx/ENC_cogafssm.ogg') playSoundCogPanic = SoundInterval(soundCogPanic, node=cannonHolder) - reactIval = Parallel(ActorInterval(suit, 'pie-small-react'), Sequence(Wait(0.0), LerpPosInterval(cannonHolder, 2.0, posFinal, startPos=posInit, blendType='easeInOut'), Parallel(LerpHprInterval(barrel, 0.6, Point3(0, 45, 0), startHpr=Point3(0, 90, 0), blendType='easeIn'), playSoundCannonAdjust), Wait(2.0), Parallel(LerpHprInterval(barrel, 0.6, Point3(0, 90, 0), startHpr=Point3(0, 45, 0), blendType='easeIn'), playSoundCannonAdjust), LerpPosInterval(cannonHolder, 1.0, posInit, startPos=posFinal, blendType='easeInOut')), Sequence(Wait(0.0), Parallel(ActorInterval(suit, 'flail'), suit.scaleInterval(1.0, suitScale), LerpPosInterval(suit, 0.25, Point3(0, -1.0, 0.0)), Sequence(Wait(0.25), Parallel(playSoundCogPanic, LerpPosInterval(suit, 1.5, Point3(0, -deep, 0.0), blendType='easeIn')))), Wait(2.5), Parallel(playSoundBomb, playSoundFly, Sequence(Func(smoke.show), Parallel(LerpScaleInterval(smoke, 0.5, 3), LerpColorScaleInterval(smoke, 0.5, Vec4(2, 2, 2, 0))), Func(smoke.hide)), Sequence(Func(kapow.show), + reactIval = Parallel(ActorInterval(suit, 'pie-small-react'), Sequence(Wait(0.0), LerpPosInterval(cannonHolder, 2.0, posFinal, startPos=posInit, blendType='easeInOut'), Parallel(LerpHprInterval(barrel, 0.6, Point3(0, 45, 0), startHpr=Point3(0, 90, 0), blendType='easeIn'), playSoundCannonAdjust), Wait(2.0), Parallel(LerpHprInterval(barrel, 0.6, Point3(0, 90, 0), startHpr=Point3(0, 45, 0), blendType='easeIn'), playSoundCannonAdjust), LerpPosInterval(cannonHolder, 1.0, posInit, startPos=posFinal, blendType='easeInOut')), Sequence(Wait(0.0), Parallel(ActorInterval(suit, 'flail'), suit.scaleInterval(1.0, suitScale), LerpPosInterval(suit, 0.25, Point3(0, -1.0, 0.0)), Sequence(Wait(0.25), Parallel(playSoundCogPanic, LerpPosInterval(suit, 1.5, Point3(0, -deep, 0.0), blendType='easeIn')))), Wait(2.5), Parallel(playSoundBomb, playSoundFly, Sequence(Func(smoke.show), Parallel(LerpScaleInterval(smoke, 0.5, 3), LerpColorScaleInterval(smoke, 0.5, Vec4(2, 2, 2, 0))), Func(smoke.hide)), Sequence(Func(kapow.show), ActorInterval(kapow, 'kapow'), Func(kapow.hide)), LerpPosInterval(suit, 3.0, Point3(0, 150.0, 0.0)), suit.scaleInterval(3.0, 0.01)), Func(suit.hide))) if hitCount == 1: sival = Sequence(Parallel(reactIval, MovieUtil.createSuitStunInterval(suit, 0.3, 1.3)), Wait(0.0), Func(cannonHolder.remove)) @@ -340,4 +344,4 @@ ActorInterval(kapow, 'kapow'), Func(kapow.hide)), LerpPosInterval(suit, 3.0, Poi return [toonTrack, soundTrack, buttonTrack, - suitResponseTrack] \ No newline at end of file + suitResponseTrack] diff --git a/toontown/battle/MovieHeal.py b/toontown/battle/MovieHeal.py index 7b65695..8c066b2 100644 --- a/toontown/battle/MovieHeal.py +++ b/toontown/battle/MovieHeal.py @@ -1,19 +1,19 @@ -from direct.interval.IntervalGlobal import * -from .BattleProps import * -from .BattleSounds import * -from .BattleBase import * -from direct.directnotify import DirectNotifyGlobal -from . import MovieCamera import random -from . import MovieUtil -from . import BattleParticles -from . import HealJokes + +from direct.directnotify import DirectNotifyGlobal +from direct.interval.IntervalGlobal import * +from direct.task import Task + +from toontown.effects import Splash +from toontown.toon import NPCToons from toontown.toonbase import TTLocalizer from toontown.toonbase.ToontownBattleGlobals import AvPropDamage -from toontown.toon import NPCToons -from . import MovieNPCSOS -from toontown.effects import Splash -from direct.task import Task + +from . import BattleParticles, HealJokes, MovieCamera, MovieNPCSOS, MovieUtil +from .BattleBase import * +from .BattleProps import * +from .BattleSounds import * + notify = DirectNotifyGlobal.directNotify.newCategory('MovieHeal') soundFiles = ('AA_heal_tickle.ogg', 'AA_heal_telljoke.ogg', 'AA_heal_smooch.ogg', 'AA_heal_happydance.ogg', 'AA_heal_pixiedust.ogg', 'AA_heal_juggle.ogg', 'AA_heal_High_Dive.ogg') healPos = Point3(0, 0, 0) diff --git a/toontown/battle/MovieLure.py b/toontown/battle/MovieLure.py index d7dafef..84f334e 100644 --- a/toontown/battle/MovieLure.py +++ b/toontown/battle/MovieLure.py @@ -1,16 +1,15 @@ +from direct.directnotify import DirectNotifyGlobal from direct.interval.IntervalGlobal import * -from .BattleBase import * -from .BattleProps import * + from toontown.suit.SuitBase import * from toontown.toon.ToonDNA import * -from .BattleSounds import * -from . import MovieCamera -from direct.directnotify import DirectNotifyGlobal -from . import MovieUtil from toontown.toonbase import ToontownBattleGlobals -from . import BattleParticles -from . import BattleProps -from . import MovieNPCSOS + +from . import BattleParticles, BattleProps, MovieCamera, MovieNPCSOS, MovieUtil +from .BattleBase import * +from .BattleProps import * +from .BattleSounds import * + notify = DirectNotifyGlobal.directNotify.newCategory('MovieLures') def safeWrtReparentTo(nodePath, parent): diff --git a/toontown/battle/MovieNPCSOS.py b/toontown/battle/MovieNPCSOS.py index 97d4c1f..d2d8d9d 100644 --- a/toontown/battle/MovieNPCSOS.py +++ b/toontown/battle/MovieNPCSOS.py @@ -1,16 +1,17 @@ +import random + from panda3d.otp import * + +from direct.directnotify import DirectNotifyGlobal from direct.interval.IntervalGlobal import * + +from toontown.toon import NPCToons +from toontown.toonbase import ToontownBattleGlobals, TTLocalizer + +from . import BattleParticles, HealJokes, MovieCamera, MovieUtil from .BattleProps import * from .BattleSounds import * -from direct.directnotify import DirectNotifyGlobal -from . import MovieCamera -import random -from . import MovieUtil -from . import BattleParticles -from . import HealJokes -from toontown.toonbase import TTLocalizer -from toontown.toonbase import ToontownBattleGlobals -from toontown.toon import NPCToons + notify = DirectNotifyGlobal.directNotify.newCategory('MovieNPCSOS') soundFiles = ('AA_heal_tickle.ogg', 'AA_heal_telljoke.ogg', 'AA_heal_smooch.ogg', 'AA_heal_happydance.ogg', 'AA_heal_pixiedust.ogg', 'AA_heal_juggle.ogg') offset = Point3(0, 4.0, 0) diff --git a/toontown/battle/MoviePetSOS.py b/toontown/battle/MoviePetSOS.py index 82671bf..c357a3c 100644 --- a/toontown/battle/MoviePetSOS.py +++ b/toontown/battle/MoviePetSOS.py @@ -1,15 +1,15 @@ +import random + +from direct.directnotify import DirectNotifyGlobal from direct.interval.IntervalGlobal import * + +from toontown.pets import Pet, PetTricks +from toontown.toonbase import ToontownBattleGlobals, TTLocalizer + +from . import BattleParticles, HealJokes, MovieCamera, MovieUtil from .BattleProps import * from .BattleSounds import * -from direct.directnotify import DirectNotifyGlobal -from . import MovieCamera -import random -from . import MovieUtil -from . import BattleParticles -from . import HealJokes -from toontown.toonbase import TTLocalizer -from toontown.toonbase import ToontownBattleGlobals -from toontown.pets import Pet, PetTricks + notify = DirectNotifyGlobal.directNotify.newCategory('MoviePetSOS') soundFiles = ('AA_heal_tickle.ogg', 'AA_heal_telljoke.ogg', 'AA_heal_smooch.ogg', 'AA_heal_happydance.ogg', 'AA_heal_pixiedust.ogg', 'AA_heal_juggle.ogg') offset = Point3(0, 4.0, 0) diff --git a/toontown/battle/MovieSOS.py b/toontown/battle/MovieSOS.py index 4369e70..0f95788 100644 --- a/toontown/battle/MovieSOS.py +++ b/toontown/battle/MovieSOS.py @@ -1,8 +1,12 @@ -from direct.interval.IntervalGlobal import * -from . import MovieCamera -from direct.directnotify import DirectNotifyGlobal -from toontown.toonbase import TTLocalizer from panda3d.core import * + +from direct.directnotify import DirectNotifyGlobal +from direct.interval.IntervalGlobal import * + +from toontown.toonbase import TTLocalizer + +from . import MovieCamera + notify = DirectNotifyGlobal.directNotify.newCategory('MovieSOS') def doSOSs(calls): diff --git a/toontown/battle/MovieSound.py b/toontown/battle/MovieSound.py index 9d1248f..22f857e 100644 --- a/toontown/battle/MovieSound.py +++ b/toontown/battle/MovieSound.py @@ -1,14 +1,14 @@ +from direct.directnotify import DirectNotifyGlobal from direct.interval.IntervalGlobal import * + +from toontown.toonbase import ToontownBattleGlobals + +from . import BattleParticles, MovieCamera, MovieNPCSOS, MovieUtil from .BattleBase import * from .BattleProps import * from .BattleSounds import * -from . import BattleParticles from .RewardPanel import * -from . import MovieCamera -from direct.directnotify import DirectNotifyGlobal -from . import MovieUtil -from . import MovieNPCSOS -from toontown.toonbase import ToontownBattleGlobals + notify = DirectNotifyGlobal.directNotify.newCategory('MovieSound') soundFiles = ('AA_sound_bikehorn.ogg', 'AA_sound_whistle.ogg', 'AA_sound_bugle.ogg', 'AA_sound_aoogah.ogg', 'AA_sound_elephant.ogg', 'SZ_DD_foghorn.ogg', 'AA_sound_Opera_Singer.ogg') appearSoundFiles = ('MG_tag_1.ogg', 'LB_receive_evidence.ogg', 'm_match_trumpet.ogg', 'TL_step_on_rake.ogg', 'toonbldg_grow.ogg', 'mailbox_full_wobble.ogg', 'mailbox_full_wobble.ogg') diff --git a/toontown/battle/MovieSquirt.py b/toontown/battle/MovieSquirt.py index 3cee1ae..377e4cd 100644 --- a/toontown/battle/MovieSquirt.py +++ b/toontown/battle/MovieSquirt.py @@ -1,17 +1,18 @@ +import functools +import random + +from direct.directnotify import DirectNotifyGlobal from direct.interval.IntervalGlobal import * + +from toontown.suit.SuitDNA import * +from toontown.toon.ToonDNA import * +from toontown.toonbase import ToontownBattleGlobals, ToontownGlobals + +from . import BattleParticles, MovieCamera, MovieUtil from .BattleBase import * from .BattleProps import * from .BattleSounds import * -from toontown.toon.ToonDNA import * -from toontown.suit.SuitDNA import * -from . import MovieUtil -from . import MovieCamera -from direct.directnotify import DirectNotifyGlobal -from . import BattleParticles -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import ToontownBattleGlobals -import random -import functools + notify = DirectNotifyGlobal.directNotify.newCategory('MovieSquirt') hitSoundFiles = ('AA_squirt_flowersquirt.ogg', 'AA_squirt_glasswater.ogg', 'AA_squirt_neonwatergun.ogg', 'AA_squirt_seltzer.ogg', 'firehose_spray.ogg', 'AA_throw_stormcloud.ogg', 'AA_squirt_Geyser.ogg') missSoundFiles = ('AA_squirt_flowersquirt_miss.ogg', 'AA_squirt_glasswater_miss.ogg', 'AA_squirt_neonwatergun_miss.ogg', 'AA_squirt_seltzer_miss.ogg', 'firehose_spray.ogg', 'AA_throw_stormcloud_miss.ogg', 'AA_squirt_Geyser.ogg') @@ -27,7 +28,7 @@ WaterSprayColor = Point4(0.75, 0.75, 1.0, 0.8) def doSquirts(squirts): if len(squirts) == 0: return (None, None) - + suitSquirtsDict = {} doneUber = 0 skip = 0 @@ -51,7 +52,7 @@ def doSquirts(squirts): suitSquirtsDict[suitId] = [squirt] suitSquirts = list(suitSquirtsDict.values()) - + def compFunc(a, b): if len(a) > len(b): return 1 @@ -744,4 +745,4 @@ squirtfn_array = (__doFlower, __doSeltzerBottle, __doFireHose, __doStormCloud, - __doGeyser) \ No newline at end of file + __doGeyser) diff --git a/toontown/battle/MovieSuitAttacks.py b/toontown/battle/MovieSuitAttacks.py index 13d3d73..ebfb336 100644 --- a/toontown/battle/MovieSuitAttacks.py +++ b/toontown/battle/MovieSuitAttacks.py @@ -1,19 +1,19 @@ from panda3d.otp import * -from toontown.toonbase.ToontownGlobals import * -from .SuitBattleGlobals import * + +from direct.directnotify import DirectNotifyGlobal from direct.interval.IntervalGlobal import * +from direct.particles import ParticleEffect + +from toontown.suit.SuitDNA import * +from toontown.toonbase import ToontownGlobals, TTLocalizer +from toontown.toonbase.ToontownGlobals import * + +from . import BattleParticles, MovieCamera, MovieUtil from .BattleBase import * from .BattleProps import * -from toontown.suit.SuitDNA import * -from .BattleBase import * from .BattleSounds import * -from . import MovieCamera -from direct.directnotify import DirectNotifyGlobal -from . import MovieUtil -from direct.particles import ParticleEffect -from . import BattleParticles -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import TTLocalizer +from .SuitBattleGlobals import * + notify = DirectNotifyGlobal.directNotify.newCategory('MovieSuitAttacks') def __doDamage(toon, dmg, died): diff --git a/toontown/battle/MovieThrow.py b/toontown/battle/MovieThrow.py index 43af25b..ad88ab3 100644 --- a/toontown/battle/MovieThrow.py +++ b/toontown/battle/MovieThrow.py @@ -1,16 +1,20 @@ +import functools +import random + from panda3d.core import * + +from direct.directnotify import DirectNotifyGlobal from direct.interval.IntervalGlobal import * + +from toontown.suit.SuitDNA import * +from toontown.toon.ToonDNA import * + +from . import MovieCamera, MovieUtil from .BattleBase import * from .BattleProps import * from .BattleSounds import * -from toontown.toon.ToonDNA import * -from toontown.suit.SuitDNA import * -from direct.directnotify import DirectNotifyGlobal -import random -import functools -from . import MovieCamera -from . import MovieUtil from .MovieUtil import calcAvgSuitPos + notify = DirectNotifyGlobal.directNotify.newCategory('MovieThrow') hitSoundFiles = ('AA_tart_only.ogg', 'AA_slice_only.ogg', 'AA_slice_only.ogg', 'AA_slice_only.ogg', 'AA_slice_only.ogg', 'AA_wholepie_only.ogg', 'AA_wholepie_only.ogg') tPieLeavesHand = 2.7 diff --git a/toontown/battle/MovieToonVictory.py b/toontown/battle/MovieToonVictory.py index c54a942..ec8f216 100644 --- a/toontown/battle/MovieToonVictory.py +++ b/toontown/battle/MovieToonVictory.py @@ -1,11 +1,15 @@ +import types + from panda3d.otp import * + +from direct.directnotify import DirectNotifyGlobal from direct.interval.IntervalGlobal import * from direct.showbase.DirectObject import DirectObject -from .RewardPanel import * -from .BattleSounds import * + from . import MovieCamera -from direct.directnotify import DirectNotifyGlobal -import types +from .BattleSounds import * +from .RewardPanel import * + notify = DirectNotifyGlobal.directNotify.newCategory('MovieToonVictory') def __findToonReward(rewards, toon): diff --git a/toontown/battle/MovieTrap.py b/toontown/battle/MovieTrap.py index f58f772..9cb5870 100644 --- a/toontown/battle/MovieTrap.py +++ b/toontown/battle/MovieTrap.py @@ -1,17 +1,16 @@ +from direct.actor import Actor +from direct.directnotify import DirectNotifyGlobal from direct.interval.IntervalGlobal import * +from direct.particles import ParticleEffect + +from toontown.toonbase import ToontownBattleGlobals + +from . import BattleParticles, BattleProps, MovieCamera, MovieNPCSOS, MovieUtil from .BattleBase import * from .BattleProps import * from .BattleSounds import * -from . import MovieUtil -from . import MovieCamera -from direct.directnotify import DirectNotifyGlobal -from toontown.toonbase import ToontownBattleGlobals -from direct.actor import Actor -from direct.particles import ParticleEffect -from . import BattleParticles -from . import BattleProps -from . import MovieNPCSOS from .MovieSound import createSuitResetPosTrack + notify = DirectNotifyGlobal.directNotify.newCategory('MovieTrap') def doTraps(traps): diff --git a/toontown/battle/MovieUtil.py b/toontown/battle/MovieUtil.py index da0c663..d3013fa 100644 --- a/toontown/battle/MovieUtil.py +++ b/toontown/battle/MovieUtil.py @@ -1,12 +1,15 @@ +import random + +from direct.directnotify import DirectNotifyGlobal from direct.interval.IntervalGlobal import * +from direct.particles import ParticleEffect + +from toontown.toonbase import TTLocalizer + +from . import BattleParticles, BattleProps from .BattleBase import * from .BattleProps import * -from direct.directnotify import DirectNotifyGlobal -import random -from direct.particles import ParticleEffect -from . import BattleParticles -from . import BattleProps -from toontown.toonbase import TTLocalizer + notify = DirectNotifyGlobal.directNotify.newCategory('MovieUtil') SUIT_LOSE_DURATION = 6.0 SUIT_LURE_DISTANCE = 2.6 diff --git a/toontown/battle/PlayByPlayText.py b/toontown/battle/PlayByPlayText.py index 6d85453..1fdb175 100644 --- a/toontown/battle/PlayByPlayText.py +++ b/toontown/battle/PlayByPlayText.py @@ -1,13 +1,18 @@ +import string + from panda3d.core import * + +from direct.directnotify import DirectNotifyGlobal +from direct.gui import OnscreenText +from direct.interval.IntervalGlobal import * + from toontown.toonbase import TTLocalizer from toontown.toonbase.ToontownBattleGlobals import * from toontown.toonbase.ToontownGlobals import * -from .SuitBattleGlobals import * -from direct.interval.IntervalGlobal import * -from direct.directnotify import DirectNotifyGlobal -import string -from direct.gui import OnscreenText + from . import BattleBase +from .SuitBattleGlobals import * + class PlayByPlayText(OnscreenText.OnscreenText): notify = DirectNotifyGlobal.directNotify.newCategory('PlayByPlayText') diff --git a/toontown/battle/RewardPanel.py b/toontown/battle/RewardPanel.py index ac38399..439e28a 100644 --- a/toontown/battle/RewardPanel.py +++ b/toontown/battle/RewardPanel.py @@ -1,24 +1,26 @@ -from panda3d.core import * -from direct.gui.DirectGui import * -from panda3d.core import * -from direct.interval.IntervalGlobal import * -from toontown.toonbase import ToontownBattleGlobals -from . import BattleBase -from direct.directnotify import DirectNotifyGlobal +import copy +import math import random import string -from toontown.quest import Quests -import copy -from toontown.suit import SuitDNA -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import TTLocalizer -from toontown.toon import NPCToons -import math -from toontown.coghq import CogDisguiseGlobals -from toontown.shtiker import DisguisePage -from . import Fanfare + +from panda3d.core import * + +from direct.directnotify import DirectNotifyGlobal +from direct.gui.DirectGui import * +from direct.interval.IntervalGlobal import * + from otp.otpbase import OTPGlobals +from toontown.coghq import CogDisguiseGlobals +from toontown.quest import Quests +from toontown.shtiker import DisguisePage +from toontown.suit import SuitDNA +from toontown.toon import NPCToons +from toontown.toonbase import ToontownBattleGlobals, ToontownGlobals, TTLocalizer + +from . import BattleBase, Fanfare + + class RewardPanel(DirectFrame): notify = DirectNotifyGlobal.directNotify.newCategory('RewardPanel') SkipBattleMovieEvent = 'skip-battle-movie-event' diff --git a/toontown/battle/SuitBattleGlobals.py b/toontown/battle/SuitBattleGlobals.py index bb2dcbd..c7e3c60 100644 --- a/toontown/battle/SuitBattleGlobals.py +++ b/toontown/battle/SuitBattleGlobals.py @@ -1,8 +1,13 @@ -from .BattleBase import * import random + from direct.directnotify import DirectNotifyGlobal + from otp.otpbase import OTPLocalizer + from toontown.toonbase import TTLocalizer + +from .BattleBase import * + notify = DirectNotifyGlobal.directNotify.newCategory('SuitBattleGlobals') debugAttackSequence = {} diff --git a/toontown/building/BoardingGroupShow.py b/toontown/building/BoardingGroupShow.py index 0c253fd..afc5c38 100644 --- a/toontown/building/BoardingGroupShow.py +++ b/toontown/building/BoardingGroupShow.py @@ -1,10 +1,12 @@ from panda3d.core import * + from direct.directnotify import DirectNotifyGlobal -from toontown.toonbase import ToontownGlobals -from direct.task.Task import Task from direct.interval.IntervalGlobal import * -from toontown.toonbase import TTLocalizer +from direct.task.Task import Task + from toontown.effects import DustCloud +from toontown.toonbase import ToontownGlobals, TTLocalizer + TRACK_TYPE_TELEPORT = 1 TRACK_TYPE_RUN = 2 TRACK_TYPE_POOF = 3 diff --git a/toontown/building/BoardingPartyBase.py b/toontown/building/BoardingPartyBase.py index 6644bfa..6b4a432 100644 --- a/toontown/building/BoardingPartyBase.py +++ b/toontown/building/BoardingPartyBase.py @@ -1,6 +1,9 @@ -from otp.otpbase import OTPGlobals -from toontown.toonbase import ToontownGlobals import copy + +from otp.otpbase import OTPGlobals + +from toontown.toonbase import ToontownGlobals + BOARDCODE_OKAY = 1 BOARDCODE_MISSING = 0 BOARDCODE_MINLAFF = -1 diff --git a/toontown/building/DistributedAnimBuilding.py b/toontown/building/DistributedAnimBuilding.py index b862c82..443e003 100644 --- a/toontown/building/DistributedAnimBuilding.py +++ b/toontown/building/DistributedAnimBuilding.py @@ -1,7 +1,10 @@ from panda3d.core import DecalEffect, DepthWriteAttrib + from direct.directnotify import DirectNotifyGlobal + from toontown.building import DistributedBuilding + class DistributedAnimBuilding(DistributedBuilding.DistributedBuilding): def __init__(self, cr): diff --git a/toontown/building/DistributedAnimBuildingAI.py b/toontown/building/DistributedAnimBuildingAI.py index 08b973d..eeab60a 100644 --- a/toontown/building/DistributedAnimBuildingAI.py +++ b/toontown/building/DistributedAnimBuildingAI.py @@ -1,7 +1,7 @@ from direct.directnotify import DirectNotifyGlobal -from toontown.building import DistributedBuildingAI -from toontown.building import DistributedAnimDoorAI -from toontown.building import DoorTypes + +from toontown.building import DistributedAnimDoorAI, DistributedBuildingAI, DoorTypes + class DistributedAnimBuildingAI(DistributedBuildingAI.DistributedBuildingAI): diff --git a/toontown/building/DistributedAnimDoor.py b/toontown/building/DistributedAnimDoor.py index 0ea43e4..1a9eeea 100644 --- a/toontown/building/DistributedAnimDoor.py +++ b/toontown/building/DistributedAnimDoor.py @@ -1,8 +1,10 @@ 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 -from toontown.building import DoorTypes +from direct.interval.IntervalGlobal import HprInterval, LerpHprInterval, Parallel, Sequence, SoundInterval, Wait + +from toontown.building import DistributedDoor, DoorTypes + if (__debug__): import pdb diff --git a/toontown/building/DistributedAnimDoorAI.py b/toontown/building/DistributedAnimDoorAI.py index ca3d644..2bb9313 100644 --- a/toontown/building/DistributedAnimDoorAI.py +++ b/toontown/building/DistributedAnimDoorAI.py @@ -1,6 +1,8 @@ from direct.directnotify import DirectNotifyGlobal + from toontown.building import DistributedDoorAI + class DistributedAnimDoorAI(DistributedDoorAI.DistributedDoorAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedAnimDoorAI') diff --git a/toontown/building/DistributedAnimatedProp.py b/toontown/building/DistributedAnimatedProp.py index c3618c8..3f47bd2 100644 --- a/toontown/building/DistributedAnimatedProp.py +++ b/toontown/building/DistributedAnimatedProp.py @@ -1,8 +1,10 @@ from panda3d.core import * -from direct.distributed.ClockDelta import * + from direct.directnotify import DirectNotifyGlobal -from direct.fsm import ClassicFSM, State from direct.distributed import DistributedObject +from direct.distributed.ClockDelta import * +from direct.fsm import ClassicFSM, State + class DistributedAnimatedProp(DistributedObject.DistributedObject): diff --git a/toontown/building/DistributedAnimatedPropAI.py b/toontown/building/DistributedAnimatedPropAI.py index 973ab42..a658af7 100644 --- a/toontown/building/DistributedAnimatedPropAI.py +++ b/toontown/building/DistributedAnimatedPropAI.py @@ -1,9 +1,10 @@ -from otp.ai.AIBaseGlobal import * -from direct.distributed.ClockDelta import * from direct.directnotify import DirectNotifyGlobal -from direct.fsm import ClassicFSM, State from direct.distributed import DistributedObjectAI -from direct.fsm import State +from direct.distributed.ClockDelta import * +from direct.fsm import ClassicFSM, State + +from otp.ai.AIBaseGlobal import * + class DistributedAnimatedPropAI(DistributedObjectAI.DistributedObjectAI): diff --git a/toontown/building/DistributedBBElevator.py b/toontown/building/DistributedBBElevator.py index 6d94e01..3f1d033 100644 --- a/toontown/building/DistributedBBElevator.py +++ b/toontown/building/DistributedBBElevator.py @@ -1,9 +1,11 @@ -from . import DistributedElevator -from . import DistributedBossElevator -from .ElevatorConstants import * from direct.directnotify import DirectNotifyGlobal + from toontown.toonbase import TTLocalizer +from . import DistributedBossElevator, DistributedElevator +from .ElevatorConstants import * + + class DistributedBBElevator(DistributedBossElevator.DistributedBossElevator): def __init__(self, cr): diff --git a/toontown/building/DistributedBBElevatorAI.py b/toontown/building/DistributedBBElevatorAI.py index a61d56b..f7e673a 100644 --- a/toontown/building/DistributedBBElevatorAI.py +++ b/toontown/building/DistributedBBElevatorAI.py @@ -1,5 +1,6 @@ -from .ElevatorConstants import * from . import DistributedBossElevatorAI +from .ElevatorConstants import * + class DistributedBBElevatorAI(DistributedBossElevatorAI.DistributedBossElevatorAI): diff --git a/toontown/building/DistributedBoardingParty.py b/toontown/building/DistributedBoardingParty.py index 708f246..526e760 100644 --- a/toontown/building/DistributedBoardingParty.py +++ b/toontown/building/DistributedBoardingParty.py @@ -1,20 +1,20 @@ from panda3d.core import * from panda3d.otp import WhisperPopup + from direct.directnotify import DirectNotifyGlobal -from toontown.toonbase import TTLocalizer -from toontown.toonbase import ToontownGlobals from direct.distributed import DistributedObject -from toontown.toon import GroupInvitee -from toontown.toon import GroupPanel -from toontown.toon import BoardingGroupInviterPanels -from toontown.building import BoardingPartyBase from direct.gui.DirectGui import * -from toontown.toontowngui import TTDialog -from toontown.hood import ZoneUtil -from toontown.toontowngui import TeaserPanel from direct.interval.IntervalGlobal import * + +from toontown.building import BoardingPartyBase +from toontown.hood import ZoneUtil +from toontown.toon import BoardingGroupInviterPanels, GroupInvitee, GroupPanel +from toontown.toonbase import ToontownGlobals, TTLocalizer +from toontown.toontowngui import TeaserPanel, TTDialog + from . import BoardingGroupShow + class DistributedBoardingParty(DistributedObject.DistributedObject, BoardingPartyBase.BoardingPartyBase): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedBoardingParty') InvitationFailedTimeout = 60.0 diff --git a/toontown/building/DistributedBoardingPartyAI.py b/toontown/building/DistributedBoardingPartyAI.py index 4e18be7..811d51b 100644 --- a/toontown/building/DistributedBoardingPartyAI.py +++ b/toontown/building/DistributedBoardingPartyAI.py @@ -1,15 +1,17 @@ -from otp.otpbase import OTPGlobals -from otp.ai.AIBase import * -from toontown.toonbase import ToontownGlobals -from direct.distributed.ClockDelta import * -from .ElevatorConstants import * -from direct.distributed import DistributedObjectAI -from direct.fsm import ClassicFSM, State -from direct.fsm import State -from direct.task import Task from direct.directnotify import DirectNotifyGlobal +from direct.distributed import DistributedObjectAI +from direct.distributed.ClockDelta import * +from direct.fsm import ClassicFSM, State +from direct.task import Task + +from otp.ai.AIBase import * +from otp.otpbase import OTPGlobals + from toontown.building import BoardingPartyBase -from toontown.toonbase import ToontownAccessAI +from toontown.toonbase import ToontownAccessAI, ToontownGlobals + +from .ElevatorConstants import * + GROUPMEMBER = 0 GROUPINVITE = 1 diff --git a/toontown/building/DistributedBossElevator.py b/toontown/building/DistributedBossElevator.py index 1f24e0e..552bdb4 100644 --- a/toontown/building/DistributedBossElevator.py +++ b/toontown/building/DistributedBossElevator.py @@ -1,17 +1,18 @@ from panda3d.core import * + +from direct.directnotify import DirectNotifyGlobal from direct.distributed.ClockDelta import * +from direct.fsm import ClassicFSM, State from direct.interval.IntervalGlobal import * + +from toontown.hood import ZoneUtil +from toontown.toonbase import ToontownGlobals, TTLocalizer +from toontown.toontowngui import TTDialog + +from . import DistributedElevator, DistributedElevatorExt from .ElevatorConstants import * from .ElevatorUtils import * -from . import DistributedElevator -from . import DistributedElevatorExt -from toontown.toonbase import ToontownGlobals -from direct.directnotify import DirectNotifyGlobal -from direct.fsm import ClassicFSM -from direct.fsm import State -from toontown.hood import ZoneUtil -from toontown.toonbase import TTLocalizer -from toontown.toontowngui import TTDialog + class DistributedBossElevator(DistributedElevatorExt.DistributedElevatorExt): diff --git a/toontown/building/DistributedBossElevatorAI.py b/toontown/building/DistributedBossElevatorAI.py index d0d064a..6d73214 100644 --- a/toontown/building/DistributedBossElevatorAI.py +++ b/toontown/building/DistributedBossElevatorAI.py @@ -1,13 +1,16 @@ -from otp.ai.AIBase import * -from toontown.toonbase import ToontownGlobals -from direct.distributed.ClockDelta import * -from .ElevatorConstants import * -from . import DistributedElevatorAI, DistributedElevatorExtAI -from direct.fsm import ClassicFSM -from direct.fsm import State -from direct.task import Task from direct.directnotify import DirectNotifyGlobal +from direct.distributed.ClockDelta import * +from direct.fsm import ClassicFSM, State +from direct.task import Task + +from otp.ai.AIBase import * + from toontown.suit import DistributedSellbotBossAI +from toontown.toonbase import ToontownGlobals + +from . import DistributedElevatorAI, DistributedElevatorExtAI +from .ElevatorConstants import * + class DistributedBossElevatorAI(DistributedElevatorExtAI.DistributedElevatorExtAI): diff --git a/toontown/building/DistributedBuilding.py b/toontown/building/DistributedBuilding.py index bf24ddc..4fa2230 100644 --- a/toontown/building/DistributedBuilding.py +++ b/toontown/building/DistributedBuilding.py @@ -1,23 +1,27 @@ +import random + from panda3d.core import * -from direct.distributed.ClockDelta import * -from direct.interval.IntervalGlobal import * + +from direct.directnotify import DirectNotifyGlobal from direct.directtools.DirectGeometry import * +from direct.distributed import DistributedObject +from direct.distributed.ClockDelta import * +from direct.fsm import ClassicFSM, State +from direct.gui.DirectGui import * +from direct.interval.IntervalGlobal import * + +from otp.avatar import Emote + +from toontown.distributed import DelayDelete +from toontown.hood import ZoneUtil +from toontown.suit import SuitDNA +from toontown.toon import TTEmote +from toontown.toonbase import ToontownGlobals, TTLocalizer + from .ElevatorConstants import * from .ElevatorUtils import * from .SuitBuildingGlobals import * -from direct.gui.DirectGui import * -from panda3d.core import * -from toontown.toonbase import ToontownGlobals -from direct.directnotify import DirectNotifyGlobal -from direct.fsm import ClassicFSM, State -from direct.distributed import DistributedObject -import random -from toontown.suit import SuitDNA -from toontown.toonbase import TTLocalizer -from toontown.distributed import DelayDelete -from toontown.toon import TTEmote -from otp.avatar import Emote -from toontown.hood import ZoneUtil + FO_DICT = {'s': 'tt_m_ara_cbe_fieldOfficeMoverShaker', 'l': 'tt_m_ara_cbe_fieldOfficeMoverShaker', 'm': 'tt_m_ara_cbe_fieldOfficeMoverShaker', diff --git a/toontown/building/DistributedBuildingAI.py b/toontown/building/DistributedBuildingAI.py index 2f675c6..58f4f9f 100644 --- a/toontown/building/DistributedBuildingAI.py +++ b/toontown/building/DistributedBuildingAI.py @@ -1,19 +1,26 @@ -from otp.ai.AIBaseGlobal import * -from direct.distributed.ClockDelta import * +import random +import time import types -from direct.task.Task import Task + from direct.directnotify import DirectNotifyGlobal from direct.distributed import DistributedObjectAI -from direct.fsm import State +from direct.distributed.ClockDelta import * from direct.fsm import ClassicFSM, State -from toontown.toonbase.ToontownGlobals import ToonHall -from . import DistributedToonInteriorAI, DistributedToonHallInteriorAI, DistributedSuitInteriorAI, DistributedDoorAI, DoorTypes, DistributedElevatorExtAI, DistributedKnockKnockDoorAI, SuitPlannerInteriorAI, SuitBuildingGlobals, FADoorCodes -from toontown.hood import ZoneUtil -import random, time -from toontown.cogdominium.DistributedCogdoInteriorAI import DistributedCogdoInteriorAI -from toontown.cogdominium.SuitPlannerCogdoInteriorAI import SuitPlannerCogdoInteriorAI +from direct.task.Task import Task + +from otp.ai.AIBaseGlobal import * + from toontown.cogdominium.CogdoLayout import CogdoLayout from toontown.cogdominium.DistributedCogdoElevatorExtAI import DistributedCogdoElevatorExtAI +from toontown.cogdominium.DistributedCogdoInteriorAI import DistributedCogdoInteriorAI +from toontown.cogdominium.SuitPlannerCogdoInteriorAI import SuitPlannerCogdoInteriorAI +from toontown.hood import ZoneUtil +from toontown.toonbase.ToontownGlobals import ToonHall + +from . import (DistributedDoorAI, DistributedElevatorExtAI, DistributedKnockKnockDoorAI, DistributedSuitInteriorAI, + DistributedToonHallInteriorAI, DistributedToonInteriorAI, DoorTypes, FADoorCodes, SuitBuildingGlobals, + SuitPlannerInteriorAI) + class DistributedBuildingAI(DistributedObjectAI.DistributedObjectAI): FieldOfficeNumFloors = 1 diff --git a/toontown/building/DistributedBuildingMgrAI.py b/toontown/building/DistributedBuildingMgrAI.py index d506656..784b03d 100644 --- a/toontown/building/DistributedBuildingMgrAI.py +++ b/toontown/building/DistributedBuildingMgrAI.py @@ -1,13 +1,19 @@ -import os -from direct.task.Task import Task import json -from otp.ai.AIBaseGlobal import * -from . import DistributedBuildingAI, HQBuildingAI, GagshopBuildingAI, PetshopBuildingAI -from toontown.building.KartShopBuildingAI import KartShopBuildingAI -from toontown.building import DistributedAnimBuildingAI +import os +import random +import time + from direct.directnotify import DirectNotifyGlobal +from direct.task.Task import Task + +from otp.ai.AIBaseGlobal import * + +from toontown.building import DistributedAnimBuildingAI +from toontown.building.KartShopBuildingAI import KartShopBuildingAI from toontown.hood import ZoneUtil -import time, random + +from . import DistributedBuildingAI, GagshopBuildingAI, HQBuildingAI, PetshopBuildingAI + class DistributedBuildingMgrAI: notify = DirectNotifyGlobal.directNotify.newCategory('DistributedBuildingMgrAI') diff --git a/toontown/building/DistributedCFOElevator.py b/toontown/building/DistributedCFOElevator.py index c496fe1..cbccc79 100644 --- a/toontown/building/DistributedCFOElevator.py +++ b/toontown/building/DistributedCFOElevator.py @@ -1,9 +1,11 @@ -from . import DistributedElevator -from . import DistributedBossElevator -from .ElevatorConstants import * from direct.directnotify import DirectNotifyGlobal + from toontown.toonbase import TTLocalizer +from . import DistributedBossElevator, DistributedElevator +from .ElevatorConstants import * + + class DistributedCFOElevator(DistributedBossElevator.DistributedBossElevator): def __init__(self, cr): diff --git a/toontown/building/DistributedCFOElevatorAI.py b/toontown/building/DistributedCFOElevatorAI.py index cd0fc48..e985769 100644 --- a/toontown/building/DistributedCFOElevatorAI.py +++ b/toontown/building/DistributedCFOElevatorAI.py @@ -1,5 +1,6 @@ -from .ElevatorConstants import * from . import DistributedBossElevatorAI +from .ElevatorConstants import * + class DistributedCFOElevatorAI(DistributedBossElevatorAI.DistributedBossElevatorAI): diff --git a/toontown/building/DistributedCJElevator.py b/toontown/building/DistributedCJElevator.py index eb7119c..72bac13 100644 --- a/toontown/building/DistributedCJElevator.py +++ b/toontown/building/DistributedCJElevator.py @@ -1,9 +1,11 @@ -from . import DistributedElevator -from . import DistributedBossElevator -from .ElevatorConstants import * from direct.directnotify import DirectNotifyGlobal + from toontown.toonbase import TTLocalizer +from . import DistributedBossElevator, DistributedElevator +from .ElevatorConstants import * + + class DistributedCJElevator(DistributedBossElevator.DistributedBossElevator): def __init__(self, cr): diff --git a/toontown/building/DistributedCJElevatorAI.py b/toontown/building/DistributedCJElevatorAI.py index 854d6cb..7997ee0 100644 --- a/toontown/building/DistributedCJElevatorAI.py +++ b/toontown/building/DistributedCJElevatorAI.py @@ -1,5 +1,6 @@ -from .ElevatorConstants import * from . import DistributedBossElevatorAI +from .ElevatorConstants import * + class DistributedCJElevatorAI(DistributedBossElevatorAI.DistributedBossElevatorAI): diff --git a/toontown/building/DistributedClubElevator.py b/toontown/building/DistributedClubElevator.py index 7443c3c..76587f5 100644 --- a/toontown/building/DistributedClubElevator.py +++ b/toontown/building/DistributedClubElevator.py @@ -1,19 +1,18 @@ from panda3d.core import * -from direct.distributed.ClockDelta import * -from direct.interval.IntervalGlobal import * -from toontown.building import ElevatorConstants -from toontown.building import ElevatorUtils -from toontown.building import DistributedElevatorFSM -from toontown.toonbase import ToontownGlobals + from direct.directnotify import DirectNotifyGlobal -from direct.fsm import ClassicFSM -from direct.fsm import State -from toontown.hood import ZoneUtil -from toontown.toonbase import TTLocalizer +from direct.distributed.ClockDelta import * +from direct.fsm import ClassicFSM, State from direct.fsm.FSM import FSM -from direct.task import Task -from toontown.distributed import DelayDelete +from direct.interval.IntervalGlobal import * from direct.showbase import PythonUtil +from direct.task import Task + +from toontown.building import DistributedElevatorFSM, ElevatorConstants, ElevatorUtils +from toontown.distributed import DelayDelete +from toontown.hood import ZoneUtil +from toontown.toonbase import ToontownGlobals, TTLocalizer + class DistributedClubElevator(DistributedElevatorFSM.DistributedElevatorFSM): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedClubElevator') diff --git a/toontown/building/DistributedClubElevatorAI.py b/toontown/building/DistributedClubElevatorAI.py index e2a2f5f..549f96d 100644 --- a/toontown/building/DistributedClubElevatorAI.py +++ b/toontown/building/DistributedClubElevatorAI.py @@ -1,11 +1,13 @@ -from otp.ai.AIBase import * -from toontown.toonbase import ToontownGlobals -from direct.distributed.ClockDelta import * -from toontown.building import ElevatorConstants -from toontown.building import DistributedElevatorFSMAI -from direct.task import Task from direct.directnotify import DirectNotifyGlobal +from direct.distributed.ClockDelta import * from direct.fsm.FSM import FSM +from direct.task import Task + +from otp.ai.AIBase import * + +from toontown.building import DistributedElevatorFSMAI, ElevatorConstants +from toontown.toonbase import ToontownGlobals + class DistributedClubElevatorAI(DistributedElevatorFSMAI.DistributedElevatorFSMAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedElevatorFloorAI') diff --git a/toontown/building/DistributedDoor.py b/toontown/building/DistributedDoor.py index fa6af36..b1b2598 100644 --- a/toontown/building/DistributedDoor.py +++ b/toontown/building/DistributedDoor.py @@ -6,31 +6,17 @@ from direct.distributed.ClockDelta import globalClockDelta from direct.distributed.DistributedObject import DistributedObject from direct.fsm.ClassicFSM import ClassicFSM from direct.fsm.State import State -from direct.interval.IntervalGlobal import ( - ActorInterval, - Func, - HprInterval, - LerpHprInterval, - LerpPosHprInterval, - LerpPosInterval, - Parallel, - PosHprInterval, - Sequence, - SoundInterval, - Wait -) - +from direct.interval.IntervalGlobal import (ActorInterval, Func, HprInterval, LerpHprInterval, LerpPosHprInterval, + LerpPosInterval, Parallel, PosHprInterval, Sequence, SoundInterval, Wait) from direct.showbase.MessengerGlobal import messenger from direct.task.TaskManagerGlobal import taskMgr -from toontown.building import DoorTypes -from toontown.building import FADoorCodes +from toontown.building import DoorTypes, FADoorCodes from toontown.distributed.DelayDeletable import DelayDeletable from toontown.distributed.DelayDelete import DelayDelete, cleanupDelayDeletes from toontown.hood import ZoneUtil from toontown.suit.Suit import Suit -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import TTLocalizer +from toontown.toonbase import ToontownGlobals, TTLocalizer from toontown.toonbase.ToonBaseGlobal import base from toontown.toontowngui import TTDialog from toontown.toontowngui.TeaserPanel import TeaserPanel diff --git a/toontown/building/DistributedDoorAI.py b/toontown/building/DistributedDoorAI.py index 2c7ff58..c800dc9 100644 --- a/toontown/building/DistributedDoorAI.py +++ b/toontown/building/DistributedDoorAI.py @@ -1,12 +1,14 @@ -from otp.ai.AIBaseGlobal import * -from direct.task.Task import Task -from direct.distributed.ClockDelta import * from direct.directnotify import DirectNotifyGlobal -from direct.fsm import ClassicFSM, State from direct.distributed import DistributedObjectAI -from direct.fsm import State +from direct.distributed.ClockDelta import * +from direct.fsm import ClassicFSM, State +from direct.task.Task import Task + +from otp.ai.AIBaseGlobal import * + from toontown.toonbase import ToontownAccessAI + class DistributedDoorAI(DistributedObjectAI.DistributedObjectAI): def __init__(self, air, blockNumber, doorType, doorIndex=0, lockValue=0, swing=3): diff --git a/toontown/building/DistributedElevator.py b/toontown/building/DistributedElevator.py index f1a9b6e..459d73f 100644 --- a/toontown/building/DistributedElevator.py +++ b/toontown/building/DistributedElevator.py @@ -1,19 +1,22 @@ from panda3d.core import * -from direct.distributed.ClockDelta import * -from direct.interval.IntervalGlobal import * -from .ElevatorConstants import * -from .ElevatorUtils import * -from direct.showbase import PythonUtil + from direct.directnotify import DirectNotifyGlobal -from direct.fsm import ClassicFSM, State from direct.distributed import DistributedObject -from direct.fsm import State -from toontown.toonbase import TTLocalizer, ToontownGlobals +from direct.distributed.ClockDelta import * +from direct.fsm import ClassicFSM, State +from direct.interval.IntervalGlobal import * +from direct.showbase import PythonUtil from direct.task.Task import Task + +from toontown.building import BoardingGroupShow from toontown.distributed import DelayDelete from toontown.hood import ZoneUtil +from toontown.toonbase import ToontownGlobals, TTLocalizer from toontown.toontowngui import TeaserPanel -from toontown.building import BoardingGroupShow + +from .ElevatorConstants import * +from .ElevatorUtils import * + class DistributedElevator(DistributedObject.DistributedObject): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedElevator') diff --git a/toontown/building/DistributedElevatorAI.py b/toontown/building/DistributedElevatorAI.py index 7e65c79..c2b5536 100644 --- a/toontown/building/DistributedElevatorAI.py +++ b/toontown/building/DistributedElevatorAI.py @@ -1,13 +1,15 @@ -from otp.ai.AIBase import * -from toontown.toonbase import ToontownGlobals -from direct.distributed.ClockDelta import * -from .ElevatorConstants import * -from direct.distributed import DistributedObjectAI -from direct.fsm import ClassicFSM, State -from direct.fsm import State -from direct.task import Task from direct.directnotify import DirectNotifyGlobal -from toontown.toonbase import ToontownAccessAI +from direct.distributed import DistributedObjectAI +from direct.distributed.ClockDelta import * +from direct.fsm import ClassicFSM, State +from direct.task import Task + +from otp.ai.AIBase import * + +from toontown.toonbase import ToontownAccessAI, ToontownGlobals + +from .ElevatorConstants import * + class DistributedElevatorAI(DistributedObjectAI.DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedElevatorAI') diff --git a/toontown/building/DistributedElevatorExt.py b/toontown/building/DistributedElevatorExt.py index cb354c5..7962a9e 100644 --- a/toontown/building/DistributedElevatorExt.py +++ b/toontown/building/DistributedElevatorExt.py @@ -1,17 +1,19 @@ from panda3d.core import * from panda3d.otp import * + +from direct.directnotify import DirectNotifyGlobal from direct.distributed.ClockDelta import * +from direct.fsm import ClassicFSM, State from direct.interval.IntervalGlobal import * + +from toontown.hood import ZoneUtil +from toontown.toonbase import ToontownGlobals, TTLocalizer +from toontown.toontowngui import TeaserPanel + +from . import DistributedElevator from .ElevatorConstants import * from .ElevatorUtils import * -from . import DistributedElevator -from toontown.toonbase import ToontownGlobals -from direct.directnotify import DirectNotifyGlobal -from direct.fsm import ClassicFSM -from direct.fsm import State -from toontown.hood import ZoneUtil -from toontown.toonbase import TTLocalizer -from toontown.toontowngui import TeaserPanel + class DistributedElevatorExt(DistributedElevator.DistributedElevator): diff --git a/toontown/building/DistributedElevatorExtAI.py b/toontown/building/DistributedElevatorExtAI.py index 5d7bcdf..5d515b8 100644 --- a/toontown/building/DistributedElevatorExtAI.py +++ b/toontown/building/DistributedElevatorExtAI.py @@ -1,12 +1,15 @@ -from otp.ai.AIBase import * -from toontown.toonbase import ToontownGlobals -from direct.distributed.ClockDelta import * -from .ElevatorConstants import * -from . import DistributedElevatorAI -from direct.fsm import ClassicFSM -from direct.fsm import State -from direct.task import Task from direct.directnotify import DirectNotifyGlobal +from direct.distributed.ClockDelta import * +from direct.fsm import ClassicFSM, State +from direct.task import Task + +from otp.ai.AIBase import * + +from toontown.toonbase import ToontownGlobals + +from . import DistributedElevatorAI +from .ElevatorConstants import * + class DistributedElevatorExtAI(DistributedElevatorAI.DistributedElevatorAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedElevatorExtAI') diff --git a/toontown/building/DistributedElevatorFSM.py b/toontown/building/DistributedElevatorFSM.py index 34fd308..dca8dba 100644 --- a/toontown/building/DistributedElevatorFSM.py +++ b/toontown/building/DistributedElevatorFSM.py @@ -1,18 +1,20 @@ from panda3d.core import * + +from direct.directnotify import DirectNotifyGlobal +from direct.distributed import DistributedObject from direct.distributed.ClockDelta import * +from direct.fsm import ClassicFSM, State +from direct.fsm.FSM import FSM from direct.interval.IntervalGlobal import * +from direct.showbase import PythonUtil +from direct.task.Task import Task + +from toontown.hood import ZoneUtil +from toontown.toonbase import ToontownGlobals, TTLocalizer + from .ElevatorConstants import * from .ElevatorUtils import * -from direct.showbase import PythonUtil -from direct.directnotify import DirectNotifyGlobal -from direct.fsm import ClassicFSM -from direct.distributed import DistributedObject -from direct.fsm import State -from toontown.toonbase import TTLocalizer -from toontown.toonbase import ToontownGlobals -from direct.task.Task import Task -from toontown.hood import ZoneUtil -from direct.fsm.FSM import FSM + class DistributedElevatorFSM(DistributedObject.DistributedObject, FSM): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedElevator') diff --git a/toontown/building/DistributedElevatorFSMAI.py b/toontown/building/DistributedElevatorFSMAI.py index 8270848..1cb29bf 100644 --- a/toontown/building/DistributedElevatorFSMAI.py +++ b/toontown/building/DistributedElevatorFSMAI.py @@ -1,11 +1,15 @@ -from otp.ai.AIBase import * -from toontown.toonbase import ToontownGlobals -from direct.distributed.ClockDelta import * -from .ElevatorConstants import * -from direct.distributed import DistributedObjectAI -from direct.task import Task from direct.directnotify import DirectNotifyGlobal +from direct.distributed import DistributedObjectAI +from direct.distributed.ClockDelta import * from direct.fsm.FSM import FSM +from direct.task import Task + +from otp.ai.AIBase import * + +from toontown.toonbase import ToontownGlobals + +from .ElevatorConstants import * + class DistributedElevatorFSMAI(DistributedObjectAI.DistributedObjectAI, FSM): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedElevatorFSMAI') diff --git a/toontown/building/DistributedElevatorFloor.py b/toontown/building/DistributedElevatorFloor.py index 0e95f04..04060d0 100644 --- a/toontown/building/DistributedElevatorFloor.py +++ b/toontown/building/DistributedElevatorFloor.py @@ -1,17 +1,19 @@ from panda3d.core import * + +from direct.directnotify import DirectNotifyGlobal from direct.distributed.ClockDelta import * +from direct.fsm import ClassicFSM, State +from direct.fsm.FSM import FSM from direct.interval.IntervalGlobal import * +from direct.task import Task + +from toontown.hood import ZoneUtil +from toontown.toonbase import ToontownGlobals, TTLocalizer + +from . import DistributedElevatorFSM from .ElevatorConstants import * from .ElevatorUtils import * -from . import DistributedElevatorFSM -from toontown.toonbase import ToontownGlobals -from direct.directnotify import DirectNotifyGlobal -from direct.fsm import ClassicFSM -from direct.fsm import State -from toontown.hood import ZoneUtil -from toontown.toonbase import TTLocalizer -from direct.fsm.FSM import FSM -from direct.task import Task + class DistributedElevatorFloor(DistributedElevatorFSM.DistributedElevatorFSM): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedElevatorFloor') diff --git a/toontown/building/DistributedElevatorFloorAI.py b/toontown/building/DistributedElevatorFloorAI.py index 35ab445..c27d37f 100644 --- a/toontown/building/DistributedElevatorFloorAI.py +++ b/toontown/building/DistributedElevatorFloorAI.py @@ -1,11 +1,15 @@ -from otp.ai.AIBase import * -from toontown.toonbase import ToontownGlobals -from direct.distributed.ClockDelta import * -from .ElevatorConstants import * -from . import DistributedElevatorFSMAI -from direct.task import Task from direct.directnotify import DirectNotifyGlobal +from direct.distributed.ClockDelta import * from direct.fsm.FSM import FSM +from direct.task import Task + +from otp.ai.AIBase import * + +from toontown.toonbase import ToontownGlobals + +from . import DistributedElevatorFSMAI +from .ElevatorConstants import * + class DistributedElevatorFloorAI(DistributedElevatorFSMAI.DistributedElevatorFSMAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedElevatorFloorAI') diff --git a/toontown/building/DistributedElevatorInt.py b/toontown/building/DistributedElevatorInt.py index 709131c..63ddbb0 100644 --- a/toontown/building/DistributedElevatorInt.py +++ b/toontown/building/DistributedElevatorInt.py @@ -1,15 +1,17 @@ from panda3d.core import * + +from direct.directnotify import DirectNotifyGlobal from direct.distributed.ClockDelta import * +from direct.fsm import ClassicFSM, State from direct.interval.IntervalGlobal import * + +from toontown.hood import ZoneUtil +from toontown.toonbase import ToontownGlobals, TTLocalizer + +from . import DistributedElevator from .ElevatorConstants import * from .ElevatorUtils import * -from . import DistributedElevator -from toontown.toonbase import ToontownGlobals -from direct.directnotify import DirectNotifyGlobal -from direct.fsm import ClassicFSM -from direct.fsm import State -from toontown.hood import ZoneUtil -from toontown.toonbase import TTLocalizer + class DistributedElevatorInt(DistributedElevator.DistributedElevator): diff --git a/toontown/building/DistributedElevatorIntAI.py b/toontown/building/DistributedElevatorIntAI.py index 17a37c4..b644912 100644 --- a/toontown/building/DistributedElevatorIntAI.py +++ b/toontown/building/DistributedElevatorIntAI.py @@ -1,14 +1,17 @@ -from otp.ai.AIBase import * -from toontown.toonbase import ToontownGlobals -from direct.distributed.ClockDelta import * -from toontown.building.ElevatorConstants import * import copy -from toontown.building import DistributedElevatorAI -from direct.fsm import ClassicFSM -from direct.fsm import State -from direct.task import Task + from direct.directnotify import DirectNotifyGlobal +from direct.distributed.ClockDelta import * +from direct.fsm import ClassicFSM, State +from direct.task import Task + +from otp.ai.AIBase import * + from toontown.battle import BattleBase +from toontown.building import DistributedElevatorAI +from toontown.building.ElevatorConstants import * +from toontown.toonbase import ToontownGlobals + class DistributedElevatorIntAI(DistributedElevatorAI.DistributedElevatorAI): diff --git a/toontown/building/DistributedGagshopInterior.py b/toontown/building/DistributedGagshopInterior.py index 1ba03cc..e5c7f2e 100644 --- a/toontown/building/DistributedGagshopInterior.py +++ b/toontown/building/DistributedGagshopInterior.py @@ -1,12 +1,17 @@ -from toontown.toonbase.ToonBaseGlobal import * +import random + from panda3d.core import * from panda3d.toontown import * -from toontown.toonbase.ToontownGlobals import * -import random -from direct.distributed import DistributedObject + from direct.directnotify import DirectNotifyGlobal -from . import ToonInteriorColors +from direct.distributed import DistributedObject + from toontown.hood import ZoneUtil +from toontown.toonbase.ToonBaseGlobal import * +from toontown.toonbase.ToontownGlobals import * + +from . import ToonInteriorColors + class DistributedGagshopInterior(DistributedObject.DistributedObject): diff --git a/toontown/building/DistributedGagshopInteriorAI.py b/toontown/building/DistributedGagshopInteriorAI.py index 4f7b6b7..8db44d6 100644 --- a/toontown/building/DistributedGagshopInteriorAI.py +++ b/toontown/building/DistributedGagshopInteriorAI.py @@ -1,5 +1,6 @@ -from direct.distributed import DistributedObjectAI from direct.directnotify import DirectNotifyGlobal +from direct.distributed import DistributedObjectAI + class DistributedGagshopInteriorAI(DistributedObjectAI.DistributedObjectAI): diff --git a/toontown/building/DistributedHQInterior.py b/toontown/building/DistributedHQInterior.py index 466e797..d0b9119 100644 --- a/toontown/building/DistributedHQInterior.py +++ b/toontown/building/DistributedHQInterior.py @@ -1,3 +1,6 @@ +import pickle +from random import Random + from panda3d.core import ModelNode, NodePath, TextNode from panda3d.toontown import DNADoor @@ -6,13 +9,9 @@ from direct.distributed.DistributedObject import DistributedObject from direct.task.TaskManagerGlobal import taskMgr from toontown.building import ToonInteriorColors -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import TTLocalizer +from toontown.toonbase import ToontownGlobals, TTLocalizer from toontown.toonbase.ToonBaseGlobal import base -import pickle -from random import Random - class DistributedHQInterior(DistributedObject): notify = directNotify.newCategory('DistributedHQInterior') diff --git a/toontown/building/DistributedHQInteriorAI.py b/toontown/building/DistributedHQInteriorAI.py index 2aba154..e79957a 100644 --- a/toontown/building/DistributedHQInteriorAI.py +++ b/toontown/building/DistributedHQInteriorAI.py @@ -1,7 +1,9 @@ -from direct.distributed import DistributedObjectAI -from direct.directnotify import DirectNotifyGlobal import pickle +from direct.directnotify import DirectNotifyGlobal +from direct.distributed import DistributedObjectAI + + class DistributedHQInteriorAI(DistributedObjectAI.DistributedObjectAI): def __init__(self, block, air, zoneId): diff --git a/toontown/building/DistributedKartShopInterior.py b/toontown/building/DistributedKartShopInterior.py index 60e218e..f19e1f8 100644 --- a/toontown/building/DistributedKartShopInterior.py +++ b/toontown/building/DistributedKartShopInterior.py @@ -1,10 +1,13 @@ +from panda3d.core import * + from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObject import DistributedObject -from panda3d.core import * + from toontown.building import ToonInteriorColors from toontown.hood import ZoneUtil from toontown.toonbase.ToonBaseGlobal import * from toontown.toonbase.ToontownGlobals import * + if (__debug__): import pdb diff --git a/toontown/building/DistributedKartShopInteriorAI.py b/toontown/building/DistributedKartShopInteriorAI.py index a91f517..67156a9 100644 --- a/toontown/building/DistributedKartShopInteriorAI.py +++ b/toontown/building/DistributedKartShopInteriorAI.py @@ -1,6 +1,7 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectAI import DistributedObjectAI + class DistributedKartShopInteriorAI(DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedKartShopInteriorAI') diff --git a/toontown/building/DistributedKnockKnockDoor.py b/toontown/building/DistributedKnockKnockDoor.py index c984189..7220f3c 100644 --- a/toontown/building/DistributedKnockKnockDoor.py +++ b/toontown/building/DistributedKnockKnockDoor.py @@ -1,15 +1,18 @@ from panda3d.core import * from panda3d.otp import * -from direct.interval.IntervalGlobal import * -from direct.distributed.ClockDelta import * -from .KnockKnockJokes import * -from toontown.toonbase import ToontownGlobals + from direct.directnotify import DirectNotifyGlobal +from direct.distributed.ClockDelta import * from direct.fsm import ClassicFSM -from . import DistributedAnimatedProp +from direct.interval.IntervalGlobal import * + from toontown.distributed import DelayDelete -from toontown.toonbase import TTLocalizer from toontown.hood import ZoneUtil +from toontown.toonbase import ToontownGlobals, TTLocalizer + +from . import DistributedAnimatedProp +from .KnockKnockJokes import * + class DistributedKnockKnockDoor(DistributedAnimatedProp.DistributedAnimatedProp): diff --git a/toontown/building/DistributedKnockKnockDoorAI.py b/toontown/building/DistributedKnockKnockDoorAI.py index 9fdcc19..37d279d 100644 --- a/toontown/building/DistributedKnockKnockDoorAI.py +++ b/toontown/building/DistributedKnockKnockDoorAI.py @@ -1,10 +1,12 @@ -from otp.ai.AIBaseGlobal import * -from direct.distributed.ClockDelta import * from direct.directnotify import DirectNotifyGlobal -from direct.fsm import ClassicFSM -from . import DistributedAnimatedPropAI +from direct.distributed.ClockDelta import * +from direct.fsm import ClassicFSM, State from direct.task.Task import Task -from direct.fsm import State + +from otp.ai.AIBaseGlobal import * + +from . import DistributedAnimatedPropAI + class DistributedKnockKnockDoorAI(DistributedAnimatedPropAI.DistributedAnimatedPropAI): diff --git a/toontown/building/DistributedPetshopInterior.py b/toontown/building/DistributedPetshopInterior.py index 7e07ce3..fec9d19 100644 --- a/toontown/building/DistributedPetshopInterior.py +++ b/toontown/building/DistributedPetshopInterior.py @@ -1,13 +1,18 @@ -from toontown.toonbase.ToonBaseGlobal import * +import random + from panda3d.core import * from panda3d.toontown import * -from toontown.toonbase.ToontownGlobals import * -import random -from direct.distributed import DistributedObject -from direct.directnotify import DirectNotifyGlobal + from direct.actor import Actor -from . import ToonInteriorColors +from direct.directnotify import DirectNotifyGlobal +from direct.distributed import DistributedObject + from toontown.hood import ZoneUtil +from toontown.toonbase.ToonBaseGlobal import * +from toontown.toonbase.ToontownGlobals import * + +from . import ToonInteriorColors + class DistributedPetshopInterior(DistributedObject.DistributedObject): diff --git a/toontown/building/DistributedPetshopInteriorAI.py b/toontown/building/DistributedPetshopInteriorAI.py index baf628e..ac3aafd 100644 --- a/toontown/building/DistributedPetshopInteriorAI.py +++ b/toontown/building/DistributedPetshopInteriorAI.py @@ -1,5 +1,6 @@ -from direct.distributed import DistributedObjectAI from direct.directnotify import DirectNotifyGlobal +from direct.distributed import DistributedObjectAI + class DistributedPetshopInteriorAI(DistributedObjectAI.DistributedObjectAI): diff --git a/toontown/building/DistributedSuitInterior.py b/toontown/building/DistributedSuitInterior.py index ec00d18..569f9ce 100644 --- a/toontown/building/DistributedSuitInterior.py +++ b/toontown/building/DistributedSuitInterior.py @@ -1,15 +1,16 @@ -from direct.interval.IntervalGlobal import * -from direct.distributed.ClockDelta import * -from .ElevatorConstants import * -from . import ElevatorUtils -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import ToontownBattleGlobals from direct.directnotify import DirectNotifyGlobal -from direct.fsm import ClassicFSM, State from direct.distributed import DistributedObject -from direct.fsm import State +from direct.distributed.ClockDelta import * +from direct.fsm import ClassicFSM, State +from direct.interval.IntervalGlobal import * + from toontown.battle import BattleBase from toontown.hood import ZoneUtil +from toontown.toonbase import ToontownBattleGlobals, ToontownGlobals + +from . import ElevatorUtils +from .ElevatorConstants import * + class DistributedSuitInterior(DistributedObject.DistributedObject): id = 0 diff --git a/toontown/building/DistributedSuitInteriorAI.py b/toontown/building/DistributedSuitInteriorAI.py index fd81bd7..870dc93 100644 --- a/toontown/building/DistributedSuitInteriorAI.py +++ b/toontown/building/DistributedSuitInteriorAI.py @@ -1,17 +1,19 @@ -from toontown.toonbase.ToontownBattleGlobals import * -from otp.ai.AIBaseGlobal import * -from direct.distributed.ClockDelta import * -from toontown.building.ElevatorConstants import * -from direct.directnotify import DirectNotifyGlobal -from direct.fsm import ClassicFSM, State -from direct.distributed import DistributedObjectAI -from direct.fsm import State -from toontown.battle import DistributedBattleBldgAI -from toontown.battle import BattleBase -from direct.task import Timer -from toontown.building import DistributedElevatorIntAI import copy +from direct.directnotify import DirectNotifyGlobal +from direct.distributed import DistributedObjectAI +from direct.distributed.ClockDelta import * +from direct.fsm import ClassicFSM, State +from direct.task import Timer + +from otp.ai.AIBaseGlobal import * + +from toontown.battle import BattleBase, DistributedBattleBldgAI +from toontown.building import DistributedElevatorIntAI +from toontown.building.ElevatorConstants import * +from toontown.toonbase.ToontownBattleGlobals import * + + class DistributedSuitInteriorAI(DistributedObjectAI.DistributedObjectAI): def __init__(self, air, elevator): diff --git a/toontown/building/DistributedToonHallInterior.py b/toontown/building/DistributedToonHallInterior.py index 1fb9d16..81bd311 100644 --- a/toontown/building/DistributedToonHallInterior.py +++ b/toontown/building/DistributedToonHallInterior.py @@ -1,23 +1,26 @@ -from panda3d.core import * -from panda3d.toontown import * -from toontown.toonbase.ToonBaseGlobal import * -from direct.interval.IntervalGlobal import * -from direct.distributed.ClockDelta import * -from direct.showbase import Audio3DManager -from toontown.toonbase import ToontownGlobals import pickle -from .DistributedToonInterior import DistributedToonInterior -from direct.directnotify import DirectNotifyGlobal -from direct.fsm import ClassicFSM, State -from direct.distributed import DistributedObject -from direct.fsm import State -from direct.actor import Actor import random import time -from . import ToonInteriorColors + +from panda3d.core import * +from panda3d.toontown import * + +from direct.actor import Actor +from direct.directnotify import DirectNotifyGlobal +from direct.distributed import DistributedObject +from direct.distributed.ClockDelta import * +from direct.fsm import ClassicFSM, State +from direct.interval.IntervalGlobal import * +from direct.showbase import Audio3DManager + from toontown.hood import ZoneUtil -from toontown.toon import ToonDNA -from toontown.toon import ToonHead +from toontown.toon import ToonDNA, ToonHead +from toontown.toonbase import ToontownGlobals +from toontown.toonbase.ToonBaseGlobal import * + +from . import ToonInteriorColors +from .DistributedToonInterior import DistributedToonInterior + class DistributedToonHallInterior(DistributedToonInterior): diff --git a/toontown/building/DistributedToonHallInteriorAI.py b/toontown/building/DistributedToonHallInteriorAI.py index 23a9252..26850ec 100644 --- a/toontown/building/DistributedToonHallInteriorAI.py +++ b/toontown/building/DistributedToonHallInteriorAI.py @@ -1,6 +1,8 @@ -from .DistributedToonInteriorAI import * from toontown.toonbase import ToontownGlobals +from .DistributedToonInteriorAI import * + + class DistributedToonHallInteriorAI(DistributedToonInteriorAI): def __init__(self, block, air, zoneId, building): diff --git a/toontown/building/DistributedToonInterior.py b/toontown/building/DistributedToonInterior.py index 0d3a3c2..c33983f 100644 --- a/toontown/building/DistributedToonInterior.py +++ b/toontown/building/DistributedToonInterior.py @@ -1,20 +1,22 @@ -from toontown.toonbase.ToonBaseGlobal import * +import pickle +import random + from panda3d.core import * from panda3d.toontown import * -from direct.interval.IntervalGlobal import * -from direct.distributed.ClockDelta import * -from toontown.toonbase import ToontownGlobals -import pickle -from . import ToonInterior + from direct.directnotify import DirectNotifyGlobal -from direct.fsm import ClassicFSM, State from direct.distributed import DistributedObject -from direct.fsm import State -import random -from . import ToonInteriorColors +from direct.distributed.ClockDelta import * +from direct.fsm import ClassicFSM, State +from direct.interval.IntervalGlobal import * + from toontown.hood import ZoneUtil -from toontown.toon import ToonDNA -from toontown.toon import ToonHead +from toontown.toon import ToonDNA, ToonHead +from toontown.toonbase import ToontownGlobals +from toontown.toonbase.ToonBaseGlobal import * + +from . import ToonInterior, ToonInteriorColors + SIGN_LEFT = -4 SIGN_RIGHT = 4 SIGN_BOTTOM = -3.5 diff --git a/toontown/building/DistributedToonInteriorAI.py b/toontown/building/DistributedToonInteriorAI.py index 89b39b3..84a0fd9 100644 --- a/toontown/building/DistributedToonInteriorAI.py +++ b/toontown/building/DistributedToonInteriorAI.py @@ -1,13 +1,16 @@ -from toontown.toonbase.ToontownGlobals import * -from otp.ai.AIBaseGlobal import * -from direct.distributed.ClockDelta import * import pickle + from direct.directnotify import DirectNotifyGlobal -from direct.fsm import ClassicFSM, State from direct.distributed import DistributedObjectAI -from direct.fsm import State +from direct.distributed.ClockDelta import * +from direct.fsm import ClassicFSM, State + +from otp.ai.AIBaseGlobal import * + from toontown.toon import NPCToons from toontown.toon.ToonDNA import ToonDNA +from toontown.toonbase.ToontownGlobals import * + class DistributedToonInteriorAI(DistributedObjectAI.DistributedObjectAI): diff --git a/toontown/building/DistributedTrophyMgr.py b/toontown/building/DistributedTrophyMgr.py index ef334a7..a1c179f 100644 --- a/toontown/building/DistributedTrophyMgr.py +++ b/toontown/building/DistributedTrophyMgr.py @@ -1,7 +1,9 @@ -from direct.distributed import DistributedObject from direct.directnotify import DirectNotifyGlobal +from direct.distributed import DistributedObject + from toontown.toonbase import TTLocalizer + class DistributedTrophyMgr(DistributedObject.DistributedObject): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedTrophyMgr') neverDisable = 1 diff --git a/toontown/building/DistributedTutorialInterior.py b/toontown/building/DistributedTutorialInterior.py index 6c92ee1..3ee690d 100644 --- a/toontown/building/DistributedTutorialInterior.py +++ b/toontown/building/DistributedTutorialInterior.py @@ -1,19 +1,22 @@ -from toontown.toonbase.ToonBaseGlobal import * +import random + from panda3d.core import * from panda3d.toontown import * -from direct.interval.IntervalGlobal import * -from direct.distributed.ClockDelta import * -from toontown.toonbase import ToontownGlobals -from . import ToonInterior + from direct.directnotify import DirectNotifyGlobal from direct.distributed import DistributedObject -import random -from . import ToonInteriorColors -from toontown.hood import ZoneUtil +from direct.distributed.ClockDelta import * +from direct.interval.IntervalGlobal import * + from toontown.char import Char -from toontown.suit import SuitDNA -from toontown.suit import Suit +from toontown.hood import ZoneUtil from toontown.quest import QuestParser +from toontown.suit import Suit, SuitDNA +from toontown.toonbase import ToontownGlobals +from toontown.toonbase.ToonBaseGlobal import * + +from . import ToonInterior, ToonInteriorColors + class DistributedTutorialInterior(DistributedObject.DistributedObject): diff --git a/toontown/building/DistributedTutorialInteriorAI.py b/toontown/building/DistributedTutorialInteriorAI.py index 49274a6..4aba921 100644 --- a/toontown/building/DistributedTutorialInteriorAI.py +++ b/toontown/building/DistributedTutorialInteriorAI.py @@ -1,10 +1,12 @@ -from toontown.toonbase.ToontownGlobals import * -from otp.ai.AIBaseGlobal import * -from direct.distributed.ClockDelta import * - from direct.directnotify import DirectNotifyGlobal from direct.distributed import DistributedObjectAI +from direct.distributed.ClockDelta import * + +from otp.ai.AIBaseGlobal import * + from toontown.toon import NPCToons +from toontown.toonbase.ToontownGlobals import * + class DistributedTutorialInteriorAI(DistributedObjectAI.DistributedObjectAI): @@ -37,4 +39,4 @@ class DistributedTutorialInteriorAI(DistributedObjectAI.DistributedObjectAI): return [self.zoneId, self.block] def getTutorialNpcId(self): - return self.tutorialNpcId \ No newline at end of file + return self.tutorialNpcId diff --git a/toontown/building/DistributedVPElevator.py b/toontown/building/DistributedVPElevator.py index 10dd6a1..c322be7 100644 --- a/toontown/building/DistributedVPElevator.py +++ b/toontown/building/DistributedVPElevator.py @@ -1,9 +1,11 @@ -from . import DistributedElevator -from . import DistributedBossElevator -from .ElevatorConstants import * from direct.directnotify import DirectNotifyGlobal + from toontown.toonbase import TTLocalizer +from . import DistributedBossElevator, DistributedElevator +from .ElevatorConstants import * + + class DistributedVPElevator(DistributedBossElevator.DistributedBossElevator): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedVPElevator') diff --git a/toontown/building/DistributedVPElevatorAI.py b/toontown/building/DistributedVPElevatorAI.py index 7a840f4..f364b80 100644 --- a/toontown/building/DistributedVPElevatorAI.py +++ b/toontown/building/DistributedVPElevatorAI.py @@ -1,8 +1,11 @@ -from .ElevatorConstants import * -from . import DistributedBossElevatorAI from direct.directnotify import DirectNotifyGlobal + from toontown.toonbase import ToontownGlobals +from . import DistributedBossElevatorAI +from .ElevatorConstants import * + + class DistributedVPElevatorAI(DistributedBossElevatorAI.DistributedBossElevatorAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedVPElevatorAI') diff --git a/toontown/building/Elevator.py b/toontown/building/Elevator.py index 823bfa5..7993057 100644 --- a/toontown/building/Elevator.py +++ b/toontown/building/Elevator.py @@ -1,14 +1,14 @@ from panda3d.core import * -from toontown.toonbase.ToonBaseGlobal import * + +from direct.fsm import ClassicFSM, State, StateData from direct.gui.DirectGui import * -from panda3d.core import * from direct.interval.IntervalGlobal import * -from direct.fsm import ClassicFSM, State -from direct.fsm import State -from direct.fsm import StateData +from direct.showbase import PythonUtil + from toontown.launcher import DownloadForceAcknowledge from toontown.toonbase import TTLocalizer -from direct.showbase import PythonUtil +from toontown.toonbase.ToonBaseGlobal import * + class Elevator(StateData.StateData): diff --git a/toontown/building/ElevatorConstants.py b/toontown/building/ElevatorConstants.py index f5a993f..47cdccb 100644 --- a/toontown/building/ElevatorConstants.py +++ b/toontown/building/ElevatorConstants.py @@ -1,4 +1,5 @@ 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 b64230a..4364186 100644 --- a/toontown/building/ElevatorUtils.py +++ b/toontown/building/ElevatorUtils.py @@ -1,7 +1,10 @@ from panda3d.core import * + from direct.interval.IntervalGlobal import * + from .ElevatorConstants import * + def getLeftClosePoint(type): width = ElevatorData[type]['width'] return Point3(width, 0, 0) diff --git a/toontown/building/FADoorCodes.py b/toontown/building/FADoorCodes.py index c483d03..1ef9f71 100644 --- a/toontown/building/FADoorCodes.py +++ b/toontown/building/FADoorCodes.py @@ -1,4 +1,5 @@ from toontown.toonbase import TTLocalizer + UNLOCKED = 0 TALK_TO_TOM = 1 DEFEAT_FLUNKY_HQ = 2 diff --git a/toontown/building/GagshopBuildingAI.py b/toontown/building/GagshopBuildingAI.py index f8ba965..46f5f72 100644 --- a/toontown/building/GagshopBuildingAI.py +++ b/toontown/building/GagshopBuildingAI.py @@ -1,8 +1,12 @@ from panda3d.core import * + from direct.directnotify import DirectNotifyGlobal -from . import DistributedDoorAI, DistributedGagshopInteriorAI, FADoorCodes, DoorTypes -from toontown.toon import NPCToons + from toontown.quest import Quests +from toontown.toon import NPCToons + +from . import DistributedDoorAI, DistributedGagshopInteriorAI, DoorTypes, FADoorCodes + class GagshopBuildingAI: diff --git a/toontown/building/HQBuildingAI.py b/toontown/building/HQBuildingAI.py index ce2ec41..8dd8873 100644 --- a/toontown/building/HQBuildingAI.py +++ b/toontown/building/HQBuildingAI.py @@ -1,8 +1,12 @@ from panda3d.core import * + from direct.directnotify import DirectNotifyGlobal -from . import DistributedDoorAI, DistributedHQInteriorAI, FADoorCodes, DoorTypes -from toontown.toon import NPCToons + from toontown.quest import Quests +from toontown.toon import NPCToons + +from . import DistributedDoorAI, DistributedHQInteriorAI, DoorTypes, FADoorCodes + class HQBuildingAI: diff --git a/toontown/building/KartShopBuildingAI.py b/toontown/building/KartShopBuildingAI.py index 3f8d9b3..a1a738b 100644 --- a/toontown/building/KartShopBuildingAI.py +++ b/toontown/building/KartShopBuildingAI.py @@ -1,11 +1,14 @@ -from direct.directnotify import DirectNotifyGlobal from panda3d.core import * -from toontown.building import FADoorCodes, DoorTypes + +from direct.directnotify import DirectNotifyGlobal + +from toontown.building import DoorTypes, FADoorCodes from toontown.building.DistributedDoorAI import DistributedDoorAI from toontown.building.DistributedKartShopInteriorAI import DistributedKartShopInteriorAI from toontown.hood import ZoneUtil from toontown.toon import NPCToons from toontown.toonbase import ToontownGlobals + if __debug__: import pdb diff --git a/toontown/building/KnockKnockJokes.py b/toontown/building/KnockKnockJokes.py index 506552f..c22fc13 100644 --- a/toontown/building/KnockKnockJokes.py +++ b/toontown/building/KnockKnockJokes.py @@ -1,3 +1,4 @@ from toontown.toonbase import TTLocalizer + KnockKnockJokes = TTLocalizer.KnockKnockJokes KnockKnockContestJokes = TTLocalizer.KnockKnockContestJokes diff --git a/toontown/building/PetshopBuildingAI.py b/toontown/building/PetshopBuildingAI.py index 555e3ee..9286476 100644 --- a/toontown/building/PetshopBuildingAI.py +++ b/toontown/building/PetshopBuildingAI.py @@ -1,11 +1,15 @@ from panda3d.core import * + from direct.directnotify import DirectNotifyGlobal -from . import DistributedDoorAI, DistributedPetshopInteriorAI, FADoorCodes, DoorTypes + +from toontown.hood import ZoneUtil +from toontown.pets import DistributedPetAI, PetTraits, PetUtil +from toontown.quest import Quests from toontown.toon import NPCToons from toontown.toonbase import ToontownGlobals -from toontown.quest import Quests -from toontown.pets import DistributedPetAI, PetTraits, PetUtil -from toontown.hood import ZoneUtil + +from . import DistributedDoorAI, DistributedPetshopInteriorAI, DoorTypes, FADoorCodes + class PetshopBuildingAI: diff --git a/toontown/building/SuitBuildingGlobals.py b/toontown/building/SuitBuildingGlobals.py index 3eb9174..2076174 100644 --- a/toontown/building/SuitBuildingGlobals.py +++ b/toontown/building/SuitBuildingGlobals.py @@ -1,4 +1,5 @@ from .ElevatorConstants import * + SuitBuildingInfo = (((1, 1), (1, 3), (4, 4), diff --git a/toontown/building/SuitInterior.py b/toontown/building/SuitInterior.py index c7ef2b3..65c2839 100644 --- a/toontown/building/SuitInterior.py +++ b/toontown/building/SuitInterior.py @@ -1,18 +1,20 @@ from panda3d.core import * -from toontown.toonbase.ToonBaseGlobal import * + from direct.directnotify import DirectNotifyGlobal -from toontown.hood import Place +from direct.fsm import ClassicFSM, State, StateData from direct.showbase import DirectObject -from direct.fsm import StateData -from direct.fsm import ClassicFSM, State -from direct.fsm import State -from toontown.town import TownBattle -from toontown.suit import Suit -from . import Elevator from direct.task.Task import Task + from otp.distributed.TelemetryLimiter import RotationLimitToH, TLGatherAllAvs -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import ToontownBattleGlobals + +from toontown.hood import Place +from toontown.suit import Suit +from toontown.toonbase import ToontownBattleGlobals, ToontownGlobals +from toontown.toonbase.ToonBaseGlobal import * +from toontown.town import TownBattle + +from . import Elevator + class SuitInterior(Place.Place): notify = DirectNotifyGlobal.directNotify.newCategory('SuitInterior') diff --git a/toontown/building/SuitPlannerInteriorAI.py b/toontown/building/SuitPlannerInteriorAI.py index c2567c5..ea2e6a7 100644 --- a/toontown/building/SuitPlannerInteriorAI.py +++ b/toontown/building/SuitPlannerInteriorAI.py @@ -1,9 +1,13 @@ -from otp.ai.AIBaseGlobal import * -import random, functools -from toontown.suit import SuitDNA +import functools +import random + from direct.directnotify import DirectNotifyGlobal -from toontown.suit import DistributedSuitAI + +from otp.ai.AIBaseGlobal import * + from toontown.building import SuitBuildingGlobals +from toontown.suit import DistributedSuitAI, SuitDNA + class SuitPlannerInteriorAI: notify = DirectNotifyGlobal.directNotify.newCategory('SuitPlannerInteriorAI') diff --git a/toontown/building/ToonInteriorColors.py b/toontown/building/ToonInteriorColors.py index fccef5b..56f103d 100644 --- a/toontown/building/ToonInteriorColors.py +++ b/toontown/building/ToonInteriorColors.py @@ -1,4 +1,5 @@ from toontown.toonbase.ToontownGlobals import * + wainscottingBase = [Vec4(0.8, 0.5, 0.3, 1.0), Vec4(0.699, 0.586, 0.473, 1.0), Vec4(0.473, 0.699, 0.488, 1.0)] wallpaperBase = [Vec4(1.0, 1.0, 0.7, 1.0), Vec4(0.8, 1.0, 0.7, 1.0), diff --git a/toontown/building/TutorialBuildingAI.py b/toontown/building/TutorialBuildingAI.py index c2426e5..adea904 100644 --- a/toontown/building/TutorialBuildingAI.py +++ b/toontown/building/TutorialBuildingAI.py @@ -1,12 +1,12 @@ from panda3d.core 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 +from . import DistributedDoorAI, DistributedTutorialInteriorAI, DoorTypes, FADoorCodes + # This is not a distributed class... It just owns and manages some distributed # classes. @@ -17,14 +17,14 @@ class TutorialBuildingAI: 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): @@ -79,7 +79,7 @@ class TutorialBuildingAI: self.door=door self.insideDoor=insideDoor return - + def unlockInteriorDoor(self): self.insideDoor.setDoorLock(FADoorCodes.UNLOCKED) @@ -88,4 +88,4 @@ class TutorialBuildingAI: # 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 + self.door.setDoorLock(FADoorCodes.TALK_TO_HQ_TOM) diff --git a/toontown/building/TutorialHQBuildingAI.py b/toontown/building/TutorialHQBuildingAI.py index ffb6704..b29daf6 100644 --- a/toontown/building/TutorialHQBuildingAI.py +++ b/toontown/building/TutorialHQBuildingAI.py @@ -1,13 +1,13 @@ 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.toon import NPCToons from toontown.toonbase import TTLocalizer +from . import DistributedDoorAI, DistributedHQInteriorAI, DoorTypes, FADoorCodes + # This is not a distributed class... It just owns and manages some distributed # classes. @@ -18,7 +18,7 @@ class TutorialHQBuildingAI: self.air = air self.exteriorZone = exteriorZone self.interiorZone = interiorZone - + self.setup(blockNumber) def cleanup(self): @@ -103,7 +103,7 @@ class TutorialHQBuildingAI: # hide the periscope self.interior.setTutorial(1) return - + def unlockDoor(self, door): door.setDoorLock(FADoorCodes.UNLOCKED) @@ -125,4 +125,4 @@ class TutorialHQBuildingAI: # 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 + self.insideDoor0.setDoorLock(FADoorCodes.WRONG_DOOR_HQ) diff --git a/toontown/catalog/CatalogAccessoryItem.py b/toontown/catalog/CatalogAccessoryItem.py index 69715df..4dfcb07 100644 --- a/toontown/catalog/CatalogAccessoryItem.py +++ b/toontown/catalog/CatalogAccessoryItem.py @@ -1,12 +1,16 @@ +import random + +from panda3d.core import * + +from direct.gui.DirectGui import * +from direct.showbase import PythonUtil + +from toontown.toon import ToonDNA +from toontown.toonbase import ToontownGlobals, TTLocalizer + from . import CatalogItem from .CatalogAccessoryItemGlobals import * -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import TTLocalizer -from toontown.toon import ToonDNA -import random -from direct.showbase import PythonUtil -from direct.gui.DirectGui import * -from panda3d.core import * + class CatalogAccessoryItem(CatalogItem.CatalogItem): diff --git a/toontown/catalog/CatalogAnimatedFurnitureItem.py b/toontown/catalog/CatalogAnimatedFurnitureItem.py index af31576..687924d 100644 --- a/toontown/catalog/CatalogAnimatedFurnitureItem.py +++ b/toontown/catalog/CatalogAnimatedFurnitureItem.py @@ -1,4 +1,5 @@ from .CatalogFurnitureItem import * + FTAnimRate = 6 AnimatedFurnitureItemKeys = (10020, 270, 990, 460, 470, 480, 490, 491, 492) diff --git a/toontown/catalog/CatalogAtticItem.py b/toontown/catalog/CatalogAtticItem.py index cda98e0..11ed9e2 100644 --- a/toontown/catalog/CatalogAtticItem.py +++ b/toontown/catalog/CatalogAtticItem.py @@ -1,8 +1,10 @@ -from . import CatalogItem -from toontown.toonbase import TTLocalizer -from direct.showbase import PythonUtil from direct.gui.DirectGui import * -from toontown.toonbase import ToontownGlobals +from direct.showbase import PythonUtil + +from toontown.toonbase import ToontownGlobals, TTLocalizer + +from . import CatalogItem + class CatalogAtticItem(CatalogItem.CatalogItem): diff --git a/toontown/catalog/CatalogBeanItem.py b/toontown/catalog/CatalogBeanItem.py index 0a3e0d5..4796737 100644 --- a/toontown/catalog/CatalogBeanItem.py +++ b/toontown/catalog/CatalogBeanItem.py @@ -1,9 +1,12 @@ -from . import CatalogItem -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import TTLocalizer -from otp.otpbase import OTPLocalizer from direct.interval.IntervalGlobal import * +from otp.otpbase import OTPLocalizer + +from toontown.toonbase import ToontownGlobals, TTLocalizer + +from . import CatalogItem + + class CatalogBeanItem(CatalogItem.CatalogItem): sequenceNumber = 0 diff --git a/toontown/catalog/CatalogChatItem.py b/toontown/catalog/CatalogChatItem.py index 1f161af..2f17f6b 100644 --- a/toontown/catalog/CatalogChatItem.py +++ b/toontown/catalog/CatalogChatItem.py @@ -1,8 +1,11 @@ from panda3d.core import * -from . import CatalogItem -from toontown.toonbase import ToontownGlobals + from otp.otpbase import OTPLocalizer -from toontown.toonbase import TTLocalizer + +from toontown.toonbase import ToontownGlobals, TTLocalizer + +from . import CatalogItem + bannedPhrases = [11009] class CatalogChatItem(CatalogItem.CatalogItem): diff --git a/toontown/catalog/CatalogChatItemPicker.py b/toontown/catalog/CatalogChatItemPicker.py index 1355017..8608db9 100644 --- a/toontown/catalog/CatalogChatItemPicker.py +++ b/toontown/catalog/CatalogChatItemPicker.py @@ -1,11 +1,15 @@ -from direct.gui.DirectGui import * from panda3d.core import * + +from direct.gui.DirectGui import * from direct.showbase import DirectObject -from . import CatalogItem -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import TTLocalizer + from otp.otpbase import OTPLocalizer + +from toontown.toonbase import ToontownGlobals, TTLocalizer from toontown.toontowngui import TTDialog + +from . import CatalogItem + NUM_ITEMS_SHOWN = 15 class CatalogChatItemPicker(DirectObject.DirectObject): diff --git a/toontown/catalog/CatalogClothingItem.py b/toontown/catalog/CatalogClothingItem.py index c58a7d5..eb87210 100644 --- a/toontown/catalog/CatalogClothingItem.py +++ b/toontown/catalog/CatalogClothingItem.py @@ -1,11 +1,15 @@ -from . import CatalogItem -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import TTLocalizer -from toontown.toon import ToonDNA import random -from direct.showbase import PythonUtil -from direct.gui.DirectGui import * + from panda3d.core import * + +from direct.gui.DirectGui import * +from direct.showbase import PythonUtil + +from toontown.toon import ToonDNA +from toontown.toonbase import ToontownGlobals, TTLocalizer + +from . import CatalogItem + CTArticle = 0 CTString = 1 CTBasePrice = 2 diff --git a/toontown/catalog/CatalogEmoteItem.py b/toontown/catalog/CatalogEmoteItem.py index 52bebd8..84921c8 100644 --- a/toontown/catalog/CatalogEmoteItem.py +++ b/toontown/catalog/CatalogEmoteItem.py @@ -1,8 +1,11 @@ -from . import CatalogItem -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import TTLocalizer -from otp.otpbase import OTPLocalizer from direct.interval.IntervalGlobal import * + +from otp.otpbase import OTPLocalizer + +from toontown.toonbase import ToontownGlobals, TTLocalizer + +from . import CatalogItem + LoyaltyEmoteItems = (20, 21, 22, 23, 24) class CatalogEmoteItem(CatalogItem.CatalogItem): @@ -47,10 +50,9 @@ class CatalogEmoteItem(CatalogItem.CatalogItem): return ToontownGlobals.P_ItemAvailable def getPicture(self, avatar): - from toontown.toon import Toon - from toontown.toon import ToonHead - from toontown.toon import TTEmote from otp.avatar import Emote + + from toontown.toon import Toon, ToonHead, TTEmote self.hasPicture = True if self.emoteIndex in Emote.globalEmote.getHeadEmotes(): toon = ToonHead.ToonHead() @@ -74,10 +76,9 @@ class CatalogEmoteItem(CatalogItem.CatalogItem): return (model, track) def changeIval(self, volume): - from toontown.toon import Toon - from toontown.toon import ToonHead - from toontown.toon import TTEmote from otp.avatar import Emote + + from toontown.toon import Toon, ToonHead, TTEmote self.volume = volume if not hasattr(self, 'pictureToon'): return Sequence() diff --git a/toontown/catalog/CatalogFlooringItem.py b/toontown/catalog/CatalogFlooringItem.py index bf23940..f217538 100644 --- a/toontown/catalog/CatalogFlooringItem.py +++ b/toontown/catalog/CatalogFlooringItem.py @@ -1,4 +1,5 @@ from .CatalogSurfaceItem import * + FTTextureName = 0 FTColor = 1 FTBasePrice = 2 diff --git a/toontown/catalog/CatalogFurnitureItem.py b/toontown/catalog/CatalogFurnitureItem.py index 8bebe19..4b35601 100644 --- a/toontown/catalog/CatalogFurnitureItem.py +++ b/toontown/catalog/CatalogFurnitureItem.py @@ -1,8 +1,9 @@ -from . import CatalogAtticItem -from . import CatalogItem import random -from toontown.toonbase import TTLocalizer -from toontown.toonbase import ToontownGlobals + +from toontown.toonbase import ToontownGlobals, TTLocalizer + +from . import CatalogAtticItem, CatalogItem + FTModelName = 0 FTColor = 1 FTColorOptions = 2 diff --git a/toontown/catalog/CatalogGardenItem.py b/toontown/catalog/CatalogGardenItem.py index dcaff93..39131bc 100644 --- a/toontown/catalog/CatalogGardenItem.py +++ b/toontown/catalog/CatalogGardenItem.py @@ -1,12 +1,16 @@ -from . import CatalogItem -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import TTLocalizer -from otp.otpbase import OTPLocalizer -from direct.interval.IntervalGlobal import * -from toontown.estate import GardenGlobals -from direct.actor import Actor from panda3d.core import NodePath +from direct.actor import Actor +from direct.interval.IntervalGlobal import * + +from otp.otpbase import OTPLocalizer + +from toontown.estate import GardenGlobals +from toontown.toonbase import ToontownGlobals, TTLocalizer + +from . import CatalogItem + + class CatalogGardenItem(CatalogItem.CatalogItem): sequenceNumber = 0 diff --git a/toontown/catalog/CatalogGardenStarterItem.py b/toontown/catalog/CatalogGardenStarterItem.py index 0baa318..13d9d95 100644 --- a/toontown/catalog/CatalogGardenStarterItem.py +++ b/toontown/catalog/CatalogGardenStarterItem.py @@ -1,11 +1,15 @@ -from . import CatalogItem import time -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import TTLocalizer -from otp.otpbase import OTPLocalizer + from direct.interval.IntervalGlobal import * -from toontown.toontowngui import TTDialog + +from otp.otpbase import OTPLocalizer + from toontown.estate import GardenTutorial +from toontown.toonbase import ToontownGlobals, TTLocalizer +from toontown.toontowngui import TTDialog + +from . import CatalogItem + class CatalogGardenStarterItem(CatalogItem.CatalogItem): diff --git a/toontown/catalog/CatalogGenerator.py b/toontown/catalog/CatalogGenerator.py index 61ccc99..ffd4740 100644 --- a/toontown/catalog/CatalogGenerator.py +++ b/toontown/catalog/CatalogGenerator.py @@ -1,31 +1,35 @@ -from direct.directnotify import DirectNotifyGlobal -from . import CatalogItem -from . import CatalogItemList -from .CatalogFurnitureItem import CatalogFurnitureItem, nextAvailableCloset, getAllClosets, get50ItemCloset, getMaxClosets, get50ItemTrunk -from .CatalogAnimatedFurnitureItem import CatalogAnimatedFurnitureItem -from .CatalogClothingItem import CatalogClothingItem, getAllClothes -from .CatalogChatItem import CatalogChatItem, getChatRange -from .CatalogEmoteItem import CatalogEmoteItem -from .CatalogWallpaperItem import CatalogWallpaperItem, getWallpapers -from .CatalogFlooringItem import CatalogFlooringItem, getFloorings -from .CatalogMouldingItem import CatalogMouldingItem, getAllMouldings -from .CatalogWainscotingItem import CatalogWainscotingItem, getAllWainscotings -from .CatalogWindowItem import CatalogWindowItem -from .CatalogPoleItem import nextAvailablePole, getAllPoles -from .CatalogPetTrickItem import CatalogPetTrickItem, getAllPetTricks -from .CatalogGardenItem import CatalogGardenItem -from .CatalogToonStatueItem import CatalogToonStatueItem -from .CatalogRentalItem import CatalogRentalItem -from .CatalogGardenStarterItem import CatalogGardenStarterItem -from .CatalogNametagItem import CatalogNametagItem -from .CatalogAccessoryItem import CatalogAccessoryItem -from direct.actor import Actor -from toontown.toonbase import TTLocalizer -from toontown.toonbase import ToontownGlobals -import types import random import time +import types + from panda3d.core import * + +from direct.actor import Actor +from direct.directnotify import DirectNotifyGlobal + +from toontown.toonbase import ToontownGlobals, TTLocalizer + +from . import CatalogItem, CatalogItemList +from .CatalogAccessoryItem import CatalogAccessoryItem +from .CatalogAnimatedFurnitureItem import CatalogAnimatedFurnitureItem +from .CatalogChatItem import CatalogChatItem, getChatRange +from .CatalogClothingItem import CatalogClothingItem, getAllClothes +from .CatalogEmoteItem import CatalogEmoteItem +from .CatalogFlooringItem import CatalogFlooringItem, getFloorings +from .CatalogFurnitureItem import (CatalogFurnitureItem, get50ItemCloset, get50ItemTrunk, getAllClosets, getMaxClosets, + nextAvailableCloset) +from .CatalogGardenItem import CatalogGardenItem +from .CatalogGardenStarterItem import CatalogGardenStarterItem +from .CatalogMouldingItem import CatalogMouldingItem, getAllMouldings +from .CatalogNametagItem import CatalogNametagItem +from .CatalogPetTrickItem import CatalogPetTrickItem, getAllPetTricks +from .CatalogPoleItem import getAllPoles, nextAvailablePole +from .CatalogRentalItem import CatalogRentalItem +from .CatalogToonStatueItem import CatalogToonStatueItem +from .CatalogWainscotingItem import CatalogWainscotingItem, getAllWainscotings +from .CatalogWallpaperItem import CatalogWallpaperItem, getWallpapers +from .CatalogWindowItem import CatalogWindowItem + 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/CatalogInvalidItem.py b/toontown/catalog/CatalogInvalidItem.py index fca964a..ea1a90a 100644 --- a/toontown/catalog/CatalogInvalidItem.py +++ b/toontown/catalog/CatalogInvalidItem.py @@ -1,7 +1,9 @@ -from . import CatalogItem -from toontown.toonbase import TTLocalizer from direct.showbase import PythonUtil -from toontown.toonbase import ToontownGlobals + +from toontown.toonbase import ToontownGlobals, TTLocalizer + +from . import CatalogItem + class CatalogInvalidItem(CatalogItem.CatalogItem): diff --git a/toontown/catalog/CatalogItem.py b/toontown/catalog/CatalogItem.py index 0ed36d2..f87ec4a 100644 --- a/toontown/catalog/CatalogItem.py +++ b/toontown/catalog/CatalogItem.py @@ -1,11 +1,14 @@ -from direct.directnotify import DirectNotifyGlobal +import sys + from panda3d.core import * -from toontown.toonbase import TTLocalizer -from toontown.toonbase import ToontownGlobals -from direct.interval.IntervalGlobal import * + +from direct.directnotify import DirectNotifyGlobal from direct.distributed.PyDatagram import PyDatagram from direct.distributed.PyDatagramIterator import PyDatagramIterator -import sys +from direct.interval.IntervalGlobal import * + +from toontown.toonbase import ToontownGlobals, TTLocalizer + CatalogReverseType = None CatalogItemVersion = 8 CatalogBackorderMarkup = 1.2 diff --git a/toontown/catalog/CatalogItemList.py b/toontown/catalog/CatalogItemList.py index 1c3c199..93a7097 100644 --- a/toontown/catalog/CatalogItemList.py +++ b/toontown/catalog/CatalogItemList.py @@ -1,8 +1,12 @@ -from . import CatalogItem +import functools + from panda3d.core import * + from direct.distributed.PyDatagram import PyDatagram from direct.distributed.PyDatagramIterator import PyDatagramIterator -import functools + +from . import CatalogItem + class CatalogItemList: diff --git a/toontown/catalog/CatalogItemPanel.py b/toontown/catalog/CatalogItemPanel.py index 99deb70..b718e67 100644 --- a/toontown/catalog/CatalogItemPanel.py +++ b/toontown/catalog/CatalogItemPanel.py @@ -1,19 +1,21 @@ -from direct.gui.DirectGui import * from panda3d.core import * -from toontown.toonbase import ToontownGlobals + +from direct.directnotify import DirectNotifyGlobal +from direct.gui.DirectGui import * + +from otp.otpbase import OTPGlobals + +from toontown.toonbase import ToontownGlobals, TTLocalizer from toontown.toontowngui import TTDialog -from toontown.toonbase import TTLocalizer -from . import CatalogItemTypes -from . import CatalogItem -from .CatalogWallpaperItem import getAllWallpapers +from toontown.toontowngui.TeaserPanel import TeaserPanel + +from . import CatalogItem, CatalogItemTypes from .CatalogFlooringItem import getAllFloorings +from .CatalogFurnitureItem import FLTrunk, getAllFurnitures from .CatalogMouldingItem import getAllMouldings from .CatalogWainscotingItem import getAllWainscotings -from .CatalogFurnitureItem import getAllFurnitures -from .CatalogFurnitureItem import FLTrunk -from toontown.toontowngui.TeaserPanel import TeaserPanel -from otp.otpbase import OTPGlobals -from direct.directnotify import DirectNotifyGlobal +from .CatalogWallpaperItem import getAllWallpapers + CATALOG_PANEL_WORDWRAP = 10 CATALOG_PANEL_CHAT_WORDWRAP = 9 CATALOG_PANEL_ACCESSORY_WORDWRAP = 11 diff --git a/toontown/catalog/CatalogItemTypes.py b/toontown/catalog/CatalogItemTypes.py index 190aa8d..676d65f 100644 --- a/toontown/catalog/CatalogItemTypes.py +++ b/toontown/catalog/CatalogItemTypes.py @@ -1,23 +1,9 @@ -from . import CatalogFurnitureItem -from . import CatalogChatItem -from . import CatalogClothingItem -from . import CatalogEmoteItem -from . import CatalogWallpaperItem -from . import CatalogFlooringItem -from . import CatalogWainscotingItem -from . import CatalogMouldingItem -from . import CatalogWindowItem -from . import CatalogPoleItem -from . import CatalogPetTrickItem -from . import CatalogBeanItem -from . import CatalogGardenItem -from . import CatalogInvalidItem -from . import CatalogRentalItem -from . import CatalogGardenStarterItem -from . import CatalogNametagItem -from . import CatalogToonStatueItem -from . import CatalogAnimatedFurnitureItem -from . import CatalogAccessoryItem +from . import (CatalogAccessoryItem, CatalogAnimatedFurnitureItem, CatalogBeanItem, CatalogChatItem, + CatalogClothingItem, CatalogEmoteItem, CatalogFlooringItem, CatalogFurnitureItem, CatalogGardenItem, + CatalogGardenStarterItem, CatalogInvalidItem, CatalogMouldingItem, CatalogNametagItem, + CatalogPetTrickItem, CatalogPoleItem, CatalogRentalItem, CatalogToonStatueItem, CatalogWainscotingItem, + CatalogWallpaperItem, CatalogWindowItem) + INVALID_ITEM = 0 FURNITURE_ITEM = 1 CHAT_ITEM = 2 diff --git a/toontown/catalog/CatalogManager.py b/toontown/catalog/CatalogManager.py index c558879..14266c3 100644 --- a/toontown/catalog/CatalogManager.py +++ b/toontown/catalog/CatalogManager.py @@ -1,5 +1,6 @@ -from direct.distributed import DistributedObject from direct.directnotify import DirectNotifyGlobal +from direct.distributed import DistributedObject + class CatalogManager(DistributedObject.DistributedObject): notify = DirectNotifyGlobal.directNotify.newCategory('CatalogManager') diff --git a/toontown/catalog/CatalogManagerAI.py b/toontown/catalog/CatalogManagerAI.py index e348b12..b6efe3c 100644 --- a/toontown/catalog/CatalogManagerAI.py +++ b/toontown/catalog/CatalogManagerAI.py @@ -1,6 +1,7 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectAI import DistributedObjectAI + class CatalogManagerAI(DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('CatalogManagerAI') diff --git a/toontown/catalog/CatalogMouldingItem.py b/toontown/catalog/CatalogMouldingItem.py index c4b289f..1fcc05d 100644 --- a/toontown/catalog/CatalogMouldingItem.py +++ b/toontown/catalog/CatalogMouldingItem.py @@ -1,4 +1,5 @@ from .CatalogSurfaceItem import * + MTTextureName = 0 MTColor = 1 MTBasePrice = 2 diff --git a/toontown/catalog/CatalogNametagItem.py b/toontown/catalog/CatalogNametagItem.py index 296d7cc..12186a2 100644 --- a/toontown/catalog/CatalogNametagItem.py +++ b/toontown/catalog/CatalogNametagItem.py @@ -1,9 +1,12 @@ -from . import CatalogItem -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import TTLocalizer -from otp.otpbase import OTPLocalizer -from direct.interval.IntervalGlobal import * from direct.gui.DirectGui import * +from direct.interval.IntervalGlobal import * + +from otp.otpbase import OTPLocalizer + +from toontown.toonbase import ToontownGlobals, TTLocalizer + +from . import CatalogItem + class CatalogNametagItem(CatalogItem.CatalogItem): sequenceNumber = 0 diff --git a/toontown/catalog/CatalogNotifyDialog.py b/toontown/catalog/CatalogNotifyDialog.py index 53bdc6b..95616d6 100644 --- a/toontown/catalog/CatalogNotifyDialog.py +++ b/toontown/catalog/CatalogNotifyDialog.py @@ -1,8 +1,10 @@ -from direct.directnotify import DirectNotifyGlobal -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import TTLocalizer -from direct.gui.DirectGui import * from panda3d.core import * + +from direct.directnotify import DirectNotifyGlobal +from direct.gui.DirectGui import * + +from toontown.toonbase import ToontownGlobals, TTLocalizer + CatalogNotifyBaseXPos = 0.4 class CatalogNotifyDialog: diff --git a/toontown/catalog/CatalogPetTrickItem.py b/toontown/catalog/CatalogPetTrickItem.py index 29117a3..c7a9689 100644 --- a/toontown/catalog/CatalogPetTrickItem.py +++ b/toontown/catalog/CatalogPetTrickItem.py @@ -1,10 +1,13 @@ -from . import CatalogItem -from toontown.pets import PetTricks -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import TTLocalizer -from otp.otpbase import OTPLocalizer from direct.interval.IntervalGlobal import * +from otp.otpbase import OTPLocalizer + +from toontown.pets import PetTricks +from toontown.toonbase import ToontownGlobals, TTLocalizer + +from . import CatalogItem + + class CatalogPetTrickItem(CatalogItem.CatalogItem): sequenceNumber = 0 petPicture = None @@ -42,7 +45,7 @@ class CatalogPetTrickItem(CatalogItem.CatalogItem): return ToontownGlobals.P_ItemAvailable def getPicture(self, avatar): - from toontown.pets import PetDNA, Pet + from toontown.pets import Pet, PetDNA pet = Pet.Pet(forGui=1) dna = avatar.petDNA if dna == None: diff --git a/toontown/catalog/CatalogPoleItem.py b/toontown/catalog/CatalogPoleItem.py index afa6e02..120fb8f 100644 --- a/toontown/catalog/CatalogPoleItem.py +++ b/toontown/catalog/CatalogPoleItem.py @@ -1,10 +1,12 @@ -from . import CatalogItem -from toontown.toonbase import ToontownGlobals -from toontown.fishing import FishGlobals from direct.actor import Actor -from toontown.toonbase import TTLocalizer from direct.interval.IntervalGlobal import * +from toontown.fishing import FishGlobals +from toontown.toonbase import ToontownGlobals, TTLocalizer + +from . import CatalogItem + + class CatalogPoleItem(CatalogItem.CatalogItem): sequenceNumber = 0 diff --git a/toontown/catalog/CatalogRentalItem.py b/toontown/catalog/CatalogRentalItem.py index 4f2a465..cce57d8 100644 --- a/toontown/catalog/CatalogRentalItem.py +++ b/toontown/catalog/CatalogRentalItem.py @@ -1,11 +1,15 @@ -from . import CatalogItem import time -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import TTLocalizer -from otp.otpbase import OTPLocalizer + from direct.interval.IntervalGlobal import * + +from otp.otpbase import OTPLocalizer + +from toontown.toonbase import ToontownGlobals, TTLocalizer from toontown.toontowngui import TTDialog +from . import CatalogItem + + class CatalogRentalItem(CatalogItem.CatalogItem): def makeNewItem(self, typeIndex, duration, cost): diff --git a/toontown/catalog/CatalogScreen.py b/toontown/catalog/CatalogScreen.py index 7b9e3c9..f6f63d9 100644 --- a/toontown/catalog/CatalogScreen.py +++ b/toontown/catalog/CatalogScreen.py @@ -1,19 +1,18 @@ -from panda3d.core import * -from direct.gui.DirectGui import * -from panda3d.core import * -from direct.gui.DirectScrolledList import * -from toontown.toonbase import ToontownGlobals -from toontown.toontowngui import TTDialog -from . import CatalogItem -from . import CatalogInvalidItem -from . import CatalogFurnitureItem -from toontown.toonbase import TTLocalizer -from . import CatalogItemPanel -from . import CatalogItemTypes -from direct.actor import Actor import random -from toontown.toon import DistributedToon + +from panda3d.core import * + +from direct.actor import Actor from direct.directnotify import DirectNotifyGlobal +from direct.gui.DirectGui import * +from direct.gui.DirectScrolledList import * + +from toontown.toon import DistributedToon +from toontown.toonbase import ToontownGlobals, TTLocalizer +from toontown.toontowngui import TTDialog + +from . import CatalogFurnitureItem, CatalogInvalidItem, CatalogItem, CatalogItemPanel, CatalogItemTypes + NUM_CATALOG_ROWS = 3 NUM_CATALOG_COLS = 2 CatalogPanelCenters = [[Point3(-0.95, 0, 0.91), Point3(-0.275, 0, 0.91)], [Point3(-0.95, 0, 0.275), Point3(-0.275, 0, 0.275)], [Point3(-0.95, 0, -0.4), Point3(-0.275, 0, -0.4)]] diff --git a/toontown/catalog/CatalogSurfaceItem.py b/toontown/catalog/CatalogSurfaceItem.py index b391000..3cf6aa8 100644 --- a/toontown/catalog/CatalogSurfaceItem.py +++ b/toontown/catalog/CatalogSurfaceItem.py @@ -1,8 +1,8 @@ -from . import CatalogItem -from . import CatalogAtticItem -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import TTLocalizer +from toontown.toonbase import ToontownGlobals, TTLocalizer + +from . import CatalogAtticItem, CatalogItem from .CatalogSurfaceColors import * + STWallpaper = 0 STMoulding = 1 STFlooring = 2 diff --git a/toontown/catalog/CatalogToonStatueItem.py b/toontown/catalog/CatalogToonStatueItem.py index 20046d8..609ff76 100644 --- a/toontown/catalog/CatalogToonStatueItem.py +++ b/toontown/catalog/CatalogToonStatueItem.py @@ -1,9 +1,12 @@ -from . import CatalogGardenItem -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import TTLocalizer -from otp.otpbase import OTPLocalizer from direct.interval.IntervalGlobal import * + +from otp.otpbase import OTPLocalizer + from toontown.estate import GardenGlobals +from toontown.toonbase import ToontownGlobals, TTLocalizer + +from . import CatalogGardenItem + class CatalogToonStatueItem(CatalogGardenItem.CatalogGardenItem): pictureToonStatue = None diff --git a/toontown/catalog/CatalogWainscotingItem.py b/toontown/catalog/CatalogWainscotingItem.py index 9915e5c..322761d 100644 --- a/toontown/catalog/CatalogWainscotingItem.py +++ b/toontown/catalog/CatalogWainscotingItem.py @@ -1,4 +1,5 @@ from .CatalogSurfaceItem import * + WSTTextureName = 0 WSTColor = 1 WSTBasePrice = 2 diff --git a/toontown/catalog/CatalogWallpaperItem.py b/toontown/catalog/CatalogWallpaperItem.py index a9b8949..bdc0a09 100644 --- a/toontown/catalog/CatalogWallpaperItem.py +++ b/toontown/catalog/CatalogWallpaperItem.py @@ -1,4 +1,5 @@ from .CatalogSurfaceItem import * + WTTextureName = 0 WTColor = 1 WTBorderList = 2 diff --git a/toontown/catalog/CatalogWindowItem.py b/toontown/catalog/CatalogWindowItem.py index 3d824f2..a8982d1 100644 --- a/toontown/catalog/CatalogWindowItem.py +++ b/toontown/catalog/CatalogWindowItem.py @@ -1,8 +1,9 @@ from panda3d.core import * -from . import CatalogAtticItem -from . import CatalogItem -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import TTLocalizer + +from toontown.toonbase import ToontownGlobals, TTLocalizer + +from . import CatalogAtticItem, CatalogItem + WVTModelName = 0 WVTBasePrice = 1 WVTSkyName = 2 diff --git a/toontown/catalog/MailboxScreen.py b/toontown/catalog/MailboxScreen.py index e4a5eee..fa7dbf6 100644 --- a/toontown/catalog/MailboxScreen.py +++ b/toontown/catalog/MailboxScreen.py @@ -1,17 +1,21 @@ +from panda3d.core import * + from direct.directnotify.DirectNotifyGlobal import * from direct.gui.DirectGui import * from direct.showbase import DirectObject, PythonUtil -from panda3d.core import * +from direct.showbase.PythonUtil import StackTrace + from toontown.parties import PartyGlobals from toontown.parties.InviteInfo import InviteInfoBase +from toontown.parties.InviteVisual import InviteVisual from toontown.parties.PartyGlobals import InviteStatus from toontown.parties.SimpleMailBase import SimpleMailBase -from toontown.toonbase import TTLocalizer, ToontownGlobals +from toontown.toonbase import ToontownGlobals, TTLocalizer from toontown.toontowngui import TTDialog from toontown.toontowngui.TeaserPanel import TeaserPanel -from toontown.parties.InviteVisual import InviteVisual + from . import CatalogItem -from direct.showbase.PythonUtil import StackTrace + class MailboxScreen(DirectObject.DirectObject): notify = directNotify.newCategory('MailboxScreen') diff --git a/toontown/char/Char.py b/toontown/char/Char.py index 3910dbc..31e204f 100644 --- a/toontown/char/Char.py +++ b/toontown/char/Char.py @@ -1,10 +1,13 @@ -from otp.avatar import Avatar +import random + from panda3d.core import * from panda3d.otp import * -from direct.task import Task -import random -from panda3d.core import * + from direct.directnotify import DirectNotifyGlobal +from direct.task import Task + +from otp.avatar import Avatar + AnimDict = {'mk': (('walk', 'walk', 3), ('run', 'run', 3), ('neutral', 'wait', 3), diff --git a/toontown/char/CharDNA.py b/toontown/char/CharDNA.py index 0c7c5da..a05c844 100644 --- a/toontown/char/CharDNA.py +++ b/toontown/char/CharDNA.py @@ -1,10 +1,13 @@ import random + from panda3d.core import * + from direct.directnotify.DirectNotifyGlobal import * -import random from direct.distributed.PyDatagram import PyDatagram from direct.distributed.PyDatagramIterator import PyDatagramIterator + from otp.avatar import AvatarDNA + notify = directNotify.newCategory('CharDNA') charTypes = ['mk', 'vmk', diff --git a/toontown/char/DistributedChar.py b/toontown/char/DistributedChar.py index 6517af5..615729c 100644 --- a/toontown/char/DistributedChar.py +++ b/toontown/char/DistributedChar.py @@ -1,6 +1,8 @@ from otp.avatar import DistributedAvatar + from . import Char + class DistributedChar(DistributedAvatar.DistributedAvatar, Char.Char): def __init__(self, cr): diff --git a/toontown/chat/ResistanceChat.py b/toontown/chat/ResistanceChat.py index aa54c0a..ba68877 100644 --- a/toontown/chat/ResistanceChat.py +++ b/toontown/chat/ResistanceChat.py @@ -1,10 +1,13 @@ -from direct.interval.IntervalGlobal import * -from panda3d.core import * -from toontown.toonbase import TTLocalizer -from toontown.toonbase import ToontownBattleGlobals -from toontown.battle import BattleParticles -from direct.particles import Particles import random + +from panda3d.core import * + +from direct.interval.IntervalGlobal import * +from direct.particles import Particles + +from toontown.battle import BattleParticles +from toontown.toonbase import ToontownBattleGlobals, TTLocalizer + TTBG = ToontownBattleGlobals TTL = TTLocalizer EFFECT_RADIUS = 30 diff --git a/toontown/chat/TTChatInputNormal.py b/toontown/chat/TTChatInputNormal.py index b474e34..14867da 100644 --- a/toontown/chat/TTChatInputNormal.py +++ b/toontown/chat/TTChatInputNormal.py @@ -1,8 +1,10 @@ -from direct.gui.DirectGui import * from panda3d.core import * + +from direct.gui.DirectGui import * + from otp.chat import ChatInputNormal -from otp.otpbase import OTPLocalizer -from otp.otpbase import OTPGlobals +from otp.otpbase import OTPGlobals, OTPLocalizer + class TTChatInputNormal(ChatInputNormal.ChatInputNormal): diff --git a/toontown/chat/TTChatInputSpeedChat.py b/toontown/chat/TTChatInputSpeedChat.py index 27434db..6a6e1d6 100644 --- a/toontown/chat/TTChatInputSpeedChat.py +++ b/toontown/chat/TTChatInputSpeedChat.py @@ -1,22 +1,22 @@ -from direct.gui.DirectGui import * -from panda3d.core import * -from otp.speedchat.SpeedChatTypes import * -from toontown.speedchat.TTSpeedChatTypes import * -from otp.speedchat.SpeedChat import SpeedChat -from otp.speedchat import SpeedChatGlobals -from toontown.speedchat import TTSpeedChatGlobals -from toontown.speedchat import TTSCSingingTerminal -from toontown.speedchat import TTSCIndexedTerminal -from direct.showbase import DirectObject -from direct.fsm import ClassicFSM, State -from direct.fsm import State import string -from otp.otpbase import OTPLocalizer -from otp.otpbase import OTPGlobals -from toontown.shtiker.OptionsPage import speedChatStyles -from toontown.toonbase import TTLocalizer + +from panda3d.core import * + +from direct.fsm import ClassicFSM, State +from direct.gui.DirectGui import * +from direct.showbase import DirectObject + +from otp.otpbase import OTPGlobals, OTPLocalizer +from otp.speedchat import SpeedChatGlobals +from otp.speedchat.SpeedChat import SpeedChat +from otp.speedchat.SpeedChatTypes import * + from toontown.parties.PartyGlobals import ActivityIds, DecorationIds -from toontown.toonbase import ToontownGlobals +from toontown.shtiker.OptionsPage import speedChatStyles +from toontown.speedchat import TTSCIndexedTerminal, TTSCSingingTerminal, TTSpeedChatGlobals +from toontown.speedchat.TTSpeedChatTypes import * +from toontown.toonbase import ToontownGlobals, TTLocalizer + scStructure = [[OTPLocalizer.SCMenuHello, {100: 0}, {101: 0}, diff --git a/toontown/chat/TTChatInputWhiteList.py b/toontown/chat/TTChatInputWhiteList.py index 454593c..17abe4c 100644 --- a/toontown/chat/TTChatInputWhiteList.py +++ b/toontown/chat/TTChatInputWhiteList.py @@ -1,14 +1,18 @@ -from otp.chat.ChatInputWhiteListFrame import ChatInputWhiteListFrame -from toontown.chat.TTWhiteList import TTWhiteList -from direct.showbase import DirectObject -from otp.otpbase import OTPGlobals import sys -from direct.gui.DirectGui import * + from panda3d.core import * -from otp.otpbase import OTPLocalizer + from direct.directnotify import DirectNotifyGlobal +from direct.gui.DirectGui import * +from direct.showbase import DirectObject + +from otp.chat.ChatInputWhiteListFrame import ChatInputWhiteListFrame +from otp.otpbase import OTPGlobals, OTPLocalizer + +from toontown.chat.TTWhiteList import TTWhiteList from toontown.toonbase import ToontownGlobals + class TTChatInputWhiteList(ChatInputWhiteListFrame): notify = DirectNotifyGlobal.directNotify.newCategory('TTChatInputWhiteList') TFToggleKey = base.config.GetString('true-friend-toggle-key', 'alt') diff --git a/toontown/chat/TTSCWhiteListTerminal.py b/toontown/chat/TTSCWhiteListTerminal.py index 934054b..14e0f7d 100644 --- a/toontown/chat/TTSCWhiteListTerminal.py +++ b/toontown/chat/TTSCWhiteListTerminal.py @@ -1,5 +1,6 @@ -from otp.speedchat.SCTerminal import SCTerminal from otp.otpbase.OTPLocalizer import SpeedChatStaticText +from otp.speedchat.SCTerminal import SCTerminal + SCStaticTextMsgEvent = 'SCStaticTextMsg' def decodeSCStaticTextMsg(textId): diff --git a/toontown/chat/TTTalkAssistant.py b/toontown/chat/TTTalkAssistant.py index 6913e0a..24a2a61 100644 --- a/toontown/chat/TTTalkAssistant.py +++ b/toontown/chat/TTTalkAssistant.py @@ -1,20 +1,23 @@ import string import sys -from direct.showbase import DirectObject -from otp.otpbase import OTPLocalizer -from toontown.toonbase import TTLocalizer -from direct.directnotify import DirectNotifyGlobal -from otp.otpbase import OTPGlobals -from otp.speedchat import SCDecoders -from panda3d.core import * -from otp.chat.ChatGlobals import * -from otp.chat.TalkGlobals import * -from otp.speedchat import SpeedChatGlobals -from otp.chat.TalkMessage import TalkMessage -from otp.chat.TalkAssistant import TalkAssistant -from toontown.speedchat import TTSCDecoders import time +from panda3d.core import * + +from direct.directnotify import DirectNotifyGlobal +from direct.showbase import DirectObject + +from otp.chat.ChatGlobals import * +from otp.chat.TalkAssistant import TalkAssistant +from otp.chat.TalkGlobals import * +from otp.chat.TalkMessage import TalkMessage +from otp.otpbase import OTPGlobals, OTPLocalizer +from otp.speedchat import SCDecoders, SpeedChatGlobals + +from toontown.speedchat import TTSCDecoders +from toontown.toonbase import TTLocalizer + + class TTTalkAssistant(TalkAssistant): notify = DirectNotifyGlobal.directNotify.newCategory('TTTalkAssistant') diff --git a/toontown/chat/TTWhiteList.py b/toontown/chat/TTWhiteList.py index 184ae96..dc3b533 100644 --- a/toontown/chat/TTWhiteList.py +++ b/toontown/chat/TTWhiteList.py @@ -1,10 +1,15 @@ import datetime + from panda3d.core import * + from direct.directnotify import DirectNotifyGlobal from direct.showbase.DirectObject import DirectObject + from otp.chat.WhiteList import WhiteList + from toontown.toonbase import TTLocalizer + class TTWhiteList(WhiteList, DirectObject): RedownloadTaskName = 'RedownloadWhitelistTask' WhitelistBaseDir = ConfigVariableString('whitelist-base-dir', '').value diff --git a/toontown/chat/ToonChatGarbler.py b/toontown/chat/ToonChatGarbler.py index 5254154..9e6679b 100644 --- a/toontown/chat/ToonChatGarbler.py +++ b/toontown/chat/ToonChatGarbler.py @@ -1,8 +1,11 @@ -import string import random -from toontown.toonbase import TTLocalizer -from otp.otpbase import OTPLocalizer +import string + from otp.chat import ChatGarbler +from otp.otpbase import OTPLocalizer + +from toontown.toonbase import TTLocalizer + class ToonChatGarbler(ChatGarbler.ChatGarbler): animalSounds = {'dog': TTLocalizer.ChatGarblerDog, diff --git a/toontown/chat/ToontownChatManager.py b/toontown/chat/ToontownChatManager.py index 579aa83..294a5ab 100644 --- a/toontown/chat/ToontownChatManager.py +++ b/toontown/chat/ToontownChatManager.py @@ -1,18 +1,23 @@ import sys -from direct.showbase import DirectObject -from direct.showbase.PythonUtil import traceFunctionCall -from otp.otpbase import OTPGlobals -from otp.otpbase import OTPLocalizer -from toontown.toonbase import TTLocalizer -from toontown.toontowngui import TeaserPanel + +from panda3d.core import * + from direct.directnotify import DirectNotifyGlobal from direct.gui.DirectGui import * -from panda3d.core import * +from direct.showbase import DirectObject +from direct.showbase.PythonUtil import traceFunctionCall + from otp.chat import ChatManager -from .TTChatInputSpeedChat import TTChatInputSpeedChat +from otp.otpbase import OTPGlobals, OTPLocalizer + +from toontown.toonbase import TTLocalizer +from toontown.toontowngui import TeaserPanel + from .TTChatInputNormal import TTChatInputNormal +from .TTChatInputSpeedChat import TTChatInputSpeedChat from .TTChatInputWhiteList import TTChatInputWhiteList + class HackedDirectRadioButton(DirectCheckButton): def __init__(self, parent = None, **kw): diff --git a/toontown/classicchars/CCharChatter.py b/toontown/classicchars/CCharChatter.py index df31d8b..ed2baeb 100644 --- a/toontown/classicchars/CCharChatter.py +++ b/toontown/classicchars/CCharChatter.py @@ -1,5 +1,5 @@ -from toontown.toonbase import TTLocalizer -from toontown.toonbase import ToontownGlobals +from toontown.toonbase import ToontownGlobals, TTLocalizer + GREETING = 0 COMMENT = 1 GOODBYE = 2 diff --git a/toontown/classicchars/CCharPaths.py b/toontown/classicchars/CCharPaths.py index 8e97a39..ae04b4b 100644 --- a/toontown/classicchars/CCharPaths.py +++ b/toontown/classicchars/CCharPaths.py @@ -1,7 +1,9 @@ -from panda3d.core import Point3 -from panda3d.core import Vec3 import copy + +from panda3d.core import Point3, Vec3 + from toontown.toonbase import TTLocalizer + __mickeyPaths = {'a': (Point3(17, -17, 4.025), ('b', 'e')), 'b': (Point3(17.5, 7.6, 4.025), ('c', 'e')), 'c': (Point3(85, 11.5, 4.025), ('d',)), diff --git a/toontown/classicchars/CharStateDatas.py b/toontown/classicchars/CharStateDatas.py index 5ce497b..a723eba 100644 --- a/toontown/classicchars/CharStateDatas.py +++ b/toontown/classicchars/CharStateDatas.py @@ -1,13 +1,17 @@ from panda3d.core import * -from direct.interval.IntervalGlobal import * + +from direct.directnotify import DirectNotifyGlobal from direct.distributed.ClockDelta import * from direct.fsm import StateData -from direct.directnotify import DirectNotifyGlobal +from direct.interval.IntervalGlobal import * from direct.showbase.PythonUtil import * from direct.task import Task -from . import CCharPaths + from toontown.toonbase import ToontownGlobals +from . import CCharPaths + + class CharNeutralState(StateData.StateData): notify = DirectNotifyGlobal.directNotify.newCategory('CharNeutralState') diff --git a/toontown/classicchars/CharStateDatasAI.py b/toontown/classicchars/CharStateDatasAI.py index 6e2f68b..7650b39 100644 --- a/toontown/classicchars/CharStateDatasAI.py +++ b/toontown/classicchars/CharStateDatasAI.py @@ -1,11 +1,16 @@ -from otp.ai.AIBaseGlobal import * +import random + +from direct.directnotify import DirectNotifyGlobal from direct.distributed.ClockDelta import * from direct.fsm import StateData -from direct.directnotify import DirectNotifyGlobal -import random from direct.task import Task + +from otp.ai.AIBaseGlobal import * + from toontown.toonbase import ToontownGlobals + from . import CCharChatter, CCharPaths + CHATTY_DURATION = 120.0 class CharLonelyStateAI(StateData.StateData): diff --git a/toontown/classicchars/DistributedCCharBase.py b/toontown/classicchars/DistributedCCharBase.py index f5c908a..bac11a6 100644 --- a/toontown/classicchars/DistributedCCharBase.py +++ b/toontown/classicchars/DistributedCCharBase.py @@ -1,20 +1,23 @@ +import copy + from panda3d.core import * from panda3d.otp import * -from direct.interval.IntervalGlobal import * -from otp.avatar import Avatar from panda3d.otp import CFQuicktalker -from toontown.char import CharDNA -from toontown.char import DistributedChar -from direct.directnotify import DirectNotifyGlobal -from direct.fsm import ClassicFSM -from direct.fsm import State + from direct.controls.ControlManager import CollisionHandlerRayStart -from toontown.toonbase import ToontownGlobals -from toontown.toonbase.TTLocalizer import Donald, DonaldDock, WesternPluto, Pluto +from direct.directnotify import DirectNotifyGlobal +from direct.fsm import ClassicFSM, State +from direct.interval.IntervalGlobal import * + +from otp.avatar import Avatar + +from toontown.char import CharDNA, DistributedChar from toontown.effects import DustCloud -from . import CCharChatter -from . import CCharPaths -import copy +from toontown.toonbase import ToontownGlobals +from toontown.toonbase.TTLocalizer import Donald, DonaldDock, Pluto, WesternPluto + +from . import CCharChatter, CCharPaths + class DistributedCCharBase(DistributedChar.DistributedChar): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedCCharBase') diff --git a/toontown/classicchars/DistributedCCharBaseAI.py b/toontown/classicchars/DistributedCCharBaseAI.py index 010aa2a..3d4fd3e 100644 --- a/toontown/classicchars/DistributedCCharBaseAI.py +++ b/toontown/classicchars/DistributedCCharBaseAI.py @@ -1,11 +1,15 @@ -from otp.ai.AIBaseGlobal import * +import functools +import random + +from direct.directnotify import DirectNotifyGlobal from direct.distributed.ClockDelta import * + +from otp.ai.AIBaseGlobal import * from otp.avatar import DistributedAvatarAI from otp.avatar.DistributedPlayerAI import DistributedPlayerAI -from direct.directnotify import DirectNotifyGlobal + from toontown.toonbase import ToontownGlobals -import random -import functools + class DistributedCCharBaseAI(DistributedAvatarAI.DistributedAvatarAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedCCharBaseAI') diff --git a/toontown/classicchars/DistributedChip.py b/toontown/classicchars/DistributedChip.py index 6400200..95a927c 100644 --- a/toontown/classicchars/DistributedChip.py +++ b/toontown/classicchars/DistributedChip.py @@ -1,11 +1,11 @@ -from direct.showbase.ShowBaseGlobal import * -from . import DistributedCCharBase from direct.directnotify import DirectNotifyGlobal -from direct.fsm import ClassicFSM -from direct.fsm import State -from . import CharStateDatas -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import TTLocalizer +from direct.fsm import ClassicFSM, State +from direct.showbase.ShowBaseGlobal import * + +from toontown.toonbase import ToontownGlobals, TTLocalizer + +from . import CharStateDatas, DistributedCCharBase + class DistributedChip(DistributedCCharBase.DistributedCCharBase): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedChip') diff --git a/toontown/classicchars/DistributedChipAI.py b/toontown/classicchars/DistributedChipAI.py index d9cd262..f780389 100644 --- a/toontown/classicchars/DistributedChipAI.py +++ b/toontown/classicchars/DistributedChipAI.py @@ -1,13 +1,15 @@ -from otp.ai.AIBaseGlobal import * -from . import DistributedCCharBaseAI -from direct.directnotify import DirectNotifyGlobal -from direct.fsm import ClassicFSM -from direct.fsm import State -from direct.task import Task import random -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import TTLocalizer -from . import CharStateDatasAI + +from direct.directnotify import DirectNotifyGlobal +from direct.fsm import ClassicFSM, State +from direct.task import Task + +from otp.ai.AIBaseGlobal import * + +from toontown.toonbase import ToontownGlobals, TTLocalizer + +from . import CharStateDatasAI, DistributedCCharBaseAI + class DistributedChipAI(DistributedCCharBaseAI.DistributedCCharBaseAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedChipAI') diff --git a/toontown/classicchars/DistributedDaisy.py b/toontown/classicchars/DistributedDaisy.py index a495f28..c2fb4c4 100644 --- a/toontown/classicchars/DistributedDaisy.py +++ b/toontown/classicchars/DistributedDaisy.py @@ -1,12 +1,12 @@ -from direct.showbase.ShowBaseGlobal import * -from . import DistributedCCharBase from direct.directnotify import DirectNotifyGlobal -from direct.fsm import ClassicFSM -from direct.fsm import State -from . import CharStateDatas -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import TTLocalizer +from direct.fsm import ClassicFSM, State +from direct.showbase.ShowBaseGlobal import * + from toontown.hood import TTHood +from toontown.toonbase import ToontownGlobals, TTLocalizer + +from . import CharStateDatas, DistributedCCharBase + class DistributedDaisy(DistributedCCharBase.DistributedCCharBase): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedDaisy') diff --git a/toontown/classicchars/DistributedDaisyAI.py b/toontown/classicchars/DistributedDaisyAI.py index 89a136e..dc0e308 100644 --- a/toontown/classicchars/DistributedDaisyAI.py +++ b/toontown/classicchars/DistributedDaisyAI.py @@ -1,13 +1,15 @@ -from otp.ai.AIBaseGlobal import * -from . import DistributedCCharBaseAI -from direct.directnotify import DirectNotifyGlobal -from direct.fsm import ClassicFSM -from direct.fsm import State -from direct.task import Task import random -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import TTLocalizer -from . import CharStateDatasAI + +from direct.directnotify import DirectNotifyGlobal +from direct.fsm import ClassicFSM, State +from direct.task import Task + +from otp.ai.AIBaseGlobal import * + +from toontown.toonbase import ToontownGlobals, TTLocalizer + +from . import CharStateDatasAI, DistributedCCharBaseAI + class DistributedDaisyAI(DistributedCCharBaseAI.DistributedCCharBaseAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedDaisyAI') diff --git a/toontown/classicchars/DistributedDale.py b/toontown/classicchars/DistributedDale.py index a153008..a133336 100644 --- a/toontown/classicchars/DistributedDale.py +++ b/toontown/classicchars/DistributedDale.py @@ -1,11 +1,11 @@ -from direct.showbase.ShowBaseGlobal import * -from . import DistributedCCharBase from direct.directnotify import DirectNotifyGlobal -from direct.fsm import ClassicFSM -from direct.fsm import State -from . import CharStateDatas -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import TTLocalizer +from direct.fsm import ClassicFSM, State +from direct.showbase.ShowBaseGlobal import * + +from toontown.toonbase import ToontownGlobals, TTLocalizer + +from . import CharStateDatas, DistributedCCharBase + class DistributedDale(DistributedCCharBase.DistributedCCharBase): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedDale') diff --git a/toontown/classicchars/DistributedDaleAI.py b/toontown/classicchars/DistributedDaleAI.py index 4b0991f..59cdeaf 100644 --- a/toontown/classicchars/DistributedDaleAI.py +++ b/toontown/classicchars/DistributedDaleAI.py @@ -1,13 +1,15 @@ -from otp.ai.AIBaseGlobal import * -from . import DistributedCCharBaseAI -from direct.directnotify import DirectNotifyGlobal -from direct.fsm import ClassicFSM -from direct.fsm import State -from direct.task import Task import random -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import TTLocalizer -from . import CharStateDatasAI + +from direct.directnotify import DirectNotifyGlobal +from direct.fsm import ClassicFSM, State +from direct.task import Task + +from otp.ai.AIBaseGlobal import * + +from toontown.toonbase import ToontownGlobals, TTLocalizer + +from . import CharStateDatasAI, DistributedCCharBaseAI + class DistributedDaleAI(DistributedCCharBaseAI.DistributedCCharBaseAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedDaleAI') diff --git a/toontown/classicchars/DistributedDonald.py b/toontown/classicchars/DistributedDonald.py index 67b1be4..25cc8dc 100644 --- a/toontown/classicchars/DistributedDonald.py +++ b/toontown/classicchars/DistributedDonald.py @@ -1,14 +1,14 @@ from panda3d.core import * -from direct.interval.IntervalGlobal import * -from . import DistributedCCharBase + from direct.directnotify import DirectNotifyGlobal from direct.fsm import ClassicFSM, State -from direct.fsm import State -from . import CharStateDatas -from . import CCharChatter -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import TTLocalizer +from direct.interval.IntervalGlobal import * + from toontown.hood import GSHood +from toontown.toonbase import ToontownGlobals, TTLocalizer + +from . import CCharChatter, CharStateDatas, DistributedCCharBase + class DistributedDonald(DistributedCCharBase.DistributedCCharBase): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedDonald') diff --git a/toontown/classicchars/DistributedDonaldAI.py b/toontown/classicchars/DistributedDonaldAI.py index c7d0152..d4ca943 100644 --- a/toontown/classicchars/DistributedDonaldAI.py +++ b/toontown/classicchars/DistributedDonaldAI.py @@ -1,13 +1,15 @@ -from otp.ai.AIBaseGlobal import * -from . import DistributedCCharBaseAI +import random + from direct.directnotify import DirectNotifyGlobal from direct.fsm import ClassicFSM, State -from direct.fsm import State from direct.task import Task -import random -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import TTLocalizer -from . import CharStateDatasAI + +from otp.ai.AIBaseGlobal import * + +from toontown.toonbase import ToontownGlobals, TTLocalizer + +from . import CharStateDatasAI, DistributedCCharBaseAI + class DistributedDonaldAI(DistributedCCharBaseAI.DistributedCCharBaseAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedDonaldAI') diff --git a/toontown/classicchars/DistributedDonaldDock.py b/toontown/classicchars/DistributedDonaldDock.py index 593af7f..1e95501 100644 --- a/toontown/classicchars/DistributedDonaldDock.py +++ b/toontown/classicchars/DistributedDonaldDock.py @@ -1,14 +1,14 @@ from panda3d.core import * -from direct.interval.IntervalGlobal import * -from . import DistributedCCharBase + from direct.directnotify import DirectNotifyGlobal -from direct.fsm import ClassicFSM, State -from direct.fsm import State -from toontown.toonbase import ToontownGlobals -from . import CharStateDatas -from direct.fsm import StateData +from direct.fsm import ClassicFSM, State, StateData +from direct.interval.IntervalGlobal import * from direct.task import Task -from toontown.toonbase import TTLocalizer + +from toontown.toonbase import ToontownGlobals, TTLocalizer + +from . import CharStateDatas, DistributedCCharBase + class DistributedDonaldDock(DistributedCCharBase.DistributedCCharBase): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedDonaldDock') diff --git a/toontown/classicchars/DistributedDonaldDockAI.py b/toontown/classicchars/DistributedDonaldDockAI.py index ac41458..679e73b 100644 --- a/toontown/classicchars/DistributedDonaldDockAI.py +++ b/toontown/classicchars/DistributedDonaldDockAI.py @@ -1,12 +1,12 @@ -from otp.ai.AIBaseGlobal import * -from toontown.classicchars import DistributedCCharBaseAI from direct.directnotify import DirectNotifyGlobal from direct.fsm import ClassicFSM, State -from direct.fsm import State from direct.task import Task -from toontown.classicchars import CharStateDatasAI -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import TTLocalizer + +from otp.ai.AIBaseGlobal import * + +from toontown.classicchars import CharStateDatasAI, DistributedCCharBaseAI +from toontown.toonbase import ToontownGlobals, TTLocalizer + class DistributedDonaldDockAI(DistributedCCharBaseAI.DistributedCCharBaseAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedDonaldDockAI') diff --git a/toontown/classicchars/DistributedFrankenDonald.py b/toontown/classicchars/DistributedFrankenDonald.py index bbd193b..d76f169 100644 --- a/toontown/classicchars/DistributedFrankenDonald.py +++ b/toontown/classicchars/DistributedFrankenDonald.py @@ -1,15 +1,14 @@ from panda3d.core import * -from direct.interval.IntervalGlobal import * -from . import DistributedCCharBase -from . import DistributedDonald + from direct.directnotify import DirectNotifyGlobal from direct.fsm import ClassicFSM, State -from direct.fsm import State -from . import CharStateDatas -from . import CCharChatter -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import TTLocalizer +from direct.interval.IntervalGlobal import * + from toontown.hood import GSHood +from toontown.toonbase import ToontownGlobals, TTLocalizer + +from . import CCharChatter, CharStateDatas, DistributedCCharBase, DistributedDonald + class DistributedFrankenDonald(DistributedDonald.DistributedDonald): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedFrankenDonald') diff --git a/toontown/classicchars/DistributedFrankenDonaldAI.py b/toontown/classicchars/DistributedFrankenDonaldAI.py index 9f67708..a5f681e 100644 --- a/toontown/classicchars/DistributedFrankenDonaldAI.py +++ b/toontown/classicchars/DistributedFrankenDonaldAI.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectAI import DistributedObjectAI + class DistributedFrankenDonaldAI(DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedFrankenDonaldAI') diff --git a/toontown/classicchars/DistributedGoofy.py b/toontown/classicchars/DistributedGoofy.py index 219e173..84878fa 100644 --- a/toontown/classicchars/DistributedGoofy.py +++ b/toontown/classicchars/DistributedGoofy.py @@ -1,11 +1,12 @@ from panda3d.core import * -from . import DistributedCCharBase + from direct.directnotify import DirectNotifyGlobal from direct.fsm import ClassicFSM, State -from direct.fsm import State -from . import CharStateDatas -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import TTLocalizer + +from toontown.toonbase import ToontownGlobals, TTLocalizer + +from . import CharStateDatas, DistributedCCharBase + class DistributedGoofy(DistributedCCharBase.DistributedCCharBase): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedGoofy') diff --git a/toontown/classicchars/DistributedGoofyAI.py b/toontown/classicchars/DistributedGoofyAI.py index 7b0a5b8..808adae 100644 --- a/toontown/classicchars/DistributedGoofyAI.py +++ b/toontown/classicchars/DistributedGoofyAI.py @@ -1,13 +1,15 @@ -from otp.ai.AIBaseGlobal import * -from . import DistributedCCharBaseAI +import random + from direct.directnotify import DirectNotifyGlobal from direct.fsm import ClassicFSM, State -from direct.fsm import State from direct.task import Task -import random -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import TTLocalizer -from . import CharStateDatasAI + +from otp.ai.AIBaseGlobal import * + +from toontown.toonbase import ToontownGlobals, TTLocalizer + +from . import CharStateDatasAI, DistributedCCharBaseAI + class DistributedGoofyAI(DistributedCCharBaseAI.DistributedCCharBaseAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedGoofyAI') diff --git a/toontown/classicchars/DistributedGoofySpeedway.py b/toontown/classicchars/DistributedGoofySpeedway.py index 020e061..9799254 100644 --- a/toontown/classicchars/DistributedGoofySpeedway.py +++ b/toontown/classicchars/DistributedGoofySpeedway.py @@ -1,12 +1,13 @@ from panda3d.core import * -from . import DistributedCCharBase + from direct.directnotify import DirectNotifyGlobal from direct.fsm import ClassicFSM, State -from direct.fsm import State -from . import CharStateDatas -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import TTLocalizer + from toontown.hood import DLHood +from toontown.toonbase import ToontownGlobals, TTLocalizer + +from . import CharStateDatas, DistributedCCharBase + class DistributedGoofySpeedway(DistributedCCharBase.DistributedCCharBase): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedGoofySpeedway') diff --git a/toontown/classicchars/DistributedGoofySpeedwayAI.py b/toontown/classicchars/DistributedGoofySpeedwayAI.py index ad76202..29acbc2 100644 --- a/toontown/classicchars/DistributedGoofySpeedwayAI.py +++ b/toontown/classicchars/DistributedGoofySpeedwayAI.py @@ -1,13 +1,15 @@ -from otp.ai.AIBaseGlobal import * -from . import DistributedCCharBaseAI +import random + from direct.directnotify import DirectNotifyGlobal from direct.fsm import ClassicFSM, State -from direct.fsm import State from direct.task import Task -import random -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import TTLocalizer -from . import CharStateDatasAI + +from otp.ai.AIBaseGlobal import * + +from toontown.toonbase import ToontownGlobals, TTLocalizer + +from . import CharStateDatasAI, DistributedCCharBaseAI + class DistributedGoofySpeedwayAI(DistributedCCharBaseAI.DistributedCCharBaseAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedGoofySpeedwayAI') diff --git a/toontown/classicchars/DistributedJailbirdDale.py b/toontown/classicchars/DistributedJailbirdDale.py index c0b2f7c..76638dc 100644 --- a/toontown/classicchars/DistributedJailbirdDale.py +++ b/toontown/classicchars/DistributedJailbirdDale.py @@ -1,12 +1,11 @@ -from direct.showbase.ShowBaseGlobal import * -from . import DistributedCCharBase from direct.directnotify import DirectNotifyGlobal -from direct.fsm import ClassicFSM -from direct.fsm import State -from . import CharStateDatas -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import TTLocalizer -from . import DistributedDale +from direct.fsm import ClassicFSM, State +from direct.showbase.ShowBaseGlobal import * + +from toontown.toonbase import ToontownGlobals, TTLocalizer + +from . import CharStateDatas, DistributedCCharBase, DistributedDale + class DistributedJailbirdDale(DistributedDale.DistributedDale): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedJailbirdDale') diff --git a/toontown/classicchars/DistributedJailbirdDaleAI.py b/toontown/classicchars/DistributedJailbirdDaleAI.py index 7cf3751..f7cf93b 100644 --- a/toontown/classicchars/DistributedJailbirdDaleAI.py +++ b/toontown/classicchars/DistributedJailbirdDaleAI.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectAI import DistributedObjectAI + class DistributedJailbirdDaleAI(DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedJailbirdDaleAI') diff --git a/toontown/classicchars/DistributedMickey.py b/toontown/classicchars/DistributedMickey.py index 26eb2a8..b428a31 100644 --- a/toontown/classicchars/DistributedMickey.py +++ b/toontown/classicchars/DistributedMickey.py @@ -1,12 +1,13 @@ from panda3d.core import * -from . import DistributedCCharBase + from direct.directnotify import DirectNotifyGlobal from direct.fsm import ClassicFSM, State -from direct.fsm import State -from . import CharStateDatas -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import TTLocalizer + from toontown.hood import DGHood +from toontown.toonbase import ToontownGlobals, TTLocalizer + +from . import CharStateDatas, DistributedCCharBase + class DistributedMickey(DistributedCCharBase.DistributedCCharBase): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedMickey') diff --git a/toontown/classicchars/DistributedMickeyAI.py b/toontown/classicchars/DistributedMickeyAI.py index 5055413..6ded630 100644 --- a/toontown/classicchars/DistributedMickeyAI.py +++ b/toontown/classicchars/DistributedMickeyAI.py @@ -1,13 +1,15 @@ -from otp.ai.AIBaseGlobal import * -from . import DistributedCCharBaseAI +import random + from direct.directnotify import DirectNotifyGlobal from direct.fsm import ClassicFSM, State -from direct.fsm import State from direct.task import Task -import random -from toontown.toonbase import ToontownGlobals -from . import CharStateDatasAI -from toontown.toonbase import TTLocalizer + +from otp.ai.AIBaseGlobal import * + +from toontown.toonbase import ToontownGlobals, TTLocalizer + +from . import CharStateDatasAI, DistributedCCharBaseAI + class DistributedMickeyAI(DistributedCCharBaseAI.DistributedCCharBaseAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedMickeyAI') diff --git a/toontown/classicchars/DistributedMinnie.py b/toontown/classicchars/DistributedMinnie.py index 2de823c..0e6c401 100644 --- a/toontown/classicchars/DistributedMinnie.py +++ b/toontown/classicchars/DistributedMinnie.py @@ -1,12 +1,13 @@ from panda3d.core import * -from . import DistributedCCharBase + from direct.directnotify import DirectNotifyGlobal from direct.fsm import ClassicFSM, State -from direct.fsm import State -from . import CharStateDatas -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import TTLocalizer + from toontown.hood import BRHood +from toontown.toonbase import ToontownGlobals, TTLocalizer + +from . import CharStateDatas, DistributedCCharBase + class DistributedMinnie(DistributedCCharBase.DistributedCCharBase): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedMinnie') diff --git a/toontown/classicchars/DistributedMinnieAI.py b/toontown/classicchars/DistributedMinnieAI.py index e6d2946..c6eec1e 100644 --- a/toontown/classicchars/DistributedMinnieAI.py +++ b/toontown/classicchars/DistributedMinnieAI.py @@ -1,13 +1,15 @@ -from otp.ai.AIBaseGlobal import * -from . import DistributedCCharBaseAI +import random + from direct.directnotify import DirectNotifyGlobal from direct.fsm import ClassicFSM, State -from direct.fsm import State from direct.task import Task -import random -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import TTLocalizer -from . import CharStateDatasAI + +from otp.ai.AIBaseGlobal import * + +from toontown.toonbase import ToontownGlobals, TTLocalizer + +from . import CharStateDatasAI, DistributedCCharBaseAI + class DistributedMinnieAI(DistributedCCharBaseAI.DistributedCCharBaseAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedMinnieAI') diff --git a/toontown/classicchars/DistributedPluto.py b/toontown/classicchars/DistributedPluto.py index 9afb7f5..7e59877 100644 --- a/toontown/classicchars/DistributedPluto.py +++ b/toontown/classicchars/DistributedPluto.py @@ -1,15 +1,15 @@ from panda3d.core import * -from direct.interval.IntervalGlobal import * -from . import DistributedCCharBase + from direct.directnotify import DirectNotifyGlobal -from direct.fsm import ClassicFSM, State -from direct.fsm import State -from toontown.toonbase import ToontownGlobals -from . import CharStateDatas -from direct.fsm import StateData +from direct.fsm import ClassicFSM, State, StateData +from direct.interval.IntervalGlobal import * from direct.task import Task -from toontown.toonbase import TTLocalizer + from toontown.hood import MMHood +from toontown.toonbase import ToontownGlobals, TTLocalizer + +from . import CharStateDatas, DistributedCCharBase + class DistributedPluto(DistributedCCharBase.DistributedCCharBase): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedPluto') diff --git a/toontown/classicchars/DistributedPlutoAI.py b/toontown/classicchars/DistributedPlutoAI.py index b073496..22e97c0 100644 --- a/toontown/classicchars/DistributedPlutoAI.py +++ b/toontown/classicchars/DistributedPlutoAI.py @@ -1,12 +1,12 @@ -from otp.ai.AIBaseGlobal import * -from toontown.classicchars import DistributedCCharBaseAI from direct.directnotify import DirectNotifyGlobal from direct.fsm import ClassicFSM, State -from direct.fsm import State from direct.task import Task -from toontown.classicchars import CharStateDatasAI, CCharChatter -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import TTLocalizer + +from otp.ai.AIBaseGlobal import * + +from toontown.classicchars import CCharChatter, CharStateDatasAI, DistributedCCharBaseAI +from toontown.toonbase import ToontownGlobals, TTLocalizer + class DistributedPlutoAI(DistributedCCharBaseAI.DistributedCCharBaseAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedPlutoAI') diff --git a/toontown/classicchars/DistributedPoliceChip.py b/toontown/classicchars/DistributedPoliceChip.py index 28bfc9b..a8624e8 100644 --- a/toontown/classicchars/DistributedPoliceChip.py +++ b/toontown/classicchars/DistributedPoliceChip.py @@ -1,12 +1,11 @@ -from direct.showbase.ShowBaseGlobal import * -from . import DistributedCCharBase from direct.directnotify import DirectNotifyGlobal -from direct.fsm import ClassicFSM -from direct.fsm import State -from . import CharStateDatas -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import TTLocalizer -from . import DistributedChip +from direct.fsm import ClassicFSM, State +from direct.showbase.ShowBaseGlobal import * + +from toontown.toonbase import ToontownGlobals, TTLocalizer + +from . import CharStateDatas, DistributedCCharBase, DistributedChip + class DistributedPoliceChip(DistributedChip.DistributedChip): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedPoliceChip') diff --git a/toontown/classicchars/DistributedPoliceChipAI.py b/toontown/classicchars/DistributedPoliceChipAI.py index a86d957..92d4bfb 100644 --- a/toontown/classicchars/DistributedPoliceChipAI.py +++ b/toontown/classicchars/DistributedPoliceChipAI.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectAI import DistributedObjectAI + class DistributedPoliceChipAI(DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedPoliceChipAI') diff --git a/toontown/classicchars/DistributedSockHopDaisy.py b/toontown/classicchars/DistributedSockHopDaisy.py index 28f711a..e8a52d3 100644 --- a/toontown/classicchars/DistributedSockHopDaisy.py +++ b/toontown/classicchars/DistributedSockHopDaisy.py @@ -1,13 +1,12 @@ -from direct.showbase.ShowBaseGlobal import * -from . import DistributedCCharBase -from . import DistributedDaisy from direct.directnotify import DirectNotifyGlobal -from direct.fsm import ClassicFSM -from direct.fsm import State -from . import CharStateDatas -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import TTLocalizer +from direct.fsm import ClassicFSM, State +from direct.showbase.ShowBaseGlobal import * + from toontown.hood import TTHood +from toontown.toonbase import ToontownGlobals, TTLocalizer + +from . import CharStateDatas, DistributedCCharBase, DistributedDaisy + class DistributedSockHopDaisy(DistributedDaisy.DistributedDaisy): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedSockHopDaisy') diff --git a/toontown/classicchars/DistributedSockHopDaisyAI.py b/toontown/classicchars/DistributedSockHopDaisyAI.py index 9c4ebeb..8b36ea4 100644 --- a/toontown/classicchars/DistributedSockHopDaisyAI.py +++ b/toontown/classicchars/DistributedSockHopDaisyAI.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectAI import DistributedObjectAI + class DistributedSockHopDaisyAI(DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedSockHopDaisyAI') diff --git a/toontown/classicchars/DistributedSuperGoofy.py b/toontown/classicchars/DistributedSuperGoofy.py index b96894e..930fbf5 100644 --- a/toontown/classicchars/DistributedSuperGoofy.py +++ b/toontown/classicchars/DistributedSuperGoofy.py @@ -1,13 +1,13 @@ from panda3d.core import * -from . import DistributedCCharBase + from direct.directnotify import DirectNotifyGlobal from direct.fsm import ClassicFSM, State -from direct.fsm import State + from toontown.classicchars import DistributedGoofySpeedway -from . import CharStateDatas -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import TTLocalizer -from . import DistributedCCharBase +from toontown.toonbase import ToontownGlobals, TTLocalizer + +from . import CharStateDatas, DistributedCCharBase + class DistributedSuperGoofy(DistributedGoofySpeedway.DistributedGoofySpeedway): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedSuperGoofy') diff --git a/toontown/classicchars/DistributedSuperGoofyAI.py b/toontown/classicchars/DistributedSuperGoofyAI.py index 6d9877a..d90ee3e 100644 --- a/toontown/classicchars/DistributedSuperGoofyAI.py +++ b/toontown/classicchars/DistributedSuperGoofyAI.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectAI import DistributedObjectAI + class DistributedSuperGoofyAI(DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedSuperGoofyAI') diff --git a/toontown/classicchars/DistributedVampireMickey.py b/toontown/classicchars/DistributedVampireMickey.py index 870e0f5..2fafd01 100644 --- a/toontown/classicchars/DistributedVampireMickey.py +++ b/toontown/classicchars/DistributedVampireMickey.py @@ -1,13 +1,13 @@ from panda3d.core import * -from . import DistributedCCharBase + from direct.directnotify import DirectNotifyGlobal from direct.fsm import ClassicFSM, State -from direct.fsm import State + from toontown.classicchars import DistributedMickey -from . import CharStateDatas -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import TTLocalizer -from . import DistributedCCharBase +from toontown.toonbase import ToontownGlobals, TTLocalizer + +from . import CharStateDatas, DistributedCCharBase + class DistributedVampireMickey(DistributedMickey.DistributedMickey): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedVampireMickey') diff --git a/toontown/classicchars/DistributedVampireMickeyAI.py b/toontown/classicchars/DistributedVampireMickeyAI.py index 553e38e..5503d91 100644 --- a/toontown/classicchars/DistributedVampireMickeyAI.py +++ b/toontown/classicchars/DistributedVampireMickeyAI.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectAI import DistributedObjectAI + class DistributedVampireMickeyAI(DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedVampireMickeyAI') diff --git a/toontown/classicchars/DistributedWesternPluto.py b/toontown/classicchars/DistributedWesternPluto.py index 94a8bd1..29b7f10 100644 --- a/toontown/classicchars/DistributedWesternPluto.py +++ b/toontown/classicchars/DistributedWesternPluto.py @@ -1,13 +1,13 @@ from panda3d.core import * -from . import DistributedCCharBase + from direct.directnotify import DirectNotifyGlobal from direct.fsm import ClassicFSM, State -from direct.fsm import State + from toontown.classicchars import DistributedPluto -from . import CharStateDatas -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import TTLocalizer -from . import DistributedCCharBase +from toontown.toonbase import ToontownGlobals, TTLocalizer + +from . import CharStateDatas, DistributedCCharBase + class DistributedWesternPluto(DistributedPluto.DistributedPluto): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedWesternPluto') diff --git a/toontown/classicchars/DistributedWesternPlutoAI.py b/toontown/classicchars/DistributedWesternPlutoAI.py index aca9164..ed57d6b 100644 --- a/toontown/classicchars/DistributedWesternPlutoAI.py +++ b/toontown/classicchars/DistributedWesternPlutoAI.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectAI import DistributedObjectAI + class DistributedWesternPlutoAI(DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedWesternPlutoAI') diff --git a/toontown/classicchars/DistributedWitchMinnie.py b/toontown/classicchars/DistributedWitchMinnie.py index 249ad73..0ac6886 100644 --- a/toontown/classicchars/DistributedWitchMinnie.py +++ b/toontown/classicchars/DistributedWitchMinnie.py @@ -1,13 +1,13 @@ from panda3d.core import * -from . import DistributedCCharBase + from direct.directnotify import DirectNotifyGlobal from direct.fsm import ClassicFSM, State -from direct.fsm import State + from toontown.classicchars import DistributedMinnie -from . import CharStateDatas -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import TTLocalizer -from . import DistributedCCharBase +from toontown.toonbase import ToontownGlobals, TTLocalizer + +from . import CharStateDatas, DistributedCCharBase + class DistributedWitchMinnie(DistributedMinnie.DistributedMinnie): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedWitchMinnie') diff --git a/toontown/classicchars/DistributedWitchMinnieAI.py b/toontown/classicchars/DistributedWitchMinnieAI.py index a362095..16ca097 100644 --- a/toontown/classicchars/DistributedWitchMinnieAI.py +++ b/toontown/classicchars/DistributedWitchMinnieAI.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectAI import DistributedObjectAI + class DistributedWitchMinnieAI(DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedWitchMinnieAI') diff --git a/toontown/coderedemption/TTCodeRedemptionMgr.py b/toontown/coderedemption/TTCodeRedemptionMgr.py index 3566b42..ea6ebe0 100644 --- a/toontown/coderedemption/TTCodeRedemptionMgr.py +++ b/toontown/coderedemption/TTCodeRedemptionMgr.py @@ -1,5 +1,6 @@ -from direct.distributed.DistributedObject import DistributedObject from direct.directnotify.DirectNotifyGlobal import directNotify +from direct.distributed.DistributedObject import DistributedObject + class TTCodeRedemptionMgr(DistributedObject): neverDisable = 1 diff --git a/toontown/coderedemption/TTCodeRedemptionMgrAI.py b/toontown/coderedemption/TTCodeRedemptionMgrAI.py index a47c943..0a4e3a3 100644 --- a/toontown/coderedemption/TTCodeRedemptionMgrAI.py +++ b/toontown/coderedemption/TTCodeRedemptionMgrAI.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectAI import DistributedObjectAI + class TTCodeRedemptionMgrAI(DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('TTCodeRedemptionMgrAI') diff --git a/toontown/coderedemption/TTCodeRedemptionMgrUD.py b/toontown/coderedemption/TTCodeRedemptionMgrUD.py index 3757aef..1741e2f 100644 --- a/toontown/coderedemption/TTCodeRedemptionMgrUD.py +++ b/toontown/coderedemption/TTCodeRedemptionMgrUD.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectUD import DistributedObjectUD + class TTCodeRedemptionMgrUD(DistributedObjectUD): notify = DirectNotifyGlobal.directNotify.newCategory('TTCodeRedemptionMgrUD') diff --git a/toontown/cogdominium/CogdoBarrelRoom.py b/toontown/cogdominium/CogdoBarrelRoom.py index ce231b9..2fd50b1 100644 --- a/toontown/cogdominium/CogdoBarrelRoom.py +++ b/toontown/cogdominium/CogdoBarrelRoom.py @@ -1,10 +1,14 @@ import random + from panda3d.core import * -from direct.interval.IntervalGlobal import * + from direct.directnotify import DirectNotifyGlobal -from toontown.toonbase import ToontownGlobals, ToontownTimer +from direct.interval.IntervalGlobal import * + from toontown.cogdominium import CogdoBarrelRoomConsts, CogdoBarrelRoomRewardPanel from toontown.distributed import DelayDelete +from toontown.toonbase import ToontownGlobals, ToontownTimer + class CogdoBarrelRoom: notify = DirectNotifyGlobal.directNotify.newCategory('DistributedCogdoBarrelRoom') diff --git a/toontown/cogdominium/CogdoBarrelRoomAI.py b/toontown/cogdominium/CogdoBarrelRoomAI.py index 462df1b..39c1479 100644 --- a/toontown/cogdominium/CogdoBarrelRoomAI.py +++ b/toontown/cogdominium/CogdoBarrelRoomAI.py @@ -1,12 +1,14 @@ import random + from direct.directnotify import DirectNotifyGlobal from direct.distributed import DistributedObjectAI from direct.showbase import PythonUtil from direct.task import Timer from direct.task.Task import Task + +from toontown.cogdominium import CogdoBarrelRoomConsts, DistributedCogdoBarrelAI from toontown.toonbase import ToontownGlobals -from toontown.cogdominium import CogdoBarrelRoomConsts -from toontown.cogdominium import DistributedCogdoBarrelAI + class CogdoBarrelRoomAI: notify = DirectNotifyGlobal.directNotify.newCategory('DistributedCogdoBarrelRoomAI') diff --git a/toontown/cogdominium/CogdoBarrelRoomConsts.py b/toontown/cogdominium/CogdoBarrelRoomConsts.py index c3540c9..2af0a61 100644 --- a/toontown/cogdominium/CogdoBarrelRoomConsts.py +++ b/toontown/cogdominium/CogdoBarrelRoomConsts.py @@ -1,4 +1,5 @@ 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 c9cf2d7..2394c91 100644 --- a/toontown/cogdominium/CogdoBarrelRoomRewardPanel.py +++ b/toontown/cogdominium/CogdoBarrelRoomRewardPanel.py @@ -1,7 +1,10 @@ from panda3d.core import * + from direct.gui.DirectGui import * -from toontown.toonbase import ToontownGlobals, TTLocalizer + from toontown.cogdominium import CogdoBarrelRoomConsts +from toontown.toonbase import ToontownGlobals, TTLocalizer + class CogdoBarrelRoomRewardPanel(DirectFrame): diff --git a/toontown/cogdominium/CogdoBoardroomGameBase.py b/toontown/cogdominium/CogdoBoardroomGameBase.py index 1c62c64..d7da260 100644 --- a/toontown/cogdominium/CogdoBoardroomGameBase.py +++ b/toontown/cogdominium/CogdoBoardroomGameBase.py @@ -1,5 +1,6 @@ -from toontown.cogdominium import CogdoBoardroomGameSpec from toontown.cogdominium import CogdoBoardroomGameConsts as Consts +from toontown.cogdominium import CogdoBoardroomGameSpec + class CogdoBoardroomGameBase: diff --git a/toontown/cogdominium/CogdoBoardroomGameConsts.py b/toontown/cogdominium/CogdoBoardroomGameConsts.py index 7e09e9b..7a07c85 100644 --- a/toontown/cogdominium/CogdoBoardroomGameConsts.py +++ b/toontown/cogdominium/CogdoBoardroomGameConsts.py @@ -1,6 +1,9 @@ from direct.fsm.StatePush import StateVar + from otp.level.EntityStateVarSet import EntityStateVarSet + from toontown.cogdominium.CogdoEntityTypes import CogdoBoardroomGameSettings + Settings = EntityStateVarSet(CogdoBoardroomGameSettings) GameDuration = StateVar(60.0) FinishDuration = StateVar(10.0) diff --git a/toontown/cogdominium/CogdoBoardroomGameSpec.py b/toontown/cogdominium/CogdoBoardroomGameSpec.py index d8e808f..7f21742 100644 --- a/toontown/cogdominium/CogdoBoardroomGameSpec.py +++ b/toontown/cogdominium/CogdoBoardroomGameSpec.py @@ -1,4 +1,5 @@ from toontown.coghq.SpecImports import * + GlobalEntities = {1000: {'type': 'levelMgr', 'name': 'LevelMgr', 'comment': '', diff --git a/toontown/cogdominium/CogdoCraneGameBase.py b/toontown/cogdominium/CogdoCraneGameBase.py index 095643a..90d24b3 100644 --- a/toontown/cogdominium/CogdoCraneGameBase.py +++ b/toontown/cogdominium/CogdoCraneGameBase.py @@ -1,5 +1,6 @@ -from toontown.cogdominium import CogdoCraneGameSpec from toontown.cogdominium import CogdoCraneGameConsts as Consts +from toontown.cogdominium import CogdoCraneGameSpec + class CogdoCraneGameBase: diff --git a/toontown/cogdominium/CogdoCraneGameConsts.py b/toontown/cogdominium/CogdoCraneGameConsts.py index 4d0e6cf..944d353 100644 --- a/toontown/cogdominium/CogdoCraneGameConsts.py +++ b/toontown/cogdominium/CogdoCraneGameConsts.py @@ -1,6 +1,9 @@ from direct.fsm.StatePush import StateVar + from otp.level.EntityStateVarSet import EntityStateVarSet -from toontown.cogdominium.CogdoEntityTypes import CogdoCraneGameSettings, CogdoCraneCogSettings + +from toontown.cogdominium.CogdoEntityTypes import CogdoCraneCogSettings, CogdoCraneGameSettings + Settings = EntityStateVarSet(CogdoCraneGameSettings) CogSettings = EntityStateVarSet(CogdoCraneCogSettings) CranePosHprs = [(13.4, -136.6, 6, -45, 0, 0), diff --git a/toontown/cogdominium/CogdoCraneGameSpec.py b/toontown/cogdominium/CogdoCraneGameSpec.py index 129fbea..a07a07d 100644 --- a/toontown/cogdominium/CogdoCraneGameSpec.py +++ b/toontown/cogdominium/CogdoCraneGameSpec.py @@ -1,4 +1,5 @@ from toontown.coghq.SpecImports import * + GlobalEntities = {1000: {'type': 'levelMgr', 'name': 'LevelMgr', 'comment': '', diff --git a/toontown/cogdominium/CogdoElevatorMovie.py b/toontown/cogdominium/CogdoElevatorMovie.py index 269b3d8..537a682 100644 --- a/toontown/cogdominium/CogdoElevatorMovie.py +++ b/toontown/cogdominium/CogdoElevatorMovie.py @@ -1,16 +1,20 @@ -from panda3d.core import NodePath, Point3, Plane, PlaneNode, TextNode -from direct.interval.IntervalGlobal import * +from panda3d.core import NodePath, Plane, PlaneNode, Point3, TextNode + from direct.directnotify import DirectNotifyGlobal -from direct.showbase.RandomNumGen import RandomNumGen -from direct.interval.MetaInterval import Sequence, Parallel -from direct.interval.FunctionInterval import Func, Wait from direct.gui.DirectGui import * -from toontown.toonbase.ToontownGlobals import * -from toontown.toonbase import TTLocalizer +from direct.interval.FunctionInterval import Func, Wait +from direct.interval.IntervalGlobal import * +from direct.interval.MetaInterval import Parallel, Sequence +from direct.showbase.RandomNumGen import RandomNumGen + from toontown.suit import Suit, SuitDNA -from toontown.toon import Toon, ToonHead, ToonDNA -from .CogdoUtil import CogdoGameMovie +from toontown.toon import Toon, ToonDNA, ToonHead +from toontown.toonbase import TTLocalizer +from toontown.toonbase.ToontownGlobals import * + from . import CogdoUtil +from .CogdoUtil import CogdoGameMovie + class CogdoElevatorMovie(CogdoGameMovie): notify = DirectNotifyGlobal.directNotify.newCategory('CogdoElevatorMovie') diff --git a/toontown/cogdominium/CogdoEntityCreator.py b/toontown/cogdominium/CogdoEntityCreator.py index eba1506..d0e247b 100644 --- a/toontown/cogdominium/CogdoEntityCreator.py +++ b/toontown/cogdominium/CogdoEntityCreator.py @@ -1,8 +1,8 @@ from otp.level import EntityCreator -from toontown.cogdominium import CogdoCraneGameConsts + +from toontown.cogdominium import CogdoBoardroomGameConsts, CogdoCraneGameConsts from toontown.cogdominium.CogdoLevelMgr import CogdoLevelMgr -from toontown.cogdominium import CogdoBoardroomGameConsts -from toontown.cogdominium import CogdoCraneGameConsts + class CogdoEntityCreator(EntityCreator.EntityCreator): diff --git a/toontown/cogdominium/CogdoEntityCreatorAI.py b/toontown/cogdominium/CogdoEntityCreatorAI.py index 7a4c1f2..fd27f19 100644 --- a/toontown/cogdominium/CogdoEntityCreatorAI.py +++ b/toontown/cogdominium/CogdoEntityCreatorAI.py @@ -1,8 +1,10 @@ from direct.showbase.PythonUtil import Functor + from otp.level import EntityCreatorAI + +from toontown.cogdominium import CogdoBoardroomGameConsts, CogdoCraneGameConsts from toontown.cogdominium.CogdoLevelMgrAI import CogdoLevelMgrAI -from toontown.cogdominium import CogdoBoardroomGameConsts -from toontown.cogdominium import CogdoCraneGameConsts + class CogdoEntityCreatorAI(EntityCreatorAI.EntityCreatorAI): diff --git a/toontown/cogdominium/CogdoEntityTypes.py b/toontown/cogdominium/CogdoEntityTypes.py index 53b395f..f372a1e 100644 --- a/toontown/cogdominium/CogdoEntityTypes.py +++ b/toontown/cogdominium/CogdoEntityTypes.py @@ -1,5 +1,6 @@ from otp.level.EntityTypes import * + class CogdoLevelMgr(LevelMgr): type = 'levelMgr' diff --git a/toontown/cogdominium/CogdoExecutiveSuiteMovies.py b/toontown/cogdominium/CogdoExecutiveSuiteMovies.py index 9868269..b546a46 100644 --- a/toontown/cogdominium/CogdoExecutiveSuiteMovies.py +++ b/toontown/cogdominium/CogdoExecutiveSuiteMovies.py @@ -1,16 +1,20 @@ -from panda3d.core import NodePath, Point3, Plane, PlaneNode, TextNode -from direct.interval.IntervalGlobal import * +from panda3d.core import NodePath, Plane, PlaneNode, Point3, TextNode + from direct.directnotify import DirectNotifyGlobal -from direct.showbase.RandomNumGen import RandomNumGen -from direct.interval.MetaInterval import Sequence, Parallel -from direct.interval.FunctionInterval import Func, Wait from direct.gui.DirectGui import * -from toontown.toonbase.ToontownGlobals import * -from toontown.toonbase import TTLocalizer +from direct.interval.FunctionInterval import Func, Wait +from direct.interval.IntervalGlobal import * +from direct.interval.MetaInterval import Parallel, Sequence +from direct.showbase.RandomNumGen import RandomNumGen + from toontown.suit import Suit, SuitDNA -from toontown.toon import Toon, ToonHead, ToonDNA -from .CogdoUtil import CogdoGameMovie +from toontown.toon import Toon, ToonDNA, ToonHead +from toontown.toonbase import TTLocalizer +from toontown.toonbase.ToontownGlobals import * + from . import CogdoUtil +from .CogdoUtil import CogdoGameMovie + class CogdoExecutiveSuiteIntro(CogdoGameMovie): notify = DirectNotifyGlobal.directNotify.newCategory('CogdoExecutiveSuiteIntro') diff --git a/toontown/cogdominium/CogdoFlyingCameraManager.py b/toontown/cogdominium/CogdoFlyingCameraManager.py index b139935..bef11c1 100644 --- a/toontown/cogdominium/CogdoFlyingCameraManager.py +++ b/toontown/cogdominium/CogdoFlyingCameraManager.py @@ -1,12 +1,16 @@ import math -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 math import cos, pi, sin + +from panda3d.core import CollisionHandlerQueue, CollisionNode, CollisionRay, CollisionTraverser, NodePath, Vec3 + from direct.showbase.PythonUtil import bound as clamp + from otp.otpbase import OTPGlobals + from toontown.toonbase import ToontownGlobals + from . import CogdoFlyingGameGlobals as Globals + INVERSE_E = 1.0 / math.e def smooth(old, new): diff --git a/toontown/cogdominium/CogdoFlyingCollisions.py b/toontown/cogdominium/CogdoFlyingCollisions.py index 47a466d..29c8d56 100644 --- a/toontown/cogdominium/CogdoFlyingCollisions.py +++ b/toontown/cogdominium/CogdoFlyingCollisions.py @@ -1,8 +1,13 @@ +from panda3d.core import (BitMask32, CollisionHandlerEvent, CollisionHandlerFluidPusher, CollisionHandlerGravity, + CollisionHandlerPusher, CollisionNode, CollisionRay, CollisionSphere) + from direct.controls.GravityWalker import GravityWalker -from panda3d.core import CollisionSphere, CollisionNode, BitMask32, CollisionHandlerEvent, CollisionRay, CollisionHandlerGravity, CollisionHandlerFluidPusher, CollisionHandlerPusher -from toontown.toonbase import ToontownGlobals + from otp.otpbase import OTPGlobals +from toontown.toonbase import ToontownGlobals + + class CogdoFlyingCollisions(GravityWalker): wantFloorSphere = 0 diff --git a/toontown/cogdominium/CogdoFlyingGame.py b/toontown/cogdominium/CogdoFlyingGame.py index 7e7b08e..f5ce59a 100644 --- a/toontown/cogdominium/CogdoFlyingGame.py +++ b/toontown/cogdominium/CogdoFlyingGame.py @@ -1,20 +1,23 @@ -from direct.showbase.DirectObject import DirectObject -from direct.task.Task import Task -from direct.showbase.RandomNumGen import RandomNumGen from direct.interval.FunctionInterval import Wait from direct.interval.IntervalGlobal import Func -from direct.interval.MetaInterval import Sequence, Parallel +from direct.interval.MetaInterval import Parallel, Sequence +from direct.showbase.DirectObject import DirectObject +from direct.showbase.RandomNumGen import RandomNumGen +from direct.task.Task import Task + from toontown.toonbase import TTLocalizer + from . import CogdoFlyingGameGlobals as Globals +from .CogdoFlyingGameMovies import CogdoFlyingGameFinish, CogdoFlyingGameIntro +from .CogdoFlyingGuiManager import CogdoFlyingGuiManager +from .CogdoFlyingLegalEagle import CogdoFlyingLegalEagle +from .CogdoFlyingLevel import CogdoFlyingLevelFactory from .CogdoFlyingLocalPlayer import CogdoFlyingLocalPlayer -from .CogdoGameAudioManager import CogdoGameAudioManager -from .CogdoFlyingPlayer import CogdoFlyingPlayer from .CogdoFlyingObjects import CogdoFlyingGatherable from .CogdoFlyingObstacles import CogdoFlyingObstacle -from .CogdoFlyingLegalEagle import CogdoFlyingLegalEagle -from .CogdoFlyingGuiManager import CogdoFlyingGuiManager -from .CogdoFlyingLevel import CogdoFlyingLevelFactory -from .CogdoFlyingGameMovies import CogdoFlyingGameIntro, CogdoFlyingGameFinish +from .CogdoFlyingPlayer import CogdoFlyingPlayer +from .CogdoGameAudioManager import CogdoGameAudioManager + class CogdoFlyingGame(DirectObject): notify = directNotify.newCategory('CogdoFlyingGame') diff --git a/toontown/cogdominium/CogdoFlyingGameGlobals.py b/toontown/cogdominium/CogdoFlyingGameGlobals.py index e5c9127..dd104ae 100644 --- a/toontown/cogdominium/CogdoFlyingGameGlobals.py +++ b/toontown/cogdominium/CogdoFlyingGameGlobals.py @@ -1,6 +1,9 @@ -from panda3d.core import VBase4, Vec3, Point3 -from .CogdoUtil import VariableContainer, DevVariableContainer from enum import IntEnum + +from panda3d.core import Point3, VBase4, Vec3 + +from .CogdoUtil import DevVariableContainer, VariableContainer + AI = VariableContainer() AI.GameActions = IntEnum('GameActions', ('LandOnWinPlatform', 'WinStateFinished', 'GotoWinState', 'HitWhirlwind', 'HitLegalEagle', 'HitMinion', 'DebuffInvul', 'RequestEnterEagleInterest', 'RequestExitEagleInterest', 'RanOutOfTimePenalty', 'Died', 'Spawn', 'SetBlades', 'BladeLost'), start=0) AI.BroadcastPeriod = 0.3 diff --git a/toontown/cogdominium/CogdoFlyingGameGuis.py b/toontown/cogdominium/CogdoFlyingGameGuis.py index 4fe2374..10eac4d 100644 --- a/toontown/cogdominium/CogdoFlyingGameGuis.py +++ b/toontown/cogdominium/CogdoFlyingGameGuis.py @@ -1,10 +1,14 @@ +from panda3d.core import NodePath, TextNode + +from direct.gui.DirectGui import DGG, DirectFrame, DirectLabel from direct.interval.IntervalGlobal import LerpFunctionInterval -from direct.gui.DirectGui import DirectLabel, DirectFrame, DGG from direct.showbase.PythonUtil import bound as clamp -from panda3d.core import TextNode, NodePath + from toontown.toonbase import ToontownGlobals -from . import CogdoUtil + from . import CogdoFlyingGameGlobals as Globals +from . import CogdoUtil + class CogdoFlyingProgressGui(DirectFrame): diff --git a/toontown/cogdominium/CogdoFlyingGameMovies.py b/toontown/cogdominium/CogdoFlyingGameMovies.py index 3ce87ca..43a002f 100644 --- a/toontown/cogdominium/CogdoFlyingGameMovies.py +++ b/toontown/cogdominium/CogdoFlyingGameMovies.py @@ -1,13 +1,17 @@ -from panda3d.core import Point3, Plane, PlaneNode -from direct.showbase.RandomNumGen import RandomNumGen -from direct.interval.MetaInterval import Sequence, Parallel +from panda3d.core import Plane, PlaneNode, Point3 + from direct.interval.FunctionInterval import Func, Wait -from toontown.toonbase import TTLocalizer -from toontown.toon import Toon, ToonHead, ToonDNA +from direct.interval.MetaInterval import Parallel, Sequence +from direct.showbase.RandomNumGen import RandomNumGen + from toontown.suit import Suit, SuitDNA +from toontown.toon import Toon, ToonDNA, ToonHead +from toontown.toonbase import TTLocalizer + from . import CogdoFlyingGameGlobals as Globals -from .CogdoUtil import CogdoGameMovie from . import CogdoUtil +from .CogdoUtil import CogdoGameMovie + class CogdoFlyingGameIntro(CogdoGameMovie): diff --git a/toontown/cogdominium/CogdoFlyingGuiManager.py b/toontown/cogdominium/CogdoFlyingGuiManager.py index 8ef23cb..356a085 100644 --- a/toontown/cogdominium/CogdoFlyingGuiManager.py +++ b/toontown/cogdominium/CogdoFlyingGuiManager.py @@ -1,10 +1,13 @@ from panda3d.core import NodePath + from toontown.toonbase import ToontownIntervals from toontown.toonbase.ToontownTimer import ToontownTimer + +from . import CogdoFlyingGameGlobals as Globals from .CogdoFlyingGameGuis import CogdoFlyingFuelGui, CogdoFlyingProgressGui from .CogdoGameMessageDisplay import CogdoGameMessageDisplay from .CogdoMemoGui import CogdoMemoGui -from . import CogdoFlyingGameGlobals as Globals + class CogdoFlyingGuiManager: ClearMessageDisplayEventName = 'ClearMessageDisplayEvent' diff --git a/toontown/cogdominium/CogdoFlyingInputManager.py b/toontown/cogdominium/CogdoFlyingInputManager.py index 21ace86..50544b8 100644 --- a/toontown/cogdominium/CogdoFlyingInputManager.py +++ b/toontown/cogdominium/CogdoFlyingInputManager.py @@ -1,6 +1,8 @@ -from panda3d.core import CollisionSphere, CollisionNode, BitMask32, CollisionHandlerEvent, CollisionRay +from panda3d.core import BitMask32, CollisionHandlerEvent, CollisionNode, CollisionRay, CollisionSphere + from toontown.minigame import ArrowKeys + class CogdoFlyingInputManager: def __init__(self): diff --git a/toontown/cogdominium/CogdoFlyingLegalEagle.py b/toontown/cogdominium/CogdoFlyingLegalEagle.py index 14d3f99..eb0a5d1 100644 --- a/toontown/cogdominium/CogdoFlyingLegalEagle.py +++ b/toontown/cogdominium/CogdoFlyingLegalEagle.py @@ -1,19 +1,25 @@ import math -from direct.showbase.DirectObject import DirectObject + +from panda3d.core import CollisionNode, CollisionPolygon, CollisionSphere, CollisionTube, Point3, Vec3 + from direct.directnotify import DirectNotifyGlobal -from direct.fsm.FSM import FSM -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.fsm.FSM import FSM +from direct.interval.IntervalGlobal import (ActorInterval, Func, LerpFunc, LerpFunctionInterval, LerpHprInterval, + LerpPosHprInterval, LerpPosInterval, LerpScaleInterval, Parallel, + ParallelEndTogether, Sequence, SoundInterval, Wait) +from direct.showbase.DirectObject import DirectObject from direct.showbase.PythonUtil import bound as clamp -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 +from direct.task.Task import Task + from toontown.battle import BattleProps -from .CogdoFlyingUtil import swapAvatarShadowPlacer -from . import CogdoUtil +from toontown.suit import Suit, SuitDNA +from toontown.toonbase import ToontownGlobals + from . import CogdoFlyingGameGlobals as Globals +from . import CogdoUtil +from .CogdoFlyingUtil import swapAvatarShadowPlacer + class CogdoFlyingLegalEagle(FSM, DirectObject): CollSphereName = 'CogdoFlyingLegalEagleSphere' diff --git a/toontown/cogdominium/CogdoFlyingLevel.py b/toontown/cogdominium/CogdoFlyingLevel.py index 1fee577..f4baf56 100644 --- a/toontown/cogdominium/CogdoFlyingLevel.py +++ b/toontown/cogdominium/CogdoFlyingLevel.py @@ -1,15 +1,18 @@ -from panda3d.core import NodePath, Plane, Vec3, Point3 -from panda3d.core import CollisionPlane, CollisionNode -from direct.showbase.RandomNumGen import RandomNumGen +from panda3d.core import CollisionNode, CollisionPlane, NodePath, Plane, Point3, Vec3 + from direct.showbase.DirectObject import DirectObject from direct.showbase.PythonUtil import bound as clamp -from . import CogdoUtil +from direct.showbase.RandomNumGen import RandomNumGen + +from otp.otpbase import OTPGlobals + from . import CogdoFlyingGameGlobals as Globals +from . import CogdoUtil from .CogdoFlyingLevelQuadrant import CogdoFlyingLevelQuadrant -from .CogdoFlyingObjects import CogdoFlyingGatherableFactory, CogdoFlyingPlatform, CogdoFlyingLevelFog +from .CogdoFlyingObjects import CogdoFlyingGatherableFactory, CogdoFlyingLevelFog, CogdoFlyingPlatform from .CogdoFlyingObstacles import CogdoFlyingObtacleFactory from .CogdoGameExit import CogdoGameExit -from otp.otpbase import OTPGlobals + class CogdoFlyingLevel(DirectObject): notify = directNotify.newCategory('CogdoFlyingLevel') diff --git a/toontown/cogdominium/CogdoFlyingLevelQuadrant.py b/toontown/cogdominium/CogdoFlyingLevelQuadrant.py index 6edf3a7..8fb6f6e 100644 --- a/toontown/cogdominium/CogdoFlyingLevelQuadrant.py +++ b/toontown/cogdominium/CogdoFlyingLevelQuadrant.py @@ -1,8 +1,12 @@ import math -from direct.directutil import Mopath + from panda3d.core import NodePath, Point3, Vec4 -from .CogdoFlyingObjects import CogdoFlyingPlatform + +from direct.directutil import Mopath + from . import CogdoFlyingGameGlobals as Globals +from .CogdoFlyingObjects import CogdoFlyingPlatform + class CogdoFlyingLevelQuadrant: notify = directNotify.newCategory('CogdoFlyingLevelQuadrant') diff --git a/toontown/cogdominium/CogdoFlyingLocalPlayer.py b/toontown/cogdominium/CogdoFlyingLocalPlayer.py index bdd22fe..98a894f 100644 --- a/toontown/cogdominium/CogdoFlyingLocalPlayer.py +++ b/toontown/cogdominium/CogdoFlyingLocalPlayer.py @@ -1,26 +1,32 @@ import math import random +from enum import IntEnum + from panda3d.core import Vec3 + from direct.directnotify import DirectNotifyGlobal -from direct.task.Task import Task -from direct.interval.FunctionInterval import Wait -from direct.interval.IntervalGlobal import Func, LerpFunc, LerpPosInterval, LerpHprInterval, LerpFunctionInterval -from direct.interval.MetaInterval import Sequence, Parallel -from direct.showbase.PythonUtil import bound as clamp from direct.distributed.ClockDelta import globalClockDelta +from direct.interval.FunctionInterval import Wait +from direct.interval.IntervalGlobal import Func, LerpFunc, LerpFunctionInterval, LerpHprInterval, LerpPosInterval +from direct.interval.MetaInterval import Parallel, Sequence +from direct.showbase.PythonUtil import bound as clamp +from direct.task.Task import Task + from otp.otpbase import OTPGlobals + from toontown.minigame.OrthoDrive import OrthoDrive from toontown.minigame.OrthoWalk import OrthoWalk from toontown.toonbase import TTLocalizer + +from . import CogdoFlyingGameGlobals as Globals +from .CogdoFlyingCameraManager import CogdoFlyingCameraManager from .CogdoFlyingCollisions import CogdoFlyingCollisions -from .CogdoFlyingPlayer import CogdoFlyingPlayer from .CogdoFlyingGuiManager import CogdoFlyingGuiManager from .CogdoFlyingInputManager import CogdoFlyingInputManager -from .CogdoFlyingCameraManager import CogdoFlyingCameraManager -from .CogdoFlyingObjects import CogdoFlyingPlatform, CogdoFlyingGatherable from .CogdoFlyingLegalEagle import CogdoFlyingLegalEagle -from . import CogdoFlyingGameGlobals as Globals -from enum import IntEnum +from .CogdoFlyingObjects import CogdoFlyingGatherable, CogdoFlyingPlatform +from .CogdoFlyingPlayer import CogdoFlyingPlayer + class CogdoFlyingLocalPlayer(CogdoFlyingPlayer): notify = DirectNotifyGlobal.directNotify.newCategory('CogdoFlyingLocalPlayer') diff --git a/toontown/cogdominium/CogdoFlyingObjects.py b/toontown/cogdominium/CogdoFlyingObjects.py index 98fae9f..115a970 100644 --- a/toontown/cogdominium/CogdoFlyingObjects.py +++ b/toontown/cogdominium/CogdoFlyingObjects.py @@ -1,15 +1,20 @@ import random + from panda3d.core import * from panda3d.physics import * -from direct.interval.IntervalGlobal import Sequence, Func, Parallel, Wait, LerpHprInterval, LerpScaleInterval, LerpFunctionInterval + +from direct.interval.IntervalGlobal import (Func, LerpFunctionInterval, LerpHprInterval, LerpScaleInterval, Parallel, + Sequence, Wait) +from direct.particles import ForceGroup, ParticleEffect, Particles + from otp.otpbase import OTPGlobals + from toontown.toonbase import ToontownGlobals -from .CogdoGameGatherable import CogdoGameGatherable, CogdoMemo + from . import CogdoFlyingGameGlobals as Globals from . import CogdoUtil -from direct.particles import ParticleEffect -from direct.particles import Particles -from direct.particles import ForceGroup +from .CogdoGameGatherable import CogdoGameGatherable, CogdoMemo + class CogdoFlyingGatherableFactory: diff --git a/toontown/cogdominium/CogdoFlyingObstacles.py b/toontown/cogdominium/CogdoFlyingObstacles.py index 7072ad0..e17749e 100644 --- a/toontown/cogdominium/CogdoFlyingObstacles.py +++ b/toontown/cogdominium/CogdoFlyingObstacles.py @@ -1,21 +1,23 @@ import random -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 enum import IntEnum + from panda3d.core import * from panda3d.physics import * -from toontown.toonbase import ToontownGlobals -from toontown.suit import Suit -from toontown.suit import SuitDNA + +from direct.directutil import Mopath +from direct.interval.IntervalGlobal import ActorInterval, LerpFunc, LerpPosInterval +from direct.interval.MetaInterval import Sequence +from direct.particles import ForceGroup, ParticleEffect, Particles +from direct.showbase.DirectObject import DirectObject + from toontown.battle import BattleProps -from . import CogdoUtil +from toontown.suit import Suit, SuitDNA +from toontown.toonbase import ToontownGlobals + from . import CogdoFlyingGameGlobals as Globals +from . import CogdoUtil 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: @@ -194,6 +196,7 @@ class CogdoFlyingObstacle(DirectObject): from panda3d.core import TransformState + class CogdoFlyingWhirlwind(CogdoFlyingObstacle): def __init__(self, index, model, motionPath = None): diff --git a/toontown/cogdominium/CogdoFlyingPlayer.py b/toontown/cogdominium/CogdoFlyingPlayer.py index fa5edfc..4f6be5b 100644 --- a/toontown/cogdominium/CogdoFlyingPlayer.py +++ b/toontown/cogdominium/CogdoFlyingPlayer.py @@ -1,17 +1,21 @@ -from panda3d.core import DepthOffsetAttrib, NodePath, Vec3, Vec4, TextNode +from panda3d.core import DepthOffsetAttrib, NodePath, TextNode, Vec3, Vec4 + from direct.directnotify import DirectNotifyGlobal +from direct.distributed.ClockDelta import globalClockDelta from direct.fsm.FSM import FSM from direct.interval.FunctionInterval import Wait -from direct.interval.IntervalGlobal import Func, LerpHprInterval, LerpScaleInterval, LerpFunctionInterval -from direct.interval.MetaInterval import Sequence, Parallel -from direct.distributed.ClockDelta import globalClockDelta -from toontown.toonbase import ToontownGlobals +from direct.interval.IntervalGlobal import Func, LerpFunctionInterval, LerpHprInterval, LerpScaleInterval +from direct.interval.MetaInterval import Parallel, Sequence + from toontown.effects import DustCloud +from toontown.toonbase import ToontownGlobals + from . import CogdoFlyingGameGlobals as Globals from . import CogdoUtil from .CogdoFlyingObjects import CogdoFlyingGatherable from .CogdoFlyingUtil import swapAvatarShadowPlacer + class CogdoFlyingPlayer(FSM): notify = DirectNotifyGlobal.directNotify.newCategory('CogdoFlyingPlayer') diff --git a/toontown/cogdominium/CogdoFlyingShadowPlacer.py b/toontown/cogdominium/CogdoFlyingShadowPlacer.py index 5f6ce59..b779760 100644 --- a/toontown/cogdominium/CogdoFlyingShadowPlacer.py +++ b/toontown/cogdominium/CogdoFlyingShadowPlacer.py @@ -1,9 +1,11 @@ +from panda3d.core import * + from direct.controls.ControlManager import CollisionHandlerRayStart from direct.directnotify import DirectNotifyGlobal -from panda3d.core import * -from direct.task.Task import Task from direct.showbase.DirectObject import DirectObject from direct.showbase.ShadowPlacer import ShadowPlacer +from direct.task.Task import Task + class CogdoFlyingShadowPlacer(ShadowPlacer): diff --git a/toontown/cogdominium/CogdoFlyingUtil.py b/toontown/cogdominium/CogdoFlyingUtil.py index 8a2a45a..13caee1 100644 --- a/toontown/cogdominium/CogdoFlyingUtil.py +++ b/toontown/cogdominium/CogdoFlyingUtil.py @@ -1,6 +1,8 @@ from otp.otpbase import OTPGlobals + from .CogdoFlyingShadowPlacer import CogdoFlyingShadowPlacer + def loadMockup(fileName, dmodelsAlt = 'coffin'): try: model = loader.loadModel(fileName) diff --git a/toontown/cogdominium/CogdoGameAudioManager.py b/toontown/cogdominium/CogdoGameAudioManager.py index 17ce2cf..07475fe 100644 --- a/toontown/cogdominium/CogdoGameAudioManager.py +++ b/toontown/cogdominium/CogdoGameAudioManager.py @@ -1,6 +1,8 @@ from panda3d.core import AudioSound + from direct.interval.SoundInterval import SoundInterval + class CogdoGameSfx: def __init__(self, audioSound, audioMgr, source = None): diff --git a/toontown/cogdominium/CogdoGameConsts.py b/toontown/cogdominium/CogdoGameConsts.py index 474d3ec..9ce9667 100644 --- a/toontown/cogdominium/CogdoGameConsts.py +++ b/toontown/cogdominium/CogdoGameConsts.py @@ -1,5 +1,7 @@ -from toontown.minigame.MinigameGlobals import getSafezoneId, DifficultyOverrideMult, QuantizeDifficultyOverride, NoDifficultyOverride, getDifficulty +from toontown.minigame.MinigameGlobals import DifficultyOverrideMult, NoDifficultyOverride from toontown.minigame.MinigameGlobals import NoTrolleyZoneOverride as NoExteriorZoneOverride +from toontown.minigame.MinigameGlobals import QuantizeDifficultyOverride, getDifficulty, getSafezoneId + MaxPlayers = 4 MessageLabelBlinkTime = 0.25 MessageLabelFadeTime = 0.25 diff --git a/toontown/cogdominium/CogdoGameExit.py b/toontown/cogdominium/CogdoGameExit.py index 4263c73..c8fb021 100644 --- a/toontown/cogdominium/CogdoGameExit.py +++ b/toontown/cogdominium/CogdoGameExit.py @@ -1,11 +1,13 @@ from panda3d.core import NodePath, Point3 + +from direct.interval.FunctionInterval import Func, Wait from direct.interval.MetaInterval import Parallel, Sequence from direct.interval.SoundInterval import SoundInterval -from direct.interval.FunctionInterval import Wait, Func -from toontown.building import ElevatorConstants -from toontown.building import ElevatorUtils -from . import CogdoUtil -from . import CogdoGameConsts + +from toontown.building import ElevatorConstants, ElevatorUtils + +from . import CogdoGameConsts, CogdoUtil + class CogdoGameExit(NodePath): diff --git a/toontown/cogdominium/CogdoGameGatherable.py b/toontown/cogdominium/CogdoGameGatherable.py index efe829f..d7f2bb3 100644 --- a/toontown/cogdominium/CogdoGameGatherable.py +++ b/toontown/cogdominium/CogdoGameGatherable.py @@ -1,12 +1,15 @@ -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 panda3d.core import BitMask32, CollisionNode, CollisionSphere, NodePath + from direct.interval.FunctionInterval import Func, Wait from direct.interval.IntervalGlobal import LerpFunc +from direct.interval.MetaInterval import Sequence +from direct.showbase.DirectObject import DirectObject + from toontown.toonbase import ToontownGlobals + from . import CogdoUtil + class CogdoGameGatherable(NodePath, DirectObject): EnterEventName = 'CogdoGameGatherable_Enter' diff --git a/toontown/cogdominium/CogdoGameMessageDisplay.py b/toontown/cogdominium/CogdoGameMessageDisplay.py index 76b9709..6e0b77e 100644 --- a/toontown/cogdominium/CogdoGameMessageDisplay.py +++ b/toontown/cogdominium/CogdoGameMessageDisplay.py @@ -1,10 +1,14 @@ +from panda3d.core import TextNode + from direct.interval.FunctionInterval import Func from direct.interval.LerpInterval import LerpFunc from direct.interval.MetaInterval import Sequence -from panda3d.core import TextNode + from toontown.toonbase import ToontownGlobals + from . import CogdoGameConsts + class CogdoGameMessageDisplay: UpdateMessageTaskName = 'MessageDisplay.updateMessage' diff --git a/toontown/cogdominium/CogdoGameRulesPanel.py b/toontown/cogdominium/CogdoGameRulesPanel.py index 9aab7bb..ee50ed2 100644 --- a/toontown/cogdominium/CogdoGameRulesPanel.py +++ b/toontown/cogdominium/CogdoGameRulesPanel.py @@ -1,11 +1,13 @@ -from direct.task import Task -from direct.fsm import StateData -from toontown.toonbase.ToontownGlobals import * -from direct.gui.DirectGui import * from panda3d.core import * -from toontown.toonbase import ToontownTimer -from toontown.toonbase import TTLocalizer + +from direct.fsm import StateData +from direct.gui.DirectGui import * +from direct.task import Task + from toontown.minigame import MinigameGlobals +from toontown.toonbase import ToontownTimer, TTLocalizer +from toontown.toonbase.ToontownGlobals import * + class CogdoGameRulesPanel(StateData.StateData): hiddenNode = NodePath('hiddenNode') diff --git a/toontown/cogdominium/CogdoInterior.py b/toontown/cogdominium/CogdoInterior.py index c83279f..01a0246 100644 --- a/toontown/cogdominium/CogdoInterior.py +++ b/toontown/cogdominium/CogdoInterior.py @@ -1,14 +1,16 @@ from panda3d.core import ModelPool, TexturePool -from direct.task.Task import Task + from direct.directnotify import DirectNotifyGlobal from direct.fsm import ClassicFSM, State +from direct.task.Task import Task + +from toontown.building import Elevator from toontown.hood import Place +from toontown.suit import Suit +from toontown.toonbase import ToontownBattleGlobals, ToontownGlobals from toontown.toonbase.ToonBaseGlobal import * from toontown.town import TownBattle -from toontown.suit import Suit -from toontown.building import Elevator -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import ToontownBattleGlobals + class CogdoInterior(Place.Place): notify = DirectNotifyGlobal.directNotify.newCategory('CogdoInterior') diff --git a/toontown/cogdominium/CogdoLayout.py b/toontown/cogdominium/CogdoLayout.py index 39dccfc..f67e03f 100644 --- a/toontown/cogdominium/CogdoLayout.py +++ b/toontown/cogdominium/CogdoLayout.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal + class CogdoLayout: notify = DirectNotifyGlobal.directNotify.newCategory('CogdoLayout') diff --git a/toontown/cogdominium/CogdoLevelGameBase.py b/toontown/cogdominium/CogdoLevelGameBase.py index b5805a3..98130df 100644 --- a/toontown/cogdominium/CogdoLevelGameBase.py +++ b/toontown/cogdominium/CogdoLevelGameBase.py @@ -1,7 +1,9 @@ from direct.fsm.StatePush import FunctionCall + from otp.level.EntityStateVarSet import EntityStateVarSet from otp.level.LevelSpec import LevelSpec + class CogdoLevelGameBase: def getLevelSpec(self): @@ -32,7 +34,8 @@ class CogdoLevelGameBase: return def getEntityTypeReg(self): - from . import CogdoEntityTypes from otp.level import EntityTypeRegistry + + from . import CogdoEntityTypes typeReg = EntityTypeRegistry.EntityTypeRegistry(CogdoEntityTypes) return typeReg diff --git a/toontown/cogdominium/CogdoLevelMgr.py b/toontown/cogdominium/CogdoLevelMgr.py index 92a534d..acd153e 100644 --- a/toontown/cogdominium/CogdoLevelMgr.py +++ b/toontown/cogdominium/CogdoLevelMgr.py @@ -1,6 +1,9 @@ -from otp.level import LevelMgr from direct.showbase.PythonUtil import Functor + +from otp.level import LevelMgr + from toontown.toonbase import ToontownGlobals + class CogdoLevelMgr(LevelMgr.LevelMgr): pass diff --git a/toontown/cogdominium/CogdoLevelMgrAI.py b/toontown/cogdominium/CogdoLevelMgrAI.py index 9bb6f7a..63d0687 100644 --- a/toontown/cogdominium/CogdoLevelMgrAI.py +++ b/toontown/cogdominium/CogdoLevelMgrAI.py @@ -1,4 +1,5 @@ from otp.level import LevelMgrAI + class CogdoLevelMgrAI(LevelMgrAI.LevelMgrAI): pass diff --git a/toontown/cogdominium/CogdoMaze.py b/toontown/cogdominium/CogdoMaze.py index 3e58e73..924b768 100644 --- a/toontown/cogdominium/CogdoMaze.py +++ b/toontown/cogdominium/CogdoMaze.py @@ -1,11 +1,15 @@ from panda3d.core import NodePath, VBase4 + from direct.showbase.DirectObject import DirectObject from direct.showbase.RandomNumGen import RandomNumGen + from toontown.minigame.MazeBase import MazeBase -from . import CogdoMazeGameGlobals as Globals -from .CogdoMazeGameObjects import CogdoMazeWaterCooler + from . import CogdoMazeData +from . import CogdoMazeGameGlobals as Globals from . import CogdoUtil +from .CogdoMazeGameObjects import CogdoMazeWaterCooler + class CogdoMaze(MazeBase, DirectObject): diff --git a/toontown/cogdominium/CogdoMazeCameraManager.py b/toontown/cogdominium/CogdoMazeCameraManager.py index 5820fdb..2a1e73b 100644 --- a/toontown/cogdominium/CogdoMazeCameraManager.py +++ b/toontown/cogdominium/CogdoMazeCameraManager.py @@ -1,8 +1,11 @@ -from direct.showbase.PythonUtil import bound as clamp -from . import CogdoMazeGameGlobals as Globals import math import random +from direct.showbase.PythonUtil import bound as clamp + +from . import CogdoMazeGameGlobals as Globals + + class CogdoMazeCameraManager: toonJumpSpeed = 30.0 toonJumpDir = 1.0 diff --git a/toontown/cogdominium/CogdoMazeGame.py b/toontown/cogdominium/CogdoMazeGame.py index c62defd..f468176 100644 --- a/toontown/cogdominium/CogdoMazeGame.py +++ b/toontown/cogdominium/CogdoMazeGame.py @@ -1,21 +1,26 @@ -from panda3d.core import Point3, CollisionSphere, CollisionNode +import math +import random + +from panda3d.core import CollisionNode, CollisionSphere, Point3 + from direct.showbase.DirectObject import DirectObject from direct.showbase.PythonUtil import Functor from direct.showbase.RandomNumGen import RandomNumGen from direct.task.Task import Task + from toontown.minigame.MazeSuit import MazeSuit -from .CogdoGameGatherable import CogdoMemo -from .CogdoMazePlayer import CogdoMazePlayer -from .CogdoMazeLocalPlayer import CogdoMazeLocalPlayer -from .CogdoMazeGuiManager import CogdoMazeGuiManager -from .CogdoGameAudioManager import CogdoGameAudioManager -from .CogdoMazeGameObjects import CogdoMazeExit, CogdoMazeDrop -from .CogdoMazeSuits import CogdoMazeSuit, CogdoMazeSlowMinionSuit, CogdoMazeFastMinionSuit, CogdoMazeBossSuit -from .CogdoMazeGameMovies import CogdoMazeGameIntro, CogdoMazeGameFinish + from . import CogdoMazeGameGlobals as Globals from . import CogdoUtil -import math -import random +from .CogdoGameAudioManager import CogdoGameAudioManager +from .CogdoGameGatherable import CogdoMemo +from .CogdoMazeGameMovies import CogdoMazeGameFinish, CogdoMazeGameIntro +from .CogdoMazeGameObjects import CogdoMazeDrop, CogdoMazeExit +from .CogdoMazeGuiManager import CogdoMazeGuiManager +from .CogdoMazeLocalPlayer import CogdoMazeLocalPlayer +from .CogdoMazePlayer import CogdoMazePlayer +from .CogdoMazeSuits import CogdoMazeBossSuit, CogdoMazeFastMinionSuit, CogdoMazeSlowMinionSuit, CogdoMazeSuit + class CogdoMazeGame(DirectObject): notify = directNotify.newCategory('CogdoMazeGame') diff --git a/toontown/cogdominium/CogdoMazeGameGlobals.py b/toontown/cogdominium/CogdoMazeGameGlobals.py index f05c238..7917777 100644 --- a/toontown/cogdominium/CogdoMazeGameGlobals.py +++ b/toontown/cogdominium/CogdoMazeGameGlobals.py @@ -1,5 +1,7 @@ -from panda3d.core import VBase4 from enum import IntEnum + +from panda3d.core import VBase4 + GameActions = IntEnum('GameActions', ('EnterDoor', 'RevealDoor', 'OpenDoor', diff --git a/toontown/cogdominium/CogdoMazeGameGuis.py b/toontown/cogdominium/CogdoMazeGameGuis.py index 98d017f..e798ef1 100644 --- a/toontown/cogdominium/CogdoMazeGameGuis.py +++ b/toontown/cogdominium/CogdoMazeGameGuis.py @@ -1,16 +1,18 @@ +from panda3d.core import CardMaker, NodePath, Point3, TextNode + +from direct.gui.DirectGui import DGG, DirectFrame from direct.gui.DirectLabel import DirectLabel -from direct.gui.DirectGui import DirectFrame, DGG +from direct.interval.FunctionInterval import Func, Wait +from direct.interval.MetaInterval import Parallel, Sequence from direct.task.Task import Task -from direct.interval.MetaInterval import Sequence, Parallel -from direct.interval.FunctionInterval import Wait, Func -from panda3d.core import TextNode, NodePath, Point3, CardMaker -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import TTLocalizer -from toontown.toonbase import ToontownIntervals + from toontown.minigame.MazeMapGui import MazeMapGui +from toontown.toonbase import ToontownGlobals, ToontownIntervals, TTLocalizer + from . import CogdoMazeGameGlobals as Globals from . import CogdoUtil + class CogdoMazeMapGui(MazeMapGui): def __init__(self, mazeCollTable): diff --git a/toontown/cogdominium/CogdoMazeGameMovies.py b/toontown/cogdominium/CogdoMazeGameMovies.py index 20e6874..1735f37 100644 --- a/toontown/cogdominium/CogdoMazeGameMovies.py +++ b/toontown/cogdominium/CogdoMazeGameMovies.py @@ -1,13 +1,17 @@ -from panda3d.core import NodePath, Point3, Plane, PlaneNode -from direct.showbase.RandomNumGen import RandomNumGen -from direct.interval.MetaInterval import Sequence, Parallel +from panda3d.core import NodePath, Plane, PlaneNode, Point3 + from direct.interval.FunctionInterval import Func, Wait -from toontown.toonbase import TTLocalizer +from direct.interval.MetaInterval import Parallel, Sequence +from direct.showbase.RandomNumGen import RandomNumGen + from toontown.suit import Suit, SuitDNA -from toontown.toon import Toon, ToonHead, ToonDNA -from .CogdoUtil import CogdoGameMovie +from toontown.toon import Toon, ToonDNA, ToonHead +from toontown.toonbase import TTLocalizer + from . import CogdoMazeGameGlobals as Globals from . import CogdoUtil +from .CogdoUtil import CogdoGameMovie + class CogdoMazeGameIntro(CogdoGameMovie): diff --git a/toontown/cogdominium/CogdoMazeGameObjects.py b/toontown/cogdominium/CogdoMazeGameObjects.py index 7cdfae9..bf7f176 100644 --- a/toontown/cogdominium/CogdoMazeGameObjects.py +++ b/toontown/cogdominium/CogdoMazeGameObjects.py @@ -1,17 +1,20 @@ -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 -from toontown.toonbase import ToontownGlobals -from . import CogdoMazeGameGlobals as Globals -from .CogdoGameExit import CogdoGameExit -from . import CogdoUtil import math import random +from panda3d.core import BitMask32, CollisionNode, CollisionSphere, CollisionTube, NodePath, Point3, Point4, Vec3, Vec4 + +from direct.interval.IntervalGlobal import (Func, LerpColorScaleInterval, LerpFunc, LerpPosInterval, LerpScaleInterval, + Parallel, Sequence, WaitInterval) +from direct.showbase.DirectObject import DirectObject +from direct.task.Task import Task + +from toontown.toonbase import ToontownGlobals + +from . import CogdoMazeGameGlobals as Globals +from . import CogdoUtil +from .CogdoGameExit import CogdoGameExit + + class CogdoMazeSplattable: def __init__(self, object, name, collisionRadius): diff --git a/toontown/cogdominium/CogdoMazeGuiManager.py b/toontown/cogdominium/CogdoMazeGuiManager.py index b2cfe79..e73a042 100644 --- a/toontown/cogdominium/CogdoMazeGuiManager.py +++ b/toontown/cogdominium/CogdoMazeGuiManager.py @@ -1,13 +1,17 @@ from panda3d.core import NodePath -from direct.interval.MetaInterval import Sequence + from direct.interval.FunctionInterval import Func -from toontown.toonbase.ToontownTimer import ToontownTimer +from direct.interval.MetaInterval import Sequence + from toontown.toonbase import ToontownIntervals -from .CogdoMazeGameGuis import CogdoMazeHud, CogdoMazeMapGui, CogdoMazeBossGui -from .CogdoGameMessageDisplay import CogdoGameMessageDisplay +from toontown.toonbase.ToontownTimer import ToontownTimer + from . import CogdoMazeGameGlobals as Globals +from .CogdoGameMessageDisplay import CogdoGameMessageDisplay +from .CogdoMazeGameGuis import CogdoMazeBossGui, CogdoMazeHud, CogdoMazeMapGui from .CogdoMemoGui import CogdoMemoGui + class CogdoMazeGuiManager: def __init__(self, maze, bossCode): diff --git a/toontown/cogdominium/CogdoMazeLocalPlayer.py b/toontown/cogdominium/CogdoMazeLocalPlayer.py index 86d3c15..70dc13c 100644 --- a/toontown/cogdominium/CogdoMazeLocalPlayer.py +++ b/toontown/cogdominium/CogdoMazeLocalPlayer.py @@ -1,15 +1,18 @@ -from panda3d.core import Point3, CollisionNode, CollisionSphere, CollisionHandlerEvent +from panda3d.core import CollisionHandlerEvent, CollisionNode, CollisionSphere, Point3 + +from direct.directnotify import DirectNotifyGlobal from direct.interval.IntervalGlobal import Func, Sequence, Wait from direct.showbase.PythonUtil import bound as clamp -from direct.directnotify import DirectNotifyGlobal -from toontown.toonbase import TTLocalizer + from toontown.minigame.OrthoDrive import OrthoDrive from toontown.minigame.OrthoWalk import OrthoWalk -from toontown.toonbase import ToontownGlobals +from toontown.toonbase import ToontownGlobals, TTLocalizer + from . import CogdoGameConsts from . import CogdoMazeGameGlobals as Globals -from .CogdoMazePlayer import CogdoMazePlayer from .CogdoMazeCameraManager import CogdoMazeCameraManager +from .CogdoMazePlayer import CogdoMazePlayer + class CogdoMazeLocalPlayer(CogdoMazePlayer): notify = directNotify.newCategory('CogdoMazeLocalPlayer') diff --git a/toontown/cogdominium/CogdoMazePlayer.py b/toontown/cogdominium/CogdoMazePlayer.py index d4830be..6d7ded5 100644 --- a/toontown/cogdominium/CogdoMazePlayer.py +++ b/toontown/cogdominium/CogdoMazePlayer.py @@ -1,11 +1,14 @@ -from panda3d.core import Point3, NodePath +import random + +from panda3d.core import NodePath, Point3 + from direct.fsm.FSM import FSM -from direct.interval.IntervalGlobal import ProjectileInterval, Track, ActorInterval -from direct.interval.IntervalGlobal import Func, Sequence, Parallel -from .CogdoMazeGameObjects import CogdoMazeSplattable +from direct.interval.IntervalGlobal import ActorInterval, Func, Parallel, ProjectileInterval, Sequence, Track + from . import CogdoMazeGameGlobals as Globals from . import CogdoUtil -import random +from .CogdoMazeGameObjects import CogdoMazeSplattable + class CogdoMazePlayer(FSM, CogdoMazeSplattable): notify = directNotify.newCategory('CogdoMazePlayer') diff --git a/toontown/cogdominium/CogdoMazeSuits.py b/toontown/cogdominium/CogdoMazeSuits.py index d598301..e9be14d 100644 --- a/toontown/cogdominium/CogdoMazeSuits.py +++ b/toontown/cogdominium/CogdoMazeSuits.py @@ -1,14 +1,19 @@ -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 -from toontown.battle import BattleParticles -from toontown.battle import MovieUtil -from toontown.minigame.MazeSuit import MazeSuit -from .CogdoMazeGameObjects import CogdoMazeSplattable -from . import CogdoMazeGameGlobals as Globals import random +from panda3d.core import Point3, VBase4 + +from direct.fsm.FSM import FSM +from direct.interval.IntervalGlobal import (ActorInterval, Func, LerpColorScaleInterval, LerpHprInterval, + LerpScaleInterval, Parallel, ParticleInterval, Sequence, Track, Wait) +from direct.task.Task import Task + +from toontown.battle import BattleParticles, MovieUtil +from toontown.minigame.MazeSuit import MazeSuit + +from . import CogdoMazeGameGlobals as Globals +from .CogdoMazeGameObjects import CogdoMazeSplattable + + class CogdoMazeSuit(MazeSuit, FSM, CogdoMazeSplattable): GagHitEventName = 'CogdoMazeSuit_GagHit' DeathEventName = 'CogdoMazeSuit_Death' diff --git a/toontown/cogdominium/CogdoMemoGui.py b/toontown/cogdominium/CogdoMemoGui.py index 05b75c9..0d85e6e 100644 --- a/toontown/cogdominium/CogdoMemoGui.py +++ b/toontown/cogdominium/CogdoMemoGui.py @@ -1,10 +1,11 @@ -from direct.gui.DirectGui import DGG, DirectFrame, DirectLabel from panda3d.core import TextNode -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import ToontownIntervals -from toontown.toonbase import TTLocalizer -from . import CogdoUtil -from . import CogdoGameConsts + +from direct.gui.DirectGui import DGG, DirectFrame, DirectLabel + +from toontown.toonbase import ToontownGlobals, ToontownIntervals, TTLocalizer + +from . import CogdoGameConsts, CogdoUtil + MEMOICON_SCALE = 0.2 class CogdoMemoGui(DirectFrame): diff --git a/toontown/cogdominium/CogdoUtil.py b/toontown/cogdominium/CogdoUtil.py index 26bc062..812f69e 100644 --- a/toontown/cogdominium/CogdoUtil.py +++ b/toontown/cogdominium/CogdoUtil.py @@ -1,4 +1,5 @@ from panda3d.core import ColorBlendAttrib + ModelPhase = 5 ModelTypes = {'animation': 'a', 'model': 'm', @@ -57,8 +58,9 @@ class CogdoGameMovie: return def load(self): - from toontown.toonbase import ToontownGlobals from panda3d.core import TextNode + + from toontown.toonbase import ToontownGlobals textNode = TextNode('moviedialogue') textNode.setTextColor(0, 0, 0, 1) textNode.setCardColor(1, 1, 1, 1) diff --git a/toontown/cogdominium/DistCogdoBoardroomGame.py b/toontown/cogdominium/DistCogdoBoardroomGame.py index a7cb615..405ac56 100644 --- a/toontown/cogdominium/DistCogdoBoardroomGame.py +++ b/toontown/cogdominium/DistCogdoBoardroomGame.py @@ -1,10 +1,12 @@ from direct.directnotify.DirectNotifyGlobal import directNotify -from toontown.cogdominium.DistCogdoLevelGame import DistCogdoLevelGame -from toontown.cogdominium.CogdoBoardroomGameBase import CogdoBoardroomGameBase + from toontown.cogdominium import CogdoBoardroomGameConsts as Consts +from toontown.cogdominium.CogdoBoardroomGameBase import CogdoBoardroomGameBase +from toontown.cogdominium.DistCogdoLevelGame import DistCogdoLevelGame from toontown.toonbase import ToontownTimer from toontown.toonbase import TTLocalizer as TTL + class DistCogdoBoardroomGame(CogdoBoardroomGameBase, DistCogdoLevelGame): notify = directNotify.newCategory('DistCogdoBoardroomGame') diff --git a/toontown/cogdominium/DistCogdoBoardroomGameAI.py b/toontown/cogdominium/DistCogdoBoardroomGameAI.py index 0334d76..a911b0d 100644 --- a/toontown/cogdominium/DistCogdoBoardroomGameAI.py +++ b/toontown/cogdominium/DistCogdoBoardroomGameAI.py @@ -1,7 +1,9 @@ from direct.directnotify.DirectNotifyGlobal import directNotify + +from toontown.cogdominium import CogdoBoardroomGameConsts as Consts from toontown.cogdominium.CogdoBoardroomGameBase import CogdoBoardroomGameBase from toontown.cogdominium.DistCogdoLevelGameAI import DistCogdoLevelGameAI -from toontown.cogdominium import CogdoBoardroomGameConsts as Consts + class DistCogdoBoardroomGameAI(CogdoBoardroomGameBase, DistCogdoLevelGameAI): notify = directNotify.newCategory('DistCogdoBoardroomGameAI') diff --git a/toontown/cogdominium/DistCogdoCrane.py b/toontown/cogdominium/DistCogdoCrane.py index d1a906f..89e76a8 100644 --- a/toontown/cogdominium/DistCogdoCrane.py +++ b/toontown/cogdominium/DistCogdoCrane.py @@ -1,18 +1,22 @@ -from direct.gui.DirectGui import * +import random + from panda3d.core import * from panda3d.direct import SmoothMover -from direct.interval.IntervalGlobal import * + +from direct.distributed import DistributedObject from direct.distributed.ClockDelta import * from direct.fsm import FSM -from direct.distributed import DistributedObject -from direct.showutil import Rope +from direct.gui.DirectGui import * +from direct.interval.IntervalGlobal import * from direct.showbase import PythonUtil +from direct.showutil import Rope from direct.task import Task -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import TTLocalizer + from otp.otpbase import OTPGlobals + from toontown.cogdominium import CogdoCraneGameConsts as GameConsts -import random +from toontown.toonbase import ToontownGlobals, TTLocalizer + class DistCogdoCrane(DistributedObject.DistributedObject, FSM.FSM): notify = DirectNotifyGlobal.directNotify.newCategory('DistCogdoCrane') diff --git a/toontown/cogdominium/DistCogdoCraneAI.py b/toontown/cogdominium/DistCogdoCraneAI.py index 2f897a2..96fc92b 100644 --- a/toontown/cogdominium/DistCogdoCraneAI.py +++ b/toontown/cogdominium/DistCogdoCraneAI.py @@ -1,9 +1,13 @@ from panda3d.core import * + from direct.distributed import DistributedObjectAI -from toontown.toonbase import ToontownGlobals -from otp.otpbase import OTPGlobals from direct.fsm import FSM +from otp.otpbase import OTPGlobals + +from toontown.toonbase import ToontownGlobals + + class DistCogdoCraneAI(DistributedObjectAI.DistributedObjectAI, FSM.FSM): def __init__(self, air, craneGame, index): diff --git a/toontown/cogdominium/DistCogdoCraneCog.py b/toontown/cogdominium/DistCogdoCraneCog.py index a258b39..29039a5 100644 --- a/toontown/cogdominium/DistCogdoCraneCog.py +++ b/toontown/cogdominium/DistCogdoCraneCog.py @@ -1,10 +1,13 @@ from panda3d.core import * + from direct.distributed.ClockDelta import globalClockDelta from direct.distributed.DistributedObject import DistributedObject from direct.interval import IntervalGlobal as IG + from toontown.cogdominium import CogdoCraneGameConsts as GameConsts from toontown.suit.Suit import Suit + class DistCogdoCraneCog(Suit, DistributedObject): def __init__(self, cr): diff --git a/toontown/cogdominium/DistCogdoCraneCogAI.py b/toontown/cogdominium/DistCogdoCraneCogAI.py index f6ed97e..3a897ea 100644 --- a/toontown/cogdominium/DistCogdoCraneCogAI.py +++ b/toontown/cogdominium/DistCogdoCraneCogAI.py @@ -1,6 +1,7 @@ from direct.distributed.ClockDelta import globalClockDelta from direct.distributed.DistributedObjectAI import DistributedObjectAI + class DistCogdoCraneCogAI(DistributedObjectAI): def __init__(self, air, game, dna, entranceId, spawnTime): diff --git a/toontown/cogdominium/DistCogdoCraneGame.py b/toontown/cogdominium/DistCogdoCraneGame.py index 9ea831c..854f0b7 100644 --- a/toontown/cogdominium/DistCogdoCraneGame.py +++ b/toontown/cogdominium/DistCogdoCraneGame.py @@ -1,15 +1,18 @@ from panda3d.core import * from panda3d.physics import * + from direct.directnotify.DirectNotifyGlobal import directNotify from direct.task.Task import Task + from otp.level import LevelConstants from otp.otpbase import OTPGlobals -from toontown.cogdominium.DistCogdoLevelGame import DistCogdoLevelGame + from toontown.cogdominium import CogdoCraneGameConsts as GameConsts from toontown.cogdominium.CogdoCraneGameBase import CogdoCraneGameBase -from toontown.toonbase import ToontownTimer +from toontown.cogdominium.DistCogdoLevelGame import DistCogdoLevelGame +from toontown.toonbase import ToontownGlobals, ToontownTimer from toontown.toonbase import TTLocalizer as TTL -from toontown.toonbase import ToontownGlobals + class DistCogdoCraneGame(CogdoCraneGameBase, DistCogdoLevelGame): notify = directNotify.newCategory('DistCogdoCraneGame') diff --git a/toontown/cogdominium/DistCogdoCraneGameAI.py b/toontown/cogdominium/DistCogdoCraneGameAI.py index f05f288..fd085c9 100644 --- a/toontown/cogdominium/DistCogdoCraneGameAI.py +++ b/toontown/cogdominium/DistCogdoCraneGameAI.py @@ -1,15 +1,19 @@ +import random + from panda3d.core import * from panda3d.physics import * + from direct.directnotify.DirectNotifyGlobal import directNotify -from toontown.cogdominium.DistCogdoLevelGameAI import DistCogdoLevelGameAI -from toontown.cogdominium.DistCogdoCraneAI import DistCogdoCraneAI + from toontown.cogdominium import CogdoCraneGameConsts as GameConsts -from toontown.cogdominium.CogdoCraneGameBase import CogdoCraneGameBase from toontown.cogdominium import CogdoGameConsts -from toontown.cogdominium.DistCogdoCraneMoneyBagAI import DistCogdoCraneMoneyBagAI +from toontown.cogdominium.CogdoCraneGameBase import CogdoCraneGameBase +from toontown.cogdominium.DistCogdoCraneAI import DistCogdoCraneAI from toontown.cogdominium.DistCogdoCraneCogAI import DistCogdoCraneCogAI +from toontown.cogdominium.DistCogdoCraneMoneyBagAI import DistCogdoCraneMoneyBagAI +from toontown.cogdominium.DistCogdoLevelGameAI import DistCogdoLevelGameAI from toontown.suit.SuitDNA import SuitDNA -import random + class DistCogdoCraneGameAI(CogdoCraneGameBase, DistCogdoLevelGameAI, NodePath): notify = directNotify.newCategory('DistCogdoCraneGameAI') diff --git a/toontown/cogdominium/DistCogdoCraneMoneyBag.py b/toontown/cogdominium/DistCogdoCraneMoneyBag.py index cac30d4..d1d3540 100644 --- a/toontown/cogdominium/DistCogdoCraneMoneyBag.py +++ b/toontown/cogdominium/DistCogdoCraneMoneyBag.py @@ -1,10 +1,14 @@ from panda3d.core import * -from direct.interval.IntervalGlobal import * + from direct.directnotify import DirectNotifyGlobal -from toontown.toonbase import ToontownGlobals +from direct.interval.IntervalGlobal import * + from otp.otpbase import OTPGlobals -from toontown.cogdominium.DistCogdoCraneObject import DistCogdoCraneObject + from toontown.cogdominium import CogdoCraneGameConsts as GameConsts +from toontown.cogdominium.DistCogdoCraneObject import DistCogdoCraneObject +from toontown.toonbase import ToontownGlobals + class DistCogdoCraneMoneyBag(DistCogdoCraneObject): notify = DirectNotifyGlobal.directNotify.newCategory('DistCogdoCraneMoneyBag') diff --git a/toontown/cogdominium/DistCogdoCraneMoneyBagAI.py b/toontown/cogdominium/DistCogdoCraneMoneyBagAI.py index 0d34063..dba3d0d 100644 --- a/toontown/cogdominium/DistCogdoCraneMoneyBagAI.py +++ b/toontown/cogdominium/DistCogdoCraneMoneyBagAI.py @@ -1,8 +1,11 @@ from panda3d.core import * -from toontown.toonbase import ToontownGlobals + from otp.otpbase import OTPGlobals -from toontown.cogdominium.DistCogdoCraneObjectAI import DistCogdoCraneObjectAI + from toontown.cogdominium import CogdoCraneGameConsts as GameConsts +from toontown.cogdominium.DistCogdoCraneObjectAI import DistCogdoCraneObjectAI +from toontown.toonbase import ToontownGlobals + class DistCogdoCraneMoneyBagAI(DistCogdoCraneObjectAI): wantsWatchDrift = 0 diff --git a/toontown/cogdominium/DistCogdoCraneObject.py b/toontown/cogdominium/DistCogdoCraneObject.py index ee8d887..5976aa0 100644 --- a/toontown/cogdominium/DistCogdoCraneObject.py +++ b/toontown/cogdominium/DistCogdoCraneObject.py @@ -1,11 +1,15 @@ from panda3d.core import * -from direct.interval.IntervalGlobal import * + from direct.directnotify import DirectNotifyGlobal from direct.distributed import DistributedSmoothNode -from toontown.toonbase import ToontownGlobals -from otp.otpbase import OTPGlobals from direct.fsm import FSM +from direct.interval.IntervalGlobal import * from direct.task import Task + +from otp.otpbase import OTPGlobals + +from toontown.toonbase import ToontownGlobals + smileyDoId = 1 class DistCogdoCraneObject(DistributedSmoothNode.DistributedSmoothNode, FSM.FSM): diff --git a/toontown/cogdominium/DistCogdoCraneObjectAI.py b/toontown/cogdominium/DistCogdoCraneObjectAI.py index 8af78fb..04de61d 100644 --- a/toontown/cogdominium/DistCogdoCraneObjectAI.py +++ b/toontown/cogdominium/DistCogdoCraneObjectAI.py @@ -1,10 +1,14 @@ from panda3d.core import * + from direct.distributed import DistributedSmoothNodeAI -from toontown.toonbase import ToontownGlobals -from otp.otpbase import OTPGlobals from direct.fsm import FSM from direct.task import Task +from otp.otpbase import OTPGlobals + +from toontown.toonbase import ToontownGlobals + + class DistCogdoCraneObjectAI(DistributedSmoothNodeAI.DistributedSmoothNodeAI, FSM.FSM): wantsWatchDrift = 1 diff --git a/toontown/cogdominium/DistCogdoFlyingGame.py b/toontown/cogdominium/DistCogdoFlyingGame.py index bad7593..626148b 100644 --- a/toontown/cogdominium/DistCogdoFlyingGame.py +++ b/toontown/cogdominium/DistCogdoFlyingGame.py @@ -1,9 +1,12 @@ from direct.distributed.ClockDelta import globalClockDelta + from toontown.toonbase import TTLocalizer -from .CogdoFlyingGame import CogdoFlyingGame -from .DistCogdoGame import DistCogdoGame + from . import CogdoFlyingGameGlobals from . import CogdoFlyingGameGlobals as Globals +from .CogdoFlyingGame import CogdoFlyingGame +from .DistCogdoGame import DistCogdoGame + class DistCogdoFlyingGame(DistCogdoGame): notify = directNotify.newCategory('DistCogdoFlyingGame') diff --git a/toontown/cogdominium/DistCogdoFlyingGameAI.py b/toontown/cogdominium/DistCogdoFlyingGameAI.py index 11f3119..11e950f 100644 --- a/toontown/cogdominium/DistCogdoFlyingGameAI.py +++ b/toontown/cogdominium/DistCogdoFlyingGameAI.py @@ -1,7 +1,10 @@ import random + from direct.distributed.ClockDelta import globalClockDelta -from .DistCogdoGameAI import DistCogdoGameAI + from . import CogdoFlyingGameGlobals as Globals +from .DistCogdoGameAI import DistCogdoGameAI + class DistCogdoFlyingGameAI(DistCogdoGameAI): notify = directNotify.newCategory('DistCogdoFlyingGameAI') diff --git a/toontown/cogdominium/DistCogdoGame.py b/toontown/cogdominium/DistCogdoGame.py index a3737ac..477e667 100644 --- a/toontown/cogdominium/DistCogdoGame.py +++ b/toontown/cogdominium/DistCogdoGame.py @@ -1,16 +1,19 @@ from panda3d.core import VBase4 -from direct.gui.DirectGui import DirectLabel + from direct.directnotify.DirectNotifyGlobal import directNotify from direct.distributed.ClockDelta import globalClockDelta from direct.distributed.DistributedObject import DistributedObject from direct.fsm import ClassicFSM, State -from direct.fsm.StatePush import StateVar, FunctionCall +from direct.fsm.StatePush import FunctionCall, StateVar +from direct.gui.DirectGui import DirectLabel + from toontown.cogdominium import CogdoGameConsts -from toontown.cogdominium.DistCogdoGameBase import DistCogdoGameBase -from toontown.minigame.MinigameRulesPanel import MinigameRulesPanel from toontown.cogdominium.CogdoGameRulesPanel import CogdoGameRulesPanel +from toontown.cogdominium.DistCogdoGameBase import DistCogdoGameBase from toontown.minigame import MinigameGlobals +from toontown.minigame.MinigameRulesPanel import MinigameRulesPanel from toontown.toonbase import TTLocalizer as TTL + SCHELLGAMES_DEV = __debug__ and base.config.GetBool('schellgames-dev', False) class DistCogdoGame(DistCogdoGameBase, DistributedObject): diff --git a/toontown/cogdominium/DistCogdoGameAI.py b/toontown/cogdominium/DistCogdoGameAI.py index 027ab1e..ac351f8 100644 --- a/toontown/cogdominium/DistCogdoGameAI.py +++ b/toontown/cogdominium/DistCogdoGameAI.py @@ -2,9 +2,12 @@ from direct.directnotify.DirectNotifyGlobal import directNotify from direct.distributed.ClockDelta import globalClockDelta from direct.distributed.DistributedObjectAI import DistributedObjectAI from direct.fsm import ClassicFSM, State + +from otp.ai.Barrier import Barrier + from toontown.cogdominium import CogdoGameConsts from toontown.cogdominium.DistCogdoGameBase import DistCogdoGameBase -from otp.ai.Barrier import Barrier + class SadCallbackToken: pass diff --git a/toontown/cogdominium/DistCogdoLevelGame.py b/toontown/cogdominium/DistCogdoLevelGame.py index 93cd1cb..ae6168f 100644 --- a/toontown/cogdominium/DistCogdoLevelGame.py +++ b/toontown/cogdominium/DistCogdoLevelGame.py @@ -1,10 +1,12 @@ from direct.directnotify.DirectNotifyGlobal import directNotify + +from otp.level import EditorGlobals, LevelConstants from otp.level.DistributedLevel import DistributedLevel -from otp.level import LevelConstants -from otp.level import EditorGlobals -from toontown.cogdominium.DistCogdoGame import DistCogdoGame -from toontown.cogdominium.CogdoLevelGameBase import CogdoLevelGameBase + from toontown.cogdominium.CogdoEntityCreator import CogdoEntityCreator +from toontown.cogdominium.CogdoLevelGameBase import CogdoLevelGameBase +from toontown.cogdominium.DistCogdoGame import DistCogdoGame + class DistCogdoLevelGame(CogdoLevelGameBase, DistCogdoGame, DistributedLevel): notify = directNotify.newCategory('DistCogdoLevelGame') diff --git a/toontown/cogdominium/DistCogdoLevelGameAI.py b/toontown/cogdominium/DistCogdoLevelGameAI.py index b12b2f9..ac1c4e8 100644 --- a/toontown/cogdominium/DistCogdoLevelGameAI.py +++ b/toontown/cogdominium/DistCogdoLevelGameAI.py @@ -1,8 +1,11 @@ from direct.directnotify.DirectNotifyGlobal import directNotify + from otp.level.DistributedLevelAI import DistributedLevelAI -from toontown.cogdominium.DistCogdoGameAI import DistCogdoGameAI + from toontown.cogdominium.CogdoEntityCreatorAI import CogdoEntityCreatorAI from toontown.cogdominium.CogdoLevelGameBase import CogdoLevelGameBase +from toontown.cogdominium.DistCogdoGameAI import DistCogdoGameAI + class DistCogdoLevelGameAI(CogdoLevelGameBase, DistCogdoGameAI, DistributedLevelAI): notify = directNotify.newCategory('DistCogdoLevelGameAI') diff --git a/toontown/cogdominium/DistCogdoMazeGame.py b/toontown/cogdominium/DistCogdoMazeGame.py index 894f6d8..91926ad 100644 --- a/toontown/cogdominium/DistCogdoMazeGame.py +++ b/toontown/cogdominium/DistCogdoMazeGame.py @@ -1,11 +1,14 @@ from direct.distributed.ClockDelta import globalClockDelta -from toontown.toonbase import TTLocalizer -from .DistCogdoGame import DistCogdoGame + from toontown.cogdominium.DistCogdoMazeGameBase import DistCogdoMazeGameBase -from .CogdoMazeGame import CogdoMazeGame -from .CogdoMaze import CogdoMazeFactory +from toontown.toonbase import TTLocalizer + from . import CogdoMazeGameGlobals from . import CogdoMazeGameGlobals as Globals +from .CogdoMaze import CogdoMazeFactory +from .CogdoMazeGame import CogdoMazeGame +from .DistCogdoGame import DistCogdoGame + class DistCogdoMazeGame(DistCogdoGame, DistCogdoMazeGameBase): notify = directNotify.newCategory('DistCogdoMazeGame') diff --git a/toontown/cogdominium/DistCogdoMazeGameAI.py b/toontown/cogdominium/DistCogdoMazeGameAI.py index ce41f06..382b3c5 100644 --- a/toontown/cogdominium/DistCogdoMazeGameAI.py +++ b/toontown/cogdominium/DistCogdoMazeGameAI.py @@ -1,10 +1,15 @@ -from panda3d.core import Vec3, NodePath +from panda3d.core import NodePath, Vec3 + from direct.distributed.ClockDelta import globalClockDelta + from otp.avatar.SpeedMonitor import SpeedMonitor + from toontown.cogdominium.CogdoMaze import CogdoMazeFactory from toontown.cogdominium.DistCogdoMazeGameBase import DistCogdoMazeGameBase -from .DistCogdoGameAI import DistCogdoGameAI + from . import CogdoMazeGameGlobals as Globals +from .DistCogdoGameAI import DistCogdoGameAI + cogdoMazeTimeScoreRatio = 0.5 cogdoMazePerfectTime = 90 cogdoMazeMaxTime = 210 diff --git a/toontown/cogdominium/DistCogdoMazeGameBase.py b/toontown/cogdominium/DistCogdoMazeGameBase.py index 8f1e891..2ba87fe 100644 --- a/toontown/cogdominium/DistCogdoMazeGameBase.py +++ b/toontown/cogdominium/DistCogdoMazeGameBase.py @@ -1,7 +1,10 @@ from direct.showbase.RandomNumGen import RandomNumGen + from toontown.cogdominium.CogdoMaze import CogdoMazeFactory + from . import CogdoMazeGameGlobals as Globals + class DistCogdoMazeGameBase: def createRandomNumGen(self): diff --git a/toontown/cogdominium/DistributedCogdoBarrel.py b/toontown/cogdominium/DistributedCogdoBarrel.py index 6b37fc1..608561a 100644 --- a/toontown/cogdominium/DistributedCogdoBarrel.py +++ b/toontown/cogdominium/DistributedCogdoBarrel.py @@ -1,8 +1,11 @@ from panda3d.core import * + from direct.directnotify import DirectNotifyGlobal from direct.distributed import DistributedObject -from toontown.toonbase import ToontownGlobals, ToontownIntervals + from toontown.cogdominium import CogdoBarrelRoomConsts +from toontown.toonbase import ToontownGlobals, ToontownIntervals + class DistributedCogdoBarrel(DistributedObject.DistributedObject): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedCogdoBarrel') diff --git a/toontown/cogdominium/DistributedCogdoBarrelAI.py b/toontown/cogdominium/DistributedCogdoBarrelAI.py index fa49209..0682e23 100644 --- a/toontown/cogdominium/DistributedCogdoBarrelAI.py +++ b/toontown/cogdominium/DistributedCogdoBarrelAI.py @@ -1,8 +1,11 @@ import random + from direct.directnotify import DirectNotifyGlobal from direct.distributed import DistributedObjectAI + from toontown.cogdominium import CogdoBarrelRoomConsts + class DistributedCogdoBarrelAI(DistributedObjectAI.DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedCogdoBarrelAI') diff --git a/toontown/cogdominium/DistributedCogdoBattleBldg.py b/toontown/cogdominium/DistributedCogdoBattleBldg.py index aaaa9af..b48a074 100644 --- a/toontown/cogdominium/DistributedCogdoBattleBldg.py +++ b/toontown/cogdominium/DistributedCogdoBattleBldg.py @@ -1,6 +1,8 @@ from direct.directnotify import DirectNotifyGlobal -from toontown.toonbase import TTLocalizer + from toontown.battle import DistributedBattleBldg +from toontown.toonbase import TTLocalizer + class DistributedCogdoBattleBldg(DistributedBattleBldg.DistributedBattleBldg): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedCogdoBattleBldg') diff --git a/toontown/cogdominium/DistributedCogdoBattleBldgAI.py b/toontown/cogdominium/DistributedCogdoBattleBldgAI.py index b2dca7a..f324f13 100644 --- a/toontown/cogdominium/DistributedCogdoBattleBldgAI.py +++ b/toontown/cogdominium/DistributedCogdoBattleBldgAI.py @@ -1,6 +1,8 @@ from direct.directnotify import DirectNotifyGlobal + from toontown.battle import DistributedBattleBldgAI + class DistributedCogdoBattleBldgAI(DistributedBattleBldgAI.DistributedBattleBldgAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedCogdoBattleBldgAI') diff --git a/toontown/cogdominium/DistributedCogdoElevatorExt.py b/toontown/cogdominium/DistributedCogdoElevatorExt.py index 25f6533..a0195dc 100644 --- a/toontown/cogdominium/DistributedCogdoElevatorExt.py +++ b/toontown/cogdominium/DistributedCogdoElevatorExt.py @@ -1,5 +1,6 @@ from toontown.building.DistributedElevatorExt import DistributedElevatorExt + class DistributedCogdoElevatorExt(DistributedElevatorExt): def setupElevator(self): diff --git a/toontown/cogdominium/DistributedCogdoElevatorExtAI.py b/toontown/cogdominium/DistributedCogdoElevatorExtAI.py index 7c108de..e374f0a 100644 --- a/toontown/cogdominium/DistributedCogdoElevatorExtAI.py +++ b/toontown/cogdominium/DistributedCogdoElevatorExtAI.py @@ -1,6 +1,8 @@ from direct.directnotify import DirectNotifyGlobal + from toontown.building.DistributedElevatorExtAI import DistributedElevatorExtAI + class DistributedCogdoElevatorExtAI(DistributedElevatorExtAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedCogdoElevatorExtAI') diff --git a/toontown/cogdominium/DistributedCogdoElevatorInt.py b/toontown/cogdominium/DistributedCogdoElevatorInt.py index 6294013..92244e2 100644 --- a/toontown/cogdominium/DistributedCogdoElevatorInt.py +++ b/toontown/cogdominium/DistributedCogdoElevatorInt.py @@ -1,5 +1,6 @@ from toontown.building.DistributedElevatorInt import DistributedElevatorInt + class DistributedCogdoElevatorInt(DistributedElevatorInt): def _getDoorsClosedInfo(self): diff --git a/toontown/cogdominium/DistributedCogdoElevatorIntAI.py b/toontown/cogdominium/DistributedCogdoElevatorIntAI.py index dd2b0ec..f4b5100 100644 --- a/toontown/cogdominium/DistributedCogdoElevatorIntAI.py +++ b/toontown/cogdominium/DistributedCogdoElevatorIntAI.py @@ -1,4 +1,5 @@ from toontown.building.DistributedElevatorIntAI import DistributedElevatorIntAI + class DistributedCogdoElevatorIntAI(DistributedElevatorIntAI): pass diff --git a/toontown/cogdominium/DistributedCogdoInterior.py b/toontown/cogdominium/DistributedCogdoInterior.py index e90b8a9..788a069 100644 --- a/toontown/cogdominium/DistributedCogdoInterior.py +++ b/toontown/cogdominium/DistributedCogdoInterior.py @@ -1,27 +1,28 @@ import random -from direct.interval.IntervalGlobal import * -from direct.distributed.ClockDelta import * -from toontown.building.ElevatorConstants import * -from toontown.toon import NPCToons + from panda3d.core import NodePath from panda3d.otp import * -from toontown.building import ElevatorUtils -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import ToontownBattleGlobals + from direct.directnotify import DirectNotifyGlobal -from direct.fsm import ClassicFSM, State from direct.distributed import DistributedObject -from direct.fsm import State -from direct.fsm.StatePush import StateVar, FunctionCall +from direct.distributed.ClockDelta import * +from direct.fsm import ClassicFSM, State +from direct.fsm.StatePush import FunctionCall, StateVar +from direct.interval.IntervalGlobal import * + from toontown.battle import BattleBase -from toontown.hood import ZoneUtil +from toontown.building import ElevatorUtils +from toontown.building.ElevatorConstants import * +from toontown.cogdominium import CogdoBarrelRoom, CogdoBarrelRoomConsts, CogdoGameConsts from toontown.cogdominium.CogdoLayout import CogdoLayout -from toontown.cogdominium import CogdoGameConsts -from toontown.cogdominium import CogdoBarrelRoom, CogdoBarrelRoomConsts from toontown.distributed import DelayDelete -from toontown.toonbase import TTLocalizer -from .CogdoExecutiveSuiteMovies import CogdoExecutiveSuiteIntro +from toontown.hood import ZoneUtil +from toontown.toon import NPCToons +from toontown.toonbase import ToontownBattleGlobals, ToontownGlobals, TTLocalizer + from .CogdoElevatorMovie import CogdoElevatorMovie +from .CogdoExecutiveSuiteMovies import CogdoExecutiveSuiteIntro + PAINTING_DICT = {'s': 'tt_m_ara_crg_paintingMoverShaker', 'l': 'tt_m_ara_crg_paintingLegalEagle', 'm': 'tt_m_ara_crg_paintingMoverShaker', diff --git a/toontown/cogdominium/DistributedCogdoInteriorAI.py b/toontown/cogdominium/DistributedCogdoInteriorAI.py index 0945124..d06a69b 100644 --- a/toontown/cogdominium/DistributedCogdoInteriorAI.py +++ b/toontown/cogdominium/DistributedCogdoInteriorAI.py @@ -1,29 +1,30 @@ import copy import random + from direct.directnotify import DirectNotifyGlobal from direct.distributed import DistributedObjectAI from direct.distributed.ClockDelta import * from direct.fsm import ClassicFSM, State from direct.task import Timer -from toontown.toon import NPCToons + from otp.ai.AIBaseGlobal import * + from toontown.ai import ToonBarrier from toontown.battle import BattleBase -from toontown.cogdominium import DistributedCogdoBattleBldgAI from toontown.building.ElevatorConstants import * -from toontown.suit.SuitDNA import SuitDNA -from toontown.toonbase.ToontownBattleGlobals import * +from toontown.cogdominium import CogdoBarrelRoomAI, CogdoBarrelRoomConsts, CogdoGameConsts, DistributedCogdoBattleBldgAI +from toontown.cogdominium.DistCogdoCraneGameAI import DistCogdoCraneGameAI +from toontown.cogdominium.DistCogdoFlyingGameAI import DistCogdoFlyingGameAI +from toontown.cogdominium.DistCogdoMazeGameAI import DistCogdoMazeGameAI from toontown.hood import ZoneUtil from toontown.minigame.MinigameGlobals import SafeZones +from toontown.suit.SuitDNA import SuitDNA from toontown.toon import NPCToons -from .DistributedCogdoElevatorIntAI import DistributedCogdoElevatorIntAI -from toontown.cogdominium import CogdoBarrelRoomConsts -from toontown.cogdominium import CogdoBarrelRoomAI +from toontown.toonbase.ToontownBattleGlobals import * + from .DistCogdoBoardroomGameAI import DistCogdoBoardroomGameAI -from toontown.cogdominium.DistCogdoCraneGameAI import DistCogdoCraneGameAI -from toontown.cogdominium.DistCogdoMazeGameAI import DistCogdoMazeGameAI -from toontown.cogdominium.DistCogdoFlyingGameAI import DistCogdoFlyingGameAI -from toontown.cogdominium import CogdoGameConsts +from .DistributedCogdoElevatorIntAI import DistributedCogdoElevatorIntAI + CogdoGames = { 'boardroom': DistCogdoBoardroomGameAI, 'crane': DistCogdoCraneGameAI, diff --git a/toontown/cogdominium/SuitPlannerCogdoInteriorAI.py b/toontown/cogdominium/SuitPlannerCogdoInteriorAI.py index b9ae13d..69ab4e3 100644 --- a/toontown/cogdominium/SuitPlannerCogdoInteriorAI.py +++ b/toontown/cogdominium/SuitPlannerCogdoInteriorAI.py @@ -1,5 +1,6 @@ from toontown.building.SuitPlannerInteriorAI import SuitPlannerInteriorAI + class SuitPlannerCogdoInteriorAI(SuitPlannerInteriorAI): def __init__(self, cogdoLayout, bldgLevel, bldgTrack, zone): diff --git a/toontown/coghq/ActiveCell.py b/toontown/coghq/ActiveCell.py index f97eba7..d4ca72c 100644 --- a/toontown/coghq/ActiveCell.py +++ b/toontown/coghq/ActiveCell.py @@ -1,7 +1,10 @@ from panda3d.core import * -from otp.level import BasicEntities + from direct.directnotify import DirectNotifyGlobal +from otp.level import BasicEntities + + class ActiveCell(BasicEntities.DistributedNodePathEntity): notify = DirectNotifyGlobal.directNotify.newCategory('ActiveCell') diff --git a/toontown/coghq/ActiveCellAI.py b/toontown/coghq/ActiveCellAI.py index ef3fe27..6e6283f 100644 --- a/toontown/coghq/ActiveCellAI.py +++ b/toontown/coghq/ActiveCellAI.py @@ -1,6 +1,8 @@ -from otp.level import DistributedEntityAI from direct.directnotify import DirectNotifyGlobal +from otp.level import DistributedEntityAI + + class ActiveCellAI(DistributedEntityAI.DistributedEntityAI): notify = DirectNotifyGlobal.directNotify.newCategory('ActiveCellAI') diff --git a/toontown/coghq/BarrelBase.py b/toontown/coghq/BarrelBase.py index 3ac803c..4d85f34 100644 --- a/toontown/coghq/BarrelBase.py +++ b/toontown/coghq/BarrelBase.py @@ -1,5 +1,6 @@ import random + class BarrelBase: def getRng(self): diff --git a/toontown/coghq/BattleBlocker.py b/toontown/coghq/BattleBlocker.py index e4c68c9..4cb5b30 100644 --- a/toontown/coghq/BattleBlocker.py +++ b/toontown/coghq/BattleBlocker.py @@ -1,9 +1,12 @@ from panda3d.core import * -from panda3d.core import * -from direct.interval.IntervalGlobal import * -from otp.level import BasicEntities -from toontown.toonbase import ToontownGlobals + from direct.directnotify import DirectNotifyGlobal +from direct.interval.IntervalGlobal import * + +from otp.level import BasicEntities + +from toontown.toonbase import ToontownGlobals + class BattleBlocker(BasicEntities.DistributedNodePathEntity): notify = DirectNotifyGlobal.directNotify.newCategory('BattleBlocker') diff --git a/toontown/coghq/BattleBlockerAI.py b/toontown/coghq/BattleBlockerAI.py index 027e616..fd5c0a5 100644 --- a/toontown/coghq/BattleBlockerAI.py +++ b/toontown/coghq/BattleBlockerAI.py @@ -1,6 +1,8 @@ -from otp.level import DistributedEntityAI from direct.directnotify import DirectNotifyGlobal +from otp.level import DistributedEntityAI + + class BattleBlockerAI(DistributedEntityAI.DistributedEntityAI): notify = DirectNotifyGlobal.directNotify.newCategory('BattleBlockerAI') diff --git a/toontown/coghq/BossbotCogHQLoader.py b/toontown/coghq/BossbotCogHQLoader.py index 1902298..e48f88c 100644 --- a/toontown/coghq/BossbotCogHQLoader.py +++ b/toontown/coghq/BossbotCogHQLoader.py @@ -1,17 +1,17 @@ -from direct.directnotify import DirectNotifyGlobal -from direct.fsm import StateData -from . import CogHQLoader -from toontown.toonbase import ToontownGlobals -from direct.gui import DirectGui -from toontown.toonbase import TTLocalizer -from toontown.toon import Toon -from direct.fsm import State -from toontown.coghq import BossbotHQExterior -from toontown.coghq import BossbotHQBossBattle -from toontown.coghq import BossbotOfficeExterior -from toontown.coghq import CountryClubInterior -from panda3d.core import DecalEffect, TextEncoder import random + +from panda3d.core import DecalEffect, TextEncoder + +from direct.directnotify import DirectNotifyGlobal +from direct.fsm import State, StateData +from direct.gui import DirectGui + +from toontown.coghq import BossbotHQBossBattle, BossbotHQExterior, BossbotOfficeExterior, CountryClubInterior +from toontown.toon import Toon +from toontown.toonbase import ToontownGlobals, TTLocalizer + +from . import CogHQLoader + aspectSF = 0.7227 class BossbotCogHQLoader(CogHQLoader.CogHQLoader): diff --git a/toontown/coghq/BossbotCountryClubEntrance_Action00.py b/toontown/coghq/BossbotCountryClubEntrance_Action00.py index 6e12640..6ebe623 100644 --- a/toontown/coghq/BossbotCountryClubEntrance_Action00.py +++ b/toontown/coghq/BossbotCountryClubEntrance_Action00.py @@ -1,4 +1,5 @@ from toontown.coghq.SpecImports import * + GlobalEntities = {1000: {'type': 'levelMgr', 'name': 'LevelMgr', 'comment': '', diff --git a/toontown/coghq/BossbotCountryClubFairwayRoom_Battle00.py b/toontown/coghq/BossbotCountryClubFairwayRoom_Battle00.py index 0e3c75d..517d88c 100644 --- a/toontown/coghq/BossbotCountryClubFairwayRoom_Battle00.py +++ b/toontown/coghq/BossbotCountryClubFairwayRoom_Battle00.py @@ -1,4 +1,5 @@ from toontown.coghq.SpecImports import * + GlobalEntities = {1000: {'type': 'levelMgr', 'name': 'LevelMgr', 'comment': '', diff --git a/toontown/coghq/BossbotCountryClubFairwayRoom_Battle00_Cogs.py b/toontown/coghq/BossbotCountryClubFairwayRoom_Battle00_Cogs.py index 8ce75fd..eb734d4 100644 --- a/toontown/coghq/BossbotCountryClubFairwayRoom_Battle00_Cogs.py +++ b/toontown/coghq/BossbotCountryClubFairwayRoom_Battle00_Cogs.py @@ -1,5 +1,7 @@ -from .SpecImports import * from toontown.toonbase import ToontownGlobals + +from .SpecImports import * + CogParent = 110200 BattleCellId = 0 BattleCells = {BattleCellId: {'parentEntId': CogParent, diff --git a/toontown/coghq/BossbotCountryClubGreenRoom_Action00.py b/toontown/coghq/BossbotCountryClubGreenRoom_Action00.py index b7196a2..41fab15 100644 --- a/toontown/coghq/BossbotCountryClubGreenRoom_Action00.py +++ b/toontown/coghq/BossbotCountryClubGreenRoom_Action00.py @@ -1,4 +1,5 @@ from toontown.coghq.SpecImports import * + GlobalEntities = {1000: {'type': 'levelMgr', 'name': 'LevelMgr', 'comment': '', diff --git a/toontown/coghq/BossbotCountryClubGreenRoom_Action01.py b/toontown/coghq/BossbotCountryClubGreenRoom_Action01.py index ae1b8c3..4c7f3d6 100644 --- a/toontown/coghq/BossbotCountryClubGreenRoom_Action01.py +++ b/toontown/coghq/BossbotCountryClubGreenRoom_Action01.py @@ -1,4 +1,5 @@ from toontown.coghq.SpecImports import * + GlobalEntities = {1000: {'type': 'levelMgr', 'name': 'LevelMgr', 'comment': '', diff --git a/toontown/coghq/BossbotCountryClubGreenRoom_Action02.py b/toontown/coghq/BossbotCountryClubGreenRoom_Action02.py index 33e8581..d8b7c04 100644 --- a/toontown/coghq/BossbotCountryClubGreenRoom_Action02.py +++ b/toontown/coghq/BossbotCountryClubGreenRoom_Action02.py @@ -1,4 +1,5 @@ from toontown.coghq.SpecImports import * + GlobalEntities = {1000: {'type': 'levelMgr', 'name': 'LevelMgr', 'comment': '', diff --git a/toontown/coghq/BossbotCountryClubKartRoom_Battle00.py b/toontown/coghq/BossbotCountryClubKartRoom_Battle00.py index 416b240..c130477 100644 --- a/toontown/coghq/BossbotCountryClubKartRoom_Battle00.py +++ b/toontown/coghq/BossbotCountryClubKartRoom_Battle00.py @@ -1,4 +1,5 @@ from toontown.coghq.SpecImports import * + GlobalEntities = {1000: {'type': 'levelMgr', 'name': 'LevelMgr', 'comment': '', diff --git a/toontown/coghq/BossbotCountryClubKartRoom_Battle00_Cogs.py b/toontown/coghq/BossbotCountryClubKartRoom_Battle00_Cogs.py index e38456d..a131b7a 100644 --- a/toontown/coghq/BossbotCountryClubKartRoom_Battle00_Cogs.py +++ b/toontown/coghq/BossbotCountryClubKartRoom_Battle00_Cogs.py @@ -1,5 +1,7 @@ -from .SpecImports import * from toontown.toonbase import ToontownGlobals + +from .SpecImports import * + CogParent = 110400 BattleCellId = 0 BattleCells = {BattleCellId: {'parentEntId': CogParent, diff --git a/toontown/coghq/BossbotCountryClubMazeRoom_Battle00.py b/toontown/coghq/BossbotCountryClubMazeRoom_Battle00.py index dffc77e..17b93df 100644 --- a/toontown/coghq/BossbotCountryClubMazeRoom_Battle00.py +++ b/toontown/coghq/BossbotCountryClubMazeRoom_Battle00.py @@ -1,4 +1,5 @@ from toontown.coghq.SpecImports import * + GlobalEntities = {1000: {'type': 'levelMgr', 'name': 'LevelMgr', 'comment': '', diff --git a/toontown/coghq/BossbotCountryClubMazeRoom_Battle00_Cogs.py b/toontown/coghq/BossbotCountryClubMazeRoom_Battle00_Cogs.py index b142083..28a658e 100644 --- a/toontown/coghq/BossbotCountryClubMazeRoom_Battle00_Cogs.py +++ b/toontown/coghq/BossbotCountryClubMazeRoom_Battle00_Cogs.py @@ -1,5 +1,7 @@ -from .SpecImports import * from toontown.toonbase import ToontownGlobals + +from .SpecImports import * + CogParent = 110000 BattleCellId = 0 BattleCells = {BattleCellId: {'parentEntId': CogParent, diff --git a/toontown/coghq/BossbotCountryClubMazeRoom_Battle01.py b/toontown/coghq/BossbotCountryClubMazeRoom_Battle01.py index 4599fff..f2d8ef1 100644 --- a/toontown/coghq/BossbotCountryClubMazeRoom_Battle01.py +++ b/toontown/coghq/BossbotCountryClubMazeRoom_Battle01.py @@ -1,4 +1,5 @@ from toontown.coghq.SpecImports import * + GlobalEntities = {1000: {'type': 'levelMgr', 'name': 'LevelMgr', 'comment': '', diff --git a/toontown/coghq/BossbotCountryClubMazeRoom_Battle01_Cogs.py b/toontown/coghq/BossbotCountryClubMazeRoom_Battle01_Cogs.py index 17dc25d..7fdcc46 100644 --- a/toontown/coghq/BossbotCountryClubMazeRoom_Battle01_Cogs.py +++ b/toontown/coghq/BossbotCountryClubMazeRoom_Battle01_Cogs.py @@ -1,5 +1,7 @@ -from .SpecImports import * from toontown.toonbase import ToontownGlobals + +from .SpecImports import * + CogParent = 110000 BattleCellId = 0 BattleCells = {BattleCellId: {'parentEntId': CogParent, diff --git a/toontown/coghq/BossbotCountryClubMazeRoom_Battle02.py b/toontown/coghq/BossbotCountryClubMazeRoom_Battle02.py index c6e9092..ebaefa5 100644 --- a/toontown/coghq/BossbotCountryClubMazeRoom_Battle02.py +++ b/toontown/coghq/BossbotCountryClubMazeRoom_Battle02.py @@ -1,4 +1,5 @@ from toontown.coghq.SpecImports import * + GlobalEntities = {1000: {'type': 'levelMgr', 'name': 'LevelMgr', 'comment': '', diff --git a/toontown/coghq/BossbotCountryClubMazeRoom_Battle02_Cogs.py b/toontown/coghq/BossbotCountryClubMazeRoom_Battle02_Cogs.py index 1f23055..bbf22bd 100644 --- a/toontown/coghq/BossbotCountryClubMazeRoom_Battle02_Cogs.py +++ b/toontown/coghq/BossbotCountryClubMazeRoom_Battle02_Cogs.py @@ -1,5 +1,7 @@ -from .SpecImports import * from toontown.toonbase import ToontownGlobals + +from .SpecImports import * + CogParent = 110000 BattleCellId = 0 BattleCells = {BattleCellId: {'parentEntId': CogParent, diff --git a/toontown/coghq/BossbotCountryClubMazeRoom_Battle03_Cogs.py b/toontown/coghq/BossbotCountryClubMazeRoom_Battle03_Cogs.py index 41872e0..b9414a8 100644 --- a/toontown/coghq/BossbotCountryClubMazeRoom_Battle03_Cogs.py +++ b/toontown/coghq/BossbotCountryClubMazeRoom_Battle03_Cogs.py @@ -1,5 +1,7 @@ -from .SpecImports import * from toontown.toonbase import ToontownGlobals + +from .SpecImports import * + CogParent = 110000 BattleCellId = 0 BattleCells = {BattleCellId: {'parentEntId': CogParent, diff --git a/toontown/coghq/BossbotCountryClubPresidentRoom_Battle00.py b/toontown/coghq/BossbotCountryClubPresidentRoom_Battle00.py index 6b0fd4a..8f0787e 100644 --- a/toontown/coghq/BossbotCountryClubPresidentRoom_Battle00.py +++ b/toontown/coghq/BossbotCountryClubPresidentRoom_Battle00.py @@ -1,4 +1,5 @@ from toontown.coghq.SpecImports import * + GlobalEntities = {1000: {'type': 'levelMgr', 'name': 'LevelMgr', 'comment': '', diff --git a/toontown/coghq/BossbotCountryClubPresidentRoom_Battle00_Cogs.py b/toontown/coghq/BossbotCountryClubPresidentRoom_Battle00_Cogs.py index 7660d47..9495afa 100644 --- a/toontown/coghq/BossbotCountryClubPresidentRoom_Battle00_Cogs.py +++ b/toontown/coghq/BossbotCountryClubPresidentRoom_Battle00_Cogs.py @@ -1,5 +1,7 @@ -from .SpecImports import * from toontown.toonbase import ToontownGlobals + +from .SpecImports import * + CogParent = 110400 BattleCellId = 0 BattleCells = {BattleCellId: {'parentEntId': CogParent, diff --git a/toontown/coghq/BossbotCountryClubTeeOffRoom_Action00.py b/toontown/coghq/BossbotCountryClubTeeOffRoom_Action00.py index da3e405..5491179 100644 --- a/toontown/coghq/BossbotCountryClubTeeOffRoom_Action00.py +++ b/toontown/coghq/BossbotCountryClubTeeOffRoom_Action00.py @@ -1,4 +1,5 @@ from toontown.coghq.SpecImports import * + GlobalEntities = {1000: {'type': 'levelMgr', 'name': 'LevelMgr', 'comment': '', diff --git a/toontown/coghq/BossbotCountryClubTeeOffRoom_Action01.py b/toontown/coghq/BossbotCountryClubTeeOffRoom_Action01.py index 485cbf9..018f748 100644 --- a/toontown/coghq/BossbotCountryClubTeeOffRoom_Action01.py +++ b/toontown/coghq/BossbotCountryClubTeeOffRoom_Action01.py @@ -1,4 +1,5 @@ from toontown.coghq.SpecImports import * + GlobalEntities = {1000: {'type': 'levelMgr', 'name': 'LevelMgr', 'comment': '', diff --git a/toontown/coghq/BossbotCountryClubTeeOffRoom_Action02.py b/toontown/coghq/BossbotCountryClubTeeOffRoom_Action02.py index 76c7b1c..309ba90 100644 --- a/toontown/coghq/BossbotCountryClubTeeOffRoom_Action02.py +++ b/toontown/coghq/BossbotCountryClubTeeOffRoom_Action02.py @@ -1,4 +1,5 @@ from toontown.coghq.SpecImports import * + GlobalEntities = {1000: {'type': 'levelMgr', 'name': 'LevelMgr', 'comment': '', diff --git a/toontown/coghq/BossbotHQBossBattle.py b/toontown/coghq/BossbotHQBossBattle.py index 781eb6c..e790739 100644 --- a/toontown/coghq/BossbotHQBossBattle.py +++ b/toontown/coghq/BossbotHQBossBattle.py @@ -1,8 +1,11 @@ from panda3d.core import * -from direct.interval.IntervalGlobal import * -from toontown.suit import DistributedBossbotBoss + from direct.directnotify import DirectNotifyGlobal +from direct.interval.IntervalGlobal import * + from toontown.coghq import CogHQBossBattle +from toontown.suit import DistributedBossbotBoss + class BossbotHQBossBattle(CogHQBossBattle.CogHQBossBattle): notify = DirectNotifyGlobal.directNotify.newCategory('BossbotHQBossBattle') diff --git a/toontown/coghq/BossbotHQExterior.py b/toontown/coghq/BossbotHQExterior.py index 637a2bb..09d564f 100644 --- a/toontown/coghq/BossbotHQExterior.py +++ b/toontown/coghq/BossbotHQExterior.py @@ -1,11 +1,13 @@ -from direct.directnotify import DirectNotifyGlobal -from toontown.battle import BattlePlace -from direct.fsm import ClassicFSM, State -from direct.fsm import State -from toontown.toonbase import ToontownGlobals -from toontown.building import Elevator from panda3d.core import * + +from direct.directnotify import DirectNotifyGlobal +from direct.fsm import ClassicFSM, State + +from toontown.battle import BattlePlace +from toontown.building import Elevator from toontown.coghq import CogHQExterior +from toontown.toonbase import ToontownGlobals + class BossbotHQExterior(CogHQExterior.CogHQExterior): notify = DirectNotifyGlobal.directNotify.newCategory('BossbotHQExterior') diff --git a/toontown/coghq/BossbotOfficeExterior.py b/toontown/coghq/BossbotOfficeExterior.py index 30f6845..b6006f0 100644 --- a/toontown/coghq/BossbotOfficeExterior.py +++ b/toontown/coghq/BossbotOfficeExterior.py @@ -1,11 +1,14 @@ -from direct.directnotify import DirectNotifyGlobal -from direct.fsm import ClassicFSM -from direct.fsm import State -from toontown.toonbase import ToontownGlobals -from toontown.building import Elevator from panda3d.core import * + +from direct.directnotify import DirectNotifyGlobal +from direct.fsm import ClassicFSM, State + +from toontown.building import Elevator +from toontown.toonbase import ToontownGlobals + from . import FactoryExterior + class BossbotOfficeExterior(FactoryExterior.FactoryExterior): notify = DirectNotifyGlobal.directNotify.newCategory('LawbotOfficeExterior') diff --git a/toontown/coghq/CashbotCogHQLoader.py b/toontown/coghq/CashbotCogHQLoader.py index f050af9..1211999 100644 --- a/toontown/coghq/CashbotCogHQLoader.py +++ b/toontown/coghq/CashbotCogHQLoader.py @@ -1,15 +1,15 @@ -from direct.directnotify import DirectNotifyGlobal -from direct.fsm import StateData -from . import CogHQLoader, MintInterior -from toontown.toonbase import ToontownGlobals -from direct.gui import DirectGui -from toontown.toonbase import TTLocalizer -from toontown.toon import Toon -from direct.fsm import State -from . import CashbotHQExterior -from . import CashbotHQBossBattle from panda3d.core import DecalEffect +from direct.directnotify import DirectNotifyGlobal +from direct.fsm import State, StateData +from direct.gui import DirectGui + +from toontown.toon import Toon +from toontown.toonbase import ToontownGlobals, TTLocalizer + +from . import CashbotHQBossBattle, CashbotHQExterior, CogHQLoader, MintInterior + + class CashbotCogHQLoader(CogHQLoader.CogHQLoader): notify = DirectNotifyGlobal.directNotify.newCategory('CashbotCogHQLoader') diff --git a/toontown/coghq/CashbotHQBossBattle.py b/toontown/coghq/CashbotHQBossBattle.py index fde43f7..e89b422 100644 --- a/toontown/coghq/CashbotHQBossBattle.py +++ b/toontown/coghq/CashbotHQBossBattle.py @@ -1,8 +1,11 @@ from panda3d.core import * -from direct.interval.IntervalGlobal import * -from toontown.suit import DistributedCashbotBoss + from direct.directnotify import DirectNotifyGlobal +from direct.interval.IntervalGlobal import * + from toontown.coghq import CogHQBossBattle +from toontown.suit import DistributedCashbotBoss + class CashbotHQBossBattle(CogHQBossBattle.CogHQBossBattle): notify = DirectNotifyGlobal.directNotify.newCategory('CashbotHQBossBattle') diff --git a/toontown/coghq/CashbotHQExterior.py b/toontown/coghq/CashbotHQExterior.py index 1dbc883..8617660 100644 --- a/toontown/coghq/CashbotHQExterior.py +++ b/toontown/coghq/CashbotHQExterior.py @@ -1,11 +1,14 @@ -from direct.directnotify import DirectNotifyGlobal -from direct.interval.IntervalGlobal import * -from direct.fsm import State from panda3d.core import * + +from direct.directnotify import DirectNotifyGlobal +from direct.fsm import State +from direct.interval.IntervalGlobal import * + from toontown.building import Elevator from toontown.coghq import CogHQExterior from toontown.safezone import Train + class CashbotHQExterior(CogHQExterior.CogHQExterior): notify = DirectNotifyGlobal.directNotify.newCategory('CashbotHQExterior') TrackZ = -67 diff --git a/toontown/coghq/CashbotMintBoilerRoom_Action00.py b/toontown/coghq/CashbotMintBoilerRoom_Action00.py index 34605eb..45255ff 100644 --- a/toontown/coghq/CashbotMintBoilerRoom_Action00.py +++ b/toontown/coghq/CashbotMintBoilerRoom_Action00.py @@ -1,4 +1,5 @@ from toontown.coghq.SpecImports import * + GlobalEntities = {1000: {'type': 'levelMgr', 'name': 'LevelMgr', 'comment': '', diff --git a/toontown/coghq/CashbotMintBoilerRoom_Battle00.py b/toontown/coghq/CashbotMintBoilerRoom_Battle00.py index 06a5dab..8cf95f1 100644 --- a/toontown/coghq/CashbotMintBoilerRoom_Battle00.py +++ b/toontown/coghq/CashbotMintBoilerRoom_Battle00.py @@ -1,4 +1,5 @@ from toontown.coghq.SpecImports import * + GlobalEntities = {1000: {'type': 'levelMgr', 'name': 'LevelMgr', 'comment': '', diff --git a/toontown/coghq/CashbotMintBoilerRoom_Battle00_Cogs.py b/toontown/coghq/CashbotMintBoilerRoom_Battle00_Cogs.py index 1147ac8..b6d44f0 100644 --- a/toontown/coghq/CashbotMintBoilerRoom_Battle00_Cogs.py +++ b/toontown/coghq/CashbotMintBoilerRoom_Battle00_Cogs.py @@ -1,5 +1,7 @@ -from .SpecImports import * from toontown.toonbase import ToontownGlobals + +from .SpecImports import * + CogParent = 10000 LowerCogParent = 10003 BattleParent = 10002 diff --git a/toontown/coghq/CashbotMintBoilerRoom_Battle01.py b/toontown/coghq/CashbotMintBoilerRoom_Battle01.py index 28e2ddc..f745860 100644 --- a/toontown/coghq/CashbotMintBoilerRoom_Battle01.py +++ b/toontown/coghq/CashbotMintBoilerRoom_Battle01.py @@ -1,4 +1,5 @@ from toontown.coghq.SpecImports import * + GlobalEntities = {1000: {'type': 'levelMgr', 'name': 'LevelMgr', 'comment': '', diff --git a/toontown/coghq/CashbotMintBoilerRoom_Battle01_Cogs.py b/toontown/coghq/CashbotMintBoilerRoom_Battle01_Cogs.py index b63aece..e58e8fe 100644 --- a/toontown/coghq/CashbotMintBoilerRoom_Battle01_Cogs.py +++ b/toontown/coghq/CashbotMintBoilerRoom_Battle01_Cogs.py @@ -1,5 +1,7 @@ -from .SpecImports import * from toontown.toonbase import ToontownGlobals + +from .SpecImports import * + CogParent = 10000 BattleCellId = 0 BattleCells = {BattleCellId: {'parentEntId': CogParent, diff --git a/toontown/coghq/CashbotMintControlRoom_Battle00.py b/toontown/coghq/CashbotMintControlRoom_Battle00.py index 7624c34..bf9e27a 100644 --- a/toontown/coghq/CashbotMintControlRoom_Battle00.py +++ b/toontown/coghq/CashbotMintControlRoom_Battle00.py @@ -1,4 +1,5 @@ from toontown.coghq.SpecImports import * + GlobalEntities = {1000: {'type': 'levelMgr', 'name': 'LevelMgr', 'comment': '', diff --git a/toontown/coghq/CashbotMintControlRoom_Battle00_Cogs.py b/toontown/coghq/CashbotMintControlRoom_Battle00_Cogs.py index b63aece..e58e8fe 100644 --- a/toontown/coghq/CashbotMintControlRoom_Battle00_Cogs.py +++ b/toontown/coghq/CashbotMintControlRoom_Battle00_Cogs.py @@ -1,5 +1,7 @@ -from .SpecImports import * from toontown.toonbase import ToontownGlobals + +from .SpecImports import * + CogParent = 10000 BattleCellId = 0 BattleCells = {BattleCellId: {'parentEntId': CogParent, diff --git a/toontown/coghq/CashbotMintDuctRoom_Action00.py b/toontown/coghq/CashbotMintDuctRoom_Action00.py index ffddc61..f42415e 100644 --- a/toontown/coghq/CashbotMintDuctRoom_Action00.py +++ b/toontown/coghq/CashbotMintDuctRoom_Action00.py @@ -1,4 +1,5 @@ from toontown.coghq.SpecImports import * + GlobalEntities = {1000: {'type': 'levelMgr', 'name': 'LevelMgr', 'comment': '', diff --git a/toontown/coghq/CashbotMintDuctRoom_Battle00.py b/toontown/coghq/CashbotMintDuctRoom_Battle00.py index 646fcc5..453420a 100644 --- a/toontown/coghq/CashbotMintDuctRoom_Battle00.py +++ b/toontown/coghq/CashbotMintDuctRoom_Battle00.py @@ -1,4 +1,5 @@ from toontown.coghq.SpecImports import * + GlobalEntities = {1000: {'type': 'levelMgr', 'name': 'LevelMgr', 'comment': '', diff --git a/toontown/coghq/CashbotMintDuctRoom_Battle00_Cogs.py b/toontown/coghq/CashbotMintDuctRoom_Battle00_Cogs.py index 98e510a..c52af9d 100644 --- a/toontown/coghq/CashbotMintDuctRoom_Battle00_Cogs.py +++ b/toontown/coghq/CashbotMintDuctRoom_Battle00_Cogs.py @@ -1,5 +1,7 @@ -from .SpecImports import * from toontown.toonbase import ToontownGlobals + +from .SpecImports import * + CogParent = 10000 BattleCellId = 0 BattleCells = {BattleCellId: {'parentEntId': CogParent, diff --git a/toontown/coghq/CashbotMintDuctRoom_Battle01.py b/toontown/coghq/CashbotMintDuctRoom_Battle01.py index 127dbb6..f27ace1 100644 --- a/toontown/coghq/CashbotMintDuctRoom_Battle01.py +++ b/toontown/coghq/CashbotMintDuctRoom_Battle01.py @@ -1,4 +1,5 @@ from toontown.coghq.SpecImports import * + GlobalEntities = {1000: {'type': 'levelMgr', 'name': 'LevelMgr', 'comment': '', diff --git a/toontown/coghq/CashbotMintDuctRoom_Battle01_Cogs.py b/toontown/coghq/CashbotMintDuctRoom_Battle01_Cogs.py index b63aece..e58e8fe 100644 --- a/toontown/coghq/CashbotMintDuctRoom_Battle01_Cogs.py +++ b/toontown/coghq/CashbotMintDuctRoom_Battle01_Cogs.py @@ -1,5 +1,7 @@ -from .SpecImports import * from toontown.toonbase import ToontownGlobals + +from .SpecImports import * + CogParent = 10000 BattleCellId = 0 BattleCells = {BattleCellId: {'parentEntId': CogParent, diff --git a/toontown/coghq/CashbotMintEntrance_Action00.py b/toontown/coghq/CashbotMintEntrance_Action00.py index 32c8f8d..388421b 100644 --- a/toontown/coghq/CashbotMintEntrance_Action00.py +++ b/toontown/coghq/CashbotMintEntrance_Action00.py @@ -1,4 +1,5 @@ from toontown.coghq.SpecImports import * + GlobalEntities = {1000: {'type': 'levelMgr', 'name': 'LevelMgr', 'comment': '', diff --git a/toontown/coghq/CashbotMintGearRoom_Action00.py b/toontown/coghq/CashbotMintGearRoom_Action00.py index 3d7ee8c..f622aa8 100644 --- a/toontown/coghq/CashbotMintGearRoom_Action00.py +++ b/toontown/coghq/CashbotMintGearRoom_Action00.py @@ -1,4 +1,5 @@ from toontown.coghq.SpecImports import * + GlobalEntities = {1000: {'type': 'levelMgr', 'name': 'LevelMgr', 'comment': '', diff --git a/toontown/coghq/CashbotMintGearRoom_Battle00.py b/toontown/coghq/CashbotMintGearRoom_Battle00.py index ae8b14f..9a7fa3d 100644 --- a/toontown/coghq/CashbotMintGearRoom_Battle00.py +++ b/toontown/coghq/CashbotMintGearRoom_Battle00.py @@ -1,4 +1,5 @@ from toontown.coghq.SpecImports import * + GlobalEntities = {1000: {'type': 'levelMgr', 'name': 'LevelMgr', 'comment': '', diff --git a/toontown/coghq/CashbotMintGearRoom_Battle00_Cogs.py b/toontown/coghq/CashbotMintGearRoom_Battle00_Cogs.py index f2de943..fa200f4 100644 --- a/toontown/coghq/CashbotMintGearRoom_Battle00_Cogs.py +++ b/toontown/coghq/CashbotMintGearRoom_Battle00_Cogs.py @@ -1,5 +1,7 @@ -from .SpecImports import * from toontown.toonbase import ToontownGlobals + +from .SpecImports import * + CogParent = 10000 BattleCellId = 0 BattleCells = {BattleCellId: {'parentEntId': CogParent, diff --git a/toontown/coghq/CashbotMintGearRoom_Battle01.py b/toontown/coghq/CashbotMintGearRoom_Battle01.py index 005f1cb..e20fa66 100644 --- a/toontown/coghq/CashbotMintGearRoom_Battle01.py +++ b/toontown/coghq/CashbotMintGearRoom_Battle01.py @@ -1,4 +1,5 @@ from toontown.coghq.SpecImports import * + GlobalEntities = {1000: {'type': 'levelMgr', 'name': 'LevelMgr', 'comment': '', diff --git a/toontown/coghq/CashbotMintGearRoom_Battle01_Cogs.py b/toontown/coghq/CashbotMintGearRoom_Battle01_Cogs.py index b63aece..e58e8fe 100644 --- a/toontown/coghq/CashbotMintGearRoom_Battle01_Cogs.py +++ b/toontown/coghq/CashbotMintGearRoom_Battle01_Cogs.py @@ -1,5 +1,7 @@ -from .SpecImports import * from toontown.toonbase import ToontownGlobals + +from .SpecImports import * + CogParent = 10000 BattleCellId = 0 BattleCells = {BattleCellId: {'parentEntId': CogParent, diff --git a/toontown/coghq/CashbotMintLavaRoomFoyer_Action00.py b/toontown/coghq/CashbotMintLavaRoomFoyer_Action00.py index 3a740f5..f8fd8ec 100644 --- a/toontown/coghq/CashbotMintLavaRoomFoyer_Action00.py +++ b/toontown/coghq/CashbotMintLavaRoomFoyer_Action00.py @@ -1,4 +1,5 @@ from toontown.coghq.SpecImports import * + GlobalEntities = {1000: {'type': 'levelMgr', 'name': 'LevelMgr', 'comment': '', diff --git a/toontown/coghq/CashbotMintLavaRoomFoyer_Action01.py b/toontown/coghq/CashbotMintLavaRoomFoyer_Action01.py index bb66a24..3c22c37 100644 --- a/toontown/coghq/CashbotMintLavaRoomFoyer_Action01.py +++ b/toontown/coghq/CashbotMintLavaRoomFoyer_Action01.py @@ -1,4 +1,5 @@ from toontown.coghq.SpecImports import * + GlobalEntities = {1000: {'type': 'levelMgr', 'name': 'LevelMgr', 'comment': '', diff --git a/toontown/coghq/CashbotMintLavaRoomFoyer_Battle00.py b/toontown/coghq/CashbotMintLavaRoomFoyer_Battle00.py index 0e1be57..f1075d5 100644 --- a/toontown/coghq/CashbotMintLavaRoomFoyer_Battle00.py +++ b/toontown/coghq/CashbotMintLavaRoomFoyer_Battle00.py @@ -1,4 +1,5 @@ from toontown.coghq.SpecImports import * + GlobalEntities = {1000: {'type': 'levelMgr', 'name': 'LevelMgr', 'comment': '', diff --git a/toontown/coghq/CashbotMintLavaRoomFoyer_Battle00_Cogs.py b/toontown/coghq/CashbotMintLavaRoomFoyer_Battle00_Cogs.py index 041a00d..f016265 100644 --- a/toontown/coghq/CashbotMintLavaRoomFoyer_Battle00_Cogs.py +++ b/toontown/coghq/CashbotMintLavaRoomFoyer_Battle00_Cogs.py @@ -1,5 +1,7 @@ -from .SpecImports import * from toontown.toonbase import ToontownGlobals + +from .SpecImports import * + CogParent = 10000 BattleParent = 10005 BattleCellId = 0 diff --git a/toontown/coghq/CashbotMintLavaRoomFoyer_Battle01.py b/toontown/coghq/CashbotMintLavaRoomFoyer_Battle01.py index 4586be5..a92cc53 100644 --- a/toontown/coghq/CashbotMintLavaRoomFoyer_Battle01.py +++ b/toontown/coghq/CashbotMintLavaRoomFoyer_Battle01.py @@ -1,4 +1,5 @@ from toontown.coghq.SpecImports import * + GlobalEntities = {1000: {'type': 'levelMgr', 'name': 'LevelMgr', 'comment': '', diff --git a/toontown/coghq/CashbotMintLavaRoomFoyer_Battle01_Cogs.py b/toontown/coghq/CashbotMintLavaRoomFoyer_Battle01_Cogs.py index 6a8a0bb..1dd3b87 100644 --- a/toontown/coghq/CashbotMintLavaRoomFoyer_Battle01_Cogs.py +++ b/toontown/coghq/CashbotMintLavaRoomFoyer_Battle01_Cogs.py @@ -1,5 +1,7 @@ -from .SpecImports import * from toontown.toonbase import ToontownGlobals + +from .SpecImports import * + CogParent = 10000 BattleParent = 10005 BattleCellId = 0 diff --git a/toontown/coghq/CashbotMintLavaRoom_Action00.py b/toontown/coghq/CashbotMintLavaRoom_Action00.py index 4e4060f..5f841f0 100644 --- a/toontown/coghq/CashbotMintLavaRoom_Action00.py +++ b/toontown/coghq/CashbotMintLavaRoom_Action00.py @@ -1,4 +1,5 @@ from toontown.coghq.SpecImports import * + GlobalEntities = {1000: {'type': 'levelMgr', 'name': 'LevelMgr', 'comment': '', diff --git a/toontown/coghq/CashbotMintLobby_Action00.py b/toontown/coghq/CashbotMintLobby_Action00.py index 09a9f4c..d7aeca9 100644 --- a/toontown/coghq/CashbotMintLobby_Action00.py +++ b/toontown/coghq/CashbotMintLobby_Action00.py @@ -1,4 +1,5 @@ from toontown.coghq.SpecImports import * + GlobalEntities = {1000: {'type': 'levelMgr', 'name': 'LevelMgr', 'comment': '', diff --git a/toontown/coghq/CashbotMintLobby_Battle00.py b/toontown/coghq/CashbotMintLobby_Battle00.py index bda6056..345869f 100644 --- a/toontown/coghq/CashbotMintLobby_Battle00.py +++ b/toontown/coghq/CashbotMintLobby_Battle00.py @@ -1,4 +1,5 @@ from toontown.coghq.SpecImports import * + GlobalEntities = {1000: {'type': 'levelMgr', 'name': 'LevelMgr', 'comment': '', diff --git a/toontown/coghq/CashbotMintLobby_Battle00_Cogs.py b/toontown/coghq/CashbotMintLobby_Battle00_Cogs.py index ae7b6ec..b477051 100644 --- a/toontown/coghq/CashbotMintLobby_Battle00_Cogs.py +++ b/toontown/coghq/CashbotMintLobby_Battle00_Cogs.py @@ -1,5 +1,7 @@ -from .SpecImports import * from toontown.toonbase import ToontownGlobals + +from .SpecImports import * + CogParent = 10000 MidCogParent = 10022 FrontCogParent = 10060 diff --git a/toontown/coghq/CashbotMintLobby_Battle01.py b/toontown/coghq/CashbotMintLobby_Battle01.py index ae383de..0449b6c 100644 --- a/toontown/coghq/CashbotMintLobby_Battle01.py +++ b/toontown/coghq/CashbotMintLobby_Battle01.py @@ -1,4 +1,5 @@ from toontown.coghq.SpecImports import * + GlobalEntities = {1000: {'type': 'levelMgr', 'name': 'LevelMgr', 'comment': '', diff --git a/toontown/coghq/CashbotMintLobby_Battle01_Cogs.py b/toontown/coghq/CashbotMintLobby_Battle01_Cogs.py index b63aece..e58e8fe 100644 --- a/toontown/coghq/CashbotMintLobby_Battle01_Cogs.py +++ b/toontown/coghq/CashbotMintLobby_Battle01_Cogs.py @@ -1,5 +1,7 @@ -from .SpecImports import * from toontown.toonbase import ToontownGlobals + +from .SpecImports import * + CogParent = 10000 BattleCellId = 0 BattleCells = {BattleCellId: {'parentEntId': CogParent, diff --git a/toontown/coghq/CashbotMintOilRoom_Battle00.py b/toontown/coghq/CashbotMintOilRoom_Battle00.py index 8166237..ac5ed4d 100644 --- a/toontown/coghq/CashbotMintOilRoom_Battle00.py +++ b/toontown/coghq/CashbotMintOilRoom_Battle00.py @@ -1,4 +1,5 @@ from toontown.coghq.SpecImports import * + GlobalEntities = {1000: {'type': 'levelMgr', 'name': 'LevelMgr', 'comment': '', diff --git a/toontown/coghq/CashbotMintOilRoom_Battle00_Cogs.py b/toontown/coghq/CashbotMintOilRoom_Battle00_Cogs.py index b63aece..e58e8fe 100644 --- a/toontown/coghq/CashbotMintOilRoom_Battle00_Cogs.py +++ b/toontown/coghq/CashbotMintOilRoom_Battle00_Cogs.py @@ -1,5 +1,7 @@ -from .SpecImports import * from toontown.toonbase import ToontownGlobals + +from .SpecImports import * + CogParent = 10000 BattleCellId = 0 BattleCells = {BattleCellId: {'parentEntId': CogParent, diff --git a/toontown/coghq/CashbotMintPaintMixerReward_Battle00.py b/toontown/coghq/CashbotMintPaintMixerReward_Battle00.py index 1d01190..e1a4804 100644 --- a/toontown/coghq/CashbotMintPaintMixerReward_Battle00.py +++ b/toontown/coghq/CashbotMintPaintMixerReward_Battle00.py @@ -1,4 +1,5 @@ from toontown.coghq.SpecImports import * + GlobalEntities = {1000: {'type': 'levelMgr', 'name': 'LevelMgr', 'comment': '', diff --git a/toontown/coghq/CashbotMintPaintMixerReward_Battle00_Cogs.py b/toontown/coghq/CashbotMintPaintMixerReward_Battle00_Cogs.py index b63aece..e58e8fe 100644 --- a/toontown/coghq/CashbotMintPaintMixerReward_Battle00_Cogs.py +++ b/toontown/coghq/CashbotMintPaintMixerReward_Battle00_Cogs.py @@ -1,5 +1,7 @@ -from .SpecImports import * from toontown.toonbase import ToontownGlobals + +from .SpecImports import * + CogParent = 10000 BattleCellId = 0 BattleCells = {BattleCellId: {'parentEntId': CogParent, diff --git a/toontown/coghq/CashbotMintPaintMixer_Action00.py b/toontown/coghq/CashbotMintPaintMixer_Action00.py index 8f13bbc..d226db3 100644 --- a/toontown/coghq/CashbotMintPaintMixer_Action00.py +++ b/toontown/coghq/CashbotMintPaintMixer_Action00.py @@ -1,4 +1,5 @@ from toontown.coghq.SpecImports import * + GlobalEntities = {1000: {'type': 'levelMgr', 'name': 'LevelMgr', 'comment': '', diff --git a/toontown/coghq/CashbotMintPipeRoom_Action00.py b/toontown/coghq/CashbotMintPipeRoom_Action00.py index 4bef84e..e741b47 100644 --- a/toontown/coghq/CashbotMintPipeRoom_Action00.py +++ b/toontown/coghq/CashbotMintPipeRoom_Action00.py @@ -1,4 +1,5 @@ from toontown.coghq.SpecImports import * + GlobalEntities = {1000: {'type': 'levelMgr', 'name': 'LevelMgr', 'comment': '', diff --git a/toontown/coghq/CashbotMintPipeRoom_Battle00.py b/toontown/coghq/CashbotMintPipeRoom_Battle00.py index da9120c..65d71d9 100644 --- a/toontown/coghq/CashbotMintPipeRoom_Battle00.py +++ b/toontown/coghq/CashbotMintPipeRoom_Battle00.py @@ -1,4 +1,5 @@ from toontown.coghq.SpecImports import * + GlobalEntities = {1000: {'type': 'levelMgr', 'name': 'LevelMgr', 'comment': '', diff --git a/toontown/coghq/CashbotMintPipeRoom_Battle00_Cogs.py b/toontown/coghq/CashbotMintPipeRoom_Battle00_Cogs.py index 65617ce..e2a1469 100644 --- a/toontown/coghq/CashbotMintPipeRoom_Battle00_Cogs.py +++ b/toontown/coghq/CashbotMintPipeRoom_Battle00_Cogs.py @@ -1,5 +1,7 @@ -from .SpecImports import * from toontown.toonbase import ToontownGlobals + +from .SpecImports import * + CogParent = 10000 FrontCogParent = 10002 LeftCogParent = 10007 diff --git a/toontown/coghq/CashbotMintPipeRoom_Battle01.py b/toontown/coghq/CashbotMintPipeRoom_Battle01.py index cb50187..2e74075 100644 --- a/toontown/coghq/CashbotMintPipeRoom_Battle01.py +++ b/toontown/coghq/CashbotMintPipeRoom_Battle01.py @@ -1,4 +1,5 @@ from toontown.coghq.SpecImports import * + GlobalEntities = {1000: {'type': 'levelMgr', 'name': 'LevelMgr', 'comment': '', diff --git a/toontown/coghq/CashbotMintPipeRoom_Battle01_Cogs.py b/toontown/coghq/CashbotMintPipeRoom_Battle01_Cogs.py index b63aece..e58e8fe 100644 --- a/toontown/coghq/CashbotMintPipeRoom_Battle01_Cogs.py +++ b/toontown/coghq/CashbotMintPipeRoom_Battle01_Cogs.py @@ -1,5 +1,7 @@ -from .SpecImports import * from toontown.toonbase import ToontownGlobals + +from .SpecImports import * + CogParent = 10000 BattleCellId = 0 BattleCells = {BattleCellId: {'parentEntId': CogParent, diff --git a/toontown/coghq/CashbotMintStomperAlley_Action00.py b/toontown/coghq/CashbotMintStomperAlley_Action00.py index babeee7..9fb4138 100644 --- a/toontown/coghq/CashbotMintStomperAlley_Action00.py +++ b/toontown/coghq/CashbotMintStomperAlley_Action00.py @@ -1,4 +1,5 @@ from toontown.coghq.SpecImports import * + GlobalEntities = {1000: {'type': 'levelMgr', 'name': 'LevelMgr', 'comment': '', diff --git a/toontown/coghq/CogDisguiseGlobals.py b/toontown/coghq/CogDisguiseGlobals.py index 23321ed..9028038 100644 --- a/toontown/coghq/CogDisguiseGlobals.py +++ b/toontown/coghq/CogDisguiseGlobals.py @@ -1,7 +1,10 @@ +from enum import IntEnum + +from otp.otpbase import OTPGlobals + from toontown.suit import SuitDNA from toontown.toonbase import TTLocalizer -from otp.otpbase import OTPGlobals -from enum import IntEnum + PartsPerSuit = (17, 14, 12, diff --git a/toontown/coghq/CogHQBossBattle.py b/toontown/coghq/CogHQBossBattle.py index bf0eaa1..62e4b12 100644 --- a/toontown/coghq/CogHQBossBattle.py +++ b/toontown/coghq/CogHQBossBattle.py @@ -1,16 +1,19 @@ +import math + from panda3d.core import * from panda3d.otp import * -from direct.interval.IntervalGlobal import * + from direct.directnotify import DirectNotifyGlobal -from toontown.hood import Place from direct.fsm import ClassicFSM, State -from direct.fsm import State +from direct.interval.IntervalGlobal import * + from otp.distributed.TelemetryLimiter import RotationLimitToH, TLGatherAllAvs -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import ToontownBattleGlobals + from toontown.battle import BattlePlace +from toontown.hood import Place from toontown.suit import Suit -import math +from toontown.toonbase import ToontownBattleGlobals, ToontownGlobals + class CogHQBossBattle(BattlePlace.BattlePlace): notify = DirectNotifyGlobal.directNotify.newCategory('CogHQBossBattle') @@ -118,7 +121,7 @@ class CogHQBossBattle(BattlePlace.BattlePlace): NametagGlobals.setMasterArrowsOn(1) base.localAvatar.inventory.setRespectInvasions(0) self.fsm.request(requestStatus['how'], [requestStatus]) - + def __bossGenerate(self, boss): if self.bossCog: return diff --git a/toontown/coghq/CogHQExterior.py b/toontown/coghq/CogHQExterior.py index cd1ec7c..00acff1 100644 --- a/toontown/coghq/CogHQExterior.py +++ b/toontown/coghq/CogHQExterior.py @@ -1,14 +1,17 @@ -from direct.directnotify import DirectNotifyGlobal -from toontown.battle import BattlePlace -from direct.fsm import ClassicFSM, State -from direct.fsm import State -from toontown.toonbase import ToontownGlobals -from toontown.hood import ZoneUtil from panda3d.core import * from panda3d.otp import * from panda3d.toontown import * + +from direct.directnotify import DirectNotifyGlobal +from direct.fsm import ClassicFSM, State + from otp.distributed.TelemetryLimiter import RotationLimitToH, TLGatherAllAvs +from toontown.battle import BattlePlace +from toontown.hood import ZoneUtil +from toontown.toonbase import ToontownGlobals + + class CogHQExterior(BattlePlace.BattlePlace): notify = DirectNotifyGlobal.directNotify.newCategory('CogHQExterior') diff --git a/toontown/coghq/CogHQLoader.py b/toontown/coghq/CogHQLoader.py index b64b7b7..513dcbe 100644 --- a/toontown/coghq/CogHQLoader.py +++ b/toontown/coghq/CogHQLoader.py @@ -1,14 +1,15 @@ -from direct.directnotify import DirectNotifyGlobal -from direct.fsm import StateData -from direct.fsm import ClassicFSM, State -from direct.fsm import State -from . import CogHQLobby -from toontown.hood import QuietZoneState -from toontown.hood import ZoneUtil -from toontown.town import TownBattle -from toontown.suit import Suit from panda3d.core import * +from direct.directnotify import DirectNotifyGlobal +from direct.fsm import ClassicFSM, State, StateData + +from toontown.hood import QuietZoneState, ZoneUtil +from toontown.suit import Suit +from toontown.town import TownBattle + +from . import CogHQLobby + + class CogHQLoader(StateData.StateData): notify = DirectNotifyGlobal.directNotify.newCategory('CogHQLoader') @@ -149,7 +150,7 @@ class CogHQLoader(StateData.StateData): self.exitPlace() self.placeClass = None return - + if __astron__: @staticmethod def genDNAFileName(zoneId): diff --git a/toontown/coghq/CogHQLobby.py b/toontown/coghq/CogHQLobby.py index f28af14..04fb84c 100644 --- a/toontown/coghq/CogHQLobby.py +++ b/toontown/coghq/CogHQLobby.py @@ -1,13 +1,16 @@ -from direct.directnotify import DirectNotifyGlobal -from direct.fsm import ClassicFSM, State -from direct.fsm import State -from toontown.hood import Place -from toontown.building import Elevator -from toontown.toonbase import ToontownGlobals from panda3d.core import * from panda3d.otp import * + +from direct.directnotify import DirectNotifyGlobal +from direct.fsm import ClassicFSM, State + from otp.distributed.TelemetryLimiter import RotationLimitToH, TLGatherAllAvs +from toontown.building import Elevator +from toontown.hood import Place +from toontown.toonbase import ToontownGlobals + + class CogHQLobby(Place.Place): notify = DirectNotifyGlobal.directNotify.newCategory('CogHQLobby') diff --git a/toontown/coghq/CogSuitManagerAI.py b/toontown/coghq/CogSuitManagerAI.py index 37ca35b..8406cd6 100644 --- a/toontown/coghq/CogSuitManagerAI.py +++ b/toontown/coghq/CogSuitManagerAI.py @@ -1,9 +1,14 @@ -from otp.ai.AIBaseGlobal import * -from direct.directnotify import DirectNotifyGlobal import random + +from direct.directnotify import DirectNotifyGlobal + +from otp.ai.AIBaseGlobal import * + from toontown.suit import SuitDNA + from . import CogDisguiseGlobals + class CogSuitManagerAI: notify = DirectNotifyGlobal.directNotify.newCategory('CogSuitManagerAI') diff --git a/toontown/coghq/ConveyorBelt.py b/toontown/coghq/ConveyorBelt.py index 1f98328..136a2a9 100644 --- a/toontown/coghq/ConveyorBelt.py +++ b/toontown/coghq/ConveyorBelt.py @@ -1,8 +1,12 @@ from panda3d.core import * + from direct.interval.IntervalGlobal import * -from . import MovingPlatform + from otp.level import BasicEntities +from . import MovingPlatform + + class ConveyorBelt(BasicEntities.NodePathEntity): UseClipPlanes = 1 diff --git a/toontown/coghq/CountryClubInterior.py b/toontown/coghq/CountryClubInterior.py index 622caad..c76d5f3 100644 --- a/toontown/coghq/CountryClubInterior.py +++ b/toontown/coghq/CountryClubInterior.py @@ -1,20 +1,22 @@ -from direct.directnotify import DirectNotifyGlobal -from toontown.battle import BattlePlace -from direct.fsm import ClassicFSM, State -from direct.fsm import State -from direct.showbase import BulletinBoardWatcher +import random + from panda3d.core import * from panda3d.otp import * + +from direct.directnotify import DirectNotifyGlobal +from direct.fsm import ClassicFSM, State +from direct.showbase import BulletinBoardWatcher + from otp.distributed.TelemetryLimiter import RotationLimitToH, TLGatherAllAvs -from toontown.toon import Toon -from toontown.toonbase import ToontownGlobals -from toontown.hood import ZoneUtil -from toontown.toonbase import TTLocalizer -from toontown.toontowngui import TTDialog -from toontown.toonbase import ToontownBattleGlobals -from toontown.coghq import DistributedCountryClub + +from toontown.battle import BattlePlace from toontown.building import Elevator -import random +from toontown.coghq import DistributedCountryClub +from toontown.hood import ZoneUtil +from toontown.toon import Toon +from toontown.toonbase import ToontownBattleGlobals, ToontownGlobals, TTLocalizer +from toontown.toontowngui import TTDialog + class CountryClubInterior(BattlePlace.BattlePlace): notify = DirectNotifyGlobal.directNotify.newCategory('CountryClubInterior') diff --git a/toontown/coghq/CountryClubLayout.py b/toontown/coghq/CountryClubLayout.py index 034edfa..0b924b1 100644 --- a/toontown/coghq/CountryClubLayout.py +++ b/toontown/coghq/CountryClubLayout.py @@ -1,9 +1,11 @@ +import random + from direct.directnotify import DirectNotifyGlobal -from direct.showbase.PythonUtil import invertDictLossless +from direct.showbase.PythonUtil import invertDictLossless, lerp, normalDistrib + from toontown.coghq import CountryClubRoomSpecs from toontown.toonbase import ToontownGlobals -from direct.showbase.PythonUtil import normalDistrib, lerp -import random + def printAllBossbotInfo(): print('roomId: roomName') diff --git a/toontown/coghq/CountryClubManagerAI.py b/toontown/coghq/CountryClubManagerAI.py index ea9736f..09b46b5 100644 --- a/toontown/coghq/CountryClubManagerAI.py +++ b/toontown/coghq/CountryClubManagerAI.py @@ -1,9 +1,13 @@ -from direct.directnotify import DirectNotifyGlobal -from . import DistributedCountryClubAI -from toontown.toonbase import ToontownGlobals -from toontown.coghq import CountryClubLayout -from direct.showbase import DirectObject import random + +from direct.directnotify import DirectNotifyGlobal +from direct.showbase import DirectObject + +from toontown.coghq import CountryClubLayout +from toontown.toonbase import ToontownGlobals + +from . import DistributedCountryClubAI + CountryClubId2Layouts = {ToontownGlobals.BossbotCountryClubIntA: (0, 1, 2), ToontownGlobals.BossbotCountryClubIntB: (3, 4, 5), ToontownGlobals.BossbotCountryClubIntC: (6, 7, 8)} class CountryClubManagerAI(DirectObject.DirectObject): diff --git a/toontown/coghq/CountryClubRoom.py b/toontown/coghq/CountryClubRoom.py index 1fb46f8..a9e4920 100644 --- a/toontown/coghq/CountryClubRoom.py +++ b/toontown/coghq/CountryClubRoom.py @@ -1,11 +1,15 @@ -from panda3d.core import * -from direct.showbase import DirectObject -from direct.fsm import ClassicFSM, State -from toontown.toonbase import ToontownGlobals -from toontown.coghq import CountryClubRoomSpecs -from direct.directnotify import DirectNotifyGlobal import random +from panda3d.core import * + +from direct.directnotify import DirectNotifyGlobal +from direct.fsm import ClassicFSM, State +from direct.showbase import DirectObject + +from toontown.coghq import CountryClubRoomSpecs +from toontown.toonbase import ToontownGlobals + + class CountryClubRoom(DirectObject.DirectObject): notify = DirectNotifyGlobal.directNotify.newCategory('CountryClubRoom') FloorCollPrefix = 'mintFloorColl' diff --git a/toontown/coghq/CountryClubRoomBase.py b/toontown/coghq/CountryClubRoomBase.py index ff40c32..384277c 100644 --- a/toontown/coghq/CountryClubRoomBase.py +++ b/toontown/coghq/CountryClubRoomBase.py @@ -1,5 +1,6 @@ from toontown.toonbase import ToontownGlobals + class CountryClubRoomBase: def __init__(self): @@ -18,7 +19,8 @@ class CountryClubRoomBase: if __dev__: def getCountryClubEntityTypeReg(self): - from . import FactoryEntityTypes from otp.level import EntityTypeRegistry + + from . import FactoryEntityTypes typeReg = EntityTypeRegistry.EntityTypeRegistry(FactoryEntityTypes) return typeReg diff --git a/toontown/coghq/CountryClubRoomSpecs.py b/toontown/coghq/CountryClubRoomSpecs.py index e10112b..b679993 100644 --- a/toontown/coghq/CountryClubRoomSpecs.py +++ b/toontown/coghq/CountryClubRoomSpecs.py @@ -1,13 +1,11 @@ from direct.showbase.PythonUtil import invertDict + +from toontown.coghq import (BossbotCountryClubFairwayRoom_Battle00_Cogs, BossbotCountryClubKartRoom_Battle00_Cogs, + BossbotCountryClubMazeRoom_Battle00_Cogs, BossbotCountryClubMazeRoom_Battle01_Cogs, + BossbotCountryClubMazeRoom_Battle02_Cogs, BossbotCountryClubMazeRoom_Battle03_Cogs, + BossbotCountryClubPresidentRoom_Battle00_Cogs, NullCogs) from toontown.toonbase import ToontownGlobals -from toontown.coghq import BossbotCountryClubFairwayRoom_Battle00_Cogs -from toontown.coghq import BossbotCountryClubMazeRoom_Battle00_Cogs -from toontown.coghq import BossbotCountryClubMazeRoom_Battle01_Cogs -from toontown.coghq import BossbotCountryClubMazeRoom_Battle02_Cogs -from toontown.coghq import BossbotCountryClubMazeRoom_Battle03_Cogs -from toontown.coghq import NullCogs -from toontown.coghq import BossbotCountryClubKartRoom_Battle00_Cogs -from toontown.coghq import BossbotCountryClubPresidentRoom_Battle00_Cogs + def getCountryClubRoomSpecModule(roomId): return CashbotMintSpecModules[roomId] diff --git a/toontown/coghq/CrateGlobals.py b/toontown/coghq/CrateGlobals.py index b1625bd..526aa67 100644 --- a/toontown/coghq/CrateGlobals.py +++ b/toontown/coghq/CrateGlobals.py @@ -1,4 +1,5 @@ from panda3d.core import * + CRATE_CLEAR = 0 CRATE_POWERUP = 1 CRATE_PUSH = 2 diff --git a/toontown/coghq/CrusherCell.py b/toontown/coghq/CrusherCell.py index c3c303d..bf3eae5 100644 --- a/toontown/coghq/CrusherCell.py +++ b/toontown/coghq/CrusherCell.py @@ -1,6 +1,8 @@ -from . import ActiveCell from direct.directnotify import DirectNotifyGlobal +from . import ActiveCell + + class CrusherCell(ActiveCell.ActiveCell): notify = DirectNotifyGlobal.directNotify.newCategory('CrusherCell') diff --git a/toontown/coghq/CrusherCellAI.py b/toontown/coghq/CrusherCellAI.py index 999dd7e..b5b3dd2 100644 --- a/toontown/coghq/CrusherCellAI.py +++ b/toontown/coghq/CrusherCellAI.py @@ -1,6 +1,8 @@ -from . import ActiveCellAI from direct.directnotify import DirectNotifyGlobal +from . import ActiveCellAI + + class CrusherCellAI(ActiveCellAI.ActiveCellAI): notify = DirectNotifyGlobal.directNotify.newCategory('CrusherCellAI') diff --git a/toontown/coghq/DinerStatusIndicator.py b/toontown/coghq/DinerStatusIndicator.py index 9da937d..4e9808e 100644 --- a/toontown/coghq/DinerStatusIndicator.py +++ b/toontown/coghq/DinerStatusIndicator.py @@ -1,7 +1,9 @@ -from panda3d.core import NodePath, BillboardEffect, Vec3, Point3, TextureStage, TransparencyAttrib, DecalEffect, VBase4 +from panda3d.core import BillboardEffect, DecalEffect, NodePath, Point3, TextureStage, TransparencyAttrib, VBase4, Vec3 + from direct.fsm import FSM -from direct.gui.DirectGui import DirectFrame, DGG -from direct.interval.IntervalGlobal import LerpScaleInterval, LerpColorScaleInterval, Parallel, Sequence, Wait +from direct.gui.DirectGui import DGG, DirectFrame +from direct.interval.IntervalGlobal import LerpColorScaleInterval, LerpScaleInterval, Parallel, Sequence, Wait + class DinerStatusIndicator(NodePath, FSM.FSM): diff --git a/toontown/coghq/DirectionalCell.py b/toontown/coghq/DirectionalCell.py index 950431f..548e1ea 100644 --- a/toontown/coghq/DirectionalCell.py +++ b/toontown/coghq/DirectionalCell.py @@ -1,6 +1,8 @@ -from . import ActiveCell from direct.directnotify import DirectNotifyGlobal +from . import ActiveCell + + class DirectionalCell(ActiveCell.ActiveCell): notify = DirectNotifyGlobal.directNotify.newCategory('DirectionalCell') diff --git a/toontown/coghq/DirectionalCellAI.py b/toontown/coghq/DirectionalCellAI.py index 56c7607..d10aa5f 100644 --- a/toontown/coghq/DirectionalCellAI.py +++ b/toontown/coghq/DirectionalCellAI.py @@ -1,7 +1,9 @@ from direct.directnotify import DirectNotifyGlobal -from . import ActiveCellAI, CrateGlobals from direct.task import Task +from . import ActiveCellAI, CrateGlobals + + class DirectionalCellAI(ActiveCellAI.ActiveCellAI): notify = DirectNotifyGlobal.directNotify.newCategory('DirectionalCellAI') diff --git a/toontown/coghq/DistributedBanquetTable.py b/toontown/coghq/DistributedBanquetTable.py index 4cf3c73..9d50fb9 100644 --- a/toontown/coghq/DistributedBanquetTable.py +++ b/toontown/coghq/DistributedBanquetTable.py @@ -1,21 +1,24 @@ import math import random -from panda3d.core import NodePath, Point3, VBase4, TextNode, Vec3, deg2Rad, CollisionSegment, CollisionHandlerQueue, CollisionNode, BitMask32 + +from panda3d.core import (BitMask32, CollisionHandlerQueue, CollisionNode, CollisionSegment, NodePath, Point3, TextNode, + VBase4, Vec3, deg2Rad) from panda3d.direct import SmoothMover -from direct.fsm import FSM + +from direct.directnotify import DirectNotifyGlobal from direct.distributed import DistributedObject from direct.distributed.ClockDelta import globalClockDelta -from direct.directnotify import DirectNotifyGlobal -from direct.interval.IntervalGlobal import Sequence, ProjectileInterval, Parallel, LerpHprInterval, ActorInterval, Func, Wait, SoundInterval, LerpPosHprInterval, LerpScaleInterval +from direct.fsm import FSM from direct.gui.DirectGui import DGG, DirectButton, DirectLabel, DirectWaitBar +from direct.interval.IntervalGlobal import (ActorInterval, Func, LerpHprInterval, LerpPosHprInterval, LerpScaleInterval, + Parallel, ProjectileInterval, Sequence, SoundInterval, Wait) from direct.task import Task -from toontown.suit import Suit -from toontown.suit import SuitDNA -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import TTLocalizer -from toontown.coghq import BanquetTableBase -from toontown.coghq import DinerStatusIndicator + from toontown.battle import MovieUtil +from toontown.coghq import BanquetTableBase, DinerStatusIndicator +from toontown.suit import Suit, SuitDNA +from toontown.toonbase import ToontownGlobals, TTLocalizer + class DistributedBanquetTable(DistributedObject.DistributedObject, FSM.FSM, BanquetTableBase.BanquetTableBase): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedBanquetTable') diff --git a/toontown/coghq/DistributedBanquetTableAI.py b/toontown/coghq/DistributedBanquetTableAI.py index 8316154..142a28c 100644 --- a/toontown/coghq/DistributedBanquetTableAI.py +++ b/toontown/coghq/DistributedBanquetTableAI.py @@ -1,10 +1,13 @@ import random + +from direct.directnotify import DirectNotifyGlobal from direct.distributed import DistributedObjectAI from direct.fsm import FSM -from direct.directnotify import DirectNotifyGlobal + from toontown.coghq import BanquetTableBase from toontown.toonbase import ToontownGlobals + class DistributedBanquetTableAI(DistributedObjectAI.DistributedObjectAI, FSM.FSM, BanquetTableBase.BanquetTableBase): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedBanquetTableAI') diff --git a/toontown/coghq/DistributedBarrelBase.py b/toontown/coghq/DistributedBarrelBase.py index 5781aca..a2c3a8a 100644 --- a/toontown/coghq/DistributedBarrelBase.py +++ b/toontown/coghq/DistributedBarrelBase.py @@ -1,9 +1,13 @@ from panda3d.core import * -from direct.interval.IntervalGlobal import * -from toontown.toonbase.ToontownGlobals import * -from toontown.coghq import BarrelBase -from otp.level import BasicEntities + from direct.directnotify import DirectNotifyGlobal +from direct.interval.IntervalGlobal import * + +from otp.level import BasicEntities + +from toontown.coghq import BarrelBase +from toontown.toonbase.ToontownGlobals import * + class DistributedBarrelBase(BasicEntities.DistributedNodePathEntity, BarrelBase.BarrelBase): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedBarrelBase') diff --git a/toontown/coghq/DistributedBarrelBaseAI.py b/toontown/coghq/DistributedBarrelBaseAI.py index 06e3f24..f5a31f4 100644 --- a/toontown/coghq/DistributedBarrelBaseAI.py +++ b/toontown/coghq/DistributedBarrelBaseAI.py @@ -1,8 +1,11 @@ from direct.directnotify import DirectNotifyGlobal -from otp.level import DistributedEntityAI from direct.task import Task + +from otp.level import DistributedEntityAI + from toontown.coghq import BarrelBase + class DistributedBarrelBaseAI(DistributedEntityAI.DistributedEntityAI, BarrelBase.BarrelBase): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedBarrelBaseAI') diff --git a/toontown/coghq/DistributedBattleFactory.py b/toontown/coghq/DistributedBattleFactory.py index d1c1e63..ebee982 100644 --- a/toontown/coghq/DistributedBattleFactory.py +++ b/toontown/coghq/DistributedBattleFactory.py @@ -1,18 +1,22 @@ +import random + from panda3d.core import * from panda3d.otp import * + +from direct.directnotify import DirectNotifyGlobal +from direct.fsm import ClassicFSM, State from direct.interval.IntervalGlobal import * + +from otp.avatar import Emote + +from toontown.battle import SuitBattleGlobals from toontown.battle.BattleBase import * from toontown.coghq import DistributedLevelBattle -from direct.directnotify import DirectNotifyGlobal -from toontown.toon import TTEmote -from otp.avatar import Emote -from toontown.battle import SuitBattleGlobals -import random from toontown.suit import SuitDNA -from direct.fsm import State -from direct.fsm import ClassicFSM, State +from toontown.toon import TTEmote from toontown.toonbase import ToontownGlobals + class DistributedBattleFactory(DistributedLevelBattle.DistributedLevelBattle): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedBattleFactory') diff --git a/toontown/coghq/DistributedBattleFactoryAI.py b/toontown/coghq/DistributedBattleFactoryAI.py index 3558d43..6510c51 100644 --- a/toontown/coghq/DistributedBattleFactoryAI.py +++ b/toontown/coghq/DistributedBattleFactoryAI.py @@ -1,11 +1,13 @@ -from toontown.coghq import DistributedLevelBattleAI from direct.directnotify import DirectNotifyGlobal -from direct.fsm import State from direct.fsm import ClassicFSM, State -from toontown.battle.BattleBase import * -from . import CogDisguiseGlobals from direct.showbase.PythonUtil import addListsByValue +from toontown.battle.BattleBase import * +from toontown.coghq import DistributedLevelBattleAI + +from . import CogDisguiseGlobals + + class DistributedBattleFactoryAI(DistributedLevelBattleAI.DistributedLevelBattleAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedBattleFactoryAI') diff --git a/toontown/coghq/DistributedBeanBarrel.py b/toontown/coghq/DistributedBeanBarrel.py index 668eb7b..52526f5 100644 --- a/toontown/coghq/DistributedBeanBarrel.py +++ b/toontown/coghq/DistributedBeanBarrel.py @@ -1,9 +1,13 @@ from panda3d.core import * -from direct.interval.IntervalGlobal import * -from toontown.toonbase.ToontownGlobals import * + from direct.directnotify import DirectNotifyGlobal +from direct.interval.IntervalGlobal import * + +from toontown.toonbase.ToontownGlobals import * + from . import DistributedBarrelBase + class DistributedBeanBarrel(DistributedBarrelBase.DistributedBarrelBase): def __init__(self, cr): diff --git a/toontown/coghq/DistributedBeanBarrelAI.py b/toontown/coghq/DistributedBeanBarrelAI.py index 14e1217..b490ddf 100644 --- a/toontown/coghq/DistributedBeanBarrelAI.py +++ b/toontown/coghq/DistributedBeanBarrelAI.py @@ -1,7 +1,9 @@ -from . import DistributedBarrelBaseAI from direct.directnotify import DirectNotifyGlobal from direct.task import Task +from . import DistributedBarrelBaseAI + + class DistributedBeanBarrelAI(DistributedBarrelBaseAI.DistributedBarrelBaseAI): def __init__(self, level, entityId): diff --git a/toontown/coghq/DistributedButton.py b/toontown/coghq/DistributedButton.py index 63bd0a4..485a2d8 100644 --- a/toontown/coghq/DistributedButton.py +++ b/toontown/coghq/DistributedButton.py @@ -1,13 +1,14 @@ from panda3d.core import * -from panda3d.core import * -from direct.interval.IntervalGlobal import * -from direct.distributed.ClockDelta import * -from . import MovingPlatform -from toontown.toonbase import ToontownGlobals + from direct.directnotify import DirectNotifyGlobal +from direct.distributed.ClockDelta import * from direct.fsm import ClassicFSM -from . import DistributedSwitch -from toontown.toonbase import TTLocalizer +from direct.interval.IntervalGlobal import * + +from toontown.toonbase import ToontownGlobals, TTLocalizer + +from . import DistributedSwitch, MovingPlatform + class DistributedButton(DistributedSwitch.DistributedSwitch): countdownSeconds = 3.0 diff --git a/toontown/coghq/DistributedButtonAI.py b/toontown/coghq/DistributedButtonAI.py index 31b457b..51a98f3 100644 --- a/toontown/coghq/DistributedButtonAI.py +++ b/toontown/coghq/DistributedButtonAI.py @@ -1,6 +1,8 @@ from direct.directnotify import DirectNotifyGlobal from direct.task import Task -from . import DistributedSwitchBase, DistributedSwitchAI + +from . import DistributedSwitchAI, DistributedSwitchBase + class DistributedButtonAI(DistributedSwitchAI.DistributedSwitchAI): setColor = DistributedSwitchBase.stubFunction diff --git a/toontown/coghq/DistributedCashbotBossCrane.py b/toontown/coghq/DistributedCashbotBossCrane.py index 8f10715..3a9bcd7 100644 --- a/toontown/coghq/DistributedCashbotBossCrane.py +++ b/toontown/coghq/DistributedCashbotBossCrane.py @@ -1,19 +1,23 @@ -from direct.gui.DirectGui import * +import random + from panda3d.core import * from panda3d.direct import * -from panda3d.physics import * from panda3d.otp import * -from direct.interval.IntervalGlobal import * +from panda3d.physics import * + +from direct.distributed import DistributedObject from direct.distributed.ClockDelta import * from direct.fsm import FSM -from direct.distributed import DistributedObject -from direct.showutil import Rope +from direct.gui.DirectGui import * +from direct.interval.IntervalGlobal import * from direct.showbase import PythonUtil +from direct.showutil import Rope from direct.task import Task -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import TTLocalizer + from otp.otpbase import OTPGlobals -import random + +from toontown.toonbase import ToontownGlobals, TTLocalizer + class DistributedCashbotBossCrane(DistributedObject.DistributedObject, FSM.FSM): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedCashbotBossCrane') diff --git a/toontown/coghq/DistributedCashbotBossCraneAI.py b/toontown/coghq/DistributedCashbotBossCraneAI.py index 45ff12d..59136fe 100644 --- a/toontown/coghq/DistributedCashbotBossCraneAI.py +++ b/toontown/coghq/DistributedCashbotBossCraneAI.py @@ -1,9 +1,13 @@ from panda3d.core import * + from direct.distributed import DistributedObjectAI -from toontown.toonbase import ToontownGlobals -from otp.otpbase import OTPGlobals from direct.fsm import FSM +from otp.otpbase import OTPGlobals + +from toontown.toonbase import ToontownGlobals + + class DistributedCashbotBossCraneAI(DistributedObjectAI.DistributedObjectAI, FSM.FSM): def __init__(self, air, boss, index): diff --git a/toontown/coghq/DistributedCashbotBossObject.py b/toontown/coghq/DistributedCashbotBossObject.py index 34cc645..4d2bd7c 100644 --- a/toontown/coghq/DistributedCashbotBossObject.py +++ b/toontown/coghq/DistributedCashbotBossObject.py @@ -1,12 +1,16 @@ from panda3d.core import * from panda3d.physics import * -from direct.interval.IntervalGlobal import * + from direct.directnotify import DirectNotifyGlobal from direct.distributed import DistributedSmoothNode -from toontown.toonbase import ToontownGlobals -from otp.otpbase import OTPGlobals from direct.fsm import FSM +from direct.interval.IntervalGlobal import * from direct.task import Task + +from otp.otpbase import OTPGlobals + +from toontown.toonbase import ToontownGlobals + smileyDoId = 1 class DistributedCashbotBossObject(DistributedSmoothNode.DistributedSmoothNode, FSM.FSM): diff --git a/toontown/coghq/DistributedCashbotBossObjectAI.py b/toontown/coghq/DistributedCashbotBossObjectAI.py index 1100ff6..dd0d430 100644 --- a/toontown/coghq/DistributedCashbotBossObjectAI.py +++ b/toontown/coghq/DistributedCashbotBossObjectAI.py @@ -1,10 +1,14 @@ from panda3d.core import * + from direct.distributed import DistributedSmoothNodeAI -from toontown.toonbase import ToontownGlobals -from otp.otpbase import OTPGlobals from direct.fsm import FSM from direct.task import Task +from otp.otpbase import OTPGlobals + +from toontown.toonbase import ToontownGlobals + + class DistributedCashbotBossObjectAI(DistributedSmoothNodeAI.DistributedSmoothNodeAI, FSM.FSM): wantsWatchDrift = 1 diff --git a/toontown/coghq/DistributedCashbotBossSafe.py b/toontown/coghq/DistributedCashbotBossSafe.py index 712b555..1c397d1 100644 --- a/toontown/coghq/DistributedCashbotBossSafe.py +++ b/toontown/coghq/DistributedCashbotBossSafe.py @@ -1,10 +1,15 @@ from panda3d.core import * -from direct.interval.IntervalGlobal import * + from direct.directnotify import DirectNotifyGlobal -from toontown.toonbase import ToontownGlobals +from direct.interval.IntervalGlobal import * + from otp.otpbase import OTPGlobals + +from toontown.toonbase import ToontownGlobals + from . import DistributedCashbotBossObject + class DistributedCashbotBossSafe(DistributedCashbotBossObject.DistributedCashbotBossObject): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedCashbotBossSafe') grabPos = (0, 0, -8.2) diff --git a/toontown/coghq/DistributedCashbotBossSafeAI.py b/toontown/coghq/DistributedCashbotBossSafeAI.py index 2b141c0..d310dcc 100644 --- a/toontown/coghq/DistributedCashbotBossSafeAI.py +++ b/toontown/coghq/DistributedCashbotBossSafeAI.py @@ -1,8 +1,12 @@ from panda3d.core import * -from toontown.toonbase import ToontownGlobals + from otp.otpbase import OTPGlobals + +from toontown.toonbase import ToontownGlobals + from . import DistributedCashbotBossObjectAI + class DistributedCashbotBossSafeAI(DistributedCashbotBossObjectAI.DistributedCashbotBossObjectAI): wantsWatchDrift = 0 diff --git a/toontown/coghq/DistributedCashbotBossTreasure.py b/toontown/coghq/DistributedCashbotBossTreasure.py index fdddc6e..c141f14 100644 --- a/toontown/coghq/DistributedCashbotBossTreasure.py +++ b/toontown/coghq/DistributedCashbotBossTreasure.py @@ -1,7 +1,10 @@ +from panda3d.core import Point3 + +from direct.interval.IntervalGlobal import * + from toontown.safezone import DistributedSZTreasure from toontown.toonbase import ToontownGlobals -from direct.interval.IntervalGlobal import * -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/DistributedCashbotBossTreasureAI.py b/toontown/coghq/DistributedCashbotBossTreasureAI.py index 70bb0d1..7c4e742 100644 --- a/toontown/coghq/DistributedCashbotBossTreasureAI.py +++ b/toontown/coghq/DistributedCashbotBossTreasureAI.py @@ -1,5 +1,6 @@ from toontown.safezone import DistributedSZTreasureAI + class DistributedCashbotBossTreasureAI(DistributedSZTreasureAI.DistributedSZTreasureAI): def __init__(self, air, boss, goon, style, fx, fy, fz): diff --git a/toontown/coghq/DistributedCogHQDoor.py b/toontown/coghq/DistributedCogHQDoor.py index 7634fbd..66f71f1 100644 --- a/toontown/coghq/DistributedCogHQDoor.py +++ b/toontown/coghq/DistributedCogHQDoor.py @@ -1,16 +1,16 @@ from panda3d.core import * -from direct.interval.IntervalGlobal import * -from direct.distributed.ClockDelta import * -from toontown.toonbase import ToontownGlobals + from direct.directnotify import DirectNotifyGlobal +from direct.distributed.ClockDelta import * from direct.fsm import ClassicFSM -from toontown.building import DistributedDoor +from direct.interval.IntervalGlobal import * + +from toontown.building import DistributedDoor, DoorTypes, FADoorCodes from toontown.hood import ZoneUtil -from toontown.building import FADoorCodes -from toontown.building import DoorTypes -from toontown.toonbase import TTLocalizer +from toontown.toonbase import ToontownGlobals, TTLocalizer from toontown.toontowngui import TeaserPanel + class DistributedCogHQDoor(DistributedDoor.DistributedDoor): def __init__(self, cr): diff --git a/toontown/coghq/DistributedCogHQDoorAI.py b/toontown/coghq/DistributedCogHQDoorAI.py index afa71d7..34d2f04 100644 --- a/toontown/coghq/DistributedCogHQDoorAI.py +++ b/toontown/coghq/DistributedCogHQDoorAI.py @@ -1,14 +1,14 @@ -from otp.ai.AIBaseGlobal import * -from direct.distributed.ClockDelta import * from direct.directnotify import DirectNotifyGlobal -from direct.fsm import ClassicFSM -from toontown.building import DistributedDoorAI -from direct.fsm import State -from toontown.toonbase import ToontownGlobals +from direct.distributed.ClockDelta import * +from direct.fsm import ClassicFSM, State + +from otp.ai.AIBaseGlobal import * + +from toontown.building import DistributedDoorAI, DoorTypes, FADoorCodes +from toontown.toonbase import ToontownAccessAI, ToontownGlobals + from . import CogDisguiseGlobals -from toontown.building import FADoorCodes -from toontown.building import DoorTypes -from toontown.toonbase import ToontownAccessAI + class DistributedCogHQDoorAI(DistributedDoorAI.DistributedDoorAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedCogHQDoorAI') diff --git a/toontown/coghq/DistributedCogKart.py b/toontown/coghq/DistributedCogKart.py index 0ab2b16..eba6445 100644 --- a/toontown/coghq/DistributedCogKart.py +++ b/toontown/coghq/DistributedCogKart.py @@ -1,16 +1,17 @@ import math -from panda3d.core import CollisionSphere, CollisionNode, Vec3, Point3, deg2Rad -from direct.interval.IntervalGlobal import Sequence, Func, Parallel, ActorInterval, Wait, Parallel, LerpHprInterval, ProjectileInterval, LerpPosInterval + +from panda3d.core import CollisionNode, CollisionSphere, Point3, Vec3, deg2Rad + from direct.directnotify import DirectNotifyGlobal -from toontown.building import ElevatorConstants -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import TTLocalizer -from toontown.safezone import DistributedGolfKart -from toontown.building import DistributedElevatorExt -from toontown.building import ElevatorConstants -from toontown.distributed import DelayDelete +from direct.interval.IntervalGlobal import (ActorInterval, Func, LerpHprInterval, LerpPosInterval, Parallel, + ProjectileInterval, Sequence, Wait) from direct.showbase import PythonUtil -from toontown.building import BoardingGroupShow + +from toontown.building import BoardingGroupShow, DistributedElevatorExt, ElevatorConstants +from toontown.distributed import DelayDelete +from toontown.safezone import DistributedGolfKart +from toontown.toonbase import ToontownGlobals, TTLocalizer + class DistributedCogKart(DistributedElevatorExt.DistributedElevatorExt): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedCogKart') diff --git a/toontown/coghq/DistributedCogKartAI.py b/toontown/coghq/DistributedCogKartAI.py index 154954d..a796906 100644 --- a/toontown/coghq/DistributedCogKartAI.py +++ b/toontown/coghq/DistributedCogKartAI.py @@ -1,9 +1,10 @@ from direct.directnotify import DirectNotifyGlobal + +from toontown.building import DistributedElevatorExtAI, ElevatorConstants from toontown.safezone import DistributedGolfKartAI -from toontown.building import DistributedElevatorExtAI -from toontown.building import ElevatorConstants from toontown.toonbase import ToontownGlobals + class DistributedCogKartAI(DistributedElevatorExtAI.DistributedElevatorExtAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedCogKartAI') diff --git a/toontown/coghq/DistributedCountryClub.py b/toontown/coghq/DistributedCountryClub.py index a9ba3b9..57728cd 100644 --- a/toontown/coghq/DistributedCountryClub.py +++ b/toontown/coghq/DistributedCountryClub.py @@ -1,18 +1,18 @@ from panda3d.core import * -from direct.distributed.ClockDelta import * -from direct.distributed import DistributedObject + from direct.directnotify import DirectNotifyGlobal -from direct.showbase import BulletinBoardWatcher -from otp.otpbase import OTPGlobals -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import TTLocalizer -from toontown.coghq import CountryClubLayout -from toontown.coghq import DistributedCountryClubRoom -from toontown.coghq import CountryClubRoom -from toontown.coghq import FactoryCameraViews +from direct.distributed import DistributedObject +from direct.distributed.ClockDelta import * from direct.gui import OnscreenText -from direct.task.Task import Task from direct.interval.IntervalGlobal import * +from direct.showbase import BulletinBoardWatcher +from direct.task.Task import Task + +from otp.otpbase import OTPGlobals + +from toontown.coghq import CountryClubLayout, CountryClubRoom, DistributedCountryClubRoom, FactoryCameraViews +from toontown.toonbase import ToontownGlobals, TTLocalizer + class DistributedCountryClub(DistributedObject.DistributedObject): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedCountryClub') diff --git a/toontown/coghq/DistributedCountryClubAI.py b/toontown/coghq/DistributedCountryClubAI.py index 9d46074..0956a0e 100644 --- a/toontown/coghq/DistributedCountryClubAI.py +++ b/toontown/coghq/DistributedCountryClubAI.py @@ -1,10 +1,12 @@ -from direct.distributed import DistributedObjectAI -from otp.level import DistributedLevelAI from direct.directnotify import DirectNotifyGlobal -from toontown.toonbase import ToontownGlobals -from toontown.coghq import CountryClubLayout, DistributedCountryClubRoomAI -from toontown.coghq import BattleExperienceAggregatorAI +from direct.distributed import DistributedObjectAI + +from otp.level import DistributedLevelAI + from toontown.building import DistributedClubElevatorAI +from toontown.coghq import BattleExperienceAggregatorAI, CountryClubLayout, DistributedCountryClubRoomAI +from toontown.toonbase import ToontownGlobals + class DistributedCountryClubAI(DistributedObjectAI.DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedCountryClubAI') diff --git a/toontown/coghq/DistributedCountryClubBattle.py b/toontown/coghq/DistributedCountryClubBattle.py index c3b037a..e2e31bd 100644 --- a/toontown/coghq/DistributedCountryClubBattle.py +++ b/toontown/coghq/DistributedCountryClubBattle.py @@ -1,18 +1,22 @@ +import random + from panda3d.core import * from panda3d.otp import * + +from direct.directnotify import DirectNotifyGlobal +from direct.fsm import ClassicFSM, State from direct.interval.IntervalGlobal import * + +from otp.avatar import Emote + +from toontown.battle import SuitBattleGlobals from toontown.battle.BattleBase import * from toontown.coghq import DistributedLevelBattle -from direct.directnotify import DirectNotifyGlobal -from toontown.toon import TTEmote -from otp.avatar import Emote -from toontown.battle import SuitBattleGlobals -import random from toontown.suit import SuitDNA -from direct.fsm import State -from direct.fsm import ClassicFSM, State +from toontown.toon import TTEmote from toontown.toonbase import ToontownGlobals + class DistributedCountryClubBattle(DistributedLevelBattle.DistributedLevelBattle): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedCountryClubBattle') diff --git a/toontown/coghq/DistributedCountryClubBattleAI.py b/toontown/coghq/DistributedCountryClubBattleAI.py index 8ef0501..98ba4f2 100644 --- a/toontown/coghq/DistributedCountryClubBattleAI.py +++ b/toontown/coghq/DistributedCountryClubBattleAI.py @@ -1,13 +1,15 @@ -from toontown.toonbase import ToontownGlobals -from toontown.coghq import DistributedLevelBattleAI from direct.directnotify import DirectNotifyGlobal -from direct.fsm import State from direct.fsm import ClassicFSM, State -from toontown.battle.BattleBase import * -from . import CogDisguiseGlobals -from toontown.toonbase.ToontownBattleGlobals import getCountryClubCreditMultiplier from direct.showbase.PythonUtil import addListsByValue +from toontown.battle.BattleBase import * +from toontown.coghq import DistributedLevelBattleAI +from toontown.toonbase import ToontownGlobals +from toontown.toonbase.ToontownBattleGlobals import getCountryClubCreditMultiplier + +from . import CogDisguiseGlobals + + class DistributedCountryClubBattleAI(DistributedLevelBattleAI.DistributedLevelBattleAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedCountryClubBattleAI') diff --git a/toontown/coghq/DistributedCountryClubRoom.py b/toontown/coghq/DistributedCountryClubRoom.py index 7a93def..9173c42 100644 --- a/toontown/coghq/DistributedCountryClubRoom.py +++ b/toontown/coghq/DistributedCountryClubRoom.py @@ -1,15 +1,18 @@ +import random + from panda3d.core import * -from toontown.toonbase.ToontownGlobals import * + +from direct.directnotify import DirectNotifyGlobal from direct.distributed.ClockDelta import * from direct.interval.IntervalGlobal import * -import random -from otp.level import DistributedLevel -from direct.directnotify import DirectNotifyGlobal -from . import CountryClubRoomBase, CountryClubRoom -from . import FactoryEntityCreator -from . import CountryClubRoomSpecs -from otp.level import LevelSpec, LevelConstants + +from otp.level import DistributedLevel, LevelConstants, LevelSpec + from toontown.toonbase import TTLocalizer +from toontown.toonbase.ToontownGlobals import * + +from . import CountryClubRoom, CountryClubRoomBase, CountryClubRoomSpecs, FactoryEntityCreator + if __dev__: from otp.level import EditorGlobals diff --git a/toontown/coghq/DistributedCountryClubRoomAI.py b/toontown/coghq/DistributedCountryClubRoomAI.py index 50ca003..2933d90 100644 --- a/toontown/coghq/DistributedCountryClubRoomAI.py +++ b/toontown/coghq/DistributedCountryClubRoomAI.py @@ -1,12 +1,13 @@ -from otp.level import DistributedLevelAI, LevelSpec from direct.directnotify import DirectNotifyGlobal from direct.task import Task -from otp.level import LevelSpec -from toontown.toonbase import ToontownGlobals, ToontownBattleGlobals -from toontown.coghq import FactoryEntityCreatorAI, CountryClubRoomSpecs -from toontown.coghq import CountryClubRoomBase, LevelSuitPlannerAI -from toontown.coghq import DistributedCountryClubBattleAI + +from otp.level import DistributedLevelAI, LevelSpec + +from toontown.coghq import (CountryClubRoomBase, CountryClubRoomSpecs, DistributedCountryClubBattleAI, + FactoryEntityCreatorAI, LevelSuitPlannerAI) from toontown.suit import DistributedMintSuitAI +from toontown.toonbase import ToontownBattleGlobals, ToontownGlobals + class DistributedCountryClubRoomAI(DistributedLevelAI.DistributedLevelAI, CountryClubRoomBase.CountryClubRoomBase): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedCountryClubRoomAI') diff --git a/toontown/coghq/DistributedCrate.py b/toontown/coghq/DistributedCrate.py index b2ff837..05a9de5 100644 --- a/toontown/coghq/DistributedCrate.py +++ b/toontown/coghq/DistributedCrate.py @@ -1,13 +1,16 @@ from panda3d.core import * -from direct.interval.IntervalGlobal import * -from toontown.toonbase.ToontownGlobals import * -from .CrateGlobals import * -from direct.showbase.PythonUtil import fitSrcAngle2Dest -from direct.distributed import DistributedObject + from direct.directnotify import DirectNotifyGlobal -from . import MovingPlatform +from direct.distributed import DistributedObject +from direct.interval.IntervalGlobal import * +from direct.showbase.PythonUtil import fitSrcAngle2Dest from direct.task.Task import Task -from . import DistributedCrushableEntity + +from toontown.toonbase.ToontownGlobals import * + +from . import DistributedCrushableEntity, MovingPlatform +from .CrateGlobals import * + class DistributedCrate(DistributedCrushableEntity.DistributedCrushableEntity): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedCrate') diff --git a/toontown/coghq/DistributedCrateAI.py b/toontown/coghq/DistributedCrateAI.py index c13c861..0be120a 100644 --- a/toontown/coghq/DistributedCrateAI.py +++ b/toontown/coghq/DistributedCrateAI.py @@ -1,8 +1,9 @@ -from .CrateGlobals import * from direct.directnotify import DirectNotifyGlobal -from . import DistributedCrushableEntityAI from direct.task import Task -from . import CrateGlobals + +from . import CrateGlobals, DistributedCrushableEntityAI +from .CrateGlobals import * + class DistributedCrateAI(DistributedCrushableEntityAI.DistributedCrushableEntityAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedCrateAI') diff --git a/toontown/coghq/DistributedCrushableEntity.py b/toontown/coghq/DistributedCrushableEntity.py index 9e7157f..be4bd55 100644 --- a/toontown/coghq/DistributedCrushableEntity.py +++ b/toontown/coghq/DistributedCrushableEntity.py @@ -1,7 +1,9 @@ -from otp.level import DistributedEntity -from direct.directnotify import DirectNotifyGlobal from panda3d.core import NodePath -from otp.level import BasicEntities + +from direct.directnotify import DirectNotifyGlobal + +from otp.level import BasicEntities, DistributedEntity + class DistributedCrushableEntity(DistributedEntity.DistributedEntity, NodePath, BasicEntities.NodePathAttribs): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedCrushableEntity') diff --git a/toontown/coghq/DistributedCrushableEntityAI.py b/toontown/coghq/DistributedCrushableEntityAI.py index 0d7880a..7319a7c 100644 --- a/toontown/coghq/DistributedCrushableEntityAI.py +++ b/toontown/coghq/DistributedCrushableEntityAI.py @@ -1,6 +1,8 @@ -from otp.level import DistributedEntityAI from direct.directnotify import DirectNotifyGlobal +from otp.level import DistributedEntityAI + + class DistributedCrushableEntityAI(DistributedEntityAI.DistributedEntityAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedCrushableEntityAI') diff --git a/toontown/coghq/DistributedCrusherEntity.py b/toontown/coghq/DistributedCrusherEntity.py index 4aea0b2..e281db7 100644 --- a/toontown/coghq/DistributedCrusherEntity.py +++ b/toontown/coghq/DistributedCrusherEntity.py @@ -1,6 +1,8 @@ -from otp.level import BasicEntities from direct.directnotify import DirectNotifyGlobal +from otp.level import BasicEntities + + class DistributedCrusherEntity(BasicEntities.DistributedNodePathEntity): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedCrusherEntity') diff --git a/toontown/coghq/DistributedCrusherEntityAI.py b/toontown/coghq/DistributedCrusherEntityAI.py index 383b651..b78e490 100644 --- a/toontown/coghq/DistributedCrusherEntityAI.py +++ b/toontown/coghq/DistributedCrusherEntityAI.py @@ -1,6 +1,8 @@ -from otp.level import DistributedEntityAI from direct.directnotify import DirectNotifyGlobal +from otp.level import DistributedEntityAI + + class DistributedCrusherEntityAI(DistributedEntityAI.DistributedEntityAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedCrusherEntityAI') diff --git a/toontown/coghq/DistributedDoorEntity.py b/toontown/coghq/DistributedDoorEntity.py index 2ecc93a..0c9ac96 100644 --- a/toontown/coghq/DistributedDoorEntity.py +++ b/toontown/coghq/DistributedDoorEntity.py @@ -1,17 +1,17 @@ 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 panda3d.direct import HideInterval, ShowInterval + from direct.directnotify import DirectNotifyGlobal +from direct.distributed.ClockDelta import * +from direct.fsm import ClassicFSM, FourState, State +from direct.interval.IntervalGlobal import * + +from otp.level import BasicEntities, DistributedEntity, VisibilityBlocker + +from toontown.toonbase import ToontownGlobals, TTLocalizer + from . import DistributedDoorEntityBase -from direct.fsm import FourState -from direct.fsm import ClassicFSM -from otp.level import DistributedEntity -from toontown.toonbase import TTLocalizer -from otp.level import BasicEntities -from direct.fsm import State -from otp.level import VisibilityBlocker + class DistributedDoorEntityLock(DistributedDoorEntityBase.LockBase, FourState.FourState): slideLeft = Vec3(-7.5, 0.0, 0.0) diff --git a/toontown/coghq/DistributedDoorEntityAI.py b/toontown/coghq/DistributedDoorEntityAI.py index cf67418..e0e476a 100644 --- a/toontown/coghq/DistributedDoorEntityAI.py +++ b/toontown/coghq/DistributedDoorEntityAI.py @@ -1,14 +1,15 @@ -from direct.distributed.ClockDelta import * from direct.directnotify import DirectNotifyGlobal -from direct.showbase import DirectObject -from . import DistributedDoorEntityBase from direct.distributed import DistributedObjectAI -from otp.level import DistributedEntityAI -from direct.fsm import FourStateAI -from direct.fsm import ClassicFSM -from direct.fsm import State +from direct.distributed.ClockDelta import * +from direct.fsm import ClassicFSM, FourStateAI, State +from direct.showbase import DirectObject from direct.task import Task +from otp.level import DistributedEntityAI + +from . import DistributedDoorEntityBase + + class Lock(DistributedDoorEntityBase.LockBase, DirectObject.DirectObject, FourStateAI.FourStateAI): def __init__(self, door, lockIndex, event, isUnlocked): diff --git a/toontown/coghq/DistributedElevatorMarker.py b/toontown/coghq/DistributedElevatorMarker.py index 94d3db6..e4762cd 100644 --- a/toontown/coghq/DistributedElevatorMarker.py +++ b/toontown/coghq/DistributedElevatorMarker.py @@ -1,16 +1,21 @@ -from panda3d.core import * -from direct.interval.IntervalGlobal import * -from .StomperGlobals import * -from direct.distributed import ClockDelta -from direct.showbase.PythonUtil import lerp import math -from otp.level import DistributedEntity -from direct.directnotify import DirectNotifyGlobal + +from panda3d.core import * from panda3d.core import NodePath -from otp.level import BasicEntities + +from direct.directnotify import DirectNotifyGlobal +from direct.distributed import ClockDelta +from direct.interval.IntervalGlobal import * +from direct.showbase.PythonUtil import lerp from direct.task import Task + +from otp.level import BasicEntities, DistributedEntity + from toontown.toonbase import ToontownGlobals +from .StomperGlobals import * + + class DistributedElevatorMarker(BasicEntities.DistributedNodePathEntity): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedElevatorMarker') elevatorMarkerModels = ['phase_9/models/cogHQ/square_stomper'] diff --git a/toontown/coghq/DistributedElevatorMarkerAI.py b/toontown/coghq/DistributedElevatorMarkerAI.py index bf06954..4da343f 100644 --- a/toontown/coghq/DistributedElevatorMarkerAI.py +++ b/toontown/coghq/DistributedElevatorMarkerAI.py @@ -1,11 +1,11 @@ -from otp.ai.AIBase import * -from direct.interval.IntervalGlobal import * from direct.directnotify import DirectNotifyGlobal from direct.distributed import ClockDelta +from direct.interval.IntervalGlobal import * from direct.task import Task -from otp.level import DistributedEntityAI -from otp.level import BasicEntities -from direct.directnotify import DirectNotifyGlobal + +from otp.ai.AIBase import * +from otp.level import BasicEntities, DistributedEntityAI + class DistributedElevatorMarkerAI(DistributedEntityAI.DistributedEntityAI, NodePath, BasicEntities.NodePathAttribs): diff --git a/toontown/coghq/DistributedFactory.py b/toontown/coghq/DistributedFactory.py index 697805f..6ab8550 100644 --- a/toontown/coghq/DistributedFactory.py +++ b/toontown/coghq/DistributedFactory.py @@ -1,18 +1,20 @@ +import random + from panda3d.core import * -from toontown.toonbase.ToontownGlobals import * + +from direct.controls.ControlManager import CollisionHandlerRayStart +from direct.directnotify import DirectNotifyGlobal from direct.distributed.ClockDelta import * from direct.interval.IntervalGlobal import * -import random -from otp.level import DistributedLevel -from direct.directnotify import DirectNotifyGlobal -from . import FactoryBase -from . import FactoryEntityCreator -from . import FactorySpecs -from otp.level import LevelSpec -from otp.level import LevelConstants -from toontown.toonbase import TTLocalizer + +from otp.level import DistributedLevel, LevelConstants, LevelSpec + from toontown.coghq import FactoryCameraViews -from direct.controls.ControlManager import CollisionHandlerRayStart +from toontown.toonbase import TTLocalizer +from toontown.toonbase.ToontownGlobals import * + +from . import FactoryBase, FactoryEntityCreator, FactorySpecs + if __dev__: from otp.level import EditorGlobals diff --git a/toontown/coghq/DistributedFactoryAI.py b/toontown/coghq/DistributedFactoryAI.py index 44c74d7..f8a835e 100644 --- a/toontown/coghq/DistributedFactoryAI.py +++ b/toontown/coghq/DistributedFactoryAI.py @@ -1,13 +1,13 @@ -from otp.level import DistributedLevelAI from direct.directnotify import DirectNotifyGlobal -from toontown.coghq import LevelSuitPlannerAI, FactoryBase from direct.task import Task -from toontown.coghq import FactoryEntityCreatorAI, FactorySpecs -from otp.level import LevelSpec -from toontown.coghq import CogDisguiseGlobals + +from otp.level import DistributedLevelAI, LevelSpec + +from toontown.coghq import (CogDisguiseGlobals, DistributedBattleFactoryAI, FactoryBase, FactoryEntityCreatorAI, + FactorySpecs, LevelSuitPlannerAI) from toontown.suit import DistributedFactorySuitAI -from toontown.toonbase import ToontownGlobals, ToontownBattleGlobals -from toontown.coghq import DistributedBattleFactoryAI +from toontown.toonbase import ToontownBattleGlobals, ToontownGlobals + class DistributedFactoryAI(DistributedLevelAI.DistributedLevelAI, FactoryBase.FactoryBase): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedFactoryAI') diff --git a/toontown/coghq/DistributedFactoryElevatorExt.py b/toontown/coghq/DistributedFactoryElevatorExt.py index 01aa329..084c13b 100644 --- a/toontown/coghq/DistributedFactoryElevatorExt.py +++ b/toontown/coghq/DistributedFactoryElevatorExt.py @@ -1,15 +1,15 @@ from panda3d.core import * + from direct.distributed.ClockDelta import * +from direct.fsm import ClassicFSM, State from direct.interval.IntervalGlobal import * + +from toontown.building import DistributedElevator, DistributedElevatorExt from toontown.building.ElevatorConstants import * from toontown.building.ElevatorUtils import * -from toontown.building import DistributedElevatorExt -from toontown.building import DistributedElevator -from toontown.toonbase import ToontownGlobals -from direct.fsm import ClassicFSM -from direct.fsm import State from toontown.hood import ZoneUtil -from toontown.toonbase import TTLocalizer +from toontown.toonbase import ToontownGlobals, TTLocalizer + class DistributedFactoryElevatorExt(DistributedElevatorExt.DistributedElevatorExt): diff --git a/toontown/coghq/DistributedFactoryElevatorExtAI.py b/toontown/coghq/DistributedFactoryElevatorExtAI.py index d235250..0588b06 100644 --- a/toontown/coghq/DistributedFactoryElevatorExtAI.py +++ b/toontown/coghq/DistributedFactoryElevatorExtAI.py @@ -1,12 +1,14 @@ -from otp.ai.AIBase import * -from toontown.toonbase import ToontownGlobals from direct.distributed.ClockDelta import * -from toontown.building.ElevatorConstants import * -from toontown.building import DistributedElevatorExtAI -from direct.fsm import ClassicFSM -from direct.fsm import State +from direct.fsm import ClassicFSM, State from direct.task import Task +from otp.ai.AIBase import * + +from toontown.building import DistributedElevatorExtAI +from toontown.building.ElevatorConstants import * +from toontown.toonbase import ToontownGlobals + + class DistributedFactoryElevatorExtAI(DistributedElevatorExtAI.DistributedElevatorExtAI): def __init__(self, air, bldg, factoryId, entranceId, antiShuffle=0, minLaff=0): diff --git a/toontown/coghq/DistributedFoodBelt.py b/toontown/coghq/DistributedFoodBelt.py index 63d0adf..d3176dd 100644 --- a/toontown/coghq/DistributedFoodBelt.py +++ b/toontown/coghq/DistributedFoodBelt.py @@ -1,11 +1,14 @@ -from panda3d.core import NodePath, Point3, CollisionTube, CollisionNode -from direct.fsm import FSM -from direct.distributed import DistributedObject -from direct.directnotify import DirectNotifyGlobal -from direct.interval.IntervalGlobal import Sequence, Wait, LerpPosInterval, ProjectileInterval, Func, SoundInterval +from panda3d.core import CollisionNode, CollisionTube, NodePath, Point3 + from direct.actor import Actor -from toontown.toonbase import ToontownGlobals +from direct.directnotify import DirectNotifyGlobal +from direct.distributed import DistributedObject +from direct.fsm import FSM +from direct.interval.IntervalGlobal import Func, LerpPosInterval, ProjectileInterval, Sequence, SoundInterval, Wait + from toontown.coghq.FoodBeltBase import FoodBeltBase +from toontown.toonbase import ToontownGlobals + class DistributedFoodBelt(DistributedObject.DistributedObject, FSM.FSM, FoodBeltBase): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedFoodBelt') diff --git a/toontown/coghq/DistributedFoodBeltAI.py b/toontown/coghq/DistributedFoodBeltAI.py index 38e9e19..807f40c 100644 --- a/toontown/coghq/DistributedFoodBeltAI.py +++ b/toontown/coghq/DistributedFoodBeltAI.py @@ -1,8 +1,10 @@ +from direct.directnotify import DirectNotifyGlobal from direct.distributed import DistributedObjectAI from direct.fsm import FSM -from direct.directnotify import DirectNotifyGlobal + from toontown.coghq import FoodBeltBase + class DistributedFoodBeltAI(DistributedObjectAI.DistributedObjectAI, FSM.FSM, FoodBeltBase.FoodBeltBase): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedFoodBeltAI') diff --git a/toontown/coghq/DistributedGagBarrel.py b/toontown/coghq/DistributedGagBarrel.py index a2226a8..d386adf 100644 --- a/toontown/coghq/DistributedGagBarrel.py +++ b/toontown/coghq/DistributedGagBarrel.py @@ -1,9 +1,13 @@ from panda3d.core import * -from direct.interval.IntervalGlobal import * -from toontown.toonbase.ToontownGlobals import * + from direct.directnotify import DirectNotifyGlobal +from direct.interval.IntervalGlobal import * + +from toontown.toonbase.ToontownGlobals import * + from . import DistributedBarrelBase + class DistributedGagBarrel(DistributedBarrelBase.DistributedBarrelBase): def __init__(self, cr): diff --git a/toontown/coghq/DistributedGagBarrelAI.py b/toontown/coghq/DistributedGagBarrelAI.py index c00f01d..d112853 100644 --- a/toontown/coghq/DistributedGagBarrelAI.py +++ b/toontown/coghq/DistributedGagBarrelAI.py @@ -1,8 +1,11 @@ -from toontown.toonbase.ToontownBattleGlobals import * -from . import DistributedBarrelBaseAI from direct.directnotify import DirectNotifyGlobal from direct.task import Task +from toontown.toonbase.ToontownBattleGlobals import * + +from . import DistributedBarrelBaseAI + + class DistributedGagBarrelAI(DistributedBarrelBaseAI.DistributedBarrelBaseAI): def __init__(self, level, entId): diff --git a/toontown/coghq/DistributedGolfGreenGame.py b/toontown/coghq/DistributedGolfGreenGame.py index a9aa3bf..2c31389 100644 --- a/toontown/coghq/DistributedGolfGreenGame.py +++ b/toontown/coghq/DistributedGolfGreenGame.py @@ -1,35 +1,34 @@ +import math +import pickle +import random +import time +from math import pi + from panda3d.core import * +from panda3d.core import NodePath + +from direct.directnotify import DirectNotifyGlobal +from direct.distributed import ClockDelta +from direct.distributed.ClockDelta import * +from direct.gui.DirectGui import * from direct.interval.IntervalGlobal import * from direct.particles import ParticleEffect -from .StomperGlobals import * -from direct.distributed import ClockDelta -from direct.showbase.PythonUtil import lerp -import math -from otp.level import DistributedEntity -from direct.directnotify import DirectNotifyGlobal -from panda3d.core import NodePath -from otp.level import BasicEntities -from direct.task import Task -from toontown.toonbase import ToontownGlobals -from toontown.coghq import BattleBlocker -from toontown.toonbase import TTLocalizer -from toontown.toonbase import ToontownBattleGlobals -from direct.distributed.ClockDelta import * -from toontown.golf import BuildGeometry -from direct.gui.DirectGui import * -import random from direct.showbase import RandomNumGen -from . import GameSprite3D -from math import pi -import math -import random -import pickle +from direct.showbase.PythonUtil import lerp +from direct.task import Task + +from otp.level import BasicEntities, DistributedEntity + +from toontown.battle import BattleParticles, MovieUtil +from toontown.coghq import BattleBlocker from toontown.distributed import DelayDelete +from toontown.golf import BuildGeometry from toontown.toon import ToonHeadFrame -from toontown.battle import BattleParticles -from toontown.battle import MovieUtil -import time -from toontown.toonbase import ToontownTimer +from toontown.toonbase import ToontownBattleGlobals, ToontownGlobals, ToontownTimer, TTLocalizer + +from . import GameSprite3D +from .StomperGlobals import * + class DistributedGolfGreenGame(BattleBlocker.BattleBlocker): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedGolfGreenGame') diff --git a/toontown/coghq/DistributedGolfGreenGameAI.py b/toontown/coghq/DistributedGolfGreenGameAI.py index 3a45d81..8885901 100644 --- a/toontown/coghq/DistributedGolfGreenGameAI.py +++ b/toontown/coghq/DistributedGolfGreenGameAI.py @@ -1,15 +1,20 @@ -from otp.ai.AIBase import * -from direct.interval.IntervalGlobal import * +import random +import time + from direct.directnotify import DirectNotifyGlobal from direct.distributed import ClockDelta -from direct.task import Task -from otp.level import DistributedEntityAI -from otp.level import BasicEntities -from toontown.coghq import BattleBlockerAI from direct.distributed.ClockDelta import * +from direct.interval.IntervalGlobal import * +from direct.task import Task + +from otp.ai.AIBase import * +from otp.level import BasicEntities, DistributedEntityAI + +from toontown.coghq import BattleBlockerAI from toontown.toonbase import ToontownBattleGlobals + from .GolfGreenGameGlobals import * -import random, time + class DistributedGolfGreenGameAI(BattleBlockerAI.BattleBlockerAI, NodePath, BasicEntities.NodePathAttribs): diff --git a/toontown/coghq/DistributedGolfSpot.py b/toontown/coghq/DistributedGolfSpot.py index 33084f2..1886d5b 100644 --- a/toontown/coghq/DistributedGolfSpot.py +++ b/toontown/coghq/DistributedGolfSpot.py @@ -1,17 +1,22 @@ import math -from panda3d.core import Point3, CollisionSphere, CollisionNode, CollisionHandlerEvent, TextNode, VBase4, NodePath, BitMask32 + +from panda3d.core import (BitMask32, CollisionHandlerEvent, CollisionNode, CollisionSphere, NodePath, Point3, TextNode, + VBase4) from panda3d.direct import SmoothMover -from direct.fsm import FSM + +from direct.directnotify import DirectNotifyGlobal from direct.distributed import DistributedObject from direct.distributed.ClockDelta import globalClockDelta -from direct.directnotify import DirectNotifyGlobal +from direct.fsm import FSM from direct.gui.DirectGui import DGG, DirectButton, DirectLabel, DirectWaitBar -from direct.interval.IntervalGlobal import Sequence, Wait, ActorInterval, Parallel, Func, LerpPosInterval, LerpHprInterval, ProjectileInterval, LerpScaleInterval, SoundInterval +from direct.interval.IntervalGlobal import (ActorInterval, Func, LerpHprInterval, LerpPosInterval, LerpScaleInterval, + Parallel, ProjectileInterval, Sequence, SoundInterval, Wait) from direct.showbase import PythonUtil from direct.task import Task + from toontown.golf import GolfGlobals -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import TTLocalizer +from toontown.toonbase import ToontownGlobals, TTLocalizer + class DistributedGolfSpot(DistributedObject.DistributedObject, FSM.FSM): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedGolfSpot') @@ -728,8 +733,8 @@ class DistributedGolfSpot(DistributedObject.DistributedObject, FSM.FSM): pass def getFlyBallSplatInterval(self, x, y, z, flyBallCode, throwerId): - from toontown.toonbase import ToontownBattleGlobals from toontown.battle import BattleProps + from toontown.toonbase import ToontownBattleGlobals splatName = 'dust' splat = BattleProps.globalPropPool.getProp(splatName) splat.setBillboardPointWorld(2) diff --git a/toontown/coghq/DistributedGolfSpotAI.py b/toontown/coghq/DistributedGolfSpotAI.py index 83f1bf6..db5f106 100644 --- a/toontown/coghq/DistributedGolfSpotAI.py +++ b/toontown/coghq/DistributedGolfSpotAI.py @@ -1,6 +1,7 @@ from direct.distributed import DistributedObjectAI from direct.fsm import FSM + class DistributedGolfSpotAI(DistributedObjectAI.DistributedObjectAI, FSM.FSM): def __init__(self, air, boss, index): diff --git a/toontown/coghq/DistributedGrid.py b/toontown/coghq/DistributedGrid.py index bb77083..4bdb711 100644 --- a/toontown/coghq/DistributedGrid.py +++ b/toontown/coghq/DistributedGrid.py @@ -1,9 +1,14 @@ from panda3d.core import * -from direct.interval.IntervalGlobal import * -from toontown.toonbase.ToontownGlobals import * -from .CrateGlobals import * -from otp.level import BasicEntities + from direct.directnotify import DirectNotifyGlobal +from direct.interval.IntervalGlobal import * + +from otp.level import BasicEntities + +from toontown.toonbase.ToontownGlobals import * + +from .CrateGlobals import * + class DistributedGrid(BasicEntities.DistributedNodePathEntity): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedGrid') diff --git a/toontown/coghq/DistributedGridAI.py b/toontown/coghq/DistributedGridAI.py index 8d411a8..5675982 100644 --- a/toontown/coghq/DistributedGridAI.py +++ b/toontown/coghq/DistributedGridAI.py @@ -1,7 +1,10 @@ -from .CrateGlobals import * -from otp.level import DistributedEntityAI from direct.directnotify import DirectNotifyGlobal +from otp.level import DistributedEntityAI + +from .CrateGlobals import * + + class DistributedGridAI(DistributedEntityAI.DistributedEntityAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedGridAI') diff --git a/toontown/coghq/DistributedHealBarrel.py b/toontown/coghq/DistributedHealBarrel.py index 517e26a..d23382a 100644 --- a/toontown/coghq/DistributedHealBarrel.py +++ b/toontown/coghq/DistributedHealBarrel.py @@ -1,9 +1,13 @@ from panda3d.core import * -from direct.interval.IntervalGlobal import * -from toontown.toonbase.ToontownGlobals import * + from direct.directnotify import DirectNotifyGlobal +from direct.interval.IntervalGlobal import * + +from toontown.toonbase.ToontownGlobals import * + from . import DistributedBarrelBase + class DistributedHealBarrel(DistributedBarrelBase.DistributedBarrelBase): def __init__(self, cr): diff --git a/toontown/coghq/DistributedHealBarrelAI.py b/toontown/coghq/DistributedHealBarrelAI.py index b89a6c2..b030fae 100644 --- a/toontown/coghq/DistributedHealBarrelAI.py +++ b/toontown/coghq/DistributedHealBarrelAI.py @@ -1,7 +1,9 @@ -from . import DistributedBarrelBaseAI from direct.directnotify import DirectNotifyGlobal from direct.task import Task +from . import DistributedBarrelBaseAI + + class DistributedHealBarrelAI(DistributedBarrelBaseAI.DistributedBarrelBaseAI): def __init__(self, level, entId): diff --git a/toontown/coghq/DistributedInGameEditor.py b/toontown/coghq/DistributedInGameEditor.py index 90452dc..41b0566 100644 --- a/toontown/coghq/DistributedInGameEditor.py +++ b/toontown/coghq/DistributedInGameEditor.py @@ -1,16 +1,19 @@ +import string + from panda3d.core import * -from direct.interval.IntervalGlobal import * -from direct.showbase.PythonUtil import lineInfo, Functor + from direct.directnotify import DirectNotifyGlobal from direct.distributed import DistributedObject -from otp.level import Level -from otp.level import LevelConstants -from otp.level import Entity -from otp.level import EditMgr -from .SpecImports import * -from .InGameEditorElements import * +from direct.interval.IntervalGlobal import * +from direct.showbase.PythonUtil import Functor, lineInfo + +from otp.level import EditMgr, Entity, Level, LevelConstants + from toontown.cogdominium import CogdoEntityCreator -import string + +from .InGameEditorElements import * +from .SpecImports import * + class InGameEditorEntityBase(InGameEditorElement): diff --git a/toontown/coghq/DistributedInGameEditorAI.py b/toontown/coghq/DistributedInGameEditorAI.py index 6485cb7..e85d48b 100644 --- a/toontown/coghq/DistributedInGameEditorAI.py +++ b/toontown/coghq/DistributedInGameEditorAI.py @@ -1,8 +1,10 @@ from direct.directnotify import DirectNotifyGlobal -from direct.distributed import DistributedObjectAI from direct.directutil import DistributedLargeBlobSenderAI +from direct.distributed import DistributedObjectAI + from .SpecImports import * + class DistributedInGameEditorAI(DistributedObjectAI.DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedInGameEditorAI') diff --git a/toontown/coghq/DistributedLaserField.py b/toontown/coghq/DistributedLaserField.py index a865c84..723176f 100644 --- a/toontown/coghq/DistributedLaserField.py +++ b/toontown/coghq/DistributedLaserField.py @@ -1,19 +1,23 @@ -from panda3d.core import * -from direct.interval.IntervalGlobal import * -from .StomperGlobals import * -from direct.distributed import ClockDelta -from direct.showbase.PythonUtil import lerp import math -from otp.level import DistributedEntity -from direct.directnotify import DirectNotifyGlobal -from panda3d.core import NodePath -from otp.level import BasicEntities -from direct.task import Task -from toontown.toonbase import ToontownGlobals -from toontown.coghq import BattleBlocker -from toontown.toonbase import TTLocalizer import random +from panda3d.core import * +from panda3d.core import NodePath + +from direct.directnotify import DirectNotifyGlobal +from direct.distributed import ClockDelta +from direct.interval.IntervalGlobal import * +from direct.showbase.PythonUtil import lerp +from direct.task import Task + +from otp.level import BasicEntities, DistributedEntity + +from toontown.coghq import BattleBlocker +from toontown.toonbase import ToontownGlobals, TTLocalizer + +from .StomperGlobals import * + + class DistributedLaserField(BattleBlocker.BattleBlocker): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedLaserField') laserFieldModels = ['phase_9/models/cogHQ/square_stomper'] diff --git a/toontown/coghq/DistributedLaserFieldAI.py b/toontown/coghq/DistributedLaserFieldAI.py index 5e55c16..3962885 100644 --- a/toontown/coghq/DistributedLaserFieldAI.py +++ b/toontown/coghq/DistributedLaserFieldAI.py @@ -1,17 +1,15 @@ -from otp.ai.AIBase import * -from direct.interval.IntervalGlobal import * +import random + from direct.directnotify import DirectNotifyGlobal from direct.distributed import ClockDelta +from direct.interval.IntervalGlobal import * from direct.task import Task -from otp.level import DistributedEntityAI -from otp.level import BasicEntities -from direct.directnotify import DirectNotifyGlobal -from toontown.coghq import BattleBlockerAI -from toontown.coghq import LaserGameMineSweeper -from toontown.coghq import LaserGameRoll -from toontown.coghq import LaserGameAvoid -from toontown.coghq import LaserGameDrag -import random + +from otp.ai.AIBase import * +from otp.level import BasicEntities, DistributedEntityAI + +from toontown.coghq import BattleBlockerAI, LaserGameAvoid, LaserGameDrag, LaserGameMineSweeper, LaserGameRoll + class DistributedLaserFieldAI(BattleBlockerAI.BattleBlockerAI, NodePath, BasicEntities.NodePathAttribs): diff --git a/toontown/coghq/DistributedLawOffice.py b/toontown/coghq/DistributedLawOffice.py index 9189c31..8a3c6dc 100644 --- a/toontown/coghq/DistributedLawOffice.py +++ b/toontown/coghq/DistributedLawOffice.py @@ -1,18 +1,20 @@ -from panda3d.core import * -from toontown.toonbase.ToontownGlobals import * -from direct.distributed.ClockDelta import * -from direct.interval.IntervalGlobal import * import random -from otp.level import DistributedLevel + +from panda3d.core import * + from direct.directnotify import DirectNotifyGlobal -from . import LawOfficeBase -from . import FactoryEntityCreator -from . import FactorySpecs -from otp.level import LevelSpec -from otp.level import LevelConstants -from toontown.toonbase import TTLocalizer -from toontown.coghq import FactoryCameraViews +from direct.distributed.ClockDelta import * from direct.distributed.DistributedObject import DistributedObject +from direct.interval.IntervalGlobal import * + +from otp.level import DistributedLevel, LevelConstants, LevelSpec + +from toontown.coghq import FactoryCameraViews +from toontown.toonbase import TTLocalizer +from toontown.toonbase.ToontownGlobals import * + +from . import FactoryEntityCreator, FactorySpecs, LawOfficeBase + if __dev__: from otp.level import EditorGlobals diff --git a/toontown/coghq/DistributedLawOfficeAI.py b/toontown/coghq/DistributedLawOfficeAI.py index df360e1..7cb21b9 100644 --- a/toontown/coghq/DistributedLawOfficeAI.py +++ b/toontown/coghq/DistributedLawOfficeAI.py @@ -1,21 +1,18 @@ -from otp.level import DistributedLevelAI from direct.directnotify import DirectNotifyGlobal -from toontown.coghq import LevelSuitPlannerAI, LawOfficeBase -from direct.task import Task -from toontown.coghq import FactoryEntityCreatorAI, FactorySpecs -from otp.level import LevelSpec -from toontown.coghq import CogDisguiseGlobals -from toontown.suit import DistributedFactorySuitAI -from toontown.toonbase import ToontownGlobals, ToontownBattleGlobals -from toontown.coghq import DistributedBattleFactoryAI -from toontown.coghq import LawOfficeLayout -from toontown.coghq import DistributedLawOfficeFloorAI -from toontown.coghq import LawOfficeLayout -from toontown.coghq import DistributedLawOfficeElevatorIntAI -from toontown.building import DistributedElevatorFloorAI -from toontown.ai.ToonBarrier import * from direct.distributed.DistributedObjectAI import * from direct.showbase import PythonUtil +from direct.task import Task + +from otp.level import DistributedLevelAI, LevelSpec + +from toontown.ai.ToonBarrier import * +from toontown.building import DistributedElevatorFloorAI +from toontown.coghq import (CogDisguiseGlobals, DistributedBattleFactoryAI, DistributedLawOfficeElevatorIntAI, + DistributedLawOfficeFloorAI, FactoryEntityCreatorAI, FactorySpecs, LawOfficeBase, + LawOfficeLayout, LevelSuitPlannerAI) +from toontown.suit import DistributedFactorySuitAI +from toontown.toonbase import ToontownBattleGlobals, ToontownGlobals + class DistributedLawOfficeAI(DistributedObjectAI, LawOfficeBase.LawOfficeBase): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedLawOfficeAI') diff --git a/toontown/coghq/DistributedLawOfficeElevatorExt.py b/toontown/coghq/DistributedLawOfficeElevatorExt.py index 8cdac78..25295c5 100644 --- a/toontown/coghq/DistributedLawOfficeElevatorExt.py +++ b/toontown/coghq/DistributedLawOfficeElevatorExt.py @@ -1,15 +1,14 @@ from direct.distributed.ClockDelta import * +from direct.fsm import ClassicFSM, State +from direct.gui import DirectGui from direct.interval.IntervalGlobal import * + +from toontown.building import DistributedElevator, DistributedElevatorExt from toontown.building.ElevatorConstants import * from toontown.building.ElevatorUtils import * -from toontown.building import DistributedElevatorExt -from toontown.building import DistributedElevator -from toontown.toonbase import ToontownGlobals -from direct.fsm import ClassicFSM -from direct.fsm import State -from direct.gui import DirectGui from toontown.hood import ZoneUtil -from toontown.toonbase import TTLocalizer +from toontown.toonbase import ToontownGlobals, TTLocalizer + class DistributedLawOfficeElevatorExt(DistributedElevatorExt.DistributedElevatorExt): diff --git a/toontown/coghq/DistributedLawOfficeElevatorExtAI.py b/toontown/coghq/DistributedLawOfficeElevatorExtAI.py index 53d7e50..a06b5c4 100644 --- a/toontown/coghq/DistributedLawOfficeElevatorExtAI.py +++ b/toontown/coghq/DistributedLawOfficeElevatorExtAI.py @@ -1,12 +1,14 @@ -from otp.ai.AIBase import * -from toontown.toonbase import ToontownGlobals from direct.distributed.ClockDelta import * -from toontown.building.ElevatorConstants import * -from toontown.building import DistributedElevatorExtAI -from direct.fsm import ClassicFSM -from direct.fsm import State +from direct.fsm import ClassicFSM, State from direct.task import Task +from otp.ai.AIBase import * + +from toontown.building import DistributedElevatorExtAI +from toontown.building.ElevatorConstants import * +from toontown.toonbase import ToontownGlobals + + class DistributedLawOfficeElevatorExtAI(DistributedElevatorExtAI.DistributedElevatorExtAI): def __init__(self, air, bldg, lawOfficeId, entranceId, antiShuffle=0, minLaff=0): diff --git a/toontown/coghq/DistributedLawOfficeElevatorInt.py b/toontown/coghq/DistributedLawOfficeElevatorInt.py index c38ebea..88221ee 100644 --- a/toontown/coghq/DistributedLawOfficeElevatorInt.py +++ b/toontown/coghq/DistributedLawOfficeElevatorInt.py @@ -1,15 +1,15 @@ from panda3d.core import * + from direct.distributed.ClockDelta import * +from direct.fsm import ClassicFSM, State from direct.interval.IntervalGlobal import * + +from toontown.building import DistributedElevator, DistributedElevatorFloor from toontown.building.ElevatorConstants import * from toontown.building.ElevatorUtils import * -from toontown.building import DistributedElevatorFloor -from toontown.building import DistributedElevator -from toontown.toonbase import ToontownGlobals -from direct.fsm import ClassicFSM -from direct.fsm import State from toontown.hood import ZoneUtil -from toontown.toonbase import TTLocalizer +from toontown.toonbase import ToontownGlobals, TTLocalizer + class DistributedLawOfficeElevatorInt(DistributedElevatorFloor.DistributedElevatorFloor): diff --git a/toontown/coghq/DistributedLawOfficeElevatorIntAI.py b/toontown/coghq/DistributedLawOfficeElevatorIntAI.py index 8e83f6d..ab3d564 100644 --- a/toontown/coghq/DistributedLawOfficeElevatorIntAI.py +++ b/toontown/coghq/DistributedLawOfficeElevatorIntAI.py @@ -1,13 +1,14 @@ -from otp.ai.AIBase import * -from toontown.toonbase import ToontownGlobals from direct.distributed.ClockDelta import * -from toontown.building.ElevatorConstants import * -from toontown.building import DistributedElevatorFloorAI -from toontown.building import DistributedElevatorAI -from direct.fsm import ClassicFSM -from direct.fsm import State +from direct.fsm import ClassicFSM, State from direct.task import Task +from otp.ai.AIBase import * + +from toontown.building import DistributedElevatorAI, DistributedElevatorFloorAI +from toontown.building.ElevatorConstants import * +from toontown.toonbase import ToontownGlobals + + class DistributedLawOfficeElevatorIntAI(DistributedElevatorFloorAI.DistributedElevatorFloorAI): def __init__(self, air, lawOfficeId, bldg, avIds): diff --git a/toontown/coghq/DistributedLawOfficeFloor.py b/toontown/coghq/DistributedLawOfficeFloor.py index 905594b..eedc8e1 100644 --- a/toontown/coghq/DistributedLawOfficeFloor.py +++ b/toontown/coghq/DistributedLawOfficeFloor.py @@ -1,17 +1,19 @@ +import random + from panda3d.core import * -from toontown.toonbase.ToontownGlobals import * + +from direct.directnotify import DirectNotifyGlobal from direct.distributed.ClockDelta import * from direct.interval.IntervalGlobal import * -import random -from otp.level import DistributedLevel -from direct.directnotify import DirectNotifyGlobal -from . import LawOfficeBase -from . import FactoryEntityCreator -from . import FactorySpecs -from otp.level import LevelSpec -from otp.level import LevelConstants -from toontown.toonbase import TTLocalizer + +from otp.level import DistributedLevel, LevelConstants, LevelSpec + from toontown.coghq import FactoryCameraViews +from toontown.toonbase import TTLocalizer +from toontown.toonbase.ToontownGlobals import * + +from . import FactoryEntityCreator, FactorySpecs, LawOfficeBase + if __dev__: from otp.level import EditorGlobals diff --git a/toontown/coghq/DistributedLawOfficeFloorAI.py b/toontown/coghq/DistributedLawOfficeFloorAI.py index dd2d545..6e2047b 100644 --- a/toontown/coghq/DistributedLawOfficeFloorAI.py +++ b/toontown/coghq/DistributedLawOfficeFloorAI.py @@ -1,17 +1,15 @@ -from otp.level import DistributedLevelAI from direct.directnotify import DirectNotifyGlobal -from toontown.coghq import LevelSuitPlannerAI, LawOfficeBase -from direct.task import Task -from toontown.coghq import FactoryEntityCreatorAI, FactorySpecs -from otp.level import LevelSpec -from toontown.coghq import CogDisguiseGlobals -from toontown.suit import DistributedFactorySuitAI -from toontown.toonbase import ToontownGlobals, ToontownBattleGlobals -from toontown.coghq import DistributedBattleFactoryAI -from toontown.coghq import LawOfficeLayout -from toontown.coghq import DistributedLawOfficeElevatorIntAI from direct.distributed import DistributedObjectAI +from direct.task import Task + +from otp.level import DistributedLevelAI, LevelSpec + from toontown.ai.ToonBarrier import * +from toontown.coghq import (CogDisguiseGlobals, DistributedBattleFactoryAI, DistributedLawOfficeElevatorIntAI, + FactoryEntityCreatorAI, FactorySpecs, LawOfficeBase, LawOfficeLayout, LevelSuitPlannerAI) +from toontown.suit import DistributedFactorySuitAI +from toontown.toonbase import ToontownBattleGlobals, ToontownGlobals + class DistributedLawOfficeFloorAI(DistributedLevelAI.DistributedLevelAI, LawOfficeBase.LawOfficeBase): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedLawOfficeAI') diff --git a/toontown/coghq/DistributedLawbotBossGavel.py b/toontown/coghq/DistributedLawbotBossGavel.py index cb55874..fe47e31 100644 --- a/toontown/coghq/DistributedLawbotBossGavel.py +++ b/toontown/coghq/DistributedLawbotBossGavel.py @@ -1,15 +1,19 @@ -from direct.gui.DirectGui import * from panda3d.core import * -from direct.interval.IntervalGlobal import * + +from direct.actor import Actor +from direct.distributed import DistributedObject from direct.distributed.ClockDelta import * from direct.fsm import FSM -from direct.distributed import DistributedObject -from direct.showutil import Rope +from direct.gui.DirectGui import * +from direct.interval.IntervalGlobal import * from direct.showbase import PythonUtil +from direct.showutil import Rope from direct.task import Task -from toontown.toonbase import ToontownGlobals + from otp.otpbase import OTPGlobals -from direct.actor import Actor + +from toontown.toonbase import ToontownGlobals + class DistributedLawbotBossGavel(DistributedObject.DistributedObject, FSM.FSM): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedLawbotBossGavel') diff --git a/toontown/coghq/DistributedLawbotBossGavelAI.py b/toontown/coghq/DistributedLawbotBossGavelAI.py index a84587f..22ba371 100644 --- a/toontown/coghq/DistributedLawbotBossGavelAI.py +++ b/toontown/coghq/DistributedLawbotBossGavelAI.py @@ -1,10 +1,14 @@ -from direct.directnotify import DirectNotifyGlobal from panda3d.core import * + +from direct.directnotify import DirectNotifyGlobal from direct.distributed import DistributedObjectAI -from toontown.toonbase import ToontownGlobals -from otp.otpbase import OTPGlobals from direct.fsm import FSM +from otp.otpbase import OTPGlobals + +from toontown.toonbase import ToontownGlobals + + class DistributedLawbotBossGavelAI(DistributedObjectAI.DistributedObjectAI, FSM.FSM): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedLawbotBossGavelAI') diff --git a/toontown/coghq/DistributedLawbotCannon.py b/toontown/coghq/DistributedLawbotCannon.py index 557b7e0..6e4f9de 100644 --- a/toontown/coghq/DistributedLawbotCannon.py +++ b/toontown/coghq/DistributedLawbotCannon.py @@ -1,20 +1,20 @@ -from direct.interval.IntervalGlobal import * -from direct.distributed.ClockDelta import * -from direct.task.Task import Task -from direct.distributed import DistributedObject -from direct.directnotify import DirectNotifyGlobal -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 panda3d.core import * +from panda3d.core import CollisionNode, CollisionSphere from panda3d.otp import * -from toontown.toon import NPCToons -from toontown.toon import ToonHead -from toontown.toonbase import TTLocalizer -from toontown.minigame import Trajectory + +from direct.directnotify import DirectNotifyGlobal +from direct.distributed import DistributedObject +from direct.distributed.ClockDelta import * +from direct.gui.DirectGui import * +from direct.interval.IntervalGlobal import * +from direct.task.Task import Task + from toontown.effects import DustCloud +from toontown.estate import CannonGlobals, DistributedCannon +from toontown.minigame import Trajectory +from toontown.toon import NPCToons, ToonHead +from toontown.toonbase import ToontownGlobals, TTLocalizer + GROUND_PLANE_MIN = -15 CANNON_ROTATION_MIN = -55 CANNON_ROTATION_MAX = 50 diff --git a/toontown/coghq/DistributedLawbotCannonAI.py b/toontown/coghq/DistributedLawbotCannonAI.py index f841f6b..00af95e 100644 --- a/toontown/coghq/DistributedLawbotCannonAI.py +++ b/toontown/coghq/DistributedLawbotCannonAI.py @@ -1,9 +1,9 @@ -from direct.distributed.ClockDelta import * from direct.distributed import DistributedObjectAI -from toontown.minigame import Trajectory -from toontown.estate import DistributedCannonAI -from toontown.estate import CannonGlobals -from toontown.minigame import CannonGameGlobals +from direct.distributed.ClockDelta import * + +from toontown.estate import CannonGlobals, DistributedCannonAI +from toontown.minigame import CannonGameGlobals, Trajectory + class DistributedLawbotCannonAI(DistributedObjectAI.DistributedObjectAI): notify = directNotify.newCategory('DistributedLawbotCannonAI') diff --git a/toontown/coghq/DistributedLawbotChair.py b/toontown/coghq/DistributedLawbotChair.py index 64659a1..2f1c6ba 100644 --- a/toontown/coghq/DistributedLawbotChair.py +++ b/toontown/coghq/DistributedLawbotChair.py @@ -1,20 +1,24 @@ -from direct.gui.DirectGui import * +import random + from panda3d.core import * -from direct.interval.IntervalGlobal import * + +from direct.actor import Actor +from direct.distributed import DistributedObject from direct.distributed.ClockDelta import * from direct.fsm import FSM -from direct.distributed import DistributedObject -from direct.showutil import Rope +from direct.gui.DirectGui import * +from direct.interval.IntervalGlobal import * from direct.showbase import PythonUtil +from direct.showutil import Rope from direct.task import Task -from toontown.toonbase import ToontownGlobals + from otp.otpbase import OTPGlobals -from direct.actor import Actor -from toontown.suit import Suit -from toontown.suit import SuitDNA -import random + from toontown.battle import BattleProps +from toontown.suit import Suit, SuitDNA from toontown.toon import NPCToons +from toontown.toonbase import ToontownGlobals + class DistributedLawbotChair(DistributedObject.DistributedObject, FSM.FSM): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedLawbotChair') diff --git a/toontown/coghq/DistributedLawbotChairAI.py b/toontown/coghq/DistributedLawbotChairAI.py index 64b670e..eb92411 100644 --- a/toontown/coghq/DistributedLawbotChairAI.py +++ b/toontown/coghq/DistributedLawbotChairAI.py @@ -1,11 +1,16 @@ -from direct.directnotify import DirectNotifyGlobal -from panda3d.core import * -from direct.distributed import DistributedObjectAI -from toontown.toonbase import ToontownGlobals -from otp.otpbase import OTPGlobals -from direct.fsm import FSM import random +from panda3d.core import * + +from direct.directnotify import DirectNotifyGlobal +from direct.distributed import DistributedObjectAI +from direct.fsm import FSM + +from otp.otpbase import OTPGlobals + +from toontown.toonbase import ToontownGlobals + + class DistributedLawbotChairAI(DistributedObjectAI.DistributedObjectAI, FSM.FSM): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedLawbotChairAI') diff --git a/toontown/coghq/DistributedLevelBattle.py b/toontown/coghq/DistributedLevelBattle.py index e9e99b2..22e2d57 100644 --- a/toontown/coghq/DistributedLevelBattle.py +++ b/toontown/coghq/DistributedLevelBattle.py @@ -1,18 +1,21 @@ +import random + from panda3d.core import * from panda3d.otp import * -from direct.interval.IntervalGlobal import * -from toontown.battle.BattleBase import * -from toontown.battle import DistributedBattle + from direct.directnotify import DirectNotifyGlobal -from toontown.toon import TTEmote +from direct.fsm import ClassicFSM, State +from direct.interval.IntervalGlobal import * + from otp.avatar import Emote -from toontown.battle import SuitBattleGlobals -import random + +from toontown.battle import DistributedBattle, SuitBattleGlobals +from toontown.battle.BattleBase import * from toontown.suit import SuitDNA -from direct.fsm import State -from direct.fsm import ClassicFSM +from toontown.toon import TTEmote from toontown.toonbase import ToontownGlobals + class DistributedLevelBattle(DistributedBattle.DistributedBattle): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedLevelBattle') diff --git a/toontown/coghq/DistributedLevelBattleAI.py b/toontown/coghq/DistributedLevelBattleAI.py index 61ec40d..61b6d8b 100644 --- a/toontown/coghq/DistributedLevelBattleAI.py +++ b/toontown/coghq/DistributedLevelBattleAI.py @@ -1,12 +1,13 @@ -from toontown.battle import DistributedBattleAI -from toontown.battle import DistributedBattleBaseAI from direct.directnotify import DirectNotifyGlobal -from direct.fsm import State -from direct.fsm import ClassicFSM -from toontown.battle.BattleBase import * -from . import CogDisguiseGlobals +from direct.fsm import ClassicFSM, State from direct.showbase.PythonUtil import addListsByValue +from toontown.battle import DistributedBattleAI, DistributedBattleBaseAI +from toontown.battle.BattleBase import * + +from . import CogDisguiseGlobals + + class DistributedLevelBattleAI(DistributedBattleAI.DistributedBattleAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedLevelBattleAI') diff --git a/toontown/coghq/DistributedLift.py b/toontown/coghq/DistributedLift.py index 8103d97..5f149ee 100644 --- a/toontown/coghq/DistributedLift.py +++ b/toontown/coghq/DistributedLift.py @@ -1,12 +1,14 @@ from panda3d.core import * -from direct.distributed.ClockDelta import * -from direct.interval.IntervalGlobal import * -from otp.level import BasicEntities + from direct.directnotify import DirectNotifyGlobal +from direct.distributed.ClockDelta import * from direct.fsm import ClassicFSM, State -from direct.fsm import State -from . import LiftConstants -from . import MovingPlatform +from direct.interval.IntervalGlobal import * + +from otp.level import BasicEntities + +from . import LiftConstants, MovingPlatform + class DistributedLift(BasicEntities.DistributedNodePathEntity): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedLift') diff --git a/toontown/coghq/DistributedLiftAI.py b/toontown/coghq/DistributedLiftAI.py index 52b6a67..6fa456b 100644 --- a/toontown/coghq/DistributedLiftAI.py +++ b/toontown/coghq/DistributedLiftAI.py @@ -1,11 +1,13 @@ -from direct.distributed.ClockDelta import * -from otp.level import DistributedEntityAI from direct.directnotify import DirectNotifyGlobal -from direct.task import Task +from direct.distributed.ClockDelta import * from direct.fsm import ClassicFSM, State -from direct.fsm import State +from direct.task import Task + +from otp.level import DistributedEntityAI + from . import LiftConstants + class DistributedLiftAI(DistributedEntityAI.DistributedEntityAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedLiftAI') diff --git a/toontown/coghq/DistributedMaze.py b/toontown/coghq/DistributedMaze.py index 0cb828b..57c56c1 100644 --- a/toontown/coghq/DistributedMaze.py +++ b/toontown/coghq/DistributedMaze.py @@ -1,17 +1,20 @@ -from otp.level.BasicEntities import DistributedNodePathEntity -from panda3d.core import * -from direct.interval.IntervalGlobal import * -from toontown.toonbase.ToontownGlobals import * import random + +from panda3d.core import * + from direct.directnotify import DirectNotifyGlobal from direct.distributed.ClockDelta import globalClockDelta -from . import DistributedBarrelBase -from otp.level.BasicEntities import DistributedNodePathEntity -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import TTLocalizer -from toontown.toonbase import ToontownTimer -from direct.task import Task from direct.gui.DirectGui import DGG, DirectFrame, DirectLabel +from direct.interval.IntervalGlobal import * +from direct.task import Task + +from otp.level.BasicEntities import DistributedNodePathEntity + +from toontown.toonbase import ToontownGlobals, ToontownTimer, TTLocalizer +from toontown.toonbase.ToontownGlobals import * + +from . import DistributedBarrelBase + class DistributedMaze(DistributedNodePathEntity): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedMaze') diff --git a/toontown/coghq/DistributedMazeAI.py b/toontown/coghq/DistributedMazeAI.py index d1e405d..2783075 100644 --- a/toontown/coghq/DistributedMazeAI.py +++ b/toontown/coghq/DistributedMazeAI.py @@ -1,9 +1,12 @@ -from otp.level import DistributedEntityAI -from . import DistributedBarrelBaseAI from direct.directnotify import DirectNotifyGlobal from direct.distributed.ClockDelta import globalClockDelta from direct.task import Task +from otp.level import DistributedEntityAI + +from . import DistributedBarrelBaseAI + + class DistributedMazeAI(DistributedEntityAI.DistributedEntityAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedMazeAI') diff --git a/toontown/coghq/DistributedMint.py b/toontown/coghq/DistributedMint.py index 43f1910..4f8d3d4 100644 --- a/toontown/coghq/DistributedMint.py +++ b/toontown/coghq/DistributedMint.py @@ -1,12 +1,16 @@ from panda3d.core import * -from direct.distributed.ClockDelta import * -from direct.distributed import DistributedObject + from direct.directnotify import DirectNotifyGlobal +from direct.distributed import DistributedObject +from direct.distributed.ClockDelta import * from direct.showbase import BulletinBoardWatcher + from otp.otpbase import OTPGlobals -from toontown.toonbase.ToontownGlobals import * -from toontown.toonbase import TTLocalizer + from toontown.coghq import DistributedMintRoom, MintLayout, MintRoom +from toontown.toonbase import TTLocalizer +from toontown.toonbase.ToontownGlobals import * + class DistributedMint(DistributedObject.DistributedObject): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedMint') diff --git a/toontown/coghq/DistributedMintAI.py b/toontown/coghq/DistributedMintAI.py index 5aa6f3f..a1b900e 100644 --- a/toontown/coghq/DistributedMintAI.py +++ b/toontown/coghq/DistributedMintAI.py @@ -1,9 +1,11 @@ -from direct.distributed import DistributedObjectAI -from otp.level import DistributedLevelAI from direct.directnotify import DirectNotifyGlobal +from direct.distributed import DistributedObjectAI + +from otp.level import DistributedLevelAI + +from toontown.coghq import BattleExperienceAggregatorAI, DistributedMintRoomAI, MintLayout from toontown.toonbase import ToontownGlobals -from toontown.coghq import MintLayout, DistributedMintRoomAI -from toontown.coghq import BattleExperienceAggregatorAI + class DistributedMintAI(DistributedObjectAI.DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedMintAI') diff --git a/toontown/coghq/DistributedMintBattle.py b/toontown/coghq/DistributedMintBattle.py index 23731b0..b0a2851 100644 --- a/toontown/coghq/DistributedMintBattle.py +++ b/toontown/coghq/DistributedMintBattle.py @@ -1,18 +1,22 @@ +import random + from panda3d.core import * from panda3d.otp import * + +from direct.directnotify import DirectNotifyGlobal +from direct.fsm import ClassicFSM, State from direct.interval.IntervalGlobal import * + +from otp.avatar import Emote + +from toontown.battle import SuitBattleGlobals from toontown.battle.BattleBase import * from toontown.coghq import DistributedLevelBattle -from direct.directnotify import DirectNotifyGlobal -from toontown.toon import TTEmote -from otp.avatar import Emote -from toontown.battle import SuitBattleGlobals -import random from toontown.suit import SuitDNA -from direct.fsm import State -from direct.fsm import ClassicFSM, State +from toontown.toon import TTEmote from toontown.toonbase import ToontownGlobals + class DistributedMintBattle(DistributedLevelBattle.DistributedLevelBattle): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedMintBattle') diff --git a/toontown/coghq/DistributedMintBattleAI.py b/toontown/coghq/DistributedMintBattleAI.py index 9392f8f..17b173e 100644 --- a/toontown/coghq/DistributedMintBattleAI.py +++ b/toontown/coghq/DistributedMintBattleAI.py @@ -1,13 +1,15 @@ -from toontown.toonbase import ToontownGlobals -from toontown.coghq import DistributedLevelBattleAI from direct.directnotify import DirectNotifyGlobal -from direct.fsm import State from direct.fsm import ClassicFSM, State -from toontown.battle.BattleBase import * -from . import CogDisguiseGlobals -from toontown.toonbase.ToontownBattleGlobals import getMintCreditMultiplier from direct.showbase.PythonUtil import addListsByValue +from toontown.battle.BattleBase import * +from toontown.coghq import DistributedLevelBattleAI +from toontown.toonbase import ToontownGlobals +from toontown.toonbase.ToontownBattleGlobals import getMintCreditMultiplier + +from . import CogDisguiseGlobals + + class DistributedMintBattleAI(DistributedLevelBattleAI.DistributedLevelBattleAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedMintBattleAI') diff --git a/toontown/coghq/DistributedMintElevatorExt.py b/toontown/coghq/DistributedMintElevatorExt.py index 572fa1d..546f3e3 100644 --- a/toontown/coghq/DistributedMintElevatorExt.py +++ b/toontown/coghq/DistributedMintElevatorExt.py @@ -1,18 +1,18 @@ from direct.distributed.ClockDelta import * +from direct.fsm import ClassicFSM, State +from direct.gui import DirectGui from direct.interval.IntervalGlobal import * + +from toontown.building import DistributedElevator, DistributedElevatorExt from toontown.building.ElevatorConstants import * from toontown.building.ElevatorUtils import * -from toontown.building import DistributedElevatorExt -from toontown.building import DistributedElevator -from toontown.toonbase import ToontownGlobals -from direct.fsm import ClassicFSM -from direct.fsm import State -from direct.gui import DirectGui from toontown.hood import ZoneUtil -from toontown.toonbase import TTLocalizer +from toontown.toonbase import ToontownGlobals, TTLocalizer from toontown.toontowngui import TTDialog + from . import CogDisguiseGlobals + class DistributedMintElevatorExt(DistributedElevatorExt.DistributedElevatorExt): def __init__(self, cr): diff --git a/toontown/coghq/DistributedMintElevatorExtAI.py b/toontown/coghq/DistributedMintElevatorExtAI.py index 12d0090..3827863 100644 --- a/toontown/coghq/DistributedMintElevatorExtAI.py +++ b/toontown/coghq/DistributedMintElevatorExtAI.py @@ -1,13 +1,16 @@ -from otp.ai.AIBase import * -from toontown.toonbase import ToontownGlobals from direct.distributed.ClockDelta import * -from toontown.building.ElevatorConstants import * -from toontown.building import DistributedElevatorExtAI -from direct.fsm import ClassicFSM -from direct.fsm import State +from direct.fsm import ClassicFSM, State from direct.task import Task + +from otp.ai.AIBase import * + +from toontown.building import DistributedElevatorExtAI +from toontown.building.ElevatorConstants import * +from toontown.toonbase import ToontownGlobals + from . import CogDisguiseGlobals + class DistributedMintElevatorExtAI(DistributedElevatorExtAI.DistributedElevatorExtAI): def __init__(self, air, bldg, mintId, antiShuffle=0, minLaff=0): diff --git a/toontown/coghq/DistributedMintRoom.py b/toontown/coghq/DistributedMintRoom.py index 39b5526..1fb469a 100644 --- a/toontown/coghq/DistributedMintRoom.py +++ b/toontown/coghq/DistributedMintRoom.py @@ -1,15 +1,18 @@ +import random + from panda3d.core import * -from toontown.toonbase.ToontownGlobals import * + +from direct.directnotify import DirectNotifyGlobal from direct.distributed.ClockDelta import * from direct.interval.IntervalGlobal import * -import random -from otp.level import DistributedLevel -from direct.directnotify import DirectNotifyGlobal -from . import MintRoomBase, MintRoom -from . import FactoryEntityCreator -from . import MintRoomSpecs -from otp.level import LevelSpec, LevelConstants + +from otp.level import DistributedLevel, LevelConstants, LevelSpec + from toontown.toonbase import TTLocalizer +from toontown.toonbase.ToontownGlobals import * + +from . import FactoryEntityCreator, MintRoom, MintRoomBase, MintRoomSpecs + if __dev__: from otp.level import EditorGlobals diff --git a/toontown/coghq/DistributedMintRoomAI.py b/toontown/coghq/DistributedMintRoomAI.py index d0f3130..3fb28cd 100644 --- a/toontown/coghq/DistributedMintRoomAI.py +++ b/toontown/coghq/DistributedMintRoomAI.py @@ -1,12 +1,13 @@ -from otp.level import DistributedLevelAI, LevelSpec from direct.directnotify import DirectNotifyGlobal from direct.task import Task -from otp.level import LevelSpec -from toontown.toonbase import ToontownGlobals, ToontownBattleGlobals -from toontown.coghq import FactoryEntityCreatorAI, MintRoomSpecs -from toontown.coghq import MintRoomBase, LevelSuitPlannerAI -from toontown.coghq import DistributedMintBattleAI + +from otp.level import DistributedLevelAI, LevelSpec + +from toontown.coghq import (DistributedMintBattleAI, FactoryEntityCreatorAI, LevelSuitPlannerAI, MintRoomBase, + MintRoomSpecs) from toontown.suit import DistributedMintSuitAI +from toontown.toonbase import ToontownBattleGlobals, ToontownGlobals + class DistributedMintRoomAI(DistributedLevelAI.DistributedLevelAI, MintRoomBase.MintRoomBase): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedMintRoomAI') diff --git a/toontown/coghq/DistributedMoleField.py b/toontown/coghq/DistributedMoleField.py index fbe352a..e296f53 100644 --- a/toontown/coghq/DistributedMoleField.py +++ b/toontown/coghq/DistributedMoleField.py @@ -1,18 +1,20 @@ -from panda3d.core import * -from otp.level.BasicEntities import DistributedNodePathEntity -from direct.directnotify import DirectNotifyGlobal -from toontown.coghq import MoleHill -from toontown.coghq import MoleFieldBase -from direct.distributed.ClockDelta import globalClockDelta -from toontown.toonbase import ToontownTimer -from direct.gui.DirectGui import DGG, DirectFrame, DirectLabel -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import TTLocalizer -from direct.task import Task import random -from toontown.minigame import Trajectory + +from panda3d.core import * + +from direct.directnotify import DirectNotifyGlobal +from direct.distributed.ClockDelta import globalClockDelta +from direct.gui.DirectGui import DGG, DirectFrame, DirectLabel from direct.interval.IntervalGlobal import * +from direct.task import Task + +from otp.level.BasicEntities import DistributedNodePathEntity + from toontown.battle import MovieUtil +from toontown.coghq import MoleFieldBase, MoleHill +from toontown.minigame import Trajectory +from toontown.toonbase import ToontownGlobals, ToontownTimer, TTLocalizer + class DistributedMoleField(DistributedNodePathEntity, MoleFieldBase.MoleFieldBase): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedMoleField') diff --git a/toontown/coghq/DistributedMoleFieldAI.py b/toontown/coghq/DistributedMoleFieldAI.py index 6eb2ca2..42b6097 100644 --- a/toontown/coghq/DistributedMoleFieldAI.py +++ b/toontown/coghq/DistributedMoleFieldAI.py @@ -1,7 +1,10 @@ -from otp.level import DistributedEntityAI -from toontown.coghq import MoleFieldBase -from direct.distributed.ClockDelta import globalClockDelta from direct.directnotify import DirectNotifyGlobal +from direct.distributed.ClockDelta import globalClockDelta + +from otp.level import DistributedEntityAI + +from toontown.coghq import MoleFieldBase + class DistributedMoleFieldAI(DistributedEntityAI.DistributedEntityAI, MoleFieldBase.MoleFieldBase): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedMoleFieldAI') diff --git a/toontown/coghq/DistributedMover.py b/toontown/coghq/DistributedMover.py index ffe089e..3892061 100644 --- a/toontown/coghq/DistributedMover.py +++ b/toontown/coghq/DistributedMover.py @@ -1,19 +1,24 @@ -from panda3d.core import * -from direct.interval.IntervalGlobal import * -from .StomperGlobals import * -from direct.distributed import ClockDelta -from direct.showbase.PythonUtil import lerp import math -from otp.level import DistributedEntity -from direct.directnotify import DirectNotifyGlobal -from panda3d.core import NodePath -from otp.level import BasicEntities -from direct.task import Task -from toontown.toonbase import ToontownGlobals -from toontown.coghq import BattleBlocker import random from math import * +from panda3d.core import * +from panda3d.core import NodePath + +from direct.directnotify import DirectNotifyGlobal +from direct.distributed import ClockDelta +from direct.interval.IntervalGlobal import * +from direct.showbase.PythonUtil import lerp +from direct.task import Task + +from otp.level import BasicEntities, DistributedEntity + +from toontown.coghq import BattleBlocker +from toontown.toonbase import ToontownGlobals + +from .StomperGlobals import * + + class DistributedMover(BasicEntities.DistributedNodePathEntity): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedMover') laserFieldModels = ['phase_9/models/cogHQ/square_stomper'] diff --git a/toontown/coghq/DistributedMoverAI.py b/toontown/coghq/DistributedMoverAI.py index 27aa5b7..d83d059 100644 --- a/toontown/coghq/DistributedMoverAI.py +++ b/toontown/coghq/DistributedMoverAI.py @@ -1,15 +1,15 @@ -from otp.ai.AIBase import * -from direct.interval.IntervalGlobal import * +import random + from direct.directnotify import DirectNotifyGlobal from direct.distributed import ClockDelta +from direct.interval.IntervalGlobal import * from direct.task import Task -from otp.level import DistributedEntityAI -from otp.level import BasicEntities -from direct.directnotify import DirectNotifyGlobal -from toontown.coghq import BattleBlockerAI -from toontown.coghq import LaserGameMineSweeper -from toontown.coghq import LaserGameRoll -import random + +from otp.ai.AIBase import * +from otp.level import BasicEntities, DistributedEntityAI + +from toontown.coghq import BattleBlockerAI, LaserGameMineSweeper, LaserGameRoll + class DistributedMoverAI(DistributedEntityAI.DistributedEntityAI, NodePath, BasicEntities.NodePathAttribs): diff --git a/toontown/coghq/DistributedSecurityCamera.py b/toontown/coghq/DistributedSecurityCamera.py index 8f0ee4a..15a3e8b 100644 --- a/toontown/coghq/DistributedSecurityCamera.py +++ b/toontown/coghq/DistributedSecurityCamera.py @@ -1,19 +1,24 @@ -from panda3d.core import * -from direct.interval.IntervalGlobal import * -from .StomperGlobals import * -from direct.distributed import ClockDelta -from direct.showbase.PythonUtil import lerp import math -from otp.level import DistributedEntity -from direct.directnotify import DirectNotifyGlobal -from panda3d.core import NodePath -from otp.level import BasicEntities -from direct.task import Task -from toontown.toonbase import ToontownGlobals -from toontown.coghq import BattleBlocker import random from math import * +from panda3d.core import * +from panda3d.core import NodePath + +from direct.directnotify import DirectNotifyGlobal +from direct.distributed import ClockDelta +from direct.interval.IntervalGlobal import * +from direct.showbase.PythonUtil import lerp +from direct.task import Task + +from otp.level import BasicEntities, DistributedEntity + +from toontown.coghq import BattleBlocker +from toontown.toonbase import ToontownGlobals + +from .StomperGlobals import * + + def circleX(angle, radius, centerX, centerY): x = radius * cos(angle) + centerX return x diff --git a/toontown/coghq/DistributedSecurityCameraAI.py b/toontown/coghq/DistributedSecurityCameraAI.py index b616b28..15554c4 100644 --- a/toontown/coghq/DistributedSecurityCameraAI.py +++ b/toontown/coghq/DistributedSecurityCameraAI.py @@ -1,15 +1,15 @@ -from otp.ai.AIBase import * -from direct.interval.IntervalGlobal import * +import random + from direct.directnotify import DirectNotifyGlobal from direct.distributed import ClockDelta +from direct.interval.IntervalGlobal import * from direct.task import Task -from otp.level import DistributedEntityAI -from otp.level import BasicEntities -from direct.directnotify import DirectNotifyGlobal -from toontown.coghq import BattleBlockerAI -from toontown.coghq import LaserGameMineSweeper -from toontown.coghq import LaserGameRoll -import random + +from otp.ai.AIBase import * +from otp.level import BasicEntities, DistributedEntityAI + +from toontown.coghq import BattleBlockerAI, LaserGameMineSweeper, LaserGameRoll + class DistributedSecurityCameraAI(DistributedEntityAI.DistributedEntityAI, NodePath, BasicEntities.NodePathAttribs): diff --git a/toontown/coghq/DistributedSellbotHQDoor.py b/toontown/coghq/DistributedSellbotHQDoor.py index 158497b..2511ff5 100644 --- a/toontown/coghq/DistributedSellbotHQDoor.py +++ b/toontown/coghq/DistributedSellbotHQDoor.py @@ -1,8 +1,11 @@ from direct.directnotify import DirectNotifyGlobal + from toontown.coghq import DistributedCogHQDoor from toontown.toonbase import TTLocalizer + from . import CogDisguiseGlobals + class DistributedSellbotHQDoor(DistributedCogHQDoor.DistributedCogHQDoor): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedSellbotHQDoor') diff --git a/toontown/coghq/DistributedSellbotHQDoorAI.py b/toontown/coghq/DistributedSellbotHQDoorAI.py index 991c7c1..a1e1e1e 100644 --- a/toontown/coghq/DistributedSellbotHQDoorAI.py +++ b/toontown/coghq/DistributedSellbotHQDoorAI.py @@ -1,11 +1,14 @@ from direct.directnotify import DirectNotifyGlobal -from toontown.coghq import DistributedCogHQDoorAI -from toontown.building import FADoorCodes, DoorTypes -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import ToontownAccessAI -from . import CogDisguiseGlobals + from otp.otpbase import OTPGlobals +from toontown.building import DoorTypes, FADoorCodes +from toontown.coghq import DistributedCogHQDoorAI +from toontown.toonbase import ToontownAccessAI, ToontownGlobals + +from . import CogDisguiseGlobals + + class DistributedSellbotHQDoorAI(DistributedCogHQDoorAI.DistributedCogHQDoorAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedSellbotHQDoorAI') diff --git a/toontown/coghq/DistributedSinkingPlatform.py b/toontown/coghq/DistributedSinkingPlatform.py index ea3b6f5..d0f4a32 100644 --- a/toontown/coghq/DistributedSinkingPlatform.py +++ b/toontown/coghq/DistributedSinkingPlatform.py @@ -1,13 +1,15 @@ from panda3d.core import * -from direct.distributed.ClockDelta import * -from direct.interval.IntervalGlobal import * -from direct.fsm import ClassicFSM, State -from direct.fsm import State -from otp.level import BasicEntities -from . import MovingPlatform -from direct.distributed import DistributedObject -from . import SinkingPlatformGlobals + from direct.directnotify import DirectNotifyGlobal +from direct.distributed import DistributedObject +from direct.distributed.ClockDelta import * +from direct.fsm import ClassicFSM, State +from direct.interval.IntervalGlobal import * + +from otp.level import BasicEntities + +from . import MovingPlatform, SinkingPlatformGlobals + class DistributedSinkingPlatform(BasicEntities.DistributedNodePathEntity): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedSinkingPlatform') diff --git a/toontown/coghq/DistributedSinkingPlatformAI.py b/toontown/coghq/DistributedSinkingPlatformAI.py index a2da2a6..9d613cd 100644 --- a/toontown/coghq/DistributedSinkingPlatformAI.py +++ b/toontown/coghq/DistributedSinkingPlatformAI.py @@ -1,8 +1,11 @@ -from otp.ai.AIBase import * from direct.directnotify import DirectNotifyGlobal + +from otp.ai.AIBase import * from otp.level import DistributedEntityAI + from . import SinkingPlatformGlobals + class DistributedSinkingPlatformAI(DistributedEntityAI.DistributedEntityAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedSinkingPlatformAI') diff --git a/toontown/coghq/DistributedStage.py b/toontown/coghq/DistributedStage.py index 1e8fc16..a177259 100644 --- a/toontown/coghq/DistributedStage.py +++ b/toontown/coghq/DistributedStage.py @@ -1,17 +1,21 @@ -from panda3d.core import * -from direct.distributed.ClockDelta import * -from direct.distributed import DistributedObject -from direct.directnotify import DirectNotifyGlobal -from direct.showbase import BulletinBoardWatcher -from otp.otpbase import OTPGlobals -from toontown.toonbase.ToontownGlobals import * -from toontown.toonbase import TTLocalizer -from direct.gui import OnscreenText -from toontown.toonbase import ToontownGlobals -from toontown.coghq import DistributedStageRoom, StageLayout, StageRoom import random -from direct.task.Task import Task + +from panda3d.core import * + +from direct.directnotify import DirectNotifyGlobal +from direct.distributed import DistributedObject +from direct.distributed.ClockDelta import * +from direct.gui import OnscreenText from direct.interval.IntervalGlobal import * +from direct.showbase import BulletinBoardWatcher +from direct.task.Task import Task + +from otp.otpbase import OTPGlobals + +from toontown.coghq import DistributedStageRoom, StageLayout, StageRoom +from toontown.toonbase import ToontownGlobals, TTLocalizer +from toontown.toonbase.ToontownGlobals import * + class DistributedStage(DistributedObject.DistributedObject): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedStage') diff --git a/toontown/coghq/DistributedStageAI.py b/toontown/coghq/DistributedStageAI.py index f6ffd71..1607441 100644 --- a/toontown/coghq/DistributedStageAI.py +++ b/toontown/coghq/DistributedStageAI.py @@ -1,12 +1,15 @@ -from direct.distributed import DistributedObjectAI -from otp.level import DistributedLevelAI -from direct.directnotify import DirectNotifyGlobal -from toontown.toonbase import ToontownGlobals -from toontown.coghq import StageLayout, DistributedStageRoomAI -from toontown.coghq import BattleExperienceAggregatorAI -from toontown.building import DistributedElevatorFloorAI from panda3d.core import * +from direct.directnotify import DirectNotifyGlobal +from direct.distributed import DistributedObjectAI + +from otp.level import DistributedLevelAI + +from toontown.building import DistributedElevatorFloorAI +from toontown.coghq import BattleExperienceAggregatorAI, DistributedStageRoomAI, StageLayout +from toontown.toonbase import ToontownGlobals + + class DistributedStageAI(DistributedObjectAI.DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedStageAI') diff --git a/toontown/coghq/DistributedStageBattle.py b/toontown/coghq/DistributedStageBattle.py index fdd7216..fa7e848 100644 --- a/toontown/coghq/DistributedStageBattle.py +++ b/toontown/coghq/DistributedStageBattle.py @@ -1,18 +1,22 @@ +import random + from panda3d.core import * from panda3d.otp import * + +from direct.directnotify import DirectNotifyGlobal +from direct.fsm import ClassicFSM, State from direct.interval.IntervalGlobal import * + +from otp.avatar import Emote + +from toontown.battle import SuitBattleGlobals from toontown.battle.BattleBase import * from toontown.coghq import DistributedLevelBattle -from direct.directnotify import DirectNotifyGlobal -from toontown.toon import TTEmote -from otp.avatar import Emote -from toontown.battle import SuitBattleGlobals -import random from toontown.suit import SuitDNA -from direct.fsm import State -from direct.fsm import ClassicFSM, State +from toontown.toon import TTEmote from toontown.toonbase import ToontownGlobals + class DistributedStageBattle(DistributedLevelBattle.DistributedLevelBattle): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedStageBattle') diff --git a/toontown/coghq/DistributedStageBattleAI.py b/toontown/coghq/DistributedStageBattleAI.py index fa9849d..c37356a 100644 --- a/toontown/coghq/DistributedStageBattleAI.py +++ b/toontown/coghq/DistributedStageBattleAI.py @@ -1,14 +1,17 @@ -from toontown.toonbase import ToontownGlobals -from toontown.coghq import DistributedLevelBattleAI from direct.directnotify import DirectNotifyGlobal -from direct.fsm import State from direct.fsm import ClassicFSM, State -from toontown.battle.BattleBase import * -from . import CogDisguiseGlobals -from toontown.toonbase.ToontownBattleGlobals import getStageCreditMultiplier from direct.showbase.PythonUtil import addListsByValue + from otp.otpbase.PythonUtil import enumerate +from toontown.battle.BattleBase import * +from toontown.coghq import DistributedLevelBattleAI +from toontown.toonbase import ToontownGlobals +from toontown.toonbase.ToontownBattleGlobals import getStageCreditMultiplier + +from . import CogDisguiseGlobals + + class DistributedStageBattleAI(DistributedLevelBattleAI.DistributedLevelBattleAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedStageBattleAI') diff --git a/toontown/coghq/DistributedStageRoom.py b/toontown/coghq/DistributedStageRoom.py index e4b6086..cb848af 100644 --- a/toontown/coghq/DistributedStageRoom.py +++ b/toontown/coghq/DistributedStageRoom.py @@ -1,15 +1,18 @@ +import random + from panda3d.core import * -from toontown.toonbase.ToontownGlobals import * + +from direct.directnotify import DirectNotifyGlobal from direct.distributed.ClockDelta import * from direct.interval.IntervalGlobal import * -import random -from otp.level import DistributedLevel -from direct.directnotify import DirectNotifyGlobal -from . import StageRoomBase, StageRoom -from . import FactoryEntityCreator -from . import StageRoomSpecs -from otp.level import LevelSpec, LevelConstants + +from otp.level import DistributedLevel, LevelConstants, LevelSpec + from toontown.toonbase import TTLocalizer +from toontown.toonbase.ToontownGlobals import * + +from . import FactoryEntityCreator, StageRoom, StageRoomBase, StageRoomSpecs + if __dev__: from otp.level import EditorGlobals diff --git a/toontown/coghq/DistributedStageRoomAI.py b/toontown/coghq/DistributedStageRoomAI.py index 05dd64b..e437794 100644 --- a/toontown/coghq/DistributedStageRoomAI.py +++ b/toontown/coghq/DistributedStageRoomAI.py @@ -1,12 +1,13 @@ -from otp.level import DistributedLevelAI, LevelSpec from direct.directnotify import DirectNotifyGlobal from direct.task import Task -from otp.level import LevelSpec -from toontown.toonbase import ToontownGlobals, ToontownBattleGlobals -from toontown.coghq import FactoryEntityCreatorAI, StageRoomSpecs -from toontown.coghq import StageRoomBase, LevelSuitPlannerAI -from toontown.coghq import DistributedStageBattleAI + +from otp.level import DistributedLevelAI, LevelSpec + +from toontown.coghq import (DistributedStageBattleAI, FactoryEntityCreatorAI, LevelSuitPlannerAI, StageRoomBase, + StageRoomSpecs) from toontown.suit import DistributedStageSuitAI +from toontown.toonbase import ToontownBattleGlobals, ToontownGlobals + class DistributedStageRoomAI(DistributedLevelAI.DistributedLevelAI, StageRoomBase.StageRoomBase): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedStageRoomAI') diff --git a/toontown/coghq/DistributedStomper.py b/toontown/coghq/DistributedStomper.py index e2af9ea..31fcc48 100644 --- a/toontown/coghq/DistributedStomper.py +++ b/toontown/coghq/DistributedStomper.py @@ -1,15 +1,19 @@ -from panda3d.core import * -from direct.interval.IntervalGlobal import * -from .StomperGlobals import * -from direct.distributed import ClockDelta -from direct.showbase.PythonUtil import lerp import math -from . import DistributedCrusherEntity -from . import MovingPlatform + +from panda3d.core import * + from direct.directnotify import DirectNotifyGlobal +from direct.distributed import ClockDelta +from direct.interval.IntervalGlobal import * +from direct.showbase.PythonUtil import lerp from direct.task import Task + from toontown.toonbase import ToontownGlobals +from . import DistributedCrusherEntity, MovingPlatform +from .StomperGlobals import * + + class DistributedStomper(DistributedCrusherEntity.DistributedCrusherEntity): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedStomper') stomperSounds = ['phase_4/audio/sfx/CHQ_FACT_stomper_small.ogg', 'phase_9/audio/sfx/CHQ_FACT_stomper_med.ogg', 'phase_9/audio/sfx/CHQ_FACT_stomper_large.ogg'] diff --git a/toontown/coghq/DistributedStomperAI.py b/toontown/coghq/DistributedStomperAI.py index 456fd24..31851ab 100644 --- a/toontown/coghq/DistributedStomperAI.py +++ b/toontown/coghq/DistributedStomperAI.py @@ -1,8 +1,11 @@ -from otp.ai.AIBase import * -from direct.interval.IntervalGlobal import * from direct.directnotify import DirectNotifyGlobal -from . import DistributedCrusherEntityAI, StomperGlobals from direct.distributed import ClockDelta +from direct.interval.IntervalGlobal import * + +from otp.ai.AIBase import * + +from . import DistributedCrusherEntityAI, StomperGlobals + class DistributedStomperAI(DistributedCrusherEntityAI.DistributedCrusherEntityAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedStomperAI') diff --git a/toontown/coghq/DistributedStomperPair.py b/toontown/coghq/DistributedStomperPair.py index a3b7897..e1291f0 100644 --- a/toontown/coghq/DistributedStomperPair.py +++ b/toontown/coghq/DistributedStomperPair.py @@ -1,10 +1,15 @@ -from panda3d.core import * -from direct.interval.IntervalGlobal import * import math -from . import StomperGlobals + +from panda3d.core import * + from direct.directnotify import DirectNotifyGlobal +from direct.interval.IntervalGlobal import * + from otp.level import BasicEntities +from . import StomperGlobals + + class DistributedStomperPair(BasicEntities.DistributedNodePathEntity): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedStomperPair') diff --git a/toontown/coghq/DistributedStomperPairAI.py b/toontown/coghq/DistributedStomperPairAI.py index 9e9b916..655e39c 100644 --- a/toontown/coghq/DistributedStomperPairAI.py +++ b/toontown/coghq/DistributedStomperPairAI.py @@ -1,9 +1,12 @@ -from otp.ai.AIBase import * from direct.directnotify import DirectNotifyGlobal -from otp.level import DistributedEntityAI -from . import StomperGlobals from direct.distributed import ClockDelta +from otp.ai.AIBase import * +from otp.level import DistributedEntityAI + +from . import StomperGlobals + + class DistributedStomperPairAI(DistributedEntityAI.DistributedEntityAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedStomperAI') diff --git a/toontown/coghq/DistributedSwitch.py b/toontown/coghq/DistributedSwitch.py index 5539f0a..d8ad749 100644 --- a/toontown/coghq/DistributedSwitch.py +++ b/toontown/coghq/DistributedSwitch.py @@ -1,14 +1,16 @@ from panda3d.core import * -from panda3d.core import * -from direct.interval.IntervalGlobal import * -from direct.distributed.ClockDelta import * -from otp.level import BasicEntities -from . import DistributedSwitchBase -from . import MovingPlatform -from toontown.toonbase import ToontownGlobals + from direct.directnotify import DirectNotifyGlobal +from direct.distributed.ClockDelta import * from direct.fsm import ClassicFSM, State -from otp.level import DistributedEntity +from direct.interval.IntervalGlobal import * + +from otp.level import BasicEntities, DistributedEntity + +from toontown.toonbase import ToontownGlobals + +from . import DistributedSwitchBase, MovingPlatform + class DistributedSwitch(DistributedSwitchBase.DistributedSwitchBase, BasicEntities.DistributedNodePathEntity): diff --git a/toontown/coghq/DistributedSwitchAI.py b/toontown/coghq/DistributedSwitchAI.py index f9c637f..c5d5d4e 100644 --- a/toontown/coghq/DistributedSwitchAI.py +++ b/toontown/coghq/DistributedSwitchAI.py @@ -1,11 +1,13 @@ -from direct.distributed.ClockDelta import * from direct.directnotify import DirectNotifyGlobal -from . import DistributedSwitchBase -from direct.task import Task +from direct.distributed.ClockDelta import * from direct.fsm import ClassicFSM, State -from direct.fsm import State +from direct.task import Task + from otp.level import DistributedEntityAI +from . import DistributedSwitchBase + + class DistributedSwitchAI(DistributedSwitchBase.DistributedSwitchBase, DistributedEntityAI.DistributedEntityAI): def __init__(self, level, entId, zoneId=None): diff --git a/toontown/coghq/DistributedTrigger.py b/toontown/coghq/DistributedTrigger.py index 9dc01d4..64e78ea 100644 --- a/toontown/coghq/DistributedTrigger.py +++ b/toontown/coghq/DistributedTrigger.py @@ -1,13 +1,14 @@ from panda3d.core import * -from panda3d.core import * -from direct.interval.IntervalGlobal import * -from direct.distributed.ClockDelta import * -from . import MovingPlatform -from toontown.toonbase import ToontownGlobals + from direct.directnotify import DirectNotifyGlobal +from direct.distributed.ClockDelta import * from direct.fsm import ClassicFSM -from . import DistributedSwitch -from toontown.toonbase import TTLocalizer +from direct.interval.IntervalGlobal import * + +from toontown.toonbase import ToontownGlobals, TTLocalizer + +from . import DistributedSwitch, MovingPlatform + class DistributedTrigger(DistributedSwitch.DistributedSwitch): diff --git a/toontown/coghq/DistributedTriggerAI.py b/toontown/coghq/DistributedTriggerAI.py index e523689..67335b3 100644 --- a/toontown/coghq/DistributedTriggerAI.py +++ b/toontown/coghq/DistributedTriggerAI.py @@ -1,6 +1,8 @@ from direct.directnotify import DirectNotifyGlobal from direct.task import Task + from . import DistributedSwitchAI + class DistributedTriggerAI(DistributedSwitchAI.DistributedSwitchAI): pass diff --git a/toontown/coghq/FactoryBase.py b/toontown/coghq/FactoryBase.py index 52fae8b..64fa998 100644 --- a/toontown/coghq/FactoryBase.py +++ b/toontown/coghq/FactoryBase.py @@ -1,7 +1,10 @@ -from . import FactorySpecs from otp.level import LevelSpec + from toontown.toonbase import ToontownGlobals +from . import FactorySpecs + + class FactoryBase: def __init__(self): @@ -21,7 +24,8 @@ class FactoryBase: if __dev__: def getEntityTypeReg(self): - from . import FactoryEntityTypes from otp.level import EntityTypeRegistry + + from . import FactoryEntityTypes typeReg = EntityTypeRegistry.EntityTypeRegistry(FactoryEntityTypes) return typeReg diff --git a/toontown/coghq/FactoryCameraViews.py b/toontown/coghq/FactoryCameraViews.py index 648fccb..f2b494c 100644 --- a/toontown/coghq/FactoryCameraViews.py +++ b/toontown/coghq/FactoryCameraViews.py @@ -1,7 +1,10 @@ from panda3d.core import * -from direct.showbase.PythonUtil import Functor -from toontown.toonbase import ToontownGlobals + from direct.directnotify import DirectNotifyGlobal +from direct.showbase.PythonUtil import Functor + +from toontown.toonbase import ToontownGlobals + class FactoryCameraViews: notify = DirectNotifyGlobal.directNotify.newCategory('FactoryCameraViews') diff --git a/toontown/coghq/FactoryEntityCreator.py b/toontown/coghq/FactoryEntityCreator.py index e97a2cd..1dc900f 100644 --- a/toontown/coghq/FactoryEntityCreator.py +++ b/toontown/coghq/FactoryEntityCreator.py @@ -1,15 +1,8 @@ from otp.level import EntityCreator -from . import FactoryLevelMgr -from . import PlatformEntity -from . import ConveyorBelt -from . import GearEntity -from . import PaintMixer -from . import GoonClipPlane -from . import MintProduct -from . import MintProductPallet -from . import MintShelf -from . import PathMasterEntity -from . import RenderingEntity + +from . import (ConveyorBelt, FactoryLevelMgr, GearEntity, GoonClipPlane, MintProduct, MintProductPallet, MintShelf, + PaintMixer, PathMasterEntity, PlatformEntity, RenderingEntity) + class FactoryEntityCreator(EntityCreator.EntityCreator): diff --git a/toontown/coghq/FactoryEntityCreatorAI.py b/toontown/coghq/FactoryEntityCreatorAI.py index 6804aea..5e29c68 100644 --- a/toontown/coghq/FactoryEntityCreatorAI.py +++ b/toontown/coghq/FactoryEntityCreatorAI.py @@ -1,11 +1,17 @@ -from otp.level import EntityCreatorAI from direct.showbase.PythonUtil import Functor -from . import DistributedBeanBarrelAI, DistributedButtonAI, DistributedCrateAI, DistributedLiftAI, DistributedDoorEntityAI, DistributedGagBarrelAI, DistributedGridAI -from toontown.suit import DistributedGridGoonAI -from toontown.suit import DistributedGoonAI -from . import DistributedHealBarrelAI, DistributedStomperPairAI, DistributedTriggerAI, DistributedStomperAI, DistributedLaserFieldAI, DistributedSecurityCameraAI, DistributedMoverAI, DistributedElevatorMarkerAI, DistributedSinkingPlatformAI, ActiveCellAI, CrusherCellAI, DirectionalCellAI, FactoryLevelMgrAI, BattleBlockerAI, DistributedGolfGreenGameAI -from toontown.coghq import DistributedMoleFieldAI -from toontown.coghq import DistributedMazeAI + +from otp.level import EntityCreatorAI + +from toontown.coghq import DistributedMazeAI, DistributedMoleFieldAI +from toontown.suit import DistributedGoonAI, DistributedGridGoonAI + +from . import (ActiveCellAI, BattleBlockerAI, CrusherCellAI, DirectionalCellAI, DistributedBeanBarrelAI, + DistributedButtonAI, DistributedCrateAI, DistributedDoorEntityAI, DistributedElevatorMarkerAI, + DistributedGagBarrelAI, DistributedGolfGreenGameAI, DistributedGridAI, DistributedHealBarrelAI, + DistributedLaserFieldAI, DistributedLiftAI, DistributedMoverAI, DistributedSecurityCameraAI, + DistributedSinkingPlatformAI, DistributedStomperAI, DistributedStomperPairAI, DistributedTriggerAI, + FactoryLevelMgrAI) + class FactoryEntityCreatorAI(EntityCreatorAI.EntityCreatorAI): diff --git a/toontown/coghq/FactoryEntityTypes.py b/toontown/coghq/FactoryEntityTypes.py index 87494f9..23f5ec4 100644 --- a/toontown/coghq/FactoryEntityTypes.py +++ b/toontown/coghq/FactoryEntityTypes.py @@ -1,5 +1,6 @@ from otp.level.EntityTypes import * + class FactoryLevelMgr(LevelMgr): type = 'levelMgr' attribs = (('cogLevel', diff --git a/toontown/coghq/FactoryExterior.py b/toontown/coghq/FactoryExterior.py index f0fbedc..beb4bad 100644 --- a/toontown/coghq/FactoryExterior.py +++ b/toontown/coghq/FactoryExterior.py @@ -1,15 +1,18 @@ -from direct.directnotify import DirectNotifyGlobal -from toontown.battle import BattlePlace -from direct.fsm import ClassicFSM, State -from direct.fsm import State -from otp.distributed.TelemetryLimiter import RotationLimitToH, TLGatherAllAvs -from toontown.toonbase import ToontownGlobals -from toontown.hood import ZoneUtil -from toontown.building import Elevator from panda3d.core import * from panda3d.otp import * from panda3d.toontown import * +from direct.directnotify import DirectNotifyGlobal +from direct.fsm import ClassicFSM, State + +from otp.distributed.TelemetryLimiter import RotationLimitToH, TLGatherAllAvs + +from toontown.battle import BattlePlace +from toontown.building import Elevator +from toontown.hood import ZoneUtil +from toontown.toonbase import ToontownGlobals + + class FactoryExterior(BattlePlace.BattlePlace): notify = DirectNotifyGlobal.directNotify.newCategory('FactoryExterior') diff --git a/toontown/coghq/FactoryInterior.py b/toontown/coghq/FactoryInterior.py index 9c06c86..76b013d 100644 --- a/toontown/coghq/FactoryInterior.py +++ b/toontown/coghq/FactoryInterior.py @@ -1,17 +1,18 @@ -from direct.directnotify import DirectNotifyGlobal -from toontown.battle import BattlePlace -from direct.fsm import ClassicFSM, State -from direct.fsm import State from panda3d.core import * from panda3d.otp import * + +from direct.directnotify import DirectNotifyGlobal +from direct.fsm import ClassicFSM, State + from otp.distributed.TelemetryLimiter import RotationLimitToH, TLGatherAllAvs -from toontown.toon import Toon -from toontown.toonbase import ToontownGlobals -from toontown.hood import ZoneUtil -from toontown.toonbase import TTLocalizer -from toontown.toontowngui import TTDialog -from toontown.toonbase import ToontownBattleGlobals + +from toontown.battle import BattlePlace from toontown.building import Elevator +from toontown.hood import ZoneUtil +from toontown.toon import Toon +from toontown.toonbase import ToontownBattleGlobals, ToontownGlobals, TTLocalizer +from toontown.toontowngui import TTDialog + class FactoryInterior(BattlePlace.BattlePlace): notify = DirectNotifyGlobal.directNotify.newCategory('FactoryInterior') diff --git a/toontown/coghq/FactoryLevelMgr.py b/toontown/coghq/FactoryLevelMgr.py index 3ec7ad4..f5eb9e9 100644 --- a/toontown/coghq/FactoryLevelMgr.py +++ b/toontown/coghq/FactoryLevelMgr.py @@ -1,8 +1,12 @@ -from otp.level import LevelMgr -from . import FactoryUtil from direct.showbase.PythonUtil import Functor + +from otp.level import LevelMgr + from toontown.toonbase import ToontownGlobals +from . import FactoryUtil + + class FactoryLevelMgr(LevelMgr.LevelMgr): InterestingLocations = [(((-866, -272, -40), -101), ((-662, -242, 7.5), 0), diff --git a/toontown/coghq/FactoryLevelMgrAI.py b/toontown/coghq/FactoryLevelMgrAI.py index 04eebfa..38ce4b1 100644 --- a/toontown/coghq/FactoryLevelMgrAI.py +++ b/toontown/coghq/FactoryLevelMgrAI.py @@ -1,5 +1,6 @@ from otp.level import LevelMgrAI + class FactoryLevelMgrAI(LevelMgrAI.LevelMgrAI): def __init__(self, level, entId): diff --git a/toontown/coghq/FactoryManagerAI.py b/toontown/coghq/FactoryManagerAI.py index 9281a5f..b5627ae 100644 --- a/toontown/coghq/FactoryManagerAI.py +++ b/toontown/coghq/FactoryManagerAI.py @@ -1,8 +1,11 @@ from direct.directnotify import DirectNotifyGlobal -from . import DistributedFactoryAI -from toontown.toonbase import ToontownGlobals from direct.showbase import DirectObject +from toontown.toonbase import ToontownGlobals + +from . import DistributedFactoryAI + + class FactoryManagerAI(DirectObject.DirectObject): notify = DirectNotifyGlobal.directNotify.newCategory('FactoryManagerAI') factoryId = None diff --git a/toontown/coghq/FactoryMockupCogs.py b/toontown/coghq/FactoryMockupCogs.py index aee992c..5fd3723 100644 --- a/toontown/coghq/FactoryMockupCogs.py +++ b/toontown/coghq/FactoryMockupCogs.py @@ -1,4 +1,5 @@ from .SpecImports import * + BattleCells = {} CogData = [] ReserveCogData = [] diff --git a/toontown/coghq/FactoryMockupSpec.py b/toontown/coghq/FactoryMockupSpec.py index a5b5795..38c9f23 100644 --- a/toontown/coghq/FactoryMockupSpec.py +++ b/toontown/coghq/FactoryMockupSpec.py @@ -1,4 +1,5 @@ from .SpecImports import * + GlobalEntities = {1000: {'type': 'levelMgr', 'name': 'LevelMgr', 'comment': '', diff --git a/toontown/coghq/FactorySpecs.py b/toontown/coghq/FactorySpecs.py index 7b2a5be..02d9ba2 100644 --- a/toontown/coghq/FactorySpecs.py +++ b/toontown/coghq/FactorySpecs.py @@ -1,8 +1,7 @@ from toontown.toonbase import ToontownGlobals -from . import SellbotLegFactorySpec -from . import SellbotLegFactoryCogs -from . import LawbotLegFactorySpec -from . import LawbotLegFactoryCogs + +from . import LawbotLegFactoryCogs, LawbotLegFactorySpec, SellbotLegFactoryCogs, SellbotLegFactorySpec + def getFactorySpecModule(factoryId): return FactorySpecModules[factoryId] diff --git a/toontown/coghq/FactoryUtil.py b/toontown/coghq/FactoryUtil.py index 9ae171f..92d9313 100644 --- a/toontown/coghq/FactoryUtil.py +++ b/toontown/coghq/FactoryUtil.py @@ -1,11 +1,14 @@ from panda3d.core import * -from direct.showbase import DirectObject + from direct.interval.IntervalGlobal import * -from toontown.toonbase import ToontownGlobals -from . import MovingPlatform +from direct.showbase import DirectObject from direct.task.Task import Task -from toontown.suit import Suit -from toontown.suit import SuitDNA + +from toontown.suit import Suit, SuitDNA +from toontown.toonbase import ToontownGlobals + +from . import MovingPlatform + class Ouch(DirectObject.DirectObject): diff --git a/toontown/coghq/GameSprite3D.py b/toontown/coghq/GameSprite3D.py index 5afca16..6be7088 100644 --- a/toontown/coghq/GameSprite3D.py +++ b/toontown/coghq/GameSprite3D.py @@ -1,8 +1,11 @@ -from panda3d.core import * -from direct.interval.IntervalGlobal import * import math import random +from panda3d.core import * + +from direct.interval.IntervalGlobal import * + + class GameSprite: colorRed = Vec4(1, 0.2, 0.2, 1) colorBlue = Vec4(0.7, 0.8, 1, 1) diff --git a/toontown/coghq/GearEntity.py b/toontown/coghq/GearEntity.py index 175b21c..09af2c6 100644 --- a/toontown/coghq/GearEntity.py +++ b/toontown/coghq/GearEntity.py @@ -1,8 +1,12 @@ -from direct.interval.IntervalGlobal import * -from otp.level import BasicEntities -from . import MovingPlatform from panda3d.core import Vec3 +from direct.interval.IntervalGlobal import * + +from otp.level import BasicEntities + +from . import MovingPlatform + + class GearEntity(BasicEntities.NodePathEntity): ModelPaths = {'factory': 'phase_9/models/cogHQ/FactoryGearB', 'mint': 'phase_10/models/cashbotHQ/MintGear'} diff --git a/toontown/coghq/GoonClipPlane.py b/toontown/coghq/GoonClipPlane.py index 31bfb0a..ebd8b44 100644 --- a/toontown/coghq/GoonClipPlane.py +++ b/toontown/coghq/GoonClipPlane.py @@ -1,7 +1,10 @@ from panda3d.core import * + from direct.interval.IntervalGlobal import * + from otp.level import BasicEntities + class GoonClipPlane(BasicEntities.NodePathEntity): def __init__(self, level, entId): diff --git a/toontown/coghq/InGameEditor.py b/toontown/coghq/InGameEditor.py index 082e3a3..5ea5467 100644 --- a/toontown/coghq/InGameEditor.py +++ b/toontown/coghq/InGameEditor.py @@ -1,23 +1,26 @@ -from panda3d.core import Point3, Vec3, VBase3 -from direct.tkwidgets.AppShell import * -from direct.showbase.TkGlobal import * -from direct.tkwidgets.Tree import * -from direct.tkwidgets import Slider, Floater -from tkinter.simpledialog import askstring -from tkinter.messagebox import showwarning, askyesno -from tkinter import * -from direct.showbase.PythonUtil import Functor, list2dict -from direct.gui.DirectGui import DGG -import tkinter.filedialog -from direct.showbase import DirectObject import math import operator -from direct.tkwidgets import Valuator -from direct.tkwidgets import VectorWidgets -from otp.level import LevelConstants +import tkinter.filedialog +from tkinter import * +from tkinter.messagebox import askyesno, showwarning +from tkinter.simpledialog import askstring + +from panda3d.core import Point3, VBase3, Vec3 + from direct.directtools import DirectSession +from direct.gui.DirectGui import DGG +from direct.showbase import DirectObject +from direct.showbase.PythonUtil import Functor, list2dict +from direct.showbase.TkGlobal import * +from direct.tkwidgets import Floater, Slider, Valuator, VectorWidgets +from direct.tkwidgets.AppShell import * +from direct.tkwidgets.Tree import * + import Pmw +from otp.level import LevelConstants + + class InGameEditor(AppShell): appname = 'In-Game Editor' frameWidth = 900 diff --git a/toontown/coghq/InGameEditorDCImports.py b/toontown/coghq/InGameEditorDCImports.py index 86b4eb3..9e6d33a 100644 --- a/toontown/coghq/InGameEditorDCImports.py +++ b/toontown/coghq/InGameEditorDCImports.py @@ -1,3 +1,4 @@ if __dev__: from direct.directutil import DistributedLargeBlobSender + from . import DistributedInGameEditor diff --git a/toontown/coghq/InGameEditorDCImportsAI.py b/toontown/coghq/InGameEditorDCImportsAI.py index 6368bcf..ce2d826 100644 --- a/toontown/coghq/InGameEditorDCImportsAI.py +++ b/toontown/coghq/InGameEditorDCImportsAI.py @@ -1,3 +1,4 @@ if __dev__: from direct.directutil import DistributedLargeBlobSenderAI + from . import DistributedInGameEditorAI diff --git a/toontown/coghq/InGameEditorElements.py b/toontown/coghq/InGameEditorElements.py index 73cba9f..ac70392 100644 --- a/toontown/coghq/InGameEditorElements.py +++ b/toontown/coghq/InGameEditorElements.py @@ -1,5 +1,6 @@ from direct.showbase import DirectObject + class InGameEditorElement(DirectObject.DirectObject): elementId = 0 diff --git a/toontown/coghq/LaserGameAvoid.py b/toontown/coghq/LaserGameAvoid.py index 311f284..390e774 100644 --- a/toontown/coghq/LaserGameAvoid.py +++ b/toontown/coghq/LaserGameAvoid.py @@ -1,7 +1,10 @@ -from toontown.coghq import LaserGameBase +import random + from direct.distributed import ClockDelta from direct.task import Task -import random + +from toontown.coghq import LaserGameBase + class LaserGameAvoid(LaserGameBase.LaserGameBase): diff --git a/toontown/coghq/LaserGameBase.py b/toontown/coghq/LaserGameBase.py index add716d..35b906b 100644 --- a/toontown/coghq/LaserGameBase.py +++ b/toontown/coghq/LaserGameBase.py @@ -1,6 +1,8 @@ +import random + from direct.distributed import ClockDelta from direct.task import Task -import random + class LaserGameBase: diff --git a/toontown/coghq/LaserGameDrag.py b/toontown/coghq/LaserGameDrag.py index 35fffe4..7887c9e 100644 --- a/toontown/coghq/LaserGameDrag.py +++ b/toontown/coghq/LaserGameDrag.py @@ -1,7 +1,10 @@ -from toontown.coghq import LaserGameBase +import random + from direct.distributed import ClockDelta from direct.task import Task -import random + +from toontown.coghq import LaserGameBase + class LaserGameDrag(LaserGameBase.LaserGameBase): diff --git a/toontown/coghq/LaserGameMineSweeper.py b/toontown/coghq/LaserGameMineSweeper.py index 2f688b0..c9d3e0f 100644 --- a/toontown/coghq/LaserGameMineSweeper.py +++ b/toontown/coghq/LaserGameMineSweeper.py @@ -1,7 +1,10 @@ -from toontown.coghq import LaserGameBase +import random + from direct.distributed import ClockDelta from direct.task import Task -import random + +from toontown.coghq import LaserGameBase + class LaserGameMineSweeper(LaserGameBase.LaserGameBase): diff --git a/toontown/coghq/LaserGameRoll.py b/toontown/coghq/LaserGameRoll.py index 6592d06..762a00d 100644 --- a/toontown/coghq/LaserGameRoll.py +++ b/toontown/coghq/LaserGameRoll.py @@ -1,7 +1,10 @@ -from toontown.coghq import LaserGameBase +import random + from direct.distributed import ClockDelta from direct.task import Task -import random + +from toontown.coghq import LaserGameBase + class LaserGameRoll(LaserGameBase.LaserGameBase): diff --git a/toontown/coghq/LawOfficeBase.py b/toontown/coghq/LawOfficeBase.py index 6ec851c..8f2e973 100644 --- a/toontown/coghq/LawOfficeBase.py +++ b/toontown/coghq/LawOfficeBase.py @@ -1,7 +1,10 @@ -from . import FactorySpecs from otp.level import LevelSpec + from toontown.toonbase import ToontownGlobals +from . import FactorySpecs + + class LawOfficeBase: def __init__(self): @@ -21,7 +24,8 @@ class LawOfficeBase: if __dev__: def getEntityTypeReg(self): - from . import FactoryEntityTypes from otp.level import EntityTypeRegistry + + from . import FactoryEntityTypes typeReg = EntityTypeRegistry.EntityTypeRegistry(FactoryEntityTypes) return typeReg diff --git a/toontown/coghq/LawOfficeLayout.py b/toontown/coghq/LawOfficeLayout.py index 98d5ab5..d13805a 100644 --- a/toontown/coghq/LawOfficeLayout.py +++ b/toontown/coghq/LawOfficeLayout.py @@ -1,9 +1,11 @@ +import random + from direct.directnotify import DirectNotifyGlobal -from direct.showbase.PythonUtil import invertDictLossless +from direct.showbase.PythonUtil import invertDictLossless, lerp, normalDistrib + from toontown.coghq import MintRoomSpecs from toontown.toonbase import ToontownGlobals -from direct.showbase.PythonUtil import normalDistrib, lerp -import random + OfficeBuildingFloorSequences = { 13300: [ (0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0)]} diff --git a/toontown/coghq/LawOfficeManagerAI.py b/toontown/coghq/LawOfficeManagerAI.py index 1aa4b62..b54e999 100644 --- a/toontown/coghq/LawOfficeManagerAI.py +++ b/toontown/coghq/LawOfficeManagerAI.py @@ -1,9 +1,13 @@ +import random + from direct.directnotify import DirectNotifyGlobal -from . import DistributedLawOfficeAI, DistributedStageAI +from direct.showbase import DirectObject + from toontown.coghq import StageLayout from toontown.toonbase import ToontownGlobals -from direct.showbase import DirectObject -import random + +from . import DistributedLawOfficeAI, DistributedStageAI + StageId2Layouts = {ToontownGlobals.LawbotStageIntA: (0, 1, 2), ToontownGlobals.LawbotStageIntB: (3, 4, 5), ToontownGlobals.LawbotStageIntC: (6, 7, 8), ToontownGlobals.LawbotStageIntD: (9, 10, 11)} class LawOfficeManagerAI(DirectObject.DirectObject): diff --git a/toontown/coghq/LawOffice_Spec_Tier0_a.py b/toontown/coghq/LawOffice_Spec_Tier0_a.py index 838186b..1819048 100644 --- a/toontown/coghq/LawOffice_Spec_Tier0_a.py +++ b/toontown/coghq/LawOffice_Spec_Tier0_a.py @@ -1,4 +1,5 @@ from toontown.coghq.SpecImports import * + GlobalEntities = { 1000: { 'type': 'levelMgr', diff --git a/toontown/coghq/LawOffice_Spec_Tier0_b.py b/toontown/coghq/LawOffice_Spec_Tier0_b.py index 3da523f..da3c7e4 100644 --- a/toontown/coghq/LawOffice_Spec_Tier0_b.py +++ b/toontown/coghq/LawOffice_Spec_Tier0_b.py @@ -1,4 +1,5 @@ from toontown.coghq.SpecImports import * + GlobalEntities = { 1000: { 'type': 'levelMgr', diff --git a/toontown/coghq/LawbotCogHQLoader.py b/toontown/coghq/LawbotCogHQLoader.py index c4eeadd..13eab1c 100644 --- a/toontown/coghq/LawbotCogHQLoader.py +++ b/toontown/coghq/LawbotCogHQLoader.py @@ -1,15 +1,12 @@ from direct.directnotify import DirectNotifyGlobal -from direct.fsm import StateData -from . import CogHQLoader -from toontown.toonbase import ToontownGlobals +from direct.fsm import State, StateData from direct.gui import DirectGui -from toontown.toonbase import TTLocalizer + from toontown.toon import Toon -from direct.fsm import State -from . import StageInterior -from . import LawbotHQExterior -from . import LawbotHQBossBattle -from . import LawbotOfficeExterior +from toontown.toonbase import ToontownGlobals, TTLocalizer + +from . import CogHQLoader, LawbotHQBossBattle, LawbotHQExterior, LawbotOfficeExterior, StageInterior + aspectSF = 0.7227 class LawbotCogHQLoader(CogHQLoader.CogHQLoader): diff --git a/toontown/coghq/LawbotHQBossBattle.py b/toontown/coghq/LawbotHQBossBattle.py index 2521b3d..bbdefca 100644 --- a/toontown/coghq/LawbotHQBossBattle.py +++ b/toontown/coghq/LawbotHQBossBattle.py @@ -1,8 +1,11 @@ from panda3d.core import * -from direct.interval.IntervalGlobal import * -from toontown.suit import DistributedLawbotBoss + from direct.directnotify import DirectNotifyGlobal +from direct.interval.IntervalGlobal import * + from toontown.coghq import CogHQBossBattle +from toontown.suit import DistributedLawbotBoss + class LawbotHQBossBattle(CogHQBossBattle.CogHQBossBattle): notify = DirectNotifyGlobal.directNotify.newCategory('LawbotHQBossBattle') diff --git a/toontown/coghq/LawbotHQExterior.py b/toontown/coghq/LawbotHQExterior.py index bb4dc24..dd61161 100644 --- a/toontown/coghq/LawbotHQExterior.py +++ b/toontown/coghq/LawbotHQExterior.py @@ -1,11 +1,13 @@ -from direct.directnotify import DirectNotifyGlobal -from toontown.battle import BattlePlace -from direct.fsm import ClassicFSM, State -from direct.fsm import State -from toontown.toonbase import ToontownGlobals -from toontown.building import Elevator from panda3d.core import * + +from direct.directnotify import DirectNotifyGlobal +from direct.fsm import ClassicFSM, State + +from toontown.battle import BattlePlace +from toontown.building import Elevator from toontown.coghq import CogHQExterior +from toontown.toonbase import ToontownGlobals + class LawbotHQExterior(CogHQExterior.CogHQExterior): notify = DirectNotifyGlobal.directNotify.newCategory('LawbotHQExterior') diff --git a/toontown/coghq/LawbotLegFactoryCogs.py b/toontown/coghq/LawbotLegFactoryCogs.py index 0209c75..4303b5a 100644 --- a/toontown/coghq/LawbotLegFactoryCogs.py +++ b/toontown/coghq/LawbotLegFactoryCogs.py @@ -1,4 +1,5 @@ from .SpecImports import * + LobbyParent = 10014 LobbyCell = 0 BattleCells = {} diff --git a/toontown/coghq/LawbotLegFactorySpec.py b/toontown/coghq/LawbotLegFactorySpec.py index 6cbc91f..671a78f 100644 --- a/toontown/coghq/LawbotLegFactorySpec.py +++ b/toontown/coghq/LawbotLegFactorySpec.py @@ -1,4 +1,5 @@ from toontown.coghq.SpecImports import * + GlobalEntities = {1000: {'type': 'levelMgr', 'name': 'LevelMgr', 'comment': '', diff --git a/toontown/coghq/LawbotOfficeBoilerRoom_Action01.py b/toontown/coghq/LawbotOfficeBoilerRoom_Action01.py index 541e05f..b67b3dc 100644 --- a/toontown/coghq/LawbotOfficeBoilerRoom_Action01.py +++ b/toontown/coghq/LawbotOfficeBoilerRoom_Action01.py @@ -1,4 +1,5 @@ from toontown.coghq.SpecImports import * + GlobalEntities = {1000: {'type': 'levelMgr', 'name': 'LevelMgr', 'comment': '', diff --git a/toontown/coghq/LawbotOfficeBoilerRoom_Battle00.py b/toontown/coghq/LawbotOfficeBoilerRoom_Battle00.py index f64f44f..e5beb14 100644 --- a/toontown/coghq/LawbotOfficeBoilerRoom_Battle00.py +++ b/toontown/coghq/LawbotOfficeBoilerRoom_Battle00.py @@ -1,4 +1,5 @@ from toontown.coghq.SpecImports import * + GlobalEntities = {1000: {'type': 'levelMgr', 'name': 'LevelMgr', 'comment': '', diff --git a/toontown/coghq/LawbotOfficeBoilerRoom_Battle00_Cogs.py b/toontown/coghq/LawbotOfficeBoilerRoom_Battle00_Cogs.py index 1147ac8..b6d44f0 100644 --- a/toontown/coghq/LawbotOfficeBoilerRoom_Battle00_Cogs.py +++ b/toontown/coghq/LawbotOfficeBoilerRoom_Battle00_Cogs.py @@ -1,5 +1,7 @@ -from .SpecImports import * from toontown.toonbase import ToontownGlobals + +from .SpecImports import * + CogParent = 10000 LowerCogParent = 10003 BattleParent = 10002 diff --git a/toontown/coghq/LawbotOfficeBoilerRoom_Security00.py b/toontown/coghq/LawbotOfficeBoilerRoom_Security00.py index 892ac7b..5f04b28 100644 --- a/toontown/coghq/LawbotOfficeBoilerRoom_Security00.py +++ b/toontown/coghq/LawbotOfficeBoilerRoom_Security00.py @@ -1,4 +1,5 @@ from toontown.coghq.SpecImports import * + GlobalEntities = {1000: {'type': 'levelMgr', 'name': 'LevelMgr', 'comment': '', diff --git a/toontown/coghq/LawbotOfficeBoilerRoom_Trap00.py b/toontown/coghq/LawbotOfficeBoilerRoom_Trap00.py index a47bc4b..5c2bf63 100644 --- a/toontown/coghq/LawbotOfficeBoilerRoom_Trap00.py +++ b/toontown/coghq/LawbotOfficeBoilerRoom_Trap00.py @@ -1,4 +1,5 @@ from toontown.coghq.SpecImports import * + GlobalEntities = {1000: {'type': 'levelMgr', 'name': 'LevelMgr', 'comment': '', diff --git a/toontown/coghq/LawbotOfficeBoilerRoom_Trap00_Cogs.py b/toontown/coghq/LawbotOfficeBoilerRoom_Trap00_Cogs.py index 1de51bb..e2860a6 100644 --- a/toontown/coghq/LawbotOfficeBoilerRoom_Trap00_Cogs.py +++ b/toontown/coghq/LawbotOfficeBoilerRoom_Trap00_Cogs.py @@ -1,5 +1,7 @@ -from .SpecImports import * from toontown.toonbase import ToontownGlobals + +from .SpecImports import * + CogParent = 100001 BattleCellId = 0 BattleCells = {BattleCellId: {'parentEntId': CogParent, diff --git a/toontown/coghq/LawbotOfficeDiamondRoom_Action00.py b/toontown/coghq/LawbotOfficeDiamondRoom_Action00.py index 488caa0..21f48e9 100644 --- a/toontown/coghq/LawbotOfficeDiamondRoom_Action00.py +++ b/toontown/coghq/LawbotOfficeDiamondRoom_Action00.py @@ -1,4 +1,5 @@ from toontown.coghq.SpecImports import * + GlobalEntities = {1000: {'type': 'levelMgr', 'name': 'LevelMgr', 'comment': '', diff --git a/toontown/coghq/LawbotOfficeDiamondRoom_Action01.py b/toontown/coghq/LawbotOfficeDiamondRoom_Action01.py index dc182f3..480dccf 100644 --- a/toontown/coghq/LawbotOfficeDiamondRoom_Action01.py +++ b/toontown/coghq/LawbotOfficeDiamondRoom_Action01.py @@ -1,4 +1,5 @@ from toontown.coghq.SpecImports import * + GlobalEntities = {1000: {'type': 'levelMgr', 'name': 'LevelMgr', 'comment': '', diff --git a/toontown/coghq/LawbotOfficeDiamondRoom_Battle00.py b/toontown/coghq/LawbotOfficeDiamondRoom_Battle00.py index 1e14a19..530fd35 100644 --- a/toontown/coghq/LawbotOfficeDiamondRoom_Battle00.py +++ b/toontown/coghq/LawbotOfficeDiamondRoom_Battle00.py @@ -1,4 +1,5 @@ from toontown.coghq.SpecImports import * + GlobalEntities = {1000: {'type': 'levelMgr', 'name': 'LevelMgr', 'comment': '', diff --git a/toontown/coghq/LawbotOfficeDiamondRoom_Battle00_Cogs.py b/toontown/coghq/LawbotOfficeDiamondRoom_Battle00_Cogs.py index c38a073..ed7f4ca 100644 --- a/toontown/coghq/LawbotOfficeDiamondRoom_Battle00_Cogs.py +++ b/toontown/coghq/LawbotOfficeDiamondRoom_Battle00_Cogs.py @@ -1,5 +1,7 @@ -from .SpecImports import * from toontown.toonbase import ToontownGlobals + +from .SpecImports import * + CogParent = 10000 BattlePlace1 = 10000 BattleCellId = 0 diff --git a/toontown/coghq/LawbotOfficeDiamondRoom_Security00.py b/toontown/coghq/LawbotOfficeDiamondRoom_Security00.py index 34e98aa..030db1f 100644 --- a/toontown/coghq/LawbotOfficeDiamondRoom_Security00.py +++ b/toontown/coghq/LawbotOfficeDiamondRoom_Security00.py @@ -1,4 +1,5 @@ from toontown.coghq.SpecImports import * + GlobalEntities = {1000: {'type': 'levelMgr', 'name': 'LevelMgr', 'comment': '', diff --git a/toontown/coghq/LawbotOfficeDiamondRoom_Trap00.py b/toontown/coghq/LawbotOfficeDiamondRoom_Trap00.py index 5485322..97a5767 100644 --- a/toontown/coghq/LawbotOfficeDiamondRoom_Trap00.py +++ b/toontown/coghq/LawbotOfficeDiamondRoom_Trap00.py @@ -1,4 +1,5 @@ from toontown.coghq.SpecImports import * + GlobalEntities = {1000: {'type': 'levelMgr', 'name': 'LevelMgr', 'comment': '', diff --git a/toontown/coghq/LawbotOfficeDiamondRoom_Trap00_Cogs.py b/toontown/coghq/LawbotOfficeDiamondRoom_Trap00_Cogs.py index 3c77d50..6ee4d8b 100644 --- a/toontown/coghq/LawbotOfficeDiamondRoom_Trap00_Cogs.py +++ b/toontown/coghq/LawbotOfficeDiamondRoom_Trap00_Cogs.py @@ -1,5 +1,7 @@ -from .SpecImports import * from toontown.toonbase import ToontownGlobals + +from .SpecImports import * + CogParent = 100007 CogParent1 = 100009 BattlePlace1 = 100004 diff --git a/toontown/coghq/LawbotOfficeEntrance_Action00.py b/toontown/coghq/LawbotOfficeEntrance_Action00.py index c942f95..779de83 100644 --- a/toontown/coghq/LawbotOfficeEntrance_Action00.py +++ b/toontown/coghq/LawbotOfficeEntrance_Action00.py @@ -1,5 +1,7 @@ -from toontown.coghq.SpecImports import * import random + +from toontown.coghq.SpecImports import * + GlobalEntities = {1000: {'type': 'levelMgr', 'name': 'LevelMgr', 'comment': '', diff --git a/toontown/coghq/LawbotOfficeExterior.py b/toontown/coghq/LawbotOfficeExterior.py index 13266c5..a3ca1cb 100644 --- a/toontown/coghq/LawbotOfficeExterior.py +++ b/toontown/coghq/LawbotOfficeExterior.py @@ -1,11 +1,14 @@ -from direct.directnotify import DirectNotifyGlobal -from direct.fsm import ClassicFSM -from direct.fsm import State -from toontown.toonbase import ToontownGlobals -from toontown.building import Elevator from panda3d.core import * + +from direct.directnotify import DirectNotifyGlobal +from direct.fsm import ClassicFSM, State + +from toontown.building import Elevator +from toontown.toonbase import ToontownGlobals + from . import FactoryExterior + class LawbotOfficeExterior(FactoryExterior.FactoryExterior): notify = DirectNotifyGlobal.directNotify.newCategory('LawbotOfficeExterior') diff --git a/toontown/coghq/LawbotOfficeGearRoom_Action00.py b/toontown/coghq/LawbotOfficeGearRoom_Action00.py index 0812b97..e072c8f 100644 --- a/toontown/coghq/LawbotOfficeGearRoom_Action00.py +++ b/toontown/coghq/LawbotOfficeGearRoom_Action00.py @@ -1,4 +1,5 @@ from toontown.coghq.SpecImports import * + GlobalEntities = {1000: {'type': 'levelMgr', 'name': 'LevelMgr', 'comment': '', diff --git a/toontown/coghq/LawbotOfficeGearRoom_Battle00.py b/toontown/coghq/LawbotOfficeGearRoom_Battle00.py index 39293b1..fe81ae4 100644 --- a/toontown/coghq/LawbotOfficeGearRoom_Battle00.py +++ b/toontown/coghq/LawbotOfficeGearRoom_Battle00.py @@ -1,4 +1,5 @@ from toontown.coghq.SpecImports import * + GlobalEntities = {1000: {'type': 'levelMgr', 'name': 'LevelMgr', 'comment': '', diff --git a/toontown/coghq/LawbotOfficeGearRoom_Battle00_Cogs.py b/toontown/coghq/LawbotOfficeGearRoom_Battle00_Cogs.py index c38a073..ed7f4ca 100644 --- a/toontown/coghq/LawbotOfficeGearRoom_Battle00_Cogs.py +++ b/toontown/coghq/LawbotOfficeGearRoom_Battle00_Cogs.py @@ -1,5 +1,7 @@ -from .SpecImports import * from toontown.toonbase import ToontownGlobals + +from .SpecImports import * + CogParent = 10000 BattlePlace1 = 10000 BattleCellId = 0 diff --git a/toontown/coghq/LawbotOfficeGearRoom_Platform00.py b/toontown/coghq/LawbotOfficeGearRoom_Platform00.py index 965f5ec..f055e62 100644 --- a/toontown/coghq/LawbotOfficeGearRoom_Platform00.py +++ b/toontown/coghq/LawbotOfficeGearRoom_Platform00.py @@ -1,4 +1,5 @@ from toontown.coghq.SpecImports import * + GlobalEntities = {1000: {'type': 'levelMgr', 'name': 'LevelMgr', 'comment': '', diff --git a/toontown/coghq/LawbotOfficeGearRoom_Security00.py b/toontown/coghq/LawbotOfficeGearRoom_Security00.py index ad9e9e7..ff003c5 100644 --- a/toontown/coghq/LawbotOfficeGearRoom_Security00.py +++ b/toontown/coghq/LawbotOfficeGearRoom_Security00.py @@ -1,4 +1,5 @@ from toontown.coghq.SpecImports import * + GlobalEntities = {1000: {'type': 'levelMgr', 'name': 'LevelMgr', 'comment': '', diff --git a/toontown/coghq/LawbotOfficeLobby_Action00.py b/toontown/coghq/LawbotOfficeLobby_Action00.py index 83310df..e031c00 100644 --- a/toontown/coghq/LawbotOfficeLobby_Action00.py +++ b/toontown/coghq/LawbotOfficeLobby_Action00.py @@ -1,4 +1,5 @@ from toontown.coghq.SpecImports import * + GlobalEntities = {1000: {'type': 'levelMgr', 'name': 'LevelMgr', 'comment': '', diff --git a/toontown/coghq/LawbotOfficeLobby_Action01.py b/toontown/coghq/LawbotOfficeLobby_Action01.py index 49f27f4..a0d962d 100644 --- a/toontown/coghq/LawbotOfficeLobby_Action01.py +++ b/toontown/coghq/LawbotOfficeLobby_Action01.py @@ -1,4 +1,5 @@ from toontown.coghq.SpecImports import * + GlobalEntities = {1000: {'type': 'levelMgr', 'name': 'LevelMgr', 'comment': '', diff --git a/toontown/coghq/LawbotOfficeLobby_Lights00.py b/toontown/coghq/LawbotOfficeLobby_Lights00.py index 969bce3..84fa401 100644 --- a/toontown/coghq/LawbotOfficeLobby_Lights00.py +++ b/toontown/coghq/LawbotOfficeLobby_Lights00.py @@ -1,4 +1,5 @@ from toontown.coghq.SpecImports import * + GlobalEntities = {1000: {'type': 'levelMgr', 'name': 'LevelMgr', 'comment': '', diff --git a/toontown/coghq/LawbotOfficeLobby_Trap00.py b/toontown/coghq/LawbotOfficeLobby_Trap00.py index 3866cbd..b7bebba 100644 --- a/toontown/coghq/LawbotOfficeLobby_Trap00.py +++ b/toontown/coghq/LawbotOfficeLobby_Trap00.py @@ -1,4 +1,5 @@ from toontown.coghq.SpecImports import * + GlobalEntities = {1000: {'type': 'levelMgr', 'name': 'LevelMgr', 'comment': '', diff --git a/toontown/coghq/LawbotOfficeLobby_Trap00_Cogs.py b/toontown/coghq/LawbotOfficeLobby_Trap00_Cogs.py index 94f6b27..6e23c72 100644 --- a/toontown/coghq/LawbotOfficeLobby_Trap00_Cogs.py +++ b/toontown/coghq/LawbotOfficeLobby_Trap00_Cogs.py @@ -1,5 +1,7 @@ -from .SpecImports import * from toontown.toonbase import ToontownGlobals + +from .SpecImports import * + CogParent = 10000 CogParent1 = 100021 BattlePlace1 = 100020 diff --git a/toontown/coghq/LawbotOfficeOilRoom_Battle00.py b/toontown/coghq/LawbotOfficeOilRoom_Battle00.py index 7d9519a..b3fdb38 100644 --- a/toontown/coghq/LawbotOfficeOilRoom_Battle00.py +++ b/toontown/coghq/LawbotOfficeOilRoom_Battle00.py @@ -1,5 +1,7 @@ -from toontown.coghq.SpecImports import * import random + +from toontown.coghq.SpecImports import * + GlobalEntities = {1000: {'type': 'levelMgr', 'name': 'LevelMgr', 'comment': '', diff --git a/toontown/coghq/LawbotOfficeOilRoom_Battle00_Cogs.py b/toontown/coghq/LawbotOfficeOilRoom_Battle00_Cogs.py index 95379bc..28f8c6d 100644 --- a/toontown/coghq/LawbotOfficeOilRoom_Battle00_Cogs.py +++ b/toontown/coghq/LawbotOfficeOilRoom_Battle00_Cogs.py @@ -1,5 +1,7 @@ -from .SpecImports import * from toontown.toonbase import ToontownGlobals + +from .SpecImports import * + CogParent = 10000 BattleCellId = 0 BattleCells = {BattleCellId: {'parentEntId': CogParent, diff --git a/toontown/coghq/LawbotOfficeOilRoom_Battle01.py b/toontown/coghq/LawbotOfficeOilRoom_Battle01.py index dce5bc0..d45502a 100644 --- a/toontown/coghq/LawbotOfficeOilRoom_Battle01.py +++ b/toontown/coghq/LawbotOfficeOilRoom_Battle01.py @@ -1,5 +1,7 @@ -from toontown.coghq.SpecImports import * import random + +from toontown.coghq.SpecImports import * + GlobalEntities = {1000: {'type': 'levelMgr', 'name': 'LevelMgr', 'comment': '', diff --git a/toontown/coghq/LawbotOfficeOilRoom_Battle01_Cogs.py b/toontown/coghq/LawbotOfficeOilRoom_Battle01_Cogs.py index b63aece..e58e8fe 100644 --- a/toontown/coghq/LawbotOfficeOilRoom_Battle01_Cogs.py +++ b/toontown/coghq/LawbotOfficeOilRoom_Battle01_Cogs.py @@ -1,5 +1,7 @@ -from .SpecImports import * from toontown.toonbase import ToontownGlobals + +from .SpecImports import * + CogParent = 10000 BattleCellId = 0 BattleCells = {BattleCellId: {'parentEntId': CogParent, diff --git a/toontown/coghq/LevelBattleManagerAI.py b/toontown/coghq/LevelBattleManagerAI.py index 7f84ab8..08a66b3 100644 --- a/toontown/coghq/LevelBattleManagerAI.py +++ b/toontown/coghq/LevelBattleManagerAI.py @@ -1,7 +1,9 @@ -from toontown.battle import BattleManagerAI from direct.directnotify import DirectNotifyGlobal + +from toontown.battle import BattleManagerAI from toontown.coghq import BattleExperienceAggregatorAI + class LevelBattleManagerAI(BattleManagerAI.BattleManagerAI): notify = DirectNotifyGlobal.directNotify.newCategory('LevelBattleManagerAI') diff --git a/toontown/coghq/LevelSuitPlannerAI.py b/toontown/coghq/LevelSuitPlannerAI.py index b4d459b..98bc793 100644 --- a/toontown/coghq/LevelSuitPlannerAI.py +++ b/toontown/coghq/LevelSuitPlannerAI.py @@ -1,10 +1,14 @@ -from panda3d.core import * -from direct.showbase import DirectObject -from toontown.suit import SuitDNA -from direct.directnotify import DirectNotifyGlobal -from toontown.coghq import LevelBattleManagerAI -import random import functools +import random + +from panda3d.core import * + +from direct.directnotify import DirectNotifyGlobal +from direct.showbase import DirectObject + +from toontown.coghq import LevelBattleManagerAI +from toontown.suit import SuitDNA + class LevelSuitPlannerAI(DirectObject.DirectObject): notify = DirectNotifyGlobal.directNotify.newCategory('LevelSuitPlannerAI') diff --git a/toontown/coghq/LobbyManager.py b/toontown/coghq/LobbyManager.py index 34316f6..f5494c2 100644 --- a/toontown/coghq/LobbyManager.py +++ b/toontown/coghq/LobbyManager.py @@ -1,8 +1,10 @@ from panda3d.core import * -from toontown.toonbase import ToontownGlobals -from direct.distributed import DistributedObject + from direct.directnotify import DirectNotifyGlobal -from toontown.toonbase import TTLocalizer +from direct.distributed import DistributedObject + +from toontown.toonbase import ToontownGlobals, TTLocalizer + class LobbyManager(DistributedObject.DistributedObject): notify = DirectNotifyGlobal.directNotify.newCategory('LobbyManager') diff --git a/toontown/coghq/LobbyManagerAI.py b/toontown/coghq/LobbyManagerAI.py index 9fd2f0a..9ae84e8 100644 --- a/toontown/coghq/LobbyManagerAI.py +++ b/toontown/coghq/LobbyManagerAI.py @@ -1,7 +1,9 @@ -from direct.distributed import DistributedObjectAI from direct.directnotify import DirectNotifyGlobal +from direct.distributed import DistributedObjectAI + from toontown.toonbase import ToontownGlobals + class LobbyManagerAI(DistributedObjectAI.DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('LobbyManagerAI') diff --git a/toontown/coghq/MintInterior.py b/toontown/coghq/MintInterior.py index af075a6..b6f1a71 100644 --- a/toontown/coghq/MintInterior.py +++ b/toontown/coghq/MintInterior.py @@ -1,18 +1,19 @@ -from direct.directnotify import DirectNotifyGlobal -from toontown.battle import BattlePlace -from direct.fsm import ClassicFSM, State -from direct.fsm import State -from direct.showbase import BulletinBoardWatcher from panda3d.core import * from panda3d.otp import * + +from direct.directnotify import DirectNotifyGlobal +from direct.fsm import ClassicFSM, State +from direct.showbase import BulletinBoardWatcher + from otp.distributed.TelemetryLimiter import RotationLimitToH, TLGatherAllAvs -from toontown.toon import Toon -from toontown.toonbase import ToontownGlobals -from toontown.hood import ZoneUtil -from toontown.toonbase import TTLocalizer -from toontown.toontowngui import TTDialog -from toontown.toonbase import ToontownBattleGlobals + +from toontown.battle import BattlePlace from toontown.coghq import DistributedMint +from toontown.hood import ZoneUtil +from toontown.toon import Toon +from toontown.toonbase import ToontownBattleGlobals, ToontownGlobals, TTLocalizer +from toontown.toontowngui import TTDialog + class MintInterior(BattlePlace.BattlePlace): notify = DirectNotifyGlobal.directNotify.newCategory('MintInterior') diff --git a/toontown/coghq/MintLayout.py b/toontown/coghq/MintLayout.py index 01bf864..cff2883 100644 --- a/toontown/coghq/MintLayout.py +++ b/toontown/coghq/MintLayout.py @@ -1,9 +1,11 @@ +import random + from direct.directnotify import DirectNotifyGlobal -from direct.showbase.PythonUtil import invertDictLossless +from direct.showbase.PythonUtil import invertDictLossless, lerp, normalDistrib + from toontown.coghq import MintRoomSpecs from toontown.toonbase import ToontownGlobals -from direct.showbase.PythonUtil import normalDistrib, lerp -import random + def printAllCashbotInfo(): print('roomId: roomName') diff --git a/toontown/coghq/MintManagerAI.py b/toontown/coghq/MintManagerAI.py index 7e51b7f..ebc2eee 100644 --- a/toontown/coghq/MintManagerAI.py +++ b/toontown/coghq/MintManagerAI.py @@ -1,10 +1,14 @@ -from direct.directnotify import DirectNotifyGlobal -from . import DistributedMintAI -from toontown.toonbase import ToontownGlobals -from toontown.coghq import MintLayout -from direct.showbase import DirectObject import random +from direct.directnotify import DirectNotifyGlobal +from direct.showbase import DirectObject + +from toontown.coghq import MintLayout +from toontown.toonbase import ToontownGlobals + +from . import DistributedMintAI + + class MintManagerAI(DirectObject.DirectObject): notify = DirectNotifyGlobal.directNotify.newCategory('MintManagerAI') mintId = None diff --git a/toontown/coghq/MintProduct.py b/toontown/coghq/MintProduct.py index f21903b..a523669 100644 --- a/toontown/coghq/MintProduct.py +++ b/toontown/coghq/MintProduct.py @@ -1,6 +1,8 @@ -from toontown.toonbase.ToontownGlobals import * from otp.level import BasicEntities +from toontown.toonbase.ToontownGlobals import * + + class MintProduct(BasicEntities.NodePathEntity): Models = {CashbotMintIntA: 'phase_10/models/cashbotHQ/MoneyBag', CashbotMintIntB: 'phase_10/models/cashbotHQ/MoneyStackPallet', diff --git a/toontown/coghq/MintProductPallet.py b/toontown/coghq/MintProductPallet.py index 9cc7471..9da8831 100644 --- a/toontown/coghq/MintProductPallet.py +++ b/toontown/coghq/MintProductPallet.py @@ -1,5 +1,6 @@ -from toontown.toonbase.ToontownGlobals import * from toontown.coghq import MintProduct +from toontown.toonbase.ToontownGlobals import * + class MintProductPallet(MintProduct.MintProduct): Models = {CashbotMintIntA: 'phase_10/models/cashbotHQ/DoubleCoinStack.bam', diff --git a/toontown/coghq/MintRoom.py b/toontown/coghq/MintRoom.py index c29f493..800d0c8 100644 --- a/toontown/coghq/MintRoom.py +++ b/toontown/coghq/MintRoom.py @@ -1,10 +1,14 @@ -from panda3d.core import * -from direct.showbase import DirectObject -from direct.fsm import ClassicFSM, State -from toontown.toonbase import ToontownGlobals -from toontown.coghq import MintRoomSpecs import random +from panda3d.core import * + +from direct.fsm import ClassicFSM, State +from direct.showbase import DirectObject + +from toontown.coghq import MintRoomSpecs +from toontown.toonbase import ToontownGlobals + + class MintRoom(DirectObject.DirectObject): FloorCollPrefix = 'mintFloorColl' CashbotMintDoorFrame = 'phase_10/models/cashbotHQ/DoorFrame' diff --git a/toontown/coghq/MintRoomBase.py b/toontown/coghq/MintRoomBase.py index 2742852..12cdac4 100644 --- a/toontown/coghq/MintRoomBase.py +++ b/toontown/coghq/MintRoomBase.py @@ -1,5 +1,6 @@ from toontown.toonbase import ToontownGlobals + class MintRoomBase: def __init__(self): @@ -18,7 +19,8 @@ class MintRoomBase: if __dev__: def getEntityTypeReg(self): - from . import FactoryEntityTypes from otp.level import EntityTypeRegistry + + from . import FactoryEntityTypes typeReg = EntityTypeRegistry.EntityTypeRegistry(FactoryEntityTypes) return typeReg diff --git a/toontown/coghq/MintRoomSpecs.py b/toontown/coghq/MintRoomSpecs.py index 194b544..9368879 100644 --- a/toontown/coghq/MintRoomSpecs.py +++ b/toontown/coghq/MintRoomSpecs.py @@ -1,21 +1,15 @@ from direct.showbase.PythonUtil import invertDict + +from toontown.coghq import (CashbotMintBoilerRoom_Battle00_Cogs, CashbotMintBoilerRoom_Battle01_Cogs, + CashbotMintControlRoom_Battle00_Cogs, CashbotMintDuctRoom_Battle00_Cogs, + CashbotMintDuctRoom_Battle01_Cogs, CashbotMintGearRoom_Battle00_Cogs, + CashbotMintGearRoom_Battle01_Cogs, CashbotMintLavaRoomFoyer_Battle00_Cogs, + CashbotMintLavaRoomFoyer_Battle01_Cogs, CashbotMintLobby_Battle00_Cogs, + CashbotMintLobby_Battle01_Cogs, CashbotMintOilRoom_Battle00_Cogs, + CashbotMintPaintMixerReward_Battle00_Cogs, CashbotMintPipeRoom_Battle00_Cogs, + CashbotMintPipeRoom_Battle01_Cogs, NullCogs) from toontown.toonbase import ToontownGlobals -from toontown.coghq import NullCogs -from toontown.coghq import CashbotMintBoilerRoom_Battle00_Cogs -from toontown.coghq import CashbotMintBoilerRoom_Battle01_Cogs -from toontown.coghq import CashbotMintControlRoom_Battle00_Cogs -from toontown.coghq import CashbotMintDuctRoom_Battle00_Cogs -from toontown.coghq import CashbotMintDuctRoom_Battle01_Cogs -from toontown.coghq import CashbotMintGearRoom_Battle00_Cogs -from toontown.coghq import CashbotMintGearRoom_Battle01_Cogs -from toontown.coghq import CashbotMintLavaRoomFoyer_Battle00_Cogs -from toontown.coghq import CashbotMintLavaRoomFoyer_Battle01_Cogs -from toontown.coghq import CashbotMintLobby_Battle00_Cogs -from toontown.coghq import CashbotMintLobby_Battle01_Cogs -from toontown.coghq import CashbotMintOilRoom_Battle00_Cogs -from toontown.coghq import CashbotMintPaintMixerReward_Battle00_Cogs -from toontown.coghq import CashbotMintPipeRoom_Battle00_Cogs -from toontown.coghq import CashbotMintPipeRoom_Battle01_Cogs + def getMintRoomSpecModule(roomId): return CashbotMintSpecModules[roomId] diff --git a/toontown/coghq/MintShelf.py b/toontown/coghq/MintShelf.py index 99908be..866824c 100644 --- a/toontown/coghq/MintShelf.py +++ b/toontown/coghq/MintShelf.py @@ -1,5 +1,6 @@ -from toontown.toonbase.ToontownGlobals import * from toontown.coghq import MintProduct +from toontown.toonbase.ToontownGlobals import * + class MintShelf(MintProduct.MintProduct): Models = {CashbotMintIntA: 'phase_10/models/cashbotHQ/shelf_A1MoneyBags', diff --git a/toontown/coghq/MoleFieldBase.py b/toontown/coghq/MoleFieldBase.py index 3bb2d52..8c30414 100644 --- a/toontown/coghq/MoleFieldBase.py +++ b/toontown/coghq/MoleFieldBase.py @@ -1,4 +1,5 @@ import random + HILL_MOLE = 0 HILL_BOMB = 1 HILL_WHACKED = 2 diff --git a/toontown/coghq/MoleHill.py b/toontown/coghq/MoleHill.py index f389960..0ac47da 100644 --- a/toontown/coghq/MoleHill.py +++ b/toontown/coghq/MoleHill.py @@ -1,10 +1,13 @@ -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 +from panda3d.core import CollisionNode, CollisionSphere, NodePath, Point3, Vec4 + +from direct.interval.IntervalGlobal import (Func, LerpPosInterval, LerpScaleInterval, Parallel, ParticleInterval, + Sequence, Track, Wait) from direct.particles import ParticleEffect -from toontown.battle import BattleParticles -from toontown.battle import BattleProps + +from toontown.battle import BattleParticles, BattleProps +from toontown.coghq import MoleFieldBase +from toontown.toonbase import ToontownGlobals + class MoleHill(NodePath): diff --git a/toontown/coghq/MovingPlatform.py b/toontown/coghq/MovingPlatform.py index 6c7fa4a..f3d9f93 100644 --- a/toontown/coghq/MovingPlatform.py +++ b/toontown/coghq/MovingPlatform.py @@ -1,8 +1,11 @@ from panda3d.core import * + +from direct.directnotify import DirectNotifyGlobal from direct.interval.IntervalGlobal import * from direct.showbase import DirectObject + from toontown.toonbase import ToontownGlobals -from direct.directnotify import DirectNotifyGlobal + class MovingPlatform(DirectObject.DirectObject, NodePath): notify = DirectNotifyGlobal.directNotify.newCategory('MovingPlatform') diff --git a/toontown/coghq/NullCogs.py b/toontown/coghq/NullCogs.py index aee992c..5fd3723 100644 --- a/toontown/coghq/NullCogs.py +++ b/toontown/coghq/NullCogs.py @@ -1,4 +1,5 @@ from .SpecImports import * + BattleCells = {} CogData = [] ReserveCogData = [] diff --git a/toontown/coghq/PaintMixer.py b/toontown/coghq/PaintMixer.py index dc2e5dd..549e8af 100644 --- a/toontown/coghq/PaintMixer.py +++ b/toontown/coghq/PaintMixer.py @@ -1,5 +1,6 @@ from . import PlatformEntity + class PaintMixer(PlatformEntity.PlatformEntity): def start(self): diff --git a/toontown/coghq/PathMasterEntity.py b/toontown/coghq/PathMasterEntity.py index db22ba3..5fbc1bf 100644 --- a/toontown/coghq/PathMasterEntity.py +++ b/toontown/coghq/PathMasterEntity.py @@ -1,9 +1,12 @@ -from toontown.toonbase.ToontownGlobals import * -from direct.interval.IntervalGlobal import * from direct.directnotify import DirectNotifyGlobal -from toontown.suit import GoonPathData +from direct.interval.IntervalGlobal import * + from otp.level import PathEntity +from toontown.suit import GoonPathData +from toontown.toonbase.ToontownGlobals import * + + class PathMasterEntity(PathEntity.PathEntity): notify = DirectNotifyGlobal.directNotify.newCategory('PathMasterEntity') diff --git a/toontown/coghq/PlatformEntity.py b/toontown/coghq/PlatformEntity.py index 477509c..34f7487 100644 --- a/toontown/coghq/PlatformEntity.py +++ b/toontown/coghq/PlatformEntity.py @@ -1,8 +1,12 @@ from panda3d.core import * + from direct.interval.IntervalGlobal import * + from otp.level import BasicEntities + from . import MovingPlatform + class PlatformEntity(BasicEntities.NodePathEntity): def __init__(self, level, entId): diff --git a/toontown/coghq/PromotionManagerAI.py b/toontown/coghq/PromotionManagerAI.py index de61c9c..98fb104 100644 --- a/toontown/coghq/PromotionManagerAI.py +++ b/toontown/coghq/PromotionManagerAI.py @@ -1,10 +1,15 @@ -from otp.ai.AIBaseGlobal import * -from direct.directnotify import DirectNotifyGlobal import random -from toontown.suit import SuitDNA -from . import CogDisguiseGlobals -from toontown.toonbase.ToontownBattleGlobals import getInvasionMultiplier from functools import reduce + +from direct.directnotify import DirectNotifyGlobal + +from otp.ai.AIBaseGlobal import * + +from toontown.suit import SuitDNA +from toontown.toonbase.ToontownBattleGlobals import getInvasionMultiplier + +from . import CogDisguiseGlobals + MeritMultiplier = 0.5 class PromotionManagerAI: diff --git a/toontown/coghq/RenderingEntity.py b/toontown/coghq/RenderingEntity.py index 367c506..b15508a 100644 --- a/toontown/coghq/RenderingEntity.py +++ b/toontown/coghq/RenderingEntity.py @@ -1,9 +1,12 @@ -from toontown.toonbase.ToontownGlobals import * -from direct.interval.IntervalGlobal import * from direct.directnotify import DirectNotifyGlobal -from toontown.suit import GoonPathData +from direct.interval.IntervalGlobal import * + from otp.level import BasicEntities +from toontown.suit import GoonPathData +from toontown.toonbase.ToontownGlobals import * + + class RenderingEntity(BasicEntities.NodePathEntity): notify = DirectNotifyGlobal.directNotify.newCategory('PathMasterEntity') diff --git a/toontown/coghq/SellbotCogHQLoader.py b/toontown/coghq/SellbotCogHQLoader.py index b7bc6a8..0b29487 100644 --- a/toontown/coghq/SellbotCogHQLoader.py +++ b/toontown/coghq/SellbotCogHQLoader.py @@ -1,16 +1,14 @@ -from direct.directnotify import DirectNotifyGlobal -from direct.fsm import StateData -from . import CogHQLoader -from toontown.toonbase import ToontownGlobals -from direct.gui import DirectGui -from toontown.toonbase import TTLocalizer -from toontown.toon import Toon -from direct.fsm import State -from . import FactoryExterior -from . import FactoryInterior -from . import SellbotHQExterior -from . import SellbotHQBossBattle from panda3d.core import DecalEffect + +from direct.directnotify import DirectNotifyGlobal +from direct.fsm import State, StateData +from direct.gui import DirectGui + +from toontown.toon import Toon +from toontown.toonbase import ToontownGlobals, TTLocalizer + +from . import CogHQLoader, FactoryExterior, FactoryInterior, SellbotHQBossBattle, SellbotHQExterior + aspectSF = 0.7227 class SellbotCogHQLoader(CogHQLoader.CogHQLoader): diff --git a/toontown/coghq/SellbotHQBossBattle.py b/toontown/coghq/SellbotHQBossBattle.py index a7d8826..10f3577 100644 --- a/toontown/coghq/SellbotHQBossBattle.py +++ b/toontown/coghq/SellbotHQBossBattle.py @@ -1,8 +1,11 @@ from panda3d.core import * -from direct.interval.IntervalGlobal import * -from toontown.suit import DistributedSellbotBoss + from direct.directnotify import DirectNotifyGlobal +from direct.interval.IntervalGlobal import * + from toontown.coghq import CogHQBossBattle +from toontown.suit import DistributedSellbotBoss + class SellbotHQBossBattle(CogHQBossBattle.CogHQBossBattle): notify = DirectNotifyGlobal.directNotify.newCategory('SellbotHQBossBattle') diff --git a/toontown/coghq/SellbotHQExterior.py b/toontown/coghq/SellbotHQExterior.py index 776303d..39517f8 100644 --- a/toontown/coghq/SellbotHQExterior.py +++ b/toontown/coghq/SellbotHQExterior.py @@ -1,6 +1,8 @@ from direct.directnotify import DirectNotifyGlobal + from toontown.coghq import CogHQExterior + class SellbotHQExterior(CogHQExterior.CogHQExterior): notify = DirectNotifyGlobal.directNotify.newCategory('SellbotHQExterior') diff --git a/toontown/coghq/SellbotLegFactoryCogs.py b/toontown/coghq/SellbotLegFactoryCogs.py index 6637acb..f2104e8 100644 --- a/toontown/coghq/SellbotLegFactoryCogs.py +++ b/toontown/coghq/SellbotLegFactoryCogs.py @@ -1,4 +1,5 @@ from .SpecImports import * + LobbyParent = 10014 BoilerParent = 10030 PipeLeftParent = 10023 diff --git a/toontown/coghq/SellbotLegFactorySpec.py b/toontown/coghq/SellbotLegFactorySpec.py index 9d8c471..e815850 100644 --- a/toontown/coghq/SellbotLegFactorySpec.py +++ b/toontown/coghq/SellbotLegFactorySpec.py @@ -1,5 +1,6 @@ -from toontown.toonbase import TTLocalizer from toontown.coghq.SpecImports import * +from toontown.toonbase import TTLocalizer + GlobalEntities = {1000: {'type': 'levelMgr', 'name': 'LevelMgr', 'comment': '', diff --git a/toontown/coghq/StageInterior.py b/toontown/coghq/StageInterior.py index 48bcb81..e0b3279 100644 --- a/toontown/coghq/StageInterior.py +++ b/toontown/coghq/StageInterior.py @@ -1,19 +1,20 @@ -from direct.directnotify import DirectNotifyGlobal -from toontown.battle import BattlePlace -from direct.fsm import ClassicFSM, State -from direct.fsm import State -from direct.showbase import BulletinBoardWatcher from panda3d.core import * from panda3d.otp import * + +from direct.directnotify import DirectNotifyGlobal +from direct.fsm import ClassicFSM, State +from direct.showbase import BulletinBoardWatcher + from otp.distributed.TelemetryLimiter import RotationLimitToH, TLGatherAllAvs -from toontown.toon import Toon -from toontown.toonbase import ToontownGlobals -from toontown.hood import ZoneUtil -from toontown.toonbase import TTLocalizer -from toontown.toontowngui import TTDialog -from toontown.toonbase import ToontownBattleGlobals -from toontown.coghq import DistributedStage + +from toontown.battle import BattlePlace from toontown.building import Elevator +from toontown.coghq import DistributedStage +from toontown.hood import ZoneUtil +from toontown.toon import Toon +from toontown.toonbase import ToontownBattleGlobals, ToontownGlobals, TTLocalizer +from toontown.toontowngui import TTDialog + class StageInterior(BattlePlace.BattlePlace): notify = DirectNotifyGlobal.directNotify.newCategory('StageInterior') diff --git a/toontown/coghq/StageLayout.py b/toontown/coghq/StageLayout.py index b057dcb..56a9f59 100644 --- a/toontown/coghq/StageLayout.py +++ b/toontown/coghq/StageLayout.py @@ -1,9 +1,11 @@ +import random + from direct.directnotify import DirectNotifyGlobal -from direct.showbase.PythonUtil import invertDictLossless +from direct.showbase.PythonUtil import invertDictLossless, lerp, normalDistrib + from toontown.coghq import StageRoomSpecs from toontown.toonbase import ToontownGlobals -from direct.showbase.PythonUtil import normalDistrib, lerp -import random + def printAllCashbotInfo(): print('roomId: roomName') diff --git a/toontown/coghq/StageManagerAI.py b/toontown/coghq/StageManagerAI.py index 57dfaae..bcca19d 100644 --- a/toontown/coghq/StageManagerAI.py +++ b/toontown/coghq/StageManagerAI.py @@ -1,10 +1,14 @@ -from direct.directnotify import DirectNotifyGlobal -from . import DistributedStageAI -from toontown.toonbase import ToontownGlobals -from toontown.coghq import StageLayout -from direct.showbase import DirectObject import random +from direct.directnotify import DirectNotifyGlobal +from direct.showbase import DirectObject + +from toontown.coghq import StageLayout +from toontown.toonbase import ToontownGlobals + +from . import DistributedStageAI + + class StageManagerAI(DirectObject.DirectObject): notify = DirectNotifyGlobal.directNotify.newCategory('StageManagerAI') stageId = None diff --git a/toontown/coghq/StageRoom.py b/toontown/coghq/StageRoom.py index 7db85e6..edf91da 100644 --- a/toontown/coghq/StageRoom.py +++ b/toontown/coghq/StageRoom.py @@ -1,10 +1,14 @@ -from panda3d.core import * -from direct.showbase import DirectObject -from direct.fsm import ClassicFSM, State -from toontown.toonbase import ToontownGlobals -from toontown.coghq import StageRoomSpecs import random +from panda3d.core import * + +from direct.fsm import ClassicFSM, State +from direct.showbase import DirectObject + +from toontown.coghq import StageRoomSpecs +from toontown.toonbase import ToontownGlobals + + class StageRoom(DirectObject.DirectObject): FloorCollPrefix = 'stageFloorColl' CashbotStageDoorFrame = 'phase_10/models/cashbotHQ/DoorFrame' diff --git a/toontown/coghq/StageRoomBase.py b/toontown/coghq/StageRoomBase.py index ded0973..ebfe1e7 100644 --- a/toontown/coghq/StageRoomBase.py +++ b/toontown/coghq/StageRoomBase.py @@ -1,5 +1,6 @@ from toontown.toonbase import ToontownGlobals + class StageRoomBase: def __init__(self): @@ -18,7 +19,8 @@ class StageRoomBase: if __dev__: def getEntityTypeReg(self): - from . import FactoryEntityTypes from otp.level import EntityTypeRegistry + + from . import FactoryEntityTypes typeReg = EntityTypeRegistry.EntityTypeRegistry(FactoryEntityTypes) return typeReg diff --git a/toontown/coghq/StageRoomSpecs.py b/toontown/coghq/StageRoomSpecs.py index adc800d..943b61c 100644 --- a/toontown/coghq/StageRoomSpecs.py +++ b/toontown/coghq/StageRoomSpecs.py @@ -1,14 +1,11 @@ from direct.showbase.PythonUtil import invertDict + +from toontown.coghq import (LawbotOfficeBoilerRoom_Battle00_Cogs, LawbotOfficeBoilerRoom_Trap00_Cogs, + LawbotOfficeDiamondRoom_Battle00_Cogs, LawbotOfficeDiamondRoom_Trap00_Cogs, + LawbotOfficeGearRoom_Battle00_Cogs, LawbotOfficeLobby_Trap00_Cogs, + LawbotOfficeOilRoom_Battle00_Cogs, LawbotOfficeOilRoom_Battle01_Cogs, NullCogs) from toontown.toonbase import ToontownGlobals -from toontown.coghq import NullCogs -from toontown.coghq import LawbotOfficeOilRoom_Battle00_Cogs -from toontown.coghq import LawbotOfficeOilRoom_Battle01_Cogs -from toontown.coghq import LawbotOfficeBoilerRoom_Battle00_Cogs -from toontown.coghq import LawbotOfficeBoilerRoom_Trap00_Cogs -from toontown.coghq import LawbotOfficeLobby_Trap00_Cogs -from toontown.coghq import LawbotOfficeDiamondRoom_Trap00_Cogs -from toontown.coghq import LawbotOfficeDiamondRoom_Battle00_Cogs -from toontown.coghq import LawbotOfficeGearRoom_Battle00_Cogs + def getStageRoomSpecModule(roomId): return CashbotStageSpecModules[roomId] diff --git a/toontown/distributed/DelayDeletable.py b/toontown/distributed/DelayDeletable.py index bd52769..1cdb2cd 100644 --- a/toontown/distributed/DelayDeletable.py +++ b/toontown/distributed/DelayDeletable.py @@ -1,4 +1,5 @@ -from direct.distributed.DistributedObject import ESGenerating, ESGenerated, ESNum2Str +from direct.distributed.DistributedObject import ESGenerated, ESGenerating, ESNum2Str + class DelayDeletable: DelayDeleteSerialGen = SerialNumGen() diff --git a/toontown/distributed/DistributedTimer.py b/toontown/distributed/DistributedTimer.py index 09c23d1..3f562e9 100644 --- a/toontown/distributed/DistributedTimer.py +++ b/toontown/distributed/DistributedTimer.py @@ -1,10 +1,14 @@ -from direct.distributed import DistributedObject -from direct.directnotify import DirectNotifyGlobal -from toontown.toonbase import ToontownGlobals -from panda3d.core import * -from direct.distributed.ClockDelta import * import time +from panda3d.core import * + +from direct.directnotify import DirectNotifyGlobal +from direct.distributed import DistributedObject +from direct.distributed.ClockDelta import * + +from toontown.toonbase import ToontownGlobals + + class DistributedTimer(DistributedObject.DistributedObject): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedTimer') diff --git a/toontown/distributed/DistributedTimerAI.py b/toontown/distributed/DistributedTimerAI.py index 57399d7..3ecc0c0 100644 --- a/toontown/distributed/DistributedTimerAI.py +++ b/toontown/distributed/DistributedTimerAI.py @@ -1,10 +1,14 @@ -from direct.distributed import DistributedObjectAI -from direct.directnotify import DirectNotifyGlobal -from toontown.toonbase import ToontownGlobals -from panda3d.core import * -from direct.distributed.ClockDelta import * import time +from panda3d.core import * + +from direct.directnotify import DirectNotifyGlobal +from direct.distributed import DistributedObjectAI +from direct.distributed.ClockDelta import * + +from toontown.toonbase import ToontownGlobals + + class DistributedTimerAI(DistributedObjectAI.DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedTimerAI') diff --git a/toontown/distributed/HoodMgr.py b/toontown/distributed/HoodMgr.py index d9b9926..fbb6640 100644 --- a/toontown/distributed/HoodMgr.py +++ b/toontown/distributed/HoodMgr.py @@ -1,10 +1,14 @@ -from panda3d.core import * -from direct.showbase import DirectObject -from direct.directnotify import DirectNotifyGlobal -from toontown.launcher import DownloadForceAcknowledge import random -from toontown.toonbase import ToontownGlobals + +from panda3d.core import * + +from direct.directnotify import DirectNotifyGlobal +from direct.showbase import DirectObject + from toontown.hood import ZoneUtil +from toontown.launcher import DownloadForceAcknowledge +from toontown.toonbase import ToontownGlobals + class HoodMgr(DirectObject.DirectObject): notify = DirectNotifyGlobal.directNotify.newCategory('HoodMgr') diff --git a/toontown/distributed/NonRepeatableRandomSourceAI.py b/toontown/distributed/NonRepeatableRandomSourceAI.py index 2f3655f..2069938 100644 --- a/toontown/distributed/NonRepeatableRandomSourceAI.py +++ b/toontown/distributed/NonRepeatableRandomSourceAI.py @@ -1,8 +1,11 @@ +import random + from direct.directnotify.DirectNotifyGlobal import directNotify from direct.distributed.DistributedObjectAI import DistributedObjectAI from direct.task import Task + from otp.distributed import OtpDoGlobals -import random + class NonRepeatableRandomSourceAI(DistributedObjectAI): notify = directNotify.newCategory('NonRepeatableRandomSourceAI') diff --git a/toontown/distributed/NonRepeatableRandomSourceUD.py b/toontown/distributed/NonRepeatableRandomSourceUD.py index 2af96d7..d4f465c 100644 --- a/toontown/distributed/NonRepeatableRandomSourceUD.py +++ b/toontown/distributed/NonRepeatableRandomSourceUD.py @@ -1,7 +1,9 @@ -from direct.distributed.DistributedObjectGlobalUD import DistributedObjectGlobalUD -from direct.directnotify.DirectNotifyGlobal import directNotify import random +from direct.directnotify.DirectNotifyGlobal import directNotify +from direct.distributed.DistributedObjectGlobalUD import DistributedObjectGlobalUD + + class NonRepeatableRandomSourceUD(DistributedObjectGlobalUD): notify = directNotify.newCategory('NonRepeatableRandomSourceUD') RandomNumberCacheSize = 2000000 diff --git a/toontown/distributed/PlayGame.py b/toontown/distributed/PlayGame.py index af33272..31dc69b 100644 --- a/toontown/distributed/PlayGame.py +++ b/toontown/distributed/PlayGame.py @@ -1,31 +1,19 @@ from panda3d.core import * from panda3d.toontown import * -from toontown.toonbase.ToonBaseGlobal import * + from direct.directnotify import DirectNotifyGlobal -from direct.fsm import StateData -from direct.fsm import ClassicFSM, State -from direct.fsm import State -from direct.task.Task import Task -from .ToontownMsgTypes import * -from toontown.toonbase import ToontownGlobals -from toontown.hood import TTHood -from toontown.hood import DDHood -from toontown.hood import MMHood -from toontown.hood import BRHood -from toontown.hood import DGHood -from toontown.hood import DLHood -from toontown.hood import GSHood -from toontown.hood import OZHood -from toontown.hood import GZHood -from toontown.hood import SellbotHQ, CashbotHQ, LawbotHQ, BossbotHQ -from toontown.hood import TutorialHood +from direct.fsm import ClassicFSM, State, StateData from direct.task import TaskManagerGlobal -from toontown.hood import QuietZoneState -from toontown.hood import ZoneUtil -from toontown.hood import EstateHood -from toontown.hood import PartyHood -from toontown.toonbase import TTLocalizer +from direct.task.Task import Task + +from toontown.hood import (BossbotHQ, BRHood, CashbotHQ, DDHood, DGHood, DLHood, EstateHood, GSHood, GZHood, LawbotHQ, + MMHood, OZHood, PartyHood, QuietZoneState, SellbotHQ, TTHood, TutorialHood, ZoneUtil) from toontown.parties.PartyGlobals import GoToPartyStatus +from toontown.toonbase import ToontownGlobals, TTLocalizer +from toontown.toonbase.ToonBaseGlobal import * + +from .ToontownMsgTypes import * + class PlayGame(StateData.StateData): notify = DirectNotifyGlobal.directNotify.newCategory('PlayGame') diff --git a/toontown/distributed/ToontownClientRepository.py b/toontown/distributed/ToontownClientRepository.py index dbadca9..7fd9280 100644 --- a/toontown/distributed/ToontownClientRepository.py +++ b/toontown/distributed/ToontownClientRepository.py @@ -1,43 +1,36 @@ from panda3d.core import * + from direct.distributed.ClockDelta import * -from direct.gui.DirectGui import * -from direct.interval.IntervalGlobal import ivalMgr from direct.distributed.PyDatagram import PyDatagram from direct.distributed.PyDatagramIterator import PyDatagramIterator from direct.fsm import State +from direct.gui.DirectGui import * +from direct.interval.IntervalGlobal import ivalMgr from direct.showbase.PythonUtil import Functor, ScratchPad + from otp.avatar import Avatar -from otp.distributed import OTPClientRepository -from otp.distributed import PotentialAvatar -from otp.distributed.OtpDoGlobals import * -from otp.distributed import OtpDoGlobals -from otp.otpbase import OTPGlobals -from otp.otpbase import OTPLocalizer -from otp.otpbase import OTPLauncherGlobals from otp.avatar.Avatar import teleportNotify +from otp.distributed import OTPClientRepository, OtpDoGlobals, PotentialAvatar +from otp.distributed.OtpDoGlobals import * +from otp.otpbase import OTPGlobals, OTPLauncherGlobals, OTPLocalizer + +from toontown.distributed import DelayDelete, ToontownDistrictStats +from toontown.friends import FriendHandle, FriendsListPanel, ToontownFriendSecret +from toontown.hood import StreetSign +from toontown.launcher.DownloadForceAcknowledge import * +from toontown.login import AvatarChooser, DateObject +from toontown.makeatoon import MakeAToon +from toontown.parties import ToontownTimeManager +from toontown.pets import DistributedPet, PetDetail, PetHandle +from toontown.toon import DistributedToon, LocalToon, Toon, ToonDNA +from toontown.toonbase import TTLocalizer from toontown.toonbase.ToonBaseGlobal import * from toontown.toonbase.ToontownGlobals import * -from toontown.launcher.DownloadForceAcknowledge import * -from toontown.distributed import DelayDelete -from toontown.friends import FriendHandle -from toontown.friends import FriendsListPanel -from toontown.friends import ToontownFriendSecret -from toontown.login import DateObject -from toontown.login import AvatarChooser -from toontown.makeatoon import MakeAToon -from toontown.pets import DistributedPet, PetDetail, PetHandle -from toontown.toonbase import TTLocalizer -from toontown.toontowngui import TTDialog -from toontown.toon import LocalToon -from toontown.toon import ToonDNA -from toontown.distributed import ToontownDistrictStats -from toontown.parties import ToontownTimeManager -from toontown.toon import Toon, DistributedToon +from toontown.toontowngui import ToontownLoadingBlocker, TTDialog + +from . import HoodMgr, PlayGame from .ToontownMsgTypes import * -from . import HoodMgr -from . import PlayGame -from toontown.toontowngui import ToontownLoadingBlocker -from toontown.hood import StreetSign + class ToontownClientRepository(OTPClientRepository.OTPClientRepository): SupportTutorial = 1 @@ -461,7 +454,7 @@ class ToontownClientRepository(OTPClientRepository.OTPClientRepository): base.localAvatar.defaultZone, -1]) self._userLoggingOut = False - + if self.wantStreetSign and not self.streetSign: self.streetSign = StreetSign.StreetSign() return diff --git a/toontown/distributed/ToontownDistrict.py b/toontown/distributed/ToontownDistrict.py index 830e473..f4dfdf8 100644 --- a/toontown/distributed/ToontownDistrict.py +++ b/toontown/distributed/ToontownDistrict.py @@ -1,7 +1,9 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed import DistributedObject + from otp.distributed import DistributedDistrict + class ToontownDistrict(DistributedDistrict.DistributedDistrict): notify = DirectNotifyGlobal.directNotify.newCategory('ToontownDistrict') diff --git a/toontown/distributed/ToontownDistrictAI.py b/toontown/distributed/ToontownDistrictAI.py index d9be1a2..a532fa9 100644 --- a/toontown/distributed/ToontownDistrictAI.py +++ b/toontown/distributed/ToontownDistrictAI.py @@ -1,6 +1,8 @@ from direct.directnotify import DirectNotifyGlobal + from otp.distributed.DistributedDistrictAI import DistributedDistrictAI + class ToontownDistrictAI(DistributedDistrictAI): notify = DirectNotifyGlobal.directNotify.newCategory('ToontownDistrictAI') diff --git a/toontown/distributed/ToontownDistrictStats.py b/toontown/distributed/ToontownDistrictStats.py index e0ab4fd..8e32440 100644 --- a/toontown/distributed/ToontownDistrictStats.py +++ b/toontown/distributed/ToontownDistrictStats.py @@ -1,9 +1,10 @@ -from direct.showbase import DirectObject from direct.directnotify import DirectNotifyGlobal -from direct.distributed import DistributedObject +from direct.distributed import DistributedObject, DoInterestManager +from direct.showbase import DirectObject from direct.task import Task -from direct.distributed import DoInterestManager + from otp.distributed.OtpDoGlobals import * + _ToonTownDistrictStatInterest = None _ToonTownDistrictStatInterestComplete = 0 _trashObject = DirectObject.DirectObject() diff --git a/toontown/distributed/ToontownDistrictStatsAI.py b/toontown/distributed/ToontownDistrictStatsAI.py index 86d4c6b..f9b2a2a 100644 --- a/toontown/distributed/ToontownDistrictStatsAI.py +++ b/toontown/distributed/ToontownDistrictStatsAI.py @@ -1,6 +1,7 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectAI import DistributedObjectAI + class ToontownDistrictStatsAI(DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('ToontownDistrictStatsAI') diff --git a/toontown/distributed/ToontownInternalRepository.py b/toontown/distributed/ToontownInternalRepository.py index 0d6f1ff..11fd085 100644 --- a/toontown/distributed/ToontownInternalRepository.py +++ b/toontown/distributed/ToontownInternalRepository.py @@ -1,6 +1,8 @@ from direct.directnotify import DirectNotifyGlobal -from otp.distributed.OTPInternalRepository import OTPInternalRepository + from otp.distributed.OtpDoGlobals import * +from otp.distributed.OTPInternalRepository import OTPInternalRepository + class ToontownInternalRepository(OTPInternalRepository): notify = DirectNotifyGlobal.directNotify.newCategory('ToontownInternalRepository') diff --git a/toontown/effects/BlastEffect.py b/toontown/effects/BlastEffect.py index ef6dd53..8a0fcec 100644 --- a/toontown/effects/BlastEffect.py +++ b/toontown/effects/BlastEffect.py @@ -1,7 +1,10 @@ from panda3d.core import * + from direct.interval.IntervalGlobal import * + from .EffectController import EffectController + class BlastEffect(NodePath, EffectController): def __init__(self): diff --git a/toontown/effects/Bubbles.py b/toontown/effects/Bubbles.py index 9b52e0c..1a158c4 100644 --- a/toontown/effects/Bubbles.py +++ b/toontown/effects/Bubbles.py @@ -1,10 +1,11 @@ +import random + from panda3d.core import * from panda3d.physics import * + from direct.interval.IntervalGlobal import * -from direct.particles import ParticleEffect -from direct.particles import Particles -from direct.particles import ForceGroup -import random +from direct.particles import ForceGroup, ParticleEffect, Particles + class Bubbles(NodePath): diff --git a/toontown/effects/CarSmoke.py b/toontown/effects/CarSmoke.py index 75469d8..1a93217 100644 --- a/toontown/effects/CarSmoke.py +++ b/toontown/effects/CarSmoke.py @@ -1,9 +1,12 @@ -from panda3d.core import * -from direct.particles import ParticleEffect -from direct.directnotify import DirectNotifyGlobal -from direct.showbase import AppRunnerGlobal import os +from panda3d.core import * + +from direct.directnotify import DirectNotifyGlobal +from direct.particles import ParticleEffect +from direct.showbase import AppRunnerGlobal + + class CarSmoke(NodePath): def __init__(self, parent): diff --git a/toontown/effects/ChrysanthemumEffect.py b/toontown/effects/ChrysanthemumEffect.py index d4081cc..e6a1bdd 100644 --- a/toontown/effects/ChrysanthemumEffect.py +++ b/toontown/effects/ChrysanthemumEffect.py @@ -1,7 +1,10 @@ from panda3d.core import * + from direct.interval.IntervalGlobal import * + from .EffectController import EffectController + class ChrysanthemumEffect(NodePath, EffectController): def __init__(self): diff --git a/toontown/effects/DistributedFireworkShow.py b/toontown/effects/DistributedFireworkShow.py index 334fb73..478afa3 100644 --- a/toontown/effects/DistributedFireworkShow.py +++ b/toontown/effects/DistributedFireworkShow.py @@ -1,6 +1,8 @@ from direct.distributed import DistributedObject + from toontown.effects.FireworkShowMixin import FireworkShowMixin + class DistributedFireworkShow(DistributedObject.DistributedObject, FireworkShowMixin): notify = directNotify.newCategory('DistributedFireworkShow') diff --git a/toontown/effects/DistributedFireworkShowAI.py b/toontown/effects/DistributedFireworkShowAI.py index a1a6701..4da375d 100644 --- a/toontown/effects/DistributedFireworkShowAI.py +++ b/toontown/effects/DistributedFireworkShowAI.py @@ -1,10 +1,12 @@ -from otp.ai.AIBaseGlobal import * -from direct.distributed import DistributedObjectAI from direct.directnotify import DirectNotifyGlobal -from direct.distributed import ClockDelta +from direct.distributed import ClockDelta, DistributedObjectAI +from direct.task import Task + +from otp.ai.AIBaseGlobal import * + from .FireworkShow import FireworkShow from .FireworkShows import getShowDuration -from direct.task import Task + class DistributedFireworkShowAI(DistributedObjectAI.DistributedObjectAI): @@ -34,12 +36,12 @@ class DistributedFireworkShowAI(DistributedObjectAI.DistributedObjectAI): duration = getShowDuration(self.eventId, self.style) taskMgr.doMethodLater(duration, self.fireworkShowDone, self.taskName("waitForShowDone")) else: - + duration = self.throwAwayShow.getShowDuration(self.eventId) - + assert( DistributedFireworkShowAI.notify.debug("startShow: event: %s, networkTime: %s, showDuration: %s" \ % (self.eventId, self.timestamp, duration) ) ) - + # Add the start and postShow delays and give ample time for postshow to complete duration += 20.0 taskMgr.doMethodLater(duration, self.fireworkShowDone, self.taskName("waitForShowDone")) @@ -60,7 +62,7 @@ class DistributedFireworkShowAI(DistributedObjectAI.DistributedObjectAI): self.d_shootFirework(x, y, z, style, color1, color2) # Charge the avId some jellybeans else: - self.d_shootFirework(x, y, z, style, color1,color2) + self.d_shootFirework(x, y, z, style, color1,color2) def d_shootFirework(self, x, y, z, style, color1, color2): self.sendUpdate("shootFirework", (x, y, z, style, color1, color2)) diff --git a/toontown/effects/Drift.py b/toontown/effects/Drift.py index d666f1c..0c8a399 100644 --- a/toontown/effects/Drift.py +++ b/toontown/effects/Drift.py @@ -1,8 +1,11 @@ -from panda3d.core import * -from direct.particles import ParticleEffect -from direct.directnotify import DirectNotifyGlobal import os +from panda3d.core import * + +from direct.directnotify import DirectNotifyGlobal +from direct.particles import ParticleEffect + + class Drift(NodePath): def __init__(self, parent, renderParent): diff --git a/toontown/effects/DustCloud.py b/toontown/effects/DustCloud.py index d77b585..abcacef 100644 --- a/toontown/effects/DustCloud.py +++ b/toontown/effects/DustCloud.py @@ -1,8 +1,12 @@ -from panda3d.core import * -from direct.interval.IntervalGlobal import * -from toontown.battle.BattleProps import globalPropPool -from direct.directnotify import DirectNotifyGlobal from enum import IntEnum + +from panda3d.core import * + +from direct.directnotify import DirectNotifyGlobal +from direct.interval.IntervalGlobal import * + +from toontown.battle.BattleProps import globalPropPool + 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/effects/EffectController.py b/toontown/effects/EffectController.py index 2efdde7..9e84e79 100644 --- a/toontown/effects/EffectController.py +++ b/toontown/effects/EffectController.py @@ -1,5 +1,6 @@ from panda3d.core import * + class EffectController: particleDummy = None diff --git a/toontown/effects/Firework.py b/toontown/effects/Firework.py index 86b34da..adc1cde 100644 --- a/toontown/effects/Firework.py +++ b/toontown/effects/Firework.py @@ -1,9 +1,13 @@ -from panda3d.core import * -from direct.interval.IntervalGlobal import * -from toontown.effects.FireworkGlobals import * -from toontown.effects.FireworkEffect import FireworkEffect import random +from panda3d.core import * + +from direct.interval.IntervalGlobal import * + +from toontown.effects.FireworkEffect import FireworkEffect +from toontown.effects.FireworkGlobals import * + + class Firework(NodePath): def __init__(self, typeId, velocity = Vec3(0, 0, 500), scale = 1.0, color1 = Vec4(1, 1, 1, 1), color2 = None, burstDelay = 1.25): diff --git a/toontown/effects/FireworkEffect.py b/toontown/effects/FireworkEffect.py index eb055fb..fa663d0 100644 --- a/toontown/effects/FireworkEffect.py +++ b/toontown/effects/FireworkEffect.py @@ -1,26 +1,30 @@ -from panda3d.core import * -from direct.interval.IntervalGlobal import * import random + +from panda3d.core import * + +from direct.interval.IntervalGlobal import * + +from toontown.effects.BlastEffect import BlastEffect +from toontown.effects.ChrysanthemumEffect import ChrysanthemumEffect from toontown.effects.FireworkGlobals import * +from toontown.effects.FireworkSparkles import FireworkSparkles +from toontown.effects.FlashEffect import FlashEffect from toontown.effects.Glow import Glow from toontown.effects.GlowTrail import GlowTrail -from toontown.effects.SparksTrail import SparksTrail -from toontown.effects.SparksTrailLong import SparksTrailLong -from toontown.effects.PolyTrail import PolyTrail -from toontown.effects.FlashEffect import FlashEffect -from toontown.effects.BlastEffect import BlastEffect -from toontown.effects.FireworkSparkles import FireworkSparkles -from toontown.effects.SimpleSparkles import SimpleSparkles -from toontown.effects.PeonyEffect import PeonyEffect -from toontown.effects.RayBurst import RayBurst -from toontown.effects.StarBurst import StarBurst -from toontown.effects.ChrysanthemumEffect import ChrysanthemumEffect -from toontown.effects.RingEffect import RingEffect +from toontown.effects.IceCream import IceCream from toontown.effects.NoiseSparkles import NoiseSparkles +from toontown.effects.PeonyEffect import PeonyEffect +from toontown.effects.PolyTrail import PolyTrail +from toontown.effects.RayBurst import RayBurst +from toontown.effects.RingEffect import RingEffect +from toontown.effects.SimpleSparkles import SimpleSparkles from toontown.effects.SkullBurst import SkullBurst from toontown.effects.SkullFlash import SkullFlash +from toontown.effects.SparksTrail import SparksTrail +from toontown.effects.SparksTrailLong import SparksTrailLong +from toontown.effects.StarBurst import StarBurst from toontown.effects.TrailExplosion import TrailExplosion -from toontown.effects.IceCream import IceCream + trailSfxNames = ['phase_4/audio/sfx/firework_whistle_01.ogg', 'phase_4/audio/sfx/firework_whistle_02.ogg'] burstSfxNames = ['phase_4/audio/sfx/firework_explosion_01.ogg', 'phase_4/audio/sfx/firework_explosion_02.ogg', diff --git a/toontown/effects/FireworkShow.py b/toontown/effects/FireworkShow.py index 2f1302f..95c2324 100644 --- a/toontown/effects/FireworkShow.py +++ b/toontown/effects/FireworkShow.py @@ -1,10 +1,14 @@ -from panda3d.core import * -from direct.interval.IntervalGlobal import * -from toontown.effects.FireworkGlobals import * -from toontown.effects.Firework import Firework -from toontown.toonbase import ToontownGlobals -from toontown.parties import PartyGlobals import random + +from panda3d.core import * + +from direct.interval.IntervalGlobal import * + +from toontown.effects.Firework import Firework +from toontown.effects.FireworkGlobals import * +from toontown.parties import PartyGlobals +from toontown.toonbase import ToontownGlobals + colors = [Vec4(1, 1, 1, 1), Vec4(1, 0.1, 0.1, 1), Vec4(0.1, 1, 0.1, 1), diff --git a/toontown/effects/FireworkShowMixin.py b/toontown/effects/FireworkShowMixin.py index fb7e8e6..85ea11d 100644 --- a/toontown/effects/FireworkShowMixin.py +++ b/toontown/effects/FireworkShowMixin.py @@ -1,13 +1,16 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.ClockDelta import * from direct.interval.IntervalGlobal import * -from toontown.toonbase.ToontownGlobals import * -from toontown.toonbase import TTLocalizer -from toontown.parties import PartyGlobals -from . import Fireworks -from . import FireworkShows -from .FireworkGlobals import skyTransitionDuration, preShowPauseDuration, postShowPauseDuration, preNormalMusicPauseDuration + from toontown.effects.FireworkShow import FireworkShow +from toontown.parties import PartyGlobals +from toontown.toonbase import TTLocalizer +from toontown.toonbase.ToontownGlobals import * + +from . import Fireworks, FireworkShows +from .FireworkGlobals import (postShowPauseDuration, preNormalMusicPauseDuration, preShowPauseDuration, + skyTransitionDuration) + class FireworkShowMixin: notify = DirectNotifyGlobal.directNotify.newCategory('FireworkShowMixin') @@ -134,7 +137,7 @@ class FireworkShowMixin: def restoreCameraLens(self): hood = self.getHood() - from toontown.hood import OZHood, GSHood + from toontown.hood import GSHood, OZHood if isinstance(hood, OZHood.OZHood): base.camLens.setFar(SpeedwayCameraFar) elif isinstance(hood, GSHood.GSHood): @@ -176,7 +179,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 + from toontown.hood import BRHood, DDHood, DGHood, DLHood, GSHood, MMHood, OZHood, PartyHood, TTHood if isinstance(hood, TTHood.TTHood): self.fireworkShow.setPos(150, 0, 80) self.fireworkShow.setHpr(90, 0, 0) diff --git a/toontown/effects/FireworkShows.py b/toontown/effects/FireworkShows.py index 231864e..26334fd 100644 --- a/toontown/effects/FireworkShows.py +++ b/toontown/effects/FireworkShows.py @@ -1,6 +1,8 @@ -from .FireworkGlobals import * -from toontown.toonbase import ToontownGlobals from toontown.parties import PartyGlobals +from toontown.toonbase import ToontownGlobals + +from .FireworkGlobals import * + shows = {ToontownGlobals.JULY4_FIREWORKS: [((2, ROCKET, RED, diff --git a/toontown/effects/FireworkSparkles.py b/toontown/effects/FireworkSparkles.py index 41b26a1..126485b 100644 --- a/toontown/effects/FireworkSparkles.py +++ b/toontown/effects/FireworkSparkles.py @@ -1,10 +1,14 @@ +import random + from panda3d.core import * from panda3d.physics import * + from direct.interval.IntervalGlobal import * -from direct.particles import ParticleEffect, Particles, ForceGroup +from direct.particles import ForceGroup, ParticleEffect, Particles + from .EffectController import EffectController from .PooledEffect import PooledEffect -import random + class FireworkSparkles(PooledEffect, EffectController): diff --git a/toontown/effects/Fireworks.py b/toontown/effects/Fireworks.py index f628c64..0900b66 100644 --- a/toontown/effects/Fireworks.py +++ b/toontown/effects/Fireworks.py @@ -1,11 +1,13 @@ -from direct.interval.IntervalGlobal import * -from direct.particles import ParticleEffect -from direct.particles import Particles -from direct.particles import ForceGroup +import random + from panda3d.core import * from panda3d.physics import * -import random + +from direct.interval.IntervalGlobal import * +from direct.particles import ForceGroup, ParticleEffect, Particles + from .FireworkGlobals import * + colors = {WHITE: Vec4(1, 1, 1, 1), RED: Vec4(1, 0.2, 0.2, 1), BLUE: Vec4(0.2, 0.2, 1, 1), diff --git a/toontown/effects/FlashEffect.py b/toontown/effects/FlashEffect.py index ceea5a6..a90eef9 100644 --- a/toontown/effects/FlashEffect.py +++ b/toontown/effects/FlashEffect.py @@ -1,7 +1,10 @@ from panda3d.core import * + from direct.interval.IntervalGlobal import * + from .EffectController import EffectController + class FlashEffect(NodePath, EffectController): def __init__(self): diff --git a/toontown/effects/Glow.py b/toontown/effects/Glow.py index 99fe7ed..4067b07 100644 --- a/toontown/effects/Glow.py +++ b/toontown/effects/Glow.py @@ -1,8 +1,11 @@ from panda3d.core import * + from direct.interval.IntervalGlobal import * + from .EffectController import EffectController from .PooledEffect import PooledEffect + class Glow(PooledEffect, EffectController): def __init__(self): diff --git a/toontown/effects/GlowTrail.py b/toontown/effects/GlowTrail.py index c0e9eb4..b11534d 100644 --- a/toontown/effects/GlowTrail.py +++ b/toontown/effects/GlowTrail.py @@ -1,9 +1,12 @@ from panda3d.core import * from panda3d.physics import * + from direct.interval.IntervalGlobal import * -from direct.particles import ParticleEffect, Particles, ForceGroup -from .PooledEffect import PooledEffect +from direct.particles import ForceGroup, ParticleEffect, Particles + from .EffectController import EffectController +from .PooledEffect import PooledEffect + class GlowTrail(PooledEffect, EffectController): diff --git a/toontown/effects/IceCream.py b/toontown/effects/IceCream.py index d0afda9..7950900 100644 --- a/toontown/effects/IceCream.py +++ b/toontown/effects/IceCream.py @@ -1,10 +1,13 @@ from panda3d.core import * from panda3d.physics import * + from direct.interval.IntervalGlobal import * -from direct.particles import ParticleEffect, Particles, ForceGroup +from direct.particles import ForceGroup, ParticleEffect, Particles + from .EffectController import EffectController from .PooledEffect import PooledEffect + class IceCream(PooledEffect, EffectController): def __init__(self): diff --git a/toontown/effects/NoiseSparkles.py b/toontown/effects/NoiseSparkles.py index e9822c1..238b8a7 100644 --- a/toontown/effects/NoiseSparkles.py +++ b/toontown/effects/NoiseSparkles.py @@ -1,10 +1,14 @@ +import random + from panda3d.core import * from panda3d.physics import * + from direct.interval.IntervalGlobal import * -from direct.particles import ParticleEffect, Particles, ForceGroup +from direct.particles import ForceGroup, ParticleEffect, Particles + from .EffectController import EffectController from .PooledEffect import PooledEffect -import random + class NoiseSparkles(PooledEffect, EffectController): diff --git a/toontown/effects/PeonyEffect.py b/toontown/effects/PeonyEffect.py index 8ddeebe..0dfee9c 100644 --- a/toontown/effects/PeonyEffect.py +++ b/toontown/effects/PeonyEffect.py @@ -1,8 +1,11 @@ from panda3d.core import * -from direct.showbase.DirectObject import * + from direct.interval.IntervalGlobal import * -from .PooledEffect import PooledEffect +from direct.showbase.DirectObject import * + from .EffectController import EffectController +from .PooledEffect import PooledEffect + class PeonyEffect(PooledEffect, EffectController): diff --git a/toontown/effects/PolyTrail.py b/toontown/effects/PolyTrail.py index 14c82fe..2de835f 100644 --- a/toontown/effects/PolyTrail.py +++ b/toontown/effects/PolyTrail.py @@ -1,7 +1,10 @@ -from panda3d.core import * -from direct.motiontrail.MotionTrail import * import random +from panda3d.core import * + +from direct.motiontrail.MotionTrail import * + + class PolyTrail(NodePath): def __init__(self, root_node_path = None, vertex_list = None, color_list = None, time_window = 0.25): diff --git a/toontown/effects/PooledEffect.py b/toontown/effects/PooledEffect.py index cd4d83e..0d65be5 100644 --- a/toontown/effects/PooledEffect.py +++ b/toontown/effects/PooledEffect.py @@ -1,7 +1,10 @@ +import re + from panda3d.core import * + from direct.showbase import Pool from direct.showbase.DirectObject import DirectObject -import re + class PooledEffect(DirectObject, NodePath): pool = None diff --git a/toontown/effects/RayBurst.py b/toontown/effects/RayBurst.py index b9415f6..715843c 100644 --- a/toontown/effects/RayBurst.py +++ b/toontown/effects/RayBurst.py @@ -1,7 +1,10 @@ from panda3d.core import * + from direct.interval.IntervalGlobal import * + from .EffectController import EffectController + class RayBurst(NodePath, EffectController): def __init__(self): diff --git a/toontown/effects/RingEffect.py b/toontown/effects/RingEffect.py index 27f7ed1..bc1f42c 100644 --- a/toontown/effects/RingEffect.py +++ b/toontown/effects/RingEffect.py @@ -1,10 +1,14 @@ +import random + from panda3d.core import * from panda3d.physics import * + from direct.interval.IntervalGlobal import * -from direct.particles import ParticleEffect, Particles, ForceGroup +from direct.particles import ForceGroup, ParticleEffect, Particles + from .EffectController import EffectController from .PooledEffect import PooledEffect -import random + class RingEffect(PooledEffect, EffectController): diff --git a/toontown/effects/Ripples.py b/toontown/effects/Ripples.py index 7bb9e56..add76eb 100644 --- a/toontown/effects/Ripples.py +++ b/toontown/effects/Ripples.py @@ -1,7 +1,10 @@ from panda3d.core import * + from direct.interval.IntervalGlobal import * + from toontown.battle.BattleProps import globalPropPool + class Ripples(NodePath): rippleCount = 0 diff --git a/toontown/effects/RocketExplosion.py b/toontown/effects/RocketExplosion.py index 88641c3..8019bc8 100644 --- a/toontown/effects/RocketExplosion.py +++ b/toontown/effects/RocketExplosion.py @@ -1,7 +1,9 @@ from panda3d.core import * -from direct.particles import ParticleEffect + from direct.directnotify import DirectNotifyGlobal from direct.interval.IntervalGlobal import * +from direct.particles import ParticleEffect + class RocketExplosion(NodePath): diff --git a/toontown/effects/ScavengerHuntEffects.py b/toontown/effects/ScavengerHuntEffects.py index bf3968f..cb75907 100644 --- a/toontown/effects/ScavengerHuntEffects.py +++ b/toontown/effects/ScavengerHuntEffects.py @@ -1,9 +1,11 @@ from panda3d.core import * -from direct.interval.IntervalGlobal import * -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import TTLocalizer + from direct.gui.DirectFrame import DirectFrame from direct.gui.DirectLabel import DirectLabel +from direct.interval.IntervalGlobal import * + +from toontown.toonbase import ToontownGlobals, TTLocalizer + class ScavengerHuntEffect: images = None diff --git a/toontown/effects/SimpleSparkles.py b/toontown/effects/SimpleSparkles.py index 38e3a42..3418107 100644 --- a/toontown/effects/SimpleSparkles.py +++ b/toontown/effects/SimpleSparkles.py @@ -1,10 +1,14 @@ +import random + from panda3d.core import * from panda3d.physics import * + from direct.interval.IntervalGlobal import * -from direct.particles import ParticleEffect, Particles, ForceGroup +from direct.particles import ForceGroup, ParticleEffect, Particles + from .EffectController import EffectController from .PooledEffect import PooledEffect -import random + class SimpleSparkles(PooledEffect, EffectController): diff --git a/toontown/effects/SkullBurst.py b/toontown/effects/SkullBurst.py index 1cfc317..81d953b 100644 --- a/toontown/effects/SkullBurst.py +++ b/toontown/effects/SkullBurst.py @@ -1,8 +1,11 @@ from panda3d.core import * -from direct.showbase.DirectObject import * + from direct.interval.IntervalGlobal import * -from .PooledEffect import PooledEffect +from direct.showbase.DirectObject import * + from .EffectController import EffectController +from .PooledEffect import PooledEffect + class SkullBurst(PooledEffect, EffectController): diff --git a/toontown/effects/SkullFlash.py b/toontown/effects/SkullFlash.py index 5228e1c..18b4fb0 100644 --- a/toontown/effects/SkullFlash.py +++ b/toontown/effects/SkullFlash.py @@ -1,8 +1,11 @@ from panda3d.core import * -from direct.showbase.DirectObject import * + from direct.interval.IntervalGlobal import * -from .PooledEffect import PooledEffect +from direct.showbase.DirectObject import * + from .EffectController import EffectController +from .PooledEffect import PooledEffect + class SkullFlash(PooledEffect, EffectController): diff --git a/toontown/effects/Sparks.py b/toontown/effects/Sparks.py index 211ed0e..3c4d3e2 100644 --- a/toontown/effects/Sparks.py +++ b/toontown/effects/Sparks.py @@ -1,8 +1,11 @@ -from panda3d.core import * -from direct.particles import ParticleEffect -from direct.directnotify import DirectNotifyGlobal import os +from panda3d.core import * + +from direct.directnotify import DirectNotifyGlobal +from direct.particles import ParticleEffect + + class Sparks(NodePath): def __init__(self, parent, renderParent): diff --git a/toontown/effects/SparksTrail.py b/toontown/effects/SparksTrail.py index dfa8420..7b2b107 100644 --- a/toontown/effects/SparksTrail.py +++ b/toontown/effects/SparksTrail.py @@ -1,9 +1,12 @@ from panda3d.core import * from panda3d.physics import * + from direct.interval.IntervalGlobal import * -from direct.particles import ParticleEffect, Particles, ForceGroup -from .PooledEffect import PooledEffect +from direct.particles import ForceGroup, ParticleEffect, Particles + from .EffectController import EffectController +from .PooledEffect import PooledEffect + class SparksTrail(PooledEffect, EffectController): diff --git a/toontown/effects/SparksTrailLong.py b/toontown/effects/SparksTrailLong.py index aaf9f45..dd22ad5 100644 --- a/toontown/effects/SparksTrailLong.py +++ b/toontown/effects/SparksTrailLong.py @@ -1,9 +1,12 @@ from panda3d.core import * from panda3d.physics import * + from direct.interval.IntervalGlobal import * -from direct.particles import ParticleEffect, Particles, ForceGroup -from .PooledEffect import PooledEffect +from direct.particles import ForceGroup, ParticleEffect, Particles + from .EffectController import EffectController +from .PooledEffect import PooledEffect + class SparksTrailLong(PooledEffect, EffectController): diff --git a/toontown/effects/Splash.py b/toontown/effects/Splash.py index bd34382..140f67b 100644 --- a/toontown/effects/Splash.py +++ b/toontown/effects/Splash.py @@ -1,8 +1,12 @@ from panda3d.core import * + from direct.interval.IntervalGlobal import * -from .Ripples import * -from toontown.battle.BattleProps import globalPropPool + from toontown.battle import BattleParticles +from toontown.battle.BattleProps import globalPropPool + +from .Ripples import * + class Splash(NodePath): splashCount = 0 diff --git a/toontown/effects/StarBurst.py b/toontown/effects/StarBurst.py index a68520e..f9f4c8e 100644 --- a/toontown/effects/StarBurst.py +++ b/toontown/effects/StarBurst.py @@ -1,10 +1,13 @@ from panda3d.core import * from panda3d.physics import * + from direct.interval.IntervalGlobal import * -from direct.particles import ParticleEffect, Particles, ForceGroup +from direct.particles import ForceGroup, ParticleEffect, Particles + from .EffectController import EffectController from .PooledEffect import PooledEffect + class StarBurst(PooledEffect, EffectController): def __init__(self): diff --git a/toontown/effects/TrailExplosion.py b/toontown/effects/TrailExplosion.py index 06e126e..986b18c 100644 --- a/toontown/effects/TrailExplosion.py +++ b/toontown/effects/TrailExplosion.py @@ -1,9 +1,14 @@ +import random + from panda3d.core import * + from direct.interval.IntervalGlobal import * + +from toontown.effects.SparksTrailLong import SparksTrailLong + from .EffectController import EffectController from .PooledEffect import PooledEffect -from toontown.effects.SparksTrailLong import SparksTrailLong -import random + class TrailExplosion(PooledEffect, EffectController): trailsVel = [[Vec3(150, -50, 100), Vec3(-150, -50, 100), Vec3(0, 150, 100)], [Vec3(120, 120, 100), diff --git a/toontown/effects/Wake.py b/toontown/effects/Wake.py index 6ee5b39..f094bbc 100644 --- a/toontown/effects/Wake.py +++ b/toontown/effects/Wake.py @@ -1,7 +1,10 @@ from panda3d.core import * + from direct.interval.IntervalGlobal import * + from toontown.battle.BattleProps import globalPropPool + class Wake(NodePath): wakeCount = 0 diff --git a/toontown/estate/BankGUI.py b/toontown/estate/BankGUI.py index 490b61f..325c8b6 100644 --- a/toontown/estate/BankGUI.py +++ b/toontown/estate/BankGUI.py @@ -1,10 +1,12 @@ -from direct.gui.DirectGui import * from panda3d.core import * + from direct.directnotify import DirectNotifyGlobal -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import TTLocalizer +from direct.gui.DirectGui import * from direct.task.Task import Task +from toontown.toonbase import ToontownGlobals, TTLocalizer + + class BankGui(DirectFrame): notify = DirectNotifyGlobal.directNotify.newCategory('BankGui') diff --git a/toontown/estate/BeanRecipeGui.py b/toontown/estate/BeanRecipeGui.py index be4d07f..cd42b2e 100644 --- a/toontown/estate/BeanRecipeGui.py +++ b/toontown/estate/BeanRecipeGui.py @@ -1,10 +1,12 @@ -from direct.gui.DirectGui import * -from direct.directnotify import DirectNotifyGlobal from panda3d.core import * -from toontown.estate import GardenGlobals -from toontown.estate import PlantingGUI + +from direct.directnotify import DirectNotifyGlobal +from direct.gui.DirectGui import * + +from toontown.estate import GardenGlobals, PlantingGUI from toontown.toonbase import TTLocalizer + class BeanRecipeGui(DirectFrame): notify = DirectNotifyGlobal.directNotify.newCategory('PlantingGUI') diff --git a/toontown/estate/ClosetGUI.py b/toontown/estate/ClosetGUI.py index 1287d30..d015764 100644 --- a/toontown/estate/ClosetGUI.py +++ b/toontown/estate/ClosetGUI.py @@ -1,12 +1,14 @@ -from direct.showbase.PythonUtil import Functor -from direct.gui.DirectGui import * from panda3d.core import * + +from direct.gui.DirectGui import * +from direct.showbase.PythonUtil import Functor + from toontown.makeatoon import ClothesGUI -from . import ClosetGlobals -from toontown.toonbase import TTLocalizer -from toontown.toonbase import ToontownGlobals +from toontown.toonbase import ToontownGlobals, TTLocalizer from toontown.toontowngui import TTDialog -from toontown.toonbase import TTLocalizer + +from . import ClosetGlobals + class ClosetGUI(ClothesGUI.ClothesGUI): notify = directNotify.newCategory('ClosetGUI') diff --git a/toontown/estate/DistributedAnimatedStatuary.py b/toontown/estate/DistributedAnimatedStatuary.py index 1b9936d..9439e77 100644 --- a/toontown/estate/DistributedAnimatedStatuary.py +++ b/toontown/estate/DistributedAnimatedStatuary.py @@ -1,9 +1,11 @@ from panda3d.core import NodePath -from direct.directnotify import DirectNotifyGlobal -from toontown.toonbase import ToontownGlobals -from toontown.estate import DistributedStatuary -from toontown.estate import GardenGlobals + from direct.actor import Actor +from direct.directnotify import DirectNotifyGlobal + +from toontown.estate import DistributedStatuary, GardenGlobals +from toontown.toonbase import ToontownGlobals + class DistributedAnimatedStatuary(DistributedStatuary.DistributedStatuary): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedAnimatedStatuary') diff --git a/toontown/estate/DistributedAnimatedStatuaryAI.py b/toontown/estate/DistributedAnimatedStatuaryAI.py index 75bf239..5458ca0 100644 --- a/toontown/estate/DistributedAnimatedStatuaryAI.py +++ b/toontown/estate/DistributedAnimatedStatuaryAI.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectAI import DistributedObjectAI + class DistributedAnimatedStatuaryAI(DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedAnimatedStatuaryAI') diff --git a/toontown/estate/DistributedBank.py b/toontown/estate/DistributedBank.py index 357e574..2e13b5d 100644 --- a/toontown/estate/DistributedBank.py +++ b/toontown/estate/DistributedBank.py @@ -1,18 +1,18 @@ -from direct.gui.DirectGui import * from panda3d.core import * -from toontown.toonbase.ToontownGlobals import * -from toontown.toonbase.ToonBaseGlobal import * -from panda3d.core import * -from direct.interval.IntervalGlobal import * + from direct.distributed.ClockDelta import * -from toontown.toonbase import ToontownGlobals -from . import DistributedFurnitureItem -from toontown.toonbase import TTLocalizer -from . import BankGUI -from .BankGlobals import * +from direct.gui.DirectGui import * +from direct.interval.IntervalGlobal import * + +from toontown.catalog.CatalogFurnitureItem import FTScale, FurnitureTypes +from toontown.toonbase import ToontownGlobals, TTLocalizer +from toontown.toonbase.ToonBaseGlobal import * +from toontown.toonbase.ToontownGlobals import * from toontown.toontowngui import TTDialog -from toontown.catalog.CatalogFurnitureItem import FurnitureTypes -from toontown.catalog.CatalogFurnitureItem import FTScale + +from . import BankGUI, DistributedFurnitureItem +from .BankGlobals import * + class DistributedBank(DistributedFurnitureItem.DistributedFurnitureItem): notify = directNotify.newCategory('DistributedBank') diff --git a/toontown/estate/DistributedBankAI.py b/toontown/estate/DistributedBankAI.py index f6239a2..4860395 100644 --- a/toontown/estate/DistributedBankAI.py +++ b/toontown/estate/DistributedBankAI.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectAI import DistributedObjectAI + class DistributedBankAI(DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedBankAI') diff --git a/toontown/estate/DistributedBankMgr.py b/toontown/estate/DistributedBankMgr.py index 7a086eb..2a27ebe 100644 --- a/toontown/estate/DistributedBankMgr.py +++ b/toontown/estate/DistributedBankMgr.py @@ -1,7 +1,9 @@ -from direct.distributed import DistributedObject from direct.directnotify import DirectNotifyGlobal +from direct.distributed import DistributedObject + from toontown.toonbase import TTLocalizer + class DistributedBankMgr(DistributedObject.DistributedObject): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedBankMgr') neverDisable = 1 diff --git a/toontown/estate/DistributedBankMgrAI.py b/toontown/estate/DistributedBankMgrAI.py index aea1183..178b37f 100644 --- a/toontown/estate/DistributedBankMgrAI.py +++ b/toontown/estate/DistributedBankMgrAI.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectAI import DistributedObjectAI + class DistributedBankMgrAI(DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedBankMgrAI') diff --git a/toontown/estate/DistributedCannon.py b/toontown/estate/DistributedCannon.py index 12b07ab..2cb8b1c 100644 --- a/toontown/estate/DistributedCannon.py +++ b/toontown/estate/DistributedCannon.py @@ -1,26 +1,23 @@ -from panda3d.core import * -from toontown.toonbase.ToonBaseGlobal import * -from toontown.toonbase import ToontownGlobals -from direct.distributed.ClockDelta import * -from direct.interval.IntervalGlobal import * -from direct.fsm import ClassicFSM, State -from direct.fsm import State -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import ToontownTimer -from direct.task.Task import Task -from toontown.minigame import Trajectory import math -from toontown.toon import ToonHead -from toontown.effects import Splash -from toontown.effects import DustCloud -from toontown.minigame import CannonGameGlobals -from . import CannonGlobals -from direct.gui.DirectGui import * + from panda3d.core import * -from toontown.toonbase import TTLocalizer -from direct.distributed import DistributedObject -from toontown.effects import Wake + from direct.controls.ControlManager import CollisionHandlerRayStart +from direct.distributed import DistributedObject +from direct.distributed.ClockDelta import * +from direct.fsm import ClassicFSM, State +from direct.gui.DirectGui import * +from direct.interval.IntervalGlobal import * +from direct.task.Task import Task + +from toontown.effects import DustCloud, Splash, Wake +from toontown.minigame import CannonGameGlobals, Trajectory +from toontown.toon import ToonHead +from toontown.toonbase import ToontownGlobals, ToontownTimer, TTLocalizer +from toontown.toonbase.ToonBaseGlobal import * + +from . import CannonGlobals + LAND_TIME = 2 WORLD_SCALE = 2.0 GROUND_SCALE = 1.4 * WORLD_SCALE diff --git a/toontown/estate/DistributedCannonAI.py b/toontown/estate/DistributedCannonAI.py index a299411..b103d47 100644 --- a/toontown/estate/DistributedCannonAI.py +++ b/toontown/estate/DistributedCannonAI.py @@ -1,13 +1,14 @@ -from toontown.toonbase import ToontownGlobals -from direct.distributed.ClockDelta import * -from direct.fsm import ClassicFSM -from direct.fsm import State -from direct.task import Task -from toontown.minigame import CannonGameGlobals from direct.distributed import DistributedObjectAI -from toontown.minigame import Trajectory +from direct.distributed.ClockDelta import * +from direct.fsm import ClassicFSM, State +from direct.task import Task + +from toontown.minigame import CannonGameGlobals, Trajectory +from toontown.toonbase import ToontownGlobals + from . import CannonGlobals + class DistributedCannonAI(DistributedObjectAI.DistributedObjectAI): notify = directNotify.newCategory('DistributedCannonAI') diff --git a/toontown/estate/DistributedChangingStatuary.py b/toontown/estate/DistributedChangingStatuary.py index 233d6aa..d6a9c65 100644 --- a/toontown/estate/DistributedChangingStatuary.py +++ b/toontown/estate/DistributedChangingStatuary.py @@ -1,8 +1,10 @@ from panda3d.core import NodePath + from direct.directnotify import DirectNotifyGlobal + +from toontown.estate import DistributedStatuary, GardenGlobals from toontown.toonbase import ToontownGlobals -from toontown.estate import DistributedStatuary -from toontown.estate import GardenGlobals + class DistributedChangingStatuary(DistributedStatuary.DistributedStatuary): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedChangingStatuary') diff --git a/toontown/estate/DistributedChangingStatuaryAI.py b/toontown/estate/DistributedChangingStatuaryAI.py index f5836f4..ec370a6 100644 --- a/toontown/estate/DistributedChangingStatuaryAI.py +++ b/toontown/estate/DistributedChangingStatuaryAI.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectAI import DistributedObjectAI + class DistributedChangingStatuaryAI(DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedChangingStatuaryAI') diff --git a/toontown/estate/DistributedCloset.py b/toontown/estate/DistributedCloset.py index b8da80b..ed45e1e 100644 --- a/toontown/estate/DistributedCloset.py +++ b/toontown/estate/DistributedCloset.py @@ -1,19 +1,19 @@ -from direct.gui.DirectGui import * from panda3d.core import * -from toontown.toonbase.ToontownGlobals import * -from toontown.toonbase.ToonBaseGlobal import * -from panda3d.core import * -from direct.interval.IntervalGlobal import * + from direct.distributed.ClockDelta import * -from toontown.toonbase import ToontownGlobals -from direct.showbase import DirectObject -from toontown.toon import ToonDNA from direct.fsm import ClassicFSM, State, StateData -from . import ClosetGUI +from direct.gui.DirectGui import * +from direct.interval.IntervalGlobal import * +from direct.showbase import DirectObject from direct.task.Task import Task -from . import ClosetGlobals -from . import DistributedFurnitureItem -from toontown.toonbase import TTLocalizer + +from toontown.toon import ToonDNA +from toontown.toonbase import ToontownGlobals, TTLocalizer +from toontown.toonbase.ToonBaseGlobal import * +from toontown.toonbase.ToontownGlobals import * + +from . import ClosetGlobals, ClosetGUI, DistributedFurnitureItem + class DistributedCloset(DistributedFurnitureItem.DistributedFurnitureItem): notify = directNotify.newCategory('DistributedCloset') diff --git a/toontown/estate/DistributedClosetAI.py b/toontown/estate/DistributedClosetAI.py index eb3b7c7..03748a3 100644 --- a/toontown/estate/DistributedClosetAI.py +++ b/toontown/estate/DistributedClosetAI.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectAI import DistributedObjectAI + class DistributedClosetAI(DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedClosetAI') diff --git a/toontown/estate/DistributedEstate.py b/toontown/estate/DistributedEstate.py index 3ae4661..2523fb7 100644 --- a/toontown/estate/DistributedEstate.py +++ b/toontown/estate/DistributedEstate.py @@ -1,35 +1,29 @@ -from panda3d.core import * -from toontown.toonbase.ToonBaseGlobal import * -from direct.gui.DirectGui import * -from panda3d.core import * -from direct.distributed.ClockDelta import * -from direct.interval.IntervalGlobal import * import math -from toontown.toonbase import ToontownGlobals -from direct.distributed import DistributedObject -from direct.directnotify import DirectNotifyGlobal -from direct.fsm import ClassicFSM -from direct.fsm import State -from toontown.toon import Toon -from direct.showbase import RandomNumGen -from direct.task.Task import Task -from toontown.toonbase import TTLocalizer -import random import pickle +import random import time -from direct.showbase import PythonUtil + +from panda3d.core import * + +from direct.directnotify import DirectNotifyGlobal +from direct.distributed import DistributedObject +from direct.distributed.ClockDelta import * +from direct.fsm import ClassicFSM, State +from direct.gui.DirectGui import * +from direct.interval.IntervalGlobal import * +from direct.showbase import PythonUtil, RandomNumGen +from direct.task.Task import Task + +from toontown.estate import DistributedFlower, DistributedGagTree, DistributedStatuary, FlowerSellGUI, GardenGlobals from toontown.hood import Place -from . import Estate -from . import HouseGlobals -from toontown.estate import GardenGlobals -from toontown.estate import DistributedFlower -from toontown.estate import DistributedGagTree -from toontown.estate import DistributedStatuary -from . import GardenDropGame -from . import GardenProgressMeter -from toontown.estate import FlowerSellGUI +from toontown.toon import Toon +from toontown.toonbase import ToontownGlobals, TTLocalizer +from toontown.toonbase.ToonBaseGlobal import * from toontown.toontowngui import TTDialog +from . import Estate, GardenDropGame, GardenProgressMeter, HouseGlobals + + class DistributedEstate(DistributedObject.DistributedObject): notify = directNotify.newCategory('DistributedEstate') diff --git a/toontown/estate/DistributedEstateAI.py b/toontown/estate/DistributedEstateAI.py index 50c1a0a..8a0632f 100644 --- a/toontown/estate/DistributedEstateAI.py +++ b/toontown/estate/DistributedEstateAI.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectAI import DistributedObjectAI + class DistributedEstateAI(DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedEstateAI') diff --git a/toontown/estate/DistributedFireworksCannon.py b/toontown/estate/DistributedFireworksCannon.py index 402f0b9..9495256 100644 --- a/toontown/estate/DistributedFireworksCannon.py +++ b/toontown/estate/DistributedFireworksCannon.py @@ -1,13 +1,15 @@ -from toontown.toonbase.ToontownGlobals import * -from direct.interval.IntervalGlobal import * +from panda3d.core import CollisionNode, CollisionSphere + from direct.distributed.ClockDelta import * -from .HouseGlobals import * +from direct.interval.IntervalGlobal import * + from toontown.effects import DistributedFireworkShow -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import TTLocalizer -from panda3d.core import CollisionSphere -from panda3d.core import CollisionNode +from toontown.toonbase import ToontownGlobals, TTLocalizer +from toontown.toonbase.ToontownGlobals import * + from . import FireworksGui +from .HouseGlobals import * + class DistributedFireworksCannon(DistributedFireworkShow.DistributedFireworkShow): notify = directNotify.newCategory('DistributedFireworksCannon') diff --git a/toontown/estate/DistributedFireworksCannonAI.py b/toontown/estate/DistributedFireworksCannonAI.py index 1c84fa3..e38e0a4 100644 --- a/toontown/estate/DistributedFireworksCannonAI.py +++ b/toontown/estate/DistributedFireworksCannonAI.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectAI import DistributedObjectAI + class DistributedFireworksCannonAI(DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedFireworksCannonAI') diff --git a/toontown/estate/DistributedFlower.py b/toontown/estate/DistributedFlower.py index 8692847..8e7582d 100644 --- a/toontown/estate/DistributedFlower.py +++ b/toontown/estate/DistributedFlower.py @@ -1,9 +1,9 @@ -from toontown.estate import DistributedPlantBase from direct.directnotify import DirectNotifyGlobal -from toontown.estate import FlowerBase -from toontown.estate import GardenGlobals -from toontown.toontowngui import TTDialog + +from toontown.estate import DistributedPlantBase, FlowerBase, GardenGlobals from toontown.toonbase import TTLocalizer +from toontown.toontowngui import TTDialog + DIRT_AS_WATER_INDICATOR = True DIRT_MOUND_HEIGHT = 0.3 diff --git a/toontown/estate/DistributedFlowerAI.py b/toontown/estate/DistributedFlowerAI.py index 28e8cdf..a08b04f 100644 --- a/toontown/estate/DistributedFlowerAI.py +++ b/toontown/estate/DistributedFlowerAI.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectAI import DistributedObjectAI + class DistributedFlowerAI(DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedFlowerAI') diff --git a/toontown/estate/DistributedFurnitureItem.py b/toontown/estate/DistributedFurnitureItem.py index b4fac97..f85369f 100644 --- a/toontown/estate/DistributedFurnitureItem.py +++ b/toontown/estate/DistributedFurnitureItem.py @@ -1,14 +1,14 @@ -from toontown.toonbase.ToontownGlobals import * -from direct.interval.IntervalGlobal import * +from direct.distributed import DistributedObject, DistributedSmoothNode from direct.distributed.ClockDelta import * -from toontown.catalog import CatalogItem -from toontown.toonbase import ToontownGlobals -from direct.distributed import DistributedObject -from toontown.toonbase import TTLocalizer -from . import DistributedHouseItem -from direct.distributed import DistributedSmoothNode +from direct.interval.IntervalGlobal import * from direct.task import Task -from . import HouseGlobals + +from toontown.catalog import CatalogItem +from toontown.toonbase import ToontownGlobals, TTLocalizer +from toontown.toonbase.ToontownGlobals import * + +from . import DistributedHouseItem, HouseGlobals + class DistributedFurnitureItem(DistributedHouseItem.DistributedHouseItem, DistributedSmoothNode.DistributedSmoothNode): notify = directNotify.newCategory('DistributedFurnitureItem') diff --git a/toontown/estate/DistributedFurnitureItemAI.py b/toontown/estate/DistributedFurnitureItemAI.py index ae9d7ef..4955810 100644 --- a/toontown/estate/DistributedFurnitureItemAI.py +++ b/toontown/estate/DistributedFurnitureItemAI.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectAI import DistributedObjectAI + class DistributedFurnitureItemAI(DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedFurnitureItemAI') diff --git a/toontown/estate/DistributedFurnitureManager.py b/toontown/estate/DistributedFurnitureManager.py index f1ad12c..5414cd9 100644 --- a/toontown/estate/DistributedFurnitureManager.py +++ b/toontown/estate/DistributedFurnitureManager.py @@ -1,7 +1,8 @@ -from direct.distributed import DistributedObject -from toontown.catalog import CatalogItem -from toontown.catalog import CatalogItemList from direct.directnotify.DirectNotifyGlobal import * +from direct.distributed import DistributedObject + +from toontown.catalog import CatalogItem, CatalogItemList + class DistributedFurnitureManager(DistributedObject.DistributedObject): notify = directNotify.newCategory('DistributedFurnitureManager') diff --git a/toontown/estate/DistributedFurnitureManagerAI.py b/toontown/estate/DistributedFurnitureManagerAI.py index 281d411..21c8a82 100644 --- a/toontown/estate/DistributedFurnitureManagerAI.py +++ b/toontown/estate/DistributedFurnitureManagerAI.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectAI import DistributedObjectAI + class DistributedFurnitureManagerAI(DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedFurnitureManagerAI') diff --git a/toontown/estate/DistributedGagTree.py b/toontown/estate/DistributedGagTree.py index 0f8d65e..d883a2e 100644 --- a/toontown/estate/DistributedGagTree.py +++ b/toontown/estate/DistributedGagTree.py @@ -1,17 +1,19 @@ -from toontown.estate import DistributedPlantBase -from direct.interval.IntervalGlobal import * +from panda3d.core import * + from direct.directnotify import DirectNotifyGlobal +from direct.interval.IntervalGlobal import * from direct.showbase import PythonUtil -from toontown.toonbase import ToontownBattleGlobals +from direct.task import Task + +from otp.otpbase import OTPGlobals + +from toontown.estate import DistributedLawnDecor, DistributedPlantBase +from toontown.toonbase import ToontownBattleGlobals, TTLocalizer from toontown.toontowngui import TTDialog from toontown.toontowngui.TeaserPanel import TeaserPanel -from toontown.toonbase import TTLocalizer -from . import GardenGlobals -from . import HouseGlobals -from direct.task import Task -from panda3d.core import * -from otp.otpbase import OTPGlobals -from toontown.estate import DistributedLawnDecor + +from . import GardenGlobals, HouseGlobals + DIRT_AS_WATER_INDICATOR = True class DistributedGagTree(DistributedPlantBase.DistributedPlantBase): diff --git a/toontown/estate/DistributedGagTreeAI.py b/toontown/estate/DistributedGagTreeAI.py index c36989e..1ce18a2 100644 --- a/toontown/estate/DistributedGagTreeAI.py +++ b/toontown/estate/DistributedGagTreeAI.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectAI import DistributedObjectAI + class DistributedGagTreeAI(DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedGagTreeAI') diff --git a/toontown/estate/DistributedGarden.py b/toontown/estate/DistributedGarden.py index db02cd5..2817d5e 100644 --- a/toontown/estate/DistributedGarden.py +++ b/toontown/estate/DistributedGarden.py @@ -1,23 +1,22 @@ -from panda3d.core import * -from toontown.toonbase.ToonBaseGlobal import * -from direct.gui.DirectGui import * -from panda3d.core import * -from direct.distributed.ClockDelta import * -from toontown.toonbase import ToontownGlobals -from direct.distributed import DistributedObject -from direct.directnotify import DirectNotifyGlobal -from direct.fsm import ClassicFSM -from direct.fsm import State -from toontown.toon import Toon -from direct.showbase import RandomNumGen -from toontown.toonbase import TTLocalizer -import random -import random import pickle -from direct.showbase import PythonUtil +import random + +from panda3d.core import * + +from direct.directnotify import DirectNotifyGlobal +from direct.distributed import DistributedObject +from direct.distributed.ClockDelta import * +from direct.fsm import ClassicFSM, State +from direct.gui.DirectGui import * +from direct.showbase import PythonUtil, RandomNumGen + from toontown.hood import Place -from . import Estate -from . import HouseGlobals +from toontown.toon import Toon +from toontown.toonbase import ToontownGlobals, TTLocalizer +from toontown.toonbase.ToonBaseGlobal import * + +from . import Estate, HouseGlobals + class DistributedGarden(DistributedObject.DistributedObject): notify = directNotify.newCategory('DistributedGarden') diff --git a/toontown/estate/DistributedGardenAI.py b/toontown/estate/DistributedGardenAI.py index 818fc03..dbd0b57 100644 --- a/toontown/estate/DistributedGardenAI.py +++ b/toontown/estate/DistributedGardenAI.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectAI import DistributedObjectAI + class DistributedGardenAI(DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedGardenAI') diff --git a/toontown/estate/DistributedGardenBox.py b/toontown/estate/DistributedGardenBox.py index 1be06b7..8ec0a97 100644 --- a/toontown/estate/DistributedGardenBox.py +++ b/toontown/estate/DistributedGardenBox.py @@ -1,13 +1,14 @@ -from . import DistributedLawnDecor +from panda3d.core import NodePath, Vec3 + from direct.directnotify import DirectNotifyGlobal -from direct.showbase.ShowBase import * -from . import GardenGlobals -from toontown.toonbase import TTLocalizer -from toontown.estate import PlantingGUI -from toontown.estate import PlantTreeGUI from direct.distributed import DistributedNode -from panda3d.core import NodePath -from panda3d.core import Vec3 +from direct.showbase.ShowBase import * + +from toontown.estate import PlantingGUI, PlantTreeGUI +from toontown.toonbase import TTLocalizer + +from . import DistributedLawnDecor, GardenGlobals + class DistributedGardenBox(DistributedLawnDecor.DistributedLawnDecor): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedGardenPlot') diff --git a/toontown/estate/DistributedGardenBoxAI.py b/toontown/estate/DistributedGardenBoxAI.py index 39fd060..e20f46e 100644 --- a/toontown/estate/DistributedGardenBoxAI.py +++ b/toontown/estate/DistributedGardenBoxAI.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectAI import DistributedObjectAI + class DistributedGardenBoxAI(DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedGardenBoxAI') diff --git a/toontown/estate/DistributedGardenPlot.py b/toontown/estate/DistributedGardenPlot.py index cd39b40..ec3d19f 100644 --- a/toontown/estate/DistributedGardenPlot.py +++ b/toontown/estate/DistributedGardenPlot.py @@ -1,17 +1,18 @@ -from . import DistributedLawnDecor -from direct.directnotify import DirectNotifyGlobal -from direct.showbase.ShowBase import * -from direct.interval.IntervalGlobal import * -from . import GardenGlobals -from toontown.toonbase import TTLocalizer -from toontown.estate import PlantingGUI -from toontown.estate import PlantTreeGUI -from toontown.estate import ToonStatueSelectionGUI -from toontown.toontowngui import TTDialog -from panda3d.core import Vec4 -from panda3d.core import NodePath import types +from panda3d.core import NodePath, Vec4 + +from direct.directnotify import DirectNotifyGlobal +from direct.interval.IntervalGlobal import * +from direct.showbase.ShowBase import * + +from toontown.estate import PlantingGUI, PlantTreeGUI, ToonStatueSelectionGUI +from toontown.toonbase import TTLocalizer +from toontown.toontowngui import TTDialog + +from . import DistributedLawnDecor, GardenGlobals + + class DistributedGardenPlot(DistributedLawnDecor.DistributedLawnDecor): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedGardenPlot') diff --git a/toontown/estate/DistributedGardenPlotAI.py b/toontown/estate/DistributedGardenPlotAI.py index d29cf2f..b7c7ed8 100644 --- a/toontown/estate/DistributedGardenPlotAI.py +++ b/toontown/estate/DistributedGardenPlotAI.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectAI import DistributedObjectAI + class DistributedGardenPlotAI(DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedGardenPlotAI') diff --git a/toontown/estate/DistributedHouse.py b/toontown/estate/DistributedHouse.py index 6856058..a7a366d 100644 --- a/toontown/estate/DistributedHouse.py +++ b/toontown/estate/DistributedHouse.py @@ -1,25 +1,26 @@ -from panda3d.core import * -from toontown.toonbase.ToonBaseGlobal import * -from direct.gui.DirectGui import * -from panda3d.core import * -from direct.distributed.ClockDelta import * -from toontown.minigame.OrthoWalk import * -from string import * -from toontown.toonbase import ToontownGlobals -from direct.distributed import DistributedObject -from direct.directnotify import DirectNotifyGlobal -from direct.fsm import ClassicFSM -from direct.fsm import State -from toontown.toon import Toon -from direct.showbase import RandomNumGen -from toontown.toonbase import TTLocalizer import random -from direct.showbase import PythonUtil -from toontown.hood import Place -from . import HouseGlobals -from toontown.building import ToonInteriorColors +from string import * + +from panda3d.core import * + +from direct.directnotify import DirectNotifyGlobal +from direct.distributed import DistributedObject +from direct.distributed.ClockDelta import * +from direct.fsm import ClassicFSM, State +from direct.gui.DirectGui import * +from direct.showbase import PythonUtil, RandomNumGen from direct.showbase.MessengerGlobal import messenger +from toontown.building import ToonInteriorColors +from toontown.hood import Place +from toontown.minigame.OrthoWalk import * +from toontown.toon import Toon +from toontown.toonbase import ToontownGlobals, TTLocalizer +from toontown.toonbase.ToonBaseGlobal import * + +from . import HouseGlobals + + class DistributedHouse(DistributedObject.DistributedObject): notify = directNotify.newCategory('DistributedHouse') diff --git a/toontown/estate/DistributedHouseAI.py b/toontown/estate/DistributedHouseAI.py index 7651b5f..d3940be 100644 --- a/toontown/estate/DistributedHouseAI.py +++ b/toontown/estate/DistributedHouseAI.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectAI import DistributedObjectAI + class DistributedHouseAI(DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedHouseAI') diff --git a/toontown/estate/DistributedHouseDoor.py b/toontown/estate/DistributedHouseDoor.py index 65a74f0..c0c797a 100644 --- a/toontown/estate/DistributedHouseDoor.py +++ b/toontown/estate/DistributedHouseDoor.py @@ -1,17 +1,18 @@ -from toontown.toonbase.ToonBaseGlobal import * from panda3d.core import * -from direct.interval.IntervalGlobal import * -from direct.distributed.ClockDelta import * -from direct.distributed import DistributedObject -from toontown.toonbase import ToontownGlobals + from direct.directnotify import DirectNotifyGlobal -from direct.showbase.MessengerGlobal import messenger +from direct.distributed import DistributedObject +from direct.distributed.ClockDelta import * from direct.fsm import ClassicFSM -from toontown.building import DistributedDoor +from direct.interval.IntervalGlobal import * +from direct.showbase.MessengerGlobal import messenger + +from toontown.building import DistributedDoor, DoorTypes, FADoorCodes from toontown.hood import ZoneUtil from toontown.suit import Suit -from toontown.building import FADoorCodes -from toontown.building import DoorTypes +from toontown.toonbase import ToontownGlobals +from toontown.toonbase.ToonBaseGlobal import * + class DistributedHouseDoor(DistributedDoor.DistributedDoor): diff --git a/toontown/estate/DistributedHouseDoorAI.py b/toontown/estate/DistributedHouseDoorAI.py index 90bcc37..72a4559 100644 --- a/toontown/estate/DistributedHouseDoorAI.py +++ b/toontown/estate/DistributedHouseDoorAI.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectAI import DistributedObjectAI + class DistributedHouseDoorAI(DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedHouseDoorAI') diff --git a/toontown/estate/DistributedHouseInterior.py b/toontown/estate/DistributedHouseInterior.py index 7454fbc..d28279e 100644 --- a/toontown/estate/DistributedHouseInterior.py +++ b/toontown/estate/DistributedHouseInterior.py @@ -1,18 +1,17 @@ -from toontown.toonbase.ToontownGlobals import * -from toontown.toonbase.ToonBaseGlobal import * from panda3d.core import * -from direct.interval.IntervalGlobal import * -from direct.distributed.ClockDelta import * + from direct.directnotify import DirectNotifyGlobal from direct.distributed import DistributedObject +from direct.distributed.ClockDelta import * +from direct.interval.IntervalGlobal import * + +from toontown.catalog import (CatalogFlooringItem, CatalogItem, CatalogItemList, CatalogMouldingItem, + CatalogSurfaceItem, CatalogWainscotingItem, CatalogWallpaperItem) +from toontown.toonbase.ToonBaseGlobal import * +from toontown.toonbase.ToontownGlobals import * + from . import HouseGlobals -from toontown.catalog import CatalogItemList -from toontown.catalog import CatalogItem -from toontown.catalog import CatalogSurfaceItem -from toontown.catalog import CatalogWallpaperItem -from toontown.catalog import CatalogFlooringItem -from toontown.catalog import CatalogMouldingItem -from toontown.catalog import CatalogWainscotingItem + WindowPlugNames = ('**/windowcut_a*', '**/windowcut_b*', '**/windowcut_c*', '**/windowcut_d*', '**/windowcut_e*', '**/windowcut_f*') RoomNames = ('**/group2', '**/group1') WallNames = ('ceiling*', 'wall_side_middle*', 'wall_front_middle*', 'windowcut_*') diff --git a/toontown/estate/DistributedHouseInteriorAI.py b/toontown/estate/DistributedHouseInteriorAI.py index 76cb8a6..9c264c3 100644 --- a/toontown/estate/DistributedHouseInteriorAI.py +++ b/toontown/estate/DistributedHouseInteriorAI.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectAI import DistributedObjectAI + class DistributedHouseInteriorAI(DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedHouseInteriorAI') diff --git a/toontown/estate/DistributedHouseItem.py b/toontown/estate/DistributedHouseItem.py index f1f1267..4cd3ad8 100644 --- a/toontown/estate/DistributedHouseItem.py +++ b/toontown/estate/DistributedHouseItem.py @@ -1,9 +1,10 @@ -from toontown.toonbase.ToontownGlobals import * -from direct.interval.IntervalGlobal import * -from direct.distributed.ClockDelta import * -from toontown.toonbase import ToontownGlobals from direct.distributed import DistributedObject -from toontown.toonbase import TTLocalizer +from direct.distributed.ClockDelta import * +from direct.interval.IntervalGlobal import * + +from toontown.toonbase import ToontownGlobals, TTLocalizer +from toontown.toonbase.ToontownGlobals import * + class DistributedHouseItem(DistributedObject.DistributedObject): notify = directNotify.newCategory('DistributedHouseItem') diff --git a/toontown/estate/DistributedLawnDecor.py b/toontown/estate/DistributedLawnDecor.py index 7575926..00f0615 100644 --- a/toontown/estate/DistributedLawnDecor.py +++ b/toontown/estate/DistributedLawnDecor.py @@ -1,19 +1,22 @@ -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 panda3d.core import NodePath -from direct.task import Task -from toontown.toonbase import ToontownGlobals -from direct.distributed import DistributedObject -from direct.distributed import DistributedNode -from direct.showbase import PythonUtil -from otp.avatar import ShadowCaster import random + +from panda3d.core import * +from panda3d.core import NodePath + +from direct.directnotify import DirectNotifyGlobal +from direct.distributed import ClockDelta, DistributedNode, DistributedObject +from direct.interval.IntervalGlobal import * +from direct.showbase import PythonUtil +from direct.showbase.PythonUtil import lerp +from direct.task import Task + +from otp.avatar import ShadowCaster from otp.otpbase import OTPGlobals + from toontown.estate import GardenGlobals +from toontown.toonbase import ToontownGlobals + def recurseParent(intoNode, ParentName): parent = intoNode.getParent(0) diff --git a/toontown/estate/DistributedLawnDecorAI.py b/toontown/estate/DistributedLawnDecorAI.py index 6e2b917..bf13755 100644 --- a/toontown/estate/DistributedLawnDecorAI.py +++ b/toontown/estate/DistributedLawnDecorAI.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectAI import DistributedObjectAI + class DistributedLawnDecorAI(DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedLawnDecorAI') diff --git a/toontown/estate/DistributedMailbox.py b/toontown/estate/DistributedMailbox.py index a82d763..c4c5f80 100644 --- a/toontown/estate/DistributedMailbox.py +++ b/toontown/estate/DistributedMailbox.py @@ -1,16 +1,18 @@ -from direct.distributed import DistributedObject -from toontown.toonbase import ToontownGlobals -from . import MailboxGlobals -from toontown.catalog import CatalogItem -from toontown.catalog import CatalogItemList -from toontown.toontowngui import TTDialog -from toontown.toonbase import TTLocalizer -from toontown.catalog import MailboxScreen -from direct.directnotify.DirectNotifyGlobal import * -from direct.distributed.ClockDelta import * -from panda3d.core import * import random + +from panda3d.core import * + +from direct.directnotify.DirectNotifyGlobal import * +from direct.distributed import DistributedObject +from direct.distributed.ClockDelta import * from direct.interval.IntervalGlobal import SoundInterval + +from toontown.catalog import CatalogItem, CatalogItemList, MailboxScreen +from toontown.toonbase import ToontownGlobals, TTLocalizer +from toontown.toontowngui import TTDialog + +from . import MailboxGlobals + FlagPitchEmpty = -70 FlagPitchFull = 0 diff --git a/toontown/estate/DistributedMailboxAI.py b/toontown/estate/DistributedMailboxAI.py index 63e38c9..b690a24 100644 --- a/toontown/estate/DistributedMailboxAI.py +++ b/toontown/estate/DistributedMailboxAI.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectAI import DistributedObjectAI + class DistributedMailboxAI(DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedMailboxAI') diff --git a/toontown/estate/DistributedPhone.py b/toontown/estate/DistributedPhone.py index bcf9bee..51d1a45 100644 --- a/toontown/estate/DistributedPhone.py +++ b/toontown/estate/DistributedPhone.py @@ -1,22 +1,23 @@ -from toontown.toonbase import ToontownGlobals -from . import PhoneGlobals -from toontown.catalog import CatalogScreen -from toontown.catalog import CatalogItem -from toontown.toontowngui import TTDialog -from toontown.toonbase import TTLocalizer -from . import DistributedHouseInterior +import string + +from panda3d.core import * + from direct.actor import Actor -from . import DistributedFurnitureItem +from direct.directnotify.DirectNotifyGlobal import * from direct.distributed import ClockDelta +from direct.interval.IntervalGlobal import * from direct.showbase import PythonUtil from direct.showutil import Rope -from direct.directnotify.DirectNotifyGlobal import * -from panda3d.core import * -from direct.interval.IntervalGlobal import * -import string -from toontown.quest import Quests from direct.task import Task +from toontown.catalog import CatalogItem, CatalogScreen +from toontown.quest import Quests +from toontown.toonbase import ToontownGlobals, TTLocalizer +from toontown.toontowngui import TTDialog + +from . import DistributedFurnitureItem, DistributedHouseInterior, PhoneGlobals + + class DistributedPhone(DistributedFurnitureItem.DistributedFurnitureItem): notify = directNotify.newCategory('DistributedPhone') movieDelay = 0.5 diff --git a/toontown/estate/DistributedPhoneAI.py b/toontown/estate/DistributedPhoneAI.py index 7eeb4b3..a5868db 100644 --- a/toontown/estate/DistributedPhoneAI.py +++ b/toontown/estate/DistributedPhoneAI.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectAI import DistributedObjectAI + class DistributedPhoneAI(DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedPhoneAI') diff --git a/toontown/estate/DistributedPlantBase.py b/toontown/estate/DistributedPlantBase.py index f0920fe..b4dc229 100644 --- a/toontown/estate/DistributedPlantBase.py +++ b/toontown/estate/DistributedPlantBase.py @@ -1,10 +1,12 @@ -from . import DistributedLawnDecor -from direct.interval.IntervalGlobal import * from direct.directnotify import DirectNotifyGlobal +from direct.interval.IntervalGlobal import * from direct.showbase.ShowBase import * -from . import GardenGlobals + from toontown.toonbase import TTLocalizer +from . import DistributedLawnDecor, GardenGlobals + + class DistributedPlantBase(DistributedLawnDecor.DistributedLawnDecor): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedPlantBase') diff --git a/toontown/estate/DistributedPlantBaseAI.py b/toontown/estate/DistributedPlantBaseAI.py index 4d23e4d..2696e04 100644 --- a/toontown/estate/DistributedPlantBaseAI.py +++ b/toontown/estate/DistributedPlantBaseAI.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectAI import DistributedObjectAI + class DistributedPlantBaseAI(DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedPlantBaseAI') diff --git a/toontown/estate/DistributedStatuary.py b/toontown/estate/DistributedStatuary.py index 2b6493c..6a5591c 100644 --- a/toontown/estate/DistributedStatuary.py +++ b/toontown/estate/DistributedStatuary.py @@ -1,13 +1,13 @@ -from . import DistributedLawnDecor +from panda3d.core import NodePath, Point3 + from direct.directnotify import DirectNotifyGlobal from direct.showbase.ShowBase import * -from . import GardenGlobals -from toontown.toonbase import TTLocalizer -from toontown.toonbase import ToontownGlobals + +from toontown.toonbase import ToontownGlobals, TTLocalizer from toontown.toontowngui import TTDialog -from toontown.toonbase import TTLocalizer -from panda3d.core import NodePath -from panda3d.core import Point3 + +from . import DistributedLawnDecor, GardenGlobals + class DistributedStatuary(DistributedLawnDecor.DistributedLawnDecor): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedStatuary') diff --git a/toontown/estate/DistributedStatuaryAI.py b/toontown/estate/DistributedStatuaryAI.py index ca087e0..0fd5c79 100644 --- a/toontown/estate/DistributedStatuaryAI.py +++ b/toontown/estate/DistributedStatuaryAI.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectAI import DistributedObjectAI + class DistributedStatuaryAI(DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedStatuaryAI') diff --git a/toontown/estate/DistributedTarget.py b/toontown/estate/DistributedTarget.py index fc9d7ef..e27617d 100644 --- a/toontown/estate/DistributedTarget.py +++ b/toontown/estate/DistributedTarget.py @@ -1,12 +1,13 @@ -from direct.gui.DirectGui import * from panda3d.core import * -from panda3d.core import * -from direct.interval.IntervalGlobal import * -from toontown.toonbase.ToontownGlobals import * -from toontown.toonbase import ToontownTimer -from direct.distributed import DistributedObject + from direct.directnotify import DirectNotifyGlobal -from toontown.toonbase import TTLocalizer +from direct.distributed import DistributedObject +from direct.gui.DirectGui import * +from direct.interval.IntervalGlobal import * + +from toontown.toonbase import ToontownTimer, TTLocalizer +from toontown.toonbase.ToontownGlobals import * + class DistributedTarget(DistributedObject.DistributedObject): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedTarget') diff --git a/toontown/estate/DistributedTargetAI.py b/toontown/estate/DistributedTargetAI.py index f2cf37b..4b794b2 100644 --- a/toontown/estate/DistributedTargetAI.py +++ b/toontown/estate/DistributedTargetAI.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectAI import DistributedObjectAI + class DistributedTargetAI(DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedTargetAI') diff --git a/toontown/estate/DistributedToonStatuary.py b/toontown/estate/DistributedToonStatuary.py index b418317..70278ff 100644 --- a/toontown/estate/DistributedToonStatuary.py +++ b/toontown/estate/DistributedToonStatuary.py @@ -1,15 +1,15 @@ -from toontown.estate import DistributedStatuary -from toontown.estate import DistributedLawnDecor +from panda3d.core import * +from panda3d.core import NodePath, Point3 + from direct.directnotify import DirectNotifyGlobal from direct.showbase.ShowBase import * -from panda3d.core import * -from toontown.toon import Toon -from toontown.toon import ToonDNA + +from toontown.estate import DistributedLawnDecor, DistributedStatuary +from toontown.toon import Toon, ToonDNA +from toontown.toonbase import ToontownGlobals, TTLocalizer + from . import GardenGlobals -from toontown.toonbase import TTLocalizer -from toontown.toonbase import ToontownGlobals -from panda3d.core import NodePath -from panda3d.core import Point3 + def dnaCodeFromToonDNA(dna): diff --git a/toontown/estate/DistributedToonStatuaryAI.py b/toontown/estate/DistributedToonStatuaryAI.py index 8d0ca2a..daaab80 100644 --- a/toontown/estate/DistributedToonStatuaryAI.py +++ b/toontown/estate/DistributedToonStatuaryAI.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectAI import DistributedObjectAI + class DistributedToonStatuaryAI(DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedToonStatuaryAI') diff --git a/toontown/estate/DistributedTrunk.py b/toontown/estate/DistributedTrunk.py index a90d882..fce8fee 100644 --- a/toontown/estate/DistributedTrunk.py +++ b/toontown/estate/DistributedTrunk.py @@ -1,13 +1,14 @@ from panda3d.core import * + from direct.gui.DirectGui import * -from direct.task.Task import Task from direct.interval.IntervalGlobal import * -from . import DistributedCloset -from . import ClosetGlobals -from . import TrunkGUI +from direct.task.Task import Task + from toontown.toon import ToonDNA -from toontown.toonbase import TTLocalizer -from toontown.toonbase import ToontownGlobals +from toontown.toonbase import ToontownGlobals, TTLocalizer + +from . import ClosetGlobals, DistributedCloset, TrunkGUI + N_A = 0 class DistributedTrunk(DistributedCloset.DistributedCloset): diff --git a/toontown/estate/DistributedTrunkAI.py b/toontown/estate/DistributedTrunkAI.py index 382d49c..1451611 100644 --- a/toontown/estate/DistributedTrunkAI.py +++ b/toontown/estate/DistributedTrunkAI.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectAI import DistributedObjectAI + class DistributedTrunkAI(DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedTrunkAI') diff --git a/toontown/estate/Estate.py b/toontown/estate/Estate.py index cec60b3..0656023 100644 --- a/toontown/estate/Estate.py +++ b/toontown/estate/Estate.py @@ -1,23 +1,27 @@ +import random + from panda3d.core import * + +from direct.controls.GravityWalker import GravityWalker +from direct.directnotify import DirectNotifyGlobal +from direct.distributed.ClockDelta import * +from direct.fsm import ClassicFSM, State +from direct.gui.DirectGui import * from direct.interval.IntervalGlobal import * +from direct.showbase import PythonUtil +from direct.task.Task import Task + +from otp.distributed.TelemetryLimiter import RotationLimitToH, TLGatherAllAvs, TLNull + +from toontown.hood import Place, SkyUtil +from toontown.pets import PetTutorial +from toontown.toonbase import TTLocalizer from toontown.toonbase.ToonBaseGlobal import * from toontown.toonbase.ToontownGlobals import * -from direct.gui.DirectGui import * -from direct.distributed.ClockDelta import * -from toontown.hood import Place -from direct.directnotify import DirectNotifyGlobal -from direct.fsm import ClassicFSM, State -from direct.task.Task import Task -from toontown.toonbase import TTLocalizer -import random -from direct.showbase import PythonUtil -from toontown.hood import Place -from toontown.hood import SkyUtil -from toontown.pets import PetTutorial -from direct.controls.GravityWalker import GravityWalker -from otp.distributed.TelemetryLimiter import RotationLimitToH, TLGatherAllAvs, TLNull + from . import HouseGlobals + class Estate(Place.Place): notify = DirectNotifyGlobal.directNotify.newCategory('Estate') diff --git a/toontown/estate/EstateLoader.py b/toontown/estate/EstateLoader.py index f57d5c9..93e5ed9 100644 --- a/toontown/estate/EstateLoader.py +++ b/toontown/estate/EstateLoader.py @@ -1,17 +1,19 @@ -from panda3d.core import * -from toontown.toonbase.ToontownGlobals import * -from direct.interval.IntervalGlobal import * -from direct.fsm import ClassicFSM, State -from toontown.safezone import SafeZoneLoader -import random -from toontown.launcher import DownloadForceAcknowledge -from . import House -from . import Estate -from . import HouseGlobals -import random import math -from toontown.coghq import MovingPlatform +import random + +from panda3d.core import * + from direct.directnotify import DirectNotifyGlobal +from direct.fsm import ClassicFSM, State +from direct.interval.IntervalGlobal import * + +from toontown.coghq import MovingPlatform +from toontown.launcher import DownloadForceAcknowledge +from toontown.safezone import SafeZoneLoader +from toontown.toonbase.ToontownGlobals import * + +from . import Estate, House, HouseGlobals + class EstateLoader(SafeZoneLoader.SafeZoneLoader): notify = DirectNotifyGlobal.directNotify.newCategory('EstateLoader') diff --git a/toontown/estate/EstateManager.py b/toontown/estate/EstateManager.py index a3719c2..0f7cb30 100644 --- a/toontown/estate/EstateManager.py +++ b/toontown/estate/EstateManager.py @@ -1,13 +1,15 @@ -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 panda3d.core import * -from toontown.toonbase import TTLocalizer -from . import HouseGlobals -from . import Estate + +from direct.directnotify import DirectNotifyGlobal +from direct.distributed import DistributedObject +from direct.gui.DirectGui import * + +from toontown.toonbase import ToontownGlobals, TTLocalizer + +from . import Estate, HouseGlobals + class EstateManager(DistributedObject.DistributedObject): notify = DirectNotifyGlobal.directNotify.newCategory('EstateManager') diff --git a/toontown/estate/EstateManagerAI.py b/toontown/estate/EstateManagerAI.py index bf2536c..9b2280e 100644 --- a/toontown/estate/EstateManagerAI.py +++ b/toontown/estate/EstateManagerAI.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectAI import DistributedObjectAI + class EstateManagerAI(DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('EstateManagerAI') diff --git a/toontown/estate/FireworkItemPanel.py b/toontown/estate/FireworkItemPanel.py index 1887cae..13ef6ea 100644 --- a/toontown/estate/FireworkItemPanel.py +++ b/toontown/estate/FireworkItemPanel.py @@ -1,11 +1,13 @@ -from direct.gui.DirectGui import * from panda3d.core import * -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import TTLocalizer -from toontown.effects import FireworkGlobals -from toontown.effects import Fireworks + +from direct.gui.DirectGui import * + +from toontown.effects import FireworkGlobals, Fireworks +from toontown.toonbase import ToontownGlobals, TTLocalizer + from . import FireworksGui + class FireworkItemPanel(DirectFrame): def __init__(self, itemName, itemNum, *extraArgs): diff --git a/toontown/estate/FireworksGui.py b/toontown/estate/FireworksGui.py index 40cb57c..9bbb215 100644 --- a/toontown/estate/FireworksGui.py +++ b/toontown/estate/FireworksGui.py @@ -1,11 +1,14 @@ -from direct.gui.DirectGui import * from panda3d.core import * -from direct.gui.DirectScrolledList import * -from toontown.toonbase import ToontownGlobals -from . import FireworkItemPanel + from direct.directnotify import DirectNotifyGlobal -from toontown.effects import FireworkGlobals -from toontown.effects import Fireworks +from direct.gui.DirectGui import * +from direct.gui.DirectScrolledList import * + +from toontown.effects import FireworkGlobals, Fireworks +from toontown.toonbase import ToontownGlobals + +from . import FireworkItemPanel + NUM_ITEMS_SHOWN = 4 class FireworksGui(DirectFrame): diff --git a/toontown/estate/FlowerBase.py b/toontown/estate/FlowerBase.py index 8e9699c..022365a 100644 --- a/toontown/estate/FlowerBase.py +++ b/toontown/estate/FlowerBase.py @@ -1,7 +1,10 @@ -from . import GardenGlobals -from toontown.toonbase import TTLocalizer from direct.directnotify import DirectNotifyGlobal +from toontown.toonbase import TTLocalizer + +from . import GardenGlobals + + class FlowerBase: notify = DirectNotifyGlobal.directNotify.newCategory('FlowerBase') diff --git a/toontown/estate/FlowerBasket.py b/toontown/estate/FlowerBasket.py index 2842e58..adacff0 100644 --- a/toontown/estate/FlowerBasket.py +++ b/toontown/estate/FlowerBasket.py @@ -1,6 +1,7 @@ -from . import GardenGlobals from direct.directnotify import DirectNotifyGlobal -from . import FlowerBase + +from . import FlowerBase, GardenGlobals + class FlowerBasket: notify = DirectNotifyGlobal.directNotify.newCategory('FlowerBasket') diff --git a/toontown/estate/FlowerBrowser.py b/toontown/estate/FlowerBrowser.py index 00213fe..4ec1807 100644 --- a/toontown/estate/FlowerBrowser.py +++ b/toontown/estate/FlowerBrowser.py @@ -1,10 +1,12 @@ -from toontown.toonbase import ToontownGlobals +from panda3d.core import * + from direct.directnotify import DirectNotifyGlobal from direct.gui.DirectGui import * -from panda3d.core import * -from toontown.toonbase import TTLocalizer -from . import FlowerSpeciesPanel -from . import GardenGlobals + +from toontown.toonbase import ToontownGlobals, TTLocalizer + +from . import FlowerSpeciesPanel, GardenGlobals + class FlowerBrowser(DirectScrolledList): notify = DirectNotifyGlobal.directNotify.newCategory('FlowerBrowser') diff --git a/toontown/estate/FlowerCollection.py b/toontown/estate/FlowerCollection.py index ba4b55e..4b5e4c1 100644 --- a/toontown/estate/FlowerCollection.py +++ b/toontown/estate/FlowerCollection.py @@ -1,6 +1,7 @@ -from . import GardenGlobals from direct.directnotify import DirectNotifyGlobal -from . import FlowerBase + +from . import FlowerBase, GardenGlobals + class FlowerCollection: notify = DirectNotifyGlobal.directNotify.newCategory('FlowerCollection') diff --git a/toontown/estate/FlowerPanel.py b/toontown/estate/FlowerPanel.py index 1830656..9d648a7 100644 --- a/toontown/estate/FlowerPanel.py +++ b/toontown/estate/FlowerPanel.py @@ -1,11 +1,13 @@ -from toontown.toonbase import ToontownGlobals +from panda3d.core import * + from direct.directnotify import DirectNotifyGlobal from direct.gui.DirectGui import * -from panda3d.core import * -from toontown.toonbase import TTLocalizer from direct.interval.IntervalGlobal import * -from . import GardenGlobals -from . import FlowerPhoto + +from toontown.toonbase import ToontownGlobals, TTLocalizer + +from . import FlowerPhoto, GardenGlobals + class FlowerPanel(DirectFrame): notify = DirectNotifyGlobal.directNotify.newCategory('FlowerPanel') diff --git a/toontown/estate/FlowerPhoto.py b/toontown/estate/FlowerPhoto.py index a49034e..2e3e051 100644 --- a/toontown/estate/FlowerPhoto.py +++ b/toontown/estate/FlowerPhoto.py @@ -1,9 +1,13 @@ -from direct.directnotify import DirectNotifyGlobal from panda3d.core import * -from direct.interval.IntervalGlobal import * -from toontown.fishing import FishGlobals -from . import GardenGlobals + from direct.actor import Actor +from direct.directnotify import DirectNotifyGlobal +from direct.interval.IntervalGlobal import * + +from toontown.fishing import FishGlobals + +from . import GardenGlobals + class DirectRegion(NodePath): notify = DirectNotifyGlobal.directNotify.newCategory('DirectRegion') diff --git a/toontown/estate/FlowerPicker.py b/toontown/estate/FlowerPicker.py index 8f4474e..83adc54 100644 --- a/toontown/estate/FlowerPicker.py +++ b/toontown/estate/FlowerPicker.py @@ -1,10 +1,13 @@ -from toontown.toonbase import ToontownGlobals +from panda3d.core import * + from direct.directnotify import DirectNotifyGlobal from direct.gui.DirectGui import * -from panda3d.core import * -from toontown.toonbase import TTLocalizer + +from toontown.toonbase import ToontownGlobals, TTLocalizer + from . import FlowerPanel + class FlowerPicker(DirectScrolledList): notify = DirectNotifyGlobal.directNotify.newCategory('FlowerPicker') diff --git a/toontown/estate/FlowerSellGUI.py b/toontown/estate/FlowerSellGUI.py index 3ebf1f0..d30c0e4 100644 --- a/toontown/estate/FlowerSellGUI.py +++ b/toontown/estate/FlowerSellGUI.py @@ -1,11 +1,13 @@ -from direct.gui.DirectGui import * from panda3d.core import * + from direct.directnotify import DirectNotifyGlobal -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import TTLocalizer +from direct.gui.DirectGui import * from direct.task import Task -from . import FlowerBase -from . import FlowerPicker + +from toontown.toonbase import ToontownGlobals, TTLocalizer + +from . import FlowerBase, FlowerPicker + class FlowerSellGUI(DirectFrame): notify = DirectNotifyGlobal.directNotify.newCategory('FlowerGui') diff --git a/toontown/estate/FlowerSpeciesPanel.py b/toontown/estate/FlowerSpeciesPanel.py index 4ffedc7..dba2016 100644 --- a/toontown/estate/FlowerSpeciesPanel.py +++ b/toontown/estate/FlowerSpeciesPanel.py @@ -1,11 +1,13 @@ -from toontown.toonbase import ToontownGlobals +from panda3d.core import * + from direct.directnotify import DirectNotifyGlobal from direct.gui.DirectGui import * -from panda3d.core import * -from toontown.toonbase import TTLocalizer -from . import GardenGlobals -from . import FlowerPhoto + from toontown.estate import BeanRecipeGui +from toontown.toonbase import ToontownGlobals, TTLocalizer + +from . import FlowerPhoto, GardenGlobals + class FlowerSpeciesPanel(DirectFrame): notify = DirectNotifyGlobal.directNotify.newCategory('FlowerSpeciesPanel') diff --git a/toontown/estate/GameSprite.py b/toontown/estate/GameSprite.py index 17c720d..e0fb998 100644 --- a/toontown/estate/GameSprite.py +++ b/toontown/estate/GameSprite.py @@ -1,5 +1,6 @@ import math + class GameSprite: colorRed = (1, 0, 0, 1) colorBlue = (0, 0, 1, 1) diff --git a/toontown/estate/GardenDropGame.py b/toontown/estate/GardenDropGame.py index ed9f72b..e5818b1 100644 --- a/toontown/estate/GardenDropGame.py +++ b/toontown/estate/GardenDropGame.py @@ -1,27 +1,26 @@ -from panda3d.core import * -from toontown.toonbase.ToonBaseGlobal import * -from direct.gui.DirectGui import * -from panda3d.core import * -from direct.gui.DirectScrolledList import * -from direct.distributed.ClockDelta import * -from toontown.toontowngui import TTDialog import math -from direct.task.Task import Task -from toontown.toonbase import ToontownGlobals -from direct.distributed import DistributedObject -from direct.directnotify import DirectNotifyGlobal -from direct.fsm import ClassicFSM -from direct.fsm import State -from toontown.toon import Toon -from direct.showbase import RandomNumGen -from toontown.toonbase import TTLocalizer -import random -import random import pickle -from direct.showbase import PythonUtil -from . import GameSprite +import random from math import pi -from . import GardenProgressMeter + +from panda3d.core import * + +from direct.directnotify import DirectNotifyGlobal +from direct.distributed import DistributedObject +from direct.distributed.ClockDelta import * +from direct.fsm import ClassicFSM, State +from direct.gui.DirectGui import * +from direct.gui.DirectScrolledList import * +from direct.showbase import PythonUtil, RandomNumGen +from direct.task.Task import Task + +from toontown.toon import Toon +from toontown.toonbase import ToontownGlobals, TTLocalizer +from toontown.toonbase.ToonBaseGlobal import * +from toontown.toontowngui import TTDialog + +from . import GameSprite, GardenProgressMeter + class GardenDropGame(DirectObject.DirectObject): diff --git a/toontown/estate/GardenGlobals.py b/toontown/estate/GardenGlobals.py index f813259..3fb7385 100644 --- a/toontown/estate/GardenGlobals.py +++ b/toontown/estate/GardenGlobals.py @@ -1,6 +1,9 @@ -from toontown.toonbase import TTLocalizer -from direct.directnotify import DirectNotifyGlobal import random + +from direct.directnotify import DirectNotifyGlobal + +from toontown.toonbase import TTLocalizer + FLOWERS_PER_BONUS = 10 ACCELERATOR_USED_FROM_SHTIKER_BOOK = True COLLECT_NO_UPDATE = 0 diff --git a/toontown/estate/GardenProgressMeter.py b/toontown/estate/GardenProgressMeter.py index 5c67898..b4c9b1a 100644 --- a/toontown/estate/GardenProgressMeter.py +++ b/toontown/estate/GardenProgressMeter.py @@ -1,26 +1,26 @@ -from panda3d.core import * -from toontown.toonbase.ToonBaseGlobal import * -from direct.gui.DirectGui import * -from panda3d.core import * -from direct.gui.DirectScrolledList import * -from direct.distributed.ClockDelta import * -from toontown.toontowngui import TTDialog import math -from toontown.toonbase import ToontownGlobals -from direct.distributed import DistributedObject -from direct.directnotify import DirectNotifyGlobal -from direct.fsm import ClassicFSM -from direct.fsm import State -from toontown.toon import Toon -from direct.showbase import RandomNumGen -from toontown.toonbase import TTLocalizer -import random -import random import pickle -from direct.showbase import PythonUtil -from . import GameSprite +import random from math import pi + +from panda3d.core import * + +from direct.directnotify import DirectNotifyGlobal +from direct.distributed import DistributedObject +from direct.distributed.ClockDelta import * +from direct.fsm import ClassicFSM, State +from direct.gui.DirectGui import * +from direct.gui.DirectScrolledList import * +from direct.showbase import PythonUtil, RandomNumGen + from toontown.estate import GardenGlobals +from toontown.toon import Toon +from toontown.toonbase import ToontownGlobals, TTLocalizer +from toontown.toonbase.ToonBaseGlobal import * +from toontown.toontowngui import TTDialog + +from . import GameSprite + SHOVEL = 0 WATERINGCAN = 1 GAMEWIN = 2 diff --git a/toontown/estate/GardenTutorial.py b/toontown/estate/GardenTutorial.py index 1659b16..e2bba2c 100644 --- a/toontown/estate/GardenTutorial.py +++ b/toontown/estate/GardenTutorial.py @@ -1,10 +1,12 @@ -from direct.gui.DirectGui import * -from direct.fsm import FSM -from direct.directnotify import DirectNotifyGlobal -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import TTLocalizer from panda3d.core import * +from direct.directnotify import DirectNotifyGlobal +from direct.fsm import FSM +from direct.gui.DirectGui import * + +from toontown.toonbase import ToontownGlobals, TTLocalizer + + class GardenTutorial(DirectFrame, FSM.FSM): notify = DirectNotifyGlobal.directNotify.newCategory('GardenTutorial') diff --git a/toontown/estate/House.py b/toontown/estate/House.py index 4e90aa3..bfc3090 100644 --- a/toontown/estate/House.py +++ b/toontown/estate/House.py @@ -1,15 +1,16 @@ from panda3d.core import * -from toontown.toonbase.ToonBaseGlobal import * + from direct.directnotify import DirectNotifyGlobal -from toontown.hood import Place +from direct.fsm import ClassicFSM, State, StateData from direct.showbase import DirectObject -from direct.fsm import StateData -from direct.fsm import ClassicFSM, State -from direct.fsm import State from direct.task import Task + from otp.distributed.TelemetryLimiter import RotationLimitToH, TLGatherAllAvs -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import TTLocalizer + +from toontown.hood import Place +from toontown.toonbase import ToontownGlobals, TTLocalizer +from toontown.toonbase.ToonBaseGlobal import * + class House(Place.Place): notify = DirectNotifyGlobal.directNotify.newCategory('House') diff --git a/toontown/estate/PlantTreeGUI.py b/toontown/estate/PlantTreeGUI.py index 0efebca..2506c54 100644 --- a/toontown/estate/PlantTreeGUI.py +++ b/toontown/estate/PlantTreeGUI.py @@ -1,11 +1,14 @@ -from direct.directnotify import DirectNotifyGlobal -from direct.showbase.ShowBase import * -from toontown.toonbase import TTLocalizer import string + +from direct.directnotify import DirectNotifyGlobal from direct.fsm import StateData +from direct.showbase.ShowBase import * + +from toontown.toonbase import TTLocalizer from toontown.toonbase.ToontownBattleGlobals import gagIsPaidOnly from toontown.toontowngui.TeaserPanel import TeaserPanel + class PlantTreeGUI(StateData.StateData): notify = DirectNotifyGlobal.directNotify.newCategory('PlantTreeGUI') diff --git a/toontown/estate/PlantingGUI.py b/toontown/estate/PlantingGUI.py index 12e3f1d..d2814f7 100644 --- a/toontown/estate/PlantingGUI.py +++ b/toontown/estate/PlantingGUI.py @@ -1,12 +1,13 @@ -from direct.gui.DirectGui import * from panda3d.core import * + from direct.directnotify import DirectNotifyGlobal -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import TTLocalizer -from direct.task import Task -from toontown.estate import GardenGlobals +from direct.gui.DirectGui import * from direct.interval.IntervalGlobal import * -from toontown.estate import SpecialsPhoto +from direct.task import Task + +from toontown.estate import GardenGlobals, SpecialsPhoto +from toontown.toonbase import ToontownGlobals, TTLocalizer + USE_SCROLLING_BEAN_BOX = False JELLY_BEAN_PICKER_HAS_EMPTY_BOX = False CAN_CHANGE_BEAN_COLOR = True diff --git a/toontown/estate/SpecialsPhoto.py b/toontown/estate/SpecialsPhoto.py index c3caa51..6b4262c 100644 --- a/toontown/estate/SpecialsPhoto.py +++ b/toontown/estate/SpecialsPhoto.py @@ -1,11 +1,16 @@ -from direct.directnotify import DirectNotifyGlobal -from panda3d.core import * -from direct.interval.IntervalGlobal import * -from toontown.fishing import FishGlobals -from . import GardenGlobals -from direct.actor import Actor import random +from panda3d.core import * + +from direct.actor import Actor +from direct.directnotify import DirectNotifyGlobal +from direct.interval.IntervalGlobal import * + +from toontown.fishing import FishGlobals + +from . import GardenGlobals + + class DirectRegion(NodePath): notify = DirectNotifyGlobal.directNotify.newCategory('DirectRegion') diff --git a/toontown/estate/ToonStatueSelectionGUI.py b/toontown/estate/ToonStatueSelectionGUI.py index f352a3b..dbe8254 100644 --- a/toontown/estate/ToonStatueSelectionGUI.py +++ b/toontown/estate/ToonStatueSelectionGUI.py @@ -1,17 +1,16 @@ -from toontown.estate import PlantingGUI -from direct.gui.DirectGui import * from panda3d.core import * + from direct.directnotify import DirectNotifyGlobal -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import TTLocalizer -from direct.task import Task -from toontown.estate import GardenGlobals -from toontown.estate import DistributedToonStatuary -from direct.interval.IntervalGlobal import * -from direct.gui.DirectScrolledList import * -from toontown.toon import Toon -from toontown.toon import DistributedToon from direct.distributed import DistributedObject +from direct.gui.DirectGui import * +from direct.gui.DirectScrolledList import * +from direct.interval.IntervalGlobal import * +from direct.task import Task + +from toontown.estate import DistributedToonStatuary, GardenGlobals, PlantingGUI +from toontown.toon import DistributedToon, Toon +from toontown.toonbase import ToontownGlobals, TTLocalizer + class ToonStatueSelectionGUI(DirectFrame): notify = DirectNotifyGlobal.directNotify.newCategory('ToonStatueSelectionGUI') diff --git a/toontown/estate/TrunkGUI.py b/toontown/estate/TrunkGUI.py index 9332b57..3c51e7d 100644 --- a/toontown/estate/TrunkGUI.py +++ b/toontown/estate/TrunkGUI.py @@ -1,16 +1,19 @@ -from direct.showbase.PythonUtil import Functor -from direct.gui.DirectGui import * from panda3d.core import * + from direct.distributed import ClockDelta from direct.fsm import StateData +from direct.gui.DirectGui import * +from direct.showbase.PythonUtil import Functor from direct.task.Task import Task -from . import ClosetGlobals -from toontown.toonbase import TTLocalizer -from toontown.toonbase import ToontownGlobals -from toontown.toontowngui import TTDialog -from toontown.toon import ToonDNA -from toontown.makeatoon.MakeAToonGlobals import * + from toontown.makeatoon import ShuffleButton +from toontown.makeatoon.MakeAToonGlobals import * +from toontown.toon import ToonDNA +from toontown.toonbase import ToontownGlobals, TTLocalizer +from toontown.toontowngui import TTDialog + +from . import ClosetGlobals + class TrunkGUI(StateData.StateData): notify = directNotify.newCategory('TrunkGUI') diff --git a/toontown/estate/houseDesign.py b/toontown/estate/houseDesign.py index 162da33..143e852 100644 --- a/toontown/estate/houseDesign.py +++ b/toontown/estate/houseDesign.py @@ -1,18 +1,20 @@ +from panda3d.core import * + +from direct.directnotify import DirectNotifyGlobal +from direct.directtools.DirectGeometry import LineNodePath from direct.directtools.DirectSelection import * from direct.directtools.DirectUtil import ROUND_TO -from direct.directtools.DirectGeometry import LineNodePath from direct.gui.DirectGui import * -from panda3d.core import * -from direct.showbase.DirectObject import DirectObject -from toontown.toonbase import ToontownGlobals -from direct.directnotify import DirectNotifyGlobal -from direct.task import Task -from toontown.catalog import CatalogFurnitureItem -from toontown.catalog import CatalogItemTypes from direct.showbase import PythonUtil -from toontown.toontowngui import TTDialog -from toontown.toonbase import TTLocalizer +from direct.showbase.DirectObject import DirectObject +from direct.task import Task + from otp.otpbase import OTPLocalizer + +from toontown.catalog import CatalogFurnitureItem, CatalogItemTypes +from toontown.toonbase import ToontownGlobals, TTLocalizer +from toontown.toontowngui import TTDialog + camPos50 = (Point3(0.0, -10.0, 50.0), Point3(0.0, -9.66, 49.06), Point3(0.0, 1.5, 12.38), diff --git a/toontown/fishing/BingoCardBase.py b/toontown/fishing/BingoCardBase.py index 411937f..1c80467 100644 --- a/toontown/fishing/BingoCardBase.py +++ b/toontown/fishing/BingoCardBase.py @@ -1,9 +1,11 @@ -from direct.directnotify import DirectNotifyGlobal -from toontown.fishing import FishGlobals -from toontown.fishing import BingoGlobals -from direct.showbase import RandomNumGen from math import ceil, pow +from direct.directnotify import DirectNotifyGlobal +from direct.showbase import RandomNumGen + +from toontown.fishing import BingoGlobals, FishGlobals + + class BingoCardBase: notify = DirectNotifyGlobal.directNotify.newCategory('BingoCardBase') diff --git a/toontown/fishing/BingoCardCell.py b/toontown/fishing/BingoCardCell.py index 1a0196f..2df6855 100644 --- a/toontown/fishing/BingoCardCell.py +++ b/toontown/fishing/BingoCardCell.py @@ -1,12 +1,13 @@ +from panda3d.core import * + +from direct.directnotify import DirectNotifyGlobal from direct.fsm import FSM from direct.gui.DirectGui import * -from panda3d.core import * -from direct.directnotify import DirectNotifyGlobal from direct.interval.IntervalGlobal import * -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import TTLocalizer -from toontown.fishing import FishPhoto -from toontown.fishing import BingoGlobals + +from toontown.fishing import BingoGlobals, FishPhoto +from toontown.toonbase import ToontownGlobals, TTLocalizer + class BingoCardCell(DirectButton, FSM.FSM): notify = DirectNotifyGlobal.directNotify.newCategory('BingoCardCell') diff --git a/toontown/fishing/BingoCardGui.py b/toontown/fishing/BingoCardGui.py index b289d55..f941f83 100644 --- a/toontown/fishing/BingoCardGui.py +++ b/toontown/fishing/BingoCardGui.py @@ -1,17 +1,16 @@ +import random + +from panda3d.core import * + from direct.directnotify import DirectNotifyGlobal from direct.gui.DirectGui import * -from panda3d.core import * -from direct.task import Task -import random -from toontown.fishing import BingoCardCell -from toontown.fishing import BingoGlobals -from toontown.fishing import FishBase -from toontown.fishing import FishGlobals from direct.showbase import RandomNumGen -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import ToontownTimer -from toontown.toonbase import TTLocalizer +from direct.task import Task + +from toontown.fishing import BingoCardCell, BingoGlobals, FishBase, FishGlobals +from toontown.toonbase import ToontownGlobals, ToontownTimer, TTLocalizer from toontown.toontowngui import TTDialog + BG = BingoGlobals class BingoCardGui(DirectFrame): diff --git a/toontown/fishing/BingoGlobals.py b/toontown/fishing/BingoGlobals.py index 5f1ff49..8e3633f 100644 --- a/toontown/fishing/BingoGlobals.py +++ b/toontown/fishing/BingoGlobals.py @@ -1,4 +1,5 @@ from toontown.toonbase import TTLocalizer + NORMAL_CARD = 0 FOURCORNER_CARD = 1 DIAGONAL_CARD = 2 diff --git a/toontown/fishing/BlockoutBingo.py b/toontown/fishing/BlockoutBingo.py index b5d8afb..913f830 100644 --- a/toontown/fishing/BlockoutBingo.py +++ b/toontown/fishing/BlockoutBingo.py @@ -1,6 +1,7 @@ from direct.directnotify import DirectNotifyGlobal -from toontown.fishing import BingoGlobals -from toontown.fishing import BingoCardBase + +from toontown.fishing import BingoCardBase, BingoGlobals + class BlockoutBingo(BingoCardBase.BingoCardBase): notify = DirectNotifyGlobal.directNotify.newCategory('BlockoutBingo') diff --git a/toontown/fishing/DiagonalBingo.py b/toontown/fishing/DiagonalBingo.py index f5b8063..bb4f7c3 100644 --- a/toontown/fishing/DiagonalBingo.py +++ b/toontown/fishing/DiagonalBingo.py @@ -1,6 +1,7 @@ from direct.directnotify import DirectNotifyGlobal -from toontown.fishing import BingoGlobals -from toontown.fishing import BingoCardBase + +from toontown.fishing import BingoCardBase, BingoGlobals + class DiagonalBingo(BingoCardBase.BingoCardBase): notify = DirectNotifyGlobal.directNotify.newCategory('DiagonalBingo') diff --git a/toontown/fishing/DistributedFishingPond.py b/toontown/fishing/DistributedFishingPond.py index c537115..d16d3c8 100644 --- a/toontown/fishing/DistributedFishingPond.py +++ b/toontown/fishing/DistributedFishingPond.py @@ -1,12 +1,15 @@ -from direct.distributed import DistributedObject -from direct.directnotify import DirectNotifyGlobal -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import TTLocalizer -from . import FishGlobals -from toontown.fishing import DistributedPondBingoManager from panda3d.core import Vec3 + +from direct.directnotify import DirectNotifyGlobal +from direct.distributed import DistributedObject from direct.task import Task +from toontown.fishing import DistributedPondBingoManager +from toontown.toonbase import ToontownGlobals, TTLocalizer + +from . import FishGlobals + + class DistributedFishingPond(DistributedObject.DistributedObject): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedFishingPond') pollInterval = 0.5 diff --git a/toontown/fishing/DistributedFishingPondAI.py b/toontown/fishing/DistributedFishingPondAI.py index d2e86ab..7863f22 100644 --- a/toontown/fishing/DistributedFishingPondAI.py +++ b/toontown/fishing/DistributedFishingPondAI.py @@ -1,6 +1,7 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectAI import DistributedObjectAI + class DistributedFishingPondAI(DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedFishingPondAI') diff --git a/toontown/fishing/DistributedFishingTarget.py b/toontown/fishing/DistributedFishingTarget.py index b534f98..d7c34a0 100644 --- a/toontown/fishing/DistributedFishingTarget.py +++ b/toontown/fishing/DistributedFishingTarget.py @@ -1,17 +1,21 @@ -from panda3d.core import * -from direct.distributed.ClockDelta import * -from direct.interval.IntervalGlobal import * -from direct.directnotify import DirectNotifyGlobal -from direct.distributed import DistributedNode -from direct.fsm import ClassicFSM -from direct.fsm import State -from direct.directutil import Mopath -from toontown.toonbase import ToontownGlobals -from direct.actor import Actor -from . import FishingTargetGlobals -import random import math +import random + +from panda3d.core import * + +from direct.actor import Actor +from direct.directnotify import DirectNotifyGlobal +from direct.directutil import Mopath +from direct.distributed import DistributedNode +from direct.distributed.ClockDelta import * +from direct.fsm import ClassicFSM, State +from direct.interval.IntervalGlobal import * + from toontown.effects import Bubbles +from toontown.toonbase import ToontownGlobals + +from . import FishingTargetGlobals + class DistributedFishingTarget(DistributedNode.DistributedNode): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedFishingTarget') diff --git a/toontown/fishing/DistributedFishingTargetAI.py b/toontown/fishing/DistributedFishingTargetAI.py index f485077..1b85de8 100644 --- a/toontown/fishing/DistributedFishingTargetAI.py +++ b/toontown/fishing/DistributedFishingTargetAI.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectAI import DistributedObjectAI + class DistributedFishingTargetAI(DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedFishingTargetAI') diff --git a/toontown/fishing/DistributedPondBingoManager.py b/toontown/fishing/DistributedPondBingoManager.py index a9c62a3..d30a968 100644 --- a/toontown/fishing/DistributedPondBingoManager.py +++ b/toontown/fishing/DistributedPondBingoManager.py @@ -1,23 +1,19 @@ +import time + +from panda3d.core import * + +from direct.directnotify import DirectNotifyGlobal from direct.distributed import DistributedObject from direct.distributed.ClockDelta import * -from direct.directnotify import DirectNotifyGlobal from direct.fsm import FSM from direct.gui.DirectGui import * -from panda3d.core import * -from direct.task import Task -from toontown.fishing import BingoGlobals -from toontown.fishing import BingoCardGui -from toontown.fishing import FishGlobals -from toontown.fishing import NormalBingo -from toontown.fishing import FourCornerBingo -from toontown.fishing import DiagonalBingo -from toontown.fishing import ThreewayBingo -from toontown.fishing import BlockoutBingo from direct.showbase import RandomNumGen -from toontown.toonbase import ToontownTimer -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import TTLocalizer -import time +from direct.task import Task + +from toontown.fishing import (BingoCardGui, BingoGlobals, BlockoutBingo, DiagonalBingo, FishGlobals, FourCornerBingo, + NormalBingo, ThreewayBingo) +from toontown.toonbase import ToontownGlobals, ToontownTimer, TTLocalizer + class DistributedPondBingoManager(DistributedObject.DistributedObject, FSM.FSM): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedPondBingoManager') diff --git a/toontown/fishing/DistributedPondBingoManagerAI.py b/toontown/fishing/DistributedPondBingoManagerAI.py index a190c85..2cf5019 100644 --- a/toontown/fishing/DistributedPondBingoManagerAI.py +++ b/toontown/fishing/DistributedPondBingoManagerAI.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectAI import DistributedObjectAI + class DistributedPondBingoManagerAI(DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedPondBingoManagerAI') diff --git a/toontown/fishing/FishBase.py b/toontown/fishing/FishBase.py index a339117..36cfad1 100644 --- a/toontown/fishing/FishBase.py +++ b/toontown/fishing/FishBase.py @@ -1,7 +1,10 @@ -from . import FishGlobals -from toontown.toonbase import TTLocalizer from direct.directnotify import DirectNotifyGlobal +from toontown.toonbase import TTLocalizer + +from . import FishGlobals + + class FishBase: notify = DirectNotifyGlobal.directNotify.newCategory('FishBase') diff --git a/toontown/fishing/FishBrowser.py b/toontown/fishing/FishBrowser.py index 04e012c..1245694 100644 --- a/toontown/fishing/FishBrowser.py +++ b/toontown/fishing/FishBrowser.py @@ -1,10 +1,12 @@ -from toontown.toonbase import ToontownGlobals +from panda3d.core import * + from direct.directnotify import DirectNotifyGlobal from direct.gui.DirectGui import * -from panda3d.core import * -from toontown.toonbase import TTLocalizer -from . import GenusPanel -from . import FishGlobals + +from toontown.toonbase import ToontownGlobals, TTLocalizer + +from . import FishGlobals, GenusPanel + class FishBrowser(DirectScrolledList): notify = DirectNotifyGlobal.directNotify.newCategory('FishBrowser') diff --git a/toontown/fishing/FishCollection.py b/toontown/fishing/FishCollection.py index 60d863f..1ee7552 100644 --- a/toontown/fishing/FishCollection.py +++ b/toontown/fishing/FishCollection.py @@ -1,5 +1,5 @@ -from . import FishBase -from . import FishGlobals +from . import FishBase, FishGlobals + class FishCollection: diff --git a/toontown/fishing/FishGlobals.py b/toontown/fishing/FishGlobals.py index b726fac..4e300a9 100644 --- a/toontown/fishing/FishGlobals.py +++ b/toontown/fishing/FishGlobals.py @@ -1,8 +1,9 @@ -from toontown.toonbase import TTLocalizer -from math import ceil, pow -import random -from toontown.toonbase import ToontownGlobals import copy +import random +from math import ceil, pow + +from toontown.toonbase import ToontownGlobals, TTLocalizer + NoMovie = 0 EnterMovie = 1 ExitMovie = 2 diff --git a/toontown/fishing/FishPanel.py b/toontown/fishing/FishPanel.py index f31fe5d..7cb29e1 100644 --- a/toontown/fishing/FishPanel.py +++ b/toontown/fishing/FishPanel.py @@ -1,11 +1,13 @@ -from toontown.toonbase import ToontownGlobals +from panda3d.core import * + from direct.directnotify import DirectNotifyGlobal from direct.gui.DirectGui import * -from panda3d.core import * -from toontown.toonbase import TTLocalizer from direct.interval.IntervalGlobal import * -from . import FishGlobals -from . import FishPhoto + +from toontown.toonbase import ToontownGlobals, TTLocalizer + +from . import FishGlobals, FishPhoto + class FishPanel(DirectFrame): notify = DirectNotifyGlobal.directNotify.newCategory('FishPanel') diff --git a/toontown/fishing/FishPhoto.py b/toontown/fishing/FishPhoto.py index eee77ac..506e256 100644 --- a/toontown/fishing/FishPhoto.py +++ b/toontown/fishing/FishPhoto.py @@ -1,8 +1,11 @@ -from direct.directnotify import DirectNotifyGlobal from panda3d.core import * + +from direct.directnotify import DirectNotifyGlobal from direct.interval.IntervalGlobal import * + from . import FishGlobals + class DirectRegion(NodePath): notify = DirectNotifyGlobal.directNotify.newCategory('DirectRegion') diff --git a/toontown/fishing/FishPicker.py b/toontown/fishing/FishPicker.py index 8e06f95..b58c8c0 100644 --- a/toontown/fishing/FishPicker.py +++ b/toontown/fishing/FishPicker.py @@ -1,10 +1,13 @@ -from toontown.toonbase import ToontownGlobals +from panda3d.core import * + from direct.directnotify import DirectNotifyGlobal from direct.gui.DirectGui import * -from panda3d.core import * -from toontown.toonbase import TTLocalizer + +from toontown.toonbase import ToontownGlobals, TTLocalizer + from . import FishPanel + class FishPicker(DirectScrolledList): notify = DirectNotifyGlobal.directNotify.newCategory('FishPicker') diff --git a/toontown/fishing/FishSellGUI.py b/toontown/fishing/FishSellGUI.py index efe8862..81c0c6a 100644 --- a/toontown/fishing/FishSellGUI.py +++ b/toontown/fishing/FishSellGUI.py @@ -1,11 +1,13 @@ -from direct.gui.DirectGui import * from panda3d.core import * + from direct.directnotify import DirectNotifyGlobal -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import TTLocalizer +from direct.gui.DirectGui import * from direct.task import Task -from . import FishBase -from . import FishPicker + +from toontown.toonbase import ToontownGlobals, TTLocalizer + +from . import FishBase, FishPicker + class FishSellGUI(DirectFrame): notify = DirectNotifyGlobal.directNotify.newCategory('FishGui') diff --git a/toontown/fishing/FishTank.py b/toontown/fishing/FishTank.py index 5ff7aad..0be7fcc 100644 --- a/toontown/fishing/FishTank.py +++ b/toontown/fishing/FishTank.py @@ -1,5 +1,5 @@ -from . import FishBase -from . import FishGlobals +from . import FishBase, FishGlobals + class FishTank: diff --git a/toontown/fishing/FishingTargetGlobals.py b/toontown/fishing/FishingTargetGlobals.py index 01c8a70..1dbdb6b 100644 --- a/toontown/fishing/FishingTargetGlobals.py +++ b/toontown/fishing/FishingTargetGlobals.py @@ -1,4 +1,5 @@ from toontown.toonbase import ToontownGlobals + OFF = 0 MOVING = 1 StepTime = 5.0 diff --git a/toontown/fishing/FourCornerBingo.py b/toontown/fishing/FourCornerBingo.py index 1c162e9..dbd8e5a 100644 --- a/toontown/fishing/FourCornerBingo.py +++ b/toontown/fishing/FourCornerBingo.py @@ -1,6 +1,7 @@ from direct.directnotify import DirectNotifyGlobal -from toontown.fishing import BingoGlobals -from toontown.fishing import BingoCardBase + +from toontown.fishing import BingoCardBase, BingoGlobals + class FourCornerBingo(BingoCardBase.BingoCardBase): notify = DirectNotifyGlobal.directNotify.newCategory('FourCornerBingo') diff --git a/toontown/fishing/GenusPanel.py b/toontown/fishing/GenusPanel.py index 7f1f65d..79e1975 100644 --- a/toontown/fishing/GenusPanel.py +++ b/toontown/fishing/GenusPanel.py @@ -1,11 +1,12 @@ -from toontown.toonbase import ToontownGlobals +from panda3d.core import * + from direct.directnotify import DirectNotifyGlobal from direct.gui.DirectGui import * -from panda3d.core import * -from toontown.toonbase import TTLocalizer -from . import FishBase -from . import FishGlobals -from . import FishPhoto + +from toontown.toonbase import ToontownGlobals, TTLocalizer + +from . import FishBase, FishGlobals, FishPhoto + class GenusPanel(DirectFrame): notify = DirectNotifyGlobal.directNotify.newCategory('GenusPanel') diff --git a/toontown/fishing/NormalBingo.py b/toontown/fishing/NormalBingo.py index 5633b37..062ff02 100644 --- a/toontown/fishing/NormalBingo.py +++ b/toontown/fishing/NormalBingo.py @@ -1,6 +1,7 @@ from direct.directnotify import DirectNotifyGlobal -from toontown.fishing import BingoGlobals -from toontown.fishing import BingoCardBase + +from toontown.fishing import BingoCardBase, BingoGlobals + class NormalBingo(BingoCardBase.BingoCardBase): notify = DirectNotifyGlobal.directNotify.newCategory('NormalBingo') diff --git a/toontown/fishing/ThreewayBingo.py b/toontown/fishing/ThreewayBingo.py index 515f98f..d87bafe 100644 --- a/toontown/fishing/ThreewayBingo.py +++ b/toontown/fishing/ThreewayBingo.py @@ -1,6 +1,7 @@ from direct.directnotify import DirectNotifyGlobal -from toontown.fishing import BingoGlobals -from toontown.fishing import BingoCardBase + +from toontown.fishing import BingoCardBase, BingoGlobals + class ThreewayBingo(BingoCardBase.BingoCardBase): notify = DirectNotifyGlobal.directNotify.newCategory('ThreewayBingo') diff --git a/toontown/friends/FriendHandle.py b/toontown/friends/FriendHandle.py index 960306f..4d56002 100644 --- a/toontown/friends/FriendHandle.py +++ b/toontown/friends/FriendHandle.py @@ -1,7 +1,10 @@ -from otp.avatar.Avatar import teleportNotify -from toontown.toonbase import ToontownGlobals import copy + +from otp.avatar.Avatar import teleportNotify + from toontown.chat import ToonChatGarbler +from toontown.toonbase import ToontownGlobals + class FriendHandle: diff --git a/toontown/friends/FriendInvitee.py b/toontown/friends/FriendInvitee.py index ce3dc21..d9214d9 100644 --- a/toontown/friends/FriendInvitee.py +++ b/toontown/friends/FriendInvitee.py @@ -1,12 +1,14 @@ from panda3d.core import * -from toontown.toonbase.ToontownGlobals import * -from direct.showbase import DirectObject + from direct.directnotify import DirectNotifyGlobal -from toontown.toontowngui import TTDialog -from otp.otpbase import OTPLocalizer -from toontown.toontowngui import ToonHeadDialog from direct.gui.DirectGui import DGG -from otp.otpbase import OTPGlobals +from direct.showbase import DirectObject + +from otp.otpbase import OTPGlobals, OTPLocalizer + +from toontown.toonbase.ToontownGlobals import * +from toontown.toontowngui import ToonHeadDialog, TTDialog + class FriendInvitee(ToonHeadDialog.ToonHeadDialog): notify = DirectNotifyGlobal.directNotify.newCategory('FriendInvitee') diff --git a/toontown/friends/FriendInviter.py b/toontown/friends/FriendInviter.py index 1909e9c..7fa8154 100644 --- a/toontown/friends/FriendInviter.py +++ b/toontown/friends/FriendInviter.py @@ -1,19 +1,20 @@ from panda3d.core import * -from direct.task.Task import Task -from toontown.toonbase.ToontownGlobals import * -from direct.gui.DirectGui import * -from panda3d.core import * -from direct.showbase import DirectObject -from direct.fsm import ClassicFSM, State -from direct.fsm import State + from direct.directnotify import DirectNotifyGlobal -from toontown.toonbase import TTLocalizer -from toontown.toon import ToonTeleportPanel -from toontown.suit import Suit -from toontown.pets import Pet -from otp.otpbase import OTPLocalizer -from otp.otpbase import OTPGlobals +from direct.fsm import ClassicFSM, State +from direct.gui.DirectGui import * +from direct.showbase import DirectObject +from direct.task.Task import Task + +from otp.otpbase import OTPGlobals, OTPLocalizer from otp.uberdog import RejectCode + +from toontown.pets import Pet +from toontown.suit import Suit +from toontown.toon import ToonTeleportPanel +from toontown.toonbase import TTLocalizer +from toontown.toonbase.ToontownGlobals import * + globalFriendInviter = None def showFriendInviter(avId, avName, avDisableName): diff --git a/toontown/friends/FriendNotifier.py b/toontown/friends/FriendNotifier.py index fbb1fd5..ec539e0 100644 --- a/toontown/friends/FriendNotifier.py +++ b/toontown/friends/FriendNotifier.py @@ -1,12 +1,14 @@ from panda3d.core import * -from toontown.toonbase.ToontownGlobals import * -from direct.showbase import DirectObject + from direct.directnotify import DirectNotifyGlobal -from toontown.toontowngui import TTDialog -from otp.otpbase import OTPLocalizer -from toontown.toontowngui import ToonHeadDialog from direct.gui.DirectGui import DGG -from otp.otpbase import OTPGlobals +from direct.showbase import DirectObject + +from otp.otpbase import OTPGlobals, OTPLocalizer + +from toontown.toonbase.ToontownGlobals import * +from toontown.toontowngui import ToonHeadDialog, TTDialog + class FriendNotifier(ToonHeadDialog.ToonHeadDialog): notify = DirectNotifyGlobal.directNotify.newCategory('FriendNotifier') diff --git a/toontown/friends/FriendsListManager.py b/toontown/friends/FriendsListManager.py index c7c521a..d5306c0 100644 --- a/toontown/friends/FriendsListManager.py +++ b/toontown/friends/FriendsListManager.py @@ -1,23 +1,19 @@ from panda3d.core import * from panda3d.otp import * -from . import FriendsListPanel -from . import FriendInviter -from . import FriendInvitee -from . import FriendNotifier + from direct.directnotify import DirectNotifyGlobal -from toontown.toon import ToonTeleportPanel + +from otp.otpbase import OTPGlobals + from toontown.friends import ToontownFriendSecret from toontown.pets import PetAvatarPanel -from toontown.toon import ToonAvatarPanel -from toontown.toon import PlayerInfoPanel from toontown.suit import SuitAvatarPanel -from toontown.toon import ToonDNA -from toontown.toon import ToonAvatarDetailPanel -from toontown.toon import PlayerDetailPanel +from toontown.toon import (PlayerDetailPanel, PlayerInfoPanel, Toon, ToonAvatarDetailPanel, ToonAvatarPanel, ToonDNA, + ToonTeleportPanel) from toontown.toonbase import ToontownGlobals -from toontown.toon import Toon -from . import FriendHandle -from otp.otpbase import OTPGlobals + +from . import FriendHandle, FriendInvitee, FriendInviter, FriendNotifier, FriendsListPanel + class FriendsListManager: notify = DirectNotifyGlobal.directNotify.newCategory('FriendsListManager') diff --git a/toontown/friends/FriendsListPanel.py b/toontown/friends/FriendsListPanel.py index 24b79f2..be10599 100644 --- a/toontown/friends/FriendsListPanel.py +++ b/toontown/friends/FriendsListPanel.py @@ -1,13 +1,16 @@ -from panda3d.core import * -from direct.gui.DirectGui import * -from panda3d.core import * -from direct.fsm import StateData -from toontown.toon import ToonAvatarPanel -from toontown.friends import ToontownFriendSecret -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import TTLocalizer -from otp.otpbase import OTPGlobals import functools + +from panda3d.core import * + +from direct.fsm import StateData +from direct.gui.DirectGui import * + +from otp.otpbase import OTPGlobals + +from toontown.friends import ToontownFriendSecret +from toontown.toon import ToonAvatarPanel +from toontown.toonbase import ToontownGlobals, TTLocalizer + FLPPets = 1 FLPOnline = 2 FLPAll = 3 diff --git a/toontown/friends/TTPlayerFriendsManager.py b/toontown/friends/TTPlayerFriendsManager.py index 5cb1bc4..a0a12f7 100644 --- a/toontown/friends/TTPlayerFriendsManager.py +++ b/toontown/friends/TTPlayerFriendsManager.py @@ -1,7 +1,9 @@ -from direct.distributed.DistributedObjectGlobal import DistributedObjectGlobal from direct.directnotify.DirectNotifyGlobal import directNotify -from otp.otpbase import OTPGlobals +from direct.distributed.DistributedObjectGlobal import DistributedObjectGlobal + from otp.friends.PlayerFriendsManager import PlayerFriendsManager +from otp.otpbase import OTPGlobals + class TTPlayerFriendsManager(PlayerFriendsManager): diff --git a/toontown/friends/TTPlayerFriendsManagerUD.py b/toontown/friends/TTPlayerFriendsManagerUD.py index 44829ce..574f7ed 100644 --- a/toontown/friends/TTPlayerFriendsManagerUD.py +++ b/toontown/friends/TTPlayerFriendsManagerUD.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectUD import DistributedObjectUD + class TTPlayerFriendsManagerUD(DistributedObjectUD): notify = DirectNotifyGlobal.directNotify.newCategory('TTPlayerFriendsManagerUD') diff --git a/toontown/friends/ToontownFriendSecret.py b/toontown/friends/ToontownFriendSecret.py index 491a7ce..bc6f1f7 100644 --- a/toontown/friends/ToontownFriendSecret.py +++ b/toontown/friends/ToontownFriendSecret.py @@ -1,16 +1,15 @@ from panda3d.core import * -from direct.gui.DirectGui import * + from direct.directnotify import DirectNotifyGlobal -from otp.otpbase import OTPLocalizer -from toontown.toonbase import TTLocalizer -from otp.friends.FriendSecret import AccountSecret -from otp.friends.FriendSecret import AvatarSecret -from otp.friends.FriendSecret import BothSecrets +from direct.gui.DirectGui import * + from otp.friends import FriendSecret -from otp.friends.FriendSecret import globalFriendSecret -from otp.friends.FriendSecret import showFriendSecret -from otp.friends.FriendSecret import hideFriendSecret -from otp.friends.FriendSecret import unloadFriendSecret +from otp.friends.FriendSecret import (AccountSecret, AvatarSecret, BothSecrets, globalFriendSecret, hideFriendSecret, + showFriendSecret, unloadFriendSecret) +from otp.otpbase import OTPLocalizer + +from toontown.toonbase import TTLocalizer + def openFriendSecret(secretType): global globalFriendSecret diff --git a/toontown/golf/BuildGeometry.py b/toontown/golf/BuildGeometry.py index 480c334..b6fb930 100644 --- a/toontown/golf/BuildGeometry.py +++ b/toontown/golf/BuildGeometry.py @@ -1,9 +1,13 @@ -from direct.distributed import DistributedObject -from direct.directnotify import DirectNotifyGlobal -from toontown.toonbase import ToontownGlobals -from panda3d.core import * -from math import * import math +from math import * + +from panda3d.core import * + +from direct.directnotify import DirectNotifyGlobal +from direct.distributed import DistributedObject + +from toontown.toonbase import ToontownGlobals + GEO_ID = 0 def circleX(angle, radius, centerX, centerY): diff --git a/toontown/golf/DistributedGolfCourse.py b/toontown/golf/DistributedGolfCourse.py index 6c2f49f..4a03bdf 100644 --- a/toontown/golf/DistributedGolfCourse.py +++ b/toontown/golf/DistributedGolfCourse.py @@ -1,20 +1,20 @@ -from direct.interval.IntervalGlobal import Sequence, Func, Wait, LerpColorScaleInterval, Parallel -from direct.distributed import DistributedObject -from direct.directnotify import DirectNotifyGlobal -from direct.task.Task import Task -from direct.showbase import PythonUtil -from toontown.distributed import DelayDelete -from toontown.distributed.DelayDeletable import DelayDeletable -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import TTLocalizer from panda3d.core import * -from direct.gui.DirectGui import * + +from direct.directnotify import DirectNotifyGlobal +from direct.distributed import DistributedObject from direct.distributed.ClockDelta import * from direct.fsm.FSM import FSM -from toontown.golf import GolfGlobals -from toontown.golf import GolfScoreBoard -from toontown.golf import GolfRewardDialog +from direct.gui.DirectGui import * +from direct.interval.IntervalGlobal import Func, LerpColorScaleInterval, Parallel, Sequence, Wait +from direct.showbase import PythonUtil +from direct.task.Task import Task + +from toontown.distributed import DelayDelete +from toontown.distributed.DelayDeletable import DelayDeletable +from toontown.golf import GolfGlobals, GolfRewardDialog, GolfScoreBoard from toontown.toon import ToonHeadFrame +from toontown.toonbase import ToontownGlobals, TTLocalizer + class DistributedGolfCourse(DistributedObject.DistributedObject, FSM, DelayDeletable): notify = directNotify.newCategory('DistributedGolfCourse') diff --git a/toontown/golf/DistributedGolfCourseAI.py b/toontown/golf/DistributedGolfCourseAI.py index e7342a7..597e375 100644 --- a/toontown/golf/DistributedGolfCourseAI.py +++ b/toontown/golf/DistributedGolfCourseAI.py @@ -1,12 +1,15 @@ -from direct.distributed import DistributedObjectAI -from direct.directnotify import DirectNotifyGlobal -from toontown.toonbase import ToontownGlobals -from toontown.golf import DistributedGolfHoleAI -from panda3d.core import * -from direct.fsm.FSM import FSM -from toontown.ai.ToonBarrier import * -from toontown.golf import GolfGlobals import functools + +from panda3d.core import * + +from direct.directnotify import DirectNotifyGlobal +from direct.distributed import DistributedObjectAI +from direct.fsm.FSM import FSM + +from toontown.ai.ToonBarrier import * +from toontown.golf import DistributedGolfHoleAI, GolfGlobals +from toontown.toonbase import ToontownGlobals + INITIAL = 0 EXITED = 1 EXPECTED = 2 diff --git a/toontown/golf/DistributedGolfHole.py b/toontown/golf/DistributedGolfHole.py index b39f00b..3ea166d 100644 --- a/toontown/golf/DistributedGolfHole.py +++ b/toontown/golf/DistributedGolfHole.py @@ -1,26 +1,29 @@ import math import random import time -from panda3d.core import TextNode, BitMask32, Point3, Vec3, Vec4, deg2Rad, Mat3, NodePath, VBase4, CollisionTraverser, CollisionSegment, CollisionNode, CollisionHandlerQueue + +from panda3d.core import (BitMask32, CollisionHandlerQueue, CollisionNode, CollisionSegment, CollisionTraverser, Mat3, + NodePath, Point3, TextNode, VBase4, Vec3, Vec4, deg2Rad) from panda3d.ode import OdeRayGeom -from direct.distributed import DistributedObject -from direct.directnotify import DirectNotifyGlobal -from otp.otpbase import OTPGlobals -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import TTLocalizer -from toontown.toonbase import ToontownTimer -from direct.gui.DirectGui import DirectWaitBar, DGG, DirectLabel -from direct.task import Task -from direct.fsm.FSM import FSM -from toontown.minigame import ArrowKeys -from direct.showbase import PythonUtil -from toontown.golf import BuildGeometry -from toontown.golf import DistributedPhysicsWorld -from toontown.golf import GolfGlobals -from direct.interval.IntervalGlobal import Sequence, Parallel, LerpScaleInterval, LerpFunctionInterval, Func, Wait, SoundInterval, ParallelEndTogether, LerpPosInterval, ActorInterval, LerpPosHprInterval, LerpColorScaleInterval, WaitInterval + from direct.actor import Actor -from toontown.golf import GolfHoleBase +from direct.directnotify import DirectNotifyGlobal +from direct.distributed import DistributedObject +from direct.fsm.FSM import FSM +from direct.gui.DirectGui import DGG, DirectLabel, DirectWaitBar +from direct.interval.IntervalGlobal import (ActorInterval, Func, LerpColorScaleInterval, LerpFunctionInterval, + LerpPosHprInterval, LerpPosInterval, LerpScaleInterval, Parallel, + ParallelEndTogether, Sequence, SoundInterval, Wait, WaitInterval) +from direct.showbase import PythonUtil +from direct.task import Task + +from otp.otpbase import OTPGlobals + from toontown.distributed import DelayDelete +from toontown.golf import BuildGeometry, DistributedPhysicsWorld, GolfGlobals, GolfHoleBase +from toontown.minigame import ArrowKeys +from toontown.toonbase import ToontownGlobals, ToontownTimer, TTLocalizer + class DistributedGolfHole(DistributedPhysicsWorld.DistributedPhysicsWorld, FSM, GolfHoleBase.GolfHoleBase): defaultTransitions = {'Off': ['Cleanup', 'ChooseTee', 'WatchTee'], diff --git a/toontown/golf/DistributedGolfHoleAI.py b/toontown/golf/DistributedGolfHoleAI.py index 30c525e..a305b5b 100644 --- a/toontown/golf/DistributedGolfHoleAI.py +++ b/toontown/golf/DistributedGolfHoleAI.py @@ -1,13 +1,17 @@ -from direct.distributed import DistributedObjectAI -from direct.directnotify import DirectNotifyGlobal -from toontown.toonbase import ToontownGlobals -from panda3d.core import * -from . import DistributedPhysicsWorldAI -from direct.fsm.FSM import FSM -from toontown.ai.ToonBarrier import * -from toontown.golf import GolfGlobals import random -from toontown.golf import GolfHoleBase + +from panda3d.core import * + +from direct.directnotify import DirectNotifyGlobal +from direct.distributed import DistributedObjectAI +from direct.fsm.FSM import FSM + +from toontown.ai.ToonBarrier import * +from toontown.golf import GolfGlobals, GolfHoleBase +from toontown.toonbase import ToontownGlobals + +from . import DistributedPhysicsWorldAI + class DistributedGolfHoleAI(DistributedPhysicsWorldAI.DistributedPhysicsWorldAI, FSM, GolfHoleBase.GolfHoleBase): defaultTransitions = {'Off': ['Cleanup', 'WaitTee'], 'WaitTee': ['WaitSwing', 'Cleanup', 'WaitTee', 'WaitPlayback'], 'WaitSwing': ['WaitPlayback', 'Cleanup', 'WaitSwing', 'WaitTee'], 'WaitPlayback': ['WaitSwing', 'Cleanup', 'WaitTee', 'WaitPlayback'], 'Cleanup': ['Off']} diff --git a/toontown/golf/DistributedPhysicsWorld.py b/toontown/golf/DistributedPhysicsWorld.py index a3ad974..3d224b4 100644 --- a/toontown/golf/DistributedPhysicsWorld.py +++ b/toontown/golf/DistributedPhysicsWorld.py @@ -1,20 +1,25 @@ -from direct.distributed import DistributedObject -from direct.directnotify import DirectNotifyGlobal -from toontown.toonbase import ToontownGlobals -from panda3d.core import * -from math import * import math +import random +import time +from math import * + +from panda3d.core import * + +from direct.directnotify import DirectNotifyGlobal +from direct.distributed import DistributedObject +from direct.distributed.ClockDelta import * from direct.fsm.FSM import FSM -from toontown.minigame import ArrowKeys +from direct.interval.SoundInterval import SoundInterval from direct.showbase import PythonUtil from direct.showutil import Rope from direct.task import Task -from direct.distributed.ClockDelta import * + +from toontown.golf import GolfGlobals, PhysicsWorldBase +from toontown.minigame import ArrowKeys +from toontown.toonbase import ToontownGlobals + from . import BuildGeometry -from toontown.golf import GolfGlobals -from toontown.golf import PhysicsWorldBase -import random, time -from direct.interval.SoundInterval import SoundInterval + def scalp(vec, scal): vec0 = vec[0] * scal diff --git a/toontown/golf/DistributedPhysicsWorldAI.py b/toontown/golf/DistributedPhysicsWorldAI.py index 857e663..fe512ed 100644 --- a/toontown/golf/DistributedPhysicsWorldAI.py +++ b/toontown/golf/DistributedPhysicsWorldAI.py @@ -1,12 +1,18 @@ -from direct.distributed import DistributedObjectAI -from direct.directnotify import DirectNotifyGlobal -from toontown.toonbase import ToontownGlobals -from panda3d.core import * -from . import BuildGeometry -import random, time -from math import * import math +import random +import time +from math import * + +from panda3d.core import * + +from direct.directnotify import DirectNotifyGlobal +from direct.distributed import DistributedObjectAI + from toontown.golf import PhysicsWorldBase +from toontown.toonbase import ToontownGlobals + +from . import BuildGeometry + class DistributedPhysicsWorldAI(DistributedObjectAI.DistributedObjectAI, PhysicsWorldBase.PhysicsWorldBase): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedPhysicsWorldAI') diff --git a/toontown/golf/GolfGlobals.py b/toontown/golf/GolfGlobals.py index 5abc6d3..2e79e6b 100644 --- a/toontown/golf/GolfGlobals.py +++ b/toontown/golf/GolfGlobals.py @@ -1,5 +1,7 @@ -from direct.directnotify import DirectNotifyGlobal import random + +from direct.directnotify import DirectNotifyGlobal + MAX_PLAYERS_PER_HOLE = 4 GOLF_BALL_RADIUS = 0.25 GOLF_BALL_VOLUME = 4.0 / 3.0 * 3.14159 * GOLF_BALL_RADIUS ** 3 diff --git a/toontown/golf/GolfHoleBase.py b/toontown/golf/GolfHoleBase.py index c2a2106..14ac052 100644 --- a/toontown/golf/GolfHoleBase.py +++ b/toontown/golf/GolfHoleBase.py @@ -1,14 +1,19 @@ -from direct.distributed import DistributedObjectAI -from direct.directnotify import DirectNotifyGlobal -from toontown.toonbase import ToontownGlobals +import math +import random + from panda3d.core import * -from panda3d.ode import OdeTriMeshData, OdeTriMeshGeom, OdeBody, OdeRayGeom -from . import DistributedPhysicsWorldAI +from panda3d.ode import OdeBody, OdeRayGeom, OdeTriMeshData, OdeTriMeshGeom + +from direct.directnotify import DirectNotifyGlobal +from direct.distributed import DistributedObjectAI from direct.fsm.FSM import FSM + from toontown.ai.ToonBarrier import * from toontown.golf import GolfGlobals -import random -import math +from toontown.toonbase import ToontownGlobals + +from . import DistributedPhysicsWorldAI + class GolfHoleBase: diff --git a/toontown/golf/GolfManagerAI.py b/toontown/golf/GolfManagerAI.py index 3995485..a1e3792 100644 --- a/toontown/golf/GolfManagerAI.py +++ b/toontown/golf/GolfManagerAI.py @@ -1,9 +1,12 @@ +from panda3d.core import * + +from direct.directnotify import DirectNotifyGlobal from direct.distributed import DistributedObjectAI from direct.showbase import DirectObject -from direct.directnotify import DirectNotifyGlobal -from toontown.toonbase import ToontownGlobals + from toontown.golf import DistributedGolfCourseAI -from panda3d.core import * +from toontown.toonbase import ToontownGlobals + RequestHole = {} def GolfManagerAI(): diff --git a/toontown/golf/GolfRewardDialog.py b/toontown/golf/GolfRewardDialog.py index e02ed2b..cbf8f72 100644 --- a/toontown/golf/GolfRewardDialog.py +++ b/toontown/golf/GolfRewardDialog.py @@ -1,13 +1,17 @@ +from math import * + from panda3d.core import * + +from direct.directnotify import DirectNotifyGlobal +from direct.distributed.ClockDelta import * from direct.gui.DirectGui import * -from toontown.toonbase import TTLocalizer, ToontownGlobals from direct.interval.IntervalGlobal import * from direct.task import Task -from direct.directnotify import DirectNotifyGlobal -from math import * -from direct.distributed.ClockDelta import * + from toontown.golf import GolfGlobals from toontown.shtiker.GolfPage import GolfTrophy +from toontown.toonbase import ToontownGlobals, TTLocalizer + class GolfRewardDialog: notify = directNotify.newCategory('GolfRewardDialog') diff --git a/toontown/golf/GolfScoreBoard.py b/toontown/golf/GolfScoreBoard.py index 684cb94..baa8221 100644 --- a/toontown/golf/GolfScoreBoard.py +++ b/toontown/golf/GolfScoreBoard.py @@ -1,13 +1,17 @@ +from math import * + from panda3d.core import * -from toontown.toonbase import TTLocalizer, ToontownGlobals +from panda3d.core import LineSegs + from direct.directnotify import DirectNotifyGlobal +from direct.distributed.ClockDelta import * from direct.gui.DirectGui import * from direct.interval.IntervalGlobal import * from direct.task import Task -from math import * -from direct.distributed.ClockDelta import * + from toontown.golf import GolfGlobals -from panda3d.core import LineSegs +from toontown.toonbase import ToontownGlobals, TTLocalizer + AUTO_HIDE_TIMEOUT = 3 class GolfScoreBoard: diff --git a/toontown/golf/PhysicsWorldBase.py b/toontown/golf/PhysicsWorldBase.py index d83d36c..26aecad 100644 --- a/toontown/golf/PhysicsWorldBase.py +++ b/toontown/golf/PhysicsWorldBase.py @@ -1,18 +1,25 @@ -from direct.distributed import DistributedObject -from direct.directnotify import DirectNotifyGlobal -from toontown.toonbase import ToontownGlobals -from panda3d.core import * -from panda3d.ode import OdeWorld, OdeSimpleSpace, OdeJointGroup, OdePlaneGeom, OdeBody, OdeMass, OdeSphereGeom, OdeBoxGeom, OdeSliderJoint, OdeTriMeshData, OdeTriMeshGeom, OdeHingeJoint -from math import * import math +import random +import time +from math import * + +from panda3d.core import * +from panda3d.ode import (OdeBody, OdeBoxGeom, OdeHingeJoint, OdeJointGroup, OdeMass, OdePlaneGeom, OdeSimpleSpace, + OdeSliderJoint, OdeSphereGeom, OdeTriMeshData, OdeTriMeshGeom, OdeWorld) + +from direct.directnotify import DirectNotifyGlobal +from direct.distributed import DistributedObject +from direct.distributed.ClockDelta import * from direct.fsm.FSM import FSM -from toontown.minigame import ArrowKeys from direct.showbase import PythonUtil from direct.task import Task -from direct.distributed.ClockDelta import * -from . import BuildGeometry + from toontown.golf import GolfGlobals -import random, time +from toontown.minigame import ArrowKeys +from toontown.toonbase import ToontownGlobals + +from . import BuildGeometry + def scalp(vec, scal): vec0 = vec[0] * scal diff --git a/toontown/hood/AnimatedProp.py b/toontown/hood/AnimatedProp.py index 722c84a..3c01639 100644 --- a/toontown/hood/AnimatedProp.py +++ b/toontown/hood/AnimatedProp.py @@ -1,5 +1,6 @@ -from direct.showbase import DirectObject from direct.directnotify import DirectNotifyGlobal +from direct.showbase import DirectObject + class AnimatedProp(DirectObject.DirectObject): notify = DirectNotifyGlobal.directNotify.newCategory('AnimatedProp') diff --git a/toontown/hood/BRHood.py b/toontown/hood/BRHood.py index b5db747..c44f389 100644 --- a/toontown/hood/BRHood.py +++ b/toontown/hood/BRHood.py @@ -1,8 +1,11 @@ from panda3d.core import * -from . import ToonHood -from toontown.town import BRTownLoader + from toontown.safezone import BRSafeZoneLoader from toontown.toonbase.ToontownGlobals import * +from toontown.town import BRTownLoader + +from . import ToonHood + class BRHood(ToonHood.ToonHood): diff --git a/toontown/hood/BRHoodDataAI.py b/toontown/hood/BRHoodDataAI.py index 2e2b8fd..9e22bf6 100644 --- a/toontown/hood/BRHoodDataAI.py +++ b/toontown/hood/BRHoodDataAI.py @@ -1,10 +1,12 @@ from direct.directnotify import DirectNotifyGlobal -from . import HoodDataAI -from toontown.toonbase import ToontownGlobals -from toontown.safezone import DistributedTrolleyAI -from toontown.safezone import BRTreasurePlannerAI + from toontown.classicchars import DistributedPlutoAI +from toontown.safezone import BRTreasurePlannerAI, DistributedTrolleyAI from toontown.toon import DistributedNPCFishermanAI +from toontown.toonbase import ToontownGlobals + +from . import HoodDataAI + class BRHoodDataAI(HoodDataAI.HoodDataAI): notify = DirectNotifyGlobal.directNotify.newCategory('BRHoodDataAI') diff --git a/toontown/hood/BossbotHQ.py b/toontown/hood/BossbotHQ.py index 9dbf095..757c2e6 100644 --- a/toontown/hood/BossbotHQ.py +++ b/toontown/hood/BossbotHQ.py @@ -1,7 +1,9 @@ -from . import CogHood -from toontown.toonbase import ToontownGlobals from toontown.coghq import BossbotCogHQLoader from toontown.hood import ZoneUtil +from toontown.toonbase import ToontownGlobals + +from . import CogHood + class BossbotHQ(CogHood.CogHood): diff --git a/toontown/hood/BossbotHQDataAI.py b/toontown/hood/BossbotHQDataAI.py index 8299bdd..64826eb 100644 --- a/toontown/hood/BossbotHQDataAI.py +++ b/toontown/hood/BossbotHQDataAI.py @@ -1,17 +1,15 @@ from panda3d.core import Point3 + from direct.directnotify import DirectNotifyGlobal -from . import HoodDataAI -from toontown.toonbase import ToontownGlobals -from toontown.coghq import DistributedCogHQDoorAI -from toontown.building import DistributedDoorAI -from toontown.building import DoorTypes -from toontown.coghq import LobbyManagerAI -from toontown.building import DistributedBossElevatorAI + +from toontown.building import (DistributedBBElevatorAI, DistributedBoardingPartyAI, DistributedBossElevatorAI, + DistributedDoorAI, DoorTypes, FADoorCodes) +from toontown.coghq import DistributedCogHQDoorAI, DistributedCogKartAI, LobbyManagerAI from toontown.suit import DistributedBossbotBossAI -from toontown.building import DistributedBBElevatorAI -from toontown.building import DistributedBoardingPartyAI -from toontown.building import FADoorCodes -from toontown.coghq import DistributedCogKartAI +from toontown.toonbase import ToontownGlobals + +from . import HoodDataAI + class BossbotHQDataAI(HoodDataAI.HoodDataAI): notify = DirectNotifyGlobal.directNotify.newCategory('BossbotHQDataAI') diff --git a/toontown/hood/CSHoodDataAI.py b/toontown/hood/CSHoodDataAI.py index 6e85ec0..324eaff 100644 --- a/toontown/hood/CSHoodDataAI.py +++ b/toontown/hood/CSHoodDataAI.py @@ -1,14 +1,13 @@ from direct.directnotify import DirectNotifyGlobal -from . import HoodDataAI -from toontown.toonbase import ToontownGlobals -from toontown.coghq import DistributedFactoryElevatorExtAI -from toontown.coghq import DistributedCogHQDoorAI -from toontown.coghq import DistributedSellbotHQDoorAI -from toontown.building import DoorTypes -from toontown.coghq import LobbyManagerAI -from toontown.building import DistributedVPElevatorAI + +from toontown.building import DistributedBoardingPartyAI, DistributedVPElevatorAI, DoorTypes +from toontown.coghq import (DistributedCogHQDoorAI, DistributedFactoryElevatorExtAI, DistributedSellbotHQDoorAI, + LobbyManagerAI) from toontown.suit import DistributedSellbotBossAI -from toontown.building import DistributedBoardingPartyAI +from toontown.toonbase import ToontownGlobals + +from . import HoodDataAI + class CSHoodDataAI(HoodDataAI.HoodDataAI): notify = DirectNotifyGlobal.directNotify.newCategory('CSHoodDataAI') diff --git a/toontown/hood/CashbotHQ.py b/toontown/hood/CashbotHQ.py index 6a83b1c..ace65cd 100644 --- a/toontown/hood/CashbotHQ.py +++ b/toontown/hood/CashbotHQ.py @@ -1,9 +1,13 @@ from panda3d.core import * + from direct.directnotify import DirectNotifyGlobal -from . import CogHood -from toontown.toonbase import ToontownGlobals, TTLocalizer -from toontown.hood import ZoneUtil + from toontown.coghq import CashbotCogHQLoader +from toontown.hood import ZoneUtil +from toontown.toonbase import ToontownGlobals, TTLocalizer + +from . import CogHood + class CashbotHQ(CogHood.CogHood): notify = DirectNotifyGlobal.directNotify.newCategory('CashbotHQ') diff --git a/toontown/hood/CashbotHQDataAI.py b/toontown/hood/CashbotHQDataAI.py index d665b69..7dfc08e 100644 --- a/toontown/hood/CashbotHQDataAI.py +++ b/toontown/hood/CashbotHQDataAI.py @@ -1,14 +1,12 @@ from direct.directnotify import DirectNotifyGlobal -from . import HoodDataAI -from toontown.toonbase import ToontownGlobals -from toontown.coghq import DistributedMintElevatorExtAI -from toontown.coghq import DistributedCogHQDoorAI -from toontown.building import DoorTypes -from toontown.coghq import LobbyManagerAI -from toontown.building import DistributedCFOElevatorAI + +from toontown.building import DistributedBoardingPartyAI, DistributedCFOElevatorAI, DoorTypes, FADoorCodes +from toontown.coghq import DistributedCogHQDoorAI, DistributedMintElevatorExtAI, LobbyManagerAI from toontown.suit import DistributedCashbotBossAI -from toontown.building import FADoorCodes -from toontown.building import DistributedBoardingPartyAI +from toontown.toonbase import ToontownGlobals + +from . import HoodDataAI + class CashbotHQDataAI(HoodDataAI.HoodDataAI): notify = DirectNotifyGlobal.directNotify.newCategory('CashbotHqDataAI') diff --git a/toontown/hood/CogHood.py b/toontown/hood/CogHood.py index 6a3b1a2..9848a38 100644 --- a/toontown/hood/CogHood.py +++ b/toontown/hood/CogHood.py @@ -1,8 +1,9 @@ from direct.directnotify import DirectNotifyGlobal from direct.fsm import ClassicFSM, State -from direct.fsm import State + from . import Hood + class CogHood(Hood.Hood): notify = DirectNotifyGlobal.directNotify.newCategory('CogHood') diff --git a/toontown/hood/DDHood.py b/toontown/hood/DDHood.py index 473ec8d..530afeb 100644 --- a/toontown/hood/DDHood.py +++ b/toontown/hood/DDHood.py @@ -1,8 +1,11 @@ from panda3d.core import * -from . import ToonHood -from toontown.town import DDTownLoader + from toontown.safezone import DDSafeZoneLoader from toontown.toonbase.ToontownGlobals import * +from toontown.town import DDTownLoader + +from . import ToonHood + class DDHood(ToonHood.ToonHood): diff --git a/toontown/hood/DDHoodDataAI.py b/toontown/hood/DDHoodDataAI.py index 23b83c6..ecc04b8 100644 --- a/toontown/hood/DDHoodDataAI.py +++ b/toontown/hood/DDHoodDataAI.py @@ -1,10 +1,11 @@ from direct.directnotify import DirectNotifyGlobal -from . import HoodDataAI -from toontown.toonbase import ToontownGlobals -from toontown.safezone import DistributedTrolleyAI -from toontown.safezone import DDTreasurePlannerAI -from toontown.safezone import DistributedBoatAI + from toontown.classicchars import DistributedDonaldDockAI +from toontown.safezone import DDTreasurePlannerAI, DistributedBoatAI, DistributedTrolleyAI +from toontown.toonbase import ToontownGlobals + +from . import HoodDataAI + class DDHoodDataAI(HoodDataAI.HoodDataAI): notify = DirectNotifyGlobal.directNotify.newCategory('DDHoodDataAI') diff --git a/toontown/hood/DGHood.py b/toontown/hood/DGHood.py index 08cf157..bcb0c0a 100644 --- a/toontown/hood/DGHood.py +++ b/toontown/hood/DGHood.py @@ -1,9 +1,11 @@ from panda3d.core import * -from . import ToonHood -from toontown.town import DGTownLoader + from toontown.safezone import DGSafeZoneLoader from toontown.toonbase.ToontownGlobals import * -from . import SkyUtil +from toontown.town import DGTownLoader + +from . import SkyUtil, ToonHood + class DGHood(ToonHood.ToonHood): diff --git a/toontown/hood/DGHoodDataAI.py b/toontown/hood/DGHoodDataAI.py index 771e3ca..bc8af7a 100644 --- a/toontown/hood/DGHoodDataAI.py +++ b/toontown/hood/DGHoodDataAI.py @@ -1,12 +1,11 @@ from direct.directnotify import DirectNotifyGlobal -from . import HoodDataAI + +from toontown.classicchars import DistributedDaisyAI, DistributedGoofyAI +from toontown.safezone import ButterflyGlobals, DGTreasurePlannerAI, DistributedDGFlowerAI, DistributedTrolleyAI from toontown.toonbase import ToontownGlobals -from toontown.safezone import DistributedTrolleyAI -from toontown.safezone import DGTreasurePlannerAI -from toontown.classicchars import DistributedGoofyAI -from toontown.classicchars import DistributedDaisyAI -from toontown.safezone import DistributedDGFlowerAI -from toontown.safezone import ButterflyGlobals + +from . import HoodDataAI + class DGHoodDataAI(HoodDataAI.HoodDataAI): notify = DirectNotifyGlobal.directNotify.newCategory('DGHoodDataAI') diff --git a/toontown/hood/DLHood.py b/toontown/hood/DLHood.py index b76ae44..89d9092 100644 --- a/toontown/hood/DLHood.py +++ b/toontown/hood/DLHood.py @@ -1,8 +1,11 @@ from panda3d.core import * -from . import ToonHood -from toontown.town import DLTownLoader + from toontown.safezone import DLSafeZoneLoader from toontown.toonbase.ToontownGlobals import * +from toontown.town import DLTownLoader + +from . import ToonHood + class DLHood(ToonHood.ToonHood): diff --git a/toontown/hood/DLHoodDataAI.py b/toontown/hood/DLHoodDataAI.py index eed8d9b..705e3d7 100644 --- a/toontown/hood/DLHoodDataAI.py +++ b/toontown/hood/DLHoodDataAI.py @@ -1,10 +1,11 @@ from direct.directnotify import DirectNotifyGlobal -from . import HoodDataAI -from toontown.toonbase import ToontownGlobals -from toontown.safezone import DistributedTrolleyAI -from toontown.safezone import DLTreasurePlannerAI + from toontown.classicchars import DistributedDonaldAI -from toontown.safezone import ButterflyGlobals +from toontown.safezone import ButterflyGlobals, DistributedTrolleyAI, DLTreasurePlannerAI +from toontown.toonbase import ToontownGlobals + +from . import HoodDataAI + class DLHoodDataAI(HoodDataAI.HoodDataAI): notify = DirectNotifyGlobal.directNotify.newCategory('DLHoodDataAI') diff --git a/toontown/hood/EstateHood.py b/toontown/hood/EstateHood.py index cc147b3..331feb2 100644 --- a/toontown/hood/EstateHood.py +++ b/toontown/hood/EstateHood.py @@ -1,18 +1,19 @@ from panda3d.core import * -from toontown.toonbase.ToonBaseGlobal import * -from toontown.toonbase.ToontownGlobals import * -from toontown.distributed.ToontownMsgTypes import * + from direct.directnotify import DirectNotifyGlobal from direct.fsm import ClassicFSM, State -from direct.fsm import State -from toontown.minigame import Purchase -from otp.avatar import DistributedAvatar -from . import SkyUtil from direct.task.Task import Task -from . import Hood -from toontown.estate import EstateLoader -from toontown.estate import HouseGlobals -from . import ZoneUtil + +from otp.avatar import DistributedAvatar + +from toontown.distributed.ToontownMsgTypes import * +from toontown.estate import EstateLoader, HouseGlobals +from toontown.minigame import Purchase +from toontown.toonbase.ToonBaseGlobal import * +from toontown.toonbase.ToontownGlobals import * + +from . import Hood, SkyUtil, ZoneUtil + class EstateHood(Hood.Hood): notify = DirectNotifyGlobal.directNotify.newCategory('EstateHood') diff --git a/toontown/hood/FishAnimatedProp.py b/toontown/hood/FishAnimatedProp.py index edd8e82..f8785a6 100644 --- a/toontown/hood/FishAnimatedProp.py +++ b/toontown/hood/FishAnimatedProp.py @@ -1,9 +1,13 @@ -from . import AnimatedProp +import random + from direct.actor import Actor from direct.interval.IntervalGlobal import * -from toontown.effects.Splash import * + from toontown.effects.Ripples import * -import random +from toontown.effects.Splash import * + +from . import AnimatedProp + class FishAnimatedProp(AnimatedProp.AnimatedProp): diff --git a/toontown/hood/GSHood.py b/toontown/hood/GSHood.py index 9d046a3..01d98e2 100644 --- a/toontown/hood/GSHood.py +++ b/toontown/hood/GSHood.py @@ -1,9 +1,11 @@ from panda3d.core import * -from . import ToonHood + +from toontown.racing import DistributedVehicle from toontown.safezone import GSSafeZoneLoader from toontown.toonbase.ToontownGlobals import * -from toontown.racing import DistributedVehicle -from . import SkyUtil + +from . import SkyUtil, ToonHood + class GSHood(ToonHood.ToonHood): diff --git a/toontown/hood/GSHoodDataAI.py b/toontown/hood/GSHoodDataAI.py index 4e126a4..8a34668 100644 --- a/toontown/hood/GSHoodDataAI.py +++ b/toontown/hood/GSHoodDataAI.py @@ -1,11 +1,15 @@ -from direct.directnotify import DirectNotifyGlobal -from . import HoodDataAI, ZoneUtil -from toontown.toonbase import ToontownGlobals -from toontown.racing import DistributedStartingBlockAI from panda3d.core import * from panda3d.toontown import * -from toontown.racing.RaceGlobals import * + +from direct.directnotify import DirectNotifyGlobal + from toontown.classicchars import DistributedGoofySpeedwayAI +from toontown.racing import DistributedStartingBlockAI +from toontown.racing.RaceGlobals import * +from toontown.toonbase import ToontownGlobals + +from . import HoodDataAI, ZoneUtil + if __debug__: import pdb diff --git a/toontown/hood/GZHood.py b/toontown/hood/GZHood.py index a6bc6eb..8fcc302 100644 --- a/toontown/hood/GZHood.py +++ b/toontown/hood/GZHood.py @@ -1,9 +1,11 @@ from panda3d.core import * -from . import ToonHood + +from toontown.racing import DistributedVehicle from toontown.safezone import GZSafeZoneLoader from toontown.toonbase.ToontownGlobals import * -from toontown.racing import DistributedVehicle -from . import SkyUtil + +from . import SkyUtil, ToonHood + class GZHood(ToonHood.ToonHood): diff --git a/toontown/hood/GZHoodDataAI.py b/toontown/hood/GZHoodDataAI.py index e3f55cc..7a60791 100644 --- a/toontown/hood/GZHoodDataAI.py +++ b/toontown/hood/GZHoodDataAI.py @@ -1,12 +1,16 @@ -from direct.directnotify import DirectNotifyGlobal -from . import HoodDataAI, ZoneUtil -from toontown.toonbase import ToontownGlobals -from toontown.racing import DistributedStartingBlockAI from panda3d.core import * from panda3d.toontown import * -from toontown.racing.RaceGlobals import * + +from direct.directnotify import DirectNotifyGlobal + from toontown.classicchars import DistributedGoofySpeedwayAI +from toontown.racing import DistributedStartingBlockAI +from toontown.racing.RaceGlobals import * from toontown.safezone import DistributedGolfKartAI +from toontown.toonbase import ToontownGlobals + +from . import HoodDataAI, ZoneUtil + if __debug__: import pdb diff --git a/toontown/hood/GenericAnimatedBuilding.py b/toontown/hood/GenericAnimatedBuilding.py index 1390a75..22ce97b 100644 --- a/toontown/hood/GenericAnimatedBuilding.py +++ b/toontown/hood/GenericAnimatedBuilding.py @@ -1,5 +1,6 @@ from toontown.hood import GenericAnimatedProp + class GenericAnimatedBuilding(GenericAnimatedProp.GenericAnimatedProp): def __init__(self, node): diff --git a/toontown/hood/GenericAnimatedProp.py b/toontown/hood/GenericAnimatedProp.py index 014b4af..aa8c663 100644 --- a/toontown/hood/GenericAnimatedProp.py +++ b/toontown/hood/GenericAnimatedProp.py @@ -1,10 +1,12 @@ -from . import AnimatedProp from direct.actor import Actor -from direct.interval.IntervalGlobal import * from direct.directnotify import DirectNotifyGlobal +from direct.interval.IntervalGlobal import * + +from toontown.hood import HoodUtil, ZoneUtil from toontown.toonbase import ToontownGlobals -from toontown.hood import ZoneUtil -from toontown.hood import HoodUtil + +from . import AnimatedProp + class GenericAnimatedProp(AnimatedProp.AnimatedProp): notify = DirectNotifyGlobal.directNotify.newCategory('GenericAnimatedProp') diff --git a/toontown/hood/HQPeriscopeAnimatedProp.py b/toontown/hood/HQPeriscopeAnimatedProp.py index a861b8b..177712c 100644 --- a/toontown/hood/HQPeriscopeAnimatedProp.py +++ b/toontown/hood/HQPeriscopeAnimatedProp.py @@ -1,7 +1,9 @@ -from . import AnimatedProp from direct.actor import Actor from direct.interval.IntervalGlobal import * +from . import AnimatedProp + + class HQPeriscopeAnimatedProp(AnimatedProp.AnimatedProp): def __init__(self, node): diff --git a/toontown/hood/HQTelescopeAnimatedProp.py b/toontown/hood/HQTelescopeAnimatedProp.py index 69b2505..05be033 100644 --- a/toontown/hood/HQTelescopeAnimatedProp.py +++ b/toontown/hood/HQTelescopeAnimatedProp.py @@ -1,7 +1,9 @@ -from . import AnimatedProp from direct.actor import Actor from direct.interval.IntervalGlobal import * +from . import AnimatedProp + + class HQTelescopeAnimatedProp(AnimatedProp.AnimatedProp): def __init__(self, node): diff --git a/toontown/hood/Hood.py b/toontown/hood/Hood.py index 3bd164c..d4536fb 100644 --- a/toontown/hood/Hood.py +++ b/toontown/hood/Hood.py @@ -1,16 +1,9 @@ -from panda3d.core import ( - CompassEffect, - ModelPool, - NodePath, - TexturePool, - TransparencyAttrib, - Vec4 -) +from panda3d.core import CompassEffect, ModelPool, NodePath, TexturePool, TransparencyAttrib, Vec4 from direct.directnotify.DirectNotifyGlobal import directNotify from direct.fsm.StateData import StateData from direct.gui.OnscreenText import OnscreenText -from direct.interval.IntervalGlobal import Sequence, Wait, Func +from direct.interval.IntervalGlobal import Func, Sequence, Wait from direct.showbase.MessengerGlobal import messenger from direct.showbase.PythonUtil import uniqueName from direct.task.TaskManagerGlobal import taskMgr @@ -18,8 +11,7 @@ from direct.task.TaskManagerGlobal import taskMgr from toontown.hood import ZoneUtil from toontown.hood.QuietZoneState import QuietZoneState from toontown.toon.Toon import teleportDebug -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import TTLocalizer +from toontown.toonbase import ToontownGlobals, TTLocalizer from toontown.toonbase.ToonBaseGlobal import base diff --git a/toontown/hood/HoodDataAI.py b/toontown/hood/HoodDataAI.py index 5b8cfb2..707f5cc 100644 --- a/toontown/hood/HoodDataAI.py +++ b/toontown/hood/HoodDataAI.py @@ -1,13 +1,16 @@ -from direct.directnotify import DirectNotifyGlobal -from . import ZoneUtil -from toontown.building import DistributedBuildingMgrAI -from toontown.suit import DistributedSuitPlannerAI -from toontown.safezone import ButterflyGlobals -from toontown.safezone import DistributedButterflyAI from panda3d.core import * from panda3d.toontown import * + +from direct.directnotify import DirectNotifyGlobal + +from toontown.building import DistributedBuildingMgrAI +from toontown.safezone import ButterflyGlobals, DistributedButterflyAI +from toontown.suit import DistributedSuitPlannerAI from toontown.toon import NPCToons +from . import ZoneUtil + + class HoodDataAI: notify = DirectNotifyGlobal.directNotify.newCategory('HoodDataAI') diff --git a/toontown/hood/HoodUtil.py b/toontown/hood/HoodUtil.py index f66b06c..f92e2d2 100644 --- a/toontown/hood/HoodUtil.py +++ b/toontown/hood/HoodUtil.py @@ -1,5 +1,6 @@ from toontown.toonbase import ToontownGlobals + def calcPropType(node): propType = ToontownGlobals.AnimPropTypes.Unknown fullString = str(node) diff --git a/toontown/hood/HydrantInteractiveProp.py b/toontown/hood/HydrantInteractiveProp.py index e612b6a..cb0ab00 100644 --- a/toontown/hood/HydrantInteractiveProp.py +++ b/toontown/hood/HydrantInteractiveProp.py @@ -1,9 +1,10 @@ from direct.actor import Actor from direct.directnotify import DirectNotifyGlobal -from direct.interval.IntervalGlobal import Sequence, Func -from toontown.hood import InteractiveAnimatedProp -from toontown.hood import GenericAnimatedProp -from toontown.toonbase import ToontownGlobals, ToontownBattleGlobals, TTLocalizer +from direct.interval.IntervalGlobal import Func, Sequence + +from toontown.hood import GenericAnimatedProp, InteractiveAnimatedProp +from toontown.toonbase import ToontownBattleGlobals, ToontownGlobals, TTLocalizer + class HydrantInteractiveProp(InteractiveAnimatedProp.InteractiveAnimatedProp): notify = DirectNotifyGlobal.directNotify.newCategory('HydrantInteractiveProp') diff --git a/toontown/hood/HydrantOneAnimatedProp.py b/toontown/hood/HydrantOneAnimatedProp.py index 71f2bdd..56e2b59 100644 --- a/toontown/hood/HydrantOneAnimatedProp.py +++ b/toontown/hood/HydrantOneAnimatedProp.py @@ -1,6 +1,8 @@ +from direct.directnotify import DirectNotifyGlobal + from toontown.hood import ZeroAnimatedProp from toontown.toonbase import ToontownGlobals -from direct.directnotify import DirectNotifyGlobal + class HydrantOneAnimatedProp(ZeroAnimatedProp.ZeroAnimatedProp): notify = DirectNotifyGlobal.directNotify.newCategory('HydrantOneAnimatedProp') diff --git a/toontown/hood/HydrantTwoAnimatedProp.py b/toontown/hood/HydrantTwoAnimatedProp.py index c94435e..a731eeb 100644 --- a/toontown/hood/HydrantTwoAnimatedProp.py +++ b/toontown/hood/HydrantTwoAnimatedProp.py @@ -1,6 +1,8 @@ +from direct.directnotify import DirectNotifyGlobal + from toontown.hood import ZeroAnimatedProp from toontown.toonbase import ToontownGlobals -from direct.directnotify import DirectNotifyGlobal + class HydrantTwoAnimatedProp(ZeroAnimatedProp.ZeroAnimatedProp): notify = DirectNotifyGlobal.directNotify.newCategory('HydrantTwoAnimatedProp') diff --git a/toontown/hood/HydrantZeroAnimatedProp.py b/toontown/hood/HydrantZeroAnimatedProp.py index 98249ad..b012c59 100644 --- a/toontown/hood/HydrantZeroAnimatedProp.py +++ b/toontown/hood/HydrantZeroAnimatedProp.py @@ -1,6 +1,8 @@ +from direct.directnotify import DirectNotifyGlobal + from toontown.hood import ZeroAnimatedProp from toontown.toonbase import ToontownGlobals -from direct.directnotify import DirectNotifyGlobal + class HydrantZeroAnimatedProp(ZeroAnimatedProp.ZeroAnimatedProp): notify = DirectNotifyGlobal.directNotify.newCategory('HydrantZeroAnimatedProp') diff --git a/toontown/hood/InteractiveAnimatedProp.py b/toontown/hood/InteractiveAnimatedProp.py index 4eb6bc7..32aced6 100644 --- a/toontown/hood/InteractiveAnimatedProp.py +++ b/toontown/hood/InteractiveAnimatedProp.py @@ -1,13 +1,18 @@ import math import random -from . import GenericAnimatedProp -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 panda3d.core import TextNode, Vec3 -from toontown.toonbase import ToontownGlobals + +from direct.actor import Actor +from direct.fsm import FSM +from direct.interval.IntervalGlobal import ActorInterval, Func, Parallel, Sequence, SoundInterval, Wait +from direct.showbase.PythonUtil import weightedChoice + from toontown.hood import ZoneUtil +from toontown.toonbase import ToontownGlobals + +from . import GenericAnimatedProp + def clearPythonIvals(ival): if hasattr(ival, 'function'): diff --git a/toontown/hood/LawbotHQ.py b/toontown/hood/LawbotHQ.py index 80d3ac2..7bef1a8 100644 --- a/toontown/hood/LawbotHQ.py +++ b/toontown/hood/LawbotHQ.py @@ -1,6 +1,8 @@ -from . import CogHood -from toontown.toonbase import ToontownGlobals from toontown.coghq import LawbotCogHQLoader +from toontown.toonbase import ToontownGlobals + +from . import CogHood + class LawbotHQ(CogHood.CogHood): diff --git a/toontown/hood/LawbotHQDataAI.py b/toontown/hood/LawbotHQDataAI.py index f642dd3..f0dfa28 100644 --- a/toontown/hood/LawbotHQDataAI.py +++ b/toontown/hood/LawbotHQDataAI.py @@ -1,16 +1,13 @@ from direct.directnotify import DirectNotifyGlobal -from . import HoodDataAI -from toontown.toonbase import ToontownGlobals -from toontown.coghq import DistributedLawOfficeElevatorExtAI -from toontown.coghq import DistributedCogHQDoorAI -from toontown.building import DistributedDoorAI -from toontown.building import DoorTypes -from toontown.coghq import LobbyManagerAI -from toontown.building import DistributedBossElevatorAI + +from toontown.building import (DistributedBoardingPartyAI, DistributedBossElevatorAI, DistributedCJElevatorAI, + DistributedDoorAI, DoorTypes, FADoorCodes) +from toontown.coghq import DistributedCogHQDoorAI, DistributedLawOfficeElevatorExtAI, LobbyManagerAI from toontown.suit import DistributedLawbotBossAI -from toontown.building import DistributedCJElevatorAI -from toontown.building import FADoorCodes -from toontown.building import DistributedBoardingPartyAI +from toontown.toonbase import ToontownGlobals + +from . import HoodDataAI + class LawbotHQDataAI(HoodDataAI.HoodDataAI): notify = DirectNotifyGlobal.directNotify.newCategory('LawbotHQDataAI') diff --git a/toontown/hood/MMHood.py b/toontown/hood/MMHood.py index 4b31a1b..ce207c4 100644 --- a/toontown/hood/MMHood.py +++ b/toontown/hood/MMHood.py @@ -1,8 +1,11 @@ from panda3d.core import * -from . import ToonHood -from toontown.town import MMTownLoader + from toontown.safezone import MMSafeZoneLoader from toontown.toonbase.ToontownGlobals import * +from toontown.town import MMTownLoader + +from . import ToonHood + class MMHood(ToonHood.ToonHood): diff --git a/toontown/hood/MMHoodDataAI.py b/toontown/hood/MMHoodDataAI.py index 483cf49..5f06a5f 100644 --- a/toontown/hood/MMHoodDataAI.py +++ b/toontown/hood/MMHoodDataAI.py @@ -1,10 +1,11 @@ from direct.directnotify import DirectNotifyGlobal -from . import HoodDataAI -from toontown.toonbase import ToontownGlobals -from toontown.safezone import DistributedTrolleyAI -from toontown.safezone import MMTreasurePlannerAI + from toontown.classicchars import DistributedMinnieAI -from toontown.safezone import DistributedMMPianoAI +from toontown.safezone import DistributedMMPianoAI, DistributedTrolleyAI, MMTreasurePlannerAI +from toontown.toonbase import ToontownGlobals + +from . import HoodDataAI + class MMHoodDataAI(HoodDataAI.HoodDataAI): notify = DirectNotifyGlobal.directNotify.newCategory('MMHoodDataAI') diff --git a/toontown/hood/MailboxInteractiveProp.py b/toontown/hood/MailboxInteractiveProp.py index 7d6bd11..5f3bc36 100644 --- a/toontown/hood/MailboxInteractiveProp.py +++ b/toontown/hood/MailboxInteractiveProp.py @@ -1,9 +1,10 @@ from direct.actor import Actor from direct.directnotify import DirectNotifyGlobal -from direct.interval.IntervalGlobal import Sequence, Func -from toontown.hood import InteractiveAnimatedProp -from toontown.hood import GenericAnimatedProp -from toontown.toonbase import ToontownGlobals, ToontownBattleGlobals, TTLocalizer +from direct.interval.IntervalGlobal import Func, Sequence + +from toontown.hood import GenericAnimatedProp, InteractiveAnimatedProp +from toontown.toonbase import ToontownBattleGlobals, ToontownGlobals, TTLocalizer + class MailboxInteractiveProp(InteractiveAnimatedProp.InteractiveAnimatedProp): notify = DirectNotifyGlobal.directNotify.newCategory('MailboxInteractiveProp') diff --git a/toontown/hood/MailboxOneAnimatedProp.py b/toontown/hood/MailboxOneAnimatedProp.py index 26ca187..47314be 100644 --- a/toontown/hood/MailboxOneAnimatedProp.py +++ b/toontown/hood/MailboxOneAnimatedProp.py @@ -1,6 +1,8 @@ +from direct.directnotify import DirectNotifyGlobal + from toontown.hood import ZeroAnimatedProp from toontown.toonbase import ToontownGlobals -from direct.directnotify import DirectNotifyGlobal + class MailboxOneAnimatedProp(ZeroAnimatedProp.ZeroAnimatedProp): notify = DirectNotifyGlobal.directNotify.newCategory('MailboxOneAnimatedProp') diff --git a/toontown/hood/MailboxTwoAnimatedProp.py b/toontown/hood/MailboxTwoAnimatedProp.py index 8c2472a..5183f25 100644 --- a/toontown/hood/MailboxTwoAnimatedProp.py +++ b/toontown/hood/MailboxTwoAnimatedProp.py @@ -1,6 +1,8 @@ +from direct.directnotify import DirectNotifyGlobal + from toontown.hood import ZeroAnimatedProp from toontown.toonbase import ToontownGlobals -from direct.directnotify import DirectNotifyGlobal + class MailboxTwoAnimatedProp(ZeroAnimatedProp.ZeroAnimatedProp): notify = DirectNotifyGlobal.directNotify.newCategory('MailboxTwoAnimatedProp') diff --git a/toontown/hood/MailboxZeroAnimatedProp.py b/toontown/hood/MailboxZeroAnimatedProp.py index 2ccdf35..3f7c4fe 100644 --- a/toontown/hood/MailboxZeroAnimatedProp.py +++ b/toontown/hood/MailboxZeroAnimatedProp.py @@ -1,6 +1,8 @@ +from direct.directnotify import DirectNotifyGlobal + from toontown.hood import ZeroAnimatedProp from toontown.toonbase import ToontownGlobals -from direct.directnotify import DirectNotifyGlobal + class MailboxZeroAnimatedProp(ZeroAnimatedProp.ZeroAnimatedProp): notify = DirectNotifyGlobal.directNotify.newCategory('MailboxZeroAnimatedProp') diff --git a/toontown/hood/OZHood.py b/toontown/hood/OZHood.py index 82f42f9..daacafb 100644 --- a/toontown/hood/OZHood.py +++ b/toontown/hood/OZHood.py @@ -1,9 +1,11 @@ from panda3d.core import * -from . import ToonHood + +from toontown.racing import DistributedVehicle from toontown.safezone import OZSafeZoneLoader from toontown.toonbase.ToontownGlobals import * -from toontown.racing import DistributedVehicle -from . import SkyUtil + +from . import SkyUtil, ToonHood + class OZHood(ToonHood.ToonHood): diff --git a/toontown/hood/OZHoodDataAI.py b/toontown/hood/OZHoodDataAI.py index 6d226bb..cd1d5bf 100644 --- a/toontown/hood/OZHoodDataAI.py +++ b/toontown/hood/OZHoodDataAI.py @@ -1,19 +1,18 @@ -from direct.directnotify import DirectNotifyGlobal -from . import HoodDataAI, ZoneUtil -from toontown.toonbase import ToontownGlobals -from toontown.safezone import OZTreasurePlannerAI -from toontown.racing import DistributedStartingBlockAI from panda3d.core import * from panda3d.toontown import * -from toontown.racing.RaceGlobals import * -from toontown.classicchars import DistributedGoofySpeedwayAI -from toontown.safezone import DistributedPicnicBasketAI -from toontown.classicchars import DistributedChipAI -from toontown.classicchars import DistributedDaleAI + +from direct.directnotify import DirectNotifyGlobal + +from toontown.classicchars import DistributedChipAI, DistributedDaleAI, DistributedGoofySpeedwayAI from toontown.distributed import DistributedTimerAI -from toontown.safezone import DistributedPicnicTableAI -from toontown.safezone import DistributedChineseCheckersAI -from toontown.safezone import DistributedCheckersAI +from toontown.racing import DistributedStartingBlockAI +from toontown.racing.RaceGlobals import * +from toontown.safezone import (DistributedCheckersAI, DistributedChineseCheckersAI, DistributedPicnicBasketAI, + DistributedPicnicTableAI, OZTreasurePlannerAI) +from toontown.toonbase import ToontownGlobals + +from . import HoodDataAI, ZoneUtil + if __debug__: import pdb diff --git a/toontown/hood/PartyHood.py b/toontown/hood/PartyHood.py index 7b3887c..fca22a1 100644 --- a/toontown/hood/PartyHood.py +++ b/toontown/hood/PartyHood.py @@ -1,17 +1,18 @@ +from panda3d.core import * + from direct.directnotify import DirectNotifyGlobal from direct.fsm import ClassicFSM, State from direct.task.Task import Task -from panda3d.core import * + from otp.avatar import DistributedAvatar + +from toontown.distributed.ToontownMsgTypes import * +from toontown.hood import Hood, SkyUtil, ZoneUtil +from toontown.minigame import Purchase +from toontown.parties import PartyGlobals, PartyLoader from toontown.toonbase.ToonBaseGlobal import * from toontown.toonbase.ToontownGlobals import * -from toontown.distributed.ToontownMsgTypes import * -from toontown.minigame import Purchase -from toontown.parties import PartyLoader -from toontown.parties import PartyGlobals -from toontown.hood import SkyUtil -from toontown.hood import Hood -from toontown.hood import ZoneUtil + class PartyHood(Hood.Hood): notify = DirectNotifyGlobal.directNotify.newCategory('PartyHood') diff --git a/toontown/hood/PetShopFishAnimatedProp.py b/toontown/hood/PetShopFishAnimatedProp.py index ffe7d4e..603fde0 100644 --- a/toontown/hood/PetShopFishAnimatedProp.py +++ b/toontown/hood/PetShopFishAnimatedProp.py @@ -1,7 +1,9 @@ -from . import AnimatedProp from direct.actor import Actor from direct.interval.IntervalGlobal import * +from . import AnimatedProp + + class PetShopFishAnimatedProp(AnimatedProp.AnimatedProp): def __init__(self, node): diff --git a/toontown/hood/Place.py b/toontown/hood/Place.py index fa346a2..2e395d3 100644 --- a/toontown/hood/Place.py +++ b/toontown/hood/Place.py @@ -20,8 +20,7 @@ from toontown.hood.TrialerForceAcknowledge import TrialerForceAcknowledge from toontown.launcher.DownloadForceAcknowledge import DownloadForceAcknowledge from toontown.safezone.PublicWalk import PublicWalk from toontown.toon.Toon import teleportDebug -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import TTLocalizer +from toontown.toonbase import ToontownGlobals, TTLocalizer from toontown.toonbase.ToonBaseGlobal import base diff --git a/toontown/hood/QuietZoneState.py b/toontown/hood/QuietZoneState.py index 6dd1f3a..7694e69 100644 --- a/toontown/hood/QuietZoneState.py +++ b/toontown/hood/QuietZoneState.py @@ -1,16 +1,19 @@ from panda3d.core import * from panda3d.toontown import * + +from direct.directnotify import DirectNotifyGlobal +from direct.fsm import ClassicFSM, State, StateData from direct.showbase.PythonUtil import Functor, PriorityCallbacks from direct.task import Task + +from otp.otpbase import OTPGlobals + from toontown.distributed.ToontownMsgTypes import * from toontown.toonbase import ToontownGlobals -from otp.otpbase import OTPGlobals -from direct.directnotify import DirectNotifyGlobal -from direct.fsm import StateData -from direct.fsm import ClassicFSM, State -from direct.fsm import State + from . import ZoneUtil + class QuietZoneState(StateData.StateData): notify = DirectNotifyGlobal.directNotify.newCategory('QuietZoneState') Disable = False @@ -307,7 +310,7 @@ class QuietZoneState(StateData.StateData): base.cr.sendSetZoneMsg(zoneId) self.waitForDatabase('WaitForSetZoneResponse') self.fsm.request('waitForSetZoneComplete') - + if __astron__: def getStreetViszones(self, zoneId): visZones = [ZoneUtil.getBranchZone(zoneId)] @@ -316,14 +319,14 @@ class QuietZoneState(StateData.StateData): visZones += [loader.node2zone[x] for x in loader.nodeDict[zoneId]] self.notify.debug(f'getStreetViszones(zoneId={zoneId}): returning visZones: {visZones}') return visZones - + def getCogHQViszones(self, zoneId): loader = base.cr.playGame.hood.loader if zoneId in (ToontownGlobals.LawbotOfficeExt, ToontownGlobals.BossbotHQ): # There are no viszones for these zones, just return an empty list. return [] - + # First, we need to load the DNA file for this Cog HQ. dnaStore = DNAStorage() dnaFileName = loader.genDNAFileName(zoneId) @@ -342,7 +345,7 @@ class QuietZoneState(StateData.StateData): # Now we'll store it in the loader since we need them when we enter a Cog battle. loader.zoneVisDict[visZoneId] = visibles - + # Finally, we want interest in all visgroups due to this being a Cog HQ. visZones = list(loader.zoneVisDict.values())[0] self.notify.debug(f'getCogHQViszones(zoneId={zoneId}): returning visZones: {visZones}') diff --git a/toontown/hood/SellbotHQ.py b/toontown/hood/SellbotHQ.py index efc9f7d..3b05629 100644 --- a/toontown/hood/SellbotHQ.py +++ b/toontown/hood/SellbotHQ.py @@ -1,6 +1,8 @@ -from . import CogHood -from toontown.toonbase import ToontownGlobals from toontown.coghq import SellbotCogHQLoader +from toontown.toonbase import ToontownGlobals + +from . import CogHood + class SellbotHQ(CogHood.CogHood): diff --git a/toontown/hood/SkyUtil.py b/toontown/hood/SkyUtil.py index bb17088..91f687d 100644 --- a/toontown/hood/SkyUtil.py +++ b/toontown/hood/SkyUtil.py @@ -1,7 +1,10 @@ from panda3d.core import * -from toontown.toonbase.ToontownGlobals import * -from direct.task.Task import Task + from direct.directnotify import DirectNotifyGlobal +from direct.task.Task import Task + +from toontown.toonbase.ToontownGlobals import * + notify = DirectNotifyGlobal.directNotify.newCategory('SkyUtil') def cloudSkyTrack(task): diff --git a/toontown/hood/SleepingHydrantAnimatedProp.py b/toontown/hood/SleepingHydrantAnimatedProp.py index 0a4b1cd..c7ba777 100644 --- a/toontown/hood/SleepingHydrantAnimatedProp.py +++ b/toontown/hood/SleepingHydrantAnimatedProp.py @@ -1,7 +1,10 @@ -from . import AnimatedProp +import math + from direct.interval.IntervalGlobal import * from direct.task import Task -import math + +from . import AnimatedProp + class SleepingHydrantAnimatedProp(AnimatedProp.AnimatedProp): diff --git a/toontown/hood/StreetSign.py b/toontown/hood/StreetSign.py index 6f2a949..f86186c 100644 --- a/toontown/hood/StreetSign.py +++ b/toontown/hood/StreetSign.py @@ -1,8 +1,11 @@ import datetime + from panda3d.core import * + from direct.directnotify import DirectNotifyGlobal from direct.distributed import DistributedObject + class StreetSign(DistributedObject.DistributedObject): RedownloadTaskName = 'RedownloadStreetSign' StreetSignFileName = config.GetString('street-sign-filename', 'texture.png') diff --git a/toontown/hood/TTHood.py b/toontown/hood/TTHood.py index 7571370..e910717 100644 --- a/toontown/hood/TTHood.py +++ b/toontown/hood/TTHood.py @@ -1,11 +1,14 @@ from panda3d.core import * + +from direct.directnotify import DirectNotifyGlobal from direct.interval.IntervalGlobal import * -from . import ToonHood -from toontown.town import TTTownLoader + from toontown.safezone import TTSafeZoneLoader from toontown.toonbase.ToontownGlobals import * -from . import SkyUtil -from direct.directnotify import DirectNotifyGlobal +from toontown.town import TTTownLoader + +from . import SkyUtil, ToonHood + class TTHood(ToonHood.ToonHood): notify = DirectNotifyGlobal.directNotify.newCategory('TTHood') diff --git a/toontown/hood/TTHoodDataAI.py b/toontown/hood/TTHoodDataAI.py index 6a3b6b7..47aa34e 100644 --- a/toontown/hood/TTHoodDataAI.py +++ b/toontown/hood/TTHoodDataAI.py @@ -1,12 +1,13 @@ from direct.directnotify import DirectNotifyGlobal -from . import HoodDataAI -from toontown.toonbase import ToontownGlobals -from toontown.safezone import DistributedTrolleyAI -from toontown.safezone import TTTreasurePlannerAI -from toontown.classicchars import DistributedMickeyAI -from toontown.safezone import ButterflyGlobals from direct.task import Task +from toontown.classicchars import DistributedMickeyAI +from toontown.safezone import ButterflyGlobals, DistributedTrolleyAI, TTTreasurePlannerAI +from toontown.toonbase import ToontownGlobals + +from . import HoodDataAI + + class TTHoodDataAI(HoodDataAI.HoodDataAI): notify = DirectNotifyGlobal.directNotify.newCategory('TTHoodDataAI') diff --git a/toontown/hood/ToonHood.py b/toontown/hood/ToonHood.py index 48766d4..c3032ff 100644 --- a/toontown/hood/ToonHood.py +++ b/toontown/hood/ToonHood.py @@ -1,16 +1,20 @@ from panda3d.core import * -from toontown.toonbase.ToonBaseGlobal import * -from toontown.toonbase.ToontownGlobals import * -from toontown.distributed.ToontownMsgTypes import * + from direct.directnotify import DirectNotifyGlobal from direct.fsm import ClassicFSM, State -from direct.fsm import State -from toontown.minigame import Purchase + from otp.avatar import DistributedAvatar -from . import Hood + from toontown.building import SuitInterior from toontown.cogdominium import CogdoInterior +from toontown.distributed.ToontownMsgTypes import * +from toontown.minigame import Purchase from toontown.toon.Toon import teleportDebug +from toontown.toonbase.ToonBaseGlobal import * +from toontown.toonbase.ToontownGlobals import * + +from . import Hood + class ToonHood(Hood.Hood): notify = DirectNotifyGlobal.directNotify.newCategory('ToonHood') diff --git a/toontown/hood/TrashcanInteractiveProp.py b/toontown/hood/TrashcanInteractiveProp.py index 36a726b..1c04461 100644 --- a/toontown/hood/TrashcanInteractiveProp.py +++ b/toontown/hood/TrashcanInteractiveProp.py @@ -1,8 +1,9 @@ from direct.actor import Actor from direct.directnotify import DirectNotifyGlobal -from toontown.hood import InteractiveAnimatedProp -from toontown.hood import GenericAnimatedProp -from toontown.toonbase import ToontownGlobals, ToontownBattleGlobals, TTLocalizer + +from toontown.hood import GenericAnimatedProp, InteractiveAnimatedProp +from toontown.toonbase import ToontownBattleGlobals, ToontownGlobals, TTLocalizer + class TrashcanInteractiveProp(InteractiveAnimatedProp.InteractiveAnimatedProp): notify = DirectNotifyGlobal.directNotify.newCategory('TrashcanInteractiveProp') diff --git a/toontown/hood/TrashcanOneAnimatedProp.py b/toontown/hood/TrashcanOneAnimatedProp.py index 68d4331..8552f40 100644 --- a/toontown/hood/TrashcanOneAnimatedProp.py +++ b/toontown/hood/TrashcanOneAnimatedProp.py @@ -1,6 +1,8 @@ +from direct.directnotify import DirectNotifyGlobal + from toontown.hood import ZeroAnimatedProp from toontown.toonbase import ToontownGlobals -from direct.directnotify import DirectNotifyGlobal + class TrashcanOneAnimatedProp(ZeroAnimatedProp.ZeroAnimatedProp): notify = DirectNotifyGlobal.directNotify.newCategory('TrashcanOneAnimatedProp') diff --git a/toontown/hood/TrashcanTwoAnimatedProp.py b/toontown/hood/TrashcanTwoAnimatedProp.py index f0b86ce..4b24a12 100644 --- a/toontown/hood/TrashcanTwoAnimatedProp.py +++ b/toontown/hood/TrashcanTwoAnimatedProp.py @@ -1,6 +1,8 @@ +from direct.directnotify import DirectNotifyGlobal + from toontown.hood import ZeroAnimatedProp from toontown.toonbase import ToontownGlobals -from direct.directnotify import DirectNotifyGlobal + class TrashcanTwoAnimatedProp(ZeroAnimatedProp.ZeroAnimatedProp): notify = DirectNotifyGlobal.directNotify.newCategory('TrashcanTwoAnimatedProp') diff --git a/toontown/hood/TrashcanZeroAnimatedProp.py b/toontown/hood/TrashcanZeroAnimatedProp.py index 7b432ad..2b569d7 100644 --- a/toontown/hood/TrashcanZeroAnimatedProp.py +++ b/toontown/hood/TrashcanZeroAnimatedProp.py @@ -1,6 +1,8 @@ +from direct.directnotify import DirectNotifyGlobal + from toontown.hood import ZeroAnimatedProp from toontown.toonbase import ToontownGlobals -from direct.directnotify import DirectNotifyGlobal + class TrashcanZeroAnimatedProp(ZeroAnimatedProp.ZeroAnimatedProp): notify = DirectNotifyGlobal.directNotify.newCategory('TrashcanZeroAnimatedProp') diff --git a/toontown/hood/TrialerForceAcknowledge.py b/toontown/hood/TrialerForceAcknowledge.py index df40ea1..913f9a8 100644 --- a/toontown/hood/TrialerForceAcknowledge.py +++ b/toontown/hood/TrialerForceAcknowledge.py @@ -1,9 +1,11 @@ from panda3d.core import * -from toontown.toonbase import TTLocalizer -from . import ZoneUtil -from toontown.toonbase import ToontownGlobals + +from toontown.toonbase import ToontownGlobals, TTLocalizer from toontown.toontowngui import TeaserPanel +from . import ZoneUtil + + class TrialerForceAcknowledge: def __init__(self, doneEvent): diff --git a/toontown/hood/TutorialHood.py b/toontown/hood/TutorialHood.py index c1efa91..c8d84dc 100644 --- a/toontown/hood/TutorialHood.py +++ b/toontown/hood/TutorialHood.py @@ -1,8 +1,10 @@ from panda3d.core import * -from . import ToonHood -from toontown.town import TutorialTownLoader + from toontown.toonbase.ToontownGlobals import * -from . import SkyUtil +from toontown.town import TutorialTownLoader + +from . import SkyUtil, ToonHood + class TutorialHood(ToonHood.ToonHood): diff --git a/toontown/hood/ZeroAnimatedProp.py b/toontown/hood/ZeroAnimatedProp.py index fa13688..6124652 100644 --- a/toontown/hood/ZeroAnimatedProp.py +++ b/toontown/hood/ZeroAnimatedProp.py @@ -1,13 +1,15 @@ -import types import math -from direct.interval.IntervalGlobal import Sequence, Wait, ActorInterval, Func, SoundInterval, Parallel -from direct.task import Task -from direct.fsm import FSM -from direct.showbase.PythonUtil import weightedChoice -from toontown.hood import GenericAnimatedProp -from toontown.hood import AnimatedProp -from toontown.toonbase import ToontownGlobals +import types + from direct.directnotify import DirectNotifyGlobal +from direct.fsm import FSM +from direct.interval.IntervalGlobal import ActorInterval, Func, Parallel, Sequence, SoundInterval, Wait +from direct.showbase.PythonUtil import weightedChoice +from direct.task import Task + +from toontown.hood import AnimatedProp, GenericAnimatedProp +from toontown.toonbase import ToontownGlobals + class ZeroAnimatedProp(GenericAnimatedProp.GenericAnimatedProp, FSM.FSM): notify = DirectNotifyGlobal.directNotify.newCategory('ZeroAnimatedProp') diff --git a/toontown/hood/ZoneUtil.py b/toontown/hood/ZoneUtil.py index de22d9b..76d294b 100644 --- a/toontown/hood/ZoneUtil.py +++ b/toontown/hood/ZoneUtil.py @@ -1,5 +1,7 @@ -from toontown.toonbase.ToontownGlobals import * from direct.directnotify import DirectNotifyGlobal + +from toontown.toonbase.ToontownGlobals import * + zoneUtilNotify = DirectNotifyGlobal.directNotify.newCategory('ZoneUtil') tutorialDict = None diff --git a/toontown/launcher/DownloadForceAcknowledge.py b/toontown/launcher/DownloadForceAcknowledge.py index 238034e..0580fd6 100644 --- a/toontown/launcher/DownloadForceAcknowledge.py +++ b/toontown/launcher/DownloadForceAcknowledge.py @@ -1,8 +1,11 @@ -from panda3d.core import * -from toontown.toontowngui import TTDialog -from toontown.toonbase import TTLocalizer import random +from panda3d.core import * + +from toontown.toonbase import TTLocalizer +from toontown.toontowngui import TTDialog + + class DownloadForceAcknowledge: def __init__(self, doneEvent): diff --git a/toontown/launcher/QuickLauncher.py b/toontown/launcher/QuickLauncher.py index 26087ab..089a2d8 100644 --- a/toontown/launcher/QuickLauncher.py +++ b/toontown/launcher/QuickLauncher.py @@ -1,9 +1,14 @@ import os -from direct.showbase.EventManagerGlobal import * + from panda3d.core import * + +from direct.showbase.EventManagerGlobal import * + from otp.launcher.LauncherBase import LauncherBase + from toontown.toonbase import TTLocalizer + class QuickLauncher(LauncherBase): GameName = 'Toontown' Localizer = TTLocalizer diff --git a/toontown/launcher/QuickStartLauncher.py b/toontown/launcher/QuickStartLauncher.py index f629cbc..5d70b3a 100644 --- a/toontown/launcher/QuickStartLauncher.py +++ b/toontown/launcher/QuickStartLauncher.py @@ -6,5 +6,6 @@ else: sys.path = [''] from toontown.launcher.QuickLauncher import QuickLauncher + launcher = QuickLauncher() launcher.notify.info('Reached end of StartQuickLauncher.py.') diff --git a/toontown/launcher/ToontownDownloadWatcher.py b/toontown/launcher/ToontownDownloadWatcher.py index bd9d57b..bec3555 100644 --- a/toontown/launcher/ToontownDownloadWatcher.py +++ b/toontown/launcher/ToontownDownloadWatcher.py @@ -1,7 +1,10 @@ from direct.directnotify import DirectNotifyGlobal + from otp.launcher.DownloadWatcher import DownloadWatcher + from toontown.toonbase import TTLocalizer + class ToontownDownloadWatcher(DownloadWatcher): notify = DirectNotifyGlobal.directNotify.newCategory('ToontownDownloadWatcher') diff --git a/toontown/launcher/ToontownDummyLauncher.py b/toontown/launcher/ToontownDummyLauncher.py index fc5d779..4c8375c 100644 --- a/toontown/launcher/ToontownDummyLauncher.py +++ b/toontown/launcher/ToontownDummyLauncher.py @@ -1,7 +1,10 @@ from direct.directnotify import DirectNotifyGlobal + from otp.launcher.DummyLauncherBase import DummyLauncherBase + from toontown.launcher.ToontownLauncher import ToontownLauncher + class ToontownDummyLauncher(DummyLauncherBase, ToontownLauncher): notify = DirectNotifyGlobal.directNotify.newCategory('ToontownDummyLauncher') diff --git a/toontown/launcher/ToontownLauncher.py b/toontown/launcher/ToontownLauncher.py index 4a5726a..97fb28a 100644 --- a/toontown/launcher/ToontownLauncher.py +++ b/toontown/launcher/ToontownLauncher.py @@ -36,11 +36,14 @@ if 1: print('sys.path = ', sys.path) print('sys.argv = ', sys.argv) +from panda3d.core import * + from otp.launcher.LauncherBase import LauncherBase from otp.otpbase import OTPLauncherGlobals -from panda3d.core import * + from toontown.toonbase import TTLocalizer + class ToontownLauncher(LauncherBase): GameName = 'Toontown' LauncherPhases = [3, 3.5, 4, 5, 5.5, 6, 7, 8, 9, 10, 11, 12, 13] diff --git a/toontown/login/AvatarChoice.py b/toontown/login/AvatarChoice.py index 4c418f5..6663112 100644 --- a/toontown/login/AvatarChoice.py +++ b/toontown/login/AvatarChoice.py @@ -1,13 +1,13 @@ from panda3d.core import * -from toontown.toonbase import ToontownGlobals -from direct.showbase import DirectObject -from toontown.toon import ToonDNA -from toontown.toon import ToonHead -from toontown.toontowngui import TTDialog -from direct.gui.DirectGui import * -from toontown.toonbase import TTLocalizer + from direct.directnotify import DirectNotifyGlobal -from toontown.toontowngui import TeaserPanel +from direct.gui.DirectGui import * +from direct.showbase import DirectObject + +from toontown.toon import ToonDNA, ToonHead +from toontown.toonbase import ToontownGlobals, TTLocalizer +from toontown.toontowngui import TeaserPanel, TTDialog + NAME_ROTATIONS = (7, -11, 1, -5, 3.5, -5) NAME_POSITIONS = ((0, 0, 0.26), (-0.03, 0, 0.25), diff --git a/toontown/login/AvatarChooser.py b/toontown/login/AvatarChooser.py index 5c21235..c9b1b1f 100644 --- a/toontown/login/AvatarChooser.py +++ b/toontown/login/AvatarChooser.py @@ -1,17 +1,17 @@ -from panda3d.core import * -from toontown.toonbase import ToontownGlobals -from . import AvatarChoice -from direct.fsm import StateData -from direct.fsm import ClassicFSM, State -from direct.fsm import State -from toontown.launcher import DownloadForceAcknowledge -from direct.gui.DirectGui import * -from panda3d.core import * -from toontown.toonbase import TTLocalizer -from toontown.toonbase import DisplayOptions -from direct.directnotify import DirectNotifyGlobal -from direct.interval.IntervalGlobal import * import random + +from panda3d.core import * + +from direct.directnotify import DirectNotifyGlobal +from direct.fsm import ClassicFSM, State, StateData +from direct.gui.DirectGui import * +from direct.interval.IntervalGlobal import * + +from toontown.launcher import DownloadForceAcknowledge +from toontown.toonbase import DisplayOptions, ToontownGlobals, TTLocalizer + +from . import AvatarChoice + MAX_AVATARS = 6 POSITIONS = (Vec3(-0.840167, 0, 0.359333), Vec3(0.00933349, 0, 0.306533), diff --git a/toontown/login/DateObject.py b/toontown/login/DateObject.py index f354a1a..609e3bc 100644 --- a/toontown/login/DateObject.py +++ b/toontown/login/DateObject.py @@ -1,5 +1,6 @@ import time + class DateObject: def getYear(self): diff --git a/toontown/makeatoon/BodyShop.py b/toontown/makeatoon/BodyShop.py index 4b404e9..6e28d95 100644 --- a/toontown/makeatoon/BodyShop.py +++ b/toontown/makeatoon/BodyShop.py @@ -1,13 +1,18 @@ +import random + from panda3d.core import * -from toontown.toon import ToonDNA + +from direct.directnotify import DirectNotifyGlobal from direct.fsm import StateData from direct.gui.DirectGui import * -from .MakeAToonGlobals import * -import random + +from toontown.toon import ToonDNA from toontown.toonbase import TTLocalizer -from direct.directnotify import DirectNotifyGlobal from toontown.toontowngui import TeaserPanel + from . import ShuffleButton +from .MakeAToonGlobals import * + class BodyShop(StateData.StateData): notify = DirectNotifyGlobal.directNotify.newCategory('BodyShop') diff --git a/toontown/makeatoon/ClothesGUI.py b/toontown/makeatoon/ClothesGUI.py index 80e6d0b..4083e69 100644 --- a/toontown/makeatoon/ClothesGUI.py +++ b/toontown/makeatoon/ClothesGUI.py @@ -1,13 +1,17 @@ +import random + from panda3d.core import * -from toontown.toon import ToonDNA + +from direct.directnotify import DirectNotifyGlobal from direct.fsm import StateData from direct.gui.DirectGui import * -from panda3d.core import * -from .MakeAToonGlobals import * + +from toontown.toon import ToonDNA from toontown.toonbase import TTLocalizer -from direct.directnotify import DirectNotifyGlobal + from . import ShuffleButton -import random +from .MakeAToonGlobals import * + CLOTHES_MAKETOON = 0 CLOTHES_TAILOR = 1 CLOTHES_CLOSET = 2 diff --git a/toontown/makeatoon/ColorShop.py b/toontown/makeatoon/ColorShop.py index a607f73..01845fa 100644 --- a/toontown/makeatoon/ColorShop.py +++ b/toontown/makeatoon/ColorShop.py @@ -1,13 +1,17 @@ +import random + from panda3d.core import * -from toontown.toon import ToonDNA + +from direct.directnotify import DirectNotifyGlobal from direct.fsm import StateData from direct.gui.DirectGui import * -from panda3d.core import * -from .MakeAToonGlobals import * + +from toontown.toon import ToonDNA from toontown.toonbase import TTLocalizer + from . import ShuffleButton -import random -from direct.directnotify import DirectNotifyGlobal +from .MakeAToonGlobals import * + class ColorShop(StateData.StateData): notify = DirectNotifyGlobal.directNotify.newCategory('ColorShop') diff --git a/toontown/makeatoon/GenderShop.py b/toontown/makeatoon/GenderShop.py index 45fe50b..cd55b19 100644 --- a/toontown/makeatoon/GenderShop.py +++ b/toontown/makeatoon/GenderShop.py @@ -1,13 +1,16 @@ +import random + from panda3d.core import * + +from direct.directnotify import DirectNotifyGlobal from direct.fsm import StateData from direct.gui.DirectGui import * -from toontown.toonbase import TTLocalizer -from toontown.toonbase import ToontownGlobals -from toontown.toon import ToonDNA -from toontown.toon import Toon + +from toontown.toon import Toon, ToonDNA +from toontown.toonbase import ToontownGlobals, TTLocalizer + from .MakeAToonGlobals import * -from direct.directnotify import DirectNotifyGlobal -import random + class GenderShop(StateData.StateData): notify = DirectNotifyGlobal.directNotify.newCategory('GenderShop') diff --git a/toontown/makeatoon/MakeAToon.py b/toontown/makeatoon/MakeAToon.py index a42bbdc..1f3b1e1 100644 --- a/toontown/makeatoon/MakeAToon.py +++ b/toontown/makeatoon/MakeAToon.py @@ -1,30 +1,26 @@ -from panda3d.core import * -from toontown.distributed.ToontownMsgTypes import * -from toontown.char import Char -from otp.avatar import Avatar -from toontown.toon import Toon -from toontown.toon import LocalToon -from toontown.toon import ToonDNA -from toontown.char import CharDNA -from direct.fsm import ClassicFSM, State -from direct.fsm import State -from direct.fsm import StateData -from toontown.toonbase import ToontownGlobals -from direct.actor.Actor import Actor -from direct.task import Task -from direct.gui.DirectGui import * -from toontown.toonbase import TTLocalizer -from .MakeAToonGlobals import * -from direct.interval.IntervalGlobal import * -from direct.directnotify import DirectNotifyGlobal -from toontown.toontowngui import TTDialog -from . import GenderShop -from . import BodyShop -from . import ColorShop -from . import MakeClothesGUI -from . import NameShop import random +from panda3d.core import * + +from direct.actor.Actor import Actor +from direct.directnotify import DirectNotifyGlobal +from direct.fsm import ClassicFSM, State, StateData +from direct.gui.DirectGui import * +from direct.interval.IntervalGlobal import * +from direct.task import Task + +from otp.avatar import Avatar + +from toontown.char import Char, CharDNA +from toontown.distributed.ToontownMsgTypes import * +from toontown.toon import LocalToon, Toon, ToonDNA +from toontown.toonbase import ToontownGlobals, TTLocalizer +from toontown.toontowngui import TTDialog + +from . import BodyShop, ColorShop, GenderShop, MakeClothesGUI, NameShop +from .MakeAToonGlobals import * + + class MakeAToon(StateData.StateData): notify = DirectNotifyGlobal.directNotify.newCategory('MakeAToon') diff --git a/toontown/makeatoon/MakeClothesGUI.py b/toontown/makeatoon/MakeClothesGUI.py index b6394b3..206e69e 100644 --- a/toontown/makeatoon/MakeClothesGUI.py +++ b/toontown/makeatoon/MakeClothesGUI.py @@ -1,6 +1,8 @@ -from . import ClothesGUI from toontown.toon import ToonDNA +from . import ClothesGUI + + class MakeClothesGUI(ClothesGUI.ClothesGUI): notify = directNotify.newCategory('MakeClothesGUI') diff --git a/toontown/makeatoon/NameGenerator.py b/toontown/makeatoon/NameGenerator.py index 2b19c47..537785d 100644 --- a/toontown/makeatoon/NameGenerator.py +++ b/toontown/makeatoon/NameGenerator.py @@ -1,12 +1,15 @@ -from panda3d.core import * +import copy +import os import random import string -import copy -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import TTLocalizer -import os + +from panda3d.core import * + from direct.directnotify import DirectNotifyGlobal +from toontown.toonbase import ToontownGlobals, TTLocalizer + + class NameGenerator: text = TextNode('text') text.setFont(ToontownGlobals.getInterfaceFont()) diff --git a/toontown/makeatoon/NameShop.py b/toontown/makeatoon/NameShop.py index b4f2188..0c08ebc 100644 --- a/toontown/makeatoon/NameShop.py +++ b/toontown/makeatoon/NameShop.py @@ -1,30 +1,32 @@ +import random +import re + from panda3d.core import * -from toontown.toonbase.ToontownGlobals import * -from direct.task.TaskManagerGlobal import * -from direct.gui.DirectGui import * -from panda3d.core import * -from toontown.distributed.ToontownMsgTypes import * +from panda3d.core import TextEncoder + from direct.directnotify import DirectNotifyGlobal +from direct.distributed.PyDatagram import PyDatagram +from direct.fsm import ClassicFSM, State, StateData from direct.gui import OnscreenText +from direct.gui.DirectGui import * +from direct.showbase import PythonUtil +from direct.task import Task +from direct.task.TaskManagerGlobal import * + from otp.avatar import Avatar from otp.chat import ChatManager -from direct.fsm import StateData -from direct.fsm import ClassicFSM, State -from direct.fsm import State -from toontown.toontowngui import TTDialog -import re -from toontown.toonbase import TTLocalizer -from . import NameGenerator -import random from otp.distributed import PotentialAvatar from otp.namepanel import NameCheck -from toontown.toontowngui import TeaserPanel -from direct.distributed.PyDatagram import PyDatagram -from direct.showbase import PythonUtil -from toontown.toon import NPCToons -from direct.task import Task + +from toontown.distributed.ToontownMsgTypes import * from toontown.makeatoon.TTPickANamePattern import TTPickANamePattern -from panda3d.core import TextEncoder +from toontown.toon import NPCToons +from toontown.toonbase import TTLocalizer +from toontown.toonbase.ToontownGlobals import * +from toontown.toontowngui import TeaserPanel, TTDialog + +from . import NameGenerator + MAX_NAME_WIDTH = TTLocalizer.NSmaxNameWidth ServerDialogTimeout = 3.0 diff --git a/toontown/makeatoon/ShuffleButton.py b/toontown/makeatoon/ShuffleButton.py index dd19b97..5b50e2f 100644 --- a/toontown/makeatoon/ShuffleButton.py +++ b/toontown/makeatoon/ShuffleButton.py @@ -1,12 +1,16 @@ -from panda3d.core import * -from direct.gui.DirectGui import * -from toontown.toonbase import TTLocalizer -from toontown.toonbase import ToontownGlobals -from .MakeAToonGlobals import * -from direct.directnotify import DirectNotifyGlobal -from direct.interval.IntervalGlobal import * import random +from panda3d.core import * + +from direct.directnotify import DirectNotifyGlobal +from direct.gui.DirectGui import * +from direct.interval.IntervalGlobal import * + +from toontown.toonbase import ToontownGlobals, TTLocalizer + +from .MakeAToonGlobals import * + + class ShuffleButton: notify = DirectNotifyGlobal.directNotify.newCategory('ShuffleButton') diff --git a/toontown/makeatoon/TTPickANamePattern.py b/toontown/makeatoon/TTPickANamePattern.py index c835f8f..a0a0186 100644 --- a/toontown/makeatoon/TTPickANamePattern.py +++ b/toontown/makeatoon/TTPickANamePattern.py @@ -1,8 +1,12 @@ -from direct.showbase.PythonUtil import listToItem2index -from otp.namepanel.PickANamePattern import PickANamePatternTwoPartLastName -from toontown.makeatoon.NameGenerator import NameGenerator import types +from direct.showbase.PythonUtil import listToItem2index + +from otp.namepanel.PickANamePattern import PickANamePatternTwoPartLastName + +from toontown.makeatoon.NameGenerator import NameGenerator + + class TTPickANamePattern(PickANamePatternTwoPartLastName): NameParts = None LastNamePrefixesCapped = None diff --git a/toontown/minigame/ArrowKeys.py b/toontown/minigame/ArrowKeys.py index 1c8c488..3759dad 100644 --- a/toontown/minigame/ArrowKeys.py +++ b/toontown/minigame/ArrowKeys.py @@ -1,6 +1,8 @@ from panda3d.core import ModifierButtons + from direct.showbase.DirectObject import DirectObject + class ArrowKeys(DirectObject): UP_KEY = 'arrow_up' DOWN_KEY = 'arrow_down' diff --git a/toontown/minigame/CatchGameToonSD.py b/toontown/minigame/CatchGameToonSD.py index 8b9b4b2..ed45202 100644 --- a/toontown/minigame/CatchGameToonSD.py +++ b/toontown/minigame/CatchGameToonSD.py @@ -1,15 +1,17 @@ from panda3d.core import * -from toontown.toonbase.ToonBaseGlobal import * -from direct.interval.IntervalGlobal import * -from toontown.toonbase.ToontownGlobals import * -from toontown.distributed.DelayDelete import DelayDelete + from direct.directnotify import DirectNotifyGlobal -from direct.fsm import StateData -from direct.fsm import ClassicFSM, State -from direct.fsm import State -from . import CatchGameGlobals +from direct.fsm import ClassicFSM, State, StateData +from direct.interval.IntervalGlobal import * from direct.task.Task import Task +from toontown.distributed.DelayDelete import DelayDelete +from toontown.toonbase.ToonBaseGlobal import * +from toontown.toonbase.ToontownGlobals import * + +from . import CatchGameGlobals + + class CatchGameToonSD(StateData.StateData): notify = DirectNotifyGlobal.directNotify.newCategory('CatchGameToonSD') FallBackAnim = 'slip-backward' diff --git a/toontown/minigame/ClerkPurchase.py b/toontown/minigame/ClerkPurchase.py index d319b44..314e642 100644 --- a/toontown/minigame/ClerkPurchase.py +++ b/toontown/minigame/ClerkPurchase.py @@ -1,5 +1,7 @@ -from .PurchaseBase import * from toontown.toonbase import ToontownTimer + +from .PurchaseBase import * + COUNT_UP_RATE = 0.15 DELAY_BEFORE_COUNT_UP = 1.25 DELAY_AFTER_COUNT_UP = 1.75 diff --git a/toontown/minigame/CogThief.py b/toontown/minigame/CogThief.py index 10fea25..a77e214 100644 --- a/toontown/minigame/CogThief.py +++ b/toontown/minigame/CogThief.py @@ -1,14 +1,17 @@ import math -from panda3d.core import CollisionSphere, CollisionNode, Point3, CollisionTube, Vec3, rad2Deg -from direct.showbase.DirectObject import DirectObject + +from panda3d.core import CollisionNode, CollisionSphere, CollisionTube, Point3, Vec3, rad2Deg + from direct.distributed.ClockDelta import globalClockDelta -from direct.interval.IntervalGlobal import Parallel, SoundInterval, Sequence, Func, LerpScaleInterval -from toontown.suit import Suit -from toontown.suit import SuitDNA -from toontown.toonbase import ToontownGlobals -from toontown.minigame import CogThiefGameGlobals +from direct.interval.IntervalGlobal import Func, LerpScaleInterval, Parallel, Sequence, SoundInterval +from direct.showbase.DirectObject import DirectObject + from toontown.battle.BattleProps import globalPropPool from toontown.battle.BattleSounds import globalBattleSoundCache +from toontown.minigame import CogThiefGameGlobals +from toontown.suit import Suit, SuitDNA +from toontown.toonbase import ToontownGlobals + CTGG = CogThiefGameGlobals class CogThief(DirectObject): diff --git a/toontown/minigame/CogThiefGameGlobals.py b/toontown/minigame/CogThiefGameGlobals.py index e2c459a..3739022 100644 --- a/toontown/minigame/CogThiefGameGlobals.py +++ b/toontown/minigame/CogThiefGameGlobals.py @@ -1,4 +1,5 @@ -from panda3d.core import VBase3, BitMask32 +from panda3d.core import BitMask32, VBase3 + GameTime = 60 NumBarrels = 4 BarrelStartingPositions = (VBase3(4.3, 4, 0), diff --git a/toontown/minigame/CogThiefGameToonSD.py b/toontown/minigame/CogThiefGameToonSD.py index 2270fbc..bbd23e7 100644 --- a/toontown/minigame/CogThiefGameToonSD.py +++ b/toontown/minigame/CogThiefGameToonSD.py @@ -1,13 +1,14 @@ from panda3d.core import * -from toontown.toonbase.ToonBaseGlobal import * -from direct.interval.IntervalGlobal import * -from toontown.toonbase.ToontownGlobals import * + from direct.directnotify import DirectNotifyGlobal -from direct.fsm import StateData -from direct.fsm import ClassicFSM, State -from direct.fsm import State +from direct.fsm import ClassicFSM, State, StateData +from direct.interval.IntervalGlobal import * from direct.task.Task import Task +from toontown.toonbase.ToonBaseGlobal import * +from toontown.toonbase.ToontownGlobals import * + + class CogThiefGameToonSD(StateData.StateData): notify = DirectNotifyGlobal.directNotify.newCategory('CogThiefGameToonSD') FallBackAnim = 'slip-backward' diff --git a/toontown/minigame/CogThiefWalk.py b/toontown/minigame/CogThiefWalk.py index a1de366..5abb975 100644 --- a/toontown/minigame/CogThiefWalk.py +++ b/toontown/minigame/CogThiefWalk.py @@ -1,5 +1,6 @@ from toontown.safezone import Walk + class CogThiefWalk(Walk.Walk): notify = directNotify.newCategory('CogThiefWalk') diff --git a/toontown/minigame/DistributedCannonGame.py b/toontown/minigame/DistributedCannonGame.py index 8c46021..1eb9f8f 100644 --- a/toontown/minigame/DistributedCannonGame.py +++ b/toontown/minigame/DistributedCannonGame.py @@ -1,4 +1,6 @@ -from panda3d.core import Point3, Quat, rad2Deg, Vec3 +import math + +from panda3d.core import Point3, Quat, Vec3, rad2Deg from panda3d.otp import Nametag, NametagFloat3d from direct.directnotify.DirectNotifyGlobal import directNotify @@ -11,18 +13,14 @@ from direct.task.TaskManagerGlobal import taskMgr from toontown.effects.DustCloud import DustCloud from toontown.effects.Splash import Splash -from toontown.minigame import CannonGameGlobals -from toontown.minigame import MinigameGlobals +from toontown.minigame import CannonGameGlobals, MinigameGlobals from toontown.minigame.DistributedMinigame import DistributedMinigame from toontown.minigame.Trajectory import Trajectory from toontown.toon.ToonHead import ToonHead -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import TTLocalizer +from toontown.toonbase import ToontownGlobals, TTLocalizer from toontown.toonbase.ToonBaseGlobal import base from toontown.toonbase.ToontownTimer import ToontownTimer -import math - LAND_TIME = 2 WORLD_SCALE = 2.0 GROUND_SCALE = 1.4 * WORLD_SCALE diff --git a/toontown/minigame/DistributedCannonGameAI.py b/toontown/minigame/DistributedCannonGameAI.py index cf34f15..1003644 100644 --- a/toontown/minigame/DistributedCannonGameAI.py +++ b/toontown/minigame/DistributedCannonGameAI.py @@ -1,9 +1,10 @@ -from .DistributedMinigameAI import * from direct.distributed.ClockDelta import * from direct.fsm import ClassicFSM, State -from direct.fsm import State from direct.task import Task + from . import CannonGameGlobals +from .DistributedMinigameAI import * + class DistributedCannonGameAI(DistributedMinigameAI): diff --git a/toontown/minigame/DistributedCatchGame.py b/toontown/minigame/DistributedCatchGame.py index 6803a4c..da65da7 100644 --- a/toontown/minigame/DistributedCatchGame.py +++ b/toontown/minigame/DistributedCatchGame.py @@ -1,32 +1,27 @@ -from panda3d.core import * -from toontown.toonbase.ToonBaseGlobal import * -from .DistributedMinigame import * -from direct.interval.IntervalGlobal import * -from .OrthoWalk import * -from direct.showbase.PythonUtil import Functor, bound, lineupPos, lerp -from direct.fsm import ClassicFSM, State -from direct.fsm import State -from toontown.toonbase import TTLocalizer -from . import CatchGameGlobals -from direct.task.Task import Task -from toontown.toon import Toon -from toontown.suit import Suit -from . import MinigameAvatarScorePanel -from toontown.toonbase import ToontownTimer -from toontown.toonbase import ToontownGlobals -from . import CatchGameToonSD -from . import Trajectory import math +from functools import reduce + +from panda3d.core import * + from direct.distributed import DistributedSmoothNode +from direct.fsm import ClassicFSM, State +from direct.interval.IntervalGlobal import * +from direct.showbase.PythonUtil import Functor, bound, lerp, lineupPos from direct.showbase.RandomNumGen import RandomNumGen -from . import MinigameGlobals -from toontown.toon import ToonDNA -from toontown.suit import SuitDNA -from .CatchGameGlobals import DropObjectTypes -from .CatchGameGlobals import Name2DropObjectType +from direct.task.Task import Task + +from toontown.suit import Suit, SuitDNA +from toontown.toon import Toon, ToonDNA +from toontown.toonbase import ToontownGlobals, ToontownTimer, TTLocalizer +from toontown.toonbase.ToonBaseGlobal import * + +from . import CatchGameGlobals, CatchGameToonSD, MinigameAvatarScorePanel, MinigameGlobals, Trajectory +from .CatchGameGlobals import DropObjectTypes, Name2DropObjectType +from .DistributedMinigame import * from .DropPlacer import * from .DropScheduler import * -from functools import reduce +from .OrthoWalk import * + class DistributedCatchGame(DistributedMinigame): DropTaskName = 'dropSomething' diff --git a/toontown/minigame/DistributedCatchGameAI.py b/toontown/minigame/DistributedCatchGameAI.py index 4acd7cd..7269393 100644 --- a/toontown/minigame/DistributedCatchGameAI.py +++ b/toontown/minigame/DistributedCatchGameAI.py @@ -1,9 +1,10 @@ -from .DistributedMinigameAI import * -from toontown.ai.ToonBarrier import * from direct.fsm import ClassicFSM, State -from direct.fsm import State -from . import CatchGameGlobals -from . import MinigameGlobals + +from toontown.ai.ToonBarrier import * + +from . import CatchGameGlobals, MinigameGlobals +from .DistributedMinigameAI import * + class DistributedCatchGameAI(DistributedMinigameAI): diff --git a/toontown/minigame/DistributedCogThiefGame.py b/toontown/minigame/DistributedCogThiefGame.py index 5b344dd..a9c1fa0 100644 --- a/toontown/minigame/DistributedCogThiefGame.py +++ b/toontown/minigame/DistributedCogThiefGame.py @@ -1,23 +1,21 @@ -from panda3d.core import Point3, CollisionSphere, CollisionNode, CollisionHandlerEvent, NodePath, TextNode +from panda3d.core import CollisionHandlerEvent, CollisionNode, CollisionSphere, NodePath, Point3, 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.fsm import ClassicFSM, State from direct.gui.DirectGui import DirectLabel -from direct.fsm import ClassicFSM -from direct.fsm import State +from direct.interval.IntervalGlobal import (ActorInterval, Func, LerpFunctionInterval, LerpHprInterval, + LerpPosHprInterval, LerpScaleInterval, Parallel, ProjectileInterval, + Sequence, SoundInterval, Track, Wait, WaitInterval) from direct.showbase import RandomNumGen from direct.task import Task -from toontown.toonbase import TTLocalizer -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import ToontownTimer -from toontown.minigame import CogThiefGameToonSD + +from toontown.minigame import (CogThief, CogThiefGameGlobals, CogThiefGameToonSD, CogThiefWalk, MinigameGlobals, + Trajectory) +from toontown.minigame.DistributedMinigame import DistributedMinigame from toontown.minigame.OrthoDrive import OrthoDrive from toontown.minigame.OrthoWalk import OrthoWalk -from toontown.minigame import CogThiefGameGlobals -from toontown.minigame import CogThief -from toontown.minigame.DistributedMinigame import DistributedMinigame -from toontown.minigame import Trajectory -from toontown.minigame import MinigameGlobals -from toontown.minigame import CogThiefWalk +from toontown.toonbase import ToontownGlobals, ToontownTimer, TTLocalizer + CTGG = CogThiefGameGlobals class DistributedCogThiefGame(DistributedMinigame): @@ -692,8 +690,8 @@ class DistributedCogThiefGame(DistributedMinigame): self.toonPieTracks[avId] = pieTrack def getTossPieInterval(self, toon, x, y, z, h, p, r, power, beginFlyIval = Sequence()): - from toontown.toonbase import ToontownBattleGlobals from toontown.battle import BattleProps + from toontown.toonbase import ToontownBattleGlobals pie = toon.getPieModel() pie.setScale(0.9) flyPie = pie.copyTo(NodePath('a')) diff --git a/toontown/minigame/DistributedCogThiefGameAI.py b/toontown/minigame/DistributedCogThiefGameAI.py index 2f88b27..7af5972 100644 --- a/toontown/minigame/DistributedCogThiefGameAI.py +++ b/toontown/minigame/DistributedCogThiefGameAI.py @@ -1,12 +1,13 @@ import random + from panda3d.core import Point3 -from direct.fsm import ClassicFSM -from direct.fsm import State + from direct.distributed.ClockDelta import globalClockDelta +from direct.fsm import ClassicFSM, State from direct.task import Task -from toontown.minigame import DistributedMinigameAI -from toontown.minigame import MinigameGlobals -from toontown.minigame import CogThiefGameGlobals + +from toontown.minigame import CogThiefGameGlobals, DistributedMinigameAI, MinigameGlobals + CTGG = CogThiefGameGlobals class DistributedCogThiefGameAI(DistributedMinigameAI.DistributedMinigameAI): diff --git a/toontown/minigame/DistributedDivingGame.py b/toontown/minigame/DistributedDivingGame.py index aaa9269..f298618 100644 --- a/toontown/minigame/DistributedDivingGame.py +++ b/toontown/minigame/DistributedDivingGame.py @@ -1,30 +1,24 @@ -from direct.showbase.ShowBaseGlobal import * -from toontown.toonbase.ToonBaseGlobal import * -from direct.interval.IntervalGlobal import * -from toontown.toonbase import ToontownTimer -from .DistributedMinigame import * -from direct.distributed.ClockDelta import * -from direct.fsm import ClassicFSM -from direct.fsm import State -from direct.task import Task -from direct.actor import Actor -from toontown.toon import LaffMeter -from direct.distributed import DistributedSmoothNode -from . import ArrowKeys -from . import Ring -from . import RingTrack -from . import DivingGameGlobals -from . import RingGroup -from . import RingTrackGroups -import random -from . import DivingGameToonSD -from . import DivingFishSpawn -from . import DivingTreasure import math -from . import TreasureScorePanel +import random + +from direct.actor import Actor +from direct.distributed import DistributedSmoothNode +from direct.distributed.ClockDelta import * +from direct.fsm import ClassicFSM, State +from direct.interval.IntervalGlobal import * +from direct.showbase.ShowBaseGlobal import * +from direct.task import Task + from otp.distributed.TelemetryLimiter import TelemetryLimiter, TLGatherAllAvs -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import TTLocalizer + +from toontown.toon import LaffMeter +from toontown.toonbase import ToontownGlobals, ToontownTimer, TTLocalizer +from toontown.toonbase.ToonBaseGlobal import * + +from . import (ArrowKeys, DivingFishSpawn, DivingGameGlobals, DivingGameToonSD, DivingTreasure, Ring, RingGroup, + RingTrack, RingTrackGroups, TreasureScorePanel) +from .DistributedMinigame import * + class DivingGameRotationLimiter(TelemetryLimiter): diff --git a/toontown/minigame/DistributedDivingGameAI.py b/toontown/minigame/DistributedDivingGameAI.py index f653f22..de219b7 100644 --- a/toontown/minigame/DistributedDivingGameAI.py +++ b/toontown/minigame/DistributedDivingGameAI.py @@ -1,14 +1,15 @@ -from .DistributedMinigameAI import * -from direct.distributed.ClockDelta import * -from direct.interval.IntervalGlobal import * -from direct.fsm import ClassicFSM -from direct.fsm import State -from direct.actor import Actor -from . import DivingGameGlobals -import random import random import types +from direct.actor import Actor +from direct.distributed.ClockDelta import * +from direct.fsm import ClassicFSM, State +from direct.interval.IntervalGlobal import * + +from . import DivingGameGlobals +from .DistributedMinigameAI import * + + class DistributedDivingGameAI(DistributedMinigameAI): fishProportions = [] for i in range(6): diff --git a/toontown/minigame/DistributedIceGame.py b/toontown/minigame/DistributedIceGame.py index c90bc7b..9437e36 100644 --- a/toontown/minigame/DistributedIceGame.py +++ b/toontown/minigame/DistributedIceGame.py @@ -1,17 +1,18 @@ -import math -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 -from direct.interval.IntervalGlobal import Sequence, LerpScaleInterval, LerpFunctionInterval, Func, Parallel, LerpPosInterval, Wait, SoundInterval, LerpColorScaleInterval -from toontown.toonbase import ToontownGlobals, TTLocalizer, ToontownTimer -from toontown.minigame import ArrowKeys -from toontown.minigame import DistributedMinigame -from toontown.minigame import DistributedIceWorld -from toontown.minigame import IceGameGlobals -from toontown.minigame import MinigameAvatarScorePanel -from toontown.minigame import IceTreasure import functools +import math + +from panda3d.core import CollisionHandlerEvent, CollisionNode, CollisionSphere, NodePath, Point3, VBase4, Vec3, deg2Rad + +from direct.distributed.ClockDelta import globalClockDelta +from direct.fsm import ClassicFSM, State +from direct.gui.DirectGui import DirectLabel +from direct.interval.IntervalGlobal import (Func, LerpColorScaleInterval, LerpFunctionInterval, LerpPosInterval, + LerpScaleInterval, Parallel, Sequence, SoundInterval, Wait) + +from toontown.minigame import (ArrowKeys, DistributedIceWorld, DistributedMinigame, IceGameGlobals, IceTreasure, + MinigameAvatarScorePanel) +from toontown.toonbase import ToontownGlobals, ToontownTimer, TTLocalizer + class DistributedIceGame(DistributedMinigame.DistributedMinigame, DistributedIceWorld.DistributedIceWorld): notify = directNotify.newCategory('DistributedIceGame') diff --git a/toontown/minigame/DistributedIceGameAI.py b/toontown/minigame/DistributedIceGameAI.py index 30194e8..dd92606 100644 --- a/toontown/minigame/DistributedIceGameAI.py +++ b/toontown/minigame/DistributedIceGameAI.py @@ -1,12 +1,14 @@ +import functools + from panda3d.core import Point3 + from direct.distributed.ClockDelta import globalClockDelta from direct.fsm import ClassicFSM, State from direct.task import Task -from toontown.minigame import DistributedMinigameAI -from toontown.minigame import MinigameGlobals -from toontown.minigame import IceGameGlobals + from toontown.ai.ToonBarrier import ToonBarrier -import functools +from toontown.minigame import DistributedMinigameAI, IceGameGlobals, MinigameGlobals + class DistributedIceGameAI(DistributedMinigameAI.DistributedMinigameAI): notify = directNotify.newCategory('DistributedIceGameAI') diff --git a/toontown/minigame/DistributedIceWorld.py b/toontown/minigame/DistributedIceWorld.py index af40379..332dd6e 100644 --- a/toontown/minigame/DistributedIceWorld.py +++ b/toontown/minigame/DistributedIceWorld.py @@ -1,9 +1,11 @@ -from panda3d.core import Vec4, BitMask32, Quat, NodePath -from panda3d.ode import OdePlaneGeom, OdeBody, OdeSphereGeom, OdeMass, OdeUtil, OdeBoxGeom +from panda3d.core import BitMask32, NodePath, Quat, Vec4 +from panda3d.ode import OdeBody, OdeBoxGeom, OdeMass, OdePlaneGeom, OdeSphereGeom, OdeUtil + from direct.directnotify import DirectNotifyGlobal -from toontown.minigame import DistributedMinigamePhysicsWorld -from toontown.minigame import IceGameGlobals + from toontown.golf import BuildGeometry +from toontown.minigame import DistributedMinigamePhysicsWorld, IceGameGlobals + MetersToFeet = 3.2808399 FeetToMeters = 1.0 / MetersToFeet diff --git a/toontown/minigame/DistributedMazeGame.py b/toontown/minigame/DistributedMazeGame.py index 70ba03d..1adb6f4 100644 --- a/toontown/minigame/DistributedMazeGame.py +++ b/toontown/minigame/DistributedMazeGame.py @@ -1,28 +1,24 @@ -from direct.interval.IntervalGlobal import LerpPosInterval, LerpHprInterval, LerpPosHprInterval -from direct.interval.IntervalGlobal import SoundInterval, LerpScaleInterval, LerpFunctionInterval -from direct.interval.IntervalGlobal import Wait, Func -from direct.interval.MetaInterval import Sequence, Parallel -from direct.gui.DirectGui import DirectWaitBar, DGG -from direct.showbase import PythonUtil -from direct.fsm import ClassicFSM, State -from direct.showbase import RandomNumGen -from direct.task.Task import Task -from direct.distributed.ClockDelta import globalClockDelta +import functools + from panda3d.core import Point3, Vec3 -from toontown.toonbase import TTLocalizer -from toontown.toonbase import ToontownTimer + +from direct.distributed.ClockDelta import globalClockDelta +from direct.fsm import ClassicFSM, State +from direct.gui.DirectGui import DGG, DirectWaitBar +from direct.interval.IntervalGlobal import (Func, LerpFunctionInterval, LerpHprInterval, LerpPosHprInterval, + LerpPosInterval, LerpScaleInterval, SoundInterval, Wait) +from direct.interval.MetaInterval import Parallel, Sequence +from direct.showbase import PythonUtil, RandomNumGen +from direct.task.Task import Task + +from toontown.toonbase import ToontownTimer, TTLocalizer + +from . import Maze, MazeData, MazeGameGlobals, MazeTreasure, MinigameAvatarScorePanel, MinigameGlobals, Trajectory from .DistributedMinigame import DistributedMinigame from .MazeSuit import MazeSuit -from .OrthoWalk import OrthoWalk from .OrthoDrive import OrthoDrive -from . import MazeGameGlobals -from . import MazeData -from . import MazeTreasure -from . import Trajectory -from . import Maze -from . import MinigameAvatarScorePanel -from . import MinigameGlobals -import functools +from .OrthoWalk import OrthoWalk + class DistributedMazeGame(DistributedMinigame): notify = directNotify.newCategory('DistributedMazeGame') diff --git a/toontown/minigame/DistributedMazeGameAI.py b/toontown/minigame/DistributedMazeGameAI.py index fee0c80..2c55cc7 100644 --- a/toontown/minigame/DistributedMazeGameAI.py +++ b/toontown/minigame/DistributedMazeGameAI.py @@ -1,10 +1,9 @@ -from .DistributedMinigameAI import * from direct.fsm import ClassicFSM, State -from direct.fsm import State -from . import PatternGameGlobals from direct.task.Task import Task -from . import MazeGameGlobals -from . import MazeData + +from . import MazeData, MazeGameGlobals, PatternGameGlobals +from .DistributedMinigameAI import * + class DistributedMazeGameAI(DistributedMinigameAI): diff --git a/toontown/minigame/DistributedMinigame.py b/toontown/minigame/DistributedMinigame.py index 6a36a7c..d67565b 100644 --- a/toontown/minigame/DistributedMinigame.py +++ b/toontown/minigame/DistributedMinigame.py @@ -1,25 +1,25 @@ -from panda3d.core import * -from toontown.toonbase.ToonBaseGlobal import * -from direct.gui.DirectGui import * -from panda3d.core import * -from direct.distributed.ClockDelta import * -from toontown.toonbase import ToontownGlobals -from direct.distributed import DistributedObject -from direct.directnotify import DirectNotifyGlobal -from direct.fsm import ClassicFSM, State -from direct.fsm import State -from . import MinigameRulesPanel -from direct.task.Task import Task -from toontown.toon import Toon -from direct.showbase import RandomNumGen -from toontown.toonbase import TTLocalizer import random -from . import MinigameGlobals -from direct.showbase import PythonUtil -from toontown.toon import TTEmote + +from panda3d.core import * + +from direct.directnotify import DirectNotifyGlobal +from direct.distributed import DistributedObject +from direct.distributed.ClockDelta import * +from direct.fsm import ClassicFSM, State +from direct.gui.DirectGui import * +from direct.showbase import PythonUtil, RandomNumGen +from direct.task.Task import Task + from otp.avatar import Emote from otp.distributed.TelemetryLimiter import RotationLimitToH, TLGatherAllAvs +from toontown.toon import Toon, TTEmote +from toontown.toonbase import ToontownGlobals, TTLocalizer +from toontown.toonbase.ToonBaseGlobal import * + +from . import MinigameGlobals, MinigameRulesPanel + + class DistributedMinigame(DistributedObject.DistributedObject): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedMinigame') diff --git a/toontown/minigame/DistributedMinigameAI.py b/toontown/minigame/DistributedMinigameAI.py index 2461fb4..d2c4e24 100644 --- a/toontown/minigame/DistributedMinigameAI.py +++ b/toontown/minigame/DistributedMinigameAI.py @@ -1,18 +1,19 @@ -from otp.ai.AIBase import * -from direct.distributed.ClockDelta import * -from toontown.ai.ToonBarrier import * -from direct.distributed import DistributedObjectAI -from direct.fsm import ClassicFSM, State -from direct.fsm import State -from toontown.shtiker import PurchaseManagerAI -from toontown.shtiker import NewbiePurchaseManagerAI -from . import MinigameCreatorAI -from direct.task import Task import random -from . import MinigameGlobals + +from direct.distributed import DistributedObjectAI +from direct.distributed.ClockDelta import * +from direct.fsm import ClassicFSM, State from direct.showbase import PythonUtil -from . import TravelGameGlobals +from direct.task import Task + +from otp.ai.AIBase import * + +from toontown.ai.ToonBarrier import * +from toontown.shtiker import NewbiePurchaseManagerAI, PurchaseManagerAI from toontown.toonbase import ToontownGlobals + +from . import MinigameCreatorAI, MinigameGlobals, TravelGameGlobals + EXITED = 0 EXPECTED = 1 JOINED = 2 diff --git a/toontown/minigame/DistributedMinigamePhysicsWorld.py b/toontown/minigame/DistributedMinigamePhysicsWorld.py index fe1f4fc..e5feb66 100644 --- a/toontown/minigame/DistributedMinigamePhysicsWorld.py +++ b/toontown/minigame/DistributedMinigamePhysicsWorld.py @@ -1,7 +1,9 @@ -from direct.distributed import DistributedObject from direct.directnotify import DirectNotifyGlobal +from direct.distributed import DistributedObject + from toontown.minigame import MinigamePhysicsWorldBase + class DistributedMinigamePhysicsWorld(DistributedObject.DistributedObject, MinigamePhysicsWorldBase.MinigamePhysicsWorldBase): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedMinigamePhysicsWorld') diff --git a/toontown/minigame/DistributedMinigameTemplate.py b/toontown/minigame/DistributedMinigameTemplate.py index 66f69a7..f077f2f 100644 --- a/toontown/minigame/DistributedMinigameTemplate.py +++ b/toontown/minigame/DistributedMinigameTemplate.py @@ -1,9 +1,12 @@ from panda3d.core import * -from toontown.toonbase.ToonBaseGlobal import * -from .DistributedMinigame import * + from direct.fsm import ClassicFSM, State -from direct.fsm import State + from toontown.toonbase import TTLocalizer +from toontown.toonbase.ToonBaseGlobal import * + +from .DistributedMinigame import * + class DistributedMinigameTemplate(DistributedMinigame): diff --git a/toontown/minigame/DistributedMinigameTemplateAI.py b/toontown/minigame/DistributedMinigameTemplateAI.py index c7e4c6b..233536a 100644 --- a/toontown/minigame/DistributedMinigameTemplateAI.py +++ b/toontown/minigame/DistributedMinigameTemplateAI.py @@ -1,6 +1,7 @@ -from .DistributedMinigameAI import * from direct.fsm import ClassicFSM, State -from direct.fsm import State + +from .DistributedMinigameAI import * + class DistributedMinigameTemplateAI(DistributedMinigameAI): diff --git a/toontown/minigame/DistributedPairingGame.py b/toontown/minigame/DistributedPairingGame.py index 9fa4964..54dffad 100644 --- a/toontown/minigame/DistributedPairingGame.py +++ b/toontown/minigame/DistributedPairingGame.py @@ -1,19 +1,19 @@ from panda3d.core import * -from toontown.toonbase.ToonBaseGlobal import * -from .DistributedMinigame import * + from direct.fsm import ClassicFSM, State -from direct.fsm import State -from toontown.toonbase import TTLocalizer, ToontownTimer -from toontown.toonbase import ToontownBattleGlobals -from toontown.minigame import PlayingCardGlobals -from toontown.minigame import PairingGameCard -from toontown.minigame import PlayingCardDeck -from toontown.minigame import PairingGameGlobals -from .OrthoWalk import OrthoWalk -from .OrthoDrive import OrthoDrive -from direct.interval.IntervalGlobal import Sequence, Parallel, Func, LerpColorScaleInterval, LerpScaleInterval, LerpFunctionInterval, Wait, SoundInterval, WaitInterval +from direct.interval.IntervalGlobal import (Func, LerpColorScaleInterval, LerpFunctionInterval, LerpScaleInterval, + Parallel, Sequence, SoundInterval, Wait, WaitInterval) + +from toontown.minigame import PairingGameCard, PairingGameGlobals, PlayingCardDeck, PlayingCardGlobals +from toontown.toonbase import ToontownBattleGlobals, ToontownTimer, TTLocalizer +from toontown.toonbase.ToonBaseGlobal import * from toontown.toonbase.ToontownGlobals import GlobalDialogColor +from .DistributedMinigame import * +from .OrthoDrive import OrthoDrive +from .OrthoWalk import OrthoWalk + + class DistributedPairingGame(DistributedMinigame): TOON_SPEED = 11 MAX_FRAME_MOVE = 1 diff --git a/toontown/minigame/DistributedPairingGameAI.py b/toontown/minigame/DistributedPairingGameAI.py index c8ac764..be67908 100644 --- a/toontown/minigame/DistributedPairingGameAI.py +++ b/toontown/minigame/DistributedPairingGameAI.py @@ -1,12 +1,11 @@ -from .DistributedMinigameAI import * from direct.fsm import ClassicFSM, State -from direct.fsm import State -from toontown.minigame import PlayingCardGlobals -from toontown.minigame import PlayingCard -from toontown.minigame.PlayingCard import PlayingCardBase -from toontown.minigame import PlayingCardDeck -from toontown.minigame import PairingGameGlobals + from toontown.ai.ToonBarrier import ToonBarrier +from toontown.minigame import PairingGameGlobals, PlayingCard, PlayingCardDeck, PlayingCardGlobals +from toontown.minigame.PlayingCard import PlayingCardBase + +from .DistributedMinigameAI import * + class DistributedPairingGameAI(DistributedMinigameAI): notify = directNotify.newCategory('DistributedPairingGameAI') diff --git a/toontown/minigame/DistributedPatternGame.py b/toontown/minigame/DistributedPatternGame.py index 7e7420c..54d41a6 100644 --- a/toontown/minigame/DistributedPatternGame.py +++ b/toontown/minigame/DistributedPatternGame.py @@ -1,3 +1,5 @@ +from random import choice + from panda3d.core import Point3, VBase4, Vec3 from panda3d.otp import CFSpeech, NametagGlobals @@ -5,29 +7,18 @@ from direct.directnotify.DirectNotifyGlobal import directNotify from direct.fsm.ClassicFSM import ClassicFSM from direct.fsm.State import State from direct.gui.DirectGui import DirectLabel -from direct.interval.IntervalGlobal import ( - ActorInterval, - Func, - LerpColorInterval, - LerpHprInterval, - LerpPosInterval, - Parallel, - Sequence, - Wait -) +from direct.interval.IntervalGlobal import (ActorInterval, Func, LerpColorInterval, LerpHprInterval, LerpPosInterval, + Parallel, Sequence, Wait) from toontown.char.Char import Char from toontown.char.CharDNA import CharDNA from toontown.minigame import PatternGameGlobals from toontown.minigame.ArrowKeys import ArrowKeys from toontown.minigame.DistributedMinigame import DistributedMinigame -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import TTLocalizer +from toontown.toonbase import ToontownGlobals, TTLocalizer from toontown.toonbase.ToonBaseGlobal import base from toontown.toonbase.ToontownTimer import ToontownTimer -from random import choice - class DistributedPatternGame(DistributedMinigame): notify = directNotify.newCategory('DistributedPatternGame') diff --git a/toontown/minigame/DistributedPatternGameAI.py b/toontown/minigame/DistributedPatternGameAI.py index a06799e..bd9897d 100644 --- a/toontown/minigame/DistributedPatternGameAI.py +++ b/toontown/minigame/DistributedPatternGameAI.py @@ -1,10 +1,13 @@ -from .DistributedMinigameAI import * -from toontown.ai.ToonBarrier import * -from direct.fsm import ClassicFSM, State -from direct.fsm import State -import random -from . import PatternGameGlobals import copy +import random + +from direct.fsm import ClassicFSM, State + +from toontown.ai.ToonBarrier import * + +from . import PatternGameGlobals +from .DistributedMinigameAI import * + class DistributedPatternGameAI(DistributedMinigameAI): diff --git a/toontown/minigame/DistributedPhotoGame.py b/toontown/minigame/DistributedPhotoGame.py index bcf6096..4380b51 100644 --- a/toontown/minigame/DistributedPhotoGame.py +++ b/toontown/minigame/DistributedPhotoGame.py @@ -1,34 +1,31 @@ -from direct.directnotify import DirectNotifyGlobal -from panda3d.core import * -from panda3d.toontown import * -from toontown.toonbase.ToonBaseGlobal import * -from .DistributedMinigame import * -from direct.distributed.ClockDelta import * -from direct.interval.IntervalGlobal import * -from direct.fsm import ClassicFSM, State -from direct.fsm import State -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import ToontownTimer -from direct.task.Task import Task import math -from toontown.toon import ToonHead -from . import PhotoGameGlobals -from direct.gui.DirectGui import * -from panda3d.core import * -from toontown.toonbase import TTLocalizer -from toontown.golf import BuildGeometry -from toontown.toon import Toon -from toontown.toon import ToonDNA -from direct.interval.IntervalGlobal import * import random -from direct.showbase import PythonUtil -import math import time -from toontown.makeatoon import NameGenerator -from otp.otpbase import OTPGlobals -from toontown.battle import BattleParticles -from toontown.minigame import PhotoGameBase + +from panda3d.core import * from panda3d.otp import * +from panda3d.toontown import * + +from direct.directnotify import DirectNotifyGlobal +from direct.distributed.ClockDelta import * +from direct.fsm import ClassicFSM, State +from direct.gui.DirectGui import * +from direct.interval.IntervalGlobal import * +from direct.showbase import PythonUtil +from direct.task.Task import Task + +from otp.otpbase import OTPGlobals + +from toontown.battle import BattleParticles +from toontown.golf import BuildGeometry +from toontown.makeatoon import NameGenerator +from toontown.minigame import PhotoGameBase +from toontown.toon import Toon, ToonDNA, ToonHead +from toontown.toonbase import ToontownGlobals, ToontownTimer, TTLocalizer +from toontown.toonbase.ToonBaseGlobal import * + +from . import PhotoGameGlobals +from .DistributedMinigame import * WORLD_SCALE = 2.0 FAR_PLANE_DIST = 600 * WORLD_SCALE diff --git a/toontown/minigame/DistributedPhotoGameAI.py b/toontown/minigame/DistributedPhotoGameAI.py index d49331a..561c3f1 100644 --- a/toontown/minigame/DistributedPhotoGameAI.py +++ b/toontown/minigame/DistributedPhotoGameAI.py @@ -1,11 +1,14 @@ -from .DistributedMinigameAI import * +import random + from direct.distributed.ClockDelta import * from direct.fsm import ClassicFSM, State -from direct.fsm import State from direct.task import Task -from . import PhotoGameGlobals + from toontown.minigame import PhotoGameBase -import random + +from . import PhotoGameGlobals +from .DistributedMinigameAI import * + class DistributedPhotoGameAI(DistributedMinigameAI, PhotoGameBase.PhotoGameBase): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedPhotoGameAI') diff --git a/toontown/minigame/DistributedRaceGame.py b/toontown/minigame/DistributedRaceGame.py index 57ca910..6641a23 100644 --- a/toontown/minigame/DistributedRaceGame.py +++ b/toontown/minigame/DistributedRaceGame.py @@ -1,17 +1,17 @@ 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 panda3d.core import * from direct.fsm import ClassicFSM, State -from direct.fsm import State +from direct.gui.DirectGui import * +from direct.interval.IntervalGlobal import * from direct.task.Task import Task -from toontown.toonbase import ToontownTimer + +from toontown.toonbase import ToontownGlobals, ToontownTimer, TTLocalizer +from toontown.toonbase.ToonBaseGlobal import * + from . import RaceGameGlobals -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import TTLocalizer +from .DistributedMinigame import * + class DistributedRaceGame(DistributedMinigame): diff --git a/toontown/minigame/DistributedRaceGameAI.py b/toontown/minigame/DistributedRaceGameAI.py index 11ee6aa..45314c3 100644 --- a/toontown/minigame/DistributedRaceGameAI.py +++ b/toontown/minigame/DistributedRaceGameAI.py @@ -1,11 +1,13 @@ +import random from math import * -from .DistributedMinigameAI import * + from direct.distributed.ClockDelta import * from direct.fsm import ClassicFSM, State -from direct.fsm import State -import random from direct.task.Task import Task + from . import RaceGameGlobals +from .DistributedMinigameAI import * + class DistributedRaceGameAI(DistributedMinigameAI): diff --git a/toontown/minigame/DistributedRingGame.py b/toontown/minigame/DistributedRingGame.py index f6e65be..edbae4b 100644 --- a/toontown/minigame/DistributedRingGame.py +++ b/toontown/minigame/DistributedRingGame.py @@ -1,20 +1,18 @@ +from functools import reduce + from panda3d.core import * -from toontown.toonbase.ToonBaseGlobal import * -from direct.interval.IntervalGlobal import * -from .DistributedMinigame import * + from direct.distributed.ClockDelta import * from direct.fsm import ClassicFSM, State -from direct.fsm import State +from direct.interval.IntervalGlobal import * from direct.task import Task -from . import ArrowKeys -from . import Ring -from . import RingTrack -from . import RingGameGlobals -from . import RingGroup -from . import RingTrackGroups -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import TTLocalizer -from functools import reduce + +from toontown.toonbase import ToontownGlobals, TTLocalizer +from toontown.toonbase.ToonBaseGlobal import * + +from . import ArrowKeys, Ring, RingGameGlobals, RingGroup, RingTrack, RingTrackGroups +from .DistributedMinigame import * + class DistributedRingGame(DistributedMinigame): UPDATE_ENVIRON_TASK = 'RingGameUpdateEnvironTask' diff --git a/toontown/minigame/DistributedRingGameAI.py b/toontown/minigame/DistributedRingGameAI.py index 87668ae..44c0693 100644 --- a/toontown/minigame/DistributedRingGameAI.py +++ b/toontown/minigame/DistributedRingGameAI.py @@ -1,11 +1,13 @@ -from .DistributedMinigameAI import * -from direct.distributed.ClockDelta import * -from direct.fsm import ClassicFSM, State -from direct.fsm import State -from . import RingGameGlobals import random import types +from direct.distributed.ClockDelta import * +from direct.fsm import ClassicFSM, State + +from . import RingGameGlobals +from .DistributedMinigameAI import * + + class DistributedRingGameAI(DistributedMinigameAI): def __init__(self, air, minigameId): diff --git a/toontown/minigame/DistributedTagGame.py b/toontown/minigame/DistributedTagGame.py index 59badbc..1a26eda 100644 --- a/toontown/minigame/DistributedTagGame.py +++ b/toontown/minigame/DistributedTagGame.py @@ -1,20 +1,21 @@ -from panda3d.core import * -from toontown.toonbase.ToonBaseGlobal import * -from .DistributedMinigame import * -from direct.interval.IntervalGlobal import * -from direct.fsm import ClassicFSM, State -from direct.fsm import State -from toontown.safezone import Walk -from toontown.toonbase import ToontownTimer -from direct.gui import OnscreenText -from . import MinigameAvatarScorePanel -from direct.distributed import DistributedSmoothNode import random -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import TTLocalizer + +from panda3d.core import * + +from direct.distributed import DistributedSmoothNode +from direct.fsm import ClassicFSM, State +from direct.gui import OnscreenText +from direct.interval.IntervalGlobal import * + from otp.otpbase import OTPGlobals -from . import TagGameGlobals -from . import Trajectory + +from toontown.safezone import Walk +from toontown.toonbase import ToontownGlobals, ToontownTimer, TTLocalizer +from toontown.toonbase.ToonBaseGlobal import * + +from . import MinigameAvatarScorePanel, TagGameGlobals, Trajectory +from .DistributedMinigame import * + class DistributedTagGame(DistributedMinigame): DURATION = TagGameGlobals.DURATION diff --git a/toontown/minigame/DistributedTagGameAI.py b/toontown/minigame/DistributedTagGameAI.py index c943545..c01c759 100644 --- a/toontown/minigame/DistributedTagGameAI.py +++ b/toontown/minigame/DistributedTagGameAI.py @@ -1,10 +1,12 @@ +import random + +from direct.fsm import ClassicFSM, State +from direct.task import Task + +from . import TagGameGlobals from .DistributedMinigameAI import * from .TagTreasurePlannerAI import * -from direct.fsm import ClassicFSM, State -from direct.fsm import State -from direct.task import Task -import random -from . import TagGameGlobals + class DistributedTagGameAI(DistributedMinigameAI): DURATION = TagGameGlobals.DURATION diff --git a/toontown/minigame/DistributedTagTreasure.py b/toontown/minigame/DistributedTagTreasure.py index 45254a7..5db7491 100644 --- a/toontown/minigame/DistributedTagTreasure.py +++ b/toontown/minigame/DistributedTagTreasure.py @@ -1,5 +1,6 @@ from toontown.safezone import DistributedTreasure + class DistributedTagTreasure(DistributedTreasure.DistributedTreasure): def __init__(self, cr): diff --git a/toontown/minigame/DistributedTagTreasureAI.py b/toontown/minigame/DistributedTagTreasureAI.py index 7e7bf29..39a4f26 100644 --- a/toontown/minigame/DistributedTagTreasureAI.py +++ b/toontown/minigame/DistributedTagTreasureAI.py @@ -1,6 +1,8 @@ -from toontown.safezone import DistributedTreasureAI from direct.distributed.ClockDelta import * +from toontown.safezone import DistributedTreasureAI + + class DistributedTagTreasureAI(DistributedTreasureAI.DistributedTreasureAI): def __init__(self, air, treasurePlanner, x, y, z): diff --git a/toontown/minigame/DistributedTargetGame.py b/toontown/minigame/DistributedTargetGame.py index 335f3f8..8a9afdc 100644 --- a/toontown/minigame/DistributedTargetGame.py +++ b/toontown/minigame/DistributedTargetGame.py @@ -1,21 +1,20 @@ +import math +import random +from math import * + from panda3d.core import * -from toontown.toonbase.ToonBaseGlobal import * -from direct.interval.IntervalGlobal import * -from .DistributedMinigame import * + from direct.distributed.ClockDelta import * from direct.fsm import ClassicFSM, State -from direct.fsm import State +from direct.interval.IntervalGlobal import * from direct.task import Task -from . import ArrowKeys -from . import TargetGameGlobals -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import TTLocalizer -import math -from math import * -import random -import random -from . import RubberBand -from . import FogOverlay + +from toontown.toonbase import ToontownGlobals, TTLocalizer +from toontown.toonbase.ToonBaseGlobal import * + +from . import ArrowKeys, FogOverlay, RubberBand, TargetGameGlobals +from .DistributedMinigame import * + def circleX(angle, radius, centerX, centerY): x = radius * cos(angle) + centerX diff --git a/toontown/minigame/DistributedTargetGameAI.py b/toontown/minigame/DistributedTargetGameAI.py index de8499e..76bbd8b 100644 --- a/toontown/minigame/DistributedTargetGameAI.py +++ b/toontown/minigame/DistributedTargetGameAI.py @@ -1,11 +1,13 @@ -from .DistributedMinigameAI import * -from direct.distributed.ClockDelta import * -from direct.fsm import ClassicFSM, State -from direct.fsm import State -from . import TargetGameGlobals import random import types +from direct.distributed.ClockDelta import * +from direct.fsm import ClassicFSM, State + +from . import TargetGameGlobals +from .DistributedMinigameAI import * + + def checkPlace(placeX, placeY, fillSize, placeList): goodPlacement = 1 for place in placeList: diff --git a/toontown/minigame/DistributedTravelGame.py b/toontown/minigame/DistributedTravelGame.py index f935283..9b4a13b 100644 --- a/toontown/minigame/DistributedTravelGame.py +++ b/toontown/minigame/DistributedTravelGame.py @@ -1,18 +1,19 @@ +import math + from panda3d.core import * +from panda3d.core import rad2Deg + +from direct.fsm import ClassicFSM, State +from direct.interval.IntervalGlobal import * + +from toontown.toonbase import ToontownTimer, TTLocalizer from toontown.toonbase.ToonBaseGlobal import * from toontown.toonbase.ToontownGlobals import GlobalDialogColor -from .DistributedMinigame import * -from direct.fsm import ClassicFSM, State -from direct.fsm import State -from toontown.toonbase import TTLocalizer -from toontown.toonbase import ToontownTimer -from . import TravelGameGlobals -import math -from panda3d.core import rad2Deg from toontown.toontowngui import TTDialog -from direct.interval.IntervalGlobal import * -from . import VoteResultsPanel -from . import VoteResultsTrolleyPanel + +from . import TravelGameGlobals, VoteResultsPanel, VoteResultsTrolleyPanel +from .DistributedMinigame import * + IconDict = {ToontownGlobals.RaceGameId: 'mg_trolley_sign_race', ToontownGlobals.CannonGameId: 'mg_trolley_sign_cannon', ToontownGlobals.TagGameId: 'mg_trolley_sign_tag', diff --git a/toontown/minigame/DistributedTravelGameAI.py b/toontown/minigame/DistributedTravelGameAI.py index d70f0ff..88aed91 100644 --- a/toontown/minigame/DistributedTravelGameAI.py +++ b/toontown/minigame/DistributedTravelGameAI.py @@ -1,10 +1,13 @@ -from toontown.minigame.DistributedMinigameAI import * -from direct.fsm import ClassicFSM, State -from direct.fsm import State -from . import TravelGameGlobals -from toontown.toonbase import ToontownGlobals import functools +from direct.fsm import ClassicFSM, State + +from toontown.minigame.DistributedMinigameAI import * +from toontown.toonbase import ToontownGlobals + +from . import TravelGameGlobals + + class DistributedTravelGameAI(DistributedMinigameAI): notify = directNotify.newCategory('DistributedTravelGameAI') diff --git a/toontown/minigame/DistributedTugOfWarGame.py b/toontown/minigame/DistributedTugOfWarGame.py index 2dcae83..da61043 100644 --- a/toontown/minigame/DistributedTugOfWarGame.py +++ b/toontown/minigame/DistributedTugOfWarGame.py @@ -1,3 +1,5 @@ +import math + from panda3d.core import RopeNode, VBase3 from panda3d.otp import NametagGlobals @@ -5,17 +7,8 @@ from direct.directnotify.DirectNotifyGlobal import directNotify from direct.fsm.ClassicFSM import ClassicFSM from direct.fsm.State import State from direct.gui.DirectGui import DGG, DirectLabel -from direct.interval.IntervalGlobal import ( - ActorInterval, - Func, - LerpHprInterval, - LerpPosInterval, - LerpPosHprInterval, - Parallel, - Sequence, - Wait -) - +from direct.interval.IntervalGlobal import (ActorInterval, Func, LerpHprInterval, LerpPosHprInterval, LerpPosInterval, + Parallel, Sequence, Wait) from direct.showutil.Rope import Rope from direct.task.TaskManagerGlobal import taskMgr @@ -27,13 +20,10 @@ from toontown.minigame.DistributedMinigame import DistributedMinigame from toontown.minigame.MinigamePowerMeter import MinigamePowerMeter from toontown.suit.Suit import Suit from toontown.suit.SuitDNA import SuitDNA -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import TTLocalizer +from toontown.toonbase import ToontownGlobals, TTLocalizer from toontown.toonbase.ToonBaseGlobal import base from toontown.toonbase.ToontownTimer import ToontownTimer -import math - class DistributedTugOfWarGame(DistributedMinigame): notify = directNotify.newCategory('DistributedTugOfWarGame') diff --git a/toontown/minigame/DistributedTugOfWarGameAI.py b/toontown/minigame/DistributedTugOfWarGameAI.py index 3db008e..69b5d8d 100644 --- a/toontown/minigame/DistributedTugOfWarGameAI.py +++ b/toontown/minigame/DistributedTugOfWarGameAI.py @@ -1,11 +1,13 @@ -from .DistributedMinigameAI import * -from direct.fsm import ClassicFSM, State -from direct.fsm import State -import random -from direct.task.Task import Task import copy -from . import TugOfWarGameGlobals import math +import random + +from direct.fsm import ClassicFSM, State +from direct.task.Task import Task + +from . import TugOfWarGameGlobals +from .DistributedMinigameAI import * + class DistributedTugOfWarGameAI(DistributedMinigameAI): diff --git a/toontown/minigame/DistributedTwoDGame.py b/toontown/minigame/DistributedTwoDGame.py index 3d3c17b..04dfe79 100644 --- a/toontown/minigame/DistributedTwoDGame.py +++ b/toontown/minigame/DistributedTwoDGame.py @@ -1,18 +1,21 @@ from panda3d.core import * -from direct.interval.IntervalGlobal import * -from toontown.toonbase.ToonBaseGlobal import * -from toontown.toonbase import TTLocalizer + +from direct.directnotify import DirectNotifyGlobal +from direct.fsm import ClassicFSM, State from direct.gui.DirectFrame import DirectFrame from direct.gui.DirectGui import DGG +from direct.interval.IntervalGlobal import * from direct.task.Task import Task -from direct.fsm import ClassicFSM, State -from direct.directnotify import DirectNotifyGlobal + +from toontown.toonbase import ToontownTimer, TTLocalizer +from toontown.toonbase.ToonBaseGlobal import * + +from . import (ArrowKeys, MinigameAvatarScorePanel, ToonBlitzAssetMgr, ToonBlitzGlobals, TwoDCamera, TwoDGameToonSD, + TwoDSectionMgr) from .DistributedMinigame import * -from . import MinigameAvatarScorePanel, ArrowKeys, ToonBlitzAssetMgr, TwoDCamera -from . import TwoDSectionMgr, ToonBlitzGlobals, TwoDGameToonSD -from toontown.toonbase import ToontownTimer -from .TwoDWalk import * from .TwoDDrive import * +from .TwoDWalk import * + COLOR_RED = VBase4(1, 0, 0, 0.3) class DistributedTwoDGame(DistributedMinigame): diff --git a/toontown/minigame/DistributedTwoDGameAI.py b/toontown/minigame/DistributedTwoDGameAI.py index 1fc2b92..364b904 100644 --- a/toontown/minigame/DistributedTwoDGameAI.py +++ b/toontown/minigame/DistributedTwoDGameAI.py @@ -1,10 +1,14 @@ -from .DistributedMinigameAI import * -from toontown.ai.ToonBarrier import * -from direct.fsm import ClassicFSM, State -from direct.directnotify import DirectNotifyGlobal -from toontown.minigame import ToonBlitzGlobals from math import sqrt +from direct.directnotify import DirectNotifyGlobal +from direct.fsm import ClassicFSM, State + +from toontown.ai.ToonBarrier import * +from toontown.minigame import ToonBlitzGlobals + +from .DistributedMinigameAI import * + + class DistributedTwoDGameAI(DistributedMinigameAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedTwoDGameAI') diff --git a/toontown/minigame/DistributedVineGame.py b/toontown/minigame/DistributedVineGame.py index 49773f7..6ec84dc 100644 --- a/toontown/minigame/DistributedVineGame.py +++ b/toontown/minigame/DistributedVineGame.py @@ -1,22 +1,20 @@ -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 panda3d.core import (BitMask32, Camera, CollisionHandlerEvent, CollisionNode, CollisionSphere, PerspectiveLens, + Point2, Point3, Vec3, Vec4) +from panda3d.physics import ActorNode, ForceNode, LinearVectorForce + from direct.directnotify import DirectNotifyGlobal +from direct.fsm import ClassicFSM, State from direct.gui.DirectFrame import DirectFrame from direct.gui.DirectGui import DGG -from toontown.toonbase import ToontownGlobals +from direct.interval.IntervalGlobal import (ActorInterval, Func, LerpPosInterval, LerpScaleInterval, Parallel, + ProjectileInterval, Sequence, SoundInterval, Wait) from direct.task.Task import Task -from direct.fsm import ClassicFSM, State -from toontown.toonbase import TTLocalizer + +from toontown.minigame import (ArrowKeys, MinigameAvatarScorePanel, SwingVine, VineBat, VineGameGlobals, VineHeadFrame, + VineTreasure) from toontown.minigame.DistributedMinigame import DistributedMinigame -from toontown.minigame import SwingVine -from toontown.minigame import ArrowKeys -from toontown.minigame import VineGameGlobals -from toontown.minigame import VineTreasure -from toontown.minigame import MinigameAvatarScorePanel -from toontown.toonbase import ToontownTimer -from toontown.minigame import VineHeadFrame -from toontown.minigame import VineBat +from toontown.toonbase import ToontownGlobals, ToontownTimer, TTLocalizer + class DistributedVineGame(DistributedMinigame): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedVineGame') diff --git a/toontown/minigame/DistributedVineGameAI.py b/toontown/minigame/DistributedVineGameAI.py index 6b97420..9f1e7a1 100644 --- a/toontown/minigame/DistributedVineGameAI.py +++ b/toontown/minigame/DistributedVineGameAI.py @@ -1,7 +1,8 @@ -from .DistributedMinigameAI import * from direct.fsm import ClassicFSM, State -from direct.fsm import State + from . import VineGameGlobals +from .DistributedMinigameAI import * + class DistributedVineGameAI(DistributedMinigameAI): diff --git a/toontown/minigame/DivingFishSpawn.py b/toontown/minigame/DivingFishSpawn.py index e8f943c..f661720 100644 --- a/toontown/minigame/DivingFishSpawn.py +++ b/toontown/minigame/DivingFishSpawn.py @@ -1,11 +1,15 @@ -from direct.showbase.DirectObject import DirectObject -from toontown.toonbase.ToontownGlobals import * +import random + +from direct.actor import Actor from direct.directnotify import DirectNotifyGlobal from direct.interval.IntervalGlobal import * -from direct.actor import Actor -import random +from direct.showbase.DirectObject import DirectObject + +from toontown.toonbase.ToontownGlobals import * + from . import DivingGameGlobals + class DivingFishSpawn(DirectObject): RADIUS = 0.7 diff --git a/toontown/minigame/DivingGameGlobals.py b/toontown/minigame/DivingGameGlobals.py index c4b9186..72f8850 100644 --- a/toontown/minigame/DivingGameGlobals.py +++ b/toontown/minigame/DivingGameGlobals.py @@ -1,4 +1,5 @@ from toontown.toonbase import ToontownGlobals + ENDLESS_GAME = config.GetBool('endless-maze-game', 0) NUM_SPAWNERS = 6 GAME_DURATION = 60.0 diff --git a/toontown/minigame/DivingGameToonSD.py b/toontown/minigame/DivingGameToonSD.py index d535062..a768109 100644 --- a/toontown/minigame/DivingGameToonSD.py +++ b/toontown/minigame/DivingGameToonSD.py @@ -1,13 +1,14 @@ -from direct.showbase.ShowBaseGlobal import * -from toontown.toonbase.ToonBaseGlobal import * -from direct.interval.IntervalGlobal import * -from toontown.toonbase.ToontownGlobals import * from direct.directnotify import DirectNotifyGlobal -from direct.fsm import StateData -from direct.fsm import ClassicFSM -from direct.fsm import State +from direct.fsm import ClassicFSM, State, StateData +from direct.interval.IntervalGlobal import * +from direct.showbase.ShowBaseGlobal import * + +from toontown.toonbase.ToonBaseGlobal import * +from toontown.toonbase.ToontownGlobals import * + from . import CatchGameGlobals + class DivingGameToonSD(StateData.StateData): notify = DirectNotifyGlobal.directNotify.newCategory('DivingGameToonSD') FallBackAnim = 'slip-backward' diff --git a/toontown/minigame/DivingTreasure.py b/toontown/minigame/DivingTreasure.py index cd71cd4..c61ac31 100644 --- a/toontown/minigame/DivingTreasure.py +++ b/toontown/minigame/DivingTreasure.py @@ -1,9 +1,12 @@ -from direct.showbase.DirectObject import DirectObject -from toontown.toonbase.ToontownGlobals import * from direct.directnotify import DirectNotifyGlobal from direct.interval.IntervalGlobal import * +from direct.showbase.DirectObject import DirectObject + +from toontown.toonbase.ToontownGlobals import * + from . import DivingGameGlobals + class DivingTreasure(DirectObject): def __init__(self, i): diff --git a/toontown/minigame/DropPlacer.py b/toontown/minigame/DropPlacer.py index 4a02789..27c74e5 100644 --- a/toontown/minigame/DropPlacer.py +++ b/toontown/minigame/DropPlacer.py @@ -1,8 +1,10 @@ from direct.showbase.RandomNumGen import RandomNumGen -from . import CatchGameGlobals -from . import DropScheduler + from toontown.parties.PartyGlobals import CatchActivityDuration as PartyCatchDuration +from . import CatchGameGlobals, DropScheduler + + class DropPlacer: def __init__(self, game, numPlayers, dropTypes, startTime = None): diff --git a/toontown/minigame/FogOverlay.py b/toontown/minigame/FogOverlay.py index 525a89e..2fa3881 100644 --- a/toontown/minigame/FogOverlay.py +++ b/toontown/minigame/FogOverlay.py @@ -1,14 +1,17 @@ -from panda3d.core import * -from toontown.toonbase.ToonBaseGlobal import * -from direct.interval.IntervalGlobal import * -from direct.distributed.ClockDelta import * -from direct.fsm import ClassicFSM, State -from direct.fsm import State -from direct.task import Task -from toontown.toonbase import ToontownGlobals import math from math import * +from panda3d.core import * + +from direct.distributed.ClockDelta import * +from direct.fsm import ClassicFSM, State +from direct.interval.IntervalGlobal import * +from direct.task import Task + +from toontown.toonbase import ToontownGlobals +from toontown.toonbase.ToonBaseGlobal import * + + class FogOverlay: SomeCounter = 0 diff --git a/toontown/minigame/IceGameGlobals.py b/toontown/minigame/IceGameGlobals.py index 9c56c0a..9664ee9 100644 --- a/toontown/minigame/IceGameGlobals.py +++ b/toontown/minigame/IceGameGlobals.py @@ -1,6 +1,9 @@ import math + from panda3d.core import Point3 + from toontown.toonbase import ToontownGlobals + InputTimeout = 15 TireMovieTimeout = 120 MinWall = (-20.0, -15.0) diff --git a/toontown/minigame/IceTreasure.py b/toontown/minigame/IceTreasure.py index 84b4e51..fd9b589 100644 --- a/toontown/minigame/IceTreasure.py +++ b/toontown/minigame/IceTreasure.py @@ -1,9 +1,12 @@ -from panda3d.core import Point3, CollisionSphere, CollisionNode, BitMask32 -from direct.interval.IntervalGlobal import Sequence, LerpScaleInterval, Parallel, Func, SoundInterval +from panda3d.core import BitMask32, CollisionNode, CollisionSphere, Point3 + from direct.directnotify import DirectNotifyGlobal +from direct.interval.IntervalGlobal import Func, LerpScaleInterval, Parallel, Sequence, SoundInterval from direct.showbase.DirectObject import DirectObject -from toontown.toonbase import ToontownGlobals + from toontown.battle import BattleParticles +from toontown.toonbase import ToontownGlobals + class IceTreasure(DirectObject): notify = DirectNotifyGlobal.directNotify.newCategory('IceTreasure') diff --git a/toontown/minigame/Maze.py b/toontown/minigame/Maze.py index 26ecf68..2fe6c8d 100644 --- a/toontown/minigame/Maze.py +++ b/toontown/minigame/Maze.py @@ -1,5 +1,6 @@ -from .MazeBase import MazeBase from . import MazeData +from .MazeBase import MazeBase + class Maze(MazeBase): diff --git a/toontown/minigame/MazeBase.py b/toontown/minigame/MazeBase.py index 32cc19a..7f1cd85 100644 --- a/toontown/minigame/MazeBase.py +++ b/toontown/minigame/MazeBase.py @@ -1,6 +1,8 @@ from panda3d.core import VBase3 + from direct.showbase.RandomNumGen import RandomNumGen + class MazeBase: def __init__(self, model, mazeData, cellWidth, parent = None): diff --git a/toontown/minigame/MazeGameGlobals.py b/toontown/minigame/MazeGameGlobals.py index 4ae9caa..441279a 100644 --- a/toontown/minigame/MazeGameGlobals.py +++ b/toontown/minigame/MazeGameGlobals.py @@ -1,5 +1,6 @@ from direct.showbase import RandomNumGen + def getMazeName(gameDoId, numPlayers, mazeNames): try: return forcedMaze diff --git a/toontown/minigame/MazeMapGui.py b/toontown/minigame/MazeMapGui.py index d2c5145..3f889f7 100644 --- a/toontown/minigame/MazeMapGui.py +++ b/toontown/minigame/MazeMapGui.py @@ -1,8 +1,9 @@ -from direct.gui.DirectGui import DirectFrame, DGG -from panda3d.core import Vec2, VBase4F -from panda3d.core import CardMaker, NodePath -from panda3d.core import Texture, PNMImage from enum import IntEnum + +from panda3d.core import CardMaker, NodePath, PNMImage, Texture, VBase4F, Vec2 + +from direct.gui.DirectGui import DGG, DirectFrame + DEFAULT_MASK_RESOLUTION = 32 DEFAULT_RADIUS_RATIO = 0.05 MAP_RESOLUTION = 320 diff --git a/toontown/minigame/MazeSuit.py b/toontown/minigame/MazeSuit.py index 44c5fc4..639383b 100644 --- a/toontown/minigame/MazeSuit.py +++ b/toontown/minigame/MazeSuit.py @@ -1,16 +1,19 @@ -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 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 -from . import MazeGameGlobals import functools +from panda3d.core import CollisionNode, CollisionSphere, Point3 +from panda3d.direct import WaitInterval + +from direct.interval.LerpInterval import LerpHprInterval, LerpPosInterval +from direct.interval.MetaInterval import Parallel +from direct.showbase.DirectObject import DirectObject +from direct.showbase.RandomNumGen import RandomNumGen + +from toontown.suit import Suit, SuitDNA +from toontown.toonbase import ToontownGlobals + +from . import MazeGameGlobals + + class MazeSuit(DirectObject): COLL_SPHERE_NAME = 'MazeSuitSphere' COLLISION_EVENT_NAME = 'MazeSuitCollision' diff --git a/toontown/minigame/MazeTreasure.py b/toontown/minigame/MazeTreasure.py index 8d8aa99..145afa0 100644 --- a/toontown/minigame/MazeTreasure.py +++ b/toontown/minigame/MazeTreasure.py @@ -1,6 +1,8 @@ -from direct.showbase.DirectObject import DirectObject -from toontown.toonbase.ToontownGlobals import * from direct.directnotify import DirectNotifyGlobal +from direct.showbase.DirectObject import DirectObject + +from toontown.toonbase.ToontownGlobals import * + class MazeTreasure(DirectObject): RADIUS = 0.7 diff --git a/toontown/minigame/MinigameAvatarScorePanel.py b/toontown/minigame/MinigameAvatarScorePanel.py index 45c4e08..8206f34 100644 --- a/toontown/minigame/MinigameAvatarScorePanel.py +++ b/toontown/minigame/MinigameAvatarScorePanel.py @@ -1,8 +1,10 @@ from panda3d.core import * -from toontown.toonbase.ToontownGlobals import * + from direct.gui.DirectGui import * -from panda3d.core import * + from toontown.toon import LaffMeter +from toontown.toonbase.ToontownGlobals import * + class MinigameAvatarScorePanel(DirectFrame): diff --git a/toontown/minigame/MinigameCreatorAI.py b/toontown/minigame/MinigameCreatorAI.py index dd6f1b1..0a2cb8d 100644 --- a/toontown/minigame/MinigameCreatorAI.py +++ b/toontown/minigame/MinigameCreatorAI.py @@ -1,26 +1,15 @@ import copy import random import time + from toontown.toonbase import ToontownGlobals -from . import DistributedMinigameTemplateAI -from . import DistributedRaceGameAI -from . import DistributedCannonGameAI -from . import DistributedTagGameAI -from . import DistributedPatternGameAI -from . import DistributedRingGameAI -from . import DistributedMazeGameAI -from . import DistributedTugOfWarGameAI -from . import DistributedCatchGameAI -from . import DistributedDivingGameAI -from . import DistributedTargetGameAI -from . import DistributedPairingGameAI -from . import DistributedPhotoGameAI -from . import DistributedVineGameAI -from . import DistributedIceGameAI -from . import DistributedCogThiefGameAI -from . import DistributedTwoDGameAI -from . import DistributedTravelGameAI -from . import TravelGameGlobals + +from . import (DistributedCannonGameAI, DistributedCatchGameAI, DistributedCogThiefGameAI, DistributedDivingGameAI, + DistributedIceGameAI, DistributedMazeGameAI, DistributedMinigameTemplateAI, DistributedPairingGameAI, + DistributedPatternGameAI, DistributedPhotoGameAI, DistributedRaceGameAI, DistributedRingGameAI, + DistributedTagGameAI, DistributedTargetGameAI, DistributedTravelGameAI, DistributedTugOfWarGameAI, + DistributedTwoDGameAI, DistributedVineGameAI, TravelGameGlobals) + ALLOW_TEMP_MINIGAMES = simbase.config.GetBool('allow-temp-minigames', False) if ALLOW_TEMP_MINIGAMES: from toontown.minigame.TempMinigameAI import * diff --git a/toontown/minigame/MinigameGlobals.py b/toontown/minigame/MinigameGlobals.py index ce86888..a61d8ed 100644 --- a/toontown/minigame/MinigameGlobals.py +++ b/toontown/minigame/MinigameGlobals.py @@ -1,6 +1,8 @@ from direct.showbase import PythonUtil -from toontown.toonbase import ToontownGlobals + from toontown.hood import ZoneUtil +from toontown.toonbase import ToontownGlobals + latencyTolerance = 10.0 MaxLoadTime = 40.0 rulesDuration = 16 diff --git a/toontown/minigame/MinigamePhysicsWorldBase.py b/toontown/minigame/MinigamePhysicsWorldBase.py index 8a5231c..aac65cb 100644 --- a/toontown/minigame/MinigamePhysicsWorldBase.py +++ b/toontown/minigame/MinigamePhysicsWorldBase.py @@ -1,8 +1,10 @@ from panda3d.core import Quat -from panda3d.ode import OdeWorld, OdeSimpleSpace, OdeJointGroup, OdeUtil +from panda3d.ode import OdeJointGroup, OdeSimpleSpace, OdeUtil, OdeWorld + from direct.directnotify import DirectNotifyGlobal from direct.distributed.ClockDelta import globalClockDelta + class MinigamePhysicsWorldBase: notify = DirectNotifyGlobal.directNotify.newCategory('MinigamePhysicsWorldBase') diff --git a/toontown/minigame/MinigamePowerMeter.py b/toontown/minigame/MinigamePowerMeter.py index 4391d07..65c4001 100644 --- a/toontown/minigame/MinigamePowerMeter.py +++ b/toontown/minigame/MinigamePowerMeter.py @@ -1,8 +1,10 @@ from panda3d.core import * -from toontown.toonbase.ToontownGlobals import * + from direct.gui.DirectGui import * -from panda3d.core import * + from toontown.toonbase import TTLocalizer +from toontown.toonbase.ToontownGlobals import * + class MinigamePowerMeter(DirectFrame): diff --git a/toontown/minigame/MinigameRulesPanel.py b/toontown/minigame/MinigameRulesPanel.py index 50cd8bc..a54717b 100644 --- a/toontown/minigame/MinigameRulesPanel.py +++ b/toontown/minigame/MinigameRulesPanel.py @@ -1,12 +1,15 @@ -from direct.task import Task -from direct.fsm import StateData -from toontown.toonbase.ToontownGlobals import * -from direct.gui.DirectGui import * from panda3d.core import * -from toontown.toonbase import ToontownTimer -from toontown.toonbase import TTLocalizer + +from direct.fsm import StateData +from direct.gui.DirectGui import * +from direct.task import Task + +from toontown.toonbase import ToontownTimer, TTLocalizer +from toontown.toonbase.ToontownGlobals import * + from . import MinigameGlobals + class MinigameRulesPanel(StateData.StateData): def __init__(self, panelName, gameTitle, instructions, doneEvent, timeout = MinigameGlobals.rulesDuration): diff --git a/toontown/minigame/OrthoWalk.py b/toontown/minigame/OrthoWalk.py index af00736..e21e378 100644 --- a/toontown/minigame/OrthoWalk.py +++ b/toontown/minigame/OrthoWalk.py @@ -1,8 +1,11 @@ -from toontown.toonbase.ToonBaseGlobal import * -from direct.task.Task import Task -from direct.interval.IntervalGlobal import * -from .OrthoDrive import * from direct.directnotify import DirectNotifyGlobal +from direct.interval.IntervalGlobal import * +from direct.task.Task import Task + +from toontown.toonbase.ToonBaseGlobal import * + +from .OrthoDrive import * + class OrthoWalk: notify = DirectNotifyGlobal.directNotify.newCategory('OrthoWalk') diff --git a/toontown/minigame/PairingGameCard.py b/toontown/minigame/PairingGameCard.py index a7022f7..530dc6e 100644 --- a/toontown/minigame/PairingGameCard.py +++ b/toontown/minigame/PairingGameCard.py @@ -1,8 +1,11 @@ -from .PlayingCard import PlayingCardNodePath -from . import PlayingCardGlobals from panda3d.core import NodePath, Vec3 + from direct.interval.IntervalGlobal import LerpHprInterval, Parallel, SoundInterval +from . import PlayingCardGlobals +from .PlayingCard import PlayingCardNodePath + + class PairingGameCard(PlayingCardNodePath): DoIntervalDefault = True FlipTime = 0.25 diff --git a/toontown/minigame/PairingGameGlobals.py b/toontown/minigame/PairingGameGlobals.py index b4ad7cf..14924ff 100644 --- a/toontown/minigame/PairingGameGlobals.py +++ b/toontown/minigame/PairingGameGlobals.py @@ -1,4 +1,5 @@ from . import PlayingCardDeck + EasiestGameDuration = 120 HardestGameDuration = 90 EndlessGame = config.GetBool('endless-pairing-game', 0) diff --git a/toontown/minigame/PatternGameGlobals.py b/toontown/minigame/PatternGameGlobals.py index f96c6bd..33177d5 100644 --- a/toontown/minigame/PatternGameGlobals.py +++ b/toontown/minigame/PatternGameGlobals.py @@ -1,4 +1,5 @@ from . import MinigameGlobals + INITIAL_ROUND_LENGTH = 2 ROUND_LENGTH_INCREMENT = 2 NUM_ROUNDS = 4 diff --git a/toontown/minigame/PhotoGameBase.py b/toontown/minigame/PhotoGameBase.py index 1be0ff6..59954ce 100644 --- a/toontown/minigame/PhotoGameBase.py +++ b/toontown/minigame/PhotoGameBase.py @@ -1,6 +1,8 @@ -from . import PhotoGameGlobals import random +from . import PhotoGameGlobals + + class PhotoGameBase: def __init__(self): diff --git a/toontown/minigame/PhotoGameGlobals.py b/toontown/minigame/PhotoGameGlobals.py index 66c221b..495928e 100644 --- a/toontown/minigame/PhotoGameGlobals.py +++ b/toontown/minigame/PhotoGameGlobals.py @@ -1,6 +1,7 @@ from panda3d.core import * -from toontown.toonbase import TTLocalizer -from toontown.toonbase import ToontownGlobals + +from toontown.toonbase import ToontownGlobals, TTLocalizer + GAME_TIME = 60 MAX_SCORE = 23 MIN_SCORE = 5 diff --git a/toontown/minigame/PlayingCard.py b/toontown/minigame/PlayingCard.py index eac4b83..9490fcd 100644 --- a/toontown/minigame/PlayingCard.py +++ b/toontown/minigame/PlayingCard.py @@ -1,9 +1,13 @@ -from direct.gui.DirectGui import * from panda3d.core import * + +from direct.gui.DirectGui import * from direct.task import Task + from toontown.toonbase import TTLocalizer + from . import PlayingCardGlobals + class PlayingCardBase: def __init__(self, value): diff --git a/toontown/minigame/PlayingCardDeck.py b/toontown/minigame/PlayingCardDeck.py index 905acc0..6f9eaab 100644 --- a/toontown/minigame/PlayingCardDeck.py +++ b/toontown/minigame/PlayingCardDeck.py @@ -1,7 +1,10 @@ import random -from . import PlayingCardGlobals + from toontown.minigame.PlayingCard import PlayingCardBase +from . import PlayingCardGlobals + + class PlayingCardDeck: def __init__(self): diff --git a/toontown/minigame/PlayingCardGlobals.py b/toontown/minigame/PlayingCardGlobals.py index 38dc5f8..6a3423b 100644 --- a/toontown/minigame/PlayingCardGlobals.py +++ b/toontown/minigame/PlayingCardGlobals.py @@ -1,6 +1,7 @@ -from toontown.toonbase import TTLocalizer -from toontown.toonbase import ToontownBattleGlobals from panda3d.core import Vec4 + +from toontown.toonbase import ToontownBattleGlobals, TTLocalizer + Up = 1 Down = 0 MaxRank = 13 diff --git a/toontown/minigame/Purchase.py b/toontown/minigame/Purchase.py index d7147a9..5654bac 100644 --- a/toontown/minigame/Purchase.py +++ b/toontown/minigame/Purchase.py @@ -1,15 +1,18 @@ from panda3d.otp import * -from .PurchaseBase import * -from direct.task.Task import Task -from toontown.toon import ToonHead -from toontown.toonbase import ToontownTimer -from direct.gui import DirectGuiGlobals as DGG + from direct.directnotify import DirectNotifyGlobal +from direct.gui import DirectGuiGlobals as DGG from direct.showbase.PythonUtil import Functor -from toontown.minigame import TravelGameGlobals +from direct.task.Task import Task + from toontown.distributed import DelayDelete -from toontown.toonbase import ToontownGlobals +from toontown.minigame import TravelGameGlobals +from toontown.toon import ToonHead +from toontown.toonbase import ToontownGlobals, ToontownTimer + from . import MinigameGlobals +from .PurchaseBase import * + COUNT_UP_RATE = 0.15 COUNT_UP_DURATION = 0.5 DELAY_BEFORE_COUNT_UP = 1.0 diff --git a/toontown/minigame/PurchaseBase.py b/toontown/minigame/PurchaseBase.py index d1357c0..f74b0af 100644 --- a/toontown/minigame/PurchaseBase.py +++ b/toontown/minigame/PurchaseBase.py @@ -1,15 +1,15 @@ -from toontown.toonbase.ToontownBattleGlobals import * -from toontown.toonbase import ToontownGlobals -from direct.fsm import StateData -from toontown.shtiker.PurchaseManagerConstants import * -from direct.gui.DirectGui import * from panda3d.core import * + +from direct.fsm import ClassicFSM, State, StateData +from direct.gui.DirectGui import * from direct.task import Task -from direct.fsm import State -from direct.fsm import ClassicFSM, State -from toontown.toonbase import TTLocalizer + +from toontown.shtiker.PurchaseManagerConstants import * +from toontown.toonbase import ToontownGlobals, TTLocalizer +from toontown.toonbase.ToontownBattleGlobals import * from toontown.toontowngui.TeaserPanel import TeaserPanel + class PurchaseBase(StateData.StateData): activateMode = 'purchase' diff --git a/toontown/minigame/RaceGameGlobals.py b/toontown/minigame/RaceGameGlobals.py index b4ba1f8..43671fb 100644 --- a/toontown/minigame/RaceGameGlobals.py +++ b/toontown/minigame/RaceGameGlobals.py @@ -1,4 +1,5 @@ from toontown.toonbase import TTLocalizer + ValidChoices = [0, 1, 2, diff --git a/toontown/minigame/Ring.py b/toontown/minigame/Ring.py index cbd403e..94c84e9 100644 --- a/toontown/minigame/Ring.py +++ b/toontown/minigame/Ring.py @@ -1,8 +1,11 @@ from panda3d.core import * -from toontown.toonbase.ToonBaseGlobal import * from panda3d.core import NodePath + +from toontown.toonbase.ToonBaseGlobal import * + from . import RingTrack + class Ring(NodePath): def __init__(self, moveTrack, tOffset, posScale = 1.0): diff --git a/toontown/minigame/RingAction.py b/toontown/minigame/RingAction.py index 0df5fce..0fcb8fc 100644 --- a/toontown/minigame/RingAction.py +++ b/toontown/minigame/RingAction.py @@ -1,6 +1,8 @@ from direct.directnotify import DirectNotifyGlobal + from . import RingTrack + class RingAction: notify = DirectNotifyGlobal.directNotify.newCategory('RingAction') diff --git a/toontown/minigame/RingGameGlobals.py b/toontown/minigame/RingGameGlobals.py index 518304f..ce465ae 100644 --- a/toontown/minigame/RingGameGlobals.py +++ b/toontown/minigame/RingGameGlobals.py @@ -1,6 +1,7 @@ from panda3d.core import * -from toontown.toonbase import TTLocalizer -from toontown.toonbase import ToontownGlobals + +from toontown.toonbase import ToontownGlobals, TTLocalizer + ENDLESS_GAME = config.GetBool('endless-ring-game', 0) NUM_RING_GROUPS = 16 MAX_TOONXZ = 10.0 diff --git a/toontown/minigame/RingGroup.py b/toontown/minigame/RingGroup.py index e839536..0a6959a 100644 --- a/toontown/minigame/RingGroup.py +++ b/toontown/minigame/RingGroup.py @@ -1,10 +1,10 @@ from panda3d.core import * -from toontown.toonbase.ToonBaseGlobal import * from panda3d.core import NodePath -from . import Ring -from . import RingTrack -from . import RingTrackGroup -from . import RingGameGlobals + +from toontown.toonbase.ToonBaseGlobal import * + +from . import Ring, RingGameGlobals, RingTrack, RingTrackGroup + class RingGroup(NodePath): diff --git a/toontown/minigame/RingTrack.py b/toontown/minigame/RingTrack.py index 1e21069..2d10dc7 100644 --- a/toontown/minigame/RingTrack.py +++ b/toontown/minigame/RingTrack.py @@ -1,6 +1,8 @@ from direct.directnotify import DirectNotifyGlobal + from . import RingAction + class RingTrack: notify = DirectNotifyGlobal.directNotify.newCategory('RingTrack') diff --git a/toontown/minigame/RingTrackGroups.py b/toontown/minigame/RingTrackGroups.py index 4bce67d..cb5c117 100644 --- a/toontown/minigame/RingTrackGroups.py +++ b/toontown/minigame/RingTrackGroups.py @@ -1,10 +1,9 @@ import math -from . import RingGameGlobals -from . import RingAction -from . import RingTracks -from . import RingTrack -from . import RingTrackGroup + from direct.showbase import PythonUtil + +from . import RingAction, RingGameGlobals, RingTrack, RingTrackGroup, RingTracks + STATIC = 0 SIMPLE = 1 COMPLEX = 2 diff --git a/toontown/minigame/RingTracks.py b/toontown/minigame/RingTracks.py index 85a309a..e2bc92e 100644 --- a/toontown/minigame/RingTracks.py +++ b/toontown/minigame/RingTracks.py @@ -1,6 +1,7 @@ import math -from . import RingTrack -from . import RingAction + +from . import RingAction, RingTrack + center = (0, 0) up = (0, 1) down = (0, -1) diff --git a/toontown/minigame/RubberBand.py b/toontown/minigame/RubberBand.py index 630bb81..6ddfbb0 100644 --- a/toontown/minigame/RubberBand.py +++ b/toontown/minigame/RubberBand.py @@ -1,14 +1,17 @@ +import math +import random +from math import * + from panda3d.core import * -from toontown.toonbase.ToonBaseGlobal import * -from direct.interval.IntervalGlobal import * + from direct.distributed.ClockDelta import * from direct.fsm import ClassicFSM, State -from direct.fsm import State +from direct.interval.IntervalGlobal import * from direct.task import Task + from toontown.toonbase import ToontownGlobals -import math -from math import * -import random +from toontown.toonbase.ToonBaseGlobal import * + class RubberBand: SomeCounter = 0 diff --git a/toontown/minigame/SwingVine.py b/toontown/minigame/SwingVine.py index e9bfaad..f96430b 100644 --- a/toontown/minigame/SwingVine.py +++ b/toontown/minigame/SwingVine.py @@ -1,14 +1,18 @@ -from direct.gui.DirectGui import * +import math + from panda3d.core import * from panda3d.physics import * + from direct.directnotify import DirectNotifyGlobal -from direct.interval.IntervalGlobal import * from direct.distributed import DistributedObject +from direct.gui.DirectGui import * +from direct.interval.IntervalGlobal import * from direct.showutil import Rope -import math + from toontown.toonbase import ToontownGlobals -from . import VineGameGlobals -from . import VineSpider + +from . import VineGameGlobals, VineSpider + class SwingVine(NodePath): notify = DirectNotifyGlobal.directNotify.newCategory('SwingVine') diff --git a/toontown/minigame/TagTreasurePlannerAI.py b/toontown/minigame/TagTreasurePlannerAI.py index 2ce2436..c22e2ab 100644 --- a/toontown/minigame/TagTreasurePlannerAI.py +++ b/toontown/minigame/TagTreasurePlannerAI.py @@ -1,8 +1,11 @@ from direct.directnotify import DirectNotifyGlobal -from toontown.toonbase.ToontownGlobals import * + from toontown.safezone import RegenTreasurePlannerAI +from toontown.toonbase.ToontownGlobals import * + from . import DistributedTagTreasureAI + class TagTreasurePlannerAI(RegenTreasurePlannerAI.RegenTreasurePlannerAI): notify = DirectNotifyGlobal.directNotify.newCategory('TagTreasurePlannerAI') diff --git a/toontown/minigame/TargetGameGlobals.py b/toontown/minigame/TargetGameGlobals.py index f7d55e9..7e574b7 100644 --- a/toontown/minigame/TargetGameGlobals.py +++ b/toontown/minigame/TargetGameGlobals.py @@ -1,6 +1,7 @@ from panda3d.core import * -from toontown.toonbase import TTLocalizer -from toontown.toonbase import ToontownGlobals + +from toontown.toonbase import ToontownGlobals, TTLocalizer + ENDLESS_GAME = config.GetBool('endless-ring-game', 0) NUM_RING_GROUPS = 16 MAX_TOONXZ = 15.0 diff --git a/toontown/minigame/TempMinigameAI.py b/toontown/minigame/TempMinigameAI.py index c4afd16..0691d43 100644 --- a/toontown/minigame/TempMinigameAI.py +++ b/toontown/minigame/TempMinigameAI.py @@ -1,4 +1,5 @@ from toontown.toonbase import ToontownGlobals + ALLOW_TEMP_MINIGAMES = simbase.config.GetBool('allow-temp-minigames', False) TEMP_MG_ID_COUNTER = ToontownGlobals.TravelGameId - 1 TempMgCtors = {} diff --git a/toontown/minigame/ToonBlitzGlobals.py b/toontown/minigame/ToonBlitzGlobals.py index 4360eb9..f5b83e5 100644 --- a/toontown/minigame/ToonBlitzGlobals.py +++ b/toontown/minigame/ToonBlitzGlobals.py @@ -1,5 +1,7 @@ -from toontown.toonbase import ToontownGlobals from panda3d.core import BitMask32 + +from toontown.toonbase import ToontownGlobals + 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 d135f0c..139d3f4 100644 --- a/toontown/minigame/Trajectory.py +++ b/toontown/minigame/Trajectory.py @@ -1,7 +1,10 @@ -from direct.directnotify import DirectNotifyGlobal -from panda3d.core import * from math import * +from panda3d.core import * + +from direct.directnotify import DirectNotifyGlobal + + class Trajectory: notify = DirectNotifyGlobal.directNotify.newCategory('Trajectory') gravity = 32.0 diff --git a/toontown/minigame/TreasureScorePanel.py b/toontown/minigame/TreasureScorePanel.py index 84fd42c..ea7a797 100644 --- a/toontown/minigame/TreasureScorePanel.py +++ b/toontown/minigame/TreasureScorePanel.py @@ -1,8 +1,10 @@ -from direct.showbase.ShowBaseGlobal import * -from toontown.toonbase.ToontownGlobals import * from direct.gui.DirectGui import * +from direct.showbase.ShowBaseGlobal import * + from toontown.toon import LaffMeter from toontown.toonbase import TTLocalizer +from toontown.toonbase.ToontownGlobals import * + class TreasureScorePanel(DirectFrame): diff --git a/toontown/minigame/TrolleyHolidayMgrAI.py b/toontown/minigame/TrolleyHolidayMgrAI.py index 92d48de..7c21e35 100644 --- a/toontown/minigame/TrolleyHolidayMgrAI.py +++ b/toontown/minigame/TrolleyHolidayMgrAI.py @@ -1,6 +1,8 @@ from direct.directnotify import DirectNotifyGlobal -from toontown.toonbase import ToontownGlobals, TTLocalizer + from toontown.ai import HolidayBaseAI +from toontown.toonbase import ToontownGlobals, TTLocalizer + class TrolleyHolidayMgrAI(HolidayBaseAI.HolidayBaseAI): notify = DirectNotifyGlobal.directNotify.newCategory('TrolleyHolidayMgrAI') diff --git a/toontown/minigame/TrolleyWeekendMgrAI.py b/toontown/minigame/TrolleyWeekendMgrAI.py index 2e4b4d2..b4e5f5f 100644 --- a/toontown/minigame/TrolleyWeekendMgrAI.py +++ b/toontown/minigame/TrolleyWeekendMgrAI.py @@ -1,6 +1,8 @@ from direct.directnotify import DirectNotifyGlobal -from toontown.toonbase import ToontownGlobals, TTLocalizer + from toontown.ai import HolidayBaseAI +from toontown.toonbase import ToontownGlobals, TTLocalizer + class TrolleyWeekendMgrAI(HolidayBaseAI.HolidayBaseAI): notify = DirectNotifyGlobal.directNotify.newCategory('TrolleyWeekendMgrAI') diff --git a/toontown/minigame/TwoDBattleMgr.py b/toontown/minigame/TwoDBattleMgr.py index db135a3..c253f01 100644 --- a/toontown/minigame/TwoDBattleMgr.py +++ b/toontown/minigame/TwoDBattleMgr.py @@ -1,16 +1,10 @@ +from math import sin + from panda3d.core import CollisionHandlerEvent, CollisionNode, CollisionSphere, Point3, Point4, VBase3, Vec3 from direct.directnotify.DirectNotifyGlobal import directNotify -from direct.interval.IntervalGlobal import ( - ActorInterval, - Func, - LerpPosInterval, - LerpScaleInterval, - Parallel, - Sequence, - Wait -) - +from direct.interval.IntervalGlobal import (ActorInterval, Func, LerpPosInterval, LerpScaleInterval, Parallel, Sequence, + Wait) from direct.showbase.DirectObject import DirectObject from direct.showbase.MessengerGlobal import messenger @@ -19,8 +13,6 @@ from toontown.battle.BattleProps import globalPropPool from toontown.toonbase import ToontownGlobals from toontown.toonbase.ToonBaseGlobal import base -from math import sin - class TwoDBattleMgr(DirectObject): notify = directNotify.newCategory('TwoDBattleMgr') diff --git a/toontown/minigame/TwoDBlock.py b/toontown/minigame/TwoDBlock.py index ff04a59..1dbf6fb 100644 --- a/toontown/minigame/TwoDBlock.py +++ b/toontown/minigame/TwoDBlock.py @@ -1,13 +1,17 @@ from panda3d.core import * -from direct.distributed.ClockDelta import * -from direct.interval.IntervalGlobal import * -from direct.fsm import ClassicFSM, State -from otp.level import BasicEntities -from toontown.coghq import MovingPlatform -from direct.distributed import DistributedObject + from direct.directnotify import DirectNotifyGlobal +from direct.distributed import DistributedObject +from direct.distributed.ClockDelta import * +from direct.fsm import ClassicFSM, State +from direct.interval.IntervalGlobal import * + +from otp.level import BasicEntities + +from toontown.coghq import MovingPlatform from toontown.minigame import ToonBlitzGlobals + class TwoDBlock(DistributedObject.DistributedObject): notify = DirectNotifyGlobal.directNotify.newCategory('TwoDBlock') diff --git a/toontown/minigame/TwoDCamera.py b/toontown/minigame/TwoDCamera.py index 4674436..5ed2ac8 100644 --- a/toontown/minigame/TwoDCamera.py +++ b/toontown/minigame/TwoDCamera.py @@ -1,10 +1,14 @@ +import math + from panda3d.core import * -from direct.interval.IntervalGlobal import * -from direct.task.Task import Task + from direct.directnotify import DirectNotifyGlobal from direct.distributed import DistributedObject +from direct.interval.IntervalGlobal import * +from direct.task.Task import Task + from toontown.minigame import ToonBlitzGlobals -import math + class TwoDCamera(DistributedObject.DistributedObject): notify = DirectNotifyGlobal.directNotify.newCategory('TwoDCamera') diff --git a/toontown/minigame/TwoDEnemy.py b/toontown/minigame/TwoDEnemy.py index 7eacfaa..3a3fb17 100644 --- a/toontown/minigame/TwoDEnemy.py +++ b/toontown/minigame/TwoDEnemy.py @@ -1,17 +1,19 @@ -from panda3d.core import * -from direct.directnotify import DirectNotifyGlobal -from direct.showbase.DirectObject import DirectObject -from direct.showbase import PythonUtil -from direct.interval.IntervalGlobal import * -from toontown.minigame import ToonBlitzGlobals -from toontown.toonbase import ToontownGlobals -from toontown.suit import Suit -from toontown.suit import SuitDNA -from toontown.battle.BattleProps import * -from toontown.battle import MovieUtil -from toontown.battle import BattleParticles, BattleProps -from direct.particles import ParticleEffect import math + +from panda3d.core import * + +from direct.directnotify import DirectNotifyGlobal +from direct.interval.IntervalGlobal import * +from direct.particles import ParticleEffect +from direct.showbase import PythonUtil +from direct.showbase.DirectObject import DirectObject + +from toontown.battle import BattleParticles, BattleProps, MovieUtil +from toontown.battle.BattleProps import * +from toontown.minigame import ToonBlitzGlobals +from toontown.suit import Suit, SuitDNA +from toontown.toonbase import ToontownGlobals + COLOR_RED = VBase4(1, 0, 0, 0.3) class TwoDEnemy(DirectObject): diff --git a/toontown/minigame/TwoDEnemyMgr.py b/toontown/minigame/TwoDEnemyMgr.py index a39f09d..346aba9 100644 --- a/toontown/minigame/TwoDEnemyMgr.py +++ b/toontown/minigame/TwoDEnemyMgr.py @@ -1,8 +1,10 @@ from panda3d.core import * + from direct.directnotify import DirectNotifyGlobal from direct.showbase.DirectObject import DirectObject -from toontown.minigame import ToonBlitzGlobals -from toontown.minigame import TwoDEnemy + +from toontown.minigame import ToonBlitzGlobals, TwoDEnemy + class TwoDEnemyMgr(DirectObject): notify = DirectNotifyGlobal.directNotify.newCategory('TwoDEnemyMgr') diff --git a/toontown/minigame/TwoDGameToonSD.py b/toontown/minigame/TwoDGameToonSD.py index 42de694..14c629e 100644 --- a/toontown/minigame/TwoDGameToonSD.py +++ b/toontown/minigame/TwoDGameToonSD.py @@ -1,16 +1,19 @@ from panda3d.core import * -from toontown.toonbase.ToonBaseGlobal import * -from direct.interval.IntervalGlobal import * -from toontown.toonbase.ToontownGlobals import * + from direct.directnotify import DirectNotifyGlobal -from direct.fsm import StateData -from direct.fsm import ClassicFSM, State -from direct.fsm import State -from . import ToonBlitzGlobals -from otp.otpbase import OTPGlobals +from direct.fsm import ClassicFSM, State, StateData +from direct.interval.IntervalGlobal import * from direct.task.Task import Task + +from otp.otpbase import OTPGlobals + from toontown.minigame import TwoDBattleMgr from toontown.racing import RaceHeadFrame +from toontown.toonbase.ToonBaseGlobal import * +from toontown.toonbase.ToontownGlobals import * + +from . import ToonBlitzGlobals + COLOR_RED = VBase4(1, 0, 0, 0.3) class TwoDGameToonSD(StateData.StateData): diff --git a/toontown/minigame/TwoDSection.py b/toontown/minigame/TwoDSection.py index 39bfb19..be1e19c 100644 --- a/toontown/minigame/TwoDSection.py +++ b/toontown/minigame/TwoDSection.py @@ -1,12 +1,11 @@ from panda3d.core import * + from direct.directnotify import DirectNotifyGlobal from direct.showbase.DirectObject import DirectObject -from toontown.minigame import ToonBlitzGlobals -from toontown.minigame import TwoDBlock -from toontown.minigame import TwoDEnemyMgr -from toontown.minigame import TwoDTreasureMgr -from toontown.minigame import TwoDSpawnPointMgr -from toontown.minigame import TwoDStomperMgr + +from toontown.minigame import (ToonBlitzGlobals, TwoDBlock, TwoDEnemyMgr, TwoDSpawnPointMgr, TwoDStomperMgr, + TwoDTreasureMgr) + class TwoDSection(DirectObject): notify = DirectNotifyGlobal.directNotify.newCategory('TwoDSection') diff --git a/toontown/minigame/TwoDSectionMgr.py b/toontown/minigame/TwoDSectionMgr.py index 5f2cc69..708bd53 100644 --- a/toontown/minigame/TwoDSectionMgr.py +++ b/toontown/minigame/TwoDSectionMgr.py @@ -1,13 +1,12 @@ from panda3d.core import * + from direct.directnotify import DirectNotifyGlobal -from direct.showbase.DirectObject import DirectObject -from toontown.minigame import ToonBlitzGlobals -from toontown.minigame import TwoDSection -from toontown.minigame import TwoDSpawnPointMgr -from toontown.minigame import TwoDBlock from direct.gui import DirectGui -from toontown.toonbase import TTLocalizer -from toontown.toonbase import ToontownGlobals +from direct.showbase.DirectObject import DirectObject + +from toontown.minigame import ToonBlitzGlobals, TwoDBlock, TwoDSection, TwoDSpawnPointMgr +from toontown.toonbase import ToontownGlobals, TTLocalizer + class TwoDSectionMgr(DirectObject): notify = DirectNotifyGlobal.directNotify.newCategory('TwoDSectionMgr') diff --git a/toontown/minigame/TwoDSpawnPointMgr.py b/toontown/minigame/TwoDSpawnPointMgr.py index 87c8963..862a465 100644 --- a/toontown/minigame/TwoDSpawnPointMgr.py +++ b/toontown/minigame/TwoDSpawnPointMgr.py @@ -1,9 +1,12 @@ from panda3d.core import * + from direct.directnotify import DirectNotifyGlobal from direct.showbase.DirectObject import DirectObject + from toontown.minigame import ToonBlitzGlobals from toontown.toonbase import ToontownGlobals + class TwoDSpawnPointMgr(DirectObject): notify = DirectNotifyGlobal.directNotify.newCategory('TwoDSpawnPointMgr') diff --git a/toontown/minigame/TwoDStomper.py b/toontown/minigame/TwoDStomper.py index 3b9c7d5..064ce8d 100644 --- a/toontown/minigame/TwoDStomper.py +++ b/toontown/minigame/TwoDStomper.py @@ -1,8 +1,10 @@ -from direct.showbase.DirectObject import DirectObject -from toontown.toonbase.ToontownGlobals import * from direct.directnotify import DirectNotifyGlobal from direct.interval.IntervalGlobal import * +from direct.showbase.DirectObject import DirectObject + from toontown.minigame import ToonBlitzGlobals +from toontown.toonbase.ToontownGlobals import * + GOING_UP = 1 GOING_DOWN = 2 STUCK_DOWN = 3 diff --git a/toontown/minigame/TwoDStomperMgr.py b/toontown/minigame/TwoDStomperMgr.py index 1e1567f..6d3fa5a 100644 --- a/toontown/minigame/TwoDStomperMgr.py +++ b/toontown/minigame/TwoDStomperMgr.py @@ -1,8 +1,10 @@ from panda3d.core import * + from direct.directnotify import DirectNotifyGlobal from direct.showbase.DirectObject import DirectObject -from toontown.minigame import ToonBlitzGlobals -from toontown.minigame import TwoDStomper + +from toontown.minigame import ToonBlitzGlobals, TwoDStomper + class TwoDStomperMgr(DirectObject): notify = DirectNotifyGlobal.directNotify.newCategory('TwoDStomperMgr') diff --git a/toontown/minigame/TwoDTreasure.py b/toontown/minigame/TwoDTreasure.py index 7d26035..69a0113 100644 --- a/toontown/minigame/TwoDTreasure.py +++ b/toontown/minigame/TwoDTreasure.py @@ -1,10 +1,13 @@ -from direct.showbase.DirectObject import DirectObject -from toontown.toonbase.ToontownGlobals import * +import random + from direct.directnotify import DirectNotifyGlobal from direct.interval.IntervalGlobal import * -from toontown.minigame import ToonBlitzGlobals +from direct.showbase.DirectObject import DirectObject + from toontown.estate.GardenGlobals import BeanColors -import random +from toontown.minigame import ToonBlitzGlobals +from toontown.toonbase.ToontownGlobals import * + class TwoDTreasure(DirectObject): notify = DirectNotifyGlobal.directNotify.newCategory('TwoDTreasure') diff --git a/toontown/minigame/TwoDTreasureMgr.py b/toontown/minigame/TwoDTreasureMgr.py index 9a805a1..670c83c 100644 --- a/toontown/minigame/TwoDTreasureMgr.py +++ b/toontown/minigame/TwoDTreasureMgr.py @@ -1,9 +1,12 @@ +import random + from panda3d.core import * + from direct.directnotify import DirectNotifyGlobal from direct.showbase.DirectObject import DirectObject -from toontown.minigame import ToonBlitzGlobals -from toontown.minigame import TwoDTreasure -import random + +from toontown.minigame import ToonBlitzGlobals, TwoDTreasure + class TwoDTreasureMgr(DirectObject): notify = DirectNotifyGlobal.directNotify.newCategory('TwoDTreasureMgr') diff --git a/toontown/minigame/TwoDWalk.py b/toontown/minigame/TwoDWalk.py index 589eebc..40caff0 100644 --- a/toontown/minigame/TwoDWalk.py +++ b/toontown/minigame/TwoDWalk.py @@ -1,5 +1,6 @@ from .OrthoWalk import * + class TwoDWalk(OrthoWalk): notify = DirectNotifyGlobal.directNotify.newCategory('TwoDWalk') BROADCAST_POS_TASK = 'TwoDWalkBroadcastPos' diff --git a/toontown/minigame/VineBat.py b/toontown/minigame/VineBat.py index 2f79485..205b94c 100644 --- a/toontown/minigame/VineBat.py +++ b/toontown/minigame/VineBat.py @@ -1,9 +1,13 @@ -from direct.showbase.DirectObject import DirectObject -from toontown.toonbase.ToontownGlobals import * -from direct.directnotify import DirectNotifyGlobal from panda3d.core import * -from . import VineGameGlobals + +from direct.directnotify import DirectNotifyGlobal from direct.interval.SoundInterval import SoundInterval +from direct.showbase.DirectObject import DirectObject + +from toontown.toonbase.ToontownGlobals import * + +from . import VineGameGlobals + class VineBat(NodePath, DirectObject): notify = DirectNotifyGlobal.directNotify.newCategory('VineBat') diff --git a/toontown/minigame/VineGameGlobals.py b/toontown/minigame/VineGameGlobals.py index 90c6493..fa6ff23 100644 --- a/toontown/minigame/VineGameGlobals.py +++ b/toontown/minigame/VineGameGlobals.py @@ -1,5 +1,7 @@ -from toontown.toonbase import ToontownGlobals from panda3d.core import BitMask32 + +from toontown.toonbase import ToontownGlobals + NumVines = 20 GameDuration = 70 ShowScoresDuration = 4.0 diff --git a/toontown/minigame/VineHeadFrame.py b/toontown/minigame/VineHeadFrame.py index 3f28516..a01218f 100644 --- a/toontown/minigame/VineHeadFrame.py +++ b/toontown/minigame/VineHeadFrame.py @@ -1,7 +1,10 @@ -from direct.gui.DirectGui import * from panda3d.core import * -from toontown.toonbase import ToontownGlobals + +from direct.gui.DirectGui import * + from toontown.toon import ToonHead +from toontown.toonbase import ToontownGlobals + class VineHeadFrame(DirectFrame): diff --git a/toontown/minigame/VineSpider.py b/toontown/minigame/VineSpider.py index 61d96f2..3543992 100644 --- a/toontown/minigame/VineSpider.py +++ b/toontown/minigame/VineSpider.py @@ -1,9 +1,13 @@ -from direct.showbase.DirectObject import DirectObject -from toontown.toonbase.ToontownGlobals import * -from direct.directnotify import DirectNotifyGlobal from panda3d.core import * + +from direct.directnotify import DirectNotifyGlobal +from direct.showbase.DirectObject import DirectObject + +from toontown.toonbase.ToontownGlobals import * + from . import VineGameGlobals + class VineSpider(NodePath, DirectObject): RADIUS = 1.7 diff --git a/toontown/minigame/VineTreasure.py b/toontown/minigame/VineTreasure.py index 9adac24..1b7a5e7 100644 --- a/toontown/minigame/VineTreasure.py +++ b/toontown/minigame/VineTreasure.py @@ -1,6 +1,8 @@ -from direct.showbase.DirectObject import DirectObject -from toontown.toonbase.ToontownGlobals import * from direct.directnotify import DirectNotifyGlobal +from direct.showbase.DirectObject import DirectObject + +from toontown.toonbase.ToontownGlobals import * + class VineTreasure(DirectObject): notify = DirectNotifyGlobal.directNotify.newCategory('VineTreasure') diff --git a/toontown/minigame/VoteResultsPanel.py b/toontown/minigame/VoteResultsPanel.py index 7f55efe..d54e81b 100644 --- a/toontown/minigame/VoteResultsPanel.py +++ b/toontown/minigame/VoteResultsPanel.py @@ -1,10 +1,12 @@ -from direct.gui.DirectGui import DirectFrame, DGG, DirectLabel -from direct.directnotify import DirectNotifyGlobal -from toontown.toonbase import ToontownGlobals from panda3d.core import Point3, TextNode + +from direct.directnotify import DirectNotifyGlobal +from direct.gui.DirectGui import DGG, DirectFrame, DirectLabel +from direct.interval.IntervalGlobal import Func, LerpFunc, Parallel, Sequence, Wait + from toontown.minigame import TravelGameGlobals -from toontown.toonbase import TTLocalizer -from direct.interval.IntervalGlobal import Parallel, Sequence, LerpFunc, Func, Wait +from toontown.toonbase import ToontownGlobals, TTLocalizer + class VoteResultsPanel(DirectFrame): notify = DirectNotifyGlobal.directNotify.newCategory('VoteResultsPanel') diff --git a/toontown/minigame/VoteResultsTrolleyPanel.py b/toontown/minigame/VoteResultsTrolleyPanel.py index 8877dc1..bc5406b 100644 --- a/toontown/minigame/VoteResultsTrolleyPanel.py +++ b/toontown/minigame/VoteResultsTrolleyPanel.py @@ -1,12 +1,15 @@ -from direct.gui.DirectGui import DirectFrame, DGG, DirectLabel -from direct.directnotify import DirectNotifyGlobal -from toontown.toonbase import ToontownGlobals 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 + +from direct.directnotify import DirectNotifyGlobal +from direct.gui.DirectGui import DGG, DirectFrame, DirectLabel +from direct.interval.IntervalGlobal import Func, LerpFunc, Parallel, Sequence, SoundInterval, Wait + from otp.otpbase.PythonUtil import pdir +from toontown.minigame import TravelGameGlobals +from toontown.toonbase import ToontownGlobals, TTLocalizer + + class VoteResultsTrolleyPanel(DirectFrame): notify = DirectNotifyGlobal.directNotify.newCategory('VoteResultsTrolleyPanel') diff --git a/toontown/parties/BaseActivityFSM.py b/toontown/parties/BaseActivityFSM.py index aca3485..852b8e1 100644 --- a/toontown/parties/BaseActivityFSM.py +++ b/toontown/parties/BaseActivityFSM.py @@ -1,5 +1,6 @@ -from direct.fsm.FSM import FSM from direct.directnotify import DirectNotifyGlobal +from direct.fsm.FSM import FSM + class BaseActivityFSM(FSM): notify = DirectNotifyGlobal.directNotify.newCategory('BaseActivityFSM') diff --git a/toontown/parties/CalendarGuiDay.py b/toontown/parties/CalendarGuiDay.py index bec5e99..ce65fb7 100644 --- a/toontown/parties/CalendarGuiDay.py +++ b/toontown/parties/CalendarGuiDay.py @@ -1,15 +1,18 @@ import datetime import functools import time -from panda3d.core import TextNode, Vec3, Vec4, PlaneNode, Plane, Point3 -from direct.gui.DirectGui import DirectFrame, DirectLabel, DirectButton, DirectScrolledList, DGG + +from panda3d.core import Plane, PlaneNode, Point3, TextNode, Vec3, Vec4 + from direct.directnotify import DirectNotifyGlobal from direct.gui import DirectGuiGlobals -from toontown.toonbase import TTLocalizer -from toontown.toonbase import ToontownGlobals -from toontown.parties.PartyInfo import PartyInfo -from toontown.parties import PartyGlobals +from direct.gui.DirectGui import DGG, DirectButton, DirectFrame, DirectLabel, DirectScrolledList + from toontown.ai.NewsManager import NewsManager +from toontown.parties import PartyGlobals +from toontown.parties.PartyInfo import PartyInfo +from toontown.toonbase import ToontownGlobals, TTLocalizer + def myStrftime(myTime): result = '' diff --git a/toontown/parties/CalendarGuiMonth.py b/toontown/parties/CalendarGuiMonth.py index 1371da3..db8dcfb 100644 --- a/toontown/parties/CalendarGuiMonth.py +++ b/toontown/parties/CalendarGuiMonth.py @@ -1,10 +1,13 @@ import calendar -from datetime import timedelta, datetime -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 +from datetime import datetime, timedelta + +from panda3d.core import TextNode, Vec4 + +from direct.gui.DirectGui import DGG, DirectButton, DirectFrame, DirectLabel, DirectScrolledList + from toontown.parties.CalendarGuiDay import CalendarGuiDay +from toontown.toonbase import ToontownGlobals, TTLocalizer + class CalendarGuiMonth(DirectFrame): notify = directNotify.newCategory('CalendarGuiMonth') diff --git a/toontown/parties/Cannon.py b/toontown/parties/Cannon.py index 5b57926..cdc6074 100644 --- a/toontown/parties/Cannon.py +++ b/toontown/parties/Cannon.py @@ -1,14 +1,17 @@ import math + from panda3d.core import * -from direct.interval.MetaInterval import Sequence, Parallel + from direct.interval.FunctionInterval import Func -from direct.interval.LerpInterval import LerpScaleInterval, LerpColorScaleInterval -from direct.showbase.PythonUtil import bound -from toontown.toon import ToonHead +from direct.interval.LerpInterval import LerpColorScaleInterval, LerpScaleInterval +from direct.interval.MetaInterval import Parallel, Sequence +from direct.showbase.PythonUtil import StackTrace, bound + from toontown.minigame.CannonGameGlobals import * +from toontown.parties.PartyUtils import calcVelocity, toRadians +from toontown.toon import ToonHead from toontown.toonbase import ToontownGlobals -from toontown.parties.PartyUtils import toRadians, calcVelocity -from direct.showbase.PythonUtil import StackTrace + CANNON_ROTATION_MIN = -70 CANNON_ROTATION_MAX = 70 INITIAL_VELOCITY = 80.0 diff --git a/toontown/parties/CannonGui.py b/toontown/parties/CannonGui.py index b362a78..7889aec 100644 --- a/toontown/parties/CannonGui.py +++ b/toontown/parties/CannonGui.py @@ -1,8 +1,10 @@ -from direct.showbase.DirectObject import DirectObject -from direct.gui.DirectGui import DirectFrame, DirectButton import direct.gui.DirectGuiGlobals as DGG +from direct.gui.DirectGui import DirectButton, DirectFrame +from direct.showbase.DirectObject import DirectObject + from toontown.parties import PartyUtils + class CannonGui(DirectObject): notify = directNotify.newCategory('CannonGui') FIRE_KEY = 'control' diff --git a/toontown/parties/Decoration.py b/toontown/parties/Decoration.py index e6db7cb..ffbef35 100644 --- a/toontown/parties/Decoration.py +++ b/toontown/parties/Decoration.py @@ -1,10 +1,14 @@ -from panda3d.core import * -from direct.interval.IntervalGlobal import * -from direct.actor import Actor -from toontown.toonbase import ToontownGlobals import random + +from panda3d.core import * + +from direct.actor import Actor +from direct.interval.IntervalGlobal import * + from toontown.parties import PartyGlobals from toontown.parties.PartyUtils import getCenterPosFromGridSize +from toontown.toonbase import ToontownGlobals + class Decoration(NodePath): notify = directNotify.newCategory('Decoration') diff --git a/toontown/parties/DistributedParty.py b/toontown/parties/DistributedParty.py index b525471..c48b22e 100644 --- a/toontown/parties/DistributedParty.py +++ b/toontown/parties/DistributedParty.py @@ -1,19 +1,23 @@ +import datetime import random import time -import datetime -from panda3d.core import Vec4, TextNode, CardMaker, NodePath + +from panda3d.core import CardMaker, NodePath, TextNode, Vec4 + from direct.distributed import DistributedObject -from direct.gui.DirectGui import DirectLabel from direct.gui import OnscreenText +from direct.gui.DirectGui import DirectLabel from direct.interval.IntervalGlobal import * -from toontown.toonbase import ToontownGlobals -from toontown.parties.PartyInfo import PartyInfo -from toontown.toonbase import TTLocalizer -from toontown.toon import Toon + from toontown.parties import PartyGlobals from toontown.parties.Decoration import Decoration +from toontown.parties.PartyInfo import PartyInfo +from toontown.toon import Toon +from toontown.toonbase import ToontownGlobals, TTLocalizer + from . import PartyUtils + class DistributedParty(DistributedObject.DistributedObject): notify = directNotify.newCategory('DistributedParty') generatedEvent = 'distributedPartyGenerated' diff --git a/toontown/parties/DistributedPartyAI.py b/toontown/parties/DistributedPartyAI.py index 842864d..23fbfa8 100644 --- a/toontown/parties/DistributedPartyAI.py +++ b/toontown/parties/DistributedPartyAI.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectAI import DistributedObjectAI + class DistributedPartyAI(DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedPartyAI') diff --git a/toontown/parties/DistributedPartyActivity.py b/toontown/parties/DistributedPartyActivity.py index f96e492..133115e 100644 --- a/toontown/parties/DistributedPartyActivity.py +++ b/toontown/parties/DistributedPartyActivity.py @@ -1,19 +1,21 @@ -from panda3d.core import CollisionSphere, CollisionNode, CollisionTube -from panda3d.core import TextNode, NodePath, Vec3, Point3 -from direct.distributed.ClockDelta import globalClockDelta +from panda3d.core import CollisionNode, CollisionSphere, CollisionTube, NodePath, Point3, TextNode, Vec3 + from direct.distributed import DistributedObject -from direct.showbase import RandomNumGen -from direct.showbase import PythonUtil -from direct.interval.IntervalGlobal import Sequence, Parallel, ActorInterval +from direct.distributed.ClockDelta import globalClockDelta from direct.interval.FunctionInterval import Wait +from direct.interval.IntervalGlobal import ActorInterval, Parallel, Sequence +from direct.showbase import PythonUtil, RandomNumGen + from otp.avatar import Emote from otp.otpbase import OTPGlobals -from toontown.toonbase import TTLocalizer -from toontown.parties import PartyGlobals + from toontown.minigame.MinigameRulesPanel import MinigameRulesPanel -from toontown.toontowngui import TTDialog +from toontown.parties import PartyGlobals from toontown.parties.JellybeanRewardGui import JellybeanRewardGui -from toontown.parties.PartyUtils import getPartyActivityIcon, getCenterPosFromGridSize +from toontown.parties.PartyUtils import getCenterPosFromGridSize, getPartyActivityIcon +from toontown.toonbase import TTLocalizer +from toontown.toontowngui import TTDialog + class DistributedPartyActivity(DistributedObject.DistributedObject): diff --git a/toontown/parties/DistributedPartyActivityAI.py b/toontown/parties/DistributedPartyActivityAI.py index edfb2af..0787f8c 100644 --- a/toontown/parties/DistributedPartyActivityAI.py +++ b/toontown/parties/DistributedPartyActivityAI.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectAI import DistributedObjectAI + class DistributedPartyActivityAI(DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedPartyActivityAI') diff --git a/toontown/parties/DistributedPartyCannon.py b/toontown/parties/DistributedPartyCannon.py index 0272449..c541fbd 100644 --- a/toontown/parties/DistributedPartyCannon.py +++ b/toontown/parties/DistributedPartyCannon.py @@ -1,12 +1,15 @@ from panda3d.core import * + from direct.distributed.DistributedObject import DistributedObject from direct.task.Task import Task + from toontown.minigame import CannonGameGlobals from toontown.minigame.CannonGameGlobals import * +from toontown.parties import PartyGlobals from toontown.parties.Cannon import Cannon from toontown.parties.CannonGui import CannonGui -from toontown.parties import PartyGlobals from toontown.parties.DistributedPartyCannonActivity import DistributedPartyCannonActivity + LAND_TIME = 2 WORLD_SCALE = 2.0 GROUND_SCALE = 1.4 * WORLD_SCALE diff --git a/toontown/parties/DistributedPartyCannonAI.py b/toontown/parties/DistributedPartyCannonAI.py index 39db36c..39969e5 100644 --- a/toontown/parties/DistributedPartyCannonAI.py +++ b/toontown/parties/DistributedPartyCannonAI.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectAI import DistributedObjectAI + class DistributedPartyCannonAI(DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedPartyCannonAI') diff --git a/toontown/parties/DistributedPartyCannonActivity.py b/toontown/parties/DistributedPartyCannonActivity.py index a2ee0d2..e6461eb 100644 --- a/toontown/parties/DistributedPartyCannonActivity.py +++ b/toontown/parties/DistributedPartyCannonActivity.py @@ -1,25 +1,25 @@ import math + from panda3d.core import * + from direct.distributed.ClockDelta import * from direct.interval.IntervalGlobal import * -from otp.otpbase.PythonUtil import quantizeVec from direct.task.Task import Task -from toontown.toontowngui import TTDialog -from toontown.toonbase.ToonBaseGlobal import * -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import TTLocalizer -from toontown.effects import Splash, DustCloud, Wake -from toontown.minigame import Trajectory -from toontown.minigame import CannonGameGlobals + +from otp.otpbase.PythonUtil import quantizeVec + +from toontown.effects import DustCloud, Splash, Wake +from toontown.minigame import CannonGameGlobals, Trajectory from toontown.parties import PartyGlobals -from toontown.parties.PartyGlobals import ActivityIds -from toontown.parties.PartyGlobals import ActivityTypes -from toontown.parties.PartyGlobals import FireworksStartedEvent -from toontown.parties.PartyGlobals import FireworksFinishedEvent -from toontown.parties.PartyGlobals import PartyCannonCollisions -from toontown.parties.DistributedPartyActivity import DistributedPartyActivity from toontown.parties.CannonGui import CannonGui -from toontown.parties.PartyUtils import toRadians, toDegrees +from toontown.parties.DistributedPartyActivity import DistributedPartyActivity +from toontown.parties.PartyGlobals import (ActivityIds, ActivityTypes, FireworksFinishedEvent, FireworksStartedEvent, + PartyCannonCollisions) +from toontown.parties.PartyUtils import toDegrees, toRadians +from toontown.toonbase import ToontownGlobals, TTLocalizer +from toontown.toonbase.ToonBaseGlobal import * +from toontown.toontowngui import TTDialog + CANNON_ROTATION_VEL = 15.0 CANNON_ANGLE_VEL = 15.0 GROUND_PLANE_MIN = -15 diff --git a/toontown/parties/DistributedPartyCannonActivityAI.py b/toontown/parties/DistributedPartyCannonActivityAI.py index 636fce3..c12469a 100644 --- a/toontown/parties/DistributedPartyCannonActivityAI.py +++ b/toontown/parties/DistributedPartyCannonActivityAI.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectAI import DistributedObjectAI + class DistributedPartyCannonActivityAI(DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedPartyCannonActivityAI') diff --git a/toontown/parties/DistributedPartyCatchActivity.py b/toontown/parties/DistributedPartyCatchActivity.py index 09093bc..0e93f33 100644 --- a/toontown/parties/DistributedPartyCatchActivity.py +++ b/toontown/parties/DistributedPartyCatchActivity.py @@ -1,28 +1,28 @@ -from panda3d.core import Vec3, Point3, Point4, TextNode, NodePath -from panda3d.core import CollisionHandlerEvent, CollisionNode, CollisionSphere +from panda3d.core import CollisionHandlerEvent, CollisionNode, CollisionSphere, NodePath, Point3, Point4, TextNode, Vec3 + +from direct.directnotify import DirectNotifyGlobal +from direct.distributed import DistributedSmoothNode from direct.distributed.ClockDelta import globalClockDelta -from direct.interval.IntervalGlobal import Sequence, Parallel -from direct.interval.IntervalGlobal import LerpScaleInterval, LerpFunctionInterval, LerpColorScaleInterval, LerpPosInterval -from direct.interval.IntervalGlobal import SoundInterval, WaitInterval -from direct.showbase.PythonUtil import Functor, bound, lerp, SerialNumGen +from direct.interval.FunctionInterval import Func, Wait +from direct.interval.IntervalGlobal import (LerpColorScaleInterval, LerpFunctionInterval, LerpPosInterval, + LerpScaleInterval, Parallel, Sequence, SoundInterval, WaitInterval) +from direct.showbase.PythonUtil import Functor, SerialNumGen, bound, lerp from direct.showbase.RandomNumGen import RandomNumGen from direct.task.Task import Task -from direct.distributed import DistributedSmoothNode -from direct.directnotify import DirectNotifyGlobal -from direct.interval.FunctionInterval import Wait, Func -from toontown.toonbase import TTLocalizer -from toontown.toon import Toon -from toontown.toonbase import ToontownGlobals -from toontown.minigame.Trajectory import Trajectory + +from toontown.minigame.DropPlacer import PartyRegionDropPlacer from toontown.minigame.OrthoDrive import OrthoDrive from toontown.minigame.OrthoWalk import OrthoWalk -from toontown.minigame.DropPlacer import PartyRegionDropPlacer +from toontown.minigame.Trajectory import Trajectory from toontown.parties import PartyGlobals -from toontown.parties.PartyCatchActivityToonSD import PartyCatchActivityToonSD -from toontown.parties.DistributedPartyActivity import DistributedPartyActivity -from toontown.parties.DistributedPartyCatchActivityBase import DistributedPartyCatchActivityBase -from toontown.parties.DistributedPartyCannonActivity import DistributedPartyCannonActivity from toontown.parties.activityFSMs import CatchActivityFSM +from toontown.parties.DistributedPartyActivity import DistributedPartyActivity +from toontown.parties.DistributedPartyCannonActivity import DistributedPartyCannonActivity +from toontown.parties.DistributedPartyCatchActivityBase import DistributedPartyCatchActivityBase +from toontown.parties.PartyCatchActivityToonSD import PartyCatchActivityToonSD +from toontown.toon import Toon +from toontown.toonbase import ToontownGlobals, TTLocalizer + class DistributedPartyCatchActivity(DistributedPartyActivity, DistributedPartyCatchActivityBase): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedPartyCatchActivity') diff --git a/toontown/parties/DistributedPartyCatchActivityAI.py b/toontown/parties/DistributedPartyCatchActivityAI.py index 6f39ce3..b61c75b 100644 --- a/toontown/parties/DistributedPartyCatchActivityAI.py +++ b/toontown/parties/DistributedPartyCatchActivityAI.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectAI import DistributedObjectAI + class DistributedPartyCatchActivityAI(DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedPartyCatchActivityAI') diff --git a/toontown/parties/DistributedPartyCatchActivityBase.py b/toontown/parties/DistributedPartyCatchActivityBase.py index 0ea760f..24a62f6 100644 --- a/toontown/parties/DistributedPartyCatchActivityBase.py +++ b/toontown/parties/DistributedPartyCatchActivityBase.py @@ -1,8 +1,11 @@ import math +from functools import reduce + from direct.directnotify import DirectNotifyGlobal + from toontown.minigame.DropScheduler import ThreePhaseDropScheduler from toontown.parties import PartyGlobals -from functools import reduce + class DistributedPartyCatchActivityBase: notify = DirectNotifyGlobal.directNotify.newCategory('DistributedPartyCatchActivityBase') diff --git a/toontown/parties/DistributedPartyCogActivity.py b/toontown/parties/DistributedPartyCogActivity.py index 6db8ffb..7dff8f2 100644 --- a/toontown/parties/DistributedPartyCogActivity.py +++ b/toontown/parties/DistributedPartyCogActivity.py @@ -1,10 +1,14 @@ -from direct.distributed.ClockDelta import globalClockDelta from panda3d.core import Point3 + +from direct.distributed.ClockDelta import globalClockDelta + from toontown.toonbase import TTLocalizer + from . import PartyGlobals from .DistributedPartyTeamActivity import DistributedPartyTeamActivity from .PartyCogActivity import PartyCogActivity + class DistributedPartyCogActivity(DistributedPartyTeamActivity): notify = directNotify.newCategory('DistributedPartyCogActivity') players = {} diff --git a/toontown/parties/DistributedPartyCogActivityAI.py b/toontown/parties/DistributedPartyCogActivityAI.py index 0328320..a4d93f5 100644 --- a/toontown/parties/DistributedPartyCogActivityAI.py +++ b/toontown/parties/DistributedPartyCogActivityAI.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectAI import DistributedObjectAI + class DistributedPartyCogActivityAI(DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedPartyCogActivityAI') diff --git a/toontown/parties/DistributedPartyDance20Activity.py b/toontown/parties/DistributedPartyDance20Activity.py index 72385da..8fdd708 100644 --- a/toontown/parties/DistributedPartyDance20Activity.py +++ b/toontown/parties/DistributedPartyDance20Activity.py @@ -2,6 +2,7 @@ from toontown.parties import PartyGlobals from toontown.parties.DistributedPartyDanceActivityBase import DistributedPartyDanceActivityBase from toontown.toonbase import TTLocalizer + class DistributedPartyDance20Activity(DistributedPartyDanceActivityBase): notify = directNotify.newCategory('DistributedPartyDanceActivity') diff --git a/toontown/parties/DistributedPartyDance20ActivityAI.py b/toontown/parties/DistributedPartyDance20ActivityAI.py index fdaf75d..c4d0c5a 100644 --- a/toontown/parties/DistributedPartyDance20ActivityAI.py +++ b/toontown/parties/DistributedPartyDance20ActivityAI.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectAI import DistributedObjectAI + class DistributedPartyDance20ActivityAI(DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedPartyDance20ActivityAI') diff --git a/toontown/parties/DistributedPartyDanceActivity.py b/toontown/parties/DistributedPartyDanceActivity.py index cbafaec..be66361 100644 --- a/toontown/parties/DistributedPartyDanceActivity.py +++ b/toontown/parties/DistributedPartyDanceActivity.py @@ -2,6 +2,7 @@ from toontown.parties import PartyGlobals from toontown.parties.DistributedPartyDanceActivityBase import DistributedPartyDanceActivityBase from toontown.toonbase import TTLocalizer + class DistributedPartyDanceActivity(DistributedPartyDanceActivityBase): notify = directNotify.newCategory('DistributedPartyDanceActivity') diff --git a/toontown/parties/DistributedPartyDanceActivityAI.py b/toontown/parties/DistributedPartyDanceActivityAI.py index f88b8b8..2e9f01a 100644 --- a/toontown/parties/DistributedPartyDanceActivityAI.py +++ b/toontown/parties/DistributedPartyDanceActivityAI.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectAI import DistributedObjectAI + class DistributedPartyDanceActivityAI(DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedPartyDanceActivityAI') diff --git a/toontown/parties/DistributedPartyDanceActivityBase.py b/toontown/parties/DistributedPartyDanceActivityBase.py index c0c940d..42142db 100644 --- a/toontown/parties/DistributedPartyDanceActivityBase.py +++ b/toontown/parties/DistributedPartyDanceActivityBase.py @@ -1,22 +1,23 @@ import random +from enum import IntEnum + from panda3d.core import * -from direct.interval.FunctionInterval import Wait, Func -from direct.interval.MetaInterval import Sequence, Parallel + from direct.fsm import FSM -from toontown.toonbase import TTLocalizer -from toontown.toonbase import ToontownGlobals +from direct.interval.FunctionInterval import Func, Wait +from direct.interval.MetaInterval import Parallel, Sequence + from toontown.minigame.OrthoDrive import OrthoDrive from toontown.minigame.OrthoWalk import OrthoWalk +from toontown.parties import PartyGlobals from toontown.parties.activityFSMs import DanceActivityFSM -from toontown.parties.PartyGlobals import ActivityIds, ActivityTypes -from toontown.parties.PartyGlobals import DancePatternToAnims, DanceAnimToName from toontown.parties.DistributedPartyActivity import DistributedPartyActivity -from toontown.parties.PartyDanceActivityToonFSM import PartyDanceActivityToonFSM -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 +from toontown.parties.PartyDanceActivityToonFSM import PartyDanceActivityToonFSM, ToonDancingStates +from toontown.parties.PartyGlobals import ActivityIds, ActivityTypes, DanceAnimToName, DancePatternToAnims +from toontown.toonbase import ToontownGlobals, TTLocalizer + DANCE_FLOOR_COLLISION = 'danceFloor_collision' DanceViews = IntEnum('DanceViews', ('Normal', 'Dancing', 'Isometric'), start=0) diff --git a/toontown/parties/DistributedPartyDanceActivityBaseAI.py b/toontown/parties/DistributedPartyDanceActivityBaseAI.py index 654cdc1..f649a86 100644 --- a/toontown/parties/DistributedPartyDanceActivityBaseAI.py +++ b/toontown/parties/DistributedPartyDanceActivityBaseAI.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectAI import DistributedObjectAI + class DistributedPartyDanceActivityBaseAI(DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedPartyDanceActivityBaseAI') diff --git a/toontown/parties/DistributedPartyFireworksActivity.py b/toontown/parties/DistributedPartyFireworksActivity.py index b1f672f..dfaabbc 100644 --- a/toontown/parties/DistributedPartyFireworksActivity.py +++ b/toontown/parties/DistributedPartyFireworksActivity.py @@ -1,24 +1,19 @@ -from panda3d.core import Vec3 -from panda3d.core import OmniBoundingVolume -from panda3d.core import AlphaTestAttrib -from panda3d.core import RenderAttrib +from panda3d.core import AlphaTestAttrib, OmniBoundingVolume, RenderAttrib, Vec3 + from direct.actor.Actor import Actor -from direct.interval.IntervalGlobal import * from direct.distributed.ClockDelta import globalClockDelta +from direct.interval.IntervalGlobal import * + from toontown.effects.FireworkShowMixin import FireworkShowMixin from toontown.effects.RocketExplosion import RocketExplosion from toontown.toonbase import TTLocalizer -from .PartyGlobals import FireworkShows -from .PartyGlobals import ActivityIds -from .PartyGlobals import ActivityTypes -from .PartyGlobals import FireworksStartedEvent -from .PartyGlobals import FireworksFinishedEvent -from .PartyGlobals import FireworksPostLaunchDelay -from .PartyGlobals import RocketSoundDelay -from .PartyGlobals import RocketDirectionDelay -from .DistributedPartyActivity import DistributedPartyActivity -from .activityFSMs import FireworksActivityFSM + from . import PartyGlobals +from .activityFSMs import FireworksActivityFSM +from .DistributedPartyActivity import DistributedPartyActivity +from .PartyGlobals import (ActivityIds, ActivityTypes, FireworksFinishedEvent, FireworkShows, FireworksPostLaunchDelay, + FireworksStartedEvent, RocketDirectionDelay, RocketSoundDelay) + class DistributedPartyFireworksActivity(DistributedPartyActivity, FireworkShowMixin): notify = directNotify.newCategory('DistributedPartyFireworksActivity') diff --git a/toontown/parties/DistributedPartyFireworksActivityAI.py b/toontown/parties/DistributedPartyFireworksActivityAI.py index 9601a0c..8f4c0bd 100644 --- a/toontown/parties/DistributedPartyFireworksActivityAI.py +++ b/toontown/parties/DistributedPartyFireworksActivityAI.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectAI import DistributedObjectAI + class DistributedPartyFireworksActivityAI(DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedPartyFireworksActivityAI') diff --git a/toontown/parties/DistributedPartyJukebox40Activity.py b/toontown/parties/DistributedPartyJukebox40Activity.py index 8454aa2..3201b1f 100644 --- a/toontown/parties/DistributedPartyJukebox40Activity.py +++ b/toontown/parties/DistributedPartyJukebox40Activity.py @@ -1,5 +1,6 @@ -from toontown.parties.DistributedPartyJukeboxActivityBase import DistributedPartyJukeboxActivityBase from toontown.parties import PartyGlobals +from toontown.parties.DistributedPartyJukeboxActivityBase import DistributedPartyJukeboxActivityBase + class DistributedPartyJukebox40Activity(DistributedPartyJukeboxActivityBase): notify = directNotify.newCategory('DistributedPartyJukeboxActivity') diff --git a/toontown/parties/DistributedPartyJukebox40ActivityAI.py b/toontown/parties/DistributedPartyJukebox40ActivityAI.py index 7d7dec9..cc4cbf4 100644 --- a/toontown/parties/DistributedPartyJukebox40ActivityAI.py +++ b/toontown/parties/DistributedPartyJukebox40ActivityAI.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectAI import DistributedObjectAI + class DistributedPartyJukebox40ActivityAI(DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedPartyJukebox40ActivityAI') diff --git a/toontown/parties/DistributedPartyJukeboxActivity.py b/toontown/parties/DistributedPartyJukeboxActivity.py index bb1f2ca..1108f39 100644 --- a/toontown/parties/DistributedPartyJukeboxActivity.py +++ b/toontown/parties/DistributedPartyJukeboxActivity.py @@ -1,5 +1,6 @@ -from toontown.parties.DistributedPartyJukeboxActivityBase import DistributedPartyJukeboxActivityBase from toontown.parties import PartyGlobals +from toontown.parties.DistributedPartyJukeboxActivityBase import DistributedPartyJukeboxActivityBase + class DistributedPartyJukeboxActivity(DistributedPartyJukeboxActivityBase): notify = directNotify.newCategory('DistributedPartyJukeboxActivity') diff --git a/toontown/parties/DistributedPartyJukeboxActivityAI.py b/toontown/parties/DistributedPartyJukeboxActivityAI.py index 309a546..6ceac88 100644 --- a/toontown/parties/DistributedPartyJukeboxActivityAI.py +++ b/toontown/parties/DistributedPartyJukeboxActivityAI.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectAI import DistributedObjectAI + class DistributedPartyJukeboxActivityAI(DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedPartyJukeboxActivityAI') diff --git a/toontown/parties/DistributedPartyJukeboxActivityBase.py b/toontown/parties/DistributedPartyJukeboxActivityBase.py index 6706f77..13e6c67 100644 --- a/toontown/parties/DistributedPartyJukeboxActivityBase.py +++ b/toontown/parties/DistributedPartyJukeboxActivityBase.py @@ -1,13 +1,16 @@ +from panda3d.core import * + from direct.actor.Actor import Actor from direct.task.Task import Task -from panda3d.core import * + from otp.otpbase.OTPBase import OTPBase -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import TTLocalizer + from toontown.parties.DistributedPartyActivity import DistributedPartyActivity -from toontown.parties.PartyGlobals import ActivityIds, ActivityTypes, JUKEBOX_TIMEOUT -from toontown.parties.PartyGlobals import getMusicRepeatTimes, MUSIC_PATH, sanitizePhase from toontown.parties.JukeboxGui import JukeboxGui +from toontown.parties.PartyGlobals import (JUKEBOX_TIMEOUT, MUSIC_PATH, ActivityIds, ActivityTypes, getMusicRepeatTimes, + sanitizePhase) +from toontown.toonbase import ToontownGlobals, TTLocalizer + class DistributedPartyJukeboxActivityBase(DistributedPartyActivity): notify = directNotify.newCategory('DistributedPartyJukeboxActivityBase') diff --git a/toontown/parties/DistributedPartyJukeboxActivityBaseAI.py b/toontown/parties/DistributedPartyJukeboxActivityBaseAI.py index 132b59d..7adcbcb 100644 --- a/toontown/parties/DistributedPartyJukeboxActivityBaseAI.py +++ b/toontown/parties/DistributedPartyJukeboxActivityBaseAI.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectAI import DistributedObjectAI + class DistributedPartyJukeboxActivityBaseAI(DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedPartyJukeboxActivityBaseAI') diff --git a/toontown/parties/DistributedPartyTeamActivity.py b/toontown/parties/DistributedPartyTeamActivity.py index 38fa5e8..e48f29c 100644 --- a/toontown/parties/DistributedPartyTeamActivity.py +++ b/toontown/parties/DistributedPartyTeamActivity.py @@ -1,9 +1,11 @@ from direct.distributed.ClockDelta import globalClockDelta -from toontown.toonbase import TTLocalizer + from toontown.parties import PartyGlobals -from toontown.parties.DistributedPartyActivity import DistributedPartyActivity from toontown.parties.activityFSMs import TeamActivityFSM +from toontown.parties.DistributedPartyActivity import DistributedPartyActivity from toontown.parties.TeamActivityGui import TeamActivityGui +from toontown.toonbase import TTLocalizer + class DistributedPartyTeamActivity(DistributedPartyActivity): notify = directNotify.newCategory('DistributedPartyTeamActivity') diff --git a/toontown/parties/DistributedPartyTeamActivityAI.py b/toontown/parties/DistributedPartyTeamActivityAI.py index 1a88a5b..cee41ff 100644 --- a/toontown/parties/DistributedPartyTeamActivityAI.py +++ b/toontown/parties/DistributedPartyTeamActivityAI.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectAI import DistributedObjectAI + class DistributedPartyTeamActivityAI(DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedPartyTeamActivityAI') diff --git a/toontown/parties/DistributedPartyTrampolineActivity.py b/toontown/parties/DistributedPartyTrampolineActivity.py index 964ad53..ad324ff 100644 --- a/toontown/parties/DistributedPartyTrampolineActivity.py +++ b/toontown/parties/DistributedPartyTrampolineActivity.py @@ -1,36 +1,28 @@ import math -import time import random -from direct.task import Task -from direct.directnotify import DirectNotifyGlobal +import time + +from panda3d.core import (BitMask32, CardMaker, CollisionNode, CollisionSphere, CollisionTube, NodePath, Point3, + TextNode, VBase3, VBase4, Vec3) + from direct.actor.Actor import Actor +from direct.directnotify import DirectNotifyGlobal from direct.fsm.FSM import FSM from direct.gui.DirectGui import DirectButton from direct.gui.OnscreenText import OnscreenText -from direct.interval.FunctionInterval import Func -from direct.interval.FunctionInterval import Wait +from direct.interval.FunctionInterval import Func, Wait from direct.interval.LerpInterval import LerpFunc -from direct.interval.MetaInterval import Parallel -from direct.interval.MetaInterval import Sequence -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 direct.interval.MetaInterval import Parallel, Sequence +from direct.task import Task + from otp.otpbase import OTPGlobals -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import TTLocalizer -from toontown.toontowngui import TTDialog -from toontown.parties import PartyGlobals -from toontown.parties.DistributedPartyActivity import DistributedPartyActivity + +from toontown.parties import PartyGlobals, PartyUtils from toontown.parties.activityFSMs import TrampolineActivityFSM -from toontown.parties import PartyUtils +from toontown.parties.DistributedPartyActivity import DistributedPartyActivity +from toontown.toonbase import ToontownGlobals, TTLocalizer +from toontown.toontowngui import TTDialog + class DistributedPartyTrampolineActivity(DistributedPartyActivity): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedPartyTrampolineActivity') diff --git a/toontown/parties/DistributedPartyTrampolineActivityAI.py b/toontown/parties/DistributedPartyTrampolineActivityAI.py index e15e909..ce95acc 100644 --- a/toontown/parties/DistributedPartyTrampolineActivityAI.py +++ b/toontown/parties/DistributedPartyTrampolineActivityAI.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectAI import DistributedObjectAI + class DistributedPartyTrampolineActivityAI(DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedPartyTrampolineActivityAI') diff --git a/toontown/parties/DistributedPartyTugOfWarActivity.py b/toontown/parties/DistributedPartyTugOfWarActivity.py index bcc2749..016d662 100644 --- a/toontown/parties/DistributedPartyTugOfWarActivity.py +++ b/toontown/parties/DistributedPartyTugOfWarActivity.py @@ -1,28 +1,23 @@ import math -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 -from direct.interval.IntervalGlobal import ActorInterval -from direct.interval.MetaInterval import Sequence -from direct.interval.MetaInterval import Parallel + +from panda3d.core import CollisionNode, CollisionTube, Point3, RopeNode, VBase3 + +from direct.fsm.StatePush import FunctionCall, StateVar from direct.interval.FunctionInterval import Func -from direct.showutil.Rope import Rope +from direct.interval.IntervalGlobal import ActorInterval, LerpPosHprInterval, LerpPosInterval, Wait +from direct.interval.MetaInterval import Parallel, Sequence from direct.showbase.PythonUtil import fitDestAngle2Src -from direct.fsm.StatePush import StateVar, FunctionCall -from toontown.toonbase import TTLocalizer -from toontown.toonbase import ToontownGlobals +from direct.showutil.Rope import Rope + from toontown.effects import Splash -from toontown.minigame.MinigamePowerMeter import MinigamePowerMeter from toontown.minigame.ArrowKeys import ArrowKeys -from . import PartyGlobals -from . import PartyUtils +from toontown.minigame.MinigamePowerMeter import MinigamePowerMeter +from toontown.toonbase import ToontownGlobals, TTLocalizer + +from . import PartyGlobals, PartyUtils from .DistributedPartyTeamActivity import DistributedPartyTeamActivity + class DistributedPartyTugOfWarActivity(DistributedPartyTeamActivity): notify = directNotify.newCategory('DistributedPartyTugOfWarActivity') diff --git a/toontown/parties/DistributedPartyTugOfWarActivityAI.py b/toontown/parties/DistributedPartyTugOfWarActivityAI.py index fb125fd..c2650b6 100644 --- a/toontown/parties/DistributedPartyTugOfWarActivityAI.py +++ b/toontown/parties/DistributedPartyTugOfWarActivityAI.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectAI import DistributedObjectAI + class DistributedPartyTugOfWarActivityAI(DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedPartyTugOfWarActivityAI') diff --git a/toontown/parties/DistributedPartyValentineDance20Activity.py b/toontown/parties/DistributedPartyValentineDance20Activity.py index 7b5db74..66cbd07 100644 --- a/toontown/parties/DistributedPartyValentineDance20Activity.py +++ b/toontown/parties/DistributedPartyValentineDance20Activity.py @@ -2,6 +2,7 @@ from toontown.parties import PartyGlobals from toontown.parties.DistributedPartyDanceActivityBase import DistributedPartyDanceActivityBase from toontown.toonbase import TTLocalizer + class DistributedPartyValentineDance20Activity(DistributedPartyDanceActivityBase): notify = directNotify.newCategory('DistributedPartyValentineDance20Activity') diff --git a/toontown/parties/DistributedPartyValentineDance20ActivityAI.py b/toontown/parties/DistributedPartyValentineDance20ActivityAI.py index ed5eaf2..2b9ae95 100644 --- a/toontown/parties/DistributedPartyValentineDance20ActivityAI.py +++ b/toontown/parties/DistributedPartyValentineDance20ActivityAI.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectAI import DistributedObjectAI + class DistributedPartyValentineDance20ActivityAI(DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedPartyValentineDance20ActivityAI') diff --git a/toontown/parties/DistributedPartyValentineDanceActivity.py b/toontown/parties/DistributedPartyValentineDanceActivity.py index 7652d1f..978493b 100644 --- a/toontown/parties/DistributedPartyValentineDanceActivity.py +++ b/toontown/parties/DistributedPartyValentineDanceActivity.py @@ -2,6 +2,7 @@ from toontown.parties import PartyGlobals from toontown.parties.DistributedPartyDanceActivityBase import DistributedPartyDanceActivityBase from toontown.toonbase import TTLocalizer + class DistributedPartyValentineDanceActivity(DistributedPartyDanceActivityBase): notify = directNotify.newCategory('DistributedPartyValentineDanceActivity') diff --git a/toontown/parties/DistributedPartyValentineDanceActivityAI.py b/toontown/parties/DistributedPartyValentineDanceActivityAI.py index b40ed01..08b0b4a 100644 --- a/toontown/parties/DistributedPartyValentineDanceActivityAI.py +++ b/toontown/parties/DistributedPartyValentineDanceActivityAI.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectAI import DistributedObjectAI + class DistributedPartyValentineDanceActivityAI(DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedPartyValentineDanceActivityAI') diff --git a/toontown/parties/DistributedPartyValentineJukebox40Activity.py b/toontown/parties/DistributedPartyValentineJukebox40Activity.py index 101db6b..392119a 100644 --- a/toontown/parties/DistributedPartyValentineJukebox40Activity.py +++ b/toontown/parties/DistributedPartyValentineJukebox40Activity.py @@ -1,5 +1,6 @@ -from toontown.parties.DistributedPartyJukeboxActivityBase import DistributedPartyJukeboxActivityBase from toontown.parties import PartyGlobals +from toontown.parties.DistributedPartyJukeboxActivityBase import DistributedPartyJukeboxActivityBase + class DistributedPartyValentineJukebox40Activity(DistributedPartyJukeboxActivityBase): notify = directNotify.newCategory('DistributedPartyValentineJukebox40Activity') diff --git a/toontown/parties/DistributedPartyValentineJukebox40ActivityAI.py b/toontown/parties/DistributedPartyValentineJukebox40ActivityAI.py index a7d793f..3379072 100644 --- a/toontown/parties/DistributedPartyValentineJukebox40ActivityAI.py +++ b/toontown/parties/DistributedPartyValentineJukebox40ActivityAI.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectAI import DistributedObjectAI + class DistributedPartyValentineJukebox40ActivityAI(DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedPartyValentineJukebox40ActivityAI') diff --git a/toontown/parties/DistributedPartyValentineJukeboxActivity.py b/toontown/parties/DistributedPartyValentineJukeboxActivity.py index 0b8f11d..c2d2104 100644 --- a/toontown/parties/DistributedPartyValentineJukeboxActivity.py +++ b/toontown/parties/DistributedPartyValentineJukeboxActivity.py @@ -1,5 +1,6 @@ -from toontown.parties.DistributedPartyJukeboxActivityBase import DistributedPartyJukeboxActivityBase from toontown.parties import PartyGlobals +from toontown.parties.DistributedPartyJukeboxActivityBase import DistributedPartyJukeboxActivityBase + class DistributedPartyValentineJukeboxActivity(DistributedPartyJukeboxActivityBase): notify = directNotify.newCategory('DistributedPartyJukeboxActivity') diff --git a/toontown/parties/DistributedPartyValentineJukeboxActivityAI.py b/toontown/parties/DistributedPartyValentineJukeboxActivityAI.py index 6844d59..ea318a1 100644 --- a/toontown/parties/DistributedPartyValentineJukeboxActivityAI.py +++ b/toontown/parties/DistributedPartyValentineJukeboxActivityAI.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectAI import DistributedObjectAI + class DistributedPartyValentineJukeboxActivityAI(DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedPartyValentineJukeboxActivityAI') diff --git a/toontown/parties/DistributedPartyValentineTrampolineActivity.py b/toontown/parties/DistributedPartyValentineTrampolineActivity.py index bb665c2..a45986f 100644 --- a/toontown/parties/DistributedPartyValentineTrampolineActivity.py +++ b/toontown/parties/DistributedPartyValentineTrampolineActivity.py @@ -1,5 +1,6 @@ from toontown.parties.DistributedPartyTrampolineActivity import DistributedPartyTrampolineActivity + class DistributedPartyValentineTrampolineActivity(DistributedPartyTrampolineActivity): def __init__(self, cr, doJellyBeans = True, doTricks = False, texture = None): diff --git a/toontown/parties/DistributedPartyValentineTrampolineActivityAI.py b/toontown/parties/DistributedPartyValentineTrampolineActivityAI.py index 6012f59..f5bae95 100644 --- a/toontown/parties/DistributedPartyValentineTrampolineActivityAI.py +++ b/toontown/parties/DistributedPartyValentineTrampolineActivityAI.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectAI import DistributedObjectAI + class DistributedPartyValentineTrampolineActivityAI(DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedPartyValentineTrampolineActivityAI') diff --git a/toontown/parties/DistributedPartyVictoryTrampolineActivity.py b/toontown/parties/DistributedPartyVictoryTrampolineActivity.py index 3659fc1..e15d0a5 100644 --- a/toontown/parties/DistributedPartyVictoryTrampolineActivity.py +++ b/toontown/parties/DistributedPartyVictoryTrampolineActivity.py @@ -1,5 +1,6 @@ from toontown.parties.DistributedPartyTrampolineActivity import DistributedPartyTrampolineActivity + class DistributedPartyVictoryTrampolineActivity(DistributedPartyTrampolineActivity): def __init__(self, cr, doJellyBeans = True, doTricks = False, texture = None): diff --git a/toontown/parties/DistributedPartyVictoryTrampolineActivityAI.py b/toontown/parties/DistributedPartyVictoryTrampolineActivityAI.py index 41930de..20e4a77 100644 --- a/toontown/parties/DistributedPartyVictoryTrampolineActivityAI.py +++ b/toontown/parties/DistributedPartyVictoryTrampolineActivityAI.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectAI import DistributedObjectAI + class DistributedPartyVictoryTrampolineActivityAI(DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedPartyVictoryTrampolineActivityAI') diff --git a/toontown/parties/DistributedPartyWinterCatchActivity.py b/toontown/parties/DistributedPartyWinterCatchActivity.py index 64322f4..a8a7274 100644 --- a/toontown/parties/DistributedPartyWinterCatchActivity.py +++ b/toontown/parties/DistributedPartyWinterCatchActivity.py @@ -1,8 +1,9 @@ from panda3d.core import NodePath -from toontown.toonbase import TTLocalizer + +from toontown.parties import PartyGlobals, WinterPartyCatchActivityToonSD from toontown.parties.DistributedPartyCatchActivity import DistributedPartyCatchActivity -from toontown.parties import PartyGlobals -from toontown.parties import WinterPartyCatchActivityToonSD +from toontown.toonbase import TTLocalizer + class DistributedPartyWinterCatchActivity(DistributedPartyCatchActivity): diff --git a/toontown/parties/DistributedPartyWinterCatchActivityAI.py b/toontown/parties/DistributedPartyWinterCatchActivityAI.py index 38a1944..bba56d4 100644 --- a/toontown/parties/DistributedPartyWinterCatchActivityAI.py +++ b/toontown/parties/DistributedPartyWinterCatchActivityAI.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectAI import DistributedObjectAI + class DistributedPartyWinterCatchActivityAI(DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedPartyWinterCatchActivityAI') diff --git a/toontown/parties/DistributedPartyWinterCogActivity.py b/toontown/parties/DistributedPartyWinterCogActivity.py index 6c5c109..e07f6ba 100644 --- a/toontown/parties/DistributedPartyWinterCogActivity.py +++ b/toontown/parties/DistributedPartyWinterCogActivity.py @@ -1,5 +1,6 @@ from toontown.parties.DistributedPartyCogActivity import DistributedPartyCogActivity + class DistributedPartyWinterCogActivity(DistributedPartyCogActivity): def __init__(self, cr): diff --git a/toontown/parties/DistributedPartyWinterCogActivityAI.py b/toontown/parties/DistributedPartyWinterCogActivityAI.py index 0aaa08a..0c85e76 100644 --- a/toontown/parties/DistributedPartyWinterCogActivityAI.py +++ b/toontown/parties/DistributedPartyWinterCogActivityAI.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectAI import DistributedObjectAI + class DistributedPartyWinterCogActivityAI(DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedPartyWinterCogActivityAI') diff --git a/toontown/parties/DistributedPartyWinterTrampolineActivity.py b/toontown/parties/DistributedPartyWinterTrampolineActivity.py index 3db46be..bc205af 100644 --- a/toontown/parties/DistributedPartyWinterTrampolineActivity.py +++ b/toontown/parties/DistributedPartyWinterTrampolineActivity.py @@ -1,5 +1,6 @@ from toontown.parties.DistributedPartyTrampolineActivity import DistributedPartyTrampolineActivity + class DistributedPartyWinterTrampolineActivity(DistributedPartyTrampolineActivity): def __init__(self, cr, doJellyBeans = True, doTricks = False, texture = None): diff --git a/toontown/parties/DistributedPartyWinterTrampolineActivityAI.py b/toontown/parties/DistributedPartyWinterTrampolineActivityAI.py index bae8a3d..813a14d 100644 --- a/toontown/parties/DistributedPartyWinterTrampolineActivityAI.py +++ b/toontown/parties/DistributedPartyWinterTrampolineActivityAI.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectAI import DistributedObjectAI + class DistributedPartyWinterTrampolineActivityAI(DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedPartyWinterTrampolineActivityAI') diff --git a/toontown/parties/InviteInfo.py b/toontown/parties/InviteInfo.py index f242bdf..02693bf 100644 --- a/toontown/parties/InviteInfo.py +++ b/toontown/parties/InviteInfo.py @@ -1,7 +1,8 @@ from direct.directnotify import DirectNotifyGlobal -from toontown.toonbase import ToontownGlobals + from toontown.parties.PartyGlobals import InviteStatus -from toontown.toonbase import TTLocalizer +from toontown.toonbase import ToontownGlobals, TTLocalizer + class InviteInfoBase: diff --git a/toontown/parties/InviteVisual.py b/toontown/parties/InviteVisual.py index 710e878..11094d2 100644 --- a/toontown/parties/InviteVisual.py +++ b/toontown/parties/InviteVisual.py @@ -1,13 +1,15 @@ -from datetime import datetime import calendar -from direct.gui.DirectGui import DirectFrame, DirectLabel -from toontown.toonbase import TTLocalizer -from direct.showbase import PythonUtil +from datetime import datetime + from direct.fsm.FSM import FSM -from toontown.parties import PartyGlobals -from toontown.parties import PartyUtils +from direct.gui.DirectGui import DirectFrame, DirectLabel +from direct.showbase import PythonUtil + +from toontown.parties import PartyGlobals, PartyUtils +from toontown.toonbase import TTLocalizer from toontown.toonbase.ToontownGlobals import VALENTINES_DAY + class InviteVisual(DirectFrame): notify = directNotify.newCategory('InviteVisual') diff --git a/toontown/parties/JellybeanRewardGui.py b/toontown/parties/JellybeanRewardGui.py index 1a45f26..e38b338 100644 --- a/toontown/parties/JellybeanRewardGui.py +++ b/toontown/parties/JellybeanRewardGui.py @@ -1,10 +1,10 @@ from panda3d.core import TextNode -from direct.gui.DirectGui import DirectFrame -from direct.gui.DirectGui import DirectButton -from direct.gui.DirectGui import DirectLabel + from direct.gui import DirectGuiGlobals -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import TTLocalizer +from direct.gui.DirectGui import DirectButton, DirectFrame, DirectLabel + +from toontown.toonbase import ToontownGlobals, TTLocalizer + class JellybeanRewardGui(DirectFrame): notify = directNotify.newCategory('JellybeanRewardGui') diff --git a/toontown/parties/JukeboxGui.py b/toontown/parties/JukeboxGui.py index c23c486..c6ee8fe 100644 --- a/toontown/parties/JukeboxGui.py +++ b/toontown/parties/JukeboxGui.py @@ -1,10 +1,12 @@ 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 + from direct.gui import DirectGuiGlobals -from toontown.toonbase import TTLocalizer +from direct.gui.DirectGui import DirectButton, DirectFrame, DirectLabel, DirectScrolledList, DirectScrolledListItem +from direct.showbase.DirectObject import DirectObject + from toontown.parties import PartyUtils +from toontown.toonbase import TTLocalizer + class JukeboxGui(DirectObject): notify = directNotify.newCategory('JukeboxGui') diff --git a/toontown/parties/KeyCodes.py b/toontown/parties/KeyCodes.py index 47af387..50d0dc2 100644 --- a/toontown/parties/KeyCodes.py +++ b/toontown/parties/KeyCodes.py @@ -1,5 +1,7 @@ from panda3d.core import * + from direct.showbase.DirectObject import DirectObject + ARROW_KEYCODE_MAP = {'arrow_up': 'u', 'arrow_down': 'd', 'arrow_left': 'l', diff --git a/toontown/parties/KeyCodesGui.py b/toontown/parties/KeyCodesGui.py index ff043bb..5dc383a 100644 --- a/toontown/parties/KeyCodesGui.py +++ b/toontown/parties/KeyCodesGui.py @@ -1,10 +1,13 @@ from panda3d.core import * -from direct.showbase.DirectObject import DirectObject + from direct.gui.DirectGui import DirectButton from direct.gui.OnscreenText import OnscreenText +from direct.showbase.DirectObject import DirectObject from direct.task import Task + +from toontown.parties.KeyCodes import KEYCODE_TIMEOUT_SECONDS, KeyCodes from toontown.toonbase import ToontownGlobals -from toontown.parties.KeyCodes import KeyCodes, KEYCODE_TIMEOUT_SECONDS + KEY_TO_INDEX = {'u': 0, 'r': 1, 'd': 2, diff --git a/toontown/parties/Party.py b/toontown/parties/Party.py index 54d12b6..9ca46fa 100644 --- a/toontown/parties/Party.py +++ b/toontown/parties/Party.py @@ -1,20 +1,23 @@ -from panda3d.core import * -from toontown.toonbase.ToonBaseGlobal import * -from toontown.toonbase.ToontownGlobals import * -from direct.gui.DirectGui import * -from direct.distributed.ClockDelta import * -from toontown.hood import Place -from direct.directnotify import DirectNotifyGlobal -from direct.fsm import ClassicFSM, State -from direct.task.Task import Task -from toontown.toonbase import TTLocalizer import random + +from panda3d.core import * + +from direct.directnotify import DirectNotifyGlobal +from direct.distributed.ClockDelta import * +from direct.fsm import ClassicFSM, State +from direct.gui.DirectGui import * from direct.showbase import PythonUtil +from direct.task.Task import Task + from otp.distributed.TelemetryLimiter import RotationLimitToH, TLGatherAllAvs, TLNull -from toontown.hood import Place -from toontown.hood import SkyUtil + +from toontown.hood import Place, SkyUtil from toontown.parties import PartyPlanner from toontown.parties.DistributedParty import DistributedParty +from toontown.toonbase import TTLocalizer +from toontown.toonbase.ToonBaseGlobal import * +from toontown.toonbase.ToontownGlobals import * + class Party(Place.Place): notify = DirectNotifyGlobal.directNotify.newCategory('Party') diff --git a/toontown/parties/PartyCatchActivityToonSD.py b/toontown/parties/PartyCatchActivityToonSD.py index ee60331..32d204e 100644 --- a/toontown/parties/PartyCatchActivityToonSD.py +++ b/toontown/parties/PartyCatchActivityToonSD.py @@ -1,14 +1,15 @@ 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 -from direct.task.Task import Task + from direct.directnotify import DirectNotifyGlobal -from direct.fsm import StateData -from toontown.minigame.OrthoWalk import OrthoWalk +from direct.fsm import ClassicFSM, State, StateData +from direct.interval.IntervalGlobal import (ActorInterval, Func, FunctionInterval, LerpScaleInterval, Parallel, + Sequence, Wait, WaitInterval) +from direct.task.Task import Task + from toontown.minigame.MinigameRulesPanel import MinigameRulesPanel +from toontown.minigame.OrthoWalk import OrthoWalk from toontown.parties import PartyGlobals -from direct.fsm import ClassicFSM, State + class PartyCatchActivityToonSD(StateData.StateData): notify = DirectNotifyGlobal.directNotify.newCategory('PartyCatchActivityToonSD') diff --git a/toontown/parties/PartyCog.py b/toontown/parties/PartyCog.py index 2631f26..a78f00b 100644 --- a/toontown/parties/PartyCog.py +++ b/toontown/parties/PartyCog.py @@ -1,20 +1,24 @@ import math + +from panda3d.core import CollisionNode, CollisionSphere, CollisionTube, Mat4, NodePath, Point3, TextNode, Vec4 + from direct.actor.Actor import Actor +from direct.fsm.FSM import FSM from direct.interval.ActorInterval import ActorInterval -from direct.interval.MetaInterval import Sequence, Parallel from direct.interval.FunctionInterval import Func, Wait +from direct.interval.LerpInterval import LerpFunc, LerpScaleInterval +from direct.interval.MetaInterval import Parallel, Sequence from direct.interval.SoundInterval import SoundInterval -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 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 +from toontown.toonbase import ToontownGlobals + from . import PartyGlobals + class PartyCogManager: def __init__(self): diff --git a/toontown/parties/PartyCogActivity.py b/toontown/parties/PartyCogActivity.py index 7bf5659..d7c2003 100644 --- a/toontown/parties/PartyCogActivity.py +++ b/toontown/parties/PartyCogActivity.py @@ -1,23 +1,23 @@ -from direct.interval.MetaInterval import Sequence, Parallel, Track -from direct.interval.FunctionInterval import Func, Wait -from direct.interval.SoundInterval import SoundInterval -from direct.interval.ActorInterval import ActorInterval -from direct.interval.ProjectileInterval import ProjectileInterval +from panda3d.core import CollisionHandlerEvent, CollisionNode, CollisionSphere, NodePath, Point3, TextNode + from direct.distributed.ClockDelta import globalClockDelta -from direct.showbase.PythonUtil import bound, lerp +from direct.interval.ActorInterval import ActorInterval +from direct.interval.FunctionInterval import Func, Wait +from direct.interval.MetaInterval import Parallel, Sequence, Track +from direct.interval.ProjectileInterval import ProjectileInterval +from direct.interval.SoundInterval import SoundInterval from direct.showbase.DirectObject import DirectObject -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 direct.showbase.PythonUtil import bound, lerp + +from toontown.toonbase import ToontownGlobals, TTLocalizer from toontown.toonbase.ToontownTimer import ToontownTimer -from . import PartyGlobals -from . import PartyCogUtils + +from . import PartyCogUtils, PartyGlobals from .PartyCog import PartyCogManager -from .PartyCogActivityPlayer import PartyCogActivityPlayer -from .PartyCogActivityPlayer import PartyCogActivityLocalPlayer +from .PartyCogActivityPlayer import PartyCogActivityLocalPlayer, PartyCogActivityPlayer from .StretchingArrow import StretchingArrow + class PartyCogActivity(DirectObject): notify = directNotify.newCategory('PartyCogActivity') cog = None @@ -500,8 +500,8 @@ class PartyCogActivity(DirectObject): return def getTossPieInterval(self, toon, x, y, z, h, p, r, power, beginFlyIval = Sequence()): - from toontown.toonbase import ToontownBattleGlobals from toontown.battle import BattleProps + from toontown.toonbase import ToontownBattleGlobals pie = toon.getPieModel() pie.setScale(0.5) flyPie = pie.copyTo(NodePath('a')) diff --git a/toontown/parties/PartyCogActivityGui.py b/toontown/parties/PartyCogActivityGui.py index e112682..ca37f06 100644 --- a/toontown/parties/PartyCogActivityGui.py +++ b/toontown/parties/PartyCogActivityGui.py @@ -1,16 +1,17 @@ -from direct.gui.DirectGui import DirectWaitBar, DGG +from panda3d.core import Point3, TextNode, VBase4 + +from direct.gui.DirectGui import DGG, DirectWaitBar from direct.gui.OnscreenText import OnscreenText -from direct.showbase.DirectObject import DirectObject +from direct.interval.FunctionInterval import Func, Wait from direct.interval.LerpInterval import LerpScaleInterval from direct.interval.MetaInterval import Sequence -from direct.interval.FunctionInterval import Wait, Func -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 +from direct.showbase.DirectObject import DirectObject + +from toontown.toonbase import ToontownGlobals, ToontownIntervals, TTLocalizer + from . import PartyGlobals + class PartyCogTrackerGui: def __init__(self): diff --git a/toontown/parties/PartyCogActivityInput.py b/toontown/parties/PartyCogActivityInput.py index b53cd1e..a3970c7 100644 --- a/toontown/parties/PartyCogActivityInput.py +++ b/toontown/parties/PartyCogActivityInput.py @@ -1,5 +1,7 @@ -from direct.showbase.DirectObject import DirectObject from panda3d.core import ModifierButtons + +from direct.showbase.DirectObject import DirectObject + 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 3262887..4335cfe 100644 --- a/toontown/parties/PartyCogActivityPlayer.py +++ b/toontown/parties/PartyCogActivityPlayer.py @@ -1,21 +1,25 @@ import math + +from panda3d.core import NodePath, Point3, VBase3 + +from direct.directnotify import DirectNotifyGlobal +from direct.interval.FunctionInterval import Func, Wait +from direct.interval.LerpInterval import LerpFunc, LerpScaleInterval +from direct.interval.MetaInterval import Parallel, Sequence +from direct.interval.SoundInterval import SoundInterval from direct.showbase.PythonUtil import bound, lerp from direct.task.Task import Task -from direct.interval.MetaInterval import Sequence, Parallel -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 panda3d.core import NodePath, Point3, VBase3 -from toontown.minigame.OrthoDrive import OrthoDrive -from toontown.minigame.OrthoWalk import OrthoWalk + from toontown.battle.BattleProps import globalPropPool from toontown.battle.BattleSounds import globalBattleSoundCache +from toontown.minigame.OrthoDrive import OrthoDrive +from toontown.minigame.OrthoWalk import OrthoWalk + from . import PartyGlobals -from .PartyCogActivityInput import PartyCogActivityInput from .PartyCogActivityGui import PartyCogActivityGui -from .PartyCogUtils import CameraManager -from .PartyCogUtils import StrafingControl +from .PartyCogActivityInput import PartyCogActivityInput +from .PartyCogUtils import CameraManager, StrafingControl + UPDATE_TASK_NAME = 'PartyCogActivityLocalPlayer_UpdateTask' THROW_PIE_LIMIT_TIME = 0.2 diff --git a/toontown/parties/PartyCogUtils.py b/toontown/parties/PartyCogUtils.py index 0ee44c3..7d32b66 100644 --- a/toontown/parties/PartyCogUtils.py +++ b/toontown/parties/PartyCogUtils.py @@ -1,6 +1,9 @@ import math + from panda3d.core import NodePath, Point3 + from . import PartyGlobals + inverse_e = 1.0 / math.e def getCogDistanceUnitsFromCenter(distance): diff --git a/toontown/parties/PartyDanceActivityToonFSM.py b/toontown/parties/PartyDanceActivityToonFSM.py index a8a6622..aacbe2b 100644 --- a/toontown/parties/PartyDanceActivityToonFSM.py +++ b/toontown/parties/PartyDanceActivityToonFSM.py @@ -1,9 +1,12 @@ from panda3d.core import * + from direct.fsm.FSM import FSM -from direct.showbase import PythonUtil from direct.interval.MetaInterval import Sequence +from direct.showbase import PythonUtil + from toontown.parties.PartyGlobals import DanceReverseLoopAnims, ToonDancingStates + class PartyDanceActivityToonFSM(FSM): notify = directNotify.newCategory('PartyDanceActivityToonFSM') diff --git a/toontown/parties/PartyEditor.py b/toontown/parties/PartyEditor.py index 37ff677..fd71ff1 100644 --- a/toontown/parties/PartyEditor.py +++ b/toontown/parties/PartyEditor.py @@ -1,17 +1,19 @@ import time -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 -from direct.showbase import PythonUtil + +from panda3d.core import Point3, TextNode, VBase4, Vec3, Vec4 + from direct.fsm.FSM import FSM -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import TTLocalizer -from toontown.parties import PartyGlobals -from toontown.parties.PartyInfo import PartyInfo -from toontown.parties import PartyUtils +from direct.gui import DirectGuiGlobals +from direct.gui.DirectGui import DirectButton, DirectCheckButton, DirectFrame, DirectLabel, DirectScrolledList +from direct.showbase import PythonUtil +from direct.showbase.DirectObject import DirectObject + +from toontown.parties import PartyGlobals, PartyUtils from toontown.parties.PartyEditorGrid import PartyEditorGrid from toontown.parties.PartyEditorListElement import PartyEditorListElement +from toontown.parties.PartyInfo import PartyInfo +from toontown.toonbase import ToontownGlobals, TTLocalizer + class PartyEditor(FSM, DirectObject): notify = directNotify.newCategory('PartyEditor') diff --git a/toontown/parties/PartyEditorGrid.py b/toontown/parties/PartyEditorGrid.py index b0450e3..3a2e400 100644 --- a/toontown/parties/PartyEditorGrid.py +++ b/toontown/parties/PartyEditorGrid.py @@ -1,14 +1,14 @@ -from panda3d.core import Vec3, Vec4, Point3, TextNode, VBase4 -from direct.gui.DirectGui import DirectFrame, DirectButton, DirectLabel, DirectScrolledList, DirectCheckButton +from panda3d.core import Point3, TextNode, VBase4, Vec3, Vec4 + from direct.gui import DirectGuiGlobals -from direct.showbase import DirectObject -from direct.showbase import PythonUtil -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import TTLocalizer -from toontown.parties import PartyGlobals -from toontown.parties.PartyInfo import PartyInfo -from toontown.parties import PartyUtils +from direct.gui.DirectGui import DirectButton, DirectCheckButton, DirectFrame, DirectLabel, DirectScrolledList +from direct.showbase import DirectObject, PythonUtil + +from toontown.parties import PartyGlobals, PartyUtils from toontown.parties.PartyEditorGridSquare import PartyEditorGridSquare +from toontown.parties.PartyInfo import PartyInfo +from toontown.toonbase import ToontownGlobals, TTLocalizer + class PartyEditorGrid: notify = directNotify.newCategory('PartyEditorGrid') diff --git a/toontown/parties/PartyEditorGridElement.py b/toontown/parties/PartyEditorGridElement.py index 8748a1e..0b794de 100644 --- a/toontown/parties/PartyEditorGridElement.py +++ b/toontown/parties/PartyEditorGridElement.py @@ -1,14 +1,14 @@ -from panda3d.core import Vec3, Vec4, Point3, TextNode, VBase4, NodePath -from direct.gui.DirectGui import DirectFrame, DirectButton, DirectLabel, DirectScrolledList, DirectCheckButton +from panda3d.core import NodePath, Point3, TextNode, VBase4, Vec3, Vec4 + from direct.gui import DirectGuiGlobals -from direct.showbase import DirectObject -from direct.showbase import PythonUtil +from direct.gui.DirectGui import DirectButton, DirectCheckButton, DirectFrame, DirectLabel, DirectScrolledList +from direct.showbase import DirectObject, PythonUtil from direct.task.Task import Task -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import TTLocalizer -from toontown.parties import PartyGlobals + +from toontown.parties import PartyGlobals, PartyUtils from toontown.parties.PartyInfo import PartyInfo -from toontown.parties import PartyUtils +from toontown.toonbase import ToontownGlobals, TTLocalizer + class PartyEditorGridElement(DirectButton): notify = directNotify.newCategory('PartyEditorGridElement') diff --git a/toontown/parties/PartyEditorGridSquare.py b/toontown/parties/PartyEditorGridSquare.py index 7c9cfb3..3e922ca 100644 --- a/toontown/parties/PartyEditorGridSquare.py +++ b/toontown/parties/PartyEditorGridSquare.py @@ -1,13 +1,14 @@ -from panda3d.core import Vec3, Vec4, Point3, TextNode, VBase4 -from direct.gui.DirectGui import DirectFrame, DirectButton, DirectLabel, DirectScrolledList, DirectCheckButton +from panda3d.core import Point3, TextNode, VBase4, Vec3, Vec4 + from direct.gui import DirectGuiGlobals -from direct.showbase.DirectObject import DirectObject +from direct.gui.DirectGui import DirectButton, DirectCheckButton, DirectFrame, DirectLabel, DirectScrolledList from direct.showbase import PythonUtil -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import TTLocalizer -from toontown.parties import PartyGlobals +from direct.showbase.DirectObject import DirectObject + +from toontown.parties import PartyGlobals, PartyUtils from toontown.parties.PartyInfo import PartyInfo -from toontown.parties import PartyUtils +from toontown.toonbase import ToontownGlobals, TTLocalizer + class PartyEditorGridSquare(DirectObject): notify = directNotify.newCategory('PartyEditorGridSquare') diff --git a/toontown/parties/PartyEditorListElement.py b/toontown/parties/PartyEditorListElement.py index 6fd5162..a25986e 100644 --- a/toontown/parties/PartyEditorListElement.py +++ b/toontown/parties/PartyEditorListElement.py @@ -1,10 +1,13 @@ from panda3d.core import Vec3 -from direct.gui.DirectGui import DirectButton, DirectLabel + from direct.gui import DirectGuiGlobals -from toontown.toonbase import TTLocalizer +from direct.gui.DirectGui import DirectButton, DirectLabel + from toontown.parties import PartyGlobals from toontown.parties.PartyEditorGridElement import PartyEditorGridElement from toontown.parties.PartyUtils import getPartyActivityIcon +from toontown.toonbase import TTLocalizer + class PartyEditorListElement(DirectButton): notify = directNotify.newCategory('PartyEditorListElement') diff --git a/toontown/parties/PartyGlobals.py b/toontown/parties/PartyGlobals.py index 895e54a..cb2cf69 100644 --- a/toontown/parties/PartyGlobals.py +++ b/toontown/parties/PartyGlobals.py @@ -1,7 +1,9 @@ -from panda3d.core import BitMask32 -from panda3d.core import Point3, VBase4 -from toontown.toonbase import TTLocalizer from enum import IntEnum + +from panda3d.core import BitMask32, Point3, VBase4 + +from toontown.toonbase import TTLocalizer + KICK_TO_PLAYGROUND_EVENT = 'parties_kickToPlayground' MaxSetInvites = 1000 MaxSetPartiesInvitedTo = 100 diff --git a/toontown/parties/PartyInfo.py b/toontown/parties/PartyInfo.py index 816f7cf..e48af1e 100644 --- a/toontown/parties/PartyInfo.py +++ b/toontown/parties/PartyInfo.py @@ -1,8 +1,11 @@ from datetime import datetime + from direct.directnotify import DirectNotifyGlobal -from toontown.parties.PartyGlobals import InviteTheme -from toontown.parties.DecorBase import DecorBase + from toontown.parties.ActivityBase import ActivityBase +from toontown.parties.DecorBase import DecorBase +from toontown.parties.PartyGlobals import InviteTheme + class PartyInfoBase: notify = DirectNotifyGlobal.directNotify.newCategory('PartyInfoBase') diff --git a/toontown/parties/PartyLoader.py b/toontown/parties/PartyLoader.py index 9360194..6a770c2 100644 --- a/toontown/parties/PartyLoader.py +++ b/toontown/parties/PartyLoader.py @@ -1,14 +1,18 @@ import math import random -from direct.directnotify import DirectNotifyGlobal -from direct.interval.IntervalGlobal import * -from direct.fsm import ClassicFSM, State + from panda3d.core import * from panda3d.core import NodePath -from toontown.toonbase.ToontownGlobals import * -from toontown.safezone import SafeZoneLoader + +from direct.directnotify import DirectNotifyGlobal +from direct.fsm import ClassicFSM, State +from direct.interval.IntervalGlobal import * + from toontown.parties import Party -from toontown.parties.PartyGlobals import FireworksStartedEvent, FireworksFinishedEvent +from toontown.parties.PartyGlobals import FireworksFinishedEvent, FireworksStartedEvent +from toontown.safezone import SafeZoneLoader +from toontown.toonbase.ToontownGlobals import * + class PartyLoader(SafeZoneLoader.SafeZoneLoader): notify = DirectNotifyGlobal.directNotify.newCategory('PartyLoader') diff --git a/toontown/parties/PartyPlanner.py b/toontown/parties/PartyPlanner.py index b598083..dcc16dd 100644 --- a/toontown/parties/PartyPlanner.py +++ b/toontown/parties/PartyPlanner.py @@ -1,29 +1,29 @@ import calendar -from datetime import datetime -from datetime import timedelta -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 -from direct.showbase import DirectObject -from direct.showbase import PythonUtil +from datetime import datetime, timedelta + +from panda3d.core import * +from panda3d.core import Point3, TextNode, VBase4, Vec3, Vec4 + +from direct.directnotify import DirectNotifyGlobal from direct.fsm.FSM import FSM -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import TTLocalizer -from toontown.toontowngui import TTDialog -from toontown.toontowngui.TeaserPanel import TeaserPanel -from toontown.toon import ToonHead -from toontown.parties import PartyGlobals +from direct.gui import DirectGuiGlobals +from direct.gui.DirectGui import DirectButton, DirectCheckButton, DirectFrame, DirectLabel, DirectScrolledList +from direct.showbase import DirectObject, PythonUtil + +from otp.otpbase import OTPGlobals, OTPLocalizer + from toontown.friends.FriendsListPanel import determineFriendName -from toontown.parties.ScrolledFriendList import ScrolledFriendList +from toontown.parties import PartyGlobals, PartyUtils from toontown.parties.CalendarGuiMonth import CalendarGuiMonth from toontown.parties.InviteVisual import InviteVisual -from toontown.parties.PartyInfo import PartyInfo -from toontown.parties import PartyUtils from toontown.parties.PartyEditor import PartyEditor -from otp.otpbase import OTPGlobals -from panda3d.core import * -from direct.directnotify import DirectNotifyGlobal +from toontown.parties.PartyInfo import PartyInfo +from toontown.parties.ScrolledFriendList import ScrolledFriendList +from toontown.toon import ToonHead +from toontown.toonbase import ToontownGlobals, TTLocalizer +from toontown.toontowngui import TTDialog +from toontown.toontowngui.TeaserPanel import TeaserPanel + class PartyPlanner(DirectFrame, FSM): notify = DirectNotifyGlobal.directNotify.newCategory('PartyPlanner') diff --git a/toontown/parties/PartyUtils.py b/toontown/parties/PartyUtils.py index c163e1c..8b56f2e 100644 --- a/toontown/parties/PartyUtils.py +++ b/toontown/parties/PartyUtils.py @@ -1,12 +1,16 @@ +import datetime import math import time -import datetime + +from panda3d.core import Vec3 + from direct.directnotify import DirectNotifyGlobal from direct.interval.LerpInterval import LerpFunc -from panda3d.core import Vec3 + +from toontown.parties import PartyGlobals from toontown.toonbase import TTLocalizer from toontown.toonbase.ToontownTimer import ToontownTimer -from toontown.parties import PartyGlobals + notify = DirectNotifyGlobal.directNotify.newCategory('PartyUtils') def getNewToontownTimer(): diff --git a/toontown/parties/PublicPartyGui.py b/toontown/parties/PublicPartyGui.py index bd7f8a7..1271303 100644 --- a/toontown/parties/PublicPartyGui.py +++ b/toontown/parties/PublicPartyGui.py @@ -1,15 +1,16 @@ -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 -from direct.showbase import PythonUtil -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import TTLocalizer -from toontown.toontowngui import TTDialog -from toontown.parties import PartyGlobals -from toontown.parties import PartyUtils import functools +from panda3d.core import Point3, TextNode, VBase4, Vec3, Vec4 + +from direct.gui import DirectGuiGlobals +from direct.gui.DirectGui import DGG, DirectButton, DirectCheckButton, DirectFrame, DirectLabel, DirectScrolledList +from direct.showbase import DirectObject, PythonUtil + +from toontown.parties import PartyGlobals, PartyUtils +from toontown.toonbase import ToontownGlobals, TTLocalizer +from toontown.toontowngui import TTDialog + + class PublicPartyGui(DirectFrame): notify = directNotify.newCategory('PublicPartyGui') diff --git a/toontown/parties/ScrolledFriendList.py b/toontown/parties/ScrolledFriendList.py index 1bca984..5e08c74 100644 --- a/toontown/parties/ScrolledFriendList.py +++ b/toontown/parties/ScrolledFriendList.py @@ -1,9 +1,11 @@ -from direct.gui.DirectGui import DirectFrame, DirectButton, DirectLabel -from direct.gui.DirectGui import DirectScrolledList, DirectCheckButton -from direct.gui.DirectCheckBox import DirectCheckBox +from panda3d.core import NodePath, Plane, PlaneNode, Point3, TextNode, VBase4, Vec3, Vec4 + from direct.gui import DirectGuiGlobals +from direct.gui.DirectCheckBox import DirectCheckBox +from direct.gui.DirectGui import DirectButton, DirectCheckButton, DirectFrame, DirectLabel, DirectScrolledList + from toontown.toonbase import ToontownGlobals -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 c846635..7d4d088 100644 --- a/toontown/parties/ServerTimeGui.py +++ b/toontown/parties/ServerTimeGui.py @@ -1,8 +1,11 @@ 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 + class ServerTimeGui(DirectFrame): def __init__(self, parent, pos = (0, 0, 0), hourCallback = None): diff --git a/toontown/parties/StretchingArrow.py b/toontown/parties/StretchingArrow.py index 582cebd..6d8a083 100644 --- a/toontown/parties/StretchingArrow.py +++ b/toontown/parties/StretchingArrow.py @@ -1,7 +1,10 @@ import math -from direct.gui.DirectGui import DirectFrame + from panda3d.core import Point3 +from direct.gui.DirectGui import DirectFrame + + class StretchingArrow(DirectFrame): notify = directNotify.newCategory('StretchingArrow') arrowMoving = 0 diff --git a/toontown/parties/TeamActivityGui.py b/toontown/parties/TeamActivityGui.py index 3eeb035..4fb92ab 100644 --- a/toontown/parties/TeamActivityGui.py +++ b/toontown/parties/TeamActivityGui.py @@ -1,11 +1,12 @@ from panda3d.core import TextNode + from direct.gui.DirectButton import DirectButton from direct.gui.OnscreenText import OnscreenText from direct.task.Task import Task -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import TTLocalizer -from toontown.parties import PartyUtils -from toontown.parties import PartyGlobals + +from toontown.parties import PartyGlobals, PartyUtils +from toontown.toonbase import ToontownGlobals, TTLocalizer + class TeamActivityGui: COUNTDOWN_TASK_NAME = 'updateCountdownTask' diff --git a/toontown/parties/ToontownTimeManager.py b/toontown/parties/ToontownTimeManager.py index 5b41a33..b162b7c 100644 --- a/toontown/parties/ToontownTimeManager.py +++ b/toontown/parties/ToontownTimeManager.py @@ -1,9 +1,13 @@ import time from datetime import datetime, timedelta -import pytz + from direct.directnotify import DirectNotifyGlobal + +import pytz + from toontown.toonbase import TTLocalizer + class ToontownTimeManager: notify = DirectNotifyGlobal.directNotify.newCategory('ToontownTimeManager') ClockFormat = '%I:%M:%S %p' diff --git a/toontown/parties/WinterPartyCatchActivityToonSD.py b/toontown/parties/WinterPartyCatchActivityToonSD.py index fca8561..9a4582e 100644 --- a/toontown/parties/WinterPartyCatchActivityToonSD.py +++ b/toontown/parties/WinterPartyCatchActivityToonSD.py @@ -1,10 +1,12 @@ -from . import PartyCatchActivityToonSD 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 -from direct.interval.IntervalGlobal import WaitInterval, ActorInterval, FunctionInterval from direct.fsm import ClassicFSM, State +from direct.interval.IntervalGlobal import (ActorInterval, Func, FunctionInterval, LerpColorScaleInterval, Parallel, + Sequence, Wait, WaitInterval) + +from . import PartyCatchActivityToonSD + class WinterPartyCatchActivityToonSD(PartyCatchActivityToonSD.PartyCatchActivityToonSD): notify = DirectNotifyGlobal.directNotify.newCategory('PartyCatchActivityToonSD') diff --git a/toontown/parties/activityFSMMixins.py b/toontown/parties/activityFSMMixins.py index 44b2949..dd4cfaa 100644 --- a/toontown/parties/activityFSMMixins.py +++ b/toontown/parties/activityFSMMixins.py @@ -1,5 +1,6 @@ from .BaseActivityFSM import BaseActivityFSM + class IdleMixin: def enterIdle(self, *args): diff --git a/toontown/parties/activityFSMs.py b/toontown/parties/activityFSMs.py index 94027e2..b791e53 100644 --- a/toontown/parties/activityFSMs.py +++ b/toontown/parties/activityFSMs.py @@ -1,14 +1,9 @@ from direct.directnotify import DirectNotifyGlobal + +from .activityFSMMixins import (ActiveMixin, ConclusionMixin, DisabledMixin, IdleMixin, RulesMixin, + WaitClientsReadyMixin, WaitForEnoughMixin, WaitForServerMixin, WaitToStartMixin) from .BaseActivityFSM import BaseActivityFSM -from .activityFSMMixins import IdleMixin -from .activityFSMMixins import RulesMixin -from .activityFSMMixins import ActiveMixin -from .activityFSMMixins import DisabledMixin -from .activityFSMMixins import ConclusionMixin -from .activityFSMMixins import WaitForEnoughMixin -from .activityFSMMixins import WaitToStartMixin -from .activityFSMMixins import WaitClientsReadyMixin -from .activityFSMMixins import WaitForServerMixin + class FireworksActivityFSM(BaseActivityFSM, IdleMixin, ActiveMixin, DisabledMixin): notify = DirectNotifyGlobal.directNotify.newCategory('FireworksActivityFSM') diff --git a/toontown/pets/DistributedPet.py b/toontown/pets/DistributedPet.py index 78f5a15..903b95e 100644 --- a/toontown/pets/DistributedPet.py +++ b/toontown/pets/DistributedPet.py @@ -1,20 +1,23 @@ +import random + from panda3d.core import * -from panda3d.core import * -from direct.interval.IntervalGlobal import * -from direct.showbase.PythonUtil import * + from direct.directnotify import DirectNotifyGlobal from direct.distributed import DistributedSmoothNode from direct.distributed.ClockDelta import globalClockDelta from direct.distributed.MsgTypes import * +from direct.interval.IntervalGlobal import * +from direct.showbase.PythonUtil import * from direct.task import Task + from otp.otpbase import OTPGlobals -from toontown.pets import Pet, PetBase, PetTraits, PetConstants, PetManager, PetAvatarPanel -from toontown.pets import PetMood, PetTricks -from toontown.hood import ZoneUtil -from toontown.toonbase import TTLocalizer + from toontown.distributed import DelayDelete from toontown.distributed.DelayDeletable import DelayDeletable -import random +from toontown.hood import ZoneUtil +from toontown.pets import Pet, PetAvatarPanel, PetBase, PetConstants, PetManager, PetMood, PetTraits, PetTricks +from toontown.toonbase import TTLocalizer + if __dev__: import pdb BeanColors = (VBase4(1.0, 0.2, 0.2, 1.0), diff --git a/toontown/pets/DistributedPetAI.py b/toontown/pets/DistributedPetAI.py index 3092abc..be8165e 100644 --- a/toontown/pets/DistributedPetAI.py +++ b/toontown/pets/DistributedPetAI.py @@ -1,28 +1,26 @@ -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 -from direct.distributed import DistributedSmoothNodeAI -from direct.distributed import DistributedSmoothNodeBase -from direct.distributed import ClockDelta -from direct.fsm import ClassicFSM, State -from direct.interval.IntervalGlobal import * -from toontown.toonbase import ToontownGlobals -from direct.task import Task -from otp.movement import Mover -from toontown.pets import PetChase, PetFlee, PetWander, PetLeash -from toontown.pets import PetCollider, PetSphere, PetLookerAI -from toontown.pets import PetConstants, PetDNA, PetTraits -from toontown.pets import PetObserve, PetBrain, PetMood -from toontown.pets import PetActionFSM, PetBase, PetGoal, PetTricks -from direct.fsm import FSM -from toontown.toon import DistributedToonAI -from toontown.ai import ServerEventBuffer -import random -import time -import string import copy -from direct.showbase.PythonUtil import StackTrace +import random +import string +import time + +from panda3d.core import * + +from direct.directnotify import DirectNotifyGlobal +from direct.distributed import ClockDelta, DistributedSmoothNodeAI, DistributedSmoothNodeBase +from direct.fsm import FSM, ClassicFSM, State +from direct.interval.IntervalGlobal import * +from direct.showbase.PythonUtil import StackTrace, clampScalar, contains, lerp, list2dict, randFloat, weightedChoice +from direct.task import Task + +from otp.movement import Mover + +from toontown.ai import ServerEventBuffer +from toontown.pets import (PetActionFSM, PetBase, PetBrain, PetChase, PetCollider, PetConstants, PetDNA, PetFlee, + PetGoal, PetLeash, PetLookerAI, PetMood, PetObserve, PetSphere, PetTraits, PetTricks, + PetWander) +from toontown.toon import DistributedToonAI +from toontown.toonbase import ToontownGlobals + class DistributedPetAI(DistributedSmoothNodeAI.DistributedSmoothNodeAI, PetLookerAI.PetLookerAI, PetBase.PetBase): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedPetAI') diff --git a/toontown/pets/DistributedPetProxy.py b/toontown/pets/DistributedPetProxy.py index 97c9e4c..3c1535f 100644 --- a/toontown/pets/DistributedPetProxy.py +++ b/toontown/pets/DistributedPetProxy.py @@ -1,10 +1,12 @@ -from direct.distributed import DistributedObject -from direct.directnotify import DirectNotifyGlobal -from toontown.pets import PetTraits -from toontown.pets import PetMood, PetTricks -from toontown.toonbase import ToontownGlobals import string +from direct.directnotify import DirectNotifyGlobal +from direct.distributed import DistributedObject + +from toontown.pets import PetMood, PetTraits, PetTricks +from toontown.toonbase import ToontownGlobals + + class DistributedPetProxy(DistributedObject.DistributedObject): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedPetProxy') diff --git a/toontown/pets/DistributedPetProxyAI.py b/toontown/pets/DistributedPetProxyAI.py index 156eef1..b1fc2ec 100644 --- a/toontown/pets/DistributedPetProxyAI.py +++ b/toontown/pets/DistributedPetProxyAI.py @@ -1,13 +1,15 @@ -from direct.showbase.PythonUtil import contains, lerp, clampScalar -from direct.distributed import DistributedObjectAI -from direct.directnotify import DirectNotifyGlobal -from toontown.pets import PetTraits, PetTricks -from toontown.pets import PetMood -from toontown.toonbase import ToontownGlobals -import random -import time -import string import copy +import random +import string +import time + +from direct.directnotify import DirectNotifyGlobal +from direct.distributed import DistributedObjectAI +from direct.showbase.PythonUtil import clampScalar, contains, lerp + +from toontown.pets import PetMood, PetTraits, PetTricks +from toontown.toonbase import ToontownGlobals + BATTLE_TRICK_HP_MULTIPLIER = 10.0 class DistributedPetProxyAI(DistributedObjectAI.DistributedObjectAI): diff --git a/toontown/pets/Pet.py b/toontown/pets/Pet.py index b23e1a6..145cb1c 100644 --- a/toontown/pets/Pet.py +++ b/toontown/pets/Pet.py @@ -1,18 +1,25 @@ +import random +from enum import IntEnum + from panda3d.core import * + +from direct.actor import Actor from direct.directnotify import DirectNotifyGlobal -from direct.interval.IntervalGlobal import * +from direct.distributed.ClockDelta import globalClockDelta from direct.fsm.ClassicFSM import * from direct.fsm.State import * -from direct.distributed.ClockDelta import globalClockDelta -from otp.avatar import Avatar -from direct.actor import Actor +from direct.interval.IntervalGlobal import * from direct.task import Task + +from otp.avatar import Avatar + 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 enum import IntEnum -import random +from toontown.toonbase import ToontownGlobals, TTLocalizer + +from .PetDNA import (AllPetColors, BodyTextures, BodyTypes, ColorScales, EarParts, EarTextures, GiraffeTail, HeadParts, + LeopardTail, NoseParts, PetEyeColors, PetGenders, TailParts, TailTextures, getColors, + getEarTexture, getFootTexture) + Component2IconDict = {'boredom': 'Bored', 'restlessness': None, 'playfulness': 'Play', diff --git a/toontown/pets/PetActionFSM.py b/toontown/pets/PetActionFSM.py index 2f11cf0..92d34c9 100644 --- a/toontown/pets/PetActionFSM.py +++ b/toontown/pets/PetActionFSM.py @@ -1,12 +1,14 @@ from direct.directnotify import DirectNotifyGlobal +from direct.distributed.ClockDelta import globalClockDelta from direct.fsm import FSM from direct.interval.IntervalGlobal import * -from direct.task import Task -from direct.distributed.ClockDelta import globalClockDelta from direct.showbase.PythonUtil import lerp +from direct.task import Task + from toontown.pets import PetTricks from toontown.toon import DistributedToonAI + class PetActionFSM(FSM.FSM): notify = DirectNotifyGlobal.directNotify.newCategory('PetActionFSM') diff --git a/toontown/pets/PetAvatarPanel.py b/toontown/pets/PetAvatarPanel.py index d665967..02d2cea 100644 --- a/toontown/pets/PetAvatarPanel.py +++ b/toontown/pets/PetAvatarPanel.py @@ -1,19 +1,19 @@ from panda3d.core import * + from direct.directnotify.DirectNotifyGlobal import * +from direct.distributed import DistributedObject from direct.gui.DirectGui import * -from panda3d.core import * from direct.showbase import DirectObject from direct.showbase.PythonUtil import Functor from direct.task.Task import Task -from direct.distributed import DistributedObject + from otp.avatar import Avatar, AvatarPanel -from toontown.toon import ToonHead -from toontown.toon import LaffMeter -from toontown.toon import ToonAvatarDetailPanel + from toontown.friends import FriendHandle -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import TTLocalizer from toontown.pets import Pet, PetConstants, PetDetailPanel +from toontown.toon import LaffMeter, ToonAvatarDetailPanel, ToonHead +from toontown.toonbase import ToontownGlobals, TTLocalizer + class PetAvatarPanel(AvatarPanel.AvatarPanel): notify = directNotify.newCategory('PetAvatarPanel') diff --git a/toontown/pets/PetBase.py b/toontown/pets/PetBase.py index e558233..34b4de6 100644 --- a/toontown/pets/PetBase.py +++ b/toontown/pets/PetBase.py @@ -1,7 +1,9 @@ -from toontown.pets.PetConstants import AnimMoods -from toontown.pets import PetMood import string +from toontown.pets import PetMood +from toontown.pets.PetConstants import AnimMoods + + class PetBase: def getSetterName(self, valueName, prefix = 'set'): diff --git a/toontown/pets/PetBrain.py b/toontown/pets/PetBrain.py index 86cd86f..e9aa139 100644 --- a/toontown/pets/PetBrain.py +++ b/toontown/pets/PetBrain.py @@ -1,16 +1,19 @@ +import random +import types + from panda3d.core import * from panda3d.toontown import * -from direct.showbase.PythonUtil import weightedChoice, randFloat, Functor -from direct.showbase.PythonUtil import list2dict -from direct.showbase import DirectObject -from direct.distributed import DistributedObjectAI + from direct.directnotify import DirectNotifyGlobal -from direct.task import Task +from direct.distributed import DistributedObjectAI from direct.fsm import FSM +from direct.showbase import DirectObject +from direct.showbase.PythonUtil import Functor, list2dict, randFloat, weightedChoice +from direct.task import Task + +from toontown.pets import PetConstants, PetGoal, PetGoalMgr, PetLookerAI, PetObserve, PetTricks from toontown.toon import DistributedToonAI -from toontown.pets import PetConstants, PetObserve, PetGoal, PetGoalMgr -from toontown.pets import PetTricks, PetLookerAI -import random, types + class PetBrain(DirectObject.DirectObject, CPetBrain): notify = DirectNotifyGlobal.directNotify.newCategory('PetBrain') diff --git a/toontown/pets/PetChase.py b/toontown/pets/PetChase.py index 4eb8232..c5c35d4 100644 --- a/toontown/pets/PetChase.py +++ b/toontown/pets/PetChase.py @@ -1,8 +1,12 @@ -from panda3d.core import * -from direct.showbase.PythonUtil import reduceAngle -from otp.movement import Impulse import math +from panda3d.core import * + +from direct.showbase.PythonUtil import reduceAngle + +from otp.movement import Impulse + + class PetChase(Impulse.Impulse): def __init__(self, target = None, minDist = None, moveAngle = None): diff --git a/toontown/pets/PetCollider.py b/toontown/pets/PetCollider.py index ad91015..8fe7aa4 100644 --- a/toontown/pets/PetCollider.py +++ b/toontown/pets/PetCollider.py @@ -1,8 +1,11 @@ from panda3d.core import * + from direct.showbase.PythonUtil import reduceAngle + from otp.movement import Impulse from otp.otpbase import OTPGlobals + class PetCollider(Impulse.Impulse): SerialNum = 0 diff --git a/toontown/pets/PetConstants.py b/toontown/pets/PetConstants.py index 29485e5..3daa4b6 100644 --- a/toontown/pets/PetConstants.py +++ b/toontown/pets/PetConstants.py @@ -1,6 +1,9 @@ -from panda3d.core import * -from toontown.toonbase import ToontownGlobals from enum import IntEnum + +from panda3d.core import * + +from toontown.toonbase import ToontownGlobals + OurPetsMoodChangedKey = 'OurPetsMoodChanged' ThinkPeriod = 1.5 MoodDriftPeriod = 300.0 diff --git a/toontown/pets/PetDNA.py b/toontown/pets/PetDNA.py index 03b0b40..ead2084 100644 --- a/toontown/pets/PetDNA.py +++ b/toontown/pets/PetDNA.py @@ -1,7 +1,10 @@ -from toontown.toon import ToonDNA from panda3d.core import VBase4 -from toontown.toonbase import TTLocalizer, ToontownGlobals + from direct.showbase import PythonUtil + +from toontown.toon import ToonDNA +from toontown.toonbase import ToontownGlobals, TTLocalizer + NumFields = 9 Fields = {'head': 0, 'ears': 1, diff --git a/toontown/pets/PetDetail.py b/toontown/pets/PetDetail.py index 37786c3..87b3644 100644 --- a/toontown/pets/PetDetail.py +++ b/toontown/pets/PetDetail.py @@ -1,7 +1,10 @@ from direct.directnotify import DirectNotifyGlobal + from otp.avatar import AvatarDetail + from toontown.pets import DistributedPet + class PetDetail(AvatarDetail.AvatarDetail): notify = DirectNotifyGlobal.directNotify.newCategory('PetDetail') diff --git a/toontown/pets/PetDetailPanel.py b/toontown/pets/PetDetailPanel.py index 220c640..82d39ba 100644 --- a/toontown/pets/PetDetailPanel.py +++ b/toontown/pets/PetDetailPanel.py @@ -1,13 +1,16 @@ from panda3d.core import * -from toontown.toonbase.ToontownGlobals import * -from direct.gui.DirectGui import * -from panda3d.core import * -from direct.showbase import DirectObject + from direct.directnotify import DirectNotifyGlobal -from toontown.toonbase import TTLocalizer -from toontown.pets import PetTricks -from otp.otpbase import OTPLocalizer +from direct.gui.DirectGui import * +from direct.showbase import DirectObject from direct.showbase.PythonUtil import lerp + +from otp.otpbase import OTPLocalizer + +from toontown.pets import PetTricks +from toontown.toonbase import TTLocalizer +from toontown.toonbase.ToontownGlobals import * + FUDGE_FACTOR = 0.01 class PetDetailPanel(DirectFrame): diff --git a/toontown/pets/PetFlee.py b/toontown/pets/PetFlee.py index d690a91..180e764 100644 --- a/toontown/pets/PetFlee.py +++ b/toontown/pets/PetFlee.py @@ -1,7 +1,10 @@ from panda3d.core import * + from direct.showbase.PythonUtil import reduceAngle + from otp.movement import Impulse + class PetFlee(Impulse.Impulse): def __init__(self, chaser = None, maxDist = 50.0, moveAngle = 20.0): diff --git a/toontown/pets/PetGoal.py b/toontown/pets/PetGoal.py index 108ad01..6365512 100644 --- a/toontown/pets/PetGoal.py +++ b/toontown/pets/PetGoal.py @@ -1,10 +1,12 @@ -from direct.task import Task -from direct.fsm import FSM, ClassicFSM, State -from direct.showbase.PythonUtil import randFloat, Functor from direct.directnotify import DirectNotifyGlobal +from direct.fsm import FSM, ClassicFSM, State +from direct.showbase.PythonUtil import Functor, randFloat +from direct.task import Task + from toontown.pets import PetConstants from toontown.toon import DistributedToonAI + class PetGoal(FSM.FSM): notify = DirectNotifyGlobal.directNotify.newCategory('PetGoal') SerialNum = 0 diff --git a/toontown/pets/PetGoalMgr.py b/toontown/pets/PetGoalMgr.py index c601af4..2922975 100644 --- a/toontown/pets/PetGoalMgr.py +++ b/toontown/pets/PetGoalMgr.py @@ -1,9 +1,13 @@ +import random + from panda3d.core import * + from direct.directnotify import DirectNotifyGlobal from direct.showbase import DirectObject -from direct.showbase.PythonUtil import randFloat, lerp +from direct.showbase.PythonUtil import lerp, randFloat + from toontown.pets import PetConstants -import random + class PetGoalMgr(DirectObject.DirectObject): notify = DirectNotifyGlobal.directNotify.newCategory('PetGoalMgr') diff --git a/toontown/pets/PetHandle.py b/toontown/pets/PetHandle.py index 1eecdf1..c1e198d 100644 --- a/toontown/pets/PetHandle.py +++ b/toontown/pets/PetHandle.py @@ -1,5 +1,6 @@ +from toontown.pets import PetDetail, PetMood, PetTraits from toontown.toonbase import ToontownGlobals -from toontown.pets import PetMood, PetTraits, PetDetail + class PetHandle: diff --git a/toontown/pets/PetLeash.py b/toontown/pets/PetLeash.py index 27ae805..b20c1da 100644 --- a/toontown/pets/PetLeash.py +++ b/toontown/pets/PetLeash.py @@ -1,6 +1,8 @@ from panda3d.core import * + from otp.movement import Impulse + class PetLeash(Impulse.Impulse): def __init__(self, origin, length): diff --git a/toontown/pets/PetLookerAI.py b/toontown/pets/PetLookerAI.py index 072bf54..5d483a4 100644 --- a/toontown/pets/PetLookerAI.py +++ b/toontown/pets/PetLookerAI.py @@ -1,9 +1,13 @@ from panda3d.core import * + from direct.directnotify import DirectNotifyGlobal from direct.showbase import DirectObject + from otp.ai.AIZoneData import AIZoneData -from toontown.toonbase import ToontownGlobals + from toontown.pets import PetConstants +from toontown.toonbase import ToontownGlobals + def getStartLookingAtOtherEvent(lookingAvId): return 'PetLookerAI-%s-startLookingAtOther' % lookingAvId diff --git a/toontown/pets/PetManager.py b/toontown/pets/PetManager.py index 472edab..fdf0c58 100644 --- a/toontown/pets/PetManager.py +++ b/toontown/pets/PetManager.py @@ -1,7 +1,10 @@ from panda3d.core import * -from toontown.toonbase import ToontownGlobals + from direct.task import Task +from toontown.toonbase import ToontownGlobals + + def acquirePetManager(): if not hasattr(base, 'petManager'): PetManager() diff --git a/toontown/pets/PetManagerAI.py b/toontown/pets/PetManagerAI.py index 1cfa191..c39ce23 100644 --- a/toontown/pets/PetManagerAI.py +++ b/toontown/pets/PetManagerAI.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal + class PetManagerAI: notify = DirectNotifyGlobal.directNotify.newCategory('PetManagerAI') diff --git a/toontown/pets/PetMood.py b/toontown/pets/PetMood.py index 0e53d57..2a51eb4 100644 --- a/toontown/pets/PetMood.py +++ b/toontown/pets/PetMood.py @@ -1,8 +1,13 @@ +import random +import time +import weakref + from direct.directnotify import DirectNotifyGlobal +from direct.showbase.PythonUtil import average, clampScalar, lerp from direct.task import Task -from direct.showbase.PythonUtil import lerp, average, clampScalar + from toontown.toonbase import TTLocalizer -import random, time, weakref + class PetMood: notify = DirectNotifyGlobal.directNotify.newCategory('PetMood') diff --git a/toontown/pets/PetNameGenerator.py b/toontown/pets/PetNameGenerator.py index 8c9a8a6..3742bb5 100644 --- a/toontown/pets/PetNameGenerator.py +++ b/toontown/pets/PetNameGenerator.py @@ -1,11 +1,14 @@ -import random -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import TTLocalizer import os -from direct.showbase import AppRunnerGlobal -from direct.directnotify import DirectNotifyGlobal +import random + from panda3d.core import * +from direct.directnotify import DirectNotifyGlobal +from direct.showbase import AppRunnerGlobal + +from toontown.toonbase import ToontownGlobals, TTLocalizer + + class PetNameGenerator: notify = DirectNotifyGlobal.directNotify.newCategory('PetNameGenerator') boyFirsts = [] diff --git a/toontown/pets/PetObserve.py b/toontown/pets/PetObserve.py index 0b5d096..486b13f 100644 --- a/toontown/pets/PetObserve.py +++ b/toontown/pets/PetObserve.py @@ -1,7 +1,10 @@ -from direct.directnotify import DirectNotifyGlobal -from enum import IntEnum -from toontown.pets import PetTricks import types +from enum import IntEnum + +from direct.directnotify import DirectNotifyGlobal + +from toontown.pets import PetTricks + notify = DirectNotifyGlobal.directNotify.newCategory('PetObserve') def getEventName(zoneId): diff --git a/toontown/pets/PetSphere.py b/toontown/pets/PetSphere.py index f2393d7..aaee3b5 100644 --- a/toontown/pets/PetSphere.py +++ b/toontown/pets/PetSphere.py @@ -1,8 +1,11 @@ from panda3d.core import * + from direct.showbase.PythonUtil import reduceAngle + from otp.movement import Impulse from otp.otpbase import OTPGlobals + class PetSphere(Impulse.Impulse): SerialNum = 0 diff --git a/toontown/pets/PetTraits.py b/toontown/pets/PetTraits.py index 7a34b3e..3bd9d41 100644 --- a/toontown/pets/PetTraits.py +++ b/toontown/pets/PetTraits.py @@ -1,8 +1,11 @@ -from direct.showbase.PythonUtil import randFloat, normalDistrib -from direct.showbase.PythonUtil import clampScalar -from toontown.toonbase import TTLocalizer, ToontownGlobals -import random, copy +import copy +import random from enum import IntEnum + +from direct.showbase.PythonUtil import clampScalar, normalDistrib, randFloat + +from toontown.toonbase import ToontownGlobals, TTLocalizer + TraitDivisor = 10000 def getTraitNames(): diff --git a/toontown/pets/PetTricks.py b/toontown/pets/PetTricks.py index 02ae1b3..55a8399 100644 --- a/toontown/pets/PetTricks.py +++ b/toontown/pets/PetTricks.py @@ -1,7 +1,9 @@ -from direct.showbase.PythonUtil import invertDictLossless -from direct.interval.IntervalGlobal import * import random from enum import IntEnum + +from direct.interval.IntervalGlobal import * +from direct.showbase.PythonUtil import invertDictLossless + Tricks = IntEnum('Tricks', ('JUMP', 'BEG', 'PLAYDEAD', 'ROLLOVER', 'BACKFLIP', 'DANCE', 'SPEAK', 'BALK'), start=0) NonHappyMinActualTrickAptitude = 0.1 NonHappyMaxActualTrickAptitude = 0.6 diff --git a/toontown/pets/PetTutorial.py b/toontown/pets/PetTutorial.py index aeac826..8c56a82 100644 --- a/toontown/pets/PetTutorial.py +++ b/toontown/pets/PetTutorial.py @@ -1,9 +1,11 @@ -from direct.gui.DirectGui import * from panda3d.core import * -from direct.fsm import FSM + from direct.directnotify import DirectNotifyGlobal -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import TTLocalizer +from direct.fsm import FSM +from direct.gui.DirectGui import * + +from toontown.toonbase import ToontownGlobals, TTLocalizer + class PetTutorial(DirectFrame, FSM.FSM): notify = DirectNotifyGlobal.directNotify.newCategory('PetTutorial') diff --git a/toontown/pets/PetUtil.py b/toontown/pets/PetUtil.py index c7afbcf..29dd084 100644 --- a/toontown/pets/PetUtil.py +++ b/toontown/pets/PetUtil.py @@ -1,8 +1,10 @@ -from toontown.pets import PetDNA, PetTraits, PetConstants -from toontown.pets import PetNameGenerator -from direct.showbase import PythonUtil import random +from direct.showbase import PythonUtil + +from toontown.pets import PetConstants, PetDNA, PetNameGenerator, PetTraits + + def getPetInfoFromSeed(seed, safezoneId): S = random.getstate() random.seed(seed) diff --git a/toontown/pets/PetWander.py b/toontown/pets/PetWander.py index 7404d47..6989a9e 100644 --- a/toontown/pets/PetWander.py +++ b/toontown/pets/PetWander.py @@ -1,9 +1,11 @@ from panda3d.core import * from panda3d.toontown import * -from direct.showbase.PythonUtil import reduceAngle, randFloat, normalDistrib + from direct.showbase import DirectObject -from toontown.pets import PetChase -from toontown.pets import PetConstants +from direct.showbase.PythonUtil import normalDistrib, randFloat, reduceAngle + +from toontown.pets import PetChase, PetConstants + class PetWander(CPetChase, DirectObject.DirectObject): diff --git a/toontown/pets/PetshopGUI.py b/toontown/pets/PetshopGUI.py index c276c85..34a4e73 100644 --- a/toontown/pets/PetshopGUI.py +++ b/toontown/pets/PetshopGUI.py @@ -1,24 +1,21 @@ -from direct.gui.DirectGui import * -from panda3d.core import * -from direct.directnotify import DirectNotifyGlobal -from direct.showbase.DirectObject import DirectObject -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import TTLocalizer -from toontown.toonbase import ToontownTimer -from direct.task import Task -from otp.namepanel import NameTumbler -from otp.otpbase import OTPGlobals -from otp.otpbase import OTPLocalizer -from toontown.fishing import FishSellGUI -from toontown.pets import Pet, PetConstants -from toontown.pets import PetDNA -from toontown.pets import PetUtil -from toontown.pets import PetDetail -from toontown.pets import PetTraits -from toontown.pets import PetNameGenerator -from toontown.hood import ZoneUtil -import string import random +import string + +from panda3d.core import * + +from direct.directnotify import DirectNotifyGlobal +from direct.gui.DirectGui import * +from direct.showbase.DirectObject import DirectObject +from direct.task import Task + +from otp.namepanel import NameTumbler +from otp.otpbase import OTPGlobals, OTPLocalizer + +from toontown.fishing import FishSellGUI +from toontown.hood import ZoneUtil +from toontown.pets import Pet, PetConstants, PetDetail, PetDNA, PetNameGenerator, PetTraits, PetUtil +from toontown.toonbase import ToontownGlobals, ToontownTimer, TTLocalizer + Dialog_MainMenu = 0 Dialog_AdoptPet = 1 Dialog_ChoosePet = 2 diff --git a/toontown/quest/BlinkingArrows.py b/toontown/quest/BlinkingArrows.py index a0d225c..1e81b67 100644 --- a/toontown/quest/BlinkingArrows.py +++ b/toontown/quest/BlinkingArrows.py @@ -1,6 +1,8 @@ -from direct.interval.IntervalGlobal import * from panda3d.core import * +from direct.interval.IntervalGlobal import * + + class BlinkingArrows: def __init__(self, parent = aspect2d, otherNode = None): diff --git a/toontown/quest/QuestBookPoster.py b/toontown/quest/QuestBookPoster.py index 52f5739..e11ff20 100644 --- a/toontown/quest/QuestBookPoster.py +++ b/toontown/quest/QuestBookPoster.py @@ -1,4 +1,5 @@ from .QuestPoster import * + IMAGE_SCALE_LARGE = 0.15 IMAGE_SCALE_SMALL = 0.1 POSTER_WIDTH = 0.7 diff --git a/toontown/quest/QuestChoiceGui.py b/toontown/quest/QuestChoiceGui.py index d363830..c69e786 100644 --- a/toontown/quest/QuestChoiceGui.py +++ b/toontown/quest/QuestChoiceGui.py @@ -1,10 +1,12 @@ -from direct.gui.DirectGui import * from panda3d.core import * -from . import QuestPoster -from toontown.toonbase import ToontownTimer -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import TTLocalizer + from direct.directnotify import DirectNotifyGlobal +from direct.gui.DirectGui import * + +from toontown.toonbase import ToontownGlobals, ToontownTimer, TTLocalizer + +from . import QuestPoster + class QuestChoiceGui(DirectFrame): notify = DirectNotifyGlobal.directNotify.newCategory('QuestChoiceGui') diff --git a/toontown/quest/QuestManagerAI.py b/toontown/quest/QuestManagerAI.py index 8a7d8b7..b92e277 100644 --- a/toontown/quest/QuestManagerAI.py +++ b/toontown/quest/QuestManagerAI.py @@ -1,10 +1,14 @@ -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 +from direct.directnotify import DirectNotifyGlobal +from direct.task import Task + +from otp.ai.AIBaseGlobal import * + +from toontown.toon import NPCToons + +from . import Quests + """ TODO: (done, tested) + + Jellybean reward diff --git a/toontown/quest/QuestMap.py b/toontown/quest/QuestMap.py index 5e4afa7..a7691b8 100644 --- a/toontown/quest/QuestMap.py +++ b/toontown/quest/QuestMap.py @@ -1,14 +1,19 @@ import math + from panda3d.core import CardMaker, TextNode -from direct.gui.DirectGui import DirectFrame, DirectLabel, DirectButton + +from direct.gui.DirectGui import DirectButton, DirectFrame, DirectLabel from direct.task import Task -from toontown.toon import NPCToons + from toontown.hood import ZoneUtil -from toontown.toonbase import ToontownGlobals from toontown.quest import Quests from toontown.suit import SuitPlannerBase +from toontown.toon import NPCToons +from toontown.toonbase import ToontownGlobals + from . import QuestMapGlobals + class QuestMap(DirectFrame): def __init__(self, av, **kw): diff --git a/toontown/quest/QuestMapGlobals.py b/toontown/quest/QuestMapGlobals.py index fea41e6..445d02b 100644 --- a/toontown/quest/QuestMapGlobals.py +++ b/toontown/quest/QuestMapGlobals.py @@ -1,4 +1,5 @@ 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 493052b..ec86d82 100644 --- a/toontown/quest/QuestParser.py +++ b/toontown/quest/QuestParser.py @@ -1,24 +1,25 @@ -import sys -import os -import tokenize import copy -from direct.interval.IntervalGlobal import * -from direct.directnotify import DirectNotifyGlobal +import os +import sys +import tokenize + from panda3d.core import * from panda3d.otp import * -from direct.showbase import DirectObject -from . import BlinkingArrows -from toontown.toon import ToonHeadFrame -from toontown.char import CharDNA -from toontown.suit import SuitDNA -from toontown.char import Char -from toontown.suit import Suit -from toontown.toonbase import TTLocalizer -from toontown.toonbase import ToontownBattleGlobals -from otp.speedchat import SpeedChatGlobals -from toontown.ai import DistributedBlackCatMgr -from direct.showbase import PythonUtil + +from direct.directnotify import DirectNotifyGlobal from direct.interval.IntervalGlobal import * +from direct.showbase import DirectObject, PythonUtil + +from otp.speedchat import SpeedChatGlobals + +from toontown.ai import DistributedBlackCatMgr +from toontown.char import Char, CharDNA +from toontown.suit import Suit, SuitDNA +from toontown.toon import ToonHeadFrame +from toontown.toonbase import ToontownBattleGlobals, TTLocalizer + +from . import BlinkingArrows + notify = DirectNotifyGlobal.directNotify.newCategory('QuestParser') lineDict = {} globalVarDict = {} diff --git a/toontown/quest/QuestPoster.py b/toontown/quest/QuestPoster.py index cd8d761..e2727cc 100644 --- a/toontown/quest/QuestPoster.py +++ b/toontown/quest/QuestPoster.py @@ -1,21 +1,23 @@ -from direct.gui.DirectGui import * +import string +import types + from panda3d.core import * -from . import Quests -from toontown.toon import NPCToons -from toontown.toon import ToonHead -from toontown.toon import ToonDNA -from toontown.suit import SuitDNA -from toontown.suit import Suit -from toontown.hood import ZoneUtil -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import TTLocalizer -import string, types -from toontown.toon import LaffMeter -from toontown.toonbase.ToontownBattleGlobals import AvPropsNew -from toontown.toontowngui.TeaserPanel import TeaserPanel + from direct.directnotify import DirectNotifyGlobal -from toontown.toontowngui import TTDialog +from direct.gui.DirectGui import * + from otp.otpbase import OTPLocalizer + +from toontown.hood import ZoneUtil +from toontown.suit import Suit, SuitDNA +from toontown.toon import LaffMeter, NPCToons, ToonDNA, ToonHead +from toontown.toonbase import ToontownGlobals, TTLocalizer +from toontown.toonbase.ToontownBattleGlobals import AvPropsNew +from toontown.toontowngui import TTDialog +from toontown.toontowngui.TeaserPanel import TeaserPanel + +from . import Quests + IMAGE_SCALE_LARGE = 0.2 IMAGE_SCALE_SMALL = 0.15 POSTER_WIDTH = 0.7 diff --git a/toontown/quest/QuestRewardCounter.py b/toontown/quest/QuestRewardCounter.py index 58b1466..b247a1f 100644 --- a/toontown/quest/QuestRewardCounter.py +++ b/toontown/quest/QuestRewardCounter.py @@ -1,12 +1,16 @@ from panda3d.core import * + from direct.directnotify import DirectNotifyGlobal -from . import Quests -from toontown.toonbase import ToontownGlobals -from toontown.fishing import FishGlobals -from toontown.suit import SuitDNA -from toontown.racing import RaceGlobals + from toontown.estate import GardenGlobals +from toontown.fishing import FishGlobals from toontown.golf import GolfGlobals +from toontown.racing import RaceGlobals +from toontown.suit import SuitDNA +from toontown.toonbase import ToontownGlobals + +from . import Quests + class QuestRewardCounter: notify = directNotify.newCategory('QuestRewardCounter') diff --git a/toontown/quest/Quests.py b/toontown/quest/Quests.py index 655a25b..3946ad8 100644 --- a/toontown/quest/Quests.py +++ b/toontown/quest/Quests.py @@ -1,16 +1,19 @@ +import copy +import random +import time +import types + +from direct.directnotify import DirectNotifyGlobal +from direct.showbase import PythonUtil + from otp.otpbase import OTPGlobals -from toontown.toonbase import ToontownBattleGlobals -from toontown.toonbase import ToontownGlobals + from toontown.battle import SuitBattleGlobals from toontown.coghq import CogDisguiseGlobals -import random -from toontown.toon import NPCToons -import copy from toontown.hood import ZoneUtil -from direct.directnotify import DirectNotifyGlobal -from toontown.toonbase import TTLocalizer -from direct.showbase import PythonUtil -import time, types, random +from toontown.toon import NPCToons +from toontown.toonbase import ToontownBattleGlobals, ToontownGlobals, TTLocalizer + notify = DirectNotifyGlobal.directNotify.newCategory('Quests') ItemDict = TTLocalizer.QuestsItemDict CompleteString = TTLocalizer.QuestsCompleteString @@ -76,7 +79,8 @@ PHONE_QUEST_ID = 175 NEWBIE_HP = 25 SELLBOT_HQ_NEWBIE_HP = 50 CASHBOT_HQ_NEWBIE_HP = 85 -from toontown.toonbase.ToontownGlobals import FT_FullSuit, FT_Leg, FT_Arm, FT_Torso +from toontown.toonbase.ToontownGlobals import FT_Arm, FT_FullSuit, FT_Leg, FT_Torso + QuestRandGen = random.Random() def seedRandomGen(npcId, avId, tier, rewardHistory): diff --git a/toontown/quest/TrackChoiceGui.py b/toontown/quest/TrackChoiceGui.py index 76d698c..d4395ab 100644 --- a/toontown/quest/TrackChoiceGui.py +++ b/toontown/quest/TrackChoiceGui.py @@ -1,9 +1,9 @@ -from direct.gui.DirectGui import * from panda3d.core import * -from toontown.toonbase import ToontownTimer -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import ToontownBattleGlobals -from toontown.toonbase import TTLocalizer + +from direct.gui.DirectGui import * + +from toontown.toonbase import ToontownBattleGlobals, ToontownGlobals, ToontownTimer, TTLocalizer + class TrackPoster(DirectFrame): normalTextColor = (0.3, 0.25, 0.2, 1) diff --git a/toontown/racing/DistributedGag.py b/toontown/racing/DistributedGag.py index ad035c7..df14521 100644 --- a/toontown/racing/DistributedGag.py +++ b/toontown/racing/DistributedGag.py @@ -1,11 +1,15 @@ from panda3d.core import * + from direct.distributed import DistributedObject -from direct.interval.ProjectileInterval import * -from direct.interval.IntervalGlobal import * from direct.distributed.ClockDelta import * +from direct.interval.IntervalGlobal import * +from direct.interval.ProjectileInterval import * + from toontown.racing.DistributedVehicle import DistributedVehicle + from .DroppedGag import * + class DistributedGag(DistributedObject.DistributedObject): def __init__(self, cr): diff --git a/toontown/racing/DistributedKartPad.py b/toontown/racing/DistributedKartPad.py index d13c378..a04247b 100644 --- a/toontown/racing/DistributedKartPad.py +++ b/toontown/racing/DistributedKartPad.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObject import DistributedObject + if (__debug__): import pdb diff --git a/toontown/racing/DistributedLeaderBoard.py b/toontown/racing/DistributedLeaderBoard.py index ccf3fe3..99eca85 100644 --- a/toontown/racing/DistributedLeaderBoard.py +++ b/toontown/racing/DistributedLeaderBoard.py @@ -1,14 +1,13 @@ +import pickle + from panda3d.core import NodePath, TextNode from direct.directnotify.DirectNotifyGlobal import directNotify from direct.distributed.DistributedObject import DistributedObject -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import TTLocalizer +from toontown.toonbase import ToontownGlobals, TTLocalizer from toontown.toonbase.ToonBaseGlobal import base -import pickle - class DistributedLeaderBoard(DistributedObject): notify = directNotify.newCategory('DisributedLeaderBoard') diff --git a/toontown/racing/DistributedProjectile.py b/toontown/racing/DistributedProjectile.py index fd1a73c..f0a8a68 100644 --- a/toontown/racing/DistributedProjectile.py +++ b/toontown/racing/DistributedProjectile.py @@ -1,12 +1,14 @@ from panda3d.core import * + from direct.distributed.ClockDelta import * -from direct.interval.IntervalGlobal import * -from direct.gui.DirectGui import * -from panda3d.core import * -from direct.fsm import FSM from direct.distributed.DistributedSmoothNode import DistributedSmoothNode +from direct.fsm import FSM +from direct.gui.DirectGui import * +from direct.interval.IntervalGlobal import * + from otp.avatar.ShadowCaster import ShadowCaster + class DistributedProjectile(DistributedSmoothNode, ShadowCaster, NodePath): def __init__(self, cr): diff --git a/toontown/racing/DistributedProjectileAI.py b/toontown/racing/DistributedProjectileAI.py index 1d5bcc0..4ff2931 100644 --- a/toontown/racing/DistributedProjectileAI.py +++ b/toontown/racing/DistributedProjectileAI.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectAI import DistributedObjectAI + class DistributedProjectileAI(DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedProjectileAI') diff --git a/toontown/racing/DistributedRace.py b/toontown/racing/DistributedRace.py index d96cf0d..579dce1 100644 --- a/toontown/racing/DistributedRace.py +++ b/toontown/racing/DistributedRace.py @@ -1,33 +1,33 @@ +from math import fmod, sqrt + from panda3d.core import * +from panda3d.core import CardMaker, LineSegs, OrthographicLens from panda3d.toontown import * -from direct.distributed.ClockDelta import * -from direct.distributed import DistributedObject + from direct.directnotify import DirectNotifyGlobal -from direct.gui.DirectLabel import * -from direct.gui.DirectButton import * -from direct.showbase import BulletinBoardWatcher -from direct.interval.IntervalGlobal import * -from otp.otpbase import OTPGlobals -from direct.interval.IntervalGlobal import * -from .RaceGag import RaceGag -from toontown.toonbase import ToontownGlobals, TTLocalizer -from toontown.toon import ToonHeadFrame -from toontown.racing.KartDNA import InvalidEntry, getAccessory, getDefaultColor -from panda3d.core import CardMaker, OrthographicLens, LineSegs -from direct.distributed import DistributedSmoothNode -from math import fmod -from math import sqrt -from .RaceGUI import RaceGUI -from . import RaceGlobals -from direct.task.Task import Task -from toontown.hood import SkyUtil +from direct.distributed import DistributedObject, DistributedSmoothNode +from direct.distributed.ClockDelta import * from direct.fsm import ClassicFSM, State -from direct.fsm import State +from direct.gui.DirectButton import * +from direct.gui.DirectLabel import * +from direct.interval.IntervalGlobal import * +from direct.showbase import BulletinBoardWatcher +from direct.task.Task import Task + +from otp.otpbase import OTPGlobals + from toontown.battle.BattleProps import * +from toontown.hood import SkyUtil from toontown.minigame import MinigameRulesPanel -from toontown.racing import Piejectile -from toontown.racing import EffectManager -from toontown.racing import PiejectileManager +from toontown.racing import EffectManager, Piejectile, PiejectileManager +from toontown.racing.KartDNA import InvalidEntry, getAccessory, getDefaultColor +from toontown.toon import ToonHeadFrame +from toontown.toonbase import ToontownGlobals, TTLocalizer + +from . import RaceGlobals +from .RaceGag import RaceGag +from .RaceGUI import RaceGUI + class DistributedRace(DistributedObject.DistributedObject): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedRace') diff --git a/toontown/racing/DistributedRaceAI.py b/toontown/racing/DistributedRaceAI.py index 25312f8..dce04d4 100644 --- a/toontown/racing/DistributedRaceAI.py +++ b/toontown/racing/DistributedRaceAI.py @@ -1,12 +1,15 @@ -from direct.distributed import DistributedObjectAI -from direct.directnotify import DirectNotifyGlobal -from toontown.toonbase import ToontownGlobals -from otp.otpbase.PythonUtil import nonRepeatingRandomList -from toontown.racing import DistributedGagAI, DistributedProjectileAI -from direct.task import Task import random -from toontown.racing import Racer, RaceGlobals + +from direct.directnotify import DirectNotifyGlobal +from direct.distributed import DistributedObjectAI from direct.distributed.ClockDelta import * +from direct.task import Task + +from otp.otpbase.PythonUtil import nonRepeatingRandomList + +from toontown.racing import DistributedGagAI, DistributedProjectileAI, RaceGlobals, Racer +from toontown.toonbase import ToontownGlobals + class DistributedRaceAI(DistributedObjectAI.DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedRaceAI') diff --git a/toontown/racing/DistributedRacePad.py b/toontown/racing/DistributedRacePad.py index 0aab464..0e171c2 100644 --- a/toontown/racing/DistributedRacePad.py +++ b/toontown/racing/DistributedRacePad.py @@ -1,15 +1,17 @@ from panda3d.core import * + from direct.directnotify import DirectNotifyGlobal -from direct.task.Task import Task from direct.distributed.ClockDelta import * from direct.fsm.FSM import FSM from direct.interval.IntervalGlobal import * -from toontown.racing.DistributedKartPad import DistributedKartPad +from direct.task.Task import Task + from toontown.racing import RaceGlobals -from toontown.toonbase.ToontownTimer import ToontownTimer -from toontown.toonbase import TTLocalizer -from toontown.toonbase import ToontownGlobals +from toontown.racing.DistributedKartPad import DistributedKartPad from toontown.racing.KartShopGlobals import KartGlobals +from toontown.toonbase import ToontownGlobals, TTLocalizer +from toontown.toonbase.ToontownTimer import ToontownTimer + class DistributedRacePad(DistributedKartPad, FSM): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedRacePad') diff --git a/toontown/racing/DistributedStartingBlock.py b/toontown/racing/DistributedStartingBlock.py index a0350ab..6d0a0b4 100644 --- a/toontown/racing/DistributedStartingBlock.py +++ b/toontown/racing/DistributedStartingBlock.py @@ -1,27 +1,25 @@ +from direct.actor import Actor +from direct.distributed import DistributedObject, DistributedSmoothNode from direct.distributed.ClockDelta import * +from direct.fsm import ClassicFSM, State +from direct.fsm.FSM import FSM +from direct.gui import DirectGui from direct.interval.IntervalGlobal import * +from direct.showbase import PythonUtil + +from toontown.building import DistributedElevator, DistributedElevatorExt from toontown.building.ElevatorConstants import * from toontown.building.ElevatorUtils import * -from toontown.building import DistributedElevatorExt -from toontown.building import DistributedElevator -from toontown.toonbase import ToontownGlobals -from direct.fsm import ClassicFSM -from direct.fsm import State -from direct.gui import DirectGui from toontown.hood import ZoneUtil -from toontown.toonbase import TTLocalizer -from toontown.toontowngui import TTDialog -from direct.distributed import DistributedObject -from direct.distributed import DistributedSmoothNode -from direct.actor import Actor -from direct.fsm.FSM import FSM -from direct.showbase import PythonUtil -from toontown.toonbase.ToontownTimer import ToontownTimer +from toontown.racing import RaceGlobals from toontown.racing.Kart import Kart from toontown.racing.KartShopGlobals import KartGlobals -from toontown.racing import RaceGlobals -from toontown.toontowngui.TTDialog import TTGlobalDialog +from toontown.toonbase import ToontownGlobals, TTLocalizer +from toontown.toonbase.ToontownTimer import ToontownTimer +from toontown.toontowngui import TTDialog from toontown.toontowngui.TeaserPanel import TeaserPanel +from toontown.toontowngui.TTDialog import TTGlobalDialog + if (__debug__): import pdb diff --git a/toontown/racing/DistributedStartingBlockAI.py b/toontown/racing/DistributedStartingBlockAI.py index 36b577b..f950b20 100644 --- a/toontown/racing/DistributedStartingBlockAI.py +++ b/toontown/racing/DistributedStartingBlockAI.py @@ -1,13 +1,15 @@ -from otp.ai.AIBase import * -from toontown.toonbase import ToontownGlobals -from direct.distributed.ClockDelta import * from direct.distributed import DistributedObjectAI -from toontown.building.ElevatorConstants import * -from toontown.building import DistributedElevatorExtAI -from direct.fsm import ClassicFSM -from direct.fsm import State +from direct.distributed.ClockDelta import * +from direct.fsm import ClassicFSM, State from direct.showbase.DirectObject import DirectObject + +from otp.ai.AIBase import * + +from toontown.building import DistributedElevatorExtAI +from toontown.building.ElevatorConstants import * from toontown.racing.KartShopGlobals import KartGlobals +from toontown.toonbase import ToontownGlobals + if __debug__: import pdb diff --git a/toontown/racing/DistributedVehicle.py b/toontown/racing/DistributedVehicle.py index 26c6c4d..b288746 100644 --- a/toontown/racing/DistributedVehicle.py +++ b/toontown/racing/DistributedVehicle.py @@ -1,28 +1,29 @@ +import math +import random + from panda3d.core import * from panda3d.otp import * -from direct.distributed.ClockDelta import * -from direct.interval.IntervalGlobal import * -from direct.gui.DirectGui import * -from panda3d.core import * from panda3d.physics import * -from direct.fsm import FSM + from direct.distributed import DistributedSmoothNode +from direct.distributed.ClockDelta import * +from direct.fsm import FSM +from direct.gui.DirectGui import * from direct.interval.IntervalGlobal import * -from direct.showbase.PythonUtil import clampScalar -from otp.otpbase import OTPGlobals +from direct.interval.ProjectileInterval import * +from direct.showbase.PythonUtil import clampScalar, randFloat +from direct.task.Task import Task + from otp.avatar import ShadowCaster -from toontown.racing import Kart -from toontown.racing.KartDNA import * -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import TTLocalizer +from otp.otpbase import OTPGlobals + +from toontown.battle.BattleProps import * from toontown.effects.Drift import Drift from toontown.effects.Sparks import Sparks -from direct.interval.ProjectileInterval import * -from toontown.battle.BattleProps import * -import random -from direct.showbase.PythonUtil import randFloat -from direct.task.Task import Task -import math +from toontown.racing import Kart +from toontown.racing.KartDNA import * +from toontown.toonbase import ToontownGlobals, TTLocalizer + iceTurnFactor = 0.25 iceAccelFactor = 0.4 diff --git a/toontown/racing/DistributedVehicleAI.py b/toontown/racing/DistributedVehicleAI.py index 39d3359..05b71d6 100644 --- a/toontown/racing/DistributedVehicleAI.py +++ b/toontown/racing/DistributedVehicleAI.py @@ -1,10 +1,13 @@ -from otp.ai.AIBase import * -from toontown.toonbase.ToontownGlobals import * -from toontown.racing.KartDNA import * -from direct.distributed.ClockDelta import * from direct.distributed import DistributedSmoothNodeAI +from direct.distributed.ClockDelta import * from direct.fsm import FSM from direct.task import Task + +from otp.ai.AIBase import * + +from toontown.racing.KartDNA import * +from toontown.toonbase.ToontownGlobals import * + if (__debug__): import pdb diff --git a/toontown/racing/DistributedViewPad.py b/toontown/racing/DistributedViewPad.py index a87b9bd..e551113 100644 --- a/toontown/racing/DistributedViewPad.py +++ b/toontown/racing/DistributedViewPad.py @@ -1,9 +1,12 @@ +from panda3d.core import * + from direct.directnotify import DirectNotifyGlobal from direct.distributed.ClockDelta import * from direct.task import Task -from panda3d.core import * + from toontown.racing.DistributedKartPad import DistributedKartPad from toontown.racing.KartShopGlobals import KartGlobals + if (__debug__): import pdb diff --git a/toontown/racing/DroppedGag.py b/toontown/racing/DroppedGag.py index 51b5a29..529af91 100644 --- a/toontown/racing/DroppedGag.py +++ b/toontown/racing/DroppedGag.py @@ -1,9 +1,11 @@ from panda3d.core import * + from direct.gui.DirectGui import * -from panda3d.core import * from direct.interval.IntervalGlobal import * + from otp.avatar import ShadowCaster + class DroppedGag(NodePath, ShadowCaster.ShadowCaster): def __init__(self, name, geom): diff --git a/toontown/racing/EffectManager.py b/toontown/racing/EffectManager.py index befb547..8a48d28 100644 --- a/toontown/racing/EffectManager.py +++ b/toontown/racing/EffectManager.py @@ -1,9 +1,11 @@ from panda3d.core import * -from panda3d.core import * -from direct.showbase.DirectObject import DirectObject + from direct.interval.IntervalGlobal import * -from toontown.battle.BattleProps import * +from direct.showbase.DirectObject import DirectObject + from toontown.battle import MovieUtil +from toontown.battle.BattleProps import * + class EffectManager(DirectObject): diff --git a/toontown/racing/FlyingGag.py b/toontown/racing/FlyingGag.py index 902521c..340c635 100644 --- a/toontown/racing/FlyingGag.py +++ b/toontown/racing/FlyingGag.py @@ -1,9 +1,11 @@ from panda3d.core import * + from direct.gui.DirectGui import * -from panda3d.core import * from direct.interval.IntervalGlobal import * + from otp.avatar.ShadowCaster import ShadowCaster + class FlyingGag(NodePath, ShadowCaster): def __init__(self, name, geom = None): diff --git a/toontown/racing/Kart.py b/toontown/racing/Kart.py index acea62b..ad03793 100644 --- a/toontown/racing/Kart.py +++ b/toontown/racing/Kart.py @@ -1,12 +1,16 @@ -from direct.directnotify import DirectNotifyGlobal from panda3d.core import * from panda3d.physics import * + +from direct.directnotify import DirectNotifyGlobal from direct.gui.DirectGui import * from direct.interval.IntervalGlobal import * + from otp.avatar import ShadowCaster + from toontown.racing.KartDNA import * from toontown.toonbase import TTLocalizer + class Kart(NodePath, ShadowCaster.ShadowCaster): notify = DirectNotifyGlobal.directNotify.newCategory('Kart') index = 0 diff --git a/toontown/racing/KartDNA.py b/toontown/racing/KartDNA.py index a33b049..9e1f04d 100644 --- a/toontown/racing/KartDNA.py +++ b/toontown/racing/KartDNA.py @@ -1,11 +1,18 @@ -from direct.directnotify import DirectNotifyGlobal -from toontown.toonbase import TTLocalizer -from panda3d.core import * -from .KartShopGlobals import * from enum import IntEnum + +from panda3d.core import * + +from direct.directnotify import DirectNotifyGlobal + +from toontown.toonbase import TTLocalizer + +from .KartShopGlobals import * + if (__debug__): import pdb + import copy + 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'), start=0) diff --git a/toontown/racing/KartShopGlobals.py b/toontown/racing/KartShopGlobals.py index f8ea031..1a0e982 100644 --- a/toontown/racing/KartShopGlobals.py +++ b/toontown/racing/KartShopGlobals.py @@ -1,5 +1,6 @@ from enum import IntEnum + class KartShopGlobals: EVENTDICT = {'guiDone': 'guiDone', 'returnKart': 'returnKart', diff --git a/toontown/racing/KartShopGui.py b/toontown/racing/KartShopGui.py index c9c31d2..c29a1c7 100644 --- a/toontown/racing/KartShopGui.py +++ b/toontown/racing/KartShopGui.py @@ -1,19 +1,22 @@ if __name__ == '__main__': from direct.directbase import DirectStart + +from enum import IntEnum + from panda3d.core import * + from direct.directnotify import DirectNotifyGlobal from direct.gui.DirectGui import * -from panda3d.core import * from direct.showbase import DirectObject -from toontown.toonbase import ToontownGlobals, TTLocalizer -from toontown.toonbase import TTLocalizer -from toontown.toonbase import ToontownTimer -from .KartShopGlobals import * + from toontown.racing.Kart import Kart from toontown.shtiker.KartPage import KartViewer -from .KartDNA import * +from toontown.toonbase import ToontownGlobals, ToontownTimer, TTLocalizer from toontown.toontowngui.TeaserPanel import TeaserPanel -from enum import IntEnum + +from .KartDNA import * +from .KartShopGlobals import * + if (__debug__): import pdb MENUS = IntEnum('MENUS', ('MainMenu, BuyKart, BuyAccessory, ReturnKart, ConfirmBuyAccessory, ConfirmBuyKart, BoughtKart, BoughtAccessory, TeaserPanel'), start=0) diff --git a/toontown/racing/Piejectile.py b/toontown/racing/Piejectile.py index daf603b..e24c51b 100644 --- a/toontown/racing/Piejectile.py +++ b/toontown/racing/Piejectile.py @@ -1,16 +1,21 @@ import math import random -from direct.showbase.PythonUtil import * -from direct.showbase.DirectObject import DirectObject -from direct.task import Task + from panda3d.core import * from panda3d.physics import * -from direct.fsm import FSM + from direct.distributed import DistributedSmoothNode +from direct.fsm import FSM +from direct.showbase.DirectObject import DirectObject +from direct.showbase.PythonUtil import * +from direct.task import Task + from otp.avatar import ShadowCaster from otp.otpbase import OTPGlobals -from toontown.racing.FlyingGag import FlyingGag + from toontown.battle import MovieUtil +from toontown.racing.FlyingGag import FlyingGag + class Piejectile(DirectObject, FlyingGag): physicsCalculationsPerSecond = 60 diff --git a/toontown/racing/PiejectileManager.py b/toontown/racing/PiejectileManager.py index 9281a10..4b6efc9 100644 --- a/toontown/racing/PiejectileManager.py +++ b/toontown/racing/PiejectileManager.py @@ -1,10 +1,12 @@ from panda3d.core import * -from panda3d.core import * -from direct.showbase.DirectObject import DirectObject + from direct.interval.IntervalGlobal import * +from direct.showbase.DirectObject import DirectObject + from toontown.battle.BattleProps import * from toontown.racing import Piejectile + class PiejectileManager(DirectObject): pieCounter = 0 diff --git a/toontown/racing/RaceEndPanels.py b/toontown/racing/RaceEndPanels.py index b3b5124..32a7a41 100644 --- a/toontown/racing/RaceEndPanels.py +++ b/toontown/racing/RaceEndPanels.py @@ -1,12 +1,13 @@ -from direct.gui.DirectGui import * from panda3d.core import * + from direct.directnotify import DirectNotifyGlobal +from direct.gui.DirectGui import * from direct.interval.IntervalGlobal import * -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import TTLocalizer + from toontown.racing import RaceGlobals from toontown.shtiker.KartPage import RacingTrophy -from toontown.racing import RaceGlobals +from toontown.toonbase import ToontownGlobals, TTLocalizer + class RaceResultsPanel(DirectFrame): notify = DirectNotifyGlobal.directNotify.newCategory('RaceEndPanels') diff --git a/toontown/racing/RaceGUI.py b/toontown/racing/RaceGUI.py index 87dd55b..0d73db9 100644 --- a/toontown/racing/RaceGUI.py +++ b/toontown/racing/RaceGUI.py @@ -1,28 +1,31 @@ -from panda3d.core import * -from direct.showbase.PythonUtil import clampScalar -from direct.distributed.ClockDelta import * -from direct.distributed import DistributedObject -from direct.directnotify import DirectNotifyGlobal -from direct.gui.DirectLabel import * -from direct.gui.DirectButton import * -from direct.showbase import BulletinBoardWatcher -from direct.interval.IntervalGlobal import * -from otp.otpbase import OTPGlobals -from direct.interval.IntervalGlobal import * -from toontown.toonbase import ToontownGlobals, TTLocalizer -from toontown.racing.KartDNA import InvalidEntry, getAccessory, getDefaultColor -from toontown.racing.RaceHeadFrame import RaceHeadFrame -from toontown.racing.RaceGag import RaceGag -from toontown.racing.RaceEndPanels import RaceEndPanel -from toontown.racing import RaceGlobals -from panda3d.core import CardMaker, OrthographicLens, LineSegs -from direct.particles.ParticleEffect import * -from math import fmod -from math import sqrt -import time import operator -from direct.gui.DirectGui import DirectFrame import random +import time +from math import fmod, sqrt + +from panda3d.core import * +from panda3d.core import CardMaker, LineSegs, OrthographicLens + +from direct.directnotify import DirectNotifyGlobal +from direct.distributed import DistributedObject +from direct.distributed.ClockDelta import * +from direct.gui.DirectButton import * +from direct.gui.DirectGui import DirectFrame +from direct.gui.DirectLabel import * +from direct.interval.IntervalGlobal import * +from direct.particles.ParticleEffect import * +from direct.showbase import BulletinBoardWatcher +from direct.showbase.PythonUtil import clampScalar + +from otp.otpbase import OTPGlobals + +from toontown.racing import RaceGlobals +from toontown.racing.KartDNA import InvalidEntry, getAccessory, getDefaultColor +from toontown.racing.RaceEndPanels import RaceEndPanel +from toontown.racing.RaceGag import RaceGag +from toontown.racing.RaceHeadFrame import RaceHeadFrame +from toontown.toonbase import ToontownGlobals, TTLocalizer + class RaceGUI: GagPie = 0 diff --git a/toontown/racing/RaceGag.py b/toontown/racing/RaceGag.py index dd6d658..36f2453 100644 --- a/toontown/racing/RaceGag.py +++ b/toontown/racing/RaceGag.py @@ -1,7 +1,10 @@ from panda3d.core import * + from direct.interval.IntervalGlobal import * from direct.showbase import DirectObject + from .DroppedGag import * + types = ['', 'Pie', 'Banana', diff --git a/toontown/racing/RaceHeadFrame.py b/toontown/racing/RaceHeadFrame.py index 1b44950..f8065ee 100644 --- a/toontown/racing/RaceHeadFrame.py +++ b/toontown/racing/RaceHeadFrame.py @@ -1,7 +1,10 @@ -from direct.gui.DirectGui import * from panda3d.core import * -from toontown.toonbase import ToontownGlobals + +from direct.gui.DirectGui import * + from toontown.toon import ToonHead +from toontown.toonbase import ToontownGlobals + class RaceHeadFrame(DirectFrame): diff --git a/toontown/racing/RaceManagerAI.py b/toontown/racing/RaceManagerAI.py index b19e54f..574030a 100644 --- a/toontown/racing/RaceManagerAI.py +++ b/toontown/racing/RaceManagerAI.py @@ -1,11 +1,14 @@ +import os +import pickle + from direct.directnotify import DirectNotifyGlobal -from toontown.racing import DistributedRaceAI -from toontown.toonbase import ToontownGlobals, TTLocalizer -from toontown.coghq import MintLayout -from toontown.ai import HolidayBaseAI from direct.showbase import DirectObject -from toontown.racing import RaceGlobals -import os, pickle + +from toontown.ai import HolidayBaseAI +from toontown.coghq import MintLayout +from toontown.racing import DistributedRaceAI, RaceGlobals +from toontown.toonbase import ToontownGlobals, TTLocalizer + class RaceManagerAI(DirectObject.DirectObject): notify = DirectNotifyGlobal.directNotify.newCategory('RaceManagerAI') diff --git a/toontown/rpc/AwardManager.py b/toontown/rpc/AwardManager.py index c6f8ae1..d8679bf 100644 --- a/toontown/rpc/AwardManager.py +++ b/toontown/rpc/AwardManager.py @@ -1,4 +1,5 @@ from direct.distributed.DistributedObjectGlobal import DistributedObjectGlobal + class AwardManager(DistributedObjectGlobal): pass diff --git a/toontown/rpc/AwardManagerUD.py b/toontown/rpc/AwardManagerUD.py index 73ea205..3ae4971 100644 --- a/toontown/rpc/AwardManagerUD.py +++ b/toontown/rpc/AwardManagerUD.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectUD import DistributedObjectUD + class AwardManagerUD(DistributedObjectUD): notify = DirectNotifyGlobal.directNotify.newCategory('AwardManagerUD') diff --git a/toontown/rpc/RATManager.py b/toontown/rpc/RATManager.py index 37035aa..da47f6a 100644 --- a/toontown/rpc/RATManager.py +++ b/toontown/rpc/RATManager.py @@ -1,4 +1,5 @@ from direct.distributed.DistributedObjectGlobal import DistributedObjectGlobal + class RATManager(DistributedObjectGlobal): pass diff --git a/toontown/rpc/RATManagerUD.py b/toontown/rpc/RATManagerUD.py index f78ba08..0ec0bc2 100644 --- a/toontown/rpc/RATManagerUD.py +++ b/toontown/rpc/RATManagerUD.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectUD import DistributedObjectUD + class RATManagerUD(DistributedObjectUD): notify = DirectNotifyGlobal.directNotify.newCategory('RATManagerUD') diff --git a/toontown/safezone/BRPlayground.py b/toontown/safezone/BRPlayground.py index dd9bd45..360827a 100644 --- a/toontown/safezone/BRPlayground.py +++ b/toontown/safezone/BRPlayground.py @@ -1,10 +1,15 @@ -from panda3d.core import * -from . import Playground -from direct.task.Task import Task import random + +from panda3d.core import * + +from direct.task.Task import Task + from toontown.hood import Place from toontown.toonbase import ToontownGlobals +from . import Playground + + class BRPlayground(Playground.Playground): STILL = 1 RUN = 2 diff --git a/toontown/safezone/BRSafeZoneLoader.py b/toontown/safezone/BRSafeZoneLoader.py index 6dfe15a..486cc49 100644 --- a/toontown/safezone/BRSafeZoneLoader.py +++ b/toontown/safezone/BRSafeZoneLoader.py @@ -1,9 +1,12 @@ from panda3d.core import * + from direct.interval.IntervalGlobal import * -from . import SafeZoneLoader -from . import BRPlayground + from toontown.battle import BattleParticles +from . import BRPlayground, SafeZoneLoader + + class BRSafeZoneLoader(SafeZoneLoader.SafeZoneLoader): SnowFadeLerpTime = 2.0 diff --git a/toontown/safezone/BRTreasurePlannerAI.py b/toontown/safezone/BRTreasurePlannerAI.py index 62c214e..b7c0cf6 100644 --- a/toontown/safezone/BRTreasurePlannerAI.py +++ b/toontown/safezone/BRTreasurePlannerAI.py @@ -1,5 +1,7 @@ from toontown.toonbase.ToontownGlobals import * -from . import RegenTreasurePlannerAI, DistributedBRTreasureAI + +from . import DistributedBRTreasureAI, RegenTreasurePlannerAI + class BRTreasurePlannerAI(RegenTreasurePlannerAI.RegenTreasurePlannerAI): diff --git a/toontown/safezone/ButterflyGlobals.py b/toontown/safezone/ButterflyGlobals.py index cd2d194..b6d0fde 100644 --- a/toontown/safezone/ButterflyGlobals.py +++ b/toontown/safezone/ButterflyGlobals.py @@ -1,5 +1,7 @@ -from panda3d.core import * import random + +from panda3d.core import * + OFF = 0 FLYING = 1 LANDED = 2 diff --git a/toontown/safezone/DDPlayground.py b/toontown/safezone/DDPlayground.py index b99f491..5c695af 100644 --- a/toontown/safezone/DDPlayground.py +++ b/toontown/safezone/DDPlayground.py @@ -1,12 +1,17 @@ -from panda3d.core import * -from . import Playground -from direct.task.Task import Task import random -from direct.fsm import ClassicFSM, State + +from panda3d.core import * + from direct.actor import Actor -from toontown.toonbase import ToontownGlobals from direct.directnotify import DirectNotifyGlobal +from direct.fsm import ClassicFSM, State +from direct.task.Task import Task + from toontown.hood import Place +from toontown.toonbase import ToontownGlobals + +from . import Playground + class DDPlayground(Playground.Playground): notify = DirectNotifyGlobal.directNotify.newCategory('DDPlayground') diff --git a/toontown/safezone/DDSafeZoneLoader.py b/toontown/safezone/DDSafeZoneLoader.py index 8cf6d91..51e2aa9 100644 --- a/toontown/safezone/DDSafeZoneLoader.py +++ b/toontown/safezone/DDSafeZoneLoader.py @@ -1,11 +1,13 @@ from panda3d.core import * -from . import SafeZoneLoader -from . import DDPlayground + from direct.fsm import State -from toontown.char import CharDNA -from toontown.char import Char + +from toontown.char import Char, CharDNA from toontown.toonbase import ToontownGlobals +from . import DDPlayground, SafeZoneLoader + + class DDSafeZoneLoader(SafeZoneLoader.SafeZoneLoader): def __init__(self, hood, parentFSM, doneEvent): diff --git a/toontown/safezone/DDTreasurePlannerAI.py b/toontown/safezone/DDTreasurePlannerAI.py index 31b1502..77d823d 100644 --- a/toontown/safezone/DDTreasurePlannerAI.py +++ b/toontown/safezone/DDTreasurePlannerAI.py @@ -1,5 +1,7 @@ from toontown.toonbase.ToontownGlobals import * -from . import RegenTreasurePlannerAI, DistributedDDTreasureAI + +from . import DistributedDDTreasureAI, RegenTreasurePlannerAI + class DDTreasurePlannerAI(RegenTreasurePlannerAI.RegenTreasurePlannerAI): diff --git a/toontown/safezone/DGPlayground.py b/toontown/safezone/DGPlayground.py index ab988c0..9acd822 100644 --- a/toontown/safezone/DGPlayground.py +++ b/toontown/safezone/DGPlayground.py @@ -1,8 +1,12 @@ -from panda3d.core import * -from . import Playground import random + +from panda3d.core import * + from direct.task import Task +from . import Playground + + class DGPlayground(Playground.Playground): def __init__(self, loader, parentFSM, doneEvent): diff --git a/toontown/safezone/DGSafeZoneLoader.py b/toontown/safezone/DGSafeZoneLoader.py index 4818757..7956902 100644 --- a/toontown/safezone/DGSafeZoneLoader.py +++ b/toontown/safezone/DGSafeZoneLoader.py @@ -1,6 +1,7 @@ from panda3d.core import * -from . import SafeZoneLoader -from . import DGPlayground + +from . import DGPlayground, SafeZoneLoader + class DGSafeZoneLoader(SafeZoneLoader.SafeZoneLoader): diff --git a/toontown/safezone/DGTreasurePlannerAI.py b/toontown/safezone/DGTreasurePlannerAI.py index d5aa084..c8bf880 100644 --- a/toontown/safezone/DGTreasurePlannerAI.py +++ b/toontown/safezone/DGTreasurePlannerAI.py @@ -1,5 +1,7 @@ from toontown.toonbase.ToontownGlobals import * -from . import RegenTreasurePlannerAI, DistributedDGTreasureAI + +from . import DistributedDGTreasureAI, RegenTreasurePlannerAI + class DGTreasurePlannerAI(RegenTreasurePlannerAI.RegenTreasurePlannerAI): diff --git a/toontown/safezone/DLPlayground.py b/toontown/safezone/DLPlayground.py index c646d48..8111b82 100644 --- a/toontown/safezone/DLPlayground.py +++ b/toontown/safezone/DLPlayground.py @@ -1,7 +1,10 @@ -from panda3d.core import * -from . import Playground import random +from panda3d.core import * + +from . import Playground + + class DLPlayground(Playground.Playground): def __init__(self, loader, parentFSM, doneEvent): diff --git a/toontown/safezone/DLSafeZoneLoader.py b/toontown/safezone/DLSafeZoneLoader.py index 3d9bf8c..c58388e 100644 --- a/toontown/safezone/DLSafeZoneLoader.py +++ b/toontown/safezone/DLSafeZoneLoader.py @@ -1,6 +1,7 @@ from panda3d.core import * -from . import SafeZoneLoader -from . import DLPlayground + +from . import DLPlayground, SafeZoneLoader + class DLSafeZoneLoader(SafeZoneLoader.SafeZoneLoader): diff --git a/toontown/safezone/DLTreasurePlannerAI.py b/toontown/safezone/DLTreasurePlannerAI.py index 58b2868..5fd2f2c 100644 --- a/toontown/safezone/DLTreasurePlannerAI.py +++ b/toontown/safezone/DLTreasurePlannerAI.py @@ -1,5 +1,7 @@ from toontown.toonbase.ToontownGlobals import * -from . import RegenTreasurePlannerAI, DistributedDLTreasureAI + +from . import DistributedDLTreasureAI, RegenTreasurePlannerAI + class DLTreasurePlannerAI(RegenTreasurePlannerAI.RegenTreasurePlannerAI): diff --git a/toontown/safezone/DistributedBRTreasure.py b/toontown/safezone/DistributedBRTreasure.py index 66848e6..4048584 100644 --- a/toontown/safezone/DistributedBRTreasure.py +++ b/toontown/safezone/DistributedBRTreasure.py @@ -1,5 +1,6 @@ from . import DistributedSZTreasure + class DistributedBRTreasure(DistributedSZTreasure.DistributedSZTreasure): def __init__(self, cr): diff --git a/toontown/safezone/DistributedBRTreasureAI.py b/toontown/safezone/DistributedBRTreasureAI.py index 109c04a..d1fbe05 100644 --- a/toontown/safezone/DistributedBRTreasureAI.py +++ b/toontown/safezone/DistributedBRTreasureAI.py @@ -1,5 +1,6 @@ from . import DistributedSZTreasureAI + class DistributedBRTreasureAI(DistributedSZTreasureAI.DistributedSZTreasureAI): def __init__(self, air, treasurePlanner, x, y, z): diff --git a/toontown/safezone/DistributedBoat.py b/toontown/safezone/DistributedBoat.py index 1a9f012..58222bf 100644 --- a/toontown/safezone/DistributedBoat.py +++ b/toontown/safezone/DistributedBoat.py @@ -1,13 +1,15 @@ 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 panda3d.core import NodePath + from direct.directutil import Mopath +from direct.distributed import DistributedObject +from direct.distributed.ClockDelta import * +from direct.fsm import ClassicFSM, State +from direct.interval.IntervalGlobal import * + from toontown.toonbase import ToontownGlobals + class DistributedBoat(DistributedObject.DistributedObject): def __init__(self, cr): diff --git a/toontown/safezone/DistributedBoatAI.py b/toontown/safezone/DistributedBoatAI.py index 1965e56..13c0732 100644 --- a/toontown/safezone/DistributedBoatAI.py +++ b/toontown/safezone/DistributedBoatAI.py @@ -1,11 +1,13 @@ -from otp.ai.AIBase import * -from toontown.toonbase.ToontownGlobals import * -from direct.distributed.ClockDelta import * from direct.distributed import DistributedObjectAI +from direct.distributed.ClockDelta import * from direct.fsm import ClassicFSM, State -from direct.fsm import State from direct.task import Task +from otp.ai.AIBase import * + +from toontown.toonbase.ToontownGlobals import * + + class DistributedBoatAI(DistributedObjectAI.DistributedObjectAI): def __init__(self, air): diff --git a/toontown/safezone/DistributedButterfly.py b/toontown/safezone/DistributedButterfly.py index c6be8f2..1442c98 100644 --- a/toontown/safezone/DistributedButterfly.py +++ b/toontown/safezone/DistributedButterfly.py @@ -1,19 +1,23 @@ -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 panda3d.core import NodePath -from direct.directutil import Mopath -from toontown.toonbase import ToontownGlobals -from direct.actor import Actor -from . import ButterflyGlobals -from direct.showbase import RandomNumGen import random +from panda3d.core import * +from panda3d.core import NodePath +from panda3d.direct import HideInterval, ShowInterval + +from direct.actor import Actor +from direct.directnotify import DirectNotifyGlobal +from direct.directutil import Mopath +from direct.distributed import DistributedObject +from direct.distributed.ClockDelta import * +from direct.fsm import ClassicFSM, State +from direct.interval.IntervalGlobal import * +from direct.showbase import RandomNumGen + +from toontown.toonbase import ToontownGlobals + +from . import ButterflyGlobals + + class DistributedButterfly(DistributedObject.DistributedObject): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedButterfly') id = 0 diff --git a/toontown/safezone/DistributedButterflyAI.py b/toontown/safezone/DistributedButterflyAI.py index e09e714..7c30783 100644 --- a/toontown/safezone/DistributedButterflyAI.py +++ b/toontown/safezone/DistributedButterflyAI.py @@ -1,13 +1,16 @@ -from otp.ai.AIBase import * -from toontown.toonbase.ToontownGlobals import * -from direct.distributed.ClockDelta import * -from direct.distributed import DistributedObjectAI -from direct.fsm import ClassicFSM, State -from direct.fsm import State -from direct.task import Task -from toontown.safezone import ButterflyGlobals import random +from direct.distributed import DistributedObjectAI +from direct.distributed.ClockDelta import * +from direct.fsm import ClassicFSM, State +from direct.task import Task + +from otp.ai.AIBase import * + +from toontown.safezone import ButterflyGlobals +from toontown.toonbase.ToontownGlobals import * + + class DistributedButterflyAI(DistributedObjectAI.DistributedObjectAI): def __init__(self, air, playground, area, ownerId): diff --git a/toontown/safezone/DistributedCheckers.py b/toontown/safezone/DistributedCheckers.py index 5051f79..a6072ab 100644 --- a/toontown/safezone/DistributedCheckers.py +++ b/toontown/safezone/DistributedCheckers.py @@ -1,20 +1,22 @@ from panda3d.core import * -from direct.distributed.ClockDelta import * -from direct.task.Task import Task -from direct.interval.IntervalGlobal import * -from .TrolleyConstants import * -from direct.gui.DirectGui import * -from toontown.toonbase import TTLocalizer + from direct.distributed import DistributedNode -from direct.distributed.ClockDelta import globalClockDelta -from .CheckersBoard import CheckersBoard -from direct.fsm import ClassicFSM, State -from direct.fsm import StateData -from toontown.toonbase.ToontownTimer import ToontownTimer -from toontown.toonbase import ToontownGlobals from direct.distributed.ClockDelta import * -from otp.otpbase import OTPGlobals +from direct.distributed.ClockDelta import globalClockDelta +from direct.fsm import ClassicFSM, State, StateData +from direct.gui.DirectGui import * +from direct.interval.IntervalGlobal import * from direct.showbase import PythonUtil +from direct.task.Task import Task + +from otp.otpbase import OTPGlobals + +from toontown.toonbase import ToontownGlobals, TTLocalizer +from toontown.toonbase.ToontownTimer import ToontownTimer + +from .CheckersBoard import CheckersBoard +from .TrolleyConstants import * + class DistributedCheckers(DistributedNode.DistributedNode): diff --git a/toontown/safezone/DistributedCheckersAI.py b/toontown/safezone/DistributedCheckersAI.py index 4110e34..64edbb1 100644 --- a/toontown/safezone/DistributedCheckersAI.py +++ b/toontown/safezone/DistributedCheckersAI.py @@ -1,11 +1,10 @@ +from direct.distributed.ClockDelta import * from direct.distributed.DistributedNodeAI import DistributedNodeAI -from direct.distributed.ClockDelta import * -from direct.fsm import ClassicFSM, State -from direct.fsm import State -from direct.fsm import StateData -from direct.distributed.ClockDelta import * +from direct.fsm import ClassicFSM, State, StateData + from toontown.safezone import CheckersBoard + class DistributedCheckersAI(DistributedNodeAI): def __init__(self, air, parent, name, x, y, z, h, p, r): diff --git a/toontown/safezone/DistributedChineseCheckers.py b/toontown/safezone/DistributedChineseCheckers.py index d7247fa..ff0c3a0 100644 --- a/toontown/safezone/DistributedChineseCheckers.py +++ b/toontown/safezone/DistributedChineseCheckers.py @@ -1,21 +1,23 @@ from panda3d.core import * -from direct.distributed.ClockDelta import * -from direct.task.Task import Task -from direct.interval.IntervalGlobal import * -from .TrolleyConstants import * -from direct.gui.DirectGui import * -from toontown.toonbase import TTLocalizer + from direct.distributed import DistributedNode -from direct.distributed.ClockDelta import globalClockDelta -from .ChineseCheckersBoard import ChineseCheckersBoard -from direct.fsm import ClassicFSM, State -from direct.fsm import StateData -from toontown.distributed import DelayDelete -from toontown.toonbase.ToontownTimer import ToontownTimer -from toontown.toonbase import ToontownGlobals from direct.distributed.ClockDelta import * -from otp.otpbase import OTPGlobals +from direct.distributed.ClockDelta import globalClockDelta +from direct.fsm import ClassicFSM, State, StateData +from direct.gui.DirectGui import * +from direct.interval.IntervalGlobal import * from direct.showbase import PythonUtil +from direct.task.Task import Task + +from otp.otpbase import OTPGlobals + +from toontown.distributed import DelayDelete +from toontown.toonbase import ToontownGlobals, TTLocalizer +from toontown.toonbase.ToontownTimer import ToontownTimer + +from .ChineseCheckersBoard import ChineseCheckersBoard +from .TrolleyConstants import * + class DistributedChineseCheckers(DistributedNode.DistributedNode): diff --git a/toontown/safezone/DistributedChineseCheckersAI.py b/toontown/safezone/DistributedChineseCheckersAI.py index e367705..a21c539 100644 --- a/toontown/safezone/DistributedChineseCheckersAI.py +++ b/toontown/safezone/DistributedChineseCheckersAI.py @@ -1,11 +1,10 @@ +from direct.distributed.ClockDelta import * from direct.distributed.DistributedNodeAI import DistributedNodeAI -from direct.distributed.ClockDelta import * -from direct.fsm import ClassicFSM, State -from direct.fsm import State -from direct.fsm import StateData -from direct.distributed.ClockDelta import * +from direct.fsm import ClassicFSM, State, StateData + from toontown.safezone import ChineseCheckersBoard + class DistributedChineseCheckersAI(DistributedNodeAI): def __init__(self, air, parent, name, x, y, z, h, p, r): diff --git a/toontown/safezone/DistributedDDTreasure.py b/toontown/safezone/DistributedDDTreasure.py index 43b5d80..9cc5b16 100644 --- a/toontown/safezone/DistributedDDTreasure.py +++ b/toontown/safezone/DistributedDDTreasure.py @@ -1,5 +1,6 @@ from . import DistributedSZTreasure + class DistributedDDTreasure(DistributedSZTreasure.DistributedSZTreasure): def __init__(self, cr): diff --git a/toontown/safezone/DistributedDDTreasureAI.py b/toontown/safezone/DistributedDDTreasureAI.py index 0ec1376..cacff0a 100644 --- a/toontown/safezone/DistributedDDTreasureAI.py +++ b/toontown/safezone/DistributedDDTreasureAI.py @@ -1,5 +1,6 @@ from . import DistributedSZTreasureAI + class DistributedDDTreasureAI(DistributedSZTreasureAI.DistributedSZTreasureAI): def __init__(self, air, treasurePlanner, x, y, z): diff --git a/toontown/safezone/DistributedDGFlower.py b/toontown/safezone/DistributedDGFlower.py index aa0813e..edfd29d 100644 --- a/toontown/safezone/DistributedDGFlower.py +++ b/toontown/safezone/DistributedDGFlower.py @@ -1,8 +1,11 @@ from panda3d.core import * -from direct.distributed.ClockDelta import * + from direct.distributed import DistributedObject -from toontown.toonbase import ToontownGlobals +from direct.distributed.ClockDelta import * from direct.task import Task + +from toontown.toonbase import ToontownGlobals + SPIN_RATE = 1.25 class DistributedDGFlower(DistributedObject.DistributedObject): diff --git a/toontown/safezone/DistributedDGFlowerAI.py b/toontown/safezone/DistributedDGFlowerAI.py index 60e133d..f7d0016 100644 --- a/toontown/safezone/DistributedDGFlowerAI.py +++ b/toontown/safezone/DistributedDGFlowerAI.py @@ -1,8 +1,11 @@ -from otp.ai.AIBase import * -from toontown.toonbase.ToontownGlobals import * -from direct.distributed.ClockDelta import * from direct.distributed import DistributedObjectAI +from direct.distributed.ClockDelta import * from direct.task import Task + +from otp.ai.AIBase import * + +from toontown.toonbase.ToontownGlobals import * + HEIGHT_DELTA = 0.5 MAX_HEIGHT = 10.0 MIN_HEIGHT = 2.0 diff --git a/toontown/safezone/DistributedDGTreasure.py b/toontown/safezone/DistributedDGTreasure.py index 87a7262..155950e 100644 --- a/toontown/safezone/DistributedDGTreasure.py +++ b/toontown/safezone/DistributedDGTreasure.py @@ -1,5 +1,6 @@ from . import DistributedSZTreasure + class DistributedDGTreasure(DistributedSZTreasure.DistributedSZTreasure): def __init__(self, cr): diff --git a/toontown/safezone/DistributedDGTreasureAI.py b/toontown/safezone/DistributedDGTreasureAI.py index 4006ab9..369e9dd 100644 --- a/toontown/safezone/DistributedDGTreasureAI.py +++ b/toontown/safezone/DistributedDGTreasureAI.py @@ -1,5 +1,6 @@ from . import DistributedSZTreasureAI + class DistributedDGTreasureAI(DistributedSZTreasureAI.DistributedSZTreasureAI): def __init__(self, air, treasurePlanner, x, y, z): diff --git a/toontown/safezone/DistributedDLTreasure.py b/toontown/safezone/DistributedDLTreasure.py index deefb18..5e320db 100644 --- a/toontown/safezone/DistributedDLTreasure.py +++ b/toontown/safezone/DistributedDLTreasure.py @@ -1,5 +1,6 @@ from . import DistributedSZTreasure + class DistributedDLTreasure(DistributedSZTreasure.DistributedSZTreasure): def __init__(self, cr): diff --git a/toontown/safezone/DistributedDLTreasureAI.py b/toontown/safezone/DistributedDLTreasureAI.py index 6247ddc..744b387 100644 --- a/toontown/safezone/DistributedDLTreasureAI.py +++ b/toontown/safezone/DistributedDLTreasureAI.py @@ -1,5 +1,6 @@ from . import DistributedSZTreasureAI + class DistributedDLTreasureAI(DistributedSZTreasureAI.DistributedSZTreasureAI): def __init__(self, air, treasurePlanner, x, y, z): diff --git a/toontown/safezone/DistributedEFlyingTreasure.py b/toontown/safezone/DistributedEFlyingTreasure.py index ccc7b83..8a944fe 100644 --- a/toontown/safezone/DistributedEFlyingTreasure.py +++ b/toontown/safezone/DistributedEFlyingTreasure.py @@ -1,10 +1,15 @@ -from panda3d.core import * -from toontown.toonbase.ToonBaseGlobal import * -from . import DistributedSZTreasure -from direct.task.Task import Task import math import random +from panda3d.core import * + +from direct.task.Task import Task + +from toontown.toonbase.ToonBaseGlobal import * + +from . import DistributedSZTreasure + + class DistributedEFlyingTreasure(DistributedSZTreasure.DistributedSZTreasure): def __init__(self, cr): diff --git a/toontown/safezone/DistributedEFlyingTreasureAI.py b/toontown/safezone/DistributedEFlyingTreasureAI.py index fdc6cb5..66e8ea8 100644 --- a/toontown/safezone/DistributedEFlyingTreasureAI.py +++ b/toontown/safezone/DistributedEFlyingTreasureAI.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectAI import DistributedObjectAI + class DistributedEFlyingTreasureAI(DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedEFlyingTreasureAI') diff --git a/toontown/safezone/DistributedETreasure.py b/toontown/safezone/DistributedETreasure.py index 89b6a8e..39e546e 100644 --- a/toontown/safezone/DistributedETreasure.py +++ b/toontown/safezone/DistributedETreasure.py @@ -1,5 +1,6 @@ from . import DistributedSZTreasure + class DistributedETreasure(DistributedSZTreasure.DistributedSZTreasure): def __init__(self, cr): diff --git a/toontown/safezone/DistributedETreasureAI.py b/toontown/safezone/DistributedETreasureAI.py index 92603f4..350acb1 100644 --- a/toontown/safezone/DistributedETreasureAI.py +++ b/toontown/safezone/DistributedETreasureAI.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectAI import DistributedObjectAI + class DistributedETreasureAI(DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedETreasureAI') diff --git a/toontown/safezone/DistributedFindFour.py b/toontown/safezone/DistributedFindFour.py index c43ac09..0ccec5d 100644 --- a/toontown/safezone/DistributedFindFour.py +++ b/toontown/safezone/DistributedFindFour.py @@ -1,22 +1,25 @@ +from random import * + 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 * -from .TrolleyConstants import * -from direct.gui.DirectGui import * -from toontown.toonbase import TTLocalizer + from direct.distributed import DistributedNode -from direct.distributed.ClockDelta import globalClockDelta -from .ChineseCheckersBoard import ChineseCheckersBoard -from direct.fsm import ClassicFSM, State -from direct.fsm import StateData -from toontown.toonbase.ToontownTimer import ToontownTimer -from toontown.toonbase import ToontownGlobals from direct.distributed.ClockDelta import * -from otp.otpbase import OTPGlobals +from direct.distributed.ClockDelta import globalClockDelta +from direct.fsm import ClassicFSM, State, StateData +from direct.gui.DirectGui import * +from direct.interval.IntervalGlobal import * from direct.showbase import PythonUtil -from random import * +from direct.task.Task import Task + +from otp.otpbase import OTPGlobals + +from toontown.toonbase import ToontownGlobals, TTLocalizer +from toontown.toonbase.ToontownTimer import ToontownTimer + +from .ChineseCheckersBoard import ChineseCheckersBoard +from .TrolleyConstants import * + class DistributedFindFour(DistributedNode.DistributedNode): diff --git a/toontown/safezone/DistributedFindFourAI.py b/toontown/safezone/DistributedFindFourAI.py index f9e9c36..035bab8 100644 --- a/toontown/safezone/DistributedFindFourAI.py +++ b/toontown/safezone/DistributedFindFourAI.py @@ -1,11 +1,9 @@ +from direct.distributed.ClockDelta import * from direct.distributed.DistributedNodeAI import DistributedNodeAI -from direct.distributed.ClockDelta import * -from direct.fsm import ClassicFSM, State -from direct.fsm import State -from direct.fsm import StateData -from direct.distributed.ClockDelta import * +from direct.fsm import ClassicFSM, State, StateData from direct.interval.IntervalGlobal import * + class DistributedFindFourAI(DistributedNodeAI): def __init__(self, air, parent, name, x, y, z, h, p, r): diff --git a/toontown/safezone/DistributedFishingSpot.py b/toontown/safezone/DistributedFishingSpot.py index a61a5cb..8584a81 100644 --- a/toontown/safezone/DistributedFishingSpot.py +++ b/toontown/safezone/DistributedFishingSpot.py @@ -1,31 +1,26 @@ +import math +import random + from panda3d.core import * -from direct.interval.IntervalGlobal import * -from direct.gui.DirectGui import * -from panda3d.core import * + +from direct.actor import Actor +from direct.directnotify import DirectNotifyGlobal from direct.directtools.DirectGeometry import LineNodePath from direct.distributed import DistributedObject -from direct.directnotify import DirectNotifyGlobal -from toontown.toonbase import ToontownGlobals -from toontown.fishing import FishGlobals -from toontown.shtiker import FishPage -from toontown.toonbase import TTLocalizer -from toontown.quest import Quests -from direct.actor import Actor -from direct.showutil import Rope -import math -from direct.task.Task import Task -import random -import random -from toontown.fishing import FishingTargetGlobals -from toontown.fishing import FishBase -from toontown.fishing import FishPanel -from toontown.effects import Ripples -from toontown.toontowngui import TTDialog -from toontown.toonbase import ToontownTimer from direct.fsm import ClassicFSM, State -from direct.fsm import State +from direct.gui.DirectGui import * +from direct.interval.IntervalGlobal import * +from direct.showutil import Rope +from direct.task.Task import Task + +from toontown.effects import Ripples +from toontown.fishing import FishBase, FishGlobals, FishingTargetGlobals, FishPanel from toontown.hood import ZoneUtil -from toontown.toontowngui import TeaserPanel +from toontown.quest import Quests +from toontown.shtiker import FishPage +from toontown.toonbase import ToontownGlobals, ToontownTimer, TTLocalizer +from toontown.toontowngui import TeaserPanel, TTDialog + class DistributedFishingSpot(DistributedObject.DistributedObject): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedFishingSpot') diff --git a/toontown/safezone/DistributedFishingSpotAI.py b/toontown/safezone/DistributedFishingSpotAI.py index ac51239..e532697 100644 --- a/toontown/safezone/DistributedFishingSpotAI.py +++ b/toontown/safezone/DistributedFishingSpotAI.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectAI import DistributedObjectAI + class DistributedFishingSpotAI(DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedFishingSpotAI') diff --git a/toontown/safezone/DistributedGolfKart.py b/toontown/safezone/DistributedGolfKart.py index 11c4bd2..1ac1cf2 100644 --- a/toontown/safezone/DistributedGolfKart.py +++ b/toontown/safezone/DistributedGolfKart.py @@ -1,20 +1,22 @@ from panda3d.core import * -from direct.distributed.ClockDelta import * -from direct.task.Task import Task -from direct.interval.IntervalGlobal import * -from .TrolleyConstants import * -from toontown.golf import GolfGlobals -from toontown.toonbase import ToontownGlobals -from direct.distributed import DistributedObject + from direct.directnotify import DirectNotifyGlobal +from direct.distributed import DistributedObject +from direct.distributed.ClockDelta import * from direct.fsm import ClassicFSM, State -from direct.fsm import State -from toontown.distributed import DelayDelete -from direct.task.Task import Task +from direct.interval.IntervalGlobal import * from direct.showbase import PythonUtil -from toontown.toontowngui import TeaserPanel -from toontown.toon import ToonDNA +from direct.task.Task import Task + +from toontown.distributed import DelayDelete +from toontown.golf import GolfGlobals from toontown.hood import ZoneUtil +from toontown.toon import ToonDNA +from toontown.toonbase import ToontownGlobals +from toontown.toontowngui import TeaserPanel + +from .TrolleyConstants import * + class DistributedGolfKart(DistributedObject.DistributedObject): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedGolfKart') diff --git a/toontown/safezone/DistributedGolfKartAI.py b/toontown/safezone/DistributedGolfKartAI.py index 1035a06..e698a54 100644 --- a/toontown/safezone/DistributedGolfKartAI.py +++ b/toontown/safezone/DistributedGolfKartAI.py @@ -1,19 +1,21 @@ -from otp.ai.AIBase import * -from toontown.toonbase.ToontownGlobals import * -from direct.distributed.ClockDelta import * -from .TrolleyConstants import * -from direct.distributed import DistributedObjectAI -from direct.fsm import ClassicFSM, State -from direct.fsm import State -from direct.task import Task -from direct.directnotify import DirectNotifyGlobal -from toontown.minigame import MinigameCreatorAI -from toontown.quest import Quests -from toontown.minigame import TrolleyHolidayMgrAI -from toontown.golf import GolfManagerAI -from toontown.golf import GolfGlobals import random +from direct.directnotify import DirectNotifyGlobal +from direct.distributed import DistributedObjectAI +from direct.distributed.ClockDelta import * +from direct.fsm import ClassicFSM, State +from direct.task import Task + +from otp.ai.AIBase import * + +from toontown.golf import GolfGlobals, GolfManagerAI +from toontown.minigame import MinigameCreatorAI, TrolleyHolidayMgrAI +from toontown.quest import Quests +from toontown.toonbase.ToontownGlobals import * + +from .TrolleyConstants import * + + class DistributedGolfKartAI(DistributedObjectAI.DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedGolfKartAI') diff --git a/toontown/safezone/DistributedMMPiano.py b/toontown/safezone/DistributedMMPiano.py index e86491a..363102a 100644 --- a/toontown/safezone/DistributedMMPiano.py +++ b/toontown/safezone/DistributedMMPiano.py @@ -1,10 +1,13 @@ from panda3d.core import * -from direct.task.Task import Task +from panda3d.core import NodePath + +from direct.distributed import DistributedObject from direct.distributed.ClockDelta import * from direct.interval.IntervalGlobal import * -from direct.distributed import DistributedObject -from panda3d.core import NodePath +from direct.task.Task import Task + from toontown.toonbase import ToontownGlobals + ChangeDirectionDebounce = 1.0 ChangeDirectionTime = 1.0 diff --git a/toontown/safezone/DistributedMMPianoAI.py b/toontown/safezone/DistributedMMPianoAI.py index bea79e7..18dea77 100644 --- a/toontown/safezone/DistributedMMPianoAI.py +++ b/toontown/safezone/DistributedMMPianoAI.py @@ -1,8 +1,11 @@ -from otp.ai.AIBase import * -from toontown.toonbase.ToontownGlobals import * -from direct.distributed.ClockDelta import * from direct.distributed import DistributedObjectAI +from direct.distributed.ClockDelta import * from direct.task import Task + +from otp.ai.AIBase import * + +from toontown.toonbase.ToontownGlobals import * + PianoSpeeds = [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 8.0, 10.0, 12.0, 14.0, 16.0, 18.0] PianoMaxSpeed = PianoSpeeds[len(PianoSpeeds) - 1] diff --git a/toontown/safezone/DistributedMMTreasure.py b/toontown/safezone/DistributedMMTreasure.py index c3ec8f1..4875f02 100644 --- a/toontown/safezone/DistributedMMTreasure.py +++ b/toontown/safezone/DistributedMMTreasure.py @@ -1,5 +1,6 @@ from . import DistributedSZTreasure + class DistributedMMTreasure(DistributedSZTreasure.DistributedSZTreasure): def __init__(self, cr): diff --git a/toontown/safezone/DistributedMMTreasureAI.py b/toontown/safezone/DistributedMMTreasureAI.py index f63998e..7efd5ed 100644 --- a/toontown/safezone/DistributedMMTreasureAI.py +++ b/toontown/safezone/DistributedMMTreasureAI.py @@ -1,5 +1,6 @@ from . import DistributedSZTreasureAI + class DistributedMMTreasureAI(DistributedSZTreasureAI.DistributedSZTreasureAI): def __init__(self, air, treasurePlanner, x, y, z): diff --git a/toontown/safezone/DistributedOZTreasure.py b/toontown/safezone/DistributedOZTreasure.py index cfe9016..cc14dd6 100644 --- a/toontown/safezone/DistributedOZTreasure.py +++ b/toontown/safezone/DistributedOZTreasure.py @@ -1,5 +1,6 @@ from . import DistributedSZTreasure + class DistributedOZTreasure(DistributedSZTreasure.DistributedSZTreasure): def __init__(self, cr): diff --git a/toontown/safezone/DistributedOZTreasureAI.py b/toontown/safezone/DistributedOZTreasureAI.py index 2a3d709..28e3e51 100644 --- a/toontown/safezone/DistributedOZTreasureAI.py +++ b/toontown/safezone/DistributedOZTreasureAI.py @@ -1,5 +1,6 @@ from . import DistributedSZTreasureAI + class DistributedOZTreasureAI(DistributedSZTreasureAI.DistributedSZTreasureAI): def __init__(self, air, treasurePlanner, x, y, z): diff --git a/toontown/safezone/DistributedPartyGate.py b/toontown/safezone/DistributedPartyGate.py index 56c639e..601357a 100644 --- a/toontown/safezone/DistributedPartyGate.py +++ b/toontown/safezone/DistributedPartyGate.py @@ -1,17 +1,19 @@ -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 -from direct.interval.FunctionInterval import Wait -from direct.distributed import DistributedObject +from panda3d.core import BitMask32, CollisionNode, CollisionSphere, NodePath, Point3, TextNode, Vec3, Vec4 + from direct.directnotify import DirectNotifyGlobal +from direct.distributed import DistributedObject from direct.gui import DirectLabel -from toontown.toontowngui import TTDialog -from toontown.toonbase import TTLocalizer -from toontown.toonbase import ToontownGlobals -from toontown.parties.ServerTimeGui import ServerTimeGui -from toontown.parties.PublicPartyGui import PublicPartyGui +from direct.interval.FunctionInterval import Wait +from direct.interval.IntervalGlobal import Parallel, Sequence, SoundInterval + +from otp.otpbase import OTPGlobals, OTPLocalizer + from toontown.parties import PartyGlobals +from toontown.parties.PublicPartyGui import PublicPartyGui +from toontown.parties.ServerTimeGui import ServerTimeGui +from toontown.toonbase import ToontownGlobals, TTLocalizer +from toontown.toontowngui import TTDialog + class DistributedPartyGate(DistributedObject.DistributedObject): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedPartyGate') diff --git a/toontown/safezone/DistributedPartyGateAI.py b/toontown/safezone/DistributedPartyGateAI.py index 9356651..ad67c4c 100644 --- a/toontown/safezone/DistributedPartyGateAI.py +++ b/toontown/safezone/DistributedPartyGateAI.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectAI import DistributedObjectAI + class DistributedPartyGateAI(DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedPartyGateAI') diff --git a/toontown/safezone/DistributedPicnicBasket.py b/toontown/safezone/DistributedPicnicBasket.py index 2a4cf5b..680726a 100644 --- a/toontown/safezone/DistributedPicnicBasket.py +++ b/toontown/safezone/DistributedPicnicBasket.py @@ -1,23 +1,25 @@ -from panda3d.core import * -from direct.distributed.ClockDelta import * -from direct.task.Task import Task -from direct.interval.IntervalGlobal import * -from .TrolleyConstants import * -from toontown.golf import GolfGlobals -from toontown.toonbase import ToontownGlobals -from direct.distributed import DistributedObject -from direct.directnotify import DirectNotifyGlobal -from direct.fsm import ClassicFSM, State -from direct.fsm import State -from toontown.distributed import DelayDelete -from toontown.toonbase.ToontownTimer import ToontownTimer -from direct.task.Task import Task -from direct.showbase import PythonUtil -from toontown.toon import ToonDNA -from direct.showbase import RandomNumGen -from toontown.battle.BattleSounds import * from enum import IntEnum +from panda3d.core import * + +from direct.directnotify import DirectNotifyGlobal +from direct.distributed import DistributedObject +from direct.distributed.ClockDelta import * +from direct.fsm import ClassicFSM, State +from direct.interval.IntervalGlobal import * +from direct.showbase import PythonUtil, RandomNumGen +from direct.task.Task import Task + +from toontown.battle.BattleSounds import * +from toontown.distributed import DelayDelete +from toontown.golf import GolfGlobals +from toontown.toon import ToonDNA +from toontown.toonbase import ToontownGlobals +from toontown.toonbase.ToontownTimer import ToontownTimer + +from .TrolleyConstants import * + + class DistributedPicnicBasket(DistributedObject.DistributedObject): seatState = IntEnum('seatState', ('Empty', 'Full', 'Eating'), start=0) notify = DirectNotifyGlobal.directNotify.newCategory('DistributedPicnicBasket') diff --git a/toontown/safezone/DistributedPicnicBasketAI.py b/toontown/safezone/DistributedPicnicBasketAI.py index 5271060..0a16a7c 100644 --- a/toontown/safezone/DistributedPicnicBasketAI.py +++ b/toontown/safezone/DistributedPicnicBasketAI.py @@ -1,19 +1,20 @@ -from otp.ai.AIBase import * -from toontown.toonbase.ToontownGlobals import * -from direct.distributed.ClockDelta import * -from .TrolleyConstants import * -from toontown.toonbase import ToontownGlobals -from direct.distributed import DistributedObjectAI -from direct.fsm import ClassicFSM, State -from direct.fsm import State -from direct.task import Task from direct.directnotify import DirectNotifyGlobal +from direct.distributed import DistributedObjectAI +from direct.distributed.ClockDelta import * +from direct.fsm import ClassicFSM, State from direct.showbase import RandomNumGen -from toontown.minigame import MinigameCreatorAI +from direct.task import Task + +from otp.ai.AIBase import * + +from toontown.golf import GolfGlobals, GolfManagerAI +from toontown.minigame import MinigameCreatorAI, TrolleyHolidayMgrAI from toontown.quest import Quests -from toontown.minigame import TrolleyHolidayMgrAI -from toontown.golf import GolfManagerAI -from toontown.golf import GolfGlobals +from toontown.toonbase import ToontownGlobals +from toontown.toonbase.ToontownGlobals import * + +from .TrolleyConstants import * + class DistributedPicnicBasketAI(DistributedObjectAI.DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedPicnicBasketAI') diff --git a/toontown/safezone/DistributedPicnicTable.py b/toontown/safezone/DistributedPicnicTable.py index 6ce7b0d..173d852 100644 --- a/toontown/safezone/DistributedPicnicTable.py +++ b/toontown/safezone/DistributedPicnicTable.py @@ -1,24 +1,27 @@ 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 * -from .TrolleyConstants import * -from direct.gui.DirectGui import * -from toontown.toonbase import TTLocalizer + from direct.distributed import DistributedNode +from direct.distributed.ClockDelta import * from direct.distributed.ClockDelta import globalClockDelta -from .ChineseCheckersBoard import ChineseCheckersBoard -from .GameTutorials import * -from .GameMenu import GameMenu -from direct.fsm import ClassicFSM, State -from direct.fsm import StateData -from toontown.distributed import DelayDelete -from toontown.toonbase.ToontownTimer import ToontownTimer -from toontown.toonbase import ToontownGlobals +from direct.fsm import ClassicFSM, State, StateData +from direct.gui.DirectGui import * +from direct.interval.IntervalGlobal import * from direct.showbase import PythonUtil +from direct.task.Task import Task + from otp.otpbase import OTPGlobals +from toontown.distributed import DelayDelete +from toontown.toonbase import ToontownGlobals, TTLocalizer +from toontown.toonbase.ToontownTimer import ToontownTimer + +from .ChineseCheckersBoard import ChineseCheckersBoard +from .GameMenu import GameMenu +from .GameTutorials import * +from .TrolleyConstants import * + + class DistributedPicnicTable(DistributedNode.DistributedNode): def __init__(self, cr): diff --git a/toontown/safezone/DistributedPicnicTableAI.py b/toontown/safezone/DistributedPicnicTableAI.py index d218d1e..b5b27ad 100644 --- a/toontown/safezone/DistributedPicnicTableAI.py +++ b/toontown/safezone/DistributedPicnicTableAI.py @@ -1,11 +1,9 @@ -from direct.distributed.DistributedNodeAI import DistributedNodeAI from direct.distributed.ClockDelta import * -from direct.fsm import ClassicFSM, State -from direct.fsm import State -from direct.fsm import StateData -from toontown.safezone import DistributedChineseCheckersAI -from toontown.safezone import DistributedCheckersAI -from toontown.safezone import DistributedFindFourAI +from direct.distributed.DistributedNodeAI import DistributedNodeAI +from direct.fsm import ClassicFSM, State, StateData + +from toontown.safezone import DistributedCheckersAI, DistributedChineseCheckersAI, DistributedFindFourAI + class DistributedPicnicTableAI(DistributedNodeAI): diff --git a/toontown/safezone/DistributedSZTreasure.py b/toontown/safezone/DistributedSZTreasure.py index 1546c01..77d0937 100644 --- a/toontown/safezone/DistributedSZTreasure.py +++ b/toontown/safezone/DistributedSZTreasure.py @@ -1,8 +1,12 @@ -from . import DistributedTreasure from panda3d.core import VBase3, VBase4 -from direct.interval.IntervalGlobal import Sequence, Wait, Func, LerpColorScaleInterval, LerpScaleInterval + +from direct.interval.IntervalGlobal import Func, LerpColorScaleInterval, LerpScaleInterval, Sequence, Wait + from toontown.toonbase import ToontownGlobals +from . import DistributedTreasure + + class DistributedSZTreasure(DistributedTreasure.DistributedTreasure): def __init__(self, cr): diff --git a/toontown/safezone/DistributedSZTreasureAI.py b/toontown/safezone/DistributedSZTreasureAI.py index cf804fd..ef9f945 100644 --- a/toontown/safezone/DistributedSZTreasureAI.py +++ b/toontown/safezone/DistributedSZTreasureAI.py @@ -1,6 +1,8 @@ -from . import DistributedTreasureAI from toontown.toonbase import ToontownGlobals +from . import DistributedTreasureAI + + class DistributedSZTreasureAI(DistributedTreasureAI.DistributedTreasureAI): def __init__(self, air, treasurePlanner, x, y, z): diff --git a/toontown/safezone/DistributedTTTreasure.py b/toontown/safezone/DistributedTTTreasure.py index 1b18acb..f4e3626 100644 --- a/toontown/safezone/DistributedTTTreasure.py +++ b/toontown/safezone/DistributedTTTreasure.py @@ -1,5 +1,6 @@ from . import DistributedSZTreasure + class DistributedTTTreasure(DistributedSZTreasure.DistributedSZTreasure): def __init__(self, cr): diff --git a/toontown/safezone/DistributedTTTreasureAI.py b/toontown/safezone/DistributedTTTreasureAI.py index ef096d4..fe3c1e2 100644 --- a/toontown/safezone/DistributedTTTreasureAI.py +++ b/toontown/safezone/DistributedTTTreasureAI.py @@ -1,5 +1,6 @@ from . import DistributedSZTreasureAI + class DistributedTTTreasureAI(DistributedSZTreasureAI.DistributedSZTreasureAI): def __init__(self, air, treasurePlanner, x, y, z): diff --git a/toontown/safezone/DistributedTreasure.py b/toontown/safezone/DistributedTreasure.py index 713c8b4..a49c93b 100644 --- a/toontown/safezone/DistributedTreasure.py +++ b/toontown/safezone/DistributedTreasure.py @@ -1,9 +1,12 @@ 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 +from panda3d.direct import HideInterval, ShowInterval + from direct.directnotify import DirectNotifyGlobal +from direct.distributed import DistributedObject +from direct.interval.IntervalGlobal import * + +from toontown.toonbase.ToontownGlobals import * + class DistributedTreasure(DistributedObject.DistributedObject): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedTreasure') diff --git a/toontown/safezone/DistributedTreasureAI.py b/toontown/safezone/DistributedTreasureAI.py index 6d230f3..0e07075 100644 --- a/toontown/safezone/DistributedTreasureAI.py +++ b/toontown/safezone/DistributedTreasureAI.py @@ -1,6 +1,8 @@ -from otp.ai.AIBase import * -from direct.distributed.ClockDelta import * from direct.distributed import DistributedObjectAI +from direct.distributed.ClockDelta import * + +from otp.ai.AIBase import * + class DistributedTreasureAI(DistributedObjectAI.DistributedObjectAI): diff --git a/toontown/safezone/DistributedTrolley.py b/toontown/safezone/DistributedTrolley.py index cc955a5..fe87559 100644 --- a/toontown/safezone/DistributedTrolley.py +++ b/toontown/safezone/DistributedTrolley.py @@ -1,18 +1,20 @@ from panda3d.core import * -from direct.distributed.ClockDelta import * -from direct.task.Task import Task -from direct.interval.IntervalGlobal import * -from .TrolleyConstants import * -from toontown.toonbase import ToontownGlobals -from direct.distributed import DistributedObject + from direct.directnotify import DirectNotifyGlobal +from direct.distributed import DistributedObject +from direct.distributed.ClockDelta import * from direct.fsm import ClassicFSM, State -from direct.fsm import State -from toontown.distributed import DelayDelete +from direct.interval.IntervalGlobal import * from direct.task.Task import Task + +from toontown.distributed import DelayDelete from toontown.hood import ZoneUtil +from toontown.toonbase import ToontownGlobals from toontown.toontowngui import TeaserPanel +from .TrolleyConstants import * + + class DistributedTrolley(DistributedObject.DistributedObject): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedTrolley') diff --git a/toontown/safezone/DistributedTrolleyAI.py b/toontown/safezone/DistributedTrolleyAI.py index 37d62a9..c88ddb6 100644 --- a/toontown/safezone/DistributedTrolleyAI.py +++ b/toontown/safezone/DistributedTrolleyAI.py @@ -1,17 +1,18 @@ -from otp.ai.AIBase import * -from toontown.toonbase.ToontownGlobals import * -from direct.distributed.ClockDelta import * -from .TrolleyConstants import * -from direct.distributed import DistributedObjectAI -from direct.fsm import ClassicFSM, State -from direct.fsm import State -from direct.task import Task from direct.directnotify import DirectNotifyGlobal -from toontown.minigame import MinigameCreatorAI +from direct.distributed import DistributedObjectAI +from direct.distributed.ClockDelta import * +from direct.fsm import ClassicFSM, State +from direct.task import Task + +from otp.ai.AIBase import * + +from toontown.minigame import MinigameCreatorAI, TrolleyHolidayMgrAI, TrolleyWeekendMgrAI from toontown.quest import Quests -from toontown.minigame import TrolleyHolidayMgrAI -from toontown.minigame import TrolleyWeekendMgrAI from toontown.toonbase import ToontownAccessAI +from toontown.toonbase.ToontownGlobals import * + +from .TrolleyConstants import * + class DistributedTrolleyAI(DistributedObjectAI.DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedTrolleyAI') diff --git a/toontown/safezone/GSPlayground.py b/toontown/safezone/GSPlayground.py index 20f73c9..d3f2f87 100644 --- a/toontown/safezone/GSPlayground.py +++ b/toontown/safezone/GSPlayground.py @@ -1,13 +1,16 @@ from panda3d.core import * -from toontown.toonbase import ToontownGlobals -from . import Playground -from toontown.launcher import DownloadForceAcknowledge -from toontown.building import Elevator -from toontown.toontowngui import TTDialog -from toontown.toonbase import TTLocalizer -from toontown.racing import RaceGlobals + from direct.fsm import State +from toontown.building import Elevator +from toontown.launcher import DownloadForceAcknowledge +from toontown.racing import RaceGlobals +from toontown.toonbase import ToontownGlobals, TTLocalizer +from toontown.toontowngui import TTDialog + +from . import Playground + + class GSPlayground(Playground.Playground): def __init__(self, loader, parentFSM, doneEvent): diff --git a/toontown/safezone/GSSafeZoneLoader.py b/toontown/safezone/GSSafeZoneLoader.py index 9df77d4..f175c8a 100644 --- a/toontown/safezone/GSSafeZoneLoader.py +++ b/toontown/safezone/GSSafeZoneLoader.py @@ -1,14 +1,17 @@ +import random + +from panda3d.core import * + from direct.directnotify import DirectNotifyGlobal from direct.fsm import ClassicFSM, State -from direct.fsm import State -from panda3d.core import * + +from toontown.effects.CarSmoke import CarSmoke from toontown.hood import ZoneUtil from toontown.launcher import DownloadForceAcknowledge -from toontown.safezone.SafeZoneLoader import SafeZoneLoader from toontown.safezone.GSPlayground import GSPlayground -from toontown.effects.CarSmoke import CarSmoke +from toontown.safezone.SafeZoneLoader import SafeZoneLoader from toontown.toonbase import ToontownGlobals -import random + if (__debug__): import pdb diff --git a/toontown/safezone/GZPlayground.py b/toontown/safezone/GZPlayground.py index 5c1c3c6..7f56037 100644 --- a/toontown/safezone/GZPlayground.py +++ b/toontown/safezone/GZPlayground.py @@ -1,13 +1,16 @@ from panda3d.core import * -from toontown.toonbase import ToontownGlobals -from . import Playground -from toontown.launcher import DownloadForceAcknowledge -from toontown.building import Elevator -from toontown.toontowngui import TTDialog -from toontown.toonbase import TTLocalizer -from toontown.racing import RaceGlobals + from direct.fsm import State + +from toontown.building import Elevator +from toontown.launcher import DownloadForceAcknowledge +from toontown.racing import RaceGlobals from toontown.safezone import GolfKart +from toontown.toonbase import ToontownGlobals, TTLocalizer +from toontown.toontowngui import TTDialog + +from . import Playground + class GZPlayground(Playground.Playground): diff --git a/toontown/safezone/GZSafeZoneLoader.py b/toontown/safezone/GZSafeZoneLoader.py index 2011fe8..8edc29e 100644 --- a/toontown/safezone/GZSafeZoneLoader.py +++ b/toontown/safezone/GZSafeZoneLoader.py @@ -1,15 +1,17 @@ -from direct.directnotify import DirectNotifyGlobal -from direct.gui import DirectGui -from direct.fsm import ClassicFSM, State -from direct.fsm import State +import random + from panda3d.core import * + +from direct.directnotify import DirectNotifyGlobal +from direct.fsm import ClassicFSM, State +from direct.gui import DirectGui + from toontown.hood import ZoneUtil from toontown.launcher import DownloadForceAcknowledge -from toontown.safezone.SafeZoneLoader import SafeZoneLoader from toontown.safezone.GZPlayground import GZPlayground -from toontown.toonbase import TTLocalizer -from toontown.toonbase import ToontownGlobals -import random +from toontown.safezone.SafeZoneLoader import SafeZoneLoader +from toontown.toonbase import ToontownGlobals, TTLocalizer + if (__debug__): import pdb diff --git a/toontown/safezone/GameMenu.py b/toontown/safezone/GameMenu.py index fb57262..6315a01 100644 --- a/toontown/safezone/GameMenu.py +++ b/toontown/safezone/GameMenu.py @@ -1,11 +1,14 @@ from panda3d.core import * + from direct.distributed.ClockDelta import * -from direct.task.Task import Task -from direct.interval.IntervalGlobal import * -from .TrolleyConstants import * from direct.gui.DirectGui import * -from toontown.toonbase import TTLocalizer -from toontown.toonbase import ToontownGlobals +from direct.interval.IntervalGlobal import * +from direct.task.Task import Task + +from toontown.toonbase import ToontownGlobals, TTLocalizer + +from .TrolleyConstants import * + class GameMenu(DirectFrame): diff --git a/toontown/safezone/GameTutorials.py b/toontown/safezone/GameTutorials.py index 0ab80b5..1865e8c 100644 --- a/toontown/safezone/GameTutorials.py +++ b/toontown/safezone/GameTutorials.py @@ -1,11 +1,13 @@ -from direct.gui.DirectGui import * -from direct.fsm import FSM -from direct.directnotify import DirectNotifyGlobal -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import TTLocalizer from panda3d.core import * + +from direct.directnotify import DirectNotifyGlobal +from direct.fsm import FSM +from direct.gui.DirectGui import * from direct.interval.IntervalGlobal import * +from toontown.toonbase import ToontownGlobals, TTLocalizer + + class ChineseTutorial(DirectFrame, FSM.FSM): def __init__(self, doneFunction, doneEvent = None, callback = None): diff --git a/toontown/safezone/GolfKart.py b/toontown/safezone/GolfKart.py index 7e8dc39..b8f53d2 100644 --- a/toontown/safezone/GolfKart.py +++ b/toontown/safezone/GolfKart.py @@ -1,16 +1,15 @@ from panda3d.core import * -from toontown.toonbase.ToonBaseGlobal import * + +from direct.fsm import ClassicFSM, State, StateData from direct.gui.DirectGui import * -from panda3d.core import * from direct.interval.IntervalGlobal import * -from direct.fsm import ClassicFSM, State -from direct.fsm import State -from direct.fsm import StateData -from toontown.toontowngui import TTDialog -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import TTLocalizer from direct.showbase import PythonUtil +from toontown.toonbase import ToontownGlobals, TTLocalizer +from toontown.toonbase.ToonBaseGlobal import * +from toontown.toontowngui import TTDialog + + class GolfKart(StateData.StateData): def __init__(self, safeZone, parentFSM, doneEvent, golfCourse): diff --git a/toontown/safezone/MMPlayground.py b/toontown/safezone/MMPlayground.py index a2b9fb6..5600305 100644 --- a/toontown/safezone/MMPlayground.py +++ b/toontown/safezone/MMPlayground.py @@ -1,10 +1,15 @@ -from panda3d.core import * -from . import Playground import random -from direct.fsm import ClassicFSM, State + +from panda3d.core import * + from direct.actor import Actor +from direct.fsm import ClassicFSM, State + from toontown.toonbase import ToontownGlobals +from . import Playground + + class MMPlayground(Playground.Playground): def __init__(self, loader, parentFSM, doneEvent): diff --git a/toontown/safezone/MMSafeZoneLoader.py b/toontown/safezone/MMSafeZoneLoader.py index 8d9da0c..812aa02 100644 --- a/toontown/safezone/MMSafeZoneLoader.py +++ b/toontown/safezone/MMSafeZoneLoader.py @@ -1,8 +1,10 @@ from panda3d.core import * -from . import SafeZoneLoader -from . import MMPlayground + from toontown.toonbase import ToontownGlobals +from . import MMPlayground, SafeZoneLoader + + class MMSafeZoneLoader(SafeZoneLoader.SafeZoneLoader): def __init__(self, hood, parentFSM, doneEvent): diff --git a/toontown/safezone/MMTreasurePlannerAI.py b/toontown/safezone/MMTreasurePlannerAI.py index d1ec0e3..b3feb5e 100644 --- a/toontown/safezone/MMTreasurePlannerAI.py +++ b/toontown/safezone/MMTreasurePlannerAI.py @@ -1,5 +1,7 @@ from toontown.toonbase.ToontownGlobals import * -from . import RegenTreasurePlannerAI, DistributedMMTreasureAI + +from . import DistributedMMTreasureAI, RegenTreasurePlannerAI + class MMTreasurePlannerAI(RegenTreasurePlannerAI.RegenTreasurePlannerAI): diff --git a/toontown/safezone/OZPlayground.py b/toontown/safezone/OZPlayground.py index 3f85a90..ae7d338 100644 --- a/toontown/safezone/OZPlayground.py +++ b/toontown/safezone/OZPlayground.py @@ -1,16 +1,18 @@ from panda3d.core import * -from toontown.toonbase import ToontownGlobals -from . import Playground -from toontown.launcher import DownloadForceAcknowledge -from toontown.building import Elevator -from toontown.toontowngui import TTDialog -from toontown.toonbase import TTLocalizer -from toontown.racing import RaceGlobals + from direct.fsm import State -from toontown.safezone import PicnicBasket -from toontown.safezone import GolfKart from direct.task.Task import Task +from toontown.building import Elevator +from toontown.launcher import DownloadForceAcknowledge +from toontown.racing import RaceGlobals +from toontown.safezone import GolfKart, PicnicBasket +from toontown.toonbase import ToontownGlobals, TTLocalizer +from toontown.toontowngui import TTDialog + +from . import Playground + + class OZPlayground(Playground.Playground): waterLevel = -0.53 diff --git a/toontown/safezone/OZSafeZoneLoader.py b/toontown/safezone/OZSafeZoneLoader.py index d4d6887..ac221d9 100644 --- a/toontown/safezone/OZSafeZoneLoader.py +++ b/toontown/safezone/OZSafeZoneLoader.py @@ -1,21 +1,24 @@ -from direct.directnotify import DirectNotifyGlobal -from direct.fsm import ClassicFSM, State -from direct.fsm import State +import copy +import random + from panda3d.core import * + +from direct.actor import Actor +from direct.directnotify import DirectNotifyGlobal +from direct.distributed.ClockDelta import * +from direct.fsm import ClassicFSM, State +from direct.interval.IntervalGlobal import * + from otp.avatar import Avatar +from otp.otpbase import OTPGlobals + +from toontown.distributed import DelayDelete +from toontown.effects import Bubbles from toontown.hood import ZoneUtil from toontown.launcher import DownloadForceAcknowledge -from toontown.safezone.SafeZoneLoader import SafeZoneLoader from toontown.safezone.OZPlayground import OZPlayground -from direct.actor import Actor -from direct.interval.IntervalGlobal import * -import random -from toontown.distributed import DelayDelete -from direct.distributed.ClockDelta import * -from otp.otpbase import OTPGlobals -import copy -from toontown.effects import Bubbles -import random +from toontown.safezone.SafeZoneLoader import SafeZoneLoader + if (__debug__): import pdb diff --git a/toontown/safezone/OZTreasurePlannerAI.py b/toontown/safezone/OZTreasurePlannerAI.py index 3b34a3f..3e5b4a4 100644 --- a/toontown/safezone/OZTreasurePlannerAI.py +++ b/toontown/safezone/OZTreasurePlannerAI.py @@ -1,5 +1,7 @@ from toontown.toonbase.ToontownGlobals import * -from . import RegenTreasurePlannerAI, DistributedOZTreasureAI + +from . import DistributedOZTreasureAI, RegenTreasurePlannerAI + class OZTreasurePlannerAI(RegenTreasurePlannerAI.RegenTreasurePlannerAI): diff --git a/toontown/safezone/PicnicBasket.py b/toontown/safezone/PicnicBasket.py index 9034004..2ab3473 100644 --- a/toontown/safezone/PicnicBasket.py +++ b/toontown/safezone/PicnicBasket.py @@ -1,16 +1,15 @@ from panda3d.core import * -from toontown.toonbase.ToonBaseGlobal import * + +from direct.fsm import ClassicFSM, State, StateData from direct.gui.DirectGui import * -from panda3d.core import * from direct.interval.IntervalGlobal import * -from direct.fsm import ClassicFSM, State -from direct.fsm import State -from direct.fsm import StateData -from toontown.toontowngui import TTDialog -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import TTLocalizer from direct.showbase import PythonUtil +from toontown.toonbase import ToontownGlobals, TTLocalizer +from toontown.toonbase.ToonBaseGlobal import * +from toontown.toontowngui import TTDialog + + class PicnicBasket(StateData.StateData): def __init__(self, safeZone, parentFSM, doneEvent, tableNumber, seatNumber): diff --git a/toontown/safezone/Playground.py b/toontown/safezone/Playground.py index 5484176..69de65d 100644 --- a/toontown/safezone/Playground.py +++ b/toontown/safezone/Playground.py @@ -17,8 +17,7 @@ from toontown.toon.DeathForceAcknowledge import DeathForceAcknowledge from toontown.toon.HealthForceAcknowledge import HealthForceAcknowledge from toontown.toon.NPCForceAcknowledge import NPCForceAcknowledge from toontown.toon.Toon import teleportDebug -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import TTLocalizer +from toontown.toonbase import ToontownGlobals, TTLocalizer from toontown.toonbase.ToonBaseGlobal import base from toontown.toontowngui import TTDialog from toontown.trolley.Trolley import Trolley diff --git a/toontown/safezone/PublicWalk.py b/toontown/safezone/PublicWalk.py index 03d8516..8b2fb75 100644 --- a/toontown/safezone/PublicWalk.py +++ b/toontown/safezone/PublicWalk.py @@ -1,8 +1,12 @@ from panda3d.core import * -from toontown.toonbase.ToontownGlobals import * + from direct.directnotify import DirectNotifyGlobal + +from toontown.toonbase.ToontownGlobals import * + from . import Walk + class PublicWalk(Walk.Walk): notify = DirectNotifyGlobal.directNotify.newCategory('PublicWalk') diff --git a/toontown/safezone/RegenTreasurePlannerAI.py b/toontown/safezone/RegenTreasurePlannerAI.py index f7da0ca..4db6f8a 100644 --- a/toontown/safezone/RegenTreasurePlannerAI.py +++ b/toontown/safezone/RegenTreasurePlannerAI.py @@ -1,10 +1,13 @@ +import random + +from direct.directnotify import DirectNotifyGlobal from direct.distributed.ClockDelta import * from direct.showbase import DirectObject -from direct.directnotify import DirectNotifyGlobal from direct.task import Task -import random + from . import TreasurePlannerAI + class RegenTreasurePlannerAI(TreasurePlannerAI.TreasurePlannerAI): notify = DirectNotifyGlobal.directNotify.newCategory('RegenTreasurePlannerAI') diff --git a/toontown/safezone/SafeZoneLoader.py b/toontown/safezone/SafeZoneLoader.py index 94c6118..0e81103 100644 --- a/toontown/safezone/SafeZoneLoader.py +++ b/toontown/safezone/SafeZoneLoader.py @@ -1,21 +1,20 @@ from panda3d.core import * -from toontown.toonbase.ToonBaseGlobal import * -from toontown.distributed.ToontownMsgTypes import * -from toontown.hood import ZoneUtil + from direct.directnotify import DirectNotifyGlobal -from toontown.hood import Place +from direct.fsm import ClassicFSM, State, StateData from direct.showbase import DirectObject -from direct.fsm import StateData -from direct.fsm import ClassicFSM, State -from direct.fsm import State from direct.task import Task + +from toontown.building import ToonInterior +from toontown.distributed.ToontownMsgTypes import * +from toontown.hood import Place, QuietZoneState, ZoneUtil from toontown.launcher import DownloadForceAcknowledge from toontown.toon import HealthForceAcknowledge from toontown.toon.Toon import teleportDebug -from toontown.tutorial import TutorialForceAcknowledge +from toontown.toonbase.ToonBaseGlobal import * from toontown.toonbase.ToontownGlobals import * -from toontown.building import ToonInterior -from toontown.hood import QuietZoneState +from toontown.tutorial import TutorialForceAcknowledge + class SafeZoneLoader(StateData.StateData): notify = DirectNotifyGlobal.directNotify.newCategory('SafeZoneLoader') diff --git a/toontown/safezone/SafeZoneManager.py b/toontown/safezone/SafeZoneManager.py index 1f32875..213ef10 100644 --- a/toontown/safezone/SafeZoneManager.py +++ b/toontown/safezone/SafeZoneManager.py @@ -1,6 +1,8 @@ from panda3d.core import * -from direct.distributed import DistributedObject + from direct.directnotify import DirectNotifyGlobal +from direct.distributed import DistributedObject + class SafeZoneManager(DistributedObject.DistributedObject): notify = DirectNotifyGlobal.directNotify.newCategory('SafeZoneManager') diff --git a/toontown/safezone/TTPlayground.py b/toontown/safezone/TTPlayground.py index 236201f..fc3f147 100644 --- a/toontown/safezone/TTPlayground.py +++ b/toontown/safezone/TTPlayground.py @@ -1,10 +1,15 @@ -from panda3d.core import * -from toontown.toonbase import ToontownGlobals -from . import Playground import random -from toontown.launcher import DownloadForceAcknowledge + +from panda3d.core import * + from direct.task.Task import Task + from toontown.hood import ZoneUtil +from toontown.launcher import DownloadForceAcknowledge +from toontown.toonbase import ToontownGlobals + +from . import Playground + class TTPlayground(Playground.Playground): diff --git a/toontown/safezone/TTSafeZoneLoader.py b/toontown/safezone/TTSafeZoneLoader.py index e9919ca..7f5f568 100644 --- a/toontown/safezone/TTSafeZoneLoader.py +++ b/toontown/safezone/TTSafeZoneLoader.py @@ -1,9 +1,12 @@ -from panda3d.core import * -from . import SafeZoneLoader -from . import TTPlayground import random + +from panda3d.core import * + from toontown.launcher import DownloadForceAcknowledge +from . import SafeZoneLoader, TTPlayground + + class TTSafeZoneLoader(SafeZoneLoader.SafeZoneLoader): def __init__(self, hood, parentFSM, doneEvent): diff --git a/toontown/safezone/TTTreasurePlannerAI.py b/toontown/safezone/TTTreasurePlannerAI.py index ad129ce..6dc2dbb 100644 --- a/toontown/safezone/TTTreasurePlannerAI.py +++ b/toontown/safezone/TTTreasurePlannerAI.py @@ -1,5 +1,7 @@ from toontown.toonbase.ToontownGlobals import * -from . import RegenTreasurePlannerAI, DistributedTTTreasureAI + +from . import DistributedTTTreasureAI, RegenTreasurePlannerAI + class TTTreasurePlannerAI(RegenTreasurePlannerAI.RegenTreasurePlannerAI): diff --git a/toontown/safezone/Train.py b/toontown/safezone/Train.py index a82b23f..2ab94a9 100644 --- a/toontown/safezone/Train.py +++ b/toontown/safezone/Train.py @@ -1,16 +1,18 @@ -from panda3d.core import * -from direct.showbase.DirectObject import DirectObject -from direct.interval.IntervalGlobal import * -from direct.distributed.ClockDelta import globalClockDelta -from direct.distributed.ClockDelta import NetworkTimePrecision import random -from direct.task.Task import Task -from direct.directnotify.DirectNotifyGlobal import directNotify -from direct.fsm import ClassicFSM -from direct.fsm import State -from direct.directutil import Mopath -from toontown.toonbase import ToontownGlobals + +from panda3d.core import * + from direct.actor import Actor +from direct.directnotify.DirectNotifyGlobal import directNotify +from direct.directutil import Mopath +from direct.distributed.ClockDelta import NetworkTimePrecision, globalClockDelta +from direct.fsm import ClassicFSM, State +from direct.interval.IntervalGlobal import * +from direct.showbase.DirectObject import DirectObject +from direct.task.Task import Task + +from toontown.toonbase import ToontownGlobals + class Train(DirectObject): notify = directNotify.newCategory('Train') diff --git a/toontown/safezone/TreasurePlannerAI.py b/toontown/safezone/TreasurePlannerAI.py index 5437790..14b84aa 100644 --- a/toontown/safezone/TreasurePlannerAI.py +++ b/toontown/safezone/TreasurePlannerAI.py @@ -1,8 +1,10 @@ +import random + +from direct.directnotify import DirectNotifyGlobal from direct.distributed.ClockDelta import * from direct.showbase import DirectObject -from direct.directnotify import DirectNotifyGlobal from direct.task import Task -import random + class TreasurePlannerAI(DirectObject.DirectObject): notify = DirectNotifyGlobal.directNotify.newCategory('TreasurePlannerAI') diff --git a/toontown/safezone/Walk.py b/toontown/safezone/Walk.py index e5671ef..59875c5 100644 --- a/toontown/safezone/Walk.py +++ b/toontown/safezone/Walk.py @@ -1,9 +1,9 @@ from panda3d.core import * -from direct.task.Task import Task + from direct.directnotify import DirectNotifyGlobal -from direct.fsm import StateData -from direct.fsm import ClassicFSM, State -from direct.fsm import State +from direct.fsm import ClassicFSM, State, StateData +from direct.task.Task import Task + class Walk(StateData.StateData): notify = DirectNotifyGlobal.directNotify.newCategory('Walk') diff --git a/toontown/shtiker/DeleteManager.py b/toontown/shtiker/DeleteManager.py index 81f579c..5de25c9 100644 --- a/toontown/shtiker/DeleteManager.py +++ b/toontown/shtiker/DeleteManager.py @@ -1,6 +1,8 @@ from panda3d.core import * -from direct.distributed import DistributedObject + from direct.directnotify import DirectNotifyGlobal +from direct.distributed import DistributedObject + class DeleteManager(DistributedObject.DistributedObject): notify = DirectNotifyGlobal.directNotify.newCategory('DeleteManager') diff --git a/toontown/shtiker/DeleteManagerAI.py b/toontown/shtiker/DeleteManagerAI.py index 308da54..55317e3 100644 --- a/toontown/shtiker/DeleteManagerAI.py +++ b/toontown/shtiker/DeleteManagerAI.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectAI import DistributedObjectAI + class DeleteManagerAI(DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('DeleteManagerAI') diff --git a/toontown/shtiker/DirectNewsFrame.py b/toontown/shtiker/DirectNewsFrame.py index 9106083..bffbfd2 100644 --- a/toontown/shtiker/DirectNewsFrame.py +++ b/toontown/shtiker/DirectNewsFrame.py @@ -1,16 +1,18 @@ -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 -from direct.gui.DirectGui import DirectFrame, DGG +import os + +from panda3d.core import (ConfigVariableBool, ConfigVariableString, DocumentSpec, DSearchPath, Filename, HTTPClient, + Ramfile) + from direct.directnotify import DirectNotifyGlobal -from direct.showbase import AppRunnerGlobal -from toontown.shtiker import IssueFrame -from toontown.shtiker import IssueFrameV2 +from direct.gui.DirectGui import DGG, DirectFrame +from direct.showbase import AppRunnerGlobal, DirectObject + +from toontown.shtiker import IssueFrame, IssueFrameV2 from toontown.toonbase import TTLocalizer + class DirectNewsFrame(DirectObject.DirectObject): TaskName = 'HtmlViewUpdateTask' TaskChainName = 'RedownladTaskChain' diff --git a/toontown/shtiker/DisguisePage.py b/toontown/shtiker/DisguisePage.py index c8a591f..8e3f80e 100644 --- a/toontown/shtiker/DisguisePage.py +++ b/toontown/shtiker/DisguisePage.py @@ -1,12 +1,15 @@ -from . import ShtikerPage -from direct.gui.DirectGui import * from panda3d.core import * -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import TTLocalizer -from toontown.suit import SuitDNA + +from direct.gui.DirectGui import * + from toontown.battle import SuitBattleGlobals -from toontown.minigame import MinigamePowerMeter from toontown.coghq import CogDisguiseGlobals +from toontown.minigame import MinigamePowerMeter +from toontown.suit import SuitDNA +from toontown.toonbase import ToontownGlobals, TTLocalizer + +from . import ShtikerPage + DeptColors = (Vec4(0.647, 0.608, 0.596, 1.0), Vec4(0.588, 0.635, 0.671, 1.0), Vec4(0.596, 0.714, 0.659, 1.0), diff --git a/toontown/shtiker/DisplaySettingsDialog.py b/toontown/shtiker/DisplaySettingsDialog.py index 0577e6f..b1f6b5b 100644 --- a/toontown/shtiker/DisplaySettingsDialog.py +++ b/toontown/shtiker/DisplaySettingsDialog.py @@ -1,12 +1,14 @@ -from direct.gui.DirectGui import * from panda3d.core import * -from direct.task.Task import Task -from direct.fsm import StateData + from direct.directnotify import DirectNotifyGlobal -from toontown.toonbase import TTLocalizer -from toontown.toontowngui import TTDialog -from toontown.toonbase import ToontownGlobals +from direct.fsm import StateData +from direct.gui.DirectGui import * +from direct.task.Task import Task + +from toontown.toonbase import ToontownGlobals, TTLocalizer from toontown.toonbase.DisplayOptions import DisplayOptions +from toontown.toontowngui import TTDialog + class DisplaySettingsDialog(DirectFrame, StateData.StateData): ApplyTimeoutSeconds = 15 diff --git a/toontown/shtiker/EventsPage.py b/toontown/shtiker/EventsPage.py index b95da74..8c353be 100644 --- a/toontown/shtiker/EventsPage.py +++ b/toontown/shtiker/EventsPage.py @@ -1,20 +1,26 @@ import urllib.request -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 panda3d.core import (ConfigVariableBool, ConfigVariableString, DocumentSpec, HTTPClient, PNMImage, Point3, Ramfile, + StringStream, TextNode, Texture, Vec3, Vec4) + from direct.directnotify import DirectNotifyGlobal +from direct.gui import DirectGuiGlobals +from direct.gui.DirectGui import (DirectButton, DirectCheckButton, DirectFrame, DirectLabel, DirectScrolledList, + OnscreenText) +from direct.task.Task import Task + from otp.otpbase import OTPLocalizer -from toontown.toonbase import TTLocalizer -from toontown.toonbase import ToontownGlobals -from toontown.toontowngui import TTDialog -from toontown.parties import PartyGlobals -from toontown.parties import PartyUtils + +from toontown.parties import PartyGlobals, PartyUtils from toontown.parties.CalendarGuiMonth import CalendarGuiMonth -from toontown.parties.PartyUtils import getPartyActivityIcon from toontown.parties.Party import Party +from toontown.parties.PartyUtils import getPartyActivityIcon from toontown.parties.ServerTimeGui import ServerTimeGui +from toontown.toonbase import ToontownGlobals, TTLocalizer +from toontown.toontowngui import TTDialog + from . import ShtikerPage + EventsPage_Host = 0 EventsPage_Invited = 1 EventsPage_Calendar = 2 diff --git a/toontown/shtiker/FishPage.py b/toontown/shtiker/FishPage.py index 7af5c01..3eae0bb 100644 --- a/toontown/shtiker/FishPage.py +++ b/toontown/shtiker/FishPage.py @@ -1,12 +1,13 @@ -from toontown.toonbase import ToontownGlobals -from . import ShtikerPage +from panda3d.core import * + from direct.directnotify import DirectNotifyGlobal from direct.gui.DirectGui import * -from panda3d.core import * -from toontown.toonbase import TTLocalizer -from toontown.fishing import FishPicker -from toontown.fishing import FishBrowser -from toontown.fishing import FishGlobals + +from toontown.fishing import FishBrowser, FishGlobals, FishPicker +from toontown.toonbase import ToontownGlobals, TTLocalizer + +from . import ShtikerPage + FishPage_Tank = 0 FishPage_Collection = 1 FishPage_Trophy = 2 diff --git a/toontown/shtiker/GardenPage.py b/toontown/shtiker/GardenPage.py index 0bc586e..9700a1a 100644 --- a/toontown/shtiker/GardenPage.py +++ b/toontown/shtiker/GardenPage.py @@ -1,13 +1,14 @@ -from direct.directnotify import DirectNotifyGlobal -from . import ShtikerPage -from direct.gui.DirectGui import * from panda3d.core import * + +from direct.directnotify import DirectNotifyGlobal +from direct.gui.DirectGui import * + +from toontown.estate import FlowerBrowser, FlowerPicker, GardenGlobals, SpecialsPhoto from toontown.toonbase import TTLocalizer -from toontown.estate import FlowerBrowser -from toontown.estate import GardenGlobals -from toontown.estate import FlowerPicker -from toontown.estate import SpecialsPhoto from toontown.toontowngui import TTDialog + +from . import ShtikerPage + GardenPage_Basket = 0 GardenPage_Collection = 1 GardenPage_Trophy = 2 diff --git a/toontown/shtiker/GolfPage.py b/toontown/shtiker/GolfPage.py index dc7a07b..430bb99 100644 --- a/toontown/shtiker/GolfPage.py +++ b/toontown/shtiker/GolfPage.py @@ -1,13 +1,18 @@ +from enum import IntEnum + +from panda3d.core import * + from direct.directnotify import DirectNotifyGlobal from direct.gui.DirectGui import * -from panda3d.core import * from direct.task import Task + from toontown.fishing.FishPhoto import DirectRegion +from toontown.golf import GolfGlobals 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 = IntEnum('PageMode', ('Records', 'Trophy'), start=0) diff --git a/toontown/shtiker/HtmlView.py b/toontown/shtiker/HtmlView.py index 57e5283..2cf4d82 100644 --- a/toontown/shtiker/HtmlView.py +++ b/toontown/shtiker/HtmlView.py @@ -1,18 +1,14 @@ -import array, sys +import array +import sys + +from panda3d.core import (AwWebCore, AwWebView, CardMaker, NodePath, PNMImage, Point2, Point3, Texture, TextureStage, + VBase4D, Vec3, Vec4, WindowProperties) + +from direct.directnotify import DirectNotifyGlobal +from direct.interval.IntervalGlobal import * from direct.showbase.DirectObject import DirectObject from direct.task.Task import Task -from direct.directnotify import DirectNotifyGlobal -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 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/InGameNewsFrame.py b/toontown/shtiker/InGameNewsFrame.py index 154d1af..c8be60b 100644 --- a/toontown/shtiker/InGameNewsFrame.py +++ b/toontown/shtiker/InGameNewsFrame.py @@ -1,6 +1,8 @@ import datetime + from toontown.shtiker import HtmlView + class InGameNewsFrame(HtmlView.HtmlView): TaskName = 'HtmlViewUpdateTask' diff --git a/toontown/shtiker/InventoryPage.py b/toontown/shtiker/InventoryPage.py index a494fa1..4d5637a 100644 --- a/toontown/shtiker/InventoryPage.py +++ b/toontown/shtiker/InventoryPage.py @@ -1,9 +1,11 @@ -from . import ShtikerPage -from toontown.toonbase import ToontownBattleGlobals -from direct.gui.DirectGui import * from panda3d.core import * -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import TTLocalizer + +from direct.gui.DirectGui import * + +from toontown.toonbase import ToontownBattleGlobals, ToontownGlobals, TTLocalizer + +from . import ShtikerPage + class InventoryPage(ShtikerPage.ShtikerPage): diff --git a/toontown/shtiker/IssueFrame.py b/toontown/shtiker/IssueFrame.py index cd2c25e..9550d6f 100644 --- a/toontown/shtiker/IssueFrame.py +++ b/toontown/shtiker/IssueFrame.py @@ -1,13 +1,14 @@ import os -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 panda3d.core import (CardMaker, DSearchPath, Filename, NodePath, PNMImage, Point2, Texture, TextureStage, + VirtualFileSystem) + from direct.directnotify import DirectNotifyGlobal -from toontown.toonbase import TTLocalizer -from toontown.toonbase import ToontownGlobals +from direct.gui.DirectGui import DGG, DirectButton, DirectFrame, DirectLabel +from direct.showbase import DirectObject + +from toontown.toonbase import ToontownGlobals, TTLocalizer + WEB_WIDTH_PIXELS = 784 WEB_HEIGHT_PIXELS = 451 WEB_WIDTH = 1024 diff --git a/toontown/shtiker/IssueFrameV2.py b/toontown/shtiker/IssueFrameV2.py index 0355372..cf59e8e 100644 --- a/toontown/shtiker/IssueFrameV2.py +++ b/toontown/shtiker/IssueFrameV2.py @@ -1,8 +1,11 @@ from panda3d.core import Filename + from direct.directnotify import DirectNotifyGlobal -from direct.gui.DirectGui import DGG, DirectFrame, DirectButton +from direct.gui.DirectGui import DGG, DirectButton, DirectFrame + from toontown.shtiker import IssueFrame + class IssueFrameV2(IssueFrame.IssueFrame): notify = DirectNotifyGlobal.directNotify.newCategory('IssueFrameV2') SectionIdents = ['hom', diff --git a/toontown/shtiker/KartPage.py b/toontown/shtiker/KartPage.py index dc79e5c..4718588 100644 --- a/toontown/shtiker/KartPage.py +++ b/toontown/shtiker/KartPage.py @@ -1,15 +1,20 @@ +from enum import IntEnum + +from panda3d.core import * + from direct.directnotify import DirectNotifyGlobal from direct.gui.DirectGui import * -from panda3d.core import * from direct.task import Task + from toontown.fishing.FishPhoto import DirectRegion -from toontown.racing.KartDNA import * -from toontown.racing.Kart import Kart from toontown.racing import RaceGlobals +from toontown.racing.Kart import Kart +from toontown.racing.KartDNA import * 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 = IntEnum('PageMode', ('Customize', 'Records', 'Trophy'), start=0) diff --git a/toontown/shtiker/MapPage.py b/toontown/shtiker/MapPage.py index 26673bf..ba249d5 100644 --- a/toontown/shtiker/MapPage.py +++ b/toontown/shtiker/MapPage.py @@ -1,11 +1,15 @@ -from . import ShtikerPage -from toontown.toonbase import ToontownGlobals -from direct.showbase import PythonUtil -from otp.otpbase import PythonUtil as OTPPythonUtil -from toontown.hood import ZoneUtil -from direct.gui.DirectGui import * from panda3d.core import * -from toontown.toonbase import TTLocalizer + +from direct.gui.DirectGui import * +from direct.showbase import PythonUtil + +from otp.otpbase import PythonUtil as OTPPythonUtil + +from toontown.hood import ZoneUtil +from toontown.toonbase import ToontownGlobals, TTLocalizer + +from . import ShtikerPage + class MapPage(ShtikerPage.ShtikerPage): diff --git a/toontown/shtiker/NPCFriendPage.py b/toontown/shtiker/NPCFriendPage.py index a6d5b52..938e9e5 100644 --- a/toontown/shtiker/NPCFriendPage.py +++ b/toontown/shtiker/NPCFriendPage.py @@ -1,9 +1,13 @@ -from . import ShtikerPage -from direct.gui.DirectGui import * from panda3d.core import * + +from direct.gui.DirectGui import * + from toontown.toon import NPCFriendPanel from toontown.toonbase import TTLocalizer +from . import ShtikerPage + + class NPCFriendPage(ShtikerPage.ShtikerPage): def __init__(self): diff --git a/toontown/shtiker/NewbiePurchaseManager.py b/toontown/shtiker/NewbiePurchaseManager.py index 94a9a01..41cbaa9 100644 --- a/toontown/shtiker/NewbiePurchaseManager.py +++ b/toontown/shtiker/NewbiePurchaseManager.py @@ -1,7 +1,9 @@ -from . import PurchaseManager from toontown.quest import QuestParser from toontown.toon import NPCToons +from . import PurchaseManager + + class NewbiePurchaseManager(PurchaseManager.PurchaseManager): def setOwnedNewbieId(self, ownedNewbieId): diff --git a/toontown/shtiker/NewbiePurchaseManagerAI.py b/toontown/shtiker/NewbiePurchaseManagerAI.py index bab8ac3..37a2963 100644 --- a/toontown/shtiker/NewbiePurchaseManagerAI.py +++ b/toontown/shtiker/NewbiePurchaseManagerAI.py @@ -1,5 +1,6 @@ from . import PurchaseManagerAI + class NewbiePurchaseManagerAI(PurchaseManagerAI.PurchaseManagerAI): def __init__(self, air, newbieId, playerArray, mpArray, previousMinigameId, trolleyZone): diff --git a/toontown/shtiker/NewsPage.py b/toontown/shtiker/NewsPage.py index 5e5bfff..6a04feb 100644 --- a/toontown/shtiker/NewsPage.py +++ b/toontown/shtiker/NewsPage.py @@ -1,11 +1,10 @@ -from direct.fsm import StateData -from direct.gui.DirectGui import DirectFrame -from direct.gui.DirectGui import DGG -from direct.gui.DirectGui import DirectLabel from direct.directnotify import DirectNotifyGlobal -from toontown.toonbase import ToontownGlobals +from direct.fsm import StateData +from direct.gui.DirectGui import DGG, DirectFrame, DirectLabel + from toontown.shtiker import ShtikerPage -from toontown.toonbase import TTLocalizer +from toontown.toonbase import ToontownGlobals, TTLocalizer + UseDirectNewsFrame = config.GetBool('use-direct-news-frame', True) HaveNewsFrame = True if UseDirectNewsFrame: diff --git a/toontown/shtiker/OptionsPage.py b/toontown/shtiker/OptionsPage.py index a5789d3..ae7f9c3 100644 --- a/toontown/shtiker/OptionsPage.py +++ b/toontown/shtiker/OptionsPage.py @@ -1,15 +1,18 @@ -from panda3d.core import * -from . import ShtikerPage -from toontown.toontowngui import TTDialog -from direct.gui.DirectGui import * -from toontown.toonbase import TTLocalizer -from . import DisplaySettingsDialog -from direct.task import Task -from otp.speedchat import SpeedChat -from otp.speedchat import SCColorScheme -from otp.speedchat import SCStaticTextTerminal -from direct.directnotify import DirectNotifyGlobal from enum import IntEnum + +from panda3d.core import * + +from direct.directnotify import DirectNotifyGlobal +from direct.gui.DirectGui import * +from direct.task import Task + +from otp.speedchat import SCColorScheme, SCStaticTextTerminal, SpeedChat + +from toontown.toonbase import TTLocalizer +from toontown.toontowngui import TTDialog + +from . import DisplaySettingsDialog, ShtikerPage + speedChatStyles = ((2000, (200 / 255.0, 60 / 255.0, 229 / 255.0), (200 / 255.0, 135 / 255.0, 255 / 255.0), diff --git a/toontown/shtiker/PhotoAlbumPage.py b/toontown/shtiker/PhotoAlbumPage.py index 2e93625..a5e2fff 100644 --- a/toontown/shtiker/PhotoAlbumPage.py +++ b/toontown/shtiker/PhotoAlbumPage.py @@ -1,10 +1,13 @@ -from panda3d.core import * -from . import ShtikerPage -from direct.gui.DirectGui import * -from panda3d.core import * -from toontown.toonbase import TTLocalizer import os -from toontown.toonbase import ToontownGlobals + +from panda3d.core import * + +from direct.gui.DirectGui import * + +from toontown.toonbase import ToontownGlobals, TTLocalizer + +from . import ShtikerPage + class PhotoAlbumPage(ShtikerPage.ShtikerPage): diff --git a/toontown/shtiker/PurchaseManager.py b/toontown/shtiker/PurchaseManager.py index 455ef85..61732c8 100644 --- a/toontown/shtiker/PurchaseManager.py +++ b/toontown/shtiker/PurchaseManager.py @@ -1,10 +1,14 @@ from panda3d.core import * -from .PurchaseManagerConstants import * -from direct.distributed.ClockDelta import * -from direct.distributed import DistributedObject + from direct.directnotify import DirectNotifyGlobal +from direct.distributed import DistributedObject +from direct.distributed.ClockDelta import * + from toontown.minigame import TravelGameGlobals +from .PurchaseManagerConstants import * + + class PurchaseManager(DistributedObject.DistributedObject): notify = DirectNotifyGlobal.directNotify.newCategory('PurchaseManager') diff --git a/toontown/shtiker/PurchaseManagerAI.py b/toontown/shtiker/PurchaseManagerAI.py index 78f631d..9c7c914 100644 --- a/toontown/shtiker/PurchaseManagerAI.py +++ b/toontown/shtiker/PurchaseManagerAI.py @@ -1,14 +1,19 @@ -from otp.ai.AIBaseGlobal import * -from panda3d.core import * -from direct.distributed.ClockDelta import * -from .PurchaseManagerConstants import * import copy -from direct.task.Task import Task -from direct.distributed import DistributedObjectAI + +from panda3d.core import * + from direct.directnotify import DirectNotifyGlobal -from toontown.minigame import TravelGameGlobals +from direct.distributed import DistributedObjectAI +from direct.distributed.ClockDelta import * +from direct.task.Task import Task + +from otp.ai.AIBaseGlobal import * + +from toontown.minigame import MinigameGlobals, TravelGameGlobals from toontown.toonbase import ToontownGlobals -from toontown.minigame import MinigameGlobals + +from .PurchaseManagerConstants import * + class PurchaseManagerAI(DistributedObjectAI.DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('PurchaseManagerAI') diff --git a/toontown/shtiker/QuestPage.py b/toontown/shtiker/QuestPage.py index a306a07..ece04e7 100644 --- a/toontown/shtiker/QuestPage.py +++ b/toontown/shtiker/QuestPage.py @@ -1,14 +1,15 @@ from panda3d.core import * -from . import ShtikerPage -from direct.gui.DirectGui import * -from panda3d.core import * -from toontown.quest import Quests -from toontown.toon import NPCToons -from toontown.hood import ZoneUtil -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import TTLocalizer -from toontown.quest import QuestBookPoster + from direct.directnotify import DirectNotifyGlobal +from direct.gui.DirectGui import * + +from toontown.hood import ZoneUtil +from toontown.quest import QuestBookPoster, Quests +from toontown.toon import NPCToons +from toontown.toonbase import ToontownGlobals, TTLocalizer + +from . import ShtikerPage + class QuestPage(ShtikerPage.ShtikerPage): notify = DirectNotifyGlobal.directNotify.newCategory('QuestPage') diff --git a/toontown/shtiker/ShardPage.py b/toontown/shtiker/ShardPage.py index ebcc726..247d8f8 100644 --- a/toontown/shtiker/ShardPage.py +++ b/toontown/shtiker/ShardPage.py @@ -1,15 +1,18 @@ -from panda3d.core import * -from . import ShtikerPage -from direct.task.Task import Task -from direct.gui.DirectGui import * -from panda3d.core import * -from toontown.toonbase import TTLocalizer -from direct.directnotify import DirectNotifyGlobal -from toontown.hood import ZoneUtil -from toontown.toonbase import ToontownGlobals -from toontown.distributed import ToontownDistrictStats -from toontown.toontowngui import TTDialog import functools + +from panda3d.core import * + +from direct.directnotify import DirectNotifyGlobal +from direct.gui.DirectGui import * +from direct.task.Task import Task + +from toontown.distributed import ToontownDistrictStats +from toontown.hood import ZoneUtil +from toontown.toonbase import ToontownGlobals, TTLocalizer +from toontown.toontowngui import TTDialog + +from . import ShtikerPage + POP_COLORS_NTT = (Vec4(0.0, 1.0, 0.0, 1.0), Vec4(1.0, 1.0, 0.0, 1.0), Vec4(1.0, 0.0, 0.0, 1.0)) POP_COLORS = (Vec4(0.4, 0.4, 1.0, 1.0), Vec4(0.4, 1.0, 0.4, 1.0), Vec4(1.0, 0.4, 0.4, 1.0)) diff --git a/toontown/shtiker/ShtikerBook.py b/toontown/shtiker/ShtikerBook.py index d4e2c75..82c1c24 100644 --- a/toontown/shtiker/ShtikerBook.py +++ b/toontown/shtiker/ShtikerBook.py @@ -1,14 +1,15 @@ from panda3d.core import * from panda3d.otp import * -from toontown.toonbase import ToontownGlobals -from direct.showbase import DirectObject + +from direct.directnotify import DirectNotifyGlobal from direct.fsm import StateData from direct.gui.DirectGui import * -from panda3d.core import * -from toontown.toonbase import TTLocalizer +from direct.showbase import DirectObject + from toontown.effects import DistributedFireworkShow from toontown.parties import DistributedPartyFireworksActivity -from direct.directnotify import DirectNotifyGlobal +from toontown.toonbase import ToontownGlobals, TTLocalizer + class ShtikerBook(DirectFrame, StateData.StateData): notify = DirectNotifyGlobal.directNotify.newCategory('ShtikerBook') diff --git a/toontown/shtiker/ShtikerPage.py b/toontown/shtiker/ShtikerPage.py index 8e7c022..088f751 100644 --- a/toontown/shtiker/ShtikerPage.py +++ b/toontown/shtiker/ShtikerPage.py @@ -1,7 +1,10 @@ -from . import ShtikerBook +from panda3d.core import * + from direct.fsm import StateData from direct.gui.DirectGui import * -from panda3d.core import * + +from . import ShtikerBook + class ShtikerPage(DirectFrame, StateData.StateData): diff --git a/toontown/shtiker/SuitPage.py b/toontown/shtiker/SuitPage.py index 852dbc1..e237ead 100644 --- a/toontown/shtiker/SuitPage.py +++ b/toontown/shtiker/SuitPage.py @@ -1,14 +1,15 @@ -from . import ShtikerPage -from direct.task.Task import Task -from . import SummonCogDialog -from direct.gui.DirectGui import * from panda3d.core import * -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import TTLocalizer -from toontown.suit import SuitDNA -from toontown.suit import Suit + +from direct.gui.DirectGui import * +from direct.task.Task import Task + from toontown.battle import SuitBattleGlobals +from toontown.suit import Suit, SuitDNA +from toontown.toonbase import ToontownGlobals, TTLocalizer + +from . import ShtikerPage, SummonCogDialog from .CogPageGlobals import * + SCALE_FACTOR = 1.5 RADAR_DELAY = 0.2 BUILDING_RADAR_POS = (0.375, diff --git a/toontown/shtiker/SummonCogDialog.py b/toontown/shtiker/SummonCogDialog.py index 1a7a279..671d838 100644 --- a/toontown/shtiker/SummonCogDialog.py +++ b/toontown/shtiker/SummonCogDialog.py @@ -1,14 +1,15 @@ -from direct.gui.DirectGui import * from panda3d.core import * + from direct.directnotify import DirectNotifyGlobal from direct.fsm import StateData -from toontown.toonbase import TTLocalizer -from toontown.toontowngui import TTDialog -from toontown.toonbase import ToontownGlobals -from toontown.suit import SuitDNA -from toontown.suit import Suit +from direct.gui.DirectGui import * + from toontown.battle import SuitBattleGlobals +from toontown.suit import Suit, SuitDNA from toontown.toon import NPCToons +from toontown.toonbase import ToontownGlobals, TTLocalizer +from toontown.toontowngui import TTDialog + TTL = TTLocalizer class SummonCogDialog(DirectFrame, StateData.StateData): diff --git a/toontown/shtiker/TIPPage.py b/toontown/shtiker/TIPPage.py index c231d28..6240dbd 100644 --- a/toontown/shtiker/TIPPage.py +++ b/toontown/shtiker/TIPPage.py @@ -1,11 +1,13 @@ from panda3d.core import * -from . import ShtikerPage + from direct.gui.DirectGui import * -from panda3d.core import * -from toontown.toon import NPCToons + from toontown.hood import ZoneUtil -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import TTLocalizer +from toontown.toon import NPCToons +from toontown.toonbase import ToontownGlobals, TTLocalizer + +from . import ShtikerPage + class TIPPage(ShtikerPage.ShtikerPage): diff --git a/toontown/shtiker/TrackPage.py b/toontown/shtiker/TrackPage.py index 030909a..b90d844 100644 --- a/toontown/shtiker/TrackPage.py +++ b/toontown/shtiker/TrackPage.py @@ -1,12 +1,13 @@ from panda3d.core import * -from . import ShtikerPage + from direct.gui.DirectGui import * -from panda3d.core import * + from toontown.quest import Quests -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import ToontownBattleGlobals -from toontown.toonbase import TTLocalizer from toontown.toon import Toon +from toontown.toonbase import ToontownBattleGlobals, ToontownGlobals, TTLocalizer + +from . import ShtikerPage + MAX_FRAMES = 18 Track2Anim = {ToontownBattleGlobals.HEAL_TRACK: 'juggle', ToontownBattleGlobals.TRAP_TRACK: 'toss', diff --git a/toontown/speedchat/TTSCAprilToonsMenu.py b/toontown/speedchat/TTSCAprilToonsMenu.py index fbdd8df..ab1f4fa 100644 --- a/toontown/speedchat/TTSCAprilToonsMenu.py +++ b/toontown/speedchat/TTSCAprilToonsMenu.py @@ -1,8 +1,10 @@ from direct.showbase import PythonUtil + +from otp.otpbase import OTPLocalizer from otp.speedchat.SCMenu import SCMenu from otp.speedchat.SCMenuHolder import SCMenuHolder from otp.speedchat.SCStaticTextTerminal import SCStaticTextTerminal -from otp.otpbase import OTPLocalizer + AprilToonsMenu = [(OTPLocalizer.AprilToonsMenuSections[1], [30100, 30102]), (OTPLocalizer.AprilToonsMenuSections[2], [30110, 30111, diff --git a/toontown/speedchat/TTSCBoardingMenu.py b/toontown/speedchat/TTSCBoardingMenu.py index a3846e5..c81552f 100644 --- a/toontown/speedchat/TTSCBoardingMenu.py +++ b/toontown/speedchat/TTSCBoardingMenu.py @@ -1,8 +1,10 @@ from direct.showbase import PythonUtil + +from otp.otpbase import OTPLocalizer from otp.speedchat.SCMenu import SCMenu from otp.speedchat.SCMenuHolder import SCMenuHolder from otp.speedchat.SCStaticTextTerminal import SCStaticTextTerminal -from otp.otpbase import OTPLocalizer + BoardingMenuGuide = [(OTPLocalizer.BoardingMenuSections[0], []), (OTPLocalizer.BoardingMenuSections[1], []), (OTPLocalizer.BoardingMenuSections[2], []), diff --git a/toontown/speedchat/TTSCCogMenu.py b/toontown/speedchat/TTSCCogMenu.py index 12ce194..c54ac75 100644 --- a/toontown/speedchat/TTSCCogMenu.py +++ b/toontown/speedchat/TTSCCogMenu.py @@ -1,6 +1,7 @@ from otp.speedchat.SCMenu import SCMenu from otp.speedchat.SCStaticTextTerminal import SCStaticTextTerminal + class TTSCCogMenu(SCMenu): def __init__(self, indices): diff --git a/toontown/speedchat/TTSCDecoders.py b/toontown/speedchat/TTSCDecoders.py index 8180c4c..f670cc3 100644 --- a/toontown/speedchat/TTSCDecoders.py +++ b/toontown/speedchat/TTSCDecoders.py @@ -1,2 +1,2 @@ -from .TTSCToontaskTerminal import decodeTTSCToontaskMsg from .TTSCResistanceTerminal import decodeTTSCResistanceMsg +from .TTSCToontaskTerminal import decodeTTSCToontaskMsg diff --git a/toontown/speedchat/TTSCFactoryMenu.py b/toontown/speedchat/TTSCFactoryMenu.py index 6f1f749..df1b72e 100644 --- a/toontown/speedchat/TTSCFactoryMenu.py +++ b/toontown/speedchat/TTSCFactoryMenu.py @@ -1,7 +1,8 @@ -from otp.speedchat.SCMenu import SCMenu -from otp.speedchat import SCMenuHolder -from otp.speedchat.SCStaticTextTerminal import SCStaticTextTerminal from otp.otpbase import OTPLocalizer +from otp.speedchat import SCMenuHolder +from otp.speedchat.SCMenu import SCMenu +from otp.speedchat.SCStaticTextTerminal import SCStaticTextTerminal + ZoneToMsgs = {3: [1803, 1903], 4: [1804, 1904], 5: [1805, 1905], diff --git a/toontown/speedchat/TTSCGolfMenu.py b/toontown/speedchat/TTSCGolfMenu.py index 7f8cd0f..453cdf9 100644 --- a/toontown/speedchat/TTSCGolfMenu.py +++ b/toontown/speedchat/TTSCGolfMenu.py @@ -1,8 +1,10 @@ from direct.showbase import PythonUtil + +from otp.otpbase import OTPLocalizer from otp.speedchat.SCMenu import SCMenu from otp.speedchat.SCMenuHolder import SCMenuHolder from otp.speedchat.SCStaticTextTerminal import SCStaticTextTerminal -from otp.otpbase import OTPLocalizer + GolfMenuGuide = [(OTPLocalizer.GolfMenuSections[1], [4100, 4101, 4102, diff --git a/toontown/speedchat/TTSCHalloweenMenu.py b/toontown/speedchat/TTSCHalloweenMenu.py index ea34848..b0c6382 100644 --- a/toontown/speedchat/TTSCHalloweenMenu.py +++ b/toontown/speedchat/TTSCHalloweenMenu.py @@ -1,8 +1,10 @@ from direct.showbase import PythonUtil + +from otp.otpbase import OTPLocalizer from otp.speedchat.SCMenu import SCMenu from otp.speedchat.SCMenuHolder import SCMenuHolder from otp.speedchat.SCStaticTextTerminal import SCStaticTextTerminal -from otp.otpbase import OTPLocalizer + HalloweenMenu = [(OTPLocalizer.HalloweenMenuSections[0], [30250, 30251, 30252])] class TTSCHalloweenMenu(SCMenu): diff --git a/toontown/speedchat/TTSCIdesOfMarchMenu.py b/toontown/speedchat/TTSCIdesOfMarchMenu.py index 8abb43a..3549faf 100644 --- a/toontown/speedchat/TTSCIdesOfMarchMenu.py +++ b/toontown/speedchat/TTSCIdesOfMarchMenu.py @@ -1,8 +1,10 @@ from direct.showbase import PythonUtil + +from otp.otpbase import OTPLocalizer from otp.speedchat.SCMenu import SCMenu from otp.speedchat.SCMenuHolder import SCMenuHolder from otp.speedchat.SCStaticTextTerminal import SCStaticTextTerminal -from otp.otpbase import OTPLocalizer + IdesOfMarchMenu = [(OTPLocalizer.IdesOfMarchMenuSections[0], [30450, 30451, 30452])] class TTSCIdesOfMarchMenu(SCMenu): diff --git a/toontown/speedchat/TTSCIndexedTerminal.py b/toontown/speedchat/TTSCIndexedTerminal.py index 318041b..060de2c 100644 --- a/toontown/speedchat/TTSCIndexedTerminal.py +++ b/toontown/speedchat/TTSCIndexedTerminal.py @@ -1,5 +1,6 @@ -from otp.speedchat.SCTerminal import * from otp.otpbase.OTPLocalizer import SpeedChatStaticText +from otp.speedchat.SCTerminal import * + TTSCIndexedMsgEvent = 'SCIndexedMsg' def decodeTTSCIndexedMsg(msgIndex): diff --git a/toontown/speedchat/TTSCJellybeanJamMenu.py b/toontown/speedchat/TTSCJellybeanJamMenu.py index c79e4e8..fec06c4 100644 --- a/toontown/speedchat/TTSCJellybeanJamMenu.py +++ b/toontown/speedchat/TTSCJellybeanJamMenu.py @@ -1,8 +1,10 @@ +from enum import IntEnum + +from otp.otpbase import OTPLocalizer 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, diff --git a/toontown/speedchat/TTSCKartRacingMenu.py b/toontown/speedchat/TTSCKartRacingMenu.py index 40deea5..1a26013 100644 --- a/toontown/speedchat/TTSCKartRacingMenu.py +++ b/toontown/speedchat/TTSCKartRacingMenu.py @@ -1,8 +1,10 @@ from direct.showbase import PythonUtil + +from otp.otpbase import OTPLocalizer from otp.speedchat.SCMenu import SCMenu from otp.speedchat.SCMenuHolder import SCMenuHolder from otp.speedchat.SCStaticTextTerminal import SCStaticTextTerminal -from otp.otpbase import OTPLocalizer + KartRacingMenuGuide = [(OTPLocalizer.KartRacingMenuSections[1], [3130, 3160, 3190, diff --git a/toontown/speedchat/TTSCPetTrickMenu.py b/toontown/speedchat/TTSCPetTrickMenu.py index 5830e91..c40bef4 100644 --- a/toontown/speedchat/TTSCPetTrickMenu.py +++ b/toontown/speedchat/TTSCPetTrickMenu.py @@ -1,10 +1,13 @@ from direct.directnotify import DirectNotifyGlobal -from otp.speedchat.SCMenu import SCMenu -from otp.speedchat import SCMenuHolder -from otp.speedchat.SCStaticTextTerminal import SCStaticTextTerminal + from otp.otpbase import OTPLocalizer +from otp.speedchat import SCMenuHolder +from otp.speedchat.SCMenu import SCMenu +from otp.speedchat.SCStaticTextTerminal import SCStaticTextTerminal + from toontown.pets import PetTricks + class TTSCPetTrickMenu(SCMenu): notify = DirectNotifyGlobal.directNotify.newCategory('TTSCPetTrickMenu') diff --git a/toontown/speedchat/TTSCPromotionalMenu.py b/toontown/speedchat/TTSCPromotionalMenu.py index 78541c4..d93555e 100644 --- a/toontown/speedchat/TTSCPromotionalMenu.py +++ b/toontown/speedchat/TTSCPromotionalMenu.py @@ -1,9 +1,12 @@ from direct.directnotify import DirectNotifyGlobal -from otp.speedchat.SCMenu import SCMenu -from otp.speedchat import SCMenuHolder -from otp.speedchat.SCStaticTextTerminal import SCStaticTextTerminal + from otp.otpbase import OTPLocalizer +from otp.speedchat import SCMenuHolder +from otp.speedchat.SCMenu import SCMenu +from otp.speedchat.SCStaticTextTerminal import SCStaticTextTerminal + from toontown.toonbase import ToontownGlobals + holidayId2menuInfo = {ToontownGlobals.ELECTION_PROMOTION: (OTPLocalizer.SCMenuElection, [10000, 10001, 10006, diff --git a/toontown/speedchat/TTSCResistanceMenu.py b/toontown/speedchat/TTSCResistanceMenu.py index d68b273..4cd8a49 100644 --- a/toontown/speedchat/TTSCResistanceMenu.py +++ b/toontown/speedchat/TTSCResistanceMenu.py @@ -1,9 +1,13 @@ from direct.showbase import PythonUtil + from otp.speedchat.SCMenu import SCMenu from otp.speedchat.SCMenuHolder import SCMenuHolder + from toontown.chat import ResistanceChat + from .TTSCResistanceTerminal import TTSCResistanceTerminal + class TTSCResistanceMenu(SCMenu): def __init__(self): diff --git a/toontown/speedchat/TTSCResistanceTerminal.py b/toontown/speedchat/TTSCResistanceTerminal.py index 6e75cd5..8c38132 100644 --- a/toontown/speedchat/TTSCResistanceTerminal.py +++ b/toontown/speedchat/TTSCResistanceTerminal.py @@ -1,5 +1,7 @@ from otp.speedchat.SCTerminal import SCTerminal + from toontown.chat import ResistanceChat + TTSCResistanceMsgEvent = 'TTSCResistanceMsg' def decodeTTSCResistanceMsg(textId): diff --git a/toontown/speedchat/TTSCSellbotFieldOfficeMenu.py b/toontown/speedchat/TTSCSellbotFieldOfficeMenu.py index 3a4d527..ef0a49b 100644 --- a/toontown/speedchat/TTSCSellbotFieldOfficeMenu.py +++ b/toontown/speedchat/TTSCSellbotFieldOfficeMenu.py @@ -1,10 +1,13 @@ from direct.showbase import PythonUtil + +from otp.otpbase import OTPLocalizer from otp.speedchat.SCMenu import SCMenu from otp.speedchat.SCMenuHolder import SCMenuHolder from otp.speedchat.SCStaticTextTerminal import SCStaticTextTerminal -from toontown.speedchat.TTSCIndexedTerminal import TTSCIndexedTerminal -from otp.otpbase import OTPLocalizer + from toontown.cogdominium import CogdoInterior +from toontown.speedchat.TTSCIndexedTerminal import TTSCIndexedTerminal + SellbotFieldOfficeMenu = [(OTPLocalizer.SellbotFieldOfficeMenuSections[0], list(range(30404, 30409))), (OTPLocalizer.SellbotFieldOfficeMenuSections[1], list(range(30409, 30419)))] class TTSCSellbotFieldOfficeMenu(SCMenu): diff --git a/toontown/speedchat/TTSCSellbotInvasionMenu.py b/toontown/speedchat/TTSCSellbotInvasionMenu.py index def6bc2..cd8c700 100644 --- a/toontown/speedchat/TTSCSellbotInvasionMenu.py +++ b/toontown/speedchat/TTSCSellbotInvasionMenu.py @@ -1,9 +1,12 @@ from direct.showbase import PythonUtil + +from otp.otpbase import OTPLocalizer from otp.speedchat.SCMenu import SCMenu from otp.speedchat.SCMenuHolder import SCMenuHolder from otp.speedchat.SCStaticTextTerminal import SCStaticTextTerminal + from toontown.speedchat.TTSCIndexedTerminal import TTSCIndexedTerminal -from otp.otpbase import OTPLocalizer + SellbotInvasionMenu = [(OTPLocalizer.SellbotInvasionMenuSections[0], list(range(30400, 30404)))] class TTSCSellbotInvasionMenu(SCMenu): diff --git a/toontown/speedchat/TTSCSellbotNerfMenu.py b/toontown/speedchat/TTSCSellbotNerfMenu.py index 7a81491..1e5ce20 100644 --- a/toontown/speedchat/TTSCSellbotNerfMenu.py +++ b/toontown/speedchat/TTSCSellbotNerfMenu.py @@ -1,8 +1,10 @@ from direct.showbase import PythonUtil + +from otp.otpbase import OTPLocalizer from otp.speedchat.SCMenu import SCMenu from otp.speedchat.SCMenuHolder import SCMenuHolder from otp.speedchat.SCStaticTextTerminal import SCStaticTextTerminal -from otp.otpbase import OTPLocalizer + SellbotNerfMenu = [(OTPLocalizer.SellbotNerfMenuSections[0], [30150, 30151, 30152, diff --git a/toontown/speedchat/TTSCSillyPhaseFiveMenu.py b/toontown/speedchat/TTSCSillyPhaseFiveMenu.py index 957d4fc..dd44c87 100644 --- a/toontown/speedchat/TTSCSillyPhaseFiveMenu.py +++ b/toontown/speedchat/TTSCSillyPhaseFiveMenu.py @@ -1,8 +1,10 @@ from direct.showbase import PythonUtil + +from otp.otpbase import OTPLocalizer from otp.speedchat.SCMenu import SCMenu from otp.speedchat.SCMenuHolder import SCMenuHolder from otp.speedchat.SCStaticTextTerminal import SCStaticTextTerminal -from otp.otpbase import OTPLocalizer + SillyPhaseFiveMenu = [(OTPLocalizer.SillyHolidayMenuSections[1], [30325, 30326, 30327]), (OTPLocalizer.SillyHolidayMenuSections[2], [30328, 30329, 30330, diff --git a/toontown/speedchat/TTSCSillyPhaseFourMenu.py b/toontown/speedchat/TTSCSillyPhaseFourMenu.py index c4de52f..b7bd71f 100644 --- a/toontown/speedchat/TTSCSillyPhaseFourMenu.py +++ b/toontown/speedchat/TTSCSillyPhaseFourMenu.py @@ -1,8 +1,10 @@ from direct.showbase import PythonUtil + +from otp.otpbase import OTPLocalizer from otp.speedchat.SCMenu import SCMenu from otp.speedchat.SCMenuHolder import SCMenuHolder from otp.speedchat.SCStaticTextTerminal import SCStaticTextTerminal -from otp.otpbase import OTPLocalizer + SillyPhaseFourMenu = [(OTPLocalizer.SillyHolidayMenuSections[1], [30325, 30326, 30327]), (OTPLocalizer.SillyHolidayMenuSections[2], [30329, 30330, 30331, diff --git a/toontown/speedchat/TTSCSillyPhaseOneMenu.py b/toontown/speedchat/TTSCSillyPhaseOneMenu.py index e12d81d..d48dc0f 100644 --- a/toontown/speedchat/TTSCSillyPhaseOneMenu.py +++ b/toontown/speedchat/TTSCSillyPhaseOneMenu.py @@ -1,8 +1,10 @@ from direct.showbase import PythonUtil + +from otp.otpbase import OTPLocalizer from otp.speedchat.SCMenu import SCMenu from otp.speedchat.SCMenuHolder import SCMenuHolder from otp.speedchat.SCStaticTextTerminal import SCStaticTextTerminal -from otp.otpbase import OTPLocalizer + SillyPhaseOneMenu = [(OTPLocalizer.SillyHolidayMenuSections[1], [30303, 30304, 30305, diff --git a/toontown/speedchat/TTSCSillyPhaseThreeMenu.py b/toontown/speedchat/TTSCSillyPhaseThreeMenu.py index 2993720..0caee01 100644 --- a/toontown/speedchat/TTSCSillyPhaseThreeMenu.py +++ b/toontown/speedchat/TTSCSillyPhaseThreeMenu.py @@ -1,8 +1,10 @@ from direct.showbase import PythonUtil + +from otp.otpbase import OTPLocalizer from otp.speedchat.SCMenu import SCMenu from otp.speedchat.SCMenuHolder import SCMenuHolder from otp.speedchat.SCStaticTextTerminal import SCStaticTextTerminal -from otp.otpbase import OTPLocalizer + SillyPhaseThreeMenu = [(OTPLocalizer.SillyHolidayMenuSections[1], [30323, 30324, 30325, diff --git a/toontown/speedchat/TTSCSillyPhaseTwoMenu.py b/toontown/speedchat/TTSCSillyPhaseTwoMenu.py index 9a7fb4e..ed92373 100644 --- a/toontown/speedchat/TTSCSillyPhaseTwoMenu.py +++ b/toontown/speedchat/TTSCSillyPhaseTwoMenu.py @@ -1,8 +1,10 @@ from direct.showbase import PythonUtil + +from otp.otpbase import OTPLocalizer from otp.speedchat.SCMenu import SCMenu from otp.speedchat.SCMenuHolder import SCMenuHolder from otp.speedchat.SCStaticTextTerminal import SCStaticTextTerminal -from otp.otpbase import OTPLocalizer + SillyPhaseTwoMenu = [(OTPLocalizer.SillyHolidayMenuSections[1], [30310, 30311, 30312, diff --git a/toontown/speedchat/TTSCSingingMenu.py b/toontown/speedchat/TTSCSingingMenu.py index 99a59c0..48af438 100644 --- a/toontown/speedchat/TTSCSingingMenu.py +++ b/toontown/speedchat/TTSCSingingMenu.py @@ -1,8 +1,11 @@ from direct.showbase import PythonUtil + +from otp.otpbase import OTPLocalizer from otp.speedchat.SCMenu import SCMenu from otp.speedchat.SCMenuHolder import SCMenuHolder + from .TTSCSingingTerminal import TTSCSingingTerminal -from otp.otpbase import OTPLocalizer + SingingMenuGuide = [(OTPLocalizer.SingingMenuSections[0], [{9000: 25}, {9001: 26}, {9002: 27}, diff --git a/toontown/speedchat/TTSCSingingTerminal.py b/toontown/speedchat/TTSCSingingTerminal.py index 74184ad..abf18cd 100644 --- a/toontown/speedchat/TTSCSingingTerminal.py +++ b/toontown/speedchat/TTSCSingingTerminal.py @@ -1,5 +1,6 @@ -from otp.speedchat.SCTerminal import SCTerminal from otp.otpbase.OTPLocalizer import SpeedChatStaticText +from otp.speedchat.SCTerminal import SCTerminal + TTSCSingingMsgEvent = 'SCSingingMsg' def decodeSCStaticTextMsg(textId): diff --git a/toontown/speedchat/TTSCToontaskMenu.py b/toontown/speedchat/TTSCToontaskMenu.py index 24829b4..019f2fd 100644 --- a/toontown/speedchat/TTSCToontaskMenu.py +++ b/toontown/speedchat/TTSCToontaskMenu.py @@ -1,8 +1,11 @@ from otp.speedchat.SCMenu import SCMenu -from .TTSCToontaskTerminal import TTSCToontaskTerminal from otp.speedchat.SCStaticTextTerminal import SCStaticTextTerminal + from toontown.quest import Quests +from .TTSCToontaskTerminal import TTSCToontaskTerminal + + class TTSCToontaskMenu(SCMenu): def __init__(self): diff --git a/toontown/speedchat/TTSCToontaskTerminal.py b/toontown/speedchat/TTSCToontaskTerminal.py index 755e0c3..9cf39bd 100644 --- a/toontown/speedchat/TTSCToontaskTerminal.py +++ b/toontown/speedchat/TTSCToontaskTerminal.py @@ -1,6 +1,8 @@ from otp.speedchat.SCTerminal import * + from toontown.quest import Quests from toontown.toon import NPCToons + TTSCToontaskMsgEvent = 'SCToontaskMsg' def decodeTTSCToontaskMsg(taskId, toNpcId, toonProgress, msgIndex): diff --git a/toontown/speedchat/TTSCVictoryPartiesMenu.py b/toontown/speedchat/TTSCVictoryPartiesMenu.py index 362af7e..69564f4 100644 --- a/toontown/speedchat/TTSCVictoryPartiesMenu.py +++ b/toontown/speedchat/TTSCVictoryPartiesMenu.py @@ -1,10 +1,13 @@ from direct.showbase import PythonUtil + +from otp.otpbase import OTPLocalizer +from otp.otpbase.OTPLocalizer import SpeedChatStaticText from otp.speedchat.SCMenu import SCMenu from otp.speedchat.SCMenuHolder import SCMenuHolder from otp.speedchat.SCStaticTextTerminal import SCStaticTextTerminal -from otp.otpbase.OTPLocalizer import SpeedChatStaticText + from toontown.speedchat.TTSCIndexedTerminal import TTSCIndexedTerminal -from otp.otpbase import OTPLocalizer + VictoryPartiesMenu = [(OTPLocalizer.VictoryPartiesMenuSections[1], [30350, 30351, 30352, diff --git a/toontown/speedchat/TTSCWinterMenu.py b/toontown/speedchat/TTSCWinterMenu.py index 53578d3..a929d7a 100644 --- a/toontown/speedchat/TTSCWinterMenu.py +++ b/toontown/speedchat/TTSCWinterMenu.py @@ -1,9 +1,12 @@ from direct.showbase import PythonUtil + +from otp.otpbase import OTPLocalizer from otp.speedchat.SCMenu import SCMenu from otp.speedchat.SCMenuHolder import SCMenuHolder from otp.speedchat.SCStaticTextTerminal import SCStaticTextTerminal + from toontown.speedchat.TTSCIndexedTerminal import TTSCIndexedTerminal -from otp.otpbase import OTPLocalizer + WinterMenu = [(OTPLocalizer.WinterMenuSections[0], {30200: 30220, 30201: 30221, 30202: 30222, diff --git a/toontown/speedchat/TTSpeedChatGlobals.py b/toontown/speedchat/TTSpeedChatGlobals.py index 58780d8..02c60a8 100644 --- a/toontown/speedchat/TTSpeedChatGlobals.py +++ b/toontown/speedchat/TTSpeedChatGlobals.py @@ -1,2 +1,2 @@ -from .TTSCToontaskTerminal import TTSCToontaskMsgEvent from .TTSCResistanceTerminal import TTSCResistanceMsgEvent +from .TTSCToontaskTerminal import TTSCToontaskMsgEvent diff --git a/toontown/speedchat/TTSpeedChatTypes.py b/toontown/speedchat/TTSpeedChatTypes.py index c2a24dd..94eafd8 100644 --- a/toontown/speedchat/TTSpeedChatTypes.py +++ b/toontown/speedchat/TTSpeedChatTypes.py @@ -1,27 +1,29 @@ -from .TTSCToontaskMenu import TTSCToontaskMenu -from .TTSCFactoryMenu import TTSCFactoryMenu from .TTSCCogMenu import TTSCCogMenu +from .TTSCFactoryMenu import TTSCFactoryMenu +from .TTSCToontaskMenu import TTSCToontaskMenu + if hasattr(base, 'wantPets') and base.wantPets: from .TTSCPetTrickMenu import TTSCPetTrickMenu + +from .TTSCAprilToonsMenu import TTSCAprilToonsMenu +from .TTSCBoardingMenu import TTSCBoardingMenu +from .TTSCGolfMenu import TTSCGolfMenu +from .TTSCHalloweenMenu import TTSCHalloweenMenu +from .TTSCIdesOfMarchMenu import TTSCIdesOfMarchMenu +from .TTSCJellybeanJamMenu import TTSCJellybeanJamMenu +from .TTSCKartRacingMenu import TTSCKartRacingMenu from .TTSCPromotionalMenu import TTSCPromotionalMenu -from .TTSCToontaskTerminal import TTSCToontaskTerminal from .TTSCResistanceMenu import TTSCResistanceMenu from .TTSCResistanceTerminal import TTSCResistanceTerminal -from .TTSCKartRacingMenu import TTSCKartRacingMenu -from .TTSCGolfMenu import TTSCGolfMenu -from .TTSCBoardingMenu import TTSCBoardingMenu -from .TTSCSingingMenu import TTSCSingingMenu -from .TTSCAprilToonsMenu import TTSCAprilToonsMenu -from .TTSCSillyPhaseOneMenu import TTSCSillyPhaseOneMenu -from .TTSCSillyPhaseTwoMenu import TTSCSillyPhaseTwoMenu -from .TTSCSillyPhaseThreeMenu import TTSCSillyPhaseThreeMenu -from .TTSCSillyPhaseFourMenu import TTSCSillyPhaseFourMenu -from .TTSCSillyPhaseFiveMenu import TTSCSillyPhaseFiveMenu -from .TTSCVictoryPartiesMenu import TTSCVictoryPartiesMenu -from .TTSCSellbotNerfMenu import TTSCSellbotNerfMenu -from .TTSCJellybeanJamMenu import TTSCJellybeanJamMenu -from .TTSCHalloweenMenu import TTSCHalloweenMenu -from .TTSCWinterMenu import TTSCWinterMenu -from .TTSCSellbotInvasionMenu import TTSCSellbotInvasionMenu from .TTSCSellbotFieldOfficeMenu import TTSCSellbotFieldOfficeMenu -from .TTSCIdesOfMarchMenu import TTSCIdesOfMarchMenu +from .TTSCSellbotInvasionMenu import TTSCSellbotInvasionMenu +from .TTSCSellbotNerfMenu import TTSCSellbotNerfMenu +from .TTSCSillyPhaseFiveMenu import TTSCSillyPhaseFiveMenu +from .TTSCSillyPhaseFourMenu import TTSCSillyPhaseFourMenu +from .TTSCSillyPhaseOneMenu import TTSCSillyPhaseOneMenu +from .TTSCSillyPhaseThreeMenu import TTSCSillyPhaseThreeMenu +from .TTSCSillyPhaseTwoMenu import TTSCSillyPhaseTwoMenu +from .TTSCSingingMenu import TTSCSingingMenu +from .TTSCToontaskTerminal import TTSCToontaskTerminal +from .TTSCVictoryPartiesMenu import TTSCVictoryPartiesMenu +from .TTSCWinterMenu import TTSCWinterMenu diff --git a/toontown/spellbook/MagicWordIndex.py b/toontown/spellbook/MagicWordIndex.py index 543e02b..8e6f828 100644 --- a/toontown/spellbook/MagicWordIndex.py +++ b/toontown/spellbook/MagicWordIndex.py @@ -9,21 +9,24 @@ # Email: belloqzafarian@gmail.com ################################################## -import collections, types +import collections +import json +import random +import re +import time +import types + +from panda3d.otp import NametagGroup, WhisperPopup from direct.distributed.ClockDelta import * from direct.interval.IntervalGlobal import * from direct.showbase.DirectObject import DirectObject from direct.showbase.PythonUtil import * -from panda3d.otp import NametagGroup, WhisperPopup - -from otp.otpbase import OTPLocalizer -from otp.otpbase import OTPGlobals +from otp.otpbase import OTPGlobals, OTPLocalizer from otp.otpbase.PythonUtil import * from . import MagicWordConfig -import time, random, re, json magicWordIndex = collections.OrderedDict() @@ -248,10 +251,10 @@ class MaxToon(MagicWord): accessLevel = 'ADMIN' def handleWord(self, invoker, avId, toon, *args): - from toontown.toonbase import ToontownGlobals + from toontown.coghq import CogDisguiseGlobals from toontown.quest import Quests from toontown.suit import SuitDNA - from toontown.coghq import CogDisguiseGlobals + from toontown.toonbase import ToontownGlobals # 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. @@ -282,7 +285,7 @@ class MaxToon(MagicWord): toon.b_setCogLevels([ToontownGlobals.MaxCogSuitLevel] * 4) return f"Successfully maxed {toon.getName()}!" - + class Inventory(MagicWord): # by default restock the inventory aliases = ['gags', 'inv'] @@ -314,8 +317,8 @@ class SetPinkSlips(MagicWord): def handleWord(self, invoker, avId, toon, *args): toon.b_setPinkSlips(args[0]) - return f"Gave {toon.getName()} {args[0]} pink slips!" - + return f"Gave {toon.getName()} {args[0]} pink slips!" + class AbortMinigame(MagicWord): aliases = ["exitgame", "exitminigame", "quitgame", "quitminigame", "skipgame", "skipminigame"] desc = "Aborts an ongoing minigame." @@ -324,7 +327,7 @@ class AbortMinigame(MagicWord): def handleWord(self, invoker, avId, toon, *args): messenger.send("minigameAbort") - return "Requested minigame abort." + return "Requested minigame abort." class SkipMiniGolfHole(MagicWord): aliases = ["skipgolfhole", "skipgolf", "skiphole"] @@ -349,7 +352,7 @@ class SkipMiniGolfHole(MagicWord): course.holeOver() return "Skipped the current hole." - + class AbortGolfCourse(MagicWord): aliases = ["abortminigolf", "abortgolf", "abortcourse", "leavegolf", "leavecourse"] desc = "Aborts the current golf course." @@ -366,7 +369,7 @@ class AbortGolfCourse(MagicWord): break if not course: return "You aren't in a golf course!" - + course.setCourseAbort() return "Aborted golf course." @@ -382,9 +385,9 @@ class Minigame(MagicWord): minigame = args[1] difficulty = args[2] - from toontown.toonbase import ToontownGlobals from toontown.hood import ZoneUtil from toontown.minigame import MinigameCreatorAI + from toontown.toonbase import ToontownGlobals if command in ToontownGlobals.MinigameNames: # Shortcut minigame = args[0] @@ -392,7 +395,7 @@ class Minigame(MagicWord): difficulty = float(args[2]) except ValueError: difficulty = 0 - + if toon.zoneId in MinigameCreatorAI.MinigameZoneRefs: # Already in minigame zone, assume request command = "request" @@ -402,7 +405,7 @@ class Minigame(MagicWord): else: # Request by default command = "request" - + isTeleport = command in ('teleport', 'tp') isRequest = command in ('request', 'next') @@ -434,7 +437,7 @@ class Minigame(MagicWord): 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: @@ -446,7 +449,7 @@ class Minigame(MagicWord): 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): @@ -481,7 +484,7 @@ class Factory(MagicWord): def handleWord(self, invoker, avId, toon, *args): if not hasattr(self.air, "factoryMgr"): return "No factory manager." - + from toontown.toonbase import ToontownGlobals zoneId = self.air.factoryMgr.createFactory(ToontownGlobals.SellbotFactoryInt, 1 if args[0] > 0 else 0, [avId]) return "Created factory, teleporting...", avId, ["cogHQLoader", "factoryInterior", "", ToontownGlobals.SellbotHQ, zoneId, 0] @@ -515,7 +518,7 @@ class BossBattle(MagicWord): start = int(args[1]) except ValueError: start = 1 - + from toontown.suit.DistributedBossCogAI import AllBossCogs boss = None for bc in AllBossCogs: @@ -540,7 +543,7 @@ class BossBattle(MagicWord): boss = DistributedBossbotBossAI(self.air) else: return f"Unknown boss type: \"{type}\"" - + zoneId = self.air.allocateZone() boss.generateWithRequired(zoneId) if start: @@ -548,7 +551,7 @@ class BossBattle(MagicWord): boss.b_setState('WaitForToons') else: boss.b_setState('Frolic') - + self.acceptOnce(boss.uniqueName('BossDone'), self.__destroyBoss, extraArgs=[boss]) respText = f"Created {type.upper()} boss battle" @@ -556,7 +559,7 @@ class BossBattle(MagicWord): respText += " in Frolic state" return respText + ", teleporting...", toon.doId, ["cogHQLoader", "cogHQBossBattle", "movie" if start else "teleportIn", boss.getHoodId(), boss.zoneId, 0] - + elif command == "list": # List all the ongoing boss battles. dept2name = {'c': 'ceo', @@ -567,7 +570,7 @@ class BossBattle(MagicWord): if not AllBossCogs: return "No ongoing boss battles." - + respText = "\nBoss Battles:" if type: @@ -583,7 +586,7 @@ class BossBattle(MagicWord): index = AllBossCogs.index(boss) respText += f"\n - #{index}: {dept2name.get(boss.dept, '???').upper()}, {boss.zoneId}, {boss.state}, {len(boss.involvedToons)}" return respText - + elif command == "join": # Join an ongoing boss battle. if boss: @@ -592,10 +595,10 @@ class BossBattle(MagicWord): index = int(type) except ValueError: return "Boss index not an integer!" - + if index not in range(len(AllBossCogs)): return "Index out of range!" - + boss = AllBossCogs[index] return "Teleporting to boss battle...", toon.doId, ["cogHQLoader", "cogHQBossBattle", "", boss.getHoodId(), boss.zoneId, 0] @@ -653,7 +656,7 @@ class GlobalTeleport(MagicWord): toon.b_setHoodsVisited(ToontownGlobals.HoodsForTeleportAll) toon.b_setTeleportAccess(ToontownGlobals.HoodsForTeleportAll) return f"Enabled teleport access to all zones for {toon.getName()}." - + class Teleport(MagicWord): aliases = ["tp", "goto"] desc = "Teleport to a specified zone." @@ -682,7 +685,7 @@ class Teleport(MagicWord): 'cbhq': ToontownGlobals.CashbotHQ, 'lbhq': ToontownGlobals.LawbotHQ, 'bbhq': ToontownGlobals.BossbotHQ} - + try: zone = zoneName2Id[zoneName] except KeyError: @@ -698,7 +701,7 @@ class ToggleSleep(MagicWord): def handleWord(self, invoker, avId, toon, *args): toon.d_toggleSleep() return f"Toggled sleeping for {toon.getName()}." - + class ToggleImmortal(MagicWord): aliases = ["immortal", "invincible", "invulnerable"] desc = "Toggle immortal mode. This makes the Toon immune to damage." @@ -707,7 +710,7 @@ class ToggleImmortal(MagicWord): def handleWord(self, invoker, avId, toon, *args): toon.setImmortalMode(not toon.immortalMode) return f"Toggled immortal mode for {toon.getName()}" - + class ToggleGhost(MagicWord): aliases = ["ghost", "invisible", "spy"] desc = "Toggle ghost mode." @@ -717,7 +720,7 @@ class ToggleGhost(MagicWord): # 1 is for the attic, 2 enables you to see yourself other ghost toons. 0 is off. toon.b_setGhostMode(2 if not toon.ghostMode else 0) # As it's primarily for moderation purposes, we set it to 2 here, or 0 if it's already on. return f"Toggled ghost mode for {toon.getName()}" - + class SetGM(MagicWord): aliases = ["icon", "seticon", "gm", "gmicon", "setgmicon"] desc = "Sets the GM icon on the target." @@ -730,11 +733,11 @@ class SetGM(MagicWord): iconRequest = args[0] if iconRequest > len(TTLocalizer.GM_NAMES) or iconRequest < 0: return "Invalid GM icon ID!" - + toon.b_setGM(0) # Reset it first, otherwise the Toon keeps the old icon, but the name still changes. toon.b_setGM(iconRequest) return f"GM icon set to {iconRequest} for {toon.getName()}" - + class SetMaxCarry(MagicWord): aliases = ["gagpouch", "pouch", "gagcapacity"] desc = "Set a Toon's gag pouch size." @@ -749,7 +752,7 @@ class SetMaxCarry(MagicWord): toon.b_setMaxCarry(pouchSize) return f"Set gag pouch size to {pouchSize} for {toon.getName()}" - + class ToggleInstantKill(MagicWord): aliases = ["instantkill", "instakill"] desc = "Toggle the ability to instantly kill a Cog with any gag." @@ -772,8 +775,8 @@ class Fireworks(MagicWord): name = args[0] hood = args[1] - from toontown.toonbase import ToontownGlobals from toontown.parties import PartyGlobals + from toontown.toonbase import ToontownGlobals name2showId = { 'newyear': ToontownGlobals.NEWYEARS_FIREWORKS, 'newyears': ToontownGlobals.NEWYEARS_FIREWORKS, @@ -796,7 +799,7 @@ class Fireworks(MagicWord): ToontownGlobals.GoofySpeedway : 0, ToontownGlobals.DonaldsDreamland : 2 } - + from toontown.hood import ZoneUtil zones = [] if not hood: @@ -805,7 +808,7 @@ class Fireworks(MagicWord): zones = zoneToStyleDict.keys() else: return "Missing hood argument." - + # Generate our firework shows from toontown.effects.DistributedFireworkShowAI import DistributedFireworkShowAI count = 0 @@ -816,9 +819,9 @@ class Fireworks(MagicWord): self.fireworkShows[zone] = show show.d_startShow(showId, zoneToStyleDict.get(zone, 0)) count += 1 - + return f"Started firework {'show' if count == 1 else 'shows'} in {count} {'zone' if count == 1 else 'zones'}!" - + def stopShow(self, zoneId): if zoneId in self.fireworkShows: show = self.fireworkShows[zoneId] diff --git a/toontown/spellbook/ToontownMagicWordManager.py b/toontown/spellbook/ToontownMagicWordManager.py index d8a6c2f..a7325d7 100644 --- a/toontown/spellbook/ToontownMagicWordManager.py +++ b/toontown/spellbook/ToontownMagicWordManager.py @@ -9,10 +9,15 @@ # Email: belloqzafarian@gmail.com ################################################## +import json +import random +import string + +from panda3d.otp import WhisperPopup + from direct.directnotify import DirectNotifyGlobal from direct.distributed import DistributedObject -from panda3d.otp import WhisperPopup from otp.otpbase.OTPGlobals import * from toontown.friends import FriendHandle @@ -20,11 +25,6 @@ from toontown.spellbook.MagicWordConfig import * from toontown.spellbook.MagicWordIndex import * from toontown.toon import Toon -import json -import random -import string - - MagicWordIndex = magicWordIndex.copy() @@ -259,7 +259,7 @@ 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. @@ -280,8 +280,8 @@ class ToontownMagicWordManager(DistributedObject.DistributedObject): [{"loader": loaderId, "where": whereId, "how": how, - "hoodId": hoodId, - "zoneId": zoneId, + "hoodId": hoodId, + "zoneId": zoneId, "shardId": None, "avId": avId}]) except Exception: # Most likely cause is the place the avatar is in has no teleportOut state, for example, boss lobbies. diff --git a/toontown/spellbook/ToontownMagicWordManagerAI.py b/toontown/spellbook/ToontownMagicWordManagerAI.py index 86583df..33aa739 100644 --- a/toontown/spellbook/ToontownMagicWordManagerAI.py +++ b/toontown/spellbook/ToontownMagicWordManagerAI.py @@ -9,6 +9,9 @@ # Email: belloqzafarian@gmail.com ################################################## +import json +import os + from direct.directnotify import DirectNotifyGlobal from direct.distributed import DistributedObjectAI @@ -17,9 +20,6 @@ from otp.avatar.DistributedPlayerAI import DistributedPlayerAI from toontown.spellbook.MagicWordConfig import * from toontown.spellbook.MagicWordIndex import * -import json -import os - # All of the data regarding our Magic Words MagicWordIndex = magicWordIndex.copy() @@ -304,6 +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]) diff --git a/toontown/suit/BossCog.py b/toontown/suit/BossCog.py index 4765038..3a8a3b3 100644 --- a/toontown/suit/BossCog.py +++ b/toontown/suit/BossCog.py @@ -1,20 +1,22 @@ +import string + from panda3d.core import * from panda3d.otp import * -from direct.interval.IntervalGlobal import * + from direct.actor import Actor -from otp.avatar import Avatar from direct.directnotify import DirectNotifyGlobal -from toontown.toonbase import ToontownGlobals -from direct.fsm import FSM -from direct.fsm import State -from toontown.toonbase import TTLocalizer -from toontown.battle import BattleParticles -from . import Suit -from direct.task.Task import Task -from . import SuitDNA -from toontown.battle import BattleProps +from direct.fsm import FSM, State +from direct.interval.IntervalGlobal import * from direct.showbase.PythonUtil import Functor -import string +from direct.task.Task import Task + +from otp.avatar import Avatar + +from toontown.battle import BattleParticles, BattleProps +from toontown.toonbase import ToontownGlobals, TTLocalizer + +from . import Suit, SuitDNA + GenericModel = 'phase_9/models/char/bossCog' ModelDict = {'s': 'phase_9/models/char/sellbotBoss', 'm': 'phase_10/models/char/cashbotBoss', diff --git a/toontown/suit/DistributedBossCog.py b/toontown/suit/DistributedBossCog.py index aa76277..7c09646 100644 --- a/toontown/suit/DistributedBossCog.py +++ b/toontown/suit/DistributedBossCog.py @@ -1,27 +1,27 @@ +import random + from panda3d.core import * from panda3d.otp import * -from direct.interval.IntervalGlobal import * -from direct.distributed.ClockDelta import * + +from direct.controls.ControlManager import CollisionHandlerRayStart from direct.directnotify import DirectNotifyGlobal +from direct.distributed.ClockDelta import * +from direct.interval.IntervalGlobal import * +from direct.showbase import PythonUtil, Transitions + from otp.avatar import DistributedAvatar -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import ToontownBattleGlobals -from toontown.battle import BattleExperience -from toontown.battle import BattleBase -from . import BossCog -from . import SuitDNA + +from toontown.battle import BattleBase, BattleExperience +from toontown.building import ElevatorConstants, ElevatorUtils from toontown.coghq import CogDisguiseGlobals -from direct.showbase import Transitions -from toontown.hood import ZoneUtil -from toontown.building import ElevatorUtils -from toontown.building import ElevatorConstants from toontown.distributed import DelayDelete from toontown.effects import DustCloud -from toontown.toonbase import TTLocalizer from toontown.friends import FriendsListManager -from direct.controls.ControlManager import CollisionHandlerRayStart -from direct.showbase import PythonUtil -import random +from toontown.hood import ZoneUtil +from toontown.toonbase import ToontownBattleGlobals, ToontownGlobals, TTLocalizer + +from . import BossCog, SuitDNA + class DistributedBossCog(DistributedAvatar.DistributedAvatar, BossCog.BossCog): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedBossCog') diff --git a/toontown/suit/DistributedBossCogAI.py b/toontown/suit/DistributedBossCogAI.py index 7f67fa4..9cdcc5d 100644 --- a/toontown/suit/DistributedBossCogAI.py +++ b/toontown/suit/DistributedBossCogAI.py @@ -1,16 +1,18 @@ -from direct.directnotify import DirectNotifyGlobal -from otp.avatar import DistributedAvatarAI -from toontown.battle import BattleExperienceAI -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import ToontownBattleGlobals -from toontown.toon import InventoryBase -from toontown.battle import DistributedBattleFinalAI -from toontown.building import SuitPlannerInteriorAI -from toontown.battle import BattleBase -from toontown.coghq import CogDisguiseGlobals -from panda3d.core import * -from toontown.suit import SuitDNA import random + +from panda3d.core import * + +from direct.directnotify import DirectNotifyGlobal + +from otp.avatar import DistributedAvatarAI + +from toontown.battle import BattleBase, BattleExperienceAI, DistributedBattleFinalAI +from toontown.building import SuitPlannerInteriorAI +from toontown.coghq import CogDisguiseGlobals +from toontown.suit import SuitDNA +from toontown.toon import InventoryBase +from toontown.toonbase import ToontownBattleGlobals, ToontownGlobals + AllBossCogs = [] class DistributedBossCogAI(DistributedAvatarAI.DistributedAvatarAI): @@ -689,6 +691,6 @@ class DistributedBossCogAI(DistributedAvatarAI.DistributedAvatarAI): def doNextAttack(self, task): self.b_setAttackCode(ToontownGlobals.BossCogNoAttack) - + def getNextState(self): raise NotImplementedError diff --git a/toontown/suit/DistributedBossbotBoss.py b/toontown/suit/DistributedBossbotBoss.py index d2edfb5..ae08f0f 100644 --- a/toontown/suit/DistributedBossbotBoss.py +++ b/toontown/suit/DistributedBossbotBoss.py @@ -1,31 +1,29 @@ import math import random -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 -from direct.fsm import FSM + +from panda3d.core import (BitMask32, BoundingSphere, CollisionHandlerEvent, CollisionNode, CollisionPlane, + CollisionSphere, CollisionTube, NodePath, Plane, Point3, TextureStage, VBase3, VBase4, Vec2, + Vec3) +from panda3d.otp import CFSpeech, NametagGroup + from direct.directnotify import DirectNotifyGlobal from direct.distributed.ClockDelta import globalClockDelta +from direct.fsm import FSM +from direct.interval.IntervalGlobal import (ActorInterval, Func, LerpFunctionInterval, LerpHprInterval, + LerpPosHprInterval, LerpPosInterval, LerpScaleInterval, Parallel, + ParallelEndTogether, Sequence, SoundInterval, Track, Wait) from direct.showbase import PythonUtil from direct.task import Task -from toontown.distributed import DelayDelete -from toontown.toonbase import ToontownGlobals -from toontown.suit import DistributedBossCog -from toontown.toonbase import TTLocalizer -from toontown.toonbase import ToontownGlobals -from toontown.suit import SuitDNA -from toontown.toon import Toon -from toontown.toon import ToonDNA + +from toontown.battle import MovieToonVictory, RewardPanel from toontown.building import ElevatorConstants -from toontown.toonbase import ToontownTimer -from toontown.toonbase import ToontownBattleGlobals -from toontown.battle import RewardPanel -from toontown.battle import MovieToonVictory from toontown.coghq import CogDisguiseGlobals -from toontown.suit import Suit -from toontown.suit import SuitDNA +from toontown.distributed import DelayDelete from toontown.effects import DustCloud +from toontown.suit import DistributedBossCog, Suit, SuitDNA +from toontown.toon import Toon, ToonDNA +from toontown.toonbase import ToontownBattleGlobals, ToontownGlobals, ToontownTimer, TTLocalizer + OneBossCog = None TTL = TTLocalizer diff --git a/toontown/suit/DistributedBossbotBossAI.py b/toontown/suit/DistributedBossbotBossAI.py index cfabeab..8820b9a 100644 --- a/toontown/suit/DistributedBossbotBossAI.py +++ b/toontown/suit/DistributedBossbotBossAI.py @@ -1,21 +1,19 @@ -import random, math +import math +import random + from panda3d.core import Point3 + from direct.directnotify import DirectNotifyGlobal +from direct.distributed.ClockDelta import globalClockDelta from direct.fsm import FSM from direct.interval.IntervalGlobal import LerpPosInterval -from toontown.coghq import DistributedFoodBeltAI -from toontown.coghq import DistributedBanquetTableAI -from toontown.coghq import DistributedGolfSpotAI -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import ToontownBattleGlobals -from toontown.suit import DistributedBossCogAI -from toontown.suit import DistributedSuitAI -from toontown.suit import SuitDNA + +from toontown.battle import BattleExperienceAI, DistributedBattleDinersAI, DistributedBattleWaitersAI from toontown.building import SuitBuildingGlobals -from toontown.battle import DistributedBattleWaitersAI -from toontown.battle import DistributedBattleDinersAI -from toontown.battle import BattleExperienceAI -from direct.distributed.ClockDelta import globalClockDelta +from toontown.coghq import DistributedBanquetTableAI, DistributedFoodBeltAI, DistributedGolfSpotAI +from toontown.suit import DistributedBossCogAI, DistributedSuitAI, SuitDNA +from toontown.toonbase import ToontownBattleGlobals, ToontownGlobals + class DistributedBossbotBossAI(DistributedBossCogAI.DistributedBossCogAI, FSM.FSM): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedBossbotBossAI') @@ -885,7 +883,7 @@ 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": @@ -909,5 +907,5 @@ class DistributedBossbotBossAI(DistributedBossCogAI.DistributedBossCogAI, FSM.FS # 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 b4cdfce..b2557a6 100644 --- a/toontown/suit/DistributedCashbotBoss.py +++ b/toontown/suit/DistributedCashbotBoss.py @@ -1,30 +1,30 @@ -from direct.interval.IntervalGlobal import * -from direct.task.TaskManagerGlobal import * -from direct.directnotify import DirectNotifyGlobal -from toontown.toonbase import TTLocalizer -from . import DistributedBossCog -from direct.task.Task import Task -from . import DistributedCashbotBossGoon -from . import SuitDNA -from toontown.toon import Toon -from toontown.toon import ToonDNA -from direct.fsm import FSM -from toontown.toonbase import ToontownGlobals -from otp.otpbase import OTPGlobals -from toontown.building import ElevatorUtils -from toontown.building import ElevatorConstants -from toontown.battle import MovieToonVictory -from toontown.battle import RewardPanel -from toontown.distributed import DelayDelete -from toontown.chat import ResistanceChat -from toontown.coghq import CogDisguiseGlobals +import functools +import math +import random + from panda3d.core import * from panda3d.direct import ShowInterval -from panda3d.physics import * from panda3d.otp import * -import random -import math -import functools +from panda3d.physics import * + +from direct.directnotify import DirectNotifyGlobal +from direct.fsm import FSM +from direct.interval.IntervalGlobal import * +from direct.task.Task import Task +from direct.task.TaskManagerGlobal import * + +from otp.otpbase import OTPGlobals + +from toontown.battle import MovieToonVictory, RewardPanel +from toontown.building import ElevatorConstants, ElevatorUtils +from toontown.chat import ResistanceChat +from toontown.coghq import CogDisguiseGlobals +from toontown.distributed import DelayDelete +from toontown.toon import Toon, ToonDNA +from toontown.toonbase import ToontownGlobals, TTLocalizer + +from . import DistributedBossCog, DistributedCashbotBossGoon, SuitDNA + OneBossCog = None TTL = TTLocalizer @@ -483,7 +483,7 @@ 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. diff --git a/toontown/suit/DistributedCashbotBossAI.py b/toontown/suit/DistributedCashbotBossAI.py index 1d3f6f6..1f3a1b8 100644 --- a/toontown/suit/DistributedCashbotBossAI.py +++ b/toontown/suit/DistributedCashbotBossAI.py @@ -1,16 +1,18 @@ +import functools +import math +import random + from panda3d.core import * + from direct.directnotify import DirectNotifyGlobal -from toontown.toonbase import ToontownGlobals -from toontown.coghq import DistributedCashbotBossCraneAI -from toontown.coghq import DistributedCashbotBossSafeAI -from toontown.suit import DistributedCashbotBossGoonAI -from toontown.coghq import DistributedCashbotBossTreasureAI +from direct.fsm import FSM + from toontown.battle import BattleExperienceAI from toontown.chat import ResistanceChat -from direct.fsm import FSM -from toontown.suit import DistributedBossCogAI -import random, math -import functools +from toontown.coghq import DistributedCashbotBossCraneAI, DistributedCashbotBossSafeAI, DistributedCashbotBossTreasureAI +from toontown.suit import DistributedBossCogAI, DistributedCashbotBossGoonAI +from toontown.toonbase import ToontownGlobals + class DistributedCashbotBossAI(DistributedBossCogAI.DistributedBossCogAI, FSM.FSM): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedCashbotBossAI') @@ -477,7 +479,7 @@ 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": @@ -493,5 +495,5 @@ class DistributedCashbotBossAI(DistributedBossCogAI.DistributedBossCogAI, FSM.FS # 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/DistributedCashbotBossGoon.py b/toontown/suit/DistributedCashbotBossGoon.py index 99c04b7..7dae6b6 100644 --- a/toontown/suit/DistributedCashbotBossGoon.py +++ b/toontown/suit/DistributedCashbotBossGoon.py @@ -1,15 +1,19 @@ from panda3d.core import * -from direct.interval.IntervalGlobal import * -from direct.task.TaskManagerGlobal import * -from direct.distributed.ClockDelta import * + from direct.directnotify import DirectNotifyGlobal -from . import GoonGlobals -from direct.task.Task import Task -from toontown.toonbase import ToontownGlobals -from otp.otpbase import OTPGlobals -from toontown.coghq import DistributedCashbotBossObject +from direct.distributed.ClockDelta import * +from direct.interval.IntervalGlobal import * from direct.showbase import PythonUtil -from . import DistributedGoon +from direct.task.Task import Task +from direct.task.TaskManagerGlobal import * + +from otp.otpbase import OTPGlobals + +from toontown.coghq import DistributedCashbotBossObject +from toontown.toonbase import ToontownGlobals + +from . import DistributedGoon, GoonGlobals + class DistributedCashbotBossGoon(DistributedGoon.DistributedGoon, DistributedCashbotBossObject.DistributedCashbotBossObject): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedCashbotBossGoon') diff --git a/toontown/suit/DistributedCashbotBossGoonAI.py b/toontown/suit/DistributedCashbotBossGoonAI.py index 201d0d8..5c639c5 100644 --- a/toontown/suit/DistributedCashbotBossGoonAI.py +++ b/toontown/suit/DistributedCashbotBossGoonAI.py @@ -1,15 +1,20 @@ +import math +import random + from panda3d.core import * -from direct.task.TaskManagerGlobal import * + from direct.distributed.ClockDelta import * from direct.interval.IntervalGlobal import * -from toontown.suit import GoonGlobals -from direct.task.Task import Task -from toontown.toonbase import ToontownGlobals -from otp.otpbase import OTPGlobals -from toontown.coghq import DistributedCashbotBossObjectAI from direct.showbase import PythonUtil -from toontown.suit import DistributedGoonAI -import math, random +from direct.task.Task import Task +from direct.task.TaskManagerGlobal import * + +from otp.otpbase import OTPGlobals + +from toontown.coghq import DistributedCashbotBossObjectAI +from toontown.suit import DistributedGoonAI, GoonGlobals +from toontown.toonbase import ToontownGlobals + class DistributedCashbotBossGoonAI(DistributedGoonAI.DistributedGoonAI, DistributedCashbotBossObjectAI.DistributedCashbotBossObjectAI): legLength = 10 diff --git a/toontown/suit/DistributedFactorySuit.py b/toontown/suit/DistributedFactorySuit.py index d6110f7..e3af17d 100644 --- a/toontown/suit/DistributedFactorySuit.py +++ b/toontown/suit/DistributedFactorySuit.py @@ -1,14 +1,19 @@ -from panda3d.core import * -from direct.interval.IntervalGlobal import * -from direct.fsm import ClassicFSM, State -from direct.fsm import State -from direct.directnotify import DirectNotifyGlobal -from . import DistributedSuitBase -from direct.task.Task import Task import random -from toontown.toonbase import ToontownGlobals + +from panda3d.core import * + +from direct.directnotify import DirectNotifyGlobal +from direct.fsm import ClassicFSM, State +from direct.interval.IntervalGlobal import * +from direct.task.Task import Task + from otp.level import LevelConstants + from toontown.distributed.DelayDeletable import DelayDeletable +from toontown.toonbase import ToontownGlobals + +from . import DistributedSuitBase + class DistributedFactorySuit(DistributedSuitBase.DistributedSuitBase, DelayDeletable): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedFactorySuit') diff --git a/toontown/suit/DistributedFactorySuitAI.py b/toontown/suit/DistributedFactorySuitAI.py index 30f6714..4227ed4 100644 --- a/toontown/suit/DistributedFactorySuitAI.py +++ b/toontown/suit/DistributedFactorySuitAI.py @@ -1,9 +1,13 @@ -from otp.ai.AIBaseGlobal import * from direct.directnotify import DirectNotifyGlobal -from toontown.battle import SuitBattleGlobals -from . import DistributedSuitBaseAI, SuitDialog from direct.showbase.PythonUtil import StackTrace +from otp.ai.AIBaseGlobal import * + +from toontown.battle import SuitBattleGlobals + +from . import DistributedSuitBaseAI, SuitDialog + + class DistributedFactorySuitAI(DistributedSuitBaseAI.DistributedSuitBaseAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedFactorySuitAI') diff --git a/toontown/suit/DistributedGoon.py b/toontown/suit/DistributedGoon.py index 62e8fc8..cc76fc2 100644 --- a/toontown/suit/DistributedGoon.py +++ b/toontown/suit/DistributedGoon.py @@ -1,21 +1,23 @@ -from panda3d.core import * -from direct.interval.IntervalGlobal import * -from toontown.battle.BattleProps import * -from .GoonGlobals import * -from direct.fsm import FSM -from direct.distributed import ClockDelta -from otp.level import BasicEntities -from otp.level import DistributedEntity -from direct.directnotify import DirectNotifyGlobal -from toontown.coghq import DistributedCrushableEntity -from toontown.toonbase import ToontownGlobals -from toontown.coghq import MovingPlatform -from . import Goon -from direct.task.Task import Task -from otp.level import PathEntity -from . import GoonDeath import random +from panda3d.core import * + +from direct.directnotify import DirectNotifyGlobal +from direct.distributed import ClockDelta +from direct.fsm import FSM +from direct.interval.IntervalGlobal import * +from direct.task.Task import Task + +from otp.level import BasicEntities, DistributedEntity, PathEntity + +from toontown.battle.BattleProps import * +from toontown.coghq import DistributedCrushableEntity, MovingPlatform +from toontown.toonbase import ToontownGlobals + +from . import Goon, GoonDeath +from .GoonGlobals import * + + class DistributedGoon(DistributedCrushableEntity.DistributedCrushableEntity, Goon.Goon, FSM.FSM): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedGoon') diff --git a/toontown/suit/DistributedGoonAI.py b/toontown/suit/DistributedGoonAI.py index d7803bc..ba9fe98 100644 --- a/toontown/suit/DistributedGoonAI.py +++ b/toontown/suit/DistributedGoonAI.py @@ -1,12 +1,17 @@ -from otp.ai.AIBaseGlobal import * -from .GoonGlobals import * +import random + from direct.directnotify import DirectNotifyGlobal +from direct.distributed import ClockDelta +from direct.task import Task + +from otp.ai.AIBaseGlobal import * + from toontown.battle import SuitBattleGlobals from toontown.coghq import DistributedCrushableEntityAI + from . import GoonPathData -from direct.distributed import ClockDelta -import random -from direct.task import Task +from .GoonGlobals import * + class DistributedGoonAI(DistributedCrushableEntityAI.DistributedCrushableEntityAI): UPDATE_TIMESTAMP_INTERVAL = 180.0 diff --git a/toontown/suit/DistributedGridGoon.py b/toontown/suit/DistributedGridGoon.py index 91da109..ac81001 100644 --- a/toontown/suit/DistributedGridGoon.py +++ b/toontown/suit/DistributedGridGoon.py @@ -1,10 +1,14 @@ from panda3d.core import * -from direct.interval.IntervalGlobal import * -from toontown.battle.BattleProps import * + from direct.directnotify import DirectNotifyGlobal -from . import DistributedGoon -from toontown.toonbase import ToontownGlobals +from direct.interval.IntervalGlobal import * + +from toontown.battle.BattleProps import * from toontown.coghq import MovingPlatform +from toontown.toonbase import ToontownGlobals + +from . import DistributedGoon + class DistributedGridGoon(DistributedGoon.DistributedGoon): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedGoon') diff --git a/toontown/suit/DistributedGridGoonAI.py b/toontown/suit/DistributedGridGoonAI.py index 7694883..05c5ec8 100644 --- a/toontown/suit/DistributedGridGoonAI.py +++ b/toontown/suit/DistributedGridGoonAI.py @@ -1,11 +1,16 @@ -from otp.ai.AIBaseGlobal import * -from direct.directnotify import DirectNotifyGlobal -from toontown.battle import SuitBattleGlobals -from . import DistributedGoonAI -from direct.task.Task import Task -from toontown.coghq import DistributedCrushableEntityAI import random +from direct.directnotify import DirectNotifyGlobal +from direct.task.Task import Task + +from otp.ai.AIBaseGlobal import * + +from toontown.battle import SuitBattleGlobals +from toontown.coghq import DistributedCrushableEntityAI + +from . import DistributedGoonAI + + class DistributedGridGoonAI(DistributedGoonAI.DistributedGoonAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedGridGoonAI') diff --git a/toontown/suit/DistributedLawbotBoss.py b/toontown/suit/DistributedLawbotBoss.py index fbb93ce..cd73597 100644 --- a/toontown/suit/DistributedLawbotBoss.py +++ b/toontown/suit/DistributedLawbotBoss.py @@ -1,37 +1,31 @@ -from direct.showbase.ShowBase import * -from direct.interval.IntervalGlobal import * -from toontown.battle.BattleProps import * -from direct.distributed.ClockDelta import * -from direct.showbase.PythonUtil import Functor -from direct.showbase.PythonUtil import StackTrace -from direct.gui.DirectGui import * +import functools +import math +import random + from panda3d.core import * from panda3d.otp import * -from direct.fsm import FSM -from direct.fsm import ClassicFSM -from direct.fsm import State + from direct.directnotify import DirectNotifyGlobal -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import ToontownBattleGlobals -from . import DistributedBossCog -from toontown.toonbase import TTLocalizer -from . import SuitDNA -from toontown.toon import Toon -from toontown.battle import BattleBase from direct.directutil import Mopath +from direct.distributed.ClockDelta import * +from direct.fsm import FSM, ClassicFSM, State +from direct.gui.DirectGui import * +from direct.interval.IntervalGlobal import * +from direct.showbase.PythonUtil import Functor, StackTrace +from direct.showbase.ShowBase import * from direct.showutil import Rope -from toontown.distributed import DelayDelete -from toontown.battle import MovieToonVictory -from toontown.building import ElevatorUtils -from toontown.battle import RewardPanel -from toontown.toon import NPCToons from direct.task import Task -import random -import math -import functools + +from toontown.battle import BattleBase, MovieToonVictory, RewardPanel +from toontown.battle.BattleProps import * +from toontown.building import ElevatorConstants, ElevatorUtils from toontown.coghq import CogDisguiseGlobals -from toontown.building import ElevatorConstants -from toontown.toonbase import ToontownTimer +from toontown.distributed import DelayDelete +from toontown.toon import NPCToons, Toon +from toontown.toonbase import ToontownBattleGlobals, ToontownGlobals, ToontownTimer, TTLocalizer + +from . import DistributedBossCog, SuitDNA + OneBossCog = None class DistributedLawbotBoss(DistributedBossCog.DistributedBossCog, FSM.FSM): diff --git a/toontown/suit/DistributedLawbotBossAI.py b/toontown/suit/DistributedLawbotBossAI.py index 8ee332e..9c08904 100644 --- a/toontown/suit/DistributedLawbotBossAI.py +++ b/toontown/suit/DistributedLawbotBossAI.py @@ -1,24 +1,19 @@ -from otp.ai.AIBaseGlobal import * -from direct.distributed.ClockDelta import * -from toontown.suit import DistributedBossCogAI -from direct.directnotify import DirectNotifyGlobal -from otp.avatar import DistributedAvatarAI -from toontown.suit import DistributedSuitAI -from toontown.battle import BattleExperienceAI -from direct.fsm import FSM -from toontown.toonbase import ToontownGlobals -from toontown.toon import InventoryBase -from toontown.toonbase import TTLocalizer -from toontown.battle import BattleBase -from toontown.toon import NPCToons -from toontown.building import SuitBuildingGlobals -from toontown.suit import SuitDNA import random -from toontown.coghq import DistributedLawbotBossGavelAI -from toontown.suit import DistributedLawbotBossSuitAI -from toontown.coghq import DistributedLawbotCannonAI -from toontown.coghq import DistributedLawbotChairAI -from toontown.toonbase import ToontownBattleGlobals + +from direct.directnotify import DirectNotifyGlobal +from direct.distributed.ClockDelta import * +from direct.fsm import FSM + +from otp.ai.AIBaseGlobal import * +from otp.avatar import DistributedAvatarAI + +from toontown.battle import BattleBase, BattleExperienceAI +from toontown.building import SuitBuildingGlobals +from toontown.coghq import DistributedLawbotBossGavelAI, DistributedLawbotCannonAI, DistributedLawbotChairAI +from toontown.suit import DistributedBossCogAI, DistributedLawbotBossSuitAI, DistributedSuitAI, SuitDNA +from toontown.toon import InventoryBase, NPCToons +from toontown.toonbase import ToontownBattleGlobals, ToontownGlobals, TTLocalizer + class DistributedLawbotBossAI(DistributedBossCogAI.DistributedBossCogAI, FSM.FSM): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedLawbotBossAI') @@ -168,7 +163,7 @@ class DistributedLawbotBossAI(DistributedBossCogAI.DistributedBossCogAI, FSM.FSM def doNextAttack(self, task): for lawyer in self.lawyers: lawyer.doNextAttack(self) - + self.waitForNextAttack(ToontownGlobals.LawbotBossLawyerCycleTime) timeSinceLastAttack = globalClock.getFrameTime() - self.lastAreaAttackTime allowedByTime = 15 < timeSinceLastAttack or self.lastAreaAttackTime == 0 @@ -194,7 +189,7 @@ class DistributedLawbotBossAI(DistributedBossCogAI.DistributedBossCogAI, FSM.FSM ToontownGlobals.BossCogDirectedAttack, ToontownGlobals.BossCogDirectedAttack, ToontownGlobals.BossCogDirectedAttack]) - if attackCode == ToontownGlobals.BossCogAreaAttack: + if attackCode == ToontownGlobals.BossCogAreaAttack: self.__doAreaAttack() elif attackCode == ToontownGlobals.BossCogDirectedAttack: self.__doDirectedAttack() @@ -264,7 +259,7 @@ class DistributedLawbotBossAI(DistributedBossCogAI.DistributedBossCogAI, FSM.FSM def makeBattleOneBattles(self): self.postBattleState = 'RollToBattleTwo' self.initializeBattles(1, ToontownGlobals.LawbotBossBattleOnePosHpr) - + @staticmethod def getEndOfBattleMovieDuration(): return 5 @@ -860,7 +855,7 @@ 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": @@ -878,5 +873,5 @@ class DistributedLawbotBossAI(DistributedBossCogAI.DistributedBossCogAI, FSM.FSM # 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/DistributedLawbotBossSuit.py b/toontown/suit/DistributedLawbotBossSuit.py index 179b6d7..5b0bfd8 100644 --- a/toontown/suit/DistributedLawbotBossSuit.py +++ b/toontown/suit/DistributedLawbotBossSuit.py @@ -1,11 +1,14 @@ from panda3d.core import * -from direct.interval.IntervalGlobal import * -from direct.fsm import ClassicFSM, State -from direct.fsm import State + from direct.directnotify import DirectNotifyGlobal -from . import DistributedSuitBase -from toontown.toonbase import ToontownGlobals +from direct.fsm import ClassicFSM, State +from direct.interval.IntervalGlobal import * + from toontown.battle import MovieUtil +from toontown.toonbase import ToontownGlobals + +from . import DistributedSuitBase + class DistributedLawbotBossSuit(DistributedSuitBase.DistributedSuitBase): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedLawbotBossSuit') diff --git a/toontown/suit/DistributedLawbotBossSuitAI.py b/toontown/suit/DistributedLawbotBossSuitAI.py index 43bc074..d2481bb 100644 --- a/toontown/suit/DistributedLawbotBossSuitAI.py +++ b/toontown/suit/DistributedLawbotBossSuitAI.py @@ -1,12 +1,15 @@ -from otp.ai.AIBaseGlobal import * -from direct.distributed.ClockDelta import * -from direct.directnotify import DirectNotifyGlobal -from toontown.battle import SuitBattleGlobals -from toontown.toonbase import ToontownGlobals -from toontown.suit import DistributedSuitBaseAI import random + +from direct.directnotify import DirectNotifyGlobal +from direct.distributed.ClockDelta import * from direct.fsm import ClassicFSM, State -from direct.fsm import State + +from otp.ai.AIBaseGlobal import * + +from toontown.battle import SuitBattleGlobals +from toontown.suit import DistributedSuitBaseAI +from toontown.toonbase import ToontownGlobals + class DistributedLawbotBossSuitAI(DistributedSuitBaseAI.DistributedSuitBaseAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedLawbotBossSuitAI') diff --git a/toontown/suit/DistributedMintSuit.py b/toontown/suit/DistributedMintSuit.py index 6d736a0..2c2777e 100644 --- a/toontown/suit/DistributedMintSuit.py +++ b/toontown/suit/DistributedMintSuit.py @@ -1,5 +1,7 @@ -from toontown.suit import DistributedFactorySuit from direct.directnotify import DirectNotifyGlobal +from toontown.suit import DistributedFactorySuit + + class DistributedMintSuit(DistributedFactorySuit.DistributedFactorySuit): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedMintSuit') diff --git a/toontown/suit/DistributedMintSuitAI.py b/toontown/suit/DistributedMintSuitAI.py index d5e4024..77b9703 100644 --- a/toontown/suit/DistributedMintSuitAI.py +++ b/toontown/suit/DistributedMintSuitAI.py @@ -1,6 +1,8 @@ -from toontown.suit import DistributedFactorySuitAI from direct.directnotify import DirectNotifyGlobal +from toontown.suit import DistributedFactorySuitAI + + class DistributedMintSuitAI(DistributedFactorySuitAI.DistributedFactorySuitAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedMintSuitAI') diff --git a/toontown/suit/DistributedSellbotBoss.py b/toontown/suit/DistributedSellbotBoss.py index ddbba5b..77ce791 100644 --- a/toontown/suit/DistributedSellbotBoss.py +++ b/toontown/suit/DistributedSellbotBoss.py @@ -1,34 +1,30 @@ +import math +import random + 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 panda3d.core import * -from direct.fsm import FSM -from direct.fsm import ClassicFSM, State -from direct.fsm import State + from direct.directnotify import DirectNotifyGlobal -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import ToontownBattleGlobals -from . import DistributedBossCog -from toontown.toonbase import TTLocalizer -from . import SuitDNA -from toontown.toon import Toon -from toontown.battle import BattleBase from direct.directutil import Mopath +from direct.distributed.ClockDelta import * +from direct.fsm import FSM, ClassicFSM, State +from direct.gui.DirectGui import * +from direct.interval.IntervalGlobal import * +from direct.showbase.PythonUtil import Functor from direct.showutil import Rope -from toontown.distributed import DelayDelete -from toontown.battle import MovieToonVictory -from toontown.building import ElevatorUtils -from toontown.battle import RewardPanel -from toontown.toon import NPCToons from direct.task import Task -import random -import math + +from toontown.battle import BattleBase, MovieToonVictory, RewardPanel +from toontown.battle.BattleProps import * +from toontown.building import ElevatorUtils from toontown.coghq import CogDisguiseGlobals +from toontown.distributed import DelayDelete from toontown.suit import SellbotBossGlobals +from toontown.toon import NPCToons, Toon +from toontown.toonbase import ToontownBattleGlobals, ToontownGlobals, TTLocalizer + +from . import DistributedBossCog, SuitDNA + OneBossCog = None class DistributedSellbotBoss(DistributedBossCog.DistributedBossCog, FSM.FSM): diff --git a/toontown/suit/DistributedSellbotBossAI.py b/toontown/suit/DistributedSellbotBossAI.py index 87c6898..80890e3 100644 --- a/toontown/suit/DistributedSellbotBossAI.py +++ b/toontown/suit/DistributedSellbotBossAI.py @@ -1,20 +1,18 @@ -from otp.ai.AIBaseGlobal import * -from direct.distributed.ClockDelta import * -from toontown.suit import DistributedBossCogAI -from direct.directnotify import DirectNotifyGlobal -from otp.avatar import DistributedAvatarAI -from toontown.suit import DistributedSuitAI -from toontown.battle import BattleExperienceAI -from direct.fsm import FSM -from toontown.toonbase import ToontownGlobals -from toontown.toon import InventoryBase -from toontown.toonbase import TTLocalizer -from toontown.battle import BattleBase -from toontown.toon import NPCToons -from toontown.suit import SellbotBossGlobals -from toontown.suit import SuitDNA import random +from direct.directnotify import DirectNotifyGlobal +from direct.distributed.ClockDelta import * +from direct.fsm import FSM + +from otp.ai.AIBaseGlobal import * +from otp.avatar import DistributedAvatarAI + +from toontown.battle import BattleBase, BattleExperienceAI +from toontown.suit import DistributedBossCogAI, DistributedSuitAI, SellbotBossGlobals, SuitDNA +from toontown.toon import InventoryBase, NPCToons +from toontown.toonbase import ToontownGlobals, TTLocalizer + + class DistributedSellbotBossAI(DistributedBossCogAI.DistributedBossCogAI, FSM.FSM): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedSellbotBossAI') limitHitCount = 6 @@ -217,7 +215,7 @@ class DistributedSellbotBossAI(DistributedBossCogAI.DistributedBossCogAI, FSM.FS def makeBattleOneBattles(self): self.postBattleState = 'RollToBattleTwo' self.initializeBattles(1, ToontownGlobals.SellbotBossBattleOnePosHpr) - + @staticmethod def getEndOfBattleMovieDuration(): return 5 @@ -474,5 +472,5 @@ class DistributedSellbotBossAI(DistributedBossCogAI.DistributedBossCogAI, FSM.FS # 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/DistributedStageSuit.py b/toontown/suit/DistributedStageSuit.py index 4bb06be..68e759d 100644 --- a/toontown/suit/DistributedStageSuit.py +++ b/toontown/suit/DistributedStageSuit.py @@ -1,16 +1,20 @@ +import string + +from panda3d.core import * + +from direct.actor import Actor +from direct.directnotify import DirectNotifyGlobal +from direct.task import Task + +from otp.avatar import Avatar + +from toontown.battle import BattleProps, SuitBattleGlobals from toontown.suit import DistributedFactorySuit from toontown.suit.Suit import * -from direct.directnotify import DirectNotifyGlobal -from direct.actor import Actor -from otp.avatar import Avatar +from toontown.toonbase import ToontownGlobals, TTLocalizer + from . import SuitDNA -from toontown.toonbase import ToontownGlobals -from panda3d.core import * -from toontown.battle import SuitBattleGlobals -from direct.task import Task -from toontown.battle import BattleProps -from toontown.toonbase import TTLocalizer -import string + class DistributedStageSuit(DistributedFactorySuit.DistributedFactorySuit): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedStageSuit') diff --git a/toontown/suit/DistributedStageSuitAI.py b/toontown/suit/DistributedStageSuitAI.py index a9314dd..ff436c0 100644 --- a/toontown/suit/DistributedStageSuitAI.py +++ b/toontown/suit/DistributedStageSuitAI.py @@ -1,6 +1,8 @@ -from toontown.suit import DistributedFactorySuitAI from direct.directnotify import DirectNotifyGlobal +from toontown.suit import DistributedFactorySuitAI + + class DistributedStageSuitAI(DistributedFactorySuitAI.DistributedFactorySuitAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedStageSuitAI') diff --git a/toontown/suit/DistributedSuit.py b/toontown/suit/DistributedSuit.py index 9e6bce9..c359ce3 100644 --- a/toontown/suit/DistributedSuit.py +++ b/toontown/suit/DistributedSuit.py @@ -1,28 +1,27 @@ +import copy +import math +import random + from panda3d.core import * from panda3d.otp import * from panda3d.toontown import * -from direct.interval.IntervalGlobal import * -from direct.distributed.ClockDelta import * -from direct.directtools.DirectGeometry import CLAMP -from direct.task import Task -from otp.avatar import DistributedAvatar -from . import Suit -from toontown.toonbase import ToontownGlobals -from toontown.battle import DistributedBattle -from direct.fsm import ClassicFSM, State -from direct.fsm import State -from . import SuitTimings -from . import SuitBase -from . import DistributedSuitPlanner + from direct.directnotify import DirectNotifyGlobal -from . import SuitDialog -from toontown.battle import BattleProps -from toontown.distributed.DelayDeletable import DelayDeletable -import math -import copy -from . import DistributedSuitBase +from direct.directtools.DirectGeometry import CLAMP +from direct.distributed.ClockDelta import * +from direct.fsm import ClassicFSM, State +from direct.interval.IntervalGlobal import * +from direct.task import Task + +from otp.avatar import DistributedAvatar from otp.otpbase import OTPLocalizer -import random + +from toontown.battle import BattleProps, DistributedBattle +from toontown.distributed.DelayDeletable import DelayDeletable +from toontown.toonbase import ToontownGlobals + +from . import DistributedSuitBase, DistributedSuitPlanner, Suit, SuitBase, SuitDialog, SuitTimings + STAND_OUTSIDE_DOOR = 2.5 BATTLE_IGNORE_TIME = 6 BATTLE_WAIT_TIME = 3 diff --git a/toontown/suit/DistributedSuitAI.py b/toontown/suit/DistributedSuitAI.py index 1ceefec..4038a42 100644 --- a/toontown/suit/DistributedSuitAI.py +++ b/toontown/suit/DistributedSuitAI.py @@ -1,17 +1,21 @@ -from otp.ai.AIBaseGlobal import * +import random + from panda3d.core import * from panda3d.toontown import * -from direct.distributed.ClockDelta import * -from otp.avatar import DistributedAvatarAI -from . import SuitTimings -from direct.task import Task -from . import SuitPlannerBase, SuitBase, SuitDialog, SuitDNA + from direct.directnotify import DirectNotifyGlobal +from direct.distributed.ClockDelta import * +from direct.task import Task + +from otp.ai.AIBaseGlobal import * +from otp.avatar import DistributedAvatarAI + from toontown.battle import SuitBattleGlobals from toontown.building import FADoorCodes -from . import DistributedSuitBaseAI from toontown.hood import ZoneUtil -import random + +from . import DistributedSuitBaseAI, SuitBase, SuitDialog, SuitDNA, SuitPlannerBase, SuitTimings + class DistributedSuitAI(DistributedSuitBaseAI.DistributedSuitBaseAI): SUIT_BUILDINGS = simbase.config.GetBool('want-suit-buildings', 1) diff --git a/toontown/suit/DistributedSuitBase.py b/toontown/suit/DistributedSuitBase.py index 5be2626..89baf94 100644 --- a/toontown/suit/DistributedSuitBase.py +++ b/toontown/suit/DistributedSuitBase.py @@ -1,28 +1,25 @@ +import copy +import math + from panda3d.core import * from panda3d.otp import * -from direct.interval.IntervalGlobal import * -from direct.distributed.ClockDelta import * -from direct.directtools.DirectGeometry import CLAMP + from direct.controls.ControlManager import CollisionHandlerRayStart -from direct.task import Task -from otp.otpbase import OTPGlobals -from otp.avatar import DistributedAvatar -from . import Suit -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import ToontownBattleGlobals -from toontown.toonbase import TTLocalizer -from toontown.battle import DistributedBattle -from direct.fsm import ClassicFSM -from direct.fsm import State -from . import SuitTimings -from . import SuitBase -from . import DistributedSuitPlanner -from . import SuitDNA from direct.directnotify import DirectNotifyGlobal -from . import SuitDialog -from toontown.battle import BattleProps -import math -import copy +from direct.directtools.DirectGeometry import CLAMP +from direct.distributed.ClockDelta import * +from direct.fsm import ClassicFSM, State +from direct.interval.IntervalGlobal import * +from direct.task import Task + +from otp.avatar import DistributedAvatar +from otp.otpbase import OTPGlobals + +from toontown.battle import BattleProps, DistributedBattle +from toontown.toonbase import ToontownBattleGlobals, ToontownGlobals, TTLocalizer + +from . import DistributedSuitPlanner, Suit, SuitBase, SuitDialog, SuitDNA, SuitTimings + class DistributedSuitBase(DistributedAvatar.DistributedAvatar, Suit.Suit, SuitBase.SuitBase): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedSuitBase') diff --git a/toontown/suit/DistributedSuitBaseAI.py b/toontown/suit/DistributedSuitBaseAI.py index 3ca34dd..56bb4e4 100644 --- a/toontown/suit/DistributedSuitBaseAI.py +++ b/toontown/suit/DistributedSuitBaseAI.py @@ -1,9 +1,13 @@ +from direct.directnotify import DirectNotifyGlobal + from otp.ai.AIBaseGlobal import * from otp.avatar import DistributedAvatarAI -from . import SuitPlannerBase, SuitBase, SuitDNA -from direct.directnotify import DirectNotifyGlobal + from toontown.battle import SuitBattleGlobals +from . import SuitBase, SuitDNA, SuitPlannerBase + + class DistributedSuitBaseAI(DistributedAvatarAI.DistributedAvatarAI, SuitBase.SuitBase): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedSuitBaseAI') diff --git a/toontown/suit/DistributedSuitPlanner.py b/toontown/suit/DistributedSuitPlanner.py index dac3b81..fd4dec0 100644 --- a/toontown/suit/DistributedSuitPlanner.py +++ b/toontown/suit/DistributedSuitPlanner.py @@ -1,8 +1,12 @@ from panda3d.core import * + from direct.distributed import DistributedObject -from . import SuitPlannerBase + from toontown.toonbase import ToontownGlobals +from . import SuitPlannerBase + + class DistributedSuitPlanner(DistributedObject.DistributedObject, SuitPlannerBase.SuitPlannerBase): def __init__(self, cr): diff --git a/toontown/suit/DistributedSuitPlannerAI.py b/toontown/suit/DistributedSuitPlannerAI.py index 3acff76..f67b773 100644 --- a/toontown/suit/DistributedSuitPlannerAI.py +++ b/toontown/suit/DistributedSuitPlannerAI.py @@ -1,21 +1,24 @@ +import math +import random +import time + from panda3d.toontown import * -from otp.ai.AIBaseGlobal import * -from direct.distributed import DistributedObjectAI -from . import SuitPlannerBase, DistributedSuitAI -from toontown.battle import BattleManagerAI -from direct.task import Task + from direct.directnotify import DirectNotifyGlobal -from . import SuitDNA -from toontown.battle import SuitBattleGlobals -from . import SuitTimings -from toontown.toon import NPCToons -from toontown.building import HQBuildingAI -from toontown.hood import ZoneUtil -from toontown.building import SuitBuildingGlobals +from direct.distributed import DistributedObjectAI +from direct.task import Task + +from otp.ai.AIBaseGlobal import * + +from toontown.battle import BattleManagerAI, SuitBattleGlobals +from toontown.building import HQBuildingAI, SuitBuildingGlobals from toontown.building.DistributedBuildingAI import DistributedBuildingAI -from toontown.toonbase import ToontownBattleGlobals -from toontown.toonbase import ToontownGlobals -import math, time, random +from toontown.hood import ZoneUtil +from toontown.toon import NPCToons +from toontown.toonbase import ToontownBattleGlobals, ToontownGlobals + +from . import DistributedSuitAI, SuitDNA, SuitPlannerBase, SuitTimings + class DistributedSuitPlannerAI(DistributedObjectAI.DistributedObjectAI, SuitPlannerBase.SuitPlannerBase): CogdoPopFactor = config.GetFloat('cogdo-pop-factor', 1.5) diff --git a/toontown/suit/DistributedTutorialSuit.py b/toontown/suit/DistributedTutorialSuit.py index 607d6af..46debe2 100644 --- a/toontown/suit/DistributedTutorialSuit.py +++ b/toontown/suit/DistributedTutorialSuit.py @@ -1,10 +1,13 @@ from panda3d.core import * -from direct.fsm import ClassicFSM, State -from direct.fsm import State + from direct.directnotify import DirectNotifyGlobal +from direct.fsm import ClassicFSM, State + from toontown.distributed.DelayDeletable import DelayDeletable + from . import DistributedSuitBase + class DistributedTutorialSuit(DistributedSuitBase.DistributedSuitBase, DelayDeletable): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedTutorialSuit') diff --git a/toontown/suit/DistributedTutorialSuitAI.py b/toontown/suit/DistributedTutorialSuitAI.py index c92d64d..5f60fcc 100644 --- a/toontown/suit/DistributedTutorialSuitAI.py +++ b/toontown/suit/DistributedTutorialSuitAI.py @@ -1,7 +1,9 @@ +from direct.directnotify import DirectNotifyGlobal + from otp.ai.AIBaseGlobal import * -from direct.directnotify import DirectNotifyGlobal from toontown.battle import SuitBattleGlobals + from . import DistributedSuitBaseAI @@ -12,7 +14,7 @@ class DistributedTutorialSuitAI(DistributedSuitBaseAI.DistributedSuitBaseAI): def __init__(self, air, suitPlanner): """__init__(air, suitPlanner)""" - DistributedSuitBaseAI.DistributedSuitBaseAI.__init__(self, air, + DistributedSuitBaseAI.DistributedSuitBaseAI.__init__(self, air, suitPlanner) def delete(self): @@ -52,4 +54,4 @@ class DistributedTutorialSuitAI(DistributedSuitBaseAI.DistributedSuitBaseAI): return (self.confrontPos, self.confrontHpr) def _logDeath(self, toonId): - self.air.writeServerEvent('beatFirstCog', toonId, '') \ No newline at end of file + self.air.writeServerEvent('beatFirstCog', toonId, '') diff --git a/toontown/suit/Goon.py b/toontown/suit/Goon.py index d771895..e4776a0 100644 --- a/toontown/suit/Goon.py +++ b/toontown/suit/Goon.py @@ -1,12 +1,15 @@ -from panda3d.core import * -from direct.actor import Actor -from otp.avatar import Avatar -from toontown.toonbase import ToontownGlobals -from panda3d.core import * -from toontown.toonbase import TTLocalizer -from . import GoonGlobals -from . import SuitDNA import math + +from panda3d.core import * + +from direct.actor import Actor + +from otp.avatar import Avatar + +from toontown.toonbase import ToontownGlobals, TTLocalizer + +from . import GoonGlobals, SuitDNA + AnimDict = {'pg': (('walk', '-walk'), ('collapse', '-collapse'), ('recovery', '-recovery')), 'sg': (('walk', '-walk'), ('collapse', '-collapse'), ('recovery', '-recovery'))} ModelDict = {'pg': 'phase_9/models/char/Cog_Goonie', diff --git a/toontown/suit/GoonDeath.py b/toontown/suit/GoonDeath.py index c118cbc..184f8ef 100644 --- a/toontown/suit/GoonDeath.py +++ b/toontown/suit/GoonDeath.py @@ -1,8 +1,11 @@ -from direct.interval.IntervalGlobal import * from panda3d.core import * + +from direct.interval.IntervalGlobal import * from direct.particles import ParticleEffect + from toontown.battle import BattleParticles + def createExplosionTrack(parent, deathNode, scale): explosion = loader.loadModel('phase_3.5/models/props/explosion.bam') explosion.getChild(0).setScale(scale) diff --git a/toontown/suit/GoonGlobals.py b/toontown/suit/GoonGlobals.py index 6f2a2de..137d1a3 100644 --- a/toontown/suit/GoonGlobals.py +++ b/toontown/suit/GoonGlobals.py @@ -1,4 +1,5 @@ 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 24b512e..47b38ef 100644 --- a/toontown/suit/GoonPathData.py +++ b/toontown/suit/GoonPathData.py @@ -1,5 +1,7 @@ from panda3d.core import * + from toontown.toonbase import ToontownGlobals + taskZoneId2pathId = {ToontownGlobals.SellbotFactoryInt: 'sellbotFactory', ToontownGlobals.CashbotMintIntA: 'cashbotMint', ToontownGlobals.CashbotMintIntB: 'cashbotMint', diff --git a/toontown/suit/RoguesGallery.py b/toontown/suit/RoguesGallery.py index de3a746..ed638ad 100644 --- a/toontown/suit/RoguesGallery.py +++ b/toontown/suit/RoguesGallery.py @@ -1,10 +1,14 @@ -from panda3d.core import * -from direct.fsm import StateData -from . import Suit -from . import SuitDNA -from toontown.toonbase import ToontownGlobals import random +from panda3d.core import * + +from direct.fsm import StateData + +from toontown.toonbase import ToontownGlobals + +from . import Suit, SuitDNA + + class RoguesGallery(StateData.StateData): def __init__(self, rognamestr = None): diff --git a/toontown/suit/SellbotBossGlobals.py b/toontown/suit/SellbotBossGlobals.py index ec1f08d..db2d66a 100644 --- a/toontown/suit/SellbotBossGlobals.py +++ b/toontown/suit/SellbotBossGlobals.py @@ -1,6 +1,7 @@ from panda3d.core import * -from toontown.coghq import DistributedHealBarrelAI -from toontown.coghq import DistributedGagBarrelAI + +from toontown.coghq import DistributedGagBarrelAI, DistributedHealBarrelAI + PieToonup = 1 PieToonupNerfed = 2 PieDamageMult = 1.0 diff --git a/toontown/suit/Suit.py b/toontown/suit/Suit.py index 8681baf..b698d51 100644 --- a/toontown/suit/Suit.py +++ b/toontown/suit/Suit.py @@ -1,13 +1,16 @@ -from direct.actor import Actor -from otp.avatar import Avatar -from . import SuitDNA -from toontown.toonbase import ToontownGlobals from panda3d.core import * from panda3d.otp import * -from toontown.battle import SuitBattleGlobals + +from direct.actor import Actor from direct.task.Task import Task -from toontown.battle import BattleProps -from toontown.toonbase import TTLocalizer + +from otp.avatar import Avatar + +from toontown.battle import BattleProps, SuitBattleGlobals +from toontown.toonbase import ToontownGlobals, TTLocalizer + +from . import SuitDNA + aSize = 6.06 bSize = 5.29 cSize = 4.14 diff --git a/toontown/suit/SuitAvatarPanel.py b/toontown/suit/SuitAvatarPanel.py index 11c5f74..c6336b2 100644 --- a/toontown/suit/SuitAvatarPanel.py +++ b/toontown/suit/SuitAvatarPanel.py @@ -1,13 +1,16 @@ from panda3d.core import * -from direct.gui.DirectGui import * -from panda3d.core import * -from direct.showbase import DirectObject -from otp.avatar import Avatar + from direct.distributed import DistributedObject -from . import SuitDNA -from toontown.toonbase import TTLocalizer -from otp.avatar import AvatarPanel +from direct.gui.DirectGui import * +from direct.showbase import DirectObject + +from otp.avatar import Avatar, AvatarPanel + from toontown.friends import FriendsListPanel +from toontown.toonbase import TTLocalizer + +from . import SuitDNA + class SuitAvatarPanel(AvatarPanel.AvatarPanel): currentAvatarPanel = None diff --git a/toontown/suit/SuitBase.py b/toontown/suit/SuitBase.py index 3e18b75..6621404 100644 --- a/toontown/suit/SuitBase.py +++ b/toontown/suit/SuitBase.py @@ -1,14 +1,18 @@ -from panda3d.core import * -from panda3d.toontown import * -from direct.distributed.ClockDelta import * import math import random + +from panda3d.core import * from panda3d.core import Point3 +from panda3d.toontown import * + from direct.directnotify import DirectNotifyGlobal +from direct.distributed.ClockDelta import * + from toontown.battle import SuitBattleGlobals -from . import SuitTimings -from . import SuitDNA from toontown.toonbase import TTLocalizer + +from . import SuitDNA, SuitTimings + TIME_BUFFER_PER_WPT = 0.25 TIME_DIVISOR = 100 DISTRIBUTE_TASK_CREATION = 0 diff --git a/toontown/suit/SuitDNA.py b/toontown/suit/SuitDNA.py index 0380bd2..978db58 100644 --- a/toontown/suit/SuitDNA.py +++ b/toontown/suit/SuitDNA.py @@ -1,11 +1,15 @@ import random + from panda3d.core import * + from direct.directnotify.DirectNotifyGlobal import * -from toontown.toonbase import TTLocalizer -import random from direct.distributed.PyDatagram import PyDatagram from direct.distributed.PyDatagramIterator import PyDatagramIterator + from otp.avatar import AvatarDNA + +from toontown.toonbase import TTLocalizer + notify = directNotify.newCategory('SuitDNA') suitHeadTypes = ['f', 'p', diff --git a/toontown/suit/SuitDialog.py b/toontown/suit/SuitDialog.py index cc33956..160aa28 100644 --- a/toontown/suit/SuitDialog.py +++ b/toontown/suit/SuitDialog.py @@ -1,7 +1,11 @@ import random + from direct.directnotify import DirectNotifyGlobal + from otp.otpbase import OTPLocalizer + from toontown.toonbase import TTLocalizer + notify = DirectNotifyGlobal.directNotify.newCategory('SuitDialog') def getBrushOffIndex(suitName): diff --git a/toontown/suit/SuitInvasionManagerAI.py b/toontown/suit/SuitInvasionManagerAI.py index bb1231c..18912ba 100644 --- a/toontown/suit/SuitInvasionManagerAI.py +++ b/toontown/suit/SuitInvasionManagerAI.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal + class SuitInvasionManagerAI: notify = DirectNotifyGlobal.directNotify.newCategory('SuitInvasionManagerAI') diff --git a/toontown/suit/SuitPlannerBase.py b/toontown/suit/SuitPlannerBase.py index 44c5a5f..b12ed0f 100644 --- a/toontown/suit/SuitPlannerBase.py +++ b/toontown/suit/SuitPlannerBase.py @@ -1,13 +1,15 @@ -from panda3d.core import * -from panda3d.toontown import * import random import string + +from panda3d.core import * +from panda3d.toontown import * + from direct.directnotify import DirectNotifyGlobal -from toontown.hood import ZoneUtil -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import ToontownBattleGlobals -from toontown.hood import HoodUtil + from toontown.building import SuitBuildingGlobals +from toontown.hood import HoodUtil, ZoneUtil +from toontown.toonbase import ToontownBattleGlobals, ToontownGlobals + class SuitPlannerBase: notify = DirectNotifyGlobal.directNotify.newCategory('SuitPlannerBase') diff --git a/toontown/toon/AvatarPanelBase.py b/toontown/toon/AvatarPanelBase.py index 7a2f576..e3cc958 100644 --- a/toontown/toon/AvatarPanelBase.py +++ b/toontown/toon/AvatarPanelBase.py @@ -1,10 +1,14 @@ from panda3d.core import * + from direct.gui.DirectGui import * from direct.showbase import DirectObject + from otp.avatar import AvatarPanel +from otp.distributed import CentralLogger + from toontown.toonbase import TTLocalizer from toontown.toontowngui import TTDialog -from otp.distributed import CentralLogger + IGNORE_SCALE = 0.06 STOP_IGNORE_SCALE = 0.04 diff --git a/toontown/toon/BoardingGroupInviterPanels.py b/toontown/toon/BoardingGroupInviterPanels.py index 9bc984d..7ebf04b 100644 --- a/toontown/toon/BoardingGroupInviterPanels.py +++ b/toontown/toon/BoardingGroupInviterPanels.py @@ -1,13 +1,15 @@ from panda3d.core import * -from toontown.toonbase.ToontownGlobals import * -from direct.showbase import DirectObject + from direct.directnotify import DirectNotifyGlobal -from toontown.toontowngui import TTDialog -from otp.otpbase import OTPLocalizer -from toontown.toontowngui import ToonHeadDialog from direct.gui.DirectGui import DGG -from otp.otpbase import OTPGlobals +from direct.showbase import DirectObject + +from otp.otpbase import OTPGlobals, OTPLocalizer + from toontown.toonbase import TTLocalizer +from toontown.toonbase.ToontownGlobals import * +from toontown.toontowngui import ToonHeadDialog, TTDialog + class BoardingGroupInviterPanels: notify = DirectNotifyGlobal.directNotify.newCategory('BoardingGroupInviterPanels') diff --git a/toontown/toon/DeathForceAcknowledge.py b/toontown/toon/DeathForceAcknowledge.py index 717b686..8faf95f 100644 --- a/toontown/toon/DeathForceAcknowledge.py +++ b/toontown/toon/DeathForceAcknowledge.py @@ -1,11 +1,14 @@ 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 panda3d.core import * +from direct.showbase import Transitions + +from toontown.toonbase import TTLocalizer +from toontown.toontowngui import TTDialog + from . import LaffMeter + class DeathForceAcknowledge: def __init__(self, doneEvent): diff --git a/toontown/toon/DistributedNPCBlocker.py b/toontown/toon/DistributedNPCBlocker.py index d6237c9..81f4924 100644 --- a/toontown/toon/DistributedNPCBlocker.py +++ b/toontown/toon/DistributedNPCBlocker.py @@ -1,11 +1,14 @@ from panda3d.core import * -from .DistributedNPCToonBase import * -from direct.gui.DirectGui import * -from panda3d.core import * -from . import NPCToons -from toontown.toonbase import TTLocalizer + from direct.distributed import DistributedObject +from direct.gui.DirectGui import * + from toontown.quest import QuestParser +from toontown.toonbase import TTLocalizer + +from . import NPCToons +from .DistributedNPCToonBase import * + class DistributedNPCBlocker(DistributedNPCToonBase): diff --git a/toontown/toon/DistributedNPCBlockerAI.py b/toontown/toon/DistributedNPCBlockerAI.py index a79042f..fceb61e 100644 --- a/toontown/toon/DistributedNPCBlockerAI.py +++ b/toontown/toon/DistributedNPCBlockerAI.py @@ -1,9 +1,13 @@ -from otp.ai.AIBaseGlobal import * from panda3d.core import * -from .DistributedNPCToonBaseAI import * -from . import NPCToons + from direct.task.Task import Task +from otp.ai.AIBaseGlobal import * + +from . import NPCToons +from .DistributedNPCToonBaseAI import * + + class DistributedNPCBlockerAI(DistributedNPCToonBaseAI): def __init__(self, air, npcId): diff --git a/toontown/toon/DistributedNPCClerk.py b/toontown/toon/DistributedNPCClerk.py index 39f9d9f..5e5a30f 100644 --- a/toontown/toon/DistributedNPCClerk.py +++ b/toontown/toon/DistributedNPCClerk.py @@ -1,13 +1,17 @@ from panda3d.core import * -from .DistributedNPCToonBase import * + +from direct.task.Task import Task + +from toontown.hood import ZoneUtil from toontown.minigame import ClerkPurchase from toontown.shtiker.PurchaseManagerConstants import * -from . import NPCToons -from direct.task.Task import Task from toontown.toonbase import TTLocalizer -from toontown.hood import ZoneUtil from toontown.toontowngui import TeaserPanel +from . import NPCToons +from .DistributedNPCToonBase import * + + class DistributedNPCClerk(DistributedNPCToonBase): def __init__(self, cr): diff --git a/toontown/toon/DistributedNPCClerkAI.py b/toontown/toon/DistributedNPCClerkAI.py index 39e452b..34d507e 100644 --- a/toontown/toon/DistributedNPCClerkAI.py +++ b/toontown/toon/DistributedNPCClerkAI.py @@ -1,8 +1,12 @@ -from otp.ai.AIBaseGlobal import * -from direct.task.Task import Task from panda3d.core import * + +from direct.task.Task import Task + +from otp.ai.AIBaseGlobal import * + from .DistributedNPCToonBaseAI import * + class DistributedNPCClerkAI(DistributedNPCToonBaseAI): def __init__(self, air, npcId): diff --git a/toontown/toon/DistributedNPCFisherman.py b/toontown/toon/DistributedNPCFisherman.py index 4774fc0..047be35 100644 --- a/toontown/toon/DistributedNPCFisherman.py +++ b/toontown/toon/DistributedNPCFisherman.py @@ -1,12 +1,15 @@ from panda3d.core import * -from .DistributedNPCToonBase import * + from direct.gui.DirectGui import * -from panda3d.core import * -from . import NPCToons -from toontown.toonbase import TTLocalizer -from toontown.fishing import FishSellGUI from direct.task.Task import Task +from toontown.fishing import FishSellGUI +from toontown.toonbase import TTLocalizer + +from . import NPCToons +from .DistributedNPCToonBase import * + + class DistributedNPCFisherman(DistributedNPCToonBase): def __init__(self, cr): diff --git a/toontown/toon/DistributedNPCFishermanAI.py b/toontown/toon/DistributedNPCFishermanAI.py index b1f2bd2..52b0583 100644 --- a/toontown/toon/DistributedNPCFishermanAI.py +++ b/toontown/toon/DistributedNPCFishermanAI.py @@ -1,10 +1,14 @@ -from otp.ai.AIBaseGlobal import * from panda3d.core import * -from .DistributedNPCToonBaseAI import * + +from direct.task import Task + +from otp.ai.AIBaseGlobal import * + from toontown.fishing import FishGlobals from toontown.toonbase import TTLocalizer -from toontown.fishing import FishGlobals -from direct.task import Task + +from .DistributedNPCToonBaseAI import * + class DistributedNPCFishermanAI(DistributedNPCToonBaseAI): diff --git a/toontown/toon/DistributedNPCFlippyInToonHall.py b/toontown/toon/DistributedNPCFlippyInToonHall.py index f0f83f5..938831f 100644 --- a/toontown/toon/DistributedNPCFlippyInToonHall.py +++ b/toontown/toon/DistributedNPCFlippyInToonHall.py @@ -1,6 +1,8 @@ from panda3d.core import * + from .DistributedNPCToon import * + class DistributedNPCFlippyInToonHall(DistributedNPCToon): def __init__(self, cr): diff --git a/toontown/toon/DistributedNPCFlippyInToonHallAI.py b/toontown/toon/DistributedNPCFlippyInToonHallAI.py index 9c450a0..e01557e 100644 --- a/toontown/toon/DistributedNPCFlippyInToonHallAI.py +++ b/toontown/toon/DistributedNPCFlippyInToonHallAI.py @@ -1,5 +1,6 @@ from .DistributedNPCToonAI import * + class DistributedNPCFlippyInToonHallAI(DistributedNPCToonAI): def __init__(self, air, npcId, questCallback = None, hq = 0): diff --git a/toontown/toon/DistributedNPCKartClerk.py b/toontown/toon/DistributedNPCKartClerk.py index 8786439..7453078 100644 --- a/toontown/toon/DistributedNPCKartClerk.py +++ b/toontown/toon/DistributedNPCKartClerk.py @@ -1,11 +1,15 @@ -from .DistributedNPCToonBase import * -from direct.gui.DirectGui import * from panda3d.core import * -from . import NPCToons + +from direct.gui.DirectGui import * from direct.task.Task import Task -from toontown.toonbase import TTLocalizer -from toontown.racing.KartShopGui import * + from toontown.racing.KartShopGlobals import * +from toontown.racing.KartShopGui import * +from toontown.toonbase import TTLocalizer + +from . import NPCToons +from .DistributedNPCToonBase import * + class DistributedNPCKartClerk(DistributedNPCToonBase): diff --git a/toontown/toon/DistributedNPCKartClerkAI.py b/toontown/toon/DistributedNPCKartClerkAI.py index 364fa52..dcca2d2 100644 --- a/toontown/toon/DistributedNPCKartClerkAI.py +++ b/toontown/toon/DistributedNPCKartClerkAI.py @@ -1,10 +1,15 @@ -from otp.ai.AIBaseGlobal import * from panda3d.core import * -from .DistributedNPCToonBaseAI import * -from toontown.toonbase import TTLocalizer + from direct.task import Task -from toontown.racing.KartShopGlobals import * + +from otp.ai.AIBaseGlobal import * + from toontown.racing.KartDNA import * +from toontown.racing.KartShopGlobals import * +from toontown.toonbase import TTLocalizer + +from .DistributedNPCToonBaseAI import * + class DistributedNPCKartClerkAI(DistributedNPCToonBaseAI): diff --git a/toontown/toon/DistributedNPCPartyPerson.py b/toontown/toon/DistributedNPCPartyPerson.py index a0d95cb..54dad1e 100644 --- a/toontown/toon/DistributedNPCPartyPerson.py +++ b/toontown/toon/DistributedNPCPartyPerson.py @@ -1,16 +1,19 @@ -from .DistributedNPCToonBase import DistributedNPCToonBase -from direct.distributed.DistributedObject import DistributedObject -from toontown.toon import NPCToons -from toontown.toonbase import TTLocalizer -from direct.task.Task import Task -from direct.distributed import ClockDelta from panda3d.core import Point3, Quat from panda3d.otp import CFSpeech, CFTimeout -from toontown.toontowngui import TTDialog + +from direct.distributed import ClockDelta +from direct.distributed.DistributedObject import DistributedObject +from direct.task.Task import Task + from otp.otpbase import OTPLocalizer + from toontown.parties import PartyGlobals -from toontown.toonbase import ToontownGlobals -from toontown.toontowngui import TeaserPanel +from toontown.toon import NPCToons +from toontown.toonbase import ToontownGlobals, TTLocalizer +from toontown.toontowngui import TeaserPanel, TTDialog + +from .DistributedNPCToonBase import DistributedNPCToonBase + class DistributedNPCPartyPerson(DistributedNPCToonBase): diff --git a/toontown/toon/DistributedNPCPartyPersonAI.py b/toontown/toon/DistributedNPCPartyPersonAI.py index f14de22..65ee6ae 100644 --- a/toontown/toon/DistributedNPCPartyPersonAI.py +++ b/toontown/toon/DistributedNPCPartyPersonAI.py @@ -1,10 +1,12 @@ -from .DistributedNPCToonBaseAI import DistributedNPCToonBaseAI -from toontown.toonbase import TTLocalizer -from direct.task import Task -from toontown.toonbase import ToontownGlobals -from toontown.toon import NPCToons from direct.distributed import ClockDelta +from direct.task import Task + from toontown.parties import PartyGlobals +from toontown.toon import NPCToons +from toontown.toonbase import ToontownGlobals, TTLocalizer + +from .DistributedNPCToonBaseAI import DistributedNPCToonBaseAI + class DistributedNPCPartyPersonAI(DistributedNPCToonBaseAI): diff --git a/toontown/toon/DistributedNPCPetclerk.py b/toontown/toon/DistributedNPCPetclerk.py index c4669cf..042c306 100644 --- a/toontown/toon/DistributedNPCPetclerk.py +++ b/toontown/toon/DistributedNPCPetclerk.py @@ -1,14 +1,17 @@ from panda3d.core import * -from .DistributedNPCToonBase import * + from direct.gui.DirectGui import * -from panda3d.core import * -from . import NPCToons from direct.task.Task import Task -from toontown.toonbase import TTLocalizer -from toontown.pets import PetshopGUI + from toontown.hood import ZoneUtil +from toontown.pets import PetshopGUI +from toontown.toonbase import TTLocalizer from toontown.toontowngui import TeaserPanel +from . import NPCToons +from .DistributedNPCToonBase import * + + class DistributedNPCPetclerk(DistributedNPCToonBase): def __init__(self, cr): diff --git a/toontown/toon/DistributedNPCPetclerkAI.py b/toontown/toon/DistributedNPCPetclerkAI.py index 9ff2d0a..c28e39e 100644 --- a/toontown/toon/DistributedNPCPetclerkAI.py +++ b/toontown/toon/DistributedNPCPetclerkAI.py @@ -1,10 +1,15 @@ -from otp.ai.AIBaseGlobal import * from panda3d.core import * -from .DistributedNPCToonBaseAI import * -from toontown.toonbase import TTLocalizer + from direct.task import Task + +from otp.ai.AIBaseGlobal import * + from toontown.fishing import FishGlobals -from toontown.pets import PetUtil, PetDNA, PetConstants +from toontown.pets import PetConstants, PetDNA, PetUtil +from toontown.toonbase import TTLocalizer + +from .DistributedNPCToonBaseAI import * + class DistributedNPCPetclerkAI(DistributedNPCToonBaseAI): diff --git a/toontown/toon/DistributedNPCScientist.py b/toontown/toon/DistributedNPCScientist.py index d029c50..bd3caf5 100644 --- a/toontown/toon/DistributedNPCScientist.py +++ b/toontown/toon/DistributedNPCScientist.py @@ -1,7 +1,10 @@ from panda3d.core import * -from toontown.toonbase import TTLocalizer, ToontownGlobals + +from toontown.toonbase import ToontownGlobals, TTLocalizer + from . import DistributedNPCToonBase + class DistributedNPCScientist(DistributedNPCToonBase.DistributedNPCToonBase): def __init__(self, cr): diff --git a/toontown/toon/DistributedNPCScientistAI.py b/toontown/toon/DistributedNPCScientistAI.py index 4b2fe52..f417e0e 100644 --- a/toontown/toon/DistributedNPCScientistAI.py +++ b/toontown/toon/DistributedNPCScientistAI.py @@ -1,8 +1,11 @@ -from . import DistributedNPCToonBaseAI -from toontown.toonbase import TTLocalizer, ToontownGlobals from direct.fsm import ClassicFSM, State from direct.task.Task import Task +from toontown.toonbase import ToontownGlobals, TTLocalizer + +from . import DistributedNPCToonBaseAI + + class DistributedNPCScientistAI(DistributedNPCToonBaseAI.DistributedNPCToonBaseAI): def __init__(self, air, npcId, questCallback = None, hq = 0): @@ -57,7 +60,7 @@ class DistributedNPCScientistAI(DistributedNPCToonBaseAI.DistributedNPCToonBaseA self.enterOff, self.exitOff, [])], 'Neutral', 'Off') - + if self.npcId == 2018 or self.npcId == 2019: self.startAnimState = 'ScientistJealous' elif self.npcId == 2020: diff --git a/toontown/toon/DistributedNPCSpecialQuestGiver.py b/toontown/toon/DistributedNPCSpecialQuestGiver.py index ca77b1e..ad4be26 100644 --- a/toontown/toon/DistributedNPCSpecialQuestGiver.py +++ b/toontown/toon/DistributedNPCSpecialQuestGiver.py @@ -1,11 +1,12 @@ from panda3d.core import * -from .DistributedNPCToonBase import * -from toontown.quest import QuestParser -from toontown.quest import QuestChoiceGui -from toontown.quest import TrackChoiceGui -from toontown.toonbase import TTLocalizer + from toontown.hood import ZoneUtil +from toontown.quest import QuestChoiceGui, QuestParser, TrackChoiceGui +from toontown.toonbase import TTLocalizer from toontown.toontowngui import TeaserPanel + +from .DistributedNPCToonBase import * + ChoiceTimeout = 20 class DistributedNPCSpecialQuestGiver(DistributedNPCToonBase): diff --git a/toontown/toon/DistributedNPCSpecialQuestGiverAI.py b/toontown/toon/DistributedNPCSpecialQuestGiverAI.py index 1cc67e1..72a1924 100644 --- a/toontown/toon/DistributedNPCSpecialQuestGiverAI.py +++ b/toontown/toon/DistributedNPCSpecialQuestGiverAI.py @@ -1,9 +1,14 @@ -from otp.ai.AIBaseGlobal import * -from direct.task.Task import Task from panda3d.core import * -from .DistributedNPCToonBaseAI import * + +from direct.task.Task import Task + +from otp.ai.AIBaseGlobal import * + from toontown.quest import Quests +from .DistributedNPCToonBaseAI import * + + class DistributedNPCSpecialQuestGiverAI(DistributedNPCToonBaseAI): def __init__(self, air, npcId, questCallback = None, hq = 0): diff --git a/toontown/toon/DistributedNPCTailor.py b/toontown/toon/DistributedNPCTailor.py index 85b0546..2dba419 100644 --- a/toontown/toon/DistributedNPCTailor.py +++ b/toontown/toon/DistributedNPCTailor.py @@ -1,13 +1,14 @@ from panda3d.core import * -from .DistributedNPCToonBase import * + from direct.gui.DirectGui import * -from panda3d.core import * -from . import NPCToons from direct.task.Task import Task -from . import TailorClothesGUI -from toontown.toonbase import TTLocalizer -from . import ToonDNA + from toontown.estate import ClosetGlobals +from toontown.toonbase import TTLocalizer + +from . import NPCToons, TailorClothesGUI, ToonDNA +from .DistributedNPCToonBase import * + class DistributedNPCTailor(DistributedNPCToonBase): diff --git a/toontown/toon/DistributedNPCTailorAI.py b/toontown/toon/DistributedNPCTailorAI.py index c5b39f7..5f97bda 100644 --- a/toontown/toon/DistributedNPCTailorAI.py +++ b/toontown/toon/DistributedNPCTailorAI.py @@ -1,11 +1,16 @@ -from otp.ai.AIBaseGlobal import * from panda3d.core import * -from .DistributedNPCToonBaseAI import * -from . import ToonDNA + from direct.task.Task import Task + +from otp.ai.AIBaseGlobal import * + from toontown.ai import DatabaseObject from toontown.estate import ClosetGlobals +from . import ToonDNA +from .DistributedNPCToonBaseAI import * + + class DistributedNPCTailorAI(DistributedNPCToonBaseAI): freeClothes = simbase.config.GetBool('free-clothes', 0) housingEnabled = simbase.config.GetBool('want-housing', 1) diff --git a/toontown/toon/DistributedNPCToon.py b/toontown/toon/DistributedNPCToon.py index 8ddc61e..6001f0d 100644 --- a/toontown/toon/DistributedNPCToon.py +++ b/toontown/toon/DistributedNPCToon.py @@ -1,11 +1,12 @@ from panda3d.core import * -from .DistributedNPCToonBase import * -from toontown.quest import QuestParser -from toontown.quest import QuestChoiceGui -from toontown.quest import TrackChoiceGui -from toontown.toonbase import TTLocalizer + from toontown.hood import ZoneUtil +from toontown.quest import QuestChoiceGui, QuestParser, TrackChoiceGui +from toontown.toonbase import TTLocalizer from toontown.toontowngui import TeaserPanel + +from .DistributedNPCToonBase import * + ChoiceTimeout = 20 class DistributedNPCToon(DistributedNPCToonBase): diff --git a/toontown/toon/DistributedNPCToonAI.py b/toontown/toon/DistributedNPCToonAI.py index 44a8ecd..3176c88 100644 --- a/toontown/toon/DistributedNPCToonAI.py +++ b/toontown/toon/DistributedNPCToonAI.py @@ -1,9 +1,14 @@ -from otp.ai.AIBaseGlobal import * -from direct.task.Task import Task from panda3d.core import * -from .DistributedNPCToonBaseAI import * + +from direct.task.Task import Task + +from otp.ai.AIBaseGlobal import * + from toontown.quest import Quests +from .DistributedNPCToonBaseAI import * + + class DistributedNPCToonAI(DistributedNPCToonBaseAI): FourthGagVelvetRopeBan = config.GetBool('want-ban-fourth-gag-velvet-rope', 0) diff --git a/toontown/toon/DistributedNPCToonBase.py b/toontown/toon/DistributedNPCToonBase.py index b3b687c..dcd946a 100644 --- a/toontown/toon/DistributedNPCToonBase.py +++ b/toontown/toon/DistributedNPCToonBase.py @@ -1,18 +1,18 @@ +import random + from panda3d.core import * from panda3d.otp import * + from direct.directnotify import DirectNotifyGlobal -from direct.fsm import ClassicFSM -from direct.fsm import State -from toontown.toonbase import ToontownGlobals -from . import DistributedToon -from direct.distributed import DistributedObject -from . import NPCToons -from toontown.quest import Quests -from direct.distributed import ClockDelta -from toontown.quest import QuestParser -from toontown.quest import QuestChoiceGui +from direct.distributed import ClockDelta, DistributedObject +from direct.fsm import ClassicFSM, State from direct.interval.IntervalGlobal import * -import random + +from toontown.quest import QuestChoiceGui, QuestParser, Quests +from toontown.toonbase import ToontownGlobals + +from . import DistributedToon, NPCToons + class DistributedNPCToonBase(DistributedToon.DistributedToon): diff --git a/toontown/toon/DistributedNPCToonBaseAI.py b/toontown/toon/DistributedNPCToonBaseAI.py index 8ac54cf..cddd420 100644 --- a/toontown/toon/DistributedNPCToonBaseAI.py +++ b/toontown/toon/DistributedNPCToonBaseAI.py @@ -1,13 +1,16 @@ -from otp.ai.AIBaseGlobal import * from panda3d.core import * -from . import DistributedToonAI -from direct.fsm import ClassicFSM -from direct.fsm import State + from direct.distributed import ClockDelta -from toontown.toonbase import ToontownGlobals -from . import NPCToons +from direct.fsm import ClassicFSM, State from direct.task import Task + +from otp.ai.AIBaseGlobal import * + from toontown.quest import Quests +from toontown.toonbase import ToontownGlobals + +from . import DistributedToonAI, NPCToons + class DistributedNPCToonBaseAI(DistributedToonAI.DistributedToonAI): diff --git a/toontown/toon/DistributedToon.py b/toontown/toon/DistributedToon.py index 3a52f75..38eeb67 100644 --- a/toontown/toon/DistributedToon.py +++ b/toontown/toon/DistributedToon.py @@ -1,59 +1,51 @@ +import copy +import operator +import random +import time + from panda3d.core import * from panda3d.otp import * -from toontown.toonbase.ToontownGlobals import * -from direct.distributed.ClockDelta import * -from direct.interval.IntervalGlobal import * -from otp.otpbase import OTPGlobals -from toontown.toonbase import ToontownGlobals + from direct.directnotify import DirectNotifyGlobal -from otp.avatar import DistributedPlayer -from otp.avatar import Avatar, DistributedAvatar -from otp.speedchat import SCDecoders -from otp.chat import TalkAssistant -from . import Toon -from direct.task.Task import Task -from direct.distributed import DistributedSmoothNode -from direct.distributed import DistributedObject +from direct.distributed import DistributedObject, DistributedSmoothNode +from direct.distributed.ClockDelta import * +from direct.distributed.MsgTypes import * from direct.fsm import ClassicFSM -from toontown.hood import ZoneUtil +from direct.interval.IntervalGlobal import * +from direct.interval.IntervalGlobal import Func, Parallel, Sequence, SoundInterval, Wait +from direct.showbase import PythonUtil +from direct.task.Task import Task + +from otp.avatar import Avatar, DistributedAvatar, DistributedPlayer +from otp.chat import TalkAssistant +from otp.otpbase import OTPGlobals, OTPLocalizer +from otp.speedchat import SCDecoders + +from toontown.catalog import CatalogItem, CatalogItemList +from toontown.chat import ResistanceChat, ToonChatGarbler +from toontown.coghq import CogDisguiseGlobals from toontown.distributed import DelayDelete from toontown.distributed.DelayDeletable import DelayDeletable -from direct.showbase import PythonUtil -from toontown.catalog import CatalogItemList -from toontown.catalog import CatalogItem -from . import TTEmote -from toontown.shtiker.OptionsPage import speedChatStyles -from toontown.fishing import FishCollection -from toontown.fishing import FishTank -from toontown.suit import SuitDNA -from toontown.coghq import CogDisguiseGlobals -from toontown.toonbase import TTLocalizer -from . import Experience -from . import InventoryNew -from toontown.speedchat import TTSCDecoders -from toontown.chat import ToonChatGarbler -from toontown.chat import ResistanceChat -from direct.distributed.MsgTypes import * from toontown.effects.ScavengerHuntEffects import * -from toontown.estate import FlowerCollection -from toontown.estate import FlowerBasket -from toontown.estate import GardenGlobals -from toontown.estate import DistributedGagTree +from toontown.estate import DistributedGagTree, FlowerBasket, FlowerCollection, GardenGlobals +from toontown.fishing import FishCollection, FishTank +from toontown.friends import FriendHandle from toontown.golf import GolfGlobals +from toontown.hood import ZoneUtil +from toontown.parties import PartyGlobals +from toontown.parties.InviteInfo import InviteInfo from toontown.parties.PartyGlobals import InviteStatus, PartyStatus from toontown.parties.PartyInfo import PartyInfo -from toontown.parties.InviteInfo import InviteInfo from toontown.parties.PartyReplyInfo import PartyReplyInfoBase from toontown.parties.SimpleMailBase import SimpleMailBase -from toontown.parties import PartyGlobals -from toontown.friends import FriendHandle -import time -import operator -from direct.interval.IntervalGlobal import Sequence, Wait, Func, Parallel, SoundInterval -from toontown.distributed import DelayDelete -from otp.otpbase import OTPLocalizer -import random -import copy +from toontown.shtiker.OptionsPage import speedChatStyles +from toontown.speedchat import TTSCDecoders +from toontown.suit import SuitDNA +from toontown.toonbase import ToontownGlobals, TTLocalizer +from toontown.toonbase.ToontownGlobals import * + +from . import Experience, InventoryNew, Toon, TTEmote + if base.wantKarts: from toontown.racing.KartDNA import * if (__debug__): @@ -2591,4 +2583,4 @@ class DistributedToon(DistributedPlayer.DistributedPlayer, Toon.Toon, Distribute return self.transitioning def toggleSleep(self): - base.localAvatar.noSleep = not base.localAvatar.noSleep \ No newline at end of file + base.localAvatar.noSleep = not base.localAvatar.noSleep diff --git a/toontown/toon/DistributedToonAI.py b/toontown/toon/DistributedToonAI.py index b5489fe..4d38e95 100644 --- a/toontown/toon/DistributedToonAI.py +++ b/toontown/toon/DistributedToonAI.py @@ -1,51 +1,44 @@ -from otp.ai.AIBaseGlobal import * -from panda3d.core import * -from otp.otpbase import OTPGlobals -from direct.directnotify import DirectNotifyGlobal -from . import ToonDNA -from toontown.suit import SuitDNA -from . import InventoryBase -from . import Experience -from otp.avatar import DistributedAvatarAI -from otp.avatar import DistributedPlayerAI -from direct.distributed import DistributedSmoothNodeAI -from toontown.toonbase import ToontownGlobals -from toontown.quest import QuestRewardCounter -from toontown.quest import Quests -from toontown.toonbase import ToontownBattleGlobals -from toontown.battle import SuitBattleGlobals -from direct.task import Task -from toontown.catalog import CatalogItemList -from toontown.catalog import CatalogItem -from direct.showbase import PythonUtil -from direct.distributed.ClockDelta import * -from toontown.toonbase.ToontownGlobals import * -import types -from toontown.fishing import FishGlobals -from toontown.fishing import FishCollection -from toontown.fishing import FishTank -from .NPCToons import npcFriends, isZoneProtected -from toontown.coghq import CogDisguiseGlobals import random import re -from toontown.chat import ResistanceChat -from toontown.racing import RaceGlobals -from toontown.hood import ZoneUtil -from toontown.toon import NPCToons -from toontown.estate import FlowerCollection -from toontown.estate import FlowerBasket -from toontown.estate import GardenGlobals -from toontown.golf import GolfGlobals -from toontown.parties import PartyGlobals -from toontown.parties.PartyInfo import PartyInfoAI -from toontown.parties.InviteInfo import InviteInfoBase -from toontown.parties.PartyReplyInfo import PartyReplyInfoBase -from toontown.parties.PartyGlobals import InviteStatus -from toontown.toonbase import ToontownAccessAI -from toontown.toonbase import TTLocalizer -from toontown.catalog import CatalogAccessoryItem -from toontown.minigame import MinigameCreatorAI +import types from functools import reduce + +from panda3d.core import * + +from direct.directnotify import DirectNotifyGlobal +from direct.distributed import DistributedSmoothNodeAI +from direct.distributed.ClockDelta import * +from direct.showbase import PythonUtil +from direct.task import Task + +from otp.ai.AIBaseGlobal import * +from otp.avatar import DistributedAvatarAI, DistributedPlayerAI +from otp.otpbase import OTPGlobals + +from toontown.battle import SuitBattleGlobals +from toontown.catalog import CatalogAccessoryItem, CatalogItem, CatalogItemList +from toontown.chat import ResistanceChat +from toontown.coghq import CogDisguiseGlobals +from toontown.estate import FlowerBasket, FlowerCollection, GardenGlobals +from toontown.fishing import FishCollection, FishGlobals, FishTank +from toontown.golf import GolfGlobals +from toontown.hood import ZoneUtil +from toontown.minigame import MinigameCreatorAI +from toontown.parties import PartyGlobals +from toontown.parties.InviteInfo import InviteInfoBase +from toontown.parties.PartyGlobals import InviteStatus +from toontown.parties.PartyInfo import PartyInfoAI +from toontown.parties.PartyReplyInfo import PartyReplyInfoBase +from toontown.quest import QuestRewardCounter, Quests +from toontown.racing import RaceGlobals +from toontown.suit import SuitDNA +from toontown.toon import NPCToons +from toontown.toonbase import ToontownAccessAI, ToontownBattleGlobals, ToontownGlobals, TTLocalizer +from toontown.toonbase.ToontownGlobals import * + +from . import Experience, InventoryBase, ToonDNA +from .NPCToons import isZoneProtected, npcFriends + if simbase.wantPets: from toontown.pets import PetLookerAI, PetObserve else: diff --git a/toontown/toon/DistributedToonUD.py b/toontown/toon/DistributedToonUD.py index be8e8e3..19d8847 100644 --- a/toontown/toon/DistributedToonUD.py +++ b/toontown/toon/DistributedToonUD.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectUD import DistributedObjectUD + class DistributedToonUD(DistributedObjectUD): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedToonUD') diff --git a/toontown/toon/ElevatorNotifier.py b/toontown/toon/ElevatorNotifier.py index dcc2739..37cfe64 100644 --- a/toontown/toon/ElevatorNotifier.py +++ b/toontown/toon/ElevatorNotifier.py @@ -1,10 +1,12 @@ -from direct.directnotify import DirectNotifyGlobal -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import TTLocalizer -from direct.gui.DirectGui import * from panda3d.core import * + +from direct.directnotify import DirectNotifyGlobal +from direct.gui.DirectGui import * + +from toontown.toonbase import ToontownGlobals, TTLocalizer from toontown.toontowngui import TTDialog + class ElevatorNotifier: notify = DirectNotifyGlobal.directNotify.newCategory('CatalogNotifyDialog') diff --git a/toontown/toon/Experience.py b/toontown/toon/Experience.py index a867b11..a0d8fdf 100644 --- a/toontown/toon/Experience.py +++ b/toontown/toon/Experience.py @@ -1,10 +1,14 @@ from panda3d.core import * -from toontown.toonbase.ToontownBattleGlobals import * + from direct.directnotify import DirectNotifyGlobal from direct.distributed.PyDatagram import PyDatagram from direct.distributed.PyDatagramIterator import PyDatagramIterator + from otp.otpbase import OTPGlobals +from toontown.toonbase.ToontownBattleGlobals import * + + class Experience: notify = DirectNotifyGlobal.directNotify.newCategory('Experience') diff --git a/toontown/toon/GroupInvitee.py b/toontown/toon/GroupInvitee.py index e9697b2..063ec3f 100644 --- a/toontown/toon/GroupInvitee.py +++ b/toontown/toon/GroupInvitee.py @@ -1,13 +1,15 @@ from panda3d.core import * -from toontown.toonbase.ToontownGlobals import * -from direct.showbase import DirectObject + from direct.directnotify import DirectNotifyGlobal -from toontown.toontowngui import TTDialog -from otp.otpbase import OTPLocalizer -from toontown.toontowngui import ToonHeadDialog from direct.gui.DirectGui import DGG -from otp.otpbase import OTPGlobals +from direct.showbase import DirectObject + +from otp.otpbase import OTPGlobals, OTPLocalizer + from toontown.toonbase import TTLocalizer +from toontown.toonbase.ToontownGlobals import * +from toontown.toontowngui import ToonHeadDialog, TTDialog + class GroupInvitee(ToonHeadDialog.ToonHeadDialog): notify = DirectNotifyGlobal.directNotify.newCategory('GroupInvitee') diff --git a/toontown/toon/GroupPanel.py b/toontown/toon/GroupPanel.py index ed1fb2e..904571f 100644 --- a/toontown/toon/GroupPanel.py +++ b/toontown/toon/GroupPanel.py @@ -1,12 +1,14 @@ -from direct.directnotify import DirectNotifyGlobal -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import TTLocalizer -from direct.gui.DirectGui import * from panda3d.core import * + +from direct.directnotify import DirectNotifyGlobal +from direct.gui.DirectGui import * from direct.showbase import DirectObject + from toontown.toon import ToonAvatarPanel +from toontown.toonbase import ToontownGlobals, TTLocalizer from toontown.toontowngui import TTDialog + class GroupPanel(DirectObject.DirectObject): notify = DirectNotifyGlobal.directNotify.newCategory('GroupPanel') diff --git a/toontown/toon/HealthForceAcknowledge.py b/toontown/toon/HealthForceAcknowledge.py index dd9c8dc..677f673 100644 --- a/toontown/toon/HealthForceAcknowledge.py +++ b/toontown/toon/HealthForceAcknowledge.py @@ -1,6 +1,8 @@ from panda3d.core import * -from toontown.toontowngui import TTDialog + from toontown.toonbase import TTLocalizer +from toontown.toontowngui import TTDialog + class HealthForceAcknowledge: diff --git a/toontown/toon/InventoryBase.py b/toontown/toon/InventoryBase.py index f4af9c7..078c08f 100644 --- a/toontown/toon/InventoryBase.py +++ b/toontown/toon/InventoryBase.py @@ -1,10 +1,13 @@ from panda3d.core import * -from toontown.toonbase import ToontownGlobals -from toontown.toonbase.ToontownBattleGlobals import * -from direct.showbase import DirectObject + from direct.directnotify import DirectNotifyGlobal from direct.distributed.PyDatagram import PyDatagram from direct.distributed.PyDatagramIterator import PyDatagramIterator +from direct.showbase import DirectObject + +from toontown.toonbase import ToontownGlobals +from toontown.toonbase.ToontownBattleGlobals import * + class InventoryBase(DirectObject.DirectObject): notify = DirectNotifyGlobal.directNotify.newCategory('InventoryBase') diff --git a/toontown/toon/InventoryNew.py b/toontown/toon/InventoryNew.py index e3fe6a9..6d4a3b4 100644 --- a/toontown/toon/InventoryNew.py +++ b/toontown/toon/InventoryNew.py @@ -1,14 +1,18 @@ -from direct.gui.DirectGui import * from panda3d.core import * -from toontown.toonbase.ToontownBattleGlobals import * -from . import InventoryBase -from toontown.toonbase import TTLocalizer -from toontown.quest import BlinkingArrows -from direct.interval.IntervalGlobal import * + from direct.directnotify import DirectNotifyGlobal -from toontown.toonbase import ToontownGlobals +from direct.gui.DirectGui import * +from direct.interval.IntervalGlobal import * + from otp.otpbase import OTPGlobals +from toontown.quest import BlinkingArrows +from toontown.toonbase import ToontownGlobals, TTLocalizer +from toontown.toonbase.ToontownBattleGlobals import * + +from . import InventoryBase + + class InventoryNew(InventoryBase.InventoryBase, DirectFrame): notify = DirectNotifyGlobal.directNotify.newCategory('InventoryNew') PressableTextColor = Vec4(1, 1, 1, 1) diff --git a/toontown/toon/LaffMeter.py b/toontown/toon/LaffMeter.py index a5cf585..d1d5b98 100644 --- a/toontown/toon/LaffMeter.py +++ b/toontown/toon/LaffMeter.py @@ -1,7 +1,9 @@ from panda3d.core import Vec4 + from direct.gui.DirectGui import DirectFrame, DirectLabel -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import ToontownIntervals + +from toontown.toonbase import ToontownGlobals, ToontownIntervals + class LaffMeter(DirectFrame): deathColor = Vec4(0.58039216, 0.80392157, 0.34117647, 1.0) diff --git a/toontown/toon/LocalToon.py b/toontown/toon/LocalToon.py index 86f1f5a..4d7e4b4 100644 --- a/toontown/toon/LocalToon.py +++ b/toontown/toon/LocalToon.py @@ -1,61 +1,45 @@ -import random import math -import time +import random import re +import time import zlib -from direct.interval.IntervalGlobal import * -from direct.distributed.ClockDelta import * -from direct.showbase.PythonUtil import * -from direct.gui.DirectGui import * -from direct.task import Task -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 direct.directnotify import DirectNotifyGlobal +from direct.distributed.ClockDelta import * +from direct.gui import DirectGuiGlobals +from direct.gui.DirectGui import * +from direct.interval.IntervalGlobal import * +from direct.showbase import PythonUtil +from direct.showbase.PythonUtil import * +from direct.task import Task + +from otp.avatar import DistributedPlayer, LocalAvatar, PositionExaminer from otp.login import LeaveToPayDialog -from otp.avatar import PositionExaminer from otp.otpbase import OTPGlobals -from otp.avatar import DistributedPlayer -from toontown.shtiker import ShtikerBook -from toontown.shtiker import InventoryPage -from toontown.shtiker import MapPage -from toontown.shtiker import OptionsPage -from toontown.shtiker import ShardPage -from toontown.shtiker import QuestPage -from toontown.shtiker import TrackPage -from toontown.shtiker import KartPage -from toontown.shtiker import GardenPage -from toontown.shtiker import GolfPage -from toontown.shtiker import SuitPage -from toontown.shtiker import DisguisePage -from toontown.shtiker import PhotoAlbumPage -from toontown.shtiker import FishPage -from toontown.shtiker import NPCFriendPage -from toontown.shtiker import EventsPage -from toontown.shtiker import TIPPage -from toontown.quest import Quests -from toontown.quest import QuestParser -from toontown.toonbase.ToontownGlobals import * -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import TTLocalizer -from toontown.catalog import CatalogNotifyDialog -from toontown.chat import ToontownChatManager -from toontown.chat import TTTalkAssistant -from toontown.estate import GardenGlobals -from toontown.battle.BattleSounds import * + from toontown.battle import Fanfare +from toontown.battle.BattleSounds import * +from toontown.catalog import CatalogNotifyDialog +from toontown.chat import ToontownChatManager, TTTalkAssistant +from toontown.estate import GardenGlobals from toontown.parties import PartyGlobals -from toontown.toon import ElevatorNotifier -from toontown.toon import ToonDNA -from . import DistributedToon -from . import Toon -from . import LaffMeter -from toontown.quest import QuestMap +from toontown.quest import QuestMap, QuestParser, Quests +from toontown.shtiker import (DisguisePage, EventsPage, FishPage, GardenPage, GolfPage, InventoryPage, KartPage, + MapPage, NPCFriendPage, OptionsPage, PhotoAlbumPage, QuestPage, ShardPage, ShtikerBook, + SuitPage, TIPPage, TrackPage) +from toontown.toon import ElevatorNotifier, ToonDNA from toontown.toon.DistributedNPCToonBase import DistributedNPCToonBase +from toontown.toonbase import ToontownGlobals, TTLocalizer +from toontown.toonbase.ToontownGlobals import * + +from . import DistributedToon, LaffMeter, Toon + WantNewsPage = base.config.GetBool('want-news-page', ToontownGlobals.DefaultWantNewsPageSetting) from toontown.toontowngui import NewsPageButtonManager + if WantNewsPage: from toontown.shtiker import NewsPage AdjustmentForNewsButton = -0.275 @@ -659,8 +643,9 @@ class LocalToon(DistributedToon.DistributedToon, LocalAvatar.LocalAvatar): return def localPresentPie(self, time): - from . import TTEmote from otp.avatar import Emote + + from . import TTEmote self.__stopPresentPie() if self.tossTrack: tossTrack = self.tossTrack @@ -695,8 +680,9 @@ class LocalToon(DistributedToon.DistributedToon, LocalAvatar.LocalAvatar): def __stopPresentPie(self): if self.__presentingPie: - from . import TTEmote from otp.avatar import Emote + + from . import TTEmote Emote.globalEmote.releaseBody(self) messenger.send('end-pie') self.__presentingPie = 0 @@ -836,7 +822,7 @@ class LocalToon(DistributedToon.DistributedToon, LocalAvatar.LocalAvatar): self.updatePieButton() def makePiePowerMeter(self): - from direct.gui.DirectGui import DirectWaitBar, DGG + from direct.gui.DirectGui import DGG, DirectWaitBar if self.__piePowerMeter == None: self.__piePowerMeter = DirectWaitBar(frameSize=(-0.2, 0.2, @@ -846,8 +832,9 @@ class LocalToon(DistributedToon.DistributedToon, LocalAvatar.LocalAvatar): return def updatePieButton(self): + from direct.gui.DirectGui import DGG, DirectButton + from toontown.toonbase import ToontownBattleGlobals - from direct.gui.DirectGui import DirectButton, DGG wantButton = 0 if self.allowPies and self.numPies > 0: wantButton = 1 diff --git a/toontown/toon/Motion.py b/toontown/toon/Motion.py index ff3dc84..f0e92da 100644 --- a/toontown/toon/Motion.py +++ b/toontown/toon/Motion.py @@ -1,11 +1,13 @@ -from direct.fsm import StateData -from toontown.toonbase import ToontownGlobals from direct.directnotify import DirectNotifyGlobal -from direct.fsm import ClassicFSM, State -from direct.fsm import State -from . import TTEmote +from direct.fsm import ClassicFSM, State, StateData + from otp.avatar import Emote +from toontown.toonbase import ToontownGlobals + +from . import TTEmote + + class Motion(StateData.StateData): notify = DirectNotifyGlobal.directNotify.newCategory('Motion') diff --git a/toontown/toon/NPCForceAcknowledge.py b/toontown/toon/NPCForceAcknowledge.py index 3d5e8f8..f2d8c5b 100644 --- a/toontown/toon/NPCForceAcknowledge.py +++ b/toontown/toon/NPCForceAcknowledge.py @@ -1,8 +1,11 @@ from panda3d.core import * -from toontown.toontowngui import TTDialog -from toontown.toonbase import TTLocalizer + from direct.gui import DirectLabel + from toontown.quest import Quests +from toontown.toonbase import TTLocalizer +from toontown.toontowngui import TTDialog + class NPCForceAcknowledge: diff --git a/toontown/toon/NPCFriendPanel.py b/toontown/toon/NPCFriendPanel.py index f527f60..3595eac 100644 --- a/toontown/toon/NPCFriendPanel.py +++ b/toontown/toon/NPCFriendPanel.py @@ -1,12 +1,12 @@ -from direct.gui.DirectGui import * -from direct.directnotify import DirectNotifyGlobal from panda3d.core import * -from . import NPCToons -from . import ToonHead -from . import ToonDNA -from toontown.toonbase import TTLocalizer -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import ToontownBattleGlobals + +from direct.directnotify import DirectNotifyGlobal +from direct.gui.DirectGui import * + +from toontown.toonbase import ToontownBattleGlobals, ToontownGlobals, TTLocalizer + +from . import NPCToons, ToonDNA, ToonHead + class NPCFriendPanel(DirectFrame): notify = DirectNotifyGlobal.directNotify.newCategory('NPCFriendPanel') diff --git a/toontown/toon/NPCToons.py b/toontown/toon/NPCToons.py index 5b9030f..83da476 100644 --- a/toontown/toon/NPCToons.py +++ b/toontown/toon/NPCToons.py @@ -1,11 +1,13 @@ +import os + from panda3d.core import * from panda3d.otp import * -from toontown.toonbase import ToontownGlobals + from toontown.hood import ZoneUtil +from toontown.toonbase import ToontownBattleGlobals, ToontownGlobals, TTLocalizer + from . import ToonDNA -from toontown.toonbase import TTLocalizer -from toontown.toonbase import ToontownBattleGlobals -import os + QUEST_MOVIE_CLEAR = 0 QUEST_MOVIE_REJECT = 1 QUEST_MOVIE_COMPLETE = 2 @@ -70,17 +72,10 @@ def getRandomDNA(seed, gender): def createNPC(air, npcId, desc, zoneId, posIndex = 0, questCallback = None): - from . import DistributedNPCToonAI - from . import DistributedNPCClerkAI - from . import DistributedNPCTailorAI - from . import DistributedNPCBlockerAI - from . import DistributedNPCFishermanAI - from . import DistributedNPCPetclerkAI - from . import DistributedNPCKartClerkAI - from . import DistributedNPCPartyPersonAI - from . import DistributedNPCSpecialQuestGiverAI - from . import DistributedNPCFlippyInToonHallAI - from . import DistributedNPCScientistAI + from . import (DistributedNPCBlockerAI, DistributedNPCClerkAI, DistributedNPCFishermanAI, + DistributedNPCFlippyInToonHallAI, DistributedNPCKartClerkAI, DistributedNPCPartyPersonAI, + DistributedNPCPetclerkAI, DistributedNPCScientistAI, DistributedNPCSpecialQuestGiverAI, + DistributedNPCTailorAI, DistributedNPCToonAI) canonicalZoneId, name, dnaType, gender, protected, type = desc if type == NPC_REGULAR: npc = DistributedNPCToonAI.DistributedNPCToonAI(air, npcId, questCallback=questCallback) diff --git a/toontown/toon/PlayerDetailPanel.py b/toontown/toon/PlayerDetailPanel.py index a4eb669..38fc721 100644 --- a/toontown/toon/PlayerDetailPanel.py +++ b/toontown/toon/PlayerDetailPanel.py @@ -1,17 +1,18 @@ from panda3d.core import * -from toontown.toonbase.ToontownGlobals import * -from direct.gui.DirectGui import * -from panda3d.core import * -from direct.showbase import DirectObject -from direct.fsm import ClassicFSM, State -from direct.fsm import State + from direct.directnotify import DirectNotifyGlobal -from . import DistributedToon +from direct.fsm import ClassicFSM, State +from direct.gui.DirectGui import * +from direct.showbase import DirectObject + from toontown.friends import FriendInviter -from . import ToonTeleportPanel -from toontown.toonbase import TTLocalizer from toontown.hood import ZoneUtil -from toontown.toonbase.ToontownBattleGlobals import Tracks, Levels +from toontown.toonbase import TTLocalizer +from toontown.toonbase.ToontownBattleGlobals import Levels, Tracks +from toontown.toonbase.ToontownGlobals import * + +from . import DistributedToon, ToonTeleportPanel + globalAvatarDetail = None def showPlayerDetail(avId, avName, playerId = None): diff --git a/toontown/toon/PlayerInfoPanel.py b/toontown/toon/PlayerInfoPanel.py index 739c964..df0ae70 100644 --- a/toontown/toon/PlayerInfoPanel.py +++ b/toontown/toon/PlayerInfoPanel.py @@ -1,18 +1,18 @@ from panda3d.core import * -from direct.gui.DirectGui import * -from panda3d.core import * -from direct.showbase import DirectObject -from toontown.friends import FriendHandle -from otp.avatar import Avatar -from direct.distributed import DistributedObject + from direct.directnotify import DirectNotifyGlobal -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import TTLocalizer -from toontown.friends import ToontownFriendSecret -from . import ToonAvatarDetailPanel -from . import AvatarPanelBase -from . import PlayerDetailPanel +from direct.distributed import DistributedObject +from direct.gui.DirectGui import * +from direct.showbase import DirectObject + +from otp.avatar import Avatar from otp.otpbase import OTPGlobals + +from toontown.friends import FriendHandle, ToontownFriendSecret +from toontown.toonbase import ToontownGlobals, TTLocalizer + +from . import AvatarPanelBase, PlayerDetailPanel, ToonAvatarDetailPanel + GAME_LOGO_NAMES = {'Default': 'GameLogo_Unknown', 'Disney XD': 'GameLogo_XD', 'Toontown': 'GameLogo_Toontown', diff --git a/toontown/toon/TTEmote.py b/toontown/toon/TTEmote.py index e08809f..6dcd832 100644 --- a/toontown/toon/TTEmote.py +++ b/toontown/toon/TTEmote.py @@ -1,13 +1,17 @@ -from . import Toon, ToonDNA -from direct.interval.IntervalGlobal import * -from otp.otpbase import OTPLocalizer -from toontown.toonbase import TTLocalizer -from otp.otpbase import OTPLocalizer -from direct.showbase import PythonUtil from panda3d.core import * from panda3d.otp import * -from otp.avatar import Emote + from direct.directnotify import DirectNotifyGlobal +from direct.interval.IntervalGlobal import * +from direct.showbase import PythonUtil + +from otp.avatar import Emote +from otp.otpbase import OTPLocalizer + +from toontown.toonbase import TTLocalizer + +from . import Toon, ToonDNA + EmoteSleepIndex = 4 EmoteClear = -1 diff --git a/toontown/toon/TailorClothesGUI.py b/toontown/toon/TailorClothesGUI.py index 9e02a62..7ace8e4 100644 --- a/toontown/toon/TailorClothesGUI.py +++ b/toontown/toon/TailorClothesGUI.py @@ -1,6 +1,8 @@ from toontown.makeatoon import ClothesGUI + from . import ToonDNA + class TailorClothesGUI(ClothesGUI.ClothesGUI): notify = directNotify.newCategory('MakeClothesGUI') diff --git a/toontown/toon/Toon.py b/toontown/toon/Toon.py index 75b616b..b182035 100644 --- a/toontown/toon/Toon.py +++ b/toontown/toon/Toon.py @@ -1,29 +1,29 @@ -from otp.avatar import Avatar -from otp.avatar.Avatar import teleportNotify -from . import ToonDNA -from direct.task.Task import Task -from toontown.suit import SuitDNA -from direct.actor import Actor -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 toontown.toonbase import TTLocalizer -from toontown.effects import Wake -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 toontown.distributed import DelayDelete -from . import AccessoryGlobals -import importlib import functools +import importlib + +from panda3d.core import * +from panda3d.direct import HideInterval, ShowInterval +from panda3d.otp import * + +from direct.actor import Actor +from direct.directnotify import DirectNotifyGlobal +from direct.interval.IntervalGlobal import * +from direct.task.Task import Task + +from otp.avatar import Avatar, Emote +from otp.avatar.Avatar import teleportNotify +from otp.otpbase import OTPGlobals, OTPLocalizer + +from toontown.battle import SuitBattleGlobals +from toontown.distributed import DelayDelete +from toontown.effects import DustCloud, Wake +from toontown.hood import ZoneUtil +from toontown.suit import SuitDNA +from toontown.toonbase import ToontownGlobals, TTLocalizer + +from . import AccessoryGlobals, Motion, ToonDNA +from .ToonHead import * + def teleportDebug(requestStatus, msg, onlyIfToAv = True): if teleportNotify.getDebug(): @@ -2844,8 +2844,8 @@ class Toon(Avatar.Avatar, ToonHead): self.suit.makeWaiter(self.suitGeom) def getPieModel(self): - from toontown.toonbase import ToontownBattleGlobals from toontown.battle import BattleProps + from toontown.toonbase import ToontownBattleGlobals if self.pieModel != None and self.__pieModelType != self.pieType: self.pieModel.detachNode() self.pieModel = None @@ -2857,9 +2857,8 @@ class Toon(Avatar.Avatar, ToonHead): return self.pieModel def getPresentPieInterval(self, x, y, z, h, p, r): + from toontown.battle import BattleProps, MovieUtil from toontown.toonbase import ToontownBattleGlobals - from toontown.battle import BattleProps - from toontown.battle import MovieUtil pie = self.getPieModel() pieName = ToontownBattleGlobals.pieNames[self.pieType] pieType = BattleProps.globalPropPool.getPropType(pieName) @@ -2872,8 +2871,8 @@ class Toon(Avatar.Avatar, ToonHead): return track def getTossPieInterval(self, x, y, z, h, p, r, power, beginFlyIval = Sequence()): - from toontown.toonbase import ToontownBattleGlobals from toontown.battle import BattleProps + from toontown.toonbase import ToontownBattleGlobals pie = self.getPieModel() flyPie = pie.copyTo(NodePath('a')) pieName = ToontownBattleGlobals.pieNames[self.pieType] @@ -2896,8 +2895,8 @@ class Toon(Avatar.Avatar, ToonHead): return (toss, fly, flyPie) def getPieSplatInterval(self, x, y, z, pieCode): - from toontown.toonbase import ToontownBattleGlobals from toontown.battle import BattleProps + from toontown.toonbase import ToontownBattleGlobals pieName = ToontownBattleGlobals.pieNames[self.pieType] splatName = 'splat-%s' % pieName if pieName == 'lawbook': diff --git a/toontown/toon/ToonAvatarDetailPanel.py b/toontown/toon/ToonAvatarDetailPanel.py index e9b8365..d8e493a 100644 --- a/toontown/toon/ToonAvatarDetailPanel.py +++ b/toontown/toon/ToonAvatarDetailPanel.py @@ -1,17 +1,18 @@ from panda3d.core import * -from toontown.toonbase.ToontownGlobals import * -from direct.gui.DirectGui import * -from panda3d.core import * -from direct.showbase import DirectObject -from direct.fsm import ClassicFSM, State -from direct.fsm import State + from direct.directnotify import DirectNotifyGlobal -from . import DistributedToon +from direct.fsm import ClassicFSM, State +from direct.gui.DirectGui import * +from direct.showbase import DirectObject + from toontown.friends import FriendInviter -from . import ToonTeleportPanel -from toontown.toonbase import TTLocalizer from toontown.hood import ZoneUtil -from toontown.toonbase.ToontownBattleGlobals import Tracks, Levels +from toontown.toonbase import TTLocalizer +from toontown.toonbase.ToontownBattleGlobals import Levels, Tracks +from toontown.toonbase.ToontownGlobals import * + +from . import DistributedToon, ToonTeleportPanel + globalAvatarDetail = None def showAvatarDetail(avId, avName, playerId = None): diff --git a/toontown/toon/ToonAvatarPanel.py b/toontown/toon/ToonAvatarPanel.py index ba42168..be7d69c 100644 --- a/toontown/toon/ToonAvatarPanel.py +++ b/toontown/toon/ToonAvatarPanel.py @@ -1,21 +1,20 @@ from panda3d.core import * -from direct.gui.DirectGui import * -from panda3d.core import * -from direct.showbase import DirectObject -from . import ToonHead -from toontown.friends import FriendHandle -from . import LaffMeter -from otp.avatar import Avatar -from direct.distributed import DistributedObject + from direct.directnotify import DirectNotifyGlobal -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import TTLocalizer -from toontown.friends import ToontownFriendSecret -from . import ToonAvatarDetailPanel -from . import AvatarPanelBase -from toontown.toontowngui import TTDialog +from direct.distributed import DistributedObject +from direct.gui.DirectGui import * +from direct.showbase import DirectObject + +from otp.avatar import Avatar from otp.otpbase import OTPGlobals +from toontown.friends import FriendHandle, ToontownFriendSecret +from toontown.toonbase import ToontownGlobals, TTLocalizer +from toontown.toontowngui import TTDialog + +from . import AvatarPanelBase, LaffMeter, ToonAvatarDetailPanel, ToonHead + + class ToonAvatarPanel(AvatarPanelBase.AvatarPanelBase): notify = DirectNotifyGlobal.directNotify.newCategory('ToonAvatarPanel') diff --git a/toontown/toon/ToonDNA.py b/toontown/toon/ToonDNA.py index ab2f52e..f14a73b 100644 --- a/toontown/toon/ToonDNA.py +++ b/toontown/toon/ToonDNA.py @@ -1,10 +1,13 @@ import random + from panda3d.core import * + from direct.directnotify.DirectNotifyGlobal import * -import random from direct.distributed.PyDatagram import PyDatagram from direct.distributed.PyDatagramIterator import PyDatagramIterator + from otp.avatar import AvatarDNA + notify = directNotify.newCategory('ToonDNA') toonSpeciesTypes = ['d', 'c', diff --git a/toontown/toon/ToonDetail.py b/toontown/toon/ToonDetail.py index b845bc3..4d8f6c8 100644 --- a/toontown/toon/ToonDetail.py +++ b/toontown/toon/ToonDetail.py @@ -1,7 +1,10 @@ from direct.directnotify.DirectNotifyGlobal import directNotify + from otp.avatar import AvatarDetail + from toontown.toon import DistributedToon + class ToonDetail(AvatarDetail.AvatarDetail): notify = directNotify.newCategory('ToonDetail') diff --git a/toontown/toon/ToonHead.py b/toontown/toon/ToonHead.py index 8ac6f87..84b3429 100644 --- a/toontown/toon/ToonHead.py +++ b/toontown/toon/ToonHead.py @@ -1,12 +1,16 @@ -from direct.actor import Actor -from direct.task import Task -from toontown.toonbase import ToontownGlobals import random + from panda3d.core import * -from direct.interval.IntervalGlobal import * + +from direct.actor import Actor +from direct.directnotify import DirectNotifyGlobal from direct.fsm.ClassicFSM import ClassicFSM from direct.fsm.State import State -from direct.directnotify import DirectNotifyGlobal +from direct.interval.IntervalGlobal import * +from direct.task import Task + +from toontown.toonbase import ToontownGlobals + if not ConfigVariableBool('want-new-anims', 1).value: HeadDict = {'dls': '/models/char/dogMM_Shorts-head-', 'dss': '/models/char/dogMM_Skirt-head-', diff --git a/toontown/toon/ToonHeadFrame.py b/toontown/toon/ToonHeadFrame.py index 6cce003..80cb157 100644 --- a/toontown/toon/ToonHeadFrame.py +++ b/toontown/toon/ToonHeadFrame.py @@ -1,10 +1,14 @@ -from direct.gui.DirectGui import * from panda3d.core import * from panda3d.otp import * -from . import ToonHead + +from direct.gui.DirectGui import * + from toontown.distributed import DelayDelete from toontown.toonbase import ToontownGlobals +from . import ToonHead + + class ToonHeadFrame(DirectFrame): def __init__(self, av, color = ToontownGlobals.GlobalDialogColor, g = DGG.getDefaultDialogGeom()): diff --git a/toontown/toon/ToonTeleportPanel.py b/toontown/toon/ToonTeleportPanel.py index 8857bee..4ba0195 100644 --- a/toontown/toon/ToonTeleportPanel.py +++ b/toontown/toon/ToonTeleportPanel.py @@ -1,15 +1,17 @@ from panda3d.core import * -from direct.gui.DirectGui import * -from panda3d.core import * -from toontown.toonbase import ToontownGlobals -from direct.showbase import DirectObject -from direct.fsm import ClassicFSM, State -from direct.fsm import State + from direct.directnotify import DirectNotifyGlobal +from direct.fsm import ClassicFSM, State +from direct.gui.DirectGui import * +from direct.showbase import DirectObject + from otp.avatar.Avatar import teleportNotify -from . import ToonAvatarDetailPanel -from toontown.toonbase import TTLocalizer + from toontown.hood import ZoneUtil +from toontown.toonbase import ToontownGlobals, TTLocalizer + +from . import ToonAvatarDetailPanel + globalTeleport = None def showTeleportPanel(avId, avName, avDisableName): diff --git a/toontown/toonbase/DisplayOptions.py b/toontown/toonbase/DisplayOptions.py index 362185a..57a61e7 100644 --- a/toontown/toonbase/DisplayOptions.py +++ b/toontown/toonbase/DisplayOptions.py @@ -1,13 +1,16 @@ import copy -import string -import os -import sys import datetime -from panda3d.core import loadPrcFileData, WindowProperties -from otp.otpgui import OTPDialog -from otp.otpbase import OTPGlobals -from otp.otpbase import OTPRender +import os +import string +import sys + +from panda3d.core import WindowProperties, loadPrcFileData + from direct.directnotify import DirectNotifyGlobal + +from otp.otpbase import OTPGlobals, OTPRender +from otp.otpgui import OTPDialog + try: import embedded except: diff --git a/toontown/toonbase/TTLocalizer.py b/toontown/toonbase/TTLocalizer.py index 0427d15..952b92d 100644 --- a/toontown/toonbase/TTLocalizer.py +++ b/toontown/toonbase/TTLocalizer.py @@ -15,6 +15,7 @@ else: _languageModule = 'toontown.toonbase.TTLocalizer_' + language print('from ' + _languageModule + ' import *') from toontown.toonbase.TTLocalizerEnglish import * + if checkLanguage: l = {} g = {} diff --git a/toontown/toonbase/TTLocalizerEnglish.py b/toontown/toonbase/TTLocalizerEnglish.py index 2416935..e24aef4 100644 --- a/toontown/toonbase/TTLocalizerEnglish.py +++ b/toontown/toonbase/TTLocalizerEnglish.py @@ -1,6 +1,8 @@ -from toontown.toonbase.TTLocalizerEnglishProperty import * -from toontown.catalog import CatalogAccessoryItemGlobals from otp.otpbase import OTPLocalizer as OL + +from toontown.catalog import CatalogAccessoryItemGlobals +from toontown.toonbase.TTLocalizerEnglishProperty import * + OL.SpeedChatStaticText = OL.SpeedChatStaticTextToontown.copy() for key in OL.SpeedChatStaticTextCommon.keys(): OL.SpeedChatStaticText[key] = OL.SpeedChatStaticTextCommon[key] @@ -8669,6 +8671,7 @@ LeaderBoard_AllTime = 'All Time Best Scores' RecordPeriodStrings = [LeaderBoard_Daily, LeaderBoard_Weekly, LeaderBoard_AllTime] KartRace_RaceNames = ['Practice', 'Toon Battle', 'Grand Prix'] from toontown.racing import RaceGlobals + KartRace_Go = 'Go!' KartRace_Reverse = ' Rev' KartRace_TrackNames = {RaceGlobals.RT_Speedway_1: 'Screwball Stadium', @@ -9281,6 +9284,7 @@ GolfShotDesc = {-4: GolfCondor, 2: GolfDoubleBogey, 3: GolfTripleBogey} from toontown.golf import GolfGlobals + CoursesCompleted = 'Courses Completed' CoursesUnderPar = 'Courses Under Par' HoleInOneShots = 'Hole In One Shots' diff --git a/toontown/toonbase/ToonBase.py b/toontown/toonbase/ToonBase.py index 99d29a9..71f257b 100644 --- a/toontown/toonbase/ToonBase.py +++ b/toontown/toonbase/ToonBase.py @@ -1,22 +1,23 @@ -from otp.otpbase import OTPBase -from otp.otpbase import OTPLauncherGlobals -from otp.otpbase import OTPGlobals -from otp.settings.Settings import Settings -from direct.showbase.PythonUtil import * -from . import ToontownGlobals -from direct.directnotify import DirectNotifyGlobal -from . import ToontownLoader -from direct.gui import DirectGuiGlobals -from direct.gui.DirectGui import * +import math +import os +import sys + from panda3d.core import * from panda3d.otp import * -import sys -import os -import math -from toontown.toonbase import ToontownAccess -from toontown.toonbase import TTLocalizer -from toontown.toonbase import ToontownBattleGlobals + +from direct.directnotify import DirectNotifyGlobal +from direct.gui import DirectGuiGlobals +from direct.gui.DirectGui import * +from direct.showbase.PythonUtil import * + +from otp.otpbase import OTPBase, OTPGlobals, OTPLauncherGlobals +from otp.settings.Settings import Settings + from toontown.launcher import ToontownDownloadWatcher +from toontown.toonbase import ToontownAccess, ToontownBattleGlobals, TTLocalizer + +from . import ToontownGlobals, ToontownLoader + class ToonBase(OTPBase.OTPBase): notify = DirectNotifyGlobal.directNotify.newCategory('ToonBase') diff --git a/toontown/toonbase/ToontownAccess.py b/toontown/toonbase/ToontownAccess.py index f36a066..7aa6e47 100644 --- a/toontown/toonbase/ToontownAccess.py +++ b/toontown/toonbase/ToontownAccess.py @@ -1,6 +1,7 @@ from toontown.hood import ZoneUtil from toontown.toonbase import ToontownGlobals + class ToontownAccess: def canAccess(self, zoneId = None): diff --git a/toontown/toonbase/ToontownAccessAI.py b/toontown/toonbase/ToontownAccessAI.py index 1153661..1b777fc 100644 --- a/toontown/toonbase/ToontownAccessAI.py +++ b/toontown/toonbase/ToontownAccessAI.py @@ -1,7 +1,9 @@ -from otp.otpbase import OTPGlobals from otp.ai import BanManagerAI -from toontown.toonbase import ToontownGlobals +from otp.otpbase import OTPGlobals + from toontown.hood import ZoneUtil +from toontown.toonbase import ToontownGlobals + def canAccess(avatarId, zoneId, function = ''): avatar = simbase.air.doId2do.get(avatarId) diff --git a/toontown/toonbase/ToontownBattleGlobals.py b/toontown/toonbase/ToontownBattleGlobals.py index 39ba608..115f6af 100644 --- a/toontown/toonbase/ToontownBattleGlobals.py +++ b/toontown/toonbase/ToontownBattleGlobals.py @@ -1,6 +1,8 @@ -from .ToontownGlobals import * import math + from . import TTLocalizer +from .ToontownGlobals import * + BattleCamFaceOffFov = 30.0 BattleCamFaceOffPos = Point3(0, -10, 4) BattleCamDefaultPos = Point3(0, -8.6, 16.5) diff --git a/toontown/toonbase/ToontownGlobals.py b/toontown/toonbase/ToontownGlobals.py index da6e354..7386f7f 100644 --- a/toontown/toonbase/ToontownGlobals.py +++ b/toontown/toonbase/ToontownGlobals.py @@ -1,8 +1,13 @@ -from . import TTLocalizer -from otp.otpbase.OTPGlobals import * -from direct.showbase.PythonUtil import invertDict -from panda3d.core import BitMask32, Vec4 from enum import IntEnum + +from panda3d.core import BitMask32, Vec4 + +from direct.showbase.PythonUtil import invertDict + +from otp.otpbase.OTPGlobals import * + +from . import TTLocalizer + MapHotkeyOn = 'alt' MapHotkeyOff = 'alt-up' MapHotkey = 'alt' @@ -109,6 +114,7 @@ CogSuitHPLevels = (15 - 1, setInterfaceFont(TTLocalizer.InterfaceFont) setSignFont(TTLocalizer.SignFont) from toontown.toontowngui import TTDialog + setDialogClasses(TTDialog.TTDialog, TTDialog.TTGlobalDialog) ToonFont = None BuildingNametagFont = None diff --git a/toontown/toonbase/ToontownIntervals.py b/toontown/toonbase/ToontownIntervals.py index a903209..fe79b00 100644 --- a/toontown/toonbase/ToontownIntervals.py +++ b/toontown/toonbase/ToontownIntervals.py @@ -1,5 +1,6 @@ +from direct.interval.FunctionInterval import Func, Wait from direct.interval.MetaInterval import Sequence -from direct.interval.FunctionInterval import Wait, Func + PULSE_GUI_DURATION = 0.2 PULSE_GUI_CHANGE = 0.333 diff --git a/toontown/toonbase/ToontownLoader.py b/toontown/toonbase/ToontownLoader.py index cafa772..2ae0485 100644 --- a/toontown/toonbase/ToontownLoader.py +++ b/toontown/toonbase/ToontownLoader.py @@ -1,9 +1,12 @@ from panda3d.core import * from panda3d.toontown import * + from direct.directnotify.DirectNotifyGlobal import * from direct.showbase import Loader + from toontown.toontowngui import ToontownLoadingScreen + class ToontownLoader(Loader.Loader): TickPeriod = 0.2 diff --git a/toontown/toonbase/ToontownStart.py b/toontown/toonbase/ToontownStart.py index de6d608..a92c66b 100644 --- a/toontown/toonbase/ToontownStart.py +++ b/toontown/toonbase/ToontownStart.py @@ -1,27 +1,18 @@ import builtins + class game: name = 'toontown' process = 'client' builtins.game = game() -from panda3d.core import ( - ConfigVariableBool, - ConfigVariableDouble, - ConfigVariableString, - Filename, - HTTPClient, - Loader, - loadPrcFile, - TextNode, - Thread, - VBase3, - Vec4 -) - -import time import sys +import time + +from panda3d.core import (ConfigVariableBool, ConfigVariableDouble, ConfigVariableString, Filename, HTTPClient, Loader, + TextNode, Thread, VBase3, Vec4, loadPrcFile) + try: launcher except: @@ -48,11 +39,14 @@ else: tempLoader = Loader() backgroundNode = tempLoader.loadSync(Filename('phase_3/models/gui/loading-background')) from direct.gui import DirectGuiGlobals + print('ToontownStart: setting default font') from . import ToontownGlobals + DirectGuiGlobals.setDefaultFontFunc(ToontownGlobals.getInterfaceFont) launcher.setPandaErrorCode(7) from .ToonBaseGlobal import base + if base.win == None: print('Unable to open window; aborting.') sys.exit() @@ -70,8 +64,10 @@ base.graphicsEngine.renderFrame() DirectGuiGlobals.setDefaultRolloverSound(base.loader.loadSfx('phase_3/audio/sfx/GUI_rollover.ogg')) DirectGuiGlobals.setDefaultClickSound(base.loader.loadSfx('phase_3/audio/sfx/GUI_create_toon_fwd.ogg')) DirectGuiGlobals.setDefaultDialogGeom(loader.loadModel('phase_3/models/gui/dialog_box_gui')) -from . import TTLocalizer from otp.otpbase import OTPGlobals + +from . import TTLocalizer + OTPGlobals.setDefaultProductPrefix(TTLocalizer.ProductPrefix) if base.musicManagerIsValid: music = base.musicManager.getSound('phase_3/audio/bgm/tt_theme.ogg') @@ -87,11 +83,13 @@ else: music = None from direct.gui.DirectGui import OnscreenText + 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 toontown.distributed.ToontownClientRepository import ToontownClientRepository + cr = ToontownClientRepository(serverVersion, launcher) cr.music = music del music @@ -99,6 +97,7 @@ base.initNametagGlobals() base.cr = cr loader.endBulkLoad('init') from otp.distributed.OtpDoGlobals import OTP_DO_ID_FRIEND_MANAGER + cr.generateGlobalObject(OTP_DO_ID_FRIEND_MANAGER, 'FriendManager') if not launcher.isDummy(): base.startShow(cr, launcher.getGameServer()) diff --git a/toontown/toonbase/ToontownTimer.py b/toontown/toonbase/ToontownTimer.py index 97372d4..5705900 100644 --- a/toontown/toonbase/ToontownTimer.py +++ b/toontown/toonbase/ToontownTimer.py @@ -1,6 +1,8 @@ -from otp.otpbase.OTPTimer import OTPTimer from panda3d.core import * +from otp.otpbase.OTPTimer import OTPTimer + + class ToontownTimer(OTPTimer): def __init__(self, useImage = True, highlightNearEnd = True): diff --git a/toontown/toontowngui/NewsPageButtonManager.py b/toontown/toontowngui/NewsPageButtonManager.py index f09ec2b..a26a4d6 100644 --- a/toontown/toontowngui/NewsPageButtonManager.py +++ b/toontown/toontowngui/NewsPageButtonManager.py @@ -1,12 +1,14 @@ -from panda3d.core import VBase4, VBase3 -from direct.fsm import FSM +from panda3d.core import VBase3, VBase4 + from direct.directnotify import DirectNotifyGlobal +from direct.fsm import FSM from direct.gui.DirectButton import DirectButton -from toontown.toonbase import ToontownGlobals from direct.gui.DirectGui import * from direct.interval.IntervalGlobal import * -from toontown.toonbase import TTLocalizer + from toontown.coghq import CogHQBossBattle +from toontown.toonbase import ToontownGlobals, TTLocalizer + class NewsPageButtonManager(FSM.FSM): notify = DirectNotifyGlobal.directNotify.newCategory('NewsPageButtonManager') diff --git a/toontown/toontowngui/TTDialog.py b/toontown/toontowngui/TTDialog.py index b11af4c..bd3691d 100644 --- a/toontown/toontowngui/TTDialog.py +++ b/toontown/toontowngui/TTDialog.py @@ -1,5 +1,6 @@ from otp.otpgui.OTPDialog import * + class TTDialog(OTPDialog): def __init__(self, parent = None, style = NoButtons, **kw): diff --git a/toontown/toontowngui/TeaserPanel.py b/toontown/toontowngui/TeaserPanel.py index bffabea..5877ea6 100644 --- a/toontown/toontowngui/TeaserPanel.py +++ b/toontown/toontowngui/TeaserPanel.py @@ -1,13 +1,17 @@ from panda3d.core import * -from direct.gui.DirectGui import * -from direct.gui import DirectGuiGlobals -from panda3d.core import * + from direct.directnotify import DirectNotifyGlobal -from . import TTDialog -from toontown.toonbase import TTLocalizer +from direct.gui import DirectGuiGlobals +from direct.gui.DirectGui import * from direct.showbase import PythonUtil from direct.showbase.DirectObject import DirectObject + from otp.login import LeaveToPayDialog + +from toontown.toonbase import TTLocalizer + +from . import TTDialog + Pages = {'otherHoods': (TTLocalizer.TeaserOtherHoods,), 'typeAName': (TTLocalizer.TeaserTypeAName,), 'sixToons': (TTLocalizer.TeaserSixToons,), diff --git a/toontown/toontowngui/ToonHeadDialog.py b/toontown/toontowngui/ToonHeadDialog.py index 3855948..0caf320 100644 --- a/toontown/toontowngui/ToonHeadDialog.py +++ b/toontown/toontowngui/ToonHeadDialog.py @@ -1,8 +1,12 @@ from panda3d.core import * -from toontown.toonbase.ToontownGlobals import * + from direct.directnotify import DirectNotifyGlobal -from . import TTDialog + from toontown.toon import ToonHead +from toontown.toonbase.ToontownGlobals import * + +from . import TTDialog + class ToonHeadDialog(TTDialog.TTDialog): notify = DirectNotifyGlobal.directNotify.newCategory('ToonHeadDialog') diff --git a/toontown/toontowngui/ToontownLoadingBlocker.py b/toontown/toontowngui/ToontownLoadingBlocker.py index f260798..cac2809 100644 --- a/toontown/toontowngui/ToontownLoadingBlocker.py +++ b/toontown/toontowngui/ToontownLoadingBlocker.py @@ -1,14 +1,18 @@ +import random + +from panda3d.core import TextNode + from direct.directnotify import DirectNotifyGlobal from direct.gui.DirectGui import * -from panda3d.core import TextNode -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import TTLocalizer -from toontown.toontowngui import TTDialog -from otp.otpgui.OTPDialog import * -from direct.interval.LerpInterval import LerpPosInterval, LerpScaleInterval, LerpFunc -from direct.interval.IntervalGlobal import Sequence, Parallel, Func, Wait +from direct.interval.IntervalGlobal import Func, Parallel, Sequence, Wait +from direct.interval.LerpInterval import LerpFunc, LerpPosInterval, LerpScaleInterval from direct.task import Task -import random + +from otp.otpgui.OTPDialog import * + +from toontown.toonbase import ToontownGlobals, TTLocalizer +from toontown.toontowngui import TTDialog + class ToontownLoadingBlocker(TTDialog.TTDialog): notify = DirectNotifyGlobal.directNotify.newCategory('ToontownLoadingBlocker') diff --git a/toontown/toontowngui/ToontownLoadingScreen.py b/toontown/toontowngui/ToontownLoadingScreen.py index c4de1f6..3852587 100644 --- a/toontown/toontowngui/ToontownLoadingScreen.py +++ b/toontown/toontowngui/ToontownLoadingScreen.py @@ -1,9 +1,12 @@ -from direct.gui.DirectGui import * -from panda3d.core import * -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import TTLocalizer import random +from panda3d.core import * + +from direct.gui.DirectGui import * + +from toontown.toonbase import ToontownGlobals, TTLocalizer + + class ToontownLoadingScreen: def __init__(self): diff --git a/toontown/town/BRStreet.py b/toontown/town/BRStreet.py index 9bade86..389ddac 100644 --- a/toontown/town/BRStreet.py +++ b/toontown/town/BRStreet.py @@ -1,5 +1,6 @@ from . import Street + class BRStreet(Street.Street): def __init__(self, loader, parentFSM, doneEvent): diff --git a/toontown/town/BRTownLoader.py b/toontown/town/BRTownLoader.py index 9ee86a3..1ca8a72 100644 --- a/toontown/town/BRTownLoader.py +++ b/toontown/town/BRTownLoader.py @@ -1,7 +1,8 @@ -from . import TownLoader -from . import BRStreet from toontown.suit import Suit +from . import BRStreet, TownLoader + + class BRTownLoader(TownLoader.TownLoader): def __init__(self, hood, parentFSM, doneEvent): diff --git a/toontown/town/DDStreet.py b/toontown/town/DDStreet.py index 643fc87..39150aa 100644 --- a/toontown/town/DDStreet.py +++ b/toontown/town/DDStreet.py @@ -1,5 +1,6 @@ from . import Street + class DDStreet(Street.Street): def __init__(self, loader, parentFSM, doneEvent): diff --git a/toontown/town/DDTownLoader.py b/toontown/town/DDTownLoader.py index 3b52e65..64f3888 100644 --- a/toontown/town/DDTownLoader.py +++ b/toontown/town/DDTownLoader.py @@ -1,7 +1,8 @@ -from . import TownLoader -from . import DDStreet from toontown.suit import Suit +from . import DDStreet, TownLoader + + class DDTownLoader(TownLoader.TownLoader): def __init__(self, hood, parentFSM, doneEvent): diff --git a/toontown/town/DGStreet.py b/toontown/town/DGStreet.py index 2be8cb2..5872ca0 100644 --- a/toontown/town/DGStreet.py +++ b/toontown/town/DGStreet.py @@ -1,5 +1,6 @@ from . import Street + class DGStreet(Street.Street): def __init__(self, loader, parentFSM, doneEvent): diff --git a/toontown/town/DGTownLoader.py b/toontown/town/DGTownLoader.py index 9eb6890..1ec8ba9 100644 --- a/toontown/town/DGTownLoader.py +++ b/toontown/town/DGTownLoader.py @@ -1,7 +1,8 @@ -from . import TownLoader -from . import DGStreet from toontown.suit import Suit +from . import DGStreet, TownLoader + + class DGTownLoader(TownLoader.TownLoader): def __init__(self, hood, parentFSM, doneEvent): diff --git a/toontown/town/DLStreet.py b/toontown/town/DLStreet.py index 98c046c..11c980f 100644 --- a/toontown/town/DLStreet.py +++ b/toontown/town/DLStreet.py @@ -1,5 +1,6 @@ from . import Street + class DLStreet(Street.Street): def __init__(self, loader, parentFSM, doneEvent): diff --git a/toontown/town/DLTownLoader.py b/toontown/town/DLTownLoader.py index 6febe6f..705899a 100644 --- a/toontown/town/DLTownLoader.py +++ b/toontown/town/DLTownLoader.py @@ -1,7 +1,8 @@ -from . import TownLoader -from . import DLStreet from toontown.suit import Suit +from . import DLStreet, TownLoader + + class DLTownLoader(TownLoader.TownLoader): def __init__(self, hood, parentFSM, doneEvent): diff --git a/toontown/town/MMStreet.py b/toontown/town/MMStreet.py index cdc4d63..2ca1e0f 100644 --- a/toontown/town/MMStreet.py +++ b/toontown/town/MMStreet.py @@ -1,5 +1,6 @@ from . import Street + class MMStreet(Street.Street): def __init__(self, loader, parentFSM, doneEvent): diff --git a/toontown/town/MMTownLoader.py b/toontown/town/MMTownLoader.py index a46659e..c1945f5 100644 --- a/toontown/town/MMTownLoader.py +++ b/toontown/town/MMTownLoader.py @@ -1,7 +1,8 @@ -from . import TownLoader -from . import MMStreet from toontown.suit import Suit +from . import MMStreet, TownLoader + + class MMTownLoader(TownLoader.TownLoader): def __init__(self, hood, parentFSM, doneEvent): diff --git a/toontown/town/Street.py b/toontown/town/Street.py index 5f0238a..93c0adf 100644 --- a/toontown/town/Street.py +++ b/toontown/town/Street.py @@ -1,19 +1,23 @@ from panda3d.core import * from panda3d.otp import * + +from direct.directnotify import DirectNotifyGlobal +from direct.fsm import ClassicFSM, State +from direct.gui.DirectGui import cleanupDialog +from direct.interval.IntervalGlobal import * +from direct.task import Task + +from otp.distributed.TelemetryLimiter import RotationLimitToH, TLGatherAllAvs + +from toontown.battle import BattlePlace 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.battle import BattlePlace -from direct.fsm import ClassicFSM, State -from direct.task import Task -from otp.distributed.TelemetryLimiter import RotationLimitToH, TLGatherAllAvs from toontown.building import Elevator +from toontown.distributed.ToontownMsgTypes import * from toontown.hood import ZoneUtil -from toontown.toonbase import ToontownGlobals from toontown.toon.Toon import teleportDebug -from direct.interval.IntervalGlobal import * +from toontown.toonbase import ToontownGlobals + visualizeZones = ConfigVariableBool('visualize-zones', 0).value class Street(BattlePlace.BattlePlace): diff --git a/toontown/town/TTStreet.py b/toontown/town/TTStreet.py index 1c34cb8..282967f 100644 --- a/toontown/town/TTStreet.py +++ b/toontown/town/TTStreet.py @@ -1,5 +1,6 @@ from . import Street + class TTStreet(Street.Street): def __init__(self, loader, parentFSM, doneEvent): diff --git a/toontown/town/TTTownLoader.py b/toontown/town/TTTownLoader.py index b929c0a..9bd9c1d 100644 --- a/toontown/town/TTTownLoader.py +++ b/toontown/town/TTTownLoader.py @@ -1,7 +1,8 @@ -from . import TownLoader -from . import TTStreet from toontown.suit import Suit +from . import TownLoader, TTStreet + + class TTTownLoader(TownLoader.TownLoader): def __init__(self, hood, parentFSM, doneEvent): diff --git a/toontown/town/TownBattle.py b/toontown/town/TownBattle.py index ee417f9..3c6a26d 100644 --- a/toontown/town/TownBattle.py +++ b/toontown/town/TownBattle.py @@ -1,24 +1,19 @@ -from toontown.toonbase.ToontownBattleGlobals import * import types -from direct.fsm import StateData -from direct.fsm import ClassicFSM, State -from direct.fsm import State -from . import TownBattleAttackPanel -from . import TownBattleWaitPanel -from . import TownBattleChooseAvatarPanel -from . import TownBattleSOSPanel -from . import TownBattleSOSPetSearchPanel -from . import TownBattleSOSPetInfoPanel -from . import TownBattleToonPanel -from toontown.toontowngui import TTDialog + from direct.directnotify import DirectNotifyGlobal -from toontown.battle import BattleBase -from toontown.toonbase import ToontownTimer -from direct.showbase import PythonUtil -from toontown.toonbase import TTLocalizer -from toontown.pets import PetConstants +from direct.fsm import ClassicFSM, State, StateData from direct.gui.DirectGui import DGG -from toontown.battle import FireCogPanel +from direct.showbase import PythonUtil + +from toontown.battle import BattleBase, FireCogPanel +from toontown.pets import PetConstants +from toontown.toonbase import ToontownTimer, TTLocalizer +from toontown.toonbase.ToontownBattleGlobals import * +from toontown.toontowngui import TTDialog + +from . import (TownBattleAttackPanel, TownBattleChooseAvatarPanel, TownBattleSOSPanel, TownBattleSOSPetInfoPanel, + TownBattleSOSPetSearchPanel, TownBattleToonPanel, TownBattleWaitPanel) + class TownBattle(StateData.StateData): notify = DirectNotifyGlobal.directNotify.newCategory('TownBattle') diff --git a/toontown/town/TownBattleAttackPanel.py b/toontown/town/TownBattleAttackPanel.py index 62bf84b..13d3417 100644 --- a/toontown/town/TownBattleAttackPanel.py +++ b/toontown/town/TownBattleAttackPanel.py @@ -1,9 +1,13 @@ -from panda3d.core import * -from direct.directnotify import DirectNotifyGlobal import string + +from panda3d.core import * + +from direct.directnotify import DirectNotifyGlobal from direct.fsm import StateData -from toontown.toontowngui.TeaserPanel import TeaserPanel + from toontown.toonbase.ToontownBattleGlobals import gagIsPaidOnly +from toontown.toontowngui.TeaserPanel import TeaserPanel + AttackPanelHidden = 0 def hideAttackPanel(flag): diff --git a/toontown/town/TownBattleChooseAvatarPanel.py b/toontown/town/TownBattleChooseAvatarPanel.py index 9021050..d7b88f8 100644 --- a/toontown/town/TownBattleChooseAvatarPanel.py +++ b/toontown/town/TownBattleChooseAvatarPanel.py @@ -1,11 +1,13 @@ -from toontown.toonbase.ToontownBattleGlobals import * -from toontown.toonbase import ToontownGlobals -from direct.fsm import StateData -from direct.directnotify import DirectNotifyGlobal -from toontown.battle import BattleBase -from direct.gui.DirectGui import * from panda3d.core import * -from toontown.toonbase import TTLocalizer + +from direct.directnotify import DirectNotifyGlobal +from direct.fsm import StateData +from direct.gui.DirectGui import * + +from toontown.battle import BattleBase +from toontown.toonbase import ToontownGlobals, TTLocalizer +from toontown.toonbase.ToontownBattleGlobals import * + class TownBattleChooseAvatarPanel(StateData.StateData): notify = DirectNotifyGlobal.directNotify.newCategory('ChooseAvatarPanel') diff --git a/toontown/town/TownBattleSOSPanel.py b/toontown/town/TownBattleSOSPanel.py index 5144f7d..cf5b27c 100644 --- a/toontown/town/TownBattleSOSPanel.py +++ b/toontown/town/TownBattleSOSPanel.py @@ -1,16 +1,16 @@ +import types + from panda3d.core import * -from toontown.toonbase.ToontownGlobals import * -from direct.gui.DirectGui import * -from panda3d.core import * -from direct.showbase import DirectObject + from direct.directnotify import DirectNotifyGlobal from direct.fsm import StateData -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import TTLocalizer -import types -from toontown.toon import NPCToons -from toontown.toon import NPCFriendPanel -from toontown.toonbase import ToontownBattleGlobals +from direct.gui.DirectGui import * +from direct.showbase import DirectObject + +from toontown.toon import NPCFriendPanel, NPCToons +from toontown.toonbase import ToontownBattleGlobals, ToontownGlobals, TTLocalizer +from toontown.toonbase.ToontownGlobals import * + class TownBattleSOSPanel(DirectFrame, StateData.StateData): notify = DirectNotifyGlobal.directNotify.newCategory('TownBattleSOSPanel') diff --git a/toontown/town/TownBattleSOSPetInfoPanel.py b/toontown/town/TownBattleSOSPetInfoPanel.py index be0cdb6..b6973a0 100644 --- a/toontown/town/TownBattleSOSPetInfoPanel.py +++ b/toontown/town/TownBattleSOSPetInfoPanel.py @@ -1,12 +1,15 @@ from panda3d.core import * + from direct.fsm import StateData from direct.gui.DirectGui import * -from panda3d.core import * -from toontown.toonbase import TTLocalizer -from toontown.pets import Pet, PetTricks, PetDetailPanel -from toontown.speedchat import TTSCPetTrickMenu -from otp.speedchat import SpeedChatGlobals, SCSettings + from otp.otpbase import OTPLocalizer +from otp.speedchat import SCSettings, SpeedChatGlobals + +from toontown.pets import Pet, PetDetailPanel, PetTricks +from toontown.speedchat import TTSCPetTrickMenu +from toontown.toonbase import TTLocalizer + class TownBattleSOSPetInfoPanel(StateData.StateData): diff --git a/toontown/town/TownBattleSOSPetSearchPanel.py b/toontown/town/TownBattleSOSPetSearchPanel.py index 9dd52f4..dbcc662 100644 --- a/toontown/town/TownBattleSOSPetSearchPanel.py +++ b/toontown/town/TownBattleSOSPetSearchPanel.py @@ -1,9 +1,11 @@ from panda3d.core import * + from direct.fsm import StateData from direct.gui.DirectGui import * -from panda3d.core import * + from toontown.toonbase import TTLocalizer + class TownBattleSOSPetSearchPanel(StateData.StateData): def __init__(self, doneEvent): diff --git a/toontown/town/TownBattleToonPanel.py b/toontown/town/TownBattleToonPanel.py index cfa885d..2c35817 100644 --- a/toontown/town/TownBattleToonPanel.py +++ b/toontown/town/TownBattleToonPanel.py @@ -1,13 +1,15 @@ -from panda3d.core import * -from toontown.toonbase import ToontownGlobals -from toontown.toonbase.ToontownBattleGlobals import * -from direct.directnotify import DirectNotifyGlobal import string -from toontown.toon import LaffMeter -from toontown.battle import BattleBase -from direct.gui.DirectGui import * + from panda3d.core import * -from toontown.toonbase import TTLocalizer + +from direct.directnotify import DirectNotifyGlobal +from direct.gui.DirectGui import * + +from toontown.battle import BattleBase +from toontown.toon import LaffMeter +from toontown.toonbase import ToontownGlobals, TTLocalizer +from toontown.toonbase.ToontownBattleGlobals import * + class TownBattleToonPanel(DirectFrame): notify = DirectNotifyGlobal.directNotify.newCategory('TownBattleToonPanel') diff --git a/toontown/town/TownBattleWaitPanel.py b/toontown/town/TownBattleWaitPanel.py index fb3075d..712d883 100644 --- a/toontown/town/TownBattleWaitPanel.py +++ b/toontown/town/TownBattleWaitPanel.py @@ -1,9 +1,11 @@ from panda3d.core import * + from direct.fsm import StateData from direct.gui.DirectGui import * -from panda3d.core import * + from toontown.toonbase import TTLocalizer + class TownBattleWaitPanel(StateData.StateData): def __init__(self, doneEvent): diff --git a/toontown/town/TownLoader.py b/toontown/town/TownLoader.py index 71b37a3..9f468a6 100644 --- a/toontown/town/TownLoader.py +++ b/toontown/town/TownLoader.py @@ -1,25 +1,24 @@ from panda3d.core import * + +from direct.directnotify import DirectNotifyGlobal +from direct.fsm import ClassicFSM, State, StateData +from direct.gui.DirectGui import cleanupDialog +from direct.interval.IntervalGlobal import * +from direct.showbase import DirectObject +from direct.task import Task + +from toontown.battle import BattleParticles from toontown.battle.BattleProps import * from toontown.battle.BattleSounds import * +from toontown.building import ToonInterior from toontown.distributed.ToontownMsgTypes import * -from toontown.toonbase.ToontownGlobals import * -from direct.gui.DirectGui import cleanupDialog -from direct.directnotify import DirectNotifyGlobal -from toontown.hood import Place -from direct.showbase import DirectObject -from direct.fsm import StateData -from direct.fsm import ClassicFSM, State -from direct.fsm import State -from direct.task import Task -from . import TownBattle +from toontown.hood import Place, QuietZoneState, ZoneUtil from toontown.toon import Toon from toontown.toon.Toon import teleportDebug -from toontown.battle import BattleParticles -from direct.fsm import StateData -from toontown.building import ToonInterior -from toontown.hood import QuietZoneState -from toontown.hood import ZoneUtil -from direct.interval.IntervalGlobal import * +from toontown.toonbase.ToontownGlobals import * + +from . import TownBattle + class TownLoader(StateData.StateData): notify = DirectNotifyGlobal.directNotify.newCategory('TownLoader') diff --git a/toontown/town/TutorialStreet.py b/toontown/town/TutorialStreet.py index e30f5af..0ed471d 100644 --- a/toontown/town/TutorialStreet.py +++ b/toontown/town/TutorialStreet.py @@ -1,5 +1,6 @@ from . import TTStreet + class TutorialStreet(TTStreet.TTStreet): def enter(self, requestStatus): diff --git a/toontown/town/TutorialTownLoader.py b/toontown/town/TutorialTownLoader.py index 808930c..5ba9d8c 100644 --- a/toontown/town/TutorialTownLoader.py +++ b/toontown/town/TutorialTownLoader.py @@ -1,9 +1,9 @@ -from . import TownLoader -from . import TTTownLoader -from . import TutorialStreet +from toontown.hood import ZoneUtil from toontown.suit import Suit from toontown.toon import Toon -from toontown.hood import ZoneUtil + +from . import TownLoader, TTTownLoader, TutorialStreet + class TutorialTownLoader(TTTownLoader.TTTownLoader): diff --git a/toontown/trolley/Trolley.py b/toontown/trolley/Trolley.py index 42c759f..9df697d 100644 --- a/toontown/trolley/Trolley.py +++ b/toontown/trolley/Trolley.py @@ -1,15 +1,14 @@ from panda3d.core import * -from toontown.toonbase.ToonBaseGlobal import * -from direct.gui.DirectGui import * -from panda3d.core import * -from direct.interval.IntervalGlobal import * -from direct.fsm import ClassicFSM, State -from direct.fsm import State -from direct.fsm import StateData -from toontown.toontowngui import TTDialog -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import TTLocalizer + from direct.directnotify import DirectNotifyGlobal +from direct.fsm import ClassicFSM, State, StateData +from direct.gui.DirectGui import * +from direct.interval.IntervalGlobal import * + +from toontown.toonbase import ToontownGlobals, TTLocalizer +from toontown.toonbase.ToonBaseGlobal import * +from toontown.toontowngui import TTDialog + class Trolley(StateData.StateData): notify = DirectNotifyGlobal.directNotify.newCategory('Trolley') diff --git a/toontown/tutorial/DistributedBattleTutorial.py b/toontown/tutorial/DistributedBattleTutorial.py index 34a8c55..e84a682 100644 --- a/toontown/tutorial/DistributedBattleTutorial.py +++ b/toontown/tutorial/DistributedBattleTutorial.py @@ -1,6 +1,8 @@ -from toontown.battle import DistributedBattle from direct.directnotify import DirectNotifyGlobal +from toontown.battle import DistributedBattle + + class DistributedBattleTutorial(DistributedBattle.DistributedBattle): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedBattleTutorial') diff --git a/toontown/tutorial/DistributedBattleTutorialAI.py b/toontown/tutorial/DistributedBattleTutorialAI.py index 8b38b35..e0b15c5 100644 --- a/toontown/tutorial/DistributedBattleTutorialAI.py +++ b/toontown/tutorial/DistributedBattleTutorialAI.py @@ -1,9 +1,11 @@ -from toontown.battle import DistributedBattleAI from direct.directnotify import DirectNotifyGlobal +from toontown.battle import DistributedBattleAI + + 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, diff --git a/toontown/tutorial/SuitPlannerTutorialAI.py b/toontown/tutorial/SuitPlannerTutorialAI.py index a5232a2..3c94ff7 100644 --- a/toontown/tutorial/SuitPlannerTutorialAI.py +++ b/toontown/tutorial/SuitPlannerTutorialAI.py @@ -2,12 +2,15 @@ which handles management of the suit you will fight during the tutorial.""" +from direct.directnotify import DirectNotifyGlobal + 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 @@ -50,7 +53,7 @@ class SuitPlannerTutorialAI: battleMgr = self.battle.battleMgr if cellId in battleMgr.cellId2battle: battleMgr.destroy(self.battle) - + self.battle = None def getDoId(self): diff --git a/toontown/tutorial/TutorialBattleManagerAI.py b/toontown/tutorial/TutorialBattleManagerAI.py index b19f20e..e9e176c 100644 --- a/toontown/tutorial/TutorialBattleManagerAI.py +++ b/toontown/tutorial/TutorialBattleManagerAI.py @@ -1,7 +1,10 @@ -from toontown.battle import BattleManagerAI from direct.directnotify import DirectNotifyGlobal + +from toontown.battle import BattleManagerAI + from . import DistributedBattleTutorialAI + class TutorialBattleManagerAI(BattleManagerAI.BattleManagerAI): notify = DirectNotifyGlobal.directNotify.newCategory('TutorialBattleManagerAI') diff --git a/toontown/tutorial/TutorialForceAcknowledge.py b/toontown/tutorial/TutorialForceAcknowledge.py index 5329a2a..218eac7 100644 --- a/toontown/tutorial/TutorialForceAcknowledge.py +++ b/toontown/tutorial/TutorialForceAcknowledge.py @@ -1,6 +1,8 @@ from panda3d.core import * -from toontown.toontowngui import TTDialog + from toontown.toonbase import TTLocalizer +from toontown.toontowngui import TTDialog + class TutorialForceAcknowledge: diff --git a/toontown/tutorial/TutorialManager.py b/toontown/tutorial/TutorialManager.py index e8a641e..c3c452b 100644 --- a/toontown/tutorial/TutorialManager.py +++ b/toontown/tutorial/TutorialManager.py @@ -1,8 +1,11 @@ from panda3d.core import * -from direct.distributed import DistributedObject + from direct.directnotify import DirectNotifyGlobal +from direct.distributed import DistributedObject + from toontown.hood import ZoneUtil + class TutorialManager(DistributedObject.DistributedObject): notify = DirectNotifyGlobal.directNotify.newCategory('TutorialManager') neverDisable = 1 diff --git a/toontown/tutorial/TutorialManagerAI.py b/toontown/tutorial/TutorialManagerAI.py index ae89ac1..1acb373 100644 --- a/toontown/tutorial/TutorialManagerAI.py +++ b/toontown/tutorial/TutorialManagerAI.py @@ -1,15 +1,18 @@ -from otp.ai.AIBaseGlobal import * from panda3d.core import * from panda3d.toontown import * -from direct.distributed import DistributedObjectAI + from direct.directnotify import DirectNotifyGlobal -from toontown.building import TutorialBuildingAI -from toontown.building import TutorialHQBuildingAI -from . import SuitPlannerTutorialAI -from toontown.toonbase import ToontownBattleGlobals +from direct.distributed import DistributedObjectAI + +from otp.ai.AIBaseGlobal import * + +from toontown.ai import BlackCatHolidayMgrAI, DistributedBlackCatMgrAI +from toontown.building import TutorialBuildingAI, TutorialHQBuildingAI from toontown.toon import NPCToons -from toontown.ai import BlackCatHolidayMgrAI -from toontown.ai import DistributedBlackCatMgrAI +from toontown.toonbase import ToontownBattleGlobals + +from . import SuitPlannerTutorialAI + class TutorialManagerAI(DistributedObjectAI.DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory("TutorialManagerAI") @@ -27,7 +30,7 @@ class TutorialManagerAI(DistributedObjectAI.DistributedObjectAI): # 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. + # is wrong. self.dnaStore = DNAStorage() dnaFile = simbase.air.lookupDNAFileName("tutorial_street.dna") @@ -44,13 +47,13 @@ class TutorialManagerAI(DistributedObjectAI.DistributedObjectAI): 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): @@ -124,7 +127,7 @@ class TutorialManagerAI(DistributedObjectAI.DistributedObjectAI): 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() @@ -143,7 +146,7 @@ class TutorialManagerAI(DistributedObjectAI.DistributedObjectAI): def battleOverCallback(zoneId): hqBuilding.battleOverCallback() building.battleOverCallback() - + # Create a suit planner suitPlanner = SuitPlannerTutorialAI.SuitPlannerTutorialAI( self.air, @@ -161,7 +164,7 @@ class TutorialManagerAI(DistributedObjectAI.DistributedObjectAI): blackCatMgr = DistributedBlackCatMgrAI.DistributedBlackCatMgrAI( self.air, avId) blackCatMgr.generateWithRequired(streetZone) - + zoneDict={"branchZone" : branchZone, "streetZone" : streetZone, "shopZone" : shopZone, @@ -231,7 +234,7 @@ class TutorialManagerAI(DistributedObjectAI.DistributedObjectAI): # 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 + # these values were taken by running a real tutorial self.air.questManager.assignQuest(avId, 20000, 101, @@ -239,7 +242,7 @@ class TutorialManagerAI(DistributedObjectAI.DistributedObjectAI): 1000, 1 ) - + self.air.questManager.completeAllQuestsMagically(av) av.removeQuest(101) self.air.questManager.assignQuest(avId, @@ -270,7 +273,7 @@ class TutorialManagerAI(DistributedObjectAI.DistributedObjectAI): avId = av.doId if avId in self.avIdsRequestingSkip: requestTime = self.avIdsRequestingSkip[avId] - + curTime = globalClock.getFrameTime() if (curTime - requestTime) <= self.WaitTimeForSkipTutorial: self.respondToSkipTutorial(avId, av) @@ -279,7 +282,7 @@ class TutorialManagerAI(DistributedObjectAI.DistributedObjectAI): 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.""" @@ -300,12 +303,12 @@ class TutorialManagerAI(DistributedObjectAI.DistributedObjectAI): self.notify.debugStateCall(self) avId = self.air.getAvatarIdFromSender() # Make sure the avatar exists - av = self.air.doId2do.get(avId) + 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, @@ -318,5 +321,3 @@ class TutorialManagerAI(DistributedObjectAI.DistributedObjectAI): " has exited unexpectedly") self.__destroyTutorial(avId) return - - \ No newline at end of file diff --git a/toontown/uberdog/DataStore.py b/toontown/uberdog/DataStore.py index 7b20d36..caff6fe 100644 --- a/toontown/uberdog/DataStore.py +++ b/toontown/uberdog/DataStore.py @@ -1,12 +1,15 @@ -from direct.directnotify import DirectNotifyGlobal -from panda3d.core import ConfigVariableBool -from direct.task import Task -import pickle -import os -import sys import dbm +import os +import pickle +import sys import time +from panda3d.core import ConfigVariableBool + +from direct.directnotify import DirectNotifyGlobal +from direct.task import Task + + class DataStore: QueryTypes = [] QueryTypes = dict(list(zip(QueryTypes, list(range(len(QueryTypes)))))) diff --git a/toontown/uberdog/DataStoreGlobals.py b/toontown/uberdog/DataStoreGlobals.py index dddb413..47d7f19 100644 --- a/toontown/uberdog/DataStoreGlobals.py +++ b/toontown/uberdog/DataStoreGlobals.py @@ -1,5 +1,6 @@ -from toontown.uberdog.ScavengerHuntDataStore import * from toontown.uberdog.DataStore import * +from toontown.uberdog.ScavengerHuntDataStore import * + SH = 1 GEN = 2 TYPES = {SH: (ScavengerHuntDataStore,), diff --git a/toontown/uberdog/DistributedCpuInfoMgr.py b/toontown/uberdog/DistributedCpuInfoMgr.py index 2043edf..e1bfb5a 100644 --- a/toontown/uberdog/DistributedCpuInfoMgr.py +++ b/toontown/uberdog/DistributedCpuInfoMgr.py @@ -1,4 +1,5 @@ from direct.distributed.DistributedObjectGlobal import DistributedObjectGlobal + class DistributedCpuInfoMgr(DistributedObjectGlobal): pass diff --git a/toontown/uberdog/DistributedCpuInfoMgrAI.py b/toontown/uberdog/DistributedCpuInfoMgrAI.py index b508d3b..ebb3eec 100644 --- a/toontown/uberdog/DistributedCpuInfoMgrAI.py +++ b/toontown/uberdog/DistributedCpuInfoMgrAI.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectAI import DistributedObjectAI + class DistributedCpuInfoMgrAI(DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedCpuInfoMgrAI') diff --git a/toontown/uberdog/DistributedCpuInfoMgrUD.py b/toontown/uberdog/DistributedCpuInfoMgrUD.py index bc1eabb..6eba4cf 100644 --- a/toontown/uberdog/DistributedCpuInfoMgrUD.py +++ b/toontown/uberdog/DistributedCpuInfoMgrUD.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectUD import DistributedObjectUD + class DistributedCpuInfoMgrUD(DistributedObjectUD): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedCpuInfoMgrUD') diff --git a/toontown/uberdog/DistributedDataStoreManager.py b/toontown/uberdog/DistributedDataStoreManager.py index b21a6f0..2133083 100644 --- a/toontown/uberdog/DistributedDataStoreManager.py +++ b/toontown/uberdog/DistributedDataStoreManager.py @@ -1,6 +1,8 @@ from direct.distributed.DistributedObjectGlobal import DistributedObjectGlobal + from toontown.uberdog import DataStoreGlobals + class DistributedDataStoreManager(DistributedObjectGlobal): def __init__(self): diff --git a/toontown/uberdog/DistributedDataStoreManagerAI.py b/toontown/uberdog/DistributedDataStoreManagerAI.py index f0e65ad..17303ae 100644 --- a/toontown/uberdog/DistributedDataStoreManagerAI.py +++ b/toontown/uberdog/DistributedDataStoreManagerAI.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectAI import DistributedObjectAI + class DistributedDataStoreManagerAI(DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedDataStoreManagerAI') diff --git a/toontown/uberdog/DistributedDataStoreManagerUD.py b/toontown/uberdog/DistributedDataStoreManagerUD.py index 41176ae..0ec346d 100644 --- a/toontown/uberdog/DistributedDataStoreManagerUD.py +++ b/toontown/uberdog/DistributedDataStoreManagerUD.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectUD import DistributedObjectUD + class DistributedDataStoreManagerUD(DistributedObjectUD): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedDataStoreManagerUD') diff --git a/toontown/uberdog/DistributedDeliveryManager.py b/toontown/uberdog/DistributedDeliveryManager.py index 2644a37..3736671 100644 --- a/toontown/uberdog/DistributedDeliveryManager.py +++ b/toontown/uberdog/DistributedDeliveryManager.py @@ -1,7 +1,9 @@ from panda3d.core import * + from direct.distributed.DistributedObject import DistributedObject -from toontown.catalog import CatalogItemList -from toontown.catalog import CatalogItem + +from toontown.catalog import CatalogItem, CatalogItemList + class DistributedDeliveryManager(DistributedObject): neverDisable = 1 diff --git a/toontown/uberdog/DistributedDeliveryManagerAI.py b/toontown/uberdog/DistributedDeliveryManagerAI.py index fa164f6..4479e9e 100644 --- a/toontown/uberdog/DistributedDeliveryManagerAI.py +++ b/toontown/uberdog/DistributedDeliveryManagerAI.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectAI import DistributedObjectAI + class DistributedDeliveryManagerAI(DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedDeliveryManagerAI') diff --git a/toontown/uberdog/DistributedDeliveryManagerUD.py b/toontown/uberdog/DistributedDeliveryManagerUD.py index 167c52d..009328f 100644 --- a/toontown/uberdog/DistributedDeliveryManagerUD.py +++ b/toontown/uberdog/DistributedDeliveryManagerUD.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectUD import DistributedObjectUD + class DistributedDeliveryManagerUD(DistributedObjectUD): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedDeliveryManagerUD') diff --git a/toontown/uberdog/DistributedInGameNewsMgr.py b/toontown/uberdog/DistributedInGameNewsMgr.py index 72f2b2e..7b416ef 100644 --- a/toontown/uberdog/DistributedInGameNewsMgr.py +++ b/toontown/uberdog/DistributedInGameNewsMgr.py @@ -1,11 +1,14 @@ -import socket import datetime import os -from direct.distributed.DistributedObjectGlobal import DistributedObjectGlobal +import socket + from direct.distributed.DistributedObject import DistributedObject +from direct.distributed.DistributedObjectGlobal import DistributedObjectGlobal + from toontown.toonbase import ToontownGlobals from toontown.uberdog import InGameNewsResponses + class DistributedInGameNewsMgr(DistributedObject): notify = directNotify.newCategory('InGameNewsMgr') neverDisable = 1 diff --git a/toontown/uberdog/DistributedInGameNewsMgrAI.py b/toontown/uberdog/DistributedInGameNewsMgrAI.py index ed199d1..8cf85e8 100644 --- a/toontown/uberdog/DistributedInGameNewsMgrAI.py +++ b/toontown/uberdog/DistributedInGameNewsMgrAI.py @@ -1,6 +1,7 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectAI import DistributedObjectAI + class DistributedInGameNewsMgrAI(DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedInGameNewsMgrAI') diff --git a/toontown/uberdog/DistributedInGameNewsMgrUD.py b/toontown/uberdog/DistributedInGameNewsMgrUD.py index 00caf75..f358948 100644 --- a/toontown/uberdog/DistributedInGameNewsMgrUD.py +++ b/toontown/uberdog/DistributedInGameNewsMgrUD.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectUD import DistributedObjectUD + class DistributedInGameNewsMgrUD(DistributedObjectUD): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedInGameNewsMgrUD') diff --git a/toontown/uberdog/DistributedMailManager.py b/toontown/uberdog/DistributedMailManager.py index 59cbfde..22544aa 100644 --- a/toontown/uberdog/DistributedMailManager.py +++ b/toontown/uberdog/DistributedMailManager.py @@ -1,4 +1,5 @@ from direct.distributed.DistributedObject import DistributedObject + class DistributedMailManager(DistributedObject): neverDisable = 1 diff --git a/toontown/uberdog/DistributedMailManagerAI.py b/toontown/uberdog/DistributedMailManagerAI.py index 9d5acfe..9739505 100644 --- a/toontown/uberdog/DistributedMailManagerAI.py +++ b/toontown/uberdog/DistributedMailManagerAI.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectAI import DistributedObjectAI + class DistributedMailManagerAI(DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedMailManagerAI') diff --git a/toontown/uberdog/DistributedMailManagerUD.py b/toontown/uberdog/DistributedMailManagerUD.py index 9f67093..3059ad2 100644 --- a/toontown/uberdog/DistributedMailManagerUD.py +++ b/toontown/uberdog/DistributedMailManagerUD.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectUD import DistributedObjectUD + class DistributedMailManagerUD(DistributedObjectUD): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedMailManagerUD') diff --git a/toontown/uberdog/DistributedPartyManager.py b/toontown/uberdog/DistributedPartyManager.py index 30a2c7e..e4383d8 100644 --- a/toontown/uberdog/DistributedPartyManager.py +++ b/toontown/uberdog/DistributedPartyManager.py @@ -1,10 +1,12 @@ +from panda3d.otp import CFSpeech, CFTimeout + from direct.distributed.DistributedObject import DistributedObject from direct.distributed.DistributedObjectGlobal import DistributedObjectGlobal -from panda3d.otp import CFSpeech, CFTimeout -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import TTLocalizer -from toontown.toon import ToonDNA + from toontown.parties import PartyGlobals +from toontown.toon import ToonDNA +from toontown.toonbase import ToontownGlobals, TTLocalizer + class DistributedPartyManager(DistributedObject): neverDisable = 1 diff --git a/toontown/uberdog/DistributedPartyManagerAI.py b/toontown/uberdog/DistributedPartyManagerAI.py index 75866e7..41dff4a 100644 --- a/toontown/uberdog/DistributedPartyManagerAI.py +++ b/toontown/uberdog/DistributedPartyManagerAI.py @@ -1,6 +1,7 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectAI import DistributedObjectAI + class DistributedPartyManagerAI(DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedPartyManagerAI') diff --git a/toontown/uberdog/DistributedPartyManagerUD.py b/toontown/uberdog/DistributedPartyManagerUD.py index acff337..d9e8d04 100644 --- a/toontown/uberdog/DistributedPartyManagerUD.py +++ b/toontown/uberdog/DistributedPartyManagerUD.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectUD import DistributedObjectUD + class DistributedPartyManagerUD(DistributedObjectUD): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedPartyManagerUD') diff --git a/toontown/uberdog/DistributedSecurityMgr.py b/toontown/uberdog/DistributedSecurityMgr.py index 98fbf89..bf8b36d 100644 --- a/toontown/uberdog/DistributedSecurityMgr.py +++ b/toontown/uberdog/DistributedSecurityMgr.py @@ -1,10 +1,13 @@ -import socket import datetime import os -from direct.distributed.DistributedObjectGlobal import DistributedObjectGlobal +import socket + from direct.distributed.DistributedObject import DistributedObject +from direct.distributed.DistributedObjectGlobal import DistributedObjectGlobal + from toontown.toonbase import ToontownGlobals + class DistributedSecurityMgr(DistributedObject): notify = directNotify.newCategory('SecurityMgr') neverDisable = 1 diff --git a/toontown/uberdog/DistributedSecurityMgrAI.py b/toontown/uberdog/DistributedSecurityMgrAI.py index 2fec39c..f411aae 100644 --- a/toontown/uberdog/DistributedSecurityMgrAI.py +++ b/toontown/uberdog/DistributedSecurityMgrAI.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectAI import DistributedObjectAI + class DistributedSecurityMgrAI(DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedSecurityMgrAI') diff --git a/toontown/uberdog/DistributedSecurityMgrUD.py b/toontown/uberdog/DistributedSecurityMgrUD.py index 77db775..966c73a 100644 --- a/toontown/uberdog/DistributedSecurityMgrUD.py +++ b/toontown/uberdog/DistributedSecurityMgrUD.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectUD import DistributedObjectUD + class DistributedSecurityMgrUD(DistributedObjectUD): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedSecurityMgrUD') diff --git a/toontown/uberdog/DistributedWhitelistMgr.py b/toontown/uberdog/DistributedWhitelistMgr.py index e8672d2..5afe6d8 100644 --- a/toontown/uberdog/DistributedWhitelistMgr.py +++ b/toontown/uberdog/DistributedWhitelistMgr.py @@ -1,10 +1,13 @@ -import socket import datetime import os -from direct.distributed.DistributedObjectGlobal import DistributedObjectGlobal +import socket + from direct.distributed.DistributedObject import DistributedObject +from direct.distributed.DistributedObjectGlobal import DistributedObjectGlobal + from toontown.toonbase import ToontownGlobals + class DistributedWhitelistMgr(DistributedObject): notify = directNotify.newCategory('WhitelistMgr') neverDisable = 1 diff --git a/toontown/uberdog/DistributedWhitelistMgrAI.py b/toontown/uberdog/DistributedWhitelistMgrAI.py index 88fd5ce..5ecce53 100644 --- a/toontown/uberdog/DistributedWhitelistMgrAI.py +++ b/toontown/uberdog/DistributedWhitelistMgrAI.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectAI import DistributedObjectAI + class DistributedWhitelistMgrAI(DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedWhitelistMgrAI') diff --git a/toontown/uberdog/DistributedWhitelistMgrUD.py b/toontown/uberdog/DistributedWhitelistMgrUD.py index 6c39f1f..dce95c0 100644 --- a/toontown/uberdog/DistributedWhitelistMgrUD.py +++ b/toontown/uberdog/DistributedWhitelistMgrUD.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectUD import DistributedObjectUD + class DistributedWhitelistMgrUD(DistributedObjectUD): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedWhitelistMgrUD') diff --git a/toontown/uberdog/ScavengerHuntDataStore.py b/toontown/uberdog/ScavengerHuntDataStore.py index 33e548b..9466c4d 100644 --- a/toontown/uberdog/ScavengerHuntDataStore.py +++ b/toontown/uberdog/ScavengerHuntDataStore.py @@ -1,6 +1,8 @@ from direct.directnotify import DirectNotifyGlobal + from toontown.uberdog.DataStore import * + class ScavengerHuntDataStore(DataStore): QueryTypes = DataStore.addQueryTypes(['GetGoals', 'AddGoal']) notify = DirectNotifyGlobal.directNotify.newCategory('ScavengerHuntDataStore') diff --git a/toontown/uberdog/TTSpeedchatRelay.py b/toontown/uberdog/TTSpeedchatRelay.py index 1bb965c..cb9984c 100644 --- a/toontown/uberdog/TTSpeedchatRelay.py +++ b/toontown/uberdog/TTSpeedchatRelay.py @@ -1,8 +1,10 @@ -from direct.distributed.DistributedObjectGlobal import DistributedObjectGlobal from direct.directnotify.DirectNotifyGlobal import directNotify +from direct.distributed.DistributedObjectGlobal import DistributedObjectGlobal + from otp.otpbase import OTPGlobals -from otp.uberdog.SpeedchatRelay import SpeedchatRelay from otp.uberdog import SpeedchatRelayGlobals +from otp.uberdog.SpeedchatRelay import SpeedchatRelay + class TTSpeedchatRelay(SpeedchatRelay): diff --git a/toontown/uberdog/TTSpeedchatRelayUD.py b/toontown/uberdog/TTSpeedchatRelayUD.py index e5c41ce..24d9232 100644 --- a/toontown/uberdog/TTSpeedchatRelayUD.py +++ b/toontown/uberdog/TTSpeedchatRelayUD.py @@ -1,5 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectUD import DistributedObjectUD + class TTSpeedchatRelayUD(DistributedObjectUD): notify = DirectNotifyGlobal.directNotify.newCategory('TTSpeedchatRelayUD') diff --git a/toontown/uberdog/ToontownUDRepository.py b/toontown/uberdog/ToontownUDRepository.py index 9ee9b85..4544883 100644 --- a/toontown/uberdog/ToontownUDRepository.py +++ b/toontown/uberdog/ToontownUDRepository.py @@ -4,10 +4,10 @@ from direct.directnotify import DirectNotifyGlobal from otp.distributed.DistributedDirectoryAI import DistributedDirectoryAI from otp.distributed.OtpDoGlobals import * + from toontown.distributed.ToontownInternalRepository import ToontownInternalRepository from toontown.parties.ToontownTimeManager import ToontownTimeManager - # TODO: Remove Astron dependence. class ToontownUDRepository(ToontownInternalRepository): diff --git a/toontown/uberdog/UDStart.py b/toontown/uberdog/UDStart.py index 332a2cd..75b8e51 100644 --- a/toontown/uberdog/UDStart.py +++ b/toontown/uberdog/UDStart.py @@ -1,7 +1,7 @@ -from panda3d.core import * +import argparse import builtins -import argparse +from panda3d.core import * parser = argparse.ArgumentParser(description="Open Toontown - UberDOG Server") parser.add_argument('--base-channel', help='The base channel that the server will use.') @@ -41,6 +41,7 @@ builtins.game = game loadPrcFile('etc/Configrc.prc') from otp.ai.AIBaseGlobal import * + from toontown.uberdog.ToontownUDRepository import ToontownUDRepository simbase.air = ToontownUDRepository(ConfigVariableInt('air-base-channel', 1000000).value, ConfigVariableInt('air-stateserver', 4002).value) diff --git a/vscode.code-workspace b/vscode.code-workspace index 18db2f1..9759fcb 100644 --- a/vscode.code-workspace +++ b/vscode.code-workspace @@ -33,4 +33,4 @@ "**/win32": true } } - } \ No newline at end of file + } diff --git a/win32/.vscode/tasks.json b/win32/.vscode/tasks.json index 4d60e2f..1104187 100644 --- a/win32/.vscode/tasks.json +++ b/win32/.vscode/tasks.json @@ -44,4 +44,4 @@ } }, ] - } \ No newline at end of file + }