Merge branch 'develop' into friends
This commit is contained in:
commit
adc8352fc1
|
|
@ -97,3 +97,7 @@ accept-clock-skew 1
|
|||
text-minfilter linear_mipmap_linear
|
||||
gc-save-all 0
|
||||
server-data-folder data
|
||||
|
||||
# TEMPORARY
|
||||
skip-friend-quest true
|
||||
skip-phone-quest true
|
||||
|
|
|
|||
|
|
@ -468,7 +468,7 @@ dclass DistributedToon : DistributedPlayer {
|
|||
setHoodsVisited(uint32[] = [2000]) required ownrecv db;
|
||||
setInterface(blob = []) required ownrecv db;
|
||||
setLastHood(uint32 = 0) required ownrecv db;
|
||||
setTutorialAck(uint8 = 1) required ownrecv db;
|
||||
setTutorialAck(uint8 = 0) required ownrecv db;
|
||||
setMaxClothes(uint32 = 10) required ownrecv db;
|
||||
setClothesTopsList(uint8[] = []) required ownrecv db;
|
||||
setClothesBottomsList(uint8[] = []) required ownrecv db;
|
||||
|
|
@ -1410,6 +1410,7 @@ dclass ToontownMagicWordManager : DistributedObject {
|
|||
requestExecuteMagicWord(int8, int8, int16, uint32, string) airecv clsend;
|
||||
executeMagicWord(string, string, uint32[], blob, int8, int8, int16, uint32);
|
||||
generateResponse(string, string, blob, string, int8, int8, int16, uint32, string);
|
||||
teleportResponse(string loaderId, string whereId, string how, uint32 hoodId, uint32 zoneId, uint32 avId);
|
||||
};
|
||||
|
||||
struct weeklyCalendarHoliday {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
from pandac.PandaModules import *
|
||||
from panda3d.core import *
|
||||
from direct.directnotify.DirectNotifyGlobal import *
|
||||
from direct.showbase import DConfig
|
||||
from direct.showbase.MessengerGlobal import *
|
||||
from direct.showbase.BulletinBoardGlobal import *
|
||||
from direct.task.TaskManagerGlobal import *
|
||||
|
|
@ -20,7 +21,7 @@ class AIBase:
|
|||
notify = directNotify.newCategory('AIBase')
|
||||
|
||||
def __init__(self):
|
||||
self.config = getConfigShowbase()
|
||||
self.config = DConfig
|
||||
__builtins__['__dev__'] = self.config.GetBool('want-dev', 0)
|
||||
__builtins__['__astron__'] = self.config.GetBool('astron-support', 1)
|
||||
__builtins__['__execWarnings__'] = self.config.GetBool('want-exec-warnings', 0)
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
from pandac.PandaModules import *
|
||||
from panda3d.core import *
|
||||
from direct.distributed import ParentMgr
|
||||
from direct.directnotify.DirectNotifyGlobal import directNotify
|
||||
from direct.task import Task
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import urllib.request, urllib.parse, urllib.error
|
||||
import os
|
||||
from pandac.PandaModules import HTTPClient, Ramfile
|
||||
from panda3d.core import HTTPClient, Ramfile
|
||||
from direct.directnotify import DirectNotifyGlobal
|
||||
|
||||
class BanManagerAI:
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
from pandac.PandaModules import *
|
||||
from panda3d.core import *
|
||||
from direct.showbase.DirectObject import *
|
||||
from direct.distributed.ClockDelta import *
|
||||
from direct.task import Task
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
from pandac.PandaModules import *
|
||||
from panda3d.core import *
|
||||
from panda3d.otp import Nametag, NametagGroup
|
||||
from panda3d.otp import CFSpeech, CFThought, CFTimeout, CFPageButton, CFNoQuitButton, CFQuitButton
|
||||
from otp.otpbase import OTPGlobals
|
||||
|
|
@ -12,7 +12,7 @@ from otp.otpbase import OTPRender
|
|||
from otp.otpbase.PythonUtil import recordCreationStack
|
||||
teleportNotify = DirectNotifyGlobal.directNotify.newCategory('Teleport')
|
||||
teleportNotify.showTime = True
|
||||
if config.GetBool('want-teleport-debug', 1):
|
||||
if ConfigVariableBool('want-teleport-debug', 1).value:
|
||||
teleportNotify.setDebug(1)
|
||||
|
||||
def reconsiderAllUnderstandable():
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
from pandac.PandaModules import *
|
||||
from panda3d.core import *
|
||||
from direct.directnotify.DirectNotifyGlobal import *
|
||||
import random
|
||||
from direct.distributed.PyDatagram import PyDatagram
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
from pandac.PandaModules import *
|
||||
from panda3d.core import *
|
||||
from direct.gui.DirectGui import *
|
||||
from direct.showbase import DirectObject
|
||||
from . import Avatar
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import time
|
||||
import string
|
||||
from pandac.PandaModules import *
|
||||
from panda3d.core import *
|
||||
from direct.distributed import DistributedNode
|
||||
from direct.actor.DistributedActor import DistributedActor
|
||||
from direct.interval.IntervalGlobal import *
|
||||
|
|
|
|||
|
|
@ -1,20 +1,16 @@
|
|||
from pandac.PandaModules import *
|
||||
from panda3d.core import *
|
||||
from panda3d.otp import WhisperPopup
|
||||
from panda3d.otp import CFQuicktalker, CFPageButton, CFQuitButton, CFSpeech, CFThought, CFTimeout
|
||||
from otp.chat import ChatGarbler
|
||||
import string
|
||||
from direct.task import Task
|
||||
from otp.otpbase import OTPLocalizer
|
||||
from otp.speedchat import SCDecoders
|
||||
from direct.showbase import PythonUtil
|
||||
from otp.avatar import DistributedAvatar
|
||||
import time
|
||||
from otp.avatar import Avatar, PlayerBase
|
||||
from otp.chat import TalkAssistant
|
||||
from otp.otpbase import OTPGlobals
|
||||
from otp.avatar.Avatar import teleportNotify
|
||||
from otp.distributed.TelemetryLimited import TelemetryLimited
|
||||
if base.config.GetBool('want-chatfilter-hacks', 0):
|
||||
if ConfigVariableBool('want-chatfilter-hacks', 0).value:
|
||||
from otp.switchboard import badwordpy
|
||||
import os
|
||||
badwordpy.init(os.environ.get('OTP') + '\\src\\switchboard\\', '')
|
||||
|
|
@ -44,7 +40,7 @@ class DistributedPlayer(DistributedAvatar.DistributedAvatar, PlayerBase.PlayerBa
|
|||
self.DISLid = 0
|
||||
self.accessLevel = 0
|
||||
self.autoRun = 0
|
||||
self.whiteListEnabled = base.config.GetBool('whitelist-chat-enabled', 1)
|
||||
self.whiteListEnabled = ConfigVariableBool('whitelist-chat-enabled', 1).value
|
||||
|
||||
return
|
||||
|
||||
|
|
@ -224,8 +220,8 @@ class DistributedPlayer(DistributedAvatar.DistributedAvatar, PlayerBase.PlayerBa
|
|||
if self.cr.wantMagicWords and len(chatString) > 0 and chatString[0] == '~':
|
||||
messenger.send('magicWord', [chatString])
|
||||
else:
|
||||
if base.config.GetBool('want-chatfilter-hacks', 0):
|
||||
if base.config.GetBool('want-chatfilter-drop-offending', 0):
|
||||
if ConfigVariableBool('want-chatfilter-hacks', 0).value:
|
||||
if ConfigVariableBool('want-chatfilter-drop-offending', 0).value:
|
||||
if badwordpy.test(chatString):
|
||||
return
|
||||
else:
|
||||
|
|
@ -351,7 +347,7 @@ class DistributedPlayer(DistributedAvatar.DistributedAvatar, PlayerBase.PlayerBa
|
|||
teleportNotify.debug('party is ending')
|
||||
self.d_teleportResponse(self.doId, 0, 0, 0, 0, sendToId=requesterId)
|
||||
return
|
||||
if self.__teleportAvailable and not self.ghostMode and base.config.GetBool('can-be-teleported-to', 1):
|
||||
if self.__teleportAvailable and not self.ghostMode and ConfigVariableBool('can-be-teleported-to', 1).value:
|
||||
teleportNotify.debug('teleport initiation successful')
|
||||
self.setSystemMessage(requesterId, OTPLocalizer.WhisperComingToVisit % avatar.getName())
|
||||
messenger.send('teleportQuery', [avatar, self])
|
||||
|
|
|
|||
|
|
@ -1,40 +1,33 @@
|
|||
from pandac.PandaModules import *
|
||||
from panda3d.core import *
|
||||
from panda3d.otp import Nametag, WhisperPopup
|
||||
from direct.gui.DirectGui import *
|
||||
from direct.showbase.PythonUtil import *
|
||||
from direct.interval.IntervalGlobal import *
|
||||
from direct.showbase.InputStateGlobal import inputState
|
||||
from pandac.PandaModules import *
|
||||
from . import Avatar
|
||||
from direct.controls import ControlManager
|
||||
from . import DistributedAvatar
|
||||
from direct.task import Task
|
||||
from . import PositionExaminer
|
||||
from otp.otpbase import OTPGlobals
|
||||
from otp.otpbase import OTPRender
|
||||
import math
|
||||
import string
|
||||
import random
|
||||
from direct.directnotify import DirectNotifyGlobal
|
||||
from direct.distributed import DistributedSmoothNode
|
||||
from direct.gui import DirectGuiGlobals
|
||||
from otp.otpbase import OTPLocalizer
|
||||
from direct.controls.GhostWalker import GhostWalker
|
||||
from direct.controls.GravityWalker import GravityWalker
|
||||
from direct.controls.ObserverWalker import ObserverWalker
|
||||
from direct.controls.PhysicsWalker import PhysicsWalker
|
||||
from direct.controls.SwimWalker import SwimWalker
|
||||
from direct.controls.TwoDWalker import TwoDWalker
|
||||
|
||||
class LocalAvatar(DistributedAvatar.DistributedAvatar, DistributedSmoothNode.DistributedSmoothNode):
|
||||
notify = DirectNotifyGlobal.directNotify.newCategory('LocalAvatar')
|
||||
wantDevCameraPositions = base.config.GetBool('want-dev-camera-positions', 0)
|
||||
wantMouse = base.config.GetBool('want-mouse', 0)
|
||||
sleepTimeout = base.config.GetInt('sleep-timeout', 120)
|
||||
swimTimeout = base.config.GetInt('afk-timeout', 600)
|
||||
__enableMarkerPlacement = base.config.GetBool('place-markers', 0)
|
||||
acceptingNewFriends = base.config.GetBool('accepting-new-friends', 1)
|
||||
acceptingNonFriendWhispers = base.config.GetBool('accepting-non-friend-whispers', 0)
|
||||
wantDevCameraPositions = ConfigVariableBool('want-dev-camera-positions', 0).value
|
||||
wantMouse = ConfigVariableBool('want-mouse', 0).value
|
||||
sleepTimeout = ConfigVariableInt('sleep-timeout', 120).value
|
||||
swimTimeout = ConfigVariableInt('afk-timeout', 600).value
|
||||
__enableMarkerPlacement = ConfigVariableBool('place-markers', 0).value
|
||||
acceptingNewFriends = ConfigVariableBool('accepting-new-friends', 1).value
|
||||
acceptingNonFriendWhispers = ConfigVariableBool('accepting-non-friend-whispers', 0).value
|
||||
|
||||
def __init__(self, cr, chatMgr, talkAssistant = None, passMessagesThrough = False):
|
||||
try:
|
||||
|
|
@ -85,6 +78,7 @@ class LocalAvatar(DistributedAvatar.DistributedAvatar, DistributedSmoothNode.Dis
|
|||
self.nametag2dNormalContents = Nametag.CSpeech
|
||||
self.showNametag2d()
|
||||
self.setPickable(0)
|
||||
self.posCameraSeq = None
|
||||
return
|
||||
|
||||
def useSwimControls(self):
|
||||
|
|
@ -137,7 +131,9 @@ class LocalAvatar(DistributedAvatar.DistributedAvatar, DistributedSmoothNode.Dis
|
|||
self.stopJumpLandTask()
|
||||
taskMgr.remove('shadowReach')
|
||||
base.popCTrav()
|
||||
taskMgr.remove('posCamera')
|
||||
if self.posCameraSeq:
|
||||
self.posCameraSeq.finish()
|
||||
self.posCameraSeq = None
|
||||
self.disableAvatarControls()
|
||||
self.stopTrackAnimToSpeed()
|
||||
self.stopUpdateSmartCamera()
|
||||
|
|
@ -605,8 +601,11 @@ class LocalAvatar(DistributedAvatar.DistributedAvatar, DistributedSmoothNode.Dis
|
|||
r = destHpr[2]
|
||||
camera.setPos(savePos)
|
||||
camera.setHpr(saveHpr)
|
||||
taskMgr.remove('posCamera')
|
||||
camera.lerpPosHpr(x, y, z, h, p, r, time, task='posCamera')
|
||||
if self.posCameraSeq:
|
||||
self.posCameraSeq.finish()
|
||||
self.posCameraSeq = None
|
||||
self.posCameraSeq = camera.posHprInterval(time, Point3(x, y, z), Point3(h, p, r), name='posCamera')
|
||||
self.posCameraSeq.start()
|
||||
|
||||
def getClampedAvatarHeight(self):
|
||||
return max(self.getHeight(), 3.0)
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
from pandac.PandaModules import *
|
||||
from panda3d.core import *
|
||||
from direct.showbase.DirectObject import DirectObject
|
||||
from otp.otpbase import OTPGlobals
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
from pandac.PandaModules import *
|
||||
from pandac.PandaModules import *
|
||||
from panda3d.core import *
|
||||
from panda3d.core import *
|
||||
from direct.directnotify import DirectNotifyGlobal
|
||||
from direct.showbase.ShadowPlacer import ShadowPlacer
|
||||
from otp.otpbase import OTPGlobals
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ from direct.showbase import DirectObject
|
|||
from otp.otpbase import OTPGlobals
|
||||
import sys
|
||||
from direct.gui.DirectGui import *
|
||||
from pandac.PandaModules import *
|
||||
from panda3d.core import *
|
||||
from otp.otpbase import OTPLocalizer
|
||||
|
||||
class ChatInputNormal(DirectObject.DirectObject):
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ from direct.showbase import DirectObject
|
|||
from otp.otpbase import OTPGlobals
|
||||
import sys
|
||||
from direct.gui.DirectGui import *
|
||||
from pandac.PandaModules import *
|
||||
from panda3d.core import *
|
||||
from otp.otpbase import OTPLocalizer
|
||||
|
||||
class ChatInputTyped(DirectObject.DirectObject):
|
||||
|
|
@ -127,7 +127,7 @@ class ChatInputTyped(DirectObject.DirectObject):
|
|||
def __execMessage(self, message):
|
||||
if not ChatInputTyped.ExecNamespace:
|
||||
ChatInputTyped.ExecNamespace = {}
|
||||
exec('from pandac.PandaModules import *', globals(), self.ExecNamespace)
|
||||
exec('from panda3d.core import *', globals(), self.ExecNamespace)
|
||||
self.importExecNamespace()
|
||||
try:
|
||||
if not __debug__ or __execWarnings__:
|
||||
|
|
|
|||
|
|
@ -3,7 +3,8 @@ from otp.otpbase import OTPGlobals
|
|||
import sys
|
||||
from direct.directnotify import DirectNotifyGlobal
|
||||
from direct.gui.DirectGui import *
|
||||
from pandac.PandaModules import *
|
||||
from panda3d.core import *
|
||||
from panda3d.otp import *
|
||||
from otp.otpbase import OTPLocalizer
|
||||
from direct.task import Task
|
||||
from otp.chat.ChatInputTyped import ChatInputTyped
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
import string
|
||||
import sys
|
||||
from direct.showbase import DirectObject
|
||||
from otp.otpbase import OTPGlobals
|
||||
from direct.fsm import ClassicFSM
|
||||
from direct.fsm import State
|
||||
from otp.login import SecretFriendsInfoPanel
|
||||
|
|
@ -10,7 +8,7 @@ from otp.otpbase import OTPLocalizer
|
|||
from direct.directnotify import DirectNotifyGlobal
|
||||
from otp.login import LeaveToPayDialog
|
||||
from direct.gui.DirectGui import *
|
||||
from pandac.PandaModules import *
|
||||
from panda3d.core import *
|
||||
ChatEvent = 'ChatEvent'
|
||||
NormalChatEvent = 'NormalChatEvent'
|
||||
SCChatEvent = 'SCChatEvent'
|
||||
|
|
@ -39,7 +37,7 @@ def removeThoughtPrefix(message):
|
|||
|
||||
class ChatManager(DirectObject.DirectObject):
|
||||
notify = DirectNotifyGlobal.directNotify.newCategory('ChatManager')
|
||||
execChat = base.config.GetBool('exec-chat', 0)
|
||||
execChat = ConfigVariableBool('exec-chat', 0).value
|
||||
|
||||
def __init__(self, cr, localAvatar):
|
||||
self.cr = cr
|
||||
|
|
@ -323,7 +321,7 @@ class ChatManager(DirectObject.DirectObject):
|
|||
if self.wantBackgroundFocus:
|
||||
self.chatInputNormal.chatEntry['backgroundFocus'] = 1
|
||||
self.acceptOnce('enterNormalChat', self.fsm.request, ['whisperChat', [avatarName, avatarId]])
|
||||
if base.cr.config.GetBool('force-typed-whisper-enabled', 0):
|
||||
if ConfigVariableBool('force-typed-whisper-enabled', 0).value:
|
||||
self.whisperButton['state'] = 'normal'
|
||||
self.enablewhisperButton()
|
||||
return
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ from otp.otpbase import OTPLocalizer
|
|||
from direct.directnotify import DirectNotifyGlobal
|
||||
from otp.otpbase import OTPGlobals
|
||||
from otp.speedchat import SCDecoders
|
||||
from pandac.PandaModules import *
|
||||
from panda3d.core import *
|
||||
from otp.chat.TalkMessage import TalkMessage
|
||||
from otp.chat.TalkHandle import TalkHandle
|
||||
import time
|
||||
|
|
@ -16,7 +16,7 @@ ThoughtPrefix = '.'
|
|||
class TalkAssistant(DirectObject.DirectObject):
|
||||
ExecNamespace = None
|
||||
notify = DirectNotifyGlobal.directNotify.newCategory('TalkAssistant')
|
||||
execChat = base.config.GetBool('exec-chat', 0)
|
||||
execChat = ConfigVariableBool('exec-chat', 0).value
|
||||
|
||||
def __init__(self):
|
||||
self.logWhispers = 1
|
||||
|
|
@ -25,7 +25,7 @@ class TalkAssistant(DirectObject.DirectObject):
|
|||
self.zeroTimeDay = time.time()
|
||||
self.zeroTimeGame = globalClock.getRealTime()
|
||||
self.floodThreshold = 10.0
|
||||
self.useWhiteListFilter = base.config.GetBool('white-list-filter-openchat', 0)
|
||||
self.useWhiteListFilter = ConfigVariableBool('white-list-filter-openchat', 0).value
|
||||
self.lastWhisperDoId = None
|
||||
self.lastWhisperPlayerId = None
|
||||
self.lastWhisper = None
|
||||
|
|
|
|||
|
|
@ -1,7 +1,4 @@
|
|||
from bisect import bisect_left
|
||||
import string
|
||||
import sys
|
||||
import os
|
||||
|
||||
class WhiteList:
|
||||
|
||||
|
|
@ -14,10 +11,7 @@ class WhiteList:
|
|||
self.numWords = len(self.words)
|
||||
|
||||
def cleanText(self, text):
|
||||
if type(text) == bytes:
|
||||
text = text.decode('utf-8').strip('.,?!')
|
||||
else:
|
||||
text = text.strip('.,?!')
|
||||
text = text.strip('.,?!')
|
||||
text = text.lower().encode('utf-8')
|
||||
return text
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
from pandac.PandaModules import StringStream
|
||||
from panda3d.core import StringStream
|
||||
from direct.distributed.PyDatagram import PyDatagram
|
||||
import random
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +1,9 @@
|
|||
import sys
|
||||
import time
|
||||
import string
|
||||
import types
|
||||
import random
|
||||
import gc
|
||||
import os
|
||||
from pandac.PandaModules import *
|
||||
from pandac.PandaModules import *
|
||||
from panda3d.core import *
|
||||
from direct.gui.DirectGui import *
|
||||
from otp.distributed.OtpDoGlobals import *
|
||||
from direct.interval.IntervalGlobal import ivalMgr
|
||||
|
|
@ -16,20 +13,17 @@ from direct.fsm.ClassicFSM import ClassicFSM
|
|||
from direct.fsm.State import State
|
||||
from direct.task import Task
|
||||
from direct.distributed import DistributedSmoothNode
|
||||
from direct.showbase import PythonUtil, GarbageReport, BulletinBoardWatcher
|
||||
from direct.showbase import PythonUtil, GarbageReport
|
||||
from direct.showbase.ContainerLeakDetector import ContainerLeakDetector
|
||||
from direct.showbase import MessengerLeakDetector
|
||||
from direct.showbase.GarbageReportScheduler import GarbageReportScheduler
|
||||
from direct.showbase import LeakDetectors
|
||||
from direct.distributed.PyDatagram import PyDatagram
|
||||
from direct.distributed.PyDatagramIterator import PyDatagramIterator
|
||||
from otp.avatar import Avatar
|
||||
from otp.avatar.DistributedPlayer import DistributedPlayer
|
||||
from otp.login import LoginTTSpecificDevAccount
|
||||
from otp.login.CreateAccountScreen import CreateAccountScreen
|
||||
from otp.login import LoginScreen
|
||||
from otp.otpgui import OTPDialog
|
||||
from otp.avatar import DistributedAvatar
|
||||
from otp.otpbase import OTPLocalizer
|
||||
from otp.login import LoginGSAccount
|
||||
from otp.login import LoginGoAccount
|
||||
|
|
@ -45,14 +39,15 @@ from otp.distributed import OtpDoGlobals
|
|||
from otp.distributed.TelemetryLimiter import TelemetryLimiter
|
||||
from otp.ai.GarbageLeakServerEventAggregator import GarbageLeakServerEventAggregator
|
||||
from .PotentialAvatar import PotentialAvatar
|
||||
from enum import IntEnum
|
||||
|
||||
class OTPClientRepository(ClientRepositoryBase):
|
||||
notify = directNotify.newCategory('OTPClientRepository')
|
||||
avatarLimit = 6
|
||||
WishNameResult = Enum(['Failure',
|
||||
WishNameResult = IntEnum('WishNameResult', ('Failure',
|
||||
'PendingApproval',
|
||||
'Approved',
|
||||
'Rejected'])
|
||||
'Rejected'), start=0)
|
||||
|
||||
def __init__(self, serverVersion, launcher = None, playGame = None):
|
||||
ClientRepositoryBase.__init__(self)
|
||||
|
|
@ -60,7 +55,7 @@ class OTPClientRepository(ClientRepositoryBase):
|
|||
self.launcher = launcher
|
||||
base.launcher = launcher
|
||||
self.__currentAvId = 0
|
||||
self.productName = config.GetString('product-name', 'DisneyOnline-US')
|
||||
self.productName = ConfigVariableString('product-name', 'DisneyOnline-US').value
|
||||
self.createAvatarClass = None
|
||||
self.systemMessageSfx = None
|
||||
reg_deployment = ''
|
||||
|
|
@ -84,7 +79,7 @@ class OTPClientRepository(ClientRepositoryBase):
|
|||
if self.launcher:
|
||||
self.blue = self.launcher.getBlue()
|
||||
|
||||
fakeBlue = config.GetString('fake-blue', '')
|
||||
fakeBlue = ConfigVariableString('fake-blue', '').value
|
||||
if fakeBlue:
|
||||
self.blue = fakeBlue
|
||||
|
||||
|
|
@ -92,7 +87,7 @@ class OTPClientRepository(ClientRepositoryBase):
|
|||
if self.launcher:
|
||||
self.playToken = self.launcher.getPlayToken()
|
||||
|
||||
fakePlayToken = config.GetString('fake-playtoken', '')
|
||||
fakePlayToken = ConfigVariableString('fake-playtoken', '').value
|
||||
if fakePlayToken:
|
||||
self.playToken = fakePlayToken
|
||||
|
||||
|
|
@ -100,8 +95,8 @@ class OTPClientRepository(ClientRepositoryBase):
|
|||
if self.launcher:
|
||||
self.DISLToken = self.launcher.getDISLToken()
|
||||
|
||||
fakeDISLToken = config.GetString('fake-DISLToken', '')
|
||||
fakeDISLPlayerName = config.GetString('fake-DISL-PlayerName', '')
|
||||
fakeDISLToken = ConfigVariableString('fake-DISLToken', '').value
|
||||
fakeDISLPlayerName = ConfigVariableString('fake-DISL-PlayerName', '').value
|
||||
if fakeDISLToken:
|
||||
self.DISLToken = fakeDISLToken
|
||||
elif fakeDISLPlayerName:
|
||||
|
|
@ -109,39 +104,39 @@ class OTPClientRepository(ClientRepositoryBase):
|
|||
defaultNumAvatars = 4
|
||||
defaultNumAvatarSlots = 4
|
||||
defaultNumConcur = 1
|
||||
subCount = config.GetInt('fake-DISL-NumSubscriptions', 1)
|
||||
playerAccountId = config.GetInt('fake-DISL-PlayerAccountId', defaultId)
|
||||
subCount = ConfigVariableInt('fake-DISL-NumSubscriptions', 1).value
|
||||
playerAccountId = ConfigVariableInt('fake-DISL-PlayerAccountId', defaultId).value
|
||||
self.DISLToken = ('ACCOUNT_NAME=%s' % fakeDISLPlayerName +
|
||||
'&ACCOUNT_NUMBER=%s' % playerAccountId +
|
||||
'&ACCOUNT_NAME_APPROVAL=%s' % config.GetString('fake-DISL-PlayerNameApproved', 'YES') +
|
||||
'&SWID=%s' % config.GetString('fake-DISL-SWID', '{1763AC36-D73F-41C2-A54A-B579E58B69C8}') +
|
||||
'&FAMILY_NUMBER=%s' % config.GetString('fake-DISL-FamilyAccountId', '-1') +
|
||||
'&familyAdmin=%s' % config.GetString('fake-DISL-FamilyAdmin', '1') +
|
||||
'&PIRATES_ACCESS=%s' % config.GetString('fake-DISL-PiratesAccess', 'FULL') +
|
||||
'&PIRATES_MAX_NUM_AVATARS=%s' % config.GetInt('fake-DISL-MaxAvatars', defaultNumAvatars) +
|
||||
'&PIRATES_NUM_AVATAR_SLOTS=%s' % config.GetInt('fake-DISL-MaxAvatarSlots', defaultNumAvatarSlots) +
|
||||
'&expires=%s' % config.GetString('fake-DISL-expire', '1577898000') +
|
||||
'&OPEN_CHAT_ENABLED=%s' % config.GetString('fake-DISL-OpenChatEnabled', 'YES') +
|
||||
'&CREATE_FRIENDS_WITH_CHAT=%s' % config.GetString('fake-DISL-CreateFriendsWithChat', 'YES') +
|
||||
'&CHAT_CODE_CREATION_RULE=%s' % config.GetString('fake-DISL-ChatCodeCreation', 'YES') +
|
||||
'&FAMILY_MEMBERS=%s' % config.GetString('fake-DISL-FamilyMembers') + '&PIRATES_SUB_COUNT=%s' % subCount)
|
||||
'&ACCOUNT_NAME_APPROVAL=%s' % ConfigVariableString('fake-DISL-PlayerNameApproved', 'YES').value +
|
||||
'&SWID=%s' % ConfigVariableString('fake-DISL-SWID', '{1763AC36-D73F-41C2-A54A-B579E58B69C8}').value +
|
||||
'&FAMILY_NUMBER=%s' % ConfigVariableString('fake-DISL-FamilyAccountId', '-1').value +
|
||||
'&familyAdmin=%s' % ConfigVariableString('fake-DISL-FamilyAdmin', '1').value +
|
||||
'&PIRATES_ACCESS=%s' % ConfigVariableString('fake-DISL-PiratesAccess', 'FULL').value +
|
||||
'&PIRATES_MAX_NUM_AVATARS=%s' % ConfigVariableInt('fake-DISL-MaxAvatars', defaultNumAvatars).value +
|
||||
'&PIRATES_NUM_AVATAR_SLOTS=%s' % ConfigVariableInt('fake-DISL-MaxAvatarSlots', defaultNumAvatarSlots).value +
|
||||
'&expires=%s' % ConfigVariableString('fake-DISL-expire', '1577898000').value +
|
||||
'&OPEN_CHAT_ENABLED=%s' % ConfigVariableString('fake-DISL-OpenChatEnabled', 'YES').value +
|
||||
'&CREATE_FRIENDS_WITH_CHAT=%s' % ConfigVariableString('fake-DISL-CreateFriendsWithChat', 'YES').value +
|
||||
'&CHAT_CODE_CREATION_RULE=%s' % ConfigVariableString('fake-DISL-ChatCodeCreation', 'YES').value +
|
||||
'&FAMILY_MEMBERS=%s' % ConfigVariableString('fake-DISL-FamilyMembers').value + '&PIRATES_SUB_COUNT=%s' % subCount)
|
||||
for i in range(subCount):
|
||||
self.DISLToken += ('&PIRATES_SUB_%s_ACCESS=%s' % (i, config.GetString('fake-DISL-Sub-%s-Access' % i, 'FULL')) +
|
||||
'&PIRATES_SUB_%s_ACTIVE=%s' % (i, config.GetString('fake-DISL-Sub-%s-Active' % i, 'YES')) +
|
||||
'&PIRATES_SUB_%s_ID=%s' % (i, config.GetInt('fake-DISL-Sub-%s-Id' % i, playerAccountId) + config.GetInt('fake-DISL-Sub-Id-Offset', 0)) +
|
||||
'&PIRATES_SUB_%s_LEVEL=%s' % (i, config.GetInt('fake-DISL-Sub-%s-Level' % i, 3)) +
|
||||
'&PIRATES_SUB_%s_NAME=%s' % (i, config.GetString('fake-DISL-Sub-%s-Name' % i, fakeDISLPlayerName)) +
|
||||
'&PIRATES_SUB_%s_NUM_AVATARS=%s' % (i, config.GetInt('fake-DISL-Sub-%s-NumAvatars' % i, defaultNumAvatars)) +
|
||||
'&PIRATES_SUB_%s_NUM_CONCUR=%s' % (i, config.GetInt('fake-DISL-Sub-%s-NumConcur' % i, defaultNumConcur)) +
|
||||
'&PIRATES_SUB_%s_OWNERID=%s' % (i, config.GetInt('fake-DISL-Sub-%s-OwnerId' % i, playerAccountId)) +
|
||||
'&PIRATES_SUB_%s_FOUNDER=%s' % (i, config.GetString('fake-DISL-Sub-%s-Founder' % i, 'YES')))
|
||||
self.DISLToken += ('&PIRATES_SUB_%s_ACCESS=%s' % (i, ConfigVariableString('fake-DISL-Sub-%s-Access' % i, 'FULL').value) +
|
||||
'&PIRATES_SUB_%s_ACTIVE=%s' % (i, ConfigVariableString('fake-DISL-Sub-%s-Active' % i, 'YES').value) +
|
||||
'&PIRATES_SUB_%s_ID=%s' % (i, ConfigVariableInt('fake-DISL-Sub-%s-Id' % i, playerAccountId).value + ConfigVariableInt('fake-DISL-Sub-Id-Offset', 0).value) +
|
||||
'&PIRATES_SUB_%s_LEVEL=%s' % (i, ConfigVariableInt('fake-DISL-Sub-%s-Level' % i, 3).value) +
|
||||
'&PIRATES_SUB_%s_NAME=%s' % (i, ConfigVariableString('fake-DISL-Sub-%s-Name' % i, fakeDISLPlayerName).value) +
|
||||
'&PIRATES_SUB_%s_NUM_AVATARS=%s' % (i, ConfigVariableInt('fake-DISL-Sub-%s-NumAvatars' % i, defaultNumAvatars).value) +
|
||||
'&PIRATES_SUB_%s_NUM_CONCUR=%s' % (i, ConfigVariableInt('fake-DISL-Sub-%s-NumConcur' % i, defaultNumConcur).value) +
|
||||
'&PIRATES_SUB_%s_OWNERID=%s' % (i, ConfigVariableInt('fake-DISL-Sub-%s-OwnerId' % i, playerAccountId).value) +
|
||||
'&PIRATES_SUB_%s_FOUNDER=%s' % (i, ConfigVariableString('fake-DISL-Sub-%s-Founder' % i, 'YES').value))
|
||||
|
||||
self.DISLToken += ('&WL_CHAT_ENABLED=%s' % config.GetString('fake-DISL-WLChatEnabled', 'YES') +
|
||||
self.DISLToken += ('&WL_CHAT_ENABLED=%s' % ConfigVariableString('fake-DISL-WLChatEnabled', 'YES').value +
|
||||
'&valid=true')
|
||||
if base.logPrivateInfo:
|
||||
print(self.DISLToken)
|
||||
|
||||
self.requiredLogin = config.GetString('required-login', 'auto')
|
||||
self.requiredLogin = ConfigVariableString('required-login', 'auto').value
|
||||
if self.requiredLogin == 'auto':
|
||||
self.notify.info('required-login auto.')
|
||||
elif self.requiredLogin == 'green':
|
||||
|
|
@ -167,10 +162,10 @@ class OTPClientRepository(ClientRepositoryBase):
|
|||
else:
|
||||
self.http = HTTPClient()
|
||||
|
||||
self.accountOldAuth = config.GetBool('account-old-auth', 0)
|
||||
self.accountOldAuth = config.GetBool('%s-account-old-auth' % game.name,
|
||||
self.accountOldAuth)
|
||||
self.useNewTTDevLogin = base.config.GetBool('use-tt-specific-dev-login', False)
|
||||
self.accountOldAuth = ConfigVariableBool('account-old-auth', 0).value
|
||||
self.accountOldAuth = ConfigVariableBool('%s-account-old-auth' % game.name,
|
||||
self.accountOldAuth).value
|
||||
self.useNewTTDevLogin = ConfigVariableBool('use-tt-specific-dev-login', False).value
|
||||
if __astron__:
|
||||
self.loginInterface = LoginAstronAccount.LoginAstronAccount(self)
|
||||
self.notify.info('loginInterface: LoginAstronAccount')
|
||||
|
|
@ -193,11 +188,11 @@ class OTPClientRepository(ClientRepositoryBase):
|
|||
self.loginInterface = LoginTTAccount.LoginTTAccount(self)
|
||||
self.notify.info('loginInterface: LoginTTAccount')
|
||||
|
||||
self.secretChatAllowed = base.config.GetBool('allow-secret-chat', 0)
|
||||
self.openChatAllowed = base.config.GetBool('allow-open-chat', 0)
|
||||
self.secretChatNeedsParentPassword = base.config.GetBool('secret-chat-needs-parent-password', 0) or (self.launcher and self.launcher.getNeedPwForSecretKey())
|
||||
self.parentPasswordSet = base.config.GetBool('parent-password-set', 0) or (self.launcher and self.launcher.getParentPasswordSet())
|
||||
self.userSignature = base.config.GetString('signature', 'none')
|
||||
self.secretChatAllowed = ConfigVariableBool('allow-secret-chat', 0).value
|
||||
self.openChatAllowed = ConfigVariableBool('allow-open-chat', 0).value
|
||||
self.secretChatNeedsParentPassword = ConfigVariableBool('secret-chat-needs-parent-password', 0).value or (self.launcher and self.launcher.getNeedPwForSecretKey())
|
||||
self.parentPasswordSet = ConfigVariableBool('parent-password-set', 0).value or (self.launcher and self.launcher.getParentPasswordSet())
|
||||
self.userSignature = ConfigVariableString('signature', 'none').value
|
||||
self.freeTimeExpiresAt = -1
|
||||
self.__isPaid = 0
|
||||
self.periodTimerExpired = 0
|
||||
|
|
@ -206,18 +201,18 @@ class OTPClientRepository(ClientRepositoryBase):
|
|||
self.parentMgr.registerParent(OTPGlobals.SPRender, base.render)
|
||||
self.parentMgr.registerParent(OTPGlobals.SPHidden, NodePath())
|
||||
self.timeManager = None
|
||||
if config.GetBool('detect-leaks', 0) or config.GetBool('client-detect-leaks', 0):
|
||||
if ConfigVariableBool('detect-leaks', 0).value or ConfigVariableBool('client-detect-leaks', 0).value:
|
||||
self.startLeakDetector()
|
||||
|
||||
if config.GetBool('detect-messenger-leaks', 0) or config.GetBool('ai-detect-messenger-leaks', 0):
|
||||
if ConfigVariableBool('detect-messenger-leaks', 0).value or ConfigVariableBool('ai-detect-messenger-leaks', 0).value:
|
||||
self.messengerLeakDetector = MessengerLeakDetector.MessengerLeakDetector('client messenger leak detector')
|
||||
if config.GetBool('leak-messages', 0):
|
||||
if ConfigVariableBool('leak-messages', 0).value:
|
||||
MessengerLeakDetector._leakMessengerObject()
|
||||
|
||||
if config.GetBool('run-garbage-reports', 0) or config.GetBool('client-run-garbage-reports', 0):
|
||||
if ConfigVariableBool('run-garbage-reports', 0).value or ConfigVariableBool('client-run-garbage-reports', 0).value:
|
||||
noneValue = -1.0
|
||||
reportWait = config.GetFloat('garbage-report-wait', noneValue)
|
||||
reportWaitScale = config.GetFloat('garbage-report-wait-scale', noneValue)
|
||||
reportWait = ConfigVariableDouble('garbage-report-wait', noneValue).value
|
||||
reportWaitScale = ConfigVariableDouble('garbage-report-wait-scale', noneValue).value
|
||||
if reportWait == noneValue:
|
||||
reportWait = 60.0 * 2.0
|
||||
if reportWaitScale == noneValue:
|
||||
|
|
@ -225,8 +220,8 @@ class OTPClientRepository(ClientRepositoryBase):
|
|||
self.garbageReportScheduler = GarbageReportScheduler(waitBetween=reportWait,
|
||||
waitScale=reportWaitScale)
|
||||
|
||||
self._proactiveLeakChecks = config.GetBool('proactive-leak-checks', 1) or config.GetBool('client-proactive-leak-checks', 1)
|
||||
self._crashOnProactiveLeakDetect = config.GetBool('crash-on-proactive-leak-detect', 1)
|
||||
self._proactiveLeakChecks = ConfigVariableBool('proactive-leak-checks', 1).value or ConfigVariableBool('client-proactive-leak-checks', 1).value
|
||||
self._crashOnProactiveLeakDetect = ConfigVariableBool('crash-on-proactive-leak-detect', 1).value
|
||||
self.activeDistrictMap = {}
|
||||
self.telemetryLimiter = TelemetryLimiter()
|
||||
self.serverVersion = serverVersion
|
||||
|
|
@ -415,8 +410,8 @@ class OTPClientRepository(ClientRepositoryBase):
|
|||
self.playGame = playGame(self.gameFSM, self.gameDoneEvent)
|
||||
self.shardListHandle = None
|
||||
self.uberZoneInterest = None
|
||||
self.wantSwitchboard = config.GetBool('want-switchboard', 0)
|
||||
self.wantSwitchboardHacks = base.config.GetBool('want-switchboard-hacks', 0)
|
||||
self.wantSwitchboard = ConfigVariableBool('want-switchboard', 0).value
|
||||
self.wantSwitchboardHacks = ConfigVariableBool('want-switchboard-hacks', 0).value
|
||||
self.__pendingGenerates = {}
|
||||
self.__pendingMessages = {}
|
||||
self.__doId2pendingInterest = {}
|
||||
|
|
@ -427,7 +422,7 @@ class OTPClientRepository(ClientRepositoryBase):
|
|||
def startLeakDetector(self):
|
||||
if hasattr(self, 'leakDetector'):
|
||||
return False
|
||||
firstCheckDelay = config.GetFloat('leak-detector-first-check-delay', 2 * 60.0)
|
||||
firstCheckDelay = ConfigVariableDouble('leak-detector-first-check-delay', 2 * 60.0).value
|
||||
self.leakDetector = ContainerLeakDetector('client container leak detector', firstCheckDelay=firstCheckDelay)
|
||||
self.objectTypesLeakDetector = LeakDetectors.ObjectTypesLeakDetector()
|
||||
self.garbageLeakDetector = LeakDetectors.GarbageLeakDetector()
|
||||
|
|
@ -685,7 +680,7 @@ class OTPClientRepository(ClientRepositoryBase):
|
|||
@report(types=['args', 'deltaStamp'], dConfigParam='teleport')
|
||||
def waitForGetGameListResponse(self):
|
||||
if self.isGameListCorrect():
|
||||
if base.config.GetBool('game-server-tests', 0):
|
||||
if ConfigVariableBool('game-server-tests', 0).value:
|
||||
from otp.distributed import GameServerTestSuite
|
||||
GameServerTestSuite.GameServerTestSuite(self)
|
||||
self.loginFSM.request('waitForShardList')
|
||||
|
|
@ -961,7 +956,7 @@ class OTPClientRepository(ClientRepositoryBase):
|
|||
avNames[1] = di.getString()
|
||||
avNames[2] = di.getString()
|
||||
avNames[3] = di.getString()
|
||||
avDNA = di.getString()
|
||||
avDNA = di.getBlob()
|
||||
avPosition = di.getUint8()
|
||||
aname = di.getUint8()
|
||||
potAv = PotentialAvatar(avNum, avNames, avDNA, avPosition, aname)
|
||||
|
|
@ -1047,7 +1042,7 @@ class OTPClientRepository(ClientRepositoryBase):
|
|||
datagram = PyDatagram()
|
||||
datagram.addUint16(CLIENT_CREATE_AVATAR)
|
||||
datagram.addUint16(0)
|
||||
datagram.addString(avDNA.makeNetString())
|
||||
datagram.addBlob(avDNA.makeNetString())
|
||||
datagram.addUint8(avPosition)
|
||||
self.newName = avName
|
||||
self.newDNA = avDNA
|
||||
|
|
@ -1207,7 +1202,7 @@ class OTPClientRepository(ClientRepositoryBase):
|
|||
else:
|
||||
logFunc = self.notify.warning
|
||||
allowExit = False
|
||||
if base.config.GetBool('direct-gui-edit', 0):
|
||||
if ConfigVariableBool('direct-gui-edit', 0).value:
|
||||
logFunc('There are leaks: %s tasks, %s events, %s ivals, %s garbage cycles\nLeaked Events may be due to direct gui editing' % (leakedTasks,
|
||||
leakedEvents,
|
||||
leakedIvals,
|
||||
|
|
@ -1624,7 +1619,7 @@ class OTPClientRepository(ClientRepositoryBase):
|
|||
avId = self.handlerArgs['avId']
|
||||
if not self.SupportTutorial or base.localAvatar.tutorialAck:
|
||||
self.gameFSM.request('playGame', [hoodId, zoneId, avId])
|
||||
elif base.config.GetBool('force-tutorial', 1):
|
||||
elif ConfigVariableBool('force-tutorial', 1).value:
|
||||
if hasattr(self, 'skipTutorialRequest') and self.skipTutorialRequest:
|
||||
self.gameFSM.request('playGame', [hoodId, zoneId, avId])
|
||||
self.gameFSM.request('skipTutorialRequest', [hoodId, zoneId, avId])
|
||||
|
|
@ -1698,9 +1693,9 @@ class OTPClientRepository(ClientRepositoryBase):
|
|||
def isFreeTimeExpired(self):
|
||||
if self.accountOldAuth:
|
||||
return 0
|
||||
if base.config.GetBool('free-time-expired', 0):
|
||||
if ConfigVariableBool('free-time-expired', 0).value:
|
||||
return 1
|
||||
if base.config.GetBool('unlimited-free-time', 0):
|
||||
if ConfigVariableBool('unlimited-free-time', 0).value:
|
||||
return 0
|
||||
if self.freeTimeExpiresAt == -1:
|
||||
return 0
|
||||
|
|
@ -1726,7 +1721,7 @@ class OTPClientRepository(ClientRepositoryBase):
|
|||
return self.blue != None
|
||||
|
||||
def isPaid(self):
|
||||
paidStatus = base.config.GetString('force-paid-status', '')
|
||||
paidStatus = ConfigVariableString('force-paid-status', '').value
|
||||
if not paidStatus:
|
||||
return self.__isPaid
|
||||
elif paidStatus == 'paid':
|
||||
|
|
@ -1744,7 +1739,7 @@ class OTPClientRepository(ClientRepositoryBase):
|
|||
self.__isPaid = isPaid
|
||||
|
||||
def allowFreeNames(self):
|
||||
return base.config.GetInt('allow-free-names', 1)
|
||||
return ConfigVariableInt('allow-free-names', 1).value
|
||||
|
||||
def allowSecretChat(self):
|
||||
return self.secretChatAllowed or self.productName == 'Terra-DMC' and self.isBlue() and self.secretChatAllowed
|
||||
|
|
@ -2114,7 +2109,7 @@ class OTPClientRepository(ClientRepositoryBase):
|
|||
def handleDatagram(self, di):
|
||||
if self.notify.getDebug():
|
||||
print('ClientRepository received datagram:')
|
||||
di.getDatagram().dumpHex(ostream)
|
||||
di.getDatagram().dumpHex(Notify.out())
|
||||
msgType = self.getMsgType()
|
||||
if msgType == 65535:
|
||||
self.lostConnection()
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
from pandac.PandaModules import *
|
||||
from panda3d.core import *
|
||||
from direct.distributed import DistributedObject
|
||||
from direct.directnotify import DirectNotifyGlobal
|
||||
from otp.otpbase import OTPGlobals
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
from pandac.PandaModules import *
|
||||
from panda3d.core import *
|
||||
from panda3d.otp import *
|
||||
from direct.gui.DirectGui import *
|
||||
from direct.directnotify import DirectNotifyGlobal
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
from direct.task import Task
|
||||
from otp.otpbase import OTPLocalizer
|
||||
from direct.gui.DirectGui import *
|
||||
from pandac.PandaModules import *
|
||||
from panda3d.core import *
|
||||
from direct.showbase.DirectObject import DirectObject
|
||||
|
||||
class DownloadWatcher(DirectObject):
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
from pandac.PandaModules import *
|
||||
from panda3d.core import *
|
||||
from direct.showbase.MessengerGlobal import *
|
||||
from direct.task.TaskManagerGlobal import *
|
||||
from direct.task.Task import Task
|
||||
|
|
|
|||
|
|
@ -65,15 +65,13 @@ class LauncherBase(DirectObject):
|
|||
print('Current time: ' + time.asctime(time.localtime(time.time())) + ' ' + time.tzname[0])
|
||||
print('sys.path = ', sys.path)
|
||||
print('sys.argv = ', sys.argv)
|
||||
launcherConfig = DConfig
|
||||
builtins.config = launcherConfig
|
||||
if config.GetBool('log-private-info', 0):
|
||||
if ConfigVariableBool('log-private-info', 0).value:
|
||||
print('os.environ = ', os.environ)
|
||||
self.miniTaskMgr = MiniTaskManager()
|
||||
self.nout = MultiplexStream()
|
||||
Notify.ptr().setOstreamPtr(self.nout, 0)
|
||||
self.nout.addFile(Filename(logfile))
|
||||
if launcherConfig.GetBool('console-output', 0):
|
||||
if ConfigVariableBool('console-output', 0).value:
|
||||
self.nout.addStandardOutput()
|
||||
sys.stdout.console = True
|
||||
sys.stderr.console = True
|
||||
|
|
@ -88,7 +86,7 @@ class LauncherBase(DirectObject):
|
|||
self.setRegistry(self.GameLogFilenameKey, logfile)
|
||||
self.showPhase = 3.5
|
||||
self.currentPhase = 4
|
||||
serverVersion = launcherConfig.GetString('server-version', 'no_version_set')
|
||||
serverVersion = ConfigVariableString('server-version', 'no_version_set').value
|
||||
if serverVersion == 'no_version_set':
|
||||
self.setPandaErrorCode(10)
|
||||
self.notify.info('Aborting, config did not load!')
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
from . import Entity
|
||||
from . import DistributedEntity
|
||||
from pandac.PandaModules import NodePath
|
||||
from panda3d.core import NodePath
|
||||
|
||||
class NodePathEntityBase:
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
from pandac.PandaModules import *
|
||||
from panda3d.core import *
|
||||
from otp.otpbase import OTPGlobals
|
||||
from direct.directnotify import DirectNotifyGlobal
|
||||
from . import BasicEntities
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
from direct.showbase import DirectObject
|
||||
from direct.directnotify import DirectNotifyGlobal
|
||||
from . import BasicEntities
|
||||
from pandac.PandaModules import *
|
||||
from pandac.PandaModules import *
|
||||
from panda3d.core import *
|
||||
from panda3d.core import *
|
||||
from direct.interval.IntervalGlobal import *
|
||||
from direct.distributed.ClockDelta import *
|
||||
from toontown.toonbase import ToontownGlobals
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
from pandac.PandaModules import *
|
||||
from panda3d.core import *
|
||||
from direct.distributed.ClockDelta import *
|
||||
from direct.directnotify import DirectNotifyGlobal
|
||||
from direct.fsm import ClassicFSM
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
from direct.distributed.ClockDelta import *
|
||||
from pandac.PandaModules import *
|
||||
from panda3d.core import *
|
||||
from direct.showbase.PythonUtil import Functor, sameElements, list2dict, uniqueElements
|
||||
from direct.interval.IntervalGlobal import *
|
||||
from toontown.distributed.ToontownMsgTypes import *
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
from pandac.PandaModules import *
|
||||
from panda3d.core import *
|
||||
from direct.directnotify import DirectNotifyGlobal
|
||||
import types
|
||||
from . import AttribDesc
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
from . import Entity, BasicEntities
|
||||
from pandac.PandaModules import NodePath
|
||||
from panda3d.core import NodePath
|
||||
from direct.directnotify import DirectNotifyGlobal
|
||||
|
||||
class LocatorEntity(Entity.Entity, NodePath):
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
from direct.interval.IntervalGlobal import *
|
||||
from .Entity import Entity
|
||||
from pandac.PandaModules import Vec3
|
||||
from panda3d.core import Vec3
|
||||
|
||||
class PropSpinner(Entity):
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
from pandac.PandaModules import *
|
||||
from panda3d.core import *
|
||||
from direct.gui.DirectGui import *
|
||||
from pandac.PandaModules import *
|
||||
from panda3d.core import *
|
||||
from direct.fsm import StateData
|
||||
from otp.otpgui import OTPDialog
|
||||
from direct.fsm import ClassicFSM
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
from pandac.PandaModules import *
|
||||
from panda3d.core import *
|
||||
from otp.otpbase import OTPGlobals
|
||||
from direct.gui.DirectGui import *
|
||||
from otp.otpgui import OTPDialog
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
from pandac.PandaModules import *
|
||||
from panda3d.core import *
|
||||
|
||||
class HTTPUtilException(Exception):
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ from otp.otpbase import OTPGlobals
|
|||
from otp.otpbase import OTPLauncherGlobals
|
||||
from otp.otpbase import OTPLocalizer
|
||||
from direct.gui.DirectGui import *
|
||||
from pandac.PandaModules import *
|
||||
from panda3d.core import *
|
||||
import os
|
||||
|
||||
class LeaveToPayDialog:
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
from pandac.PandaModules import *
|
||||
from panda3d.core import *
|
||||
from direct.distributed.MsgTypes import *
|
||||
from direct.directnotify import DirectNotifyGlobal
|
||||
from . import LoginBase
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
from pandac.PandaModules import *
|
||||
from panda3d.core import *
|
||||
from direct.distributed.MsgTypes import *
|
||||
from direct.directnotify import DirectNotifyGlobal
|
||||
from . import LoginBase
|
||||
|
|
|
|||
|
|
@ -2,14 +2,13 @@ import json
|
|||
import os
|
||||
import time
|
||||
from datetime import datetime
|
||||
from pandac.PandaModules import *
|
||||
from panda3d.core import *
|
||||
from direct.distributed.MsgTypes import *
|
||||
from direct.gui.DirectGui import *
|
||||
from direct.fsm import StateData
|
||||
from direct.fsm import ClassicFSM
|
||||
from direct.fsm import State
|
||||
from direct.directnotify import DirectNotifyGlobal
|
||||
from direct.task import Task
|
||||
from otp.otpgui import OTPDialog
|
||||
from otp.otpbase import OTPLocalizer
|
||||
from otp.otpbase import OTPGlobals
|
||||
|
|
@ -17,8 +16,8 @@ from otp.uberdog.AccountDetailRecord import AccountDetailRecord, SubDetailRecord
|
|||
from . import GuiScreen
|
||||
|
||||
class LoginScreen(StateData.StateData, GuiScreen.GuiScreen):
|
||||
AutoLoginName = base.config.GetString('%s-auto-login%s' % (game.name, os.getenv('otp_client', '')), '')
|
||||
AutoLoginPassword = base.config.GetString('%s-auto-password%s' % (game.name, os.getenv('otp_client', '')), '')
|
||||
AutoLoginName = ConfigVariableString('%s-auto-login%s' % (game.name, os.getenv('otp_client', '')), '').value
|
||||
AutoLoginPassword = ConfigVariableString('%s-auto-password%s' % (game.name, os.getenv('otp_client', '')), '').value
|
||||
notify = DirectNotifyGlobal.directNotify.newCategory('LoginScreen')
|
||||
ActiveEntryColor = Vec4(1, 1, 1, 1)
|
||||
InactiveEntryColor = Vec4(0.8, 0.8, 0.8, 1)
|
||||
|
|
@ -439,11 +438,11 @@ class LoginScreen(StateData.StateData, GuiScreen.GuiScreen):
|
|||
self.cr.whiteListChatEnabled = 1
|
||||
else:
|
||||
self.cr.whiteListChatEnabled = 0
|
||||
self.lastLoggedInStr = base.config.GetString('last-logged-in', '')
|
||||
self.lastLoggedInStr = ConfigVariableString('last-logged-in', '').value
|
||||
self.cr.lastLoggedIn = datetime.now()
|
||||
if hasattr(self.cr, 'toontownTimeManager'):
|
||||
self.cr.lastLoggedIn = self.cr.toontownTimeManager.convertStrToToontownTime(self.lastLoggedInStr)
|
||||
self.cr.withParentAccount = base.config.GetBool('dev-with-parent-account', 0)
|
||||
self.cr.withParentAccount = ConfigVariableBool('dev-with-parent-account', 0).value
|
||||
self.notify.info('Login response return code %s' % returnCode)
|
||||
if returnCode == 0:
|
||||
self.__handleLoginSuccess()
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
from pandac.PandaModules import *
|
||||
from panda3d.core import *
|
||||
from direct.distributed.MsgTypes import *
|
||||
from direct.directnotify import DirectNotifyGlobal
|
||||
from . import LoginBase
|
||||
|
|
@ -24,7 +24,7 @@ class LoginTTAccount(LoginBase.LoginBase):
|
|||
datagram.addString(cr.serverVersion)
|
||||
datagram.addUint32(cr.hashVal)
|
||||
self.__addTokenType(datagram)
|
||||
datagram.addString(cr.wantMagicWords)
|
||||
datagram.addString('YES' if cr.wantMagicWords else 'NO')
|
||||
else:
|
||||
datagram.addUint16(CLIENT_LOGIN_2)
|
||||
self.__addPlayToken(datagram)
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
from pandac.PandaModules import *
|
||||
from panda3d.core import *
|
||||
from direct.distributed.MsgTypes import *
|
||||
from direct.directnotify import DirectNotifyGlobal
|
||||
from . import LoginTTAccount
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
from pandac.PandaModules import *
|
||||
from panda3d.core import *
|
||||
from direct.directnotify import DirectNotifyGlobal
|
||||
from . import LoginTTAccount
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
from pandac.PandaModules import *
|
||||
from panda3d.core import *
|
||||
from direct.gui.DirectGui import *
|
||||
from otp.otpbase import OTPLocalizer
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
from pandac.PandaModules import *
|
||||
from panda3d.core import *
|
||||
from otp.otpbase.OTPGlobals import *
|
||||
from direct.gui.DirectGui import *
|
||||
from .MultiPageTextFrame import *
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
from pandac.PandaModules import *
|
||||
from panda3d.core import *
|
||||
from otp.otpbase.OTPGlobals import *
|
||||
from direct.gui.DirectGui import *
|
||||
from .MultiPageTextFrame import *
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
from pandac.PandaModules import *
|
||||
from panda3d.core import *
|
||||
from direct.showbase import DirectObject
|
||||
|
||||
class Impulse(DirectObject.DirectObject):
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
from pandac.PandaModules import *
|
||||
from panda3d.core import *
|
||||
from panda3d.otp import CMover
|
||||
from direct.directnotify import DirectNotifyGlobal
|
||||
from otp.movement.PyVec3 import PyVec3
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
from pandac.PandaModules import *
|
||||
from panda3d.core import *
|
||||
import types
|
||||
import math
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
import string
|
||||
from otp.otpbase import OTPLocalizer
|
||||
from direct.directnotify import DirectNotifyGlobal
|
||||
from pandac.PandaModules import NSError
|
||||
from pandac.PandaModules import TextEncoder, TextNode
|
||||
from panda3d.core import NSError
|
||||
from panda3d.core import TextEncoder, TextNode
|
||||
notify = DirectNotifyGlobal.directNotify.newCategory('NameCheck')
|
||||
|
||||
def filterString(str, filter):
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
from pandac.PandaModules import *
|
||||
from panda3d.core import *
|
||||
from direct.showbase import DirectObject
|
||||
import random
|
||||
from direct.task import Task
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
from direct.showbase.ShowBase import ShowBase
|
||||
from pandac.PandaModules import Camera, TPLow, VBase4, ColorWriteAttrib, Filename, getModelPath, NodePath
|
||||
from panda3d.core import Camera, TPLow, VBase4, ColorWriteAttrib, Filename, getModelPath, NodePath, ConfigVariableBool, ConfigVariableDouble
|
||||
from . import OTPRender
|
||||
import time
|
||||
import math
|
||||
|
|
@ -10,22 +10,22 @@ class OTPBase(ShowBase):
|
|||
def __init__(self, windowType = None):
|
||||
self.wantEnviroDR = False
|
||||
ShowBase.__init__(self, windowType=windowType)
|
||||
__builtins__['__astron__'] = self.config.GetBool('astron-support', 1)
|
||||
__builtins__['__execWarnings__'] = self.config.GetBool('want-exec-warnings', 0)
|
||||
__builtins__['__astron__'] = ConfigVariableBool('astron-support', 1).value
|
||||
__builtins__['__execWarnings__'] = ConfigVariableBool('want-exec-warnings', 0).value
|
||||
OTPBase.notify.info('__astron__ == %s' % __astron__)
|
||||
if config.GetBool('want-phase-checker', 0):
|
||||
if ConfigVariableBool('want-phase-checker', 0).value:
|
||||
from direct.showbase import Loader
|
||||
Loader.phaseChecker = self.loaderPhaseChecker
|
||||
self.errorAccumulatorBuffer = ''
|
||||
taskMgr.add(self.delayedErrorCheck, 'delayedErrorCheck', priority=10000)
|
||||
self.idTags = config.GetBool('want-id-tags', 0)
|
||||
self.idTags = ConfigVariableBool('want-id-tags', 0).value
|
||||
if not self.idTags:
|
||||
del self.idTags
|
||||
self.wantNametags = self.config.GetBool('want-nametags', 1)
|
||||
self.slowCloseShard = self.config.GetBool('slow-close-shard', 0)
|
||||
self.slowCloseShardDelay = self.config.GetFloat('slow-close-shard-delay', 10.0)
|
||||
self.fillShardsToIdealPop = self.config.GetBool('fill-shards-to-ideal-pop', 1)
|
||||
self.logPrivateInfo = self.config.GetBool('log-private-info', __dev__)
|
||||
self.wantNametags = ConfigVariableBool('want-nametags', 1).value
|
||||
self.slowCloseShard = ConfigVariableBool('slow-close-shard', 0).value
|
||||
self.slowCloseShardDelay = ConfigVariableDouble('slow-close-shard-delay', 10.0).value
|
||||
self.fillShardsToIdealPop = ConfigVariableBool('fill-shards-to-ideal-pop', 1).value
|
||||
self.logPrivateInfo = ConfigVariableBool('log-private-info', __dev__).value
|
||||
self.wantDynamicShadows = 1
|
||||
self.stereoEnabled = False
|
||||
self.enviroDR = None
|
||||
|
|
@ -227,7 +227,7 @@ class OTPBase(ShowBase):
|
|||
def openMainWindow(self, *args, **kw):
|
||||
result = ShowBase.openMainWindow(self, *args, **kw)
|
||||
if result:
|
||||
self.wantEnviroDR = not self.win.getGsg().isHardware() or config.GetBool('want-background-region', 1)
|
||||
self.wantEnviroDR = not self.win.getGsg().isHardware() or ConfigVariableBool('want-background-region', 1).value
|
||||
self.backgroundDrawable = self.win
|
||||
return result
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
from pandac.PandaModules import *
|
||||
from panda3d.core import *
|
||||
from panda3d.otp import *
|
||||
QuietZone = 1
|
||||
UberZone = 2
|
||||
WallBitmask = BitMask32(1)
|
||||
|
|
|
|||
|
|
@ -1,13 +1,7 @@
|
|||
from panda3d.core import *
|
||||
from direct.showbase import DConfig
|
||||
import string
|
||||
import types
|
||||
try:
|
||||
language = DConfig.GetString('language', 'english')
|
||||
checkLanguage = DConfig.GetBool('check-language', 0)
|
||||
except:
|
||||
language = simbase.config.GetString('language', 'english')
|
||||
checkLanguage = simbase.config.GetBool('check-language', 0)
|
||||
|
||||
language = ConfigVariableString('language', 'english').value
|
||||
checkLanguage = ConfigVariableBool('check-language', 0).value
|
||||
|
||||
def getLanguage():
|
||||
return language
|
||||
|
|
|
|||
|
|
@ -84,8 +84,8 @@ WhisperToFormatName = 'To %s'
|
|||
WhisperFromFormatName = '%s whispers'
|
||||
ThoughtOtherFormatName = '%s thinks'
|
||||
ThoughtSelfFormatName = 'You think'
|
||||
from pandac.PandaModules import TextProperties
|
||||
from pandac.PandaModules import TextPropertiesManager
|
||||
from panda3d.core import TextProperties
|
||||
from panda3d.core import TextPropertiesManager
|
||||
shadow = TextProperties()
|
||||
shadow.setShadow(-0.025, -0.025)
|
||||
shadow.setShadowColor(0, 0, 0, 1)
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
from pandac.PandaModules import *
|
||||
from panda3d.core import *
|
||||
MainCameraBitmask = BitMask32.bit(0)
|
||||
ReflectionCameraBitmask = BitMask32.bit(1)
|
||||
ShadowCameraBitmask = BitMask32.bit(2)
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
from pandac.PandaModules import Vec4
|
||||
from panda3d.core import Vec4
|
||||
from direct.gui.DirectGui import DirectFrame, DGG
|
||||
from direct.task import Task
|
||||
from direct.showbase.PythonUtil import bound
|
||||
|
|
|
|||
|
|
@ -59,8 +59,8 @@ def recordCreationStack(cls):
|
|||
# __dev__ is not defined at import time, call this after it's defined
|
||||
def recordFunctorCreationStacks():
|
||||
global Functor
|
||||
from pandac.PandaModules import getConfigShowbase
|
||||
config = getConfigShowbase()
|
||||
from direct.showbase import DConfig
|
||||
config = DConfig
|
||||
# off by default, very slow
|
||||
if __dev__ and config.GetBool('record-functor-creation-stacks', 0):
|
||||
if not hasattr(Functor, '_functorCreationStacksRecorded'):
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
from pandac.PandaModules import *
|
||||
from panda3d.core import *
|
||||
from direct.gui.DirectGui import *
|
||||
from direct.task import Task
|
||||
from .SCConstants import *
|
||||
|
|
|
|||
|
|
@ -1,17 +1,15 @@
|
|||
from pandac.PandaModules import *
|
||||
from panda3d.core import *
|
||||
from direct.gui.DirectGui import *
|
||||
from direct.task import Task
|
||||
from .SCConstants import *
|
||||
from direct.interval.IntervalGlobal import *
|
||||
from .SCObject import SCObject
|
||||
from direct.showbase.PythonUtil import makeTuple
|
||||
import types
|
||||
|
||||
class SCMenu(SCObject, NodePath):
|
||||
config = getConfigShowbase()
|
||||
SpeedChatRolloverTolerance = config.GetFloat('speedchat-rollover-tolerance', 0.08)
|
||||
WantFade = config.GetBool('want-speedchat-fade', 0)
|
||||
FadeDuration = config.GetFloat('speedchat-fade-duration', 0.2)
|
||||
SpeedChatRolloverTolerance = ConfigVariableDouble('speedchat-rollover-tolerance', 0.08).value
|
||||
WantFade = ConfigVariableBool('want-speedchat-fade', 0).value
|
||||
FadeDuration = ConfigVariableDouble('speedchat-fade-duration', 0.2).value
|
||||
SerialNum = 0
|
||||
BackgroundModelName = None
|
||||
GuiModelName = None
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
from pandac.PandaModules import *
|
||||
from panda3d.core import *
|
||||
from direct.gui.DirectGui import *
|
||||
from .SCObject import SCObject
|
||||
from .SCElement import SCElement
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
from pandac.PandaModules import *
|
||||
from panda3d.core import *
|
||||
from direct.showbase import DirectObject
|
||||
from otp.otpbase import OTPLocalizer
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
from direct.distributed.DistributedObject import DistributedObject
|
||||
from direct.distributed.DistributedObjectGlobal import DistributedObjectGlobal
|
||||
from pandac.PandaModules import *
|
||||
from panda3d.otp import WhisperPopup
|
||||
from otp.otpbase import OTPGlobals
|
||||
|
||||
class DistributedChatManager(DistributedObjectGlobal):
|
||||
|
|
|
|||
|
|
@ -42,8 +42,9 @@ builtins.game = game
|
|||
|
||||
from otp.ai.AIBaseGlobal import *
|
||||
from toontown.ai.ToontownAIRepository import ToontownAIRepository
|
||||
from toontown.toonbase import TTLocalizer
|
||||
|
||||
simbase.air = ToontownAIRepository(ConfigVariableInt('air-base-channel', 1000000).value, ConfigVariableInt('air-stateserver', 4002).value, ConfigVariableString('district-name', 'Toon Valley').value)
|
||||
simbase.air = ToontownAIRepository(ConfigVariableInt('air-base-channel', 401000000).value, ConfigVariableInt('air-stateserver', 4002).value, ConfigVariableString('district-name', TTLocalizer.AIStartDefaultDistrict).value)
|
||||
|
||||
host = ConfigVariableString('air-connect', '127.0.0.1:7199').value
|
||||
port = 7199
|
||||
|
|
|
|||
|
|
@ -0,0 +1,18 @@
|
|||
from direct.directnotify import DirectNotifyGlobal
|
||||
from toontown.ai import HolidayBaseAI
|
||||
from toontown.toonbase import ToontownGlobals
|
||||
|
||||
class BlackCatHolidayMgrAI(HolidayBaseAI.HolidayBaseAI):
|
||||
notify = DirectNotifyGlobal.directNotify.newCategory(
|
||||
'BlackCatHolidayMgrAI')
|
||||
|
||||
PostName = 'blackCatHoliday'
|
||||
|
||||
def __init__(self, air, holidayId):
|
||||
HolidayBaseAI.HolidayBaseAI.__init__(self, air, holidayId)
|
||||
|
||||
def start(self):
|
||||
bboard.post(BlackCatHolidayMgrAI.PostName)
|
||||
|
||||
def stop(self):
|
||||
bboard.remove(BlackCatHolidayMgrAI.PostName)
|
||||
|
|
@ -3,7 +3,7 @@ from direct.distributed.ClockDelta import *
|
|||
from direct.interval.IntervalGlobal import *
|
||||
from . import HolidayDecorator
|
||||
from toontown.toonbase import ToontownGlobals
|
||||
from pandac.PandaModules import Vec4, CSDefault, TransformState, NodePath, TransparencyAttrib
|
||||
from panda3d.core import Vec4, CSDefault, TransformState, NodePath, TransparencyAttrib
|
||||
from panda3d.toontown import loadDNAFile
|
||||
from toontown.hood import GSHood
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
from pandac.PandaModules import *
|
||||
from panda3d.core import *
|
||||
from .ToontownAIMsgTypes import *
|
||||
from direct.directnotify.DirectNotifyGlobal import *
|
||||
from toontown.toon import DistributedToonAI
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ from toontown.toonbase import ToontownGlobals
|
|||
from toontown.safezone import Playground
|
||||
from toontown.town import Street
|
||||
from toontown.estate import Estate
|
||||
from pandac.PandaModules import Vec4, CSDefault, TransformState, NodePath, TransparencyAttrib
|
||||
from panda3d.core import Vec4, CSDefault, TransformState, NodePath, TransparencyAttrib
|
||||
from panda3d.toontown import loadDNAFile
|
||||
|
||||
class HalloweenHolidayDecorator(HolidayDecorator.HolidayDecorator):
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
from toontown.toonbase import ToontownGlobals
|
||||
from direct.interval.IntervalGlobal import Parallel, Sequence, Func, Wait
|
||||
from pandac.PandaModules import Vec4, CSDefault, TransformState, NodePath, TransparencyAttrib
|
||||
from panda3d.core import Vec4, CSDefault, TransformState, NodePath, TransparencyAttrib
|
||||
from panda3d.toontown import loadDNAFile
|
||||
|
||||
class HolidayDecorator:
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
from pandac.PandaModules import *
|
||||
from panda3d.core import *
|
||||
from direct.distributed import DistributedObject
|
||||
from direct.directnotify import DirectNotifyGlobal
|
||||
from toontown.toonbase import ToontownGlobals
|
||||
|
|
|
|||
|
|
@ -49,6 +49,7 @@ from toontown.spellbook.ToontownMagicWordManagerAI import ToontownMagicWordManag
|
|||
from toontown.suit.SuitInvasionManagerAI import SuitInvasionManagerAI
|
||||
from toontown.toon import NPCToons
|
||||
from toontown.toonbase import ToontownGlobals
|
||||
from toontown.tutorial.TutorialManagerAI import TutorialManagerAI
|
||||
from toontown.uberdog.DistributedInGameNewsMgrAI import DistributedInGameNewsMgrAI
|
||||
import os
|
||||
|
||||
|
|
@ -237,6 +238,10 @@ class ToontownAIRepository(ToontownInternalRepository):
|
|||
self.estateMgr = EstateManagerAI(self)
|
||||
self.estateMgr.generateWithRequired(OTP_ZONE_ID_MANAGEMENT)
|
||||
|
||||
# Generate our Tutorial manager...
|
||||
self.tutorialManager = TutorialManagerAI(self)
|
||||
self.tutorialManager.generateWithRequired(OTP_ZONE_ID_MANAGEMENT)
|
||||
|
||||
def generateHood(self, hoodConstructor, zoneId):
|
||||
# Bossbot HQ doesn't use DNA, so we skip over that.
|
||||
if zoneId != ToontownGlobals.BossbotHQ:
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
from pandac.PandaModules import *
|
||||
from panda3d.core import *
|
||||
from direct.distributed import DistributedObject
|
||||
from direct.directnotify import DirectNotifyGlobal
|
||||
from toontown.toonbase import ToontownGlobals
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
from pandac.PandaModules import *
|
||||
from panda3d.core import *
|
||||
from toontown.toonbase.ToontownBattleGlobals import *
|
||||
from direct.task.Timer import *
|
||||
import math
|
||||
import functools
|
||||
from direct.directnotify import DirectNotifyGlobal
|
||||
from toontown.toon import NPCToons
|
||||
|
|
@ -58,10 +57,7 @@ TOON_FIRE_SUIT_DELAY = 1.0
|
|||
REWARD_TIMEOUT = 120
|
||||
FLOOR_REWARD_TIMEOUT = 4
|
||||
BUILDING_REWARD_TIMEOUT = 300
|
||||
try:
|
||||
CLIENT_INPUT_TIMEOUT = base.config.GetFloat('battle-input-timeout', TTLocalizer.BBbattleInputTimeout)
|
||||
except:
|
||||
CLIENT_INPUT_TIMEOUT = simbase.config.GetFloat('battle-input-timeout', TTLocalizer.BBbattleInputTimeout)
|
||||
CLIENT_INPUT_TIMEOUT = ConfigVariableDouble('battle-input-timeout', TTLocalizer.BBbattleInputTimeout).value
|
||||
|
||||
def levelAffectsGroup(track, level):
|
||||
return attackAffectsGroup(track, level)
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
from pandac.PandaModules import *
|
||||
from panda3d.core import *
|
||||
from toontown.toon import Toon
|
||||
from toontown.hood import Place
|
||||
from toontown.hood import ZoneUtil
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
from pandac.PandaModules import *
|
||||
from panda3d.core import *
|
||||
from direct.actor import Actor
|
||||
from direct.directnotify import DirectNotifyGlobal
|
||||
from otp.otpbase import OTPGlobals
|
||||
|
|
@ -237,7 +237,7 @@ class PropPool:
|
|||
self.propCache = []
|
||||
self.propStrings = {}
|
||||
self.propTypes = {}
|
||||
self.maxPoolSize = base.config.GetInt('prop-pool-size', 8)
|
||||
self.maxPoolSize = ConfigVariableInt('prop-pool-size', 8).value
|
||||
for p in Props:
|
||||
phase = p[0]
|
||||
propName = p[1]
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
from pandac.PandaModules import *
|
||||
from panda3d.core import *
|
||||
from direct.directnotify import DirectNotifyGlobal
|
||||
|
||||
class BattleSounds:
|
||||
|
|
@ -9,7 +9,7 @@ class BattleSounds:
|
|||
self.isValid = 0
|
||||
if self.mgr != None and self.mgr.isValid():
|
||||
self.isValid = 1
|
||||
limit = base.config.GetInt('battle-sound-cache-size', 15)
|
||||
limit = ConfigVariableInt('battle-sound-cache-size', 15).value
|
||||
self.mgr.setCacheLimit(limit)
|
||||
base.addSfxManager(self.mgr)
|
||||
self.setupSearchPath()
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
from pandac.PandaModules import *
|
||||
from panda3d.core import *
|
||||
from panda3d.otp import *
|
||||
from direct.interval.IntervalGlobal import *
|
||||
from .BattleBase import *
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
from pandac.PandaModules import *
|
||||
from panda3d.core import *
|
||||
from toontown.toonbase.ToonBaseGlobal import *
|
||||
from direct.interval.IntervalGlobal import *
|
||||
from .BattleBase import *
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ from .BattleBase import *
|
|||
from . import BattleCalculatorAI
|
||||
from toontown.toonbase.ToontownBattleGlobals import *
|
||||
from .SuitBattleGlobals import *
|
||||
from pandac.PandaModules import *
|
||||
from panda3d.core import *
|
||||
from . import BattleExperienceAI
|
||||
from direct.distributed import DistributedObjectAI
|
||||
from direct.fsm import ClassicFSM, State
|
||||
|
|
@ -714,8 +714,6 @@ class DistributedBattleBaseAI(DistributedObjectAI.DistributedObjectAI, BattleBas
|
|||
empty = InventoryBase.InventoryBase(toon)
|
||||
toon.b_setInventory(empty.makeNetString())
|
||||
toon.b_setHp(0)
|
||||
db = DatabaseObject.DatabaseObject(self.air, toonId)
|
||||
db.storeObject(toon, ['setInventory', 'setHp'])
|
||||
self.notify.info('killing mem leak from temporary DistributedToonAI %d' % toonId)
|
||||
toon.deleteDummy()
|
||||
return
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
from pandac.PandaModules import *
|
||||
from panda3d.core import *
|
||||
from panda3d.otp import *
|
||||
from direct.interval.IntervalGlobal import *
|
||||
from .BattleBase import *
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import random
|
||||
from pandac.PandaModules import VBase3, Point3
|
||||
from panda3d.core import VBase3, Point3
|
||||
from direct.interval.IntervalGlobal import Sequence, Wait, Func, Parallel, Track, LerpPosInterval, ProjectileInterval, SoundInterval, ActorInterval
|
||||
from direct.directnotify import DirectNotifyGlobal
|
||||
from toontown.battle import DistributedBattleFinal
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
from pandac.PandaModules import *
|
||||
from panda3d.core import *
|
||||
from panda3d.otp import *
|
||||
from direct.interval.IntervalGlobal import *
|
||||
from .BattleBase import *
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import random
|
||||
from pandac.PandaModules import VBase3, Point3
|
||||
from panda3d.core import VBase3, Point3
|
||||
from direct.interval.IntervalGlobal import Sequence, Wait, Func, Parallel, Track
|
||||
from direct.directnotify import DirectNotifyGlobal
|
||||
from toontown.battle import DistributedBattleFinal
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ from toontown.toon.ToonDNA import *
|
|||
from toontown.suit.SuitDNA import *
|
||||
from direct.particles.ParticleEffect import *
|
||||
from direct.gui.DirectGui import *
|
||||
from pandac.PandaModules import *
|
||||
from panda3d.core import *
|
||||
from . import MovieUtil
|
||||
from . import MovieCamera
|
||||
from direct.directnotify import DirectNotifyGlobal
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ from direct.fsm import StateData
|
|||
from direct.directnotify import DirectNotifyGlobal
|
||||
from toontown.battle import BattleBase
|
||||
from direct.gui.DirectGui import *
|
||||
from pandac.PandaModules import *
|
||||
from panda3d.core import *
|
||||
from toontown.toonbase import TTLocalizer
|
||||
|
||||
class FireCogPanel(StateData.StateData):
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
from pandac.PandaModules import *
|
||||
from panda3d.core import *
|
||||
from direct.interval.IntervalGlobal import *
|
||||
from .BattleBase import *
|
||||
from .BattleProps import *
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
from pandac.PandaModules import *
|
||||
from panda3d.core import *
|
||||
from direct.interval.IntervalGlobal import *
|
||||
from .BattleBase import *
|
||||
from .BattleProps import *
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ from direct.interval.IntervalGlobal import *
|
|||
from . import MovieCamera
|
||||
from direct.directnotify import DirectNotifyGlobal
|
||||
from toontown.toonbase import TTLocalizer
|
||||
from pandac.PandaModules import *
|
||||
from panda3d.core import *
|
||||
notify = DirectNotifyGlobal.directNotify.newCategory('MovieSOS')
|
||||
|
||||
def doSOSs(calls):
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
from pandac.PandaModules import *
|
||||
from panda3d.core import *
|
||||
from direct.interval.IntervalGlobal import *
|
||||
from .BattleBase import *
|
||||
from .BattleProps import *
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
from pandac.PandaModules import *
|
||||
from panda3d.core import *
|
||||
from toontown.toonbase import TTLocalizer
|
||||
from toontown.toonbase.ToontownBattleGlobals import *
|
||||
from toontown.toonbase.ToontownGlobals import *
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
from pandac.PandaModules import *
|
||||
from panda3d.core import *
|
||||
from direct.gui.DirectGui import *
|
||||
from pandac.PandaModules import *
|
||||
from panda3d.core import *
|
||||
from direct.interval.IntervalGlobal import *
|
||||
from toontown.toonbase import ToontownBattleGlobals
|
||||
from . import BattleBase
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
from pandac.PandaModules import *
|
||||
from panda3d.core import *
|
||||
from direct.directnotify import DirectNotifyGlobal
|
||||
from toontown.toonbase import ToontownGlobals
|
||||
from direct.task.Task import Task
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
from pandac.PandaModules import DecalEffect, DepthWriteAttrib
|
||||
from panda3d.core import DecalEffect, DepthWriteAttrib
|
||||
from direct.directnotify import DirectNotifyGlobal
|
||||
from toontown.building import DistributedBuilding
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
from pandac.PandaModules import NodePath, VBase3
|
||||
from panda3d.core import NodePath, VBase3
|
||||
from direct.directnotify import DirectNotifyGlobal
|
||||
from direct.interval.IntervalGlobal import Parallel, Sequence, Wait, HprInterval, LerpHprInterval, SoundInterval
|
||||
from toontown.building import DistributedDoor
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
from pandac.PandaModules import *
|
||||
from panda3d.core import *
|
||||
from direct.distributed.ClockDelta import *
|
||||
from direct.directnotify import DirectNotifyGlobal
|
||||
from direct.fsm import ClassicFSM, State
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
from pandac.PandaModules import *
|
||||
from panda3d.core import *
|
||||
from panda3d.otp import WhisperPopup
|
||||
from direct.directnotify import DirectNotifyGlobal
|
||||
from toontown.toonbase import TTLocalizer
|
||||
from toontown.toonbase import ToontownGlobals
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
from pandac.PandaModules import *
|
||||
from panda3d.core import *
|
||||
from direct.distributed.ClockDelta import *
|
||||
from direct.interval.IntervalGlobal import *
|
||||
from .ElevatorConstants import *
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
from pandac.PandaModules import *
|
||||
from panda3d.core import *
|
||||
from direct.distributed.ClockDelta import *
|
||||
from direct.interval.IntervalGlobal import *
|
||||
from direct.directtools.DirectGeometry import *
|
||||
|
|
@ -6,7 +6,7 @@ from .ElevatorConstants import *
|
|||
from .ElevatorUtils import *
|
||||
from .SuitBuildingGlobals import *
|
||||
from direct.gui.DirectGui import *
|
||||
from pandac.PandaModules import *
|
||||
from panda3d.core import *
|
||||
from toontown.toonbase import ToontownGlobals
|
||||
from direct.directnotify import DirectNotifyGlobal
|
||||
from direct.fsm import ClassicFSM, State
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue