diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml deleted file mode 100644 index 3de1bbb..0000000 --- a/.pre-commit-config.yaml +++ /dev/null @@ -1,15 +0,0 @@ -# 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 098a23c..a886a48 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 9511453..522e1ba 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 bfbf3ae..a69faff 100644 --- a/otp/ai/AIBase.py +++ b/otp/ai/AIBase.py @@ -1,23 +1,21 @@ -import gc +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 math import sys import time - -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 - +import gc class AIBase: notify = directNotify.newCategory('AIBase') diff --git a/otp/ai/AIBaseGlobal.py b/otp/ai/AIBaseGlobal.py index ba5e1af..7d8f8fc 100644 --- a/otp/ai/AIBaseGlobal.py +++ b/otp/ai/AIBaseGlobal.py @@ -1,5 +1,4 @@ from .AIBase import * - __builtins__['simbase'] = AIBase() __builtins__['ostream'] = Notify.out() __builtins__['run'] = simbase.run @@ -11,7 +10,6 @@ __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 7b7b7ea..06bd641 100644 --- a/otp/ai/AIMsgTypes.py +++ b/otp/ai/AIMsgTypes.py @@ -1,7 +1,5 @@ -from direct.showbase.PythonUtil import invertDictLossless - from otp.distributed.OtpDoGlobals import * - +from direct.showbase.PythonUtil import invertDictLossless 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 1c9a640..45c4a28 100644 --- a/otp/ai/AIZoneData.py +++ b/otp/ai/AIZoneData.py @@ -1,14 +1,10 @@ -import random - from panda3d.core import * - -from direct.directnotify.DirectNotifyGlobal import directNotify from direct.distributed import ParentMgr -from direct.showbase import LeakDetectors +from direct.directnotify.DirectNotifyGlobal import directNotify from direct.task import Task - +from direct.showbase import LeakDetectors from otp.otpbase import OTPGlobals - +import random class AIZoneData: notify = directNotify.newCategory('AIZoneData') diff --git a/otp/ai/BanManagerAI.py b/otp/ai/BanManagerAI.py index 64451ab..4352b97 100644 --- a/otp/ai/BanManagerAI.py +++ b/otp/ai/BanManagerAI.py @@ -1,13 +1,8 @@ +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 e140270..dce9a04 100644 --- a/otp/ai/Barrier.py +++ b/otp/ai/Barrier.py @@ -1,10 +1,7 @@ -import random - -from direct.showbase import DirectObject -from direct.task import Task - from otp.ai.AIBase import * - +from direct.task import Task +from direct.showbase import DirectObject +import random class Barrier(DirectObject.DirectObject): notify = directNotify.newCategory('Barrier') diff --git a/otp/ai/GarbageLeakServerEventAggregator.py b/otp/ai/GarbageLeakServerEventAggregator.py index 3b01b71..5a92d74 100644 --- a/otp/ai/GarbageLeakServerEventAggregator.py +++ b/otp/ai/GarbageLeakServerEventAggregator.py @@ -1,6 +1,5 @@ -from direct.showbase import GarbageReport from direct.showbase.DirectObject import DirectObject - +from direct.showbase import GarbageReport class GarbageLeakServerEventAggregator(DirectObject): diff --git a/otp/ai/TimeManager.py b/otp/ai/TimeManager.py index 37d8e15..dd90517 100644 --- a/otp/ai/TimeManager.py +++ b/otp/ai/TimeManager.py @@ -1,21 +1,18 @@ -import base64 -import os -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.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 class TimeManager(DistributedObject.DistributedObject): notify = DirectNotifyGlobal.directNotify.newCategory('TimeManager') diff --git a/otp/avatar/Avatar.py b/otp/avatar/Avatar.py index 02927dc..f80e89b 100644 --- a/otp/avatar/Avatar.py +++ b/otp/avatar/Avatar.py @@ -1,17 +1,15 @@ -import random - from panda3d.core import * -from panda3d.otp import (CFNoQuitButton, CFPageButton, CFQuitButton, CFSpeech, CFThought, CFTimeout, Nametag, - NametagGroup) - +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 direct.actor.Actor import Actor from direct.directnotify import DirectNotifyGlobal from direct.distributed import ClockDelta - from otp.avatar.ShadowCaster import ShadowCaster -from otp.otpbase import OTPGlobals, OTPLocalizer, OTPRender +import random +from otp.otpbase import 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 7562812..20e6f61 100644 --- a/otp/avatar/AvatarDNA.py +++ b/otp/avatar/AvatarDNA.py @@ -1,11 +1,8 @@ -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 - notify = directNotify.newCategory('AvatarDNA') class AvatarDNA: diff --git a/otp/avatar/AvatarDetail.py b/otp/avatar/AvatarDetail.py index c1dc4f0..662fe6f 100644 --- a/otp/avatar/AvatarDetail.py +++ b/otp/avatar/AvatarDetail.py @@ -1,8 +1,6 @@ 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 5c337c7..5ac2272 100644 --- a/otp/avatar/AvatarPanel.py +++ b/otp/avatar/AvatarPanel.py @@ -1,11 +1,8 @@ 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 523952f..3e4ce1b 100644 --- a/otp/avatar/DistributedAvatar.py +++ b/otp/avatar/DistributedAvatar.py @@ -1,23 +1,20 @@ -import random -import string import time - +import string from panda3d.core import * -from panda3d.otp import Nametag - -from direct.actor.DistributedActor import DistributedActor from direct.distributed import DistributedNode +from direct.actor.DistributedActor import DistributedActor 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 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 . import AvatarDNA +from otp.chat import ChatGarbler +from otp.chat import ChatManager +import random from .Avatar import Avatar - +from . import AvatarDNA class DistributedAvatar(DistributedActor, Avatar): HpTextGenerator = TextNode('HpTextGenerator') diff --git a/otp/avatar/DistributedAvatarAI.py b/otp/avatar/DistributedAvatarAI.py index da03c97..6e5bb17 100644 --- a/otp/avatar/DistributedAvatarAI.py +++ b/otp/avatar/DistributedAvatarAI.py @@ -1,10 +1,9 @@ -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 cb4dd9b..0c8b347 100644 --- a/otp/avatar/DistributedAvatarUD.py +++ b/otp/avatar/DistributedAvatarUD.py @@ -1,6 +1,5 @@ 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 3b598ea..b7f6a5c 100644 --- a/otp/avatar/DistributedPlayer.py +++ b/otp/avatar/DistributedPlayer.py @@ -1,17 +1,18 @@ from panda3d.core import * -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 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 otp.avatar.Avatar import teleportNotify +from otp.distributed.TelemetryLimited import TelemetryLimited if ConfigVariableBool('want-chatfilter-hacks', 0).value: - import os - from otp.switchboard import badwordpy + import os 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 2278ca0..0bde086 100644 --- a/otp/avatar/DistributedPlayerAI.py +++ b/otp/avatar/DistributedPlayerAI.py @@ -1,11 +1,10 @@ from direct.showbase import GarbageReport - from otp.ai.AIBaseGlobal import * -from otp.avatar import DistributedAvatarAI, PlayerBase +from otp.avatar import DistributedAvatarAI +from otp.avatar import 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 5f7ba00..6c36dca 100644 --- a/otp/avatar/Emote.py +++ b/otp/avatar/Emote.py @@ -1,6 +1,5 @@ from otp.otpbase import OTPLocalizer - class Emote: EmoteClear = -1 EmoteEnableStateChanged = 'EmoteEnableStateChanged' diff --git a/otp/avatar/LocalAvatar.py b/otp/avatar/LocalAvatar.py index 907d95a..8af6d4b 100644 --- a/otp/avatar/LocalAvatar.py +++ b/otp/avatar/LocalAvatar.py @@ -1,27 +1,23 @@ -import math -import random - 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 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 d11ba5a..5ab5ba3 100644 --- a/otp/avatar/PositionExaminer.py +++ b/otp/avatar/PositionExaminer.py @@ -1,10 +1,7 @@ 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 b69571e..be417ba 100644 --- a/otp/avatar/ShadowCaster.py +++ b/otp/avatar/ShadowCaster.py @@ -1,10 +1,8 @@ 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 a67c31d..3167081 100644 --- a/otp/avatar/SpeedMonitor.py +++ b/otp/avatar/SpeedMonitor.py @@ -1,7 +1,6 @@ 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 db8ae93..1503131 100644 --- a/otp/chat/ChatGarbler.py +++ b/otp/chat/ChatGarbler.py @@ -1,9 +1,7 @@ -import random import string - +import random 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 4fb9bdc..b7248b1 100644 --- a/otp/chat/ChatGlobals.py +++ b/otp/chat/ChatGlobals.py @@ -1,5 +1,4 @@ import string - NORMAL_CHAT = 1 WHISPER_CHAT = 2 GUILD_CHAT = 3 diff --git a/otp/chat/ChatInputNormal.py b/otp/chat/ChatInputNormal.py index 0a24933..c6248bb 100644 --- a/otp/chat/ChatInputNormal.py +++ b/otp/chat/ChatInputNormal.py @@ -1,12 +1,9 @@ -import sys - -from panda3d.core import * - -from direct.gui.DirectGui import * from direct.showbase import DirectObject - -from otp.otpbase import OTPGlobals, OTPLocalizer - +from otp.otpbase import OTPGlobals +import sys +from direct.gui.DirectGui import * +from panda3d.core import * +from otp.otpbase import OTPLocalizer class ChatInputNormal(DirectObject.DirectObject): ExecNamespace = None diff --git a/otp/chat/ChatInputTyped.py b/otp/chat/ChatInputTyped.py index 4437d9e..03027de 100644 --- a/otp/chat/ChatInputTyped.py +++ b/otp/chat/ChatInputTyped.py @@ -1,12 +1,9 @@ -import sys - -from panda3d.core import * - -from direct.gui.DirectGui import * from direct.showbase import DirectObject - -from otp.otpbase import OTPGlobals, OTPLocalizer - +from otp.otpbase import OTPGlobals +import sys +from direct.gui.DirectGui import * +from panda3d.core import * +from otp.otpbase import OTPLocalizer class ChatInputTyped(DirectObject.DirectObject): ExecNamespace = None diff --git a/otp/chat/ChatInputWhiteListFrame.py b/otp/chat/ChatInputWhiteListFrame.py index 7ed94fa..a40c91b 100644 --- a/otp/chat/ChatInputWhiteListFrame.py +++ b/otp/chat/ChatInputWhiteListFrame.py @@ -1,16 +1,13 @@ +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 direct.directnotify import DirectNotifyGlobal -from direct.fsm import FSM -from direct.gui.DirectGui import * +from otp.otpbase import OTPLocalizer 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 61e3f1e..bd57595 100644 --- a/otp/chat/ChatManager.py +++ b/otp/chat/ChatManager.py @@ -1,15 +1,14 @@ import string - -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 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 * ChatEvent = 'ChatEvent' NormalChatEvent = 'NormalChatEvent' SCChatEvent = 'SCChatEvent' diff --git a/otp/chat/TalkAssistant.py b/otp/chat/TalkAssistant.py index 327c1ef..66464d9 100644 --- a/otp/chat/TalkAssistant.py +++ b/otp/chat/TalkAssistant.py @@ -1,19 +1,16 @@ import sys -import time - -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 otp.chat.TalkGlobals import * -from otp.chat.TalkHandle import TalkHandle -from otp.chat.TalkMessage import TalkMessage -from otp.otpbase import OTPGlobals, OTPLocalizer +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 otp.chat.ChatGlobals import * +from panda3d.otp import CFSpeech, CFTimeout, CFThought ThoughtPrefix = '.' class TalkAssistant(DirectObject.DirectObject): diff --git a/otp/chat/TalkHandle.py b/otp/chat/TalkHandle.py index 21203c9..527cd67 100644 --- a/otp/chat/TalkHandle.py +++ b/otp/chat/TalkHandle.py @@ -1,6 +1,5 @@ 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 05d507a..4c2ab94 100644 --- a/otp/chat/WhiteList.py +++ b/otp/chat/WhiteList.py @@ -1,6 +1,5 @@ from bisect import bisect_left - class WhiteList: def __init__(self, wordlist): diff --git a/otp/distributed/Account.py b/otp/distributed/Account.py index 8736148..6f0648b 100644 --- a/otp/distributed/Account.py +++ b/otp/distributed/Account.py @@ -1,6 +1,5 @@ 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 082b461..651ecf3 100644 --- a/otp/distributed/CentralLogger.py +++ b/otp/distributed/CentralLogger.py @@ -1,5 +1,4 @@ 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 97c38f5..b6345d8 100644 --- a/otp/distributed/ClsendTracker.py +++ b/otp/distributed/ClsendTracker.py @@ -1,9 +1,6 @@ -import random - from panda3d.core import StringStream - from direct.distributed.PyDatagram import PyDatagram - +import random class ClsendTracker: clsendNotify = directNotify.newCategory('clsend') diff --git a/otp/distributed/DistributedDirectory.py b/otp/distributed/DistributedDirectory.py index a1d1bcc..4863db7 100644 --- a/otp/distributed/DistributedDirectory.py +++ b/otp/distributed/DistributedDirectory.py @@ -1,5 +1,4 @@ from direct.distributed.DistributedObject import DistributedObject - class DistributedDirectory(DistributedObject): pass diff --git a/otp/distributed/DistributedDistrict.py b/otp/distributed/DistributedDistrict.py index 501f5e6..560ae39 100644 --- a/otp/distributed/DistributedDistrict.py +++ b/otp/distributed/DistributedDistrict.py @@ -1,7 +1,6 @@ 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 e200c3a..0adf004 100644 --- a/otp/distributed/DistributedTestObject.py +++ b/otp/distributed/DistributedTestObject.py @@ -1,6 +1,5 @@ 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 404b903..b555155 100644 --- a/otp/distributed/GameServerTestSuite.py +++ b/otp/distributed/GameServerTestSuite.py @@ -1,7 +1,6 @@ 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 341001f..f169ed1 100644 --- a/otp/distributed/OTPClientRepository.py +++ b/otp/distributed/OTPClientRepository.py @@ -1,41 +1,45 @@ -import gc -import os -import random import sys import time -from enum import IntEnum - +import random +import gc +import os 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.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.GarbageReportScheduler import GarbageReportScheduler from direct.task import Task - -from otp.ai.GarbageLeakServerEventAggregator import GarbageLeakServerEventAggregator +from direct.distributed import DistributedSmoothNode +from direct.showbase import PythonUtil, GarbageReport +from direct.showbase.ContainerLeakDetector import ContainerLeakDetector +from direct.showbase import MessengerLeakDetector +from direct.showbase.GarbageReportScheduler import GarbageReportScheduler +from direct.showbase import LeakDetectors +from direct.distributed.PyDatagram import PyDatagram from 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 import 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.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 otp.ai.GarbageLeakServerEventAggregator import GarbageLeakServerEventAggregator 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 873e165..4341a48 100644 --- a/otp/distributed/OTPInternalRepository.py +++ b/otp/distributed/OTPInternalRepository.py @@ -1,9 +1,10 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.AstronInternalRepository import AstronInternalRepository -from direct.distributed.MsgTypes import * from direct.distributed.PyDatagram import * +from direct.distributed.MsgTypes import * from direct.showbase.PythonUtil import makeList + # TODO: Remove Astron dependence. class OTPInternalRepository(AstronInternalRepository): @@ -42,7 +43,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 d7b52a7..18c8087 100644 --- a/otp/distributed/ObjectServer.py +++ b/otp/distributed/ObjectServer.py @@ -1,7 +1,6 @@ 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 34198a2..c456edf 100644 --- a/otp/distributed/OtpDoGlobals.py +++ b/otp/distributed/OtpDoGlobals.py @@ -1,5 +1,4 @@ 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 d168b76..6a104bc 100644 --- a/otp/distributed/TelemetryLimiter.py +++ b/otp/distributed/TelemetryLimiter.py @@ -1,8 +1,6 @@ from direct.showbase.DirectObject import DirectObject -from direct.task.Task import Task - from otp.avatar.DistributedPlayer import DistributedPlayer - +from direct.task.Task import Task class TelemetryLimiter(DirectObject): TaskName = 'TelemetryLimiterEnforce' diff --git a/otp/friends/AvatarFriendInfo.py b/otp/friends/AvatarFriendInfo.py index b5a1fbc..e52e2fd 100644 --- a/otp/friends/AvatarFriendInfo.py +++ b/otp/friends/AvatarFriendInfo.py @@ -1,6 +1,5 @@ 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 27e7b17..4d8f7a1 100644 --- a/otp/friends/AvatarFriendsManager.py +++ b/otp/friends/AvatarFriendsManager.py @@ -1,9 +1,8 @@ -from direct.directnotify.DirectNotifyGlobal import directNotify from direct.distributed.DistributedObjectGlobal import DistributedObjectGlobal - -from otp.otpbase import OTPGlobals, OTPLocalizer +from direct.directnotify.DirectNotifyGlobal import directNotify 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 f1801a8..f8352ee 100644 --- a/otp/friends/AvatarFriendsManagerUD.py +++ b/otp/friends/AvatarFriendsManagerUD.py @@ -1,6 +1,5 @@ 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 2c784de..5d60562 100644 --- a/otp/friends/FriendInfo.py +++ b/otp/friends/FriendInfo.py @@ -1,6 +1,5 @@ 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 c97ecd3..0cfa256 100644 --- a/otp/friends/FriendManager.py +++ b/otp/friends/FriendManager.py @@ -1,11 +1,8 @@ from panda3d.core import * - -from direct.directnotify import DirectNotifyGlobal from direct.distributed import DistributedObject - +from direct.directnotify import DirectNotifyGlobal 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 96088d2..616cfbc 100644 --- a/otp/friends/FriendManagerAI.py +++ b/otp/friends/FriendManagerAI.py @@ -1,6 +1,5 @@ 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 659e4f4..0b01bd2 100644 --- a/otp/friends/FriendSecret.py +++ b/otp/friends/FriendSecret.py @@ -1,13 +1,11 @@ from panda3d.core import * from panda3d.otp import * - +from direct.gui.DirectGui import * from direct.directnotify import DirectNotifyGlobal from direct.fsm import StateData -from direct.gui.DirectGui import * - -from otp.otpbase import OTPGlobals, OTPLocalizer +from otp.otpbase import OTPLocalizer +from otp.otpbase import OTPGlobals from otp.uberdog import RejectCode - globalFriendSecret = None AccountSecret = 0 AvatarSecret = 1 diff --git a/otp/friends/GuildManager.py b/otp/friends/GuildManager.py index f4d00de..b3a98ac 100644 --- a/otp/friends/GuildManager.py +++ b/otp/friends/GuildManager.py @@ -1,18 +1,16 @@ -from direct.directnotify.DirectNotifyGlobal import directNotify from direct.distributed.DistributedObjectGlobal import DistributedObjectGlobal - -from otp.ai import AIInterestHandles -from otp.avatar.AvatarHandle import AvatarHandle +from direct.directnotify.DirectNotifyGlobal import directNotify from otp.distributed import OtpDoGlobals -from otp.otpbase import OTPGlobals, OTPLocalizer - +from otp.otpbase import OTPLocalizer +from otp.otpbase import OTPGlobals +from otp.avatar.AvatarHandle import AvatarHandle +from otp.ai import AIInterestHandles 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 21393cc..fff20ef 100644 --- a/otp/friends/GuildManagerAI.py +++ b/otp/friends/GuildManagerAI.py @@ -1,6 +1,5 @@ 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 ab8ff04..3be98c4 100644 --- a/otp/friends/GuildManagerUD.py +++ b/otp/friends/GuildManagerUD.py @@ -1,6 +1,5 @@ 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 de8c03f..e766404 100644 --- a/otp/friends/PlayerFriendsManager.py +++ b/otp/friends/PlayerFriendsManager.py @@ -1,10 +1,8 @@ -from direct.directnotify.DirectNotifyGlobal import directNotify from direct.distributed.DistributedObjectGlobal import DistributedObjectGlobal - +from direct.directnotify.DirectNotifyGlobal import directNotify +from otp.otpbase import OTPGlobals 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 a0708ab..a590d8a 100644 --- a/otp/friends/PlayerFriendsManagerUD.py +++ b/otp/friends/PlayerFriendsManagerUD.py @@ -1,6 +1,5 @@ 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 b51817a..f751c47 100644 --- a/otp/launcher/DownloadWatcher.py +++ b/otp/launcher/DownloadWatcher.py @@ -1,11 +1,8 @@ -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 - +from direct.gui.DirectGui import * +from panda3d.core import * +from direct.showbase.DirectObject import DirectObject class DownloadWatcher(DirectObject): diff --git a/otp/launcher/DummyLauncherBase.py b/otp/launcher/DummyLauncherBase.py index 151adbb..0b5047c 100644 --- a/otp/launcher/DummyLauncherBase.py +++ b/otp/launcher/DummyLauncherBase.py @@ -1,9 +1,7 @@ from panda3d.core import * - from direct.showbase.MessengerGlobal import * -from direct.task.Task import Task from direct.task.TaskManagerGlobal import * - +from direct.task.Task import Task class DummyLauncherBase: diff --git a/otp/launcher/LauncherBase.py b/otp/launcher/LauncherBase.py index 1d30550..b10bc7c 100644 --- a/otp/launcher/LauncherBase.py +++ b/otp/launcher/LauncherBase.py @@ -1,15 +1,12 @@ -import builtins -import os import sys +import os import time - +import builtins 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 fa3f86a..019bcfc 100644 --- a/otp/level/AmbientSound.py +++ b/otp/level/AmbientSound.py @@ -1,9 +1,6 @@ -import random - from direct.interval.IntervalGlobal import * - from . import BasicEntities - +import random class AmbientSound(BasicEntities.NodePathEntity): diff --git a/otp/level/BasicEntities.py b/otp/level/BasicEntities.py index c92de08..4497692 100644 --- a/otp/level/BasicEntities.py +++ b/otp/level/BasicEntities.py @@ -1,8 +1,7 @@ +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 67fd918..63537e7 100644 --- a/otp/level/CollisionSolidEntity.py +++ b/otp/level/CollisionSolidEntity.py @@ -1,12 +1,8 @@ from panda3d.core import * - -from direct.directnotify import DirectNotifyGlobal - from otp.otpbase import OTPGlobals - +from direct.directnotify import DirectNotifyGlobal 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 f0e0c7a..0bf759f 100644 --- a/otp/level/CutScene.py +++ b/otp/level/CutScene.py @@ -1,15 +1,13 @@ -from panda3d.core import * - -from direct.directnotify import DirectNotifyGlobal -from direct.distributed.ClockDelta import * -from direct.fsm import ClassicFSM -from direct.interval.IntervalGlobal import * from direct.showbase import DirectObject - -from toontown.toonbase import ToontownGlobals - +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 def nothing(self, track, subjectNodePath, duration): return track diff --git a/otp/level/DistributedEntity.py b/otp/level/DistributedEntity.py index 49d6d2e..f2d746b 100644 --- a/otp/level/DistributedEntity.py +++ b/otp/level/DistributedEntity.py @@ -1,8 +1,6 @@ -from direct.directnotify import DirectNotifyGlobal from direct.distributed import DistributedObject - from . import Entity - +from direct.directnotify import DirectNotifyGlobal class DistributedEntity(DistributedObject.DistributedObject, Entity.Entity): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedEntity') diff --git a/otp/level/DistributedEntityAI.py b/otp/level/DistributedEntityAI.py index 763cd49..f7f0353 100644 --- a/otp/level/DistributedEntityAI.py +++ b/otp/level/DistributedEntityAI.py @@ -1,8 +1,6 @@ -from direct.directnotify import DirectNotifyGlobal from direct.distributed import DistributedObjectAI - from . import Entity - +from direct.directnotify import DirectNotifyGlobal class DistributedEntityAI(DistributedObjectAI.DistributedObjectAI, Entity.Entity): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedEntityAI') diff --git a/otp/level/DistributedInteractiveEntity.py b/otp/level/DistributedInteractiveEntity.py index 6629505..774e211 100644 --- a/otp/level/DistributedInteractiveEntity.py +++ b/otp/level/DistributedInteractiveEntity.py @@ -1,12 +1,9 @@ from panda3d.core import * - -from direct.directnotify import DirectNotifyGlobal from direct.distributed.ClockDelta import * +from direct.directnotify import DirectNotifyGlobal 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 9a9d223..79ad592 100644 --- a/otp/level/DistributedInteractiveEntityAI.py +++ b/otp/level/DistributedInteractiveEntityAI.py @@ -1,6 +1,5 @@ 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 a2c6fdb..9adf7b7 100644 --- a/otp/level/DistributedLevel.py +++ b/otp/level/DistributedLevel.py @@ -1,22 +1,19 @@ -import random - -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 panda3d.core import * +from direct.showbase.PythonUtil import Functor, sameElements, list2dict, uniqueElements 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 . import EntityCreator, Level, LevelConstants, LevelUtil - +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 class DistributedLevel(DistributedObject.DistributedObject, Level.Level): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedLevel') diff --git a/otp/level/DistributedLevelAI.py b/otp/level/DistributedLevelAI.py index 7b7d2f8..a0f66e3 100644 --- a/otp/level/DistributedLevelAI.py +++ b/otp/level/DistributedLevelAI.py @@ -1,14 +1,11 @@ from panda3d.core import * - -from direct.directnotify import DirectNotifyGlobal -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 - +from direct.distributed.ClockDelta import * +from direct.distributed import DistributedObjectAI +from . import Level +from direct.directnotify import DirectNotifyGlobal +from . import EntityCreatorAI +from direct.showbase.PythonUtil import Functor, weightedChoice class DistributedLevelAI(DistributedObjectAI.DistributedObjectAI, Level.Level): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedLevelAI') diff --git a/otp/level/EditMgr.py b/otp/level/EditMgr.py index 9224235..11297a2 100644 --- a/otp/level/EditMgr.py +++ b/otp/level/EditMgr.py @@ -1,5 +1,4 @@ from . import EditMgrBase - class EditMgr(EditMgrBase.EditMgrBase): pass diff --git a/otp/level/EditMgrAI.py b/otp/level/EditMgrAI.py index 62c2a7c..cfaf83c 100644 --- a/otp/level/EditMgrAI.py +++ b/otp/level/EditMgrAI.py @@ -1,8 +1,6 @@ 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 91a9bd2..81fcf7f 100644 --- a/otp/level/EditMgrBase.py +++ b/otp/level/EditMgrBase.py @@ -1,7 +1,5 @@ -from direct.directnotify import DirectNotifyGlobal - from . import Entity - +from direct.directnotify import DirectNotifyGlobal class EditMgrBase(Entity.Entity): notify = DirectNotifyGlobal.directNotify.newCategory('EditMgr') diff --git a/otp/level/EditorGlobals.py b/otp/level/EditorGlobals.py index 814385b..7edb648 100644 --- a/otp/level/EditorGlobals.py +++ b/otp/level/EditorGlobals.py @@ -1,5 +1,4 @@ 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 cba801c..985dd84 100644 --- a/otp/level/Entity.py +++ b/otp/level/Entity.py @@ -1,7 +1,6 @@ -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 85f3bb8..ec20345 100644 --- a/otp/level/EntityCreator.py +++ b/otp/level/EntityCreator.py @@ -1,8 +1,19 @@ +from . import CutScene +from . import EntityCreatorBase +from . import BasicEntities from direct.directnotify import DirectNotifyGlobal - -from . import (AmbientSound, BasicEntities, CollisionSolidEntity, CutScene, EditMgr, EntityCreatorBase, EntrancePoint, - LevelMgr, LocatorEntity, LogicGate, ModelEntity, PathEntity, PropSpinner, VisibilityExtender, ZoneEntity) - +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 def nothing(*args): return 'nothing' diff --git a/otp/level/EntityCreatorAI.py b/otp/level/EntityCreatorAI.py index 3c5c13f..d7e89cf 100644 --- a/otp/level/EntityCreatorAI.py +++ b/otp/level/EntityCreatorAI.py @@ -1,8 +1,10 @@ +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 95be673..a3fc934 100644 --- a/otp/level/EntityCreatorBase.py +++ b/otp/level/EntityCreatorBase.py @@ -1,6 +1,5 @@ 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 ff8550f..8c471ae 100644 --- a/otp/level/EntityStateVarSet.py +++ b/otp/level/EntityStateVarSet.py @@ -1,9 +1,7 @@ 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 0cea6b8..c229690 100644 --- a/otp/level/EntityTypeDesc.py +++ b/otp/level/EntityTypeDesc.py @@ -1,8 +1,6 @@ from direct.directnotify import DirectNotifyGlobal -from direct.showbase.PythonUtil import mostDerivedLast - from . import AttribDesc - +from direct.showbase.PythonUtil import mostDerivedLast class EntityTypeDesc: notify = DirectNotifyGlobal.directNotify.newCategory('EntityTypeDesc') diff --git a/otp/level/EntityTypeRegistry.py b/otp/level/EntityTypeRegistry.py index 38571a5..39df663 100644 --- a/otp/level/EntityTypeRegistry.py +++ b/otp/level/EntityTypeRegistry.py @@ -1,15 +1,12 @@ -import importlib +from panda3d.core import * +from direct.directnotify import DirectNotifyGlobal +import types +from . import AttribDesc +from . import EntityTypeDesc +from direct.showbase.PythonUtil import mostDerivedLast import os import string -import types - -from panda3d.core import * - -from direct.directnotify import DirectNotifyGlobal -from direct.showbase.PythonUtil import mostDerivedLast - -from . import AttribDesc, EntityTypeDesc - +import importlib class EntityTypeRegistry: notify = DirectNotifyGlobal.directNotify.newCategory('EntityTypeRegistry') diff --git a/otp/level/EntityTypes.py b/otp/level/EntityTypes.py index 38cc3aa..0ee03a7 100644 --- a/otp/level/EntityTypes.py +++ b/otp/level/EntityTypes.py @@ -1,7 +1,5 @@ -from toontown.coghq.SpecImports import * - from .EntityTypeDesc import EntityTypeDesc - +from toontown.coghq.SpecImports import * class Entity(EntityTypeDesc): abstract = 1 diff --git a/otp/level/EntrancePoint.py b/otp/level/EntrancePoint.py index f691c16..3a5797f 100644 --- a/otp/level/EntrancePoint.py +++ b/otp/level/EntrancePoint.py @@ -1,10 +1,7 @@ -from direct.directnotify import DirectNotifyGlobal - from toontown.toonbase.ToontownGlobals import * - +from direct.directnotify import DirectNotifyGlobal 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 749131a..ed57433 100644 --- a/otp/level/Level.py +++ b/otp/level/Level.py @@ -1,11 +1,8 @@ -import string -import types - from direct.directnotify import DirectNotifyGlobal -from direct.showbase.PythonUtil import lineInfo, uniqueElements - +import string from . import LevelConstants - +from direct.showbase.PythonUtil import lineInfo, uniqueElements +import types class Level: notify = DirectNotifyGlobal.directNotify.newCategory('Level') diff --git a/otp/level/LevelMgr.py b/otp/level/LevelMgr.py index 7fa392c..d3fbe25 100644 --- a/otp/level/LevelMgr.py +++ b/otp/level/LevelMgr.py @@ -1,8 +1,6 @@ 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 0d985b6..e9d7edf 100644 --- a/otp/level/LevelMgrAI.py +++ b/otp/level/LevelMgrAI.py @@ -1,8 +1,6 @@ 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 cb2cab7..430265d 100644 --- a/otp/level/LevelMgrBase.py +++ b/otp/level/LevelMgrBase.py @@ -1,6 +1,5 @@ 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 68a537d..2339edc 100644 --- a/otp/level/LevelSpec.py +++ b/otp/level/LevelSpec.py @@ -1,14 +1,10 @@ -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 @@ -39,7 +35,8 @@ class LevelSpec: self.setScenario(scenario) if __dev__: if newSpec: - from . import EntityTypeRegistry, EntityTypes + from . import EntityTypes + from . import EntityTypeRegistry etr = EntityTypeRegistry.EntityTypeRegistry(EntityTypes) self.setEntityTypeReg(etr) entId = LevelConstants.UberZoneEntId diff --git a/otp/level/LevelUtil.py b/otp/level/LevelUtil.py index 7784ede..15ddd82 100644 --- a/otp/level/LevelUtil.py +++ b/otp/level/LevelUtil.py @@ -1,8 +1,6 @@ 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 3541571..64c1de8 100644 --- a/otp/level/LocatorEntity.py +++ b/otp/level/LocatorEntity.py @@ -1,10 +1,7 @@ +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 09b8eb7..7faf017 100644 --- a/otp/level/LogicGate.py +++ b/otp/level/LogicGate.py @@ -1,9 +1,7 @@ -from direct.directnotify import DirectNotifyGlobal from direct.showbase import DirectObject - +from direct.directnotify import DirectNotifyGlobal 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 630f62a..cb3b147 100644 --- a/otp/level/ModelEntity.py +++ b/otp/level/ModelEntity.py @@ -1,10 +1,7 @@ -from direct.directnotify import DirectNotifyGlobal - from toontown.toonbase.ToontownGlobals import * - +from direct.directnotify import DirectNotifyGlobal 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 64b2e78..418c632 100644 --- a/otp/level/PathEntity.py +++ b/otp/level/PathEntity.py @@ -1,11 +1,8 @@ -from direct.directnotify import DirectNotifyGlobal -from direct.interval.IntervalGlobal import * - -from toontown.suit import GoonPathData from toontown.toonbase.ToontownGlobals import * - +from direct.interval.IntervalGlobal import * +from direct.directnotify import DirectNotifyGlobal from . import BasicEntities - +from toontown.suit import GoonPathData class PathEntity(BasicEntities.NodePathEntity): notify = DirectNotifyGlobal.directNotify.newCategory('PathEntity') diff --git a/otp/level/PropSpinner.py b/otp/level/PropSpinner.py index 5b2975b..f75e344 100644 --- a/otp/level/PropSpinner.py +++ b/otp/level/PropSpinner.py @@ -1,9 +1,6 @@ -from panda3d.core import Vec3 - from direct.interval.IntervalGlobal import * - from .Entity import Entity - +from panda3d.core import Vec3 class PropSpinner(Entity): diff --git a/otp/level/VisibilityBlocker.py b/otp/level/VisibilityBlocker.py index f76e252..797f72f 100644 --- a/otp/level/VisibilityBlocker.py +++ b/otp/level/VisibilityBlocker.py @@ -1,6 +1,5 @@ from . import Entity - class VisibilityBlocker: def __init__(self): diff --git a/otp/level/VisibilityExtender.py b/otp/level/VisibilityExtender.py index 11a6014..90bdbe1 100644 --- a/otp/level/VisibilityExtender.py +++ b/otp/level/VisibilityExtender.py @@ -1,6 +1,5 @@ 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 251079e..96a6d0c 100644 --- a/otp/level/ZoneEntity.py +++ b/otp/level/ZoneEntity.py @@ -1,5 +1,5 @@ -from . import BasicEntities, ZoneEntityBase - +from . import ZoneEntityBase +from . import BasicEntities class ZoneEntity(ZoneEntityBase.ZoneEntityBase, BasicEntities.NodePathAttribs): diff --git a/otp/level/ZoneEntityAI.py b/otp/level/ZoneEntityAI.py index 3600db6..cfb269a 100644 --- a/otp/level/ZoneEntityAI.py +++ b/otp/level/ZoneEntityAI.py @@ -1,6 +1,5 @@ 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 45a3c7a..46986c8 100644 --- a/otp/level/ZoneEntityBase.py +++ b/otp/level/ZoneEntityBase.py @@ -1,5 +1,5 @@ -from . import Entity, LevelConstants - +from . import Entity +from . import LevelConstants class ZoneEntityBase(Entity.Entity): diff --git a/otp/login/AstronLoginManagerUD.py b/otp/login/AstronLoginManagerUD.py index 17318ec..3f905c9 100644 --- a/otp/login/AstronLoginManagerUD.py +++ b/otp/login/AstronLoginManagerUD.py @@ -1,15 +1,21 @@ import json -import os import time +import os 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 c6149b5..339fc24 100644 --- a/otp/login/CreateAccountScreen.py +++ b/otp/login/CreateAccountScreen.py @@ -1,15 +1,15 @@ from panda3d.core import * - -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 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 * class CreateAccountScreen(StateData.StateData, GuiScreen.GuiScreen): notify = DirectNotifyGlobal.directNotify.newCategory('CreateAccountScreen') diff --git a/otp/login/GuiScreen.py b/otp/login/GuiScreen.py index a3a4962..038a106 100644 --- a/otp/login/GuiScreen.py +++ b/otp/login/GuiScreen.py @@ -1,12 +1,10 @@ from panda3d.core import * - -from direct.directnotify import DirectNotifyGlobal +from otp.otpbase import OTPGlobals from direct.gui.DirectGui import * -from direct.task.Task import Task - -from otp.otpbase import OTPGlobals, OTPLocalizer from otp.otpgui import OTPDialog - +from direct.directnotify import DirectNotifyGlobal +from otp.otpbase import OTPLocalizer +from direct.task.Task import Task class GuiScreen: notify = DirectNotifyGlobal.directNotify.newCategory('GuiScreen') diff --git a/otp/login/HTTPUtil.py b/otp/login/HTTPUtil.py index 0939801..6896bf4 100644 --- a/otp/login/HTTPUtil.py +++ b/otp/login/HTTPUtil.py @@ -1,6 +1,5 @@ from panda3d.core import * - class HTTPUtilException(Exception): def __init__(self, what): diff --git a/otp/login/LeaveToPayDialog.py b/otp/login/LeaveToPayDialog.py index 6d45993..ced699c 100644 --- a/otp/login/LeaveToPayDialog.py +++ b/otp/login/LeaveToPayDialog.py @@ -1,11 +1,9 @@ -import os - -from panda3d.core import * - +from otp.otpbase import OTPGlobals +from otp.otpbase import OTPLauncherGlobals +from otp.otpbase import OTPLocalizer from direct.gui.DirectGui import * - -from otp.otpbase import OTPGlobals, OTPLauncherGlobals, OTPLocalizer - +from panda3d.core import * +import os class LeaveToPayDialog: diff --git a/otp/login/LoginAstronAccount.py b/otp/login/LoginAstronAccount.py index 4112f79..e42441a 100644 --- a/otp/login/LoginAstronAccount.py +++ b/otp/login/LoginAstronAccount.py @@ -1,9 +1,7 @@ from direct.directnotify import DirectNotifyGlobal -from direct.distributed.MsgTypes import * -from direct.distributed.PyDatagram import PyDatagram - from otp.login.LoginBase import LoginBase - +from direct.distributed.PyDatagram import PyDatagram +from direct.distributed.MsgTypes import * class LoginAstronAccount(LoginBase): notify = DirectNotifyGlobal.directNotify.newCategory('LoginAstronAccount') diff --git a/otp/login/LoginDISLTokenAccount.py b/otp/login/LoginDISLTokenAccount.py index 6300408..3c8a4ef 100644 --- a/otp/login/LoginDISLTokenAccount.py +++ b/otp/login/LoginDISLTokenAccount.py @@ -1,10 +1,8 @@ -from direct.directnotify import DirectNotifyGlobal -from direct.distributed.MsgTypes import * -from direct.distributed.PyDatagram import PyDatagram from direct.showbase.ShowBaseGlobal import * - +from direct.distributed.MsgTypes import * +from direct.directnotify import DirectNotifyGlobal from . import LoginBase - +from direct.distributed.PyDatagram import PyDatagram class LoginDISLTokenAccount(LoginBase.LoginBase): diff --git a/otp/login/LoginGSAccount.py b/otp/login/LoginGSAccount.py index fb6b0d0..4b953da 100644 --- a/otp/login/LoginGSAccount.py +++ b/otp/login/LoginGSAccount.py @@ -1,11 +1,8 @@ from panda3d.core import * - -from direct.directnotify import DirectNotifyGlobal from direct.distributed.MsgTypes import * -from direct.distributed.PyDatagram import PyDatagram - +from direct.directnotify import DirectNotifyGlobal from . import LoginBase - +from direct.distributed.PyDatagram import PyDatagram class LoginGSAccount(LoginBase.LoginBase): diff --git a/otp/login/LoginGoAccount.py b/otp/login/LoginGoAccount.py index 0ec3bae..8a0bce2 100644 --- a/otp/login/LoginGoAccount.py +++ b/otp/login/LoginGoAccount.py @@ -1,11 +1,8 @@ from panda3d.core import * - -from direct.directnotify import DirectNotifyGlobal from direct.distributed.MsgTypes import * -from direct.distributed.PyDatagram import PyDatagram - +from direct.directnotify import DirectNotifyGlobal from . import LoginBase - +from direct.distributed.PyDatagram import PyDatagram class LoginGoAccount(LoginBase.LoginBase): diff --git a/otp/login/LoginScreen.py b/otp/login/LoginScreen.py index 1ee7546..b13be96 100644 --- a/otp/login/LoginScreen.py +++ b/otp/login/LoginScreen.py @@ -2,21 +2,19 @@ import json import os import time from datetime import datetime - from panda3d.core import * - -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 direct.fsm import StateData +from direct.fsm import ClassicFSM +from direct.fsm import State +from direct.directnotify import DirectNotifyGlobal 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 fed66e7..6f1974c 100644 --- a/otp/login/LoginTTAccount.py +++ b/otp/login/LoginTTAccount.py @@ -1,11 +1,8 @@ from panda3d.core import * - -from direct.directnotify import DirectNotifyGlobal from direct.distributed.MsgTypes import * -from direct.distributed.PyDatagram import PyDatagram - +from direct.directnotify import DirectNotifyGlobal from . import LoginBase - +from direct.distributed.PyDatagram import PyDatagram class LoginTTAccount(LoginBase.LoginBase): notify = DirectNotifyGlobal.directNotify.newCategory('LoginTTAcct') diff --git a/otp/login/LoginTTSpecificDevAccount.py b/otp/login/LoginTTSpecificDevAccount.py index b75748d..b3e91a6 100644 --- a/otp/login/LoginTTSpecificDevAccount.py +++ b/otp/login/LoginTTSpecificDevAccount.py @@ -1,11 +1,8 @@ from panda3d.core import * - -from direct.directnotify import DirectNotifyGlobal from direct.distributed.MsgTypes import * -from direct.distributed.PyDatagram import PyDatagram - +from direct.directnotify import DirectNotifyGlobal from . import LoginTTAccount - +from direct.distributed.PyDatagram import PyDatagram class LoginTTSpecificDevAccount(LoginTTAccount.LoginTTAccount): notify = DirectNotifyGlobal.directNotify.newCategory('LoginTTSpecificDevAccount') diff --git a/otp/login/LoginWebPlayTokenAccount.py b/otp/login/LoginWebPlayTokenAccount.py index 7bc95a5..0b3715d 100644 --- a/otp/login/LoginWebPlayTokenAccount.py +++ b/otp/login/LoginWebPlayTokenAccount.py @@ -1,10 +1,7 @@ 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 4a6c866..b2763a1 100644 --- a/otp/login/MultiPageTextFrame.py +++ b/otp/login/MultiPageTextFrame.py @@ -1,10 +1,7 @@ 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 c936c18..662f433 100644 --- a/otp/login/PrivacyPolicyPanel.py +++ b/otp/login/PrivacyPolicyPanel.py @@ -1,14 +1,10 @@ from panda3d.core 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 direct.gui.DirectGui import * from .MultiPageTextFrame import * - +from direct.directnotify import DirectNotifyGlobal +from otp.otpbase import OTPLocalizer +from otp.otpgui import OTPDialog class PrivacyPolicyTextPanel(getGlobalDialogClass()): notify = DirectNotifyGlobal.directNotify.newCategory('PrivacyPolicyTextPanel') diff --git a/otp/login/SecretFriendsInfoPanel.py b/otp/login/SecretFriendsInfoPanel.py index 5a23c8b..acfb936 100644 --- a/otp/login/SecretFriendsInfoPanel.py +++ b/otp/login/SecretFriendsInfoPanel.py @@ -1,13 +1,9 @@ from panda3d.core import * - -from direct.gui.DirectGui import * - -from otp.otpbase import OTPLocalizer from otp.otpbase.OTPGlobals import * -from otp.otpgui import OTPDialog - +from direct.gui.DirectGui import * from .MultiPageTextFrame import * - +from otp.otpbase import OTPLocalizer +from otp.otpgui import OTPDialog class SecretFriendsInfoPanel(getGlobalDialogClass()): diff --git a/otp/movement/Impulse.py b/otp/movement/Impulse.py index 82e3d2a..9fc8d08 100644 --- a/otp/movement/Impulse.py +++ b/otp/movement/Impulse.py @@ -1,8 +1,6 @@ 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 46b3b73..092a27a 100644 --- a/otp/movement/Mover.py +++ b/otp/movement/Mover.py @@ -1,13 +1,9 @@ -import builtins - from panda3d.core import * from panda3d.otp import CMover - from direct.directnotify import DirectNotifyGlobal -from direct.showbase import PythonUtil - from otp.movement.PyVec3 import PyVec3 - +from direct.showbase import PythonUtil +import builtins class Mover(CMover): notify = DirectNotifyGlobal.directNotify.newCategory('Mover') diff --git a/otp/movement/PyVec3.py b/otp/movement/PyVec3.py index 1131d69..95a54ca 100644 --- a/otp/movement/PyVec3.py +++ b/otp/movement/PyVec3.py @@ -1,8 +1,6 @@ -import math -import types - from panda3d.core import * - +import types +import math class PyVec3: Epsilon = 0.0001 diff --git a/otp/namepanel/NameCheck.py b/otp/namepanel/NameCheck.py index 83469fc..04b1713 100644 --- a/otp/namepanel/NameCheck.py +++ b/otp/namepanel/NameCheck.py @@ -1,11 +1,8 @@ import string - -from panda3d.core import NSError, TextEncoder, TextNode - -from direct.directnotify import DirectNotifyGlobal - from otp.otpbase import OTPLocalizer - +from direct.directnotify import DirectNotifyGlobal +from panda3d.core import NSError +from panda3d.core import TextEncoder, TextNode notify = DirectNotifyGlobal.directNotify.newCategory('NameCheck') def filterString(str, filter): diff --git a/otp/namepanel/NameTumbler.py b/otp/namepanel/NameTumbler.py index d7096b4..be5426f 100644 --- a/otp/namepanel/NameTumbler.py +++ b/otp/namepanel/NameTumbler.py @@ -1,13 +1,10 @@ -import random -import string - from panda3d.core import * - -from direct.gui import OnscreenText -from direct.gui.DirectGui import * from direct.showbase import DirectObject +import random from direct.task import Task - +from direct.gui.DirectGui import * +import string +from direct.gui import OnscreenText class NameTumbler(DirectFrame): diff --git a/otp/otpbase/OTPBase.py b/otp/otpbase/OTPBase.py index 18de5ec..2c61ef1 100644 --- a/otp/otpbase/OTPBase.py +++ b/otp/otpbase/OTPBase.py @@ -1,14 +1,9 @@ +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 352615b..b9b59e5 100644 --- a/otp/otpbase/OTPGlobals.py +++ b/otp/otpbase/OTPGlobals.py @@ -1,6 +1,5 @@ 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 59da432..ebfa5be 100644 --- a/otp/otpbase/OTPLocalizer.py +++ b/otp/otpbase/OTPLocalizer.py @@ -15,7 +15,6 @@ 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 7543bba..ef06cdd 100644 --- a/otp/otpbase/OTPLocalizerEnglish.py +++ b/otp/otpbase/OTPLocalizerEnglish.py @@ -1,7 +1,5 @@ import string - from otp.otpbase.OTPLocalizerEnglishProperty import * - lTheBrrrgh = 'The Brrrgh' lDaisyGardens = 'Daisy Gardens' lDonaldsDock = "Donald's Dock" @@ -86,8 +84,8 @@ WhisperToFormatName = 'To %s' WhisperFromFormatName = '%s whispers' ThoughtOtherFormatName = '%s thinks' ThoughtSelfFormatName = 'You think' -from panda3d.core import TextProperties, TextPropertiesManager - +from panda3d.core import TextProperties +from panda3d.core import TextPropertiesManager shadow = TextProperties() shadow.setShadow(-0.025, -0.025) shadow.setShadowColor(0, 0, 0, 1) diff --git a/otp/otpbase/OTPRender.py b/otp/otpbase/OTPRender.py index a86c514..fee55ca 100644 --- a/otp/otpbase/OTPRender.py +++ b/otp/otpbase/OTPRender.py @@ -1,5 +1,4 @@ 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 243868d..6e2a607 100644 --- a/otp/otpbase/OTPTimer.py +++ b/otp/otpbase/OTPTimer.py @@ -1,12 +1,9 @@ from panda3d.core import Vec4 - -from direct.gui.DirectGui import DGG, DirectFrame -from direct.showbase.PythonUtil import bound +from direct.gui.DirectGui import DirectFrame, DGG from direct.task import Task - +from direct.showbase.PythonUtil import bound 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 e40c16b..2c1053a 100644 --- a/otp/otpbase/ObjectCount.py +++ b/otp/otpbase/ObjectCount.py @@ -1,7 +1,5 @@ -import gc - from direct.showbase.Job import Job - +import gc class ObjectCount(Job): """ logs a count of the number of each type of object found in gc.get_objects() """ diff --git a/otp/otpbase/PythonUtil.py b/otp/otpbase/PythonUtil.py index ad2cec4..423200a 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 95e3b2e..80ffa7c 100644 --- a/otp/otpgui/OTPDialog.py +++ b/otp/otpgui/OTPDialog.py @@ -1,10 +1,8 @@ -import string - -from direct.directnotify import DirectNotifyGlobal from direct.gui.DirectGui import * - -from otp.otpbase import OTPGlobals, OTPLocalizer - +from direct.directnotify import DirectNotifyGlobal +import string +from otp.otpbase import OTPGlobals +from otp.otpbase import OTPLocalizer NoButtons = 0 Acknowledge = 1 CancelOnly = 2 diff --git a/otp/snapshot/SnapshotDispatcher.py b/otp/snapshot/SnapshotDispatcher.py index dc56f45..cbc751c 100644 --- a/otp/snapshot/SnapshotDispatcher.py +++ b/otp/snapshot/SnapshotDispatcher.py @@ -1,6 +1,5 @@ -from direct.directnotify.DirectNotifyGlobal import directNotify from direct.distributed.DistributedObjectGlobal import DistributedObjectGlobal - +from direct.directnotify.DirectNotifyGlobal import directNotify class SnapshotDispatcher(DistributedObjectGlobal): pass diff --git a/otp/snapshot/SnapshotDispatcherAI.py b/otp/snapshot/SnapshotDispatcherAI.py index d9568dd..fc1c402 100644 --- a/otp/snapshot/SnapshotDispatcherAI.py +++ b/otp/snapshot/SnapshotDispatcherAI.py @@ -1,6 +1,5 @@ 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 56eb167..1ce7acc 100644 --- a/otp/snapshot/SnapshotDispatcherUD.py +++ b/otp/snapshot/SnapshotDispatcherUD.py @@ -1,6 +1,5 @@ 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 f1b8b90..fa69b32 100644 --- a/otp/snapshot/SnapshotRenderer.py +++ b/otp/snapshot/SnapshotRenderer.py @@ -1,6 +1,5 @@ -from direct.directnotify.DirectNotifyGlobal import directNotify from direct.distributed.DistributedObjectGlobal import DistributedObjectGlobal - +from direct.directnotify.DirectNotifyGlobal import directNotify class SnapshotRenderer(DistributedObjectGlobal): pass diff --git a/otp/snapshot/SnapshotRendererAI.py b/otp/snapshot/SnapshotRendererAI.py index 228647e..e5b2d53 100644 --- a/otp/snapshot/SnapshotRendererAI.py +++ b/otp/snapshot/SnapshotRendererAI.py @@ -1,6 +1,5 @@ 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 48925c9..63d7f82 100644 --- a/otp/snapshot/SnapshotRendererUD.py +++ b/otp/snapshot/SnapshotRendererUD.py @@ -1,6 +1,5 @@ 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 89414a7..c078bfd 100644 --- a/otp/speedchat/ColorSpace.py +++ b/otp/speedchat/ColorSpace.py @@ -1,6 +1,5 @@ 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 c6571fe..3b5d591 100644 --- a/otp/speedchat/SCColorScheme.py +++ b/otp/speedchat/SCColorScheme.py @@ -1,6 +1,5 @@ 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 96f37a4..0578287 100644 --- a/otp/speedchat/SCCustomMenu.py +++ b/otp/speedchat/SCCustomMenu.py @@ -1,8 +1,6 @@ -from otp.otpbase.OTPLocalizer import CustomSCStrings - -from .SCCustomTerminal import SCCustomTerminal from .SCMenu import SCMenu - +from .SCCustomTerminal import SCCustomTerminal +from otp.otpbase.OTPLocalizer import CustomSCStrings class SCCustomMenu(SCMenu): diff --git a/otp/speedchat/SCCustomTerminal.py b/otp/speedchat/SCCustomTerminal.py index 018cdd6..3ceec76 100644 --- a/otp/speedchat/SCCustomTerminal.py +++ b/otp/speedchat/SCCustomTerminal.py @@ -1,7 +1,5 @@ -from otp.otpbase.OTPLocalizer import CustomSCStrings - from .SCTerminal import SCTerminal - +from otp.otpbase.OTPLocalizer import CustomSCStrings SCCustomMsgEvent = 'SCCustomMsg' def decodeSCCustomMsg(textId): diff --git a/otp/speedchat/SCDecoders.py b/otp/speedchat/SCDecoders.py index 7f2ea16..aa368ce 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 9014355..4996f48 100644 --- a/otp/speedchat/SCElement.py +++ b/otp/speedchat/SCElement.py @@ -1,14 +1,10 @@ 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 21fa3c2..a26784c 100644 --- a/otp/speedchat/SCEmoteMenu.py +++ b/otp/speedchat/SCEmoteMenu.py @@ -1,6 +1,5 @@ -from .SCEmoteTerminal import SCEmoteTerminal from .SCMenu import SCMenu - +from .SCEmoteTerminal import SCEmoteTerminal class SCEmoteMenu(SCMenu): diff --git a/otp/speedchat/SCEmoteTerminal.py b/otp/speedchat/SCEmoteTerminal.py index 189e70f..b3a3a8a 100644 --- a/otp/speedchat/SCEmoteTerminal.py +++ b/otp/speedchat/SCEmoteTerminal.py @@ -1,10 +1,7 @@ from direct.gui.DirectGui import * - -from otp.avatar import Emote -from otp.otpbase.OTPLocalizer import EmoteList, EmoteWhispers - from .SCTerminal import SCTerminal - +from otp.otpbase.OTPLocalizer import EmoteList, EmoteWhispers +from otp.avatar import Emote SCEmoteMsgEvent = 'SCEmoteMsg' SCEmoteNoAccessEvent = 'SCEmoteNoAccess' diff --git a/otp/speedchat/SCGMTextTerminal.py b/otp/speedchat/SCGMTextTerminal.py index b1f05d7..159269c 100644 --- a/otp/speedchat/SCGMTextTerminal.py +++ b/otp/speedchat/SCGMTextTerminal.py @@ -1,7 +1,5 @@ -from otp.speedchat import SpeedChatGMHandler - from .SCTerminal import SCTerminal - +from otp.speedchat import SpeedChatGMHandler SCGMTextMsgEvent = 'SCGMTextMsg' class SCGMTextTerminal(SCTerminal): diff --git a/otp/speedchat/SCMenu.py b/otp/speedchat/SCMenu.py index 2e4ec00..84e458c 100644 --- a/otp/speedchat/SCMenu.py +++ b/otp/speedchat/SCMenu.py @@ -1,13 +1,10 @@ from panda3d.core import * - from direct.gui.DirectGui import * -from direct.interval.IntervalGlobal import * -from direct.showbase.PythonUtil import makeTuple from direct.task import Task - from .SCConstants import * +from direct.interval.IntervalGlobal import * from .SCObject import SCObject - +from direct.showbase.PythonUtil import makeTuple class SCMenu(SCObject, NodePath): SpeedChatRolloverTolerance = ConfigVariableDouble('speedchat-rollover-tolerance', 0.08).value @@ -95,10 +92,9 @@ 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 fba96c1..85a1279 100644 --- a/otp/speedchat/SCMenuHolder.py +++ b/otp/speedchat/SCMenuHolder.py @@ -1,13 +1,9 @@ -import types - from panda3d.core import * - from direct.gui.DirectGui import * - +from .SCObject import SCObject from .SCElement import SCElement from .SCMenu import SCMenu -from .SCObject import SCObject - +import types class SCMenuHolder(SCElement): N = 0.9 diff --git a/otp/speedchat/SCObject.py b/otp/speedchat/SCObject.py index e84ae61..5b37ba7 100644 --- a/otp/speedchat/SCObject.py +++ b/otp/speedchat/SCObject.py @@ -1,7 +1,6 @@ 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 ee24a21..ca76a22 100644 --- a/otp/speedchat/SCSettings.py +++ b/otp/speedchat/SCSettings.py @@ -1,7 +1,5 @@ -from otp.otpbase import OTPLocalizer - from .SCColorScheme import SCColorScheme - +from otp.otpbase import OTPLocalizer class SCSettings: diff --git a/otp/speedchat/SCStaticTextTerminal.py b/otp/speedchat/SCStaticTextTerminal.py index 0d9efe5..993f330 100644 --- a/otp/speedchat/SCStaticTextTerminal.py +++ b/otp/speedchat/SCStaticTextTerminal.py @@ -1,7 +1,5 @@ -from otp.otpbase.OTPLocalizer import SpeedChatStaticText - from .SCTerminal import SCTerminal - +from otp.otpbase.OTPLocalizer import SpeedChatStaticText SCStaticTextMsgEvent = 'SCStaticTextMsg' def decodeSCStaticTextMsg(textId): diff --git a/otp/speedchat/SCTerminal.py b/otp/speedchat/SCTerminal.py index 5eb1521..4674a28 100644 --- a/otp/speedchat/SCTerminal.py +++ b/otp/speedchat/SCTerminal.py @@ -1,12 +1,9 @@ -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 - +from .SCMenu import SCMenu +from direct.fsm.StatePush import StateVar, FunctionCall +from direct.showbase.DirectObject import DirectObject +from otp.avatar import Emote SCTerminalSelectedEvent = 'SCTerminalSelected' SCTerminalLinkedEmoteEvent = 'SCTerminalLinkedEmoteEvent' SCWhisperModeChangeEvent = 'SCWhisperModeChange' diff --git a/otp/speedchat/SpeedChat.py b/otp/speedchat/SpeedChat.py index f59027a..523e36d 100644 --- a/otp/speedchat/SpeedChat.py +++ b/otp/speedchat/SpeedChat.py @@ -1,11 +1,8 @@ from direct.showbase.PythonUtil import boolEqual - -from otp.otpbase import OTPLocalizer - +from .SpeedChatTypes import * from .SCSettings import SCSettings from .SCTerminal import SCWhisperModeChangeEvent -from .SpeedChatTypes import * - +from otp.otpbase import OTPLocalizer class SpeedChat(SCMenu): diff --git a/otp/speedchat/SpeedChatGMHandler.py b/otp/speedchat/SpeedChatGMHandler.py index 28cad67..e4a006c 100644 --- a/otp/speedchat/SpeedChatGMHandler.py +++ b/otp/speedchat/SpeedChatGMHandler.py @@ -1,10 +1,7 @@ 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 a5759c0..96bd2a4 100644 --- a/otp/speedchat/SpeedChatGlobals.py +++ b/otp/speedchat/SpeedChatGlobals.py @@ -1,5 +1,6 @@ +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 7252fe6..cb28435 100644 --- a/otp/speedchat/SpeedChatTypes.py +++ b/otp/speedchat/SpeedChatTypes.py @@ -1,12 +1,12 @@ -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 .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 diff --git a/otp/status/StatusDatabase.py b/otp/status/StatusDatabase.py index 819ae65..75083a8 100644 --- a/otp/status/StatusDatabase.py +++ b/otp/status/StatusDatabase.py @@ -1,12 +1,9 @@ import datetime import time - -from direct.directnotify.DirectNotifyGlobal import directNotify from direct.distributed.DistributedObjectGlobal import DistributedObjectGlobal - +from direct.directnotify.DirectNotifyGlobal import directNotify 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 afcbd0f..60884fd 100644 --- a/otp/status/StatusDatabaseUD.py +++ b/otp/status/StatusDatabaseUD.py @@ -1,6 +1,5 @@ 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 e04c15d..7969f13 100644 --- a/otp/uberdog/AccountDetailRecord.py +++ b/otp/uberdog/AccountDetailRecord.py @@ -1,6 +1,5 @@ from otp.otpbase import OTPGlobals - class SubDetailRecord: def __init__(self): diff --git a/otp/uberdog/DistributedChatManager.py b/otp/uberdog/DistributedChatManager.py index 0f5ead2..02053a5 100644 --- a/otp/uberdog/DistributedChatManager.py +++ b/otp/uberdog/DistributedChatManager.py @@ -1,11 +1,8 @@ -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 6f988a3..5182697 100644 --- a/otp/uberdog/DistributedChatManagerAI.py +++ b/otp/uberdog/DistributedChatManagerAI.py @@ -1,6 +1,5 @@ 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 56e5d71..b59eeb9 100644 --- a/otp/uberdog/DistributedChatManagerUD.py +++ b/otp/uberdog/DistributedChatManagerUD.py @@ -1,6 +1,5 @@ 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 2c461fb..645bfd8 100644 --- a/otp/uberdog/OtpAvatarManager.py +++ b/otp/uberdog/OtpAvatarManager.py @@ -1,8 +1,6 @@ -from pickle import dumps, loads - -from direct.directnotify import DirectNotifyGlobal +from pickle import loads, dumps from direct.distributed import DistributedObject - +from direct.directnotify import DirectNotifyGlobal notify = DirectNotifyGlobal.directNotify.newCategory('AvatarManager') class OtpAvatarManager(DistributedObject.DistributedObject): diff --git a/otp/uberdog/OtpAvatarManagerAI.py b/otp/uberdog/OtpAvatarManagerAI.py index 6ed5974..2d77d36 100644 --- a/otp/uberdog/OtpAvatarManagerAI.py +++ b/otp/uberdog/OtpAvatarManagerAI.py @@ -1,6 +1,5 @@ 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 95885dd..5d1b21f 100644 --- a/otp/uberdog/OtpAvatarManagerUD.py +++ b/otp/uberdog/OtpAvatarManagerUD.py @@ -1,6 +1,5 @@ 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 334c2ca..30d7997 100644 --- a/otp/uberdog/SpeedchatRelay.py +++ b/otp/uberdog/SpeedchatRelay.py @@ -1,10 +1,8 @@ -from direct.directnotify.DirectNotifyGlobal import directNotify from direct.distributed.DistributedObjectGlobal import DistributedObjectGlobal - +from direct.directnotify.DirectNotifyGlobal import directNotify 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 ef6b5fa..8cdbba7 100644 --- a/otp/uberdog/SpeedchatRelayUD.py +++ b/otp/uberdog/SpeedchatRelayUD.py @@ -1,6 +1,5 @@ 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 dbd1d83..18ff3c7 100644 --- a/otp/web/SettingsMgr.py +++ b/otp/web/SettingsMgr.py @@ -1,9 +1,7 @@ -from direct.directnotify.DirectNotifyGlobal import directNotify from direct.distributed.DistributedObjectGlobal import DistributedObjectGlobal - +from direct.directnotify.DirectNotifyGlobal import directNotify 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 4c3cf85..afee637 100644 --- a/otp/web/SettingsMgrAI.py +++ b/otp/web/SettingsMgrAI.py @@ -1,6 +1,5 @@ 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 ee2acaf..f51784c 100644 --- a/otp/web/SettingsMgrBase.py +++ b/otp/web/SettingsMgrBase.py @@ -1,6 +1,5 @@ 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 49fc63a..cc6689d 100644 --- a/otp/web/SettingsMgrUD.py +++ b/otp/web/SettingsMgrUD.py @@ -1,6 +1,5 @@ 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 deleted file mode 100644 index 52df711..0000000 --- a/pyproject.toml +++ /dev/null @@ -1,14 +0,0 @@ -[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 a6b7dc1..8d7d3ac 100644 --- a/toontown/ai/AIStart.py +++ b/toontown/ai/AIStart.py @@ -1,7 +1,7 @@ -import argparse +from panda3d.core import * import builtins -from panda3d.core import * +import argparse parser = argparse.ArgumentParser(description='Open Toontown - AI Server') parser.add_argument('--base-channel', help='The base channel that the server will use.') @@ -41,7 +41,6 @@ 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 70ad31b..41018c5 100644 --- a/toontown/ai/BlackCatHolidayMgrAI.py +++ b/toontown/ai/BlackCatHolidayMgrAI.py @@ -1,9 +1,7 @@ from direct.directnotify import DirectNotifyGlobal - from toontown.ai import HolidayBaseAI from toontown.toonbase import ToontownGlobals - class BlackCatHolidayMgrAI(HolidayBaseAI.HolidayBaseAI): notify = DirectNotifyGlobal.directNotify.newCategory( 'BlackCatHolidayMgrAI') @@ -17,4 +15,4 @@ class BlackCatHolidayMgrAI(HolidayBaseAI.HolidayBaseAI): bboard.post(BlackCatHolidayMgrAI.PostName) def stop(self): - bboard.remove(BlackCatHolidayMgrAI.PostName) + bboard.remove(BlackCatHolidayMgrAI.PostName) \ No newline at end of file diff --git a/toontown/ai/CrashedLeaderBoardDecorator.py b/toontown/ai/CrashedLeaderBoardDecorator.py index 286cfbe..e55b20c 100644 --- a/toontown/ai/CrashedLeaderBoardDecorator.py +++ b/toontown/ai/CrashedLeaderBoardDecorator.py @@ -1,15 +1,11 @@ -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 toontown.hood import GSHood -from toontown.toonbase import ToontownGlobals - 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 class CrashedLeaderBoardDecorator(HolidayDecorator.HolidayDecorator): notify = DirectNotifyGlobal.directNotify.newCategory('CrashedLeaderBoardDecorator') diff --git a/toontown/ai/DatabaseObject.py b/toontown/ai/DatabaseObject.py index 4bce9ce..365f23f 100644 --- a/toontown/ai/DatabaseObject.py +++ b/toontown/ai/DatabaseObject.py @@ -1,15 +1,10 @@ -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 - -from toontown.toon import DistributedToonAI - -from .ToontownAIMsgTypes import * - +import types class DatabaseObject: notify = directNotify.newCategory('DatabaseObject') diff --git a/toontown/ai/DistributedBlackCatMgr.py b/toontown/ai/DistributedBlackCatMgr.py index 18fcf3c..a39a37e 100644 --- a/toontown/ai/DistributedBlackCatMgr.py +++ b/toontown/ai/DistributedBlackCatMgr.py @@ -1,10 +1,8 @@ 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 cfe9cd5..1ab8c8f 100644 --- a/toontown/ai/DistributedBlackCatMgrAI.py +++ b/toontown/ai/DistributedBlackCatMgrAI.py @@ -1,6 +1,5 @@ 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 d61abb5..2046332 100644 --- a/toontown/ai/DistributedGreenToonEffectMgr.py +++ b/toontown/ai/DistributedGreenToonEffectMgr.py @@ -1,12 +1,9 @@ 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 af01ac6..e7a495c 100644 --- a/toontown/ai/DistributedGreenToonEffectMgrAI.py +++ b/toontown/ai/DistributedGreenToonEffectMgrAI.py @@ -1,6 +1,5 @@ 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 c101588..f951882 100644 --- a/toontown/ai/DistributedHydrantZeroMgr.py +++ b/toontown/ai/DistributedHydrantZeroMgr.py @@ -1,9 +1,7 @@ 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 7cf8984..83d19ba 100644 --- a/toontown/ai/DistributedHydrantZeroMgrAI.py +++ b/toontown/ai/DistributedHydrantZeroMgrAI.py @@ -1,6 +1,5 @@ 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 10d827b..71058c1 100644 --- a/toontown/ai/DistributedMailboxZeroMgr.py +++ b/toontown/ai/DistributedMailboxZeroMgr.py @@ -1,9 +1,7 @@ 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 c1836a2..c508ba3 100644 --- a/toontown/ai/DistributedMailboxZeroMgrAI.py +++ b/toontown/ai/DistributedMailboxZeroMgrAI.py @@ -1,6 +1,5 @@ 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 c0a5261..5ec42fe 100644 --- a/toontown/ai/DistributedPhaseEventMgr.py +++ b/toontown/ai/DistributedPhaseEventMgr.py @@ -1,8 +1,6 @@ -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 9e3ee6b..907995f 100644 --- a/toontown/ai/DistributedPhaseEventMgrAI.py +++ b/toontown/ai/DistributedPhaseEventMgrAI.py @@ -1,6 +1,5 @@ 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 fa38deb..0c30fee 100644 --- a/toontown/ai/DistributedPolarPlaceEffectMgr.py +++ b/toontown/ai/DistributedPolarPlaceEffectMgr.py @@ -1,12 +1,9 @@ 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 5ec6bbb..4320ac2 100644 --- a/toontown/ai/DistributedPolarPlaceEffectMgrAI.py +++ b/toontown/ai/DistributedPolarPlaceEffectMgrAI.py @@ -1,6 +1,5 @@ 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 f662d4e..cec26df 100644 --- a/toontown/ai/DistributedResistanceEmoteMgr.py +++ b/toontown/ai/DistributedResistanceEmoteMgr.py @@ -1,12 +1,9 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed import DistributedObject from direct.interval.IntervalGlobal import * - -from otp.otpbase.OTPLocalizerEnglish import EmoteFuncDict from otp.speedchat import SpeedChatGlobals - +from otp.otpbase.OTPLocalizerEnglish import EmoteFuncDict 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 e759f4a..f961933 100644 --- a/toontown/ai/DistributedResistanceEmoteMgrAI.py +++ b/toontown/ai/DistributedResistanceEmoteMgrAI.py @@ -1,6 +1,5 @@ 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 e0671fb..3406e2a 100644 --- a/toontown/ai/DistributedScavengerHuntTarget.py +++ b/toontown/ai/DistributedScavengerHuntTarget.py @@ -1,9 +1,7 @@ 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 173e638..78ecc39 100644 --- a/toontown/ai/DistributedScavengerHuntTargetAI.py +++ b/toontown/ai/DistributedScavengerHuntTargetAI.py @@ -1,6 +1,5 @@ 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 02f008b..a45f474 100644 --- a/toontown/ai/DistributedSillyMeterMgr.py +++ b/toontown/ai/DistributedSillyMeterMgr.py @@ -1,10 +1,7 @@ -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 81c03f3..f046ef2 100644 --- a/toontown/ai/DistributedSillyMeterMgrAI.py +++ b/toontown/ai/DistributedSillyMeterMgrAI.py @@ -1,6 +1,5 @@ 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 e336fdf..9dd7a2e 100644 --- a/toontown/ai/DistributedTrashcanZeroMgr.py +++ b/toontown/ai/DistributedTrashcanZeroMgr.py @@ -1,9 +1,7 @@ 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 de617ee..86df21e 100644 --- a/toontown/ai/DistributedTrashcanZeroMgrAI.py +++ b/toontown/ai/DistributedTrashcanZeroMgrAI.py @@ -1,6 +1,5 @@ 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 50ba444..c5340ce 100644 --- a/toontown/ai/DistributedTrickOrTreatTarget.py +++ b/toontown/ai/DistributedTrickOrTreatTarget.py @@ -1,11 +1,8 @@ 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 a403344..de934ca 100644 --- a/toontown/ai/DistributedTrickOrTreatTargetAI.py +++ b/toontown/ai/DistributedTrickOrTreatTargetAI.py @@ -1,6 +1,5 @@ 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 8470f63..fe861e1 100644 --- a/toontown/ai/DistributedWinterCarolingTarget.py +++ b/toontown/ai/DistributedWinterCarolingTarget.py @@ -1,11 +1,8 @@ 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 aaec7ba..21e9a26 100644 --- a/toontown/ai/DistributedWinterCarolingTargetAI.py +++ b/toontown/ai/DistributedWinterCarolingTargetAI.py @@ -1,6 +1,5 @@ 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 260b3ac..4d94de1 100644 --- a/toontown/ai/HalloweenHolidayDecorator.py +++ b/toontown/ai/HalloweenHolidayDecorator.py @@ -1,17 +1,13 @@ -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 toontown.estate import Estate -from toontown.safezone import Playground -from toontown.toonbase import ToontownGlobals -from toontown.town import Street - 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 class HalloweenHolidayDecorator(HolidayDecorator.HolidayDecorator): notify = DirectNotifyGlobal.directNotify.newCategory('HalloweenHolidayDecorator') diff --git a/toontown/ai/HolidayBaseAI.py b/toontown/ai/HolidayBaseAI.py index 2582474..2578e36 100644 --- a/toontown/ai/HolidayBaseAI.py +++ b/toontown/ai/HolidayBaseAI.py @@ -1,11 +1,8 @@ -import random - from direct.directnotify import DirectNotifyGlobal +import random 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 943161f..73bae17 100644 --- a/toontown/ai/HolidayDecorator.py +++ b/toontown/ai/HolidayDecorator.py @@ -1,10 +1,7 @@ -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 - +from direct.interval.IntervalGlobal import Parallel, Sequence, Func, Wait +from panda3d.core import Vec4, CSDefault, TransformState, NodePath, TransparencyAttrib +from panda3d.toontown import loadDNAFile class HolidayDecorator: diff --git a/toontown/ai/NewsManager.py b/toontown/ai/NewsManager.py index 17febe9..8f70730 100644 --- a/toontown/ai/NewsManager.py +++ b/toontown/ai/NewsManager.py @@ -1,18 +1,17 @@ +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 71decbb..67e5d56 100644 --- a/toontown/ai/NewsManagerAI.py +++ b/toontown/ai/NewsManagerAI.py @@ -1,7 +1,6 @@ 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 cb103da..14e18c6 100644 --- a/toontown/ai/ToonBarrier.py +++ b/toontown/ai/ToonBarrier.py @@ -1,10 +1,7 @@ -import random - -from direct.showbase import DirectObject -from direct.task import Task - from otp.ai.AIBase import * - +from direct.task import Task +from direct.showbase import DirectObject +import random class ToonBarrier(DirectObject.DirectObject): notify = directNotify.newCategory('ToonBarrier') diff --git a/toontown/ai/ToontownAIMsgTypes.py b/toontown/ai/ToontownAIMsgTypes.py index 6f94a6f..6b37e20 100644 --- a/toontown/ai/ToontownAIMsgTypes.py +++ b/toontown/ai/ToontownAIMsgTypes.py @@ -1,5 +1,4 @@ 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 4b08614..19e549c 100644 --- a/toontown/ai/ToontownAIRepository.py +++ b/toontown/ai/ToontownAIRepository.py @@ -1,14 +1,10 @@ -import os - +from direct.directnotify import DirectNotifyGlobal 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 @@ -23,12 +19,11 @@ 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.BossbotHQDataAI import BossbotHQDataAI from toontown.hood.BRHoodDataAI import BRHoodDataAI -from toontown.hood.CashbotHQDataAI import CashbotHQDataAI +from toontown.hood.BossbotHQDataAI import BossbotHQDataAI from toontown.hood.CSHoodDataAI import CSHoodDataAI +from toontown.hood.CashbotHQDataAI import CashbotHQDataAI from toontown.hood.DDHoodDataAI import DDHoodDataAI from toontown.hood.DGHoodDataAI import DGHoodDataAI from toontown.hood.DLHoodDataAI import DLHoodDataAI @@ -41,11 +36,14 @@ 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, DistributedViewingBlockAI +from toontown.racing.DistributedStartingBlockAI import DistributedStartingBlockAI +from toontown.racing.DistributedStartingBlockAI import 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 @@ -54,7 +52,7 @@ from toontown.toon import NPCToons from toontown.toonbase import ToontownGlobals from toontown.tutorial.TutorialManagerAI import TutorialManagerAI from toontown.uberdog.DistributedInGameNewsMgrAI import DistributedInGameNewsMgrAI -from toontown.uberdog.DistributedPartyManagerAI import DistributedPartyManagerAI +import os class ToontownAIRepository(ToontownInternalRepository): diff --git a/toontown/ai/WelcomeValleyManager.py b/toontown/ai/WelcomeValleyManager.py index 7243ace..1a73d48 100644 --- a/toontown/ai/WelcomeValleyManager.py +++ b/toontown/ai/WelcomeValleyManager.py @@ -1,11 +1,8 @@ from panda3d.core import * - -from direct.directnotify import DirectNotifyGlobal from direct.distributed import DistributedObject -from direct.showbase import PythonUtil - +from direct.directnotify import DirectNotifyGlobal from toontown.toonbase import ToontownGlobals - +from direct.showbase import PythonUtil class WelcomeValleyManager(DistributedObject.DistributedObject): notify = DirectNotifyGlobal.directNotify.newCategory('WelcomeValleyManager') diff --git a/toontown/battle/BattleBase.py b/toontown/battle/BattleBase.py index b3b455b..eb08e4f 100644 --- a/toontown/battle/BattleBase.py +++ b/toontown/battle/BattleBase.py @@ -1,14 +1,10 @@ -import functools - from panda3d.core import * - -from direct.directnotify import DirectNotifyGlobal +from toontown.toonbase.ToontownBattleGlobals import * from direct.task.Timer import * - +import functools +from direct.directnotify import DirectNotifyGlobal 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 a497094..0ed39aa 100644 --- a/toontown/battle/BattleCalculatorAI.py +++ b/toontown/battle/BattleCalculatorAI.py @@ -1,15 +1,12 @@ -import random - -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 * - +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 class BattleCalculatorAI: AccuracyBonuses = [ @@ -169,7 +166,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 df92442..61ce72f 100644 --- a/toontown/battle/BattleExperience.py +++ b/toontown/battle/BattleExperience.py @@ -1,6 +1,5 @@ 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 2f78a56..c70e991 100644 --- a/toontown/battle/BattleExperienceAI.py +++ b/toontown/battle/BattleExperienceAI.py @@ -1,8 +1,6 @@ from direct.directnotify import DirectNotifyGlobal - -from toontown.suit import SuitDNA from toontown.toonbase import ToontownBattleGlobals - +from toontown.suit import SuitDNA BattleExperienceAINotify = DirectNotifyGlobal.directNotify.newCategory('BattleExprienceAI') def getSkillGained(toonSkillPtsGained, toonId, track): diff --git a/toontown/battle/BattleManagerAI.py b/toontown/battle/BattleManagerAI.py index c21431d..07705e2 100644 --- a/toontown/battle/BattleManagerAI.py +++ b/toontown/battle/BattleManagerAI.py @@ -1,7 +1,5 @@ -from direct.directnotify import DirectNotifyGlobal - from . import DistributedBattleAI - +from direct.directnotify import DirectNotifyGlobal class BattleManagerAI: notify = DirectNotifyGlobal.directNotify.newCategory('BattleManagerAI') diff --git a/toontown/battle/BattleParticles.py b/toontown/battle/BattleParticles.py index 4797e77..77992e6 100644 --- a/toontown/battle/BattleParticles.py +++ b/toontown/battle/BattleParticles.py @@ -1,8 +1,6 @@ -import os - -from direct.directnotify import DirectNotifyGlobal from direct.particles.ParticleEffect import * - +import os +from direct.directnotify import DirectNotifyGlobal 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 571246b..e504cf8 100644 --- a/toontown/battle/BattlePlace.py +++ b/toontown/battle/BattlePlace.py @@ -1,10 +1,9 @@ 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 7ba9cb4..aa29387 100644 --- a/toontown/battle/BattleProps.py +++ b/toontown/battle/BattleProps.py @@ -1,12 +1,8 @@ -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 fdfde59..6fb7399 100644 --- a/toontown/battle/BattleSounds.py +++ b/toontown/battle/BattleSounds.py @@ -1,8 +1,6 @@ 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 b694797..1f43358 100644 --- a/toontown/battle/DistributedBattle.py +++ b/toontown/battle/DistributedBattle.py @@ -1,22 +1,19 @@ -import random - from panda3d.core import * from panda3d.otp import * - -from direct.actor import Actor -from direct.directnotify import DirectNotifyGlobal from direct.interval.IntervalGlobal import * - -from otp.avatar import Emote - -from toontown.distributed import DelayDelete -from toontown.suit import Suit -from toontown.toon import TTEmote -from toontown.toonbase import ToontownBattleGlobals, ToontownGlobals - -from . import DistributedBattleBase, MovieUtil, SuitBattleGlobals 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 otp.avatar import Emote +from . import SuitBattleGlobals +from toontown.distributed import DelayDelete +import random class DistributedBattle(DistributedBattleBase.DistributedBattleBase): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedBattle') diff --git a/toontown/battle/DistributedBattleAI.py b/toontown/battle/DistributedBattleAI.py index 852f66b..76c0ac9 100644 --- a/toontown/battle/DistributedBattleAI.py +++ b/toontown/battle/DistributedBattleAI.py @@ -1,17 +1,12 @@ -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 3d09f3b..5e886b1 100644 --- a/toontown/battle/DistributedBattleBase.py +++ b/toontown/battle/DistributedBattleBase.py @@ -15,16 +15,36 @@ from direct.task.Timer import Timer from otp.avatar.Emote import globalEmote -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 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.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, ToontownGlobals +from toontown.toonbase import ToontownBattleGlobals +from toontown.toonbase import ToontownGlobals from toontown.toonbase.ToonBaseGlobal import base diff --git a/toontown/battle/DistributedBattleBaseAI.py b/toontown/battle/DistributedBattleBaseAI.py index dcebf43..ab86a50 100644 --- a/toontown/battle/DistributedBattleBaseAI.py +++ b/toontown/battle/DistributedBattleBaseAI.py @@ -1,24 +1,22 @@ -import random - -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 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 class DistributedBattleBaseAI(DistributedObjectAI.DistributedObjectAI, BattleBase): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedBattleBaseAI') diff --git a/toontown/battle/DistributedBattleBldg.py b/toontown/battle/DistributedBattleBldg.py index 2e80b1e..3033041 100644 --- a/toontown/battle/DistributedBattleBldg.py +++ b/toontown/battle/DistributedBattleBldg.py @@ -1,22 +1,20 @@ -import random - from panda3d.core import * from panda3d.otp import * - -from direct.actor import Actor -from direct.directnotify import DirectNotifyGlobal -from direct.fsm import State 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 * - +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 class DistributedBattleBldg(DistributedBattleBase.DistributedBattleBase): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedBattleBldg') diff --git a/toontown/battle/DistributedBattleBldgAI.py b/toontown/battle/DistributedBattleBldgAI.py index c318d1e..8aa5b87 100644 --- a/toontown/battle/DistributedBattleBldgAI.py +++ b/toontown/battle/DistributedBattleBldgAI.py @@ -1,21 +1,17 @@ -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 direct.distributed.ClockDelta import * 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 f0bb6ac..87d9241 100644 --- a/toontown/battle/DistributedBattleDiners.py +++ b/toontown/battle/DistributedBattleDiners.py @@ -1,15 +1,11 @@ import random - -from panda3d.core import Point3, VBase3 - +from panda3d.core import VBase3, Point3 +from direct.interval.IntervalGlobal import Sequence, Wait, Func, Parallel, Track, LerpPosInterval, ProjectileInterval, SoundInterval, ActorInterval from direct.directnotify import DirectNotifyGlobal -from direct.interval.IntervalGlobal import (ActorInterval, Func, LerpPosInterval, Parallel, ProjectileInterval, - Sequence, SoundInterval, Track, Wait) - -from toontown.battle import BattleProps, DistributedBattleFinal +from toontown.battle import 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 bbc0090..5b689d4 100644 --- a/toontown/battle/DistributedBattleDinersAI.py +++ b/toontown/battle/DistributedBattleDinersAI.py @@ -1,8 +1,6 @@ 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 0042ba5..3f3f61b 100644 --- a/toontown/battle/DistributedBattleFinal.py +++ b/toontown/battle/DistributedBattleFinal.py @@ -1,20 +1,18 @@ -import random - from panda3d.core import * from panda3d.otp import * - -from direct.actor import Actor -from direct.directnotify import DirectNotifyGlobal -from direct.fsm import State 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 * - +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 class DistributedBattleFinal(DistributedBattleBase.DistributedBattleBase): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedBattleFinal') diff --git a/toontown/battle/DistributedBattleFinalAI.py b/toontown/battle/DistributedBattleFinalAI.py index f436ec2..bb4ef70 100644 --- a/toontown/battle/DistributedBattleFinalAI.py +++ b/toontown/battle/DistributedBattleFinalAI.py @@ -1,20 +1,14 @@ -import random -import types - +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 from direct.directnotify import DirectNotifyGlobal from direct.fsm import State from direct.showbase.PythonUtil import addListsByValue -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 * - +import random, types class DistributedBattleFinalAI(DistributedBattleBaseAI.DistributedBattleBaseAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedBattleFinalAI') diff --git a/toontown/battle/DistributedBattleWaiters.py b/toontown/battle/DistributedBattleWaiters.py index dd52ba0..f4c9613 100644 --- a/toontown/battle/DistributedBattleWaiters.py +++ b/toontown/battle/DistributedBattleWaiters.py @@ -1,15 +1,11 @@ import random - -from panda3d.core import Point3, VBase3 - +from panda3d.core import VBase3, Point3 +from direct.interval.IntervalGlobal import Sequence, Wait, Func, Parallel, Track 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 d9ba047..66f312e 100644 --- a/toontown/battle/DistributedBattleWaitersAI.py +++ b/toontown/battle/DistributedBattleWaitersAI.py @@ -1,8 +1,6 @@ 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 3da567e..63e13e7 100644 --- a/toontown/battle/Fanfare.py +++ b/toontown/battle/Fanfare.py @@ -1,19 +1,18 @@ -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 1e98ae1..078ef5c 100644 --- a/toontown/battle/FireCogPanel.py +++ b/toontown/battle/FireCogPanel.py @@ -1,13 +1,11 @@ -from panda3d.core import * - -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 * - +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 class FireCogPanel(StateData.StateData): notify = DirectNotifyGlobal.directNotify.newCategory('ChooseAvatarPanel') diff --git a/toontown/battle/HealJokes.py b/toontown/battle/HealJokes.py index 0048ca8..3c081bb 100644 --- a/toontown/battle/HealJokes.py +++ b/toontown/battle/HealJokes.py @@ -1,3 +1,2 @@ from toontown.toonbase import TTLocalizer - toonHealJokes = TTLocalizer.ToonHealJokes diff --git a/toontown/battle/Movie.py b/toontown/battle/Movie.py index bb77def..e402c62 100644 --- a/toontown/battle/Movie.py +++ b/toontown/battle/Movie.py @@ -1,23 +1,36 @@ -import copy -import functools -import random - -from direct.directnotify import DirectNotifyGlobal +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 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 . 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 camPos = Point3(14, 0, 10) camHpr = Vec3(89, -30, 0) randomBattleTimestamp = base.config.GetBool('random-battle-timestamp', 0) @@ -323,7 +336,8 @@ class Movie(DirectObject.DirectObject): def playTutorialReward_3(self, value): self.tutRewardDialog_2.cleanup() - from toontown.toon import Toon, ToonDNA + from toontown.toon import Toon + from toontown.toon import ToonDNA def doneChat1(page, elapsed = 0): self.track2.start() diff --git a/toontown/battle/MovieCamera.py b/toontown/battle/MovieCamera.py index 861f223..0c9c934 100644 --- a/toontown/battle/MovieCamera.py +++ b/toontown/battle/MovieCamera.py @@ -1,17 +1,12 @@ -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 664fd20..b9b7629 100644 --- a/toontown/battle/MovieDrop.py +++ b/toontown/battle/MovieDrop.py @@ -1,15 +1,14 @@ -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 238b2aa..c06dce8 100644 --- a/toontown/battle/MovieFire.py +++ b/toontown/battle/MovieFire.py @@ -1,20 +1,16 @@ -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 @@ -323,7 +319,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)) @@ -344,4 +340,4 @@ ActorInterval(kapow, 'kapow'), Func(kapow.hide)), LerpPosInterval(suit, 3.0, Poi return [toonTrack, soundTrack, buttonTrack, - suitResponseTrack] + suitResponseTrack] \ No newline at end of file diff --git a/toontown/battle/MovieHeal.py b/toontown/battle/MovieHeal.py index 8c066b2..7b65695 100644 --- a/toontown/battle/MovieHeal.py +++ b/toontown/battle/MovieHeal.py @@ -1,19 +1,19 @@ -import random - -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 . import BattleParticles, HealJokes, MovieCamera, MovieNPCSOS, MovieUtil -from .BattleBase 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 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 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 84f334e..d7dafef 100644 --- a/toontown/battle/MovieLure.py +++ b/toontown/battle/MovieLure.py @@ -1,15 +1,16 @@ -from direct.directnotify import DirectNotifyGlobal from direct.interval.IntervalGlobal import * - -from toontown.suit.SuitBase import * -from toontown.toon.ToonDNA import * -from toontown.toonbase import ToontownBattleGlobals - -from . import BattleParticles, BattleProps, MovieCamera, MovieNPCSOS, MovieUtil 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 notify = DirectNotifyGlobal.directNotify.newCategory('MovieLures') def safeWrtReparentTo(nodePath, parent): diff --git a/toontown/battle/MovieNPCSOS.py b/toontown/battle/MovieNPCSOS.py index d2d8d9d..97d4c1f 100644 --- a/toontown/battle/MovieNPCSOS.py +++ b/toontown/battle/MovieNPCSOS.py @@ -1,17 +1,16 @@ -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 c357a3c..82671bf 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 0f95788..4369e70 100644 --- a/toontown/battle/MovieSOS.py +++ b/toontown/battle/MovieSOS.py @@ -1,12 +1,8 @@ -from panda3d.core import * - -from direct.directnotify import DirectNotifyGlobal from direct.interval.IntervalGlobal import * - -from toontown.toonbase import TTLocalizer - from . import MovieCamera - +from direct.directnotify import DirectNotifyGlobal +from toontown.toonbase import TTLocalizer +from panda3d.core import * notify = DirectNotifyGlobal.directNotify.newCategory('MovieSOS') def doSOSs(calls): diff --git a/toontown/battle/MovieSound.py b/toontown/battle/MovieSound.py index 22f857e..9d1248f 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 377e4cd..3cee1ae 100644 --- a/toontown/battle/MovieSquirt.py +++ b/toontown/battle/MovieSquirt.py @@ -1,18 +1,17 @@ -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') @@ -28,7 +27,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 @@ -52,7 +51,7 @@ def doSquirts(squirts): suitSquirtsDict[suitId] = [squirt] suitSquirts = list(suitSquirtsDict.values()) - + def compFunc(a, b): if len(a) > len(b): return 1 @@ -745,4 +744,4 @@ squirtfn_array = (__doFlower, __doSeltzerBottle, __doFireHose, __doStormCloud, - __doGeyser) + __doGeyser) \ No newline at end of file diff --git a/toontown/battle/MovieSuitAttacks.py b/toontown/battle/MovieSuitAttacks.py index ebfb336..13d3d73 100644 --- a/toontown/battle/MovieSuitAttacks.py +++ b/toontown/battle/MovieSuitAttacks.py @@ -1,19 +1,19 @@ from panda3d.otp 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 .SuitBattleGlobals import * +from direct.interval.IntervalGlobal import * from .BattleBase import * from .BattleProps import * +from toontown.suit.SuitDNA import * +from .BattleBase import * from .BattleSounds import * -from .SuitBattleGlobals 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 notify = DirectNotifyGlobal.directNotify.newCategory('MovieSuitAttacks') def __doDamage(toon, dmg, died): diff --git a/toontown/battle/MovieThrow.py b/toontown/battle/MovieThrow.py index ad88ab3..43af25b 100644 --- a/toontown/battle/MovieThrow.py +++ b/toontown/battle/MovieThrow.py @@ -1,20 +1,16 @@ -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 ec8f216..c54a942 100644 --- a/toontown/battle/MovieToonVictory.py +++ b/toontown/battle/MovieToonVictory.py @@ -1,15 +1,11 @@ -import types - from panda3d.otp import * - -from direct.directnotify import DirectNotifyGlobal from direct.interval.IntervalGlobal import * from direct.showbase.DirectObject import DirectObject - -from . import MovieCamera -from .BattleSounds import * from .RewardPanel import * - +from .BattleSounds import * +from . import MovieCamera +from direct.directnotify import DirectNotifyGlobal +import types notify = DirectNotifyGlobal.directNotify.newCategory('MovieToonVictory') def __findToonReward(rewards, toon): diff --git a/toontown/battle/MovieTrap.py b/toontown/battle/MovieTrap.py index 9cb5870..f58f772 100644 --- a/toontown/battle/MovieTrap.py +++ b/toontown/battle/MovieTrap.py @@ -1,16 +1,17 @@ -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 d3013fa..da0c663 100644 --- a/toontown/battle/MovieUtil.py +++ b/toontown/battle/MovieUtil.py @@ -1,15 +1,12 @@ -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 1fdb175..6d85453 100644 --- a/toontown/battle/PlayByPlayText.py +++ b/toontown/battle/PlayByPlayText.py @@ -1,18 +1,13 @@ -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 . import BattleBase from .SuitBattleGlobals import * - +from direct.interval.IntervalGlobal import * +from direct.directnotify import DirectNotifyGlobal +import string +from direct.gui import OnscreenText +from . import BattleBase class PlayByPlayText(OnscreenText.OnscreenText): notify = DirectNotifyGlobal.directNotify.newCategory('PlayByPlayText') diff --git a/toontown/battle/RewardPanel.py b/toontown/battle/RewardPanel.py index 439e28a..ac38399 100644 --- a/toontown/battle/RewardPanel.py +++ b/toontown/battle/RewardPanel.py @@ -1,25 +1,23 @@ -import copy -import math +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 random import string - -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 +import copy from toontown.suit import SuitDNA +from toontown.toonbase import ToontownGlobals +from toontown.toonbase import TTLocalizer from toontown.toon import NPCToons -from toontown.toonbase import ToontownBattleGlobals, ToontownGlobals, TTLocalizer - -from . import BattleBase, Fanfare - +import math +from toontown.coghq import CogDisguiseGlobals +from toontown.shtiker import DisguisePage +from . import Fanfare +from otp.otpbase import OTPGlobals class RewardPanel(DirectFrame): notify = DirectNotifyGlobal.directNotify.newCategory('RewardPanel') diff --git a/toontown/battle/SuitBattleGlobals.py b/toontown/battle/SuitBattleGlobals.py index c7e3c60..bb2dcbd 100644 --- a/toontown/battle/SuitBattleGlobals.py +++ b/toontown/battle/SuitBattleGlobals.py @@ -1,13 +1,8 @@ -import random - -from direct.directnotify import DirectNotifyGlobal - -from otp.otpbase import OTPLocalizer - -from toontown.toonbase import TTLocalizer - from .BattleBase import * - +import random +from direct.directnotify import DirectNotifyGlobal +from otp.otpbase import OTPLocalizer +from toontown.toonbase import TTLocalizer notify = DirectNotifyGlobal.directNotify.newCategory('SuitBattleGlobals') debugAttackSequence = {} diff --git a/toontown/building/BoardingGroupShow.py b/toontown/building/BoardingGroupShow.py index afc5c38..0c253fd 100644 --- a/toontown/building/BoardingGroupShow.py +++ b/toontown/building/BoardingGroupShow.py @@ -1,12 +1,10 @@ from panda3d.core import * - from direct.directnotify import DirectNotifyGlobal -from direct.interval.IntervalGlobal import * +from toontown.toonbase import ToontownGlobals from direct.task.Task import Task - +from direct.interval.IntervalGlobal import * +from toontown.toonbase import TTLocalizer 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 6b4a432..6644bfa 100644 --- a/toontown/building/BoardingPartyBase.py +++ b/toontown/building/BoardingPartyBase.py @@ -1,9 +1,6 @@ -import copy - from otp.otpbase import OTPGlobals - from toontown.toonbase import ToontownGlobals - +import copy BOARDCODE_OKAY = 1 BOARDCODE_MISSING = 0 BOARDCODE_MINLAFF = -1 diff --git a/toontown/building/DistributedAnimBuilding.py b/toontown/building/DistributedAnimBuilding.py index 443e003..b862c82 100644 --- a/toontown/building/DistributedAnimBuilding.py +++ b/toontown/building/DistributedAnimBuilding.py @@ -1,10 +1,7 @@ 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 eeab60a..08b973d 100644 --- a/toontown/building/DistributedAnimBuildingAI.py +++ b/toontown/building/DistributedAnimBuildingAI.py @@ -1,7 +1,7 @@ from direct.directnotify import DirectNotifyGlobal - -from toontown.building import DistributedAnimDoorAI, DistributedBuildingAI, DoorTypes - +from toontown.building import DistributedBuildingAI +from toontown.building import DistributedAnimDoorAI +from toontown.building import DoorTypes class DistributedAnimBuildingAI(DistributedBuildingAI.DistributedBuildingAI): diff --git a/toontown/building/DistributedAnimDoor.py b/toontown/building/DistributedAnimDoor.py index 1a9eeea..0ea43e4 100644 --- a/toontown/building/DistributedAnimDoor.py +++ b/toontown/building/DistributedAnimDoor.py @@ -1,10 +1,8 @@ from panda3d.core import NodePath, VBase3 - from direct.directnotify import DirectNotifyGlobal -from direct.interval.IntervalGlobal import HprInterval, LerpHprInterval, Parallel, Sequence, SoundInterval, Wait - -from toontown.building import DistributedDoor, DoorTypes - +from direct.interval.IntervalGlobal import Parallel, Sequence, Wait, HprInterval, LerpHprInterval, SoundInterval +from toontown.building import DistributedDoor +from toontown.building import DoorTypes if (__debug__): import pdb diff --git a/toontown/building/DistributedAnimDoorAI.py b/toontown/building/DistributedAnimDoorAI.py index 2bb9313..ca3d644 100644 --- a/toontown/building/DistributedAnimDoorAI.py +++ b/toontown/building/DistributedAnimDoorAI.py @@ -1,8 +1,6 @@ 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 3f47bd2..c3618c8 100644 --- a/toontown/building/DistributedAnimatedProp.py +++ b/toontown/building/DistributedAnimatedProp.py @@ -1,10 +1,8 @@ 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 ClassicFSM, State - +from direct.distributed import DistributedObject class DistributedAnimatedProp(DistributedObject.DistributedObject): diff --git a/toontown/building/DistributedAnimatedPropAI.py b/toontown/building/DistributedAnimatedPropAI.py index a658af7..973ab42 100644 --- a/toontown/building/DistributedAnimatedPropAI.py +++ b/toontown/building/DistributedAnimatedPropAI.py @@ -1,10 +1,9 @@ -from direct.directnotify import DirectNotifyGlobal -from direct.distributed import DistributedObjectAI -from direct.distributed.ClockDelta import * -from direct.fsm import ClassicFSM, State - 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 class DistributedAnimatedPropAI(DistributedObjectAI.DistributedObjectAI): diff --git a/toontown/building/DistributedBBElevator.py b/toontown/building/DistributedBBElevator.py index 3f1d033..6d94e01 100644 --- a/toontown/building/DistributedBBElevator.py +++ b/toontown/building/DistributedBBElevator.py @@ -1,10 +1,8 @@ -from direct.directnotify import DirectNotifyGlobal - -from toontown.toonbase import TTLocalizer - -from . import DistributedBossElevator, DistributedElevator +from . import DistributedElevator +from . import DistributedBossElevator from .ElevatorConstants import * - +from direct.directnotify import DirectNotifyGlobal +from toontown.toonbase import TTLocalizer class DistributedBBElevator(DistributedBossElevator.DistributedBossElevator): diff --git a/toontown/building/DistributedBBElevatorAI.py b/toontown/building/DistributedBBElevatorAI.py index f7e673a..a61d56b 100644 --- a/toontown/building/DistributedBBElevatorAI.py +++ b/toontown/building/DistributedBBElevatorAI.py @@ -1,6 +1,5 @@ -from . import DistributedBossElevatorAI from .ElevatorConstants import * - +from . import DistributedBossElevatorAI class DistributedBBElevatorAI(DistributedBossElevatorAI.DistributedBossElevatorAI): diff --git a/toontown/building/DistributedBoardingParty.py b/toontown/building/DistributedBoardingParty.py index 526e760..708f246 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 direct.gui.DirectGui import * -from direct.interval.IntervalGlobal import * - +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.toon import BoardingGroupInviterPanels, GroupInvitee, GroupPanel -from toontown.toonbase import ToontownGlobals, TTLocalizer -from toontown.toontowngui import TeaserPanel, TTDialog - +from toontown.toontowngui import TeaserPanel +from direct.interval.IntervalGlobal import * 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 811d51b..4e18be7 100644 --- a/toontown/building/DistributedBoardingPartyAI.py +++ b/toontown/building/DistributedBoardingPartyAI.py @@ -1,17 +1,15 @@ -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, ToontownGlobals - +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.building import BoardingPartyBase +from toontown.toonbase import ToontownAccessAI GROUPMEMBER = 0 GROUPINVITE = 1 diff --git a/toontown/building/DistributedBossElevator.py b/toontown/building/DistributedBossElevator.py index 552bdb4..1f24e0e 100644 --- a/toontown/building/DistributedBossElevator.py +++ b/toontown/building/DistributedBossElevator.py @@ -1,18 +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 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 6d73214..d0d064a 100644 --- a/toontown/building/DistributedBossElevatorAI.py +++ b/toontown/building/DistributedBossElevatorAI.py @@ -1,16 +1,13 @@ -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 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 toontown.suit import DistributedSellbotBossAI class DistributedBossElevatorAI(DistributedElevatorExtAI.DistributedElevatorExtAI): diff --git a/toontown/building/DistributedBuilding.py b/toontown/building/DistributedBuilding.py index 4fa2230..bf24ddc 100644 --- a/toontown/building/DistributedBuilding.py +++ b/toontown/building/DistributedBuilding.py @@ -1,27 +1,23 @@ -import random - from panda3d.core 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 direct.directtools.DirectGeometry import * 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 58f4f9f..2f675c6 100644 --- a/toontown/building/DistributedBuildingAI.py +++ b/toontown/building/DistributedBuildingAI.py @@ -1,26 +1,19 @@ -import random -import time +from otp.ai.AIBaseGlobal import * +from direct.distributed.ClockDelta import * import types - +from direct.task.Task import Task from direct.directnotify import DirectNotifyGlobal from direct.distributed import DistributedObjectAI -from direct.distributed.ClockDelta import * +from direct.fsm import State from direct.fsm import ClassicFSM, State -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.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 toontown.hood import ZoneUtil -from toontown.toonbase.ToontownGlobals import ToonHall - -from . import (DistributedDoorAI, DistributedElevatorExtAI, DistributedKnockKnockDoorAI, DistributedSuitInteriorAI, - DistributedToonHallInteriorAI, DistributedToonInteriorAI, DoorTypes, FADoorCodes, SuitBuildingGlobals, - SuitPlannerInteriorAI) - +from toontown.cogdominium.CogdoLayout import CogdoLayout +from toontown.cogdominium.DistributedCogdoElevatorExtAI import DistributedCogdoElevatorExtAI class DistributedBuildingAI(DistributedObjectAI.DistributedObjectAI): FieldOfficeNumFloors = 1 diff --git a/toontown/building/DistributedBuildingMgrAI.py b/toontown/building/DistributedBuildingMgrAI.py index 784b03d..d506656 100644 --- a/toontown/building/DistributedBuildingMgrAI.py +++ b/toontown/building/DistributedBuildingMgrAI.py @@ -1,19 +1,13 @@ -import json import os -import random -import time - -from direct.directnotify import DirectNotifyGlobal from direct.task.Task import Task - +import json from otp.ai.AIBaseGlobal import * - -from toontown.building import DistributedAnimBuildingAI +from . import DistributedBuildingAI, HQBuildingAI, GagshopBuildingAI, PetshopBuildingAI from toontown.building.KartShopBuildingAI import KartShopBuildingAI +from toontown.building import DistributedAnimBuildingAI +from direct.directnotify import DirectNotifyGlobal from toontown.hood import ZoneUtil - -from . import DistributedBuildingAI, GagshopBuildingAI, HQBuildingAI, PetshopBuildingAI - +import time, random class DistributedBuildingMgrAI: notify = DirectNotifyGlobal.directNotify.newCategory('DistributedBuildingMgrAI') diff --git a/toontown/building/DistributedCFOElevator.py b/toontown/building/DistributedCFOElevator.py index cbccc79..c496fe1 100644 --- a/toontown/building/DistributedCFOElevator.py +++ b/toontown/building/DistributedCFOElevator.py @@ -1,10 +1,8 @@ -from direct.directnotify import DirectNotifyGlobal - -from toontown.toonbase import TTLocalizer - -from . import DistributedBossElevator, DistributedElevator +from . import DistributedElevator +from . import DistributedBossElevator from .ElevatorConstants import * - +from direct.directnotify import DirectNotifyGlobal +from toontown.toonbase import TTLocalizer class DistributedCFOElevator(DistributedBossElevator.DistributedBossElevator): diff --git a/toontown/building/DistributedCFOElevatorAI.py b/toontown/building/DistributedCFOElevatorAI.py index e985769..cd0fc48 100644 --- a/toontown/building/DistributedCFOElevatorAI.py +++ b/toontown/building/DistributedCFOElevatorAI.py @@ -1,6 +1,5 @@ -from . import DistributedBossElevatorAI from .ElevatorConstants import * - +from . import DistributedBossElevatorAI class DistributedCFOElevatorAI(DistributedBossElevatorAI.DistributedBossElevatorAI): diff --git a/toontown/building/DistributedCJElevator.py b/toontown/building/DistributedCJElevator.py index 72bac13..eb7119c 100644 --- a/toontown/building/DistributedCJElevator.py +++ b/toontown/building/DistributedCJElevator.py @@ -1,10 +1,8 @@ -from direct.directnotify import DirectNotifyGlobal - -from toontown.toonbase import TTLocalizer - -from . import DistributedBossElevator, DistributedElevator +from . import DistributedElevator +from . import DistributedBossElevator from .ElevatorConstants import * - +from direct.directnotify import DirectNotifyGlobal +from toontown.toonbase import TTLocalizer class DistributedCJElevator(DistributedBossElevator.DistributedBossElevator): diff --git a/toontown/building/DistributedCJElevatorAI.py b/toontown/building/DistributedCJElevatorAI.py index 7997ee0..854d6cb 100644 --- a/toontown/building/DistributedCJElevatorAI.py +++ b/toontown/building/DistributedCJElevatorAI.py @@ -1,6 +1,5 @@ -from . import DistributedBossElevatorAI from .ElevatorConstants import * - +from . import DistributedBossElevatorAI class DistributedCJElevatorAI(DistributedBossElevatorAI.DistributedBossElevatorAI): diff --git a/toontown/building/DistributedClubElevator.py b/toontown/building/DistributedClubElevator.py index 76587f5..7443c3c 100644 --- a/toontown/building/DistributedClubElevator.py +++ b/toontown/building/DistributedClubElevator.py @@ -1,18 +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.showbase import PythonUtil -from direct.task import Task - -from toontown.building import DistributedElevatorFSM, ElevatorConstants, ElevatorUtils -from toontown.distributed import DelayDelete +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 ToontownGlobals, TTLocalizer - +from toontown.toonbase import TTLocalizer +from direct.fsm.FSM import FSM +from direct.task import Task +from toontown.distributed import DelayDelete +from direct.showbase import PythonUtil class DistributedClubElevator(DistributedElevatorFSM.DistributedElevatorFSM): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedClubElevator') diff --git a/toontown/building/DistributedClubElevatorAI.py b/toontown/building/DistributedClubElevatorAI.py index 549f96d..e2a2f5f 100644 --- a/toontown/building/DistributedClubElevatorAI.py +++ b/toontown/building/DistributedClubElevatorAI.py @@ -1,13 +1,11 @@ -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 - +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.fsm.FSM import FSM class DistributedClubElevatorAI(DistributedElevatorFSMAI.DistributedElevatorFSMAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedElevatorFloorAI') diff --git a/toontown/building/DistributedDoor.py b/toontown/building/DistributedDoor.py index b1b2598..fa6af36 100644 --- a/toontown/building/DistributedDoor.py +++ b/toontown/building/DistributedDoor.py @@ -6,17 +6,31 @@ 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, FADoorCodes +from toontown.building import DoorTypes +from toontown.building import 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, TTLocalizer +from toontown.toonbase import ToontownGlobals +from toontown.toonbase import 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 c800dc9..2c7ff58 100644 --- a/toontown/building/DistributedDoorAI.py +++ b/toontown/building/DistributedDoorAI.py @@ -1,14 +1,12 @@ -from direct.directnotify import DirectNotifyGlobal -from direct.distributed import DistributedObjectAI -from direct.distributed.ClockDelta import * -from direct.fsm import ClassicFSM, State -from direct.task.Task import Task - 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 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 459d73f..f1a9b6e 100644 --- a/toontown/building/DistributedElevator.py +++ b/toontown/building/DistributedElevator.py @@ -1,22 +1,19 @@ 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 -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 .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.task.Task import Task +from toontown.distributed import DelayDelete +from toontown.hood import ZoneUtil +from toontown.toontowngui import TeaserPanel +from toontown.building import BoardingGroupShow class DistributedElevator(DistributedObject.DistributedObject): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedElevator') diff --git a/toontown/building/DistributedElevatorAI.py b/toontown/building/DistributedElevatorAI.py index c2b5536..7e65c79 100644 --- a/toontown/building/DistributedElevatorAI.py +++ b/toontown/building/DistributedElevatorAI.py @@ -1,15 +1,13 @@ -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.toonbase import ToontownAccessAI, ToontownGlobals - +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 class DistributedElevatorAI(DistributedObjectAI.DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedElevatorAI') diff --git a/toontown/building/DistributedElevatorExt.py b/toontown/building/DistributedElevatorExt.py index 7962a9e..cb354c5 100644 --- a/toontown/building/DistributedElevatorExt.py +++ b/toontown/building/DistributedElevatorExt.py @@ -1,19 +1,17 @@ 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 5d515b8..5d7bcdf 100644 --- a/toontown/building/DistributedElevatorExtAI.py +++ b/toontown/building/DistributedElevatorExtAI.py @@ -1,15 +1,12 @@ -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 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 class DistributedElevatorExtAI(DistributedElevatorAI.DistributedElevatorAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedElevatorExtAI') diff --git a/toontown/building/DistributedElevatorFSM.py b/toontown/building/DistributedElevatorFSM.py index dca8dba..34fd308 100644 --- a/toontown/building/DistributedElevatorFSM.py +++ b/toontown/building/DistributedElevatorFSM.py @@ -1,20 +1,18 @@ 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 1cb29bf..8270848 100644 --- a/toontown/building/DistributedElevatorFSMAI.py +++ b/toontown/building/DistributedElevatorFSMAI.py @@ -1,15 +1,11 @@ -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 direct.distributed.ClockDelta import * from .ElevatorConstants import * - +from direct.distributed import DistributedObjectAI +from direct.task import Task +from direct.directnotify import DirectNotifyGlobal +from direct.fsm.FSM import FSM class DistributedElevatorFSMAI(DistributedObjectAI.DistributedObjectAI, FSM): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedElevatorFSMAI') diff --git a/toontown/building/DistributedElevatorFloor.py b/toontown/building/DistributedElevatorFloor.py index 04060d0..0e95f04 100644 --- a/toontown/building/DistributedElevatorFloor.py +++ b/toontown/building/DistributedElevatorFloor.py @@ -1,19 +1,17 @@ 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 c27d37f..35ab445 100644 --- a/toontown/building/DistributedElevatorFloorAI.py +++ b/toontown/building/DistributedElevatorFloorAI.py @@ -1,15 +1,11 @@ -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 direct.distributed.ClockDelta import * from .ElevatorConstants import * - +from . import DistributedElevatorFSMAI +from direct.task import Task +from direct.directnotify import DirectNotifyGlobal +from direct.fsm.FSM import FSM class DistributedElevatorFloorAI(DistributedElevatorFSMAI.DistributedElevatorFSMAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedElevatorFloorAI') diff --git a/toontown/building/DistributedElevatorInt.py b/toontown/building/DistributedElevatorInt.py index 63ddbb0..709131c 100644 --- a/toontown/building/DistributedElevatorInt.py +++ b/toontown/building/DistributedElevatorInt.py @@ -1,17 +1,15 @@ 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 b644912..17a37c4 100644 --- a/toontown/building/DistributedElevatorIntAI.py +++ b/toontown/building/DistributedElevatorIntAI.py @@ -1,17 +1,14 @@ -import copy - -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 - +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 toontown.battle import BattleBase class DistributedElevatorIntAI(DistributedElevatorAI.DistributedElevatorAI): diff --git a/toontown/building/DistributedGagshopInterior.py b/toontown/building/DistributedGagshopInterior.py index e5c7f2e..1ba03cc 100644 --- a/toontown/building/DistributedGagshopInterior.py +++ b/toontown/building/DistributedGagshopInterior.py @@ -1,17 +1,12 @@ -import random - +from toontown.toonbase.ToonBaseGlobal import * from panda3d.core import * from panda3d.toontown import * - -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 * - +import random +from direct.distributed import DistributedObject +from direct.directnotify import DirectNotifyGlobal from . import ToonInteriorColors - +from toontown.hood import ZoneUtil class DistributedGagshopInterior(DistributedObject.DistributedObject): diff --git a/toontown/building/DistributedGagshopInteriorAI.py b/toontown/building/DistributedGagshopInteriorAI.py index 8db44d6..4f7b6b7 100644 --- a/toontown/building/DistributedGagshopInteriorAI.py +++ b/toontown/building/DistributedGagshopInteriorAI.py @@ -1,6 +1,5 @@ -from direct.directnotify import DirectNotifyGlobal from direct.distributed import DistributedObjectAI - +from direct.directnotify import DirectNotifyGlobal class DistributedGagshopInteriorAI(DistributedObjectAI.DistributedObjectAI): diff --git a/toontown/building/DistributedHQInterior.py b/toontown/building/DistributedHQInterior.py index d0b9119..466e797 100644 --- a/toontown/building/DistributedHQInterior.py +++ b/toontown/building/DistributedHQInterior.py @@ -1,6 +1,3 @@ -import pickle -from random import Random - from panda3d.core import ModelNode, NodePath, TextNode from panda3d.toontown import DNADoor @@ -9,9 +6,13 @@ from direct.distributed.DistributedObject import DistributedObject from direct.task.TaskManagerGlobal import taskMgr from toontown.building import ToonInteriorColors -from toontown.toonbase import ToontownGlobals, TTLocalizer +from toontown.toonbase import ToontownGlobals +from toontown.toonbase import 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 e79957a..2aba154 100644 --- a/toontown/building/DistributedHQInteriorAI.py +++ b/toontown/building/DistributedHQInteriorAI.py @@ -1,8 +1,6 @@ -import pickle - -from direct.directnotify import DirectNotifyGlobal from direct.distributed import DistributedObjectAI - +from direct.directnotify import DirectNotifyGlobal +import pickle class DistributedHQInteriorAI(DistributedObjectAI.DistributedObjectAI): diff --git a/toontown/building/DistributedKartShopInterior.py b/toontown/building/DistributedKartShopInterior.py index f19e1f8..60e218e 100644 --- a/toontown/building/DistributedKartShopInterior.py +++ b/toontown/building/DistributedKartShopInterior.py @@ -1,13 +1,10 @@ -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 67156a9..a91f517 100644 --- a/toontown/building/DistributedKartShopInteriorAI.py +++ b/toontown/building/DistributedKartShopInteriorAI.py @@ -1,7 +1,6 @@ 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 7220f3c..c984189 100644 --- a/toontown/building/DistributedKnockKnockDoor.py +++ b/toontown/building/DistributedKnockKnockDoor.py @@ -1,18 +1,15 @@ from panda3d.core import * from panda3d.otp import * - -from direct.directnotify import DirectNotifyGlobal -from direct.distributed.ClockDelta import * -from direct.fsm import ClassicFSM from direct.interval.IntervalGlobal import * - -from toontown.distributed import DelayDelete -from toontown.hood import ZoneUtil -from toontown.toonbase import ToontownGlobals, TTLocalizer - -from . import DistributedAnimatedProp +from direct.distributed.ClockDelta import * from .KnockKnockJokes import * - +from toontown.toonbase import ToontownGlobals +from direct.directnotify import DirectNotifyGlobal +from direct.fsm import ClassicFSM +from . import DistributedAnimatedProp +from toontown.distributed import DelayDelete +from toontown.toonbase import TTLocalizer +from toontown.hood import ZoneUtil class DistributedKnockKnockDoor(DistributedAnimatedProp.DistributedAnimatedProp): diff --git a/toontown/building/DistributedKnockKnockDoorAI.py b/toontown/building/DistributedKnockKnockDoorAI.py index 37d279d..9fdcc19 100644 --- a/toontown/building/DistributedKnockKnockDoorAI.py +++ b/toontown/building/DistributedKnockKnockDoorAI.py @@ -1,12 +1,10 @@ -from direct.directnotify import DirectNotifyGlobal -from direct.distributed.ClockDelta import * -from direct.fsm import ClassicFSM, State -from direct.task.Task import Task - 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.task.Task import Task +from direct.fsm import State class DistributedKnockKnockDoorAI(DistributedAnimatedPropAI.DistributedAnimatedPropAI): diff --git a/toontown/building/DistributedPetshopInterior.py b/toontown/building/DistributedPetshopInterior.py index fec9d19..7e07ce3 100644 --- a/toontown/building/DistributedPetshopInterior.py +++ b/toontown/building/DistributedPetshopInterior.py @@ -1,18 +1,13 @@ -import random - +from toontown.toonbase.ToonBaseGlobal import * from panda3d.core import * from panda3d.toontown import * - -from direct.actor import Actor -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 * - +import random +from direct.distributed import DistributedObject +from direct.directnotify import DirectNotifyGlobal +from direct.actor import Actor from . import ToonInteriorColors - +from toontown.hood import ZoneUtil class DistributedPetshopInterior(DistributedObject.DistributedObject): diff --git a/toontown/building/DistributedPetshopInteriorAI.py b/toontown/building/DistributedPetshopInteriorAI.py index ac3aafd..baf628e 100644 --- a/toontown/building/DistributedPetshopInteriorAI.py +++ b/toontown/building/DistributedPetshopInteriorAI.py @@ -1,6 +1,5 @@ -from direct.directnotify import DirectNotifyGlobal from direct.distributed import DistributedObjectAI - +from direct.directnotify import DirectNotifyGlobal class DistributedPetshopInteriorAI(DistributedObjectAI.DistributedObjectAI): diff --git a/toontown/building/DistributedSuitInterior.py b/toontown/building/DistributedSuitInterior.py index 569f9ce..ec00d18 100644 --- a/toontown/building/DistributedSuitInterior.py +++ b/toontown/building/DistributedSuitInterior.py @@ -1,16 +1,15 @@ -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.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 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 870dc93..fd81bd7 100644 --- a/toontown/building/DistributedSuitInteriorAI.py +++ b/toontown/building/DistributedSuitInteriorAI.py @@ -1,18 +1,16 @@ -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 * - +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 class DistributedSuitInteriorAI(DistributedObjectAI.DistributedObjectAI): diff --git a/toontown/building/DistributedToonHallInterior.py b/toontown/building/DistributedToonHallInterior.py index 81bd311..1fb9d16 100644 --- a/toontown/building/DistributedToonHallInterior.py +++ b/toontown/building/DistributedToonHallInterior.py @@ -1,26 +1,23 @@ -import pickle -import random -import time - 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, ToonHead -from toontown.toonbase import ToontownGlobals from toontown.toonbase.ToonBaseGlobal import * - -from . import ToonInteriorColors +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 toontown.hood import ZoneUtil +from toontown.toon import ToonDNA +from toontown.toon import ToonHead class DistributedToonHallInterior(DistributedToonInterior): diff --git a/toontown/building/DistributedToonHallInteriorAI.py b/toontown/building/DistributedToonHallInteriorAI.py index 26850ec..23a9252 100644 --- a/toontown/building/DistributedToonHallInteriorAI.py +++ b/toontown/building/DistributedToonHallInteriorAI.py @@ -1,7 +1,5 @@ -from toontown.toonbase import ToontownGlobals - from .DistributedToonInteriorAI import * - +from toontown.toonbase import ToontownGlobals class DistributedToonHallInteriorAI(DistributedToonInteriorAI): diff --git a/toontown/building/DistributedToonInterior.py b/toontown/building/DistributedToonInterior.py index c33983f..0d3a3c2 100644 --- a/toontown/building/DistributedToonInterior.py +++ b/toontown/building/DistributedToonInterior.py @@ -1,22 +1,20 @@ -import pickle -import random - +from toontown.toonbase.ToonBaseGlobal import * from panda3d.core import * from panda3d.toontown 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 toontown.hood import ZoneUtil -from toontown.toon import ToonDNA, ToonHead +from direct.distributed.ClockDelta import * from toontown.toonbase import ToontownGlobals -from toontown.toonbase.ToonBaseGlobal import * - -from . import ToonInterior, ToonInteriorColors - +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 toontown.hood import ZoneUtil +from toontown.toon import ToonDNA +from toontown.toon import ToonHead SIGN_LEFT = -4 SIGN_RIGHT = 4 SIGN_BOTTOM = -3.5 diff --git a/toontown/building/DistributedToonInteriorAI.py b/toontown/building/DistributedToonInteriorAI.py index 84a0fd9..89b39b3 100644 --- a/toontown/building/DistributedToonInteriorAI.py +++ b/toontown/building/DistributedToonInteriorAI.py @@ -1,16 +1,13 @@ -import pickle - -from direct.directnotify import DirectNotifyGlobal -from direct.distributed import DistributedObjectAI -from direct.distributed.ClockDelta import * -from direct.fsm import ClassicFSM, State - +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 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 a1c179f..ef334a7 100644 --- a/toontown/building/DistributedTrophyMgr.py +++ b/toontown/building/DistributedTrophyMgr.py @@ -1,9 +1,7 @@ -from direct.directnotify import DirectNotifyGlobal from direct.distributed import DistributedObject - +from direct.directnotify import DirectNotifyGlobal 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 3ee690d..6c92ee1 100644 --- a/toontown/building/DistributedTutorialInterior.py +++ b/toontown/building/DistributedTutorialInterior.py @@ -1,22 +1,19 @@ -import random - +from toontown.toonbase.ToonBaseGlobal import * 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 -from direct.distributed.ClockDelta import * -from direct.interval.IntervalGlobal import * - -from toontown.char import Char +import random +from . import ToonInteriorColors from toontown.hood import ZoneUtil +from toontown.char import Char +from toontown.suit import SuitDNA +from toontown.suit import Suit 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 4aba921..49274a6 100644 --- a/toontown/building/DistributedTutorialInteriorAI.py +++ b/toontown/building/DistributedTutorialInteriorAI.py @@ -1,12 +1,10 @@ -from direct.directnotify import DirectNotifyGlobal -from direct.distributed import DistributedObjectAI +from toontown.toonbase.ToontownGlobals import * +from otp.ai.AIBaseGlobal import * from direct.distributed.ClockDelta import * -from otp.ai.AIBaseGlobal import * - +from direct.directnotify import DirectNotifyGlobal +from direct.distributed import DistributedObjectAI from toontown.toon import NPCToons -from toontown.toonbase.ToontownGlobals import * - class DistributedTutorialInteriorAI(DistributedObjectAI.DistributedObjectAI): @@ -39,4 +37,4 @@ class DistributedTutorialInteriorAI(DistributedObjectAI.DistributedObjectAI): return [self.zoneId, self.block] def getTutorialNpcId(self): - return self.tutorialNpcId + return self.tutorialNpcId \ No newline at end of file diff --git a/toontown/building/DistributedVPElevator.py b/toontown/building/DistributedVPElevator.py index c322be7..10dd6a1 100644 --- a/toontown/building/DistributedVPElevator.py +++ b/toontown/building/DistributedVPElevator.py @@ -1,10 +1,8 @@ -from direct.directnotify import DirectNotifyGlobal - -from toontown.toonbase import TTLocalizer - -from . import DistributedBossElevator, DistributedElevator +from . import DistributedElevator +from . import DistributedBossElevator from .ElevatorConstants import * - +from direct.directnotify import DirectNotifyGlobal +from toontown.toonbase import TTLocalizer class DistributedVPElevator(DistributedBossElevator.DistributedBossElevator): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedVPElevator') diff --git a/toontown/building/DistributedVPElevatorAI.py b/toontown/building/DistributedVPElevatorAI.py index f364b80..7a840f4 100644 --- a/toontown/building/DistributedVPElevatorAI.py +++ b/toontown/building/DistributedVPElevatorAI.py @@ -1,10 +1,7 @@ -from direct.directnotify import DirectNotifyGlobal - -from toontown.toonbase import ToontownGlobals - -from . import DistributedBossElevatorAI from .ElevatorConstants import * - +from . import DistributedBossElevatorAI +from direct.directnotify import DirectNotifyGlobal +from toontown.toonbase import ToontownGlobals class DistributedVPElevatorAI(DistributedBossElevatorAI.DistributedBossElevatorAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedVPElevatorAI') diff --git a/toontown/building/Elevator.py b/toontown/building/Elevator.py index 7993057..823bfa5 100644 --- a/toontown/building/Elevator.py +++ b/toontown/building/Elevator.py @@ -1,14 +1,14 @@ from panda3d.core import * - -from direct.fsm import ClassicFSM, State, StateData +from toontown.toonbase.ToonBaseGlobal import * from direct.gui.DirectGui import * +from panda3d.core import * from direct.interval.IntervalGlobal import * -from direct.showbase import PythonUtil - +from direct.fsm import ClassicFSM, State +from direct.fsm import State +from direct.fsm import StateData from toontown.launcher import DownloadForceAcknowledge from toontown.toonbase import TTLocalizer -from toontown.toonbase.ToonBaseGlobal import * - +from direct.showbase import PythonUtil class Elevator(StateData.StateData): diff --git a/toontown/building/ElevatorConstants.py b/toontown/building/ElevatorConstants.py index 47cdccb..f5a993f 100644 --- a/toontown/building/ElevatorConstants.py +++ b/toontown/building/ElevatorConstants.py @@ -1,5 +1,4 @@ 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 4364186..b64230a 100644 --- a/toontown/building/ElevatorUtils.py +++ b/toontown/building/ElevatorUtils.py @@ -1,10 +1,7 @@ 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 1ef9f71..c483d03 100644 --- a/toontown/building/FADoorCodes.py +++ b/toontown/building/FADoorCodes.py @@ -1,5 +1,4 @@ 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 46f5f72..f8ba965 100644 --- a/toontown/building/GagshopBuildingAI.py +++ b/toontown/building/GagshopBuildingAI.py @@ -1,12 +1,8 @@ from panda3d.core import * - from direct.directnotify import DirectNotifyGlobal - -from toontown.quest import Quests +from . import DistributedDoorAI, DistributedGagshopInteriorAI, FADoorCodes, DoorTypes from toontown.toon import NPCToons - -from . import DistributedDoorAI, DistributedGagshopInteriorAI, DoorTypes, FADoorCodes - +from toontown.quest import Quests class GagshopBuildingAI: diff --git a/toontown/building/HQBuildingAI.py b/toontown/building/HQBuildingAI.py index 8dd8873..ce2ec41 100644 --- a/toontown/building/HQBuildingAI.py +++ b/toontown/building/HQBuildingAI.py @@ -1,12 +1,8 @@ from panda3d.core import * - from direct.directnotify import DirectNotifyGlobal - -from toontown.quest import Quests +from . import DistributedDoorAI, DistributedHQInteriorAI, FADoorCodes, DoorTypes from toontown.toon import NPCToons - -from . import DistributedDoorAI, DistributedHQInteriorAI, DoorTypes, FADoorCodes - +from toontown.quest import Quests class HQBuildingAI: diff --git a/toontown/building/KartShopBuildingAI.py b/toontown/building/KartShopBuildingAI.py index a1a738b..3f8d9b3 100644 --- a/toontown/building/KartShopBuildingAI.py +++ b/toontown/building/KartShopBuildingAI.py @@ -1,14 +1,11 @@ -from panda3d.core import * - from direct.directnotify import DirectNotifyGlobal - -from toontown.building import DoorTypes, FADoorCodes +from panda3d.core import * +from toontown.building import FADoorCodes, DoorTypes 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 c22fc13..506552f 100644 --- a/toontown/building/KnockKnockJokes.py +++ b/toontown/building/KnockKnockJokes.py @@ -1,4 +1,3 @@ from toontown.toonbase import TTLocalizer - KnockKnockJokes = TTLocalizer.KnockKnockJokes KnockKnockContestJokes = TTLocalizer.KnockKnockContestJokes diff --git a/toontown/building/PetshopBuildingAI.py b/toontown/building/PetshopBuildingAI.py index 9286476..555e3ee 100644 --- a/toontown/building/PetshopBuildingAI.py +++ b/toontown/building/PetshopBuildingAI.py @@ -1,15 +1,11 @@ from panda3d.core import * - from direct.directnotify import DirectNotifyGlobal - -from toontown.hood import ZoneUtil -from toontown.pets import DistributedPetAI, PetTraits, PetUtil -from toontown.quest import Quests +from . import DistributedDoorAI, DistributedPetshopInteriorAI, FADoorCodes, DoorTypes from toontown.toon import NPCToons from toontown.toonbase import ToontownGlobals - -from . import DistributedDoorAI, DistributedPetshopInteriorAI, DoorTypes, FADoorCodes - +from toontown.quest import Quests +from toontown.pets import DistributedPetAI, PetTraits, PetUtil +from toontown.hood import ZoneUtil class PetshopBuildingAI: diff --git a/toontown/building/SuitBuildingGlobals.py b/toontown/building/SuitBuildingGlobals.py index 2076174..3eb9174 100644 --- a/toontown/building/SuitBuildingGlobals.py +++ b/toontown/building/SuitBuildingGlobals.py @@ -1,5 +1,4 @@ from .ElevatorConstants import * - SuitBuildingInfo = (((1, 1), (1, 3), (4, 4), diff --git a/toontown/building/SuitInterior.py b/toontown/building/SuitInterior.py index 65c2839..c7ef2b3 100644 --- a/toontown/building/SuitInterior.py +++ b/toontown/building/SuitInterior.py @@ -1,20 +1,18 @@ from panda3d.core import * - -from direct.directnotify import DirectNotifyGlobal -from direct.fsm import ClassicFSM, State, StateData -from direct.showbase import DirectObject -from direct.task.Task import Task - -from otp.distributed.TelemetryLimiter import RotationLimitToH, TLGatherAllAvs - -from toontown.hood import Place -from toontown.suit import Suit -from toontown.toonbase import ToontownBattleGlobals, ToontownGlobals from toontown.toonbase.ToonBaseGlobal import * +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 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 class SuitInterior(Place.Place): notify = DirectNotifyGlobal.directNotify.newCategory('SuitInterior') diff --git a/toontown/building/SuitPlannerInteriorAI.py b/toontown/building/SuitPlannerInteriorAI.py index ea2e6a7..c2567c5 100644 --- a/toontown/building/SuitPlannerInteriorAI.py +++ b/toontown/building/SuitPlannerInteriorAI.py @@ -1,13 +1,9 @@ -import functools -import random - -from direct.directnotify import DirectNotifyGlobal - from otp.ai.AIBaseGlobal import * - +import random, functools +from toontown.suit import SuitDNA +from direct.directnotify import DirectNotifyGlobal +from toontown.suit import DistributedSuitAI 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 56f103d..fccef5b 100644 --- a/toontown/building/ToonInteriorColors.py +++ b/toontown/building/ToonInteriorColors.py @@ -1,5 +1,4 @@ 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 adea904..c2426e5 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) + self.door.setDoorLock(FADoorCodes.TALK_TO_HQ_TOM) \ No newline at end of file diff --git a/toontown/building/TutorialHQBuildingAI.py b/toontown/building/TutorialHQBuildingAI.py index b29daf6..ffb6704 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 toontown.quest import Quests +from . import DistributedDoorAI +from . import DistributedHQInteriorAI +from . import FADoorCodes +from . import DoorTypes from toontown.toon import NPCToons +from toontown.quest import Quests from toontown.toonbase import TTLocalizer -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) + self.insideDoor0.setDoorLock(FADoorCodes.WRONG_DOOR_HQ) \ No newline at end of file diff --git a/toontown/catalog/CatalogAccessoryItem.py b/toontown/catalog/CatalogAccessoryItem.py index 4dfcb07..69715df 100644 --- a/toontown/catalog/CatalogAccessoryItem.py +++ b/toontown/catalog/CatalogAccessoryItem.py @@ -1,16 +1,12 @@ -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 687924d..af31576 100644 --- a/toontown/catalog/CatalogAnimatedFurnitureItem.py +++ b/toontown/catalog/CatalogAnimatedFurnitureItem.py @@ -1,5 +1,4 @@ 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 11ed9e2..cda98e0 100644 --- a/toontown/catalog/CatalogAtticItem.py +++ b/toontown/catalog/CatalogAtticItem.py @@ -1,10 +1,8 @@ -from direct.gui.DirectGui import * -from direct.showbase import PythonUtil - -from toontown.toonbase import ToontownGlobals, TTLocalizer - from . import CatalogItem - +from toontown.toonbase import TTLocalizer +from direct.showbase import PythonUtil +from direct.gui.DirectGui import * +from toontown.toonbase import ToontownGlobals class CatalogAtticItem(CatalogItem.CatalogItem): diff --git a/toontown/catalog/CatalogBeanItem.py b/toontown/catalog/CatalogBeanItem.py index 4796737..0a3e0d5 100644 --- a/toontown/catalog/CatalogBeanItem.py +++ b/toontown/catalog/CatalogBeanItem.py @@ -1,11 +1,8 @@ -from direct.interval.IntervalGlobal import * - -from otp.otpbase import OTPLocalizer - -from toontown.toonbase import ToontownGlobals, TTLocalizer - from . import CatalogItem - +from toontown.toonbase import ToontownGlobals +from toontown.toonbase import TTLocalizer +from otp.otpbase import OTPLocalizer +from direct.interval.IntervalGlobal import * class CatalogBeanItem(CatalogItem.CatalogItem): sequenceNumber = 0 diff --git a/toontown/catalog/CatalogChatItem.py b/toontown/catalog/CatalogChatItem.py index 2f17f6b..1f161af 100644 --- a/toontown/catalog/CatalogChatItem.py +++ b/toontown/catalog/CatalogChatItem.py @@ -1,11 +1,8 @@ from panda3d.core import * - -from otp.otpbase import OTPLocalizer - -from toontown.toonbase import ToontownGlobals, TTLocalizer - from . import CatalogItem - +from toontown.toonbase import ToontownGlobals +from otp.otpbase import OTPLocalizer +from toontown.toonbase import TTLocalizer bannedPhrases = [11009] class CatalogChatItem(CatalogItem.CatalogItem): diff --git a/toontown/catalog/CatalogChatItemPicker.py b/toontown/catalog/CatalogChatItemPicker.py index 8608db9..1355017 100644 --- a/toontown/catalog/CatalogChatItemPicker.py +++ b/toontown/catalog/CatalogChatItemPicker.py @@ -1,15 +1,11 @@ -from panda3d.core import * - from direct.gui.DirectGui import * +from panda3d.core import * from direct.showbase import DirectObject - -from otp.otpbase import OTPLocalizer - -from toontown.toonbase import ToontownGlobals, TTLocalizer -from toontown.toontowngui import TTDialog - from . import CatalogItem - +from toontown.toonbase import ToontownGlobals +from toontown.toonbase import TTLocalizer +from otp.otpbase import OTPLocalizer +from toontown.toontowngui import TTDialog NUM_ITEMS_SHOWN = 15 class CatalogChatItemPicker(DirectObject.DirectObject): diff --git a/toontown/catalog/CatalogClothingItem.py b/toontown/catalog/CatalogClothingItem.py index eb87210..c58a7d5 100644 --- a/toontown/catalog/CatalogClothingItem.py +++ b/toontown/catalog/CatalogClothingItem.py @@ -1,15 +1,11 @@ -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 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 * CTArticle = 0 CTString = 1 CTBasePrice = 2 diff --git a/toontown/catalog/CatalogEmoteItem.py b/toontown/catalog/CatalogEmoteItem.py index 84921c8..52bebd8 100644 --- a/toontown/catalog/CatalogEmoteItem.py +++ b/toontown/catalog/CatalogEmoteItem.py @@ -1,11 +1,8 @@ -from direct.interval.IntervalGlobal import * - -from otp.otpbase import OTPLocalizer - -from toontown.toonbase import ToontownGlobals, TTLocalizer - from . import CatalogItem - +from toontown.toonbase import ToontownGlobals +from toontown.toonbase import TTLocalizer +from otp.otpbase import OTPLocalizer +from direct.interval.IntervalGlobal import * LoyaltyEmoteItems = (20, 21, 22, 23, 24) class CatalogEmoteItem(CatalogItem.CatalogItem): @@ -50,9 +47,10 @@ 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() @@ -76,9 +74,10 @@ 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 f217538..bf23940 100644 --- a/toontown/catalog/CatalogFlooringItem.py +++ b/toontown/catalog/CatalogFlooringItem.py @@ -1,5 +1,4 @@ from .CatalogSurfaceItem import * - FTTextureName = 0 FTColor = 1 FTBasePrice = 2 diff --git a/toontown/catalog/CatalogFurnitureItem.py b/toontown/catalog/CatalogFurnitureItem.py index 4b35601..8bebe19 100644 --- a/toontown/catalog/CatalogFurnitureItem.py +++ b/toontown/catalog/CatalogFurnitureItem.py @@ -1,9 +1,8 @@ +from . import CatalogAtticItem +from . import CatalogItem import random - -from toontown.toonbase import ToontownGlobals, TTLocalizer - -from . import CatalogAtticItem, CatalogItem - +from toontown.toonbase import TTLocalizer +from toontown.toonbase import ToontownGlobals FTModelName = 0 FTColor = 1 FTColorOptions = 2 diff --git a/toontown/catalog/CatalogGardenItem.py b/toontown/catalog/CatalogGardenItem.py index 39131bc..dcaff93 100644 --- a/toontown/catalog/CatalogGardenItem.py +++ b/toontown/catalog/CatalogGardenItem.py @@ -1,15 +1,11 @@ -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 - +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 class CatalogGardenItem(CatalogItem.CatalogItem): sequenceNumber = 0 diff --git a/toontown/catalog/CatalogGardenStarterItem.py b/toontown/catalog/CatalogGardenStarterItem.py index 13d9d95..0baa318 100644 --- a/toontown/catalog/CatalogGardenStarterItem.py +++ b/toontown/catalog/CatalogGardenStarterItem.py @@ -1,15 +1,11 @@ -import time - -from direct.interval.IntervalGlobal import * - -from otp.otpbase import OTPLocalizer - -from toontown.estate import GardenTutorial -from toontown.toonbase import ToontownGlobals, TTLocalizer -from toontown.toontowngui import TTDialog - 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 toontown.estate import GardenTutorial class CatalogGardenStarterItem(CatalogItem.CatalogItem): diff --git a/toontown/catalog/CatalogGenerator.py b/toontown/catalog/CatalogGenerator.py index ffd4740..61ccc99 100644 --- a/toontown/catalog/CatalogGenerator.py +++ b/toontown/catalog/CatalogGenerator.py @@ -1,35 +1,31 @@ +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 ea1a90a..fca964a 100644 --- a/toontown/catalog/CatalogInvalidItem.py +++ b/toontown/catalog/CatalogInvalidItem.py @@ -1,9 +1,7 @@ -from direct.showbase import PythonUtil - -from toontown.toonbase import ToontownGlobals, TTLocalizer - from . import CatalogItem - +from toontown.toonbase import TTLocalizer +from direct.showbase import PythonUtil +from toontown.toonbase import ToontownGlobals class CatalogInvalidItem(CatalogItem.CatalogItem): diff --git a/toontown/catalog/CatalogItem.py b/toontown/catalog/CatalogItem.py index f87ec4a..0ed36d2 100644 --- a/toontown/catalog/CatalogItem.py +++ b/toontown/catalog/CatalogItem.py @@ -1,14 +1,11 @@ -import sys - -from panda3d.core import * - from direct.directnotify import DirectNotifyGlobal +from panda3d.core import * +from toontown.toonbase import TTLocalizer +from toontown.toonbase import ToontownGlobals +from direct.interval.IntervalGlobal import * from direct.distributed.PyDatagram import PyDatagram from direct.distributed.PyDatagramIterator import PyDatagramIterator -from direct.interval.IntervalGlobal import * - -from toontown.toonbase import ToontownGlobals, TTLocalizer - +import sys CatalogReverseType = None CatalogItemVersion = 8 CatalogBackorderMarkup = 1.2 diff --git a/toontown/catalog/CatalogItemList.py b/toontown/catalog/CatalogItemList.py index 93a7097..1c3c199 100644 --- a/toontown/catalog/CatalogItemList.py +++ b/toontown/catalog/CatalogItemList.py @@ -1,12 +1,8 @@ -import functools - +from . import CatalogItem from panda3d.core import * - from direct.distributed.PyDatagram import PyDatagram from direct.distributed.PyDatagramIterator import PyDatagramIterator - -from . import CatalogItem - +import functools class CatalogItemList: diff --git a/toontown/catalog/CatalogItemPanel.py b/toontown/catalog/CatalogItemPanel.py index b718e67..99deb70 100644 --- a/toontown/catalog/CatalogItemPanel.py +++ b/toontown/catalog/CatalogItemPanel.py @@ -1,21 +1,19 @@ -from panda3d.core import * - -from direct.directnotify import DirectNotifyGlobal from direct.gui.DirectGui import * - -from otp.otpbase import OTPGlobals - -from toontown.toonbase import ToontownGlobals, TTLocalizer +from panda3d.core import * +from toontown.toonbase import ToontownGlobals from toontown.toontowngui import TTDialog -from toontown.toontowngui.TeaserPanel import TeaserPanel - -from . import CatalogItem, CatalogItemTypes +from toontown.toonbase import TTLocalizer +from . import CatalogItemTypes +from . import CatalogItem +from .CatalogWallpaperItem import getAllWallpapers from .CatalogFlooringItem import getAllFloorings -from .CatalogFurnitureItem import FLTrunk, getAllFurnitures from .CatalogMouldingItem import getAllMouldings from .CatalogWainscotingItem import getAllWainscotings -from .CatalogWallpaperItem import getAllWallpapers - +from .CatalogFurnitureItem import getAllFurnitures +from .CatalogFurnitureItem import FLTrunk +from toontown.toontowngui.TeaserPanel import TeaserPanel +from otp.otpbase import OTPGlobals +from direct.directnotify import DirectNotifyGlobal 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 676d65f..190aa8d 100644 --- a/toontown/catalog/CatalogItemTypes.py +++ b/toontown/catalog/CatalogItemTypes.py @@ -1,9 +1,23 @@ -from . import (CatalogAccessoryItem, CatalogAnimatedFurnitureItem, CatalogBeanItem, CatalogChatItem, - CatalogClothingItem, CatalogEmoteItem, CatalogFlooringItem, CatalogFurnitureItem, CatalogGardenItem, - CatalogGardenStarterItem, CatalogInvalidItem, CatalogMouldingItem, CatalogNametagItem, - CatalogPetTrickItem, CatalogPoleItem, CatalogRentalItem, CatalogToonStatueItem, CatalogWainscotingItem, - CatalogWallpaperItem, CatalogWindowItem) - +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 INVALID_ITEM = 0 FURNITURE_ITEM = 1 CHAT_ITEM = 2 diff --git a/toontown/catalog/CatalogManager.py b/toontown/catalog/CatalogManager.py index 14266c3..c558879 100644 --- a/toontown/catalog/CatalogManager.py +++ b/toontown/catalog/CatalogManager.py @@ -1,6 +1,5 @@ -from direct.directnotify import DirectNotifyGlobal from direct.distributed import DistributedObject - +from direct.directnotify import DirectNotifyGlobal class CatalogManager(DistributedObject.DistributedObject): notify = DirectNotifyGlobal.directNotify.newCategory('CatalogManager') diff --git a/toontown/catalog/CatalogManagerAI.py b/toontown/catalog/CatalogManagerAI.py index b6efe3c..e348b12 100644 --- a/toontown/catalog/CatalogManagerAI.py +++ b/toontown/catalog/CatalogManagerAI.py @@ -1,7 +1,6 @@ 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 1fcc05d..c4b289f 100644 --- a/toontown/catalog/CatalogMouldingItem.py +++ b/toontown/catalog/CatalogMouldingItem.py @@ -1,5 +1,4 @@ from .CatalogSurfaceItem import * - MTTextureName = 0 MTColor = 1 MTBasePrice = 2 diff --git a/toontown/catalog/CatalogNametagItem.py b/toontown/catalog/CatalogNametagItem.py index 12186a2..296d7cc 100644 --- a/toontown/catalog/CatalogNametagItem.py +++ b/toontown/catalog/CatalogNametagItem.py @@ -1,12 +1,9 @@ -from direct.gui.DirectGui import * -from direct.interval.IntervalGlobal import * - -from otp.otpbase import OTPLocalizer - -from toontown.toonbase import ToontownGlobals, TTLocalizer - 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 * class CatalogNametagItem(CatalogItem.CatalogItem): sequenceNumber = 0 diff --git a/toontown/catalog/CatalogNotifyDialog.py b/toontown/catalog/CatalogNotifyDialog.py index 95616d6..53bdc6b 100644 --- a/toontown/catalog/CatalogNotifyDialog.py +++ b/toontown/catalog/CatalogNotifyDialog.py @@ -1,10 +1,8 @@ -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 toontown.toonbase import ToontownGlobals, TTLocalizer - +from panda3d.core import * CatalogNotifyBaseXPos = 0.4 class CatalogNotifyDialog: diff --git a/toontown/catalog/CatalogPetTrickItem.py b/toontown/catalog/CatalogPetTrickItem.py index c7a9689..29117a3 100644 --- a/toontown/catalog/CatalogPetTrickItem.py +++ b/toontown/catalog/CatalogPetTrickItem.py @@ -1,12 +1,9 @@ -from direct.interval.IntervalGlobal import * - -from otp.otpbase import OTPLocalizer - -from toontown.pets import PetTricks -from toontown.toonbase import ToontownGlobals, TTLocalizer - 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 * class CatalogPetTrickItem(CatalogItem.CatalogItem): sequenceNumber = 0 @@ -45,7 +42,7 @@ class CatalogPetTrickItem(CatalogItem.CatalogItem): return ToontownGlobals.P_ItemAvailable def getPicture(self, avatar): - from toontown.pets import Pet, PetDNA + from toontown.pets import PetDNA, Pet pet = Pet.Pet(forGui=1) dna = avatar.petDNA if dna == None: diff --git a/toontown/catalog/CatalogPoleItem.py b/toontown/catalog/CatalogPoleItem.py index 120fb8f..afa6e02 100644 --- a/toontown/catalog/CatalogPoleItem.py +++ b/toontown/catalog/CatalogPoleItem.py @@ -1,11 +1,9 @@ -from direct.actor import Actor -from direct.interval.IntervalGlobal import * - -from toontown.fishing import FishGlobals -from toontown.toonbase import ToontownGlobals, TTLocalizer - 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 * class CatalogPoleItem(CatalogItem.CatalogItem): sequenceNumber = 0 diff --git a/toontown/catalog/CatalogRentalItem.py b/toontown/catalog/CatalogRentalItem.py index cce57d8..4f2a465 100644 --- a/toontown/catalog/CatalogRentalItem.py +++ b/toontown/catalog/CatalogRentalItem.py @@ -1,14 +1,10 @@ -import time - -from direct.interval.IntervalGlobal import * - -from otp.otpbase import OTPLocalizer - -from toontown.toonbase import ToontownGlobals, TTLocalizer -from toontown.toontowngui import TTDialog - 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 class CatalogRentalItem(CatalogItem.CatalogItem): diff --git a/toontown/catalog/CatalogScreen.py b/toontown/catalog/CatalogScreen.py index f6f63d9..7b9e3c9 100644 --- a/toontown/catalog/CatalogScreen.py +++ b/toontown/catalog/CatalogScreen.py @@ -1,18 +1,19 @@ -import random - from panda3d.core import * - -from direct.actor import Actor -from direct.directnotify import DirectNotifyGlobal from direct.gui.DirectGui import * +from panda3d.core import * from direct.gui.DirectScrolledList import * - -from toontown.toon import DistributedToon -from toontown.toonbase import ToontownGlobals, TTLocalizer +from toontown.toonbase import ToontownGlobals from toontown.toontowngui import TTDialog - -from . import CatalogFurnitureItem, CatalogInvalidItem, CatalogItem, CatalogItemPanel, CatalogItemTypes - +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 direct.directnotify import DirectNotifyGlobal 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 3cf6aa8..b391000 100644 --- a/toontown/catalog/CatalogSurfaceItem.py +++ b/toontown/catalog/CatalogSurfaceItem.py @@ -1,8 +1,8 @@ -from toontown.toonbase import ToontownGlobals, TTLocalizer - -from . import CatalogAtticItem, CatalogItem +from . import CatalogItem +from . import CatalogAtticItem +from toontown.toonbase import ToontownGlobals +from toontown.toonbase import TTLocalizer from .CatalogSurfaceColors import * - STWallpaper = 0 STMoulding = 1 STFlooring = 2 diff --git a/toontown/catalog/CatalogToonStatueItem.py b/toontown/catalog/CatalogToonStatueItem.py index 609ff76..20046d8 100644 --- a/toontown/catalog/CatalogToonStatueItem.py +++ b/toontown/catalog/CatalogToonStatueItem.py @@ -1,12 +1,9 @@ -from direct.interval.IntervalGlobal import * - -from otp.otpbase import OTPLocalizer - -from toontown.estate import GardenGlobals -from toontown.toonbase import ToontownGlobals, TTLocalizer - from . import CatalogGardenItem - +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 class CatalogToonStatueItem(CatalogGardenItem.CatalogGardenItem): pictureToonStatue = None diff --git a/toontown/catalog/CatalogWainscotingItem.py b/toontown/catalog/CatalogWainscotingItem.py index 322761d..9915e5c 100644 --- a/toontown/catalog/CatalogWainscotingItem.py +++ b/toontown/catalog/CatalogWainscotingItem.py @@ -1,5 +1,4 @@ from .CatalogSurfaceItem import * - WSTTextureName = 0 WSTColor = 1 WSTBasePrice = 2 diff --git a/toontown/catalog/CatalogWallpaperItem.py b/toontown/catalog/CatalogWallpaperItem.py index bdc0a09..a9b8949 100644 --- a/toontown/catalog/CatalogWallpaperItem.py +++ b/toontown/catalog/CatalogWallpaperItem.py @@ -1,5 +1,4 @@ from .CatalogSurfaceItem import * - WTTextureName = 0 WTColor = 1 WTBorderList = 2 diff --git a/toontown/catalog/CatalogWindowItem.py b/toontown/catalog/CatalogWindowItem.py index a8982d1..3d824f2 100644 --- a/toontown/catalog/CatalogWindowItem.py +++ b/toontown/catalog/CatalogWindowItem.py @@ -1,9 +1,8 @@ from panda3d.core import * - -from toontown.toonbase import ToontownGlobals, TTLocalizer - -from . import CatalogAtticItem, CatalogItem - +from . import CatalogAtticItem +from . import CatalogItem +from toontown.toonbase import ToontownGlobals +from toontown.toonbase import TTLocalizer WVTModelName = 0 WVTBasePrice = 1 WVTSkyName = 2 diff --git a/toontown/catalog/MailboxScreen.py b/toontown/catalog/MailboxScreen.py index fa7dbf6..e4a5eee 100644 --- a/toontown/catalog/MailboxScreen.py +++ b/toontown/catalog/MailboxScreen.py @@ -1,21 +1,17 @@ -from panda3d.core import * - from direct.directnotify.DirectNotifyGlobal import * from direct.gui.DirectGui import * from direct.showbase import DirectObject, PythonUtil -from direct.showbase.PythonUtil import StackTrace - +from panda3d.core import * 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 ToontownGlobals, TTLocalizer +from toontown.toonbase import TTLocalizer, ToontownGlobals 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 31e204f..3910dbc 100644 --- a/toontown/char/Char.py +++ b/toontown/char/Char.py @@ -1,13 +1,10 @@ -import random - +from otp.avatar import Avatar from panda3d.core import * from panda3d.otp import * - -from direct.directnotify import DirectNotifyGlobal from direct.task import Task - -from otp.avatar import Avatar - +import random +from panda3d.core import * +from direct.directnotify import DirectNotifyGlobal AnimDict = {'mk': (('walk', 'walk', 3), ('run', 'run', 3), ('neutral', 'wait', 3), diff --git a/toontown/char/CharDNA.py b/toontown/char/CharDNA.py index a05c844..0c7c5da 100644 --- a/toontown/char/CharDNA.py +++ b/toontown/char/CharDNA.py @@ -1,13 +1,10 @@ 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 615729c..6517af5 100644 --- a/toontown/char/DistributedChar.py +++ b/toontown/char/DistributedChar.py @@ -1,8 +1,6 @@ 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 ba68877..aa54c0a 100644 --- a/toontown/chat/ResistanceChat.py +++ b/toontown/chat/ResistanceChat.py @@ -1,13 +1,10 @@ -import random - -from panda3d.core import * - from direct.interval.IntervalGlobal import * -from direct.particles import Particles - +from panda3d.core import * +from toontown.toonbase import TTLocalizer +from toontown.toonbase import ToontownBattleGlobals from toontown.battle import BattleParticles -from toontown.toonbase import ToontownBattleGlobals, TTLocalizer - +from direct.particles import Particles +import random TTBG = ToontownBattleGlobals TTL = TTLocalizer EFFECT_RADIUS = 30 diff --git a/toontown/chat/TTChatInputNormal.py b/toontown/chat/TTChatInputNormal.py index 14867da..b474e34 100644 --- a/toontown/chat/TTChatInputNormal.py +++ b/toontown/chat/TTChatInputNormal.py @@ -1,10 +1,8 @@ -from panda3d.core import * - from direct.gui.DirectGui import * - +from panda3d.core import * from otp.chat import ChatInputNormal -from otp.otpbase import OTPGlobals, OTPLocalizer - +from otp.otpbase import OTPLocalizer +from otp.otpbase import OTPGlobals class TTChatInputNormal(ChatInputNormal.ChatInputNormal): diff --git a/toontown/chat/TTChatInputSpeedChat.py b/toontown/chat/TTChatInputSpeedChat.py index 6a6e1d6..27434db 100644 --- a/toontown/chat/TTChatInputSpeedChat.py +++ b/toontown/chat/TTChatInputSpeedChat.py @@ -1,22 +1,22 @@ -import string - -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 panda3d.core import * from otp.speedchat.SpeedChatTypes import * - -from toontown.parties.PartyGlobals import ActivityIds, DecorationIds -from toontown.shtiker.OptionsPage import speedChatStyles -from toontown.speedchat import TTSCIndexedTerminal, TTSCSingingTerminal, TTSpeedChatGlobals from toontown.speedchat.TTSpeedChatTypes import * -from toontown.toonbase import ToontownGlobals, TTLocalizer - +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 toontown.parties.PartyGlobals import ActivityIds, DecorationIds +from toontown.toonbase import ToontownGlobals scStructure = [[OTPLocalizer.SCMenuHello, {100: 0}, {101: 0}, diff --git a/toontown/chat/TTChatInputWhiteList.py b/toontown/chat/TTChatInputWhiteList.py index 17abe4c..454593c 100644 --- a/toontown/chat/TTChatInputWhiteList.py +++ b/toontown/chat/TTChatInputWhiteList.py @@ -1,18 +1,14 @@ -import sys - -from panda3d.core import * - -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 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 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 14e0f7d..934054b 100644 --- a/toontown/chat/TTSCWhiteListTerminal.py +++ b/toontown/chat/TTSCWhiteListTerminal.py @@ -1,6 +1,5 @@ -from otp.otpbase.OTPLocalizer import SpeedChatStaticText from otp.speedchat.SCTerminal import SCTerminal - +from otp.otpbase.OTPLocalizer import SpeedChatStaticText SCStaticTextMsgEvent = 'SCStaticTextMsg' def decodeSCStaticTextMsg(textId): diff --git a/toontown/chat/TTTalkAssistant.py b/toontown/chat/TTTalkAssistant.py index 24a2a61..6913e0a 100644 --- a/toontown/chat/TTTalkAssistant.py +++ b/toontown/chat/TTTalkAssistant.py @@ -1,22 +1,19 @@ import string import sys -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 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 class TTTalkAssistant(TalkAssistant): notify = DirectNotifyGlobal.directNotify.newCategory('TTTalkAssistant') diff --git a/toontown/chat/TTWhiteList.py b/toontown/chat/TTWhiteList.py index dc3b533..184ae96 100644 --- a/toontown/chat/TTWhiteList.py +++ b/toontown/chat/TTWhiteList.py @@ -1,15 +1,10 @@ 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 9e6679b..5254154 100644 --- a/toontown/chat/ToonChatGarbler.py +++ b/toontown/chat/ToonChatGarbler.py @@ -1,11 +1,8 @@ -import random import string - -from otp.chat import ChatGarbler -from otp.otpbase import OTPLocalizer - +import random from toontown.toonbase import TTLocalizer - +from otp.otpbase import OTPLocalizer +from otp.chat import ChatGarbler class ToonChatGarbler(ChatGarbler.ChatGarbler): animalSounds = {'dog': TTLocalizer.ChatGarblerDog, diff --git a/toontown/chat/ToontownChatManager.py b/toontown/chat/ToontownChatManager.py index 294a5ab..579aa83 100644 --- a/toontown/chat/ToontownChatManager.py +++ b/toontown/chat/ToontownChatManager.py @@ -1,23 +1,18 @@ import sys - -from panda3d.core import * - -from direct.directnotify import DirectNotifyGlobal -from direct.gui.DirectGui import * from direct.showbase import DirectObject from direct.showbase.PythonUtil import traceFunctionCall - -from otp.chat import ChatManager -from otp.otpbase import OTPGlobals, OTPLocalizer - +from otp.otpbase import OTPGlobals +from otp.otpbase import OTPLocalizer from toontown.toonbase import TTLocalizer from toontown.toontowngui import TeaserPanel - -from .TTChatInputNormal import TTChatInputNormal +from direct.directnotify import DirectNotifyGlobal +from direct.gui.DirectGui import * +from panda3d.core import * +from otp.chat import ChatManager from .TTChatInputSpeedChat import TTChatInputSpeedChat +from .TTChatInputNormal import TTChatInputNormal 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 ed2baeb..df31d8b 100644 --- a/toontown/classicchars/CCharChatter.py +++ b/toontown/classicchars/CCharChatter.py @@ -1,5 +1,5 @@ -from toontown.toonbase import ToontownGlobals, TTLocalizer - +from toontown.toonbase import TTLocalizer +from toontown.toonbase import ToontownGlobals GREETING = 0 COMMENT = 1 GOODBYE = 2 diff --git a/toontown/classicchars/CCharPaths.py b/toontown/classicchars/CCharPaths.py index ae04b4b..8e97a39 100644 --- a/toontown/classicchars/CCharPaths.py +++ b/toontown/classicchars/CCharPaths.py @@ -1,9 +1,7 @@ +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 a723eba..5ce497b 100644 --- a/toontown/classicchars/CharStateDatas.py +++ b/toontown/classicchars/CharStateDatas.py @@ -1,16 +1,12 @@ from panda3d.core import * - -from direct.directnotify import DirectNotifyGlobal +from direct.interval.IntervalGlobal import * from direct.distributed.ClockDelta import * from direct.fsm import StateData -from direct.interval.IntervalGlobal import * +from direct.directnotify import DirectNotifyGlobal from direct.showbase.PythonUtil import * from direct.task import Task - -from toontown.toonbase import ToontownGlobals - from . import CCharPaths - +from toontown.toonbase import ToontownGlobals class CharNeutralState(StateData.StateData): notify = DirectNotifyGlobal.directNotify.newCategory('CharNeutralState') diff --git a/toontown/classicchars/CharStateDatasAI.py b/toontown/classicchars/CharStateDatasAI.py index 7650b39..6e2f68b 100644 --- a/toontown/classicchars/CharStateDatasAI.py +++ b/toontown/classicchars/CharStateDatasAI.py @@ -1,16 +1,11 @@ -import random - -from direct.directnotify import DirectNotifyGlobal +from otp.ai.AIBaseGlobal import * 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 bac11a6..f5c908a 100644 --- a/toontown/classicchars/DistributedCCharBase.py +++ b/toontown/classicchars/DistributedCCharBase.py @@ -1,23 +1,20 @@ -import copy - from panda3d.core import * from panda3d.otp import * -from panda3d.otp import CFQuicktalker - -from direct.controls.ControlManager import CollisionHandlerRayStart -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 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, Pluto, WesternPluto - -from . import CCharChatter, CCharPaths - +from toontown.toonbase.TTLocalizer import Donald, DonaldDock, WesternPluto, Pluto +from toontown.effects import DustCloud +from . import CCharChatter +from . import CCharPaths +import copy class DistributedCCharBase(DistributedChar.DistributedChar): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedCCharBase') diff --git a/toontown/classicchars/DistributedCCharBaseAI.py b/toontown/classicchars/DistributedCCharBaseAI.py index 3d4fd3e..010aa2a 100644 --- a/toontown/classicchars/DistributedCCharBaseAI.py +++ b/toontown/classicchars/DistributedCCharBaseAI.py @@ -1,15 +1,11 @@ -import functools -import random - -from direct.directnotify import DirectNotifyGlobal -from direct.distributed.ClockDelta import * - from otp.ai.AIBaseGlobal import * +from direct.distributed.ClockDelta 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 95a927c..6400200 100644 --- a/toontown/classicchars/DistributedChip.py +++ b/toontown/classicchars/DistributedChip.py @@ -1,11 +1,11 @@ -from direct.directnotify import DirectNotifyGlobal -from direct.fsm import ClassicFSM, State from direct.showbase.ShowBaseGlobal import * - -from toontown.toonbase import ToontownGlobals, TTLocalizer - -from . import CharStateDatas, DistributedCCharBase - +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 class DistributedChip(DistributedCCharBase.DistributedCCharBase): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedChip') diff --git a/toontown/classicchars/DistributedChipAI.py b/toontown/classicchars/DistributedChipAI.py index f780389..d9cd262 100644 --- a/toontown/classicchars/DistributedChipAI.py +++ b/toontown/classicchars/DistributedChipAI.py @@ -1,15 +1,13 @@ -import random - -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 - +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 class DistributedChipAI(DistributedCCharBaseAI.DistributedCCharBaseAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedChipAI') diff --git a/toontown/classicchars/DistributedDaisy.py b/toontown/classicchars/DistributedDaisy.py index c2fb4c4..a495f28 100644 --- a/toontown/classicchars/DistributedDaisy.py +++ b/toontown/classicchars/DistributedDaisy.py @@ -1,12 +1,12 @@ -from direct.directnotify import DirectNotifyGlobal -from direct.fsm import ClassicFSM, State 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 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 dc0e308..89a136e 100644 --- a/toontown/classicchars/DistributedDaisyAI.py +++ b/toontown/classicchars/DistributedDaisyAI.py @@ -1,15 +1,13 @@ -import random - -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 - +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 class DistributedDaisyAI(DistributedCCharBaseAI.DistributedCCharBaseAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedDaisyAI') diff --git a/toontown/classicchars/DistributedDale.py b/toontown/classicchars/DistributedDale.py index a133336..a153008 100644 --- a/toontown/classicchars/DistributedDale.py +++ b/toontown/classicchars/DistributedDale.py @@ -1,11 +1,11 @@ -from direct.directnotify import DirectNotifyGlobal -from direct.fsm import ClassicFSM, State from direct.showbase.ShowBaseGlobal import * - -from toontown.toonbase import ToontownGlobals, TTLocalizer - -from . import CharStateDatas, DistributedCCharBase - +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 class DistributedDale(DistributedCCharBase.DistributedCCharBase): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedDale') diff --git a/toontown/classicchars/DistributedDaleAI.py b/toontown/classicchars/DistributedDaleAI.py index 59cdeaf..4b0991f 100644 --- a/toontown/classicchars/DistributedDaleAI.py +++ b/toontown/classicchars/DistributedDaleAI.py @@ -1,15 +1,13 @@ -import random - -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 - +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 class DistributedDaleAI(DistributedCCharBaseAI.DistributedCCharBaseAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedDaleAI') diff --git a/toontown/classicchars/DistributedDonald.py b/toontown/classicchars/DistributedDonald.py index 25cc8dc..67b1be4 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.interval.IntervalGlobal import * - +from direct.fsm import State +from . import CharStateDatas +from . import CCharChatter +from toontown.toonbase import ToontownGlobals +from toontown.toonbase import TTLocalizer 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 d4ca943..c7d0152 100644 --- a/toontown/classicchars/DistributedDonaldAI.py +++ b/toontown/classicchars/DistributedDonaldAI.py @@ -1,15 +1,13 @@ -import random - +from otp.ai.AIBaseGlobal import * +from . import DistributedCCharBaseAI from direct.directnotify import DirectNotifyGlobal from direct.fsm import ClassicFSM, State +from direct.fsm import State from direct.task import Task - -from otp.ai.AIBaseGlobal import * - -from toontown.toonbase import ToontownGlobals, TTLocalizer - -from . import CharStateDatasAI, DistributedCCharBaseAI - +import random +from toontown.toonbase import ToontownGlobals +from toontown.toonbase import TTLocalizer +from . import CharStateDatasAI class DistributedDonaldAI(DistributedCCharBaseAI.DistributedCCharBaseAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedDonaldAI') diff --git a/toontown/classicchars/DistributedDonaldDock.py b/toontown/classicchars/DistributedDonaldDock.py index 1e95501..593af7f 100644 --- a/toontown/classicchars/DistributedDonaldDock.py +++ b/toontown/classicchars/DistributedDonaldDock.py @@ -1,14 +1,14 @@ from panda3d.core import * - -from direct.directnotify import DirectNotifyGlobal -from direct.fsm import ClassicFSM, State, StateData 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.task import Task - -from toontown.toonbase import ToontownGlobals, TTLocalizer - -from . import CharStateDatas, DistributedCCharBase - +from toontown.toonbase import TTLocalizer class DistributedDonaldDock(DistributedCCharBase.DistributedCCharBase): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedDonaldDock') diff --git a/toontown/classicchars/DistributedDonaldDockAI.py b/toontown/classicchars/DistributedDonaldDockAI.py index 679e73b..ac41458 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 otp.ai.AIBaseGlobal import * - -from toontown.classicchars import CharStateDatasAI, DistributedCCharBaseAI -from toontown.toonbase import ToontownGlobals, TTLocalizer - +from toontown.classicchars import CharStateDatasAI +from toontown.toonbase import ToontownGlobals +from toontown.toonbase import TTLocalizer class DistributedDonaldDockAI(DistributedCCharBaseAI.DistributedCCharBaseAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedDonaldDockAI') diff --git a/toontown/classicchars/DistributedFrankenDonald.py b/toontown/classicchars/DistributedFrankenDonald.py index d76f169..bbd193b 100644 --- a/toontown/classicchars/DistributedFrankenDonald.py +++ b/toontown/classicchars/DistributedFrankenDonald.py @@ -1,14 +1,15 @@ 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.interval.IntervalGlobal import * - +from direct.fsm import State +from . import CharStateDatas +from . import CCharChatter +from toontown.toonbase import ToontownGlobals +from toontown.toonbase import TTLocalizer 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 a5f681e..9f67708 100644 --- a/toontown/classicchars/DistributedFrankenDonaldAI.py +++ b/toontown/classicchars/DistributedFrankenDonaldAI.py @@ -1,6 +1,5 @@ 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 84878fa..219e173 100644 --- a/toontown/classicchars/DistributedGoofy.py +++ b/toontown/classicchars/DistributedGoofy.py @@ -1,12 +1,11 @@ from panda3d.core import * - +from . import DistributedCCharBase from direct.directnotify import DirectNotifyGlobal from direct.fsm import ClassicFSM, State - -from toontown.toonbase import ToontownGlobals, TTLocalizer - -from . import CharStateDatas, DistributedCCharBase - +from direct.fsm import State +from . import CharStateDatas +from toontown.toonbase import ToontownGlobals +from toontown.toonbase import TTLocalizer class DistributedGoofy(DistributedCCharBase.DistributedCCharBase): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedGoofy') diff --git a/toontown/classicchars/DistributedGoofyAI.py b/toontown/classicchars/DistributedGoofyAI.py index 808adae..7b0a5b8 100644 --- a/toontown/classicchars/DistributedGoofyAI.py +++ b/toontown/classicchars/DistributedGoofyAI.py @@ -1,15 +1,13 @@ -import random - +from otp.ai.AIBaseGlobal import * +from . import DistributedCCharBaseAI from direct.directnotify import DirectNotifyGlobal from direct.fsm import ClassicFSM, State +from direct.fsm import State from direct.task import Task - -from otp.ai.AIBaseGlobal import * - -from toontown.toonbase import ToontownGlobals, TTLocalizer - -from . import CharStateDatasAI, DistributedCCharBaseAI - +import random +from toontown.toonbase import ToontownGlobals +from toontown.toonbase import TTLocalizer +from . import CharStateDatasAI class DistributedGoofyAI(DistributedCCharBaseAI.DistributedCCharBaseAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedGoofyAI') diff --git a/toontown/classicchars/DistributedGoofySpeedway.py b/toontown/classicchars/DistributedGoofySpeedway.py index 9799254..020e061 100644 --- a/toontown/classicchars/DistributedGoofySpeedway.py +++ b/toontown/classicchars/DistributedGoofySpeedway.py @@ -1,13 +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.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 29acbc2..ad76202 100644 --- a/toontown/classicchars/DistributedGoofySpeedwayAI.py +++ b/toontown/classicchars/DistributedGoofySpeedwayAI.py @@ -1,15 +1,13 @@ -import random - +from otp.ai.AIBaseGlobal import * +from . import DistributedCCharBaseAI from direct.directnotify import DirectNotifyGlobal from direct.fsm import ClassicFSM, State +from direct.fsm import State from direct.task import Task - -from otp.ai.AIBaseGlobal import * - -from toontown.toonbase import ToontownGlobals, TTLocalizer - -from . import CharStateDatasAI, DistributedCCharBaseAI - +import random +from toontown.toonbase import ToontownGlobals +from toontown.toonbase import TTLocalizer +from . import CharStateDatasAI class DistributedGoofySpeedwayAI(DistributedCCharBaseAI.DistributedCCharBaseAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedGoofySpeedwayAI') diff --git a/toontown/classicchars/DistributedJailbirdDale.py b/toontown/classicchars/DistributedJailbirdDale.py index 76638dc..c0b2f7c 100644 --- a/toontown/classicchars/DistributedJailbirdDale.py +++ b/toontown/classicchars/DistributedJailbirdDale.py @@ -1,11 +1,12 @@ -from direct.directnotify import DirectNotifyGlobal -from direct.fsm import ClassicFSM, State from direct.showbase.ShowBaseGlobal import * - -from toontown.toonbase import ToontownGlobals, TTLocalizer - -from . import CharStateDatas, DistributedCCharBase, DistributedDale - +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 class DistributedJailbirdDale(DistributedDale.DistributedDale): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedJailbirdDale') diff --git a/toontown/classicchars/DistributedJailbirdDaleAI.py b/toontown/classicchars/DistributedJailbirdDaleAI.py index f7cf93b..7cf3751 100644 --- a/toontown/classicchars/DistributedJailbirdDaleAI.py +++ b/toontown/classicchars/DistributedJailbirdDaleAI.py @@ -1,6 +1,5 @@ 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 b428a31..26eb2a8 100644 --- a/toontown/classicchars/DistributedMickey.py +++ b/toontown/classicchars/DistributedMickey.py @@ -1,13 +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.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 6ded630..5055413 100644 --- a/toontown/classicchars/DistributedMickeyAI.py +++ b/toontown/classicchars/DistributedMickeyAI.py @@ -1,15 +1,13 @@ -import random - +from otp.ai.AIBaseGlobal import * +from . import DistributedCCharBaseAI from direct.directnotify import DirectNotifyGlobal from direct.fsm import ClassicFSM, State +from direct.fsm import State from direct.task import Task - -from otp.ai.AIBaseGlobal import * - -from toontown.toonbase import ToontownGlobals, TTLocalizer - -from . import CharStateDatasAI, DistributedCCharBaseAI - +import random +from toontown.toonbase import ToontownGlobals +from . import CharStateDatasAI +from toontown.toonbase import TTLocalizer class DistributedMickeyAI(DistributedCCharBaseAI.DistributedCCharBaseAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedMickeyAI') diff --git a/toontown/classicchars/DistributedMinnie.py b/toontown/classicchars/DistributedMinnie.py index 0e6c401..2de823c 100644 --- a/toontown/classicchars/DistributedMinnie.py +++ b/toontown/classicchars/DistributedMinnie.py @@ -1,13 +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.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 c6eec1e..e6d2946 100644 --- a/toontown/classicchars/DistributedMinnieAI.py +++ b/toontown/classicchars/DistributedMinnieAI.py @@ -1,15 +1,13 @@ -import random - +from otp.ai.AIBaseGlobal import * +from . import DistributedCCharBaseAI from direct.directnotify import DirectNotifyGlobal from direct.fsm import ClassicFSM, State +from direct.fsm import State from direct.task import Task - -from otp.ai.AIBaseGlobal import * - -from toontown.toonbase import ToontownGlobals, TTLocalizer - -from . import CharStateDatasAI, DistributedCCharBaseAI - +import random +from toontown.toonbase import ToontownGlobals +from toontown.toonbase import TTLocalizer +from . import CharStateDatasAI class DistributedMinnieAI(DistributedCCharBaseAI.DistributedCCharBaseAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedMinnieAI') diff --git a/toontown/classicchars/DistributedPluto.py b/toontown/classicchars/DistributedPluto.py index 7e59877..9afb7f5 100644 --- a/toontown/classicchars/DistributedPluto.py +++ b/toontown/classicchars/DistributedPluto.py @@ -1,15 +1,15 @@ from panda3d.core import * - -from direct.directnotify import DirectNotifyGlobal -from direct.fsm import ClassicFSM, State, StateData 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.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 22e97c0..b073496 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 otp.ai.AIBaseGlobal import * - -from toontown.classicchars import CCharChatter, CharStateDatasAI, DistributedCCharBaseAI -from toontown.toonbase import ToontownGlobals, TTLocalizer - +from toontown.classicchars import CharStateDatasAI, CCharChatter +from toontown.toonbase import ToontownGlobals +from toontown.toonbase import TTLocalizer class DistributedPlutoAI(DistributedCCharBaseAI.DistributedCCharBaseAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedPlutoAI') diff --git a/toontown/classicchars/DistributedPoliceChip.py b/toontown/classicchars/DistributedPoliceChip.py index a8624e8..28bfc9b 100644 --- a/toontown/classicchars/DistributedPoliceChip.py +++ b/toontown/classicchars/DistributedPoliceChip.py @@ -1,11 +1,12 @@ -from direct.directnotify import DirectNotifyGlobal -from direct.fsm import ClassicFSM, State from direct.showbase.ShowBaseGlobal import * - -from toontown.toonbase import ToontownGlobals, TTLocalizer - -from . import CharStateDatas, DistributedCCharBase, DistributedChip - +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 class DistributedPoliceChip(DistributedChip.DistributedChip): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedPoliceChip') diff --git a/toontown/classicchars/DistributedPoliceChipAI.py b/toontown/classicchars/DistributedPoliceChipAI.py index 92d4bfb..a86d957 100644 --- a/toontown/classicchars/DistributedPoliceChipAI.py +++ b/toontown/classicchars/DistributedPoliceChipAI.py @@ -1,6 +1,5 @@ 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 e8a52d3..28f711a 100644 --- a/toontown/classicchars/DistributedSockHopDaisy.py +++ b/toontown/classicchars/DistributedSockHopDaisy.py @@ -1,12 +1,13 @@ -from direct.directnotify import DirectNotifyGlobal -from direct.fsm import ClassicFSM, State 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 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 8b36ea4..9c4ebeb 100644 --- a/toontown/classicchars/DistributedSockHopDaisyAI.py +++ b/toontown/classicchars/DistributedSockHopDaisyAI.py @@ -1,6 +1,5 @@ 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 930fbf5..b96894e 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 toontown.toonbase import ToontownGlobals, TTLocalizer - -from . import CharStateDatas, DistributedCCharBase - +from . import CharStateDatas +from toontown.toonbase import ToontownGlobals +from toontown.toonbase import TTLocalizer +from . import DistributedCCharBase class DistributedSuperGoofy(DistributedGoofySpeedway.DistributedGoofySpeedway): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedSuperGoofy') diff --git a/toontown/classicchars/DistributedSuperGoofyAI.py b/toontown/classicchars/DistributedSuperGoofyAI.py index d90ee3e..6d9877a 100644 --- a/toontown/classicchars/DistributedSuperGoofyAI.py +++ b/toontown/classicchars/DistributedSuperGoofyAI.py @@ -1,6 +1,5 @@ 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 2fafd01..870e0f5 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 toontown.toonbase import ToontownGlobals, TTLocalizer - -from . import CharStateDatas, DistributedCCharBase - +from . import CharStateDatas +from toontown.toonbase import ToontownGlobals +from toontown.toonbase import TTLocalizer +from . import DistributedCCharBase class DistributedVampireMickey(DistributedMickey.DistributedMickey): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedVampireMickey') diff --git a/toontown/classicchars/DistributedVampireMickeyAI.py b/toontown/classicchars/DistributedVampireMickeyAI.py index 5503d91..553e38e 100644 --- a/toontown/classicchars/DistributedVampireMickeyAI.py +++ b/toontown/classicchars/DistributedVampireMickeyAI.py @@ -1,6 +1,5 @@ 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 29b7f10..94a8bd1 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 toontown.toonbase import ToontownGlobals, TTLocalizer - -from . import CharStateDatas, DistributedCCharBase - +from . import CharStateDatas +from toontown.toonbase import ToontownGlobals +from toontown.toonbase import TTLocalizer +from . import DistributedCCharBase class DistributedWesternPluto(DistributedPluto.DistributedPluto): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedWesternPluto') diff --git a/toontown/classicchars/DistributedWesternPlutoAI.py b/toontown/classicchars/DistributedWesternPlutoAI.py index ed57d6b..aca9164 100644 --- a/toontown/classicchars/DistributedWesternPlutoAI.py +++ b/toontown/classicchars/DistributedWesternPlutoAI.py @@ -1,6 +1,5 @@ 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 0ac6886..249ad73 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 toontown.toonbase import ToontownGlobals, TTLocalizer - -from . import CharStateDatas, DistributedCCharBase - +from . import CharStateDatas +from toontown.toonbase import ToontownGlobals +from toontown.toonbase import TTLocalizer +from . import DistributedCCharBase class DistributedWitchMinnie(DistributedMinnie.DistributedMinnie): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedWitchMinnie') diff --git a/toontown/classicchars/DistributedWitchMinnieAI.py b/toontown/classicchars/DistributedWitchMinnieAI.py index 16ca097..a362095 100644 --- a/toontown/classicchars/DistributedWitchMinnieAI.py +++ b/toontown/classicchars/DistributedWitchMinnieAI.py @@ -1,6 +1,5 @@ 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 ea6ebe0..3566b42 100644 --- a/toontown/coderedemption/TTCodeRedemptionMgr.py +++ b/toontown/coderedemption/TTCodeRedemptionMgr.py @@ -1,6 +1,5 @@ -from direct.directnotify.DirectNotifyGlobal import directNotify from direct.distributed.DistributedObject import DistributedObject - +from direct.directnotify.DirectNotifyGlobal import directNotify class TTCodeRedemptionMgr(DistributedObject): neverDisable = 1 diff --git a/toontown/coderedemption/TTCodeRedemptionMgrAI.py b/toontown/coderedemption/TTCodeRedemptionMgrAI.py index 0a4e3a3..a47c943 100644 --- a/toontown/coderedemption/TTCodeRedemptionMgrAI.py +++ b/toontown/coderedemption/TTCodeRedemptionMgrAI.py @@ -1,6 +1,5 @@ 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 1741e2f..3757aef 100644 --- a/toontown/coderedemption/TTCodeRedemptionMgrUD.py +++ b/toontown/coderedemption/TTCodeRedemptionMgrUD.py @@ -1,6 +1,5 @@ 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 2fd50b1..ce231b9 100644 --- a/toontown/cogdominium/CogdoBarrelRoom.py +++ b/toontown/cogdominium/CogdoBarrelRoom.py @@ -1,14 +1,10 @@ import random - from panda3d.core import * - -from direct.directnotify import DirectNotifyGlobal from direct.interval.IntervalGlobal import * - +from direct.directnotify import DirectNotifyGlobal +from toontown.toonbase import ToontownGlobals, ToontownTimer 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 39c1479..462df1b 100644 --- a/toontown/cogdominium/CogdoBarrelRoomAI.py +++ b/toontown/cogdominium/CogdoBarrelRoomAI.py @@ -1,14 +1,12 @@ 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 2af0a61..c3540c9 100644 --- a/toontown/cogdominium/CogdoBarrelRoomConsts.py +++ b/toontown/cogdominium/CogdoBarrelRoomConsts.py @@ -1,5 +1,4 @@ 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 2394c91..c9cf2d7 100644 --- a/toontown/cogdominium/CogdoBarrelRoomRewardPanel.py +++ b/toontown/cogdominium/CogdoBarrelRoomRewardPanel.py @@ -1,10 +1,7 @@ from panda3d.core import * - from direct.gui.DirectGui import * - -from toontown.cogdominium import CogdoBarrelRoomConsts from toontown.toonbase import ToontownGlobals, TTLocalizer - +from toontown.cogdominium import CogdoBarrelRoomConsts class CogdoBarrelRoomRewardPanel(DirectFrame): diff --git a/toontown/cogdominium/CogdoBoardroomGameBase.py b/toontown/cogdominium/CogdoBoardroomGameBase.py index d7da260..1c62c64 100644 --- a/toontown/cogdominium/CogdoBoardroomGameBase.py +++ b/toontown/cogdominium/CogdoBoardroomGameBase.py @@ -1,6 +1,5 @@ -from toontown.cogdominium import CogdoBoardroomGameConsts as Consts from toontown.cogdominium import CogdoBoardroomGameSpec - +from toontown.cogdominium import CogdoBoardroomGameConsts as Consts class CogdoBoardroomGameBase: diff --git a/toontown/cogdominium/CogdoBoardroomGameConsts.py b/toontown/cogdominium/CogdoBoardroomGameConsts.py index 7a07c85..7e09e9b 100644 --- a/toontown/cogdominium/CogdoBoardroomGameConsts.py +++ b/toontown/cogdominium/CogdoBoardroomGameConsts.py @@ -1,9 +1,6 @@ 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 7f21742..d8e808f 100644 --- a/toontown/cogdominium/CogdoBoardroomGameSpec.py +++ b/toontown/cogdominium/CogdoBoardroomGameSpec.py @@ -1,5 +1,4 @@ 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 90d24b3..095643a 100644 --- a/toontown/cogdominium/CogdoCraneGameBase.py +++ b/toontown/cogdominium/CogdoCraneGameBase.py @@ -1,6 +1,5 @@ -from toontown.cogdominium import CogdoCraneGameConsts as Consts from toontown.cogdominium import CogdoCraneGameSpec - +from toontown.cogdominium import CogdoCraneGameConsts as Consts class CogdoCraneGameBase: diff --git a/toontown/cogdominium/CogdoCraneGameConsts.py b/toontown/cogdominium/CogdoCraneGameConsts.py index 944d353..4d0e6cf 100644 --- a/toontown/cogdominium/CogdoCraneGameConsts.py +++ b/toontown/cogdominium/CogdoCraneGameConsts.py @@ -1,9 +1,6 @@ from direct.fsm.StatePush import StateVar - from otp.level.EntityStateVarSet import EntityStateVarSet - -from toontown.cogdominium.CogdoEntityTypes import CogdoCraneCogSettings, CogdoCraneGameSettings - +from toontown.cogdominium.CogdoEntityTypes import CogdoCraneGameSettings, CogdoCraneCogSettings 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 a07a07d..129fbea 100644 --- a/toontown/cogdominium/CogdoCraneGameSpec.py +++ b/toontown/cogdominium/CogdoCraneGameSpec.py @@ -1,5 +1,4 @@ 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 537a682..269b3d8 100644 --- a/toontown/cogdominium/CogdoElevatorMovie.py +++ b/toontown/cogdominium/CogdoElevatorMovie.py @@ -1,20 +1,16 @@ -from panda3d.core import NodePath, Plane, PlaneNode, Point3, TextNode - -from direct.directnotify import DirectNotifyGlobal -from direct.gui.DirectGui import * -from direct.interval.FunctionInterval import Func, Wait +from panda3d.core import NodePath, Point3, Plane, PlaneNode, TextNode from direct.interval.IntervalGlobal import * -from direct.interval.MetaInterval import Parallel, Sequence +from direct.directnotify import DirectNotifyGlobal 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 direct.interval.MetaInterval import Sequence, Parallel +from direct.interval.FunctionInterval import Func, Wait +from direct.gui.DirectGui import * from toontown.toonbase.ToontownGlobals import * - -from . import CogdoUtil +from toontown.toonbase import TTLocalizer +from toontown.suit import Suit, SuitDNA +from toontown.toon import Toon, ToonHead, ToonDNA from .CogdoUtil import CogdoGameMovie - +from . import CogdoUtil class CogdoElevatorMovie(CogdoGameMovie): notify = DirectNotifyGlobal.directNotify.newCategory('CogdoElevatorMovie') diff --git a/toontown/cogdominium/CogdoEntityCreator.py b/toontown/cogdominium/CogdoEntityCreator.py index d0e247b..eba1506 100644 --- a/toontown/cogdominium/CogdoEntityCreator.py +++ b/toontown/cogdominium/CogdoEntityCreator.py @@ -1,8 +1,8 @@ from otp.level import EntityCreator - -from toontown.cogdominium import CogdoBoardroomGameConsts, CogdoCraneGameConsts +from toontown.cogdominium import 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 fd27f19..7a4c1f2 100644 --- a/toontown/cogdominium/CogdoEntityCreatorAI.py +++ b/toontown/cogdominium/CogdoEntityCreatorAI.py @@ -1,10 +1,8 @@ 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 f372a1e..53b395f 100644 --- a/toontown/cogdominium/CogdoEntityTypes.py +++ b/toontown/cogdominium/CogdoEntityTypes.py @@ -1,6 +1,5 @@ from otp.level.EntityTypes import * - class CogdoLevelMgr(LevelMgr): type = 'levelMgr' diff --git a/toontown/cogdominium/CogdoExecutiveSuiteMovies.py b/toontown/cogdominium/CogdoExecutiveSuiteMovies.py index b546a46..9868269 100644 --- a/toontown/cogdominium/CogdoExecutiveSuiteMovies.py +++ b/toontown/cogdominium/CogdoExecutiveSuiteMovies.py @@ -1,20 +1,16 @@ -from panda3d.core import NodePath, Plane, PlaneNode, Point3, TextNode - -from direct.directnotify import DirectNotifyGlobal -from direct.gui.DirectGui import * -from direct.interval.FunctionInterval import Func, Wait +from panda3d.core import NodePath, Point3, Plane, PlaneNode, TextNode from direct.interval.IntervalGlobal import * -from direct.interval.MetaInterval import Parallel, Sequence +from direct.directnotify import DirectNotifyGlobal 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 direct.interval.MetaInterval import Sequence, Parallel +from direct.interval.FunctionInterval import Func, Wait +from direct.gui.DirectGui import * from toontown.toonbase.ToontownGlobals import * - -from . import CogdoUtil +from toontown.toonbase import TTLocalizer +from toontown.suit import Suit, SuitDNA +from toontown.toon import Toon, ToonHead, ToonDNA from .CogdoUtil import CogdoGameMovie - +from . import CogdoUtil class CogdoExecutiveSuiteIntro(CogdoGameMovie): notify = DirectNotifyGlobal.directNotify.newCategory('CogdoExecutiveSuiteIntro') diff --git a/toontown/cogdominium/CogdoFlyingCameraManager.py b/toontown/cogdominium/CogdoFlyingCameraManager.py index bef11c1..b139935 100644 --- a/toontown/cogdominium/CogdoFlyingCameraManager.py +++ b/toontown/cogdominium/CogdoFlyingCameraManager.py @@ -1,16 +1,12 @@ import math -from math import cos, pi, sin - -from panda3d.core import CollisionHandlerQueue, CollisionNode, CollisionRay, CollisionTraverser, NodePath, Vec3 - +from panda3d.core import NodePath, Vec3 +from panda3d.core import CollisionTraverser, CollisionHandlerQueue +from panda3d.core import CollisionRay, CollisionNode +from math import pi, sin, cos from direct.showbase.PythonUtil import bound as clamp - from otp.otpbase import OTPGlobals - 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 29c8d56..47a466d 100644 --- a/toontown/cogdominium/CogdoFlyingCollisions.py +++ b/toontown/cogdominium/CogdoFlyingCollisions.py @@ -1,12 +1,7 @@ -from panda3d.core import (BitMask32, CollisionHandlerEvent, CollisionHandlerFluidPusher, CollisionHandlerGravity, - CollisionHandlerPusher, CollisionNode, CollisionRay, CollisionSphere) - from direct.controls.GravityWalker import GravityWalker - -from otp.otpbase import OTPGlobals - +from panda3d.core import CollisionSphere, CollisionNode, BitMask32, CollisionHandlerEvent, CollisionRay, CollisionHandlerGravity, CollisionHandlerFluidPusher, CollisionHandlerPusher from toontown.toonbase import ToontownGlobals - +from otp.otpbase import OTPGlobals class CogdoFlyingCollisions(GravityWalker): wantFloorSphere = 0 diff --git a/toontown/cogdominium/CogdoFlyingGame.py b/toontown/cogdominium/CogdoFlyingGame.py index f5ce59a..7e7b08e 100644 --- a/toontown/cogdominium/CogdoFlyingGame.py +++ b/toontown/cogdominium/CogdoFlyingGame.py @@ -1,23 +1,20 @@ +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 Parallel, Sequence -from direct.showbase.DirectObject import DirectObject -from direct.showbase.RandomNumGen import RandomNumGen -from direct.task.Task import Task - +from direct.interval.MetaInterval import Sequence, Parallel 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 .CogdoFlyingPlayer import CogdoFlyingPlayer -from .CogdoGameAudioManager import CogdoGameAudioManager - +from .CogdoFlyingLegalEagle import CogdoFlyingLegalEagle +from .CogdoFlyingGuiManager import CogdoFlyingGuiManager +from .CogdoFlyingLevel import CogdoFlyingLevelFactory +from .CogdoFlyingGameMovies import CogdoFlyingGameIntro, CogdoFlyingGameFinish class CogdoFlyingGame(DirectObject): notify = directNotify.newCategory('CogdoFlyingGame') diff --git a/toontown/cogdominium/CogdoFlyingGameGlobals.py b/toontown/cogdominium/CogdoFlyingGameGlobals.py index dd104ae..e5c9127 100644 --- a/toontown/cogdominium/CogdoFlyingGameGlobals.py +++ b/toontown/cogdominium/CogdoFlyingGameGlobals.py @@ -1,9 +1,6 @@ +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 10eac4d..4fe2374 100644 --- a/toontown/cogdominium/CogdoFlyingGameGuis.py +++ b/toontown/cogdominium/CogdoFlyingGameGuis.py @@ -1,14 +1,10 @@ -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 CogdoFlyingGameGlobals as Globals from . import CogdoUtil - +from . import CogdoFlyingGameGlobals as Globals class CogdoFlyingProgressGui(DirectFrame): diff --git a/toontown/cogdominium/CogdoFlyingGameMovies.py b/toontown/cogdominium/CogdoFlyingGameMovies.py index 43a002f..3ce87ca 100644 --- a/toontown/cogdominium/CogdoFlyingGameMovies.py +++ b/toontown/cogdominium/CogdoFlyingGameMovies.py @@ -1,17 +1,13 @@ -from panda3d.core import Plane, PlaneNode, Point3 - -from direct.interval.FunctionInterval import Func, Wait -from direct.interval.MetaInterval import Parallel, Sequence +from panda3d.core import Point3, Plane, PlaneNode from direct.showbase.RandomNumGen import RandomNumGen - -from toontown.suit import Suit, SuitDNA -from toontown.toon import Toon, ToonDNA, ToonHead +from direct.interval.MetaInterval import Sequence, Parallel +from direct.interval.FunctionInterval import Func, Wait from toontown.toonbase import TTLocalizer - +from toontown.toon import Toon, ToonHead, ToonDNA +from toontown.suit import Suit, SuitDNA from . import CogdoFlyingGameGlobals as Globals -from . import CogdoUtil from .CogdoUtil import CogdoGameMovie - +from . import CogdoUtil class CogdoFlyingGameIntro(CogdoGameMovie): diff --git a/toontown/cogdominium/CogdoFlyingGuiManager.py b/toontown/cogdominium/CogdoFlyingGuiManager.py index 356a085..8ef23cb 100644 --- a/toontown/cogdominium/CogdoFlyingGuiManager.py +++ b/toontown/cogdominium/CogdoFlyingGuiManager.py @@ -1,13 +1,10 @@ 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 50544b8..21ace86 100644 --- a/toontown/cogdominium/CogdoFlyingInputManager.py +++ b/toontown/cogdominium/CogdoFlyingInputManager.py @@ -1,8 +1,6 @@ -from panda3d.core import BitMask32, CollisionHandlerEvent, CollisionNode, CollisionRay, CollisionSphere - +from panda3d.core import CollisionSphere, CollisionNode, BitMask32, CollisionHandlerEvent, CollisionRay from toontown.minigame import ArrowKeys - class CogdoFlyingInputManager: def __init__(self): diff --git a/toontown/cogdominium/CogdoFlyingLegalEagle.py b/toontown/cogdominium/CogdoFlyingLegalEagle.py index eb0a5d1..14d3f99 100644 --- a/toontown/cogdominium/CogdoFlyingLegalEagle.py +++ b/toontown/cogdominium/CogdoFlyingLegalEagle.py @@ -1,25 +1,19 @@ import math - -from panda3d.core import CollisionNode, CollisionPolygon, CollisionSphere, CollisionTube, Point3, Vec3 - -from direct.directnotify import DirectNotifyGlobal -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 direct.directnotify import DirectNotifyGlobal +from direct.fsm.FSM import FSM from direct.task.Task import Task - -from toontown.battle import BattleProps -from toontown.suit import Suit, SuitDNA +from direct.interval.IntervalGlobal import Sequence, Parallel, LerpScaleInterval, LerpFunctionInterval, Func, Wait, LerpFunc, SoundInterval, ParallelEndTogether, LerpPosInterval, ActorInterval, LerpPosHprInterval, LerpHprInterval +from direct.directutil import Mopath +from direct.showbase.PythonUtil import bound as clamp +from 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 . import CogdoFlyingGameGlobals as Globals -from . import CogdoUtil +from toontown.battle import BattleProps from .CogdoFlyingUtil import swapAvatarShadowPlacer - +from . import CogdoUtil +from . import CogdoFlyingGameGlobals as Globals class CogdoFlyingLegalEagle(FSM, DirectObject): CollSphereName = 'CogdoFlyingLegalEagleSphere' diff --git a/toontown/cogdominium/CogdoFlyingLevel.py b/toontown/cogdominium/CogdoFlyingLevel.py index f4baf56..1fee577 100644 --- a/toontown/cogdominium/CogdoFlyingLevel.py +++ b/toontown/cogdominium/CogdoFlyingLevel.py @@ -1,18 +1,15 @@ -from panda3d.core import CollisionNode, CollisionPlane, NodePath, Plane, Point3, Vec3 - +from panda3d.core import NodePath, Plane, Vec3, Point3 +from panda3d.core import CollisionPlane, CollisionNode +from direct.showbase.RandomNumGen import RandomNumGen from direct.showbase.DirectObject import DirectObject from direct.showbase.PythonUtil import bound as clamp -from direct.showbase.RandomNumGen import RandomNumGen - -from otp.otpbase import OTPGlobals - -from . import CogdoFlyingGameGlobals as Globals from . import CogdoUtil +from . import CogdoFlyingGameGlobals as Globals from .CogdoFlyingLevelQuadrant import CogdoFlyingLevelQuadrant -from .CogdoFlyingObjects import CogdoFlyingGatherableFactory, CogdoFlyingLevelFog, CogdoFlyingPlatform +from .CogdoFlyingObjects import CogdoFlyingGatherableFactory, CogdoFlyingPlatform, CogdoFlyingLevelFog 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 8fb6f6e..6edf3a7 100644 --- a/toontown/cogdominium/CogdoFlyingLevelQuadrant.py +++ b/toontown/cogdominium/CogdoFlyingLevelQuadrant.py @@ -1,12 +1,8 @@ import math - -from panda3d.core import NodePath, Point3, Vec4 - from direct.directutil import Mopath - -from . import CogdoFlyingGameGlobals as Globals +from panda3d.core import NodePath, Point3, Vec4 from .CogdoFlyingObjects import CogdoFlyingPlatform - +from . import CogdoFlyingGameGlobals as Globals class CogdoFlyingLevelQuadrant: notify = directNotify.newCategory('CogdoFlyingLevelQuadrant') diff --git a/toontown/cogdominium/CogdoFlyingLocalPlayer.py b/toontown/cogdominium/CogdoFlyingLocalPlayer.py index 98a894f..bdd22fe 100644 --- a/toontown/cogdominium/CogdoFlyingLocalPlayer.py +++ b/toontown/cogdominium/CogdoFlyingLocalPlayer.py @@ -1,32 +1,26 @@ import math import random -from enum import IntEnum - from panda3d.core import Vec3 - from direct.directnotify import DirectNotifyGlobal -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 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 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 .CogdoFlyingObjects import CogdoFlyingGatherable, CogdoFlyingPlatform -from .CogdoFlyingPlayer import CogdoFlyingPlayer - +from . import CogdoFlyingGameGlobals as Globals +from enum import IntEnum class CogdoFlyingLocalPlayer(CogdoFlyingPlayer): notify = DirectNotifyGlobal.directNotify.newCategory('CogdoFlyingLocalPlayer') diff --git a/toontown/cogdominium/CogdoFlyingObjects.py b/toontown/cogdominium/CogdoFlyingObjects.py index 115a970..98fae9f 100644 --- a/toontown/cogdominium/CogdoFlyingObjects.py +++ b/toontown/cogdominium/CogdoFlyingObjects.py @@ -1,20 +1,15 @@ import random - from panda3d.core import * from panda3d.physics import * - -from direct.interval.IntervalGlobal import (Func, LerpFunctionInterval, LerpHprInterval, LerpScaleInterval, Parallel, - Sequence, Wait) -from direct.particles import ForceGroup, ParticleEffect, Particles - +from direct.interval.IntervalGlobal import Sequence, Func, Parallel, Wait, LerpHprInterval, LerpScaleInterval, LerpFunctionInterval from otp.otpbase import OTPGlobals - from toontown.toonbase import ToontownGlobals - +from .CogdoGameGatherable import CogdoGameGatherable, CogdoMemo from . import CogdoFlyingGameGlobals as Globals from . import CogdoUtil -from .CogdoGameGatherable import CogdoGameGatherable, CogdoMemo - +from direct.particles import ParticleEffect +from direct.particles import Particles +from direct.particles import ForceGroup class CogdoFlyingGatherableFactory: diff --git a/toontown/cogdominium/CogdoFlyingObstacles.py b/toontown/cogdominium/CogdoFlyingObstacles.py index e17749e..7072ad0 100644 --- a/toontown/cogdominium/CogdoFlyingObstacles.py +++ b/toontown/cogdominium/CogdoFlyingObstacles.py @@ -1,23 +1,21 @@ import random -from enum import IntEnum - +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 panda3d.core import * from panda3d.physics import * - -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 toontown.suit import Suit, SuitDNA from toontown.toonbase import ToontownGlobals - -from . import CogdoFlyingGameGlobals as Globals +from toontown.suit import Suit +from toontown.suit import SuitDNA +from toontown.battle import BattleProps from . import CogdoUtil +from . import CogdoFlyingGameGlobals as Globals 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: @@ -196,7 +194,6 @@ 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 4f6be5b..fa5edfc 100644 --- a/toontown/cogdominium/CogdoFlyingPlayer.py +++ b/toontown/cogdominium/CogdoFlyingPlayer.py @@ -1,21 +1,17 @@ -from panda3d.core import DepthOffsetAttrib, NodePath, TextNode, Vec3, Vec4 - +from panda3d.core import DepthOffsetAttrib, NodePath, Vec3, Vec4, TextNode 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, LerpFunctionInterval, LerpHprInterval, LerpScaleInterval -from direct.interval.MetaInterval import Parallel, Sequence - -from toontown.effects import DustCloud +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 toontown.effects import DustCloud 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 b779760..5f6ce59 100644 --- a/toontown/cogdominium/CogdoFlyingShadowPlacer.py +++ b/toontown/cogdominium/CogdoFlyingShadowPlacer.py @@ -1,11 +1,9 @@ -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 13caee1..8a2a45a 100644 --- a/toontown/cogdominium/CogdoFlyingUtil.py +++ b/toontown/cogdominium/CogdoFlyingUtil.py @@ -1,8 +1,6 @@ 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 07475fe..17ce2cf 100644 --- a/toontown/cogdominium/CogdoGameAudioManager.py +++ b/toontown/cogdominium/CogdoGameAudioManager.py @@ -1,8 +1,6 @@ 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 9ce9667..474d3ec 100644 --- a/toontown/cogdominium/CogdoGameConsts.py +++ b/toontown/cogdominium/CogdoGameConsts.py @@ -1,7 +1,5 @@ -from toontown.minigame.MinigameGlobals import DifficultyOverrideMult, NoDifficultyOverride +from toontown.minigame.MinigameGlobals import getSafezoneId, DifficultyOverrideMult, QuantizeDifficultyOverride, NoDifficultyOverride, getDifficulty 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 c8fb021..4263c73 100644 --- a/toontown/cogdominium/CogdoGameExit.py +++ b/toontown/cogdominium/CogdoGameExit.py @@ -1,13 +1,11 @@ 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 toontown.building import ElevatorConstants, ElevatorUtils - -from . import CogdoGameConsts, CogdoUtil - +from direct.interval.FunctionInterval import Wait, Func +from toontown.building import ElevatorConstants +from toontown.building import ElevatorUtils +from . import CogdoUtil +from . import CogdoGameConsts class CogdoGameExit(NodePath): diff --git a/toontown/cogdominium/CogdoGameGatherable.py b/toontown/cogdominium/CogdoGameGatherable.py index d7f2bb3..efe829f 100644 --- a/toontown/cogdominium/CogdoGameGatherable.py +++ b/toontown/cogdominium/CogdoGameGatherable.py @@ -1,15 +1,12 @@ -from panda3d.core import BitMask32, CollisionNode, CollisionSphere, NodePath - +from panda3d.core import CollisionSphere, CollisionNode +from panda3d.core import NodePath, BitMask32 +from direct.showbase.DirectObject import DirectObject +from direct.interval.MetaInterval import Sequence from direct.interval.FunctionInterval import Func, Wait 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 6e0b77e..76b9709 100644 --- a/toontown/cogdominium/CogdoGameMessageDisplay.py +++ b/toontown/cogdominium/CogdoGameMessageDisplay.py @@ -1,14 +1,10 @@ -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 ee50ed2..9aab7bb 100644 --- a/toontown/cogdominium/CogdoGameRulesPanel.py +++ b/toontown/cogdominium/CogdoGameRulesPanel.py @@ -1,13 +1,11 @@ -from panda3d.core import * - -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 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 toontown.minigame import MinigameGlobals class CogdoGameRulesPanel(StateData.StateData): hiddenNode = NodePath('hiddenNode') diff --git a/toontown/cogdominium/CogdoInterior.py b/toontown/cogdominium/CogdoInterior.py index 01a0246..c83279f 100644 --- a/toontown/cogdominium/CogdoInterior.py +++ b/toontown/cogdominium/CogdoInterior.py @@ -1,16 +1,14 @@ 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 f67e03f..39dccfc 100644 --- a/toontown/cogdominium/CogdoLayout.py +++ b/toontown/cogdominium/CogdoLayout.py @@ -1,6 +1,5 @@ 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 98130df..b5805a3 100644 --- a/toontown/cogdominium/CogdoLevelGameBase.py +++ b/toontown/cogdominium/CogdoLevelGameBase.py @@ -1,9 +1,7 @@ from direct.fsm.StatePush import FunctionCall - from otp.level.EntityStateVarSet import EntityStateVarSet from otp.level.LevelSpec import LevelSpec - class CogdoLevelGameBase: def getLevelSpec(self): @@ -34,8 +32,7 @@ class CogdoLevelGameBase: return def getEntityTypeReg(self): - from otp.level import EntityTypeRegistry - from . import CogdoEntityTypes + from otp.level import EntityTypeRegistry typeReg = EntityTypeRegistry.EntityTypeRegistry(CogdoEntityTypes) return typeReg diff --git a/toontown/cogdominium/CogdoLevelMgr.py b/toontown/cogdominium/CogdoLevelMgr.py index acd153e..92a534d 100644 --- a/toontown/cogdominium/CogdoLevelMgr.py +++ b/toontown/cogdominium/CogdoLevelMgr.py @@ -1,9 +1,6 @@ -from direct.showbase.PythonUtil import Functor - from otp.level import LevelMgr - +from direct.showbase.PythonUtil import Functor from toontown.toonbase import ToontownGlobals - class CogdoLevelMgr(LevelMgr.LevelMgr): pass diff --git a/toontown/cogdominium/CogdoLevelMgrAI.py b/toontown/cogdominium/CogdoLevelMgrAI.py index 63d0687..9bb6f7a 100644 --- a/toontown/cogdominium/CogdoLevelMgrAI.py +++ b/toontown/cogdominium/CogdoLevelMgrAI.py @@ -1,5 +1,4 @@ from otp.level import LevelMgrAI - class CogdoLevelMgrAI(LevelMgrAI.LevelMgrAI): pass diff --git a/toontown/cogdominium/CogdoMaze.py b/toontown/cogdominium/CogdoMaze.py index 924b768..3e58e73 100644 --- a/toontown/cogdominium/CogdoMaze.py +++ b/toontown/cogdominium/CogdoMaze.py @@ -1,15 +1,11 @@ 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 CogdoMazeData from . import CogdoMazeGameGlobals as Globals -from . import CogdoUtil from .CogdoMazeGameObjects import CogdoMazeWaterCooler - +from . import CogdoMazeData +from . import CogdoUtil class CogdoMaze(MazeBase, DirectObject): diff --git a/toontown/cogdominium/CogdoMazeCameraManager.py b/toontown/cogdominium/CogdoMazeCameraManager.py index 2a1e73b..5820fdb 100644 --- a/toontown/cogdominium/CogdoMazeCameraManager.py +++ b/toontown/cogdominium/CogdoMazeCameraManager.py @@ -1,11 +1,8 @@ +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 f468176..c62defd 100644 --- a/toontown/cogdominium/CogdoMazeGame.py +++ b/toontown/cogdominium/CogdoMazeGame.py @@ -1,26 +1,21 @@ -import math -import random - -from panda3d.core import CollisionNode, CollisionSphere, Point3 - +from panda3d.core import Point3, CollisionSphere, CollisionNode from direct.showbase.DirectObject import DirectObject from direct.showbase.PythonUtil import Functor from direct.showbase.RandomNumGen import RandomNumGen 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 -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 - +import math +import random class CogdoMazeGame(DirectObject): notify = directNotify.newCategory('CogdoMazeGame') diff --git a/toontown/cogdominium/CogdoMazeGameGlobals.py b/toontown/cogdominium/CogdoMazeGameGlobals.py index 7917777..f05c238 100644 --- a/toontown/cogdominium/CogdoMazeGameGlobals.py +++ b/toontown/cogdominium/CogdoMazeGameGlobals.py @@ -1,7 +1,5 @@ -from enum import IntEnum - from panda3d.core import VBase4 - +from enum import IntEnum GameActions = IntEnum('GameActions', ('EnterDoor', 'RevealDoor', 'OpenDoor', diff --git a/toontown/cogdominium/CogdoMazeGameGuis.py b/toontown/cogdominium/CogdoMazeGameGuis.py index e798ef1..98d017f 100644 --- a/toontown/cogdominium/CogdoMazeGameGuis.py +++ b/toontown/cogdominium/CogdoMazeGameGuis.py @@ -1,18 +1,16 @@ -from panda3d.core import CardMaker, NodePath, Point3, TextNode - -from direct.gui.DirectGui import DGG, DirectFrame from direct.gui.DirectLabel import DirectLabel -from direct.interval.FunctionInterval import Func, Wait -from direct.interval.MetaInterval import Parallel, Sequence +from direct.gui.DirectGui import DirectFrame, DGG from direct.task.Task import Task - +from direct.interval.MetaInterval import Sequence, Parallel +from direct.interval.FunctionInterval import Wait, Func +from 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 1735f37..20e6874 100644 --- a/toontown/cogdominium/CogdoMazeGameMovies.py +++ b/toontown/cogdominium/CogdoMazeGameMovies.py @@ -1,17 +1,13 @@ -from panda3d.core import NodePath, Plane, PlaneNode, Point3 - -from direct.interval.FunctionInterval import Func, Wait -from direct.interval.MetaInterval import Parallel, Sequence +from panda3d.core import NodePath, Point3, Plane, PlaneNode from direct.showbase.RandomNumGen import RandomNumGen - -from toontown.suit import Suit, SuitDNA -from toontown.toon import Toon, ToonDNA, ToonHead +from direct.interval.MetaInterval import Sequence, Parallel +from direct.interval.FunctionInterval import Func, Wait from toontown.toonbase import TTLocalizer - +from toontown.suit import Suit, SuitDNA +from toontown.toon import Toon, ToonHead, ToonDNA +from .CogdoUtil import CogdoGameMovie 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 bf7f176..7cdfae9 100644 --- a/toontown/cogdominium/CogdoMazeGameObjects.py +++ b/toontown/cogdominium/CogdoMazeGameObjects.py @@ -1,19 +1,16 @@ -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 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 . import CogdoUtil from .CogdoGameExit import CogdoGameExit - +from . import CogdoUtil +import math +import random class CogdoMazeSplattable: diff --git a/toontown/cogdominium/CogdoMazeGuiManager.py b/toontown/cogdominium/CogdoMazeGuiManager.py index e73a042..b2cfe79 100644 --- a/toontown/cogdominium/CogdoMazeGuiManager.py +++ b/toontown/cogdominium/CogdoMazeGuiManager.py @@ -1,17 +1,13 @@ from panda3d.core import NodePath - -from direct.interval.FunctionInterval import Func from direct.interval.MetaInterval import Sequence - -from toontown.toonbase import ToontownIntervals +from direct.interval.FunctionInterval import Func from toontown.toonbase.ToontownTimer import ToontownTimer - -from . import CogdoMazeGameGlobals as Globals +from toontown.toonbase import ToontownIntervals +from .CogdoMazeGameGuis import CogdoMazeHud, CogdoMazeMapGui, CogdoMazeBossGui from .CogdoGameMessageDisplay import CogdoGameMessageDisplay -from .CogdoMazeGameGuis import CogdoMazeBossGui, CogdoMazeHud, CogdoMazeMapGui +from . import CogdoMazeGameGlobals as Globals from .CogdoMemoGui import CogdoMemoGui - class CogdoMazeGuiManager: def __init__(self, maze, bossCode): diff --git a/toontown/cogdominium/CogdoMazeLocalPlayer.py b/toontown/cogdominium/CogdoMazeLocalPlayer.py index 70dc13c..86d3c15 100644 --- a/toontown/cogdominium/CogdoMazeLocalPlayer.py +++ b/toontown/cogdominium/CogdoMazeLocalPlayer.py @@ -1,18 +1,15 @@ -from panda3d.core import CollisionHandlerEvent, CollisionNode, CollisionSphere, Point3 - -from direct.directnotify import DirectNotifyGlobal +from panda3d.core import Point3, CollisionNode, CollisionSphere, CollisionHandlerEvent from direct.interval.IntervalGlobal import Func, Sequence, Wait from direct.showbase.PythonUtil import bound as clamp - +from direct.directnotify import DirectNotifyGlobal +from toontown.toonbase import TTLocalizer from toontown.minigame.OrthoDrive import OrthoDrive from toontown.minigame.OrthoWalk import OrthoWalk -from toontown.toonbase import ToontownGlobals, TTLocalizer - +from toontown.toonbase import ToontownGlobals from . import CogdoGameConsts from . import CogdoMazeGameGlobals as Globals -from .CogdoMazeCameraManager import CogdoMazeCameraManager from .CogdoMazePlayer import CogdoMazePlayer - +from .CogdoMazeCameraManager import CogdoMazeCameraManager class CogdoMazeLocalPlayer(CogdoMazePlayer): notify = directNotify.newCategory('CogdoMazeLocalPlayer') diff --git a/toontown/cogdominium/CogdoMazePlayer.py b/toontown/cogdominium/CogdoMazePlayer.py index 6d7ded5..d4830be 100644 --- a/toontown/cogdominium/CogdoMazePlayer.py +++ b/toontown/cogdominium/CogdoMazePlayer.py @@ -1,14 +1,11 @@ -import random - -from panda3d.core import NodePath, Point3 - +from panda3d.core import Point3, NodePath from direct.fsm.FSM import FSM -from direct.interval.IntervalGlobal import ActorInterval, Func, Parallel, ProjectileInterval, Sequence, Track - +from direct.interval.IntervalGlobal import ProjectileInterval, Track, ActorInterval +from direct.interval.IntervalGlobal import Func, Sequence, Parallel +from .CogdoMazeGameObjects import CogdoMazeSplattable from . import CogdoMazeGameGlobals as Globals from . import CogdoUtil -from .CogdoMazeGameObjects import CogdoMazeSplattable - +import random class CogdoMazePlayer(FSM, CogdoMazeSplattable): notify = directNotify.newCategory('CogdoMazePlayer') diff --git a/toontown/cogdominium/CogdoMazeSuits.py b/toontown/cogdominium/CogdoMazeSuits.py index e9be14d..d598301 100644 --- a/toontown/cogdominium/CogdoMazeSuits.py +++ b/toontown/cogdominium/CogdoMazeSuits.py @@ -1,18 +1,13 @@ -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.interval.IntervalGlobal import Sequence, Parallel, ActorInterval, Func, Wait, ParticleInterval, Track, LerpColorScaleInterval, LerpScaleInterval, LerpHprInterval from direct.task.Task import Task - -from toontown.battle import BattleParticles, MovieUtil +from toontown.battle import BattleParticles +from toontown.battle import MovieUtil from toontown.minigame.MazeSuit import MazeSuit - -from . import CogdoMazeGameGlobals as Globals from .CogdoMazeGameObjects import CogdoMazeSplattable - +from . import CogdoMazeGameGlobals as Globals +import random class CogdoMazeSuit(MazeSuit, FSM, CogdoMazeSplattable): GagHitEventName = 'CogdoMazeSuit_GagHit' diff --git a/toontown/cogdominium/CogdoMemoGui.py b/toontown/cogdominium/CogdoMemoGui.py index 0d85e6e..05b75c9 100644 --- a/toontown/cogdominium/CogdoMemoGui.py +++ b/toontown/cogdominium/CogdoMemoGui.py @@ -1,11 +1,10 @@ -from panda3d.core import TextNode - from direct.gui.DirectGui import DGG, DirectFrame, DirectLabel - -from toontown.toonbase import ToontownGlobals, ToontownIntervals, TTLocalizer - -from . import CogdoGameConsts, CogdoUtil - +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 MEMOICON_SCALE = 0.2 class CogdoMemoGui(DirectFrame): diff --git a/toontown/cogdominium/CogdoUtil.py b/toontown/cogdominium/CogdoUtil.py index 812f69e..26bc062 100644 --- a/toontown/cogdominium/CogdoUtil.py +++ b/toontown/cogdominium/CogdoUtil.py @@ -1,5 +1,4 @@ from panda3d.core import ColorBlendAttrib - ModelPhase = 5 ModelTypes = {'animation': 'a', 'model': 'm', @@ -58,9 +57,8 @@ class CogdoGameMovie: return def load(self): - from panda3d.core import TextNode - from toontown.toonbase import ToontownGlobals + from panda3d.core import TextNode textNode = TextNode('moviedialogue') textNode.setTextColor(0, 0, 0, 1) textNode.setCardColor(1, 1, 1, 1) diff --git a/toontown/cogdominium/DistCogdoBoardroomGame.py b/toontown/cogdominium/DistCogdoBoardroomGame.py index 405ac56..a7cb615 100644 --- a/toontown/cogdominium/DistCogdoBoardroomGame.py +++ b/toontown/cogdominium/DistCogdoBoardroomGame.py @@ -1,12 +1,10 @@ from direct.directnotify.DirectNotifyGlobal import directNotify - -from toontown.cogdominium import CogdoBoardroomGameConsts as Consts -from toontown.cogdominium.CogdoBoardroomGameBase import CogdoBoardroomGameBase from toontown.cogdominium.DistCogdoLevelGame import DistCogdoLevelGame +from toontown.cogdominium.CogdoBoardroomGameBase import CogdoBoardroomGameBase +from toontown.cogdominium import CogdoBoardroomGameConsts as Consts 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 a911b0d..0334d76 100644 --- a/toontown/cogdominium/DistCogdoBoardroomGameAI.py +++ b/toontown/cogdominium/DistCogdoBoardroomGameAI.py @@ -1,9 +1,7 @@ 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 89e76a8..d1a906f 100644 --- a/toontown/cogdominium/DistCogdoCrane.py +++ b/toontown/cogdominium/DistCogdoCrane.py @@ -1,22 +1,18 @@ -import random - +from direct.gui.DirectGui import * from panda3d.core import * from panda3d.direct import SmoothMover - -from direct.distributed import DistributedObject +from direct.interval.IntervalGlobal import * from direct.distributed.ClockDelta import * from direct.fsm import FSM -from direct.gui.DirectGui import * -from direct.interval.IntervalGlobal import * -from direct.showbase import PythonUtil +from direct.distributed import DistributedObject from direct.showutil import Rope +from direct.showbase import PythonUtil 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 -from toontown.toonbase import ToontownGlobals, TTLocalizer - +import random class DistCogdoCrane(DistributedObject.DistributedObject, FSM.FSM): notify = DirectNotifyGlobal.directNotify.newCategory('DistCogdoCrane') diff --git a/toontown/cogdominium/DistCogdoCraneAI.py b/toontown/cogdominium/DistCogdoCraneAI.py index 96fc92b..2f897a2 100644 --- a/toontown/cogdominium/DistCogdoCraneAI.py +++ b/toontown/cogdominium/DistCogdoCraneAI.py @@ -1,12 +1,8 @@ from panda3d.core import * - from direct.distributed import DistributedObjectAI -from direct.fsm import FSM - -from otp.otpbase import OTPGlobals - from toontown.toonbase import ToontownGlobals - +from otp.otpbase import OTPGlobals +from direct.fsm import FSM class DistCogdoCraneAI(DistributedObjectAI.DistributedObjectAI, FSM.FSM): diff --git a/toontown/cogdominium/DistCogdoCraneCog.py b/toontown/cogdominium/DistCogdoCraneCog.py index 29039a5..a258b39 100644 --- a/toontown/cogdominium/DistCogdoCraneCog.py +++ b/toontown/cogdominium/DistCogdoCraneCog.py @@ -1,13 +1,10 @@ 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 3a897ea..f6ed97e 100644 --- a/toontown/cogdominium/DistCogdoCraneCogAI.py +++ b/toontown/cogdominium/DistCogdoCraneCogAI.py @@ -1,7 +1,6 @@ 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 854f0b7..9ea831c 100644 --- a/toontown/cogdominium/DistCogdoCraneGame.py +++ b/toontown/cogdominium/DistCogdoCraneGame.py @@ -1,18 +1,15 @@ 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.cogdominium.DistCogdoLevelGame import DistCogdoLevelGame -from toontown.toonbase import ToontownGlobals, ToontownTimer +from toontown.toonbase import 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 fd085c9..f05f288 100644 --- a/toontown/cogdominium/DistCogdoCraneGameAI.py +++ b/toontown/cogdominium/DistCogdoCraneGameAI.py @@ -1,19 +1,15 @@ -import random - from panda3d.core import * from panda3d.physics import * - from direct.directnotify.DirectNotifyGlobal import directNotify - -from toontown.cogdominium import CogdoCraneGameConsts as GameConsts -from toontown.cogdominium import CogdoGameConsts -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.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.DistCogdoCraneCogAI import DistCogdoCraneCogAI 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 d1d3540..cac30d4 100644 --- a/toontown/cogdominium/DistCogdoCraneMoneyBag.py +++ b/toontown/cogdominium/DistCogdoCraneMoneyBag.py @@ -1,14 +1,10 @@ from panda3d.core import * - -from direct.directnotify import DirectNotifyGlobal from direct.interval.IntervalGlobal import * - -from otp.otpbase import OTPGlobals - -from toontown.cogdominium import CogdoCraneGameConsts as GameConsts -from toontown.cogdominium.DistCogdoCraneObject import DistCogdoCraneObject +from direct.directnotify import DirectNotifyGlobal from toontown.toonbase import ToontownGlobals - +from otp.otpbase import OTPGlobals +from toontown.cogdominium.DistCogdoCraneObject import DistCogdoCraneObject +from toontown.cogdominium import CogdoCraneGameConsts as GameConsts class DistCogdoCraneMoneyBag(DistCogdoCraneObject): notify = DirectNotifyGlobal.directNotify.newCategory('DistCogdoCraneMoneyBag') diff --git a/toontown/cogdominium/DistCogdoCraneMoneyBagAI.py b/toontown/cogdominium/DistCogdoCraneMoneyBagAI.py index dba3d0d..0d34063 100644 --- a/toontown/cogdominium/DistCogdoCraneMoneyBagAI.py +++ b/toontown/cogdominium/DistCogdoCraneMoneyBagAI.py @@ -1,11 +1,8 @@ from panda3d.core import * - -from otp.otpbase import OTPGlobals - -from toontown.cogdominium import CogdoCraneGameConsts as GameConsts -from toontown.cogdominium.DistCogdoCraneObjectAI import DistCogdoCraneObjectAI from toontown.toonbase import ToontownGlobals - +from otp.otpbase import OTPGlobals +from toontown.cogdominium.DistCogdoCraneObjectAI import DistCogdoCraneObjectAI +from toontown.cogdominium import CogdoCraneGameConsts as GameConsts class DistCogdoCraneMoneyBagAI(DistCogdoCraneObjectAI): wantsWatchDrift = 0 diff --git a/toontown/cogdominium/DistCogdoCraneObject.py b/toontown/cogdominium/DistCogdoCraneObject.py index 5976aa0..ee8d887 100644 --- a/toontown/cogdominium/DistCogdoCraneObject.py +++ b/toontown/cogdominium/DistCogdoCraneObject.py @@ -1,15 +1,11 @@ from panda3d.core import * - +from direct.interval.IntervalGlobal import * from direct.directnotify import DirectNotifyGlobal from direct.distributed import DistributedSmoothNode -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 - +from otp.otpbase import OTPGlobals +from direct.fsm import FSM +from direct.task import Task smileyDoId = 1 class DistCogdoCraneObject(DistributedSmoothNode.DistributedSmoothNode, FSM.FSM): diff --git a/toontown/cogdominium/DistCogdoCraneObjectAI.py b/toontown/cogdominium/DistCogdoCraneObjectAI.py index 04de61d..8af78fb 100644 --- a/toontown/cogdominium/DistCogdoCraneObjectAI.py +++ b/toontown/cogdominium/DistCogdoCraneObjectAI.py @@ -1,14 +1,10 @@ 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 626148b..bad7593 100644 --- a/toontown/cogdominium/DistCogdoFlyingGame.py +++ b/toontown/cogdominium/DistCogdoFlyingGame.py @@ -1,12 +1,9 @@ from direct.distributed.ClockDelta import globalClockDelta - from toontown.toonbase import TTLocalizer - -from . import CogdoFlyingGameGlobals -from . import CogdoFlyingGameGlobals as Globals from .CogdoFlyingGame import CogdoFlyingGame from .DistCogdoGame import DistCogdoGame - +from . import CogdoFlyingGameGlobals +from . import CogdoFlyingGameGlobals as Globals class DistCogdoFlyingGame(DistCogdoGame): notify = directNotify.newCategory('DistCogdoFlyingGame') diff --git a/toontown/cogdominium/DistCogdoFlyingGameAI.py b/toontown/cogdominium/DistCogdoFlyingGameAI.py index 11e950f..11f3119 100644 --- a/toontown/cogdominium/DistCogdoFlyingGameAI.py +++ b/toontown/cogdominium/DistCogdoFlyingGameAI.py @@ -1,10 +1,7 @@ import random - from direct.distributed.ClockDelta import globalClockDelta - -from . import CogdoFlyingGameGlobals as Globals from .DistCogdoGameAI import DistCogdoGameAI - +from . import CogdoFlyingGameGlobals as Globals class DistCogdoFlyingGameAI(DistCogdoGameAI): notify = directNotify.newCategory('DistCogdoFlyingGameAI') diff --git a/toontown/cogdominium/DistCogdoGame.py b/toontown/cogdominium/DistCogdoGame.py index 477e667..a3737ac 100644 --- a/toontown/cogdominium/DistCogdoGame.py +++ b/toontown/cogdominium/DistCogdoGame.py @@ -1,19 +1,16 @@ 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 FunctionCall, StateVar -from direct.gui.DirectGui import DirectLabel - +from direct.fsm.StatePush import StateVar, FunctionCall from toontown.cogdominium import CogdoGameConsts -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.cogdominium.CogdoGameRulesPanel import CogdoGameRulesPanel +from toontown.minigame import MinigameGlobals 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 ac351f8..027ab1e 100644 --- a/toontown/cogdominium/DistCogdoGameAI.py +++ b/toontown/cogdominium/DistCogdoGameAI.py @@ -2,12 +2,9 @@ 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 ae6168f..93cd1cb 100644 --- a/toontown/cogdominium/DistCogdoLevelGame.py +++ b/toontown/cogdominium/DistCogdoLevelGame.py @@ -1,12 +1,10 @@ from direct.directnotify.DirectNotifyGlobal import directNotify - -from otp.level import EditorGlobals, LevelConstants from otp.level.DistributedLevel import DistributedLevel - -from toontown.cogdominium.CogdoEntityCreator import CogdoEntityCreator -from toontown.cogdominium.CogdoLevelGameBase import CogdoLevelGameBase +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 class DistCogdoLevelGame(CogdoLevelGameBase, DistCogdoGame, DistributedLevel): notify = directNotify.newCategory('DistCogdoLevelGame') diff --git a/toontown/cogdominium/DistCogdoLevelGameAI.py b/toontown/cogdominium/DistCogdoLevelGameAI.py index ac1c4e8..b12b2f9 100644 --- a/toontown/cogdominium/DistCogdoLevelGameAI.py +++ b/toontown/cogdominium/DistCogdoLevelGameAI.py @@ -1,11 +1,8 @@ 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 91926ad..894f6d8 100644 --- a/toontown/cogdominium/DistCogdoMazeGame.py +++ b/toontown/cogdominium/DistCogdoMazeGame.py @@ -1,14 +1,11 @@ from direct.distributed.ClockDelta import globalClockDelta - -from toontown.cogdominium.DistCogdoMazeGameBase import DistCogdoMazeGameBase from toontown.toonbase import TTLocalizer - +from .DistCogdoGame import DistCogdoGame +from toontown.cogdominium.DistCogdoMazeGameBase import DistCogdoMazeGameBase +from .CogdoMazeGame import CogdoMazeGame +from .CogdoMaze import CogdoMazeFactory 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 382b3c5..ce41f06 100644 --- a/toontown/cogdominium/DistCogdoMazeGameAI.py +++ b/toontown/cogdominium/DistCogdoMazeGameAI.py @@ -1,15 +1,10 @@ -from panda3d.core import NodePath, Vec3 - +from panda3d.core import Vec3, NodePath 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 . import CogdoMazeGameGlobals as Globals from .DistCogdoGameAI import DistCogdoGameAI - +from . import CogdoMazeGameGlobals as Globals cogdoMazeTimeScoreRatio = 0.5 cogdoMazePerfectTime = 90 cogdoMazeMaxTime = 210 diff --git a/toontown/cogdominium/DistCogdoMazeGameBase.py b/toontown/cogdominium/DistCogdoMazeGameBase.py index 2ba87fe..8f1e891 100644 --- a/toontown/cogdominium/DistCogdoMazeGameBase.py +++ b/toontown/cogdominium/DistCogdoMazeGameBase.py @@ -1,10 +1,7 @@ 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 608561a..6b37fc1 100644 --- a/toontown/cogdominium/DistributedCogdoBarrel.py +++ b/toontown/cogdominium/DistributedCogdoBarrel.py @@ -1,11 +1,8 @@ from panda3d.core import * - from direct.directnotify import DirectNotifyGlobal from direct.distributed import DistributedObject - -from toontown.cogdominium import CogdoBarrelRoomConsts from toontown.toonbase import ToontownGlobals, ToontownIntervals - +from toontown.cogdominium import CogdoBarrelRoomConsts class DistributedCogdoBarrel(DistributedObject.DistributedObject): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedCogdoBarrel') diff --git a/toontown/cogdominium/DistributedCogdoBarrelAI.py b/toontown/cogdominium/DistributedCogdoBarrelAI.py index 0682e23..fa49209 100644 --- a/toontown/cogdominium/DistributedCogdoBarrelAI.py +++ b/toontown/cogdominium/DistributedCogdoBarrelAI.py @@ -1,11 +1,8 @@ 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 b48a074..aaaa9af 100644 --- a/toontown/cogdominium/DistributedCogdoBattleBldg.py +++ b/toontown/cogdominium/DistributedCogdoBattleBldg.py @@ -1,8 +1,6 @@ from direct.directnotify import DirectNotifyGlobal - -from toontown.battle import DistributedBattleBldg from toontown.toonbase import TTLocalizer - +from toontown.battle import DistributedBattleBldg class DistributedCogdoBattleBldg(DistributedBattleBldg.DistributedBattleBldg): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedCogdoBattleBldg') diff --git a/toontown/cogdominium/DistributedCogdoBattleBldgAI.py b/toontown/cogdominium/DistributedCogdoBattleBldgAI.py index f324f13..b2dca7a 100644 --- a/toontown/cogdominium/DistributedCogdoBattleBldgAI.py +++ b/toontown/cogdominium/DistributedCogdoBattleBldgAI.py @@ -1,8 +1,6 @@ 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 a0195dc..25f6533 100644 --- a/toontown/cogdominium/DistributedCogdoElevatorExt.py +++ b/toontown/cogdominium/DistributedCogdoElevatorExt.py @@ -1,6 +1,5 @@ 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 e374f0a..7c108de 100644 --- a/toontown/cogdominium/DistributedCogdoElevatorExtAI.py +++ b/toontown/cogdominium/DistributedCogdoElevatorExtAI.py @@ -1,8 +1,6 @@ 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 92244e2..6294013 100644 --- a/toontown/cogdominium/DistributedCogdoElevatorInt.py +++ b/toontown/cogdominium/DistributedCogdoElevatorInt.py @@ -1,6 +1,5 @@ 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 f4b5100..dd2b0ec 100644 --- a/toontown/cogdominium/DistributedCogdoElevatorIntAI.py +++ b/toontown/cogdominium/DistributedCogdoElevatorIntAI.py @@ -1,5 +1,4 @@ from toontown.building.DistributedElevatorIntAI import DistributedElevatorIntAI - class DistributedCogdoElevatorIntAI(DistributedElevatorIntAI): pass diff --git a/toontown/cogdominium/DistributedCogdoInterior.py b/toontown/cogdominium/DistributedCogdoInterior.py index 788a069..e90b8a9 100644 --- a/toontown/cogdominium/DistributedCogdoInterior.py +++ b/toontown/cogdominium/DistributedCogdoInterior.py @@ -1,28 +1,27 @@ 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 direct.directnotify import DirectNotifyGlobal -from direct.distributed import DistributedObject -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.building import ElevatorUtils -from toontown.building.ElevatorConstants import * -from toontown.cogdominium import CogdoBarrelRoom, CogdoBarrelRoomConsts, CogdoGameConsts -from toontown.cogdominium.CogdoLayout import CogdoLayout -from toontown.distributed import DelayDelete +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 toontown.battle import BattleBase from toontown.hood import ZoneUtil -from toontown.toon import NPCToons -from toontown.toonbase import ToontownBattleGlobals, ToontownGlobals, TTLocalizer - -from .CogdoElevatorMovie import CogdoElevatorMovie +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 .CogdoElevatorMovie import CogdoElevatorMovie 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 d06a69b..0945124 100644 --- a/toontown/cogdominium/DistributedCogdoInteriorAI.py +++ b/toontown/cogdominium/DistributedCogdoInteriorAI.py @@ -1,30 +1,29 @@ 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.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.suit.SuitDNA import SuitDNA +from toontown.toonbase.ToontownBattleGlobals import * from toontown.hood import ZoneUtil from toontown.minigame.MinigameGlobals import SafeZones -from toontown.suit.SuitDNA import SuitDNA from toontown.toon import NPCToons -from toontown.toonbase.ToontownBattleGlobals import * - -from .DistCogdoBoardroomGameAI import DistCogdoBoardroomGameAI from .DistributedCogdoElevatorIntAI import DistributedCogdoElevatorIntAI - +from toontown.cogdominium import CogdoBarrelRoomConsts +from toontown.cogdominium import CogdoBarrelRoomAI +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 CogdoGames = { 'boardroom': DistCogdoBoardroomGameAI, 'crane': DistCogdoCraneGameAI, diff --git a/toontown/cogdominium/SuitPlannerCogdoInteriorAI.py b/toontown/cogdominium/SuitPlannerCogdoInteriorAI.py index 69ab4e3..b9ae13d 100644 --- a/toontown/cogdominium/SuitPlannerCogdoInteriorAI.py +++ b/toontown/cogdominium/SuitPlannerCogdoInteriorAI.py @@ -1,6 +1,5 @@ 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 d4ca72c..f97eba7 100644 --- a/toontown/coghq/ActiveCell.py +++ b/toontown/coghq/ActiveCell.py @@ -1,9 +1,6 @@ from panda3d.core import * - -from direct.directnotify import DirectNotifyGlobal - from otp.level import BasicEntities - +from direct.directnotify import DirectNotifyGlobal class ActiveCell(BasicEntities.DistributedNodePathEntity): notify = DirectNotifyGlobal.directNotify.newCategory('ActiveCell') diff --git a/toontown/coghq/ActiveCellAI.py b/toontown/coghq/ActiveCellAI.py index 6e6283f..ef3fe27 100644 --- a/toontown/coghq/ActiveCellAI.py +++ b/toontown/coghq/ActiveCellAI.py @@ -1,7 +1,5 @@ -from direct.directnotify import DirectNotifyGlobal - from otp.level import DistributedEntityAI - +from direct.directnotify import DirectNotifyGlobal class ActiveCellAI(DistributedEntityAI.DistributedEntityAI): notify = DirectNotifyGlobal.directNotify.newCategory('ActiveCellAI') diff --git a/toontown/coghq/BarrelBase.py b/toontown/coghq/BarrelBase.py index 4d85f34..3ac803c 100644 --- a/toontown/coghq/BarrelBase.py +++ b/toontown/coghq/BarrelBase.py @@ -1,6 +1,5 @@ import random - class BarrelBase: def getRng(self): diff --git a/toontown/coghq/BattleBlocker.py b/toontown/coghq/BattleBlocker.py index 4cb5b30..e4c68c9 100644 --- a/toontown/coghq/BattleBlocker.py +++ b/toontown/coghq/BattleBlocker.py @@ -1,12 +1,9 @@ from panda3d.core import * - -from direct.directnotify import DirectNotifyGlobal +from panda3d.core import * from direct.interval.IntervalGlobal import * - from otp.level import BasicEntities - from toontown.toonbase import ToontownGlobals - +from direct.directnotify import DirectNotifyGlobal class BattleBlocker(BasicEntities.DistributedNodePathEntity): notify = DirectNotifyGlobal.directNotify.newCategory('BattleBlocker') diff --git a/toontown/coghq/BattleBlockerAI.py b/toontown/coghq/BattleBlockerAI.py index fd5c0a5..027e616 100644 --- a/toontown/coghq/BattleBlockerAI.py +++ b/toontown/coghq/BattleBlockerAI.py @@ -1,7 +1,5 @@ -from direct.directnotify import DirectNotifyGlobal - from otp.level import DistributedEntityAI - +from direct.directnotify import DirectNotifyGlobal class BattleBlockerAI(DistributedEntityAI.DistributedEntityAI): notify = DirectNotifyGlobal.directNotify.newCategory('BattleBlockerAI') diff --git a/toontown/coghq/BossbotCogHQLoader.py b/toontown/coghq/BossbotCogHQLoader.py index e48f88c..1902298 100644 --- a/toontown/coghq/BossbotCogHQLoader.py +++ b/toontown/coghq/BossbotCogHQLoader.py @@ -1,17 +1,17 @@ -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 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 aspectSF = 0.7227 class BossbotCogHQLoader(CogHQLoader.CogHQLoader): diff --git a/toontown/coghq/BossbotCountryClubEntrance_Action00.py b/toontown/coghq/BossbotCountryClubEntrance_Action00.py index 6ebe623..6e12640 100644 --- a/toontown/coghq/BossbotCountryClubEntrance_Action00.py +++ b/toontown/coghq/BossbotCountryClubEntrance_Action00.py @@ -1,5 +1,4 @@ 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 517d88c..0e3c75d 100644 --- a/toontown/coghq/BossbotCountryClubFairwayRoom_Battle00.py +++ b/toontown/coghq/BossbotCountryClubFairwayRoom_Battle00.py @@ -1,5 +1,4 @@ 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 eb734d4..8ce75fd 100644 --- a/toontown/coghq/BossbotCountryClubFairwayRoom_Battle00_Cogs.py +++ b/toontown/coghq/BossbotCountryClubFairwayRoom_Battle00_Cogs.py @@ -1,7 +1,5 @@ -from toontown.toonbase import ToontownGlobals - from .SpecImports import * - +from toontown.toonbase import ToontownGlobals CogParent = 110200 BattleCellId = 0 BattleCells = {BattleCellId: {'parentEntId': CogParent, diff --git a/toontown/coghq/BossbotCountryClubGreenRoom_Action00.py b/toontown/coghq/BossbotCountryClubGreenRoom_Action00.py index 41fab15..b7196a2 100644 --- a/toontown/coghq/BossbotCountryClubGreenRoom_Action00.py +++ b/toontown/coghq/BossbotCountryClubGreenRoom_Action00.py @@ -1,5 +1,4 @@ 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 4c7f3d6..ae1b8c3 100644 --- a/toontown/coghq/BossbotCountryClubGreenRoom_Action01.py +++ b/toontown/coghq/BossbotCountryClubGreenRoom_Action01.py @@ -1,5 +1,4 @@ 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 d8b7c04..33e8581 100644 --- a/toontown/coghq/BossbotCountryClubGreenRoom_Action02.py +++ b/toontown/coghq/BossbotCountryClubGreenRoom_Action02.py @@ -1,5 +1,4 @@ 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 c130477..416b240 100644 --- a/toontown/coghq/BossbotCountryClubKartRoom_Battle00.py +++ b/toontown/coghq/BossbotCountryClubKartRoom_Battle00.py @@ -1,5 +1,4 @@ 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 a131b7a..e38456d 100644 --- a/toontown/coghq/BossbotCountryClubKartRoom_Battle00_Cogs.py +++ b/toontown/coghq/BossbotCountryClubKartRoom_Battle00_Cogs.py @@ -1,7 +1,5 @@ -from toontown.toonbase import ToontownGlobals - from .SpecImports import * - +from toontown.toonbase import ToontownGlobals CogParent = 110400 BattleCellId = 0 BattleCells = {BattleCellId: {'parentEntId': CogParent, diff --git a/toontown/coghq/BossbotCountryClubMazeRoom_Battle00.py b/toontown/coghq/BossbotCountryClubMazeRoom_Battle00.py index 17b93df..dffc77e 100644 --- a/toontown/coghq/BossbotCountryClubMazeRoom_Battle00.py +++ b/toontown/coghq/BossbotCountryClubMazeRoom_Battle00.py @@ -1,5 +1,4 @@ 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 28a658e..b142083 100644 --- a/toontown/coghq/BossbotCountryClubMazeRoom_Battle00_Cogs.py +++ b/toontown/coghq/BossbotCountryClubMazeRoom_Battle00_Cogs.py @@ -1,7 +1,5 @@ -from toontown.toonbase import ToontownGlobals - from .SpecImports import * - +from toontown.toonbase import ToontownGlobals CogParent = 110000 BattleCellId = 0 BattleCells = {BattleCellId: {'parentEntId': CogParent, diff --git a/toontown/coghq/BossbotCountryClubMazeRoom_Battle01.py b/toontown/coghq/BossbotCountryClubMazeRoom_Battle01.py index f2d8ef1..4599fff 100644 --- a/toontown/coghq/BossbotCountryClubMazeRoom_Battle01.py +++ b/toontown/coghq/BossbotCountryClubMazeRoom_Battle01.py @@ -1,5 +1,4 @@ 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 7fdcc46..17dc25d 100644 --- a/toontown/coghq/BossbotCountryClubMazeRoom_Battle01_Cogs.py +++ b/toontown/coghq/BossbotCountryClubMazeRoom_Battle01_Cogs.py @@ -1,7 +1,5 @@ -from toontown.toonbase import ToontownGlobals - from .SpecImports import * - +from toontown.toonbase import ToontownGlobals CogParent = 110000 BattleCellId = 0 BattleCells = {BattleCellId: {'parentEntId': CogParent, diff --git a/toontown/coghq/BossbotCountryClubMazeRoom_Battle02.py b/toontown/coghq/BossbotCountryClubMazeRoom_Battle02.py index ebaefa5..c6e9092 100644 --- a/toontown/coghq/BossbotCountryClubMazeRoom_Battle02.py +++ b/toontown/coghq/BossbotCountryClubMazeRoom_Battle02.py @@ -1,5 +1,4 @@ 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 bbf22bd..1f23055 100644 --- a/toontown/coghq/BossbotCountryClubMazeRoom_Battle02_Cogs.py +++ b/toontown/coghq/BossbotCountryClubMazeRoom_Battle02_Cogs.py @@ -1,7 +1,5 @@ -from toontown.toonbase import ToontownGlobals - from .SpecImports import * - +from toontown.toonbase import ToontownGlobals 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 b9414a8..41872e0 100644 --- a/toontown/coghq/BossbotCountryClubMazeRoom_Battle03_Cogs.py +++ b/toontown/coghq/BossbotCountryClubMazeRoom_Battle03_Cogs.py @@ -1,7 +1,5 @@ -from toontown.toonbase import ToontownGlobals - from .SpecImports import * - +from toontown.toonbase import ToontownGlobals CogParent = 110000 BattleCellId = 0 BattleCells = {BattleCellId: {'parentEntId': CogParent, diff --git a/toontown/coghq/BossbotCountryClubPresidentRoom_Battle00.py b/toontown/coghq/BossbotCountryClubPresidentRoom_Battle00.py index 8f0787e..6b0fd4a 100644 --- a/toontown/coghq/BossbotCountryClubPresidentRoom_Battle00.py +++ b/toontown/coghq/BossbotCountryClubPresidentRoom_Battle00.py @@ -1,5 +1,4 @@ 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 9495afa..7660d47 100644 --- a/toontown/coghq/BossbotCountryClubPresidentRoom_Battle00_Cogs.py +++ b/toontown/coghq/BossbotCountryClubPresidentRoom_Battle00_Cogs.py @@ -1,7 +1,5 @@ -from toontown.toonbase import ToontownGlobals - from .SpecImports import * - +from toontown.toonbase import ToontownGlobals CogParent = 110400 BattleCellId = 0 BattleCells = {BattleCellId: {'parentEntId': CogParent, diff --git a/toontown/coghq/BossbotCountryClubTeeOffRoom_Action00.py b/toontown/coghq/BossbotCountryClubTeeOffRoom_Action00.py index 5491179..da3e405 100644 --- a/toontown/coghq/BossbotCountryClubTeeOffRoom_Action00.py +++ b/toontown/coghq/BossbotCountryClubTeeOffRoom_Action00.py @@ -1,5 +1,4 @@ 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 018f748..485cbf9 100644 --- a/toontown/coghq/BossbotCountryClubTeeOffRoom_Action01.py +++ b/toontown/coghq/BossbotCountryClubTeeOffRoom_Action01.py @@ -1,5 +1,4 @@ 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 309ba90..76c7b1c 100644 --- a/toontown/coghq/BossbotCountryClubTeeOffRoom_Action02.py +++ b/toontown/coghq/BossbotCountryClubTeeOffRoom_Action02.py @@ -1,5 +1,4 @@ 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 e790739..781eb6c 100644 --- a/toontown/coghq/BossbotHQBossBattle.py +++ b/toontown/coghq/BossbotHQBossBattle.py @@ -1,11 +1,8 @@ from panda3d.core import * - -from direct.directnotify import DirectNotifyGlobal from direct.interval.IntervalGlobal import * - -from toontown.coghq import CogHQBossBattle from toontown.suit import DistributedBossbotBoss - +from direct.directnotify import DirectNotifyGlobal +from toontown.coghq import CogHQBossBattle class BossbotHQBossBattle(CogHQBossBattle.CogHQBossBattle): notify = DirectNotifyGlobal.directNotify.newCategory('BossbotHQBossBattle') diff --git a/toontown/coghq/BossbotHQExterior.py b/toontown/coghq/BossbotHQExterior.py index 09d564f..637a2bb 100644 --- a/toontown/coghq/BossbotHQExterior.py +++ b/toontown/coghq/BossbotHQExterior.py @@ -1,13 +1,11 @@ -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 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 toontown.coghq import CogHQExterior class BossbotHQExterior(CogHQExterior.CogHQExterior): notify = DirectNotifyGlobal.directNotify.newCategory('BossbotHQExterior') diff --git a/toontown/coghq/BossbotOfficeExterior.py b/toontown/coghq/BossbotOfficeExterior.py index b6006f0..30f6845 100644 --- a/toontown/coghq/BossbotOfficeExterior.py +++ b/toontown/coghq/BossbotOfficeExterior.py @@ -1,14 +1,11 @@ -from panda3d.core import * - from direct.directnotify import DirectNotifyGlobal -from direct.fsm import ClassicFSM, State - -from toontown.building import Elevator +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 . import FactoryExterior - class BossbotOfficeExterior(FactoryExterior.FactoryExterior): notify = DirectNotifyGlobal.directNotify.newCategory('LawbotOfficeExterior') diff --git a/toontown/coghq/CashbotCogHQLoader.py b/toontown/coghq/CashbotCogHQLoader.py index 1211999..f050af9 100644 --- a/toontown/coghq/CashbotCogHQLoader.py +++ b/toontown/coghq/CashbotCogHQLoader.py @@ -1,14 +1,14 @@ -from panda3d.core import DecalEffect - from direct.directnotify import DirectNotifyGlobal -from direct.fsm import State, StateData +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 toontown.toonbase import ToontownGlobals, TTLocalizer - -from . import CashbotHQBossBattle, CashbotHQExterior, CogHQLoader, MintInterior - +from direct.fsm import State +from . import CashbotHQExterior +from . import CashbotHQBossBattle +from panda3d.core import DecalEffect class CashbotCogHQLoader(CogHQLoader.CogHQLoader): notify = DirectNotifyGlobal.directNotify.newCategory('CashbotCogHQLoader') diff --git a/toontown/coghq/CashbotHQBossBattle.py b/toontown/coghq/CashbotHQBossBattle.py index e89b422..fde43f7 100644 --- a/toontown/coghq/CashbotHQBossBattle.py +++ b/toontown/coghq/CashbotHQBossBattle.py @@ -1,11 +1,8 @@ from panda3d.core import * - -from direct.directnotify import DirectNotifyGlobal from direct.interval.IntervalGlobal import * - -from toontown.coghq import CogHQBossBattle from toontown.suit import DistributedCashbotBoss - +from direct.directnotify import DirectNotifyGlobal +from toontown.coghq import CogHQBossBattle class CashbotHQBossBattle(CogHQBossBattle.CogHQBossBattle): notify = DirectNotifyGlobal.directNotify.newCategory('CashbotHQBossBattle') diff --git a/toontown/coghq/CashbotHQExterior.py b/toontown/coghq/CashbotHQExterior.py index 8617660..1dbc883 100644 --- a/toontown/coghq/CashbotHQExterior.py +++ b/toontown/coghq/CashbotHQExterior.py @@ -1,14 +1,11 @@ -from panda3d.core import * - from direct.directnotify import DirectNotifyGlobal -from direct.fsm import State from direct.interval.IntervalGlobal import * - +from direct.fsm import State +from panda3d.core 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 45255ff..34605eb 100644 --- a/toontown/coghq/CashbotMintBoilerRoom_Action00.py +++ b/toontown/coghq/CashbotMintBoilerRoom_Action00.py @@ -1,5 +1,4 @@ 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 8cf95f1..06a5dab 100644 --- a/toontown/coghq/CashbotMintBoilerRoom_Battle00.py +++ b/toontown/coghq/CashbotMintBoilerRoom_Battle00.py @@ -1,5 +1,4 @@ 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 b6d44f0..1147ac8 100644 --- a/toontown/coghq/CashbotMintBoilerRoom_Battle00_Cogs.py +++ b/toontown/coghq/CashbotMintBoilerRoom_Battle00_Cogs.py @@ -1,7 +1,5 @@ -from toontown.toonbase import ToontownGlobals - from .SpecImports import * - +from toontown.toonbase import ToontownGlobals CogParent = 10000 LowerCogParent = 10003 BattleParent = 10002 diff --git a/toontown/coghq/CashbotMintBoilerRoom_Battle01.py b/toontown/coghq/CashbotMintBoilerRoom_Battle01.py index f745860..28e2ddc 100644 --- a/toontown/coghq/CashbotMintBoilerRoom_Battle01.py +++ b/toontown/coghq/CashbotMintBoilerRoom_Battle01.py @@ -1,5 +1,4 @@ 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 e58e8fe..b63aece 100644 --- a/toontown/coghq/CashbotMintBoilerRoom_Battle01_Cogs.py +++ b/toontown/coghq/CashbotMintBoilerRoom_Battle01_Cogs.py @@ -1,7 +1,5 @@ -from toontown.toonbase import ToontownGlobals - from .SpecImports import * - +from toontown.toonbase import ToontownGlobals CogParent = 10000 BattleCellId = 0 BattleCells = {BattleCellId: {'parentEntId': CogParent, diff --git a/toontown/coghq/CashbotMintControlRoom_Battle00.py b/toontown/coghq/CashbotMintControlRoom_Battle00.py index bf9e27a..7624c34 100644 --- a/toontown/coghq/CashbotMintControlRoom_Battle00.py +++ b/toontown/coghq/CashbotMintControlRoom_Battle00.py @@ -1,5 +1,4 @@ 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 e58e8fe..b63aece 100644 --- a/toontown/coghq/CashbotMintControlRoom_Battle00_Cogs.py +++ b/toontown/coghq/CashbotMintControlRoom_Battle00_Cogs.py @@ -1,7 +1,5 @@ -from toontown.toonbase import ToontownGlobals - from .SpecImports import * - +from toontown.toonbase import ToontownGlobals CogParent = 10000 BattleCellId = 0 BattleCells = {BattleCellId: {'parentEntId': CogParent, diff --git a/toontown/coghq/CashbotMintDuctRoom_Action00.py b/toontown/coghq/CashbotMintDuctRoom_Action00.py index f42415e..ffddc61 100644 --- a/toontown/coghq/CashbotMintDuctRoom_Action00.py +++ b/toontown/coghq/CashbotMintDuctRoom_Action00.py @@ -1,5 +1,4 @@ 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 453420a..646fcc5 100644 --- a/toontown/coghq/CashbotMintDuctRoom_Battle00.py +++ b/toontown/coghq/CashbotMintDuctRoom_Battle00.py @@ -1,5 +1,4 @@ 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 c52af9d..98e510a 100644 --- a/toontown/coghq/CashbotMintDuctRoom_Battle00_Cogs.py +++ b/toontown/coghq/CashbotMintDuctRoom_Battle00_Cogs.py @@ -1,7 +1,5 @@ -from toontown.toonbase import ToontownGlobals - from .SpecImports import * - +from toontown.toonbase import ToontownGlobals CogParent = 10000 BattleCellId = 0 BattleCells = {BattleCellId: {'parentEntId': CogParent, diff --git a/toontown/coghq/CashbotMintDuctRoom_Battle01.py b/toontown/coghq/CashbotMintDuctRoom_Battle01.py index f27ace1..127dbb6 100644 --- a/toontown/coghq/CashbotMintDuctRoom_Battle01.py +++ b/toontown/coghq/CashbotMintDuctRoom_Battle01.py @@ -1,5 +1,4 @@ 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 e58e8fe..b63aece 100644 --- a/toontown/coghq/CashbotMintDuctRoom_Battle01_Cogs.py +++ b/toontown/coghq/CashbotMintDuctRoom_Battle01_Cogs.py @@ -1,7 +1,5 @@ -from toontown.toonbase import ToontownGlobals - from .SpecImports import * - +from toontown.toonbase import ToontownGlobals CogParent = 10000 BattleCellId = 0 BattleCells = {BattleCellId: {'parentEntId': CogParent, diff --git a/toontown/coghq/CashbotMintEntrance_Action00.py b/toontown/coghq/CashbotMintEntrance_Action00.py index 388421b..32c8f8d 100644 --- a/toontown/coghq/CashbotMintEntrance_Action00.py +++ b/toontown/coghq/CashbotMintEntrance_Action00.py @@ -1,5 +1,4 @@ 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 f622aa8..3d7ee8c 100644 --- a/toontown/coghq/CashbotMintGearRoom_Action00.py +++ b/toontown/coghq/CashbotMintGearRoom_Action00.py @@ -1,5 +1,4 @@ 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 9a7fa3d..ae8b14f 100644 --- a/toontown/coghq/CashbotMintGearRoom_Battle00.py +++ b/toontown/coghq/CashbotMintGearRoom_Battle00.py @@ -1,5 +1,4 @@ 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 fa200f4..f2de943 100644 --- a/toontown/coghq/CashbotMintGearRoom_Battle00_Cogs.py +++ b/toontown/coghq/CashbotMintGearRoom_Battle00_Cogs.py @@ -1,7 +1,5 @@ -from toontown.toonbase import ToontownGlobals - from .SpecImports import * - +from toontown.toonbase import ToontownGlobals CogParent = 10000 BattleCellId = 0 BattleCells = {BattleCellId: {'parentEntId': CogParent, diff --git a/toontown/coghq/CashbotMintGearRoom_Battle01.py b/toontown/coghq/CashbotMintGearRoom_Battle01.py index e20fa66..005f1cb 100644 --- a/toontown/coghq/CashbotMintGearRoom_Battle01.py +++ b/toontown/coghq/CashbotMintGearRoom_Battle01.py @@ -1,5 +1,4 @@ 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 e58e8fe..b63aece 100644 --- a/toontown/coghq/CashbotMintGearRoom_Battle01_Cogs.py +++ b/toontown/coghq/CashbotMintGearRoom_Battle01_Cogs.py @@ -1,7 +1,5 @@ -from toontown.toonbase import ToontownGlobals - from .SpecImports import * - +from toontown.toonbase import ToontownGlobals CogParent = 10000 BattleCellId = 0 BattleCells = {BattleCellId: {'parentEntId': CogParent, diff --git a/toontown/coghq/CashbotMintLavaRoomFoyer_Action00.py b/toontown/coghq/CashbotMintLavaRoomFoyer_Action00.py index f8fd8ec..3a740f5 100644 --- a/toontown/coghq/CashbotMintLavaRoomFoyer_Action00.py +++ b/toontown/coghq/CashbotMintLavaRoomFoyer_Action00.py @@ -1,5 +1,4 @@ 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 3c22c37..bb66a24 100644 --- a/toontown/coghq/CashbotMintLavaRoomFoyer_Action01.py +++ b/toontown/coghq/CashbotMintLavaRoomFoyer_Action01.py @@ -1,5 +1,4 @@ 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 f1075d5..0e1be57 100644 --- a/toontown/coghq/CashbotMintLavaRoomFoyer_Battle00.py +++ b/toontown/coghq/CashbotMintLavaRoomFoyer_Battle00.py @@ -1,5 +1,4 @@ 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 f016265..041a00d 100644 --- a/toontown/coghq/CashbotMintLavaRoomFoyer_Battle00_Cogs.py +++ b/toontown/coghq/CashbotMintLavaRoomFoyer_Battle00_Cogs.py @@ -1,7 +1,5 @@ -from toontown.toonbase import ToontownGlobals - from .SpecImports import * - +from toontown.toonbase import ToontownGlobals CogParent = 10000 BattleParent = 10005 BattleCellId = 0 diff --git a/toontown/coghq/CashbotMintLavaRoomFoyer_Battle01.py b/toontown/coghq/CashbotMintLavaRoomFoyer_Battle01.py index a92cc53..4586be5 100644 --- a/toontown/coghq/CashbotMintLavaRoomFoyer_Battle01.py +++ b/toontown/coghq/CashbotMintLavaRoomFoyer_Battle01.py @@ -1,5 +1,4 @@ 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 1dd3b87..6a8a0bb 100644 --- a/toontown/coghq/CashbotMintLavaRoomFoyer_Battle01_Cogs.py +++ b/toontown/coghq/CashbotMintLavaRoomFoyer_Battle01_Cogs.py @@ -1,7 +1,5 @@ -from toontown.toonbase import ToontownGlobals - from .SpecImports import * - +from toontown.toonbase import ToontownGlobals CogParent = 10000 BattleParent = 10005 BattleCellId = 0 diff --git a/toontown/coghq/CashbotMintLavaRoom_Action00.py b/toontown/coghq/CashbotMintLavaRoom_Action00.py index 5f841f0..4e4060f 100644 --- a/toontown/coghq/CashbotMintLavaRoom_Action00.py +++ b/toontown/coghq/CashbotMintLavaRoom_Action00.py @@ -1,5 +1,4 @@ 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 d7aeca9..09a9f4c 100644 --- a/toontown/coghq/CashbotMintLobby_Action00.py +++ b/toontown/coghq/CashbotMintLobby_Action00.py @@ -1,5 +1,4 @@ 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 345869f..bda6056 100644 --- a/toontown/coghq/CashbotMintLobby_Battle00.py +++ b/toontown/coghq/CashbotMintLobby_Battle00.py @@ -1,5 +1,4 @@ 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 b477051..ae7b6ec 100644 --- a/toontown/coghq/CashbotMintLobby_Battle00_Cogs.py +++ b/toontown/coghq/CashbotMintLobby_Battle00_Cogs.py @@ -1,7 +1,5 @@ -from toontown.toonbase import ToontownGlobals - from .SpecImports import * - +from toontown.toonbase import ToontownGlobals CogParent = 10000 MidCogParent = 10022 FrontCogParent = 10060 diff --git a/toontown/coghq/CashbotMintLobby_Battle01.py b/toontown/coghq/CashbotMintLobby_Battle01.py index 0449b6c..ae383de 100644 --- a/toontown/coghq/CashbotMintLobby_Battle01.py +++ b/toontown/coghq/CashbotMintLobby_Battle01.py @@ -1,5 +1,4 @@ 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 e58e8fe..b63aece 100644 --- a/toontown/coghq/CashbotMintLobby_Battle01_Cogs.py +++ b/toontown/coghq/CashbotMintLobby_Battle01_Cogs.py @@ -1,7 +1,5 @@ -from toontown.toonbase import ToontownGlobals - from .SpecImports import * - +from toontown.toonbase import ToontownGlobals CogParent = 10000 BattleCellId = 0 BattleCells = {BattleCellId: {'parentEntId': CogParent, diff --git a/toontown/coghq/CashbotMintOilRoom_Battle00.py b/toontown/coghq/CashbotMintOilRoom_Battle00.py index ac5ed4d..8166237 100644 --- a/toontown/coghq/CashbotMintOilRoom_Battle00.py +++ b/toontown/coghq/CashbotMintOilRoom_Battle00.py @@ -1,5 +1,4 @@ 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 e58e8fe..b63aece 100644 --- a/toontown/coghq/CashbotMintOilRoom_Battle00_Cogs.py +++ b/toontown/coghq/CashbotMintOilRoom_Battle00_Cogs.py @@ -1,7 +1,5 @@ -from toontown.toonbase import ToontownGlobals - from .SpecImports import * - +from toontown.toonbase import ToontownGlobals CogParent = 10000 BattleCellId = 0 BattleCells = {BattleCellId: {'parentEntId': CogParent, diff --git a/toontown/coghq/CashbotMintPaintMixerReward_Battle00.py b/toontown/coghq/CashbotMintPaintMixerReward_Battle00.py index e1a4804..1d01190 100644 --- a/toontown/coghq/CashbotMintPaintMixerReward_Battle00.py +++ b/toontown/coghq/CashbotMintPaintMixerReward_Battle00.py @@ -1,5 +1,4 @@ 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 e58e8fe..b63aece 100644 --- a/toontown/coghq/CashbotMintPaintMixerReward_Battle00_Cogs.py +++ b/toontown/coghq/CashbotMintPaintMixerReward_Battle00_Cogs.py @@ -1,7 +1,5 @@ -from toontown.toonbase import ToontownGlobals - from .SpecImports import * - +from toontown.toonbase import ToontownGlobals CogParent = 10000 BattleCellId = 0 BattleCells = {BattleCellId: {'parentEntId': CogParent, diff --git a/toontown/coghq/CashbotMintPaintMixer_Action00.py b/toontown/coghq/CashbotMintPaintMixer_Action00.py index d226db3..8f13bbc 100644 --- a/toontown/coghq/CashbotMintPaintMixer_Action00.py +++ b/toontown/coghq/CashbotMintPaintMixer_Action00.py @@ -1,5 +1,4 @@ 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 e741b47..4bef84e 100644 --- a/toontown/coghq/CashbotMintPipeRoom_Action00.py +++ b/toontown/coghq/CashbotMintPipeRoom_Action00.py @@ -1,5 +1,4 @@ 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 65d71d9..da9120c 100644 --- a/toontown/coghq/CashbotMintPipeRoom_Battle00.py +++ b/toontown/coghq/CashbotMintPipeRoom_Battle00.py @@ -1,5 +1,4 @@ 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 e2a1469..65617ce 100644 --- a/toontown/coghq/CashbotMintPipeRoom_Battle00_Cogs.py +++ b/toontown/coghq/CashbotMintPipeRoom_Battle00_Cogs.py @@ -1,7 +1,5 @@ -from toontown.toonbase import ToontownGlobals - from .SpecImports import * - +from toontown.toonbase import ToontownGlobals CogParent = 10000 FrontCogParent = 10002 LeftCogParent = 10007 diff --git a/toontown/coghq/CashbotMintPipeRoom_Battle01.py b/toontown/coghq/CashbotMintPipeRoom_Battle01.py index 2e74075..cb50187 100644 --- a/toontown/coghq/CashbotMintPipeRoom_Battle01.py +++ b/toontown/coghq/CashbotMintPipeRoom_Battle01.py @@ -1,5 +1,4 @@ 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 e58e8fe..b63aece 100644 --- a/toontown/coghq/CashbotMintPipeRoom_Battle01_Cogs.py +++ b/toontown/coghq/CashbotMintPipeRoom_Battle01_Cogs.py @@ -1,7 +1,5 @@ -from toontown.toonbase import ToontownGlobals - from .SpecImports import * - +from toontown.toonbase import ToontownGlobals CogParent = 10000 BattleCellId = 0 BattleCells = {BattleCellId: {'parentEntId': CogParent, diff --git a/toontown/coghq/CashbotMintStomperAlley_Action00.py b/toontown/coghq/CashbotMintStomperAlley_Action00.py index 9fb4138..babeee7 100644 --- a/toontown/coghq/CashbotMintStomperAlley_Action00.py +++ b/toontown/coghq/CashbotMintStomperAlley_Action00.py @@ -1,5 +1,4 @@ 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 9028038..23321ed 100644 --- a/toontown/coghq/CogDisguiseGlobals.py +++ b/toontown/coghq/CogDisguiseGlobals.py @@ -1,10 +1,7 @@ -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 62e4b12..bf0eaa1 100644 --- a/toontown/coghq/CogHQBossBattle.py +++ b/toontown/coghq/CogHQBossBattle.py @@ -1,19 +1,16 @@ -import math - 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.distributed.TelemetryLimiter import RotationLimitToH, TLGatherAllAvs - -from toontown.battle import BattlePlace +from direct.directnotify import DirectNotifyGlobal from toontown.hood import Place +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.toonbase import ToontownBattleGlobals +from toontown.battle import BattlePlace from toontown.suit import Suit -from toontown.toonbase import ToontownBattleGlobals, ToontownGlobals - +import math class CogHQBossBattle(BattlePlace.BattlePlace): notify = DirectNotifyGlobal.directNotify.newCategory('CogHQBossBattle') @@ -121,7 +118,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 00acff1..cd1ec7c 100644 --- a/toontown/coghq/CogHQExterior.py +++ b/toontown/coghq/CogHQExterior.py @@ -1,17 +1,14 @@ +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 513dcbe..b64b7b7 100644 --- a/toontown/coghq/CogHQLoader.py +++ b/toontown/coghq/CogHQLoader.py @@ -1,14 +1,13 @@ -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 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 * class CogHQLoader(StateData.StateData): notify = DirectNotifyGlobal.directNotify.newCategory('CogHQLoader') @@ -150,7 +149,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 04fb84c..f28af14 100644 --- a/toontown/coghq/CogHQLobby.py +++ b/toontown/coghq/CogHQLobby.py @@ -1,15 +1,12 @@ -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 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 otp.distributed.TelemetryLimiter import RotationLimitToH, TLGatherAllAvs class CogHQLobby(Place.Place): notify = DirectNotifyGlobal.directNotify.newCategory('CogHQLobby') diff --git a/toontown/coghq/CogSuitManagerAI.py b/toontown/coghq/CogSuitManagerAI.py index 8406cd6..37ca35b 100644 --- a/toontown/coghq/CogSuitManagerAI.py +++ b/toontown/coghq/CogSuitManagerAI.py @@ -1,14 +1,9 @@ -import random - -from direct.directnotify import DirectNotifyGlobal - from otp.ai.AIBaseGlobal import * - +from direct.directnotify import DirectNotifyGlobal +import random 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 136a2a9..1f98328 100644 --- a/toontown/coghq/ConveyorBelt.py +++ b/toontown/coghq/ConveyorBelt.py @@ -1,11 +1,7 @@ from panda3d.core import * - from direct.interval.IntervalGlobal import * - -from otp.level import BasicEntities - from . import MovingPlatform - +from otp.level import BasicEntities class ConveyorBelt(BasicEntities.NodePathEntity): UseClipPlanes = 1 diff --git a/toontown/coghq/CountryClubInterior.py b/toontown/coghq/CountryClubInterior.py index c76d5f3..622caad 100644 --- a/toontown/coghq/CountryClubInterior.py +++ b/toontown/coghq/CountryClubInterior.py @@ -1,22 +1,20 @@ -import random - +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.battle import BattlePlace -from toontown.building import Elevator -from toontown.coghq import DistributedCountryClub -from toontown.hood import ZoneUtil from toontown.toon import Toon -from toontown.toonbase import ToontownBattleGlobals, ToontownGlobals, TTLocalizer +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.building import Elevator +import random class CountryClubInterior(BattlePlace.BattlePlace): notify = DirectNotifyGlobal.directNotify.newCategory('CountryClubInterior') diff --git a/toontown/coghq/CountryClubLayout.py b/toontown/coghq/CountryClubLayout.py index 0b924b1..034edfa 100644 --- a/toontown/coghq/CountryClubLayout.py +++ b/toontown/coghq/CountryClubLayout.py @@ -1,11 +1,9 @@ -import random - from direct.directnotify import DirectNotifyGlobal -from direct.showbase.PythonUtil import invertDictLossless, lerp, normalDistrib - +from direct.showbase.PythonUtil import invertDictLossless 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 09b46b5..ea9736f 100644 --- a/toontown/coghq/CountryClubManagerAI.py +++ b/toontown/coghq/CountryClubManagerAI.py @@ -1,13 +1,9 @@ -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 - +from toontown.toonbase import ToontownGlobals +from toontown.coghq import CountryClubLayout +from direct.showbase import DirectObject +import random 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 a9e4920..1fb46f8 100644 --- a/toontown/coghq/CountryClubRoom.py +++ b/toontown/coghq/CountryClubRoom.py @@ -1,14 +1,10 @@ -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 direct.fsm import ClassicFSM, State from toontown.toonbase import ToontownGlobals - +from toontown.coghq import CountryClubRoomSpecs +from direct.directnotify import DirectNotifyGlobal +import random class CountryClubRoom(DirectObject.DirectObject): notify = DirectNotifyGlobal.directNotify.newCategory('CountryClubRoom') diff --git a/toontown/coghq/CountryClubRoomBase.py b/toontown/coghq/CountryClubRoomBase.py index 384277c..ff40c32 100644 --- a/toontown/coghq/CountryClubRoomBase.py +++ b/toontown/coghq/CountryClubRoomBase.py @@ -1,6 +1,5 @@ from toontown.toonbase import ToontownGlobals - class CountryClubRoomBase: def __init__(self): @@ -19,8 +18,7 @@ class CountryClubRoomBase: if __dev__: def getCountryClubEntityTypeReg(self): - from otp.level import EntityTypeRegistry - from . import FactoryEntityTypes + from otp.level import EntityTypeRegistry typeReg = EntityTypeRegistry.EntityTypeRegistry(FactoryEntityTypes) return typeReg diff --git a/toontown/coghq/CountryClubRoomSpecs.py b/toontown/coghq/CountryClubRoomSpecs.py index b679993..e10112b 100644 --- a/toontown/coghq/CountryClubRoomSpecs.py +++ b/toontown/coghq/CountryClubRoomSpecs.py @@ -1,11 +1,13 @@ 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 526aa67..b1625bd 100644 --- a/toontown/coghq/CrateGlobals.py +++ b/toontown/coghq/CrateGlobals.py @@ -1,5 +1,4 @@ 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 bf3eae5..c3c303d 100644 --- a/toontown/coghq/CrusherCell.py +++ b/toontown/coghq/CrusherCell.py @@ -1,7 +1,5 @@ -from direct.directnotify import DirectNotifyGlobal - from . import ActiveCell - +from direct.directnotify import DirectNotifyGlobal class CrusherCell(ActiveCell.ActiveCell): notify = DirectNotifyGlobal.directNotify.newCategory('CrusherCell') diff --git a/toontown/coghq/CrusherCellAI.py b/toontown/coghq/CrusherCellAI.py index b5b3dd2..999dd7e 100644 --- a/toontown/coghq/CrusherCellAI.py +++ b/toontown/coghq/CrusherCellAI.py @@ -1,7 +1,5 @@ -from direct.directnotify import DirectNotifyGlobal - from . import ActiveCellAI - +from direct.directnotify import DirectNotifyGlobal class CrusherCellAI(ActiveCellAI.ActiveCellAI): notify = DirectNotifyGlobal.directNotify.newCategory('CrusherCellAI') diff --git a/toontown/coghq/DinerStatusIndicator.py b/toontown/coghq/DinerStatusIndicator.py index 4e9808e..9da937d 100644 --- a/toontown/coghq/DinerStatusIndicator.py +++ b/toontown/coghq/DinerStatusIndicator.py @@ -1,9 +1,7 @@ -from panda3d.core import BillboardEffect, DecalEffect, NodePath, Point3, TextureStage, TransparencyAttrib, VBase4, Vec3 - +from panda3d.core import NodePath, BillboardEffect, Vec3, Point3, TextureStage, TransparencyAttrib, DecalEffect, VBase4 from direct.fsm import FSM -from direct.gui.DirectGui import DGG, DirectFrame -from direct.interval.IntervalGlobal import LerpColorScaleInterval, LerpScaleInterval, Parallel, Sequence, Wait - +from direct.gui.DirectGui import DirectFrame, DGG +from direct.interval.IntervalGlobal import LerpScaleInterval, LerpColorScaleInterval, Parallel, Sequence, Wait class DinerStatusIndicator(NodePath, FSM.FSM): diff --git a/toontown/coghq/DirectionalCell.py b/toontown/coghq/DirectionalCell.py index 548e1ea..950431f 100644 --- a/toontown/coghq/DirectionalCell.py +++ b/toontown/coghq/DirectionalCell.py @@ -1,7 +1,5 @@ -from direct.directnotify import DirectNotifyGlobal - from . import ActiveCell - +from direct.directnotify import DirectNotifyGlobal class DirectionalCell(ActiveCell.ActiveCell): notify = DirectNotifyGlobal.directNotify.newCategory('DirectionalCell') diff --git a/toontown/coghq/DirectionalCellAI.py b/toontown/coghq/DirectionalCellAI.py index d10aa5f..56c7607 100644 --- a/toontown/coghq/DirectionalCellAI.py +++ b/toontown/coghq/DirectionalCellAI.py @@ -1,8 +1,6 @@ from direct.directnotify import DirectNotifyGlobal -from direct.task import Task - from . import ActiveCellAI, CrateGlobals - +from direct.task import Task class DirectionalCellAI(ActiveCellAI.ActiveCellAI): notify = DirectNotifyGlobal.directNotify.newCategory('DirectionalCellAI') diff --git a/toontown/coghq/DistributedBanquetTable.py b/toontown/coghq/DistributedBanquetTable.py index 9d50fb9..4cf3c73 100644 --- a/toontown/coghq/DistributedBanquetTable.py +++ b/toontown/coghq/DistributedBanquetTable.py @@ -1,24 +1,21 @@ import math import random - -from panda3d.core import (BitMask32, CollisionHandlerQueue, CollisionNode, CollisionSegment, NodePath, Point3, TextNode, - VBase4, Vec3, deg2Rad) +from panda3d.core import NodePath, Point3, VBase4, TextNode, Vec3, deg2Rad, CollisionSegment, CollisionHandlerQueue, CollisionNode, BitMask32 from panda3d.direct import SmoothMover - -from direct.directnotify import DirectNotifyGlobal +from direct.fsm import FSM from direct.distributed import DistributedObject from direct.distributed.ClockDelta import globalClockDelta -from direct.fsm import FSM +from direct.directnotify import DirectNotifyGlobal +from direct.interval.IntervalGlobal import Sequence, ProjectileInterval, Parallel, LerpHprInterval, ActorInterval, Func, Wait, SoundInterval, LerpPosHprInterval, LerpScaleInterval 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 142a28c..8316154 100644 --- a/toontown/coghq/DistributedBanquetTableAI.py +++ b/toontown/coghq/DistributedBanquetTableAI.py @@ -1,13 +1,10 @@ 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 a2c3a8a..5781aca 100644 --- a/toontown/coghq/DistributedBarrelBase.py +++ b/toontown/coghq/DistributedBarrelBase.py @@ -1,13 +1,9 @@ from panda3d.core import * - -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 * - +from toontown.coghq import BarrelBase +from otp.level import BasicEntities +from direct.directnotify import DirectNotifyGlobal class DistributedBarrelBase(BasicEntities.DistributedNodePathEntity, BarrelBase.BarrelBase): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedBarrelBase') diff --git a/toontown/coghq/DistributedBarrelBaseAI.py b/toontown/coghq/DistributedBarrelBaseAI.py index f5a31f4..06e3f24 100644 --- a/toontown/coghq/DistributedBarrelBaseAI.py +++ b/toontown/coghq/DistributedBarrelBaseAI.py @@ -1,11 +1,8 @@ from direct.directnotify import DirectNotifyGlobal -from direct.task import Task - from otp.level import DistributedEntityAI - +from direct.task import Task 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 ebee982..d1c1e63 100644 --- a/toontown/coghq/DistributedBattleFactory.py +++ b/toontown/coghq/DistributedBattleFactory.py @@ -1,22 +1,18 @@ -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 toontown.suit import SuitDNA +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.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 6510c51..3558d43 100644 --- a/toontown/coghq/DistributedBattleFactoryAI.py +++ b/toontown/coghq/DistributedBattleFactoryAI.py @@ -1,12 +1,10 @@ -from direct.directnotify import DirectNotifyGlobal -from direct.fsm import ClassicFSM, State -from direct.showbase.PythonUtil import addListsByValue - -from toontown.battle.BattleBase import * 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 class DistributedBattleFactoryAI(DistributedLevelBattleAI.DistributedLevelBattleAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedBattleFactoryAI') diff --git a/toontown/coghq/DistributedBeanBarrel.py b/toontown/coghq/DistributedBeanBarrel.py index 52526f5..668eb7b 100644 --- a/toontown/coghq/DistributedBeanBarrel.py +++ b/toontown/coghq/DistributedBeanBarrel.py @@ -1,13 +1,9 @@ from panda3d.core import * - -from direct.directnotify import DirectNotifyGlobal from direct.interval.IntervalGlobal import * - from toontown.toonbase.ToontownGlobals import * - +from direct.directnotify import DirectNotifyGlobal from . import DistributedBarrelBase - class DistributedBeanBarrel(DistributedBarrelBase.DistributedBarrelBase): def __init__(self, cr): diff --git a/toontown/coghq/DistributedBeanBarrelAI.py b/toontown/coghq/DistributedBeanBarrelAI.py index b490ddf..14e1217 100644 --- a/toontown/coghq/DistributedBeanBarrelAI.py +++ b/toontown/coghq/DistributedBeanBarrelAI.py @@ -1,9 +1,7 @@ +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 485a2d8..63bd0a4 100644 --- a/toontown/coghq/DistributedButton.py +++ b/toontown/coghq/DistributedButton.py @@ -1,14 +1,13 @@ from panda3d.core import * - -from direct.directnotify import DirectNotifyGlobal -from direct.distributed.ClockDelta import * -from direct.fsm import ClassicFSM +from panda3d.core import * from direct.interval.IntervalGlobal import * - -from toontown.toonbase import ToontownGlobals, TTLocalizer - -from . import DistributedSwitch, MovingPlatform - +from direct.distributed.ClockDelta import * +from . import MovingPlatform +from toontown.toonbase import ToontownGlobals +from direct.directnotify import DirectNotifyGlobal +from direct.fsm import ClassicFSM +from . import DistributedSwitch +from toontown.toonbase import TTLocalizer class DistributedButton(DistributedSwitch.DistributedSwitch): countdownSeconds = 3.0 diff --git a/toontown/coghq/DistributedButtonAI.py b/toontown/coghq/DistributedButtonAI.py index 51a98f3..31b457b 100644 --- a/toontown/coghq/DistributedButtonAI.py +++ b/toontown/coghq/DistributedButtonAI.py @@ -1,8 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.task import Task - -from . import DistributedSwitchAI, DistributedSwitchBase - +from . import DistributedSwitchBase, DistributedSwitchAI class DistributedButtonAI(DistributedSwitchAI.DistributedSwitchAI): setColor = DistributedSwitchBase.stubFunction diff --git a/toontown/coghq/DistributedCashbotBossCrane.py b/toontown/coghq/DistributedCashbotBossCrane.py index 3a9bcd7..8f10715 100644 --- a/toontown/coghq/DistributedCashbotBossCrane.py +++ b/toontown/coghq/DistributedCashbotBossCrane.py @@ -1,23 +1,19 @@ -import random - +from direct.gui.DirectGui import * from panda3d.core import * from panda3d.direct import * -from panda3d.otp import * from panda3d.physics import * - -from direct.distributed import DistributedObject +from panda3d.otp import * +from direct.interval.IntervalGlobal import * from direct.distributed.ClockDelta import * from direct.fsm import FSM -from direct.gui.DirectGui import * -from direct.interval.IntervalGlobal import * -from direct.showbase import PythonUtil +from direct.distributed import DistributedObject from direct.showutil import Rope +from direct.showbase import PythonUtil from direct.task import Task - +from toontown.toonbase import ToontownGlobals +from toontown.toonbase import TTLocalizer from otp.otpbase import OTPGlobals - -from toontown.toonbase import ToontownGlobals, TTLocalizer - +import random class DistributedCashbotBossCrane(DistributedObject.DistributedObject, FSM.FSM): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedCashbotBossCrane') diff --git a/toontown/coghq/DistributedCashbotBossCraneAI.py b/toontown/coghq/DistributedCashbotBossCraneAI.py index 59136fe..45ff12d 100644 --- a/toontown/coghq/DistributedCashbotBossCraneAI.py +++ b/toontown/coghq/DistributedCashbotBossCraneAI.py @@ -1,12 +1,8 @@ from panda3d.core import * - from direct.distributed import DistributedObjectAI -from direct.fsm import FSM - -from otp.otpbase import OTPGlobals - from toontown.toonbase import ToontownGlobals - +from otp.otpbase import OTPGlobals +from direct.fsm import FSM class DistributedCashbotBossCraneAI(DistributedObjectAI.DistributedObjectAI, FSM.FSM): diff --git a/toontown/coghq/DistributedCashbotBossObject.py b/toontown/coghq/DistributedCashbotBossObject.py index 4d2bd7c..34cc645 100644 --- a/toontown/coghq/DistributedCashbotBossObject.py +++ b/toontown/coghq/DistributedCashbotBossObject.py @@ -1,16 +1,12 @@ from panda3d.core import * from panda3d.physics import * - +from direct.interval.IntervalGlobal import * from direct.directnotify import DirectNotifyGlobal from direct.distributed import DistributedSmoothNode -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 - +from otp.otpbase import OTPGlobals +from direct.fsm import FSM +from direct.task import Task smileyDoId = 1 class DistributedCashbotBossObject(DistributedSmoothNode.DistributedSmoothNode, FSM.FSM): diff --git a/toontown/coghq/DistributedCashbotBossObjectAI.py b/toontown/coghq/DistributedCashbotBossObjectAI.py index dd0d430..1100ff6 100644 --- a/toontown/coghq/DistributedCashbotBossObjectAI.py +++ b/toontown/coghq/DistributedCashbotBossObjectAI.py @@ -1,14 +1,10 @@ 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 1c397d1..712b555 100644 --- a/toontown/coghq/DistributedCashbotBossSafe.py +++ b/toontown/coghq/DistributedCashbotBossSafe.py @@ -1,15 +1,10 @@ from panda3d.core import * - -from direct.directnotify import DirectNotifyGlobal from direct.interval.IntervalGlobal import * - -from otp.otpbase import OTPGlobals - +from direct.directnotify import DirectNotifyGlobal from toontown.toonbase import ToontownGlobals - +from otp.otpbase import OTPGlobals 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 d310dcc..2b141c0 100644 --- a/toontown/coghq/DistributedCashbotBossSafeAI.py +++ b/toontown/coghq/DistributedCashbotBossSafeAI.py @@ -1,12 +1,8 @@ from panda3d.core import * - -from otp.otpbase import OTPGlobals - from toontown.toonbase import ToontownGlobals - +from otp.otpbase import OTPGlobals from . import DistributedCashbotBossObjectAI - class DistributedCashbotBossSafeAI(DistributedCashbotBossObjectAI.DistributedCashbotBossObjectAI): wantsWatchDrift = 0 diff --git a/toontown/coghq/DistributedCashbotBossTreasure.py b/toontown/coghq/DistributedCashbotBossTreasure.py index c141f14..fdddc6e 100644 --- a/toontown/coghq/DistributedCashbotBossTreasure.py +++ b/toontown/coghq/DistributedCashbotBossTreasure.py @@ -1,10 +1,7 @@ -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 7c4e742..70bb0d1 100644 --- a/toontown/coghq/DistributedCashbotBossTreasureAI.py +++ b/toontown/coghq/DistributedCashbotBossTreasureAI.py @@ -1,6 +1,5 @@ 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 66f71f1..7634fbd 100644 --- a/toontown/coghq/DistributedCogHQDoor.py +++ b/toontown/coghq/DistributedCogHQDoor.py @@ -1,16 +1,16 @@ from panda3d.core import * - -from direct.directnotify import DirectNotifyGlobal -from direct.distributed.ClockDelta import * -from direct.fsm import ClassicFSM from direct.interval.IntervalGlobal import * - -from toontown.building import DistributedDoor, DoorTypes, FADoorCodes +from direct.distributed.ClockDelta import * +from toontown.toonbase import ToontownGlobals +from direct.directnotify import DirectNotifyGlobal +from direct.fsm import ClassicFSM +from toontown.building import DistributedDoor from toontown.hood import ZoneUtil -from toontown.toonbase import ToontownGlobals, TTLocalizer +from toontown.building import FADoorCodes +from toontown.building import DoorTypes +from toontown.toonbase import 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 34d2f04..afa71d7 100644 --- a/toontown/coghq/DistributedCogHQDoorAI.py +++ b/toontown/coghq/DistributedCogHQDoorAI.py @@ -1,14 +1,14 @@ -from direct.directnotify import DirectNotifyGlobal -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 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 . 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 eba6445..0ab2b16 100644 --- a/toontown/coghq/DistributedCogKart.py +++ b/toontown/coghq/DistributedCogKart.py @@ -1,17 +1,16 @@ import math - -from panda3d.core import CollisionNode, CollisionSphere, Point3, Vec3, deg2Rad - +from panda3d.core import CollisionSphere, CollisionNode, Vec3, Point3, deg2Rad +from direct.interval.IntervalGlobal import Sequence, Func, Parallel, ActorInterval, Wait, Parallel, LerpHprInterval, ProjectileInterval, LerpPosInterval from direct.directnotify import DirectNotifyGlobal -from direct.interval.IntervalGlobal import (ActorInterval, Func, LerpHprInterval, LerpPosInterval, Parallel, - ProjectileInterval, Sequence, Wait) -from direct.showbase import PythonUtil - -from toontown.building import BoardingGroupShow, DistributedElevatorExt, ElevatorConstants -from toontown.distributed import DelayDelete +from toontown.building import ElevatorConstants +from toontown.toonbase import ToontownGlobals +from toontown.toonbase import TTLocalizer from toontown.safezone import DistributedGolfKart -from toontown.toonbase import ToontownGlobals, TTLocalizer - +from toontown.building import DistributedElevatorExt +from toontown.building import ElevatorConstants +from toontown.distributed import DelayDelete +from direct.showbase import PythonUtil +from toontown.building import BoardingGroupShow class DistributedCogKart(DistributedElevatorExt.DistributedElevatorExt): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedCogKart') diff --git a/toontown/coghq/DistributedCogKartAI.py b/toontown/coghq/DistributedCogKartAI.py index a796906..154954d 100644 --- a/toontown/coghq/DistributedCogKartAI.py +++ b/toontown/coghq/DistributedCogKartAI.py @@ -1,10 +1,9 @@ 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 57728cd..a9ba3b9 100644 --- a/toontown/coghq/DistributedCountryClub.py +++ b/toontown/coghq/DistributedCountryClub.py @@ -1,18 +1,18 @@ 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.distributed import DistributedObject +from direct.directnotify import DirectNotifyGlobal 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 - +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.gui import OnscreenText +from direct.task.Task import Task +from direct.interval.IntervalGlobal import * class DistributedCountryClub(DistributedObject.DistributedObject): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedCountryClub') diff --git a/toontown/coghq/DistributedCountryClubAI.py b/toontown/coghq/DistributedCountryClubAI.py index 0956a0e..9d46074 100644 --- a/toontown/coghq/DistributedCountryClubAI.py +++ b/toontown/coghq/DistributedCountryClubAI.py @@ -1,12 +1,10 @@ -from direct.directnotify import DirectNotifyGlobal from direct.distributed import DistributedObjectAI - from otp.level import DistributedLevelAI - -from toontown.building import DistributedClubElevatorAI -from toontown.coghq import BattleExperienceAggregatorAI, CountryClubLayout, DistributedCountryClubRoomAI +from direct.directnotify import DirectNotifyGlobal from toontown.toonbase import ToontownGlobals - +from toontown.coghq import CountryClubLayout, DistributedCountryClubRoomAI +from toontown.coghq import BattleExperienceAggregatorAI +from toontown.building import DistributedClubElevatorAI class DistributedCountryClubAI(DistributedObjectAI.DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedCountryClubAI') diff --git a/toontown/coghq/DistributedCountryClubBattle.py b/toontown/coghq/DistributedCountryClubBattle.py index e2e31bd..c3b037a 100644 --- a/toontown/coghq/DistributedCountryClubBattle.py +++ b/toontown/coghq/DistributedCountryClubBattle.py @@ -1,22 +1,18 @@ -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 toontown.suit import SuitDNA +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.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 98ba4f2..8ef0501 100644 --- a/toontown/coghq/DistributedCountryClubBattleAI.py +++ b/toontown/coghq/DistributedCountryClubBattleAI.py @@ -1,14 +1,12 @@ -from direct.directnotify import DirectNotifyGlobal -from direct.fsm import ClassicFSM, State -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 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 class DistributedCountryClubBattleAI(DistributedLevelBattleAI.DistributedLevelBattleAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedCountryClubBattleAI') diff --git a/toontown/coghq/DistributedCountryClubRoom.py b/toontown/coghq/DistributedCountryClubRoom.py index 9173c42..7a93def 100644 --- a/toontown/coghq/DistributedCountryClubRoom.py +++ b/toontown/coghq/DistributedCountryClubRoom.py @@ -1,18 +1,15 @@ -import random - from panda3d.core import * - -from direct.directnotify import DirectNotifyGlobal +from toontown.toonbase.ToontownGlobals import * from direct.distributed.ClockDelta import * from direct.interval.IntervalGlobal import * - -from otp.level import DistributedLevel, LevelConstants, LevelSpec - +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 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 2933d90..50ca003 100644 --- a/toontown/coghq/DistributedCountryClubRoomAI.py +++ b/toontown/coghq/DistributedCountryClubRoomAI.py @@ -1,13 +1,12 @@ +from otp.level import DistributedLevelAI, LevelSpec from direct.directnotify import DirectNotifyGlobal from direct.task import Task - -from otp.level import DistributedLevelAI, LevelSpec - -from toontown.coghq import (CountryClubRoomBase, CountryClubRoomSpecs, DistributedCountryClubBattleAI, - FactoryEntityCreatorAI, LevelSuitPlannerAI) +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 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 05a9de5..b2ff837 100644 --- a/toontown/coghq/DistributedCrate.py +++ b/toontown/coghq/DistributedCrate.py @@ -1,16 +1,13 @@ from panda3d.core import * - -from direct.directnotify import DirectNotifyGlobal -from direct.distributed import DistributedObject from direct.interval.IntervalGlobal import * -from direct.showbase.PythonUtil import fitSrcAngle2Dest -from direct.task.Task import Task - from toontown.toonbase.ToontownGlobals import * - -from . import DistributedCrushableEntity, MovingPlatform from .CrateGlobals import * - +from direct.showbase.PythonUtil import fitSrcAngle2Dest +from direct.distributed import DistributedObject +from direct.directnotify import DirectNotifyGlobal +from . import MovingPlatform +from direct.task.Task import Task +from . import DistributedCrushableEntity class DistributedCrate(DistributedCrushableEntity.DistributedCrushableEntity): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedCrate') diff --git a/toontown/coghq/DistributedCrateAI.py b/toontown/coghq/DistributedCrateAI.py index 0be120a..c13c861 100644 --- a/toontown/coghq/DistributedCrateAI.py +++ b/toontown/coghq/DistributedCrateAI.py @@ -1,9 +1,8 @@ -from direct.directnotify import DirectNotifyGlobal -from direct.task import Task - -from . import CrateGlobals, DistributedCrushableEntityAI from .CrateGlobals import * - +from direct.directnotify import DirectNotifyGlobal +from . import DistributedCrushableEntityAI +from direct.task import Task +from . import CrateGlobals class DistributedCrateAI(DistributedCrushableEntityAI.DistributedCrushableEntityAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedCrateAI') diff --git a/toontown/coghq/DistributedCrushableEntity.py b/toontown/coghq/DistributedCrushableEntity.py index be4bd55..9e7157f 100644 --- a/toontown/coghq/DistributedCrushableEntity.py +++ b/toontown/coghq/DistributedCrushableEntity.py @@ -1,9 +1,7 @@ -from panda3d.core import NodePath - +from otp.level import DistributedEntity from direct.directnotify import DirectNotifyGlobal - -from otp.level import BasicEntities, DistributedEntity - +from panda3d.core import NodePath +from otp.level import BasicEntities 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 7319a7c..0d7880a 100644 --- a/toontown/coghq/DistributedCrushableEntityAI.py +++ b/toontown/coghq/DistributedCrushableEntityAI.py @@ -1,7 +1,5 @@ -from direct.directnotify import DirectNotifyGlobal - from otp.level import DistributedEntityAI - +from direct.directnotify import DirectNotifyGlobal class DistributedCrushableEntityAI(DistributedEntityAI.DistributedEntityAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedCrushableEntityAI') diff --git a/toontown/coghq/DistributedCrusherEntity.py b/toontown/coghq/DistributedCrusherEntity.py index e281db7..4aea0b2 100644 --- a/toontown/coghq/DistributedCrusherEntity.py +++ b/toontown/coghq/DistributedCrusherEntity.py @@ -1,7 +1,5 @@ -from direct.directnotify import DirectNotifyGlobal - from otp.level import BasicEntities - +from direct.directnotify import DirectNotifyGlobal class DistributedCrusherEntity(BasicEntities.DistributedNodePathEntity): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedCrusherEntity') diff --git a/toontown/coghq/DistributedCrusherEntityAI.py b/toontown/coghq/DistributedCrusherEntityAI.py index b78e490..383b651 100644 --- a/toontown/coghq/DistributedCrusherEntityAI.py +++ b/toontown/coghq/DistributedCrusherEntityAI.py @@ -1,7 +1,5 @@ -from direct.directnotify import DirectNotifyGlobal - from otp.level import DistributedEntityAI - +from direct.directnotify import DirectNotifyGlobal class DistributedCrusherEntityAI(DistributedEntityAI.DistributedEntityAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedCrusherEntityAI') diff --git a/toontown/coghq/DistributedDoorEntity.py b/toontown/coghq/DistributedDoorEntity.py index 0c9ac96..2ecc93a 100644 --- a/toontown/coghq/DistributedDoorEntity.py +++ b/toontown/coghq/DistributedDoorEntity.py @@ -1,17 +1,17 @@ from panda3d.core import * -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 panda3d.direct import ShowInterval, HideInterval +from direct.distributed.ClockDelta import * +from toontown.toonbase import ToontownGlobals +from direct.directnotify import DirectNotifyGlobal 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 e0e476a..cf67418 100644 --- a/toontown/coghq/DistributedDoorEntityAI.py +++ b/toontown/coghq/DistributedDoorEntityAI.py @@ -1,14 +1,13 @@ -from direct.directnotify import DirectNotifyGlobal -from direct.distributed import DistributedObjectAI from direct.distributed.ClockDelta import * -from direct.fsm import ClassicFSM, FourStateAI, State +from direct.directnotify import DirectNotifyGlobal from direct.showbase import DirectObject -from direct.task import Task - -from otp.level import DistributedEntityAI - 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.task import Task class Lock(DistributedDoorEntityBase.LockBase, DirectObject.DirectObject, FourStateAI.FourStateAI): diff --git a/toontown/coghq/DistributedElevatorMarker.py b/toontown/coghq/DistributedElevatorMarker.py index e4762cd..94d3db6 100644 --- a/toontown/coghq/DistributedElevatorMarker.py +++ b/toontown/coghq/DistributedElevatorMarker.py @@ -1,20 +1,15 @@ -import math - 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.toonbase import ToontownGlobals - 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 class DistributedElevatorMarker(BasicEntities.DistributedNodePathEntity): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedElevatorMarker') diff --git a/toontown/coghq/DistributedElevatorMarkerAI.py b/toontown/coghq/DistributedElevatorMarkerAI.py index 4da343f..bf06954 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.ai.AIBase import * -from otp.level import BasicEntities, DistributedEntityAI - +from otp.level import DistributedEntityAI +from otp.level import BasicEntities +from direct.directnotify import DirectNotifyGlobal class DistributedElevatorMarkerAI(DistributedEntityAI.DistributedEntityAI, NodePath, BasicEntities.NodePathAttribs): diff --git a/toontown/coghq/DistributedFactory.py b/toontown/coghq/DistributedFactory.py index 6ab8550..697805f 100644 --- a/toontown/coghq/DistributedFactory.py +++ b/toontown/coghq/DistributedFactory.py @@ -1,20 +1,18 @@ -import random - from panda3d.core import * - -from direct.controls.ControlManager import CollisionHandlerRayStart -from direct.directnotify import DirectNotifyGlobal +from toontown.toonbase.ToontownGlobals import * from direct.distributed.ClockDelta import * from direct.interval.IntervalGlobal import * - -from otp.level import DistributedLevel, LevelConstants, LevelSpec - -from toontown.coghq import FactoryCameraViews +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 toontown.toonbase.ToontownGlobals import * - -from . import FactoryBase, FactoryEntityCreator, FactorySpecs - +from toontown.coghq import FactoryCameraViews +from direct.controls.ControlManager import CollisionHandlerRayStart if __dev__: from otp.level import EditorGlobals diff --git a/toontown/coghq/DistributedFactoryAI.py b/toontown/coghq/DistributedFactoryAI.py index f8a835e..44c74d7 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 otp.level import DistributedLevelAI, LevelSpec - -from toontown.coghq import (CogDisguiseGlobals, DistributedBattleFactoryAI, FactoryBase, FactoryEntityCreatorAI, - FactorySpecs, LevelSuitPlannerAI) +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 ToontownBattleGlobals, ToontownGlobals - +from toontown.toonbase import ToontownGlobals, ToontownBattleGlobals +from toontown.coghq import DistributedBattleFactoryAI class DistributedFactoryAI(DistributedLevelAI.DistributedLevelAI, FactoryBase.FactoryBase): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedFactoryAI') diff --git a/toontown/coghq/DistributedFactoryElevatorExt.py b/toontown/coghq/DistributedFactoryElevatorExt.py index 084c13b..01aa329 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 ToontownGlobals, TTLocalizer - +from toontown.toonbase import TTLocalizer class DistributedFactoryElevatorExt(DistributedElevatorExt.DistributedElevatorExt): diff --git a/toontown/coghq/DistributedFactoryElevatorExtAI.py b/toontown/coghq/DistributedFactoryElevatorExtAI.py index 0588b06..d235250 100644 --- a/toontown/coghq/DistributedFactoryElevatorExtAI.py +++ b/toontown/coghq/DistributedFactoryElevatorExtAI.py @@ -1,13 +1,11 @@ -from direct.distributed.ClockDelta import * -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 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.task import Task class DistributedFactoryElevatorExtAI(DistributedElevatorExtAI.DistributedElevatorExtAI): diff --git a/toontown/coghq/DistributedFoodBelt.py b/toontown/coghq/DistributedFoodBelt.py index d3176dd..63d0adf 100644 --- a/toontown/coghq/DistributedFoodBelt.py +++ b/toontown/coghq/DistributedFoodBelt.py @@ -1,14 +1,11 @@ -from panda3d.core import CollisionNode, CollisionTube, NodePath, Point3 - -from direct.actor import Actor -from direct.directnotify import DirectNotifyGlobal -from direct.distributed import DistributedObject +from panda3d.core import NodePath, Point3, CollisionTube, CollisionNode from direct.fsm import FSM -from direct.interval.IntervalGlobal import Func, LerpPosInterval, ProjectileInterval, Sequence, SoundInterval, Wait - -from toontown.coghq.FoodBeltBase import FoodBeltBase +from direct.distributed import DistributedObject +from direct.directnotify import DirectNotifyGlobal +from direct.interval.IntervalGlobal import Sequence, Wait, LerpPosInterval, ProjectileInterval, Func, SoundInterval +from direct.actor import Actor from toontown.toonbase import ToontownGlobals - +from toontown.coghq.FoodBeltBase import FoodBeltBase 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 807f40c..38e9e19 100644 --- a/toontown/coghq/DistributedFoodBeltAI.py +++ b/toontown/coghq/DistributedFoodBeltAI.py @@ -1,10 +1,8 @@ -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 d386adf..a2226a8 100644 --- a/toontown/coghq/DistributedGagBarrel.py +++ b/toontown/coghq/DistributedGagBarrel.py @@ -1,13 +1,9 @@ from panda3d.core import * - -from direct.directnotify import DirectNotifyGlobal from direct.interval.IntervalGlobal import * - from toontown.toonbase.ToontownGlobals import * - +from direct.directnotify import DirectNotifyGlobal from . import DistributedBarrelBase - class DistributedGagBarrel(DistributedBarrelBase.DistributedBarrelBase): def __init__(self, cr): diff --git a/toontown/coghq/DistributedGagBarrelAI.py b/toontown/coghq/DistributedGagBarrelAI.py index d112853..c00f01d 100644 --- a/toontown/coghq/DistributedGagBarrelAI.py +++ b/toontown/coghq/DistributedGagBarrelAI.py @@ -1,11 +1,8 @@ +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 2c31389..a9aa3bf 100644 --- a/toontown/coghq/DistributedGolfGreenGame.py +++ b/toontown/coghq/DistributedGolfGreenGame.py @@ -1,34 +1,35 @@ -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 direct.showbase import RandomNumGen -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.toonbase import ToontownBattleGlobals, ToontownGlobals, ToontownTimer, TTLocalizer - -from . import GameSprite3D 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 toontown.distributed import DelayDelete +from toontown.toon import ToonHeadFrame +from toontown.battle import BattleParticles +from toontown.battle import MovieUtil +import time +from toontown.toonbase import ToontownTimer class DistributedGolfGreenGame(BattleBlocker.BattleBlocker): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedGolfGreenGame') diff --git a/toontown/coghq/DistributedGolfGreenGameAI.py b/toontown/coghq/DistributedGolfGreenGameAI.py index 8885901..3a45d81 100644 --- a/toontown/coghq/DistributedGolfGreenGameAI.py +++ b/toontown/coghq/DistributedGolfGreenGameAI.py @@ -1,20 +1,15 @@ -import random -import time - +from otp.ai.AIBase import * +from direct.interval.IntervalGlobal import * from direct.directnotify import DirectNotifyGlobal from direct.distributed import ClockDelta -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 otp.level import DistributedEntityAI +from otp.level import BasicEntities from toontown.coghq import BattleBlockerAI +from direct.distributed.ClockDelta import * 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 1886d5b..33084f2 100644 --- a/toontown/coghq/DistributedGolfSpot.py +++ b/toontown/coghq/DistributedGolfSpot.py @@ -1,22 +1,17 @@ import math - -from panda3d.core import (BitMask32, CollisionHandlerEvent, CollisionNode, CollisionSphere, NodePath, Point3, TextNode, - VBase4) +from panda3d.core import Point3, CollisionSphere, CollisionNode, CollisionHandlerEvent, TextNode, VBase4, NodePath, BitMask32 from panda3d.direct import SmoothMover - -from direct.directnotify import DirectNotifyGlobal +from direct.fsm import FSM from direct.distributed import DistributedObject from direct.distributed.ClockDelta import globalClockDelta -from direct.fsm import FSM +from direct.directnotify import DirectNotifyGlobal from direct.gui.DirectGui import DGG, DirectButton, DirectLabel, DirectWaitBar -from direct.interval.IntervalGlobal import (ActorInterval, Func, LerpHprInterval, LerpPosInterval, LerpScaleInterval, - Parallel, ProjectileInterval, Sequence, SoundInterval, Wait) +from direct.interval.IntervalGlobal import Sequence, Wait, ActorInterval, Parallel, Func, LerpPosInterval, LerpHprInterval, ProjectileInterval, LerpScaleInterval, SoundInterval from direct.showbase import PythonUtil from direct.task import Task - from toontown.golf import GolfGlobals -from toontown.toonbase import ToontownGlobals, TTLocalizer - +from toontown.toonbase import ToontownGlobals +from toontown.toonbase import TTLocalizer class DistributedGolfSpot(DistributedObject.DistributedObject, FSM.FSM): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedGolfSpot') @@ -733,8 +728,8 @@ class DistributedGolfSpot(DistributedObject.DistributedObject, FSM.FSM): pass def getFlyBallSplatInterval(self, x, y, z, flyBallCode, throwerId): - from toontown.battle import BattleProps from toontown.toonbase import ToontownBattleGlobals + from toontown.battle import BattleProps splatName = 'dust' splat = BattleProps.globalPropPool.getProp(splatName) splat.setBillboardPointWorld(2) diff --git a/toontown/coghq/DistributedGolfSpotAI.py b/toontown/coghq/DistributedGolfSpotAI.py index db5f106..83f1bf6 100644 --- a/toontown/coghq/DistributedGolfSpotAI.py +++ b/toontown/coghq/DistributedGolfSpotAI.py @@ -1,7 +1,6 @@ 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 4bdb711..bb77083 100644 --- a/toontown/coghq/DistributedGrid.py +++ b/toontown/coghq/DistributedGrid.py @@ -1,14 +1,9 @@ from panda3d.core import * - -from direct.directnotify import DirectNotifyGlobal from direct.interval.IntervalGlobal import * - -from otp.level import BasicEntities - from toontown.toonbase.ToontownGlobals import * - from .CrateGlobals import * - +from otp.level import BasicEntities +from direct.directnotify import DirectNotifyGlobal class DistributedGrid(BasicEntities.DistributedNodePathEntity): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedGrid') diff --git a/toontown/coghq/DistributedGridAI.py b/toontown/coghq/DistributedGridAI.py index 5675982..8d411a8 100644 --- a/toontown/coghq/DistributedGridAI.py +++ b/toontown/coghq/DistributedGridAI.py @@ -1,9 +1,6 @@ -from direct.directnotify import DirectNotifyGlobal - -from otp.level import DistributedEntityAI - from .CrateGlobals import * - +from otp.level import DistributedEntityAI +from direct.directnotify import DirectNotifyGlobal class DistributedGridAI(DistributedEntityAI.DistributedEntityAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedGridAI') diff --git a/toontown/coghq/DistributedHealBarrel.py b/toontown/coghq/DistributedHealBarrel.py index d23382a..517e26a 100644 --- a/toontown/coghq/DistributedHealBarrel.py +++ b/toontown/coghq/DistributedHealBarrel.py @@ -1,13 +1,9 @@ from panda3d.core import * - -from direct.directnotify import DirectNotifyGlobal from direct.interval.IntervalGlobal import * - from toontown.toonbase.ToontownGlobals import * - +from direct.directnotify import DirectNotifyGlobal from . import DistributedBarrelBase - class DistributedHealBarrel(DistributedBarrelBase.DistributedBarrelBase): def __init__(self, cr): diff --git a/toontown/coghq/DistributedHealBarrelAI.py b/toontown/coghq/DistributedHealBarrelAI.py index b030fae..b89a6c2 100644 --- a/toontown/coghq/DistributedHealBarrelAI.py +++ b/toontown/coghq/DistributedHealBarrelAI.py @@ -1,9 +1,7 @@ +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 41b0566..90452dc 100644 --- a/toontown/coghq/DistributedInGameEditor.py +++ b/toontown/coghq/DistributedInGameEditor.py @@ -1,19 +1,16 @@ -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 direct.interval.IntervalGlobal import * -from direct.showbase.PythonUtil import Functor, lineInfo - -from otp.level import EditMgr, Entity, Level, LevelConstants - -from toontown.cogdominium import CogdoEntityCreator - -from .InGameEditorElements import * +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 toontown.cogdominium import CogdoEntityCreator +import string class InGameEditorEntityBase(InGameEditorElement): diff --git a/toontown/coghq/DistributedInGameEditorAI.py b/toontown/coghq/DistributedInGameEditorAI.py index e85d48b..6485cb7 100644 --- a/toontown/coghq/DistributedInGameEditorAI.py +++ b/toontown/coghq/DistributedInGameEditorAI.py @@ -1,10 +1,8 @@ from direct.directnotify import DirectNotifyGlobal -from direct.directutil import DistributedLargeBlobSenderAI from direct.distributed import DistributedObjectAI - +from direct.directutil import DistributedLargeBlobSenderAI 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 723176f..a865c84 100644 --- a/toontown/coghq/DistributedLaserField.py +++ b/toontown/coghq/DistributedLaserField.py @@ -1,22 +1,18 @@ -import math -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 * - +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 class DistributedLaserField(BattleBlocker.BattleBlocker): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedLaserField') diff --git a/toontown/coghq/DistributedLaserFieldAI.py b/toontown/coghq/DistributedLaserFieldAI.py index 3962885..5e55c16 100644 --- a/toontown/coghq/DistributedLaserFieldAI.py +++ b/toontown/coghq/DistributedLaserFieldAI.py @@ -1,15 +1,17 @@ -import random - +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.ai.AIBase import * -from otp.level import BasicEntities, DistributedEntityAI - -from toontown.coghq import BattleBlockerAI, LaserGameAvoid, LaserGameDrag, LaserGameMineSweeper, LaserGameRoll - +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 class DistributedLaserFieldAI(BattleBlockerAI.BattleBlockerAI, NodePath, BasicEntities.NodePathAttribs): diff --git a/toontown/coghq/DistributedLawOffice.py b/toontown/coghq/DistributedLawOffice.py index 8a3c6dc..9189c31 100644 --- a/toontown/coghq/DistributedLawOffice.py +++ b/toontown/coghq/DistributedLawOffice.py @@ -1,20 +1,18 @@ -import random - from panda3d.core import * - -from direct.directnotify import DirectNotifyGlobal -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 - +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 toontown.coghq import FactoryCameraViews +from direct.distributed.DistributedObject import DistributedObject if __dev__: from otp.level import EditorGlobals diff --git a/toontown/coghq/DistributedLawOfficeAI.py b/toontown/coghq/DistributedLawOfficeAI.py index 7cb21b9..df360e1 100644 --- a/toontown/coghq/DistributedLawOfficeAI.py +++ b/toontown/coghq/DistributedLawOfficeAI.py @@ -1,18 +1,21 @@ +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 25295c5..8cdac78 100644 --- a/toontown/coghq/DistributedLawOfficeElevatorExt.py +++ b/toontown/coghq/DistributedLawOfficeElevatorExt.py @@ -1,14 +1,15 @@ 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 ToontownGlobals, TTLocalizer - +from toontown.toonbase import TTLocalizer class DistributedLawOfficeElevatorExt(DistributedElevatorExt.DistributedElevatorExt): diff --git a/toontown/coghq/DistributedLawOfficeElevatorExtAI.py b/toontown/coghq/DistributedLawOfficeElevatorExtAI.py index a06b5c4..53d7e50 100644 --- a/toontown/coghq/DistributedLawOfficeElevatorExtAI.py +++ b/toontown/coghq/DistributedLawOfficeElevatorExtAI.py @@ -1,13 +1,11 @@ -from direct.distributed.ClockDelta import * -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 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.task import Task class DistributedLawOfficeElevatorExtAI(DistributedElevatorExtAI.DistributedElevatorExtAI): diff --git a/toontown/coghq/DistributedLawOfficeElevatorInt.py b/toontown/coghq/DistributedLawOfficeElevatorInt.py index 88221ee..c38ebea 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 ToontownGlobals, TTLocalizer - +from toontown.toonbase import TTLocalizer class DistributedLawOfficeElevatorInt(DistributedElevatorFloor.DistributedElevatorFloor): diff --git a/toontown/coghq/DistributedLawOfficeElevatorIntAI.py b/toontown/coghq/DistributedLawOfficeElevatorIntAI.py index ab3d564..8e83f6d 100644 --- a/toontown/coghq/DistributedLawOfficeElevatorIntAI.py +++ b/toontown/coghq/DistributedLawOfficeElevatorIntAI.py @@ -1,13 +1,12 @@ -from direct.distributed.ClockDelta import * -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 - +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.task import Task class DistributedLawOfficeElevatorIntAI(DistributedElevatorFloorAI.DistributedElevatorFloorAI): diff --git a/toontown/coghq/DistributedLawOfficeFloor.py b/toontown/coghq/DistributedLawOfficeFloor.py index eedc8e1..905594b 100644 --- a/toontown/coghq/DistributedLawOfficeFloor.py +++ b/toontown/coghq/DistributedLawOfficeFloor.py @@ -1,19 +1,17 @@ -import random - from panda3d.core import * - -from direct.directnotify import DirectNotifyGlobal +from toontown.toonbase.ToontownGlobals import * from direct.distributed.ClockDelta import * from direct.interval.IntervalGlobal import * - -from otp.level import DistributedLevel, LevelConstants, LevelSpec - -from toontown.coghq import FactoryCameraViews +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 toontown.toonbase.ToontownGlobals import * - -from . import FactoryEntityCreator, FactorySpecs, LawOfficeBase - +from toontown.coghq import FactoryCameraViews if __dev__: from otp.level import EditorGlobals diff --git a/toontown/coghq/DistributedLawOfficeFloorAI.py b/toontown/coghq/DistributedLawOfficeFloorAI.py index 6e2047b..dd2d545 100644 --- a/toontown/coghq/DistributedLawOfficeFloorAI.py +++ b/toontown/coghq/DistributedLawOfficeFloorAI.py @@ -1,15 +1,17 @@ +from otp.level import DistributedLevelAI from direct.directnotify import DirectNotifyGlobal -from direct.distributed import DistributedObjectAI +from toontown.coghq import LevelSuitPlannerAI, LawOfficeBase 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.coghq import FactoryEntityCreatorAI, FactorySpecs +from otp.level import LevelSpec +from toontown.coghq import CogDisguiseGlobals from toontown.suit import DistributedFactorySuitAI -from toontown.toonbase import ToontownBattleGlobals, ToontownGlobals - +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 toontown.ai.ToonBarrier import * class DistributedLawOfficeFloorAI(DistributedLevelAI.DistributedLevelAI, LawOfficeBase.LawOfficeBase): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedLawOfficeAI') diff --git a/toontown/coghq/DistributedLawbotBossGavel.py b/toontown/coghq/DistributedLawbotBossGavel.py index fe47e31..cb55874 100644 --- a/toontown/coghq/DistributedLawbotBossGavel.py +++ b/toontown/coghq/DistributedLawbotBossGavel.py @@ -1,19 +1,15 @@ +from direct.gui.DirectGui import * from panda3d.core import * - -from direct.actor import Actor -from direct.distributed import DistributedObject +from direct.interval.IntervalGlobal import * from direct.distributed.ClockDelta import * from direct.fsm import FSM -from direct.gui.DirectGui import * -from direct.interval.IntervalGlobal import * -from direct.showbase import PythonUtil +from direct.distributed import DistributedObject from direct.showutil import Rope +from direct.showbase import PythonUtil from direct.task import Task - -from otp.otpbase import OTPGlobals - from toontown.toonbase import ToontownGlobals - +from otp.otpbase import OTPGlobals +from direct.actor import Actor class DistributedLawbotBossGavel(DistributedObject.DistributedObject, FSM.FSM): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedLawbotBossGavel') diff --git a/toontown/coghq/DistributedLawbotBossGavelAI.py b/toontown/coghq/DistributedLawbotBossGavelAI.py index 22ba371..a84587f 100644 --- a/toontown/coghq/DistributedLawbotBossGavelAI.py +++ b/toontown/coghq/DistributedLawbotBossGavelAI.py @@ -1,13 +1,9 @@ -from panda3d.core import * - from direct.directnotify import DirectNotifyGlobal +from panda3d.core import * from direct.distributed import DistributedObjectAI -from direct.fsm import FSM - -from otp.otpbase import OTPGlobals - from toontown.toonbase import ToontownGlobals - +from otp.otpbase import OTPGlobals +from direct.fsm import FSM class DistributedLawbotBossGavelAI(DistributedObjectAI.DistributedObjectAI, FSM.FSM): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedLawbotBossGavelAI') diff --git a/toontown/coghq/DistributedLawbotCannon.py b/toontown/coghq/DistributedLawbotCannon.py index 6e4f9de..557b7e0 100644 --- a/toontown/coghq/DistributedLawbotCannon.py +++ b/toontown/coghq/DistributedLawbotCannon.py @@ -1,20 +1,20 @@ -from panda3d.core import * -from panda3d.core import CollisionNode, CollisionSphere -from panda3d.otp import * - -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.distributed.ClockDelta import * from direct.task.Task import Task - -from toontown.effects import DustCloud -from toontown.estate import CannonGlobals, DistributedCannon +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.otp import * +from toontown.toon import NPCToons +from toontown.toon import ToonHead +from toontown.toonbase import TTLocalizer from toontown.minigame import Trajectory -from toontown.toon import NPCToons, ToonHead -from toontown.toonbase import ToontownGlobals, TTLocalizer - +from toontown.effects import DustCloud 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 00af95e..f841f6b 100644 --- a/toontown/coghq/DistributedLawbotCannonAI.py +++ b/toontown/coghq/DistributedLawbotCannonAI.py @@ -1,9 +1,9 @@ -from direct.distributed import DistributedObjectAI from direct.distributed.ClockDelta import * - -from toontown.estate import CannonGlobals, DistributedCannonAI -from toontown.minigame import CannonGameGlobals, Trajectory - +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 class DistributedLawbotCannonAI(DistributedObjectAI.DistributedObjectAI): notify = directNotify.newCategory('DistributedLawbotCannonAI') diff --git a/toontown/coghq/DistributedLawbotChair.py b/toontown/coghq/DistributedLawbotChair.py index 2f1c6ba..64659a1 100644 --- a/toontown/coghq/DistributedLawbotChair.py +++ b/toontown/coghq/DistributedLawbotChair.py @@ -1,24 +1,20 @@ -import random - +from direct.gui.DirectGui import * from panda3d.core import * - -from direct.actor import Actor -from direct.distributed import DistributedObject +from direct.interval.IntervalGlobal import * from direct.distributed.ClockDelta import * from direct.fsm import FSM -from direct.gui.DirectGui import * -from direct.interval.IntervalGlobal import * -from direct.showbase import PythonUtil +from direct.distributed import DistributedObject from direct.showutil import Rope +from direct.showbase import PythonUtil from direct.task import Task - -from otp.otpbase import OTPGlobals - -from toontown.battle import BattleProps -from toontown.suit import Suit, SuitDNA -from toontown.toon import NPCToons 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.toon import NPCToons class DistributedLawbotChair(DistributedObject.DistributedObject, FSM.FSM): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedLawbotChair') diff --git a/toontown/coghq/DistributedLawbotChairAI.py b/toontown/coghq/DistributedLawbotChairAI.py index eb92411..64b670e 100644 --- a/toontown/coghq/DistributedLawbotChairAI.py +++ b/toontown/coghq/DistributedLawbotChairAI.py @@ -1,15 +1,10 @@ -import random - -from panda3d.core import * - from direct.directnotify import DirectNotifyGlobal +from panda3d.core import * from direct.distributed import DistributedObjectAI -from direct.fsm import FSM - -from otp.otpbase import OTPGlobals - from toontown.toonbase import ToontownGlobals - +from otp.otpbase import OTPGlobals +from direct.fsm import FSM +import random class DistributedLawbotChairAI(DistributedObjectAI.DistributedObjectAI, FSM.FSM): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedLawbotChairAI') diff --git a/toontown/coghq/DistributedLevelBattle.py b/toontown/coghq/DistributedLevelBattle.py index 22e2d57..e9e99b2 100644 --- a/toontown/coghq/DistributedLevelBattle.py +++ b/toontown/coghq/DistributedLevelBattle.py @@ -1,21 +1,18 @@ -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 DistributedBattle, SuitBattleGlobals from toontown.battle.BattleBase import * -from toontown.suit import SuitDNA +from toontown.battle import DistributedBattle +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 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 61b6d8b..61ec40d 100644 --- a/toontown/coghq/DistributedLevelBattleAI.py +++ b/toontown/coghq/DistributedLevelBattleAI.py @@ -1,12 +1,11 @@ +from toontown.battle import DistributedBattleAI +from toontown.battle import DistributedBattleBaseAI from direct.directnotify import DirectNotifyGlobal -from direct.fsm import ClassicFSM, State -from direct.showbase.PythonUtil import addListsByValue - -from toontown.battle import DistributedBattleAI, DistributedBattleBaseAI +from direct.fsm import State +from direct.fsm import ClassicFSM from toontown.battle.BattleBase import * - from . import CogDisguiseGlobals - +from direct.showbase.PythonUtil import addListsByValue class DistributedLevelBattleAI(DistributedBattleAI.DistributedBattleAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedLevelBattleAI') diff --git a/toontown/coghq/DistributedLift.py b/toontown/coghq/DistributedLift.py index 5f149ee..8103d97 100644 --- a/toontown/coghq/DistributedLift.py +++ b/toontown/coghq/DistributedLift.py @@ -1,14 +1,12 @@ 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 otp.level import BasicEntities - -from . import LiftConstants, MovingPlatform - +from direct.directnotify import DirectNotifyGlobal +from direct.fsm import ClassicFSM, State +from direct.fsm import State +from . import LiftConstants +from . import MovingPlatform class DistributedLift(BasicEntities.DistributedNodePathEntity): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedLift') diff --git a/toontown/coghq/DistributedLiftAI.py b/toontown/coghq/DistributedLiftAI.py index 6fa456b..52b6a67 100644 --- a/toontown/coghq/DistributedLiftAI.py +++ b/toontown/coghq/DistributedLiftAI.py @@ -1,13 +1,11 @@ -from direct.directnotify import DirectNotifyGlobal from direct.distributed.ClockDelta import * -from direct.fsm import ClassicFSM, State -from direct.task import Task - from otp.level import DistributedEntityAI - +from direct.directnotify import DirectNotifyGlobal +from direct.task import Task +from direct.fsm import ClassicFSM, State +from direct.fsm import State 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 57c56c1..0cb828b 100644 --- a/toontown/coghq/DistributedMaze.py +++ b/toontown/coghq/DistributedMaze.py @@ -1,20 +1,17 @@ -import random - +from otp.level.BasicEntities import DistributedNodePathEntity from panda3d.core import * - +from direct.interval.IntervalGlobal import * +from toontown.toonbase.ToontownGlobals import * +import random 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.toonbase import ToontownGlobals, ToontownTimer, TTLocalizer -from toontown.toonbase.ToontownGlobals import * - 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 class DistributedMaze(DistributedNodePathEntity): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedMaze') diff --git a/toontown/coghq/DistributedMazeAI.py b/toontown/coghq/DistributedMazeAI.py index 2783075..d1e405d 100644 --- a/toontown/coghq/DistributedMazeAI.py +++ b/toontown/coghq/DistributedMazeAI.py @@ -1,12 +1,9 @@ +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 4f8d3d4..43f1910 100644 --- a/toontown/coghq/DistributedMint.py +++ b/toontown/coghq/DistributedMint.py @@ -1,16 +1,12 @@ from panda3d.core import * - -from direct.directnotify import DirectNotifyGlobal -from direct.distributed import DistributedObject 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.coghq import DistributedMintRoom, MintLayout, MintRoom -from toontown.toonbase import TTLocalizer from toontown.toonbase.ToontownGlobals import * - +from toontown.toonbase import TTLocalizer +from toontown.coghq import DistributedMintRoom, MintLayout, MintRoom class DistributedMint(DistributedObject.DistributedObject): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedMint') diff --git a/toontown/coghq/DistributedMintAI.py b/toontown/coghq/DistributedMintAI.py index a1b900e..5aa6f3f 100644 --- a/toontown/coghq/DistributedMintAI.py +++ b/toontown/coghq/DistributedMintAI.py @@ -1,11 +1,9 @@ -from direct.directnotify import DirectNotifyGlobal from direct.distributed import DistributedObjectAI - from otp.level import DistributedLevelAI - -from toontown.coghq import BattleExperienceAggregatorAI, DistributedMintRoomAI, MintLayout +from direct.directnotify import DirectNotifyGlobal 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 b0a2851..23731b0 100644 --- a/toontown/coghq/DistributedMintBattle.py +++ b/toontown/coghq/DistributedMintBattle.py @@ -1,22 +1,18 @@ -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 toontown.suit import SuitDNA +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.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 17b173e..9392f8f 100644 --- a/toontown/coghq/DistributedMintBattleAI.py +++ b/toontown/coghq/DistributedMintBattleAI.py @@ -1,14 +1,12 @@ -from direct.directnotify import DirectNotifyGlobal -from direct.fsm import ClassicFSM, State -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 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 class DistributedMintBattleAI(DistributedLevelBattleAI.DistributedLevelBattleAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedMintBattleAI') diff --git a/toontown/coghq/DistributedMintElevatorExt.py b/toontown/coghq/DistributedMintElevatorExt.py index 546f3e3..572fa1d 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 ToontownGlobals, TTLocalizer +from toontown.toonbase import 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 3827863..12d0090 100644 --- a/toontown/coghq/DistributedMintElevatorExtAI.py +++ b/toontown/coghq/DistributedMintElevatorExtAI.py @@ -1,16 +1,13 @@ -from direct.distributed.ClockDelta import * -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 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.task import Task 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 1fb469a..39b5526 100644 --- a/toontown/coghq/DistributedMintRoom.py +++ b/toontown/coghq/DistributedMintRoom.py @@ -1,18 +1,15 @@ -import random - from panda3d.core import * - -from direct.directnotify import DirectNotifyGlobal +from toontown.toonbase.ToontownGlobals import * from direct.distributed.ClockDelta import * from direct.interval.IntervalGlobal import * - -from otp.level import DistributedLevel, LevelConstants, LevelSpec - +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 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 3fb28cd..d0f3130 100644 --- a/toontown/coghq/DistributedMintRoomAI.py +++ b/toontown/coghq/DistributedMintRoomAI.py @@ -1,13 +1,12 @@ +from otp.level import DistributedLevelAI, LevelSpec from direct.directnotify import DirectNotifyGlobal from direct.task import Task - -from otp.level import DistributedLevelAI, LevelSpec - -from toontown.coghq import (DistributedMintBattleAI, FactoryEntityCreatorAI, LevelSuitPlannerAI, MintRoomBase, - MintRoomSpecs) +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 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 e296f53..fbe352a 100644 --- a/toontown/coghq/DistributedMoleField.py +++ b/toontown/coghq/DistributedMoleField.py @@ -1,20 +1,18 @@ -import random - 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 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 toontown.toonbase import ToontownGlobals, ToontownTimer, TTLocalizer - +from direct.interval.IntervalGlobal import * +from toontown.battle import MovieUtil class DistributedMoleField(DistributedNodePathEntity, MoleFieldBase.MoleFieldBase): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedMoleField') diff --git a/toontown/coghq/DistributedMoleFieldAI.py b/toontown/coghq/DistributedMoleFieldAI.py index 42b6097..6eb2ca2 100644 --- a/toontown/coghq/DistributedMoleFieldAI.py +++ b/toontown/coghq/DistributedMoleFieldAI.py @@ -1,10 +1,7 @@ -from direct.directnotify import DirectNotifyGlobal -from direct.distributed.ClockDelta import globalClockDelta - from otp.level import DistributedEntityAI - from toontown.coghq import MoleFieldBase - +from direct.distributed.ClockDelta import globalClockDelta +from direct.directnotify import DirectNotifyGlobal class DistributedMoleFieldAI(DistributedEntityAI.DistributedEntityAI, MoleFieldBase.MoleFieldBase): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedMoleFieldAI') diff --git a/toontown/coghq/DistributedMover.py b/toontown/coghq/DistributedMover.py index 3892061..ffe089e 100644 --- a/toontown/coghq/DistributedMover.py +++ b/toontown/coghq/DistributedMover.py @@ -1,24 +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 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 d83d059..27aa5b7 100644 --- a/toontown/coghq/DistributedMoverAI.py +++ b/toontown/coghq/DistributedMoverAI.py @@ -1,15 +1,15 @@ -import random - +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.ai.AIBase import * -from otp.level import BasicEntities, DistributedEntityAI - -from toontown.coghq import BattleBlockerAI, LaserGameMineSweeper, LaserGameRoll - +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 class DistributedMoverAI(DistributedEntityAI.DistributedEntityAI, NodePath, BasicEntities.NodePathAttribs): diff --git a/toontown/coghq/DistributedSecurityCamera.py b/toontown/coghq/DistributedSecurityCamera.py index 15a3e8b..8f0ee4a 100644 --- a/toontown/coghq/DistributedSecurityCamera.py +++ b/toontown/coghq/DistributedSecurityCamera.py @@ -1,24 +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 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 15554c4..b616b28 100644 --- a/toontown/coghq/DistributedSecurityCameraAI.py +++ b/toontown/coghq/DistributedSecurityCameraAI.py @@ -1,15 +1,15 @@ -import random - +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.ai.AIBase import * -from otp.level import BasicEntities, DistributedEntityAI - -from toontown.coghq import BattleBlockerAI, LaserGameMineSweeper, LaserGameRoll - +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 class DistributedSecurityCameraAI(DistributedEntityAI.DistributedEntityAI, NodePath, BasicEntities.NodePathAttribs): diff --git a/toontown/coghq/DistributedSellbotHQDoor.py b/toontown/coghq/DistributedSellbotHQDoor.py index 2511ff5..158497b 100644 --- a/toontown/coghq/DistributedSellbotHQDoor.py +++ b/toontown/coghq/DistributedSellbotHQDoor.py @@ -1,11 +1,8 @@ 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 a1e1e1e..991c7c1 100644 --- a/toontown/coghq/DistributedSellbotHQDoorAI.py +++ b/toontown/coghq/DistributedSellbotHQDoorAI.py @@ -1,13 +1,10 @@ from direct.directnotify import DirectNotifyGlobal - -from otp.otpbase import OTPGlobals - -from toontown.building import DoorTypes, FADoorCodes from toontown.coghq import DistributedCogHQDoorAI -from toontown.toonbase import ToontownAccessAI, ToontownGlobals - +from toontown.building import FADoorCodes, DoorTypes +from toontown.toonbase import ToontownGlobals +from toontown.toonbase import ToontownAccessAI from . import CogDisguiseGlobals - +from otp.otpbase import OTPGlobals class DistributedSellbotHQDoorAI(DistributedCogHQDoorAI.DistributedCogHQDoorAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedSellbotHQDoorAI') diff --git a/toontown/coghq/DistributedSinkingPlatform.py b/toontown/coghq/DistributedSinkingPlatform.py index d0f4a32..ea3b6f5 100644 --- a/toontown/coghq/DistributedSinkingPlatform.py +++ b/toontown/coghq/DistributedSinkingPlatform.py @@ -1,15 +1,13 @@ 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.fsm import ClassicFSM, State +from direct.fsm import State from otp.level import BasicEntities - -from . import MovingPlatform, SinkingPlatformGlobals - +from . import MovingPlatform +from direct.distributed import DistributedObject +from . import SinkingPlatformGlobals +from direct.directnotify import DirectNotifyGlobal class DistributedSinkingPlatform(BasicEntities.DistributedNodePathEntity): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedSinkingPlatform') diff --git a/toontown/coghq/DistributedSinkingPlatformAI.py b/toontown/coghq/DistributedSinkingPlatformAI.py index 9d613cd..a2da2a6 100644 --- a/toontown/coghq/DistributedSinkingPlatformAI.py +++ b/toontown/coghq/DistributedSinkingPlatformAI.py @@ -1,11 +1,8 @@ -from direct.directnotify import DirectNotifyGlobal - from otp.ai.AIBase import * +from direct.directnotify import DirectNotifyGlobal 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 a177259..1e8fc16 100644 --- a/toontown/coghq/DistributedStage.py +++ b/toontown/coghq/DistributedStage.py @@ -1,21 +1,17 @@ -import random - 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.distributed import DistributedObject +from direct.directnotify import DirectNotifyGlobal 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 * - +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 direct.interval.IntervalGlobal import * class DistributedStage(DistributedObject.DistributedObject): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedStage') diff --git a/toontown/coghq/DistributedStageAI.py b/toontown/coghq/DistributedStageAI.py index 1607441..f6ffd71 100644 --- a/toontown/coghq/DistributedStageAI.py +++ b/toontown/coghq/DistributedStageAI.py @@ -1,14 +1,11 @@ -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 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 * class DistributedStageAI(DistributedObjectAI.DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedStageAI') diff --git a/toontown/coghq/DistributedStageBattle.py b/toontown/coghq/DistributedStageBattle.py index fa7e848..fdd7216 100644 --- a/toontown/coghq/DistributedStageBattle.py +++ b/toontown/coghq/DistributedStageBattle.py @@ -1,22 +1,18 @@ -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 toontown.suit import SuitDNA +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.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 c37356a..fa9849d 100644 --- a/toontown/coghq/DistributedStageBattleAI.py +++ b/toontown/coghq/DistributedStageBattleAI.py @@ -1,16 +1,13 @@ -from direct.directnotify import DirectNotifyGlobal -from direct.fsm import ClassicFSM, State -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 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 class DistributedStageBattleAI(DistributedLevelBattleAI.DistributedLevelBattleAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedStageBattleAI') diff --git a/toontown/coghq/DistributedStageRoom.py b/toontown/coghq/DistributedStageRoom.py index cb848af..e4b6086 100644 --- a/toontown/coghq/DistributedStageRoom.py +++ b/toontown/coghq/DistributedStageRoom.py @@ -1,18 +1,15 @@ -import random - from panda3d.core import * - -from direct.directnotify import DirectNotifyGlobal +from toontown.toonbase.ToontownGlobals import * from direct.distributed.ClockDelta import * from direct.interval.IntervalGlobal import * - -from otp.level import DistributedLevel, LevelConstants, LevelSpec - +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 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 e437794..05dd64b 100644 --- a/toontown/coghq/DistributedStageRoomAI.py +++ b/toontown/coghq/DistributedStageRoomAI.py @@ -1,13 +1,12 @@ +from otp.level import DistributedLevelAI, LevelSpec from direct.directnotify import DirectNotifyGlobal from direct.task import Task - -from otp.level import DistributedLevelAI, LevelSpec - -from toontown.coghq import (DistributedStageBattleAI, FactoryEntityCreatorAI, LevelSuitPlannerAI, StageRoomBase, - StageRoomSpecs) +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 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 31fcc48..e2af9ea 100644 --- a/toontown/coghq/DistributedStomper.py +++ b/toontown/coghq/DistributedStomper.py @@ -1,18 +1,14 @@ -import math - 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 * - +from direct.distributed import ClockDelta +from direct.showbase.PythonUtil import lerp +import math +from . import DistributedCrusherEntity +from . import MovingPlatform +from direct.directnotify import DirectNotifyGlobal +from direct.task import Task +from toontown.toonbase import ToontownGlobals class DistributedStomper(DistributedCrusherEntity.DistributedCrusherEntity): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedStomper') diff --git a/toontown/coghq/DistributedStomperAI.py b/toontown/coghq/DistributedStomperAI.py index 31851ab..456fd24 100644 --- a/toontown/coghq/DistributedStomperAI.py +++ b/toontown/coghq/DistributedStomperAI.py @@ -1,11 +1,8 @@ -from direct.directnotify import DirectNotifyGlobal -from direct.distributed import ClockDelta -from direct.interval.IntervalGlobal import * - from otp.ai.AIBase import * - +from direct.interval.IntervalGlobal import * +from direct.directnotify import DirectNotifyGlobal from . import DistributedCrusherEntityAI, StomperGlobals - +from direct.distributed import ClockDelta class DistributedStomperAI(DistributedCrusherEntityAI.DistributedCrusherEntityAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedStomperAI') diff --git a/toontown/coghq/DistributedStomperPair.py b/toontown/coghq/DistributedStomperPair.py index e1291f0..a3b7897 100644 --- a/toontown/coghq/DistributedStomperPair.py +++ b/toontown/coghq/DistributedStomperPair.py @@ -1,14 +1,9 @@ -import math - from panda3d.core import * - -from direct.directnotify import DirectNotifyGlobal from direct.interval.IntervalGlobal import * - -from otp.level import BasicEntities - +import math from . import StomperGlobals - +from direct.directnotify import DirectNotifyGlobal +from otp.level import BasicEntities class DistributedStomperPair(BasicEntities.DistributedNodePathEntity): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedStomperPair') diff --git a/toontown/coghq/DistributedStomperPairAI.py b/toontown/coghq/DistributedStomperPairAI.py index 655e39c..9e9b916 100644 --- a/toontown/coghq/DistributedStomperPairAI.py +++ b/toontown/coghq/DistributedStomperPairAI.py @@ -1,11 +1,8 @@ -from direct.directnotify import DirectNotifyGlobal -from direct.distributed import ClockDelta - from otp.ai.AIBase import * +from direct.directnotify import DirectNotifyGlobal from otp.level import DistributedEntityAI - from . import StomperGlobals - +from direct.distributed import ClockDelta class DistributedStomperPairAI(DistributedEntityAI.DistributedEntityAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedStomperAI') diff --git a/toontown/coghq/DistributedSwitch.py b/toontown/coghq/DistributedSwitch.py index d8ad749..5539f0a 100644 --- a/toontown/coghq/DistributedSwitch.py +++ b/toontown/coghq/DistributedSwitch.py @@ -1,16 +1,14 @@ from panda3d.core import * - -from direct.directnotify import DirectNotifyGlobal -from direct.distributed.ClockDelta import * -from direct.fsm import ClassicFSM, State +from panda3d.core import * from direct.interval.IntervalGlobal import * - -from otp.level import BasicEntities, DistributedEntity - +from direct.distributed.ClockDelta import * +from otp.level import BasicEntities +from . import DistributedSwitchBase +from . import MovingPlatform from toontown.toonbase import ToontownGlobals - -from . import DistributedSwitchBase, MovingPlatform - +from direct.directnotify import DirectNotifyGlobal +from direct.fsm import ClassicFSM, State +from otp.level import DistributedEntity class DistributedSwitch(DistributedSwitchBase.DistributedSwitchBase, BasicEntities.DistributedNodePathEntity): diff --git a/toontown/coghq/DistributedSwitchAI.py b/toontown/coghq/DistributedSwitchAI.py index c5d5d4e..f9c637f 100644 --- a/toontown/coghq/DistributedSwitchAI.py +++ b/toontown/coghq/DistributedSwitchAI.py @@ -1,12 +1,10 @@ -from direct.directnotify import DirectNotifyGlobal from direct.distributed.ClockDelta import * -from direct.fsm import ClassicFSM, State -from direct.task import Task - -from otp.level import DistributedEntityAI - +from direct.directnotify import DirectNotifyGlobal from . import DistributedSwitchBase - +from direct.task import Task +from direct.fsm import ClassicFSM, State +from direct.fsm import State +from otp.level import DistributedEntityAI class DistributedSwitchAI(DistributedSwitchBase.DistributedSwitchBase, DistributedEntityAI.DistributedEntityAI): diff --git a/toontown/coghq/DistributedTrigger.py b/toontown/coghq/DistributedTrigger.py index 64e78ea..9dc01d4 100644 --- a/toontown/coghq/DistributedTrigger.py +++ b/toontown/coghq/DistributedTrigger.py @@ -1,14 +1,13 @@ from panda3d.core import * - -from direct.directnotify import DirectNotifyGlobal -from direct.distributed.ClockDelta import * -from direct.fsm import ClassicFSM +from panda3d.core import * from direct.interval.IntervalGlobal import * - -from toontown.toonbase import ToontownGlobals, TTLocalizer - -from . import DistributedSwitch, MovingPlatform - +from direct.distributed.ClockDelta import * +from . import MovingPlatform +from toontown.toonbase import ToontownGlobals +from direct.directnotify import DirectNotifyGlobal +from direct.fsm import ClassicFSM +from . import DistributedSwitch +from toontown.toonbase import TTLocalizer class DistributedTrigger(DistributedSwitch.DistributedSwitch): diff --git a/toontown/coghq/DistributedTriggerAI.py b/toontown/coghq/DistributedTriggerAI.py index 67335b3..e523689 100644 --- a/toontown/coghq/DistributedTriggerAI.py +++ b/toontown/coghq/DistributedTriggerAI.py @@ -1,8 +1,6 @@ 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 64fa998..52fae8b 100644 --- a/toontown/coghq/FactoryBase.py +++ b/toontown/coghq/FactoryBase.py @@ -1,9 +1,6 @@ -from otp.level import LevelSpec - -from toontown.toonbase import ToontownGlobals - from . import FactorySpecs - +from otp.level import LevelSpec +from toontown.toonbase import ToontownGlobals class FactoryBase: @@ -24,8 +21,7 @@ class FactoryBase: if __dev__: def getEntityTypeReg(self): - from otp.level import EntityTypeRegistry - from . import FactoryEntityTypes + from otp.level import EntityTypeRegistry typeReg = EntityTypeRegistry.EntityTypeRegistry(FactoryEntityTypes) return typeReg diff --git a/toontown/coghq/FactoryCameraViews.py b/toontown/coghq/FactoryCameraViews.py index f2b494c..648fccb 100644 --- a/toontown/coghq/FactoryCameraViews.py +++ b/toontown/coghq/FactoryCameraViews.py @@ -1,10 +1,7 @@ from panda3d.core import * - -from direct.directnotify import DirectNotifyGlobal from direct.showbase.PythonUtil import Functor - from toontown.toonbase import ToontownGlobals - +from direct.directnotify import DirectNotifyGlobal class FactoryCameraViews: notify = DirectNotifyGlobal.directNotify.newCategory('FactoryCameraViews') diff --git a/toontown/coghq/FactoryEntityCreator.py b/toontown/coghq/FactoryEntityCreator.py index 1dc900f..e97a2cd 100644 --- a/toontown/coghq/FactoryEntityCreator.py +++ b/toontown/coghq/FactoryEntityCreator.py @@ -1,8 +1,15 @@ from otp.level import EntityCreator - -from . import (ConveyorBelt, FactoryLevelMgr, GearEntity, GoonClipPlane, MintProduct, MintProductPallet, MintShelf, - PaintMixer, PathMasterEntity, PlatformEntity, RenderingEntity) - +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 class FactoryEntityCreator(EntityCreator.EntityCreator): diff --git a/toontown/coghq/FactoryEntityCreatorAI.py b/toontown/coghq/FactoryEntityCreatorAI.py index 5e29c68..6804aea 100644 --- a/toontown/coghq/FactoryEntityCreatorAI.py +++ b/toontown/coghq/FactoryEntityCreatorAI.py @@ -1,17 +1,11 @@ -from direct.showbase.PythonUtil import Functor - 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) - +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 class FactoryEntityCreatorAI(EntityCreatorAI.EntityCreatorAI): diff --git a/toontown/coghq/FactoryEntityTypes.py b/toontown/coghq/FactoryEntityTypes.py index 23f5ec4..87494f9 100644 --- a/toontown/coghq/FactoryEntityTypes.py +++ b/toontown/coghq/FactoryEntityTypes.py @@ -1,6 +1,5 @@ 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 beb4bad..f0fbedc 100644 --- a/toontown/coghq/FactoryExterior.py +++ b/toontown/coghq/FactoryExterior.py @@ -1,18 +1,15 @@ +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 76b013d..9c06c86 100644 --- a/toontown/coghq/FactoryInterior.py +++ b/toontown/coghq/FactoryInterior.py @@ -1,18 +1,17 @@ +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.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.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.building import Elevator class FactoryInterior(BattlePlace.BattlePlace): notify = DirectNotifyGlobal.directNotify.newCategory('FactoryInterior') diff --git a/toontown/coghq/FactoryLevelMgr.py b/toontown/coghq/FactoryLevelMgr.py index f5eb9e9..3ec7ad4 100644 --- a/toontown/coghq/FactoryLevelMgr.py +++ b/toontown/coghq/FactoryLevelMgr.py @@ -1,11 +1,7 @@ -from direct.showbase.PythonUtil import Functor - from otp.level import LevelMgr - -from toontown.toonbase import ToontownGlobals - from . import FactoryUtil - +from direct.showbase.PythonUtil import Functor +from toontown.toonbase import ToontownGlobals class FactoryLevelMgr(LevelMgr.LevelMgr): InterestingLocations = [(((-866, -272, -40), -101), diff --git a/toontown/coghq/FactoryLevelMgrAI.py b/toontown/coghq/FactoryLevelMgrAI.py index 38ce4b1..04eebfa 100644 --- a/toontown/coghq/FactoryLevelMgrAI.py +++ b/toontown/coghq/FactoryLevelMgrAI.py @@ -1,6 +1,5 @@ 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 b5627ae..9281a5f 100644 --- a/toontown/coghq/FactoryManagerAI.py +++ b/toontown/coghq/FactoryManagerAI.py @@ -1,10 +1,7 @@ from direct.directnotify import DirectNotifyGlobal -from direct.showbase import DirectObject - -from toontown.toonbase import ToontownGlobals - from . import DistributedFactoryAI - +from toontown.toonbase import ToontownGlobals +from direct.showbase import DirectObject class FactoryManagerAI(DirectObject.DirectObject): notify = DirectNotifyGlobal.directNotify.newCategory('FactoryManagerAI') diff --git a/toontown/coghq/FactoryMockupCogs.py b/toontown/coghq/FactoryMockupCogs.py index 5fd3723..aee992c 100644 --- a/toontown/coghq/FactoryMockupCogs.py +++ b/toontown/coghq/FactoryMockupCogs.py @@ -1,5 +1,4 @@ from .SpecImports import * - BattleCells = {} CogData = [] ReserveCogData = [] diff --git a/toontown/coghq/FactoryMockupSpec.py b/toontown/coghq/FactoryMockupSpec.py index 38c9f23..a5b5795 100644 --- a/toontown/coghq/FactoryMockupSpec.py +++ b/toontown/coghq/FactoryMockupSpec.py @@ -1,5 +1,4 @@ from .SpecImports import * - GlobalEntities = {1000: {'type': 'levelMgr', 'name': 'LevelMgr', 'comment': '', diff --git a/toontown/coghq/FactorySpecs.py b/toontown/coghq/FactorySpecs.py index 02d9ba2..7b2a5be 100644 --- a/toontown/coghq/FactorySpecs.py +++ b/toontown/coghq/FactorySpecs.py @@ -1,7 +1,8 @@ from toontown.toonbase import ToontownGlobals - -from . import LawbotLegFactoryCogs, LawbotLegFactorySpec, SellbotLegFactoryCogs, SellbotLegFactorySpec - +from . import SellbotLegFactorySpec +from . import SellbotLegFactoryCogs +from . import LawbotLegFactorySpec +from . import LawbotLegFactoryCogs def getFactorySpecModule(factoryId): return FactorySpecModules[factoryId] diff --git a/toontown/coghq/FactoryUtil.py b/toontown/coghq/FactoryUtil.py index 92d9313..9ae171f 100644 --- a/toontown/coghq/FactoryUtil.py +++ b/toontown/coghq/FactoryUtil.py @@ -1,14 +1,11 @@ from panda3d.core import * - -from direct.interval.IntervalGlobal import * from direct.showbase import DirectObject -from direct.task.Task import Task - -from toontown.suit import Suit, SuitDNA +from direct.interval.IntervalGlobal import * from toontown.toonbase import ToontownGlobals - from . import MovingPlatform - +from direct.task.Task import Task +from toontown.suit import Suit +from toontown.suit import SuitDNA class Ouch(DirectObject.DirectObject): diff --git a/toontown/coghq/GameSprite3D.py b/toontown/coghq/GameSprite3D.py index 6be7088..5afca16 100644 --- a/toontown/coghq/GameSprite3D.py +++ b/toontown/coghq/GameSprite3D.py @@ -1,11 +1,8 @@ +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 09af2c6..175b21c 100644 --- a/toontown/coghq/GearEntity.py +++ b/toontown/coghq/GearEntity.py @@ -1,11 +1,7 @@ -from panda3d.core import Vec3 - from direct.interval.IntervalGlobal import * - from otp.level import BasicEntities - from . import MovingPlatform - +from panda3d.core import Vec3 class GearEntity(BasicEntities.NodePathEntity): ModelPaths = {'factory': 'phase_9/models/cogHQ/FactoryGearB', diff --git a/toontown/coghq/GoonClipPlane.py b/toontown/coghq/GoonClipPlane.py index ebd8b44..31bfb0a 100644 --- a/toontown/coghq/GoonClipPlane.py +++ b/toontown/coghq/GoonClipPlane.py @@ -1,10 +1,7 @@ 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 5ea5467..082e3a3 100644 --- a/toontown/coghq/InGameEditor.py +++ b/toontown/coghq/InGameEditor.py @@ -1,25 +1,22 @@ +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 -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 direct.tkwidgets import Valuator +from direct.tkwidgets import VectorWidgets from otp.level import LevelConstants - +from direct.directtools import DirectSession +import Pmw class InGameEditor(AppShell): appname = 'In-Game Editor' diff --git a/toontown/coghq/InGameEditorDCImports.py b/toontown/coghq/InGameEditorDCImports.py index 9e6d33a..86b4eb3 100644 --- a/toontown/coghq/InGameEditorDCImports.py +++ b/toontown/coghq/InGameEditorDCImports.py @@ -1,4 +1,3 @@ if __dev__: from direct.directutil import DistributedLargeBlobSender - from . import DistributedInGameEditor diff --git a/toontown/coghq/InGameEditorDCImportsAI.py b/toontown/coghq/InGameEditorDCImportsAI.py index ce2d826..6368bcf 100644 --- a/toontown/coghq/InGameEditorDCImportsAI.py +++ b/toontown/coghq/InGameEditorDCImportsAI.py @@ -1,4 +1,3 @@ if __dev__: from direct.directutil import DistributedLargeBlobSenderAI - from . import DistributedInGameEditorAI diff --git a/toontown/coghq/InGameEditorElements.py b/toontown/coghq/InGameEditorElements.py index ac70392..73cba9f 100644 --- a/toontown/coghq/InGameEditorElements.py +++ b/toontown/coghq/InGameEditorElements.py @@ -1,6 +1,5 @@ from direct.showbase import DirectObject - class InGameEditorElement(DirectObject.DirectObject): elementId = 0 diff --git a/toontown/coghq/LaserGameAvoid.py b/toontown/coghq/LaserGameAvoid.py index 390e774..311f284 100644 --- a/toontown/coghq/LaserGameAvoid.py +++ b/toontown/coghq/LaserGameAvoid.py @@ -1,10 +1,7 @@ -import random - +from toontown.coghq import LaserGameBase from direct.distributed import ClockDelta from direct.task import Task - -from toontown.coghq import LaserGameBase - +import random class LaserGameAvoid(LaserGameBase.LaserGameBase): diff --git a/toontown/coghq/LaserGameBase.py b/toontown/coghq/LaserGameBase.py index 35b906b..add716d 100644 --- a/toontown/coghq/LaserGameBase.py +++ b/toontown/coghq/LaserGameBase.py @@ -1,8 +1,6 @@ -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 7887c9e..35fffe4 100644 --- a/toontown/coghq/LaserGameDrag.py +++ b/toontown/coghq/LaserGameDrag.py @@ -1,10 +1,7 @@ -import random - +from toontown.coghq import LaserGameBase from direct.distributed import ClockDelta from direct.task import Task - -from toontown.coghq import LaserGameBase - +import random class LaserGameDrag(LaserGameBase.LaserGameBase): diff --git a/toontown/coghq/LaserGameMineSweeper.py b/toontown/coghq/LaserGameMineSweeper.py index c9d3e0f..2f688b0 100644 --- a/toontown/coghq/LaserGameMineSweeper.py +++ b/toontown/coghq/LaserGameMineSweeper.py @@ -1,10 +1,7 @@ -import random - +from toontown.coghq import LaserGameBase from direct.distributed import ClockDelta from direct.task import Task - -from toontown.coghq import LaserGameBase - +import random class LaserGameMineSweeper(LaserGameBase.LaserGameBase): diff --git a/toontown/coghq/LaserGameRoll.py b/toontown/coghq/LaserGameRoll.py index 762a00d..6592d06 100644 --- a/toontown/coghq/LaserGameRoll.py +++ b/toontown/coghq/LaserGameRoll.py @@ -1,10 +1,7 @@ -import random - +from toontown.coghq import LaserGameBase from direct.distributed import ClockDelta from direct.task import Task - -from toontown.coghq import LaserGameBase - +import random class LaserGameRoll(LaserGameBase.LaserGameBase): diff --git a/toontown/coghq/LawOfficeBase.py b/toontown/coghq/LawOfficeBase.py index 8f2e973..6ec851c 100644 --- a/toontown/coghq/LawOfficeBase.py +++ b/toontown/coghq/LawOfficeBase.py @@ -1,9 +1,6 @@ -from otp.level import LevelSpec - -from toontown.toonbase import ToontownGlobals - from . import FactorySpecs - +from otp.level import LevelSpec +from toontown.toonbase import ToontownGlobals class LawOfficeBase: @@ -24,8 +21,7 @@ class LawOfficeBase: if __dev__: def getEntityTypeReg(self): - from otp.level import EntityTypeRegistry - from . import FactoryEntityTypes + from otp.level import EntityTypeRegistry typeReg = EntityTypeRegistry.EntityTypeRegistry(FactoryEntityTypes) return typeReg diff --git a/toontown/coghq/LawOfficeLayout.py b/toontown/coghq/LawOfficeLayout.py index d13805a..98d5ab5 100644 --- a/toontown/coghq/LawOfficeLayout.py +++ b/toontown/coghq/LawOfficeLayout.py @@ -1,11 +1,9 @@ -import random - from direct.directnotify import DirectNotifyGlobal -from direct.showbase.PythonUtil import invertDictLossless, lerp, normalDistrib - +from direct.showbase.PythonUtil import invertDictLossless 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 b54e999..1aa4b62 100644 --- a/toontown/coghq/LawOfficeManagerAI.py +++ b/toontown/coghq/LawOfficeManagerAI.py @@ -1,13 +1,9 @@ -import random - from direct.directnotify import DirectNotifyGlobal -from direct.showbase import DirectObject - +from . import DistributedLawOfficeAI, DistributedStageAI from toontown.coghq import StageLayout from toontown.toonbase import ToontownGlobals - -from . import DistributedLawOfficeAI, DistributedStageAI - +from direct.showbase import DirectObject +import random 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 1819048..838186b 100644 --- a/toontown/coghq/LawOffice_Spec_Tier0_a.py +++ b/toontown/coghq/LawOffice_Spec_Tier0_a.py @@ -1,5 +1,4 @@ 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 da3c7e4..3da523f 100644 --- a/toontown/coghq/LawOffice_Spec_Tier0_b.py +++ b/toontown/coghq/LawOffice_Spec_Tier0_b.py @@ -1,5 +1,4 @@ from toontown.coghq.SpecImports import * - GlobalEntities = { 1000: { 'type': 'levelMgr', diff --git a/toontown/coghq/LawbotCogHQLoader.py b/toontown/coghq/LawbotCogHQLoader.py index 13eab1c..c4eeadd 100644 --- a/toontown/coghq/LawbotCogHQLoader.py +++ b/toontown/coghq/LawbotCogHQLoader.py @@ -1,12 +1,15 @@ from direct.directnotify import DirectNotifyGlobal -from direct.fsm import State, StateData +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 toontown.toonbase import ToontownGlobals, TTLocalizer - -from . import CogHQLoader, LawbotHQBossBattle, LawbotHQExterior, LawbotOfficeExterior, StageInterior - +from direct.fsm import State +from . import StageInterior +from . import LawbotHQExterior +from . import LawbotHQBossBattle +from . import LawbotOfficeExterior aspectSF = 0.7227 class LawbotCogHQLoader(CogHQLoader.CogHQLoader): diff --git a/toontown/coghq/LawbotHQBossBattle.py b/toontown/coghq/LawbotHQBossBattle.py index bbdefca..2521b3d 100644 --- a/toontown/coghq/LawbotHQBossBattle.py +++ b/toontown/coghq/LawbotHQBossBattle.py @@ -1,11 +1,8 @@ from panda3d.core import * - -from direct.directnotify import DirectNotifyGlobal from direct.interval.IntervalGlobal import * - -from toontown.coghq import CogHQBossBattle from toontown.suit import DistributedLawbotBoss - +from direct.directnotify import DirectNotifyGlobal +from toontown.coghq import CogHQBossBattle class LawbotHQBossBattle(CogHQBossBattle.CogHQBossBattle): notify = DirectNotifyGlobal.directNotify.newCategory('LawbotHQBossBattle') diff --git a/toontown/coghq/LawbotHQExterior.py b/toontown/coghq/LawbotHQExterior.py index dd61161..bb4dc24 100644 --- a/toontown/coghq/LawbotHQExterior.py +++ b/toontown/coghq/LawbotHQExterior.py @@ -1,13 +1,11 @@ -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 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 toontown.coghq import CogHQExterior class LawbotHQExterior(CogHQExterior.CogHQExterior): notify = DirectNotifyGlobal.directNotify.newCategory('LawbotHQExterior') diff --git a/toontown/coghq/LawbotLegFactoryCogs.py b/toontown/coghq/LawbotLegFactoryCogs.py index 4303b5a..0209c75 100644 --- a/toontown/coghq/LawbotLegFactoryCogs.py +++ b/toontown/coghq/LawbotLegFactoryCogs.py @@ -1,5 +1,4 @@ from .SpecImports import * - LobbyParent = 10014 LobbyCell = 0 BattleCells = {} diff --git a/toontown/coghq/LawbotLegFactorySpec.py b/toontown/coghq/LawbotLegFactorySpec.py index 671a78f..6cbc91f 100644 --- a/toontown/coghq/LawbotLegFactorySpec.py +++ b/toontown/coghq/LawbotLegFactorySpec.py @@ -1,5 +1,4 @@ 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 b67b3dc..541e05f 100644 --- a/toontown/coghq/LawbotOfficeBoilerRoom_Action01.py +++ b/toontown/coghq/LawbotOfficeBoilerRoom_Action01.py @@ -1,5 +1,4 @@ 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 e5beb14..f64f44f 100644 --- a/toontown/coghq/LawbotOfficeBoilerRoom_Battle00.py +++ b/toontown/coghq/LawbotOfficeBoilerRoom_Battle00.py @@ -1,5 +1,4 @@ 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 b6d44f0..1147ac8 100644 --- a/toontown/coghq/LawbotOfficeBoilerRoom_Battle00_Cogs.py +++ b/toontown/coghq/LawbotOfficeBoilerRoom_Battle00_Cogs.py @@ -1,7 +1,5 @@ -from toontown.toonbase import ToontownGlobals - from .SpecImports import * - +from toontown.toonbase import ToontownGlobals CogParent = 10000 LowerCogParent = 10003 BattleParent = 10002 diff --git a/toontown/coghq/LawbotOfficeBoilerRoom_Security00.py b/toontown/coghq/LawbotOfficeBoilerRoom_Security00.py index 5f04b28..892ac7b 100644 --- a/toontown/coghq/LawbotOfficeBoilerRoom_Security00.py +++ b/toontown/coghq/LawbotOfficeBoilerRoom_Security00.py @@ -1,5 +1,4 @@ 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 5c2bf63..a47bc4b 100644 --- a/toontown/coghq/LawbotOfficeBoilerRoom_Trap00.py +++ b/toontown/coghq/LawbotOfficeBoilerRoom_Trap00.py @@ -1,5 +1,4 @@ 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 e2860a6..1de51bb 100644 --- a/toontown/coghq/LawbotOfficeBoilerRoom_Trap00_Cogs.py +++ b/toontown/coghq/LawbotOfficeBoilerRoom_Trap00_Cogs.py @@ -1,7 +1,5 @@ -from toontown.toonbase import ToontownGlobals - from .SpecImports import * - +from toontown.toonbase import ToontownGlobals CogParent = 100001 BattleCellId = 0 BattleCells = {BattleCellId: {'parentEntId': CogParent, diff --git a/toontown/coghq/LawbotOfficeDiamondRoom_Action00.py b/toontown/coghq/LawbotOfficeDiamondRoom_Action00.py index 21f48e9..488caa0 100644 --- a/toontown/coghq/LawbotOfficeDiamondRoom_Action00.py +++ b/toontown/coghq/LawbotOfficeDiamondRoom_Action00.py @@ -1,5 +1,4 @@ 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 480dccf..dc182f3 100644 --- a/toontown/coghq/LawbotOfficeDiamondRoom_Action01.py +++ b/toontown/coghq/LawbotOfficeDiamondRoom_Action01.py @@ -1,5 +1,4 @@ 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 530fd35..1e14a19 100644 --- a/toontown/coghq/LawbotOfficeDiamondRoom_Battle00.py +++ b/toontown/coghq/LawbotOfficeDiamondRoom_Battle00.py @@ -1,5 +1,4 @@ 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 ed7f4ca..c38a073 100644 --- a/toontown/coghq/LawbotOfficeDiamondRoom_Battle00_Cogs.py +++ b/toontown/coghq/LawbotOfficeDiamondRoom_Battle00_Cogs.py @@ -1,7 +1,5 @@ -from toontown.toonbase import ToontownGlobals - from .SpecImports import * - +from toontown.toonbase import ToontownGlobals CogParent = 10000 BattlePlace1 = 10000 BattleCellId = 0 diff --git a/toontown/coghq/LawbotOfficeDiamondRoom_Security00.py b/toontown/coghq/LawbotOfficeDiamondRoom_Security00.py index 030db1f..34e98aa 100644 --- a/toontown/coghq/LawbotOfficeDiamondRoom_Security00.py +++ b/toontown/coghq/LawbotOfficeDiamondRoom_Security00.py @@ -1,5 +1,4 @@ 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 97a5767..5485322 100644 --- a/toontown/coghq/LawbotOfficeDiamondRoom_Trap00.py +++ b/toontown/coghq/LawbotOfficeDiamondRoom_Trap00.py @@ -1,5 +1,4 @@ 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 6ee4d8b..3c77d50 100644 --- a/toontown/coghq/LawbotOfficeDiamondRoom_Trap00_Cogs.py +++ b/toontown/coghq/LawbotOfficeDiamondRoom_Trap00_Cogs.py @@ -1,7 +1,5 @@ -from toontown.toonbase import ToontownGlobals - from .SpecImports import * - +from toontown.toonbase import ToontownGlobals CogParent = 100007 CogParent1 = 100009 BattlePlace1 = 100004 diff --git a/toontown/coghq/LawbotOfficeEntrance_Action00.py b/toontown/coghq/LawbotOfficeEntrance_Action00.py index 779de83..c942f95 100644 --- a/toontown/coghq/LawbotOfficeEntrance_Action00.py +++ b/toontown/coghq/LawbotOfficeEntrance_Action00.py @@ -1,7 +1,5 @@ -import random - from toontown.coghq.SpecImports import * - +import random GlobalEntities = {1000: {'type': 'levelMgr', 'name': 'LevelMgr', 'comment': '', diff --git a/toontown/coghq/LawbotOfficeExterior.py b/toontown/coghq/LawbotOfficeExterior.py index a3ca1cb..13266c5 100644 --- a/toontown/coghq/LawbotOfficeExterior.py +++ b/toontown/coghq/LawbotOfficeExterior.py @@ -1,14 +1,11 @@ -from panda3d.core import * - from direct.directnotify import DirectNotifyGlobal -from direct.fsm import ClassicFSM, State - -from toontown.building import Elevator +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 . 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 e072c8f..0812b97 100644 --- a/toontown/coghq/LawbotOfficeGearRoom_Action00.py +++ b/toontown/coghq/LawbotOfficeGearRoom_Action00.py @@ -1,5 +1,4 @@ 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 fe81ae4..39293b1 100644 --- a/toontown/coghq/LawbotOfficeGearRoom_Battle00.py +++ b/toontown/coghq/LawbotOfficeGearRoom_Battle00.py @@ -1,5 +1,4 @@ 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 ed7f4ca..c38a073 100644 --- a/toontown/coghq/LawbotOfficeGearRoom_Battle00_Cogs.py +++ b/toontown/coghq/LawbotOfficeGearRoom_Battle00_Cogs.py @@ -1,7 +1,5 @@ -from toontown.toonbase import ToontownGlobals - from .SpecImports import * - +from toontown.toonbase import ToontownGlobals CogParent = 10000 BattlePlace1 = 10000 BattleCellId = 0 diff --git a/toontown/coghq/LawbotOfficeGearRoom_Platform00.py b/toontown/coghq/LawbotOfficeGearRoom_Platform00.py index f055e62..965f5ec 100644 --- a/toontown/coghq/LawbotOfficeGearRoom_Platform00.py +++ b/toontown/coghq/LawbotOfficeGearRoom_Platform00.py @@ -1,5 +1,4 @@ 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 ff003c5..ad9e9e7 100644 --- a/toontown/coghq/LawbotOfficeGearRoom_Security00.py +++ b/toontown/coghq/LawbotOfficeGearRoom_Security00.py @@ -1,5 +1,4 @@ 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 e031c00..83310df 100644 --- a/toontown/coghq/LawbotOfficeLobby_Action00.py +++ b/toontown/coghq/LawbotOfficeLobby_Action00.py @@ -1,5 +1,4 @@ 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 a0d962d..49f27f4 100644 --- a/toontown/coghq/LawbotOfficeLobby_Action01.py +++ b/toontown/coghq/LawbotOfficeLobby_Action01.py @@ -1,5 +1,4 @@ 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 84fa401..969bce3 100644 --- a/toontown/coghq/LawbotOfficeLobby_Lights00.py +++ b/toontown/coghq/LawbotOfficeLobby_Lights00.py @@ -1,5 +1,4 @@ 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 b7bebba..3866cbd 100644 --- a/toontown/coghq/LawbotOfficeLobby_Trap00.py +++ b/toontown/coghq/LawbotOfficeLobby_Trap00.py @@ -1,5 +1,4 @@ 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 6e23c72..94f6b27 100644 --- a/toontown/coghq/LawbotOfficeLobby_Trap00_Cogs.py +++ b/toontown/coghq/LawbotOfficeLobby_Trap00_Cogs.py @@ -1,7 +1,5 @@ -from toontown.toonbase import ToontownGlobals - from .SpecImports import * - +from toontown.toonbase import ToontownGlobals CogParent = 10000 CogParent1 = 100021 BattlePlace1 = 100020 diff --git a/toontown/coghq/LawbotOfficeOilRoom_Battle00.py b/toontown/coghq/LawbotOfficeOilRoom_Battle00.py index b3fdb38..7d9519a 100644 --- a/toontown/coghq/LawbotOfficeOilRoom_Battle00.py +++ b/toontown/coghq/LawbotOfficeOilRoom_Battle00.py @@ -1,7 +1,5 @@ -import random - from toontown.coghq.SpecImports import * - +import random GlobalEntities = {1000: {'type': 'levelMgr', 'name': 'LevelMgr', 'comment': '', diff --git a/toontown/coghq/LawbotOfficeOilRoom_Battle00_Cogs.py b/toontown/coghq/LawbotOfficeOilRoom_Battle00_Cogs.py index 28f8c6d..95379bc 100644 --- a/toontown/coghq/LawbotOfficeOilRoom_Battle00_Cogs.py +++ b/toontown/coghq/LawbotOfficeOilRoom_Battle00_Cogs.py @@ -1,7 +1,5 @@ -from toontown.toonbase import ToontownGlobals - from .SpecImports import * - +from toontown.toonbase import ToontownGlobals CogParent = 10000 BattleCellId = 0 BattleCells = {BattleCellId: {'parentEntId': CogParent, diff --git a/toontown/coghq/LawbotOfficeOilRoom_Battle01.py b/toontown/coghq/LawbotOfficeOilRoom_Battle01.py index d45502a..dce5bc0 100644 --- a/toontown/coghq/LawbotOfficeOilRoom_Battle01.py +++ b/toontown/coghq/LawbotOfficeOilRoom_Battle01.py @@ -1,7 +1,5 @@ -import random - from toontown.coghq.SpecImports import * - +import random GlobalEntities = {1000: {'type': 'levelMgr', 'name': 'LevelMgr', 'comment': '', diff --git a/toontown/coghq/LawbotOfficeOilRoom_Battle01_Cogs.py b/toontown/coghq/LawbotOfficeOilRoom_Battle01_Cogs.py index e58e8fe..b63aece 100644 --- a/toontown/coghq/LawbotOfficeOilRoom_Battle01_Cogs.py +++ b/toontown/coghq/LawbotOfficeOilRoom_Battle01_Cogs.py @@ -1,7 +1,5 @@ -from toontown.toonbase import ToontownGlobals - from .SpecImports import * - +from toontown.toonbase import ToontownGlobals CogParent = 10000 BattleCellId = 0 BattleCells = {BattleCellId: {'parentEntId': CogParent, diff --git a/toontown/coghq/LevelBattleManagerAI.py b/toontown/coghq/LevelBattleManagerAI.py index 08a66b3..7f84ab8 100644 --- a/toontown/coghq/LevelBattleManagerAI.py +++ b/toontown/coghq/LevelBattleManagerAI.py @@ -1,9 +1,7 @@ -from direct.directnotify import DirectNotifyGlobal - from toontown.battle import BattleManagerAI +from direct.directnotify import DirectNotifyGlobal 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 98bc793..b4d459b 100644 --- a/toontown/coghq/LevelSuitPlannerAI.py +++ b/toontown/coghq/LevelSuitPlannerAI.py @@ -1,14 +1,10 @@ -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 - +from direct.directnotify import DirectNotifyGlobal +from toontown.coghq import LevelBattleManagerAI +import random +import functools class LevelSuitPlannerAI(DirectObject.DirectObject): notify = DirectNotifyGlobal.directNotify.newCategory('LevelSuitPlannerAI') diff --git a/toontown/coghq/LobbyManager.py b/toontown/coghq/LobbyManager.py index f5494c2..34316f6 100644 --- a/toontown/coghq/LobbyManager.py +++ b/toontown/coghq/LobbyManager.py @@ -1,10 +1,8 @@ from panda3d.core import * - -from direct.directnotify import DirectNotifyGlobal +from toontown.toonbase import ToontownGlobals from direct.distributed import DistributedObject - -from toontown.toonbase import ToontownGlobals, TTLocalizer - +from direct.directnotify import DirectNotifyGlobal +from toontown.toonbase import TTLocalizer class LobbyManager(DistributedObject.DistributedObject): notify = DirectNotifyGlobal.directNotify.newCategory('LobbyManager') diff --git a/toontown/coghq/LobbyManagerAI.py b/toontown/coghq/LobbyManagerAI.py index 9ae84e8..9fd2f0a 100644 --- a/toontown/coghq/LobbyManagerAI.py +++ b/toontown/coghq/LobbyManagerAI.py @@ -1,9 +1,7 @@ -from direct.directnotify import DirectNotifyGlobal from direct.distributed import DistributedObjectAI - +from direct.directnotify import DirectNotifyGlobal 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 b6f1a71..af075a6 100644 --- a/toontown/coghq/MintInterior.py +++ b/toontown/coghq/MintInterior.py @@ -1,19 +1,18 @@ +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.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.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 DistributedMint class MintInterior(BattlePlace.BattlePlace): notify = DirectNotifyGlobal.directNotify.newCategory('MintInterior') diff --git a/toontown/coghq/MintLayout.py b/toontown/coghq/MintLayout.py index cff2883..01bf864 100644 --- a/toontown/coghq/MintLayout.py +++ b/toontown/coghq/MintLayout.py @@ -1,11 +1,9 @@ -import random - from direct.directnotify import DirectNotifyGlobal -from direct.showbase.PythonUtil import invertDictLossless, lerp, normalDistrib - +from direct.showbase.PythonUtil import invertDictLossless 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 ebc2eee..7e51b7f 100644 --- a/toontown/coghq/MintManagerAI.py +++ b/toontown/coghq/MintManagerAI.py @@ -1,13 +1,9 @@ -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 - +from toontown.toonbase import ToontownGlobals +from toontown.coghq import MintLayout +from direct.showbase import DirectObject +import random class MintManagerAI(DirectObject.DirectObject): notify = DirectNotifyGlobal.directNotify.newCategory('MintManagerAI') diff --git a/toontown/coghq/MintProduct.py b/toontown/coghq/MintProduct.py index a523669..f21903b 100644 --- a/toontown/coghq/MintProduct.py +++ b/toontown/coghq/MintProduct.py @@ -1,7 +1,5 @@ -from otp.level import BasicEntities - from toontown.toonbase.ToontownGlobals import * - +from otp.level import BasicEntities class MintProduct(BasicEntities.NodePathEntity): Models = {CashbotMintIntA: 'phase_10/models/cashbotHQ/MoneyBag', diff --git a/toontown/coghq/MintProductPallet.py b/toontown/coghq/MintProductPallet.py index 9da8831..9cc7471 100644 --- a/toontown/coghq/MintProductPallet.py +++ b/toontown/coghq/MintProductPallet.py @@ -1,6 +1,5 @@ -from toontown.coghq import MintProduct from toontown.toonbase.ToontownGlobals import * - +from toontown.coghq import MintProduct 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 800d0c8..c29f493 100644 --- a/toontown/coghq/MintRoom.py +++ b/toontown/coghq/MintRoom.py @@ -1,13 +1,9 @@ -import random - from panda3d.core import * - -from direct.fsm import ClassicFSM, State from direct.showbase import DirectObject - -from toontown.coghq import MintRoomSpecs +from direct.fsm import ClassicFSM, State from toontown.toonbase import ToontownGlobals - +from toontown.coghq import MintRoomSpecs +import random class MintRoom(DirectObject.DirectObject): FloorCollPrefix = 'mintFloorColl' diff --git a/toontown/coghq/MintRoomBase.py b/toontown/coghq/MintRoomBase.py index 12cdac4..2742852 100644 --- a/toontown/coghq/MintRoomBase.py +++ b/toontown/coghq/MintRoomBase.py @@ -1,6 +1,5 @@ from toontown.toonbase import ToontownGlobals - class MintRoomBase: def __init__(self): @@ -19,8 +18,7 @@ class MintRoomBase: if __dev__: def getEntityTypeReg(self): - from otp.level import EntityTypeRegistry - from . import FactoryEntityTypes + from otp.level import EntityTypeRegistry typeReg = EntityTypeRegistry.EntityTypeRegistry(FactoryEntityTypes) return typeReg diff --git a/toontown/coghq/MintRoomSpecs.py b/toontown/coghq/MintRoomSpecs.py index 9368879..194b544 100644 --- a/toontown/coghq/MintRoomSpecs.py +++ b/toontown/coghq/MintRoomSpecs.py @@ -1,15 +1,21 @@ 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 866824c..99908be 100644 --- a/toontown/coghq/MintShelf.py +++ b/toontown/coghq/MintShelf.py @@ -1,6 +1,5 @@ -from toontown.coghq import MintProduct from toontown.toonbase.ToontownGlobals import * - +from toontown.coghq import MintProduct 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 8c30414..3bb2d52 100644 --- a/toontown/coghq/MoleFieldBase.py +++ b/toontown/coghq/MoleFieldBase.py @@ -1,5 +1,4 @@ import random - HILL_MOLE = 0 HILL_BOMB = 1 HILL_WHACKED = 2 diff --git a/toontown/coghq/MoleHill.py b/toontown/coghq/MoleHill.py index 0ac47da..f389960 100644 --- a/toontown/coghq/MoleHill.py +++ b/toontown/coghq/MoleHill.py @@ -1,13 +1,10 @@ -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, BattleProps -from toontown.coghq import MoleFieldBase +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 direct.particles import ParticleEffect +from toontown.battle import BattleParticles +from toontown.battle import BattleProps class MoleHill(NodePath): diff --git a/toontown/coghq/MovingPlatform.py b/toontown/coghq/MovingPlatform.py index f3d9f93..6c7fa4a 100644 --- a/toontown/coghq/MovingPlatform.py +++ b/toontown/coghq/MovingPlatform.py @@ -1,11 +1,8 @@ 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 5fd3723..aee992c 100644 --- a/toontown/coghq/NullCogs.py +++ b/toontown/coghq/NullCogs.py @@ -1,5 +1,4 @@ from .SpecImports import * - BattleCells = {} CogData = [] ReserveCogData = [] diff --git a/toontown/coghq/PaintMixer.py b/toontown/coghq/PaintMixer.py index 549e8af..dc2e5dd 100644 --- a/toontown/coghq/PaintMixer.py +++ b/toontown/coghq/PaintMixer.py @@ -1,6 +1,5 @@ from . import PlatformEntity - class PaintMixer(PlatformEntity.PlatformEntity): def start(self): diff --git a/toontown/coghq/PathMasterEntity.py b/toontown/coghq/PathMasterEntity.py index 5fbc1bf..db22ba3 100644 --- a/toontown/coghq/PathMasterEntity.py +++ b/toontown/coghq/PathMasterEntity.py @@ -1,11 +1,8 @@ -from direct.directnotify import DirectNotifyGlobal -from direct.interval.IntervalGlobal import * - -from otp.level import PathEntity - -from toontown.suit import GoonPathData from toontown.toonbase.ToontownGlobals import * - +from direct.interval.IntervalGlobal import * +from direct.directnotify import DirectNotifyGlobal +from toontown.suit import GoonPathData +from otp.level import PathEntity class PathMasterEntity(PathEntity.PathEntity): notify = DirectNotifyGlobal.directNotify.newCategory('PathMasterEntity') diff --git a/toontown/coghq/PlatformEntity.py b/toontown/coghq/PlatformEntity.py index 34f7487..477509c 100644 --- a/toontown/coghq/PlatformEntity.py +++ b/toontown/coghq/PlatformEntity.py @@ -1,12 +1,8 @@ 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 98fb104..de61c9c 100644 --- a/toontown/coghq/PromotionManagerAI.py +++ b/toontown/coghq/PromotionManagerAI.py @@ -1,15 +1,10 @@ -import random -from functools import reduce - -from direct.directnotify import DirectNotifyGlobal - from otp.ai.AIBaseGlobal import * - +from direct.directnotify import DirectNotifyGlobal +import random from toontown.suit import SuitDNA -from toontown.toonbase.ToontownBattleGlobals import getInvasionMultiplier - from . import CogDisguiseGlobals - +from toontown.toonbase.ToontownBattleGlobals import getInvasionMultiplier +from functools import reduce MeritMultiplier = 0.5 class PromotionManagerAI: diff --git a/toontown/coghq/RenderingEntity.py b/toontown/coghq/RenderingEntity.py index b15508a..367c506 100644 --- a/toontown/coghq/RenderingEntity.py +++ b/toontown/coghq/RenderingEntity.py @@ -1,11 +1,8 @@ -from direct.directnotify import DirectNotifyGlobal -from direct.interval.IntervalGlobal import * - -from otp.level import BasicEntities - -from toontown.suit import GoonPathData from toontown.toonbase.ToontownGlobals import * - +from direct.interval.IntervalGlobal import * +from direct.directnotify import DirectNotifyGlobal +from toontown.suit import GoonPathData +from otp.level import BasicEntities class RenderingEntity(BasicEntities.NodePathEntity): notify = DirectNotifyGlobal.directNotify.newCategory('PathMasterEntity') diff --git a/toontown/coghq/SellbotCogHQLoader.py b/toontown/coghq/SellbotCogHQLoader.py index 0b29487..b7bc6a8 100644 --- a/toontown/coghq/SellbotCogHQLoader.py +++ b/toontown/coghq/SellbotCogHQLoader.py @@ -1,14 +1,16 @@ -from panda3d.core import DecalEffect - from direct.directnotify import DirectNotifyGlobal -from direct.fsm import State, StateData +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 toontown.toonbase import ToontownGlobals, TTLocalizer - -from . import CogHQLoader, FactoryExterior, FactoryInterior, SellbotHQBossBattle, SellbotHQExterior - +from direct.fsm import State +from . import FactoryExterior +from . import FactoryInterior +from . import SellbotHQExterior +from . import SellbotHQBossBattle +from panda3d.core import DecalEffect aspectSF = 0.7227 class SellbotCogHQLoader(CogHQLoader.CogHQLoader): diff --git a/toontown/coghq/SellbotHQBossBattle.py b/toontown/coghq/SellbotHQBossBattle.py index 10f3577..a7d8826 100644 --- a/toontown/coghq/SellbotHQBossBattle.py +++ b/toontown/coghq/SellbotHQBossBattle.py @@ -1,11 +1,8 @@ from panda3d.core import * - -from direct.directnotify import DirectNotifyGlobal from direct.interval.IntervalGlobal import * - -from toontown.coghq import CogHQBossBattle from toontown.suit import DistributedSellbotBoss - +from direct.directnotify import DirectNotifyGlobal +from toontown.coghq import CogHQBossBattle class SellbotHQBossBattle(CogHQBossBattle.CogHQBossBattle): notify = DirectNotifyGlobal.directNotify.newCategory('SellbotHQBossBattle') diff --git a/toontown/coghq/SellbotHQExterior.py b/toontown/coghq/SellbotHQExterior.py index 39517f8..776303d 100644 --- a/toontown/coghq/SellbotHQExterior.py +++ b/toontown/coghq/SellbotHQExterior.py @@ -1,8 +1,6 @@ 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 f2104e8..6637acb 100644 --- a/toontown/coghq/SellbotLegFactoryCogs.py +++ b/toontown/coghq/SellbotLegFactoryCogs.py @@ -1,5 +1,4 @@ from .SpecImports import * - LobbyParent = 10014 BoilerParent = 10030 PipeLeftParent = 10023 diff --git a/toontown/coghq/SellbotLegFactorySpec.py b/toontown/coghq/SellbotLegFactorySpec.py index e815850..9d8c471 100644 --- a/toontown/coghq/SellbotLegFactorySpec.py +++ b/toontown/coghq/SellbotLegFactorySpec.py @@ -1,6 +1,5 @@ -from toontown.coghq.SpecImports import * from toontown.toonbase import TTLocalizer - +from toontown.coghq.SpecImports import * GlobalEntities = {1000: {'type': 'levelMgr', 'name': 'LevelMgr', 'comment': '', diff --git a/toontown/coghq/StageInterior.py b/toontown/coghq/StageInterior.py index e0b3279..48bcb81 100644 --- a/toontown/coghq/StageInterior.py +++ b/toontown/coghq/StageInterior.py @@ -1,20 +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.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.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.building import Elevator class StageInterior(BattlePlace.BattlePlace): notify = DirectNotifyGlobal.directNotify.newCategory('StageInterior') diff --git a/toontown/coghq/StageLayout.py b/toontown/coghq/StageLayout.py index 56a9f59..b057dcb 100644 --- a/toontown/coghq/StageLayout.py +++ b/toontown/coghq/StageLayout.py @@ -1,11 +1,9 @@ -import random - from direct.directnotify import DirectNotifyGlobal -from direct.showbase.PythonUtil import invertDictLossless, lerp, normalDistrib - +from direct.showbase.PythonUtil import invertDictLossless 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 bcca19d..57dfaae 100644 --- a/toontown/coghq/StageManagerAI.py +++ b/toontown/coghq/StageManagerAI.py @@ -1,13 +1,9 @@ -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 - +from toontown.toonbase import ToontownGlobals +from toontown.coghq import StageLayout +from direct.showbase import DirectObject +import random class StageManagerAI(DirectObject.DirectObject): notify = DirectNotifyGlobal.directNotify.newCategory('StageManagerAI') diff --git a/toontown/coghq/StageRoom.py b/toontown/coghq/StageRoom.py index edf91da..7db85e6 100644 --- a/toontown/coghq/StageRoom.py +++ b/toontown/coghq/StageRoom.py @@ -1,13 +1,9 @@ -import random - from panda3d.core import * - -from direct.fsm import ClassicFSM, State from direct.showbase import DirectObject - -from toontown.coghq import StageRoomSpecs +from direct.fsm import ClassicFSM, State from toontown.toonbase import ToontownGlobals - +from toontown.coghq import StageRoomSpecs +import random class StageRoom(DirectObject.DirectObject): FloorCollPrefix = 'stageFloorColl' diff --git a/toontown/coghq/StageRoomBase.py b/toontown/coghq/StageRoomBase.py index ebfe1e7..ded0973 100644 --- a/toontown/coghq/StageRoomBase.py +++ b/toontown/coghq/StageRoomBase.py @@ -1,6 +1,5 @@ from toontown.toonbase import ToontownGlobals - class StageRoomBase: def __init__(self): @@ -19,8 +18,7 @@ class StageRoomBase: if __dev__: def getEntityTypeReg(self): - from otp.level import EntityTypeRegistry - from . import FactoryEntityTypes + from otp.level import EntityTypeRegistry typeReg = EntityTypeRegistry.EntityTypeRegistry(FactoryEntityTypes) return typeReg diff --git a/toontown/coghq/StageRoomSpecs.py b/toontown/coghq/StageRoomSpecs.py index 943b61c..adc800d 100644 --- a/toontown/coghq/StageRoomSpecs.py +++ b/toontown/coghq/StageRoomSpecs.py @@ -1,11 +1,14 @@ 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 1cdb2cd..bd52769 100644 --- a/toontown/distributed/DelayDeletable.py +++ b/toontown/distributed/DelayDeletable.py @@ -1,5 +1,4 @@ -from direct.distributed.DistributedObject import ESGenerated, ESGenerating, ESNum2Str - +from direct.distributed.DistributedObject import ESGenerating, ESGenerated, ESNum2Str class DelayDeletable: DelayDeleteSerialGen = SerialNumGen() diff --git a/toontown/distributed/DistributedTimer.py b/toontown/distributed/DistributedTimer.py index 3f562e9..09c23d1 100644 --- a/toontown/distributed/DistributedTimer.py +++ b/toontown/distributed/DistributedTimer.py @@ -1,13 +1,9 @@ -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 toontown.toonbase import ToontownGlobals - +from panda3d.core import * +from direct.distributed.ClockDelta import * +import time class DistributedTimer(DistributedObject.DistributedObject): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedTimer') diff --git a/toontown/distributed/DistributedTimerAI.py b/toontown/distributed/DistributedTimerAI.py index 3ecc0c0..57399d7 100644 --- a/toontown/distributed/DistributedTimerAI.py +++ b/toontown/distributed/DistributedTimerAI.py @@ -1,13 +1,9 @@ -import time - -from panda3d.core import * - -from direct.directnotify import DirectNotifyGlobal from direct.distributed import DistributedObjectAI -from direct.distributed.ClockDelta import * - +from direct.directnotify import DirectNotifyGlobal from toontown.toonbase import ToontownGlobals - +from panda3d.core import * +from direct.distributed.ClockDelta import * +import time class DistributedTimerAI(DistributedObjectAI.DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedTimerAI') diff --git a/toontown/distributed/HoodMgr.py b/toontown/distributed/HoodMgr.py index fbb6640..d9b9926 100644 --- a/toontown/distributed/HoodMgr.py +++ b/toontown/distributed/HoodMgr.py @@ -1,14 +1,10 @@ -import random - from panda3d.core import * - -from direct.directnotify import DirectNotifyGlobal from direct.showbase import DirectObject - -from toontown.hood import ZoneUtil +from direct.directnotify import DirectNotifyGlobal from toontown.launcher import DownloadForceAcknowledge +import random from toontown.toonbase import ToontownGlobals - +from toontown.hood import ZoneUtil class HoodMgr(DirectObject.DirectObject): notify = DirectNotifyGlobal.directNotify.newCategory('HoodMgr') diff --git a/toontown/distributed/NonRepeatableRandomSourceAI.py b/toontown/distributed/NonRepeatableRandomSourceAI.py index 2069938..2f3655f 100644 --- a/toontown/distributed/NonRepeatableRandomSourceAI.py +++ b/toontown/distributed/NonRepeatableRandomSourceAI.py @@ -1,11 +1,8 @@ -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 d4f465c..2af96d7 100644 --- a/toontown/distributed/NonRepeatableRandomSourceUD.py +++ b/toontown/distributed/NonRepeatableRandomSourceUD.py @@ -1,8 +1,6 @@ -import random - -from direct.directnotify.DirectNotifyGlobal import directNotify from direct.distributed.DistributedObjectGlobalUD import DistributedObjectGlobalUD - +from direct.directnotify.DirectNotifyGlobal import directNotify +import random class NonRepeatableRandomSourceUD(DistributedObjectGlobalUD): notify = directNotify.newCategory('NonRepeatableRandomSourceUD') diff --git a/toontown/distributed/PlayGame.py b/toontown/distributed/PlayGame.py index 31dc69b..af33272 100644 --- a/toontown/distributed/PlayGame.py +++ b/toontown/distributed/PlayGame.py @@ -1,19 +1,31 @@ from panda3d.core import * from panda3d.toontown import * - -from direct.directnotify import DirectNotifyGlobal -from direct.fsm import ClassicFSM, State, StateData -from direct.task import TaskManagerGlobal -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 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.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 toontown.parties.PartyGlobals import GoToPartyStatus class PlayGame(StateData.StateData): notify = DirectNotifyGlobal.directNotify.newCategory('PlayGame') diff --git a/toontown/distributed/ToontownClientRepository.py b/toontown/distributed/ToontownClientRepository.py index 7fd9280..dbadca9 100644 --- a/toontown/distributed/ToontownClientRepository.py +++ b/toontown/distributed/ToontownClientRepository.py @@ -1,36 +1,43 @@ 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.avatar.Avatar import teleportNotify -from otp.distributed import OTPClientRepository, OtpDoGlobals, PotentialAvatar +from otp.distributed import OTPClientRepository +from otp.distributed import 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 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 toontown.toonbase.ToonBaseGlobal import * from toontown.toonbase.ToontownGlobals import * -from toontown.toontowngui import ToontownLoadingBlocker, TTDialog - -from . import HoodMgr, PlayGame +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 .ToontownMsgTypes import * - +from . import HoodMgr +from . import PlayGame +from toontown.toontowngui import ToontownLoadingBlocker +from toontown.hood import StreetSign class ToontownClientRepository(OTPClientRepository.OTPClientRepository): SupportTutorial = 1 @@ -454,7 +461,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 f4dfdf8..830e473 100644 --- a/toontown/distributed/ToontownDistrict.py +++ b/toontown/distributed/ToontownDistrict.py @@ -1,9 +1,7 @@ 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 a532fa9..d9be1a2 100644 --- a/toontown/distributed/ToontownDistrictAI.py +++ b/toontown/distributed/ToontownDistrictAI.py @@ -1,8 +1,6 @@ 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 8e32440..e0ab4fd 100644 --- a/toontown/distributed/ToontownDistrictStats.py +++ b/toontown/distributed/ToontownDistrictStats.py @@ -1,10 +1,9 @@ -from direct.directnotify import DirectNotifyGlobal -from direct.distributed import DistributedObject, DoInterestManager from direct.showbase import DirectObject +from direct.directnotify import DirectNotifyGlobal +from direct.distributed import DistributedObject 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 f9b2a2a..86d4c6b 100644 --- a/toontown/distributed/ToontownDistrictStatsAI.py +++ b/toontown/distributed/ToontownDistrictStatsAI.py @@ -1,7 +1,6 @@ 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 11fd085..0d6f1ff 100644 --- a/toontown/distributed/ToontownInternalRepository.py +++ b/toontown/distributed/ToontownInternalRepository.py @@ -1,8 +1,6 @@ from direct.directnotify import DirectNotifyGlobal - -from otp.distributed.OtpDoGlobals import * from otp.distributed.OTPInternalRepository import OTPInternalRepository - +from otp.distributed.OtpDoGlobals import * class ToontownInternalRepository(OTPInternalRepository): notify = DirectNotifyGlobal.directNotify.newCategory('ToontownInternalRepository') diff --git a/toontown/effects/BlastEffect.py b/toontown/effects/BlastEffect.py index 8a0fcec..ef6dd53 100644 --- a/toontown/effects/BlastEffect.py +++ b/toontown/effects/BlastEffect.py @@ -1,10 +1,7 @@ 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 1a158c4..9b52e0c 100644 --- a/toontown/effects/Bubbles.py +++ b/toontown/effects/Bubbles.py @@ -1,11 +1,10 @@ -import random - from panda3d.core import * from panda3d.physics import * - from direct.interval.IntervalGlobal import * -from direct.particles import ForceGroup, ParticleEffect, Particles - +from direct.particles import ParticleEffect +from direct.particles import Particles +from direct.particles import ForceGroup +import random class Bubbles(NodePath): diff --git a/toontown/effects/CarSmoke.py b/toontown/effects/CarSmoke.py index 1a93217..75469d8 100644 --- a/toontown/effects/CarSmoke.py +++ b/toontown/effects/CarSmoke.py @@ -1,11 +1,8 @@ -import os - from panda3d.core import * - -from direct.directnotify import DirectNotifyGlobal from direct.particles import ParticleEffect +from direct.directnotify import DirectNotifyGlobal from direct.showbase import AppRunnerGlobal - +import os class CarSmoke(NodePath): diff --git a/toontown/effects/ChrysanthemumEffect.py b/toontown/effects/ChrysanthemumEffect.py index e6a1bdd..d4081cc 100644 --- a/toontown/effects/ChrysanthemumEffect.py +++ b/toontown/effects/ChrysanthemumEffect.py @@ -1,10 +1,7 @@ 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 478afa3..334fb73 100644 --- a/toontown/effects/DistributedFireworkShow.py +++ b/toontown/effects/DistributedFireworkShow.py @@ -1,8 +1,6 @@ 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 4da375d..a1a6701 100644 --- a/toontown/effects/DistributedFireworkShowAI.py +++ b/toontown/effects/DistributedFireworkShowAI.py @@ -1,12 +1,10 @@ -from direct.directnotify import DirectNotifyGlobal -from direct.distributed import ClockDelta, DistributedObjectAI -from direct.task import Task - from otp.ai.AIBaseGlobal import * - +from direct.distributed import DistributedObjectAI +from direct.directnotify import DirectNotifyGlobal +from direct.distributed import ClockDelta from .FireworkShow import FireworkShow from .FireworkShows import getShowDuration - +from direct.task import Task class DistributedFireworkShowAI(DistributedObjectAI.DistributedObjectAI): @@ -36,12 +34,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")) @@ -62,7 +60,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 0c8a399..d666f1c 100644 --- a/toontown/effects/Drift.py +++ b/toontown/effects/Drift.py @@ -1,10 +1,7 @@ -import os - from panda3d.core import * - -from direct.directnotify import DirectNotifyGlobal from direct.particles import ParticleEffect - +from direct.directnotify import DirectNotifyGlobal +import os class Drift(NodePath): diff --git a/toontown/effects/DustCloud.py b/toontown/effects/DustCloud.py index abcacef..d77b585 100644 --- a/toontown/effects/DustCloud.py +++ b/toontown/effects/DustCloud.py @@ -1,12 +1,8 @@ -from enum import IntEnum - from panda3d.core import * - -from direct.directnotify import DirectNotifyGlobal from direct.interval.IntervalGlobal import * - from toontown.battle.BattleProps import globalPropPool - +from direct.directnotify import DirectNotifyGlobal +from enum import IntEnum SFX = IntEnum('SFX', ('poof', 'magic'), 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 9e84e79..2efdde7 100644 --- a/toontown/effects/EffectController.py +++ b/toontown/effects/EffectController.py @@ -1,6 +1,5 @@ from panda3d.core import * - class EffectController: particleDummy = None diff --git a/toontown/effects/Firework.py b/toontown/effects/Firework.py index adc1cde..86b34da 100644 --- a/toontown/effects/Firework.py +++ b/toontown/effects/Firework.py @@ -1,12 +1,8 @@ -import random - from panda3d.core import * - from direct.interval.IntervalGlobal import * - -from toontown.effects.FireworkEffect import FireworkEffect from toontown.effects.FireworkGlobals import * - +from toontown.effects.FireworkEffect import FireworkEffect +import random class Firework(NodePath): diff --git a/toontown/effects/FireworkEffect.py b/toontown/effects/FireworkEffect.py index fa663d0..eb055fb 100644 --- a/toontown/effects/FireworkEffect.py +++ b/toontown/effects/FireworkEffect.py @@ -1,30 +1,26 @@ -import random - from panda3d.core import * - from direct.interval.IntervalGlobal import * - -from toontown.effects.BlastEffect import BlastEffect -from toontown.effects.ChrysanthemumEffect import ChrysanthemumEffect +import random 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.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.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.NoiseSparkles import NoiseSparkles +from toontown.effects.SkullBurst import SkullBurst +from toontown.effects.SkullFlash import SkullFlash 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 95c2324..2f1302f 100644 --- a/toontown/effects/FireworkShow.py +++ b/toontown/effects/FireworkShow.py @@ -1,14 +1,10 @@ -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.effects.Firework import Firework from toontown.toonbase import ToontownGlobals - +from toontown.parties import PartyGlobals +import random 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 85ea11d..fb7e8e6 100644 --- a/toontown/effects/FireworkShowMixin.py +++ b/toontown/effects/FireworkShowMixin.py @@ -1,16 +1,13 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.ClockDelta import * from direct.interval.IntervalGlobal import * - -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) - +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 class FireworkShowMixin: notify = DirectNotifyGlobal.directNotify.newCategory('FireworkShowMixin') @@ -137,7 +134,7 @@ class FireworkShowMixin: def restoreCameraLens(self): hood = self.getHood() - from toontown.hood import GSHood, OZHood + from toontown.hood import OZHood, GSHood if isinstance(hood, OZHood.OZHood): base.camLens.setFar(SpeedwayCameraFar) elif isinstance(hood, GSHood.GSHood): @@ -179,7 +176,7 @@ class FireworkShowMixin: self.fireworkShow.begin(timeStamp) self.fireworkShow.reparentTo(root) hood = self.getHood() - from toontown.hood import BRHood, DDHood, DGHood, DLHood, GSHood, MMHood, OZHood, PartyHood, TTHood + from toontown.hood import TTHood, BRHood, MMHood, DGHood, DLHood, GSHood, DDHood, OZHood, PartyHood if isinstance(hood, TTHood.TTHood): self.fireworkShow.setPos(150, 0, 80) self.fireworkShow.setHpr(90, 0, 0) diff --git a/toontown/effects/FireworkShows.py b/toontown/effects/FireworkShows.py index 26334fd..231864e 100644 --- a/toontown/effects/FireworkShows.py +++ b/toontown/effects/FireworkShows.py @@ -1,8 +1,6 @@ -from toontown.parties import PartyGlobals -from toontown.toonbase import ToontownGlobals - from .FireworkGlobals import * - +from toontown.toonbase import ToontownGlobals +from toontown.parties import PartyGlobals shows = {ToontownGlobals.JULY4_FIREWORKS: [((2, ROCKET, RED, diff --git a/toontown/effects/FireworkSparkles.py b/toontown/effects/FireworkSparkles.py index 126485b..41b26a1 100644 --- a/toontown/effects/FireworkSparkles.py +++ b/toontown/effects/FireworkSparkles.py @@ -1,14 +1,10 @@ -import random - from panda3d.core import * from panda3d.physics import * - from direct.interval.IntervalGlobal import * -from direct.particles import ForceGroup, ParticleEffect, Particles - +from direct.particles import ParticleEffect, Particles, ForceGroup 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 0900b66..f628c64 100644 --- a/toontown/effects/Fireworks.py +++ b/toontown/effects/Fireworks.py @@ -1,13 +1,11 @@ -import random - +from direct.interval.IntervalGlobal import * +from direct.particles import ParticleEffect +from direct.particles import Particles +from direct.particles import ForceGroup from panda3d.core import * from panda3d.physics import * - -from direct.interval.IntervalGlobal import * -from direct.particles import ForceGroup, ParticleEffect, Particles - +import random 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 a90eef9..ceea5a6 100644 --- a/toontown/effects/FlashEffect.py +++ b/toontown/effects/FlashEffect.py @@ -1,10 +1,7 @@ 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 4067b07..99fe7ed 100644 --- a/toontown/effects/Glow.py +++ b/toontown/effects/Glow.py @@ -1,11 +1,8 @@ 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 b11534d..c0e9eb4 100644 --- a/toontown/effects/GlowTrail.py +++ b/toontown/effects/GlowTrail.py @@ -1,12 +1,9 @@ from panda3d.core import * from panda3d.physics import * - from direct.interval.IntervalGlobal import * -from direct.particles import ForceGroup, ParticleEffect, Particles - -from .EffectController import EffectController +from direct.particles import ParticleEffect, Particles, ForceGroup from .PooledEffect import PooledEffect - +from .EffectController import EffectController class GlowTrail(PooledEffect, EffectController): diff --git a/toontown/effects/IceCream.py b/toontown/effects/IceCream.py index 7950900..d0afda9 100644 --- a/toontown/effects/IceCream.py +++ b/toontown/effects/IceCream.py @@ -1,13 +1,10 @@ from panda3d.core import * from panda3d.physics import * - from direct.interval.IntervalGlobal import * -from direct.particles import ForceGroup, ParticleEffect, Particles - +from direct.particles import ParticleEffect, Particles, ForceGroup 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 238b8a7..e9822c1 100644 --- a/toontown/effects/NoiseSparkles.py +++ b/toontown/effects/NoiseSparkles.py @@ -1,14 +1,10 @@ -import random - from panda3d.core import * from panda3d.physics import * - from direct.interval.IntervalGlobal import * -from direct.particles import ForceGroup, ParticleEffect, Particles - +from direct.particles import ParticleEffect, Particles, ForceGroup 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 0dfee9c..8ddeebe 100644 --- a/toontown/effects/PeonyEffect.py +++ b/toontown/effects/PeonyEffect.py @@ -1,11 +1,8 @@ from panda3d.core import * - -from direct.interval.IntervalGlobal import * from direct.showbase.DirectObject import * - -from .EffectController import EffectController +from direct.interval.IntervalGlobal import * from .PooledEffect import PooledEffect - +from .EffectController import EffectController class PeonyEffect(PooledEffect, EffectController): diff --git a/toontown/effects/PolyTrail.py b/toontown/effects/PolyTrail.py index 2de835f..14c82fe 100644 --- a/toontown/effects/PolyTrail.py +++ b/toontown/effects/PolyTrail.py @@ -1,9 +1,6 @@ -import random - from panda3d.core import * - from direct.motiontrail.MotionTrail import * - +import random class PolyTrail(NodePath): diff --git a/toontown/effects/PooledEffect.py b/toontown/effects/PooledEffect.py index 0d65be5..cd4d83e 100644 --- a/toontown/effects/PooledEffect.py +++ b/toontown/effects/PooledEffect.py @@ -1,10 +1,7 @@ -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 715843c..b9415f6 100644 --- a/toontown/effects/RayBurst.py +++ b/toontown/effects/RayBurst.py @@ -1,10 +1,7 @@ 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 bc1f42c..27f7ed1 100644 --- a/toontown/effects/RingEffect.py +++ b/toontown/effects/RingEffect.py @@ -1,14 +1,10 @@ -import random - from panda3d.core import * from panda3d.physics import * - from direct.interval.IntervalGlobal import * -from direct.particles import ForceGroup, ParticleEffect, Particles - +from direct.particles import ParticleEffect, Particles, ForceGroup 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 add76eb..7bb9e56 100644 --- a/toontown/effects/Ripples.py +++ b/toontown/effects/Ripples.py @@ -1,10 +1,7 @@ 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 8019bc8..88641c3 100644 --- a/toontown/effects/RocketExplosion.py +++ b/toontown/effects/RocketExplosion.py @@ -1,9 +1,7 @@ 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 cb75907..bf3968f 100644 --- a/toontown/effects/ScavengerHuntEffects.py +++ b/toontown/effects/ScavengerHuntEffects.py @@ -1,11 +1,9 @@ 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 3418107..38e3a42 100644 --- a/toontown/effects/SimpleSparkles.py +++ b/toontown/effects/SimpleSparkles.py @@ -1,14 +1,10 @@ -import random - from panda3d.core import * from panda3d.physics import * - from direct.interval.IntervalGlobal import * -from direct.particles import ForceGroup, ParticleEffect, Particles - +from direct.particles import ParticleEffect, Particles, ForceGroup 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 81d953b..1cfc317 100644 --- a/toontown/effects/SkullBurst.py +++ b/toontown/effects/SkullBurst.py @@ -1,11 +1,8 @@ from panda3d.core import * - -from direct.interval.IntervalGlobal import * from direct.showbase.DirectObject import * - -from .EffectController import EffectController +from direct.interval.IntervalGlobal import * from .PooledEffect import PooledEffect - +from .EffectController import EffectController class SkullBurst(PooledEffect, EffectController): diff --git a/toontown/effects/SkullFlash.py b/toontown/effects/SkullFlash.py index 18b4fb0..5228e1c 100644 --- a/toontown/effects/SkullFlash.py +++ b/toontown/effects/SkullFlash.py @@ -1,11 +1,8 @@ from panda3d.core import * - -from direct.interval.IntervalGlobal import * from direct.showbase.DirectObject import * - -from .EffectController import EffectController +from direct.interval.IntervalGlobal import * from .PooledEffect import PooledEffect - +from .EffectController import EffectController class SkullFlash(PooledEffect, EffectController): diff --git a/toontown/effects/Sparks.py b/toontown/effects/Sparks.py index 3c4d3e2..211ed0e 100644 --- a/toontown/effects/Sparks.py +++ b/toontown/effects/Sparks.py @@ -1,10 +1,7 @@ -import os - from panda3d.core import * - -from direct.directnotify import DirectNotifyGlobal from direct.particles import ParticleEffect - +from direct.directnotify import DirectNotifyGlobal +import os class Sparks(NodePath): diff --git a/toontown/effects/SparksTrail.py b/toontown/effects/SparksTrail.py index 7b2b107..dfa8420 100644 --- a/toontown/effects/SparksTrail.py +++ b/toontown/effects/SparksTrail.py @@ -1,12 +1,9 @@ from panda3d.core import * from panda3d.physics import * - from direct.interval.IntervalGlobal import * -from direct.particles import ForceGroup, ParticleEffect, Particles - -from .EffectController import EffectController +from direct.particles import ParticleEffect, Particles, ForceGroup from .PooledEffect import PooledEffect - +from .EffectController import EffectController class SparksTrail(PooledEffect, EffectController): diff --git a/toontown/effects/SparksTrailLong.py b/toontown/effects/SparksTrailLong.py index dd22ad5..aaf9f45 100644 --- a/toontown/effects/SparksTrailLong.py +++ b/toontown/effects/SparksTrailLong.py @@ -1,12 +1,9 @@ from panda3d.core import * from panda3d.physics import * - from direct.interval.IntervalGlobal import * -from direct.particles import ForceGroup, ParticleEffect, Particles - -from .EffectController import EffectController +from direct.particles import ParticleEffect, Particles, ForceGroup from .PooledEffect import PooledEffect - +from .EffectController import EffectController class SparksTrailLong(PooledEffect, EffectController): diff --git a/toontown/effects/Splash.py b/toontown/effects/Splash.py index 140f67b..bd34382 100644 --- a/toontown/effects/Splash.py +++ b/toontown/effects/Splash.py @@ -1,12 +1,8 @@ from panda3d.core import * - from direct.interval.IntervalGlobal import * - -from toontown.battle import BattleParticles -from toontown.battle.BattleProps import globalPropPool - from .Ripples import * - +from toontown.battle.BattleProps import globalPropPool +from toontown.battle import BattleParticles class Splash(NodePath): splashCount = 0 diff --git a/toontown/effects/StarBurst.py b/toontown/effects/StarBurst.py index f9f4c8e..a68520e 100644 --- a/toontown/effects/StarBurst.py +++ b/toontown/effects/StarBurst.py @@ -1,13 +1,10 @@ from panda3d.core import * from panda3d.physics import * - from direct.interval.IntervalGlobal import * -from direct.particles import ForceGroup, ParticleEffect, Particles - +from direct.particles import ParticleEffect, Particles, ForceGroup 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 986b18c..06e126e 100644 --- a/toontown/effects/TrailExplosion.py +++ b/toontown/effects/TrailExplosion.py @@ -1,14 +1,9 @@ -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 f094bbc..6ee5b39 100644 --- a/toontown/effects/Wake.py +++ b/toontown/effects/Wake.py @@ -1,10 +1,7 @@ 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 325c8b6..490b61f 100644 --- a/toontown/estate/BankGUI.py +++ b/toontown/estate/BankGUI.py @@ -1,12 +1,10 @@ -from panda3d.core import * - -from direct.directnotify import DirectNotifyGlobal 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.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 cd42b2e..be4d07f 100644 --- a/toontown/estate/BeanRecipeGui.py +++ b/toontown/estate/BeanRecipeGui.py @@ -1,12 +1,10 @@ -from panda3d.core import * - -from direct.directnotify import DirectNotifyGlobal from direct.gui.DirectGui import * - -from toontown.estate import GardenGlobals, PlantingGUI +from direct.directnotify import DirectNotifyGlobal +from panda3d.core import * +from toontown.estate import GardenGlobals +from toontown.estate import 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 d015764..1287d30 100644 --- a/toontown/estate/ClosetGUI.py +++ b/toontown/estate/ClosetGUI.py @@ -1,14 +1,12 @@ -from panda3d.core import * - -from direct.gui.DirectGui import * from direct.showbase.PythonUtil import Functor - +from direct.gui.DirectGui import * +from panda3d.core import * from toontown.makeatoon import ClothesGUI -from toontown.toonbase import ToontownGlobals, TTLocalizer -from toontown.toontowngui import TTDialog - from . import ClosetGlobals - +from toontown.toonbase import TTLocalizer +from toontown.toonbase import ToontownGlobals +from toontown.toontowngui import TTDialog +from toontown.toonbase import TTLocalizer class ClosetGUI(ClothesGUI.ClothesGUI): notify = directNotify.newCategory('ClosetGUI') diff --git a/toontown/estate/DistributedAnimatedStatuary.py b/toontown/estate/DistributedAnimatedStatuary.py index 9439e77..1b9936d 100644 --- a/toontown/estate/DistributedAnimatedStatuary.py +++ b/toontown/estate/DistributedAnimatedStatuary.py @@ -1,11 +1,9 @@ from panda3d.core import NodePath - -from direct.actor import Actor 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 +from direct.actor import Actor class DistributedAnimatedStatuary(DistributedStatuary.DistributedStatuary): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedAnimatedStatuary') diff --git a/toontown/estate/DistributedAnimatedStatuaryAI.py b/toontown/estate/DistributedAnimatedStatuaryAI.py index 5458ca0..75bf239 100644 --- a/toontown/estate/DistributedAnimatedStatuaryAI.py +++ b/toontown/estate/DistributedAnimatedStatuaryAI.py @@ -1,6 +1,5 @@ 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 2e13b5d..357e574 100644 --- a/toontown/estate/DistributedBank.py +++ b/toontown/estate/DistributedBank.py @@ -1,18 +1,18 @@ -from panda3d.core import * - -from direct.distributed.ClockDelta 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 panda3d.core import * from toontown.toonbase.ToontownGlobals import * -from toontown.toontowngui import TTDialog - -from . import BankGUI, DistributedFurnitureItem +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 toontown.toontowngui import TTDialog +from toontown.catalog.CatalogFurnitureItem import FurnitureTypes +from toontown.catalog.CatalogFurnitureItem import FTScale class DistributedBank(DistributedFurnitureItem.DistributedFurnitureItem): notify = directNotify.newCategory('DistributedBank') diff --git a/toontown/estate/DistributedBankAI.py b/toontown/estate/DistributedBankAI.py index 4860395..f6239a2 100644 --- a/toontown/estate/DistributedBankAI.py +++ b/toontown/estate/DistributedBankAI.py @@ -1,6 +1,5 @@ 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 2a27ebe..7a086eb 100644 --- a/toontown/estate/DistributedBankMgr.py +++ b/toontown/estate/DistributedBankMgr.py @@ -1,9 +1,7 @@ -from direct.directnotify import DirectNotifyGlobal from direct.distributed import DistributedObject - +from direct.directnotify import DirectNotifyGlobal 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 178b37f..aea1183 100644 --- a/toontown/estate/DistributedBankMgrAI.py +++ b/toontown/estate/DistributedBankMgrAI.py @@ -1,6 +1,5 @@ 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 2cb8b1c..12b07ab 100644 --- a/toontown/estate/DistributedCannon.py +++ b/toontown/estate/DistributedCannon.py @@ -1,23 +1,26 @@ -import math - from panda3d.core import * - -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 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 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 b103d47..a299411 100644 --- a/toontown/estate/DistributedCannonAI.py +++ b/toontown/estate/DistributedCannonAI.py @@ -1,14 +1,13 @@ -from direct.distributed import DistributedObjectAI -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 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 . import CannonGlobals - class DistributedCannonAI(DistributedObjectAI.DistributedObjectAI): notify = directNotify.newCategory('DistributedCannonAI') diff --git a/toontown/estate/DistributedChangingStatuary.py b/toontown/estate/DistributedChangingStatuary.py index d6a9c65..233d6aa 100644 --- a/toontown/estate/DistributedChangingStatuary.py +++ b/toontown/estate/DistributedChangingStatuary.py @@ -1,10 +1,8 @@ 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 ec370a6..f5836f4 100644 --- a/toontown/estate/DistributedChangingStatuaryAI.py +++ b/toontown/estate/DistributedChangingStatuaryAI.py @@ -1,6 +1,5 @@ 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 ed45e1e..b8da80b 100644 --- a/toontown/estate/DistributedCloset.py +++ b/toontown/estate/DistributedCloset.py @@ -1,19 +1,19 @@ -from panda3d.core import * - -from direct.distributed.ClockDelta import * -from direct.fsm import ClassicFSM, State, StateData from direct.gui.DirectGui import * -from direct.interval.IntervalGlobal import * -from direct.showbase import DirectObject -from direct.task.Task import Task - -from toontown.toon import ToonDNA -from toontown.toonbase import ToontownGlobals, TTLocalizer -from toontown.toonbase.ToonBaseGlobal import * +from panda3d.core import * from toontown.toonbase.ToontownGlobals import * - -from . import ClosetGlobals, ClosetGUI, DistributedFurnitureItem - +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.task.Task import Task +from . import ClosetGlobals +from . import DistributedFurnitureItem +from toontown.toonbase import TTLocalizer class DistributedCloset(DistributedFurnitureItem.DistributedFurnitureItem): notify = directNotify.newCategory('DistributedCloset') diff --git a/toontown/estate/DistributedClosetAI.py b/toontown/estate/DistributedClosetAI.py index 03748a3..eb3b7c7 100644 --- a/toontown/estate/DistributedClosetAI.py +++ b/toontown/estate/DistributedClosetAI.py @@ -1,6 +1,5 @@ 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 2523fb7..3ae4661 100644 --- a/toontown/estate/DistributedEstate.py +++ b/toontown/estate/DistributedEstate.py @@ -1,29 +1,35 @@ -import math -import pickle -import random -import time - 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 toontown.toon import Toon -from toontown.toonbase import ToontownGlobals, TTLocalizer 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 time +from direct.showbase import PythonUtil +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.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 8a0632f..50c1a0a 100644 --- a/toontown/estate/DistributedEstateAI.py +++ b/toontown/estate/DistributedEstateAI.py @@ -1,6 +1,5 @@ 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 9495256..402f0b9 100644 --- a/toontown/estate/DistributedFireworksCannon.py +++ b/toontown/estate/DistributedFireworksCannon.py @@ -1,15 +1,13 @@ -from panda3d.core import CollisionNode, CollisionSphere - -from direct.distributed.ClockDelta import * -from direct.interval.IntervalGlobal import * - -from toontown.effects import DistributedFireworkShow -from toontown.toonbase import ToontownGlobals, TTLocalizer from toontown.toonbase.ToontownGlobals import * - -from . import FireworksGui +from direct.interval.IntervalGlobal import * +from direct.distributed.ClockDelta import * from .HouseGlobals 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 . import FireworksGui class DistributedFireworksCannon(DistributedFireworkShow.DistributedFireworkShow): notify = directNotify.newCategory('DistributedFireworksCannon') diff --git a/toontown/estate/DistributedFireworksCannonAI.py b/toontown/estate/DistributedFireworksCannonAI.py index e38e0a4..1c84fa3 100644 --- a/toontown/estate/DistributedFireworksCannonAI.py +++ b/toontown/estate/DistributedFireworksCannonAI.py @@ -1,6 +1,5 @@ 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 8e7582d..8692847 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 DistributedPlantBase, FlowerBase, GardenGlobals -from toontown.toonbase import TTLocalizer +from toontown.estate import FlowerBase +from toontown.estate import GardenGlobals from toontown.toontowngui import TTDialog - +from toontown.toonbase import TTLocalizer DIRT_AS_WATER_INDICATOR = True DIRT_MOUND_HEIGHT = 0.3 diff --git a/toontown/estate/DistributedFlowerAI.py b/toontown/estate/DistributedFlowerAI.py index a08b04f..28e8cdf 100644 --- a/toontown/estate/DistributedFlowerAI.py +++ b/toontown/estate/DistributedFlowerAI.py @@ -1,6 +1,5 @@ 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 f85369f..b4fac97 100644 --- a/toontown/estate/DistributedFurnitureItem.py +++ b/toontown/estate/DistributedFurnitureItem.py @@ -1,14 +1,14 @@ -from direct.distributed import DistributedObject, DistributedSmoothNode -from direct.distributed.ClockDelta import * -from direct.interval.IntervalGlobal import * -from direct.task import Task - -from toontown.catalog import CatalogItem -from toontown.toonbase import ToontownGlobals, TTLocalizer from toontown.toonbase.ToontownGlobals import * - -from . import DistributedHouseItem, HouseGlobals - +from direct.interval.IntervalGlobal import * +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.task import Task +from . import HouseGlobals class DistributedFurnitureItem(DistributedHouseItem.DistributedHouseItem, DistributedSmoothNode.DistributedSmoothNode): notify = directNotify.newCategory('DistributedFurnitureItem') diff --git a/toontown/estate/DistributedFurnitureItemAI.py b/toontown/estate/DistributedFurnitureItemAI.py index 4955810..ae9d7ef 100644 --- a/toontown/estate/DistributedFurnitureItemAI.py +++ b/toontown/estate/DistributedFurnitureItemAI.py @@ -1,6 +1,5 @@ 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 5414cd9..f1ad12c 100644 --- a/toontown/estate/DistributedFurnitureManager.py +++ b/toontown/estate/DistributedFurnitureManager.py @@ -1,8 +1,7 @@ -from direct.directnotify.DirectNotifyGlobal import * from direct.distributed import DistributedObject - -from toontown.catalog import CatalogItem, CatalogItemList - +from toontown.catalog import CatalogItem +from toontown.catalog import CatalogItemList +from direct.directnotify.DirectNotifyGlobal import * class DistributedFurnitureManager(DistributedObject.DistributedObject): notify = directNotify.newCategory('DistributedFurnitureManager') diff --git a/toontown/estate/DistributedFurnitureManagerAI.py b/toontown/estate/DistributedFurnitureManagerAI.py index 21c8a82..281d411 100644 --- a/toontown/estate/DistributedFurnitureManagerAI.py +++ b/toontown/estate/DistributedFurnitureManagerAI.py @@ -1,6 +1,5 @@ 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 d883a2e..0f8d65e 100644 --- a/toontown/estate/DistributedGagTree.py +++ b/toontown/estate/DistributedGagTree.py @@ -1,19 +1,17 @@ -from panda3d.core import * - -from direct.directnotify import DirectNotifyGlobal +from toontown.estate import DistributedPlantBase from direct.interval.IntervalGlobal import * +from direct.directnotify import DirectNotifyGlobal from direct.showbase import PythonUtil -from direct.task import Task - -from otp.otpbase import OTPGlobals - -from toontown.estate import DistributedLawnDecor, DistributedPlantBase -from toontown.toonbase import ToontownBattleGlobals, TTLocalizer +from toontown.toonbase import ToontownBattleGlobals from toontown.toontowngui import TTDialog from toontown.toontowngui.TeaserPanel import TeaserPanel - -from . import GardenGlobals, HouseGlobals - +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 DIRT_AS_WATER_INDICATOR = True class DistributedGagTree(DistributedPlantBase.DistributedPlantBase): diff --git a/toontown/estate/DistributedGagTreeAI.py b/toontown/estate/DistributedGagTreeAI.py index 1ce18a2..c36989e 100644 --- a/toontown/estate/DistributedGagTreeAI.py +++ b/toontown/estate/DistributedGagTreeAI.py @@ -1,6 +1,5 @@ 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 2817d5e..db02cd5 100644 --- a/toontown/estate/DistributedGarden.py +++ b/toontown/estate/DistributedGarden.py @@ -1,22 +1,23 @@ -import pickle -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 toontown.toon import Toon -from toontown.toonbase import ToontownGlobals, TTLocalizer from toontown.toonbase.ToonBaseGlobal import * - -from . import Estate, HouseGlobals - +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 +from toontown.hood import Place +from . import Estate +from . import HouseGlobals class DistributedGarden(DistributedObject.DistributedObject): notify = directNotify.newCategory('DistributedGarden') diff --git a/toontown/estate/DistributedGardenAI.py b/toontown/estate/DistributedGardenAI.py index dbd0b57..818fc03 100644 --- a/toontown/estate/DistributedGardenAI.py +++ b/toontown/estate/DistributedGardenAI.py @@ -1,6 +1,5 @@ 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 8ec0a97..1be06b7 100644 --- a/toontown/estate/DistributedGardenBox.py +++ b/toontown/estate/DistributedGardenBox.py @@ -1,14 +1,13 @@ -from panda3d.core import NodePath, Vec3 - +from . import DistributedLawnDecor from direct.directnotify import DirectNotifyGlobal -from direct.distributed import DistributedNode from direct.showbase.ShowBase import * - -from toontown.estate import PlantingGUI, PlantTreeGUI +from . import GardenGlobals from toontown.toonbase import TTLocalizer - -from . import DistributedLawnDecor, GardenGlobals - +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 class DistributedGardenBox(DistributedLawnDecor.DistributedLawnDecor): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedGardenPlot') diff --git a/toontown/estate/DistributedGardenBoxAI.py b/toontown/estate/DistributedGardenBoxAI.py index e20f46e..39fd060 100644 --- a/toontown/estate/DistributedGardenBoxAI.py +++ b/toontown/estate/DistributedGardenBoxAI.py @@ -1,6 +1,5 @@ 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 ec3d19f..cd39b40 100644 --- a/toontown/estate/DistributedGardenPlot.py +++ b/toontown/estate/DistributedGardenPlot.py @@ -1,17 +1,16 @@ -import types - -from panda3d.core import NodePath, Vec4 - +from . import DistributedLawnDecor from direct.directnotify import DirectNotifyGlobal -from direct.interval.IntervalGlobal import * from direct.showbase.ShowBase import * - -from toontown.estate import PlantingGUI, PlantTreeGUI, ToonStatueSelectionGUI +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 . import DistributedLawnDecor, GardenGlobals - +from panda3d.core import Vec4 +from panda3d.core import NodePath +import types class DistributedGardenPlot(DistributedLawnDecor.DistributedLawnDecor): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedGardenPlot') diff --git a/toontown/estate/DistributedGardenPlotAI.py b/toontown/estate/DistributedGardenPlotAI.py index b7c7ed8..d29cf2f 100644 --- a/toontown/estate/DistributedGardenPlotAI.py +++ b/toontown/estate/DistributedGardenPlotAI.py @@ -1,6 +1,5 @@ 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 a7a366d..6856058 100644 --- a/toontown/estate/DistributedHouse.py +++ b/toontown/estate/DistributedHouse.py @@ -1,25 +1,24 @@ -import random -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 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 direct.showbase.MessengerGlobal import messenger class DistributedHouse(DistributedObject.DistributedObject): notify = directNotify.newCategory('DistributedHouse') diff --git a/toontown/estate/DistributedHouseAI.py b/toontown/estate/DistributedHouseAI.py index d3940be..7651b5f 100644 --- a/toontown/estate/DistributedHouseAI.py +++ b/toontown/estate/DistributedHouseAI.py @@ -1,6 +1,5 @@ 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 c0c797a..65a74f0 100644 --- a/toontown/estate/DistributedHouseDoor.py +++ b/toontown/estate/DistributedHouseDoor.py @@ -1,18 +1,17 @@ +from toontown.toonbase.ToonBaseGlobal 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 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 toontown.building import DistributedDoor, DoorTypes, FADoorCodes +from direct.fsm import ClassicFSM +from toontown.building import DistributedDoor from toontown.hood import ZoneUtil from toontown.suit import Suit -from toontown.toonbase import ToontownGlobals -from toontown.toonbase.ToonBaseGlobal import * - +from toontown.building import FADoorCodes +from toontown.building import DoorTypes class DistributedHouseDoor(DistributedDoor.DistributedDoor): diff --git a/toontown/estate/DistributedHouseDoorAI.py b/toontown/estate/DistributedHouseDoorAI.py index 72a4559..90bcc37 100644 --- a/toontown/estate/DistributedHouseDoorAI.py +++ b/toontown/estate/DistributedHouseDoorAI.py @@ -1,6 +1,5 @@ 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 d28279e..7454fbc 100644 --- a/toontown/estate/DistributedHouseInterior.py +++ b/toontown/estate/DistributedHouseInterior.py @@ -1,17 +1,18 @@ +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 9c264c3..76cb8a6 100644 --- a/toontown/estate/DistributedHouseInteriorAI.py +++ b/toontown/estate/DistributedHouseInteriorAI.py @@ -1,6 +1,5 @@ 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 4cd3ad8..f1f1267 100644 --- a/toontown/estate/DistributedHouseItem.py +++ b/toontown/estate/DistributedHouseItem.py @@ -1,10 +1,9 @@ -from direct.distributed import DistributedObject -from direct.distributed.ClockDelta import * -from direct.interval.IntervalGlobal import * - -from toontown.toonbase import ToontownGlobals, TTLocalizer 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 class DistributedHouseItem(DistributedObject.DistributedObject): notify = directNotify.newCategory('DistributedHouseItem') diff --git a/toontown/estate/DistributedLawnDecor.py b/toontown/estate/DistributedLawnDecor.py index 00f0615..7575926 100644 --- a/toontown/estate/DistributedLawnDecor.py +++ b/toontown/estate/DistributedLawnDecor.py @@ -1,22 +1,19 @@ -import math -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.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 otp.avatar import ShadowCaster -from otp.otpbase import OTPGlobals - -from toontown.estate import GardenGlobals 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 otp.otpbase import OTPGlobals +from toontown.estate import GardenGlobals def recurseParent(intoNode, ParentName): parent = intoNode.getParent(0) diff --git a/toontown/estate/DistributedLawnDecorAI.py b/toontown/estate/DistributedLawnDecorAI.py index bf13755..6e2b917 100644 --- a/toontown/estate/DistributedLawnDecorAI.py +++ b/toontown/estate/DistributedLawnDecorAI.py @@ -1,6 +1,5 @@ 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 c4c5f80..a82d763 100644 --- a/toontown/estate/DistributedMailbox.py +++ b/toontown/estate/DistributedMailbox.py @@ -1,18 +1,16 @@ -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 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 direct.interval.IntervalGlobal import SoundInterval FlagPitchEmpty = -70 FlagPitchFull = 0 diff --git a/toontown/estate/DistributedMailboxAI.py b/toontown/estate/DistributedMailboxAI.py index b690a24..63e38c9 100644 --- a/toontown/estate/DistributedMailboxAI.py +++ b/toontown/estate/DistributedMailboxAI.py @@ -1,6 +1,5 @@ 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 51d1a45..bcf9bee 100644 --- a/toontown/estate/DistributedPhone.py +++ b/toontown/estate/DistributedPhone.py @@ -1,22 +1,21 @@ -import string - -from panda3d.core import * - +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 from direct.actor import Actor -from direct.directnotify.DirectNotifyGlobal import * +from . import DistributedFurnitureItem from direct.distributed import ClockDelta -from direct.interval.IntervalGlobal import * from direct.showbase import PythonUtil from direct.showutil import Rope -from direct.task import Task - -from toontown.catalog import CatalogItem, CatalogScreen +from direct.directnotify.DirectNotifyGlobal import * +from panda3d.core import * +from direct.interval.IntervalGlobal import * +import string from toontown.quest import Quests -from toontown.toonbase import ToontownGlobals, TTLocalizer -from toontown.toontowngui import TTDialog - -from . import DistributedFurnitureItem, DistributedHouseInterior, PhoneGlobals - +from direct.task import Task class DistributedPhone(DistributedFurnitureItem.DistributedFurnitureItem): notify = directNotify.newCategory('DistributedPhone') diff --git a/toontown/estate/DistributedPhoneAI.py b/toontown/estate/DistributedPhoneAI.py index a5868db..7eeb4b3 100644 --- a/toontown/estate/DistributedPhoneAI.py +++ b/toontown/estate/DistributedPhoneAI.py @@ -1,6 +1,5 @@ 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 b4dc229..f0920fe 100644 --- a/toontown/estate/DistributedPlantBase.py +++ b/toontown/estate/DistributedPlantBase.py @@ -1,12 +1,10 @@ -from direct.directnotify import DirectNotifyGlobal +from . import DistributedLawnDecor from direct.interval.IntervalGlobal import * +from direct.directnotify import DirectNotifyGlobal 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 2696e04..4d23e4d 100644 --- a/toontown/estate/DistributedPlantBaseAI.py +++ b/toontown/estate/DistributedPlantBaseAI.py @@ -1,6 +1,5 @@ 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 6a5591c..2b6493c 100644 --- a/toontown/estate/DistributedStatuary.py +++ b/toontown/estate/DistributedStatuary.py @@ -1,13 +1,13 @@ -from panda3d.core import NodePath, Point3 - +from . import DistributedLawnDecor from direct.directnotify import DirectNotifyGlobal from direct.showbase.ShowBase import * - -from toontown.toonbase import ToontownGlobals, TTLocalizer +from . import GardenGlobals +from toontown.toonbase import TTLocalizer +from toontown.toonbase import ToontownGlobals from toontown.toontowngui import TTDialog - -from . import DistributedLawnDecor, GardenGlobals - +from toontown.toonbase import TTLocalizer +from panda3d.core import NodePath +from panda3d.core import Point3 class DistributedStatuary(DistributedLawnDecor.DistributedLawnDecor): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedStatuary') diff --git a/toontown/estate/DistributedStatuaryAI.py b/toontown/estate/DistributedStatuaryAI.py index 0fd5c79..ca087e0 100644 --- a/toontown/estate/DistributedStatuaryAI.py +++ b/toontown/estate/DistributedStatuaryAI.py @@ -1,6 +1,5 @@ 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 e27617d..fc9d7ef 100644 --- a/toontown/estate/DistributedTarget.py +++ b/toontown/estate/DistributedTarget.py @@ -1,13 +1,12 @@ -from panda3d.core import * - -from direct.directnotify import DirectNotifyGlobal -from direct.distributed import DistributedObject from direct.gui.DirectGui import * +from panda3d.core import * +from panda3d.core import * from direct.interval.IntervalGlobal import * - -from toontown.toonbase import ToontownTimer, TTLocalizer 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 class DistributedTarget(DistributedObject.DistributedObject): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedTarget') diff --git a/toontown/estate/DistributedTargetAI.py b/toontown/estate/DistributedTargetAI.py index 4b794b2..f2cf37b 100644 --- a/toontown/estate/DistributedTargetAI.py +++ b/toontown/estate/DistributedTargetAI.py @@ -1,6 +1,5 @@ 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 70278ff..b418317 100644 --- a/toontown/estate/DistributedToonStatuary.py +++ b/toontown/estate/DistributedToonStatuary.py @@ -1,15 +1,15 @@ -from panda3d.core import * -from panda3d.core import NodePath, Point3 - +from toontown.estate import DistributedStatuary +from toontown.estate import DistributedLawnDecor from direct.directnotify import DirectNotifyGlobal from direct.showbase.ShowBase import * - -from toontown.estate import DistributedLawnDecor, DistributedStatuary -from toontown.toon import Toon, ToonDNA -from toontown.toonbase import ToontownGlobals, TTLocalizer - +from panda3d.core import * +from toontown.toon import Toon +from toontown.toon import ToonDNA from . import GardenGlobals - +from toontown.toonbase import TTLocalizer +from toontown.toonbase import ToontownGlobals +from 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 daaab80..8d0ca2a 100644 --- a/toontown/estate/DistributedToonStatuaryAI.py +++ b/toontown/estate/DistributedToonStatuaryAI.py @@ -1,6 +1,5 @@ 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 fce8fee..a90d882 100644 --- a/toontown/estate/DistributedTrunk.py +++ b/toontown/estate/DistributedTrunk.py @@ -1,14 +1,13 @@ from panda3d.core import * - from direct.gui.DirectGui import * -from direct.interval.IntervalGlobal import * from direct.task.Task import Task - +from direct.interval.IntervalGlobal import * +from . import DistributedCloset +from . import ClosetGlobals +from . import TrunkGUI from toontown.toon import ToonDNA -from toontown.toonbase import ToontownGlobals, TTLocalizer - -from . import ClosetGlobals, DistributedCloset, TrunkGUI - +from toontown.toonbase import TTLocalizer +from toontown.toonbase import ToontownGlobals N_A = 0 class DistributedTrunk(DistributedCloset.DistributedCloset): diff --git a/toontown/estate/DistributedTrunkAI.py b/toontown/estate/DistributedTrunkAI.py index 1451611..382d49c 100644 --- a/toontown/estate/DistributedTrunkAI.py +++ b/toontown/estate/DistributedTrunkAI.py @@ -1,6 +1,5 @@ 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 0656023..cec60b3 100644 --- a/toontown/estate/Estate.py +++ b/toontown/estate/Estate.py @@ -1,27 +1,23 @@ -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 93e5ed9..f57d5c9 100644 --- a/toontown/estate/EstateLoader.py +++ b/toontown/estate/EstateLoader.py @@ -1,19 +1,17 @@ -import math -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 - +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 +from direct.directnotify import DirectNotifyGlobal class EstateLoader(SafeZoneLoader.SafeZoneLoader): notify = DirectNotifyGlobal.directNotify.newCategory('EstateLoader') diff --git a/toontown/estate/EstateManager.py b/toontown/estate/EstateManager.py index 0f7cb30..a3719c2 100644 --- a/toontown/estate/EstateManager.py +++ b/toontown/estate/EstateManager.py @@ -1,15 +1,13 @@ -import random - from panda3d.core import * - -from direct.directnotify import DirectNotifyGlobal +from toontown.toonbase import ToontownGlobals from direct.distributed import DistributedObject +from direct.directnotify import DirectNotifyGlobal +import random from direct.gui.DirectGui import * - -from toontown.toonbase import ToontownGlobals, TTLocalizer - -from . import Estate, HouseGlobals - +from panda3d.core import * +from toontown.toonbase import TTLocalizer +from . import HouseGlobals +from . import Estate class EstateManager(DistributedObject.DistributedObject): notify = DirectNotifyGlobal.directNotify.newCategory('EstateManager') diff --git a/toontown/estate/EstateManagerAI.py b/toontown/estate/EstateManagerAI.py index 9b2280e..bf2536c 100644 --- a/toontown/estate/EstateManagerAI.py +++ b/toontown/estate/EstateManagerAI.py @@ -1,6 +1,5 @@ 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 13ef6ea..1887cae 100644 --- a/toontown/estate/FireworkItemPanel.py +++ b/toontown/estate/FireworkItemPanel.py @@ -1,13 +1,11 @@ -from panda3d.core import * - from direct.gui.DirectGui import * - -from toontown.effects import FireworkGlobals, Fireworks -from toontown.toonbase import ToontownGlobals, TTLocalizer - +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 . import FireworksGui - class FireworkItemPanel(DirectFrame): def __init__(self, itemName, itemNum, *extraArgs): diff --git a/toontown/estate/FireworksGui.py b/toontown/estate/FireworksGui.py index 9bbb215..40cb57c 100644 --- a/toontown/estate/FireworksGui.py +++ b/toontown/estate/FireworksGui.py @@ -1,14 +1,11 @@ -from panda3d.core import * - -from direct.directnotify import DirectNotifyGlobal from direct.gui.DirectGui import * +from panda3d.core import * from direct.gui.DirectScrolledList import * - -from toontown.effects import FireworkGlobals, Fireworks from toontown.toonbase import ToontownGlobals - from . import FireworkItemPanel - +from direct.directnotify import DirectNotifyGlobal +from toontown.effects import FireworkGlobals +from toontown.effects import Fireworks NUM_ITEMS_SHOWN = 4 class FireworksGui(DirectFrame): diff --git a/toontown/estate/FlowerBase.py b/toontown/estate/FlowerBase.py index 022365a..8e9699c 100644 --- a/toontown/estate/FlowerBase.py +++ b/toontown/estate/FlowerBase.py @@ -1,9 +1,6 @@ -from direct.directnotify import DirectNotifyGlobal - -from toontown.toonbase import TTLocalizer - from . import GardenGlobals - +from toontown.toonbase import TTLocalizer +from direct.directnotify import DirectNotifyGlobal class FlowerBase: notify = DirectNotifyGlobal.directNotify.newCategory('FlowerBase') diff --git a/toontown/estate/FlowerBasket.py b/toontown/estate/FlowerBasket.py index adacff0..2842e58 100644 --- a/toontown/estate/FlowerBasket.py +++ b/toontown/estate/FlowerBasket.py @@ -1,7 +1,6 @@ +from . import GardenGlobals from direct.directnotify import DirectNotifyGlobal - -from . import FlowerBase, GardenGlobals - +from . import FlowerBase class FlowerBasket: notify = DirectNotifyGlobal.directNotify.newCategory('FlowerBasket') diff --git a/toontown/estate/FlowerBrowser.py b/toontown/estate/FlowerBrowser.py index 4ec1807..00213fe 100644 --- a/toontown/estate/FlowerBrowser.py +++ b/toontown/estate/FlowerBrowser.py @@ -1,12 +1,10 @@ -from panda3d.core import * - +from toontown.toonbase import ToontownGlobals from direct.directnotify import DirectNotifyGlobal from direct.gui.DirectGui import * - -from toontown.toonbase import ToontownGlobals, TTLocalizer - -from . import FlowerSpeciesPanel, GardenGlobals - +from panda3d.core import * +from toontown.toonbase import TTLocalizer +from . import FlowerSpeciesPanel +from . import GardenGlobals class FlowerBrowser(DirectScrolledList): notify = DirectNotifyGlobal.directNotify.newCategory('FlowerBrowser') diff --git a/toontown/estate/FlowerCollection.py b/toontown/estate/FlowerCollection.py index 4b5e4c1..ba4b55e 100644 --- a/toontown/estate/FlowerCollection.py +++ b/toontown/estate/FlowerCollection.py @@ -1,7 +1,6 @@ +from . import GardenGlobals from direct.directnotify import DirectNotifyGlobal - -from . import FlowerBase, GardenGlobals - +from . import FlowerBase class FlowerCollection: notify = DirectNotifyGlobal.directNotify.newCategory('FlowerCollection') diff --git a/toontown/estate/FlowerPanel.py b/toontown/estate/FlowerPanel.py index 9d648a7..1830656 100644 --- a/toontown/estate/FlowerPanel.py +++ b/toontown/estate/FlowerPanel.py @@ -1,13 +1,11 @@ -from panda3d.core import * - +from toontown.toonbase import ToontownGlobals 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 toontown.toonbase import ToontownGlobals, TTLocalizer - -from . import FlowerPhoto, GardenGlobals - +from . import GardenGlobals +from . import FlowerPhoto class FlowerPanel(DirectFrame): notify = DirectNotifyGlobal.directNotify.newCategory('FlowerPanel') diff --git a/toontown/estate/FlowerPhoto.py b/toontown/estate/FlowerPhoto.py index 2e3e051..a49034e 100644 --- a/toontown/estate/FlowerPhoto.py +++ b/toontown/estate/FlowerPhoto.py @@ -1,13 +1,9 @@ -from panda3d.core import * - -from direct.actor import Actor 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 class DirectRegion(NodePath): notify = DirectNotifyGlobal.directNotify.newCategory('DirectRegion') diff --git a/toontown/estate/FlowerPicker.py b/toontown/estate/FlowerPicker.py index 83adc54..8f4474e 100644 --- a/toontown/estate/FlowerPicker.py +++ b/toontown/estate/FlowerPicker.py @@ -1,13 +1,10 @@ -from panda3d.core import * - +from toontown.toonbase import ToontownGlobals from direct.directnotify import DirectNotifyGlobal from direct.gui.DirectGui import * - -from toontown.toonbase import ToontownGlobals, TTLocalizer - +from panda3d.core import * +from toontown.toonbase import 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 d30c0e4..3ebf1f0 100644 --- a/toontown/estate/FlowerSellGUI.py +++ b/toontown/estate/FlowerSellGUI.py @@ -1,13 +1,11 @@ -from panda3d.core import * - -from direct.directnotify import DirectNotifyGlobal 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.toonbase import ToontownGlobals, TTLocalizer - -from . import FlowerBase, FlowerPicker - +from . import FlowerBase +from . import FlowerPicker class FlowerSellGUI(DirectFrame): notify = DirectNotifyGlobal.directNotify.newCategory('FlowerGui') diff --git a/toontown/estate/FlowerSpeciesPanel.py b/toontown/estate/FlowerSpeciesPanel.py index dba2016..4ffedc7 100644 --- a/toontown/estate/FlowerSpeciesPanel.py +++ b/toontown/estate/FlowerSpeciesPanel.py @@ -1,13 +1,11 @@ -from panda3d.core import * - +from toontown.toonbase import ToontownGlobals 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 e0fb998..17c720d 100644 --- a/toontown/estate/GameSprite.py +++ b/toontown/estate/GameSprite.py @@ -1,6 +1,5 @@ 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 e5818b1..ed9f72b 100644 --- a/toontown/estate/GardenDropGame.py +++ b/toontown/estate/GardenDropGame.py @@ -1,26 +1,27 @@ -import math -import pickle -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 direct.task.Task import Task - -from toontown.toon import Toon -from toontown.toonbase import ToontownGlobals, TTLocalizer 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 - -from . import GameSprite, GardenProgressMeter - +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 +from math import pi +from . import GardenProgressMeter class GardenDropGame(DirectObject.DirectObject): diff --git a/toontown/estate/GardenGlobals.py b/toontown/estate/GardenGlobals.py index 3fb7385..f813259 100644 --- a/toontown/estate/GardenGlobals.py +++ b/toontown/estate/GardenGlobals.py @@ -1,9 +1,6 @@ -import random - -from direct.directnotify import DirectNotifyGlobal - from toontown.toonbase import TTLocalizer - +from direct.directnotify import DirectNotifyGlobal +import random 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 b4c9b1a..5c67898 100644 --- a/toontown/estate/GardenProgressMeter.py +++ b/toontown/estate/GardenProgressMeter.py @@ -1,26 +1,26 @@ -import math -import pickle -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 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 - +from math import pi +from toontown.estate import GardenGlobals SHOVEL = 0 WATERINGCAN = 1 GAMEWIN = 2 diff --git a/toontown/estate/GardenTutorial.py b/toontown/estate/GardenTutorial.py index e2bba2c..1659b16 100644 --- a/toontown/estate/GardenTutorial.py +++ b/toontown/estate/GardenTutorial.py @@ -1,11 +1,9 @@ -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 - +from direct.fsm import FSM +from direct.directnotify import DirectNotifyGlobal +from toontown.toonbase import ToontownGlobals +from toontown.toonbase import TTLocalizer +from panda3d.core import * class GardenTutorial(DirectFrame, FSM.FSM): notify = DirectNotifyGlobal.directNotify.newCategory('GardenTutorial') diff --git a/toontown/estate/House.py b/toontown/estate/House.py index bfc3090..4e90aa3 100644 --- a/toontown/estate/House.py +++ b/toontown/estate/House.py @@ -1,16 +1,15 @@ from panda3d.core import * - -from direct.directnotify import DirectNotifyGlobal -from direct.fsm import ClassicFSM, State, StateData -from direct.showbase import DirectObject -from direct.task import Task - -from otp.distributed.TelemetryLimiter import RotationLimitToH, TLGatherAllAvs - -from toontown.hood import Place -from toontown.toonbase import ToontownGlobals, TTLocalizer from toontown.toonbase.ToonBaseGlobal import * - +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 otp.distributed.TelemetryLimiter import RotationLimitToH, TLGatherAllAvs +from toontown.toonbase import ToontownGlobals +from toontown.toonbase import TTLocalizer class House(Place.Place): notify = DirectNotifyGlobal.directNotify.newCategory('House') diff --git a/toontown/estate/PlantTreeGUI.py b/toontown/estate/PlantTreeGUI.py index 2506c54..0efebca 100644 --- a/toontown/estate/PlantTreeGUI.py +++ b/toontown/estate/PlantTreeGUI.py @@ -1,14 +1,11 @@ -import string - from direct.directnotify import DirectNotifyGlobal -from direct.fsm import StateData from direct.showbase.ShowBase import * - from toontown.toonbase import TTLocalizer +import string +from direct.fsm import StateData 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 d2814f7..12e3f1d 100644 --- a/toontown/estate/PlantingGUI.py +++ b/toontown/estate/PlantingGUI.py @@ -1,13 +1,12 @@ -from panda3d.core import * - -from direct.directnotify import DirectNotifyGlobal from direct.gui.DirectGui import * -from direct.interval.IntervalGlobal 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, SpecialsPhoto -from toontown.toonbase import ToontownGlobals, TTLocalizer - +from toontown.estate import GardenGlobals +from direct.interval.IntervalGlobal import * +from toontown.estate import SpecialsPhoto 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 6b4262c..c3caa51 100644 --- a/toontown/estate/SpecialsPhoto.py +++ b/toontown/estate/SpecialsPhoto.py @@ -1,15 +1,10 @@ -import random - -from panda3d.core import * - -from direct.actor import Actor 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 class DirectRegion(NodePath): notify = DirectNotifyGlobal.directNotify.newCategory('DirectRegion') diff --git a/toontown/estate/ToonStatueSelectionGUI.py b/toontown/estate/ToonStatueSelectionGUI.py index dbe8254..f352a3b 100644 --- a/toontown/estate/ToonStatueSelectionGUI.py +++ b/toontown/estate/ToonStatueSelectionGUI.py @@ -1,16 +1,17 @@ -from panda3d.core import * - -from direct.directnotify import DirectNotifyGlobal -from direct.distributed import DistributedObject +from toontown.estate import PlantingGUI from direct.gui.DirectGui import * -from direct.gui.DirectScrolledList import * -from direct.interval.IntervalGlobal 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 DistributedToonStatuary, GardenGlobals, PlantingGUI -from toontown.toon import DistributedToon, Toon -from toontown.toonbase import ToontownGlobals, TTLocalizer - +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 class ToonStatueSelectionGUI(DirectFrame): notify = DirectNotifyGlobal.directNotify.newCategory('ToonStatueSelectionGUI') diff --git a/toontown/estate/TrunkGUI.py b/toontown/estate/TrunkGUI.py index 3c51e7d..9332b57 100644 --- a/toontown/estate/TrunkGUI.py +++ b/toontown/estate/TrunkGUI.py @@ -1,19 +1,16 @@ +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 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 - +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 class TrunkGUI(StateData.StateData): notify = directNotify.newCategory('TrunkGUI') diff --git a/toontown/estate/houseDesign.py b/toontown/estate/houseDesign.py index 143e852..162da33 100644 --- a/toontown/estate/houseDesign.py +++ b/toontown/estate/houseDesign.py @@ -1,20 +1,18 @@ -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 direct.showbase import PythonUtil +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 otp.otpbase import OTPLocalizer - -from toontown.catalog import CatalogFurnitureItem, CatalogItemTypes -from toontown.toonbase import ToontownGlobals, TTLocalizer +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 otp.otpbase import OTPLocalizer 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 1c80467..411937f 100644 --- a/toontown/fishing/BingoCardBase.py +++ b/toontown/fishing/BingoCardBase.py @@ -1,10 +1,8 @@ -from math import ceil, pow - from direct.directnotify import DirectNotifyGlobal +from toontown.fishing import FishGlobals +from toontown.fishing import BingoGlobals from direct.showbase import RandomNumGen - -from toontown.fishing import BingoGlobals, FishGlobals - +from math import ceil, pow class BingoCardBase: notify = DirectNotifyGlobal.directNotify.newCategory('BingoCardBase') diff --git a/toontown/fishing/BingoCardCell.py b/toontown/fishing/BingoCardCell.py index 2df6855..1a0196f 100644 --- a/toontown/fishing/BingoCardCell.py +++ b/toontown/fishing/BingoCardCell.py @@ -1,13 +1,12 @@ -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.fishing import BingoGlobals, FishPhoto -from toontown.toonbase import ToontownGlobals, TTLocalizer - +from toontown.toonbase import ToontownGlobals +from toontown.toonbase import TTLocalizer +from toontown.fishing import FishPhoto +from toontown.fishing import BingoGlobals class BingoCardCell(DirectButton, FSM.FSM): notify = DirectNotifyGlobal.directNotify.newCategory('BingoCardCell') diff --git a/toontown/fishing/BingoCardGui.py b/toontown/fishing/BingoCardGui.py index f941f83..b289d55 100644 --- a/toontown/fishing/BingoCardGui.py +++ b/toontown/fishing/BingoCardGui.py @@ -1,16 +1,17 @@ -import random - -from panda3d.core import * - from direct.directnotify import DirectNotifyGlobal from direct.gui.DirectGui import * -from direct.showbase import RandomNumGen +from panda3d.core import * from direct.task import Task - -from toontown.fishing import BingoCardCell, BingoGlobals, FishBase, FishGlobals -from toontown.toonbase import ToontownGlobals, ToontownTimer, TTLocalizer +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 toontown.toontowngui import TTDialog - BG = BingoGlobals class BingoCardGui(DirectFrame): diff --git a/toontown/fishing/BingoGlobals.py b/toontown/fishing/BingoGlobals.py index 8e3633f..5f1ff49 100644 --- a/toontown/fishing/BingoGlobals.py +++ b/toontown/fishing/BingoGlobals.py @@ -1,5 +1,4 @@ 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 913f830..b5d8afb 100644 --- a/toontown/fishing/BlockoutBingo.py +++ b/toontown/fishing/BlockoutBingo.py @@ -1,7 +1,6 @@ from direct.directnotify import DirectNotifyGlobal - -from toontown.fishing import BingoCardBase, BingoGlobals - +from toontown.fishing import BingoGlobals +from toontown.fishing import BingoCardBase class BlockoutBingo(BingoCardBase.BingoCardBase): notify = DirectNotifyGlobal.directNotify.newCategory('BlockoutBingo') diff --git a/toontown/fishing/DiagonalBingo.py b/toontown/fishing/DiagonalBingo.py index bb4f7c3..f5b8063 100644 --- a/toontown/fishing/DiagonalBingo.py +++ b/toontown/fishing/DiagonalBingo.py @@ -1,7 +1,6 @@ from direct.directnotify import DirectNotifyGlobal - -from toontown.fishing import BingoCardBase, BingoGlobals - +from toontown.fishing import BingoGlobals +from toontown.fishing import BingoCardBase class DiagonalBingo(BingoCardBase.BingoCardBase): notify = DirectNotifyGlobal.directNotify.newCategory('DiagonalBingo') diff --git a/toontown/fishing/DistributedFishingPond.py b/toontown/fishing/DistributedFishingPond.py index d16d3c8..c537115 100644 --- a/toontown/fishing/DistributedFishingPond.py +++ b/toontown/fishing/DistributedFishingPond.py @@ -1,14 +1,11 @@ -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 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.task import Task class DistributedFishingPond(DistributedObject.DistributedObject): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedFishingPond') diff --git a/toontown/fishing/DistributedFishingPondAI.py b/toontown/fishing/DistributedFishingPondAI.py index 7863f22..d2e86ab 100644 --- a/toontown/fishing/DistributedFishingPondAI.py +++ b/toontown/fishing/DistributedFishingPondAI.py @@ -1,7 +1,6 @@ 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 d7c34a0..b534f98 100644 --- a/toontown/fishing/DistributedFishingTarget.py +++ b/toontown/fishing/DistributedFishingTarget.py @@ -1,21 +1,17 @@ -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 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 +from toontown.effects import Bubbles class DistributedFishingTarget(DistributedNode.DistributedNode): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedFishingTarget') diff --git a/toontown/fishing/DistributedFishingTargetAI.py b/toontown/fishing/DistributedFishingTargetAI.py index 1b85de8..f485077 100644 --- a/toontown/fishing/DistributedFishingTargetAI.py +++ b/toontown/fishing/DistributedFishingTargetAI.py @@ -1,6 +1,5 @@ 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 d30a968..a9c62a3 100644 --- a/toontown/fishing/DistributedPondBingoManager.py +++ b/toontown/fishing/DistributedPondBingoManager.py @@ -1,19 +1,23 @@ -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 direct.showbase import RandomNumGen +from panda3d.core import * from direct.task import Task - -from toontown.fishing import (BingoCardGui, BingoGlobals, BlockoutBingo, DiagonalBingo, FishGlobals, FourCornerBingo, - NormalBingo, ThreewayBingo) -from toontown.toonbase import ToontownGlobals, ToontownTimer, TTLocalizer - +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 class DistributedPondBingoManager(DistributedObject.DistributedObject, FSM.FSM): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedPondBingoManager') diff --git a/toontown/fishing/DistributedPondBingoManagerAI.py b/toontown/fishing/DistributedPondBingoManagerAI.py index 2cf5019..a190c85 100644 --- a/toontown/fishing/DistributedPondBingoManagerAI.py +++ b/toontown/fishing/DistributedPondBingoManagerAI.py @@ -1,6 +1,5 @@ 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 36cfad1..a339117 100644 --- a/toontown/fishing/FishBase.py +++ b/toontown/fishing/FishBase.py @@ -1,9 +1,6 @@ -from direct.directnotify import DirectNotifyGlobal - -from toontown.toonbase import TTLocalizer - from . import FishGlobals - +from toontown.toonbase import TTLocalizer +from direct.directnotify import DirectNotifyGlobal class FishBase: notify = DirectNotifyGlobal.directNotify.newCategory('FishBase') diff --git a/toontown/fishing/FishBrowser.py b/toontown/fishing/FishBrowser.py index 1245694..04e012c 100644 --- a/toontown/fishing/FishBrowser.py +++ b/toontown/fishing/FishBrowser.py @@ -1,12 +1,10 @@ -from panda3d.core import * - +from toontown.toonbase import ToontownGlobals from direct.directnotify import DirectNotifyGlobal from direct.gui.DirectGui import * - -from toontown.toonbase import ToontownGlobals, TTLocalizer - -from . import FishGlobals, GenusPanel - +from panda3d.core import * +from toontown.toonbase import TTLocalizer +from . import GenusPanel +from . import FishGlobals class FishBrowser(DirectScrolledList): notify = DirectNotifyGlobal.directNotify.newCategory('FishBrowser') diff --git a/toontown/fishing/FishCollection.py b/toontown/fishing/FishCollection.py index 1ee7552..60d863f 100644 --- a/toontown/fishing/FishCollection.py +++ b/toontown/fishing/FishCollection.py @@ -1,5 +1,5 @@ -from . import FishBase, FishGlobals - +from . import FishBase +from . import FishGlobals class FishCollection: diff --git a/toontown/fishing/FishGlobals.py b/toontown/fishing/FishGlobals.py index 4e300a9..b726fac 100644 --- a/toontown/fishing/FishGlobals.py +++ b/toontown/fishing/FishGlobals.py @@ -1,9 +1,8 @@ -import copy -import random +from toontown.toonbase import TTLocalizer from math import ceil, pow - -from toontown.toonbase import ToontownGlobals, TTLocalizer - +import random +from toontown.toonbase import ToontownGlobals +import copy NoMovie = 0 EnterMovie = 1 ExitMovie = 2 diff --git a/toontown/fishing/FishPanel.py b/toontown/fishing/FishPanel.py index 7cb29e1..f31fe5d 100644 --- a/toontown/fishing/FishPanel.py +++ b/toontown/fishing/FishPanel.py @@ -1,13 +1,11 @@ -from panda3d.core import * - +from toontown.toonbase import ToontownGlobals 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 toontown.toonbase import ToontownGlobals, TTLocalizer - -from . import FishGlobals, FishPhoto - +from . import FishGlobals +from . import FishPhoto class FishPanel(DirectFrame): notify = DirectNotifyGlobal.directNotify.newCategory('FishPanel') diff --git a/toontown/fishing/FishPhoto.py b/toontown/fishing/FishPhoto.py index 506e256..eee77ac 100644 --- a/toontown/fishing/FishPhoto.py +++ b/toontown/fishing/FishPhoto.py @@ -1,11 +1,8 @@ -from panda3d.core import * - from direct.directnotify import DirectNotifyGlobal +from panda3d.core import * 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 b58c8c0..8e06f95 100644 --- a/toontown/fishing/FishPicker.py +++ b/toontown/fishing/FishPicker.py @@ -1,13 +1,10 @@ -from panda3d.core import * - +from toontown.toonbase import ToontownGlobals from direct.directnotify import DirectNotifyGlobal from direct.gui.DirectGui import * - -from toontown.toonbase import ToontownGlobals, TTLocalizer - +from panda3d.core import * +from toontown.toonbase import 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 81c0c6a..efe8862 100644 --- a/toontown/fishing/FishSellGUI.py +++ b/toontown/fishing/FishSellGUI.py @@ -1,13 +1,11 @@ -from panda3d.core import * - -from direct.directnotify import DirectNotifyGlobal 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.toonbase import ToontownGlobals, TTLocalizer - -from . import FishBase, FishPicker - +from . import FishBase +from . import FishPicker class FishSellGUI(DirectFrame): notify = DirectNotifyGlobal.directNotify.newCategory('FishGui') diff --git a/toontown/fishing/FishTank.py b/toontown/fishing/FishTank.py index 0be7fcc..5ff7aad 100644 --- a/toontown/fishing/FishTank.py +++ b/toontown/fishing/FishTank.py @@ -1,5 +1,5 @@ -from . import FishBase, FishGlobals - +from . import FishBase +from . import FishGlobals class FishTank: diff --git a/toontown/fishing/FishingTargetGlobals.py b/toontown/fishing/FishingTargetGlobals.py index 1dbdb6b..01c8a70 100644 --- a/toontown/fishing/FishingTargetGlobals.py +++ b/toontown/fishing/FishingTargetGlobals.py @@ -1,5 +1,4 @@ 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 dbd8e5a..1c162e9 100644 --- a/toontown/fishing/FourCornerBingo.py +++ b/toontown/fishing/FourCornerBingo.py @@ -1,7 +1,6 @@ from direct.directnotify import DirectNotifyGlobal - -from toontown.fishing import BingoCardBase, BingoGlobals - +from toontown.fishing import BingoGlobals +from toontown.fishing import BingoCardBase class FourCornerBingo(BingoCardBase.BingoCardBase): notify = DirectNotifyGlobal.directNotify.newCategory('FourCornerBingo') diff --git a/toontown/fishing/GenusPanel.py b/toontown/fishing/GenusPanel.py index 79e1975..7f1f65d 100644 --- a/toontown/fishing/GenusPanel.py +++ b/toontown/fishing/GenusPanel.py @@ -1,12 +1,11 @@ -from panda3d.core import * - +from toontown.toonbase import ToontownGlobals from direct.directnotify import DirectNotifyGlobal from direct.gui.DirectGui import * - -from toontown.toonbase import ToontownGlobals, TTLocalizer - -from . import FishBase, FishGlobals, FishPhoto - +from panda3d.core import * +from toontown.toonbase import TTLocalizer +from . import FishBase +from . import FishGlobals +from . import FishPhoto class GenusPanel(DirectFrame): notify = DirectNotifyGlobal.directNotify.newCategory('GenusPanel') diff --git a/toontown/fishing/NormalBingo.py b/toontown/fishing/NormalBingo.py index 062ff02..5633b37 100644 --- a/toontown/fishing/NormalBingo.py +++ b/toontown/fishing/NormalBingo.py @@ -1,7 +1,6 @@ from direct.directnotify import DirectNotifyGlobal - -from toontown.fishing import BingoCardBase, BingoGlobals - +from toontown.fishing import BingoGlobals +from toontown.fishing import BingoCardBase class NormalBingo(BingoCardBase.BingoCardBase): notify = DirectNotifyGlobal.directNotify.newCategory('NormalBingo') diff --git a/toontown/fishing/ThreewayBingo.py b/toontown/fishing/ThreewayBingo.py index d87bafe..515f98f 100644 --- a/toontown/fishing/ThreewayBingo.py +++ b/toontown/fishing/ThreewayBingo.py @@ -1,7 +1,6 @@ from direct.directnotify import DirectNotifyGlobal - -from toontown.fishing import BingoCardBase, BingoGlobals - +from toontown.fishing import BingoGlobals +from toontown.fishing import BingoCardBase class ThreewayBingo(BingoCardBase.BingoCardBase): notify = DirectNotifyGlobal.directNotify.newCategory('ThreewayBingo') diff --git a/toontown/friends/FriendHandle.py b/toontown/friends/FriendHandle.py index 4d56002..960306f 100644 --- a/toontown/friends/FriendHandle.py +++ b/toontown/friends/FriendHandle.py @@ -1,10 +1,7 @@ -import copy - from otp.avatar.Avatar import teleportNotify - -from toontown.chat import ToonChatGarbler from toontown.toonbase import ToontownGlobals - +import copy +from toontown.chat import ToonChatGarbler class FriendHandle: diff --git a/toontown/friends/FriendInvitee.py b/toontown/friends/FriendInvitee.py index d9214d9..ce3dc21 100644 --- a/toontown/friends/FriendInvitee.py +++ b/toontown/friends/FriendInvitee.py @@ -1,14 +1,12 @@ from panda3d.core import * - -from direct.directnotify import DirectNotifyGlobal -from direct.gui.DirectGui import DGG -from direct.showbase import DirectObject - -from otp.otpbase import OTPGlobals, OTPLocalizer - from toontown.toonbase.ToontownGlobals import * -from toontown.toontowngui import ToonHeadDialog, TTDialog - +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 class FriendInvitee(ToonHeadDialog.ToonHeadDialog): notify = DirectNotifyGlobal.directNotify.newCategory('FriendInvitee') diff --git a/toontown/friends/FriendInviter.py b/toontown/friends/FriendInviter.py index 7fa8154..1909e9c 100644 --- a/toontown/friends/FriendInviter.py +++ b/toontown/friends/FriendInviter.py @@ -1,20 +1,19 @@ 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 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 * - +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 otp.uberdog import RejectCode globalFriendInviter = None def showFriendInviter(avId, avName, avDisableName): diff --git a/toontown/friends/FriendNotifier.py b/toontown/friends/FriendNotifier.py index ec539e0..fbb1fd5 100644 --- a/toontown/friends/FriendNotifier.py +++ b/toontown/friends/FriendNotifier.py @@ -1,14 +1,12 @@ from panda3d.core import * - -from direct.directnotify import DirectNotifyGlobal -from direct.gui.DirectGui import DGG -from direct.showbase import DirectObject - -from otp.otpbase import OTPGlobals, OTPLocalizer - from toontown.toonbase.ToontownGlobals import * -from toontown.toontowngui import ToonHeadDialog, TTDialog - +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 class FriendNotifier(ToonHeadDialog.ToonHeadDialog): notify = DirectNotifyGlobal.directNotify.newCategory('FriendNotifier') diff --git a/toontown/friends/FriendsListManager.py b/toontown/friends/FriendsListManager.py index d5306c0..c7c521a 100644 --- a/toontown/friends/FriendsListManager.py +++ b/toontown/friends/FriendsListManager.py @@ -1,19 +1,23 @@ 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 otp.otpbase import OTPGlobals - +from toontown.toon import ToonTeleportPanel 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 (PlayerDetailPanel, PlayerInfoPanel, Toon, ToonAvatarDetailPanel, ToonAvatarPanel, ToonDNA, - ToonTeleportPanel) +from toontown.toon import ToonDNA +from toontown.toon import ToonAvatarDetailPanel +from toontown.toon import PlayerDetailPanel from toontown.toonbase import ToontownGlobals - -from . import FriendHandle, FriendInvitee, FriendInviter, FriendNotifier, FriendsListPanel - +from toontown.toon import Toon +from . import FriendHandle +from otp.otpbase import OTPGlobals class FriendsListManager: notify = DirectNotifyGlobal.directNotify.newCategory('FriendsListManager') diff --git a/toontown/friends/FriendsListPanel.py b/toontown/friends/FriendsListPanel.py index be10599..24b79f2 100644 --- a/toontown/friends/FriendsListPanel.py +++ b/toontown/friends/FriendsListPanel.py @@ -1,16 +1,13 @@ -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 panda3d.core import * +from direct.fsm import StateData from toontown.toon import ToonAvatarPanel -from toontown.toonbase import ToontownGlobals, TTLocalizer - +from toontown.friends import ToontownFriendSecret +from toontown.toonbase import ToontownGlobals +from toontown.toonbase import TTLocalizer +from otp.otpbase import OTPGlobals +import functools FLPPets = 1 FLPOnline = 2 FLPAll = 3 diff --git a/toontown/friends/TTPlayerFriendsManager.py b/toontown/friends/TTPlayerFriendsManager.py index a0a12f7..5cb1bc4 100644 --- a/toontown/friends/TTPlayerFriendsManager.py +++ b/toontown/friends/TTPlayerFriendsManager.py @@ -1,9 +1,7 @@ -from direct.directnotify.DirectNotifyGlobal import directNotify from direct.distributed.DistributedObjectGlobal import DistributedObjectGlobal - -from otp.friends.PlayerFriendsManager import PlayerFriendsManager +from direct.directnotify.DirectNotifyGlobal import directNotify from otp.otpbase import OTPGlobals - +from otp.friends.PlayerFriendsManager import PlayerFriendsManager class TTPlayerFriendsManager(PlayerFriendsManager): diff --git a/toontown/friends/TTPlayerFriendsManagerUD.py b/toontown/friends/TTPlayerFriendsManagerUD.py index 574f7ed..44829ce 100644 --- a/toontown/friends/TTPlayerFriendsManagerUD.py +++ b/toontown/friends/TTPlayerFriendsManagerUD.py @@ -1,6 +1,5 @@ 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 bc6f1f7..491a7ce 100644 --- a/toontown/friends/ToontownFriendSecret.py +++ b/toontown/friends/ToontownFriendSecret.py @@ -1,15 +1,16 @@ from panda3d.core import * - -from direct.directnotify import DirectNotifyGlobal from direct.gui.DirectGui import * - -from otp.friends import FriendSecret -from otp.friends.FriendSecret import (AccountSecret, AvatarSecret, BothSecrets, globalFriendSecret, hideFriendSecret, - showFriendSecret, unloadFriendSecret) +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 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 def openFriendSecret(secretType): global globalFriendSecret diff --git a/toontown/golf/BuildGeometry.py b/toontown/golf/BuildGeometry.py index b6fb930..480c334 100644 --- a/toontown/golf/BuildGeometry.py +++ b/toontown/golf/BuildGeometry.py @@ -1,13 +1,9 @@ -import math -from math import * - -from panda3d.core import * - -from direct.directnotify import DirectNotifyGlobal from direct.distributed import DistributedObject - +from direct.directnotify import DirectNotifyGlobal from toontown.toonbase import ToontownGlobals - +from panda3d.core import * +from math import * +import math GEO_ID = 0 def circleX(angle, radius, centerX, centerY): diff --git a/toontown/golf/DistributedGolfCourse.py b/toontown/golf/DistributedGolfCourse.py index 4a03bdf..6c2f49f 100644 --- a/toontown/golf/DistributedGolfCourse.py +++ b/toontown/golf/DistributedGolfCourse.py @@ -1,20 +1,20 @@ -from panda3d.core import * - -from direct.directnotify import DirectNotifyGlobal +from direct.interval.IntervalGlobal import Sequence, Func, Wait, LerpColorScaleInterval, Parallel from direct.distributed import DistributedObject -from direct.distributed.ClockDelta import * -from direct.fsm.FSM import FSM -from direct.gui.DirectGui import * -from direct.interval.IntervalGlobal import Func, LerpColorScaleInterval, Parallel, Sequence, Wait -from direct.showbase import PythonUtil +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.golf import GolfGlobals, GolfRewardDialog, GolfScoreBoard +from toontown.toonbase import ToontownGlobals +from toontown.toonbase import TTLocalizer +from panda3d.core import * +from direct.gui.DirectGui import * +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 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 597e375..e7342a7 100644 --- a/toontown/golf/DistributedGolfCourseAI.py +++ b/toontown/golf/DistributedGolfCourseAI.py @@ -1,15 +1,12 @@ -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 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 INITIAL = 0 EXITED = 1 EXPECTED = 2 diff --git a/toontown/golf/DistributedGolfHole.py b/toontown/golf/DistributedGolfHole.py index 3ea166d..b39f00b 100644 --- a/toontown/golf/DistributedGolfHole.py +++ b/toontown/golf/DistributedGolfHole.py @@ -1,29 +1,26 @@ import math import random import time - -from panda3d.core import (BitMask32, CollisionHandlerQueue, CollisionNode, CollisionSegment, CollisionTraverser, Mat3, - NodePath, Point3, TextNode, VBase4, Vec3, Vec4, deg2Rad) +from panda3d.core import TextNode, BitMask32, Point3, Vec3, Vec4, deg2Rad, Mat3, NodePath, VBase4, CollisionTraverser, CollisionSegment, CollisionNode, CollisionHandlerQueue from panda3d.ode import OdeRayGeom - -from direct.actor import Actor -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 direct.directnotify import DirectNotifyGlobal from otp.otpbase import OTPGlobals - -from toontown.distributed import DelayDelete -from toontown.golf import BuildGeometry, DistributedPhysicsWorld, GolfGlobals, GolfHoleBase +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 toontown.toonbase import ToontownGlobals, ToontownTimer, TTLocalizer - +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 toontown.distributed import DelayDelete 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 a305b5b..30c525e 100644 --- a/toontown/golf/DistributedGolfHoleAI.py +++ b/toontown/golf/DistributedGolfHoleAI.py @@ -1,17 +1,13 @@ -import random - -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 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 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 3d224b4..a3ad974 100644 --- a/toontown/golf/DistributedPhysicsWorld.py +++ b/toontown/golf/DistributedPhysicsWorld.py @@ -1,25 +1,20 @@ -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.directnotify import DirectNotifyGlobal +from toontown.toonbase import ToontownGlobals +from panda3d.core import * +from math import * +import math from direct.fsm.FSM import FSM -from direct.interval.SoundInterval import SoundInterval +from toontown.minigame import ArrowKeys from direct.showbase import PythonUtil from direct.showutil import Rope from direct.task import Task - -from toontown.golf import GolfGlobals, PhysicsWorldBase -from toontown.minigame import ArrowKeys -from toontown.toonbase import ToontownGlobals - +from direct.distributed.ClockDelta import * 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 fe512ed..857e663 100644 --- a/toontown/golf/DistributedPhysicsWorldAI.py +++ b/toontown/golf/DistributedPhysicsWorldAI.py @@ -1,18 +1,12 @@ -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 direct.directnotify import DirectNotifyGlobal from toontown.toonbase import ToontownGlobals - +from panda3d.core import * from . import BuildGeometry - +import random, time +from math import * +import math +from toontown.golf import PhysicsWorldBase class DistributedPhysicsWorldAI(DistributedObjectAI.DistributedObjectAI, PhysicsWorldBase.PhysicsWorldBase): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedPhysicsWorldAI') diff --git a/toontown/golf/GolfGlobals.py b/toontown/golf/GolfGlobals.py index 2e79e6b..5abc6d3 100644 --- a/toontown/golf/GolfGlobals.py +++ b/toontown/golf/GolfGlobals.py @@ -1,7 +1,5 @@ -import random - from direct.directnotify import DirectNotifyGlobal - +import random 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 14ac052..c2a2106 100644 --- a/toontown/golf/GolfHoleBase.py +++ b/toontown/golf/GolfHoleBase.py @@ -1,19 +1,14 @@ -import math -import random - -from panda3d.core import * -from panda3d.ode import OdeBody, OdeRayGeom, OdeTriMeshData, OdeTriMeshGeom - -from direct.directnotify import DirectNotifyGlobal from direct.distributed import DistributedObjectAI +from direct.directnotify import DirectNotifyGlobal +from toontown.toonbase import ToontownGlobals +from panda3d.core import * +from panda3d.ode import OdeTriMeshData, OdeTriMeshGeom, OdeBody, OdeRayGeom +from . import DistributedPhysicsWorldAI from direct.fsm.FSM import FSM - from toontown.ai.ToonBarrier import * from toontown.golf import GolfGlobals -from toontown.toonbase import ToontownGlobals - -from . import DistributedPhysicsWorldAI - +import random +import math class GolfHoleBase: diff --git a/toontown/golf/GolfManagerAI.py b/toontown/golf/GolfManagerAI.py index a1e3792..3995485 100644 --- a/toontown/golf/GolfManagerAI.py +++ b/toontown/golf/GolfManagerAI.py @@ -1,12 +1,9 @@ -from panda3d.core import * - -from direct.directnotify import DirectNotifyGlobal from direct.distributed import DistributedObjectAI from direct.showbase import DirectObject - -from toontown.golf import DistributedGolfCourseAI +from direct.directnotify import DirectNotifyGlobal from toontown.toonbase import ToontownGlobals - +from toontown.golf import DistributedGolfCourseAI +from panda3d.core import * RequestHole = {} def GolfManagerAI(): diff --git a/toontown/golf/GolfRewardDialog.py b/toontown/golf/GolfRewardDialog.py index cbf8f72..e02ed2b 100644 --- a/toontown/golf/GolfRewardDialog.py +++ b/toontown/golf/GolfRewardDialog.py @@ -1,17 +1,13 @@ -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 baa8221..684cb94 100644 --- a/toontown/golf/GolfScoreBoard.py +++ b/toontown/golf/GolfScoreBoard.py @@ -1,17 +1,13 @@ -from math import * - from panda3d.core import * -from panda3d.core import LineSegs - +from toontown.toonbase import TTLocalizer, ToontownGlobals 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 toontown.toonbase import ToontownGlobals, TTLocalizer - +from panda3d.core import LineSegs AUTO_HIDE_TIMEOUT = 3 class GolfScoreBoard: diff --git a/toontown/golf/PhysicsWorldBase.py b/toontown/golf/PhysicsWorldBase.py index 26aecad..d83d36c 100644 --- a/toontown/golf/PhysicsWorldBase.py +++ b/toontown/golf/PhysicsWorldBase.py @@ -1,25 +1,18 @@ -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.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 from direct.fsm.FSM import FSM +from toontown.minigame import ArrowKeys from direct.showbase import PythonUtil from direct.task import Task - -from toontown.golf import GolfGlobals -from toontown.minigame import ArrowKeys -from toontown.toonbase import ToontownGlobals - +from direct.distributed.ClockDelta import * from . import BuildGeometry - +from toontown.golf import GolfGlobals +import random, time def scalp(vec, scal): vec0 = vec[0] * scal diff --git a/toontown/hood/AnimatedProp.py b/toontown/hood/AnimatedProp.py index 3c01639..722c84a 100644 --- a/toontown/hood/AnimatedProp.py +++ b/toontown/hood/AnimatedProp.py @@ -1,6 +1,5 @@ -from direct.directnotify import DirectNotifyGlobal from direct.showbase import DirectObject - +from direct.directnotify import DirectNotifyGlobal class AnimatedProp(DirectObject.DirectObject): notify = DirectNotifyGlobal.directNotify.newCategory('AnimatedProp') diff --git a/toontown/hood/BRHood.py b/toontown/hood/BRHood.py index c44f389..b5db747 100644 --- a/toontown/hood/BRHood.py +++ b/toontown/hood/BRHood.py @@ -1,11 +1,8 @@ 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 9e22bf6..2e2b8fd 100644 --- a/toontown/hood/BRHoodDataAI.py +++ b/toontown/hood/BRHoodDataAI.py @@ -1,12 +1,10 @@ from direct.directnotify import DirectNotifyGlobal - -from toontown.classicchars import DistributedPlutoAI -from toontown.safezone import BRTreasurePlannerAI, DistributedTrolleyAI -from toontown.toon import DistributedNPCFishermanAI -from toontown.toonbase import ToontownGlobals - 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.toon import DistributedNPCFishermanAI class BRHoodDataAI(HoodDataAI.HoodDataAI): notify = DirectNotifyGlobal.directNotify.newCategory('BRHoodDataAI') diff --git a/toontown/hood/BossbotHQ.py b/toontown/hood/BossbotHQ.py index 757c2e6..9dbf095 100644 --- a/toontown/hood/BossbotHQ.py +++ b/toontown/hood/BossbotHQ.py @@ -1,9 +1,7 @@ +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 64826eb..8299bdd 100644 --- a/toontown/hood/BossbotHQDataAI.py +++ b/toontown/hood/BossbotHQDataAI.py @@ -1,15 +1,17 @@ from panda3d.core import Point3 - from direct.directnotify import DirectNotifyGlobal - -from toontown.building import (DistributedBBElevatorAI, DistributedBoardingPartyAI, DistributedBossElevatorAI, - DistributedDoorAI, DoorTypes, FADoorCodes) -from toontown.coghq import DistributedCogHQDoorAI, DistributedCogKartAI, LobbyManagerAI -from toontown.suit import DistributedBossbotBossAI -from toontown.toonbase import ToontownGlobals - 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.suit import DistributedBossbotBossAI +from toontown.building import DistributedBBElevatorAI +from toontown.building import DistributedBoardingPartyAI +from toontown.building import FADoorCodes +from toontown.coghq import DistributedCogKartAI class BossbotHQDataAI(HoodDataAI.HoodDataAI): notify = DirectNotifyGlobal.directNotify.newCategory('BossbotHQDataAI') diff --git a/toontown/hood/CSHoodDataAI.py b/toontown/hood/CSHoodDataAI.py index 324eaff..6e85ec0 100644 --- a/toontown/hood/CSHoodDataAI.py +++ b/toontown/hood/CSHoodDataAI.py @@ -1,13 +1,14 @@ from direct.directnotify import DirectNotifyGlobal - -from toontown.building import DistributedBoardingPartyAI, DistributedVPElevatorAI, DoorTypes -from toontown.coghq import (DistributedCogHQDoorAI, DistributedFactoryElevatorExtAI, DistributedSellbotHQDoorAI, - LobbyManagerAI) -from toontown.suit import DistributedSellbotBossAI -from toontown.toonbase import ToontownGlobals - 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.suit import DistributedSellbotBossAI +from toontown.building import DistributedBoardingPartyAI class CSHoodDataAI(HoodDataAI.HoodDataAI): notify = DirectNotifyGlobal.directNotify.newCategory('CSHoodDataAI') diff --git a/toontown/hood/CashbotHQ.py b/toontown/hood/CashbotHQ.py index ace65cd..6a83b1c 100644 --- a/toontown/hood/CashbotHQ.py +++ b/toontown/hood/CashbotHQ.py @@ -1,13 +1,9 @@ from panda3d.core import * - from direct.directnotify import DirectNotifyGlobal - -from toontown.coghq import CashbotCogHQLoader -from toontown.hood import ZoneUtil -from toontown.toonbase import ToontownGlobals, TTLocalizer - from . import CogHood - +from toontown.toonbase import ToontownGlobals, TTLocalizer +from toontown.hood import ZoneUtil +from toontown.coghq import CashbotCogHQLoader class CashbotHQ(CogHood.CogHood): notify = DirectNotifyGlobal.directNotify.newCategory('CashbotHQ') diff --git a/toontown/hood/CashbotHQDataAI.py b/toontown/hood/CashbotHQDataAI.py index 7dfc08e..d665b69 100644 --- a/toontown/hood/CashbotHQDataAI.py +++ b/toontown/hood/CashbotHQDataAI.py @@ -1,12 +1,14 @@ from direct.directnotify import DirectNotifyGlobal - -from toontown.building import DistributedBoardingPartyAI, DistributedCFOElevatorAI, DoorTypes, FADoorCodes -from toontown.coghq import DistributedCogHQDoorAI, DistributedMintElevatorExtAI, LobbyManagerAI -from toontown.suit import DistributedCashbotBossAI -from toontown.toonbase import ToontownGlobals - 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.suit import DistributedCashbotBossAI +from toontown.building import FADoorCodes +from toontown.building import DistributedBoardingPartyAI class CashbotHQDataAI(HoodDataAI.HoodDataAI): notify = DirectNotifyGlobal.directNotify.newCategory('CashbotHqDataAI') diff --git a/toontown/hood/CogHood.py b/toontown/hood/CogHood.py index 9848a38..6a3b1a2 100644 --- a/toontown/hood/CogHood.py +++ b/toontown/hood/CogHood.py @@ -1,9 +1,8 @@ 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 530afeb..473ec8d 100644 --- a/toontown/hood/DDHood.py +++ b/toontown/hood/DDHood.py @@ -1,11 +1,8 @@ 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 ecc04b8..23b83c6 100644 --- a/toontown/hood/DDHoodDataAI.py +++ b/toontown/hood/DDHoodDataAI.py @@ -1,11 +1,10 @@ from direct.directnotify import DirectNotifyGlobal - -from toontown.classicchars import DistributedDonaldDockAI -from toontown.safezone import DDTreasurePlannerAI, DistributedBoatAI, DistributedTrolleyAI -from toontown.toonbase import ToontownGlobals - 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 class DDHoodDataAI(HoodDataAI.HoodDataAI): notify = DirectNotifyGlobal.directNotify.newCategory('DDHoodDataAI') diff --git a/toontown/hood/DGHood.py b/toontown/hood/DGHood.py index bcb0c0a..08cf157 100644 --- a/toontown/hood/DGHood.py +++ b/toontown/hood/DGHood.py @@ -1,11 +1,9 @@ from panda3d.core import * - +from . import ToonHood +from toontown.town import DGTownLoader from toontown.safezone import DGSafeZoneLoader from toontown.toonbase.ToontownGlobals import * -from toontown.town import DGTownLoader - -from . import SkyUtil, ToonHood - +from . import SkyUtil class DGHood(ToonHood.ToonHood): diff --git a/toontown/hood/DGHoodDataAI.py b/toontown/hood/DGHoodDataAI.py index bc8af7a..771e3ca 100644 --- a/toontown/hood/DGHoodDataAI.py +++ b/toontown/hood/DGHoodDataAI.py @@ -1,11 +1,12 @@ from direct.directnotify import DirectNotifyGlobal - -from toontown.classicchars import DistributedDaisyAI, DistributedGoofyAI -from toontown.safezone import ButterflyGlobals, DGTreasurePlannerAI, DistributedDGFlowerAI, DistributedTrolleyAI -from toontown.toonbase import ToontownGlobals - from . import HoodDataAI - +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 class DGHoodDataAI(HoodDataAI.HoodDataAI): notify = DirectNotifyGlobal.directNotify.newCategory('DGHoodDataAI') diff --git a/toontown/hood/DLHood.py b/toontown/hood/DLHood.py index 89d9092..b76ae44 100644 --- a/toontown/hood/DLHood.py +++ b/toontown/hood/DLHood.py @@ -1,11 +1,8 @@ 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 705e3d7..eed8d9b 100644 --- a/toontown/hood/DLHoodDataAI.py +++ b/toontown/hood/DLHoodDataAI.py @@ -1,11 +1,10 @@ from direct.directnotify import DirectNotifyGlobal - -from toontown.classicchars import DistributedDonaldAI -from toontown.safezone import ButterflyGlobals, DistributedTrolleyAI, DLTreasurePlannerAI -from toontown.toonbase import ToontownGlobals - 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 class DLHoodDataAI(HoodDataAI.HoodDataAI): notify = DirectNotifyGlobal.directNotify.newCategory('DLHoodDataAI') diff --git a/toontown/hood/EstateHood.py b/toontown/hood/EstateHood.py index 331feb2..cc147b3 100644 --- a/toontown/hood/EstateHood.py +++ b/toontown/hood/EstateHood.py @@ -1,19 +1,18 @@ from panda3d.core import * - -from direct.directnotify import DirectNotifyGlobal -from direct.fsm import ClassicFSM, State -from direct.task.Task import Task - -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 - +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 class EstateHood(Hood.Hood): notify = DirectNotifyGlobal.directNotify.newCategory('EstateHood') diff --git a/toontown/hood/FishAnimatedProp.py b/toontown/hood/FishAnimatedProp.py index f8785a6..edd8e82 100644 --- a/toontown/hood/FishAnimatedProp.py +++ b/toontown/hood/FishAnimatedProp.py @@ -1,13 +1,9 @@ -import random - +from . import AnimatedProp from direct.actor import Actor from direct.interval.IntervalGlobal import * - -from toontown.effects.Ripples import * from toontown.effects.Splash import * - -from . import AnimatedProp - +from toontown.effects.Ripples import * +import random class FishAnimatedProp(AnimatedProp.AnimatedProp): diff --git a/toontown/hood/GSHood.py b/toontown/hood/GSHood.py index 01d98e2..9d046a3 100644 --- a/toontown/hood/GSHood.py +++ b/toontown/hood/GSHood.py @@ -1,11 +1,9 @@ from panda3d.core import * - -from toontown.racing import DistributedVehicle +from . import ToonHood from toontown.safezone import GSSafeZoneLoader from toontown.toonbase.ToontownGlobals import * - -from . import SkyUtil, ToonHood - +from toontown.racing import DistributedVehicle +from . import SkyUtil class GSHood(ToonHood.ToonHood): diff --git a/toontown/hood/GSHoodDataAI.py b/toontown/hood/GSHoodDataAI.py index 8a34668..4e126a4 100644 --- a/toontown/hood/GSHoodDataAI.py +++ b/toontown/hood/GSHoodDataAI.py @@ -1,15 +1,11 @@ +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 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 - +from toontown.classicchars import DistributedGoofySpeedwayAI if __debug__: import pdb diff --git a/toontown/hood/GZHood.py b/toontown/hood/GZHood.py index 8fcc302..a6bc6eb 100644 --- a/toontown/hood/GZHood.py +++ b/toontown/hood/GZHood.py @@ -1,11 +1,9 @@ from panda3d.core import * - -from toontown.racing import DistributedVehicle +from . import ToonHood from toontown.safezone import GZSafeZoneLoader from toontown.toonbase.ToontownGlobals import * - -from . import SkyUtil, ToonHood - +from toontown.racing import DistributedVehicle +from . import SkyUtil class GZHood(ToonHood.ToonHood): diff --git a/toontown/hood/GZHoodDataAI.py b/toontown/hood/GZHoodDataAI.py index 7a60791..e3f55cc 100644 --- a/toontown/hood/GZHoodDataAI.py +++ b/toontown/hood/GZHoodDataAI.py @@ -1,16 +1,12 @@ +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 direct.directnotify import DirectNotifyGlobal - -from toontown.classicchars import DistributedGoofySpeedwayAI -from toontown.racing import DistributedStartingBlockAI from toontown.racing.RaceGlobals import * +from toontown.classicchars import DistributedGoofySpeedwayAI 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 22ce97b..1390a75 100644 --- a/toontown/hood/GenericAnimatedBuilding.py +++ b/toontown/hood/GenericAnimatedBuilding.py @@ -1,6 +1,5 @@ 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 aa8c663..014b4af 100644 --- a/toontown/hood/GenericAnimatedProp.py +++ b/toontown/hood/GenericAnimatedProp.py @@ -1,12 +1,10 @@ -from direct.actor import Actor -from direct.directnotify import DirectNotifyGlobal -from direct.interval.IntervalGlobal import * - -from toontown.hood import HoodUtil, ZoneUtil -from toontown.toonbase import ToontownGlobals - from . import AnimatedProp - +from direct.actor import Actor +from direct.interval.IntervalGlobal import * +from direct.directnotify import DirectNotifyGlobal +from toontown.toonbase import ToontownGlobals +from toontown.hood import ZoneUtil +from toontown.hood import HoodUtil class GenericAnimatedProp(AnimatedProp.AnimatedProp): notify = DirectNotifyGlobal.directNotify.newCategory('GenericAnimatedProp') diff --git a/toontown/hood/HQPeriscopeAnimatedProp.py b/toontown/hood/HQPeriscopeAnimatedProp.py index 177712c..a861b8b 100644 --- a/toontown/hood/HQPeriscopeAnimatedProp.py +++ b/toontown/hood/HQPeriscopeAnimatedProp.py @@ -1,9 +1,7 @@ +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 05be033..69b2505 100644 --- a/toontown/hood/HQTelescopeAnimatedProp.py +++ b/toontown/hood/HQTelescopeAnimatedProp.py @@ -1,9 +1,7 @@ +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 d4536fb..3bd164c 100644 --- a/toontown/hood/Hood.py +++ b/toontown/hood/Hood.py @@ -1,9 +1,16 @@ -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 Func, Sequence, Wait +from direct.interval.IntervalGlobal import Sequence, Wait, Func from direct.showbase.MessengerGlobal import messenger from direct.showbase.PythonUtil import uniqueName from direct.task.TaskManagerGlobal import taskMgr @@ -11,7 +18,8 @@ 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, TTLocalizer +from toontown.toonbase import ToontownGlobals +from toontown.toonbase import TTLocalizer from toontown.toonbase.ToonBaseGlobal import base diff --git a/toontown/hood/HoodDataAI.py b/toontown/hood/HoodDataAI.py index 707f5cc..5b8cfb2 100644 --- a/toontown/hood/HoodDataAI.py +++ b/toontown/hood/HoodDataAI.py @@ -1,16 +1,13 @@ +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 f92e2d2..f66b06c 100644 --- a/toontown/hood/HoodUtil.py +++ b/toontown/hood/HoodUtil.py @@ -1,6 +1,5 @@ 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 cb0ab00..e612b6a 100644 --- a/toontown/hood/HydrantInteractiveProp.py +++ b/toontown/hood/HydrantInteractiveProp.py @@ -1,10 +1,9 @@ from direct.actor import Actor from direct.directnotify import DirectNotifyGlobal -from direct.interval.IntervalGlobal import Func, Sequence - -from toontown.hood import GenericAnimatedProp, InteractiveAnimatedProp -from toontown.toonbase import ToontownBattleGlobals, ToontownGlobals, TTLocalizer - +from direct.interval.IntervalGlobal import Sequence, Func +from toontown.hood import InteractiveAnimatedProp +from toontown.hood import GenericAnimatedProp +from toontown.toonbase import ToontownGlobals, ToontownBattleGlobals, TTLocalizer class HydrantInteractiveProp(InteractiveAnimatedProp.InteractiveAnimatedProp): notify = DirectNotifyGlobal.directNotify.newCategory('HydrantInteractiveProp') diff --git a/toontown/hood/HydrantOneAnimatedProp.py b/toontown/hood/HydrantOneAnimatedProp.py index 56e2b59..71f2bdd 100644 --- a/toontown/hood/HydrantOneAnimatedProp.py +++ b/toontown/hood/HydrantOneAnimatedProp.py @@ -1,8 +1,6 @@ -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 a731eeb..c94435e 100644 --- a/toontown/hood/HydrantTwoAnimatedProp.py +++ b/toontown/hood/HydrantTwoAnimatedProp.py @@ -1,8 +1,6 @@ -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 b012c59..98249ad 100644 --- a/toontown/hood/HydrantZeroAnimatedProp.py +++ b/toontown/hood/HydrantZeroAnimatedProp.py @@ -1,8 +1,6 @@ -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 32aced6..4eb6bc7 100644 --- a/toontown/hood/InteractiveAnimatedProp.py +++ b/toontown/hood/InteractiveAnimatedProp.py @@ -1,18 +1,13 @@ import math import random - -from panda3d.core import TextNode, Vec3 - -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 - +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 toontown.hood import ZoneUtil def clearPythonIvals(ival): if hasattr(ival, 'function'): diff --git a/toontown/hood/LawbotHQ.py b/toontown/hood/LawbotHQ.py index 7bef1a8..80d3ac2 100644 --- a/toontown/hood/LawbotHQ.py +++ b/toontown/hood/LawbotHQ.py @@ -1,8 +1,6 @@ -from toontown.coghq import LawbotCogHQLoader -from toontown.toonbase import ToontownGlobals - from . import CogHood - +from toontown.toonbase import ToontownGlobals +from toontown.coghq import LawbotCogHQLoader class LawbotHQ(CogHood.CogHood): diff --git a/toontown/hood/LawbotHQDataAI.py b/toontown/hood/LawbotHQDataAI.py index f0dfa28..f642dd3 100644 --- a/toontown/hood/LawbotHQDataAI.py +++ b/toontown/hood/LawbotHQDataAI.py @@ -1,13 +1,16 @@ from direct.directnotify import DirectNotifyGlobal - -from toontown.building import (DistributedBoardingPartyAI, DistributedBossElevatorAI, DistributedCJElevatorAI, - DistributedDoorAI, DoorTypes, FADoorCodes) -from toontown.coghq import DistributedCogHQDoorAI, DistributedLawOfficeElevatorExtAI, LobbyManagerAI -from toontown.suit import DistributedLawbotBossAI -from toontown.toonbase import ToontownGlobals - 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.suit import DistributedLawbotBossAI +from toontown.building import DistributedCJElevatorAI +from toontown.building import FADoorCodes +from toontown.building import DistributedBoardingPartyAI class LawbotHQDataAI(HoodDataAI.HoodDataAI): notify = DirectNotifyGlobal.directNotify.newCategory('LawbotHQDataAI') diff --git a/toontown/hood/MMHood.py b/toontown/hood/MMHood.py index ce207c4..4b31a1b 100644 --- a/toontown/hood/MMHood.py +++ b/toontown/hood/MMHood.py @@ -1,11 +1,8 @@ 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 5f06a5f..483cf49 100644 --- a/toontown/hood/MMHoodDataAI.py +++ b/toontown/hood/MMHoodDataAI.py @@ -1,11 +1,10 @@ from direct.directnotify import DirectNotifyGlobal - -from toontown.classicchars import DistributedMinnieAI -from toontown.safezone import DistributedMMPianoAI, DistributedTrolleyAI, MMTreasurePlannerAI -from toontown.toonbase import ToontownGlobals - 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 class MMHoodDataAI(HoodDataAI.HoodDataAI): notify = DirectNotifyGlobal.directNotify.newCategory('MMHoodDataAI') diff --git a/toontown/hood/MailboxInteractiveProp.py b/toontown/hood/MailboxInteractiveProp.py index 5f3bc36..7d6bd11 100644 --- a/toontown/hood/MailboxInteractiveProp.py +++ b/toontown/hood/MailboxInteractiveProp.py @@ -1,10 +1,9 @@ from direct.actor import Actor from direct.directnotify import DirectNotifyGlobal -from direct.interval.IntervalGlobal import Func, Sequence - -from toontown.hood import GenericAnimatedProp, InteractiveAnimatedProp -from toontown.toonbase import ToontownBattleGlobals, ToontownGlobals, TTLocalizer - +from direct.interval.IntervalGlobal import Sequence, Func +from toontown.hood import InteractiveAnimatedProp +from toontown.hood import GenericAnimatedProp +from toontown.toonbase import ToontownGlobals, ToontownBattleGlobals, TTLocalizer class MailboxInteractiveProp(InteractiveAnimatedProp.InteractiveAnimatedProp): notify = DirectNotifyGlobal.directNotify.newCategory('MailboxInteractiveProp') diff --git a/toontown/hood/MailboxOneAnimatedProp.py b/toontown/hood/MailboxOneAnimatedProp.py index 47314be..26ca187 100644 --- a/toontown/hood/MailboxOneAnimatedProp.py +++ b/toontown/hood/MailboxOneAnimatedProp.py @@ -1,8 +1,6 @@ -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 5183f25..8c2472a 100644 --- a/toontown/hood/MailboxTwoAnimatedProp.py +++ b/toontown/hood/MailboxTwoAnimatedProp.py @@ -1,8 +1,6 @@ -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 3f7c4fe..2ccdf35 100644 --- a/toontown/hood/MailboxZeroAnimatedProp.py +++ b/toontown/hood/MailboxZeroAnimatedProp.py @@ -1,8 +1,6 @@ -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 daacafb..82f42f9 100644 --- a/toontown/hood/OZHood.py +++ b/toontown/hood/OZHood.py @@ -1,11 +1,9 @@ from panda3d.core import * - -from toontown.racing import DistributedVehicle +from . import ToonHood from toontown.safezone import OZSafeZoneLoader from toontown.toonbase.ToontownGlobals import * - -from . import SkyUtil, ToonHood - +from toontown.racing import DistributedVehicle +from . import SkyUtil class OZHood(ToonHood.ToonHood): diff --git a/toontown/hood/OZHoodDataAI.py b/toontown/hood/OZHoodDataAI.py index cd1d5bf..6d226bb 100644 --- a/toontown/hood/OZHoodDataAI.py +++ b/toontown/hood/OZHoodDataAI.py @@ -1,18 +1,19 @@ +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 direct.directnotify import DirectNotifyGlobal - -from toontown.classicchars import DistributedChipAI, DistributedDaleAI, DistributedGoofySpeedwayAI -from toontown.distributed import DistributedTimerAI -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 - +from toontown.classicchars import DistributedGoofySpeedwayAI +from toontown.safezone import DistributedPicnicBasketAI +from toontown.classicchars import DistributedChipAI +from toontown.classicchars import DistributedDaleAI +from toontown.distributed import DistributedTimerAI +from toontown.safezone import DistributedPicnicTableAI +from toontown.safezone import DistributedChineseCheckersAI +from toontown.safezone import DistributedCheckersAI if __debug__: import pdb diff --git a/toontown/hood/PartyHood.py b/toontown/hood/PartyHood.py index fca22a1..7b3887c 100644 --- a/toontown/hood/PartyHood.py +++ b/toontown/hood/PartyHood.py @@ -1,18 +1,17 @@ -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 603fde0..ffe7d4e 100644 --- a/toontown/hood/PetShopFishAnimatedProp.py +++ b/toontown/hood/PetShopFishAnimatedProp.py @@ -1,9 +1,7 @@ +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 2e395d3..fa346a2 100644 --- a/toontown/hood/Place.py +++ b/toontown/hood/Place.py @@ -20,7 +20,8 @@ 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, TTLocalizer +from toontown.toonbase import ToontownGlobals +from toontown.toonbase import TTLocalizer from toontown.toonbase.ToonBaseGlobal import base diff --git a/toontown/hood/QuietZoneState.py b/toontown/hood/QuietZoneState.py index 7694e69..6dd1f3a 100644 --- a/toontown/hood/QuietZoneState.py +++ b/toontown/hood/QuietZoneState.py @@ -1,19 +1,16 @@ 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 @@ -310,7 +307,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)] @@ -319,14 +316,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) @@ -345,7 +342,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 3b05629..efc9f7d 100644 --- a/toontown/hood/SellbotHQ.py +++ b/toontown/hood/SellbotHQ.py @@ -1,8 +1,6 @@ -from toontown.coghq import SellbotCogHQLoader -from toontown.toonbase import ToontownGlobals - from . import CogHood - +from toontown.toonbase import ToontownGlobals +from toontown.coghq import SellbotCogHQLoader class SellbotHQ(CogHood.CogHood): diff --git a/toontown/hood/SkyUtil.py b/toontown/hood/SkyUtil.py index 91f687d..bb17088 100644 --- a/toontown/hood/SkyUtil.py +++ b/toontown/hood/SkyUtil.py @@ -1,10 +1,7 @@ from panda3d.core import * - -from direct.directnotify import DirectNotifyGlobal -from direct.task.Task import Task - from toontown.toonbase.ToontownGlobals import * - +from direct.task.Task import Task +from direct.directnotify import DirectNotifyGlobal notify = DirectNotifyGlobal.directNotify.newCategory('SkyUtil') def cloudSkyTrack(task): diff --git a/toontown/hood/SleepingHydrantAnimatedProp.py b/toontown/hood/SleepingHydrantAnimatedProp.py index c7ba777..0a4b1cd 100644 --- a/toontown/hood/SleepingHydrantAnimatedProp.py +++ b/toontown/hood/SleepingHydrantAnimatedProp.py @@ -1,10 +1,7 @@ -import math - +from . import AnimatedProp from direct.interval.IntervalGlobal import * from direct.task import Task - -from . import AnimatedProp - +import math class SleepingHydrantAnimatedProp(AnimatedProp.AnimatedProp): diff --git a/toontown/hood/StreetSign.py b/toontown/hood/StreetSign.py index f86186c..6f2a949 100644 --- a/toontown/hood/StreetSign.py +++ b/toontown/hood/StreetSign.py @@ -1,11 +1,8 @@ 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 e910717..7571370 100644 --- a/toontown/hood/TTHood.py +++ b/toontown/hood/TTHood.py @@ -1,14 +1,11 @@ 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 toontown.town import TTTownLoader - -from . import SkyUtil, ToonHood - +from . import SkyUtil +from direct.directnotify import DirectNotifyGlobal class TTHood(ToonHood.ToonHood): notify = DirectNotifyGlobal.directNotify.newCategory('TTHood') diff --git a/toontown/hood/TTHoodDataAI.py b/toontown/hood/TTHoodDataAI.py index 47aa34e..6a3b6b7 100644 --- a/toontown/hood/TTHoodDataAI.py +++ b/toontown/hood/TTHoodDataAI.py @@ -1,12 +1,11 @@ from direct.directnotify import DirectNotifyGlobal -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 - +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 class TTHoodDataAI(HoodDataAI.HoodDataAI): notify = DirectNotifyGlobal.directNotify.newCategory('TTHoodDataAI') diff --git a/toontown/hood/ToonHood.py b/toontown/hood/ToonHood.py index c3032ff..48766d4 100644 --- a/toontown/hood/ToonHood.py +++ b/toontown/hood/ToonHood.py @@ -1,20 +1,16 @@ from panda3d.core import * - -from direct.directnotify import DirectNotifyGlobal -from direct.fsm import ClassicFSM, State - -from otp.avatar import DistributedAvatar - -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 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.toon.Toon import teleportDebug class ToonHood(Hood.Hood): notify = DirectNotifyGlobal.directNotify.newCategory('ToonHood') diff --git a/toontown/hood/TrashcanInteractiveProp.py b/toontown/hood/TrashcanInteractiveProp.py index 1c04461..36a726b 100644 --- a/toontown/hood/TrashcanInteractiveProp.py +++ b/toontown/hood/TrashcanInteractiveProp.py @@ -1,9 +1,8 @@ from direct.actor import Actor from direct.directnotify import DirectNotifyGlobal - -from toontown.hood import GenericAnimatedProp, InteractiveAnimatedProp -from toontown.toonbase import ToontownBattleGlobals, ToontownGlobals, TTLocalizer - +from toontown.hood import InteractiveAnimatedProp +from toontown.hood import GenericAnimatedProp +from toontown.toonbase import ToontownGlobals, ToontownBattleGlobals, TTLocalizer class TrashcanInteractiveProp(InteractiveAnimatedProp.InteractiveAnimatedProp): notify = DirectNotifyGlobal.directNotify.newCategory('TrashcanInteractiveProp') diff --git a/toontown/hood/TrashcanOneAnimatedProp.py b/toontown/hood/TrashcanOneAnimatedProp.py index 8552f40..68d4331 100644 --- a/toontown/hood/TrashcanOneAnimatedProp.py +++ b/toontown/hood/TrashcanOneAnimatedProp.py @@ -1,8 +1,6 @@ -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 4b24a12..f0b86ce 100644 --- a/toontown/hood/TrashcanTwoAnimatedProp.py +++ b/toontown/hood/TrashcanTwoAnimatedProp.py @@ -1,8 +1,6 @@ -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 2b569d7..7b432ad 100644 --- a/toontown/hood/TrashcanZeroAnimatedProp.py +++ b/toontown/hood/TrashcanZeroAnimatedProp.py @@ -1,8 +1,6 @@ -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 913f9a8..df40ea1 100644 --- a/toontown/hood/TrialerForceAcknowledge.py +++ b/toontown/hood/TrialerForceAcknowledge.py @@ -1,10 +1,8 @@ from panda3d.core import * - -from toontown.toonbase import ToontownGlobals, TTLocalizer -from toontown.toontowngui import TeaserPanel - +from toontown.toonbase import TTLocalizer from . import ZoneUtil - +from toontown.toonbase import ToontownGlobals +from toontown.toontowngui import TeaserPanel class TrialerForceAcknowledge: diff --git a/toontown/hood/TutorialHood.py b/toontown/hood/TutorialHood.py index c8d84dc..c1efa91 100644 --- a/toontown/hood/TutorialHood.py +++ b/toontown/hood/TutorialHood.py @@ -1,10 +1,8 @@ from panda3d.core import * - -from toontown.toonbase.ToontownGlobals import * +from . import ToonHood from toontown.town import TutorialTownLoader - -from . import SkyUtil, ToonHood - +from toontown.toonbase.ToontownGlobals import * +from . import SkyUtil class TutorialHood(ToonHood.ToonHood): diff --git a/toontown/hood/ZeroAnimatedProp.py b/toontown/hood/ZeroAnimatedProp.py index 6124652..fa13688 100644 --- a/toontown/hood/ZeroAnimatedProp.py +++ b/toontown/hood/ZeroAnimatedProp.py @@ -1,15 +1,13 @@ -import math 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 +import math +from direct.interval.IntervalGlobal import Sequence, Wait, ActorInterval, Func, SoundInterval, Parallel from direct.task import Task - -from toontown.hood import AnimatedProp, GenericAnimatedProp +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 - +from direct.directnotify import DirectNotifyGlobal class ZeroAnimatedProp(GenericAnimatedProp.GenericAnimatedProp, FSM.FSM): notify = DirectNotifyGlobal.directNotify.newCategory('ZeroAnimatedProp') diff --git a/toontown/hood/ZoneUtil.py b/toontown/hood/ZoneUtil.py index 76d294b..de22d9b 100644 --- a/toontown/hood/ZoneUtil.py +++ b/toontown/hood/ZoneUtil.py @@ -1,7 +1,5 @@ -from direct.directnotify import DirectNotifyGlobal - from toontown.toonbase.ToontownGlobals import * - +from direct.directnotify import DirectNotifyGlobal zoneUtilNotify = DirectNotifyGlobal.directNotify.newCategory('ZoneUtil') tutorialDict = None diff --git a/toontown/launcher/DownloadForceAcknowledge.py b/toontown/launcher/DownloadForceAcknowledge.py index 0580fd6..238034e 100644 --- a/toontown/launcher/DownloadForceAcknowledge.py +++ b/toontown/launcher/DownloadForceAcknowledge.py @@ -1,10 +1,7 @@ -import random - from panda3d.core import * - -from toontown.toonbase import TTLocalizer from toontown.toontowngui import TTDialog - +from toontown.toonbase import TTLocalizer +import random class DownloadForceAcknowledge: diff --git a/toontown/launcher/QuickLauncher.py b/toontown/launcher/QuickLauncher.py index 089a2d8..26087ab 100644 --- a/toontown/launcher/QuickLauncher.py +++ b/toontown/launcher/QuickLauncher.py @@ -1,14 +1,9 @@ import os - -from panda3d.core import * - from direct.showbase.EventManagerGlobal import * - +from panda3d.core 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 5d70b3a..f629cbc 100644 --- a/toontown/launcher/QuickStartLauncher.py +++ b/toontown/launcher/QuickStartLauncher.py @@ -6,6 +6,5 @@ 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 bec3555..bd9d57b 100644 --- a/toontown/launcher/ToontownDownloadWatcher.py +++ b/toontown/launcher/ToontownDownloadWatcher.py @@ -1,10 +1,7 @@ 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 4c8375c..fc5d779 100644 --- a/toontown/launcher/ToontownDummyLauncher.py +++ b/toontown/launcher/ToontownDummyLauncher.py @@ -1,10 +1,7 @@ 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 97fb28a..4a5726a 100644 --- a/toontown/launcher/ToontownLauncher.py +++ b/toontown/launcher/ToontownLauncher.py @@ -36,14 +36,11 @@ 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 6663112..4c418f5 100644 --- a/toontown/login/AvatarChoice.py +++ b/toontown/login/AvatarChoice.py @@ -1,13 +1,13 @@ from panda3d.core import * - -from direct.directnotify import DirectNotifyGlobal -from direct.gui.DirectGui import * +from toontown.toonbase import ToontownGlobals from direct.showbase import DirectObject - -from toontown.toon import ToonDNA, ToonHead -from toontown.toonbase import ToontownGlobals, TTLocalizer -from toontown.toontowngui import TeaserPanel, TTDialog - +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 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 c9b1b1f..5c21235 100644 --- a/toontown/login/AvatarChooser.py +++ b/toontown/login/AvatarChooser.py @@ -1,17 +1,17 @@ -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 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 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 609e3bc..f354a1a 100644 --- a/toontown/login/DateObject.py +++ b/toontown/login/DateObject.py @@ -1,6 +1,5 @@ import time - class DateObject: def getYear(self): diff --git a/toontown/makeatoon/BodyShop.py b/toontown/makeatoon/BodyShop.py index 6e28d95..4b404e9 100644 --- a/toontown/makeatoon/BodyShop.py +++ b/toontown/makeatoon/BodyShop.py @@ -1,18 +1,13 @@ -import random - from panda3d.core import * - -from direct.directnotify import DirectNotifyGlobal +from toontown.toon import ToonDNA from direct.fsm import StateData from direct.gui.DirectGui import * - -from toontown.toon import ToonDNA -from toontown.toonbase import TTLocalizer -from toontown.toontowngui import TeaserPanel - -from . import ShuffleButton from .MakeAToonGlobals import * - +import random +from toontown.toonbase import TTLocalizer +from direct.directnotify import DirectNotifyGlobal +from toontown.toontowngui import TeaserPanel +from . import ShuffleButton class BodyShop(StateData.StateData): notify = DirectNotifyGlobal.directNotify.newCategory('BodyShop') diff --git a/toontown/makeatoon/ClothesGUI.py b/toontown/makeatoon/ClothesGUI.py index 4083e69..80e6d0b 100644 --- a/toontown/makeatoon/ClothesGUI.py +++ b/toontown/makeatoon/ClothesGUI.py @@ -1,17 +1,13 @@ -import random - from panda3d.core import * - -from direct.directnotify import DirectNotifyGlobal +from toontown.toon import ToonDNA from direct.fsm import StateData from direct.gui.DirectGui import * - -from toontown.toon import ToonDNA -from toontown.toonbase import TTLocalizer - -from . import ShuffleButton +from panda3d.core import * from .MakeAToonGlobals import * - +from toontown.toonbase import TTLocalizer +from direct.directnotify import DirectNotifyGlobal +from . import ShuffleButton +import random CLOTHES_MAKETOON = 0 CLOTHES_TAILOR = 1 CLOTHES_CLOSET = 2 diff --git a/toontown/makeatoon/ColorShop.py b/toontown/makeatoon/ColorShop.py index 01845fa..a607f73 100644 --- a/toontown/makeatoon/ColorShop.py +++ b/toontown/makeatoon/ColorShop.py @@ -1,17 +1,13 @@ -import random - from panda3d.core import * - -from direct.directnotify import DirectNotifyGlobal +from toontown.toon import ToonDNA from direct.fsm import StateData from direct.gui.DirectGui import * - -from toontown.toon import ToonDNA -from toontown.toonbase import TTLocalizer - -from . import ShuffleButton +from panda3d.core import * from .MakeAToonGlobals import * - +from toontown.toonbase import TTLocalizer +from . import ShuffleButton +import random +from direct.directnotify import DirectNotifyGlobal class ColorShop(StateData.StateData): notify = DirectNotifyGlobal.directNotify.newCategory('ColorShop') diff --git a/toontown/makeatoon/GenderShop.py b/toontown/makeatoon/GenderShop.py index cd55b19..45fe50b 100644 --- a/toontown/makeatoon/GenderShop.py +++ b/toontown/makeatoon/GenderShop.py @@ -1,16 +1,13 @@ -import random - from panda3d.core import * - -from direct.directnotify import DirectNotifyGlobal from direct.fsm import StateData from direct.gui.DirectGui import * - -from toontown.toon import Toon, ToonDNA -from toontown.toonbase import ToontownGlobals, TTLocalizer - +from toontown.toonbase import TTLocalizer +from toontown.toonbase import ToontownGlobals +from toontown.toon import ToonDNA +from toontown.toon import Toon 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 1f3b1e1..a42bbdc 100644 --- a/toontown/makeatoon/MakeAToon.py +++ b/toontown/makeatoon/MakeAToon.py @@ -1,25 +1,29 @@ -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 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 class MakeAToon(StateData.StateData): notify = DirectNotifyGlobal.directNotify.newCategory('MakeAToon') diff --git a/toontown/makeatoon/MakeClothesGUI.py b/toontown/makeatoon/MakeClothesGUI.py index 206e69e..b6394b3 100644 --- a/toontown/makeatoon/MakeClothesGUI.py +++ b/toontown/makeatoon/MakeClothesGUI.py @@ -1,7 +1,5 @@ -from toontown.toon import ToonDNA - from . import ClothesGUI - +from toontown.toon import ToonDNA class MakeClothesGUI(ClothesGUI.ClothesGUI): notify = directNotify.newCategory('MakeClothesGUI') diff --git a/toontown/makeatoon/NameGenerator.py b/toontown/makeatoon/NameGenerator.py index 537785d..2b19c47 100644 --- a/toontown/makeatoon/NameGenerator.py +++ b/toontown/makeatoon/NameGenerator.py @@ -1,15 +1,12 @@ -import copy -import os +from panda3d.core import * import random import string - -from panda3d.core import * - +import copy +from toontown.toonbase import ToontownGlobals +from toontown.toonbase import TTLocalizer +import os 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 0c08ebc..b4f2188 100644 --- a/toontown/makeatoon/NameShop.py +++ b/toontown/makeatoon/NameShop.py @@ -1,32 +1,30 @@ -import random -import re - from panda3d.core 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 toontown.toonbase.ToontownGlobals import * from direct.task.TaskManagerGlobal import * - +from direct.gui.DirectGui import * +from panda3d.core import * +from toontown.distributed.ToontownMsgTypes import * +from direct.directnotify import DirectNotifyGlobal +from direct.gui import OnscreenText 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.distributed.ToontownMsgTypes import * -from toontown.makeatoon.TTPickANamePattern import TTPickANamePattern +from toontown.toontowngui import TeaserPanel +from direct.distributed.PyDatagram import PyDatagram +from direct.showbase import PythonUtil from toontown.toon import NPCToons -from toontown.toonbase import TTLocalizer -from toontown.toonbase.ToontownGlobals import * -from toontown.toontowngui import TeaserPanel, TTDialog - -from . import NameGenerator - +from direct.task import Task +from toontown.makeatoon.TTPickANamePattern import TTPickANamePattern +from panda3d.core import TextEncoder MAX_NAME_WIDTH = TTLocalizer.NSmaxNameWidth ServerDialogTimeout = 3.0 diff --git a/toontown/makeatoon/ShuffleButton.py b/toontown/makeatoon/ShuffleButton.py index 5b50e2f..dd19b97 100644 --- a/toontown/makeatoon/ShuffleButton.py +++ b/toontown/makeatoon/ShuffleButton.py @@ -1,15 +1,11 @@ -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 toontown.toonbase import TTLocalizer +from toontown.toonbase import ToontownGlobals from .MakeAToonGlobals import * - +from direct.directnotify import DirectNotifyGlobal +from direct.interval.IntervalGlobal import * +import random class ShuffleButton: notify = DirectNotifyGlobal.directNotify.newCategory('ShuffleButton') diff --git a/toontown/makeatoon/TTPickANamePattern.py b/toontown/makeatoon/TTPickANamePattern.py index a0a0186..c835f8f 100644 --- a/toontown/makeatoon/TTPickANamePattern.py +++ b/toontown/makeatoon/TTPickANamePattern.py @@ -1,11 +1,7 @@ -import types - from direct.showbase.PythonUtil import listToItem2index - from otp.namepanel.PickANamePattern import PickANamePatternTwoPartLastName - from toontown.makeatoon.NameGenerator import NameGenerator - +import types class TTPickANamePattern(PickANamePatternTwoPartLastName): NameParts = None diff --git a/toontown/minigame/ArrowKeys.py b/toontown/minigame/ArrowKeys.py index 3759dad..1c8c488 100644 --- a/toontown/minigame/ArrowKeys.py +++ b/toontown/minigame/ArrowKeys.py @@ -1,8 +1,6 @@ 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 ed45202..8b9b4b2 100644 --- a/toontown/minigame/CatchGameToonSD.py +++ b/toontown/minigame/CatchGameToonSD.py @@ -1,16 +1,14 @@ from panda3d.core import * - -from direct.directnotify import DirectNotifyGlobal -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 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.task.Task import Task class CatchGameToonSD(StateData.StateData): notify = DirectNotifyGlobal.directNotify.newCategory('CatchGameToonSD') diff --git a/toontown/minigame/ClerkPurchase.py b/toontown/minigame/ClerkPurchase.py index 314e642..d319b44 100644 --- a/toontown/minigame/ClerkPurchase.py +++ b/toontown/minigame/ClerkPurchase.py @@ -1,7 +1,5 @@ -from toontown.toonbase import ToontownTimer - from .PurchaseBase import * - +from toontown.toonbase import ToontownTimer 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 a77e214..10fea25 100644 --- a/toontown/minigame/CogThief.py +++ b/toontown/minigame/CogThief.py @@ -1,17 +1,14 @@ import math - -from panda3d.core import CollisionNode, CollisionSphere, CollisionTube, Point3, Vec3, rad2Deg - -from direct.distributed.ClockDelta import globalClockDelta -from direct.interval.IntervalGlobal import Func, LerpScaleInterval, Parallel, Sequence, SoundInterval +from panda3d.core import CollisionSphere, CollisionNode, Point3, CollisionTube, Vec3, rad2Deg from direct.showbase.DirectObject import DirectObject - +from direct.distributed.ClockDelta import globalClockDelta +from direct.interval.IntervalGlobal import Parallel, SoundInterval, Sequence, Func, LerpScaleInterval +from toontown.suit import Suit +from toontown.suit import SuitDNA +from toontown.toonbase import ToontownGlobals +from toontown.minigame import CogThiefGameGlobals 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 3739022..e2c459a 100644 --- a/toontown/minigame/CogThiefGameGlobals.py +++ b/toontown/minigame/CogThiefGameGlobals.py @@ -1,5 +1,4 @@ -from panda3d.core import BitMask32, VBase3 - +from panda3d.core import VBase3, BitMask32 GameTime = 60 NumBarrels = 4 BarrelStartingPositions = (VBase3(4.3, 4, 0), diff --git a/toontown/minigame/CogThiefGameToonSD.py b/toontown/minigame/CogThiefGameToonSD.py index bbd23e7..2270fbc 100644 --- a/toontown/minigame/CogThiefGameToonSD.py +++ b/toontown/minigame/CogThiefGameToonSD.py @@ -1,13 +1,12 @@ from panda3d.core import * - -from direct.directnotify import DirectNotifyGlobal -from direct.fsm import ClassicFSM, State, StateData -from direct.interval.IntervalGlobal import * -from direct.task.Task import Task - 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.task.Task import Task class CogThiefGameToonSD(StateData.StateData): notify = DirectNotifyGlobal.directNotify.newCategory('CogThiefGameToonSD') diff --git a/toontown/minigame/CogThiefWalk.py b/toontown/minigame/CogThiefWalk.py index 5abb975..a1de366 100644 --- a/toontown/minigame/CogThiefWalk.py +++ b/toontown/minigame/CogThiefWalk.py @@ -1,6 +1,5 @@ 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 1eb9f8f..8c46021 100644 --- a/toontown/minigame/DistributedCannonGame.py +++ b/toontown/minigame/DistributedCannonGame.py @@ -1,6 +1,4 @@ -import math - -from panda3d.core import Point3, Quat, Vec3, rad2Deg +from panda3d.core import Point3, Quat, rad2Deg, Vec3 from panda3d.otp import Nametag, NametagFloat3d from direct.directnotify.DirectNotifyGlobal import directNotify @@ -13,14 +11,18 @@ from direct.task.TaskManagerGlobal import taskMgr from toontown.effects.DustCloud import DustCloud from toontown.effects.Splash import Splash -from toontown.minigame import CannonGameGlobals, MinigameGlobals +from toontown.minigame import CannonGameGlobals +from toontown.minigame import MinigameGlobals from toontown.minigame.DistributedMinigame import DistributedMinigame from toontown.minigame.Trajectory import Trajectory from toontown.toon.ToonHead import ToonHead -from toontown.toonbase import ToontownGlobals, TTLocalizer +from toontown.toonbase import ToontownGlobals +from toontown.toonbase import 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 1003644..cf34f15 100644 --- a/toontown/minigame/DistributedCannonGameAI.py +++ b/toontown/minigame/DistributedCannonGameAI.py @@ -1,10 +1,9 @@ +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 da65da7..6803a4c 100644 --- a/toontown/minigame/DistributedCatchGame.py +++ b/toontown/minigame/DistributedCatchGame.py @@ -1,27 +1,32 @@ -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 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 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 direct.distributed import DistributedSmoothNode +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 .DropPlacer import * from .DropScheduler import * -from .OrthoWalk import * - +from functools import reduce class DistributedCatchGame(DistributedMinigame): DropTaskName = 'dropSomething' diff --git a/toontown/minigame/DistributedCatchGameAI.py b/toontown/minigame/DistributedCatchGameAI.py index 7269393..4acd7cd 100644 --- a/toontown/minigame/DistributedCatchGameAI.py +++ b/toontown/minigame/DistributedCatchGameAI.py @@ -1,10 +1,9 @@ -from direct.fsm import ClassicFSM, State - -from toontown.ai.ToonBarrier import * - -from . import CatchGameGlobals, MinigameGlobals 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 class DistributedCatchGameAI(DistributedMinigameAI): diff --git a/toontown/minigame/DistributedCogThiefGame.py b/toontown/minigame/DistributedCogThiefGame.py index a9c1fa0..5b344dd 100644 --- a/toontown/minigame/DistributedCogThiefGame.py +++ b/toontown/minigame/DistributedCogThiefGame.py @@ -1,21 +1,23 @@ -from panda3d.core import CollisionHandlerEvent, CollisionNode, CollisionSphere, NodePath, Point3, TextNode - +from panda3d.core import Point3, CollisionSphere, CollisionNode, CollisionHandlerEvent, NodePath, TextNode from direct.distributed.ClockDelta import globalClockDelta -from direct.fsm import ClassicFSM, State +from direct.interval.IntervalGlobal import Wait, LerpFunctionInterval, LerpHprInterval, Sequence, Parallel, Func, SoundInterval, ActorInterval, ProjectileInterval, Track, LerpScaleInterval, WaitInterval, LerpPosHprInterval from direct.gui.DirectGui import DirectLabel -from direct.interval.IntervalGlobal import (ActorInterval, Func, LerpFunctionInterval, LerpHprInterval, - LerpPosHprInterval, LerpScaleInterval, Parallel, ProjectileInterval, - Sequence, SoundInterval, Track, Wait, WaitInterval) +from direct.fsm import ClassicFSM +from direct.fsm import State from direct.showbase import RandomNumGen from direct.task import Task - -from toontown.minigame import (CogThief, CogThiefGameGlobals, CogThiefGameToonSD, CogThiefWalk, MinigameGlobals, - Trajectory) -from toontown.minigame.DistributedMinigame import DistributedMinigame +from toontown.toonbase import TTLocalizer +from toontown.toonbase import ToontownGlobals +from toontown.toonbase import ToontownTimer +from toontown.minigame import CogThiefGameToonSD from toontown.minigame.OrthoDrive import OrthoDrive from toontown.minigame.OrthoWalk import OrthoWalk -from toontown.toonbase import ToontownGlobals, ToontownTimer, TTLocalizer - +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 CTGG = CogThiefGameGlobals class DistributedCogThiefGame(DistributedMinigame): @@ -690,8 +692,8 @@ class DistributedCogThiefGame(DistributedMinigame): self.toonPieTracks[avId] = pieTrack def getTossPieInterval(self, toon, x, y, z, h, p, r, power, beginFlyIval = Sequence()): - from toontown.battle import BattleProps from toontown.toonbase import ToontownBattleGlobals + from toontown.battle import BattleProps 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 7af5972..2f88b27 100644 --- a/toontown/minigame/DistributedCogThiefGameAI.py +++ b/toontown/minigame/DistributedCogThiefGameAI.py @@ -1,13 +1,12 @@ 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 CogThiefGameGlobals, DistributedMinigameAI, MinigameGlobals - +from toontown.minigame import DistributedMinigameAI +from toontown.minigame import MinigameGlobals +from toontown.minigame import CogThiefGameGlobals CTGG = CogThiefGameGlobals class DistributedCogThiefGameAI(DistributedMinigameAI.DistributedMinigameAI): diff --git a/toontown/minigame/DistributedDivingGame.py b/toontown/minigame/DistributedDivingGame.py index f298618..aaa9269 100644 --- a/toontown/minigame/DistributedDivingGame.py +++ b/toontown/minigame/DistributedDivingGame.py @@ -1,24 +1,30 @@ -import math -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.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 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 +from otp.distributed.TelemetryLimiter import TelemetryLimiter, TLGatherAllAvs +from toontown.toonbase import ToontownGlobals +from toontown.toonbase import TTLocalizer class DivingGameRotationLimiter(TelemetryLimiter): diff --git a/toontown/minigame/DistributedDivingGameAI.py b/toontown/minigame/DistributedDivingGameAI.py index de219b7..f653f22 100644 --- a/toontown/minigame/DistributedDivingGameAI.py +++ b/toontown/minigame/DistributedDivingGameAI.py @@ -1,15 +1,14 @@ +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 9437e36..c90bc7b 100644 --- a/toontown/minigame/DistributedIceGame.py +++ b/toontown/minigame/DistributedIceGame.py @@ -1,18 +1,17 @@ -import functools import math - -from panda3d.core import CollisionHandlerEvent, CollisionNode, CollisionSphere, NodePath, Point3, VBase4, Vec3, deg2Rad - -from direct.distributed.ClockDelta import globalClockDelta +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 (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 - +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 class DistributedIceGame(DistributedMinigame.DistributedMinigame, DistributedIceWorld.DistributedIceWorld): notify = directNotify.newCategory('DistributedIceGame') diff --git a/toontown/minigame/DistributedIceGameAI.py b/toontown/minigame/DistributedIceGameAI.py index dd92606..30194e8 100644 --- a/toontown/minigame/DistributedIceGameAI.py +++ b/toontown/minigame/DistributedIceGameAI.py @@ -1,14 +1,12 @@ -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 -from toontown.minigame import DistributedMinigameAI, IceGameGlobals, MinigameGlobals - +import functools class DistributedIceGameAI(DistributedMinigameAI.DistributedMinigameAI): notify = directNotify.newCategory('DistributedIceGameAI') diff --git a/toontown/minigame/DistributedIceWorld.py b/toontown/minigame/DistributedIceWorld.py index 332dd6e..af40379 100644 --- a/toontown/minigame/DistributedIceWorld.py +++ b/toontown/minigame/DistributedIceWorld.py @@ -1,11 +1,9 @@ -from panda3d.core import BitMask32, NodePath, Quat, Vec4 -from panda3d.ode import OdeBody, OdeBoxGeom, OdeMass, OdePlaneGeom, OdeSphereGeom, OdeUtil - +from panda3d.core import Vec4, BitMask32, Quat, NodePath +from panda3d.ode import OdePlaneGeom, OdeBody, OdeSphereGeom, OdeMass, OdeUtil, OdeBoxGeom from direct.directnotify import DirectNotifyGlobal - +from toontown.minigame import DistributedMinigamePhysicsWorld +from toontown.minigame import IceGameGlobals 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 1adb6f4..70ba03d 100644 --- a/toontown/minigame/DistributedMazeGame.py +++ b/toontown/minigame/DistributedMazeGame.py @@ -1,24 +1,28 @@ -import functools - -from panda3d.core import Point3, Vec3 - -from direct.distributed.ClockDelta import globalClockDelta +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.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.showbase import RandomNumGen from direct.task.Task import Task - -from toontown.toonbase import ToontownTimer, TTLocalizer - -from . import Maze, MazeData, MazeGameGlobals, MazeTreasure, MinigameAvatarScorePanel, MinigameGlobals, Trajectory +from direct.distributed.ClockDelta import globalClockDelta +from panda3d.core import Point3, Vec3 +from toontown.toonbase import TTLocalizer +from toontown.toonbase import ToontownTimer from .DistributedMinigame import DistributedMinigame from .MazeSuit import MazeSuit -from .OrthoDrive import OrthoDrive 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 class DistributedMazeGame(DistributedMinigame): notify = directNotify.newCategory('DistributedMazeGame') diff --git a/toontown/minigame/DistributedMazeGameAI.py b/toontown/minigame/DistributedMazeGameAI.py index 2c55cc7..fee0c80 100644 --- a/toontown/minigame/DistributedMazeGameAI.py +++ b/toontown/minigame/DistributedMazeGameAI.py @@ -1,9 +1,10 @@ -from direct.fsm import ClassicFSM, State -from direct.task.Task import Task - -from . import MazeData, MazeGameGlobals, PatternGameGlobals 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 class DistributedMazeGameAI(DistributedMinigameAI): diff --git a/toontown/minigame/DistributedMinigame.py b/toontown/minigame/DistributedMinigame.py index d67565b..6a36a7c 100644 --- a/toontown/minigame/DistributedMinigame.py +++ b/toontown/minigame/DistributedMinigame.py @@ -1,25 +1,25 @@ -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 toontown.toonbase.ToonBaseGlobal import * from direct.gui.DirectGui import * -from direct.showbase import PythonUtil, RandomNumGen +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 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 d2c4e24..2461fb4 100644 --- a/toontown/minigame/DistributedMinigameAI.py +++ b/toontown/minigame/DistributedMinigameAI.py @@ -1,19 +1,18 @@ -import random - -from direct.distributed import DistributedObjectAI -from direct.distributed.ClockDelta import * -from direct.fsm import ClassicFSM, State -from direct.showbase import PythonUtil -from direct.task import Task - from otp.ai.AIBase import * - +from direct.distributed.ClockDelta import * from toontown.ai.ToonBarrier import * -from toontown.shtiker import NewbiePurchaseManagerAI, PurchaseManagerAI +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.showbase import PythonUtil +from . import TravelGameGlobals 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 e5feb66..fe1f4fc 100644 --- a/toontown/minigame/DistributedMinigamePhysicsWorld.py +++ b/toontown/minigame/DistributedMinigamePhysicsWorld.py @@ -1,9 +1,7 @@ -from direct.directnotify import DirectNotifyGlobal from direct.distributed import DistributedObject - +from direct.directnotify import DirectNotifyGlobal 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 f077f2f..66f69a7 100644 --- a/toontown/minigame/DistributedMinigameTemplate.py +++ b/toontown/minigame/DistributedMinigameTemplate.py @@ -1,12 +1,9 @@ from panda3d.core import * - -from direct.fsm import ClassicFSM, State - -from toontown.toonbase import TTLocalizer from toontown.toonbase.ToonBaseGlobal import * - from .DistributedMinigame import * - +from direct.fsm import ClassicFSM, State +from direct.fsm import State +from toontown.toonbase import TTLocalizer class DistributedMinigameTemplate(DistributedMinigame): diff --git a/toontown/minigame/DistributedMinigameTemplateAI.py b/toontown/minigame/DistributedMinigameTemplateAI.py index 233536a..c7e4c6b 100644 --- a/toontown/minigame/DistributedMinigameTemplateAI.py +++ b/toontown/minigame/DistributedMinigameTemplateAI.py @@ -1,7 +1,6 @@ -from direct.fsm import ClassicFSM, State - from .DistributedMinigameAI import * - +from direct.fsm import ClassicFSM, State +from direct.fsm import State class DistributedMinigameTemplateAI(DistributedMinigameAI): diff --git a/toontown/minigame/DistributedPairingGame.py b/toontown/minigame/DistributedPairingGame.py index 54dffad..9fa4964 100644 --- a/toontown/minigame/DistributedPairingGame.py +++ b/toontown/minigame/DistributedPairingGame.py @@ -1,18 +1,18 @@ from panda3d.core import * - -from direct.fsm import ClassicFSM, State -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 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 toontown.toonbase.ToontownGlobals import GlobalDialogColor class DistributedPairingGame(DistributedMinigame): TOON_SPEED = 11 diff --git a/toontown/minigame/DistributedPairingGameAI.py b/toontown/minigame/DistributedPairingGameAI.py index be67908..c8ac764 100644 --- a/toontown/minigame/DistributedPairingGameAI.py +++ b/toontown/minigame/DistributedPairingGameAI.py @@ -1,11 +1,12 @@ -from direct.fsm import ClassicFSM, State - -from toontown.ai.ToonBarrier import ToonBarrier -from toontown.minigame import PairingGameGlobals, PlayingCard, PlayingCardDeck, PlayingCardGlobals -from toontown.minigame.PlayingCard import PlayingCardBase - 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 class DistributedPairingGameAI(DistributedMinigameAI): notify = directNotify.newCategory('DistributedPairingGameAI') diff --git a/toontown/minigame/DistributedPatternGame.py b/toontown/minigame/DistributedPatternGame.py index 54d41a6..7e7420c 100644 --- a/toontown/minigame/DistributedPatternGame.py +++ b/toontown/minigame/DistributedPatternGame.py @@ -1,5 +1,3 @@ -from random import choice - from panda3d.core import Point3, VBase4, Vec3 from panda3d.otp import CFSpeech, NametagGlobals @@ -7,18 +5,29 @@ 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, TTLocalizer +from toontown.toonbase import ToontownGlobals +from toontown.toonbase import 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 bd9897d..a06799e 100644 --- a/toontown/minigame/DistributedPatternGameAI.py +++ b/toontown/minigame/DistributedPatternGameAI.py @@ -1,13 +1,10 @@ -import copy -import random - -from direct.fsm import ClassicFSM, State - -from toontown.ai.ToonBarrier import * - -from . import PatternGameGlobals 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 class DistributedPatternGameAI(DistributedMinigameAI): diff --git a/toontown/minigame/DistributedPhotoGame.py b/toontown/minigame/DistributedPhotoGame.py index 4380b51..bcf6096 100644 --- a/toontown/minigame/DistributedPhotoGame.py +++ b/toontown/minigame/DistributedPhotoGame.py @@ -1,31 +1,34 @@ -import math -import random -import time - -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 panda3d.core import * +from panda3d.toontown import * from toontown.toonbase.ToonBaseGlobal import * - -from . import PhotoGameGlobals 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.otp import * WORLD_SCALE = 2.0 FAR_PLANE_DIST = 600 * WORLD_SCALE diff --git a/toontown/minigame/DistributedPhotoGameAI.py b/toontown/minigame/DistributedPhotoGameAI.py index 561c3f1..d49331a 100644 --- a/toontown/minigame/DistributedPhotoGameAI.py +++ b/toontown/minigame/DistributedPhotoGameAI.py @@ -1,14 +1,11 @@ -import random - +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 toontown.minigame import PhotoGameBase - from . import PhotoGameGlobals -from .DistributedMinigameAI import * - +from toontown.minigame import PhotoGameBase +import random class DistributedPhotoGameAI(DistributedMinigameAI, PhotoGameBase.PhotoGameBase): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedPhotoGameAI') diff --git a/toontown/minigame/DistributedRaceGame.py b/toontown/minigame/DistributedRaceGame.py index 6641a23..57ca910 100644 --- a/toontown/minigame/DistributedRaceGame.py +++ b/toontown/minigame/DistributedRaceGame.py @@ -1,17 +1,17 @@ from panda3d.core import * - -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.toonbase import ToontownGlobals, ToontownTimer, TTLocalizer from toontown.toonbase.ToonBaseGlobal import * - -from . import RaceGameGlobals +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.task.Task import Task +from toontown.toonbase import ToontownTimer +from . import RaceGameGlobals +from toontown.toonbase import ToontownGlobals +from toontown.toonbase import TTLocalizer class DistributedRaceGame(DistributedMinigame): diff --git a/toontown/minigame/DistributedRaceGameAI.py b/toontown/minigame/DistributedRaceGameAI.py index 45314c3..11ee6aa 100644 --- a/toontown/minigame/DistributedRaceGameAI.py +++ b/toontown/minigame/DistributedRaceGameAI.py @@ -1,13 +1,11 @@ -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 edbae4b..f6e65be 100644 --- a/toontown/minigame/DistributedRingGame.py +++ b/toontown/minigame/DistributedRingGame.py @@ -1,18 +1,20 @@ -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.interval.IntervalGlobal import * +from direct.fsm import State from direct.task import Task - -from toontown.toonbase import ToontownGlobals, TTLocalizer -from toontown.toonbase.ToonBaseGlobal import * - -from . import ArrowKeys, Ring, RingGameGlobals, RingGroup, RingTrack, RingTrackGroups -from .DistributedMinigame import * - +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 class DistributedRingGame(DistributedMinigame): UPDATE_ENVIRON_TASK = 'RingGameUpdateEnvironTask' diff --git a/toontown/minigame/DistributedRingGameAI.py b/toontown/minigame/DistributedRingGameAI.py index 44c0693..87668ae 100644 --- a/toontown/minigame/DistributedRingGameAI.py +++ b/toontown/minigame/DistributedRingGameAI.py @@ -1,12 +1,10 @@ -import random -import types - +from .DistributedMinigameAI import * from direct.distributed.ClockDelta import * from direct.fsm import ClassicFSM, State - +from direct.fsm import State from . import RingGameGlobals -from .DistributedMinigameAI import * - +import random +import types class DistributedRingGameAI(DistributedMinigameAI): diff --git a/toontown/minigame/DistributedTagGame.py b/toontown/minigame/DistributedTagGame.py index 1a26eda..59badbc 100644 --- a/toontown/minigame/DistributedTagGame.py +++ b/toontown/minigame/DistributedTagGame.py @@ -1,21 +1,20 @@ -import random - 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 toontown.safezone import Walk -from toontown.toonbase import ToontownGlobals, ToontownTimer, TTLocalizer from toontown.toonbase.ToonBaseGlobal import * - -from . import MinigameAvatarScorePanel, TagGameGlobals, Trajectory 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 otp.otpbase import OTPGlobals +from . import TagGameGlobals +from . import Trajectory class DistributedTagGame(DistributedMinigame): DURATION = TagGameGlobals.DURATION diff --git a/toontown/minigame/DistributedTagGameAI.py b/toontown/minigame/DistributedTagGameAI.py index c01c759..c943545 100644 --- a/toontown/minigame/DistributedTagGameAI.py +++ b/toontown/minigame/DistributedTagGameAI.py @@ -1,12 +1,10 @@ -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 5db7491..45254a7 100644 --- a/toontown/minigame/DistributedTagTreasure.py +++ b/toontown/minigame/DistributedTagTreasure.py @@ -1,6 +1,5 @@ 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 39a4f26..7e7bf29 100644 --- a/toontown/minigame/DistributedTagTreasureAI.py +++ b/toontown/minigame/DistributedTagTreasureAI.py @@ -1,7 +1,5 @@ -from direct.distributed.ClockDelta import * - from toontown.safezone import DistributedTreasureAI - +from direct.distributed.ClockDelta import * class DistributedTagTreasureAI(DistributedTreasureAI.DistributedTreasureAI): diff --git a/toontown/minigame/DistributedTargetGame.py b/toontown/minigame/DistributedTargetGame.py index 8a9afdc..335f3f8 100644 --- a/toontown/minigame/DistributedTargetGame.py +++ b/toontown/minigame/DistributedTargetGame.py @@ -1,20 +1,21 @@ -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.interval.IntervalGlobal import * +from direct.fsm import State from direct.task import Task - -from toontown.toonbase import ToontownGlobals, TTLocalizer -from toontown.toonbase.ToonBaseGlobal import * - -from . import ArrowKeys, FogOverlay, RubberBand, TargetGameGlobals -from .DistributedMinigame import * - +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 def circleX(angle, radius, centerX, centerY): x = radius * cos(angle) + centerX diff --git a/toontown/minigame/DistributedTargetGameAI.py b/toontown/minigame/DistributedTargetGameAI.py index 76bbd8b..de8499e 100644 --- a/toontown/minigame/DistributedTargetGameAI.py +++ b/toontown/minigame/DistributedTargetGameAI.py @@ -1,12 +1,10 @@ -import random -import types - +from .DistributedMinigameAI import * from direct.distributed.ClockDelta import * from direct.fsm import ClassicFSM, State - +from direct.fsm import State from . import TargetGameGlobals -from .DistributedMinigameAI import * - +import random +import types def checkPlace(placeX, placeY, fillSize, placeList): goodPlacement = 1 diff --git a/toontown/minigame/DistributedTravelGame.py b/toontown/minigame/DistributedTravelGame.py index 9b4a13b..f935283 100644 --- a/toontown/minigame/DistributedTravelGame.py +++ b/toontown/minigame/DistributedTravelGame.py @@ -1,19 +1,18 @@ -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 toontown.toontowngui import TTDialog - -from . import TravelGameGlobals, VoteResultsPanel, VoteResultsTrolleyPanel 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 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 88aed91..d70f0ff 100644 --- a/toontown/minigame/DistributedTravelGameAI.py +++ b/toontown/minigame/DistributedTravelGameAI.py @@ -1,12 +1,9 @@ -import functools - -from direct.fsm import ClassicFSM, State - from toontown.minigame.DistributedMinigameAI import * -from toontown.toonbase import ToontownGlobals - +from direct.fsm import ClassicFSM, State +from direct.fsm import State from . import TravelGameGlobals - +from toontown.toonbase import ToontownGlobals +import functools class DistributedTravelGameAI(DistributedMinigameAI): notify = directNotify.newCategory('DistributedTravelGameAI') diff --git a/toontown/minigame/DistributedTugOfWarGame.py b/toontown/minigame/DistributedTugOfWarGame.py index da61043..2dcae83 100644 --- a/toontown/minigame/DistributedTugOfWarGame.py +++ b/toontown/minigame/DistributedTugOfWarGame.py @@ -1,5 +1,3 @@ -import math - from panda3d.core import RopeNode, VBase3 from panda3d.otp import NametagGlobals @@ -7,8 +5,17 @@ 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, LerpPosHprInterval, LerpPosInterval, - Parallel, Sequence, Wait) +from direct.interval.IntervalGlobal import ( + ActorInterval, + Func, + LerpHprInterval, + LerpPosInterval, + LerpPosHprInterval, + Parallel, + Sequence, + Wait +) + from direct.showutil.Rope import Rope from direct.task.TaskManagerGlobal import taskMgr @@ -20,10 +27,13 @@ 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, TTLocalizer +from toontown.toonbase import ToontownGlobals +from toontown.toonbase import 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 69b5d8d..3db008e 100644 --- a/toontown/minigame/DistributedTugOfWarGameAI.py +++ b/toontown/minigame/DistributedTugOfWarGameAI.py @@ -1,13 +1,11 @@ -import copy -import math -import random - -from direct.fsm import ClassicFSM, State -from direct.task.Task import Task - -from . import TugOfWarGameGlobals 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 class DistributedTugOfWarGameAI(DistributedMinigameAI): diff --git a/toontown/minigame/DistributedTwoDGame.py b/toontown/minigame/DistributedTwoDGame.py index 04dfe79..3d3c17b 100644 --- a/toontown/minigame/DistributedTwoDGame.py +++ b/toontown/minigame/DistributedTwoDGame.py @@ -1,21 +1,18 @@ from panda3d.core import * - -from direct.directnotify import DirectNotifyGlobal -from direct.fsm import ClassicFSM, State +from direct.interval.IntervalGlobal import * +from toontown.toonbase.ToonBaseGlobal import * +from toontown.toonbase import TTLocalizer from direct.gui.DirectFrame import DirectFrame from direct.gui.DirectGui import DGG -from direct.interval.IntervalGlobal import * from direct.task.Task import Task - -from toontown.toonbase import ToontownTimer, TTLocalizer -from toontown.toonbase.ToonBaseGlobal import * - -from . import (ArrowKeys, MinigameAvatarScorePanel, ToonBlitzAssetMgr, ToonBlitzGlobals, TwoDCamera, TwoDGameToonSD, - TwoDSectionMgr) +from direct.fsm import ClassicFSM, State +from direct.directnotify import DirectNotifyGlobal from .DistributedMinigame import * -from .TwoDDrive import * +from . import MinigameAvatarScorePanel, ArrowKeys, ToonBlitzAssetMgr, TwoDCamera +from . import TwoDSectionMgr, ToonBlitzGlobals, TwoDGameToonSD +from toontown.toonbase import ToontownTimer from .TwoDWalk import * - +from .TwoDDrive 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 364b904..1fc2b92 100644 --- a/toontown/minigame/DistributedTwoDGameAI.py +++ b/toontown/minigame/DistributedTwoDGameAI.py @@ -1,13 +1,9 @@ -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 * - +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 class DistributedTwoDGameAI(DistributedMinigameAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedTwoDGameAI') diff --git a/toontown/minigame/DistributedVineGame.py b/toontown/minigame/DistributedVineGame.py index 6ec84dc..49773f7 100644 --- a/toontown/minigame/DistributedVineGame.py +++ b/toontown/minigame/DistributedVineGame.py @@ -1,20 +1,22 @@ -from panda3d.core import (BitMask32, Camera, CollisionHandlerEvent, CollisionNode, CollisionSphere, PerspectiveLens, - Point2, Point3, Vec3, Vec4) -from panda3d.physics import ActorNode, ForceNode, LinearVectorForce - +from panda3d.core import Point3, CollisionHandlerEvent, CollisionNode, CollisionSphere, Camera, PerspectiveLens, Vec4, Point2, Vec3, BitMask32 +from panda3d.physics import ForceNode, LinearVectorForce, ActorNode +from direct.interval.IntervalGlobal import Sequence, Parallel, Func, Wait, LerpPosInterval, ActorInterval, LerpScaleInterval, ProjectileInterval, SoundInterval from direct.directnotify import DirectNotifyGlobal -from direct.fsm import ClassicFSM, State from direct.gui.DirectFrame import DirectFrame from direct.gui.DirectGui import DGG -from direct.interval.IntervalGlobal import (ActorInterval, Func, LerpPosInterval, LerpScaleInterval, Parallel, - ProjectileInterval, Sequence, SoundInterval, Wait) +from toontown.toonbase import ToontownGlobals from direct.task.Task import Task - -from toontown.minigame import (ArrowKeys, MinigameAvatarScorePanel, SwingVine, VineBat, VineGameGlobals, VineHeadFrame, - VineTreasure) +from direct.fsm import ClassicFSM, State +from toontown.toonbase import TTLocalizer from toontown.minigame.DistributedMinigame import DistributedMinigame -from toontown.toonbase import ToontownGlobals, ToontownTimer, TTLocalizer - +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 class DistributedVineGame(DistributedMinigame): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedVineGame') diff --git a/toontown/minigame/DistributedVineGameAI.py b/toontown/minigame/DistributedVineGameAI.py index 9f1e7a1..6b97420 100644 --- a/toontown/minigame/DistributedVineGameAI.py +++ b/toontown/minigame/DistributedVineGameAI.py @@ -1,8 +1,7 @@ -from direct.fsm import ClassicFSM, State - -from . import VineGameGlobals from .DistributedMinigameAI import * - +from direct.fsm import ClassicFSM, State +from direct.fsm import State +from . import VineGameGlobals class DistributedVineGameAI(DistributedMinigameAI): diff --git a/toontown/minigame/DivingFishSpawn.py b/toontown/minigame/DivingFishSpawn.py index f661720..e8f943c 100644 --- a/toontown/minigame/DivingFishSpawn.py +++ b/toontown/minigame/DivingFishSpawn.py @@ -1,15 +1,11 @@ -import random - -from direct.actor import Actor +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 direct.actor import Actor +import random from . import DivingGameGlobals - class DivingFishSpawn(DirectObject): RADIUS = 0.7 diff --git a/toontown/minigame/DivingGameGlobals.py b/toontown/minigame/DivingGameGlobals.py index 72f8850..c4b9186 100644 --- a/toontown/minigame/DivingGameGlobals.py +++ b/toontown/minigame/DivingGameGlobals.py @@ -1,5 +1,4 @@ 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 a768109..d535062 100644 --- a/toontown/minigame/DivingGameToonSD.py +++ b/toontown/minigame/DivingGameToonSD.py @@ -1,14 +1,13 @@ -from direct.directnotify import DirectNotifyGlobal -from direct.fsm import ClassicFSM, State, StateData -from direct.interval.IntervalGlobal import * 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 . 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 c61ac31..cd71cd4 100644 --- a/toontown/minigame/DivingTreasure.py +++ b/toontown/minigame/DivingTreasure.py @@ -1,12 +1,9 @@ +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 27c74e5..4a02789 100644 --- a/toontown/minigame/DropPlacer.py +++ b/toontown/minigame/DropPlacer.py @@ -1,10 +1,8 @@ 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 2fa3881..525a89e 100644 --- a/toontown/minigame/FogOverlay.py +++ b/toontown/minigame/FogOverlay.py @@ -1,16 +1,13 @@ -import math -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.interval.IntervalGlobal import * +from direct.fsm import State from direct.task import Task - from toontown.toonbase import ToontownGlobals -from toontown.toonbase.ToonBaseGlobal import * - +import math +from math import * class FogOverlay: SomeCounter = 0 diff --git a/toontown/minigame/IceGameGlobals.py b/toontown/minigame/IceGameGlobals.py index 9664ee9..9c56c0a 100644 --- a/toontown/minigame/IceGameGlobals.py +++ b/toontown/minigame/IceGameGlobals.py @@ -1,9 +1,6 @@ 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 fd9b589..84b4e51 100644 --- a/toontown/minigame/IceTreasure.py +++ b/toontown/minigame/IceTreasure.py @@ -1,12 +1,9 @@ -from panda3d.core import BitMask32, CollisionNode, CollisionSphere, Point3 - +from panda3d.core import Point3, CollisionSphere, CollisionNode, BitMask32 +from direct.interval.IntervalGlobal import Sequence, LerpScaleInterval, Parallel, Func, SoundInterval from direct.directnotify import DirectNotifyGlobal -from direct.interval.IntervalGlobal import Func, LerpScaleInterval, Parallel, Sequence, SoundInterval from direct.showbase.DirectObject import DirectObject - -from toontown.battle import BattleParticles from toontown.toonbase import ToontownGlobals - +from toontown.battle import BattleParticles class IceTreasure(DirectObject): notify = DirectNotifyGlobal.directNotify.newCategory('IceTreasure') diff --git a/toontown/minigame/Maze.py b/toontown/minigame/Maze.py index 2fe6c8d..26ecf68 100644 --- a/toontown/minigame/Maze.py +++ b/toontown/minigame/Maze.py @@ -1,6 +1,5 @@ -from . import MazeData from .MazeBase import MazeBase - +from . import MazeData class Maze(MazeBase): diff --git a/toontown/minigame/MazeBase.py b/toontown/minigame/MazeBase.py index 7f1cd85..32cc19a 100644 --- a/toontown/minigame/MazeBase.py +++ b/toontown/minigame/MazeBase.py @@ -1,8 +1,6 @@ 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 441279a..4ae9caa 100644 --- a/toontown/minigame/MazeGameGlobals.py +++ b/toontown/minigame/MazeGameGlobals.py @@ -1,6 +1,5 @@ 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 3f889f7..d2c5145 100644 --- a/toontown/minigame/MazeMapGui.py +++ b/toontown/minigame/MazeMapGui.py @@ -1,9 +1,8 @@ +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 639383b..44c5fc4 100644 --- a/toontown/minigame/MazeSuit.py +++ b/toontown/minigame/MazeSuit.py @@ -1,18 +1,15 @@ -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.interval.MetaInterval import Parallel +from direct.interval.LerpInterval import LerpPosInterval, LerpHprInterval from direct.showbase.RandomNumGen import RandomNumGen - -from toontown.suit import Suit, SuitDNA +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 class MazeSuit(DirectObject): COLL_SPHERE_NAME = 'MazeSuitSphere' diff --git a/toontown/minigame/MazeTreasure.py b/toontown/minigame/MazeTreasure.py index 145afa0..8d8aa99 100644 --- a/toontown/minigame/MazeTreasure.py +++ b/toontown/minigame/MazeTreasure.py @@ -1,8 +1,6 @@ -from direct.directnotify import DirectNotifyGlobal from direct.showbase.DirectObject import DirectObject - from toontown.toonbase.ToontownGlobals import * - +from direct.directnotify import DirectNotifyGlobal class MazeTreasure(DirectObject): RADIUS = 0.7 diff --git a/toontown/minigame/MinigameAvatarScorePanel.py b/toontown/minigame/MinigameAvatarScorePanel.py index 8206f34..45c4e08 100644 --- a/toontown/minigame/MinigameAvatarScorePanel.py +++ b/toontown/minigame/MinigameAvatarScorePanel.py @@ -1,10 +1,8 @@ from panda3d.core import * - -from direct.gui.DirectGui import * - -from toontown.toon import LaffMeter from toontown.toonbase.ToontownGlobals import * - +from direct.gui.DirectGui import * +from panda3d.core import * +from toontown.toon import LaffMeter class MinigameAvatarScorePanel(DirectFrame): diff --git a/toontown/minigame/MinigameCreatorAI.py b/toontown/minigame/MinigameCreatorAI.py index 0a2cb8d..dd6f1b1 100644 --- a/toontown/minigame/MinigameCreatorAI.py +++ b/toontown/minigame/MinigameCreatorAI.py @@ -1,15 +1,26 @@ import copy import random import time - from toontown.toonbase import ToontownGlobals - -from . import (DistributedCannonGameAI, DistributedCatchGameAI, DistributedCogThiefGameAI, DistributedDivingGameAI, - DistributedIceGameAI, DistributedMazeGameAI, DistributedMinigameTemplateAI, DistributedPairingGameAI, - DistributedPatternGameAI, DistributedPhotoGameAI, DistributedRaceGameAI, DistributedRingGameAI, - DistributedTagGameAI, DistributedTargetGameAI, DistributedTravelGameAI, DistributedTugOfWarGameAI, - DistributedTwoDGameAI, DistributedVineGameAI, TravelGameGlobals) - +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 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 a61d8ed..ce86888 100644 --- a/toontown/minigame/MinigameGlobals.py +++ b/toontown/minigame/MinigameGlobals.py @@ -1,8 +1,6 @@ from direct.showbase import PythonUtil - -from toontown.hood import ZoneUtil from toontown.toonbase import ToontownGlobals - +from toontown.hood import ZoneUtil latencyTolerance = 10.0 MaxLoadTime = 40.0 rulesDuration = 16 diff --git a/toontown/minigame/MinigamePhysicsWorldBase.py b/toontown/minigame/MinigamePhysicsWorldBase.py index aac65cb..8a5231c 100644 --- a/toontown/minigame/MinigamePhysicsWorldBase.py +++ b/toontown/minigame/MinigamePhysicsWorldBase.py @@ -1,10 +1,8 @@ from panda3d.core import Quat -from panda3d.ode import OdeJointGroup, OdeSimpleSpace, OdeUtil, OdeWorld - +from panda3d.ode import OdeWorld, OdeSimpleSpace, OdeJointGroup, OdeUtil 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 65c4001..4391d07 100644 --- a/toontown/minigame/MinigamePowerMeter.py +++ b/toontown/minigame/MinigamePowerMeter.py @@ -1,10 +1,8 @@ from panda3d.core import * - -from direct.gui.DirectGui import * - -from toontown.toonbase import TTLocalizer from toontown.toonbase.ToontownGlobals import * - +from direct.gui.DirectGui import * +from panda3d.core import * +from toontown.toonbase import TTLocalizer class MinigamePowerMeter(DirectFrame): diff --git a/toontown/minigame/MinigameRulesPanel.py b/toontown/minigame/MinigameRulesPanel.py index a54717b..50cd8bc 100644 --- a/toontown/minigame/MinigameRulesPanel.py +++ b/toontown/minigame/MinigameRulesPanel.py @@ -1,15 +1,12 @@ -from panda3d.core import * - -from direct.fsm import StateData -from direct.gui.DirectGui import * from direct.task import Task - -from toontown.toonbase import ToontownTimer, TTLocalizer +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 . 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 e21e378..af00736 100644 --- a/toontown/minigame/OrthoWalk.py +++ b/toontown/minigame/OrthoWalk.py @@ -1,11 +1,8 @@ -from direct.directnotify import DirectNotifyGlobal -from direct.interval.IntervalGlobal import * -from direct.task.Task import Task - from toontown.toonbase.ToonBaseGlobal import * - +from direct.task.Task import Task +from direct.interval.IntervalGlobal import * from .OrthoDrive import * - +from direct.directnotify import DirectNotifyGlobal class OrthoWalk: notify = DirectNotifyGlobal.directNotify.newCategory('OrthoWalk') diff --git a/toontown/minigame/PairingGameCard.py b/toontown/minigame/PairingGameCard.py index 530dc6e..a7022f7 100644 --- a/toontown/minigame/PairingGameCard.py +++ b/toontown/minigame/PairingGameCard.py @@ -1,10 +1,7 @@ -from panda3d.core import NodePath, Vec3 - -from direct.interval.IntervalGlobal import LerpHprInterval, Parallel, SoundInterval - -from . import PlayingCardGlobals from .PlayingCard import PlayingCardNodePath - +from . import PlayingCardGlobals +from panda3d.core import NodePath, Vec3 +from direct.interval.IntervalGlobal import LerpHprInterval, Parallel, SoundInterval class PairingGameCard(PlayingCardNodePath): DoIntervalDefault = True diff --git a/toontown/minigame/PairingGameGlobals.py b/toontown/minigame/PairingGameGlobals.py index 14924ff..b4ad7cf 100644 --- a/toontown/minigame/PairingGameGlobals.py +++ b/toontown/minigame/PairingGameGlobals.py @@ -1,5 +1,4 @@ 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 33177d5..f96c6bd 100644 --- a/toontown/minigame/PatternGameGlobals.py +++ b/toontown/minigame/PatternGameGlobals.py @@ -1,5 +1,4 @@ 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 59954ce..1be0ff6 100644 --- a/toontown/minigame/PhotoGameBase.py +++ b/toontown/minigame/PhotoGameBase.py @@ -1,7 +1,5 @@ -import random - from . import PhotoGameGlobals - +import random class PhotoGameBase: diff --git a/toontown/minigame/PhotoGameGlobals.py b/toontown/minigame/PhotoGameGlobals.py index 495928e..66c221b 100644 --- a/toontown/minigame/PhotoGameGlobals.py +++ b/toontown/minigame/PhotoGameGlobals.py @@ -1,7 +1,6 @@ from panda3d.core import * - -from toontown.toonbase import ToontownGlobals, TTLocalizer - +from toontown.toonbase import TTLocalizer +from toontown.toonbase import ToontownGlobals GAME_TIME = 60 MAX_SCORE = 23 MIN_SCORE = 5 diff --git a/toontown/minigame/PlayingCard.py b/toontown/minigame/PlayingCard.py index 9490fcd..eac4b83 100644 --- a/toontown/minigame/PlayingCard.py +++ b/toontown/minigame/PlayingCard.py @@ -1,13 +1,9 @@ -from panda3d.core import * - from direct.gui.DirectGui import * +from panda3d.core 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 6f9eaab..905acc0 100644 --- a/toontown/minigame/PlayingCardDeck.py +++ b/toontown/minigame/PlayingCardDeck.py @@ -1,9 +1,6 @@ import random - -from toontown.minigame.PlayingCard import PlayingCardBase - from . import PlayingCardGlobals - +from toontown.minigame.PlayingCard import PlayingCardBase class PlayingCardDeck: diff --git a/toontown/minigame/PlayingCardGlobals.py b/toontown/minigame/PlayingCardGlobals.py index 6a3423b..38dc5f8 100644 --- a/toontown/minigame/PlayingCardGlobals.py +++ b/toontown/minigame/PlayingCardGlobals.py @@ -1,7 +1,6 @@ +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 5654bac..d7147a9 100644 --- a/toontown/minigame/Purchase.py +++ b/toontown/minigame/Purchase.py @@ -1,18 +1,15 @@ from panda3d.otp import * - -from direct.directnotify import DirectNotifyGlobal -from direct.gui import DirectGuiGlobals as DGG -from direct.showbase.PythonUtil import Functor -from direct.task.Task import Task - -from toontown.distributed import DelayDelete -from toontown.minigame import TravelGameGlobals -from toontown.toon import ToonHead -from toontown.toonbase import ToontownGlobals, ToontownTimer - -from . import MinigameGlobals 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.showbase.PythonUtil import Functor +from toontown.minigame import TravelGameGlobals +from toontown.distributed import DelayDelete +from toontown.toonbase import ToontownGlobals +from . import MinigameGlobals 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 f74b0af..d1357c0 100644 --- a/toontown/minigame/PurchaseBase.py +++ b/toontown/minigame/PurchaseBase.py @@ -1,15 +1,15 @@ -from panda3d.core import * - -from direct.fsm import ClassicFSM, State, StateData -from direct.gui.DirectGui import * -from direct.task import Task - -from toontown.shtiker.PurchaseManagerConstants import * -from toontown.toonbase import ToontownGlobals, TTLocalizer 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.task import Task +from direct.fsm import State +from direct.fsm import ClassicFSM, State +from toontown.toonbase import TTLocalizer 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 43671fb..b4ba1f8 100644 --- a/toontown/minigame/RaceGameGlobals.py +++ b/toontown/minigame/RaceGameGlobals.py @@ -1,5 +1,4 @@ from toontown.toonbase import TTLocalizer - ValidChoices = [0, 1, 2, diff --git a/toontown/minigame/Ring.py b/toontown/minigame/Ring.py index 94c84e9..cbd403e 100644 --- a/toontown/minigame/Ring.py +++ b/toontown/minigame/Ring.py @@ -1,11 +1,8 @@ from panda3d.core import * -from panda3d.core import NodePath - from toontown.toonbase.ToonBaseGlobal import * - +from panda3d.core import NodePath 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 0fcb8fc..0df5fce 100644 --- a/toontown/minigame/RingAction.py +++ b/toontown/minigame/RingAction.py @@ -1,8 +1,6 @@ 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 ce465ae..518304f 100644 --- a/toontown/minigame/RingGameGlobals.py +++ b/toontown/minigame/RingGameGlobals.py @@ -1,7 +1,6 @@ from panda3d.core import * - -from toontown.toonbase import ToontownGlobals, TTLocalizer - +from toontown.toonbase import TTLocalizer +from toontown.toonbase import ToontownGlobals 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 0a6959a..e839536 100644 --- a/toontown/minigame/RingGroup.py +++ b/toontown/minigame/RingGroup.py @@ -1,10 +1,10 @@ from panda3d.core import * -from panda3d.core import NodePath - from toontown.toonbase.ToonBaseGlobal import * - -from . import Ring, RingGameGlobals, RingTrack, RingTrackGroup - +from panda3d.core import NodePath +from . import Ring +from . import RingTrack +from . import RingTrackGroup +from . import RingGameGlobals class RingGroup(NodePath): diff --git a/toontown/minigame/RingTrack.py b/toontown/minigame/RingTrack.py index 2d10dc7..1e21069 100644 --- a/toontown/minigame/RingTrack.py +++ b/toontown/minigame/RingTrack.py @@ -1,8 +1,6 @@ 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 cb5c117..4bce67d 100644 --- a/toontown/minigame/RingTrackGroups.py +++ b/toontown/minigame/RingTrackGroups.py @@ -1,9 +1,10 @@ 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 e2bc92e..85a309a 100644 --- a/toontown/minigame/RingTracks.py +++ b/toontown/minigame/RingTracks.py @@ -1,7 +1,6 @@ import math - -from . import RingAction, RingTrack - +from . import RingTrack +from . import RingAction center = (0, 0) up = (0, 1) down = (0, -1) diff --git a/toontown/minigame/RubberBand.py b/toontown/minigame/RubberBand.py index 6ddfbb0..630bb81 100644 --- a/toontown/minigame/RubberBand.py +++ b/toontown/minigame/RubberBand.py @@ -1,17 +1,14 @@ -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.interval.IntervalGlobal import * +from direct.fsm import State from direct.task import Task - from toontown.toonbase import ToontownGlobals -from toontown.toonbase.ToonBaseGlobal import * - +import math +from math import * +import random class RubberBand: SomeCounter = 0 diff --git a/toontown/minigame/SwingVine.py b/toontown/minigame/SwingVine.py index f96430b..e9bfaad 100644 --- a/toontown/minigame/SwingVine.py +++ b/toontown/minigame/SwingVine.py @@ -1,18 +1,14 @@ -import math - +from direct.gui.DirectGui import * from panda3d.core import * from panda3d.physics import * - from direct.directnotify import DirectNotifyGlobal -from direct.distributed import DistributedObject -from direct.gui.DirectGui import * from direct.interval.IntervalGlobal import * +from direct.distributed import DistributedObject from direct.showutil import Rope - +import math from toontown.toonbase import ToontownGlobals - -from . import VineGameGlobals, VineSpider - +from . import VineGameGlobals +from . import VineSpider class SwingVine(NodePath): notify = DirectNotifyGlobal.directNotify.newCategory('SwingVine') diff --git a/toontown/minigame/TagTreasurePlannerAI.py b/toontown/minigame/TagTreasurePlannerAI.py index c22e2ab..2ce2436 100644 --- a/toontown/minigame/TagTreasurePlannerAI.py +++ b/toontown/minigame/TagTreasurePlannerAI.py @@ -1,11 +1,8 @@ from direct.directnotify import DirectNotifyGlobal - -from toontown.safezone import RegenTreasurePlannerAI from toontown.toonbase.ToontownGlobals import * - +from toontown.safezone import RegenTreasurePlannerAI 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 7e574b7..f7d55e9 100644 --- a/toontown/minigame/TargetGameGlobals.py +++ b/toontown/minigame/TargetGameGlobals.py @@ -1,7 +1,6 @@ from panda3d.core import * - -from toontown.toonbase import ToontownGlobals, TTLocalizer - +from toontown.toonbase import TTLocalizer +from toontown.toonbase import ToontownGlobals 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 0691d43..c4afd16 100644 --- a/toontown/minigame/TempMinigameAI.py +++ b/toontown/minigame/TempMinigameAI.py @@ -1,5 +1,4 @@ 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 f5b83e5..4360eb9 100644 --- a/toontown/minigame/ToonBlitzGlobals.py +++ b/toontown/minigame/ToonBlitzGlobals.py @@ -1,7 +1,5 @@ -from panda3d.core import BitMask32 - from toontown.toonbase import ToontownGlobals - +from panda3d.core import BitMask32 ShowScoresDuration = 4.0 EndlessGame = config.GetBool('endless-2d-game', 0) ScoreToJellyBeansMultiplier = 5 diff --git a/toontown/minigame/Trajectory.py b/toontown/minigame/Trajectory.py index 139d3f4..d135f0c 100644 --- a/toontown/minigame/Trajectory.py +++ b/toontown/minigame/Trajectory.py @@ -1,9 +1,6 @@ -from math import * - -from panda3d.core import * - from direct.directnotify import DirectNotifyGlobal - +from panda3d.core import * +from math import * class Trajectory: notify = DirectNotifyGlobal.directNotify.newCategory('Trajectory') diff --git a/toontown/minigame/TreasureScorePanel.py b/toontown/minigame/TreasureScorePanel.py index ea7a797..84fd42c 100644 --- a/toontown/minigame/TreasureScorePanel.py +++ b/toontown/minigame/TreasureScorePanel.py @@ -1,10 +1,8 @@ -from direct.gui.DirectGui import * from direct.showbase.ShowBaseGlobal import * - +from toontown.toonbase.ToontownGlobals import * +from direct.gui.DirectGui 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 7c21e35..92d48de 100644 --- a/toontown/minigame/TrolleyHolidayMgrAI.py +++ b/toontown/minigame/TrolleyHolidayMgrAI.py @@ -1,8 +1,6 @@ from direct.directnotify import DirectNotifyGlobal - -from toontown.ai import HolidayBaseAI from toontown.toonbase import ToontownGlobals, TTLocalizer - +from toontown.ai import HolidayBaseAI class TrolleyHolidayMgrAI(HolidayBaseAI.HolidayBaseAI): notify = DirectNotifyGlobal.directNotify.newCategory('TrolleyHolidayMgrAI') diff --git a/toontown/minigame/TrolleyWeekendMgrAI.py b/toontown/minigame/TrolleyWeekendMgrAI.py index b4e5f5f..2e4b4d2 100644 --- a/toontown/minigame/TrolleyWeekendMgrAI.py +++ b/toontown/minigame/TrolleyWeekendMgrAI.py @@ -1,8 +1,6 @@ from direct.directnotify import DirectNotifyGlobal - -from toontown.ai import HolidayBaseAI from toontown.toonbase import ToontownGlobals, TTLocalizer - +from toontown.ai import HolidayBaseAI class TrolleyWeekendMgrAI(HolidayBaseAI.HolidayBaseAI): notify = DirectNotifyGlobal.directNotify.newCategory('TrolleyWeekendMgrAI') diff --git a/toontown/minigame/TwoDBattleMgr.py b/toontown/minigame/TwoDBattleMgr.py index c253f01..db135a3 100644 --- a/toontown/minigame/TwoDBattleMgr.py +++ b/toontown/minigame/TwoDBattleMgr.py @@ -1,10 +1,16 @@ -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 @@ -13,6 +19,8 @@ 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 1dbf6fb..ff04a59 100644 --- a/toontown/minigame/TwoDBlock.py +++ b/toontown/minigame/TwoDBlock.py @@ -1,17 +1,13 @@ 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.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 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 5ed2ac8..4674436 100644 --- a/toontown/minigame/TwoDCamera.py +++ b/toontown/minigame/TwoDCamera.py @@ -1,14 +1,10 @@ -import math - from panda3d.core import * - -from direct.directnotify import DirectNotifyGlobal -from direct.distributed import DistributedObject from direct.interval.IntervalGlobal import * from direct.task.Task import Task - +from direct.directnotify import DirectNotifyGlobal +from direct.distributed import DistributedObject 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 3a3fb17..7eacfaa 100644 --- a/toontown/minigame/TwoDEnemy.py +++ b/toontown/minigame/TwoDEnemy.py @@ -1,19 +1,17 @@ -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 direct.showbase import PythonUtil +from direct.interval.IntervalGlobal import * from toontown.minigame import ToonBlitzGlobals -from toontown.suit import Suit, SuitDNA 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 COLOR_RED = VBase4(1, 0, 0, 0.3) class TwoDEnemy(DirectObject): diff --git a/toontown/minigame/TwoDEnemyMgr.py b/toontown/minigame/TwoDEnemyMgr.py index 346aba9..a39f09d 100644 --- a/toontown/minigame/TwoDEnemyMgr.py +++ b/toontown/minigame/TwoDEnemyMgr.py @@ -1,10 +1,8 @@ from panda3d.core import * - from direct.directnotify import DirectNotifyGlobal from direct.showbase.DirectObject import DirectObject - -from toontown.minigame import ToonBlitzGlobals, TwoDEnemy - +from toontown.minigame import ToonBlitzGlobals +from toontown.minigame import TwoDEnemy class TwoDEnemyMgr(DirectObject): notify = DirectNotifyGlobal.directNotify.newCategory('TwoDEnemyMgr') diff --git a/toontown/minigame/TwoDGameToonSD.py b/toontown/minigame/TwoDGameToonSD.py index 14c629e..42de694 100644 --- a/toontown/minigame/TwoDGameToonSD.py +++ b/toontown/minigame/TwoDGameToonSD.py @@ -1,19 +1,16 @@ from panda3d.core import * - -from direct.directnotify import DirectNotifyGlobal -from direct.fsm import ClassicFSM, State, StateData +from toontown.toonbase.ToonBaseGlobal import * from direct.interval.IntervalGlobal import * -from direct.task.Task import Task - +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.task.Task import Task 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 be1e19c..39bfb19 100644 --- a/toontown/minigame/TwoDSection.py +++ b/toontown/minigame/TwoDSection.py @@ -1,11 +1,12 @@ from panda3d.core import * - from direct.directnotify import DirectNotifyGlobal from direct.showbase.DirectObject import DirectObject - -from toontown.minigame import (ToonBlitzGlobals, TwoDBlock, TwoDEnemyMgr, TwoDSpawnPointMgr, TwoDStomperMgr, - TwoDTreasureMgr) - +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 class TwoDSection(DirectObject): notify = DirectNotifyGlobal.directNotify.newCategory('TwoDSection') diff --git a/toontown/minigame/TwoDSectionMgr.py b/toontown/minigame/TwoDSectionMgr.py index 708bd53..5f2cc69 100644 --- a/toontown/minigame/TwoDSectionMgr.py +++ b/toontown/minigame/TwoDSectionMgr.py @@ -1,12 +1,13 @@ from panda3d.core import * - from direct.directnotify import DirectNotifyGlobal -from direct.gui import DirectGui from direct.showbase.DirectObject import DirectObject - -from toontown.minigame import ToonBlitzGlobals, TwoDBlock, TwoDSection, TwoDSpawnPointMgr -from toontown.toonbase import ToontownGlobals, TTLocalizer - +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 class TwoDSectionMgr(DirectObject): notify = DirectNotifyGlobal.directNotify.newCategory('TwoDSectionMgr') diff --git a/toontown/minigame/TwoDSpawnPointMgr.py b/toontown/minigame/TwoDSpawnPointMgr.py index 862a465..87c8963 100644 --- a/toontown/minigame/TwoDSpawnPointMgr.py +++ b/toontown/minigame/TwoDSpawnPointMgr.py @@ -1,12 +1,9 @@ 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 064ce8d..3b9c7d5 100644 --- a/toontown/minigame/TwoDStomper.py +++ b/toontown/minigame/TwoDStomper.py @@ -1,10 +1,8 @@ +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 6d3fa5a..1e1567f 100644 --- a/toontown/minigame/TwoDStomperMgr.py +++ b/toontown/minigame/TwoDStomperMgr.py @@ -1,10 +1,8 @@ from panda3d.core import * - from direct.directnotify import DirectNotifyGlobal from direct.showbase.DirectObject import DirectObject - -from toontown.minigame import ToonBlitzGlobals, TwoDStomper - +from toontown.minigame import ToonBlitzGlobals +from toontown.minigame import TwoDStomper class TwoDStomperMgr(DirectObject): notify = DirectNotifyGlobal.directNotify.newCategory('TwoDStomperMgr') diff --git a/toontown/minigame/TwoDTreasure.py b/toontown/minigame/TwoDTreasure.py index 69a0113..7d26035 100644 --- a/toontown/minigame/TwoDTreasure.py +++ b/toontown/minigame/TwoDTreasure.py @@ -1,13 +1,10 @@ -import random - +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.estate.GardenGlobals import BeanColors from toontown.minigame import ToonBlitzGlobals -from toontown.toonbase.ToontownGlobals import * - +from toontown.estate.GardenGlobals import BeanColors +import random class TwoDTreasure(DirectObject): notify = DirectNotifyGlobal.directNotify.newCategory('TwoDTreasure') diff --git a/toontown/minigame/TwoDTreasureMgr.py b/toontown/minigame/TwoDTreasureMgr.py index 670c83c..9a805a1 100644 --- a/toontown/minigame/TwoDTreasureMgr.py +++ b/toontown/minigame/TwoDTreasureMgr.py @@ -1,12 +1,9 @@ -import random - from panda3d.core import * - from direct.directnotify import DirectNotifyGlobal from direct.showbase.DirectObject import DirectObject - -from toontown.minigame import ToonBlitzGlobals, TwoDTreasure - +from toontown.minigame import ToonBlitzGlobals +from toontown.minigame import TwoDTreasure +import random class TwoDTreasureMgr(DirectObject): notify = DirectNotifyGlobal.directNotify.newCategory('TwoDTreasureMgr') diff --git a/toontown/minigame/TwoDWalk.py b/toontown/minigame/TwoDWalk.py index 40caff0..589eebc 100644 --- a/toontown/minigame/TwoDWalk.py +++ b/toontown/minigame/TwoDWalk.py @@ -1,6 +1,5 @@ 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 205b94c..2f79485 100644 --- a/toontown/minigame/VineBat.py +++ b/toontown/minigame/VineBat.py @@ -1,13 +1,9 @@ -from panda3d.core import * - -from direct.directnotify import DirectNotifyGlobal -from direct.interval.SoundInterval import SoundInterval 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.interval.SoundInterval import SoundInterval class VineBat(NodePath, DirectObject): notify = DirectNotifyGlobal.directNotify.newCategory('VineBat') diff --git a/toontown/minigame/VineGameGlobals.py b/toontown/minigame/VineGameGlobals.py index fa6ff23..90c6493 100644 --- a/toontown/minigame/VineGameGlobals.py +++ b/toontown/minigame/VineGameGlobals.py @@ -1,7 +1,5 @@ -from panda3d.core import BitMask32 - from toontown.toonbase import ToontownGlobals - +from panda3d.core import BitMask32 NumVines = 20 GameDuration = 70 ShowScoresDuration = 4.0 diff --git a/toontown/minigame/VineHeadFrame.py b/toontown/minigame/VineHeadFrame.py index a01218f..3f28516 100644 --- a/toontown/minigame/VineHeadFrame.py +++ b/toontown/minigame/VineHeadFrame.py @@ -1,10 +1,7 @@ -from panda3d.core import * - from direct.gui.DirectGui import * - -from toontown.toon import ToonHead +from panda3d.core import * from toontown.toonbase import ToontownGlobals - +from toontown.toon import ToonHead class VineHeadFrame(DirectFrame): diff --git a/toontown/minigame/VineSpider.py b/toontown/minigame/VineSpider.py index 3543992..61d96f2 100644 --- a/toontown/minigame/VineSpider.py +++ b/toontown/minigame/VineSpider.py @@ -1,13 +1,9 @@ -from panda3d.core import * - -from direct.directnotify import DirectNotifyGlobal from direct.showbase.DirectObject import DirectObject - from toontown.toonbase.ToontownGlobals import * - +from direct.directnotify import DirectNotifyGlobal +from panda3d.core import * from . import VineGameGlobals - class VineSpider(NodePath, DirectObject): RADIUS = 1.7 diff --git a/toontown/minigame/VineTreasure.py b/toontown/minigame/VineTreasure.py index 1b7a5e7..9adac24 100644 --- a/toontown/minigame/VineTreasure.py +++ b/toontown/minigame/VineTreasure.py @@ -1,8 +1,6 @@ -from direct.directnotify import DirectNotifyGlobal from direct.showbase.DirectObject import DirectObject - from toontown.toonbase.ToontownGlobals import * - +from direct.directnotify import DirectNotifyGlobal class VineTreasure(DirectObject): notify = DirectNotifyGlobal.directNotify.newCategory('VineTreasure') diff --git a/toontown/minigame/VoteResultsPanel.py b/toontown/minigame/VoteResultsPanel.py index d54e81b..7f55efe 100644 --- a/toontown/minigame/VoteResultsPanel.py +++ b/toontown/minigame/VoteResultsPanel.py @@ -1,12 +1,10 @@ -from panda3d.core import Point3, TextNode - +from direct.gui.DirectGui import DirectFrame, DGG, DirectLabel 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.toonbase import ToontownGlobals +from panda3d.core import Point3, TextNode from toontown.minigame import TravelGameGlobals -from toontown.toonbase import ToontownGlobals, TTLocalizer - +from toontown.toonbase import TTLocalizer +from direct.interval.IntervalGlobal import Parallel, Sequence, LerpFunc, Func, Wait class VoteResultsPanel(DirectFrame): notify = DirectNotifyGlobal.directNotify.newCategory('VoteResultsPanel') diff --git a/toontown/minigame/VoteResultsTrolleyPanel.py b/toontown/minigame/VoteResultsTrolleyPanel.py index bc5406b..8877dc1 100644 --- a/toontown/minigame/VoteResultsTrolleyPanel.py +++ b/toontown/minigame/VoteResultsTrolleyPanel.py @@ -1,14 +1,11 @@ -from panda3d.core import Point3, TextNode, Vec4 - +from direct.gui.DirectGui import DirectFrame, DGG, DirectLabel 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.toonbase import ToontownGlobals +from panda3d.core import Point3, TextNode, Vec4 from toontown.minigame import TravelGameGlobals -from toontown.toonbase import ToontownGlobals, TTLocalizer - +from toontown.toonbase import TTLocalizer +from direct.interval.IntervalGlobal import Parallel, Sequence, LerpFunc, Func, Wait, SoundInterval +from otp.otpbase.PythonUtil import pdir class VoteResultsTrolleyPanel(DirectFrame): notify = DirectNotifyGlobal.directNotify.newCategory('VoteResultsTrolleyPanel') diff --git a/toontown/parties/BaseActivityFSM.py b/toontown/parties/BaseActivityFSM.py index 852b8e1..aca3485 100644 --- a/toontown/parties/BaseActivityFSM.py +++ b/toontown/parties/BaseActivityFSM.py @@ -1,6 +1,5 @@ -from direct.directnotify import DirectNotifyGlobal from direct.fsm.FSM import FSM - +from direct.directnotify import DirectNotifyGlobal class BaseActivityFSM(FSM): notify = DirectNotifyGlobal.directNotify.newCategory('BaseActivityFSM') diff --git a/toontown/parties/CalendarGuiDay.py b/toontown/parties/CalendarGuiDay.py index ce65fb7..bec5e99 100644 --- a/toontown/parties/CalendarGuiDay.py +++ b/toontown/parties/CalendarGuiDay.py @@ -1,18 +1,15 @@ import datetime import functools import time - -from panda3d.core import Plane, PlaneNode, Point3, TextNode, Vec3, Vec4 - +from panda3d.core import TextNode, Vec3, Vec4, PlaneNode, Plane, Point3 +from direct.gui.DirectGui import DirectFrame, DirectLabel, DirectButton, DirectScrolledList, DGG from direct.directnotify import DirectNotifyGlobal from direct.gui import DirectGuiGlobals -from direct.gui.DirectGui import DGG, DirectButton, DirectFrame, DirectLabel, DirectScrolledList - -from toontown.ai.NewsManager import NewsManager -from toontown.parties import PartyGlobals +from toontown.toonbase import TTLocalizer +from toontown.toonbase import ToontownGlobals from toontown.parties.PartyInfo import PartyInfo -from toontown.toonbase import ToontownGlobals, TTLocalizer - +from toontown.parties import PartyGlobals +from toontown.ai.NewsManager import NewsManager def myStrftime(myTime): result = '' diff --git a/toontown/parties/CalendarGuiMonth.py b/toontown/parties/CalendarGuiMonth.py index db8dcfb..1371da3 100644 --- a/toontown/parties/CalendarGuiMonth.py +++ b/toontown/parties/CalendarGuiMonth.py @@ -1,13 +1,10 @@ import calendar -from datetime import datetime, timedelta - -from panda3d.core import TextNode, Vec4 - -from direct.gui.DirectGui import DGG, DirectButton, DirectFrame, DirectLabel, DirectScrolledList - +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 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 cdc6074..5b57926 100644 --- a/toontown/parties/Cannon.py +++ b/toontown/parties/Cannon.py @@ -1,17 +1,14 @@ import math - from panda3d.core import * - +from direct.interval.MetaInterval import Sequence, Parallel from direct.interval.FunctionInterval import Func -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 direct.interval.LerpInterval import LerpScaleInterval, LerpColorScaleInterval +from direct.showbase.PythonUtil import bound from toontown.toon import ToonHead +from toontown.minigame.CannonGameGlobals import * 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 7889aec..b362a78 100644 --- a/toontown/parties/CannonGui.py +++ b/toontown/parties/CannonGui.py @@ -1,10 +1,8 @@ -import direct.gui.DirectGuiGlobals as DGG -from direct.gui.DirectGui import DirectButton, DirectFrame from direct.showbase.DirectObject import DirectObject - +from direct.gui.DirectGui import DirectFrame, DirectButton +import direct.gui.DirectGuiGlobals as DGG 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 ffbef35..e6db7cb 100644 --- a/toontown/parties/Decoration.py +++ b/toontown/parties/Decoration.py @@ -1,14 +1,10 @@ -import random - from panda3d.core import * - -from direct.actor import Actor from direct.interval.IntervalGlobal import * - +from direct.actor import Actor +from toontown.toonbase import ToontownGlobals +import random 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 c48b22e..b525471 100644 --- a/toontown/parties/DistributedParty.py +++ b/toontown/parties/DistributedParty.py @@ -1,23 +1,19 @@ -import datetime import random import time - -from panda3d.core import CardMaker, NodePath, TextNode, Vec4 - +import datetime +from panda3d.core import Vec4, TextNode, CardMaker, NodePath from direct.distributed import DistributedObject -from direct.gui import OnscreenText from direct.gui.DirectGui import DirectLabel +from direct.gui import OnscreenText from direct.interval.IntervalGlobal import * - +from toontown.toonbase import ToontownGlobals +from toontown.parties.PartyInfo import PartyInfo +from toontown.toonbase import TTLocalizer +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 23fbfa8..842864d 100644 --- a/toontown/parties/DistributedPartyAI.py +++ b/toontown/parties/DistributedPartyAI.py @@ -1,6 +1,5 @@ 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 133115e..f96e492 100644 --- a/toontown/parties/DistributedPartyActivity.py +++ b/toontown/parties/DistributedPartyActivity.py @@ -1,21 +1,19 @@ -from panda3d.core import CollisionNode, CollisionSphere, CollisionTube, NodePath, Point3, TextNode, Vec3 - -from direct.distributed import DistributedObject +from panda3d.core import CollisionSphere, CollisionNode, CollisionTube +from panda3d.core import TextNode, NodePath, Vec3, Point3 from direct.distributed.ClockDelta import globalClockDelta +from direct.distributed import DistributedObject +from direct.showbase import RandomNumGen +from direct.showbase import PythonUtil +from direct.interval.IntervalGlobal import Sequence, Parallel, ActorInterval 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.minigame.MinigameRulesPanel import MinigameRulesPanel -from toontown.parties import PartyGlobals -from toontown.parties.JellybeanRewardGui import JellybeanRewardGui -from toontown.parties.PartyUtils import getCenterPosFromGridSize, getPartyActivityIcon from toontown.toonbase import TTLocalizer +from toontown.parties import PartyGlobals +from toontown.minigame.MinigameRulesPanel import MinigameRulesPanel from toontown.toontowngui import TTDialog - +from toontown.parties.JellybeanRewardGui import JellybeanRewardGui +from toontown.parties.PartyUtils import getPartyActivityIcon, getCenterPosFromGridSize class DistributedPartyActivity(DistributedObject.DistributedObject): diff --git a/toontown/parties/DistributedPartyActivityAI.py b/toontown/parties/DistributedPartyActivityAI.py index 0787f8c..edfb2af 100644 --- a/toontown/parties/DistributedPartyActivityAI.py +++ b/toontown/parties/DistributedPartyActivityAI.py @@ -1,6 +1,5 @@ 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 c541fbd..0272449 100644 --- a/toontown/parties/DistributedPartyCannon.py +++ b/toontown/parties/DistributedPartyCannon.py @@ -1,15 +1,12 @@ 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 39969e5..39db36c 100644 --- a/toontown/parties/DistributedPartyCannonAI.py +++ b/toontown/parties/DistributedPartyCannonAI.py @@ -1,6 +1,5 @@ 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 e6461eb..a2ee0d2 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 direct.task.Task import Task - 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.CannonGui import CannonGui -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 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 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 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 c12469a..636fce3 100644 --- a/toontown/parties/DistributedPartyCannonActivityAI.py +++ b/toontown/parties/DistributedPartyCannonActivityAI.py @@ -1,6 +1,5 @@ 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 0e93f33..09093bc 100644 --- a/toontown/parties/DistributedPartyCatchActivity.py +++ b/toontown/parties/DistributedPartyCatchActivity.py @@ -1,28 +1,28 @@ -from panda3d.core import CollisionHandlerEvent, CollisionNode, CollisionSphere, NodePath, Point3, Point4, TextNode, Vec3 - -from direct.directnotify import DirectNotifyGlobal -from direct.distributed import DistributedSmoothNode +from panda3d.core import Vec3, Point3, Point4, TextNode, NodePath +from panda3d.core import CollisionHandlerEvent, CollisionNode, CollisionSphere from direct.distributed.ClockDelta import globalClockDelta -from direct.interval.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.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.showbase.RandomNumGen import RandomNumGen from direct.task.Task import Task - -from toontown.minigame.DropPlacer import PartyRegionDropPlacer +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.OrthoDrive import OrthoDrive from toontown.minigame.OrthoWalk import OrthoWalk -from toontown.minigame.Trajectory import Trajectory +from toontown.minigame.DropPlacer import PartyRegionDropPlacer from toontown.parties import PartyGlobals -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 - +from toontown.parties.DistributedPartyActivity import DistributedPartyActivity +from toontown.parties.DistributedPartyCatchActivityBase import DistributedPartyCatchActivityBase +from toontown.parties.DistributedPartyCannonActivity import DistributedPartyCannonActivity +from toontown.parties.activityFSMs import CatchActivityFSM class DistributedPartyCatchActivity(DistributedPartyActivity, DistributedPartyCatchActivityBase): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedPartyCatchActivity') diff --git a/toontown/parties/DistributedPartyCatchActivityAI.py b/toontown/parties/DistributedPartyCatchActivityAI.py index b61c75b..6f39ce3 100644 --- a/toontown/parties/DistributedPartyCatchActivityAI.py +++ b/toontown/parties/DistributedPartyCatchActivityAI.py @@ -1,6 +1,5 @@ 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 24a62f6..0ea760f 100644 --- a/toontown/parties/DistributedPartyCatchActivityBase.py +++ b/toontown/parties/DistributedPartyCatchActivityBase.py @@ -1,11 +1,8 @@ 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 7dff8f2..6db8ffb 100644 --- a/toontown/parties/DistributedPartyCogActivity.py +++ b/toontown/parties/DistributedPartyCogActivity.py @@ -1,14 +1,10 @@ -from panda3d.core import Point3 - from direct.distributed.ClockDelta import globalClockDelta - +from panda3d.core import Point3 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 a4d93f5..0328320 100644 --- a/toontown/parties/DistributedPartyCogActivityAI.py +++ b/toontown/parties/DistributedPartyCogActivityAI.py @@ -1,6 +1,5 @@ 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 8fdd708..72385da 100644 --- a/toontown/parties/DistributedPartyDance20Activity.py +++ b/toontown/parties/DistributedPartyDance20Activity.py @@ -2,7 +2,6 @@ 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 c4d0c5a..fdaf75d 100644 --- a/toontown/parties/DistributedPartyDance20ActivityAI.py +++ b/toontown/parties/DistributedPartyDance20ActivityAI.py @@ -1,6 +1,5 @@ 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 be66361..cbafaec 100644 --- a/toontown/parties/DistributedPartyDanceActivity.py +++ b/toontown/parties/DistributedPartyDanceActivity.py @@ -2,7 +2,6 @@ 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 2e9f01a..f88b8b8 100644 --- a/toontown/parties/DistributedPartyDanceActivityAI.py +++ b/toontown/parties/DistributedPartyDanceActivityAI.py @@ -1,6 +1,5 @@ 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 42142db..c0c940d 100644 --- a/toontown/parties/DistributedPartyDanceActivityBase.py +++ b/toontown/parties/DistributedPartyDanceActivityBase.py @@ -1,23 +1,22 @@ 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 direct.interval.FunctionInterval import Func, Wait -from direct.interval.MetaInterval import Parallel, Sequence - +from toontown.toonbase import TTLocalizer +from toontown.toonbase import ToontownGlobals 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.PartyDanceActivityToonFSM import PartyDanceActivityToonFSM, ToonDancingStates -from toontown.parties.PartyGlobals import ActivityIds, ActivityTypes, DanceAnimToName, DancePatternToAnims -from toontown.toonbase import ToontownGlobals, TTLocalizer - +from toontown.parties import PartyGlobals +from enum import IntEnum 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 f649a86..654cdc1 100644 --- a/toontown/parties/DistributedPartyDanceActivityBaseAI.py +++ b/toontown/parties/DistributedPartyDanceActivityBaseAI.py @@ -1,6 +1,5 @@ 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 dfaabbc..b1f672f 100644 --- a/toontown/parties/DistributedPartyFireworksActivity.py +++ b/toontown/parties/DistributedPartyFireworksActivity.py @@ -1,19 +1,24 @@ -from panda3d.core import AlphaTestAttrib, OmniBoundingVolume, RenderAttrib, Vec3 - +from panda3d.core import Vec3 +from panda3d.core import OmniBoundingVolume +from panda3d.core import AlphaTestAttrib +from panda3d.core import RenderAttrib from direct.actor.Actor import Actor -from direct.distributed.ClockDelta import globalClockDelta from direct.interval.IntervalGlobal import * - +from direct.distributed.ClockDelta import globalClockDelta from toontown.effects.FireworkShowMixin import FireworkShowMixin from toontown.effects.RocketExplosion import RocketExplosion from toontown.toonbase import TTLocalizer - -from . import PartyGlobals -from .activityFSMs import FireworksActivityFSM +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 .PartyGlobals import (ActivityIds, ActivityTypes, FireworksFinishedEvent, FireworkShows, FireworksPostLaunchDelay, - FireworksStartedEvent, RocketDirectionDelay, RocketSoundDelay) - +from .activityFSMs import FireworksActivityFSM +from . import PartyGlobals class DistributedPartyFireworksActivity(DistributedPartyActivity, FireworkShowMixin): notify = directNotify.newCategory('DistributedPartyFireworksActivity') diff --git a/toontown/parties/DistributedPartyFireworksActivityAI.py b/toontown/parties/DistributedPartyFireworksActivityAI.py index 8f4c0bd..9601a0c 100644 --- a/toontown/parties/DistributedPartyFireworksActivityAI.py +++ b/toontown/parties/DistributedPartyFireworksActivityAI.py @@ -1,6 +1,5 @@ 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 3201b1f..8454aa2 100644 --- a/toontown/parties/DistributedPartyJukebox40Activity.py +++ b/toontown/parties/DistributedPartyJukebox40Activity.py @@ -1,6 +1,5 @@ -from toontown.parties import PartyGlobals from toontown.parties.DistributedPartyJukeboxActivityBase import DistributedPartyJukeboxActivityBase - +from toontown.parties import PartyGlobals class DistributedPartyJukebox40Activity(DistributedPartyJukeboxActivityBase): notify = directNotify.newCategory('DistributedPartyJukeboxActivity') diff --git a/toontown/parties/DistributedPartyJukebox40ActivityAI.py b/toontown/parties/DistributedPartyJukebox40ActivityAI.py index cc4cbf4..7d7dec9 100644 --- a/toontown/parties/DistributedPartyJukebox40ActivityAI.py +++ b/toontown/parties/DistributedPartyJukebox40ActivityAI.py @@ -1,6 +1,5 @@ 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 1108f39..bb1f2ca 100644 --- a/toontown/parties/DistributedPartyJukeboxActivity.py +++ b/toontown/parties/DistributedPartyJukeboxActivity.py @@ -1,6 +1,5 @@ -from toontown.parties import PartyGlobals from toontown.parties.DistributedPartyJukeboxActivityBase import DistributedPartyJukeboxActivityBase - +from toontown.parties import PartyGlobals class DistributedPartyJukeboxActivity(DistributedPartyJukeboxActivityBase): notify = directNotify.newCategory('DistributedPartyJukeboxActivity') diff --git a/toontown/parties/DistributedPartyJukeboxActivityAI.py b/toontown/parties/DistributedPartyJukeboxActivityAI.py index 6ceac88..309a546 100644 --- a/toontown/parties/DistributedPartyJukeboxActivityAI.py +++ b/toontown/parties/DistributedPartyJukeboxActivityAI.py @@ -1,6 +1,5 @@ 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 13e6c67..6706f77 100644 --- a/toontown/parties/DistributedPartyJukeboxActivityBase.py +++ b/toontown/parties/DistributedPartyJukeboxActivityBase.py @@ -1,16 +1,13 @@ -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 7adcbcb..132b59d 100644 --- a/toontown/parties/DistributedPartyJukeboxActivityBaseAI.py +++ b/toontown/parties/DistributedPartyJukeboxActivityBaseAI.py @@ -1,6 +1,5 @@ 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 e48f29c..38fa5e8 100644 --- a/toontown/parties/DistributedPartyTeamActivity.py +++ b/toontown/parties/DistributedPartyTeamActivity.py @@ -1,11 +1,9 @@ from direct.distributed.ClockDelta import globalClockDelta - -from toontown.parties import PartyGlobals -from toontown.parties.activityFSMs import TeamActivityFSM -from toontown.parties.DistributedPartyActivity import DistributedPartyActivity -from toontown.parties.TeamActivityGui import TeamActivityGui 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.TeamActivityGui import TeamActivityGui class DistributedPartyTeamActivity(DistributedPartyActivity): notify = directNotify.newCategory('DistributedPartyTeamActivity') diff --git a/toontown/parties/DistributedPartyTeamActivityAI.py b/toontown/parties/DistributedPartyTeamActivityAI.py index cee41ff..1a88a5b 100644 --- a/toontown/parties/DistributedPartyTeamActivityAI.py +++ b/toontown/parties/DistributedPartyTeamActivityAI.py @@ -1,6 +1,5 @@ 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 ad324ff..964ad53 100644 --- a/toontown/parties/DistributedPartyTrampolineActivity.py +++ b/toontown/parties/DistributedPartyTrampolineActivity.py @@ -1,28 +1,36 @@ import math -import random import time - -from panda3d.core import (BitMask32, CardMaker, CollisionNode, CollisionSphere, CollisionTube, NodePath, Point3, - TextNode, VBase3, VBase4, Vec3) - -from direct.actor.Actor import Actor +import random +from direct.task import Task from direct.directnotify import DirectNotifyGlobal +from direct.actor.Actor import Actor from direct.fsm.FSM import FSM from direct.gui.DirectGui import DirectButton from direct.gui.OnscreenText import OnscreenText -from direct.interval.FunctionInterval import Func, Wait +from direct.interval.FunctionInterval import Func +from direct.interval.FunctionInterval import Wait from direct.interval.LerpInterval import LerpFunc -from direct.interval.MetaInterval import Parallel, Sequence -from direct.task import Task - +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 otp.otpbase import OTPGlobals - -from toontown.parties import PartyGlobals, PartyUtils -from toontown.parties.activityFSMs import TrampolineActivityFSM -from toontown.parties.DistributedPartyActivity import DistributedPartyActivity -from toontown.toonbase import ToontownGlobals, TTLocalizer +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.activityFSMs import TrampolineActivityFSM +from toontown.parties import PartyUtils class DistributedPartyTrampolineActivity(DistributedPartyActivity): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedPartyTrampolineActivity') diff --git a/toontown/parties/DistributedPartyTrampolineActivityAI.py b/toontown/parties/DistributedPartyTrampolineActivityAI.py index ce95acc..e15e909 100644 --- a/toontown/parties/DistributedPartyTrampolineActivityAI.py +++ b/toontown/parties/DistributedPartyTrampolineActivityAI.py @@ -1,6 +1,5 @@ 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 016d662..bcc2749 100644 --- a/toontown/parties/DistributedPartyTugOfWarActivity.py +++ b/toontown/parties/DistributedPartyTugOfWarActivity.py @@ -1,23 +1,28 @@ import math - -from panda3d.core import CollisionNode, CollisionTube, Point3, RopeNode, VBase3 - -from direct.fsm.StatePush import FunctionCall, StateVar +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 direct.interval.FunctionInterval import Func -from direct.interval.IntervalGlobal import ActorInterval, LerpPosHprInterval, LerpPosInterval, Wait -from direct.interval.MetaInterval import Parallel, Sequence -from direct.showbase.PythonUtil import fitDestAngle2Src from direct.showutil.Rope import Rope - +from direct.showbase.PythonUtil import fitDestAngle2Src +from direct.fsm.StatePush import StateVar, FunctionCall +from toontown.toonbase import TTLocalizer +from toontown.toonbase import ToontownGlobals from toontown.effects import Splash -from toontown.minigame.ArrowKeys import ArrowKeys from toontown.minigame.MinigamePowerMeter import MinigamePowerMeter -from toontown.toonbase import ToontownGlobals, TTLocalizer - -from . import PartyGlobals, PartyUtils +from toontown.minigame.ArrowKeys import ArrowKeys +from . import PartyGlobals +from . import 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 c2650b6..fb125fd 100644 --- a/toontown/parties/DistributedPartyTugOfWarActivityAI.py +++ b/toontown/parties/DistributedPartyTugOfWarActivityAI.py @@ -1,6 +1,5 @@ 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 66cbd07..7b5db74 100644 --- a/toontown/parties/DistributedPartyValentineDance20Activity.py +++ b/toontown/parties/DistributedPartyValentineDance20Activity.py @@ -2,7 +2,6 @@ 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 2b9ae95..ed5eaf2 100644 --- a/toontown/parties/DistributedPartyValentineDance20ActivityAI.py +++ b/toontown/parties/DistributedPartyValentineDance20ActivityAI.py @@ -1,6 +1,5 @@ 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 978493b..7652d1f 100644 --- a/toontown/parties/DistributedPartyValentineDanceActivity.py +++ b/toontown/parties/DistributedPartyValentineDanceActivity.py @@ -2,7 +2,6 @@ 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 08b0b4a..b40ed01 100644 --- a/toontown/parties/DistributedPartyValentineDanceActivityAI.py +++ b/toontown/parties/DistributedPartyValentineDanceActivityAI.py @@ -1,6 +1,5 @@ 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 392119a..101db6b 100644 --- a/toontown/parties/DistributedPartyValentineJukebox40Activity.py +++ b/toontown/parties/DistributedPartyValentineJukebox40Activity.py @@ -1,6 +1,5 @@ -from toontown.parties import PartyGlobals from toontown.parties.DistributedPartyJukeboxActivityBase import DistributedPartyJukeboxActivityBase - +from toontown.parties import PartyGlobals class DistributedPartyValentineJukebox40Activity(DistributedPartyJukeboxActivityBase): notify = directNotify.newCategory('DistributedPartyValentineJukebox40Activity') diff --git a/toontown/parties/DistributedPartyValentineJukebox40ActivityAI.py b/toontown/parties/DistributedPartyValentineJukebox40ActivityAI.py index 3379072..a7d793f 100644 --- a/toontown/parties/DistributedPartyValentineJukebox40ActivityAI.py +++ b/toontown/parties/DistributedPartyValentineJukebox40ActivityAI.py @@ -1,6 +1,5 @@ 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 c2d2104..0b8f11d 100644 --- a/toontown/parties/DistributedPartyValentineJukeboxActivity.py +++ b/toontown/parties/DistributedPartyValentineJukeboxActivity.py @@ -1,6 +1,5 @@ -from toontown.parties import PartyGlobals from toontown.parties.DistributedPartyJukeboxActivityBase import DistributedPartyJukeboxActivityBase - +from toontown.parties import PartyGlobals class DistributedPartyValentineJukeboxActivity(DistributedPartyJukeboxActivityBase): notify = directNotify.newCategory('DistributedPartyJukeboxActivity') diff --git a/toontown/parties/DistributedPartyValentineJukeboxActivityAI.py b/toontown/parties/DistributedPartyValentineJukeboxActivityAI.py index ea318a1..6844d59 100644 --- a/toontown/parties/DistributedPartyValentineJukeboxActivityAI.py +++ b/toontown/parties/DistributedPartyValentineJukeboxActivityAI.py @@ -1,6 +1,5 @@ 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 a45986f..bb665c2 100644 --- a/toontown/parties/DistributedPartyValentineTrampolineActivity.py +++ b/toontown/parties/DistributedPartyValentineTrampolineActivity.py @@ -1,6 +1,5 @@ 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 f5bae95..6012f59 100644 --- a/toontown/parties/DistributedPartyValentineTrampolineActivityAI.py +++ b/toontown/parties/DistributedPartyValentineTrampolineActivityAI.py @@ -1,6 +1,5 @@ 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 e15d0a5..3659fc1 100644 --- a/toontown/parties/DistributedPartyVictoryTrampolineActivity.py +++ b/toontown/parties/DistributedPartyVictoryTrampolineActivity.py @@ -1,6 +1,5 @@ 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 20e4a77..41930de 100644 --- a/toontown/parties/DistributedPartyVictoryTrampolineActivityAI.py +++ b/toontown/parties/DistributedPartyVictoryTrampolineActivityAI.py @@ -1,6 +1,5 @@ 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 a8a7274..64322f4 100644 --- a/toontown/parties/DistributedPartyWinterCatchActivity.py +++ b/toontown/parties/DistributedPartyWinterCatchActivity.py @@ -1,9 +1,8 @@ from panda3d.core import NodePath - -from toontown.parties import PartyGlobals, WinterPartyCatchActivityToonSD -from toontown.parties.DistributedPartyCatchActivity import DistributedPartyCatchActivity from toontown.toonbase import TTLocalizer - +from toontown.parties.DistributedPartyCatchActivity import DistributedPartyCatchActivity +from toontown.parties import PartyGlobals +from toontown.parties import WinterPartyCatchActivityToonSD class DistributedPartyWinterCatchActivity(DistributedPartyCatchActivity): diff --git a/toontown/parties/DistributedPartyWinterCatchActivityAI.py b/toontown/parties/DistributedPartyWinterCatchActivityAI.py index bba56d4..38a1944 100644 --- a/toontown/parties/DistributedPartyWinterCatchActivityAI.py +++ b/toontown/parties/DistributedPartyWinterCatchActivityAI.py @@ -1,6 +1,5 @@ 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 e07f6ba..6c5c109 100644 --- a/toontown/parties/DistributedPartyWinterCogActivity.py +++ b/toontown/parties/DistributedPartyWinterCogActivity.py @@ -1,6 +1,5 @@ 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 0c85e76..0aaa08a 100644 --- a/toontown/parties/DistributedPartyWinterCogActivityAI.py +++ b/toontown/parties/DistributedPartyWinterCogActivityAI.py @@ -1,6 +1,5 @@ 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 bc205af..3db46be 100644 --- a/toontown/parties/DistributedPartyWinterTrampolineActivity.py +++ b/toontown/parties/DistributedPartyWinterTrampolineActivity.py @@ -1,6 +1,5 @@ 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 813a14d..bae8a3d 100644 --- a/toontown/parties/DistributedPartyWinterTrampolineActivityAI.py +++ b/toontown/parties/DistributedPartyWinterTrampolineActivityAI.py @@ -1,6 +1,5 @@ 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 02693bf..f242bdf 100644 --- a/toontown/parties/InviteInfo.py +++ b/toontown/parties/InviteInfo.py @@ -1,8 +1,7 @@ from direct.directnotify import DirectNotifyGlobal - +from toontown.toonbase import ToontownGlobals from toontown.parties.PartyGlobals import InviteStatus -from toontown.toonbase import ToontownGlobals, TTLocalizer - +from toontown.toonbase import TTLocalizer class InviteInfoBase: diff --git a/toontown/parties/InviteVisual.py b/toontown/parties/InviteVisual.py index 11094d2..710e878 100644 --- a/toontown/parties/InviteVisual.py +++ b/toontown/parties/InviteVisual.py @@ -1,15 +1,13 @@ -import calendar from datetime import datetime - -from direct.fsm.FSM import FSM +import calendar from direct.gui.DirectGui import DirectFrame, DirectLabel -from direct.showbase import PythonUtil - -from toontown.parties import PartyGlobals, PartyUtils from toontown.toonbase import TTLocalizer +from direct.showbase import PythonUtil +from direct.fsm.FSM import FSM +from toontown.parties import PartyGlobals +from toontown.parties import PartyUtils 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 e38b338..1a45f26 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 direct.gui.DirectGui import DirectButton, DirectFrame, DirectLabel - -from toontown.toonbase import ToontownGlobals, TTLocalizer - +from toontown.toonbase import ToontownGlobals +from toontown.toonbase import TTLocalizer class JellybeanRewardGui(DirectFrame): notify = directNotify.newCategory('JellybeanRewardGui') diff --git a/toontown/parties/JukeboxGui.py b/toontown/parties/JukeboxGui.py index c6ee8fe..c23c486 100644 --- a/toontown/parties/JukeboxGui.py +++ b/toontown/parties/JukeboxGui.py @@ -1,12 +1,10 @@ from panda3d.core import * - -from direct.gui import DirectGuiGlobals -from direct.gui.DirectGui import DirectButton, DirectFrame, DirectLabel, DirectScrolledList, DirectScrolledListItem from direct.showbase.DirectObject import DirectObject - -from toontown.parties import PartyUtils +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 toontown.parties import PartyUtils class JukeboxGui(DirectObject): notify = directNotify.newCategory('JukeboxGui') diff --git a/toontown/parties/KeyCodes.py b/toontown/parties/KeyCodes.py index 50d0dc2..47af387 100644 --- a/toontown/parties/KeyCodes.py +++ b/toontown/parties/KeyCodes.py @@ -1,7 +1,5 @@ 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 5dc383a..ff043bb 100644 --- a/toontown/parties/KeyCodesGui.py +++ b/toontown/parties/KeyCodesGui.py @@ -1,13 +1,10 @@ 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 9ca46fa..54d12b6 100644 --- a/toontown/parties/Party.py +++ b/toontown/parties/Party.py @@ -1,23 +1,20 @@ -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, 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 * - +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 otp.distributed.TelemetryLimiter import RotationLimitToH, TLGatherAllAvs, TLNull +from toontown.hood import Place +from toontown.hood import SkyUtil +from toontown.parties import PartyPlanner +from toontown.parties.DistributedParty import DistributedParty class Party(Place.Place): notify = DirectNotifyGlobal.directNotify.newCategory('Party') diff --git a/toontown/parties/PartyCatchActivityToonSD.py b/toontown/parties/PartyCatchActivityToonSD.py index 32d204e..ee60331 100644 --- a/toontown/parties/PartyCatchActivityToonSD.py +++ b/toontown/parties/PartyCatchActivityToonSD.py @@ -1,15 +1,14 @@ from panda3d.core import Vec3 - -from direct.directnotify import DirectNotifyGlobal -from direct.fsm import ClassicFSM, State, StateData -from direct.interval.IntervalGlobal import (ActorInterval, Func, FunctionInterval, LerpScaleInterval, Parallel, - Sequence, Wait, WaitInterval) +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 toontown.minigame.MinigameRulesPanel import MinigameRulesPanel +from direct.directnotify import DirectNotifyGlobal +from direct.fsm import StateData from toontown.minigame.OrthoWalk import OrthoWalk +from toontown.minigame.MinigameRulesPanel import MinigameRulesPanel 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 a78f00b..2631f26 100644 --- a/toontown/parties/PartyCog.py +++ b/toontown/parties/PartyCog.py @@ -1,24 +1,20 @@ 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 d7c2003..7bf5659 100644 --- a/toontown/parties/PartyCogActivity.py +++ b/toontown/parties/PartyCogActivity.py @@ -1,23 +1,23 @@ -from panda3d.core import CollisionHandlerEvent, CollisionNode, CollisionSphere, NodePath, Point3, TextNode - -from direct.distributed.ClockDelta import globalClockDelta -from direct.interval.ActorInterval import ActorInterval +from direct.interval.MetaInterval import Sequence, Parallel, Track 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 direct.interval.ActorInterval import ActorInterval +from direct.interval.ProjectileInterval import ProjectileInterval +from direct.distributed.ClockDelta import globalClockDelta from direct.showbase.PythonUtil import bound, lerp - -from toontown.toonbase import ToontownGlobals, TTLocalizer +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 toontown.toonbase.ToontownTimer import ToontownTimer - -from . import PartyCogUtils, PartyGlobals +from . import PartyGlobals +from . import PartyCogUtils from .PartyCog import PartyCogManager -from .PartyCogActivityPlayer import PartyCogActivityLocalPlayer, PartyCogActivityPlayer +from .PartyCogActivityPlayer import PartyCogActivityPlayer +from .PartyCogActivityPlayer import PartyCogActivityLocalPlayer 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.battle import BattleProps from toontown.toonbase import ToontownBattleGlobals + from toontown.battle import BattleProps 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 ca37f06..e112682 100644 --- a/toontown/parties/PartyCogActivityGui.py +++ b/toontown/parties/PartyCogActivityGui.py @@ -1,17 +1,16 @@ -from panda3d.core import Point3, TextNode, VBase4 - -from direct.gui.DirectGui import DGG, DirectWaitBar +from direct.gui.DirectGui import DirectWaitBar, DGG from direct.gui.OnscreenText import OnscreenText -from direct.interval.FunctionInterval import Func, Wait +from direct.showbase.DirectObject import DirectObject from direct.interval.LerpInterval import LerpScaleInterval from direct.interval.MetaInterval import Sequence -from direct.showbase.DirectObject import DirectObject - -from toontown.toonbase import ToontownGlobals, ToontownIntervals, TTLocalizer - +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 . import PartyGlobals - class PartyCogTrackerGui: def __init__(self): diff --git a/toontown/parties/PartyCogActivityInput.py b/toontown/parties/PartyCogActivityInput.py index a3970c7..b53cd1e 100644 --- a/toontown/parties/PartyCogActivityInput.py +++ b/toontown/parties/PartyCogActivityInput.py @@ -1,7 +1,5 @@ -from panda3d.core import ModifierButtons - from direct.showbase.DirectObject import DirectObject - +from panda3d.core import ModifierButtons ROTATE_LEFT_KEY = 'arrow_left' ROTATE_RIGHT_KEY = 'arrow_right' FORWARD_KEY = 'arrow_up' diff --git a/toontown/parties/PartyCogActivityPlayer.py b/toontown/parties/PartyCogActivityPlayer.py index 4335cfe..3262887 100644 --- a/toontown/parties/PartyCogActivityPlayer.py +++ b/toontown/parties/PartyCogActivityPlayer.py @@ -1,25 +1,21 @@ 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 toontown.battle.BattleProps import globalPropPool -from toontown.battle.BattleSounds import globalBattleSoundCache +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 . import PartyGlobals -from .PartyCogActivityGui import PartyCogActivityGui from .PartyCogActivityInput import PartyCogActivityInput -from .PartyCogUtils import CameraManager, StrafingControl - +from .PartyCogActivityGui import PartyCogActivityGui +from .PartyCogUtils import CameraManager +from .PartyCogUtils import 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 7d32b66..0ee44c3 100644 --- a/toontown/parties/PartyCogUtils.py +++ b/toontown/parties/PartyCogUtils.py @@ -1,9 +1,6 @@ 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 aacbe2b..a8a6622 100644 --- a/toontown/parties/PartyDanceActivityToonFSM.py +++ b/toontown/parties/PartyDanceActivityToonFSM.py @@ -1,12 +1,9 @@ from panda3d.core import * - from direct.fsm.FSM import FSM -from direct.interval.MetaInterval import Sequence from direct.showbase import PythonUtil - +from direct.interval.MetaInterval import Sequence 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 fd71ff1..37ff677 100644 --- a/toontown/parties/PartyEditor.py +++ b/toontown/parties/PartyEditor.py @@ -1,19 +1,17 @@ import time - -from panda3d.core import Point3, TextNode, VBase4, Vec3, Vec4 - -from direct.fsm.FSM import FSM +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.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 direct.showbase import PythonUtil +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 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 3a2e400..b0450e3 100644 --- a/toontown/parties/PartyEditorGrid.py +++ b/toontown/parties/PartyEditorGrid.py @@ -1,14 +1,14 @@ -from panda3d.core import Point3, TextNode, VBase4, Vec3, Vec4 - +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.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 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.toonbase import ToontownGlobals, TTLocalizer - +from toontown.parties import PartyUtils +from toontown.parties.PartyEditorGridSquare import PartyEditorGridSquare class PartyEditorGrid: notify = directNotify.newCategory('PartyEditorGrid') diff --git a/toontown/parties/PartyEditorGridElement.py b/toontown/parties/PartyEditorGridElement.py index 0b794de..8748a1e 100644 --- a/toontown/parties/PartyEditorGridElement.py +++ b/toontown/parties/PartyEditorGridElement.py @@ -1,14 +1,14 @@ -from panda3d.core import NodePath, Point3, TextNode, VBase4, Vec3, Vec4 - +from panda3d.core import Vec3, Vec4, Point3, TextNode, VBase4, NodePath +from direct.gui.DirectGui import DirectFrame, DirectButton, DirectLabel, DirectScrolledList, DirectCheckButton from direct.gui import DirectGuiGlobals -from direct.gui.DirectGui import DirectButton, DirectCheckButton, DirectFrame, DirectLabel, DirectScrolledList -from direct.showbase import DirectObject, PythonUtil +from direct.showbase import DirectObject +from direct.showbase import PythonUtil from direct.task.Task import Task - -from toontown.parties import PartyGlobals, PartyUtils +from toontown.toonbase import ToontownGlobals +from toontown.toonbase import TTLocalizer +from toontown.parties import PartyGlobals from toontown.parties.PartyInfo import PartyInfo -from toontown.toonbase import ToontownGlobals, TTLocalizer - +from toontown.parties import PartyUtils class PartyEditorGridElement(DirectButton): notify = directNotify.newCategory('PartyEditorGridElement') diff --git a/toontown/parties/PartyEditorGridSquare.py b/toontown/parties/PartyEditorGridSquare.py index 3e922ca..7c9cfb3 100644 --- a/toontown/parties/PartyEditorGridSquare.py +++ b/toontown/parties/PartyEditorGridSquare.py @@ -1,14 +1,13 @@ -from panda3d.core import Point3, TextNode, VBase4, Vec3, Vec4 - +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.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 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.toonbase import ToontownGlobals, TTLocalizer - +from toontown.parties import PartyUtils class PartyEditorGridSquare(DirectObject): notify = directNotify.newCategory('PartyEditorGridSquare') diff --git a/toontown/parties/PartyEditorListElement.py b/toontown/parties/PartyEditorListElement.py index a25986e..6fd5162 100644 --- a/toontown/parties/PartyEditorListElement.py +++ b/toontown/parties/PartyEditorListElement.py @@ -1,13 +1,10 @@ from panda3d.core import Vec3 - -from direct.gui import DirectGuiGlobals from direct.gui.DirectGui import DirectButton, DirectLabel - +from direct.gui import DirectGuiGlobals +from toontown.toonbase import TTLocalizer 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 cb2cf69..895e54a 100644 --- a/toontown/parties/PartyGlobals.py +++ b/toontown/parties/PartyGlobals.py @@ -1,9 +1,7 @@ -from enum import IntEnum - -from panda3d.core import BitMask32, Point3, VBase4 - +from panda3d.core import BitMask32 +from panda3d.core import Point3, VBase4 from toontown.toonbase import TTLocalizer - +from enum import IntEnum KICK_TO_PLAYGROUND_EVENT = 'parties_kickToPlayground' MaxSetInvites = 1000 MaxSetPartiesInvitedTo = 100 diff --git a/toontown/parties/PartyInfo.py b/toontown/parties/PartyInfo.py index e48af1e..816f7cf 100644 --- a/toontown/parties/PartyInfo.py +++ b/toontown/parties/PartyInfo.py @@ -1,11 +1,8 @@ from datetime import datetime - from direct.directnotify import DirectNotifyGlobal - -from toontown.parties.ActivityBase import ActivityBase -from toontown.parties.DecorBase import DecorBase from toontown.parties.PartyGlobals import InviteTheme - +from toontown.parties.DecorBase import DecorBase +from toontown.parties.ActivityBase import ActivityBase class PartyInfoBase: notify = DirectNotifyGlobal.directNotify.newCategory('PartyInfoBase') diff --git a/toontown/parties/PartyLoader.py b/toontown/parties/PartyLoader.py index 6a770c2..9360194 100644 --- a/toontown/parties/PartyLoader.py +++ b/toontown/parties/PartyLoader.py @@ -1,18 +1,14 @@ 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 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 FireworksFinishedEvent, FireworksStartedEvent -from toontown.safezone import SafeZoneLoader from toontown.toonbase.ToontownGlobals import * - +from toontown.safezone import SafeZoneLoader +from toontown.parties import Party +from toontown.parties.PartyGlobals import FireworksStartedEvent, FireworksFinishedEvent class PartyLoader(SafeZoneLoader.SafeZoneLoader): notify = DirectNotifyGlobal.directNotify.newCategory('PartyLoader') diff --git a/toontown/parties/PartyPlanner.py b/toontown/parties/PartyPlanner.py index dcc16dd..b598083 100644 --- a/toontown/parties/PartyPlanner.py +++ b/toontown/parties/PartyPlanner.py @@ -1,29 +1,29 @@ import calendar -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 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.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 import PartyGlobals, PartyUtils -from toontown.parties.CalendarGuiMonth import CalendarGuiMonth -from toontown.parties.InviteVisual import InviteVisual -from toontown.parties.PartyEditor import PartyEditor -from toontown.parties.PartyInfo import PartyInfo -from toontown.parties.ScrolledFriendList import ScrolledFriendList -from toontown.toon import ToonHead -from toontown.toonbase import ToontownGlobals, TTLocalizer +from direct.showbase import DirectObject +from direct.showbase import PythonUtil +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 toontown.friends.FriendsListPanel import determineFriendName +from toontown.parties.ScrolledFriendList import ScrolledFriendList +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 class PartyPlanner(DirectFrame, FSM): notify = DirectNotifyGlobal.directNotify.newCategory('PartyPlanner') diff --git a/toontown/parties/PartyUtils.py b/toontown/parties/PartyUtils.py index 8b56f2e..c163e1c 100644 --- a/toontown/parties/PartyUtils.py +++ b/toontown/parties/PartyUtils.py @@ -1,16 +1,12 @@ -import datetime import math import time - -from panda3d.core import Vec3 - +import datetime from direct.directnotify import DirectNotifyGlobal from direct.interval.LerpInterval import LerpFunc - -from toontown.parties import PartyGlobals +from panda3d.core import Vec3 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 1271303..bd7f8a7 100644 --- a/toontown/parties/PublicPartyGui.py +++ b/toontown/parties/PublicPartyGui.py @@ -1,15 +1,14 @@ -import functools - -from panda3d.core import Point3, TextNode, VBase4, Vec3, Vec4 - +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.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 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 class PublicPartyGui(DirectFrame): notify = directNotify.newCategory('PublicPartyGui') diff --git a/toontown/parties/ScrolledFriendList.py b/toontown/parties/ScrolledFriendList.py index 5e08c74..1bca984 100644 --- a/toontown/parties/ScrolledFriendList.py +++ b/toontown/parties/ScrolledFriendList.py @@ -1,11 +1,9 @@ -from panda3d.core import NodePath, Plane, PlaneNode, Point3, TextNode, VBase4, Vec3, Vec4 - -from direct.gui import DirectGuiGlobals +from direct.gui.DirectGui import DirectFrame, DirectButton, DirectLabel +from direct.gui.DirectGui import DirectScrolledList, DirectCheckButton from direct.gui.DirectCheckBox import DirectCheckBox -from direct.gui.DirectGui import DirectButton, DirectCheckButton, DirectFrame, DirectLabel, DirectScrolledList - +from direct.gui import DirectGuiGlobals 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 7d4d088..c846635 100644 --- a/toontown/parties/ServerTimeGui.py +++ b/toontown/parties/ServerTimeGui.py @@ -1,11 +1,8 @@ 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 6d8a083..582cebd 100644 --- a/toontown/parties/StretchingArrow.py +++ b/toontown/parties/StretchingArrow.py @@ -1,9 +1,6 @@ import math - -from panda3d.core import Point3 - from direct.gui.DirectGui import DirectFrame - +from panda3d.core import Point3 class StretchingArrow(DirectFrame): notify = directNotify.newCategory('StretchingArrow') diff --git a/toontown/parties/TeamActivityGui.py b/toontown/parties/TeamActivityGui.py index 4fb92ab..3eeb035 100644 --- a/toontown/parties/TeamActivityGui.py +++ b/toontown/parties/TeamActivityGui.py @@ -1,12 +1,11 @@ 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.parties import PartyGlobals, PartyUtils -from toontown.toonbase import ToontownGlobals, TTLocalizer - +from toontown.toonbase import ToontownGlobals +from toontown.toonbase import TTLocalizer +from toontown.parties import PartyUtils +from toontown.parties import PartyGlobals class TeamActivityGui: COUNTDOWN_TASK_NAME = 'updateCountdownTask' diff --git a/toontown/parties/ToontownTimeManager.py b/toontown/parties/ToontownTimeManager.py index b162b7c..5b41a33 100644 --- a/toontown/parties/ToontownTimeManager.py +++ b/toontown/parties/ToontownTimeManager.py @@ -1,13 +1,9 @@ import time from datetime import datetime, timedelta - -from direct.directnotify import DirectNotifyGlobal - import pytz - +from direct.directnotify import DirectNotifyGlobal 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 9a4582e..fca8561 100644 --- a/toontown/parties/WinterPartyCatchActivityToonSD.py +++ b/toontown/parties/WinterPartyCatchActivityToonSD.py @@ -1,12 +1,10 @@ -from panda3d.core import Vec4 - -from direct.directnotify import DirectNotifyGlobal -from direct.fsm import ClassicFSM, State -from direct.interval.IntervalGlobal import (ActorInterval, Func, FunctionInterval, LerpColorScaleInterval, Parallel, - Sequence, Wait, WaitInterval) - 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 class WinterPartyCatchActivityToonSD(PartyCatchActivityToonSD.PartyCatchActivityToonSD): notify = DirectNotifyGlobal.directNotify.newCategory('PartyCatchActivityToonSD') diff --git a/toontown/parties/activityFSMMixins.py b/toontown/parties/activityFSMMixins.py index dd4cfaa..44b2949 100644 --- a/toontown/parties/activityFSMMixins.py +++ b/toontown/parties/activityFSMMixins.py @@ -1,6 +1,5 @@ from .BaseActivityFSM import BaseActivityFSM - class IdleMixin: def enterIdle(self, *args): diff --git a/toontown/parties/activityFSMs.py b/toontown/parties/activityFSMs.py index b791e53..94027e2 100644 --- a/toontown/parties/activityFSMs.py +++ b/toontown/parties/activityFSMs.py @@ -1,9 +1,14 @@ 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 903b95e..78f5a15 100644 --- a/toontown/pets/DistributedPet.py +++ b/toontown/pets/DistributedPet.py @@ -1,23 +1,20 @@ -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 -from toontown.hood import ZoneUtil -from toontown.pets import Pet, PetAvatarPanel, PetBase, PetConstants, PetManager, PetMood, PetTraits, PetTricks -from toontown.toonbase import TTLocalizer - +import random 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 be8165e..3092abc 100644 --- a/toontown/pets/DistributedPetAI.py +++ b/toontown/pets/DistributedPetAI.py @@ -1,26 +1,28 @@ -import copy -import random -import string -import time - 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 ClockDelta, DistributedSmoothNodeAI, DistributedSmoothNodeBase -from direct.fsm import FSM, ClassicFSM, State +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 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 - +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 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 3c1535f..97c9e4c 100644 --- a/toontown/pets/DistributedPetProxy.py +++ b/toontown/pets/DistributedPetProxy.py @@ -1,11 +1,9 @@ -import string - -from direct.directnotify import DirectNotifyGlobal from direct.distributed import DistributedObject - -from toontown.pets import PetMood, PetTraits, PetTricks +from direct.directnotify import DirectNotifyGlobal +from toontown.pets import PetTraits +from toontown.pets import PetMood, PetTricks from toontown.toonbase import ToontownGlobals - +import string class DistributedPetProxy(DistributedObject.DistributedObject): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedPetProxy') diff --git a/toontown/pets/DistributedPetProxyAI.py b/toontown/pets/DistributedPetProxyAI.py index b1fc2ec..156eef1 100644 --- a/toontown/pets/DistributedPetProxyAI.py +++ b/toontown/pets/DistributedPetProxyAI.py @@ -1,15 +1,13 @@ -import copy -import random -import string -import time - -from direct.directnotify import DirectNotifyGlobal +from direct.showbase.PythonUtil import contains, lerp, clampScalar from direct.distributed import DistributedObjectAI -from direct.showbase.PythonUtil import clampScalar, contains, lerp - -from toontown.pets import PetMood, PetTraits, PetTricks +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 BATTLE_TRICK_HP_MULTIPLIER = 10.0 class DistributedPetProxyAI(DistributedObjectAI.DistributedObjectAI): diff --git a/toontown/pets/Pet.py b/toontown/pets/Pet.py index 145cb1c..b23e1a6 100644 --- a/toontown/pets/Pet.py +++ b/toontown/pets/Pet.py @@ -1,25 +1,18 @@ -import random -from enum import IntEnum - from panda3d.core import * - -from direct.actor import Actor from direct.directnotify import DirectNotifyGlobal -from direct.distributed.ClockDelta import globalClockDelta +from direct.interval.IntervalGlobal import * from direct.fsm.ClassicFSM import * from direct.fsm.State import * -from direct.interval.IntervalGlobal import * -from direct.task import Task - +from direct.distributed.ClockDelta import globalClockDelta from otp.avatar import Avatar - +from direct.actor import Actor +from direct.task import Task from toontown.pets import PetDNA -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) - +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 Component2IconDict = {'boredom': 'Bored', 'restlessness': None, 'playfulness': 'Play', diff --git a/toontown/pets/PetActionFSM.py b/toontown/pets/PetActionFSM.py index 92d34c9..2f11cf0 100644 --- a/toontown/pets/PetActionFSM.py +++ b/toontown/pets/PetActionFSM.py @@ -1,14 +1,12 @@ from direct.directnotify import DirectNotifyGlobal -from direct.distributed.ClockDelta import globalClockDelta from direct.fsm import FSM from direct.interval.IntervalGlobal import * -from direct.showbase.PythonUtil import lerp from direct.task import Task - +from direct.distributed.ClockDelta import globalClockDelta +from direct.showbase.PythonUtil import lerp 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 02d2cea..d665967 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 34b4de6..e558233 100644 --- a/toontown/pets/PetBase.py +++ b/toontown/pets/PetBase.py @@ -1,8 +1,6 @@ -import string - -from toontown.pets import PetMood from toontown.pets.PetConstants import AnimMoods - +from toontown.pets import PetMood +import string class PetBase: diff --git a/toontown/pets/PetBrain.py b/toontown/pets/PetBrain.py index e9aa139..86cd86f 100644 --- a/toontown/pets/PetBrain.py +++ b/toontown/pets/PetBrain.py @@ -1,19 +1,16 @@ -import random -import types - from panda3d.core import * from panda3d.toontown import * - -from direct.directnotify import DirectNotifyGlobal -from direct.distributed import DistributedObjectAI -from direct.fsm import FSM +from direct.showbase.PythonUtil import weightedChoice, randFloat, Functor +from direct.showbase.PythonUtil import list2dict from direct.showbase import DirectObject -from direct.showbase.PythonUtil import Functor, list2dict, randFloat, weightedChoice +from direct.distributed import DistributedObjectAI +from direct.directnotify import DirectNotifyGlobal from direct.task import Task - -from toontown.pets import PetConstants, PetGoal, PetGoalMgr, PetLookerAI, PetObserve, PetTricks +from direct.fsm import FSM 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 c5c35d4..4eb8232 100644 --- a/toontown/pets/PetChase.py +++ b/toontown/pets/PetChase.py @@ -1,11 +1,7 @@ -import math - from panda3d.core import * - from direct.showbase.PythonUtil import reduceAngle - from otp.movement import Impulse - +import math class PetChase(Impulse.Impulse): diff --git a/toontown/pets/PetCollider.py b/toontown/pets/PetCollider.py index 8fe7aa4..ad91015 100644 --- a/toontown/pets/PetCollider.py +++ b/toontown/pets/PetCollider.py @@ -1,11 +1,8 @@ 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 3daa4b6..29485e5 100644 --- a/toontown/pets/PetConstants.py +++ b/toontown/pets/PetConstants.py @@ -1,9 +1,6 @@ -from enum import IntEnum - from panda3d.core import * - from toontown.toonbase import ToontownGlobals - +from enum import IntEnum OurPetsMoodChangedKey = 'OurPetsMoodChanged' ThinkPeriod = 1.5 MoodDriftPeriod = 300.0 diff --git a/toontown/pets/PetDNA.py b/toontown/pets/PetDNA.py index ead2084..03b0b40 100644 --- a/toontown/pets/PetDNA.py +++ b/toontown/pets/PetDNA.py @@ -1,10 +1,7 @@ -from panda3d.core import VBase4 - -from direct.showbase import PythonUtil - from toontown.toon import ToonDNA -from toontown.toonbase import ToontownGlobals, TTLocalizer - +from panda3d.core import VBase4 +from toontown.toonbase import TTLocalizer, ToontownGlobals +from direct.showbase import PythonUtil NumFields = 9 Fields = {'head': 0, 'ears': 1, diff --git a/toontown/pets/PetDetail.py b/toontown/pets/PetDetail.py index 87b3644..37786c3 100644 --- a/toontown/pets/PetDetail.py +++ b/toontown/pets/PetDetail.py @@ -1,10 +1,7 @@ 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 82d39ba..220c640 100644 --- a/toontown/pets/PetDetailPanel.py +++ b/toontown/pets/PetDetailPanel.py @@ -1,16 +1,13 @@ from panda3d.core import * - -from direct.directnotify import DirectNotifyGlobal -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 * - +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.showbase.PythonUtil import lerp FUDGE_FACTOR = 0.01 class PetDetailPanel(DirectFrame): diff --git a/toontown/pets/PetFlee.py b/toontown/pets/PetFlee.py index 180e764..d690a91 100644 --- a/toontown/pets/PetFlee.py +++ b/toontown/pets/PetFlee.py @@ -1,10 +1,7 @@ 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 6365512..108ad01 100644 --- a/toontown/pets/PetGoal.py +++ b/toontown/pets/PetGoal.py @@ -1,12 +1,10 @@ -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 direct.fsm import FSM, ClassicFSM, State +from direct.showbase.PythonUtil import randFloat, Functor +from direct.directnotify import DirectNotifyGlobal 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 2922975..c601af4 100644 --- a/toontown/pets/PetGoalMgr.py +++ b/toontown/pets/PetGoalMgr.py @@ -1,13 +1,9 @@ -import random - from panda3d.core import * - from direct.directnotify import DirectNotifyGlobal from direct.showbase import DirectObject -from direct.showbase.PythonUtil import lerp, randFloat - +from direct.showbase.PythonUtil import randFloat, lerp 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 c1e198d..1eecdf1 100644 --- a/toontown/pets/PetHandle.py +++ b/toontown/pets/PetHandle.py @@ -1,6 +1,5 @@ -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 b20c1da..27ae805 100644 --- a/toontown/pets/PetLeash.py +++ b/toontown/pets/PetLeash.py @@ -1,8 +1,6 @@ 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 5d483a4..072bf54 100644 --- a/toontown/pets/PetLookerAI.py +++ b/toontown/pets/PetLookerAI.py @@ -1,13 +1,9 @@ from panda3d.core import * - from direct.directnotify import DirectNotifyGlobal from direct.showbase import DirectObject - from otp.ai.AIZoneData import AIZoneData - -from toontown.pets import PetConstants from toontown.toonbase import ToontownGlobals - +from toontown.pets import PetConstants def getStartLookingAtOtherEvent(lookingAvId): return 'PetLookerAI-%s-startLookingAtOther' % lookingAvId diff --git a/toontown/pets/PetManager.py b/toontown/pets/PetManager.py index fdf0c58..472edab 100644 --- a/toontown/pets/PetManager.py +++ b/toontown/pets/PetManager.py @@ -1,9 +1,6 @@ from panda3d.core import * - -from direct.task import Task - from toontown.toonbase import ToontownGlobals - +from direct.task import Task def acquirePetManager(): if not hasattr(base, 'petManager'): diff --git a/toontown/pets/PetManagerAI.py b/toontown/pets/PetManagerAI.py index c39ce23..1cfa191 100644 --- a/toontown/pets/PetManagerAI.py +++ b/toontown/pets/PetManagerAI.py @@ -1,6 +1,5 @@ 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 2a51eb4..0e53d57 100644 --- a/toontown/pets/PetMood.py +++ b/toontown/pets/PetMood.py @@ -1,13 +1,8 @@ -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 3742bb5..8c9a8a6 100644 --- a/toontown/pets/PetNameGenerator.py +++ b/toontown/pets/PetNameGenerator.py @@ -1,13 +1,10 @@ -import os import random - -from panda3d.core import * - -from direct.directnotify import DirectNotifyGlobal +from toontown.toonbase import ToontownGlobals +from toontown.toonbase import TTLocalizer +import os from direct.showbase import AppRunnerGlobal - -from toontown.toonbase import ToontownGlobals, TTLocalizer - +from direct.directnotify import DirectNotifyGlobal +from panda3d.core import * class PetNameGenerator: notify = DirectNotifyGlobal.directNotify.newCategory('PetNameGenerator') diff --git a/toontown/pets/PetObserve.py b/toontown/pets/PetObserve.py index 486b13f..0b5d096 100644 --- a/toontown/pets/PetObserve.py +++ b/toontown/pets/PetObserve.py @@ -1,10 +1,7 @@ -import types -from enum import IntEnum - from direct.directnotify import DirectNotifyGlobal - +from enum import IntEnum from toontown.pets import PetTricks - +import types notify = DirectNotifyGlobal.directNotify.newCategory('PetObserve') def getEventName(zoneId): diff --git a/toontown/pets/PetSphere.py b/toontown/pets/PetSphere.py index aaee3b5..f2393d7 100644 --- a/toontown/pets/PetSphere.py +++ b/toontown/pets/PetSphere.py @@ -1,11 +1,8 @@ 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 3bd9d41..7a34b3e 100644 --- a/toontown/pets/PetTraits.py +++ b/toontown/pets/PetTraits.py @@ -1,11 +1,8 @@ -import copy -import random +from direct.showbase.PythonUtil import randFloat, normalDistrib +from direct.showbase.PythonUtil import clampScalar +from toontown.toonbase import TTLocalizer, ToontownGlobals +import random, copy from enum import IntEnum - -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 55a8399..02ae1b3 100644 --- a/toontown/pets/PetTricks.py +++ b/toontown/pets/PetTricks.py @@ -1,9 +1,7 @@ +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 8c56a82..aeac826 100644 --- a/toontown/pets/PetTutorial.py +++ b/toontown/pets/PetTutorial.py @@ -1,11 +1,9 @@ -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 - +from panda3d.core import * +from direct.fsm import FSM +from direct.directnotify import DirectNotifyGlobal +from toontown.toonbase import ToontownGlobals +from toontown.toonbase import TTLocalizer class PetTutorial(DirectFrame, FSM.FSM): notify = DirectNotifyGlobal.directNotify.newCategory('PetTutorial') diff --git a/toontown/pets/PetUtil.py b/toontown/pets/PetUtil.py index 29dd084..c7afbcf 100644 --- a/toontown/pets/PetUtil.py +++ b/toontown/pets/PetUtil.py @@ -1,9 +1,7 @@ -import random - +from toontown.pets import PetDNA, PetTraits, PetConstants +from toontown.pets import PetNameGenerator from direct.showbase import PythonUtil - -from toontown.pets import PetConstants, PetDNA, PetNameGenerator, PetTraits - +import random def getPetInfoFromSeed(seed, safezoneId): S = random.getstate() diff --git a/toontown/pets/PetWander.py b/toontown/pets/PetWander.py index 6989a9e..7404d47 100644 --- a/toontown/pets/PetWander.py +++ b/toontown/pets/PetWander.py @@ -1,11 +1,9 @@ from panda3d.core import * from panda3d.toontown import * - +from direct.showbase.PythonUtil import reduceAngle, randFloat, normalDistrib from direct.showbase import DirectObject -from direct.showbase.PythonUtil import normalDistrib, randFloat, reduceAngle - -from toontown.pets import PetChase, PetConstants - +from toontown.pets import PetChase +from toontown.pets import PetConstants class PetWander(CPetChase, DirectObject.DirectObject): diff --git a/toontown/pets/PetshopGUI.py b/toontown/pets/PetshopGUI.py index 34a4e73..c276c85 100644 --- a/toontown/pets/PetshopGUI.py +++ b/toontown/pets/PetshopGUI.py @@ -1,21 +1,24 @@ -import random -import string - -from panda3d.core import * - -from direct.directnotify import DirectNotifyGlobal 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, OTPLocalizer - +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 -from toontown.pets import Pet, PetConstants, PetDetail, PetDNA, PetNameGenerator, PetTraits, PetUtil -from toontown.toonbase import ToontownGlobals, ToontownTimer, TTLocalizer - +import string +import random Dialog_MainMenu = 0 Dialog_AdoptPet = 1 Dialog_ChoosePet = 2 diff --git a/toontown/quest/BlinkingArrows.py b/toontown/quest/BlinkingArrows.py index 1e81b67..a0d225c 100644 --- a/toontown/quest/BlinkingArrows.py +++ b/toontown/quest/BlinkingArrows.py @@ -1,7 +1,5 @@ -from panda3d.core import * - from direct.interval.IntervalGlobal import * - +from panda3d.core import * class BlinkingArrows: diff --git a/toontown/quest/QuestBookPoster.py b/toontown/quest/QuestBookPoster.py index e11ff20..52f5739 100644 --- a/toontown/quest/QuestBookPoster.py +++ b/toontown/quest/QuestBookPoster.py @@ -1,5 +1,4 @@ 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 c69e786..d363830 100644 --- a/toontown/quest/QuestChoiceGui.py +++ b/toontown/quest/QuestChoiceGui.py @@ -1,12 +1,10 @@ -from panda3d.core import * - -from direct.directnotify import DirectNotifyGlobal from direct.gui.DirectGui import * - -from toontown.toonbase import ToontownGlobals, ToontownTimer, TTLocalizer - +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 class QuestChoiceGui(DirectFrame): notify = DirectNotifyGlobal.directNotify.newCategory('QuestChoiceGui') diff --git a/toontown/quest/QuestManagerAI.py b/toontown/quest/QuestManagerAI.py index b92e277..8a7d8b7 100644 --- a/toontown/quest/QuestManagerAI.py +++ b/toontown/quest/QuestManagerAI.py @@ -1,13 +1,9 @@ -import random - -from direct.directnotify import DirectNotifyGlobal -from direct.task import Task - from otp.ai.AIBaseGlobal import * - -from toontown.toon import NPCToons - +from direct.task import Task +from direct.directnotify import DirectNotifyGlobal from . import Quests +from toontown.toon import NPCToons +import random """ TODO: (done, tested) diff --git a/toontown/quest/QuestMap.py b/toontown/quest/QuestMap.py index a7691b8..5e4afa7 100644 --- a/toontown/quest/QuestMap.py +++ b/toontown/quest/QuestMap.py @@ -1,19 +1,14 @@ import math - from panda3d.core import CardMaker, TextNode - -from direct.gui.DirectGui import DirectButton, DirectFrame, DirectLabel +from direct.gui.DirectGui import DirectFrame, DirectLabel, DirectButton 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 445d02b..fea41e6 100644 --- a/toontown/quest/QuestMapGlobals.py +++ b/toontown/quest/QuestMapGlobals.py @@ -1,5 +1,4 @@ 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 ec86d82..493052b 100644 --- a/toontown/quest/QuestParser.py +++ b/toontown/quest/QuestParser.py @@ -1,25 +1,24 @@ -import copy -import os import sys +import os import tokenize - +import copy +from direct.interval.IntervalGlobal import * +from direct.directnotify import DirectNotifyGlobal from panda3d.core import * from panda3d.otp import * - -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 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.interval.IntervalGlobal import * notify = DirectNotifyGlobal.directNotify.newCategory('QuestParser') lineDict = {} globalVarDict = {} diff --git a/toontown/quest/QuestPoster.py b/toontown/quest/QuestPoster.py index e2727cc..cd8d761 100644 --- a/toontown/quest/QuestPoster.py +++ b/toontown/quest/QuestPoster.py @@ -1,23 +1,21 @@ -import string -import types - -from panda3d.core import * - -from direct.directnotify import DirectNotifyGlobal 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 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 otp.otpbase import OTPLocalizer 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 b247a1f..58b1466 100644 --- a/toontown/quest/QuestRewardCounter.py +++ b/toontown/quest/QuestRewardCounter.py @@ -1,16 +1,12 @@ from panda3d.core import * - from direct.directnotify import DirectNotifyGlobal - -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 - +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.golf import GolfGlobals class QuestRewardCounter: notify = directNotify.newCategory('QuestRewardCounter') diff --git a/toontown/quest/Quests.py b/toontown/quest/Quests.py index 3946ad8..655a25b 100644 --- a/toontown/quest/Quests.py +++ b/toontown/quest/Quests.py @@ -1,19 +1,16 @@ -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 -from toontown.hood import ZoneUtil +import random from toontown.toon import NPCToons -from toontown.toonbase import ToontownBattleGlobals, ToontownGlobals, TTLocalizer - +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 notify = DirectNotifyGlobal.directNotify.newCategory('Quests') ItemDict = TTLocalizer.QuestsItemDict CompleteString = TTLocalizer.QuestsCompleteString @@ -79,8 +76,7 @@ PHONE_QUEST_ID = 175 NEWBIE_HP = 25 SELLBOT_HQ_NEWBIE_HP = 50 CASHBOT_HQ_NEWBIE_HP = 85 -from toontown.toonbase.ToontownGlobals import FT_Arm, FT_FullSuit, FT_Leg, FT_Torso - +from toontown.toonbase.ToontownGlobals import FT_FullSuit, FT_Leg, FT_Arm, FT_Torso QuestRandGen = random.Random() def seedRandomGen(npcId, avId, tier, rewardHistory): diff --git a/toontown/quest/TrackChoiceGui.py b/toontown/quest/TrackChoiceGui.py index d4395ab..76d698c 100644 --- a/toontown/quest/TrackChoiceGui.py +++ b/toontown/quest/TrackChoiceGui.py @@ -1,9 +1,9 @@ -from panda3d.core import * - from direct.gui.DirectGui import * - -from toontown.toonbase import ToontownBattleGlobals, ToontownGlobals, ToontownTimer, TTLocalizer - +from panda3d.core import * +from toontown.toonbase import ToontownTimer +from toontown.toonbase import ToontownGlobals +from toontown.toonbase import ToontownBattleGlobals +from toontown.toonbase import 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 df14521..ad035c7 100644 --- a/toontown/racing/DistributedGag.py +++ b/toontown/racing/DistributedGag.py @@ -1,15 +1,11 @@ from panda3d.core import * - from direct.distributed import DistributedObject -from direct.distributed.ClockDelta import * -from direct.interval.IntervalGlobal import * from direct.interval.ProjectileInterval import * - +from direct.interval.IntervalGlobal import * +from direct.distributed.ClockDelta 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 a04247b..d13c378 100644 --- a/toontown/racing/DistributedKartPad.py +++ b/toontown/racing/DistributedKartPad.py @@ -1,6 +1,5 @@ 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 99eca85..ccf3fe3 100644 --- a/toontown/racing/DistributedLeaderBoard.py +++ b/toontown/racing/DistributedLeaderBoard.py @@ -1,13 +1,14 @@ -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, TTLocalizer +from toontown.toonbase import ToontownGlobals +from toontown.toonbase import 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 f0a8a68..fd1a73c 100644 --- a/toontown/racing/DistributedProjectile.py +++ b/toontown/racing/DistributedProjectile.py @@ -1,14 +1,12 @@ from panda3d.core import * - from direct.distributed.ClockDelta import * -from direct.distributed.DistributedSmoothNode import DistributedSmoothNode -from direct.fsm import FSM -from direct.gui.DirectGui 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 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 4ff2931..1d5bcc0 100644 --- a/toontown/racing/DistributedProjectileAI.py +++ b/toontown/racing/DistributedProjectileAI.py @@ -1,6 +1,5 @@ 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 579dce1..d96cf0d 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.directnotify import DirectNotifyGlobal -from direct.distributed import DistributedObject, DistributedSmoothNode from direct.distributed.ClockDelta import * -from direct.fsm import ClassicFSM, State -from direct.gui.DirectButton import * +from direct.distributed import DistributedObject +from direct.directnotify import DirectNotifyGlobal from direct.gui.DirectLabel import * -from direct.interval.IntervalGlobal import * +from direct.gui.DirectButton import * from direct.showbase import BulletinBoardWatcher -from direct.task.Task import Task - +from direct.interval.IntervalGlobal import * from otp.otpbase import OTPGlobals - -from toontown.battle.BattleProps import * -from toontown.hood import SkyUtil -from toontown.minigame import MinigameRulesPanel -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 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.fsm import ClassicFSM, State +from direct.fsm import State +from toontown.battle.BattleProps import * +from toontown.minigame import MinigameRulesPanel +from toontown.racing import Piejectile +from toontown.racing import EffectManager +from toontown.racing import PiejectileManager class DistributedRace(DistributedObject.DistributedObject): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedRace') diff --git a/toontown/racing/DistributedRaceAI.py b/toontown/racing/DistributedRaceAI.py index dce04d4..25312f8 100644 --- a/toontown/racing/DistributedRaceAI.py +++ b/toontown/racing/DistributedRaceAI.py @@ -1,15 +1,12 @@ -import random - -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 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.distributed.ClockDelta import * class DistributedRaceAI(DistributedObjectAI.DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedRaceAI') diff --git a/toontown/racing/DistributedRacePad.py b/toontown/racing/DistributedRacePad.py index 0e171c2..0aab464 100644 --- a/toontown/racing/DistributedRacePad.py +++ b/toontown/racing/DistributedRacePad.py @@ -1,17 +1,15 @@ 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 direct.task.Task import Task - -from toontown.racing import RaceGlobals from toontown.racing.DistributedKartPad import DistributedKartPad -from toontown.racing.KartShopGlobals import KartGlobals -from toontown.toonbase import ToontownGlobals, TTLocalizer +from toontown.racing import RaceGlobals from toontown.toonbase.ToontownTimer import ToontownTimer - +from toontown.toonbase import TTLocalizer +from toontown.toonbase import ToontownGlobals +from toontown.racing.KartShopGlobals import KartGlobals class DistributedRacePad(DistributedKartPad, FSM): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedRacePad') diff --git a/toontown/racing/DistributedStartingBlock.py b/toontown/racing/DistributedStartingBlock.py index 6d0a0b4..a0350ab 100644 --- a/toontown/racing/DistributedStartingBlock.py +++ b/toontown/racing/DistributedStartingBlock.py @@ -1,25 +1,27 @@ -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.racing import RaceGlobals +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.Kart import Kart from toontown.racing.KartShopGlobals import KartGlobals -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.racing import RaceGlobals from toontown.toontowngui.TTDialog import TTGlobalDialog - +from toontown.toontowngui.TeaserPanel import TeaserPanel if (__debug__): import pdb diff --git a/toontown/racing/DistributedStartingBlockAI.py b/toontown/racing/DistributedStartingBlockAI.py index f950b20..36b577b 100644 --- a/toontown/racing/DistributedStartingBlockAI.py +++ b/toontown/racing/DistributedStartingBlockAI.py @@ -1,15 +1,13 @@ -from direct.distributed import DistributedObjectAI -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 - +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.showbase.DirectObject import DirectObject +from toontown.racing.KartShopGlobals import KartGlobals if __debug__: import pdb diff --git a/toontown/racing/DistributedVehicle.py b/toontown/racing/DistributedVehicle.py index b288746..26c6c4d 100644 --- a/toontown/racing/DistributedVehicle.py +++ b/toontown/racing/DistributedVehicle.py @@ -1,29 +1,28 @@ -import math -import random - from panda3d.core import * from panda3d.otp import * -from panda3d.physics import * - -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.interval.ProjectileInterval import * -from direct.showbase.PythonUtil import clampScalar, randFloat -from direct.task.Task import Task - -from otp.avatar import ShadowCaster +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.interval.IntervalGlobal import * +from direct.showbase.PythonUtil import clampScalar from otp.otpbase import OTPGlobals - -from toontown.battle.BattleProps import * -from toontown.effects.Drift import Drift -from toontown.effects.Sparks import Sparks +from otp.avatar import ShadowCaster from toontown.racing import Kart from toontown.racing.KartDNA import * -from toontown.toonbase import ToontownGlobals, TTLocalizer - +from toontown.toonbase import ToontownGlobals +from toontown.toonbase import TTLocalizer +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 iceTurnFactor = 0.25 iceAccelFactor = 0.4 diff --git a/toontown/racing/DistributedVehicleAI.py b/toontown/racing/DistributedVehicleAI.py index 05b71d6..39d3359 100644 --- a/toontown/racing/DistributedVehicleAI.py +++ b/toontown/racing/DistributedVehicleAI.py @@ -1,13 +1,10 @@ -from direct.distributed import DistributedSmoothNodeAI +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.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 e551113..a87b9bd 100644 --- a/toontown/racing/DistributedViewPad.py +++ b/toontown/racing/DistributedViewPad.py @@ -1,12 +1,9 @@ -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 529af91..51b5a29 100644 --- a/toontown/racing/DroppedGag.py +++ b/toontown/racing/DroppedGag.py @@ -1,11 +1,9 @@ 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 8a48d28..befb547 100644 --- a/toontown/racing/EffectManager.py +++ b/toontown/racing/EffectManager.py @@ -1,11 +1,9 @@ from panda3d.core import * - -from direct.interval.IntervalGlobal import * +from panda3d.core import * from direct.showbase.DirectObject import DirectObject - -from toontown.battle import MovieUtil +from direct.interval.IntervalGlobal import * from toontown.battle.BattleProps import * - +from toontown.battle import MovieUtil class EffectManager(DirectObject): diff --git a/toontown/racing/FlyingGag.py b/toontown/racing/FlyingGag.py index 340c635..902521c 100644 --- a/toontown/racing/FlyingGag.py +++ b/toontown/racing/FlyingGag.py @@ -1,11 +1,9 @@ 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 ad03793..acea62b 100644 --- a/toontown/racing/Kart.py +++ b/toontown/racing/Kart.py @@ -1,16 +1,12 @@ +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 9e1f04d..a33b049 100644 --- a/toontown/racing/KartDNA.py +++ b/toontown/racing/KartDNA.py @@ -1,18 +1,11 @@ -from enum import IntEnum - -from panda3d.core import * - from direct.directnotify import DirectNotifyGlobal - from toontown.toonbase import TTLocalizer - +from panda3d.core import * from .KartShopGlobals import * - +from enum import IntEnum 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 1a0e982..f8ea031 100644 --- a/toontown/racing/KartShopGlobals.py +++ b/toontown/racing/KartShopGlobals.py @@ -1,6 +1,5 @@ from enum import IntEnum - class KartShopGlobals: EVENTDICT = {'guiDone': 'guiDone', 'returnKart': 'returnKart', diff --git a/toontown/racing/KartShopGui.py b/toontown/racing/KartShopGui.py index c29a1c7..c9c31d2 100644 --- a/toontown/racing/KartShopGui.py +++ b/toontown/racing/KartShopGui.py @@ -1,22 +1,19 @@ 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 toontown.toonbase import ToontownGlobals, ToontownTimer, TTLocalizer -from toontown.toontowngui.TeaserPanel import TeaserPanel - from .KartDNA import * -from .KartShopGlobals import * - +from toontown.toontowngui.TeaserPanel import TeaserPanel +from enum import IntEnum if (__debug__): import pdb MENUS = IntEnum('MENUS', ('MainMenu, BuyKart, BuyAccessory, ReturnKart, ConfirmBuyAccessory, ConfirmBuyKart, BoughtKart, BoughtAccessory, TeaserPanel'), start=0) diff --git a/toontown/racing/Piejectile.py b/toontown/racing/Piejectile.py index e24c51b..daf603b 100644 --- a/toontown/racing/Piejectile.py +++ b/toontown/racing/Piejectile.py @@ -1,21 +1,16 @@ 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.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 direct.distributed import DistributedSmoothNode from otp.avatar import ShadowCaster from otp.otpbase import OTPGlobals - -from toontown.battle import MovieUtil from toontown.racing.FlyingGag import FlyingGag - +from toontown.battle import MovieUtil class Piejectile(DirectObject, FlyingGag): physicsCalculationsPerSecond = 60 diff --git a/toontown/racing/PiejectileManager.py b/toontown/racing/PiejectileManager.py index 4b6efc9..9281a10 100644 --- a/toontown/racing/PiejectileManager.py +++ b/toontown/racing/PiejectileManager.py @@ -1,12 +1,10 @@ from panda3d.core import * - -from direct.interval.IntervalGlobal import * +from panda3d.core import * from direct.showbase.DirectObject import DirectObject - +from direct.interval.IntervalGlobal import * 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 32a7a41..b3b5124 100644 --- a/toontown/racing/RaceEndPanels.py +++ b/toontown/racing/RaceEndPanels.py @@ -1,13 +1,12 @@ -from panda3d.core import * - -from direct.directnotify import DirectNotifyGlobal 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.racing import RaceGlobals from toontown.shtiker.KartPage import RacingTrophy -from toontown.toonbase import ToontownGlobals, TTLocalizer - +from toontown.racing import RaceGlobals class RaceResultsPanel(DirectFrame): notify = DirectNotifyGlobal.directNotify.newCategory('RaceEndPanels') diff --git a/toontown/racing/RaceGUI.py b/toontown/racing/RaceGUI.py index 0d73db9..87dd55b 100644 --- a/toontown/racing/RaceGUI.py +++ b/toontown/racing/RaceGUI.py @@ -1,31 +1,28 @@ -import operator -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 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 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 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 class RaceGUI: GagPie = 0 diff --git a/toontown/racing/RaceGag.py b/toontown/racing/RaceGag.py index 36f2453..dd6d658 100644 --- a/toontown/racing/RaceGag.py +++ b/toontown/racing/RaceGag.py @@ -1,10 +1,7 @@ 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 f8065ee..1b44950 100644 --- a/toontown/racing/RaceHeadFrame.py +++ b/toontown/racing/RaceHeadFrame.py @@ -1,10 +1,7 @@ -from panda3d.core import * - from direct.gui.DirectGui import * - -from toontown.toon import ToonHead +from panda3d.core import * from toontown.toonbase import ToontownGlobals - +from toontown.toon import ToonHead class RaceHeadFrame(DirectFrame): diff --git a/toontown/racing/RaceManagerAI.py b/toontown/racing/RaceManagerAI.py index 574030a..b19e54f 100644 --- a/toontown/racing/RaceManagerAI.py +++ b/toontown/racing/RaceManagerAI.py @@ -1,14 +1,11 @@ -import os -import pickle - from direct.directnotify import DirectNotifyGlobal -from direct.showbase import DirectObject - -from toontown.ai import HolidayBaseAI -from toontown.coghq import MintLayout -from toontown.racing import DistributedRaceAI, RaceGlobals +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 class RaceManagerAI(DirectObject.DirectObject): notify = DirectNotifyGlobal.directNotify.newCategory('RaceManagerAI') diff --git a/toontown/rpc/AwardManager.py b/toontown/rpc/AwardManager.py index d8679bf..c6f8ae1 100644 --- a/toontown/rpc/AwardManager.py +++ b/toontown/rpc/AwardManager.py @@ -1,5 +1,4 @@ from direct.distributed.DistributedObjectGlobal import DistributedObjectGlobal - class AwardManager(DistributedObjectGlobal): pass diff --git a/toontown/rpc/AwardManagerUD.py b/toontown/rpc/AwardManagerUD.py index 3ae4971..73ea205 100644 --- a/toontown/rpc/AwardManagerUD.py +++ b/toontown/rpc/AwardManagerUD.py @@ -1,6 +1,5 @@ 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 da47f6a..37035aa 100644 --- a/toontown/rpc/RATManager.py +++ b/toontown/rpc/RATManager.py @@ -1,5 +1,4 @@ from direct.distributed.DistributedObjectGlobal import DistributedObjectGlobal - class RATManager(DistributedObjectGlobal): pass diff --git a/toontown/rpc/RATManagerUD.py b/toontown/rpc/RATManagerUD.py index 0ec0bc2..f78ba08 100644 --- a/toontown/rpc/RATManagerUD.py +++ b/toontown/rpc/RATManagerUD.py @@ -1,6 +1,5 @@ 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 360827a..dd9bd45 100644 --- a/toontown/safezone/BRPlayground.py +++ b/toontown/safezone/BRPlayground.py @@ -1,15 +1,10 @@ -import random - from panda3d.core import * - +from . import Playground from direct.task.Task import Task - +import random 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 486cc49..6dfe15a 100644 --- a/toontown/safezone/BRSafeZoneLoader.py +++ b/toontown/safezone/BRSafeZoneLoader.py @@ -1,12 +1,9 @@ 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 b7c0cf6..62c214e 100644 --- a/toontown/safezone/BRTreasurePlannerAI.py +++ b/toontown/safezone/BRTreasurePlannerAI.py @@ -1,7 +1,5 @@ from toontown.toonbase.ToontownGlobals import * - -from . import DistributedBRTreasureAI, RegenTreasurePlannerAI - +from . import RegenTreasurePlannerAI, DistributedBRTreasureAI class BRTreasurePlannerAI(RegenTreasurePlannerAI.RegenTreasurePlannerAI): diff --git a/toontown/safezone/ButterflyGlobals.py b/toontown/safezone/ButterflyGlobals.py index b6d0fde..cd2d194 100644 --- a/toontown/safezone/ButterflyGlobals.py +++ b/toontown/safezone/ButterflyGlobals.py @@ -1,7 +1,5 @@ -import random - from panda3d.core import * - +import random OFF = 0 FLYING = 1 LANDED = 2 diff --git a/toontown/safezone/DDPlayground.py b/toontown/safezone/DDPlayground.py index 5c695af..b99f491 100644 --- a/toontown/safezone/DDPlayground.py +++ b/toontown/safezone/DDPlayground.py @@ -1,17 +1,12 @@ -import random - from panda3d.core import * - -from direct.actor import Actor -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 - +from direct.task.Task import Task +import random +from direct.fsm import ClassicFSM, State +from direct.actor import Actor +from toontown.toonbase import ToontownGlobals +from direct.directnotify import DirectNotifyGlobal +from toontown.hood import Place class DDPlayground(Playground.Playground): notify = DirectNotifyGlobal.directNotify.newCategory('DDPlayground') diff --git a/toontown/safezone/DDSafeZoneLoader.py b/toontown/safezone/DDSafeZoneLoader.py index 51e2aa9..8cf6d91 100644 --- a/toontown/safezone/DDSafeZoneLoader.py +++ b/toontown/safezone/DDSafeZoneLoader.py @@ -1,13 +1,11 @@ from panda3d.core import * - +from . import SafeZoneLoader +from . import DDPlayground from direct.fsm import State - -from toontown.char import Char, CharDNA +from toontown.char import CharDNA +from toontown.char import Char 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 77d823d..31b1502 100644 --- a/toontown/safezone/DDTreasurePlannerAI.py +++ b/toontown/safezone/DDTreasurePlannerAI.py @@ -1,7 +1,5 @@ from toontown.toonbase.ToontownGlobals import * - -from . import DistributedDDTreasureAI, RegenTreasurePlannerAI - +from . import RegenTreasurePlannerAI, DistributedDDTreasureAI class DDTreasurePlannerAI(RegenTreasurePlannerAI.RegenTreasurePlannerAI): diff --git a/toontown/safezone/DGPlayground.py b/toontown/safezone/DGPlayground.py index 9acd822..ab988c0 100644 --- a/toontown/safezone/DGPlayground.py +++ b/toontown/safezone/DGPlayground.py @@ -1,11 +1,7 @@ -import random - from panda3d.core import * - -from direct.task import Task - from . import Playground - +import random +from direct.task import Task class DGPlayground(Playground.Playground): diff --git a/toontown/safezone/DGSafeZoneLoader.py b/toontown/safezone/DGSafeZoneLoader.py index 7956902..4818757 100644 --- a/toontown/safezone/DGSafeZoneLoader.py +++ b/toontown/safezone/DGSafeZoneLoader.py @@ -1,7 +1,6 @@ from panda3d.core import * - -from . import DGPlayground, SafeZoneLoader - +from . import SafeZoneLoader +from . import DGPlayground class DGSafeZoneLoader(SafeZoneLoader.SafeZoneLoader): diff --git a/toontown/safezone/DGTreasurePlannerAI.py b/toontown/safezone/DGTreasurePlannerAI.py index c8bf880..d5aa084 100644 --- a/toontown/safezone/DGTreasurePlannerAI.py +++ b/toontown/safezone/DGTreasurePlannerAI.py @@ -1,7 +1,5 @@ from toontown.toonbase.ToontownGlobals import * - -from . import DistributedDGTreasureAI, RegenTreasurePlannerAI - +from . import RegenTreasurePlannerAI, DistributedDGTreasureAI class DGTreasurePlannerAI(RegenTreasurePlannerAI.RegenTreasurePlannerAI): diff --git a/toontown/safezone/DLPlayground.py b/toontown/safezone/DLPlayground.py index 8111b82..c646d48 100644 --- a/toontown/safezone/DLPlayground.py +++ b/toontown/safezone/DLPlayground.py @@ -1,9 +1,6 @@ -import random - from panda3d.core import * - from . import Playground - +import random class DLPlayground(Playground.Playground): diff --git a/toontown/safezone/DLSafeZoneLoader.py b/toontown/safezone/DLSafeZoneLoader.py index c58388e..3d9bf8c 100644 --- a/toontown/safezone/DLSafeZoneLoader.py +++ b/toontown/safezone/DLSafeZoneLoader.py @@ -1,7 +1,6 @@ from panda3d.core import * - -from . import DLPlayground, SafeZoneLoader - +from . import SafeZoneLoader +from . import DLPlayground class DLSafeZoneLoader(SafeZoneLoader.SafeZoneLoader): diff --git a/toontown/safezone/DLTreasurePlannerAI.py b/toontown/safezone/DLTreasurePlannerAI.py index 5fd2f2c..58b2868 100644 --- a/toontown/safezone/DLTreasurePlannerAI.py +++ b/toontown/safezone/DLTreasurePlannerAI.py @@ -1,7 +1,5 @@ from toontown.toonbase.ToontownGlobals import * - -from . import DistributedDLTreasureAI, RegenTreasurePlannerAI - +from . import RegenTreasurePlannerAI, DistributedDLTreasureAI class DLTreasurePlannerAI(RegenTreasurePlannerAI.RegenTreasurePlannerAI): diff --git a/toontown/safezone/DistributedBRTreasure.py b/toontown/safezone/DistributedBRTreasure.py index 4048584..66848e6 100644 --- a/toontown/safezone/DistributedBRTreasure.py +++ b/toontown/safezone/DistributedBRTreasure.py @@ -1,6 +1,5 @@ from . import DistributedSZTreasure - class DistributedBRTreasure(DistributedSZTreasure.DistributedSZTreasure): def __init__(self, cr): diff --git a/toontown/safezone/DistributedBRTreasureAI.py b/toontown/safezone/DistributedBRTreasureAI.py index d1fbe05..109c04a 100644 --- a/toontown/safezone/DistributedBRTreasureAI.py +++ b/toontown/safezone/DistributedBRTreasureAI.py @@ -1,6 +1,5 @@ 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 58222bf..1a9f012 100644 --- a/toontown/safezone/DistributedBoat.py +++ b/toontown/safezone/DistributedBoat.py @@ -1,15 +1,13 @@ from panda3d.core import * -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 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 - class DistributedBoat(DistributedObject.DistributedObject): def __init__(self, cr): diff --git a/toontown/safezone/DistributedBoatAI.py b/toontown/safezone/DistributedBoatAI.py index 13c0732..1965e56 100644 --- a/toontown/safezone/DistributedBoatAI.py +++ b/toontown/safezone/DistributedBoatAI.py @@ -1,12 +1,10 @@ -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.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 class DistributedBoatAI(DistributedObjectAI.DistributedObjectAI): diff --git a/toontown/safezone/DistributedButterfly.py b/toontown/safezone/DistributedButterfly.py index 1442c98..c6be8f2 100644 --- a/toontown/safezone/DistributedButterfly.py +++ b/toontown/safezone/DistributedButterfly.py @@ -1,22 +1,18 @@ -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 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 class DistributedButterfly(DistributedObject.DistributedObject): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedButterfly') diff --git a/toontown/safezone/DistributedButterflyAI.py b/toontown/safezone/DistributedButterflyAI.py index 7c30783..e09e714 100644 --- a/toontown/safezone/DistributedButterflyAI.py +++ b/toontown/safezone/DistributedButterflyAI.py @@ -1,15 +1,12 @@ -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 * - +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 class DistributedButterflyAI(DistributedObjectAI.DistributedObjectAI): diff --git a/toontown/safezone/DistributedCheckers.py b/toontown/safezone/DistributedCheckers.py index a6072ab..5051f79 100644 --- a/toontown/safezone/DistributedCheckers.py +++ b/toontown/safezone/DistributedCheckers.py @@ -1,22 +1,20 @@ from panda3d.core import * - -from direct.distributed import DistributedNode from direct.distributed.ClockDelta import * -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 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.showbase import PythonUtil class DistributedCheckers(DistributedNode.DistributedNode): diff --git a/toontown/safezone/DistributedCheckersAI.py b/toontown/safezone/DistributedCheckersAI.py index 64edbb1..4110e34 100644 --- a/toontown/safezone/DistributedCheckersAI.py +++ b/toontown/safezone/DistributedCheckersAI.py @@ -1,10 +1,11 @@ -from direct.distributed.ClockDelta import * from direct.distributed.DistributedNodeAI import DistributedNodeAI -from direct.fsm import ClassicFSM, State, StateData - +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 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 ff0c3a0..d7247fa 100644 --- a/toontown/safezone/DistributedChineseCheckers.py +++ b/toontown/safezone/DistributedChineseCheckers.py @@ -1,23 +1,21 @@ from panda3d.core import * - -from direct.distributed import DistributedNode from direct.distributed.ClockDelta import * -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 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.showbase import PythonUtil class DistributedChineseCheckers(DistributedNode.DistributedNode): diff --git a/toontown/safezone/DistributedChineseCheckersAI.py b/toontown/safezone/DistributedChineseCheckersAI.py index a21c539..e367705 100644 --- a/toontown/safezone/DistributedChineseCheckersAI.py +++ b/toontown/safezone/DistributedChineseCheckersAI.py @@ -1,10 +1,11 @@ -from direct.distributed.ClockDelta import * from direct.distributed.DistributedNodeAI import DistributedNodeAI -from direct.fsm import ClassicFSM, State, StateData - +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 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 9cc5b16..43b5d80 100644 --- a/toontown/safezone/DistributedDDTreasure.py +++ b/toontown/safezone/DistributedDDTreasure.py @@ -1,6 +1,5 @@ from . import DistributedSZTreasure - class DistributedDDTreasure(DistributedSZTreasure.DistributedSZTreasure): def __init__(self, cr): diff --git a/toontown/safezone/DistributedDDTreasureAI.py b/toontown/safezone/DistributedDDTreasureAI.py index cacff0a..0ec1376 100644 --- a/toontown/safezone/DistributedDDTreasureAI.py +++ b/toontown/safezone/DistributedDDTreasureAI.py @@ -1,6 +1,5 @@ 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 edfd29d..aa0813e 100644 --- a/toontown/safezone/DistributedDGFlower.py +++ b/toontown/safezone/DistributedDGFlower.py @@ -1,11 +1,8 @@ from panda3d.core import * - -from direct.distributed import DistributedObject from direct.distributed.ClockDelta import * -from direct.task import Task - +from direct.distributed import DistributedObject from toontown.toonbase import ToontownGlobals - +from direct.task import Task SPIN_RATE = 1.25 class DistributedDGFlower(DistributedObject.DistributedObject): diff --git a/toontown/safezone/DistributedDGFlowerAI.py b/toontown/safezone/DistributedDGFlowerAI.py index f7d0016..60e133d 100644 --- a/toontown/safezone/DistributedDGFlowerAI.py +++ b/toontown/safezone/DistributedDGFlowerAI.py @@ -1,11 +1,8 @@ -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 * - +from direct.distributed.ClockDelta import * +from direct.distributed import DistributedObjectAI +from direct.task import Task 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 155950e..87a7262 100644 --- a/toontown/safezone/DistributedDGTreasure.py +++ b/toontown/safezone/DistributedDGTreasure.py @@ -1,6 +1,5 @@ from . import DistributedSZTreasure - class DistributedDGTreasure(DistributedSZTreasure.DistributedSZTreasure): def __init__(self, cr): diff --git a/toontown/safezone/DistributedDGTreasureAI.py b/toontown/safezone/DistributedDGTreasureAI.py index 369e9dd..4006ab9 100644 --- a/toontown/safezone/DistributedDGTreasureAI.py +++ b/toontown/safezone/DistributedDGTreasureAI.py @@ -1,6 +1,5 @@ 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 5e320db..deefb18 100644 --- a/toontown/safezone/DistributedDLTreasure.py +++ b/toontown/safezone/DistributedDLTreasure.py @@ -1,6 +1,5 @@ from . import DistributedSZTreasure - class DistributedDLTreasure(DistributedSZTreasure.DistributedSZTreasure): def __init__(self, cr): diff --git a/toontown/safezone/DistributedDLTreasureAI.py b/toontown/safezone/DistributedDLTreasureAI.py index 744b387..6247ddc 100644 --- a/toontown/safezone/DistributedDLTreasureAI.py +++ b/toontown/safezone/DistributedDLTreasureAI.py @@ -1,6 +1,5 @@ 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 8a944fe..ccc7b83 100644 --- a/toontown/safezone/DistributedEFlyingTreasure.py +++ b/toontown/safezone/DistributedEFlyingTreasure.py @@ -1,15 +1,10 @@ +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 66e8ea8..fdc6cb5 100644 --- a/toontown/safezone/DistributedEFlyingTreasureAI.py +++ b/toontown/safezone/DistributedEFlyingTreasureAI.py @@ -1,6 +1,5 @@ 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 39e546e..89b6a8e 100644 --- a/toontown/safezone/DistributedETreasure.py +++ b/toontown/safezone/DistributedETreasure.py @@ -1,6 +1,5 @@ from . import DistributedSZTreasure - class DistributedETreasure(DistributedSZTreasure.DistributedSZTreasure): def __init__(self, cr): diff --git a/toontown/safezone/DistributedETreasureAI.py b/toontown/safezone/DistributedETreasureAI.py index 350acb1..92603f4 100644 --- a/toontown/safezone/DistributedETreasureAI.py +++ b/toontown/safezone/DistributedETreasureAI.py @@ -1,6 +1,5 @@ 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 0ccec5d..c43ac09 100644 --- a/toontown/safezone/DistributedFindFour.py +++ b/toontown/safezone/DistributedFindFour.py @@ -1,25 +1,22 @@ -from random import * - from panda3d.core import * from panda3d.otp import WhisperPopup - -from direct.distributed import DistributedNode from direct.distributed.ClockDelta import * -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 .ChineseCheckersBoard import ChineseCheckersBoard +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.showbase import PythonUtil +from random import * class DistributedFindFour(DistributedNode.DistributedNode): diff --git a/toontown/safezone/DistributedFindFourAI.py b/toontown/safezone/DistributedFindFourAI.py index 035bab8..f9e9c36 100644 --- a/toontown/safezone/DistributedFindFourAI.py +++ b/toontown/safezone/DistributedFindFourAI.py @@ -1,9 +1,11 @@ -from direct.distributed.ClockDelta import * from direct.distributed.DistributedNodeAI import DistributedNodeAI -from direct.fsm import ClassicFSM, State, StateData +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.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 8584a81..a61a5cb 100644 --- a/toontown/safezone/DistributedFishingSpot.py +++ b/toontown/safezone/DistributedFishingSpot.py @@ -1,26 +1,31 @@ -import math -import random - from panda3d.core import * - -from direct.actor import Actor -from direct.directnotify import DirectNotifyGlobal +from direct.interval.IntervalGlobal import * +from direct.gui.DirectGui import * +from panda3d.core import * from direct.directtools.DirectGeometry import LineNodePath from direct.distributed import DistributedObject -from direct.fsm import ClassicFSM, 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.quest import Quests +from direct.directnotify import DirectNotifyGlobal +from toontown.toonbase import ToontownGlobals +from toontown.fishing import FishGlobals from toontown.shtiker import FishPage -from toontown.toonbase import ToontownGlobals, ToontownTimer, TTLocalizer -from toontown.toontowngui import TeaserPanel, TTDialog - +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 toontown.hood import ZoneUtil +from toontown.toontowngui import TeaserPanel class DistributedFishingSpot(DistributedObject.DistributedObject): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedFishingSpot') diff --git a/toontown/safezone/DistributedFishingSpotAI.py b/toontown/safezone/DistributedFishingSpotAI.py index e532697..ac51239 100644 --- a/toontown/safezone/DistributedFishingSpotAI.py +++ b/toontown/safezone/DistributedFishingSpotAI.py @@ -1,6 +1,5 @@ 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 1ac1cf2..11c4bd2 100644 --- a/toontown/safezone/DistributedGolfKart.py +++ b/toontown/safezone/DistributedGolfKart.py @@ -1,22 +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.interval.IntervalGlobal import * -from direct.showbase import PythonUtil 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 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 direct.task.Task import Task +from direct.showbase import PythonUtil +from toontown.toontowngui import TeaserPanel +from toontown.toon import ToonDNA +from toontown.hood import ZoneUtil class DistributedGolfKart(DistributedObject.DistributedObject): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedGolfKart') diff --git a/toontown/safezone/DistributedGolfKartAI.py b/toontown/safezone/DistributedGolfKartAI.py index e698a54..1035a06 100644 --- a/toontown/safezone/DistributedGolfKartAI.py +++ b/toontown/safezone/DistributedGolfKartAI.py @@ -1,20 +1,18 @@ -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 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 class DistributedGolfKartAI(DistributedObjectAI.DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedGolfKartAI') diff --git a/toontown/safezone/DistributedMMPiano.py b/toontown/safezone/DistributedMMPiano.py index 363102a..e86491a 100644 --- a/toontown/safezone/DistributedMMPiano.py +++ b/toontown/safezone/DistributedMMPiano.py @@ -1,13 +1,10 @@ from panda3d.core import * -from panda3d.core import NodePath - -from direct.distributed import DistributedObject +from direct.task.Task import Task from direct.distributed.ClockDelta import * from direct.interval.IntervalGlobal import * -from direct.task.Task import Task - +from direct.distributed import DistributedObject +from panda3d.core import NodePath from toontown.toonbase import ToontownGlobals - ChangeDirectionDebounce = 1.0 ChangeDirectionTime = 1.0 diff --git a/toontown/safezone/DistributedMMPianoAI.py b/toontown/safezone/DistributedMMPianoAI.py index 18dea77..bea79e7 100644 --- a/toontown/safezone/DistributedMMPianoAI.py +++ b/toontown/safezone/DistributedMMPianoAI.py @@ -1,11 +1,8 @@ -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 * - +from direct.distributed.ClockDelta import * +from direct.distributed import DistributedObjectAI +from direct.task import Task 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 4875f02..c3ec8f1 100644 --- a/toontown/safezone/DistributedMMTreasure.py +++ b/toontown/safezone/DistributedMMTreasure.py @@ -1,6 +1,5 @@ from . import DistributedSZTreasure - class DistributedMMTreasure(DistributedSZTreasure.DistributedSZTreasure): def __init__(self, cr): diff --git a/toontown/safezone/DistributedMMTreasureAI.py b/toontown/safezone/DistributedMMTreasureAI.py index 7efd5ed..f63998e 100644 --- a/toontown/safezone/DistributedMMTreasureAI.py +++ b/toontown/safezone/DistributedMMTreasureAI.py @@ -1,6 +1,5 @@ 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 cc14dd6..cfe9016 100644 --- a/toontown/safezone/DistributedOZTreasure.py +++ b/toontown/safezone/DistributedOZTreasure.py @@ -1,6 +1,5 @@ from . import DistributedSZTreasure - class DistributedOZTreasure(DistributedSZTreasure.DistributedSZTreasure): def __init__(self, cr): diff --git a/toontown/safezone/DistributedOZTreasureAI.py b/toontown/safezone/DistributedOZTreasureAI.py index 28e3e51..2a3d709 100644 --- a/toontown/safezone/DistributedOZTreasureAI.py +++ b/toontown/safezone/DistributedOZTreasureAI.py @@ -1,6 +1,5 @@ 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 601357a..56c639e 100644 --- a/toontown/safezone/DistributedPartyGate.py +++ b/toontown/safezone/DistributedPartyGate.py @@ -1,19 +1,17 @@ -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 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.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 direct.distributed import DistributedObject +from direct.directnotify import DirectNotifyGlobal +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 toontown.parties import PartyGlobals class DistributedPartyGate(DistributedObject.DistributedObject): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedPartyGate') diff --git a/toontown/safezone/DistributedPartyGateAI.py b/toontown/safezone/DistributedPartyGateAI.py index ad67c4c..9356651 100644 --- a/toontown/safezone/DistributedPartyGateAI.py +++ b/toontown/safezone/DistributedPartyGateAI.py @@ -1,6 +1,5 @@ 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 680726a..2a4cf5b 100644 --- a/toontown/safezone/DistributedPicnicBasket.py +++ b/toontown/safezone/DistributedPicnicBasket.py @@ -1,24 +1,22 @@ -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 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 class DistributedPicnicBasket(DistributedObject.DistributedObject): seatState = IntEnum('seatState', ('Empty', 'Full', 'Eating'), start=0) diff --git a/toontown/safezone/DistributedPicnicBasketAI.py b/toontown/safezone/DistributedPicnicBasketAI.py index 0a16a7c..5271060 100644 --- a/toontown/safezone/DistributedPicnicBasketAI.py +++ b/toontown/safezone/DistributedPicnicBasketAI.py @@ -1,20 +1,19 @@ -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 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 import ToontownGlobals 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.showbase import RandomNumGen +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 class DistributedPicnicBasketAI(DistributedObjectAI.DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedPicnicBasketAI') diff --git a/toontown/safezone/DistributedPicnicTable.py b/toontown/safezone/DistributedPicnicTable.py index 173d852..6ce7b0d 100644 --- a/toontown/safezone/DistributedPicnicTable.py +++ b/toontown/safezone/DistributedPicnicTable.py @@ -1,26 +1,23 @@ from panda3d.core import * from panda3d.otp import WhisperPopup - -from direct.distributed import DistributedNode from direct.distributed.ClockDelta import * -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 .GameMenu import GameMenu -from .GameTutorials import * +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 .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.showbase import PythonUtil +from otp.otpbase import OTPGlobals class DistributedPicnicTable(DistributedNode.DistributedNode): diff --git a/toontown/safezone/DistributedPicnicTableAI.py b/toontown/safezone/DistributedPicnicTableAI.py index b5b27ad..d218d1e 100644 --- a/toontown/safezone/DistributedPicnicTableAI.py +++ b/toontown/safezone/DistributedPicnicTableAI.py @@ -1,9 +1,11 @@ -from direct.distributed.ClockDelta import * from direct.distributed.DistributedNodeAI import DistributedNodeAI -from direct.fsm import ClassicFSM, State, StateData - -from toontown.safezone import DistributedCheckersAI, DistributedChineseCheckersAI, DistributedFindFourAI - +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 class DistributedPicnicTableAI(DistributedNodeAI): diff --git a/toontown/safezone/DistributedSZTreasure.py b/toontown/safezone/DistributedSZTreasure.py index 77d0937..1546c01 100644 --- a/toontown/safezone/DistributedSZTreasure.py +++ b/toontown/safezone/DistributedSZTreasure.py @@ -1,11 +1,7 @@ -from panda3d.core import VBase3, VBase4 - -from direct.interval.IntervalGlobal import Func, LerpColorScaleInterval, LerpScaleInterval, Sequence, Wait - -from toontown.toonbase import ToontownGlobals - from . import DistributedTreasure - +from panda3d.core import VBase3, VBase4 +from direct.interval.IntervalGlobal import Sequence, Wait, Func, LerpColorScaleInterval, LerpScaleInterval +from toontown.toonbase import ToontownGlobals class DistributedSZTreasure(DistributedTreasure.DistributedTreasure): diff --git a/toontown/safezone/DistributedSZTreasureAI.py b/toontown/safezone/DistributedSZTreasureAI.py index ef9f945..cf804fd 100644 --- a/toontown/safezone/DistributedSZTreasureAI.py +++ b/toontown/safezone/DistributedSZTreasureAI.py @@ -1,7 +1,5 @@ -from toontown.toonbase import ToontownGlobals - from . import DistributedTreasureAI - +from toontown.toonbase import ToontownGlobals class DistributedSZTreasureAI(DistributedTreasureAI.DistributedTreasureAI): diff --git a/toontown/safezone/DistributedTTTreasure.py b/toontown/safezone/DistributedTTTreasure.py index f4e3626..1b18acb 100644 --- a/toontown/safezone/DistributedTTTreasure.py +++ b/toontown/safezone/DistributedTTTreasure.py @@ -1,6 +1,5 @@ from . import DistributedSZTreasure - class DistributedTTTreasure(DistributedSZTreasure.DistributedSZTreasure): def __init__(self, cr): diff --git a/toontown/safezone/DistributedTTTreasureAI.py b/toontown/safezone/DistributedTTTreasureAI.py index fe3c1e2..ef096d4 100644 --- a/toontown/safezone/DistributedTTTreasureAI.py +++ b/toontown/safezone/DistributedTTTreasureAI.py @@ -1,6 +1,5 @@ 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 a49c93b..713c8b4 100644 --- a/toontown/safezone/DistributedTreasure.py +++ b/toontown/safezone/DistributedTreasure.py @@ -1,12 +1,9 @@ from panda3d.core import * -from panda3d.direct import HideInterval, ShowInterval - -from direct.directnotify import DirectNotifyGlobal -from direct.distributed import DistributedObject +from panda3d.direct import ShowInterval, HideInterval from direct.interval.IntervalGlobal import * - from toontown.toonbase.ToontownGlobals import * - +from direct.distributed import DistributedObject +from direct.directnotify import DirectNotifyGlobal class DistributedTreasure(DistributedObject.DistributedObject): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedTreasure') diff --git a/toontown/safezone/DistributedTreasureAI.py b/toontown/safezone/DistributedTreasureAI.py index 0e07075..6d230f3 100644 --- a/toontown/safezone/DistributedTreasureAI.py +++ b/toontown/safezone/DistributedTreasureAI.py @@ -1,8 +1,6 @@ -from direct.distributed import DistributedObjectAI -from direct.distributed.ClockDelta import * - from otp.ai.AIBase import * - +from direct.distributed.ClockDelta import * +from direct.distributed import DistributedObjectAI class DistributedTreasureAI(DistributedObjectAI.DistributedObjectAI): diff --git a/toontown/safezone/DistributedTrolley.py b/toontown/safezone/DistributedTrolley.py index fe87559..cc955a5 100644 --- a/toontown/safezone/DistributedTrolley.py +++ b/toontown/safezone/DistributedTrolley.py @@ -1,19 +1,17 @@ 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.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 direct.interval.IntervalGlobal import * from .TrolleyConstants 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 toontown.distributed import DelayDelete +from direct.task.Task import Task +from toontown.hood import ZoneUtil +from toontown.toontowngui import TeaserPanel class DistributedTrolley(DistributedObject.DistributedObject): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedTrolley') diff --git a/toontown/safezone/DistributedTrolleyAI.py b/toontown/safezone/DistributedTrolleyAI.py index c88ddb6..37d62a9 100644 --- a/toontown/safezone/DistributedTrolleyAI.py +++ b/toontown/safezone/DistributedTrolleyAI.py @@ -1,18 +1,17 @@ -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.minigame import MinigameCreatorAI, TrolleyHolidayMgrAI, TrolleyWeekendMgrAI -from toontown.quest import Quests -from toontown.toonbase import ToontownAccessAI 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.minigame import TrolleyWeekendMgrAI +from toontown.toonbase import ToontownAccessAI class DistributedTrolleyAI(DistributedObjectAI.DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedTrolleyAI') diff --git a/toontown/safezone/GSPlayground.py b/toontown/safezone/GSPlayground.py index d3f2f87..20f73c9 100644 --- a/toontown/safezone/GSPlayground.py +++ b/toontown/safezone/GSPlayground.py @@ -1,15 +1,12 @@ from panda3d.core import * - -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 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 class GSPlayground(Playground.Playground): diff --git a/toontown/safezone/GSSafeZoneLoader.py b/toontown/safezone/GSSafeZoneLoader.py index f175c8a..9df77d4 100644 --- a/toontown/safezone/GSSafeZoneLoader.py +++ b/toontown/safezone/GSSafeZoneLoader.py @@ -1,17 +1,14 @@ -import random - -from panda3d.core import * - from direct.directnotify import DirectNotifyGlobal from direct.fsm import ClassicFSM, State - -from toontown.effects.CarSmoke import CarSmoke +from direct.fsm import State +from panda3d.core import * from toontown.hood import ZoneUtil from toontown.launcher import DownloadForceAcknowledge -from toontown.safezone.GSPlayground import GSPlayground from toontown.safezone.SafeZoneLoader import SafeZoneLoader +from toontown.safezone.GSPlayground import GSPlayground +from toontown.effects.CarSmoke import CarSmoke from toontown.toonbase import ToontownGlobals - +import random if (__debug__): import pdb diff --git a/toontown/safezone/GZPlayground.py b/toontown/safezone/GZPlayground.py index 7f56037..5c1c3c6 100644 --- a/toontown/safezone/GZPlayground.py +++ b/toontown/safezone/GZPlayground.py @@ -1,16 +1,13 @@ from panda3d.core import * - -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 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 GolfKart class GZPlayground(Playground.Playground): diff --git a/toontown/safezone/GZSafeZoneLoader.py b/toontown/safezone/GZSafeZoneLoader.py index 8edc29e..2011fe8 100644 --- a/toontown/safezone/GZSafeZoneLoader.py +++ b/toontown/safezone/GZSafeZoneLoader.py @@ -1,17 +1,15 @@ -import random - -from panda3d.core import * - from direct.directnotify import DirectNotifyGlobal -from direct.fsm import ClassicFSM, State from direct.gui import DirectGui - +from direct.fsm import ClassicFSM, State +from direct.fsm import State +from panda3d.core import * from toontown.hood import ZoneUtil from toontown.launcher import DownloadForceAcknowledge -from toontown.safezone.GZPlayground import GZPlayground from toontown.safezone.SafeZoneLoader import SafeZoneLoader -from toontown.toonbase import ToontownGlobals, TTLocalizer - +from toontown.safezone.GZPlayground import GZPlayground +from toontown.toonbase import TTLocalizer +from toontown.toonbase import ToontownGlobals +import random if (__debug__): import pdb diff --git a/toontown/safezone/GameMenu.py b/toontown/safezone/GameMenu.py index 6315a01..fb57262 100644 --- a/toontown/safezone/GameMenu.py +++ b/toontown/safezone/GameMenu.py @@ -1,14 +1,11 @@ from panda3d.core import * - from direct.distributed.ClockDelta import * -from direct.gui.DirectGui import * -from direct.interval.IntervalGlobal import * from direct.task.Task import Task - -from toontown.toonbase import ToontownGlobals, TTLocalizer - +from direct.interval.IntervalGlobal import * from .TrolleyConstants import * - +from direct.gui.DirectGui import * +from toontown.toonbase import TTLocalizer +from toontown.toonbase import ToontownGlobals class GameMenu(DirectFrame): diff --git a/toontown/safezone/GameTutorials.py b/toontown/safezone/GameTutorials.py index 1865e8c..0ab80b5 100644 --- a/toontown/safezone/GameTutorials.py +++ b/toontown/safezone/GameTutorials.py @@ -1,13 +1,11 @@ -from panda3d.core import * - -from direct.directnotify import DirectNotifyGlobal -from direct.fsm import FSM 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.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 b8f53d2..7e8dc39 100644 --- a/toontown/safezone/GolfKart.py +++ b/toontown/safezone/GolfKart.py @@ -1,14 +1,15 @@ from panda3d.core import * - -from direct.fsm import ClassicFSM, State, StateData -from direct.gui.DirectGui import * -from direct.interval.IntervalGlobal import * -from direct.showbase import PythonUtil - -from toontown.toonbase import ToontownGlobals, TTLocalizer 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.showbase import PythonUtil class GolfKart(StateData.StateData): diff --git a/toontown/safezone/MMPlayground.py b/toontown/safezone/MMPlayground.py index 5600305..a2b9fb6 100644 --- a/toontown/safezone/MMPlayground.py +++ b/toontown/safezone/MMPlayground.py @@ -1,14 +1,9 @@ -import random - from panda3d.core import * - -from direct.actor import Actor -from direct.fsm import ClassicFSM, State - -from toontown.toonbase import ToontownGlobals - from . import Playground - +import random +from direct.fsm import ClassicFSM, State +from direct.actor import Actor +from toontown.toonbase import ToontownGlobals class MMPlayground(Playground.Playground): diff --git a/toontown/safezone/MMSafeZoneLoader.py b/toontown/safezone/MMSafeZoneLoader.py index 812aa02..8d9da0c 100644 --- a/toontown/safezone/MMSafeZoneLoader.py +++ b/toontown/safezone/MMSafeZoneLoader.py @@ -1,10 +1,8 @@ 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 b3feb5e..d1ec0e3 100644 --- a/toontown/safezone/MMTreasurePlannerAI.py +++ b/toontown/safezone/MMTreasurePlannerAI.py @@ -1,7 +1,5 @@ from toontown.toonbase.ToontownGlobals import * - -from . import DistributedMMTreasureAI, RegenTreasurePlannerAI - +from . import RegenTreasurePlannerAI, DistributedMMTreasureAI class MMTreasurePlannerAI(RegenTreasurePlannerAI.RegenTreasurePlannerAI): diff --git a/toontown/safezone/OZPlayground.py b/toontown/safezone/OZPlayground.py index ae7d338..3f85a90 100644 --- a/toontown/safezone/OZPlayground.py +++ b/toontown/safezone/OZPlayground.py @@ -1,17 +1,15 @@ from panda3d.core import * - -from direct.fsm import State -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 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 class OZPlayground(Playground.Playground): waterLevel = -0.53 diff --git a/toontown/safezone/OZSafeZoneLoader.py b/toontown/safezone/OZSafeZoneLoader.py index ac221d9..d4d6887 100644 --- a/toontown/safezone/OZSafeZoneLoader.py +++ b/toontown/safezone/OZSafeZoneLoader.py @@ -1,24 +1,21 @@ -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 direct.fsm import State +from panda3d.core 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.OZPlayground import OZPlayground 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 if (__debug__): import pdb diff --git a/toontown/safezone/OZTreasurePlannerAI.py b/toontown/safezone/OZTreasurePlannerAI.py index 3e5b4a4..3b34a3f 100644 --- a/toontown/safezone/OZTreasurePlannerAI.py +++ b/toontown/safezone/OZTreasurePlannerAI.py @@ -1,7 +1,5 @@ from toontown.toonbase.ToontownGlobals import * - -from . import DistributedOZTreasureAI, RegenTreasurePlannerAI - +from . import RegenTreasurePlannerAI, DistributedOZTreasureAI class OZTreasurePlannerAI(RegenTreasurePlannerAI.RegenTreasurePlannerAI): diff --git a/toontown/safezone/PicnicBasket.py b/toontown/safezone/PicnicBasket.py index 2ab3473..9034004 100644 --- a/toontown/safezone/PicnicBasket.py +++ b/toontown/safezone/PicnicBasket.py @@ -1,14 +1,15 @@ from panda3d.core import * - -from direct.fsm import ClassicFSM, State, StateData -from direct.gui.DirectGui import * -from direct.interval.IntervalGlobal import * -from direct.showbase import PythonUtil - -from toontown.toonbase import ToontownGlobals, TTLocalizer 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.showbase import PythonUtil class PicnicBasket(StateData.StateData): diff --git a/toontown/safezone/Playground.py b/toontown/safezone/Playground.py index 69de65d..5484176 100644 --- a/toontown/safezone/Playground.py +++ b/toontown/safezone/Playground.py @@ -17,7 +17,8 @@ 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, TTLocalizer +from toontown.toonbase import ToontownGlobals +from toontown.toonbase import 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 8b2fb75..03d8516 100644 --- a/toontown/safezone/PublicWalk.py +++ b/toontown/safezone/PublicWalk.py @@ -1,12 +1,8 @@ from panda3d.core import * - -from direct.directnotify import DirectNotifyGlobal - from toontown.toonbase.ToontownGlobals import * - +from direct.directnotify import DirectNotifyGlobal 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 4db6f8a..f7da0ca 100644 --- a/toontown/safezone/RegenTreasurePlannerAI.py +++ b/toontown/safezone/RegenTreasurePlannerAI.py @@ -1,13 +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 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 0e81103..94c6118 100644 --- a/toontown/safezone/SafeZoneLoader.py +++ b/toontown/safezone/SafeZoneLoader.py @@ -1,20 +1,21 @@ from panda3d.core import * - -from direct.directnotify import DirectNotifyGlobal -from direct.fsm import ClassicFSM, State, StateData -from direct.showbase import DirectObject -from direct.task import Task - -from toontown.building import ToonInterior +from toontown.toonbase.ToonBaseGlobal import * from toontown.distributed.ToontownMsgTypes import * -from toontown.hood import Place, QuietZoneState, ZoneUtil +from toontown.hood import ZoneUtil +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 toontown.launcher import DownloadForceAcknowledge from toontown.toon import HealthForceAcknowledge from toontown.toon.Toon import teleportDebug -from toontown.toonbase.ToonBaseGlobal import * -from toontown.toonbase.ToontownGlobals import * from toontown.tutorial import TutorialForceAcknowledge - +from toontown.toonbase.ToontownGlobals import * +from toontown.building import ToonInterior +from toontown.hood import QuietZoneState class SafeZoneLoader(StateData.StateData): notify = DirectNotifyGlobal.directNotify.newCategory('SafeZoneLoader') diff --git a/toontown/safezone/SafeZoneManager.py b/toontown/safezone/SafeZoneManager.py index 213ef10..1f32875 100644 --- a/toontown/safezone/SafeZoneManager.py +++ b/toontown/safezone/SafeZoneManager.py @@ -1,8 +1,6 @@ from panda3d.core import * - -from direct.directnotify import DirectNotifyGlobal from direct.distributed import DistributedObject - +from direct.directnotify import DirectNotifyGlobal class SafeZoneManager(DistributedObject.DistributedObject): notify = DirectNotifyGlobal.directNotify.newCategory('SafeZoneManager') diff --git a/toontown/safezone/TTPlayground.py b/toontown/safezone/TTPlayground.py index fc3f147..236201f 100644 --- a/toontown/safezone/TTPlayground.py +++ b/toontown/safezone/TTPlayground.py @@ -1,15 +1,10 @@ -import random - 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 - +import random +from toontown.launcher import DownloadForceAcknowledge +from direct.task.Task import Task +from toontown.hood import ZoneUtil class TTPlayground(Playground.Playground): diff --git a/toontown/safezone/TTSafeZoneLoader.py b/toontown/safezone/TTSafeZoneLoader.py index 7f5f568..e9919ca 100644 --- a/toontown/safezone/TTSafeZoneLoader.py +++ b/toontown/safezone/TTSafeZoneLoader.py @@ -1,12 +1,9 @@ -import random - from panda3d.core import * - +from . import SafeZoneLoader +from . import TTPlayground +import random 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 6dc2dbb..ad129ce 100644 --- a/toontown/safezone/TTTreasurePlannerAI.py +++ b/toontown/safezone/TTTreasurePlannerAI.py @@ -1,7 +1,5 @@ from toontown.toonbase.ToontownGlobals import * - -from . import DistributedTTTreasureAI, RegenTreasurePlannerAI - +from . import RegenTreasurePlannerAI, DistributedTTTreasureAI class TTTreasurePlannerAI(RegenTreasurePlannerAI.RegenTreasurePlannerAI): diff --git a/toontown/safezone/Train.py b/toontown/safezone/Train.py index 2ab94a9..a82b23f 100644 --- a/toontown/safezone/Train.py +++ b/toontown/safezone/Train.py @@ -1,18 +1,16 @@ -import random - 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.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 direct.actor import Actor class Train(DirectObject): notify = directNotify.newCategory('Train') diff --git a/toontown/safezone/TreasurePlannerAI.py b/toontown/safezone/TreasurePlannerAI.py index 14b84aa..5437790 100644 --- a/toontown/safezone/TreasurePlannerAI.py +++ b/toontown/safezone/TreasurePlannerAI.py @@ -1,10 +1,8 @@ -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 59875c5..e5671ef 100644 --- a/toontown/safezone/Walk.py +++ b/toontown/safezone/Walk.py @@ -1,9 +1,9 @@ from panda3d.core import * - -from direct.directnotify import DirectNotifyGlobal -from direct.fsm import ClassicFSM, State, StateData 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 class Walk(StateData.StateData): notify = DirectNotifyGlobal.directNotify.newCategory('Walk') diff --git a/toontown/shtiker/DeleteManager.py b/toontown/shtiker/DeleteManager.py index 5de25c9..81f579c 100644 --- a/toontown/shtiker/DeleteManager.py +++ b/toontown/shtiker/DeleteManager.py @@ -1,8 +1,6 @@ from panda3d.core import * - -from direct.directnotify import DirectNotifyGlobal from direct.distributed import DistributedObject - +from direct.directnotify import DirectNotifyGlobal class DeleteManager(DistributedObject.DistributedObject): notify = DirectNotifyGlobal.directNotify.newCategory('DeleteManager') diff --git a/toontown/shtiker/DeleteManagerAI.py b/toontown/shtiker/DeleteManagerAI.py index 55317e3..308da54 100644 --- a/toontown/shtiker/DeleteManagerAI.py +++ b/toontown/shtiker/DeleteManagerAI.py @@ -1,6 +1,5 @@ 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 bffbfd2..9106083 100644 --- a/toontown/shtiker/DirectNewsFrame.py +++ b/toontown/shtiker/DirectNewsFrame.py @@ -1,18 +1,16 @@ +import os import datetime import functools -import os - -from panda3d.core import (ConfigVariableBool, ConfigVariableString, DocumentSpec, DSearchPath, Filename, HTTPClient, - Ramfile) - +from panda3d.core import Filename, DSearchPath, ConfigVariableString, ConfigVariableBool +from panda3d.core import HTTPClient, Ramfile, DocumentSpec +from direct.showbase import DirectObject +from direct.gui.DirectGui import DirectFrame, DGG from direct.directnotify import DirectNotifyGlobal -from direct.gui.DirectGui import DGG, DirectFrame -from direct.showbase import AppRunnerGlobal, DirectObject - -from toontown.shtiker import IssueFrame, IssueFrameV2 +from direct.showbase import AppRunnerGlobal +from toontown.shtiker import IssueFrame +from toontown.shtiker import 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 8e3f80e..c8a591f 100644 --- a/toontown/shtiker/DisguisePage.py +++ b/toontown/shtiker/DisguisePage.py @@ -1,15 +1,12 @@ -from panda3d.core import * - -from direct.gui.DirectGui import * - -from toontown.battle import SuitBattleGlobals -from toontown.coghq import CogDisguiseGlobals -from toontown.minigame import MinigamePowerMeter -from toontown.suit import SuitDNA -from toontown.toonbase import ToontownGlobals, TTLocalizer - 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 toontown.battle import SuitBattleGlobals +from toontown.minigame import MinigamePowerMeter +from toontown.coghq import CogDisguiseGlobals 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 b1f6b5b..0577e6f 100644 --- a/toontown/shtiker/DisplaySettingsDialog.py +++ b/toontown/shtiker/DisplaySettingsDialog.py @@ -1,14 +1,12 @@ -from panda3d.core import * - -from direct.directnotify import DirectNotifyGlobal -from direct.fsm import StateData from direct.gui.DirectGui import * +from panda3d.core import * from direct.task.Task import Task - -from toontown.toonbase import ToontownGlobals, TTLocalizer -from toontown.toonbase.DisplayOptions import DisplayOptions +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 toontown.toonbase.DisplayOptions import DisplayOptions class DisplaySettingsDialog(DirectFrame, StateData.StateData): ApplyTimeoutSeconds = 15 diff --git a/toontown/shtiker/EventsPage.py b/toontown/shtiker/EventsPage.py index 8c353be..b95da74 100644 --- a/toontown/shtiker/EventsPage.py +++ b/toontown/shtiker/EventsPage.py @@ -1,26 +1,20 @@ import urllib.request - -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 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 direct.directnotify import DirectNotifyGlobal from otp.otpbase import OTPLocalizer - -from toontown.parties import PartyGlobals, PartyUtils -from toontown.parties.CalendarGuiMonth import CalendarGuiMonth -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.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.CalendarGuiMonth import CalendarGuiMonth +from toontown.parties.PartyUtils import getPartyActivityIcon +from toontown.parties.Party import Party +from toontown.parties.ServerTimeGui import ServerTimeGui 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 3eae0bb..7af5c01 100644 --- a/toontown/shtiker/FishPage.py +++ b/toontown/shtiker/FishPage.py @@ -1,13 +1,12 @@ -from panda3d.core import * - +from toontown.toonbase import ToontownGlobals +from . import ShtikerPage from direct.directnotify import DirectNotifyGlobal from direct.gui.DirectGui import * - -from toontown.fishing import FishBrowser, FishGlobals, FishPicker -from toontown.toonbase import ToontownGlobals, TTLocalizer - -from . import ShtikerPage - +from panda3d.core import * +from toontown.toonbase import TTLocalizer +from toontown.fishing import FishPicker +from toontown.fishing import FishBrowser +from toontown.fishing import FishGlobals FishPage_Tank = 0 FishPage_Collection = 1 FishPage_Trophy = 2 diff --git a/toontown/shtiker/GardenPage.py b/toontown/shtiker/GardenPage.py index 9700a1a..0bc586e 100644 --- a/toontown/shtiker/GardenPage.py +++ b/toontown/shtiker/GardenPage.py @@ -1,14 +1,13 @@ -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.toontowngui import TTDialog - from . import ShtikerPage - +from direct.gui.DirectGui import * +from panda3d.core import * +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 GardenPage_Basket = 0 GardenPage_Collection = 1 GardenPage_Trophy = 2 diff --git a/toontown/shtiker/GolfPage.py b/toontown/shtiker/GolfPage.py index 430bb99..dc7a07b 100644 --- a/toontown/shtiker/GolfPage.py +++ b/toontown/shtiker/GolfPage.py @@ -1,18 +1,13 @@ -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 2cf4d82..57e5283 100644 --- a/toontown/shtiker/HtmlView.py +++ b/toontown/shtiker/HtmlView.py @@ -1,14 +1,18 @@ -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 * +import array, sys 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 c8be60b..154d1af 100644 --- a/toontown/shtiker/InGameNewsFrame.py +++ b/toontown/shtiker/InGameNewsFrame.py @@ -1,8 +1,6 @@ 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 4d5637a..a494fa1 100644 --- a/toontown/shtiker/InventoryPage.py +++ b/toontown/shtiker/InventoryPage.py @@ -1,11 +1,9 @@ -from panda3d.core import * - -from direct.gui.DirectGui import * - -from toontown.toonbase import ToontownBattleGlobals, ToontownGlobals, TTLocalizer - 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 class InventoryPage(ShtikerPage.ShtikerPage): diff --git a/toontown/shtiker/IssueFrame.py b/toontown/shtiker/IssueFrame.py index 9550d6f..cd2c25e 100644 --- a/toontown/shtiker/IssueFrame.py +++ b/toontown/shtiker/IssueFrame.py @@ -1,14 +1,13 @@ import os - -from panda3d.core import (CardMaker, DSearchPath, Filename, NodePath, PNMImage, Point2, Texture, TextureStage, - VirtualFileSystem) - -from direct.directnotify import DirectNotifyGlobal -from direct.gui.DirectGui import DGG, DirectButton, DirectFrame, DirectLabel +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 toontown.toonbase import ToontownGlobals, TTLocalizer - +from direct.gui.DirectGui import DirectFrame, DirectButton, DGG, DirectLabel +from direct.directnotify import DirectNotifyGlobal +from toontown.toonbase import TTLocalizer +from toontown.toonbase import ToontownGlobals WEB_WIDTH_PIXELS = 784 WEB_HEIGHT_PIXELS = 451 WEB_WIDTH = 1024 diff --git a/toontown/shtiker/IssueFrameV2.py b/toontown/shtiker/IssueFrameV2.py index cf59e8e..0355372 100644 --- a/toontown/shtiker/IssueFrameV2.py +++ b/toontown/shtiker/IssueFrameV2.py @@ -1,11 +1,8 @@ from panda3d.core import Filename - from direct.directnotify import DirectNotifyGlobal -from direct.gui.DirectGui import DGG, DirectButton, DirectFrame - +from direct.gui.DirectGui import DGG, DirectFrame, DirectButton 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 4718588..dc79e5c 100644 --- a/toontown/shtiker/KartPage.py +++ b/toontown/shtiker/KartPage.py @@ -1,20 +1,15 @@ -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 import RaceGlobals -from toontown.racing.Kart import Kart from toontown.racing.KartDNA import * +from toontown.racing.Kart import Kart +from toontown.racing import RaceGlobals from toontown.shtiker.ShtikerPage import ShtikerPage from toontown.toonbase import ToontownGlobals, TTLocalizer - from .FishPage import FishingTrophy - +from enum import IntEnum if (__debug__): import pdb PageMode = IntEnum('PageMode', ('Customize', 'Records', 'Trophy'), start=0) diff --git a/toontown/shtiker/MapPage.py b/toontown/shtiker/MapPage.py index ba249d5..26673bf 100644 --- a/toontown/shtiker/MapPage.py +++ b/toontown/shtiker/MapPage.py @@ -1,15 +1,11 @@ -from panda3d.core import * - -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 - +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 class MapPage(ShtikerPage.ShtikerPage): diff --git a/toontown/shtiker/NPCFriendPage.py b/toontown/shtiker/NPCFriendPage.py index 938e9e5..a6d5b52 100644 --- a/toontown/shtiker/NPCFriendPage.py +++ b/toontown/shtiker/NPCFriendPage.py @@ -1,13 +1,9 @@ -from panda3d.core import * - +from . import ShtikerPage from direct.gui.DirectGui import * - +from panda3d.core 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 41cbaa9..94a9a01 100644 --- a/toontown/shtiker/NewbiePurchaseManager.py +++ b/toontown/shtiker/NewbiePurchaseManager.py @@ -1,9 +1,7 @@ +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 37a2963..bab8ac3 100644 --- a/toontown/shtiker/NewbiePurchaseManagerAI.py +++ b/toontown/shtiker/NewbiePurchaseManagerAI.py @@ -1,6 +1,5 @@ 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 6a04feb..5e5bfff 100644 --- a/toontown/shtiker/NewsPage.py +++ b/toontown/shtiker/NewsPage.py @@ -1,10 +1,11 @@ -from direct.directnotify import DirectNotifyGlobal from direct.fsm import StateData -from direct.gui.DirectGui import DGG, DirectFrame, DirectLabel - +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 toontown.shtiker import ShtikerPage -from toontown.toonbase import ToontownGlobals, TTLocalizer - +from toontown.toonbase import 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 ae7f9c3..a5789d3 100644 --- a/toontown/shtiker/OptionsPage.py +++ b/toontown/shtiker/OptionsPage.py @@ -1,18 +1,15 @@ -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 . import ShtikerPage from toontown.toontowngui import TTDialog - -from . import DisplaySettingsDialog, ShtikerPage - +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 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 a5e2fff..2e93625 100644 --- a/toontown/shtiker/PhotoAlbumPage.py +++ b/toontown/shtiker/PhotoAlbumPage.py @@ -1,13 +1,10 @@ -import os - from panda3d.core import * - -from direct.gui.DirectGui import * - -from toontown.toonbase import ToontownGlobals, TTLocalizer - from . import ShtikerPage - +from direct.gui.DirectGui import * +from panda3d.core import * +from toontown.toonbase import TTLocalizer +import os +from toontown.toonbase import ToontownGlobals class PhotoAlbumPage(ShtikerPage.ShtikerPage): diff --git a/toontown/shtiker/PurchaseManager.py b/toontown/shtiker/PurchaseManager.py index 61732c8..455ef85 100644 --- a/toontown/shtiker/PurchaseManager.py +++ b/toontown/shtiker/PurchaseManager.py @@ -1,13 +1,9 @@ from panda3d.core import * - -from direct.directnotify import DirectNotifyGlobal -from direct.distributed import DistributedObject -from direct.distributed.ClockDelta import * - -from toontown.minigame import TravelGameGlobals - from .PurchaseManagerConstants import * - +from direct.distributed.ClockDelta import * +from direct.distributed import DistributedObject +from direct.directnotify import DirectNotifyGlobal +from toontown.minigame import TravelGameGlobals class PurchaseManager(DistributedObject.DistributedObject): notify = DirectNotifyGlobal.directNotify.newCategory('PurchaseManager') diff --git a/toontown/shtiker/PurchaseManagerAI.py b/toontown/shtiker/PurchaseManagerAI.py index 9c7c914..78f631d 100644 --- a/toontown/shtiker/PurchaseManagerAI.py +++ b/toontown/shtiker/PurchaseManagerAI.py @@ -1,19 +1,14 @@ -import copy - -from panda3d.core import * - -from direct.directnotify import DirectNotifyGlobal -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 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 direct.directnotify import DirectNotifyGlobal +from toontown.minigame import TravelGameGlobals +from toontown.toonbase import ToontownGlobals +from toontown.minigame import MinigameGlobals class PurchaseManagerAI(DistributedObjectAI.DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('PurchaseManagerAI') diff --git a/toontown/shtiker/QuestPage.py b/toontown/shtiker/QuestPage.py index ece04e7..a306a07 100644 --- a/toontown/shtiker/QuestPage.py +++ b/toontown/shtiker/QuestPage.py @@ -1,15 +1,14 @@ from panda3d.core import * - -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 - +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 class QuestPage(ShtikerPage.ShtikerPage): notify = DirectNotifyGlobal.directNotify.newCategory('QuestPage') diff --git a/toontown/shtiker/ShardPage.py b/toontown/shtiker/ShardPage.py index 247d8f8..ebcc726 100644 --- a/toontown/shtiker/ShardPage.py +++ b/toontown/shtiker/ShardPage.py @@ -1,18 +1,15 @@ -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 - +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 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 82c1c24..d4e2c75 100644 --- a/toontown/shtiker/ShtikerBook.py +++ b/toontown/shtiker/ShtikerBook.py @@ -1,15 +1,14 @@ from panda3d.core import * from panda3d.otp import * - -from direct.directnotify import DirectNotifyGlobal +from toontown.toonbase import ToontownGlobals +from direct.showbase import DirectObject from direct.fsm import StateData from direct.gui.DirectGui import * -from direct.showbase import DirectObject - +from panda3d.core import * +from toontown.toonbase import TTLocalizer from toontown.effects import DistributedFireworkShow from toontown.parties import DistributedPartyFireworksActivity -from toontown.toonbase import ToontownGlobals, TTLocalizer - +from direct.directnotify import DirectNotifyGlobal class ShtikerBook(DirectFrame, StateData.StateData): notify = DirectNotifyGlobal.directNotify.newCategory('ShtikerBook') diff --git a/toontown/shtiker/ShtikerPage.py b/toontown/shtiker/ShtikerPage.py index 088f751..8e7c022 100644 --- a/toontown/shtiker/ShtikerPage.py +++ b/toontown/shtiker/ShtikerPage.py @@ -1,10 +1,7 @@ -from panda3d.core import * - +from . import ShtikerBook from direct.fsm import StateData from direct.gui.DirectGui import * - -from . import ShtikerBook - +from panda3d.core import * class ShtikerPage(DirectFrame, StateData.StateData): diff --git a/toontown/shtiker/SuitPage.py b/toontown/shtiker/SuitPage.py index e237ead..852dbc1 100644 --- a/toontown/shtiker/SuitPage.py +++ b/toontown/shtiker/SuitPage.py @@ -1,15 +1,14 @@ -from panda3d.core import * - -from direct.gui.DirectGui import * +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 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 671d838..1a7a279 100644 --- a/toontown/shtiker/SummonCogDialog.py +++ b/toontown/shtiker/SummonCogDialog.py @@ -1,15 +1,14 @@ +from direct.gui.DirectGui import * from panda3d.core import * - from direct.directnotify import DirectNotifyGlobal from direct.fsm import StateData -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.toonbase import TTLocalizer from toontown.toontowngui import TTDialog - +from toontown.toonbase import ToontownGlobals +from toontown.suit import SuitDNA +from toontown.suit import Suit +from toontown.battle import SuitBattleGlobals +from toontown.toon import NPCToons TTL = TTLocalizer class SummonCogDialog(DirectFrame, StateData.StateData): diff --git a/toontown/shtiker/TIPPage.py b/toontown/shtiker/TIPPage.py index 6240dbd..c231d28 100644 --- a/toontown/shtiker/TIPPage.py +++ b/toontown/shtiker/TIPPage.py @@ -1,13 +1,11 @@ from panda3d.core import * - -from direct.gui.DirectGui import * - -from toontown.hood import ZoneUtil -from toontown.toon import NPCToons -from toontown.toonbase import ToontownGlobals, TTLocalizer - 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 class TIPPage(ShtikerPage.ShtikerPage): diff --git a/toontown/shtiker/TrackPage.py b/toontown/shtiker/TrackPage.py index b90d844..030909a 100644 --- a/toontown/shtiker/TrackPage.py +++ b/toontown/shtiker/TrackPage.py @@ -1,13 +1,12 @@ from panda3d.core import * - -from direct.gui.DirectGui import * - -from toontown.quest import Quests -from toontown.toon import Toon -from toontown.toonbase import ToontownBattleGlobals, ToontownGlobals, TTLocalizer - 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 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 ab1f4fa..fbdd8df 100644 --- a/toontown/speedchat/TTSCAprilToonsMenu.py +++ b/toontown/speedchat/TTSCAprilToonsMenu.py @@ -1,10 +1,8 @@ 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 c81552f..a3846e5 100644 --- a/toontown/speedchat/TTSCBoardingMenu.py +++ b/toontown/speedchat/TTSCBoardingMenu.py @@ -1,10 +1,8 @@ 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 c54ac75..12ce194 100644 --- a/toontown/speedchat/TTSCCogMenu.py +++ b/toontown/speedchat/TTSCCogMenu.py @@ -1,7 +1,6 @@ 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 f670cc3..8180c4c 100644 --- a/toontown/speedchat/TTSCDecoders.py +++ b/toontown/speedchat/TTSCDecoders.py @@ -1,2 +1,2 @@ -from .TTSCResistanceTerminal import decodeTTSCResistanceMsg from .TTSCToontaskTerminal import decodeTTSCToontaskMsg +from .TTSCResistanceTerminal import decodeTTSCResistanceMsg diff --git a/toontown/speedchat/TTSCFactoryMenu.py b/toontown/speedchat/TTSCFactoryMenu.py index df1b72e..6f1f749 100644 --- a/toontown/speedchat/TTSCFactoryMenu.py +++ b/toontown/speedchat/TTSCFactoryMenu.py @@ -1,8 +1,7 @@ -from otp.otpbase import OTPLocalizer -from otp.speedchat import SCMenuHolder from otp.speedchat.SCMenu import SCMenu +from otp.speedchat import SCMenuHolder from otp.speedchat.SCStaticTextTerminal import SCStaticTextTerminal - +from otp.otpbase import OTPLocalizer ZoneToMsgs = {3: [1803, 1903], 4: [1804, 1904], 5: [1805, 1905], diff --git a/toontown/speedchat/TTSCGolfMenu.py b/toontown/speedchat/TTSCGolfMenu.py index 453cdf9..7f8cd0f 100644 --- a/toontown/speedchat/TTSCGolfMenu.py +++ b/toontown/speedchat/TTSCGolfMenu.py @@ -1,10 +1,8 @@ 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 b0c6382..ea34848 100644 --- a/toontown/speedchat/TTSCHalloweenMenu.py +++ b/toontown/speedchat/TTSCHalloweenMenu.py @@ -1,10 +1,8 @@ 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 3549faf..8abb43a 100644 --- a/toontown/speedchat/TTSCIdesOfMarchMenu.py +++ b/toontown/speedchat/TTSCIdesOfMarchMenu.py @@ -1,10 +1,8 @@ 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 060de2c..318041b 100644 --- a/toontown/speedchat/TTSCIndexedTerminal.py +++ b/toontown/speedchat/TTSCIndexedTerminal.py @@ -1,6 +1,5 @@ -from otp.otpbase.OTPLocalizer import SpeedChatStaticText from otp.speedchat.SCTerminal import * - +from otp.otpbase.OTPLocalizer import SpeedChatStaticText TTSCIndexedMsgEvent = 'SCIndexedMsg' def decodeTTSCIndexedMsg(msgIndex): diff --git a/toontown/speedchat/TTSCJellybeanJamMenu.py b/toontown/speedchat/TTSCJellybeanJamMenu.py index fec06c4..c79e4e8 100644 --- a/toontown/speedchat/TTSCJellybeanJamMenu.py +++ b/toontown/speedchat/TTSCJellybeanJamMenu.py @@ -1,10 +1,8 @@ -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 1a26013..40deea5 100644 --- a/toontown/speedchat/TTSCKartRacingMenu.py +++ b/toontown/speedchat/TTSCKartRacingMenu.py @@ -1,10 +1,8 @@ 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 c40bef4..5830e91 100644 --- a/toontown/speedchat/TTSCPetTrickMenu.py +++ b/toontown/speedchat/TTSCPetTrickMenu.py @@ -1,13 +1,10 @@ from direct.directnotify import DirectNotifyGlobal - -from otp.otpbase import OTPLocalizer -from otp.speedchat import SCMenuHolder from otp.speedchat.SCMenu import SCMenu +from otp.speedchat import SCMenuHolder from otp.speedchat.SCStaticTextTerminal import SCStaticTextTerminal - +from otp.otpbase import OTPLocalizer 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 d93555e..78541c4 100644 --- a/toontown/speedchat/TTSCPromotionalMenu.py +++ b/toontown/speedchat/TTSCPromotionalMenu.py @@ -1,12 +1,9 @@ from direct.directnotify import DirectNotifyGlobal - -from otp.otpbase import OTPLocalizer -from otp.speedchat import SCMenuHolder from otp.speedchat.SCMenu import SCMenu +from otp.speedchat import SCMenuHolder from otp.speedchat.SCStaticTextTerminal import SCStaticTextTerminal - +from otp.otpbase import OTPLocalizer 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 4cd8a49..d68b273 100644 --- a/toontown/speedchat/TTSCResistanceMenu.py +++ b/toontown/speedchat/TTSCResistanceMenu.py @@ -1,13 +1,9 @@ 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 8c38132..6e75cd5 100644 --- a/toontown/speedchat/TTSCResistanceTerminal.py +++ b/toontown/speedchat/TTSCResistanceTerminal.py @@ -1,7 +1,5 @@ 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 ef0a49b..3a4d527 100644 --- a/toontown/speedchat/TTSCSellbotFieldOfficeMenu.py +++ b/toontown/speedchat/TTSCSellbotFieldOfficeMenu.py @@ -1,13 +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 toontown.cogdominium import CogdoInterior from toontown.speedchat.TTSCIndexedTerminal import TTSCIndexedTerminal - +from otp.otpbase import OTPLocalizer +from toontown.cogdominium import CogdoInterior 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 cd8c700..def6bc2 100644 --- a/toontown/speedchat/TTSCSellbotInvasionMenu.py +++ b/toontown/speedchat/TTSCSellbotInvasionMenu.py @@ -1,12 +1,9 @@ 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 1e5ce20..7a81491 100644 --- a/toontown/speedchat/TTSCSellbotNerfMenu.py +++ b/toontown/speedchat/TTSCSellbotNerfMenu.py @@ -1,10 +1,8 @@ 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 dd44c87..957d4fc 100644 --- a/toontown/speedchat/TTSCSillyPhaseFiveMenu.py +++ b/toontown/speedchat/TTSCSillyPhaseFiveMenu.py @@ -1,10 +1,8 @@ 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 b7bd71f..c4de52f 100644 --- a/toontown/speedchat/TTSCSillyPhaseFourMenu.py +++ b/toontown/speedchat/TTSCSillyPhaseFourMenu.py @@ -1,10 +1,8 @@ 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 d48dc0f..e12d81d 100644 --- a/toontown/speedchat/TTSCSillyPhaseOneMenu.py +++ b/toontown/speedchat/TTSCSillyPhaseOneMenu.py @@ -1,10 +1,8 @@ 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 0caee01..2993720 100644 --- a/toontown/speedchat/TTSCSillyPhaseThreeMenu.py +++ b/toontown/speedchat/TTSCSillyPhaseThreeMenu.py @@ -1,10 +1,8 @@ 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 ed92373..9a7fb4e 100644 --- a/toontown/speedchat/TTSCSillyPhaseTwoMenu.py +++ b/toontown/speedchat/TTSCSillyPhaseTwoMenu.py @@ -1,10 +1,8 @@ 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 48af438..99a59c0 100644 --- a/toontown/speedchat/TTSCSingingMenu.py +++ b/toontown/speedchat/TTSCSingingMenu.py @@ -1,11 +1,8 @@ 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 abf18cd..74184ad 100644 --- a/toontown/speedchat/TTSCSingingTerminal.py +++ b/toontown/speedchat/TTSCSingingTerminal.py @@ -1,6 +1,5 @@ -from otp.otpbase.OTPLocalizer import SpeedChatStaticText from otp.speedchat.SCTerminal import SCTerminal - +from otp.otpbase.OTPLocalizer import SpeedChatStaticText TTSCSingingMsgEvent = 'SCSingingMsg' def decodeSCStaticTextMsg(textId): diff --git a/toontown/speedchat/TTSCToontaskMenu.py b/toontown/speedchat/TTSCToontaskMenu.py index 019f2fd..24829b4 100644 --- a/toontown/speedchat/TTSCToontaskMenu.py +++ b/toontown/speedchat/TTSCToontaskMenu.py @@ -1,10 +1,7 @@ from otp.speedchat.SCMenu import SCMenu -from otp.speedchat.SCStaticTextTerminal import SCStaticTextTerminal - -from toontown.quest import Quests - from .TTSCToontaskTerminal import TTSCToontaskTerminal - +from otp.speedchat.SCStaticTextTerminal import SCStaticTextTerminal +from toontown.quest import Quests class TTSCToontaskMenu(SCMenu): diff --git a/toontown/speedchat/TTSCToontaskTerminal.py b/toontown/speedchat/TTSCToontaskTerminal.py index 9cf39bd..755e0c3 100644 --- a/toontown/speedchat/TTSCToontaskTerminal.py +++ b/toontown/speedchat/TTSCToontaskTerminal.py @@ -1,8 +1,6 @@ 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 69564f4..362af7e 100644 --- a/toontown/speedchat/TTSCVictoryPartiesMenu.py +++ b/toontown/speedchat/TTSCVictoryPartiesMenu.py @@ -1,13 +1,10 @@ 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 a929d7a..53578d3 100644 --- a/toontown/speedchat/TTSCWinterMenu.py +++ b/toontown/speedchat/TTSCWinterMenu.py @@ -1,12 +1,9 @@ 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 02c60a8..58780d8 100644 --- a/toontown/speedchat/TTSpeedChatGlobals.py +++ b/toontown/speedchat/TTSpeedChatGlobals.py @@ -1,2 +1,2 @@ -from .TTSCResistanceTerminal import TTSCResistanceMsgEvent from .TTSCToontaskTerminal import TTSCToontaskMsgEvent +from .TTSCResistanceTerminal import TTSCResistanceMsgEvent diff --git a/toontown/speedchat/TTSpeedChatTypes.py b/toontown/speedchat/TTSpeedChatTypes.py index 94eafd8..c2a24dd 100644 --- a/toontown/speedchat/TTSpeedChatTypes.py +++ b/toontown/speedchat/TTSpeedChatTypes.py @@ -1,29 +1,27 @@ -from .TTSCCogMenu import TTSCCogMenu -from .TTSCFactoryMenu import TTSCFactoryMenu from .TTSCToontaskMenu import TTSCToontaskMenu - +from .TTSCFactoryMenu import TTSCFactoryMenu +from .TTSCCogMenu import TTSCCogMenu 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 .TTSCSellbotFieldOfficeMenu import TTSCSellbotFieldOfficeMenu -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 .TTSCKartRacingMenu import TTSCKartRacingMenu +from .TTSCGolfMenu import TTSCGolfMenu +from .TTSCBoardingMenu import TTSCBoardingMenu from .TTSCSingingMenu import TTSCSingingMenu -from .TTSCToontaskTerminal import TTSCToontaskTerminal +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 diff --git a/toontown/spellbook/MagicWordIndex.py b/toontown/spellbook/MagicWordIndex.py index 8e6f828..543e02b 100644 --- a/toontown/spellbook/MagicWordIndex.py +++ b/toontown/spellbook/MagicWordIndex.py @@ -9,24 +9,21 @@ # Email: belloqzafarian@gmail.com ################################################## -import collections -import json -import random -import re -import time -import types - -from panda3d.otp import NametagGroup, WhisperPopup +import collections, types from direct.distributed.ClockDelta import * from direct.interval.IntervalGlobal import * from direct.showbase.DirectObject import DirectObject from direct.showbase.PythonUtil import * -from otp.otpbase import OTPGlobals, OTPLocalizer +from panda3d.otp import NametagGroup, WhisperPopup + +from otp.otpbase import OTPLocalizer +from otp.otpbase import OTPGlobals from otp.otpbase.PythonUtil import * from . import MagicWordConfig +import time, random, re, json magicWordIndex = collections.OrderedDict() @@ -251,10 +248,10 @@ class MaxToon(MagicWord): accessLevel = 'ADMIN' def handleWord(self, invoker, avId, toon, *args): - from toontown.coghq import CogDisguiseGlobals + from toontown.toonbase import ToontownGlobals from toontown.quest import Quests from toontown.suit import SuitDNA - from toontown.toonbase import ToontownGlobals + from toontown.coghq import CogDisguiseGlobals # TODO: Handle this better, like giving out all awards, set the quest tier, stuff like that. # This is mainly copied from Anesidora just so I can better work on things. @@ -285,7 +282,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'] @@ -317,8 +314,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." @@ -327,7 +324,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"] @@ -352,7 +349,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." @@ -369,7 +366,7 @@ class AbortGolfCourse(MagicWord): break if not course: return "You aren't in a golf course!" - + course.setCourseAbort() return "Aborted golf course." @@ -385,9 +382,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] @@ -395,7 +392,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" @@ -405,7 +402,7 @@ class Minigame(MagicWord): else: # Request by default command = "request" - + isTeleport = command in ('teleport', 'tp') isRequest = command in ('request', 'next') @@ -437,7 +434,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: @@ -449,7 +446,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): @@ -484,7 +481,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] @@ -518,7 +515,7 @@ class BossBattle(MagicWord): start = int(args[1]) except ValueError: start = 1 - + from toontown.suit.DistributedBossCogAI import AllBossCogs boss = None for bc in AllBossCogs: @@ -543,7 +540,7 @@ class BossBattle(MagicWord): boss = DistributedBossbotBossAI(self.air) else: return f"Unknown boss type: \"{type}\"" - + zoneId = self.air.allocateZone() boss.generateWithRequired(zoneId) if start: @@ -551,7 +548,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" @@ -559,7 +556,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', @@ -570,7 +567,7 @@ class BossBattle(MagicWord): if not AllBossCogs: return "No ongoing boss battles." - + respText = "\nBoss Battles:" if type: @@ -586,7 +583,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: @@ -595,10 +592,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] @@ -656,7 +653,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." @@ -685,7 +682,7 @@ class Teleport(MagicWord): 'cbhq': ToontownGlobals.CashbotHQ, 'lbhq': ToontownGlobals.LawbotHQ, 'bbhq': ToontownGlobals.BossbotHQ} - + try: zone = zoneName2Id[zoneName] except KeyError: @@ -701,7 +698,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." @@ -710,7 +707,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." @@ -720,7 +717,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." @@ -733,11 +730,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." @@ -752,7 +749,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." @@ -775,8 +772,8 @@ class Fireworks(MagicWord): name = args[0] hood = args[1] - from toontown.parties import PartyGlobals from toontown.toonbase import ToontownGlobals + from toontown.parties import PartyGlobals name2showId = { 'newyear': ToontownGlobals.NEWYEARS_FIREWORKS, 'newyears': ToontownGlobals.NEWYEARS_FIREWORKS, @@ -799,7 +796,7 @@ class Fireworks(MagicWord): ToontownGlobals.GoofySpeedway : 0, ToontownGlobals.DonaldsDreamland : 2 } - + from toontown.hood import ZoneUtil zones = [] if not hood: @@ -808,7 +805,7 @@ class Fireworks(MagicWord): zones = zoneToStyleDict.keys() else: return "Missing hood argument." - + # Generate our firework shows from toontown.effects.DistributedFireworkShowAI import DistributedFireworkShowAI count = 0 @@ -819,9 +816,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 a7325d7..d8a6c2f 100644 --- a/toontown/spellbook/ToontownMagicWordManager.py +++ b/toontown/spellbook/ToontownMagicWordManager.py @@ -9,15 +9,10 @@ # 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 @@ -25,6 +20,11 @@ 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 33aa739..86583df 100644 --- a/toontown/spellbook/ToontownMagicWordManagerAI.py +++ b/toontown/spellbook/ToontownMagicWordManagerAI.py @@ -9,9 +9,6 @@ # Email: belloqzafarian@gmail.com ################################################## -import json -import os - from direct.directnotify import DirectNotifyGlobal from direct.distributed import DistributedObjectAI @@ -20,6 +17,9 @@ 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 3a8a3b3..4765038 100644 --- a/toontown/suit/BossCog.py +++ b/toontown/suit/BossCog.py @@ -1,22 +1,20 @@ -import string - from panda3d.core import * from panda3d.otp import * - -from direct.actor import Actor -from direct.directnotify import DirectNotifyGlobal -from direct.fsm import FSM, State from direct.interval.IntervalGlobal import * -from direct.showbase.PythonUtil import Functor -from direct.task.Task import Task - +from direct.actor import Actor from otp.avatar import Avatar - -from toontown.battle import BattleParticles, BattleProps -from toontown.toonbase import ToontownGlobals, TTLocalizer - -from . import Suit, SuitDNA - +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.showbase.PythonUtil import Functor +import string 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 7c09646..aa76277 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.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 direct.distributed.ClockDelta import * +from direct.directnotify import DirectNotifyGlobal from otp.avatar import DistributedAvatar - -from toontown.battle import BattleBase, BattleExperience -from toontown.building import ElevatorConstants, ElevatorUtils +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.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 toontown.hood import ZoneUtil -from toontown.toonbase import ToontownBattleGlobals, ToontownGlobals, TTLocalizer - -from . import BossCog, SuitDNA - +from direct.controls.ControlManager import CollisionHandlerRayStart +from direct.showbase import PythonUtil +import random class DistributedBossCog(DistributedAvatar.DistributedAvatar, BossCog.BossCog): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedBossCog') diff --git a/toontown/suit/DistributedBossCogAI.py b/toontown/suit/DistributedBossCogAI.py index 9cdcc5d..7f67fa4 100644 --- a/toontown/suit/DistributedBossCogAI.py +++ b/toontown/suit/DistributedBossCogAI.py @@ -1,18 +1,16 @@ -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.battle import BattleExperienceAI +from toontown.toonbase import ToontownGlobals +from toontown.toonbase import ToontownBattleGlobals from toontown.toon import InventoryBase -from toontown.toonbase import ToontownBattleGlobals, ToontownGlobals - +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 AllBossCogs = [] class DistributedBossCogAI(DistributedAvatarAI.DistributedAvatarAI): @@ -691,6 +689,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 ae08f0f..d2edfb5 100644 --- a/toontown/suit/DistributedBossbotBoss.py +++ b/toontown/suit/DistributedBossbotBoss.py @@ -1,29 +1,31 @@ import math import random - -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 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 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.battle import MovieToonVictory, RewardPanel -from toontown.building import ElevatorConstants -from toontown.coghq import CogDisguiseGlobals 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.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.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 8820b9a..cfabeab 100644 --- a/toontown/suit/DistributedBossbotBossAI.py +++ b/toontown/suit/DistributedBossbotBossAI.py @@ -1,19 +1,21 @@ -import math -import random - +import random, math 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.battle import BattleExperienceAI, DistributedBattleDinersAI, DistributedBattleWaitersAI +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.building import SuitBuildingGlobals -from toontown.coghq import DistributedBanquetTableAI, DistributedFoodBeltAI, DistributedGolfSpotAI -from toontown.suit import DistributedBossCogAI, DistributedSuitAI, SuitDNA -from toontown.toonbase import ToontownBattleGlobals, ToontownGlobals - +from toontown.battle import DistributedBattleWaitersAI +from toontown.battle import DistributedBattleDinersAI +from toontown.battle import BattleExperienceAI +from direct.distributed.ClockDelta import globalClockDelta class DistributedBossbotBossAI(DistributedBossCogAI.DistributedBossCogAI, FSM.FSM): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedBossbotBossAI') @@ -883,7 +885,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": @@ -907,5 +909,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 b2557a6..b4cdfce 100644 --- a/toontown/suit/DistributedCashbotBoss.py +++ b/toontown/suit/DistributedCashbotBoss.py @@ -1,30 +1,30 @@ -import functools -import math -import random - -from panda3d.core import * -from panda3d.direct import ShowInterval -from panda3d.otp import * -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 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.battle import MovieToonVictory, RewardPanel -from toontown.building import ElevatorConstants, ElevatorUtils +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 -from toontown.distributed import DelayDelete -from toontown.toon import Toon, ToonDNA -from toontown.toonbase import ToontownGlobals, TTLocalizer - -from . import DistributedBossCog, DistributedCashbotBossGoon, SuitDNA - +from panda3d.core import * +from panda3d.direct import ShowInterval +from panda3d.physics import * +from panda3d.otp import * +import random +import math +import functools 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 1f3a1b8..1d3f6f6 100644 --- a/toontown/suit/DistributedCashbotBossAI.py +++ b/toontown/suit/DistributedCashbotBossAI.py @@ -1,18 +1,16 @@ -import functools -import math -import random - from panda3d.core import * - from direct.directnotify import DirectNotifyGlobal -from direct.fsm import FSM - +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 toontown.battle import BattleExperienceAI from toontown.chat import ResistanceChat -from toontown.coghq import DistributedCashbotBossCraneAI, DistributedCashbotBossSafeAI, DistributedCashbotBossTreasureAI -from toontown.suit import DistributedBossCogAI, DistributedCashbotBossGoonAI -from toontown.toonbase import ToontownGlobals - +from direct.fsm import FSM +from toontown.suit import DistributedBossCogAI +import random, math +import functools class DistributedCashbotBossAI(DistributedBossCogAI.DistributedBossCogAI, FSM.FSM): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedCashbotBossAI') @@ -479,7 +477,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": @@ -495,5 +493,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 7dae6b6..99c04b7 100644 --- a/toontown/suit/DistributedCashbotBossGoon.py +++ b/toontown/suit/DistributedCashbotBossGoon.py @@ -1,19 +1,15 @@ from panda3d.core import * - -from direct.directnotify import DirectNotifyGlobal -from direct.distributed.ClockDelta import * from direct.interval.IntervalGlobal import * -from direct.showbase import PythonUtil -from direct.task.Task import Task from direct.task.TaskManagerGlobal import * - -from otp.otpbase import OTPGlobals - -from toontown.coghq import DistributedCashbotBossObject +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 . import DistributedGoon, GoonGlobals - +from otp.otpbase import OTPGlobals +from toontown.coghq import DistributedCashbotBossObject +from direct.showbase import PythonUtil +from . import DistributedGoon class DistributedCashbotBossGoon(DistributedGoon.DistributedGoon, DistributedCashbotBossObject.DistributedCashbotBossObject): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedCashbotBossGoon') diff --git a/toontown/suit/DistributedCashbotBossGoonAI.py b/toontown/suit/DistributedCashbotBossGoonAI.py index 5c639c5..201d0d8 100644 --- a/toontown/suit/DistributedCashbotBossGoonAI.py +++ b/toontown/suit/DistributedCashbotBossGoonAI.py @@ -1,20 +1,15 @@ -import math -import random - from panda3d.core import * - +from direct.task.TaskManagerGlobal import * from direct.distributed.ClockDelta import * from direct.interval.IntervalGlobal import * -from direct.showbase import PythonUtil +from toontown.suit import GoonGlobals 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 - +from otp.otpbase import OTPGlobals +from toontown.coghq import DistributedCashbotBossObjectAI +from direct.showbase import PythonUtil +from toontown.suit import DistributedGoonAI +import math, random class DistributedCashbotBossGoonAI(DistributedGoonAI.DistributedGoonAI, DistributedCashbotBossObjectAI.DistributedCashbotBossObjectAI): legLength = 10 diff --git a/toontown/suit/DistributedFactorySuit.py b/toontown/suit/DistributedFactorySuit.py index e3af17d..d6110f7 100644 --- a/toontown/suit/DistributedFactorySuit.py +++ b/toontown/suit/DistributedFactorySuit.py @@ -1,19 +1,14 @@ -import random - 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 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 otp.level import LevelConstants +from toontown.distributed.DelayDeletable import DelayDeletable class DistributedFactorySuit(DistributedSuitBase.DistributedSuitBase, DelayDeletable): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedFactorySuit') diff --git a/toontown/suit/DistributedFactorySuitAI.py b/toontown/suit/DistributedFactorySuitAI.py index 4227ed4..30f6714 100644 --- a/toontown/suit/DistributedFactorySuitAI.py +++ b/toontown/suit/DistributedFactorySuitAI.py @@ -1,12 +1,8 @@ -from direct.directnotify import DirectNotifyGlobal -from direct.showbase.PythonUtil import StackTrace - 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 class DistributedFactorySuitAI(DistributedSuitBaseAI.DistributedSuitBaseAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedFactorySuitAI') diff --git a/toontown/suit/DistributedGoon.py b/toontown/suit/DistributedGoon.py index cc76fc2..62e8fc8 100644 --- a/toontown/suit/DistributedGoon.py +++ b/toontown/suit/DistributedGoon.py @@ -1,22 +1,20 @@ -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 * - +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 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 ba9fe98..d7803bc 100644 --- a/toontown/suit/DistributedGoonAI.py +++ b/toontown/suit/DistributedGoonAI.py @@ -1,17 +1,12 @@ -import random - -from direct.directnotify import DirectNotifyGlobal -from direct.distributed import ClockDelta -from direct.task import Task - from otp.ai.AIBaseGlobal import * - +from .GoonGlobals import * +from direct.directnotify import DirectNotifyGlobal from toontown.battle import SuitBattleGlobals from toontown.coghq import DistributedCrushableEntityAI - from . import GoonPathData -from .GoonGlobals import * - +from direct.distributed import ClockDelta +import random +from direct.task import Task class DistributedGoonAI(DistributedCrushableEntityAI.DistributedCrushableEntityAI): UPDATE_TIMESTAMP_INTERVAL = 180.0 diff --git a/toontown/suit/DistributedGridGoon.py b/toontown/suit/DistributedGridGoon.py index ac81001..91da109 100644 --- a/toontown/suit/DistributedGridGoon.py +++ b/toontown/suit/DistributedGridGoon.py @@ -1,14 +1,10 @@ from panda3d.core import * - -from direct.directnotify import DirectNotifyGlobal from direct.interval.IntervalGlobal import * - from toontown.battle.BattleProps import * -from toontown.coghq import MovingPlatform -from toontown.toonbase import ToontownGlobals - +from direct.directnotify import DirectNotifyGlobal from . import DistributedGoon - +from toontown.toonbase import ToontownGlobals +from toontown.coghq import MovingPlatform class DistributedGridGoon(DistributedGoon.DistributedGoon): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedGoon') diff --git a/toontown/suit/DistributedGridGoonAI.py b/toontown/suit/DistributedGridGoonAI.py index 05c5ec8..7694883 100644 --- a/toontown/suit/DistributedGridGoonAI.py +++ b/toontown/suit/DistributedGridGoonAI.py @@ -1,15 +1,10 @@ -import random - -from direct.directnotify import DirectNotifyGlobal -from direct.task.Task import Task - from otp.ai.AIBaseGlobal import * - +from direct.directnotify import DirectNotifyGlobal from toontown.battle import SuitBattleGlobals -from toontown.coghq import DistributedCrushableEntityAI - from . import DistributedGoonAI - +from direct.task.Task import Task +from toontown.coghq import DistributedCrushableEntityAI +import random class DistributedGridGoonAI(DistributedGoonAI.DistributedGoonAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedGridGoonAI') diff --git a/toontown/suit/DistributedLawbotBoss.py b/toontown/suit/DistributedLawbotBoss.py index cd73597..fbb93ce 100644 --- a/toontown/suit/DistributedLawbotBoss.py +++ b/toontown/suit/DistributedLawbotBoss.py @@ -1,31 +1,37 @@ -import functools -import math -import random - +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 * 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 direct.task import Task - -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.distributed import DelayDelete -from toontown.toon import NPCToons, Toon -from toontown.toonbase import ToontownBattleGlobals, ToontownGlobals, ToontownTimer, TTLocalizer - -from . import DistributedBossCog, SuitDNA - +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.coghq import CogDisguiseGlobals +from toontown.building import ElevatorConstants +from toontown.toonbase import ToontownTimer OneBossCog = None class DistributedLawbotBoss(DistributedBossCog.DistributedBossCog, FSM.FSM): diff --git a/toontown/suit/DistributedLawbotBossAI.py b/toontown/suit/DistributedLawbotBossAI.py index 9c08904..8ee332e 100644 --- a/toontown/suit/DistributedLawbotBossAI.py +++ b/toontown/suit/DistributedLawbotBossAI.py @@ -1,19 +1,24 @@ -import random - -from direct.directnotify import DirectNotifyGlobal -from direct.distributed.ClockDelta import * -from direct.fsm import FSM - 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.battle import BattleBase, BattleExperienceAI +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.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 - +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 class DistributedLawbotBossAI(DistributedBossCogAI.DistributedBossCogAI, FSM.FSM): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedLawbotBossAI') @@ -163,7 +168,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 @@ -189,7 +194,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() @@ -259,7 +264,7 @@ class DistributedLawbotBossAI(DistributedBossCogAI.DistributedBossCogAI, FSM.FSM def makeBattleOneBattles(self): self.postBattleState = 'RollToBattleTwo' self.initializeBattles(1, ToontownGlobals.LawbotBossBattleOnePosHpr) - + @staticmethod def getEndOfBattleMovieDuration(): return 5 @@ -855,7 +860,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": @@ -873,5 +878,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 5b0bfd8..179b6d7 100644 --- a/toontown/suit/DistributedLawbotBossSuit.py +++ b/toontown/suit/DistributedLawbotBossSuit.py @@ -1,14 +1,11 @@ from panda3d.core import * - -from direct.directnotify import DirectNotifyGlobal -from direct.fsm import ClassicFSM, State from direct.interval.IntervalGlobal import * - -from toontown.battle import MovieUtil -from toontown.toonbase import ToontownGlobals - +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 toontown.battle import MovieUtil class DistributedLawbotBossSuit(DistributedSuitBase.DistributedSuitBase): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedLawbotBossSuit') diff --git a/toontown/suit/DistributedLawbotBossSuitAI.py b/toontown/suit/DistributedLawbotBossSuitAI.py index d2481bb..43bc074 100644 --- a/toontown/suit/DistributedLawbotBossSuitAI.py +++ b/toontown/suit/DistributedLawbotBossSuitAI.py @@ -1,15 +1,12 @@ -import random - -from direct.directnotify import DirectNotifyGlobal -from direct.distributed.ClockDelta import * -from direct.fsm import ClassicFSM, State - from otp.ai.AIBaseGlobal import * - +from direct.distributed.ClockDelta import * +from direct.directnotify import DirectNotifyGlobal from toontown.battle import SuitBattleGlobals -from toontown.suit import DistributedSuitBaseAI from toontown.toonbase import ToontownGlobals - +from toontown.suit import DistributedSuitBaseAI +import random +from direct.fsm import ClassicFSM, State +from direct.fsm import State class DistributedLawbotBossSuitAI(DistributedSuitBaseAI.DistributedSuitBaseAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedLawbotBossSuitAI') diff --git a/toontown/suit/DistributedMintSuit.py b/toontown/suit/DistributedMintSuit.py index 2c2777e..6d736a0 100644 --- a/toontown/suit/DistributedMintSuit.py +++ b/toontown/suit/DistributedMintSuit.py @@ -1,7 +1,5 @@ -from direct.directnotify import DirectNotifyGlobal - from toontown.suit import DistributedFactorySuit - +from direct.directnotify import DirectNotifyGlobal class DistributedMintSuit(DistributedFactorySuit.DistributedFactorySuit): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedMintSuit') diff --git a/toontown/suit/DistributedMintSuitAI.py b/toontown/suit/DistributedMintSuitAI.py index 77b9703..d5e4024 100644 --- a/toontown/suit/DistributedMintSuitAI.py +++ b/toontown/suit/DistributedMintSuitAI.py @@ -1,7 +1,5 @@ -from direct.directnotify import DirectNotifyGlobal - from toontown.suit import DistributedFactorySuitAI - +from direct.directnotify import DirectNotifyGlobal class DistributedMintSuitAI(DistributedFactorySuitAI.DistributedFactorySuitAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedMintSuitAI') diff --git a/toontown/suit/DistributedSellbotBoss.py b/toontown/suit/DistributedSellbotBoss.py index 77ce791..ddbba5b 100644 --- a/toontown/suit/DistributedSellbotBoss.py +++ b/toontown/suit/DistributedSellbotBoss.py @@ -1,30 +1,34 @@ -import math -import random - from panda3d.core import * from panda3d.otp import * - -from direct.directnotify import DirectNotifyGlobal -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 direct.task import Task - -from toontown.battle import BattleBase, MovieToonVictory, RewardPanel from toontown.battle.BattleProps import * -from toontown.building import ElevatorUtils -from toontown.coghq import CogDisguiseGlobals +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.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.coghq import CogDisguiseGlobals 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 80890e3..87c6898 100644 --- a/toontown/suit/DistributedSellbotBossAI.py +++ b/toontown/suit/DistributedSellbotBossAI.py @@ -1,17 +1,19 @@ -import random - -from direct.directnotify import DirectNotifyGlobal -from direct.distributed.ClockDelta import * -from direct.fsm import FSM - 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.battle import BattleBase, BattleExperienceAI -from toontown.suit import DistributedBossCogAI, DistributedSuitAI, SellbotBossGlobals, SuitDNA -from toontown.toon import InventoryBase, NPCToons -from toontown.toonbase import ToontownGlobals, TTLocalizer - +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 class DistributedSellbotBossAI(DistributedBossCogAI.DistributedBossCogAI, FSM.FSM): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedSellbotBossAI') @@ -215,7 +217,7 @@ class DistributedSellbotBossAI(DistributedBossCogAI.DistributedBossCogAI, FSM.FS def makeBattleOneBattles(self): self.postBattleState = 'RollToBattleTwo' self.initializeBattles(1, ToontownGlobals.SellbotBossBattleOnePosHpr) - + @staticmethod def getEndOfBattleMovieDuration(): return 5 @@ -472,5 +474,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 68e759d..4bb06be 100644 --- a/toontown/suit/DistributedStageSuit.py +++ b/toontown/suit/DistributedStageSuit.py @@ -1,20 +1,16 @@ -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 toontown.toonbase import ToontownGlobals, TTLocalizer - +from direct.directnotify import DirectNotifyGlobal +from direct.actor import Actor +from otp.avatar import Avatar 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 ff436c0..a9314dd 100644 --- a/toontown/suit/DistributedStageSuitAI.py +++ b/toontown/suit/DistributedStageSuitAI.py @@ -1,7 +1,5 @@ -from direct.directnotify import DirectNotifyGlobal - from toontown.suit import DistributedFactorySuitAI - +from direct.directnotify import DirectNotifyGlobal class DistributedStageSuitAI(DistributedFactorySuitAI.DistributedFactorySuitAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedStageSuitAI') diff --git a/toontown/suit/DistributedSuit.py b/toontown/suit/DistributedSuit.py index c359ce3..9e6bce9 100644 --- a/toontown/suit/DistributedSuit.py +++ b/toontown/suit/DistributedSuit.py @@ -1,27 +1,28 @@ -import copy -import math -import random - from panda3d.core import * from panda3d.otp import * from panda3d.toontown import * - -from direct.directnotify import DirectNotifyGlobal -from direct.directtools.DirectGeometry import CLAMP -from direct.distributed.ClockDelta import * -from direct.fsm import ClassicFSM, State 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 otp.otpbase import OTPLocalizer - -from toontown.battle import BattleProps, DistributedBattle -from toontown.distributed.DelayDeletable import DelayDeletable +from . import Suit from toontown.toonbase import ToontownGlobals - -from . import DistributedSuitBase, DistributedSuitPlanner, Suit, SuitBase, SuitDialog, SuitTimings - +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 otp.otpbase import OTPLocalizer +import random 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 4038a42..1ceefec 100644 --- a/toontown/suit/DistributedSuitAI.py +++ b/toontown/suit/DistributedSuitAI.py @@ -1,21 +1,17 @@ -import random - +from otp.ai.AIBaseGlobal import * from panda3d.core import * from panda3d.toontown import * - -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 . import SuitTimings +from direct.task import Task +from . import SuitPlannerBase, SuitBase, SuitDialog, SuitDNA +from direct.directnotify import DirectNotifyGlobal from toontown.battle import SuitBattleGlobals from toontown.building import FADoorCodes +from . import DistributedSuitBaseAI from toontown.hood import ZoneUtil - -from . import DistributedSuitBaseAI, SuitBase, SuitDialog, SuitDNA, SuitPlannerBase, SuitTimings - +import random 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 89baf94..5be2626 100644 --- a/toontown/suit/DistributedSuitBase.py +++ b/toontown/suit/DistributedSuitBase.py @@ -1,25 +1,28 @@ -import copy -import math - from panda3d.core import * from panda3d.otp import * - -from direct.controls.ControlManager import CollisionHandlerRayStart -from direct.directnotify import DirectNotifyGlobal -from direct.directtools.DirectGeometry import CLAMP -from direct.distributed.ClockDelta import * -from direct.fsm import ClassicFSM, State 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.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 - +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 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 56bb4e4..3ca34dd 100644 --- a/toontown/suit/DistributedSuitBaseAI.py +++ b/toontown/suit/DistributedSuitBaseAI.py @@ -1,13 +1,9 @@ -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 fd4dec0..dac3b81 100644 --- a/toontown/suit/DistributedSuitPlanner.py +++ b/toontown/suit/DistributedSuitPlanner.py @@ -1,11 +1,7 @@ from panda3d.core import * - from direct.distributed import DistributedObject - -from toontown.toonbase import ToontownGlobals - from . import SuitPlannerBase - +from toontown.toonbase import ToontownGlobals class DistributedSuitPlanner(DistributedObject.DistributedObject, SuitPlannerBase.SuitPlannerBase): diff --git a/toontown/suit/DistributedSuitPlannerAI.py b/toontown/suit/DistributedSuitPlannerAI.py index f67b773..3acff76 100644 --- a/toontown/suit/DistributedSuitPlannerAI.py +++ b/toontown/suit/DistributedSuitPlannerAI.py @@ -1,24 +1,21 @@ -import math -import random -import time - from panda3d.toontown import * - -from direct.directnotify import DirectNotifyGlobal -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.hood import ZoneUtil +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.toonbase import ToontownBattleGlobals, ToontownGlobals - -from . import DistributedSuitAI, SuitDNA, SuitPlannerBase, SuitTimings - +from toontown.building import HQBuildingAI +from toontown.hood import ZoneUtil +from toontown.building import SuitBuildingGlobals +from toontown.building.DistributedBuildingAI import DistributedBuildingAI +from toontown.toonbase import ToontownBattleGlobals +from toontown.toonbase import ToontownGlobals +import math, time, random 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 46debe2..607d6af 100644 --- a/toontown/suit/DistributedTutorialSuit.py +++ b/toontown/suit/DistributedTutorialSuit.py @@ -1,13 +1,10 @@ from panda3d.core import * - -from direct.directnotify import DirectNotifyGlobal from direct.fsm import ClassicFSM, State - +from direct.fsm import State +from direct.directnotify import DirectNotifyGlobal 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 5f60fcc..c92d64d 100644 --- a/toontown/suit/DistributedTutorialSuitAI.py +++ b/toontown/suit/DistributedTutorialSuitAI.py @@ -1,9 +1,7 @@ -from direct.directnotify import DirectNotifyGlobal - from otp.ai.AIBaseGlobal import * +from direct.directnotify import DirectNotifyGlobal from toontown.battle import SuitBattleGlobals - from . import DistributedSuitBaseAI @@ -14,7 +12,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): @@ -54,4 +52,4 @@ class DistributedTutorialSuitAI(DistributedSuitBaseAI.DistributedSuitBaseAI): return (self.confrontPos, self.confrontHpr) def _logDeath(self, toonId): - self.air.writeServerEvent('beatFirstCog', toonId, '') + self.air.writeServerEvent('beatFirstCog', toonId, '') \ No newline at end of file diff --git a/toontown/suit/Goon.py b/toontown/suit/Goon.py index e4776a0..d771895 100644 --- a/toontown/suit/Goon.py +++ b/toontown/suit/Goon.py @@ -1,15 +1,12 @@ -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 - +from toontown.toonbase import ToontownGlobals +from panda3d.core import * +from toontown.toonbase import TTLocalizer +from . import GoonGlobals +from . import SuitDNA +import math 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 184f8ef..c118cbc 100644 --- a/toontown/suit/GoonDeath.py +++ b/toontown/suit/GoonDeath.py @@ -1,11 +1,8 @@ -from panda3d.core import * - from direct.interval.IntervalGlobal import * +from panda3d.core 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 137d1a3..6f2a2de 100644 --- a/toontown/suit/GoonGlobals.py +++ b/toontown/suit/GoonGlobals.py @@ -1,5 +1,4 @@ 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 47b38ef..24b512e 100644 --- a/toontown/suit/GoonPathData.py +++ b/toontown/suit/GoonPathData.py @@ -1,7 +1,5 @@ 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 ed638ad..de3a746 100644 --- a/toontown/suit/RoguesGallery.py +++ b/toontown/suit/RoguesGallery.py @@ -1,13 +1,9 @@ -import random - from panda3d.core import * - from direct.fsm import StateData - +from . import Suit +from . import SuitDNA from toontown.toonbase import ToontownGlobals - -from . import Suit, SuitDNA - +import random class RoguesGallery(StateData.StateData): diff --git a/toontown/suit/SellbotBossGlobals.py b/toontown/suit/SellbotBossGlobals.py index db2d66a..ec1f08d 100644 --- a/toontown/suit/SellbotBossGlobals.py +++ b/toontown/suit/SellbotBossGlobals.py @@ -1,7 +1,6 @@ from panda3d.core import * - -from toontown.coghq import DistributedGagBarrelAI, DistributedHealBarrelAI - +from toontown.coghq import DistributedHealBarrelAI +from toontown.coghq import DistributedGagBarrelAI PieToonup = 1 PieToonupNerfed = 2 PieDamageMult = 1.0 diff --git a/toontown/suit/Suit.py b/toontown/suit/Suit.py index b698d51..8681baf 100644 --- a/toontown/suit/Suit.py +++ b/toontown/suit/Suit.py @@ -1,16 +1,13 @@ +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 direct.actor import Actor +from toontown.battle import SuitBattleGlobals from direct.task.Task import Task - -from otp.avatar import Avatar - -from toontown.battle import BattleProps, SuitBattleGlobals -from toontown.toonbase import ToontownGlobals, TTLocalizer - -from . import SuitDNA - +from toontown.battle import BattleProps +from toontown.toonbase import TTLocalizer aSize = 6.06 bSize = 5.29 cSize = 4.14 diff --git a/toontown/suit/SuitAvatarPanel.py b/toontown/suit/SuitAvatarPanel.py index c6336b2..11c5f74 100644 --- a/toontown/suit/SuitAvatarPanel.py +++ b/toontown/suit/SuitAvatarPanel.py @@ -1,16 +1,13 @@ from panda3d.core import * - -from direct.distributed import DistributedObject from direct.gui.DirectGui import * +from panda3d.core import * from direct.showbase import DirectObject - -from otp.avatar import Avatar, AvatarPanel - -from toontown.friends import FriendsListPanel -from toontown.toonbase import TTLocalizer - +from otp.avatar import Avatar +from direct.distributed import DistributedObject from . import SuitDNA - +from toontown.toonbase import TTLocalizer +from otp.avatar import AvatarPanel +from toontown.friends import FriendsListPanel class SuitAvatarPanel(AvatarPanel.AvatarPanel): currentAvatarPanel = None diff --git a/toontown/suit/SuitBase.py b/toontown/suit/SuitBase.py index 6621404..3e18b75 100644 --- a/toontown/suit/SuitBase.py +++ b/toontown/suit/SuitBase.py @@ -1,18 +1,14 @@ +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 978db58..0380bd2 100644 --- a/toontown/suit/SuitDNA.py +++ b/toontown/suit/SuitDNA.py @@ -1,15 +1,11 @@ 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 160aa28..cc33956 100644 --- a/toontown/suit/SuitDialog.py +++ b/toontown/suit/SuitDialog.py @@ -1,11 +1,7 @@ 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 18912ba..bb1231c 100644 --- a/toontown/suit/SuitInvasionManagerAI.py +++ b/toontown/suit/SuitInvasionManagerAI.py @@ -1,6 +1,5 @@ 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 b12ed0f..44c5a5f 100644 --- a/toontown/suit/SuitPlannerBase.py +++ b/toontown/suit/SuitPlannerBase.py @@ -1,15 +1,13 @@ -import random -import string - from panda3d.core import * from panda3d.toontown import * - +import random +import string 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 e3cc958..7a2f576 100644 --- a/toontown/toon/AvatarPanelBase.py +++ b/toontown/toon/AvatarPanelBase.py @@ -1,14 +1,10 @@ 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 7ebf04b..9bc984d 100644 --- a/toontown/toon/BoardingGroupInviterPanels.py +++ b/toontown/toon/BoardingGroupInviterPanels.py @@ -1,15 +1,13 @@ from panda3d.core import * - -from direct.directnotify import DirectNotifyGlobal -from direct.gui.DirectGui import DGG -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 - +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 toontown.toonbase import TTLocalizer class BoardingGroupInviterPanels: notify = DirectNotifyGlobal.directNotify.newCategory('BoardingGroupInviterPanels') diff --git a/toontown/toon/DeathForceAcknowledge.py b/toontown/toon/DeathForceAcknowledge.py index 8faf95f..717b686 100644 --- a/toontown/toon/DeathForceAcknowledge.py +++ b/toontown/toon/DeathForceAcknowledge.py @@ -1,14 +1,11 @@ from panda3d.core import * - -from direct.gui.DirectGui import * -from direct.showbase import Transitions - -from toontown.toonbase import TTLocalizer 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 . import LaffMeter - class DeathForceAcknowledge: def __init__(self, doneEvent): diff --git a/toontown/toon/DistributedNPCBlocker.py b/toontown/toon/DistributedNPCBlocker.py index 81f4924..d6237c9 100644 --- a/toontown/toon/DistributedNPCBlocker.py +++ b/toontown/toon/DistributedNPCBlocker.py @@ -1,14 +1,11 @@ from panda3d.core import * - -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 * - +from direct.gui.DirectGui import * +from panda3d.core import * +from . import NPCToons +from toontown.toonbase import TTLocalizer +from direct.distributed import DistributedObject +from toontown.quest import QuestParser class DistributedNPCBlocker(DistributedNPCToonBase): diff --git a/toontown/toon/DistributedNPCBlockerAI.py b/toontown/toon/DistributedNPCBlockerAI.py index fceb61e..a79042f 100644 --- a/toontown/toon/DistributedNPCBlockerAI.py +++ b/toontown/toon/DistributedNPCBlockerAI.py @@ -1,12 +1,8 @@ -from panda3d.core import * - -from direct.task.Task import Task - from otp.ai.AIBaseGlobal import * - -from . import NPCToons +from panda3d.core import * from .DistributedNPCToonBaseAI import * - +from . import NPCToons +from direct.task.Task import Task class DistributedNPCBlockerAI(DistributedNPCToonBaseAI): diff --git a/toontown/toon/DistributedNPCClerk.py b/toontown/toon/DistributedNPCClerk.py index 5e5a30f..39f9d9f 100644 --- a/toontown/toon/DistributedNPCClerk.py +++ b/toontown/toon/DistributedNPCClerk.py @@ -1,16 +1,12 @@ from panda3d.core import * - -from direct.task.Task import Task - -from toontown.hood import ZoneUtil +from .DistributedNPCToonBase import * from toontown.minigame import ClerkPurchase from toontown.shtiker.PurchaseManagerConstants import * -from toontown.toonbase import TTLocalizer -from toontown.toontowngui import TeaserPanel - from . import NPCToons -from .DistributedNPCToonBase import * - +from direct.task.Task import Task +from toontown.toonbase import TTLocalizer +from toontown.hood import ZoneUtil +from toontown.toontowngui import TeaserPanel class DistributedNPCClerk(DistributedNPCToonBase): diff --git a/toontown/toon/DistributedNPCClerkAI.py b/toontown/toon/DistributedNPCClerkAI.py index 34d507e..39e452b 100644 --- a/toontown/toon/DistributedNPCClerkAI.py +++ b/toontown/toon/DistributedNPCClerkAI.py @@ -1,12 +1,8 @@ -from panda3d.core import * - -from direct.task.Task import Task - from otp.ai.AIBaseGlobal import * - +from direct.task.Task import Task +from panda3d.core 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 047be35..4774fc0 100644 --- a/toontown/toon/DistributedNPCFisherman.py +++ b/toontown/toon/DistributedNPCFisherman.py @@ -1,14 +1,11 @@ from panda3d.core import * - -from direct.gui.DirectGui import * -from direct.task.Task import Task - -from toontown.fishing import FishSellGUI -from toontown.toonbase import TTLocalizer - -from . import NPCToons 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 class DistributedNPCFisherman(DistributedNPCToonBase): diff --git a/toontown/toon/DistributedNPCFishermanAI.py b/toontown/toon/DistributedNPCFishermanAI.py index 52b0583..b1f2bd2 100644 --- a/toontown/toon/DistributedNPCFishermanAI.py +++ b/toontown/toon/DistributedNPCFishermanAI.py @@ -1,14 +1,10 @@ -from panda3d.core import * - -from direct.task import Task - from otp.ai.AIBaseGlobal import * - +from panda3d.core import * +from .DistributedNPCToonBaseAI import * from toontown.fishing import FishGlobals from toontown.toonbase import TTLocalizer - -from .DistributedNPCToonBaseAI import * - +from toontown.fishing import FishGlobals +from direct.task import Task class DistributedNPCFishermanAI(DistributedNPCToonBaseAI): diff --git a/toontown/toon/DistributedNPCFlippyInToonHall.py b/toontown/toon/DistributedNPCFlippyInToonHall.py index 938831f..f0f83f5 100644 --- a/toontown/toon/DistributedNPCFlippyInToonHall.py +++ b/toontown/toon/DistributedNPCFlippyInToonHall.py @@ -1,8 +1,6 @@ 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 e01557e..9c450a0 100644 --- a/toontown/toon/DistributedNPCFlippyInToonHallAI.py +++ b/toontown/toon/DistributedNPCFlippyInToonHallAI.py @@ -1,6 +1,5 @@ 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 7453078..8786439 100644 --- a/toontown/toon/DistributedNPCKartClerk.py +++ b/toontown/toon/DistributedNPCKartClerk.py @@ -1,15 +1,11 @@ -from panda3d.core import * - -from direct.gui.DirectGui import * -from direct.task.Task import Task - -from toontown.racing.KartShopGlobals import * -from toontown.racing.KartShopGui import * -from toontown.toonbase import TTLocalizer - -from . import NPCToons 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.racing.KartShopGui import * +from toontown.racing.KartShopGlobals import * class DistributedNPCKartClerk(DistributedNPCToonBase): diff --git a/toontown/toon/DistributedNPCKartClerkAI.py b/toontown/toon/DistributedNPCKartClerkAI.py index dcca2d2..364fa52 100644 --- a/toontown/toon/DistributedNPCKartClerkAI.py +++ b/toontown/toon/DistributedNPCKartClerkAI.py @@ -1,15 +1,10 @@ -from panda3d.core import * - -from direct.task import Task - from otp.ai.AIBaseGlobal import * - -from toontown.racing.KartDNA import * -from toontown.racing.KartShopGlobals import * -from toontown.toonbase import TTLocalizer - +from panda3d.core import * from .DistributedNPCToonBaseAI import * - +from toontown.toonbase import TTLocalizer +from direct.task import Task +from toontown.racing.KartShopGlobals import * +from toontown.racing.KartDNA import * class DistributedNPCKartClerkAI(DistributedNPCToonBaseAI): diff --git a/toontown/toon/DistributedNPCPartyPerson.py b/toontown/toon/DistributedNPCPartyPerson.py index 54dad1e..a0d95cb 100644 --- a/toontown/toon/DistributedNPCPartyPerson.py +++ b/toontown/toon/DistributedNPCPartyPerson.py @@ -1,19 +1,16 @@ +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 direct.distributed import ClockDelta -from direct.distributed.DistributedObject import DistributedObject -from direct.task.Task import Task - +from toontown.toontowngui import TTDialog from otp.otpbase import OTPLocalizer - from toontown.parties import PartyGlobals -from toontown.toon import NPCToons -from toontown.toonbase import ToontownGlobals, TTLocalizer -from toontown.toontowngui import TeaserPanel, TTDialog - -from .DistributedNPCToonBase import DistributedNPCToonBase - +from toontown.toonbase import ToontownGlobals +from toontown.toontowngui import TeaserPanel class DistributedNPCPartyPerson(DistributedNPCToonBase): diff --git a/toontown/toon/DistributedNPCPartyPersonAI.py b/toontown/toon/DistributedNPCPartyPersonAI.py index 65ee6ae..f14de22 100644 --- a/toontown/toon/DistributedNPCPartyPersonAI.py +++ b/toontown/toon/DistributedNPCPartyPersonAI.py @@ -1,12 +1,10 @@ -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 - +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 toontown.parties import PartyGlobals class DistributedNPCPartyPersonAI(DistributedNPCToonBaseAI): diff --git a/toontown/toon/DistributedNPCPetclerk.py b/toontown/toon/DistributedNPCPetclerk.py index 042c306..c4669cf 100644 --- a/toontown/toon/DistributedNPCPetclerk.py +++ b/toontown/toon/DistributedNPCPetclerk.py @@ -1,16 +1,13 @@ from panda3d.core import * - -from direct.gui.DirectGui import * -from direct.task.Task import Task - -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 * - +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.toontowngui import TeaserPanel class DistributedNPCPetclerk(DistributedNPCToonBase): diff --git a/toontown/toon/DistributedNPCPetclerkAI.py b/toontown/toon/DistributedNPCPetclerkAI.py index c28e39e..9ff2d0a 100644 --- a/toontown/toon/DistributedNPCPetclerkAI.py +++ b/toontown/toon/DistributedNPCPetclerkAI.py @@ -1,15 +1,10 @@ -from panda3d.core import * - -from direct.task import Task - from otp.ai.AIBaseGlobal import * - -from toontown.fishing import FishGlobals -from toontown.pets import PetConstants, PetDNA, PetUtil -from toontown.toonbase import TTLocalizer - +from panda3d.core import * from .DistributedNPCToonBaseAI import * - +from toontown.toonbase import TTLocalizer +from direct.task import Task +from toontown.fishing import FishGlobals +from toontown.pets import PetUtil, PetDNA, PetConstants class DistributedNPCPetclerkAI(DistributedNPCToonBaseAI): diff --git a/toontown/toon/DistributedNPCScientist.py b/toontown/toon/DistributedNPCScientist.py index bd3caf5..d029c50 100644 --- a/toontown/toon/DistributedNPCScientist.py +++ b/toontown/toon/DistributedNPCScientist.py @@ -1,10 +1,7 @@ from panda3d.core import * - -from toontown.toonbase import ToontownGlobals, TTLocalizer - +from toontown.toonbase import TTLocalizer, ToontownGlobals from . import DistributedNPCToonBase - class DistributedNPCScientist(DistributedNPCToonBase.DistributedNPCToonBase): def __init__(self, cr): diff --git a/toontown/toon/DistributedNPCScientistAI.py b/toontown/toon/DistributedNPCScientistAI.py index f417e0e..4b2fe52 100644 --- a/toontown/toon/DistributedNPCScientistAI.py +++ b/toontown/toon/DistributedNPCScientistAI.py @@ -1,11 +1,8 @@ +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): @@ -60,7 +57,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 ad4be26..ca77b1e 100644 --- a/toontown/toon/DistributedNPCSpecialQuestGiver.py +++ b/toontown/toon/DistributedNPCSpecialQuestGiver.py @@ -1,12 +1,11 @@ from panda3d.core import * - -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 * - +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.toontowngui import TeaserPanel ChoiceTimeout = 20 class DistributedNPCSpecialQuestGiver(DistributedNPCToonBase): diff --git a/toontown/toon/DistributedNPCSpecialQuestGiverAI.py b/toontown/toon/DistributedNPCSpecialQuestGiverAI.py index 72a1924..1cc67e1 100644 --- a/toontown/toon/DistributedNPCSpecialQuestGiverAI.py +++ b/toontown/toon/DistributedNPCSpecialQuestGiverAI.py @@ -1,13 +1,8 @@ -from panda3d.core import * - -from direct.task.Task import Task - from otp.ai.AIBaseGlobal import * - -from toontown.quest import Quests - +from direct.task.Task import Task +from panda3d.core import * from .DistributedNPCToonBaseAI import * - +from toontown.quest import Quests class DistributedNPCSpecialQuestGiverAI(DistributedNPCToonBaseAI): diff --git a/toontown/toon/DistributedNPCTailor.py b/toontown/toon/DistributedNPCTailor.py index 2dba419..85b0546 100644 --- a/toontown/toon/DistributedNPCTailor.py +++ b/toontown/toon/DistributedNPCTailor.py @@ -1,14 +1,13 @@ from panda3d.core import * - -from direct.gui.DirectGui import * -from direct.task.Task import Task - -from toontown.estate import ClosetGlobals -from toontown.toonbase import TTLocalizer - -from . import NPCToons, TailorClothesGUI, ToonDNA 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 class DistributedNPCTailor(DistributedNPCToonBase): diff --git a/toontown/toon/DistributedNPCTailorAI.py b/toontown/toon/DistributedNPCTailorAI.py index 5f97bda..c5b39f7 100644 --- a/toontown/toon/DistributedNPCTailorAI.py +++ b/toontown/toon/DistributedNPCTailorAI.py @@ -1,16 +1,11 @@ -from panda3d.core import * - -from direct.task.Task import Task - from otp.ai.AIBaseGlobal import * - +from panda3d.core import * +from .DistributedNPCToonBaseAI import * +from . import ToonDNA +from direct.task.Task import Task 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 6001f0d..8ddc61e 100644 --- a/toontown/toon/DistributedNPCToon.py +++ b/toontown/toon/DistributedNPCToon.py @@ -1,12 +1,11 @@ from panda3d.core import * - -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 * - +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.toontowngui import TeaserPanel ChoiceTimeout = 20 class DistributedNPCToon(DistributedNPCToonBase): diff --git a/toontown/toon/DistributedNPCToonAI.py b/toontown/toon/DistributedNPCToonAI.py index 3176c88..44a8ecd 100644 --- a/toontown/toon/DistributedNPCToonAI.py +++ b/toontown/toon/DistributedNPCToonAI.py @@ -1,13 +1,8 @@ -from panda3d.core import * - -from direct.task.Task import Task - from otp.ai.AIBaseGlobal import * - -from toontown.quest import Quests - +from direct.task.Task import Task +from panda3d.core import * from .DistributedNPCToonBaseAI import * - +from toontown.quest import Quests 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 dcd946a..b3b687c 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.distributed import ClockDelta, DistributedObject -from direct.fsm import ClassicFSM, State -from direct.interval.IntervalGlobal import * - -from toontown.quest import QuestChoiceGui, QuestParser, Quests +from direct.fsm import ClassicFSM +from direct.fsm import State from toontown.toonbase import ToontownGlobals - -from . import DistributedToon, NPCToons - +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.interval.IntervalGlobal import * +import random class DistributedNPCToonBase(DistributedToon.DistributedToon): diff --git a/toontown/toon/DistributedNPCToonBaseAI.py b/toontown/toon/DistributedNPCToonBaseAI.py index cddd420..8ac54cf 100644 --- a/toontown/toon/DistributedNPCToonBaseAI.py +++ b/toontown/toon/DistributedNPCToonBaseAI.py @@ -1,16 +1,13 @@ -from panda3d.core import * - -from direct.distributed import ClockDelta -from direct.fsm import ClassicFSM, State -from direct.task import Task - from otp.ai.AIBaseGlobal import * - -from toontown.quest import Quests +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 DistributedToonAI, NPCToons - +from . import NPCToons +from direct.task import Task +from toontown.quest import Quests class DistributedNPCToonBaseAI(DistributedToonAI.DistributedToonAI): diff --git a/toontown/toon/DistributedToon.py b/toontown/toon/DistributedToon.py index 38eeb67..3a52f75 100644 --- a/toontown/toon/DistributedToon.py +++ b/toontown/toon/DistributedToon.py @@ -1,51 +1,59 @@ -import copy -import operator -import random -import time - from panda3d.core import * from panda3d.otp import * - -from direct.directnotify import DirectNotifyGlobal -from direct.distributed import DistributedObject, DistributedSmoothNode +from toontown.toonbase.ToontownGlobals import * from direct.distributed.ClockDelta import * -from direct.distributed.MsgTypes import * -from direct.fsm import ClassicFSM 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.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 toontown.catalog import CatalogItem, CatalogItemList -from toontown.chat import ResistanceChat, ToonChatGarbler -from toontown.coghq import CogDisguiseGlobals +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.fsm import ClassicFSM +from toontown.hood import ZoneUtil 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 DistributedGagTree, FlowerBasket, FlowerCollection, GardenGlobals -from toontown.fishing import FishCollection, FishTank -from toontown.friends import FriendHandle +from toontown.estate import FlowerCollection +from toontown.estate import FlowerBasket +from toontown.estate import GardenGlobals +from toontown.estate import DistributedGagTree 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.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 - +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 if base.wantKarts: from toontown.racing.KartDNA import * if (__debug__): @@ -2583,4 +2591,4 @@ class DistributedToon(DistributedPlayer.DistributedPlayer, Toon.Toon, Distribute return self.transitioning def toggleSleep(self): - base.localAvatar.noSleep = not base.localAvatar.noSleep + base.localAvatar.noSleep = not base.localAvatar.noSleep \ No newline at end of file diff --git a/toontown/toon/DistributedToonAI.py b/toontown/toon/DistributedToonAI.py index 4d38e95..b5489fe 100644 --- a/toontown/toon/DistributedToonAI.py +++ b/toontown/toon/DistributedToonAI.py @@ -1,44 +1,51 @@ +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 -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.hood import ZoneUtil 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 - +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 +from functools import reduce if simbase.wantPets: from toontown.pets import PetLookerAI, PetObserve else: diff --git a/toontown/toon/DistributedToonUD.py b/toontown/toon/DistributedToonUD.py index 19d8847..be8e8e3 100644 --- a/toontown/toon/DistributedToonUD.py +++ b/toontown/toon/DistributedToonUD.py @@ -1,6 +1,5 @@ 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 37cfe64..dcc2739 100644 --- a/toontown/toon/ElevatorNotifier.py +++ b/toontown/toon/ElevatorNotifier.py @@ -1,12 +1,10 @@ -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 toontown.toonbase import ToontownGlobals, TTLocalizer +from panda3d.core import * 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 a0d8fdf..a867b11 100644 --- a/toontown/toon/Experience.py +++ b/toontown/toon/Experience.py @@ -1,14 +1,10 @@ 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 063ec3f..e9697b2 100644 --- a/toontown/toon/GroupInvitee.py +++ b/toontown/toon/GroupInvitee.py @@ -1,15 +1,13 @@ from panda3d.core import * - -from direct.directnotify import DirectNotifyGlobal -from direct.gui.DirectGui import DGG -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 - +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 toontown.toonbase import TTLocalizer class GroupInvitee(ToonHeadDialog.ToonHeadDialog): notify = DirectNotifyGlobal.directNotify.newCategory('GroupInvitee') diff --git a/toontown/toon/GroupPanel.py b/toontown/toon/GroupPanel.py index 904571f..ed1fb2e 100644 --- a/toontown/toon/GroupPanel.py +++ b/toontown/toon/GroupPanel.py @@ -1,14 +1,12 @@ -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 panda3d.core 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 677f673..dd9c8dc 100644 --- a/toontown/toon/HealthForceAcknowledge.py +++ b/toontown/toon/HealthForceAcknowledge.py @@ -1,8 +1,6 @@ from panda3d.core import * - -from toontown.toonbase import TTLocalizer from toontown.toontowngui import TTDialog - +from toontown.toonbase import TTLocalizer class HealthForceAcknowledge: diff --git a/toontown/toon/InventoryBase.py b/toontown/toon/InventoryBase.py index 078c08f..f4af9c7 100644 --- a/toontown/toon/InventoryBase.py +++ b/toontown/toon/InventoryBase.py @@ -1,13 +1,10 @@ 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 6d4a3b4..e3fe6a9 100644 --- a/toontown/toon/InventoryNew.py +++ b/toontown/toon/InventoryNew.py @@ -1,17 +1,13 @@ -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.quest import BlinkingArrows -from toontown.toonbase import ToontownGlobals, TTLocalizer +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 otp.otpbase import OTPGlobals class InventoryNew(InventoryBase.InventoryBase, DirectFrame): notify = DirectNotifyGlobal.directNotify.newCategory('InventoryNew') diff --git a/toontown/toon/LaffMeter.py b/toontown/toon/LaffMeter.py index d1d5b98..a5cf585 100644 --- a/toontown/toon/LaffMeter.py +++ b/toontown/toon/LaffMeter.py @@ -1,9 +1,7 @@ from panda3d.core import Vec4 - from direct.gui.DirectGui import DirectFrame, DirectLabel - -from toontown.toonbase import ToontownGlobals, ToontownIntervals - +from toontown.toonbase import ToontownGlobals +from toontown.toonbase import 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 4d7e4b4..86f1f5a 100644 --- a/toontown/toon/LocalToon.py +++ b/toontown/toon/LocalToon.py @@ -1,45 +1,61 @@ -import math import random -import re +import math import time +import re 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 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.avatar import LocalAvatar from otp.login import LeaveToPayDialog +from otp.avatar import PositionExaminer from otp.otpbase import OTPGlobals - -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.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 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 . import DistributedToon, LaffMeter, Toon - +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.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.toon.DistributedNPCToonBase import DistributedNPCToonBase WantNewsPage = base.config.GetBool('want-news-page', ToontownGlobals.DefaultWantNewsPageSetting) from toontown.toontowngui import NewsPageButtonManager - if WantNewsPage: from toontown.shtiker import NewsPage AdjustmentForNewsButton = -0.275 @@ -643,9 +659,8 @@ class LocalToon(DistributedToon.DistributedToon, LocalAvatar.LocalAvatar): return def localPresentPie(self, time): - from otp.avatar import Emote - from . import TTEmote + from otp.avatar import Emote self.__stopPresentPie() if self.tossTrack: tossTrack = self.tossTrack @@ -680,9 +695,8 @@ class LocalToon(DistributedToon.DistributedToon, LocalAvatar.LocalAvatar): def __stopPresentPie(self): if self.__presentingPie: - from otp.avatar import Emote - from . import TTEmote + from otp.avatar import Emote Emote.globalEmote.releaseBody(self) messenger.send('end-pie') self.__presentingPie = 0 @@ -822,7 +836,7 @@ class LocalToon(DistributedToon.DistributedToon, LocalAvatar.LocalAvatar): self.updatePieButton() def makePiePowerMeter(self): - from direct.gui.DirectGui import DGG, DirectWaitBar + from direct.gui.DirectGui import DirectWaitBar, DGG if self.__piePowerMeter == None: self.__piePowerMeter = DirectWaitBar(frameSize=(-0.2, 0.2, @@ -832,9 +846,8 @@ 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 f0e92da..ff3dc84 100644 --- a/toontown/toon/Motion.py +++ b/toontown/toon/Motion.py @@ -1,12 +1,10 @@ -from direct.directnotify import DirectNotifyGlobal -from direct.fsm import ClassicFSM, State, StateData - -from otp.avatar import Emote - +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 otp.avatar import Emote class Motion(StateData.StateData): notify = DirectNotifyGlobal.directNotify.newCategory('Motion') diff --git a/toontown/toon/NPCForceAcknowledge.py b/toontown/toon/NPCForceAcknowledge.py index f2d8c5b..3d5e8f8 100644 --- a/toontown/toon/NPCForceAcknowledge.py +++ b/toontown/toon/NPCForceAcknowledge.py @@ -1,11 +1,8 @@ from panda3d.core import * - -from direct.gui import DirectLabel - -from toontown.quest import Quests -from toontown.toonbase import TTLocalizer from toontown.toontowngui import TTDialog - +from toontown.toonbase import TTLocalizer +from direct.gui import DirectLabel +from toontown.quest import Quests class NPCForceAcknowledge: diff --git a/toontown/toon/NPCFriendPanel.py b/toontown/toon/NPCFriendPanel.py index 3595eac..f527f60 100644 --- a/toontown/toon/NPCFriendPanel.py +++ b/toontown/toon/NPCFriendPanel.py @@ -1,12 +1,12 @@ -from panda3d.core import * - -from direct.directnotify import DirectNotifyGlobal from direct.gui.DirectGui import * - -from toontown.toonbase import ToontownBattleGlobals, ToontownGlobals, TTLocalizer - -from . import NPCToons, ToonDNA, ToonHead - +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 class NPCFriendPanel(DirectFrame): notify = DirectNotifyGlobal.directNotify.newCategory('NPCFriendPanel') diff --git a/toontown/toon/NPCToons.py b/toontown/toon/NPCToons.py index 83da476..5b9030f 100644 --- a/toontown/toon/NPCToons.py +++ b/toontown/toon/NPCToons.py @@ -1,13 +1,11 @@ -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 @@ -72,10 +70,17 @@ def getRandomDNA(seed, gender): def createNPC(air, npcId, desc, zoneId, posIndex = 0, questCallback = None): - from . import (DistributedNPCBlockerAI, DistributedNPCClerkAI, DistributedNPCFishermanAI, - DistributedNPCFlippyInToonHallAI, DistributedNPCKartClerkAI, DistributedNPCPartyPersonAI, - DistributedNPCPetclerkAI, DistributedNPCScientistAI, DistributedNPCSpecialQuestGiverAI, - DistributedNPCTailorAI, DistributedNPCToonAI) + 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 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 38fc721..a4eb669 100644 --- a/toontown/toon/PlayerDetailPanel.py +++ b/toontown/toon/PlayerDetailPanel.py @@ -1,18 +1,17 @@ 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 toontown.friends import FriendInviter -from toontown.hood import ZoneUtil -from toontown.toonbase import TTLocalizer -from toontown.toonbase.ToontownBattleGlobals import Levels, Tracks from toontown.toonbase.ToontownGlobals import * - -from . import DistributedToon, ToonTeleportPanel - +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 toontown.friends import FriendInviter +from . import ToonTeleportPanel +from toontown.toonbase import TTLocalizer +from toontown.hood import ZoneUtil +from toontown.toonbase.ToontownBattleGlobals import Tracks, Levels globalAvatarDetail = None def showPlayerDetail(avId, avName, playerId = None): diff --git a/toontown/toon/PlayerInfoPanel.py b/toontown/toon/PlayerInfoPanel.py index df0ae70..739c964 100644 --- a/toontown/toon/PlayerInfoPanel.py +++ b/toontown/toon/PlayerInfoPanel.py @@ -1,18 +1,18 @@ from panda3d.core import * - -from direct.directnotify import DirectNotifyGlobal -from direct.distributed import DistributedObject 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 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 6dcd832..e08809f 100644 --- a/toontown/toon/TTEmote.py +++ b/toontown/toon/TTEmote.py @@ -1,17 +1,13 @@ +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 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 - +from direct.directnotify import DirectNotifyGlobal EmoteSleepIndex = 4 EmoteClear = -1 diff --git a/toontown/toon/TailorClothesGUI.py b/toontown/toon/TailorClothesGUI.py index 7ace8e4..9e02a62 100644 --- a/toontown/toon/TailorClothesGUI.py +++ b/toontown/toon/TailorClothesGUI.py @@ -1,8 +1,6 @@ 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 b182035..75b616b 100644 --- a/toontown/toon/Toon.py +++ b/toontown/toon/Toon.py @@ -1,29 +1,29 @@ -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 import Avatar 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 . import ToonDNA +from direct.task.Task import Task from toontown.suit import SuitDNA -from toontown.toonbase import ToontownGlobals, TTLocalizer - -from . import AccessoryGlobals, Motion, ToonDNA +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 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.battle import BattleProps from toontown.toonbase import ToontownBattleGlobals + from toontown.battle import BattleProps if self.pieModel != None and self.__pieModelType != self.pieType: self.pieModel.detachNode() self.pieModel = None @@ -2857,8 +2857,9 @@ 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) @@ -2871,8 +2872,8 @@ class Toon(Avatar.Avatar, ToonHead): return track def getTossPieInterval(self, x, y, z, h, p, r, power, beginFlyIval = Sequence()): - from toontown.battle import BattleProps from toontown.toonbase import ToontownBattleGlobals + from toontown.battle import BattleProps pie = self.getPieModel() flyPie = pie.copyTo(NodePath('a')) pieName = ToontownBattleGlobals.pieNames[self.pieType] @@ -2895,8 +2896,8 @@ class Toon(Avatar.Avatar, ToonHead): return (toss, fly, flyPie) def getPieSplatInterval(self, x, y, z, pieCode): - from toontown.battle import BattleProps from toontown.toonbase import ToontownBattleGlobals + from toontown.battle import BattleProps 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 d8e493a..e9b8365 100644 --- a/toontown/toon/ToonAvatarDetailPanel.py +++ b/toontown/toon/ToonAvatarDetailPanel.py @@ -1,18 +1,17 @@ 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 toontown.friends import FriendInviter -from toontown.hood import ZoneUtil -from toontown.toonbase import TTLocalizer -from toontown.toonbase.ToontownBattleGlobals import Levels, Tracks from toontown.toonbase.ToontownGlobals import * - -from . import DistributedToon, ToonTeleportPanel - +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 toontown.friends import FriendInviter +from . import ToonTeleportPanel +from toontown.toonbase import TTLocalizer +from toontown.hood import ZoneUtil +from toontown.toonbase.ToontownBattleGlobals import Tracks, Levels globalAvatarDetail = None def showAvatarDetail(avId, avName, playerId = None): diff --git a/toontown/toon/ToonAvatarPanel.py b/toontown/toon/ToonAvatarPanel.py index be7d69c..ba42168 100644 --- a/toontown/toon/ToonAvatarPanel.py +++ b/toontown/toon/ToonAvatarPanel.py @@ -1,19 +1,20 @@ from panda3d.core import * - -from direct.directnotify import DirectNotifyGlobal -from direct.distributed import DistributedObject 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 otp.otpbase import OTPGlobals - -from toontown.friends import FriendHandle, ToontownFriendSecret -from toontown.toonbase import ToontownGlobals, TTLocalizer +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 . import AvatarPanelBase, LaffMeter, ToonAvatarDetailPanel, ToonHead - +from otp.otpbase import OTPGlobals class ToonAvatarPanel(AvatarPanelBase.AvatarPanelBase): notify = DirectNotifyGlobal.directNotify.newCategory('ToonAvatarPanel') diff --git a/toontown/toon/ToonDNA.py b/toontown/toon/ToonDNA.py index f14a73b..ab2f52e 100644 --- a/toontown/toon/ToonDNA.py +++ b/toontown/toon/ToonDNA.py @@ -1,13 +1,10 @@ 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 4d8f6c8..b845bc3 100644 --- a/toontown/toon/ToonDetail.py +++ b/toontown/toon/ToonDetail.py @@ -1,10 +1,7 @@ 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 84b3429..8ac6f87 100644 --- a/toontown/toon/ToonHead.py +++ b/toontown/toon/ToonHead.py @@ -1,16 +1,12 @@ -import random - -from panda3d.core import * - from direct.actor import Actor -from direct.directnotify import DirectNotifyGlobal +from direct.task import Task +from toontown.toonbase import ToontownGlobals +import random +from panda3d.core import * +from direct.interval.IntervalGlobal import * from direct.fsm.ClassicFSM import ClassicFSM from direct.fsm.State import State -from direct.interval.IntervalGlobal import * -from direct.task import Task - -from toontown.toonbase import ToontownGlobals - +from direct.directnotify import DirectNotifyGlobal 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 80cb157..6cce003 100644 --- a/toontown/toon/ToonHeadFrame.py +++ b/toontown/toon/ToonHeadFrame.py @@ -1,14 +1,10 @@ +from direct.gui.DirectGui import * from panda3d.core import * from panda3d.otp import * - -from direct.gui.DirectGui import * - +from . import ToonHead 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 4ba0195..8857bee 100644 --- a/toontown/toon/ToonTeleportPanel.py +++ b/toontown/toon/ToonTeleportPanel.py @@ -1,17 +1,15 @@ from panda3d.core import * - -from direct.directnotify import DirectNotifyGlobal -from direct.fsm import ClassicFSM, State 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 otp.avatar.Avatar import teleportNotify - -from toontown.hood import ZoneUtil -from toontown.toonbase import ToontownGlobals, TTLocalizer - from . import ToonAvatarDetailPanel - +from toontown.toonbase import TTLocalizer +from toontown.hood import ZoneUtil globalTeleport = None def showTeleportPanel(avId, avName, avDisableName): diff --git a/toontown/toonbase/DisplayOptions.py b/toontown/toonbase/DisplayOptions.py index 57a61e7..362185a 100644 --- a/toontown/toonbase/DisplayOptions.py +++ b/toontown/toonbase/DisplayOptions.py @@ -1,16 +1,13 @@ import copy -import datetime -import os import string +import os import sys - -from panda3d.core import WindowProperties, loadPrcFileData - -from direct.directnotify import DirectNotifyGlobal - -from otp.otpbase import OTPGlobals, OTPRender +import datetime +from panda3d.core import loadPrcFileData, WindowProperties from otp.otpgui import OTPDialog - +from otp.otpbase import OTPGlobals +from otp.otpbase import OTPRender +from direct.directnotify import DirectNotifyGlobal try: import embedded except: diff --git a/toontown/toonbase/TTLocalizer.py b/toontown/toonbase/TTLocalizer.py index 952b92d..0427d15 100644 --- a/toontown/toonbase/TTLocalizer.py +++ b/toontown/toonbase/TTLocalizer.py @@ -15,7 +15,6 @@ 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 e24aef4..2416935 100644 --- a/toontown/toonbase/TTLocalizerEnglish.py +++ b/toontown/toonbase/TTLocalizerEnglish.py @@ -1,8 +1,6 @@ -from otp.otpbase import OTPLocalizer as OL - -from toontown.catalog import CatalogAccessoryItemGlobals from toontown.toonbase.TTLocalizerEnglishProperty import * - +from toontown.catalog import CatalogAccessoryItemGlobals +from otp.otpbase import OTPLocalizer as OL OL.SpeedChatStaticText = OL.SpeedChatStaticTextToontown.copy() for key in OL.SpeedChatStaticTextCommon.keys(): OL.SpeedChatStaticText[key] = OL.SpeedChatStaticTextCommon[key] @@ -8671,7 +8669,6 @@ 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', @@ -9284,7 +9281,6 @@ 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 71f257b..99d29a9 100644 --- a/toontown/toonbase/ToonBase.py +++ b/toontown/toonbase/ToonBase.py @@ -1,23 +1,22 @@ -import math -import os -import sys - -from panda3d.core import * -from panda3d.otp import * - +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 * -from direct.showbase.PythonUtil import * - -from otp.otpbase import OTPBase, OTPGlobals, OTPLauncherGlobals -from otp.settings.Settings import Settings - +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 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 7aa6e47..f36a066 100644 --- a/toontown/toonbase/ToontownAccess.py +++ b/toontown/toonbase/ToontownAccess.py @@ -1,7 +1,6 @@ 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 1b777fc..1153661 100644 --- a/toontown/toonbase/ToontownAccessAI.py +++ b/toontown/toonbase/ToontownAccessAI.py @@ -1,9 +1,7 @@ -from otp.ai import BanManagerAI from otp.otpbase import OTPGlobals - -from toontown.hood import ZoneUtil +from otp.ai import BanManagerAI from toontown.toonbase import ToontownGlobals - +from toontown.hood import ZoneUtil def canAccess(avatarId, zoneId, function = ''): avatar = simbase.air.doId2do.get(avatarId) diff --git a/toontown/toonbase/ToontownBattleGlobals.py b/toontown/toonbase/ToontownBattleGlobals.py index 115f6af..39ba608 100644 --- a/toontown/toonbase/ToontownBattleGlobals.py +++ b/toontown/toonbase/ToontownBattleGlobals.py @@ -1,8 +1,6 @@ -import math - -from . import TTLocalizer from .ToontownGlobals import * - +import math +from . import TTLocalizer 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 7386f7f..da6e354 100644 --- a/toontown/toonbase/ToontownGlobals.py +++ b/toontown/toonbase/ToontownGlobals.py @@ -1,13 +1,8 @@ -from enum import IntEnum - -from panda3d.core import BitMask32, Vec4 - -from direct.showbase.PythonUtil import invertDict - -from otp.otpbase.OTPGlobals import * - from . import TTLocalizer - +from otp.otpbase.OTPGlobals import * +from direct.showbase.PythonUtil import invertDict +from panda3d.core import BitMask32, Vec4 +from enum import IntEnum MapHotkeyOn = 'alt' MapHotkeyOff = 'alt-up' MapHotkey = 'alt' @@ -114,7 +109,6 @@ 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 fe79b00..a903209 100644 --- a/toontown/toonbase/ToontownIntervals.py +++ b/toontown/toonbase/ToontownIntervals.py @@ -1,6 +1,5 @@ -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 2ae0485..cafa772 100644 --- a/toontown/toonbase/ToontownLoader.py +++ b/toontown/toonbase/ToontownLoader.py @@ -1,12 +1,9 @@ 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 a92c66b..de6d608 100644 --- a/toontown/toonbase/ToontownStart.py +++ b/toontown/toonbase/ToontownStart.py @@ -1,18 +1,27 @@ import builtins - class game: name = 'toontown' process = 'client' builtins.game = game() -import sys +from panda3d.core import ( + ConfigVariableBool, + ConfigVariableDouble, + ConfigVariableString, + Filename, + HTTPClient, + Loader, + loadPrcFile, + TextNode, + Thread, + VBase3, + Vec4 +) + import time - -from panda3d.core import (ConfigVariableBool, ConfigVariableDouble, ConfigVariableString, Filename, HTTPClient, Loader, - TextNode, Thread, VBase3, Vec4, loadPrcFile) - +import sys try: launcher except: @@ -39,14 +48,11 @@ 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() @@ -64,10 +70,8 @@ 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 otp.otpbase import OTPGlobals - from . import TTLocalizer - +from otp.otpbase import OTPGlobals OTPGlobals.setDefaultProductPrefix(TTLocalizer.ProductPrefix) if base.musicManagerIsValid: music = base.musicManager.getSound('phase_3/audio/bgm/tt_theme.ogg') @@ -83,13 +87,11 @@ 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 @@ -97,7 +99,6 @@ 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 5705900..97372d4 100644 --- a/toontown/toonbase/ToontownTimer.py +++ b/toontown/toonbase/ToontownTimer.py @@ -1,7 +1,5 @@ -from panda3d.core import * - from otp.otpbase.OTPTimer import OTPTimer - +from panda3d.core import * class ToontownTimer(OTPTimer): diff --git a/toontown/toontowngui/NewsPageButtonManager.py b/toontown/toontowngui/NewsPageButtonManager.py index a26a4d6..f09ec2b 100644 --- a/toontown/toontowngui/NewsPageButtonManager.py +++ b/toontown/toontowngui/NewsPageButtonManager.py @@ -1,14 +1,12 @@ -from panda3d.core import VBase3, VBase4 - -from direct.directnotify import DirectNotifyGlobal +from panda3d.core import VBase4, VBase3 from direct.fsm import FSM +from direct.directnotify import DirectNotifyGlobal 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 bd3691d..b11af4c 100644 --- a/toontown/toontowngui/TTDialog.py +++ b/toontown/toontowngui/TTDialog.py @@ -1,6 +1,5 @@ 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 5877ea6..bffabea 100644 --- a/toontown/toontowngui/TeaserPanel.py +++ b/toontown/toontowngui/TeaserPanel.py @@ -1,17 +1,13 @@ from panda3d.core import * - -from direct.directnotify import DirectNotifyGlobal -from direct.gui import DirectGuiGlobals 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.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 0caf320..3855948 100644 --- a/toontown/toontowngui/ToonHeadDialog.py +++ b/toontown/toontowngui/ToonHeadDialog.py @@ -1,12 +1,8 @@ from panda3d.core import * - -from direct.directnotify import DirectNotifyGlobal - -from toontown.toon import ToonHead from toontown.toonbase.ToontownGlobals import * - +from direct.directnotify import DirectNotifyGlobal from . import TTDialog - +from toontown.toon import ToonHead class ToonHeadDialog(TTDialog.TTDialog): notify = DirectNotifyGlobal.directNotify.newCategory('ToonHeadDialog') diff --git a/toontown/toontowngui/ToontownLoadingBlocker.py b/toontown/toontowngui/ToontownLoadingBlocker.py index cac2809..f260798 100644 --- a/toontown/toontowngui/ToontownLoadingBlocker.py +++ b/toontown/toontowngui/ToontownLoadingBlocker.py @@ -1,18 +1,14 @@ -import random - -from panda3d.core import TextNode - from direct.directnotify import DirectNotifyGlobal from direct.gui.DirectGui import * -from direct.interval.IntervalGlobal import Func, Parallel, Sequence, Wait -from direct.interval.LerpInterval import LerpFunc, LerpPosInterval, LerpScaleInterval -from direct.task import Task - -from otp.otpgui.OTPDialog import * - -from toontown.toonbase import ToontownGlobals, TTLocalizer +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.task import Task +import random class ToontownLoadingBlocker(TTDialog.TTDialog): notify = DirectNotifyGlobal.directNotify.newCategory('ToontownLoadingBlocker') diff --git a/toontown/toontowngui/ToontownLoadingScreen.py b/toontown/toontowngui/ToontownLoadingScreen.py index 3852587..c4de1f6 100644 --- a/toontown/toontowngui/ToontownLoadingScreen.py +++ b/toontown/toontowngui/ToontownLoadingScreen.py @@ -1,11 +1,8 @@ -import random - -from panda3d.core import * - from direct.gui.DirectGui import * - -from toontown.toonbase import ToontownGlobals, TTLocalizer - +from panda3d.core import * +from toontown.toonbase import ToontownGlobals +from toontown.toonbase import TTLocalizer +import random class ToontownLoadingScreen: diff --git a/toontown/town/BRStreet.py b/toontown/town/BRStreet.py index 389ddac..9bade86 100644 --- a/toontown/town/BRStreet.py +++ b/toontown/town/BRStreet.py @@ -1,6 +1,5 @@ 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 1ca8a72..9ee86a3 100644 --- a/toontown/town/BRTownLoader.py +++ b/toontown/town/BRTownLoader.py @@ -1,8 +1,7 @@ +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 39150aa..643fc87 100644 --- a/toontown/town/DDStreet.py +++ b/toontown/town/DDStreet.py @@ -1,6 +1,5 @@ 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 64f3888..3b52e65 100644 --- a/toontown/town/DDTownLoader.py +++ b/toontown/town/DDTownLoader.py @@ -1,8 +1,7 @@ +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 5872ca0..2be8cb2 100644 --- a/toontown/town/DGStreet.py +++ b/toontown/town/DGStreet.py @@ -1,6 +1,5 @@ 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 1ec8ba9..9eb6890 100644 --- a/toontown/town/DGTownLoader.py +++ b/toontown/town/DGTownLoader.py @@ -1,8 +1,7 @@ +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 11c980f..98c046c 100644 --- a/toontown/town/DLStreet.py +++ b/toontown/town/DLStreet.py @@ -1,6 +1,5 @@ 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 705899a..6febe6f 100644 --- a/toontown/town/DLTownLoader.py +++ b/toontown/town/DLTownLoader.py @@ -1,8 +1,7 @@ +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 2ca1e0f..cdc4d63 100644 --- a/toontown/town/MMStreet.py +++ b/toontown/town/MMStreet.py @@ -1,6 +1,5 @@ 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 c1945f5..a46659e 100644 --- a/toontown/town/MMTownLoader.py +++ b/toontown/town/MMTownLoader.py @@ -1,8 +1,7 @@ +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 93c0adf..5f0238a 100644 --- a/toontown/town/Street.py +++ b/toontown/town/Street.py @@ -1,23 +1,19 @@ 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.building import Elevator 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.hood import ZoneUtil -from toontown.toon.Toon import teleportDebug from toontown.toonbase import ToontownGlobals - +from toontown.toon.Toon import teleportDebug +from direct.interval.IntervalGlobal import * visualizeZones = ConfigVariableBool('visualize-zones', 0).value class Street(BattlePlace.BattlePlace): diff --git a/toontown/town/TTStreet.py b/toontown/town/TTStreet.py index 282967f..1c34cb8 100644 --- a/toontown/town/TTStreet.py +++ b/toontown/town/TTStreet.py @@ -1,6 +1,5 @@ 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 9bd9c1d..b929c0a 100644 --- a/toontown/town/TTTownLoader.py +++ b/toontown/town/TTTownLoader.py @@ -1,8 +1,7 @@ +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 3c6a26d..ee417f9 100644 --- a/toontown/town/TownBattle.py +++ b/toontown/town/TownBattle.py @@ -1,19 +1,24 @@ -import types - -from direct.directnotify import DirectNotifyGlobal -from direct.fsm import ClassicFSM, State, StateData -from direct.gui.DirectGui import DGG -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 * +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 . import (TownBattleAttackPanel, TownBattleChooseAvatarPanel, TownBattleSOSPanel, TownBattleSOSPetInfoPanel, - TownBattleSOSPetSearchPanel, TownBattleToonPanel, TownBattleWaitPanel) - +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.gui.DirectGui import DGG +from toontown.battle import FireCogPanel class TownBattle(StateData.StateData): notify = DirectNotifyGlobal.directNotify.newCategory('TownBattle') diff --git a/toontown/town/TownBattleAttackPanel.py b/toontown/town/TownBattleAttackPanel.py index 13d3417..62bf84b 100644 --- a/toontown/town/TownBattleAttackPanel.py +++ b/toontown/town/TownBattleAttackPanel.py @@ -1,13 +1,9 @@ -import string - from panda3d.core import * - from direct.directnotify import DirectNotifyGlobal +import string from direct.fsm import StateData - -from toontown.toonbase.ToontownBattleGlobals import gagIsPaidOnly from toontown.toontowngui.TeaserPanel import TeaserPanel - +from toontown.toonbase.ToontownBattleGlobals import gagIsPaidOnly AttackPanelHidden = 0 def hideAttackPanel(flag): diff --git a/toontown/town/TownBattleChooseAvatarPanel.py b/toontown/town/TownBattleChooseAvatarPanel.py index d7b88f8..9021050 100644 --- a/toontown/town/TownBattleChooseAvatarPanel.py +++ b/toontown/town/TownBattleChooseAvatarPanel.py @@ -1,13 +1,11 @@ -from panda3d.core import * - -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 * - +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 class TownBattleChooseAvatarPanel(StateData.StateData): notify = DirectNotifyGlobal.directNotify.newCategory('ChooseAvatarPanel') diff --git a/toontown/town/TownBattleSOSPanel.py b/toontown/town/TownBattleSOSPanel.py index cf5b27c..5144f7d 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 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 * - +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 class TownBattleSOSPanel(DirectFrame, StateData.StateData): notify = DirectNotifyGlobal.directNotify.newCategory('TownBattleSOSPanel') diff --git a/toontown/town/TownBattleSOSPetInfoPanel.py b/toontown/town/TownBattleSOSPetInfoPanel.py index b6973a0..be0cdb6 100644 --- a/toontown/town/TownBattleSOSPetInfoPanel.py +++ b/toontown/town/TownBattleSOSPetInfoPanel.py @@ -1,15 +1,12 @@ from panda3d.core import * - from direct.fsm import StateData from direct.gui.DirectGui import * - -from otp.otpbase import OTPLocalizer -from otp.speedchat import SCSettings, SpeedChatGlobals - -from toontown.pets import Pet, PetDetailPanel, PetTricks -from toontown.speedchat import TTSCPetTrickMenu +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 class TownBattleSOSPetInfoPanel(StateData.StateData): diff --git a/toontown/town/TownBattleSOSPetSearchPanel.py b/toontown/town/TownBattleSOSPetSearchPanel.py index dbcc662..9dd52f4 100644 --- a/toontown/town/TownBattleSOSPetSearchPanel.py +++ b/toontown/town/TownBattleSOSPetSearchPanel.py @@ -1,11 +1,9 @@ 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 2c35817..cfa885d 100644 --- a/toontown/town/TownBattleToonPanel.py +++ b/toontown/town/TownBattleToonPanel.py @@ -1,15 +1,13 @@ -import string - from panda3d.core import * - -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 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 class TownBattleToonPanel(DirectFrame): notify = DirectNotifyGlobal.directNotify.newCategory('TownBattleToonPanel') diff --git a/toontown/town/TownBattleWaitPanel.py b/toontown/town/TownBattleWaitPanel.py index 712d883..fb3075d 100644 --- a/toontown/town/TownBattleWaitPanel.py +++ b/toontown/town/TownBattleWaitPanel.py @@ -1,11 +1,9 @@ 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 9f468a6..71b37a3 100644 --- a/toontown/town/TownLoader.py +++ b/toontown/town/TownLoader.py @@ -1,24 +1,25 @@ 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.hood import Place, QuietZoneState, ZoneUtil +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.toon import Toon from toontown.toon.Toon import teleportDebug -from toontown.toonbase.ToontownGlobals import * - -from . import TownBattle - +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 * class TownLoader(StateData.StateData): notify = DirectNotifyGlobal.directNotify.newCategory('TownLoader') diff --git a/toontown/town/TutorialStreet.py b/toontown/town/TutorialStreet.py index 0ed471d..e30f5af 100644 --- a/toontown/town/TutorialStreet.py +++ b/toontown/town/TutorialStreet.py @@ -1,6 +1,5 @@ from . import TTStreet - class TutorialStreet(TTStreet.TTStreet): def enter(self, requestStatus): diff --git a/toontown/town/TutorialTownLoader.py b/toontown/town/TutorialTownLoader.py index 5ba9d8c..808930c 100644 --- a/toontown/town/TutorialTownLoader.py +++ b/toontown/town/TutorialTownLoader.py @@ -1,9 +1,9 @@ -from toontown.hood import ZoneUtil +from . import TownLoader +from . import TTTownLoader +from . import TutorialStreet from toontown.suit import Suit from toontown.toon import Toon - -from . import TownLoader, TTTownLoader, TutorialStreet - +from toontown.hood import ZoneUtil class TutorialTownLoader(TTTownLoader.TTTownLoader): diff --git a/toontown/trolley/Trolley.py b/toontown/trolley/Trolley.py index 9df697d..42c759f 100644 --- a/toontown/trolley/Trolley.py +++ b/toontown/trolley/Trolley.py @@ -1,14 +1,15 @@ 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.toonbase import ToontownGlobals, TTLocalizer 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 class Trolley(StateData.StateData): notify = DirectNotifyGlobal.directNotify.newCategory('Trolley') diff --git a/toontown/tutorial/DistributedBattleTutorial.py b/toontown/tutorial/DistributedBattleTutorial.py index e84a682..34a8c55 100644 --- a/toontown/tutorial/DistributedBattleTutorial.py +++ b/toontown/tutorial/DistributedBattleTutorial.py @@ -1,7 +1,5 @@ -from direct.directnotify import DirectNotifyGlobal - from toontown.battle import DistributedBattle - +from direct.directnotify import DirectNotifyGlobal class DistributedBattleTutorial(DistributedBattle.DistributedBattle): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedBattleTutorial') diff --git a/toontown/tutorial/DistributedBattleTutorialAI.py b/toontown/tutorial/DistributedBattleTutorialAI.py index e0b15c5..8b38b35 100644 --- a/toontown/tutorial/DistributedBattleTutorialAI.py +++ b/toontown/tutorial/DistributedBattleTutorialAI.py @@ -1,11 +1,9 @@ -from direct.directnotify import DirectNotifyGlobal - from toontown.battle import DistributedBattleAI - +from direct.directnotify import DirectNotifyGlobal 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 3c94ff7..a5232a2 100644 --- a/toontown/tutorial/SuitPlannerTutorialAI.py +++ b/toontown/tutorial/SuitPlannerTutorialAI.py @@ -2,15 +2,12 @@ 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 @@ -53,7 +50,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 e9e176c..b19f20e 100644 --- a/toontown/tutorial/TutorialBattleManagerAI.py +++ b/toontown/tutorial/TutorialBattleManagerAI.py @@ -1,10 +1,7 @@ -from direct.directnotify import DirectNotifyGlobal - from toontown.battle import BattleManagerAI - +from direct.directnotify import DirectNotifyGlobal 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 218eac7..5329a2a 100644 --- a/toontown/tutorial/TutorialForceAcknowledge.py +++ b/toontown/tutorial/TutorialForceAcknowledge.py @@ -1,8 +1,6 @@ from panda3d.core import * - -from toontown.toonbase import TTLocalizer from toontown.toontowngui import TTDialog - +from toontown.toonbase import TTLocalizer class TutorialForceAcknowledge: diff --git a/toontown/tutorial/TutorialManager.py b/toontown/tutorial/TutorialManager.py index c3c452b..e8a641e 100644 --- a/toontown/tutorial/TutorialManager.py +++ b/toontown/tutorial/TutorialManager.py @@ -1,11 +1,8 @@ from panda3d.core import * - -from direct.directnotify import DirectNotifyGlobal from direct.distributed import DistributedObject - +from direct.directnotify import DirectNotifyGlobal 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 1acb373..ae89ac1 100644 --- a/toontown/tutorial/TutorialManagerAI.py +++ b/toontown/tutorial/TutorialManagerAI.py @@ -1,18 +1,15 @@ +from otp.ai.AIBaseGlobal import * from panda3d.core import * from panda3d.toontown import * - -from direct.directnotify import DirectNotifyGlobal 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.toonbase import ToontownBattleGlobals - +from direct.directnotify import DirectNotifyGlobal +from toontown.building import TutorialBuildingAI +from toontown.building import TutorialHQBuildingAI from . import SuitPlannerTutorialAI - +from toontown.toonbase import ToontownBattleGlobals +from toontown.toon import NPCToons +from toontown.ai import BlackCatHolidayMgrAI +from toontown.ai import DistributedBlackCatMgrAI class TutorialManagerAI(DistributedObjectAI.DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory("TutorialManagerAI") @@ -30,7 +27,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") @@ -47,13 +44,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): @@ -127,7 +124,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() @@ -146,7 +143,7 @@ class TutorialManagerAI(DistributedObjectAI.DistributedObjectAI): def battleOverCallback(zoneId): hqBuilding.battleOverCallback() building.battleOverCallback() - + # Create a suit planner suitPlanner = SuitPlannerTutorialAI.SuitPlannerTutorialAI( self.air, @@ -164,7 +161,7 @@ class TutorialManagerAI(DistributedObjectAI.DistributedObjectAI): blackCatMgr = DistributedBlackCatMgrAI.DistributedBlackCatMgrAI( self.air, avId) blackCatMgr.generateWithRequired(streetZone) - + zoneDict={"branchZone" : branchZone, "streetZone" : streetZone, "shopZone" : shopZone, @@ -234,7 +231,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, @@ -242,7 +239,7 @@ class TutorialManagerAI(DistributedObjectAI.DistributedObjectAI): 1000, 1 ) - + self.air.questManager.completeAllQuestsMagically(av) av.removeQuest(101) self.air.questManager.assignQuest(avId, @@ -273,7 +270,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) @@ -282,7 +279,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.""" @@ -303,12 +300,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, @@ -321,3 +318,5 @@ 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 caff6fe..7b20d36 100644 --- a/toontown/uberdog/DataStore.py +++ b/toontown/uberdog/DataStore.py @@ -1,14 +1,11 @@ -import dbm -import os -import pickle -import sys -import time - -from panda3d.core import ConfigVariableBool - from direct.directnotify import DirectNotifyGlobal +from panda3d.core import ConfigVariableBool from direct.task import Task - +import pickle +import os +import sys +import dbm +import time class DataStore: QueryTypes = [] diff --git a/toontown/uberdog/DataStoreGlobals.py b/toontown/uberdog/DataStoreGlobals.py index 47d7f19..dddb413 100644 --- a/toontown/uberdog/DataStoreGlobals.py +++ b/toontown/uberdog/DataStoreGlobals.py @@ -1,6 +1,5 @@ -from toontown.uberdog.DataStore import * from toontown.uberdog.ScavengerHuntDataStore import * - +from toontown.uberdog.DataStore import * SH = 1 GEN = 2 TYPES = {SH: (ScavengerHuntDataStore,), diff --git a/toontown/uberdog/DistributedCpuInfoMgr.py b/toontown/uberdog/DistributedCpuInfoMgr.py index e1bfb5a..2043edf 100644 --- a/toontown/uberdog/DistributedCpuInfoMgr.py +++ b/toontown/uberdog/DistributedCpuInfoMgr.py @@ -1,5 +1,4 @@ from direct.distributed.DistributedObjectGlobal import DistributedObjectGlobal - class DistributedCpuInfoMgr(DistributedObjectGlobal): pass diff --git a/toontown/uberdog/DistributedCpuInfoMgrAI.py b/toontown/uberdog/DistributedCpuInfoMgrAI.py index ebb3eec..b508d3b 100644 --- a/toontown/uberdog/DistributedCpuInfoMgrAI.py +++ b/toontown/uberdog/DistributedCpuInfoMgrAI.py @@ -1,6 +1,5 @@ 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 6eba4cf..bc1eabb 100644 --- a/toontown/uberdog/DistributedCpuInfoMgrUD.py +++ b/toontown/uberdog/DistributedCpuInfoMgrUD.py @@ -1,6 +1,5 @@ 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 2133083..b21a6f0 100644 --- a/toontown/uberdog/DistributedDataStoreManager.py +++ b/toontown/uberdog/DistributedDataStoreManager.py @@ -1,8 +1,6 @@ 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 17303ae..f0e65ad 100644 --- a/toontown/uberdog/DistributedDataStoreManagerAI.py +++ b/toontown/uberdog/DistributedDataStoreManagerAI.py @@ -1,6 +1,5 @@ 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 0ec346d..41176ae 100644 --- a/toontown/uberdog/DistributedDataStoreManagerUD.py +++ b/toontown/uberdog/DistributedDataStoreManagerUD.py @@ -1,6 +1,5 @@ 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 3736671..2644a37 100644 --- a/toontown/uberdog/DistributedDeliveryManager.py +++ b/toontown/uberdog/DistributedDeliveryManager.py @@ -1,9 +1,7 @@ from panda3d.core import * - from direct.distributed.DistributedObject import DistributedObject - -from toontown.catalog import CatalogItem, CatalogItemList - +from toontown.catalog import CatalogItemList +from toontown.catalog import CatalogItem class DistributedDeliveryManager(DistributedObject): neverDisable = 1 diff --git a/toontown/uberdog/DistributedDeliveryManagerAI.py b/toontown/uberdog/DistributedDeliveryManagerAI.py index 4479e9e..fa164f6 100644 --- a/toontown/uberdog/DistributedDeliveryManagerAI.py +++ b/toontown/uberdog/DistributedDeliveryManagerAI.py @@ -1,6 +1,5 @@ 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 009328f..167c52d 100644 --- a/toontown/uberdog/DistributedDeliveryManagerUD.py +++ b/toontown/uberdog/DistributedDeliveryManagerUD.py @@ -1,6 +1,5 @@ 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 7b416ef..72f2b2e 100644 --- a/toontown/uberdog/DistributedInGameNewsMgr.py +++ b/toontown/uberdog/DistributedInGameNewsMgr.py @@ -1,14 +1,11 @@ +import socket import datetime import os -import socket - -from direct.distributed.DistributedObject import DistributedObject from direct.distributed.DistributedObjectGlobal import DistributedObjectGlobal - +from direct.distributed.DistributedObject import DistributedObject 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 8cf85e8..ed199d1 100644 --- a/toontown/uberdog/DistributedInGameNewsMgrAI.py +++ b/toontown/uberdog/DistributedInGameNewsMgrAI.py @@ -1,7 +1,6 @@ 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 f358948..00caf75 100644 --- a/toontown/uberdog/DistributedInGameNewsMgrUD.py +++ b/toontown/uberdog/DistributedInGameNewsMgrUD.py @@ -1,6 +1,5 @@ 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 22544aa..59cbfde 100644 --- a/toontown/uberdog/DistributedMailManager.py +++ b/toontown/uberdog/DistributedMailManager.py @@ -1,5 +1,4 @@ from direct.distributed.DistributedObject import DistributedObject - class DistributedMailManager(DistributedObject): neverDisable = 1 diff --git a/toontown/uberdog/DistributedMailManagerAI.py b/toontown/uberdog/DistributedMailManagerAI.py index 9739505..9d5acfe 100644 --- a/toontown/uberdog/DistributedMailManagerAI.py +++ b/toontown/uberdog/DistributedMailManagerAI.py @@ -1,6 +1,5 @@ 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 3059ad2..9f67093 100644 --- a/toontown/uberdog/DistributedMailManagerUD.py +++ b/toontown/uberdog/DistributedMailManagerUD.py @@ -1,6 +1,5 @@ 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 e4383d8..30a2c7e 100644 --- a/toontown/uberdog/DistributedPartyManager.py +++ b/toontown/uberdog/DistributedPartyManager.py @@ -1,12 +1,10 @@ -from panda3d.otp import CFSpeech, CFTimeout - from direct.distributed.DistributedObject import DistributedObject from direct.distributed.DistributedObjectGlobal import DistributedObjectGlobal - -from toontown.parties import PartyGlobals +from panda3d.otp import CFSpeech, CFTimeout +from toontown.toonbase import ToontownGlobals +from toontown.toonbase import TTLocalizer from toontown.toon import ToonDNA -from toontown.toonbase import ToontownGlobals, TTLocalizer - +from toontown.parties import PartyGlobals class DistributedPartyManager(DistributedObject): neverDisable = 1 diff --git a/toontown/uberdog/DistributedPartyManagerAI.py b/toontown/uberdog/DistributedPartyManagerAI.py index 41dff4a..75866e7 100644 --- a/toontown/uberdog/DistributedPartyManagerAI.py +++ b/toontown/uberdog/DistributedPartyManagerAI.py @@ -1,7 +1,6 @@ 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 d9e8d04..acff337 100644 --- a/toontown/uberdog/DistributedPartyManagerUD.py +++ b/toontown/uberdog/DistributedPartyManagerUD.py @@ -1,6 +1,5 @@ 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 bf8b36d..98fbf89 100644 --- a/toontown/uberdog/DistributedSecurityMgr.py +++ b/toontown/uberdog/DistributedSecurityMgr.py @@ -1,13 +1,10 @@ +import socket import datetime import os -import socket - -from direct.distributed.DistributedObject import DistributedObject from direct.distributed.DistributedObjectGlobal import DistributedObjectGlobal - +from direct.distributed.DistributedObject import DistributedObject 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 f411aae..2fec39c 100644 --- a/toontown/uberdog/DistributedSecurityMgrAI.py +++ b/toontown/uberdog/DistributedSecurityMgrAI.py @@ -1,6 +1,5 @@ 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 966c73a..77db775 100644 --- a/toontown/uberdog/DistributedSecurityMgrUD.py +++ b/toontown/uberdog/DistributedSecurityMgrUD.py @@ -1,6 +1,5 @@ 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 5afe6d8..e8672d2 100644 --- a/toontown/uberdog/DistributedWhitelistMgr.py +++ b/toontown/uberdog/DistributedWhitelistMgr.py @@ -1,13 +1,10 @@ +import socket import datetime import os -import socket - -from direct.distributed.DistributedObject import DistributedObject from direct.distributed.DistributedObjectGlobal import DistributedObjectGlobal - +from direct.distributed.DistributedObject import DistributedObject 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 5ecce53..88fd5ce 100644 --- a/toontown/uberdog/DistributedWhitelistMgrAI.py +++ b/toontown/uberdog/DistributedWhitelistMgrAI.py @@ -1,6 +1,5 @@ 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 dce95c0..6c39f1f 100644 --- a/toontown/uberdog/DistributedWhitelistMgrUD.py +++ b/toontown/uberdog/DistributedWhitelistMgrUD.py @@ -1,6 +1,5 @@ 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 9466c4d..33e548b 100644 --- a/toontown/uberdog/ScavengerHuntDataStore.py +++ b/toontown/uberdog/ScavengerHuntDataStore.py @@ -1,8 +1,6 @@ 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 cb9984c..1bb965c 100644 --- a/toontown/uberdog/TTSpeedchatRelay.py +++ b/toontown/uberdog/TTSpeedchatRelay.py @@ -1,10 +1,8 @@ -from direct.directnotify.DirectNotifyGlobal import directNotify from direct.distributed.DistributedObjectGlobal import DistributedObjectGlobal - +from direct.directnotify.DirectNotifyGlobal import directNotify from otp.otpbase import OTPGlobals -from otp.uberdog import SpeedchatRelayGlobals from otp.uberdog.SpeedchatRelay import SpeedchatRelay - +from otp.uberdog import SpeedchatRelayGlobals class TTSpeedchatRelay(SpeedchatRelay): diff --git a/toontown/uberdog/TTSpeedchatRelayUD.py b/toontown/uberdog/TTSpeedchatRelayUD.py index 24d9232..e5c41ce 100644 --- a/toontown/uberdog/TTSpeedchatRelayUD.py +++ b/toontown/uberdog/TTSpeedchatRelayUD.py @@ -1,6 +1,5 @@ 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 4544883..9ee9b85 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 75b8e51..332a2cd 100644 --- a/toontown/uberdog/UDStart.py +++ b/toontown/uberdog/UDStart.py @@ -1,7 +1,7 @@ -import argparse +from panda3d.core import * import builtins -from panda3d.core import * +import argparse parser = argparse.ArgumentParser(description="Open Toontown - UberDOG Server") parser.add_argument('--base-channel', help='The base channel that the server will use.') @@ -41,7 +41,6 @@ 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 9759fcb..18db2f1 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 1104187..4d60e2f 100644 --- a/win32/.vscode/tasks.json +++ b/win32/.vscode/tasks.json @@ -44,4 +44,4 @@ } }, ] - } + } \ No newline at end of file