pre-commit: Implement pre-commit script, config and run isort on codebase
This commit is contained in:
parent
a5ecbb8b1e
commit
406fcc9786
|
|
@ -0,0 +1,15 @@
|
|||
# See https://pre-commit.com for more information
|
||||
# See https://pre-commit.com/hooks.html for more hooks
|
||||
repos:
|
||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||
rev: v3.2.0
|
||||
hooks:
|
||||
- id: trailing-whitespace
|
||||
- id: end-of-file-fixer
|
||||
- id: check-yaml
|
||||
- id: check-added-large-files
|
||||
- repo: https://github.com/pycqa/isort
|
||||
rev: 5.12.0
|
||||
hooks:
|
||||
- id: isort
|
||||
name: isort (python)
|
||||
|
|
@ -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
|
||||
```
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -1,21 +1,23 @@
|
|||
from panda3d.core import *
|
||||
from direct.directnotify.DirectNotifyGlobal import *
|
||||
from direct.showbase import DConfig
|
||||
from direct.showbase.MessengerGlobal import *
|
||||
from direct.showbase.BulletinBoardGlobal import *
|
||||
from direct.task.TaskManagerGlobal import *
|
||||
from direct.showbase.JobManagerGlobal import *
|
||||
from direct.showbase.EventManagerGlobal import *
|
||||
from direct.showbase.PythonUtil import *
|
||||
from otp.otpbase import PythonUtil
|
||||
from direct.interval.IntervalManager import ivalMgr
|
||||
from direct.task import Task
|
||||
from direct.showbase import EventManager
|
||||
from direct.showbase import ExceptionVarDump
|
||||
import gc
|
||||
import math
|
||||
import sys
|
||||
import time
|
||||
import gc
|
||||
|
||||
from panda3d.core import *
|
||||
|
||||
from direct.directnotify.DirectNotifyGlobal import *
|
||||
from direct.interval.IntervalManager import ivalMgr
|
||||
from direct.showbase import DConfig, EventManager, ExceptionVarDump
|
||||
from direct.showbase.BulletinBoardGlobal import *
|
||||
from direct.showbase.EventManagerGlobal import *
|
||||
from direct.showbase.JobManagerGlobal import *
|
||||
from direct.showbase.MessengerGlobal import *
|
||||
from direct.showbase.PythonUtil import *
|
||||
from direct.task import Task
|
||||
from direct.task.TaskManagerGlobal import *
|
||||
|
||||
from otp.otpbase import PythonUtil
|
||||
|
||||
|
||||
class AIBase:
|
||||
notify = directNotify.newCategory('AIBase')
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
from .AIBase import *
|
||||
|
||||
__builtins__['simbase'] = AIBase()
|
||||
__builtins__['ostream'] = Notify.out()
|
||||
__builtins__['run'] = simbase.run
|
||||
|
|
@ -10,6 +11,7 @@ __builtins__['bboard'] = simbase.bboard
|
|||
__builtins__['config'] = simbase.config
|
||||
__builtins__['directNotify'] = directNotify
|
||||
from direct.showbase import Loader
|
||||
|
||||
simbase.loader = Loader.Loader(simbase)
|
||||
__builtins__['loader'] = simbase.loader
|
||||
directNotify.setDconfigLevels()
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
from otp.distributed.OtpDoGlobals import *
|
||||
from direct.showbase.PythonUtil import invertDictLossless
|
||||
|
||||
from otp.distributed.OtpDoGlobals import *
|
||||
|
||||
OTP_SERVER_ROOT_DO_ID = 4007
|
||||
CHANNEL_CLIENT_BROADCAST = 4014
|
||||
BAD_CHANNEL_ID = 0
|
||||
|
|
|
|||
|
|
@ -1,11 +1,15 @@
|
|||
from panda3d.core import *
|
||||
from direct.distributed import ParentMgr
|
||||
from direct.directnotify.DirectNotifyGlobal import directNotify
|
||||
from direct.task import Task
|
||||
from direct.showbase import LeakDetectors
|
||||
from otp.otpbase import OTPGlobals
|
||||
import random
|
||||
|
||||
from panda3d.core import *
|
||||
|
||||
from direct.directnotify.DirectNotifyGlobal import directNotify
|
||||
from direct.distributed import ParentMgr
|
||||
from direct.showbase import LeakDetectors
|
||||
from direct.task import Task
|
||||
|
||||
from otp.otpbase import OTPGlobals
|
||||
|
||||
|
||||
class AIZoneData:
|
||||
notify = directNotify.newCategory('AIZoneData')
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,13 @@
|
|||
import urllib.request, urllib.parse, urllib.error
|
||||
import os
|
||||
import urllib.error
|
||||
import urllib.parse
|
||||
import urllib.request
|
||||
|
||||
from panda3d.core import HTTPClient, Ramfile
|
||||
|
||||
from direct.directnotify import DirectNotifyGlobal
|
||||
|
||||
|
||||
class BanManagerAI:
|
||||
notify = DirectNotifyGlobal.directNotify.newCategory('BanManagerAI')
|
||||
BanUrl = simbase.config.GetString('ban-base-url', 'http://vapps.disl.starwave.com:8005/dis-hold/action/event')
|
||||
|
|
|
|||
|
|
@ -1,8 +1,11 @@
|
|||
from otp.ai.AIBase import *
|
||||
from direct.task import Task
|
||||
from direct.showbase import DirectObject
|
||||
import random
|
||||
|
||||
from direct.showbase import DirectObject
|
||||
from direct.task import Task
|
||||
|
||||
from otp.ai.AIBase import *
|
||||
|
||||
|
||||
class Barrier(DirectObject.DirectObject):
|
||||
notify = directNotify.newCategory('Barrier')
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
from direct.showbase.DirectObject import DirectObject
|
||||
from direct.showbase import GarbageReport
|
||||
from direct.showbase.DirectObject import DirectObject
|
||||
|
||||
|
||||
class GarbageLeakServerEventAggregator(DirectObject):
|
||||
|
||||
|
|
|
|||
|
|
@ -1,18 +1,21 @@
|
|||
from panda3d.core import *
|
||||
from direct.showbase.DirectObject import *
|
||||
from direct.distributed.ClockDelta import *
|
||||
from direct.task import Task
|
||||
from direct.distributed import DistributedObject
|
||||
from direct.directnotify import DirectNotifyGlobal
|
||||
from otp.otpbase import OTPGlobals
|
||||
from direct.showbase import PythonUtil
|
||||
from otp.otpbase.PythonUtil import describeException
|
||||
from direct.showbase import GarbageReport
|
||||
import base64
|
||||
import time
|
||||
import os
|
||||
import sys
|
||||
import re
|
||||
import sys
|
||||
import time
|
||||
|
||||
from panda3d.core import *
|
||||
|
||||
from direct.directnotify import DirectNotifyGlobal
|
||||
from direct.distributed import DistributedObject
|
||||
from direct.distributed.ClockDelta import *
|
||||
from direct.showbase import GarbageReport, PythonUtil
|
||||
from direct.showbase.DirectObject import *
|
||||
from direct.task import Task
|
||||
|
||||
from otp.otpbase import OTPGlobals
|
||||
from otp.otpbase.PythonUtil import describeException
|
||||
|
||||
|
||||
class TimeManager(DistributedObject.DistributedObject):
|
||||
notify = DirectNotifyGlobal.directNotify.newCategory('TimeManager')
|
||||
|
|
|
|||
|
|
@ -1,15 +1,17 @@
|
|||
import random
|
||||
|
||||
from panda3d.core import *
|
||||
from panda3d.otp import Nametag, NametagGroup
|
||||
from panda3d.otp import CFSpeech, CFThought, CFTimeout, CFPageButton, CFNoQuitButton, CFQuitButton
|
||||
from otp.otpbase import OTPGlobals
|
||||
from otp.otpbase import OTPLocalizer
|
||||
from panda3d.otp import (CFNoQuitButton, CFPageButton, CFQuitButton, CFSpeech, CFThought, CFTimeout, Nametag,
|
||||
NametagGroup)
|
||||
|
||||
from direct.actor.Actor import Actor
|
||||
from direct.directnotify import DirectNotifyGlobal
|
||||
from direct.distributed import ClockDelta
|
||||
|
||||
from otp.avatar.ShadowCaster import ShadowCaster
|
||||
import random
|
||||
from otp.otpbase import OTPRender
|
||||
from otp.otpbase import OTPGlobals, OTPLocalizer, OTPRender
|
||||
from otp.otpbase.PythonUtil import recordCreationStack
|
||||
|
||||
teleportNotify = DirectNotifyGlobal.directNotify.newCategory('Teleport')
|
||||
teleportNotify.showTime = True
|
||||
if ConfigVariableBool('want-teleport-debug', 1).value:
|
||||
|
|
|
|||
|
|
@ -1,8 +1,11 @@
|
|||
from panda3d.core import *
|
||||
from direct.directnotify.DirectNotifyGlobal import *
|
||||
import random
|
||||
|
||||
from panda3d.core import *
|
||||
|
||||
from direct.directnotify.DirectNotifyGlobal import *
|
||||
from direct.distributed.PyDatagram import PyDatagram
|
||||
from direct.distributed.PyDatagramIterator import PyDatagramIterator
|
||||
|
||||
notify = directNotify.newCategory('AvatarDNA')
|
||||
|
||||
class AvatarDNA:
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
from direct.directnotify.DirectNotifyGlobal import directNotify
|
||||
|
||||
from otp.avatar import Avatar
|
||||
|
||||
|
||||
class AvatarDetail:
|
||||
notify = directNotify.newCategory('AvatarDetail')
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,11 @@
|
|||
from panda3d.core import *
|
||||
|
||||
from direct.distributed import DistributedObject
|
||||
from direct.gui.DirectGui import *
|
||||
from direct.showbase import DirectObject
|
||||
|
||||
from . import Avatar
|
||||
from direct.distributed import DistributedObject
|
||||
|
||||
|
||||
class AvatarPanel(DirectObject.DirectObject):
|
||||
currentAvatarPanel = None
|
||||
|
|
|
|||
|
|
@ -1,20 +1,23 @@
|
|||
import time
|
||||
import string
|
||||
from panda3d.core import *
|
||||
from direct.distributed import DistributedNode
|
||||
from direct.actor.DistributedActor import DistributedActor
|
||||
from direct.interval.IntervalGlobal import *
|
||||
from direct.task import Task
|
||||
from direct.showbase import PythonUtil
|
||||
from panda3d.otp import Nametag
|
||||
from otp.otpbase import OTPGlobals
|
||||
from otp.otpbase import OTPLocalizer
|
||||
from otp.speedchat import SCDecoders
|
||||
from otp.chat import ChatGarbler
|
||||
from otp.chat import ChatManager
|
||||
import random
|
||||
from .Avatar import Avatar
|
||||
import string
|
||||
import time
|
||||
|
||||
from panda3d.core import *
|
||||
from panda3d.otp import Nametag
|
||||
|
||||
from direct.actor.DistributedActor import DistributedActor
|
||||
from direct.distributed import DistributedNode
|
||||
from direct.interval.IntervalGlobal import *
|
||||
from direct.showbase import PythonUtil
|
||||
from direct.task import Task
|
||||
|
||||
from otp.chat import ChatGarbler, ChatManager
|
||||
from otp.otpbase import OTPGlobals, OTPLocalizer
|
||||
from otp.speedchat import SCDecoders
|
||||
|
||||
from . import AvatarDNA
|
||||
from .Avatar import Avatar
|
||||
|
||||
|
||||
class DistributedAvatar(DistributedActor, Avatar):
|
||||
HpTextGenerator = TextNode('HpTextGenerator')
|
||||
|
|
|
|||
|
|
@ -1,9 +1,10 @@
|
|||
from direct.distributed import DistributedNodeAI
|
||||
from direct.fsm import ClassicFSM, State
|
||||
from direct.task import Task
|
||||
|
||||
from otp.ai.AIBaseGlobal import *
|
||||
from otp.otpbase import OTPGlobals
|
||||
from direct.fsm import ClassicFSM
|
||||
from direct.fsm import State
|
||||
from direct.distributed import DistributedNodeAI
|
||||
from direct.task import Task
|
||||
|
||||
|
||||
class DistributedAvatarAI(DistributedNodeAI.DistributedNodeAI):
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
from direct.directnotify import DirectNotifyGlobal
|
||||
from direct.distributed.DistributedObjectUD import DistributedObjectUD
|
||||
|
||||
|
||||
class DistributedAvatarUD(DistributedObjectUD):
|
||||
notify = DirectNotifyGlobal.directNotify.newCategory('DistributedAvatarUD')
|
||||
|
|
|
|||
|
|
@ -1,18 +1,17 @@
|
|||
from panda3d.core import *
|
||||
from panda3d.otp import WhisperPopup
|
||||
from panda3d.otp import CFQuicktalker, CFPageButton, CFQuitButton, CFSpeech, CFThought, CFTimeout
|
||||
from otp.chat import ChatGarbler
|
||||
from otp.otpbase import OTPLocalizer
|
||||
from otp.speedchat import SCDecoders
|
||||
from otp.avatar import DistributedAvatar
|
||||
from otp.avatar import Avatar, PlayerBase
|
||||
from otp.chat import TalkAssistant
|
||||
from otp.otpbase import OTPGlobals
|
||||
from panda3d.otp import CFPageButton, CFQuicktalker, CFQuitButton, CFSpeech, CFThought, CFTimeout, WhisperPopup
|
||||
|
||||
from otp.avatar import Avatar, DistributedAvatar, PlayerBase
|
||||
from otp.avatar.Avatar import teleportNotify
|
||||
from otp.chat import ChatGarbler, TalkAssistant
|
||||
from otp.distributed.TelemetryLimited import TelemetryLimited
|
||||
from otp.otpbase import OTPGlobals, OTPLocalizer
|
||||
from otp.speedchat import SCDecoders
|
||||
|
||||
if ConfigVariableBool('want-chatfilter-hacks', 0).value:
|
||||
from otp.switchboard import badwordpy
|
||||
import os
|
||||
|
||||
from otp.switchboard import badwordpy
|
||||
badwordpy.init(os.environ.get('OTP') + '\\src\\switchboard\\', '')
|
||||
|
||||
class DistributedPlayer(DistributedAvatar.DistributedAvatar, PlayerBase.PlayerBase, TelemetryLimited):
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
from direct.showbase import GarbageReport
|
||||
|
||||
from otp.ai.AIBaseGlobal import *
|
||||
from otp.avatar import DistributedAvatarAI
|
||||
from otp.avatar import PlayerBase
|
||||
from otp.avatar import DistributedAvatarAI, PlayerBase
|
||||
from otp.distributed.ClsendTracker import ClsendTracker
|
||||
from otp.otpbase import OTPGlobals
|
||||
|
||||
|
||||
class DistributedPlayerAI(DistributedAvatarAI.DistributedAvatarAI, PlayerBase.PlayerBase, ClsendTracker):
|
||||
|
||||
def __init__(self, air):
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
from otp.otpbase import OTPLocalizer
|
||||
|
||||
|
||||
class Emote:
|
||||
EmoteClear = -1
|
||||
EmoteEnableStateChanged = 'EmoteEnableStateChanged'
|
||||
|
|
|
|||
|
|
@ -1,23 +1,27 @@
|
|||
from panda3d.core import *
|
||||
from panda3d.otp import Nametag, WhisperPopup
|
||||
from direct.gui.DirectGui import *
|
||||
from direct.showbase.PythonUtil import *
|
||||
from direct.interval.IntervalGlobal import *
|
||||
from direct.showbase.InputStateGlobal import inputState
|
||||
from direct.controls import ControlManager
|
||||
from . import DistributedAvatar
|
||||
from direct.task import Task
|
||||
from otp.otpbase import OTPGlobals
|
||||
import math
|
||||
import random
|
||||
from direct.directnotify import DirectNotifyGlobal
|
||||
from direct.distributed import DistributedSmoothNode
|
||||
from otp.otpbase import OTPLocalizer
|
||||
|
||||
from panda3d.core import *
|
||||
from panda3d.otp import Nametag, WhisperPopup
|
||||
|
||||
from direct.controls import ControlManager
|
||||
from direct.controls.GhostWalker import GhostWalker
|
||||
from direct.controls.GravityWalker import GravityWalker
|
||||
from direct.controls.ObserverWalker import ObserverWalker
|
||||
from direct.controls.SwimWalker import SwimWalker
|
||||
from direct.controls.TwoDWalker import TwoDWalker
|
||||
from direct.directnotify import DirectNotifyGlobal
|
||||
from direct.distributed import DistributedSmoothNode
|
||||
from direct.gui.DirectGui import *
|
||||
from direct.interval.IntervalGlobal import *
|
||||
from direct.showbase.InputStateGlobal import inputState
|
||||
from direct.showbase.PythonUtil import *
|
||||
from direct.task import Task
|
||||
|
||||
from otp.otpbase import OTPGlobals, OTPLocalizer
|
||||
|
||||
from . import DistributedAvatar
|
||||
|
||||
|
||||
class LocalAvatar(DistributedAvatar.DistributedAvatar, DistributedSmoothNode.DistributedSmoothNode):
|
||||
notify = DirectNotifyGlobal.directNotify.newCategory('LocalAvatar')
|
||||
|
|
|
|||
|
|
@ -1,7 +1,10 @@
|
|||
from panda3d.core import *
|
||||
|
||||
from direct.showbase.DirectObject import DirectObject
|
||||
|
||||
from otp.otpbase import OTPGlobals
|
||||
|
||||
|
||||
class PositionExaminer(DirectObject, NodePath):
|
||||
|
||||
def __init__(self):
|
||||
|
|
|
|||
|
|
@ -1,8 +1,10 @@
|
|||
from panda3d.core import *
|
||||
from panda3d.core import *
|
||||
|
||||
from direct.directnotify import DirectNotifyGlobal
|
||||
from direct.showbase.ShadowPlacer import ShadowPlacer
|
||||
|
||||
from otp.otpbase import OTPGlobals
|
||||
|
||||
globalDropShadowFlag = 1
|
||||
|
||||
def setGlobalDropShadowFlag(flag):
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
from direct.showbase.PythonUtil import SerialNumGen
|
||||
from direct.task import Task
|
||||
|
||||
|
||||
class SpeedMonitor:
|
||||
notify = directNotify.newCategory('SpeedMonitor')
|
||||
SerialGen = SerialNumGen()
|
||||
|
|
|
|||
|
|
@ -1,7 +1,9 @@
|
|||
import string
|
||||
import random
|
||||
import string
|
||||
|
||||
from otp.otpbase import OTPLocalizer
|
||||
|
||||
|
||||
class ChatGarbler:
|
||||
|
||||
def garble(self, avatar, message):
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import string
|
||||
|
||||
NORMAL_CHAT = 1
|
||||
WHISPER_CHAT = 2
|
||||
GUILD_CHAT = 3
|
||||
|
|
|
|||
|
|
@ -1,9 +1,12 @@
|
|||
from direct.showbase import DirectObject
|
||||
from otp.otpbase import OTPGlobals
|
||||
import sys
|
||||
from direct.gui.DirectGui import *
|
||||
|
||||
from panda3d.core import *
|
||||
from otp.otpbase import OTPLocalizer
|
||||
|
||||
from direct.gui.DirectGui import *
|
||||
from direct.showbase import DirectObject
|
||||
|
||||
from otp.otpbase import OTPGlobals, OTPLocalizer
|
||||
|
||||
|
||||
class ChatInputNormal(DirectObject.DirectObject):
|
||||
ExecNamespace = None
|
||||
|
|
|
|||
|
|
@ -1,9 +1,12 @@
|
|||
from direct.showbase import DirectObject
|
||||
from otp.otpbase import OTPGlobals
|
||||
import sys
|
||||
from direct.gui.DirectGui import *
|
||||
|
||||
from panda3d.core import *
|
||||
from otp.otpbase import OTPLocalizer
|
||||
|
||||
from direct.gui.DirectGui import *
|
||||
from direct.showbase import DirectObject
|
||||
|
||||
from otp.otpbase import OTPGlobals, OTPLocalizer
|
||||
|
||||
|
||||
class ChatInputTyped(DirectObject.DirectObject):
|
||||
ExecNamespace = None
|
||||
|
|
|
|||
|
|
@ -1,13 +1,16 @@
|
|||
from direct.fsm import FSM
|
||||
from otp.otpbase import OTPGlobals
|
||||
import sys
|
||||
from direct.directnotify import DirectNotifyGlobal
|
||||
from direct.gui.DirectGui import *
|
||||
|
||||
from panda3d.core import *
|
||||
from panda3d.otp import *
|
||||
from otp.otpbase import OTPLocalizer
|
||||
|
||||
from direct.directnotify import DirectNotifyGlobal
|
||||
from direct.fsm import FSM
|
||||
from direct.gui.DirectGui import *
|
||||
from direct.task import Task
|
||||
|
||||
from otp.chat.ChatInputTyped import ChatInputTyped
|
||||
from otp.otpbase import OTPGlobals, OTPLocalizer
|
||||
|
||||
|
||||
class ChatInputWhiteListFrame(FSM.FSM, DirectFrame):
|
||||
notify = DirectNotifyGlobal.directNotify.newCategory('ChatInputWhiteList')
|
||||
|
|
|
|||
|
|
@ -1,14 +1,15 @@
|
|||
import string
|
||||
from direct.showbase import DirectObject
|
||||
from direct.fsm import ClassicFSM
|
||||
from direct.fsm import State
|
||||
from otp.login import SecretFriendsInfoPanel
|
||||
from otp.login import PrivacyPolicyPanel
|
||||
from otp.otpbase import OTPLocalizer
|
||||
from direct.directnotify import DirectNotifyGlobal
|
||||
from otp.login import LeaveToPayDialog
|
||||
from direct.gui.DirectGui import *
|
||||
|
||||
from panda3d.core import *
|
||||
|
||||
from direct.directnotify import DirectNotifyGlobal
|
||||
from direct.fsm import ClassicFSM, State
|
||||
from direct.gui.DirectGui import *
|
||||
from direct.showbase import DirectObject
|
||||
|
||||
from otp.login import LeaveToPayDialog, PrivacyPolicyPanel, SecretFriendsInfoPanel
|
||||
from otp.otpbase import OTPLocalizer
|
||||
|
||||
ChatEvent = 'ChatEvent'
|
||||
NormalChatEvent = 'NormalChatEvent'
|
||||
SCChatEvent = 'SCChatEvent'
|
||||
|
|
|
|||
|
|
@ -1,16 +1,19 @@
|
|||
import sys
|
||||
from direct.showbase import DirectObject
|
||||
from otp.otpbase import OTPLocalizer
|
||||
from direct.directnotify import DirectNotifyGlobal
|
||||
from otp.otpbase import OTPGlobals
|
||||
from otp.speedchat import SCDecoders
|
||||
from panda3d.core import *
|
||||
from otp.chat.TalkMessage import TalkMessage
|
||||
from otp.chat.TalkHandle import TalkHandle
|
||||
import time
|
||||
from otp.chat.TalkGlobals import *
|
||||
|
||||
from panda3d.core import *
|
||||
from panda3d.otp import CFSpeech, CFThought, CFTimeout
|
||||
|
||||
from direct.directnotify import DirectNotifyGlobal
|
||||
from direct.showbase import DirectObject
|
||||
|
||||
from otp.chat.ChatGlobals import *
|
||||
from panda3d.otp import CFSpeech, CFTimeout, CFThought
|
||||
from otp.chat.TalkGlobals import *
|
||||
from otp.chat.TalkHandle import TalkHandle
|
||||
from otp.chat.TalkMessage import TalkMessage
|
||||
from otp.otpbase import OTPGlobals, OTPLocalizer
|
||||
from otp.speedchat import SCDecoders
|
||||
|
||||
ThoughtPrefix = '.'
|
||||
|
||||
class TalkAssistant(DirectObject.DirectObject):
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
from otp.avatar.AvatarHandle import AvatarHandle
|
||||
|
||||
|
||||
class TalkHandle(AvatarHandle):
|
||||
|
||||
def __init__(self, doId, message):
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
from bisect import bisect_left
|
||||
|
||||
|
||||
class WhiteList:
|
||||
|
||||
def __init__(self, wordlist):
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
from direct.distributed import DistributedObject
|
||||
|
||||
|
||||
class Account(DistributedObject.DistributedObject):
|
||||
|
||||
def __init__(self, cr):
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
from direct.distributed.DistributedObjectGlobal import DistributedObjectGlobal
|
||||
|
||||
REPORT_PLAYER = 'REPORT_PLAYER'
|
||||
ReportFoulLanguage = 'MODERATION_FOUL_LANGUAGE'
|
||||
ReportPersonalInfo = 'MODERATION_PERSONAL_INFO'
|
||||
|
|
|
|||
|
|
@ -1,7 +1,10 @@
|
|||
from panda3d.core import StringStream
|
||||
from direct.distributed.PyDatagram import PyDatagram
|
||||
import random
|
||||
|
||||
from panda3d.core import StringStream
|
||||
|
||||
from direct.distributed.PyDatagram import PyDatagram
|
||||
|
||||
|
||||
class ClsendTracker:
|
||||
clsendNotify = directNotify.newCategory('clsend')
|
||||
NumTrackersLoggingOverflow = 0
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
from direct.distributed.DistributedObject import DistributedObject
|
||||
|
||||
|
||||
class DistributedDirectory(DistributedObject):
|
||||
pass
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
from direct.directnotify.DirectNotifyGlobal import directNotify
|
||||
from direct.distributed.DistributedObject import DistributedObject
|
||||
|
||||
|
||||
class DistributedDistrict(DistributedObject):
|
||||
notify = directNotify.newCategory('DistributedDistrict')
|
||||
neverDisable = 1
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
from direct.distributed import DistributedObject
|
||||
|
||||
|
||||
class DistributedTestObject(DistributedObject.DistributedObject):
|
||||
|
||||
def setRequiredField(self, r):
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
from direct.directnotify.DirectNotifyGlobal import directNotify
|
||||
from direct.showbase import DirectObject, TaskThreaded
|
||||
|
||||
|
||||
class GameServerTestSuite(DirectObject.DirectObject, TaskThreaded.TaskThreaded):
|
||||
notify = directNotify.newCategory('GarbageReport')
|
||||
|
||||
|
|
|
|||
|
|
@ -1,45 +1,41 @@
|
|||
import sys
|
||||
import time
|
||||
import random
|
||||
import gc
|
||||
import os
|
||||
import random
|
||||
import sys
|
||||
import time
|
||||
from enum import IntEnum
|
||||
|
||||
from panda3d.core import *
|
||||
from direct.gui.DirectGui import *
|
||||
from otp.distributed.OtpDoGlobals import *
|
||||
from direct.interval.IntervalGlobal import ivalMgr
|
||||
|
||||
from direct.directnotify.DirectNotifyGlobal import directNotify
|
||||
from direct.distributed import DistributedSmoothNode
|
||||
from direct.distributed.ClientRepositoryBase import ClientRepositoryBase
|
||||
from direct.distributed.PyDatagram import PyDatagram
|
||||
from direct.fsm.ClassicFSM import ClassicFSM
|
||||
from direct.fsm.State import State
|
||||
from direct.task import Task
|
||||
from direct.distributed import DistributedSmoothNode
|
||||
from direct.showbase import PythonUtil, GarbageReport
|
||||
from direct.gui.DirectGui import *
|
||||
from direct.interval.IntervalGlobal import ivalMgr
|
||||
from direct.showbase import GarbageReport, LeakDetectors, MessengerLeakDetector, PythonUtil
|
||||
from direct.showbase.ContainerLeakDetector import ContainerLeakDetector
|
||||
from direct.showbase import MessengerLeakDetector
|
||||
from direct.showbase.GarbageReportScheduler import GarbageReportScheduler
|
||||
from direct.showbase import LeakDetectors
|
||||
from direct.distributed.PyDatagram import PyDatagram
|
||||
from otp.avatar.DistributedPlayer import DistributedPlayer
|
||||
from otp.login import LoginTTSpecificDevAccount
|
||||
from otp.login.CreateAccountScreen import CreateAccountScreen
|
||||
from otp.login import LoginScreen
|
||||
from otp.otpgui import OTPDialog
|
||||
from otp.otpbase import OTPLocalizer
|
||||
from otp.login import LoginGSAccount
|
||||
from otp.login import LoginGoAccount
|
||||
from otp.login.LoginWebPlayTokenAccount import LoginWebPlayTokenAccount
|
||||
from otp.login.LoginDISLTokenAccount import LoginDISLTokenAccount
|
||||
from otp.login import LoginTTAccount
|
||||
from otp.login import LoginAstronAccount
|
||||
from otp.login import HTTPUtil
|
||||
from otp.otpbase import OTPGlobals
|
||||
from otp.otpbase import OTPLauncherGlobals
|
||||
from otp.uberdog import OtpAvatarManager
|
||||
from otp.distributed import OtpDoGlobals
|
||||
from otp.distributed.TelemetryLimiter import TelemetryLimiter
|
||||
from direct.task import Task
|
||||
|
||||
from otp.ai.GarbageLeakServerEventAggregator import GarbageLeakServerEventAggregator
|
||||
from otp.avatar.DistributedPlayer import DistributedPlayer
|
||||
from otp.distributed import OtpDoGlobals
|
||||
from otp.distributed.OtpDoGlobals import *
|
||||
from otp.distributed.TelemetryLimiter import TelemetryLimiter
|
||||
from otp.login import (HTTPUtil, LoginAstronAccount, LoginGoAccount, LoginGSAccount, LoginScreen, LoginTTAccount,
|
||||
LoginTTSpecificDevAccount)
|
||||
from otp.login.CreateAccountScreen import CreateAccountScreen
|
||||
from otp.login.LoginDISLTokenAccount import LoginDISLTokenAccount
|
||||
from otp.login.LoginWebPlayTokenAccount import LoginWebPlayTokenAccount
|
||||
from otp.otpbase import OTPGlobals, OTPLauncherGlobals, OTPLocalizer
|
||||
from otp.otpgui import OTPDialog
|
||||
from otp.uberdog import OtpAvatarManager
|
||||
|
||||
from .PotentialAvatar import PotentialAvatar
|
||||
from enum import IntEnum
|
||||
|
||||
|
||||
class OTPClientRepository(ClientRepositoryBase):
|
||||
notify = directNotify.newCategory('OTPClientRepository')
|
||||
|
|
|
|||
|
|
@ -1,10 +1,9 @@
|
|||
from direct.directnotify import DirectNotifyGlobal
|
||||
from direct.distributed.AstronInternalRepository import AstronInternalRepository
|
||||
from direct.distributed.PyDatagram import *
|
||||
from direct.distributed.MsgTypes import *
|
||||
from direct.distributed.PyDatagram import *
|
||||
from direct.showbase.PythonUtil import makeList
|
||||
|
||||
|
||||
# TODO: Remove Astron dependence.
|
||||
|
||||
class OTPInternalRepository(AstronInternalRepository):
|
||||
|
|
@ -43,7 +42,7 @@ class OTPInternalRepository(AstronInternalRepository):
|
|||
dg.addUint16(fieldId)
|
||||
|
||||
self.send(dg)
|
||||
|
||||
|
||||
def _getMsgName(self, msgId):
|
||||
# TODO: Remove Astron dependence.
|
||||
return makeList(MsgId2Names.get(msgId, f'UNKNOWN MESSAGE: {msgId}'))[0]
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
from direct.directnotify import DirectNotifyGlobal
|
||||
from direct.distributed import DistributedObject
|
||||
|
||||
|
||||
class ObjectServer(DistributedObject.DistributedObject):
|
||||
notify = DirectNotifyGlobal.directNotify.newCategory('ObjectServer')
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
from direct.distributed.MsgTypes import *
|
||||
|
||||
OTP_DO_ID_SERVER_ROOT = 4007
|
||||
OTP_DO_ID_FRIEND_MANAGER = 4501
|
||||
OTP_DO_ID_LEADERBOARD_MANAGER = 4502
|
||||
|
|
|
|||
|
|
@ -1,7 +1,9 @@
|
|||
from direct.showbase.DirectObject import DirectObject
|
||||
from otp.avatar.DistributedPlayer import DistributedPlayer
|
||||
from direct.task.Task import Task
|
||||
|
||||
from otp.avatar.DistributedPlayer import DistributedPlayer
|
||||
|
||||
|
||||
class TelemetryLimiter(DirectObject):
|
||||
TaskName = 'TelemetryLimiterEnforce'
|
||||
LeakDetectEventName = 'telemetryLimiter'
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
from otp.avatar.AvatarHandle import AvatarHandle
|
||||
|
||||
|
||||
class AvatarFriendInfo(AvatarHandle):
|
||||
|
||||
def __init__(self, avatarName = '', playerName = '', playerId = 0, onlineYesNo = 0, openChatEnabledYesNo = 0, openChatFriendshipYesNo = 0, wlChatEnabledYesNo = 0):
|
||||
|
|
|
|||
|
|
@ -1,8 +1,9 @@
|
|||
from direct.distributed.DistributedObjectGlobal import DistributedObjectGlobal
|
||||
from direct.directnotify.DirectNotifyGlobal import directNotify
|
||||
from direct.distributed.DistributedObjectGlobal import DistributedObjectGlobal
|
||||
|
||||
from otp.otpbase import OTPGlobals, OTPLocalizer
|
||||
from otp.uberdog.RejectCode import RejectCode
|
||||
from otp.otpbase import OTPGlobals
|
||||
from otp.otpbase import OTPLocalizer
|
||||
|
||||
|
||||
class AvatarFriendsManager(DistributedObjectGlobal):
|
||||
notify = directNotify.newCategory('AvatarFriendsManager')
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
from direct.directnotify import DirectNotifyGlobal
|
||||
from direct.distributed.DistributedObjectUD import DistributedObjectUD
|
||||
|
||||
|
||||
class AvatarFriendsManagerUD(DistributedObjectUD):
|
||||
notify = DirectNotifyGlobal.directNotify.newCategory('AvatarFriendsManagerUD')
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
from otp.avatar.AvatarHandle import AvatarHandle
|
||||
|
||||
|
||||
class FriendInfo(AvatarHandle):
|
||||
|
||||
def __init__(self, avatarName = '', playerName = '', onlineYesNo = 0, openChatEnabledYesNo = 0, openChatFriendshipYesNo = 0, wlChatEnabledYesNo = 0, location = '', sublocation = '', timestamp = 0, avatarId = 0, friendPrivs = 0, tokenPrivs = 0):
|
||||
|
|
|
|||
|
|
@ -1,8 +1,11 @@
|
|||
from panda3d.core import *
|
||||
from direct.distributed import DistributedObject
|
||||
|
||||
from direct.directnotify import DirectNotifyGlobal
|
||||
from direct.distributed import DistributedObject
|
||||
|
||||
from otp.otpbase import OTPGlobals
|
||||
|
||||
|
||||
class FriendManager(DistributedObject.DistributedObject):
|
||||
notify = DirectNotifyGlobal.directNotify.newCategory('FriendManager')
|
||||
neverDisable = 1
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
from direct.directnotify import DirectNotifyGlobal
|
||||
from direct.distributed.DistributedObjectAI import DistributedObjectAI
|
||||
|
||||
|
||||
class FriendManagerAI(DistributedObjectAI):
|
||||
notify = DirectNotifyGlobal.directNotify.newCategory('FriendManagerAI')
|
||||
|
|
|
|||
|
|
@ -1,11 +1,13 @@
|
|||
from panda3d.core import *
|
||||
from panda3d.otp import *
|
||||
from direct.gui.DirectGui import *
|
||||
|
||||
from direct.directnotify import DirectNotifyGlobal
|
||||
from direct.fsm import StateData
|
||||
from otp.otpbase import OTPLocalizer
|
||||
from otp.otpbase import OTPGlobals
|
||||
from direct.gui.DirectGui import *
|
||||
|
||||
from otp.otpbase import OTPGlobals, OTPLocalizer
|
||||
from otp.uberdog import RejectCode
|
||||
|
||||
globalFriendSecret = None
|
||||
AccountSecret = 0
|
||||
AvatarSecret = 1
|
||||
|
|
|
|||
|
|
@ -1,16 +1,18 @@
|
|||
from direct.distributed.DistributedObjectGlobal import DistributedObjectGlobal
|
||||
from direct.directnotify.DirectNotifyGlobal import directNotify
|
||||
from otp.distributed import OtpDoGlobals
|
||||
from otp.otpbase import OTPLocalizer
|
||||
from otp.otpbase import OTPGlobals
|
||||
from otp.avatar.AvatarHandle import AvatarHandle
|
||||
from direct.distributed.DistributedObjectGlobal import DistributedObjectGlobal
|
||||
|
||||
from otp.ai import AIInterestHandles
|
||||
from otp.avatar.AvatarHandle import AvatarHandle
|
||||
from otp.distributed import OtpDoGlobals
|
||||
from otp.otpbase import OTPGlobals, OTPLocalizer
|
||||
|
||||
GUILDRANK_VETERAN = 4
|
||||
GUILDRANK_GM = 3
|
||||
GUILDRANK_OFFICER = 2
|
||||
GUILDRANK_MEMBER = 1
|
||||
import queue
|
||||
|
||||
|
||||
class GuildMemberInfo(AvatarHandle):
|
||||
|
||||
def __init__(self, name, isOnline, rank, bandId):
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
from direct.directnotify import DirectNotifyGlobal
|
||||
from direct.distributed.DistributedObjectAI import DistributedObjectAI
|
||||
|
||||
|
||||
class GuildManagerAI(DistributedObjectAI):
|
||||
notify = DirectNotifyGlobal.directNotify.newCategory('GuildManagerAI')
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
from direct.directnotify import DirectNotifyGlobal
|
||||
from direct.distributed.DistributedObjectUD import DistributedObjectUD
|
||||
|
||||
|
||||
class GuildManagerUD(DistributedObjectUD):
|
||||
notify = DirectNotifyGlobal.directNotify.newCategory('GuildManagerUD')
|
||||
|
|
|
|||
|
|
@ -1,8 +1,10 @@
|
|||
from direct.distributed.DistributedObjectGlobal import DistributedObjectGlobal
|
||||
from direct.directnotify.DirectNotifyGlobal import directNotify
|
||||
from otp.otpbase import OTPGlobals
|
||||
from direct.distributed.DistributedObjectGlobal import DistributedObjectGlobal
|
||||
|
||||
from otp.avatar.Avatar import teleportNotify
|
||||
from otp.friends import FriendResponseCodes
|
||||
from otp.otpbase import OTPGlobals
|
||||
|
||||
|
||||
class PlayerFriendsManager(DistributedObjectGlobal):
|
||||
notify = directNotify.newCategory('PlayerFriendsManager')
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
from direct.directnotify import DirectNotifyGlobal
|
||||
from direct.distributed.DistributedObjectUD import DistributedObjectUD
|
||||
|
||||
|
||||
class PlayerFriendsManagerUD(DistributedObjectUD):
|
||||
notify = DirectNotifyGlobal.directNotify.newCategory('PlayerFriendsManagerUD')
|
||||
|
|
|
|||
|
|
@ -1,8 +1,11 @@
|
|||
from direct.task import Task
|
||||
from otp.otpbase import OTPLocalizer
|
||||
from direct.gui.DirectGui import *
|
||||
from panda3d.core import *
|
||||
|
||||
from direct.gui.DirectGui import *
|
||||
from direct.showbase.DirectObject import DirectObject
|
||||
from direct.task import Task
|
||||
|
||||
from otp.otpbase import OTPLocalizer
|
||||
|
||||
|
||||
class DownloadWatcher(DirectObject):
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,9 @@
|
|||
from panda3d.core import *
|
||||
|
||||
from direct.showbase.MessengerGlobal import *
|
||||
from direct.task.TaskManagerGlobal import *
|
||||
from direct.task.Task import Task
|
||||
from direct.task.TaskManagerGlobal import *
|
||||
|
||||
|
||||
class DummyLauncherBase:
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +1,15 @@
|
|||
import sys
|
||||
import os
|
||||
import time
|
||||
import builtins
|
||||
import os
|
||||
import sys
|
||||
import time
|
||||
|
||||
from panda3d.core import *
|
||||
|
||||
from direct.directnotify.DirectNotifyGlobal import *
|
||||
from direct.showbase import DConfig
|
||||
from direct.showbase.DirectObject import DirectObject
|
||||
from direct.task.MiniTask import MiniTaskManager
|
||||
from direct.directnotify.DirectNotifyGlobal import *
|
||||
|
||||
|
||||
class LogAndOutput:
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,10 @@
|
|||
from direct.interval.IntervalGlobal import *
|
||||
from . import BasicEntities
|
||||
import random
|
||||
|
||||
from direct.interval.IntervalGlobal import *
|
||||
|
||||
from . import BasicEntities
|
||||
|
||||
|
||||
class AmbientSound(BasicEntities.NodePathEntity):
|
||||
|
||||
def __init__(self, level, entId):
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
from . import Entity
|
||||
from . import DistributedEntity
|
||||
from panda3d.core import NodePath
|
||||
|
||||
from . import DistributedEntity, Entity
|
||||
|
||||
|
||||
class NodePathEntityBase:
|
||||
|
||||
def initNodePathAttribs(self, doReparent = 1):
|
||||
|
|
|
|||
|
|
@ -1,8 +1,12 @@
|
|||
from panda3d.core import *
|
||||
from otp.otpbase import OTPGlobals
|
||||
|
||||
from direct.directnotify import DirectNotifyGlobal
|
||||
|
||||
from otp.otpbase import OTPGlobals
|
||||
|
||||
from . import BasicEntities
|
||||
|
||||
|
||||
class CollisionSolidEntity(BasicEntities.NodePathEntity):
|
||||
notify = DirectNotifyGlobal.directNotify.newCategory('CollisionSolidEntity')
|
||||
|
||||
|
|
|
|||
|
|
@ -1,13 +1,15 @@
|
|||
from direct.showbase import DirectObject
|
||||
from panda3d.core import *
|
||||
|
||||
from direct.directnotify import DirectNotifyGlobal
|
||||
from . import BasicEntities
|
||||
from panda3d.core import *
|
||||
from panda3d.core import *
|
||||
from direct.interval.IntervalGlobal import *
|
||||
from direct.distributed.ClockDelta import *
|
||||
from toontown.toonbase import ToontownGlobals
|
||||
from direct.directnotify import DirectNotifyGlobal
|
||||
from direct.fsm import ClassicFSM
|
||||
from direct.interval.IntervalGlobal import *
|
||||
from direct.showbase import DirectObject
|
||||
|
||||
from toontown.toonbase import ToontownGlobals
|
||||
|
||||
from . import BasicEntities
|
||||
|
||||
|
||||
def nothing(self, track, subjectNodePath, duration):
|
||||
return track
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
from direct.distributed import DistributedObject
|
||||
from . import Entity
|
||||
from direct.directnotify import DirectNotifyGlobal
|
||||
from direct.distributed import DistributedObject
|
||||
|
||||
from . import Entity
|
||||
|
||||
|
||||
class DistributedEntity(DistributedObject.DistributedObject, Entity.Entity):
|
||||
notify = DirectNotifyGlobal.directNotify.newCategory('DistributedEntity')
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
from direct.distributed import DistributedObjectAI
|
||||
from . import Entity
|
||||
from direct.directnotify import DirectNotifyGlobal
|
||||
from direct.distributed import DistributedObjectAI
|
||||
|
||||
from . import Entity
|
||||
|
||||
|
||||
class DistributedEntityAI(DistributedObjectAI.DistributedObjectAI, Entity.Entity):
|
||||
notify = DirectNotifyGlobal.directNotify.newCategory('DistributedEntityAI')
|
||||
|
|
|
|||
|
|
@ -1,9 +1,12 @@
|
|||
from panda3d.core import *
|
||||
from direct.distributed.ClockDelta import *
|
||||
|
||||
from direct.directnotify import DirectNotifyGlobal
|
||||
from direct.distributed.ClockDelta import *
|
||||
from direct.fsm import ClassicFSM
|
||||
|
||||
from . import DistributedEntity
|
||||
|
||||
|
||||
class DistributedInteractiveEntity(DistributedEntity.DistributedEntity):
|
||||
notify = DirectNotifyGlobal.directNotify.newCategory('DistributedInteractiveEntity')
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
from direct.directnotify import DirectNotifyGlobal
|
||||
from direct.distributed.DistributedObjectAI import DistributedObjectAI
|
||||
|
||||
|
||||
class DistributedInteractiveEntityAI(DistributedObjectAI):
|
||||
notify = DirectNotifyGlobal.directNotify.newCategory('DistributedInteractiveEntityAI')
|
||||
|
|
|
|||
|
|
@ -1,19 +1,22 @@
|
|||
from direct.distributed.ClockDelta import *
|
||||
import random
|
||||
|
||||
from panda3d.core import *
|
||||
from direct.showbase.PythonUtil import Functor, sameElements, list2dict, uniqueElements
|
||||
|
||||
from direct.directnotify import DirectNotifyGlobal
|
||||
from direct.distributed import DistributedObject
|
||||
from direct.distributed.ClockDelta import *
|
||||
from direct.gui import OnscreenText
|
||||
from direct.interval.IntervalGlobal import *
|
||||
from direct.showbase.PythonUtil import Functor, list2dict, sameElements, uniqueElements
|
||||
from direct.task import Task
|
||||
|
||||
from otp.otpbase import OTPGlobals
|
||||
|
||||
from toontown.distributed.ToontownMsgTypes import *
|
||||
from toontown.toonbase import ToontownGlobals
|
||||
from otp.otpbase import OTPGlobals
|
||||
from direct.distributed import DistributedObject
|
||||
from . import Level
|
||||
from . import LevelConstants
|
||||
from direct.directnotify import DirectNotifyGlobal
|
||||
from . import EntityCreator
|
||||
from direct.gui import OnscreenText
|
||||
from direct.task import Task
|
||||
from . import LevelUtil
|
||||
import random
|
||||
|
||||
from . import EntityCreator, Level, LevelConstants, LevelUtil
|
||||
|
||||
|
||||
class DistributedLevel(DistributedObject.DistributedObject, Level.Level):
|
||||
notify = DirectNotifyGlobal.directNotify.newCategory('DistributedLevel')
|
||||
|
|
|
|||
|
|
@ -1,12 +1,15 @@
|
|||
from panda3d.core import *
|
||||
from otp.ai.AIBaseGlobal import *
|
||||
from direct.distributed.ClockDelta import *
|
||||
from direct.distributed import DistributedObjectAI
|
||||
from . import Level
|
||||
|
||||
from direct.directnotify import DirectNotifyGlobal
|
||||
from . import EntityCreatorAI
|
||||
from direct.distributed import DistributedObjectAI
|
||||
from direct.distributed.ClockDelta import *
|
||||
from direct.showbase.PythonUtil import Functor, weightedChoice
|
||||
|
||||
from otp.ai.AIBaseGlobal import *
|
||||
|
||||
from . import EntityCreatorAI, Level
|
||||
|
||||
|
||||
class DistributedLevelAI(DistributedObjectAI.DistributedObjectAI, Level.Level):
|
||||
notify = DirectNotifyGlobal.directNotify.newCategory('DistributedLevelAI')
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
from . import EditMgrBase
|
||||
|
||||
|
||||
class EditMgr(EditMgrBase.EditMgrBase):
|
||||
pass
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
from . import EditMgrBase
|
||||
|
||||
if __dev__:
|
||||
from direct.showbase.PythonUtil import list2dict
|
||||
|
||||
from . import EditorGlobals
|
||||
|
||||
class EditMgrAI(EditMgrBase.EditMgrBase):
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
from . import Entity
|
||||
from direct.directnotify import DirectNotifyGlobal
|
||||
|
||||
from . import Entity
|
||||
|
||||
|
||||
class EditMgrBase(Entity.Entity):
|
||||
notify = DirectNotifyGlobal.directNotify.newCategory('EditMgr')
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
from direct.showbase.PythonUtil import uniqueElements
|
||||
|
||||
EditTargetPostName = 'inGameEditTarget'
|
||||
EntIdRange = 10000
|
||||
username2entIdBase = {'darren': 1 * EntIdRange,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
from direct.directnotify import DirectNotifyGlobal
|
||||
from direct.showbase.DirectObject import DirectObject
|
||||
from direct.showbase.PythonUtil import lineInfo
|
||||
from direct.directnotify import DirectNotifyGlobal
|
||||
|
||||
|
||||
class Entity(DirectObject):
|
||||
notify = DirectNotifyGlobal.directNotify.newCategory('Entity')
|
||||
|
|
|
|||
|
|
@ -1,19 +1,8 @@
|
|||
from . import CutScene
|
||||
from . import EntityCreatorBase
|
||||
from . import BasicEntities
|
||||
from direct.directnotify import DirectNotifyGlobal
|
||||
from . import EditMgr
|
||||
from . import EntrancePoint
|
||||
from . import LevelMgr
|
||||
from . import LogicGate
|
||||
from . import ZoneEntity
|
||||
from . import ModelEntity
|
||||
from . import PathEntity
|
||||
from . import VisibilityExtender
|
||||
from . import PropSpinner
|
||||
from . import AmbientSound
|
||||
from . import LocatorEntity
|
||||
from . import CollisionSolidEntity
|
||||
|
||||
from . import (AmbientSound, BasicEntities, CollisionSolidEntity, CutScene, EditMgr, EntityCreatorBase, EntrancePoint,
|
||||
LevelMgr, LocatorEntity, LogicGate, ModelEntity, PathEntity, PropSpinner, VisibilityExtender, ZoneEntity)
|
||||
|
||||
|
||||
def nothing(*args):
|
||||
return 'nothing'
|
||||
|
|
|
|||
|
|
@ -1,10 +1,8 @@
|
|||
from . import EntityCreatorBase
|
||||
from . import LogicGate
|
||||
from . import EditMgrAI
|
||||
from . import LevelMgrAI
|
||||
from . import ZoneEntityAI
|
||||
from direct.showbase.PythonUtil import Functor
|
||||
|
||||
from . import EditMgrAI, EntityCreatorBase, LevelMgrAI, LogicGate, ZoneEntityAI
|
||||
|
||||
|
||||
def createDistributedEntity(AIclass, level, entId, zoneId):
|
||||
ent = AIclass(level, entId)
|
||||
ent.generateWithRequired(zoneId)
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
from direct.directnotify import DirectNotifyGlobal
|
||||
|
||||
|
||||
class EntityCreatorBase:
|
||||
notify = DirectNotifyGlobal.directNotify.newCategory('EntityCreator')
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,9 @@
|
|||
from direct.fsm.StatePush import StateVar
|
||||
from direct.showbase.PythonUtil import getSetterName
|
||||
|
||||
from otp.level.Entity import Entity
|
||||
|
||||
|
||||
class EntityStateVarSet(Entity):
|
||||
|
||||
def __init__(self, entType):
|
||||
|
|
|
|||
|
|
@ -1,7 +1,9 @@
|
|||
from direct.directnotify import DirectNotifyGlobal
|
||||
from . import AttribDesc
|
||||
from direct.showbase.PythonUtil import mostDerivedLast
|
||||
|
||||
from . import AttribDesc
|
||||
|
||||
|
||||
class EntityTypeDesc:
|
||||
notify = DirectNotifyGlobal.directNotify.newCategory('EntityTypeDesc')
|
||||
output = None
|
||||
|
|
|
|||
|
|
@ -1,12 +1,15 @@
|
|||
from panda3d.core import *
|
||||
from direct.directnotify import DirectNotifyGlobal
|
||||
import types
|
||||
from . import AttribDesc
|
||||
from . import EntityTypeDesc
|
||||
from direct.showbase.PythonUtil import mostDerivedLast
|
||||
import importlib
|
||||
import os
|
||||
import string
|
||||
import importlib
|
||||
import types
|
||||
|
||||
from panda3d.core import *
|
||||
|
||||
from direct.directnotify import DirectNotifyGlobal
|
||||
from direct.showbase.PythonUtil import mostDerivedLast
|
||||
|
||||
from . import AttribDesc, EntityTypeDesc
|
||||
|
||||
|
||||
class EntityTypeRegistry:
|
||||
notify = DirectNotifyGlobal.directNotify.newCategory('EntityTypeRegistry')
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
from .EntityTypeDesc import EntityTypeDesc
|
||||
from toontown.coghq.SpecImports import *
|
||||
|
||||
from .EntityTypeDesc import EntityTypeDesc
|
||||
|
||||
|
||||
class Entity(EntityTypeDesc):
|
||||
abstract = 1
|
||||
type = 'entity'
|
||||
|
|
|
|||
|
|
@ -1,7 +1,10 @@
|
|||
from toontown.toonbase.ToontownGlobals import *
|
||||
from direct.directnotify import DirectNotifyGlobal
|
||||
|
||||
from toontown.toonbase.ToontownGlobals import *
|
||||
|
||||
from . import BasicEntities
|
||||
|
||||
|
||||
class EntrancePoint(BasicEntities.NodePathEntity):
|
||||
|
||||
def __init__(self, level, entId):
|
||||
|
|
|
|||
|
|
@ -1,9 +1,12 @@
|
|||
from direct.directnotify import DirectNotifyGlobal
|
||||
import string
|
||||
from . import LevelConstants
|
||||
from direct.showbase.PythonUtil import lineInfo, uniqueElements
|
||||
import types
|
||||
|
||||
from direct.directnotify import DirectNotifyGlobal
|
||||
from direct.showbase.PythonUtil import lineInfo, uniqueElements
|
||||
|
||||
from . import LevelConstants
|
||||
|
||||
|
||||
class Level:
|
||||
notify = DirectNotifyGlobal.directNotify.newCategory('Level')
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
from direct.showbase.PythonUtil import Functor
|
||||
|
||||
from . import LevelMgrBase
|
||||
|
||||
|
||||
class LevelMgr(LevelMgrBase.LevelMgrBase):
|
||||
|
||||
def __init__(self, level, entId):
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
from direct.showbase.PythonUtil import Functor
|
||||
|
||||
from . import LevelMgrBase
|
||||
|
||||
|
||||
class LevelMgrAI(LevelMgrBase.LevelMgrBase):
|
||||
|
||||
def __init__(self, level, entId):
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
from . import Entity
|
||||
|
||||
|
||||
class LevelMgrBase(Entity.Entity):
|
||||
|
||||
def __init__(self, level, entId):
|
||||
|
|
|
|||
|
|
@ -1,10 +1,14 @@
|
|||
import importlib
|
||||
import string
|
||||
import types
|
||||
|
||||
from panda3d.core import *
|
||||
|
||||
from direct.directnotify import DirectNotifyGlobal
|
||||
from direct.showbase.PythonUtil import list2dict, uniqueElements
|
||||
import string
|
||||
|
||||
from . import LevelConstants
|
||||
import types
|
||||
import importlib
|
||||
|
||||
if __dev__:
|
||||
import os
|
||||
|
||||
|
|
@ -35,8 +39,7 @@ class LevelSpec:
|
|||
self.setScenario(scenario)
|
||||
if __dev__:
|
||||
if newSpec:
|
||||
from . import EntityTypes
|
||||
from . import EntityTypeRegistry
|
||||
from . import EntityTypeRegistry, EntityTypes
|
||||
etr = EntityTypeRegistry.EntityTypeRegistry(EntityTypes)
|
||||
self.setEntityTypeReg(etr)
|
||||
entId = LevelConstants.UberZoneEntId
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
import string
|
||||
|
||||
from . import LevelConstants
|
||||
|
||||
|
||||
def getZoneNum2Node(levelModel, logFunc = lambda str: str):
|
||||
|
||||
def findNumberedNodes(baseString, model, caseInsens = 1):
|
||||
|
|
|
|||
|
|
@ -1,7 +1,10 @@
|
|||
from . import Entity, BasicEntities
|
||||
from panda3d.core import NodePath
|
||||
|
||||
from direct.directnotify import DirectNotifyGlobal
|
||||
|
||||
from . import BasicEntities, Entity
|
||||
|
||||
|
||||
class LocatorEntity(Entity.Entity, NodePath):
|
||||
notify = DirectNotifyGlobal.directNotify.newCategory('LocatorEntity')
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,9 @@
|
|||
from direct.showbase import DirectObject
|
||||
from direct.directnotify import DirectNotifyGlobal
|
||||
from direct.showbase import DirectObject
|
||||
|
||||
from . import Entity
|
||||
|
||||
|
||||
def andTest(self, a, b):
|
||||
if b:
|
||||
messenger.send(self.getOutputEventName(), [a])
|
||||
|
|
|
|||
|
|
@ -1,7 +1,10 @@
|
|||
from toontown.toonbase.ToontownGlobals import *
|
||||
from direct.directnotify import DirectNotifyGlobal
|
||||
|
||||
from toontown.toonbase.ToontownGlobals import *
|
||||
|
||||
from . import BasicEntities
|
||||
|
||||
|
||||
class ModelEntity(BasicEntities.NodePathEntity):
|
||||
LoadFuncs = {'loadModelCopy': loader.loadModelCopy,
|
||||
'loadModel': loader.loadModel,
|
||||
|
|
|
|||
|
|
@ -1,8 +1,11 @@
|
|||
from toontown.toonbase.ToontownGlobals import *
|
||||
from direct.interval.IntervalGlobal import *
|
||||
from direct.directnotify import DirectNotifyGlobal
|
||||
from . import BasicEntities
|
||||
from direct.interval.IntervalGlobal import *
|
||||
|
||||
from toontown.suit import GoonPathData
|
||||
from toontown.toonbase.ToontownGlobals import *
|
||||
|
||||
from . import BasicEntities
|
||||
|
||||
|
||||
class PathEntity(BasicEntities.NodePathEntity):
|
||||
notify = DirectNotifyGlobal.directNotify.newCategory('PathEntity')
|
||||
|
|
|
|||
|
|
@ -1,7 +1,10 @@
|
|||
from direct.interval.IntervalGlobal import *
|
||||
from .Entity import Entity
|
||||
from panda3d.core import Vec3
|
||||
|
||||
from direct.interval.IntervalGlobal import *
|
||||
|
||||
from .Entity import Entity
|
||||
|
||||
|
||||
class PropSpinner(Entity):
|
||||
|
||||
def __init__(self, level, entId):
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
from . import Entity
|
||||
|
||||
|
||||
class VisibilityBlocker:
|
||||
|
||||
def __init__(self):
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
from . import Entity
|
||||
|
||||
|
||||
class VisibilityExtender(Entity.Entity):
|
||||
|
||||
def __init__(self, level, entId):
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
from . import ZoneEntityBase
|
||||
from . import BasicEntities
|
||||
from . import BasicEntities, ZoneEntityBase
|
||||
|
||||
|
||||
class ZoneEntity(ZoneEntityBase.ZoneEntityBase, BasicEntities.NodePathAttribs):
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
from . import ZoneEntityBase
|
||||
|
||||
|
||||
class ZoneEntityAI(ZoneEntityBase.ZoneEntityBase):
|
||||
|
||||
def __init__(self, level, entId):
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
from . import Entity
|
||||
from . import LevelConstants
|
||||
from . import Entity, LevelConstants
|
||||
|
||||
|
||||
class ZoneEntityBase(Entity.Entity):
|
||||
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue