config: Remove DConfig

This commit is contained in:
Dakota Smith 2023-11-15 19:32:18 -08:00
parent a5ecbb8b1e
commit 286b16bb07
192 changed files with 578 additions and 544 deletions

View File

@ -1,6 +1,5 @@
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 *
@ -21,28 +20,27 @@ class AIBase:
notify = directNotify.newCategory('AIBase')
def __init__(self):
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)
logStackDump = (self.config.GetBool('log-stack-dump', (not __debug__)) or self.config.GetBool('ai-log-stack-dump', (not __debug__)))
uploadStackDump = self.config.GetBool('upload-stack-dump', 0)
__builtins__['__dev__'] = ConfigVariableBool('want-dev', 0).getValue()
__builtins__['__astron__'] = ConfigVariableBool('astron-support', 1).getValue()
__builtins__['__execWarnings__'] = ConfigVariableBool('want-exec-warnings', 0).getValue()
logStackDump = (ConfigVariableBool('log-stack-dump', (not __debug__)).getValue() or ConfigVariableBool('ai-log-stack-dump', (not __debug__)).getValue())
uploadStackDump = ConfigVariableBool('upload-stack-dump', 0).getValue()
if logStackDump or uploadStackDump:
ExceptionVarDump.install(logStackDump, uploadStackDump)
if self.config.GetBool('use-vfs', 1):
if ConfigVariableBool('use-vfs', 1).getValue():
vfs = VirtualFileSystem.getGlobalPtr()
else:
vfs = None
self.wantTk = self.config.GetBool('want-tk', 0)
self.AISleep = self.config.GetFloat('ai-sleep', 0.04)
self.AIRunningNetYield = self.config.GetBool('ai-running-net-yield', 0)
self.AIForceSleep = self.config.GetBool('ai-force-sleep', 0)
self.wantTk = ConfigVariableBool('want-tk', 0).getValue()
self.AISleep = ConfigVariableDouble('ai-sleep', 0.04).getValue()
self.AIRunningNetYield = ConfigVariableBool('ai-running-net-yield', 0).getValue()
self.AIForceSleep = ConfigVariableBool('ai-force-sleep', 0).getValue()
self.eventMgr = eventMgr
self.messenger = messenger
self.bboard = bulletinBoard
self.taskMgr = taskMgr
Task.TaskManager.taskTimerVerbose = self.config.GetBool('task-timer-verbose', 0)
Task.TaskManager.extendedExceptions = self.config.GetBool('extended-exceptions', 0)
Task.TaskManager.taskTimerVerbose = ConfigVariableBool('task-timer-verbose', 0).getValue()
Task.TaskManager.extendedExceptions = ConfigVariableBool('extended-exceptions', 0).getValue()
self.sfxManagerList = None
self.musicManager = None
self.jobMgr = jobMgr
@ -61,54 +59,54 @@ class AIBase:
AIBase.notify.info('__dev__ == %s' % __dev__)
AIBase.notify.info('__astron__ == %s' % __astron__)
PythonUtil.recordFunctorCreationStacks()
__builtins__['wantTestObject'] = self.config.GetBool('want-test-object', 0)
self.wantStats = self.config.GetBool('want-pstats', 0)
Task.TaskManager.pStatsTasks = self.config.GetBool('pstats-tasks', 0)
__builtins__['wantTestObject'] = ConfigVariableBool('want-test-object', 0).getValue()
self.wantStats = ConfigVariableBool('want-pstats', 0).getValue()
Task.TaskManager.pStatsTasks = ConfigVariableBool('pstats-tasks', 0).getValue()
taskMgr.resumeFunc = PStatClient.resumeAfterPause
defaultValue = 1
if __dev__:
defaultValue = 0
wantFakeTextures = self.config.GetBool('want-fake-textures-ai', defaultValue)
wantFakeTextures = ConfigVariableBool('want-fake-textures-ai', defaultValue).getValue()
if wantFakeTextures:
loadPrcFileData('aibase', 'textures-header-only 1')
self.wantPets = self.config.GetBool('want-pets', 1)
self.wantPets = ConfigVariableBool('want-pets', 1).getValue()
if self.wantPets:
if game.name == 'toontown':
from toontown.pets import PetConstants
self.petMoodTimescale = self.config.GetFloat('pet-mood-timescale', 1.0)
self.petMoodDriftPeriod = self.config.GetFloat('pet-mood-drift-period', PetConstants.MoodDriftPeriod)
self.petThinkPeriod = self.config.GetFloat('pet-think-period', PetConstants.ThinkPeriod)
self.petMovePeriod = self.config.GetFloat('pet-move-period', PetConstants.MovePeriod)
self.petPosBroadcastPeriod = self.config.GetFloat('pet-pos-broadcast-period', PetConstants.PosBroadcastPeriod)
self.wantBingo = self.config.GetBool('want-fish-bingo', 1)
self.wantKarts = self.config.GetBool('wantKarts', 1)
self.newDBRequestGen = self.config.GetBool('new-database-request-generate', 1)
self.waitShardDelete = self.config.GetBool('wait-shard-delete', 1)
self.blinkTrolley = self.config.GetBool('blink-trolley', 0)
self.fakeDistrictPopulations = self.config.GetBool('fake-district-populations', 0)
self.wantSwitchboard = self.config.GetBool('want-switchboard', 0)
self.wantSwitchboardHacks = self.config.GetBool('want-switchboard-hacks', 0)
self.GEMdemoWhisperRecipientDoid = self.config.GetBool('gem-demo-whisper-recipient-doid', 0)
self.sqlAvailable = self.config.GetBool('sql-available', 1)
self.petMoodTimescale = ConfigVariableDouble('pet-mood-timescale', 1.0).getValue()
self.petMoodDriftPeriod = ConfigVariableDouble('pet-mood-drift-period', PetConstants.MoodDriftPeriod).getValue()
self.petThinkPeriod = ConfigVariableDouble('pet-think-period', PetConstants.ThinkPeriod).getValue()
self.petMovePeriod = ConfigVariableDouble('pet-move-period', PetConstants.MovePeriod).getValue()
self.petPosBroadcastPeriod = ConfigVariableDouble('pet-pos-broadcast-period', PetConstants.PosBroadcastPeriod).getValue()
self.wantBingo = ConfigVariableBool('want-fish-bingo', 1).getValue()
self.wantKarts = ConfigVariableBool('wantKarts', 1).getValue()
self.newDBRequestGen = ConfigVariableBool('new-database-request-generate', 1).getValue()
self.waitShardDelete = ConfigVariableBool('wait-shard-delete', 1).getValue()
self.blinkTrolley = ConfigVariableBool('blink-trolley', 0).getValue()
self.fakeDistrictPopulations = ConfigVariableBool('fake-district-populations', 0).getValue()
self.wantSwitchboard = ConfigVariableBool('want-switchboard', 0).getValue()
self.wantSwitchboardHacks = ConfigVariableBool('want-switchboard-hacks', 0).getValue()
self.GEMdemoWhisperRecipientDoid = ConfigVariableBool('gem-demo-whisper-recipient-doid', 0).getValue()
self.sqlAvailable = ConfigVariableBool('sql-available', 1).getValue()
self.createStats()
self.restart()
return
def setupCpuAffinities(self, minChannel):
if game.name == 'uberDog':
affinityMask = self.config.GetInt('uberdog-cpu-affinity-mask', -1)
affinityMask = ConfigVariableInt('uberdog-cpu-affinity-mask', -1).getValue()
else:
affinityMask = self.config.GetInt('ai-cpu-affinity-mask', -1)
affinityMask = ConfigVariableInt('ai-cpu-affinity-mask', -1).getValue()
if affinityMask != -1:
TrueClock.getGlobalPtr().setCpuAffinity(affinityMask)
else:
autoAffinity = self.config.GetBool('auto-single-cpu-affinity', 0)
autoAffinity = ConfigVariableBool('auto-single-cpu-affinity', 0).getValue()
if game.name == 'uberDog':
affinity = self.config.GetInt('uberdog-cpu-affinity', -1)
affinity = ConfigVariableInt('uberdog-cpu-affinity', -1).getValue()
if autoAffinity and affinity == -1:
affinity = 2
else:
affinity = self.config.GetInt('ai-cpu-affinity', -1)
affinity = ConfigVariableInt('ai-cpu-affinity', -1).getValue()
if autoAffinity and affinity == -1:
affinity = 1
if affinity != -1:

View File

@ -7,7 +7,6 @@ __builtins__['jobMgr'] = simbase.jobMgr
__builtins__['eventMgr'] = simbase.eventMgr
__builtins__['messenger'] = simbase.messenger
__builtins__['bboard'] = simbase.bboard
__builtins__['config'] = simbase.config
__builtins__['directNotify'] = directNotify
from direct.showbase import Loader
simbase.loader = Loader.Loader(simbase)

View File

@ -85,7 +85,7 @@ class AIZoneDataObj:
def getRender(self):
if not hasattr(self, '_render'):
self._render = NodePath('render-%s-%s' % (self._parentId, self._zoneId))
if config.GetBool('leak-scene-graph', 0):
if ConfigVariableBool('leak-scene-graph', 0).getValue():
self._renderLeakDetector = LeakDetectors.SceneGraphLeakDetector(self._render)
return self._render

View File

@ -1,14 +1,14 @@
import urllib.request, urllib.parse, urllib.error
import os
from panda3d.core import HTTPClient, Ramfile
from panda3d.core import ConfigVariableBool, ConfigVariableString, 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')
App = simbase.config.GetString('ban-app-name', 'TTWorldAI')
Product = simbase.config.GetString('ban-product', 'Toontown')
EventName = simbase.config.GetString('ban-event-name', 'tthackattempt')
BanUrl = ConfigVariableString('ban-base-url', 'http://vapps.disl.starwave.com:8005/dis-hold/action/event').getValue()
App = ConfigVariableString('ban-app-name', 'TTWorldAI').getValue()
Product = ConfigVariableString('ban-product', 'Toontown').getValue()
EventName = ConfigVariableString('ban-event-name', 'tthackattempt').getValue()
def __init__(self):
self.curBanRequestNum = 0
@ -34,7 +34,7 @@ class BanManagerAI:
comment,
fullUrl))
simbase.air.writeServerEvent('ban_request', avatarId, '%s|%s|%s' % (dislid, comment, fullUrl))
if simbase.config.GetBool('do-actual-ban', True):
if ConfigVariableBool('do-actual-ban', True).getValue():
newTaskName = 'ban-task-%d' % self.curBanRequestNum
newTask = taskMgr.add(self.doBanUrlTask, newTaskName)
newTask.banRequestNum = self.curBanRequestNum

View File

@ -20,14 +20,14 @@ class TimeManager(DistributedObject.DistributedObject):
def __init__(self, cr):
DistributedObject.DistributedObject.__init__(self, cr)
self.updateFreq = base.config.GetFloat('time-manager-freq', 1800)
self.minWait = base.config.GetFloat('time-manager-min-wait', 10)
self.maxUncertainty = base.config.GetFloat('time-manager-max-uncertainty', 1)
self.maxAttempts = base.config.GetInt('time-manager-max-attempts', 5)
self.extraSkew = base.config.GetInt('time-manager-extra-skew', 0)
self.updateFreq = ConfigVariableDouble('time-manager-freq', 1800).getValue()
self.minWait = ConfigVariableDouble('time-manager-min-wait', 10).getValue()
self.maxUncertainty = ConfigVariableDouble('time-manager-max-uncertainty', 1).getValue()
self.maxAttempts = ConfigVariableInt('time-manager-max-attempts', 5).getValue()
self.extraSkew = ConfigVariableInt('time-manager-extra-skew', 0).getValue()
if self.extraSkew != 0:
self.notify.info('Simulating clock skew of %0.3f s' % self.extraSkew)
self.reportFrameRateInterval = base.config.GetDouble('report-frame-rate-interval', 300.0)
self.reportFrameRateInterval = ConfigVariableDouble('report-frame-rate-interval', 300.0).getValue()
self.talkResult = 0
self.thisContext = -1
self.nextContext = 0
@ -45,7 +45,7 @@ class TimeManager(DistributedObject.DistributedObject):
DistributedObject.DistributedObject.generate(self)
self.accept(OTPGlobals.SynchronizeHotkey, self.handleHotkey)
self.accept('clock_error', self.handleClockError)
if __dev__ and base.config.GetBool('enable-garbage-hotkey', 0):
if __dev__ and ConfigVariableBool('enable-garbage-hotkey', 0).getValue():
self.accept(OTPGlobals.DetectGarbageHotkey, self.handleDetectGarbageHotkey)
if self.updateFreq > 0:
self.startTask()
@ -206,7 +206,7 @@ class TimeManager(DistributedObject.DistributedObject):
if frameRateInterval == 0:
return
if not base.frameRateMeter:
maxFrameRateInterval = base.config.GetDouble('max-frame-rate-interval', 30.0)
maxFrameRateInterval = ConfigVariableDouble('max-frame-rate-interval', 30.0).getValue()
globalClock.setAverageFrameRateInterval(min(frameRateInterval, maxFrameRateInterval))
taskMgr.remove('frameRateMonitor')
taskMgr.doMethodLater(frameRateInterval, self.frameRateMonitor, 'frameRateMonitor')

View File

@ -18,9 +18,9 @@ class ChatInputNormal(DirectObject.DirectObject):
wantHistory = 0
if __dev__:
wantHistory = 1
self.wantHistory = base.config.GetBool('want-chat-history', wantHistory)
self.wantHistory = ConfigVariableBool('want-chat-history', wantHistory).getValue()
self.history = ['']
self.historySize = base.config.GetInt('chat-history-size', 10)
self.historySize = ConfigVariableInt('chat-history-size', 10).getValue()
self.historyIndex = 0
return

View File

@ -16,9 +16,9 @@ class ChatInputTyped(DirectObject.DirectObject):
wantHistory = 0
if __dev__:
wantHistory = 1
self.wantHistory = base.config.GetBool('want-chat-history', wantHistory)
self.wantHistory = ConfigVariableBool('want-chat-history', wantHistory).getValue()
self.history = ['']
self.historySize = base.config.GetInt('chat-history-size', 10)
self.historySize = ConfigVariableInt('chat-history-size', 10).getValue()
self.historyIndex = 0
return
@ -111,7 +111,7 @@ class ChatInputTyped(DirectObject.DirectObject):
pass
elif self.whisperId:
pass
elif base.config.GetBool('exec-chat', 0) and text[0] == '>':
elif ConfigVariableBool('exec-chat', 0).getValue() and text[0] == '>':
text = self.__execMessage(text[1:])
base.localAvatar.setChatAbsolute(text, CFSpeech | CFTimeout)
return

View File

@ -47,12 +47,12 @@ class ChatInputWhiteListFrame(FSM.FSM, DirectFrame):
wantHistory = 0
if __dev__:
wantHistory = 1
self.wantHistory = base.config.GetBool('want-chat-history', wantHistory)
self.wantHistory = ConfigVariableBool('want-chat-history', wantHistory).getValue()
self.history = ['']
self.historySize = base.config.GetInt('chat-history-size', 10)
self.historySize = ConfigVariableInt('chat-history-size', 10).getValue()
self.historyIndex = 0
self.promoteWhiteList = 0
self.checkBeforeSend = base.config.GetBool('white-list-check-before-send', 0)
self.checkBeforeSend = ConfigVariableBool('white-list-check-before-send', 0).getValue()
self.whiteList = None
self.active = 0
self.autoOff = 0
@ -194,7 +194,7 @@ class ChatInputWhiteListFrame(FSM.FSM, DirectFrame):
if text:
self.chatEntry.set('')
if base.config.GetBool('exec-chat', 0) and text[0] == '>':
if ConfigVariableBool('exec-chat', 0).getValue() and text[0] == '>':
text = self.__execMessage(text[1:])
base.localAvatar.setChatAbsolute(text, CFSpeech | CFTimeout)
return

View File

@ -1,18 +1,18 @@
from panda3d.core import StringStream
from panda3d.core import ConfigVariableDouble, ConfigVariableInt, StringStream
from direct.distributed.PyDatagram import PyDatagram
import random
class ClsendTracker:
clsendNotify = directNotify.newCategory('clsend')
NumTrackersLoggingOverflow = 0
MaxTrackersLoggingOverflow = config.GetInt('max-clsend-loggers', 5)
MaxTrackersLoggingOverflow = ConfigVariableInt('max-clsend-loggers', 5).getValue()
def __init__(self):
self._logClsendOverflow = False
if self.isPlayerControlled():
if simbase.air.getTrackClsends():
if ClsendTracker.NumTrackersLoggingOverflow < ClsendTracker.MaxTrackersLoggingOverflow:
self._logClsendOverflow = random.random() < 1.0 / config.GetFloat('clsend-log-one-av-in-every', choice(__dev__, 4, 50))
self._logClsendOverflow = random.random() < 1.0 / ConfigVariableDouble('clsend-log-one-av-in-every', choice(__dev__, 4, 50).getValue())
if self._logClsendOverflow:
ClsendTracker.NumTrackersLoggingOverflow += 1
self._clsendMsgs = []

View File

@ -1,3 +1,4 @@
from panda3d.core import ConfigVariableBool
from direct.distributed.DistributedObjectGlobal import DistributedObjectGlobal
from direct.directnotify.DirectNotifyGlobal import directNotify
from otp.distributed import OtpDoGlobals
@ -53,7 +54,7 @@ class GuildManager(DistributedObjectGlobal):
self.id2Rank = {}
self.id2Online = {}
self.pendingMsgs = []
self.whiteListEnabled = base.config.GetBool('whitelist-chat-enabled', 1)
self.whiteListEnabled = ConfigVariableBool('whitelist-chat-enabled', 1).getValue()
self.emailNotification = 0
self.emailNotificationAddress = None
self.receivingNewList = False

View File

@ -30,7 +30,7 @@ class DummyLauncherBase:
return
def isTestServer(self):
return base.config.GetBool('is-test-server', 0)
return ConfigVariableBool('is-test-server', 0).getValue()
def setPhaseComplete(self, phase, percent):
self.phaseComplete[phase] = percent

View File

@ -3,7 +3,6 @@ import os
import time
import builtins
from panda3d.core import *
from direct.showbase import DConfig
from direct.showbase.DirectObject import DirectObject
from direct.task.MiniTask import MiniTaskManager
from direct.directnotify.DirectNotifyGlobal import *

View File

@ -17,7 +17,7 @@ import random
class DistributedLevel(DistributedObject.DistributedObject, Level.Level):
notify = DirectNotifyGlobal.directNotify.newCategory('DistributedLevel')
WantVisibility = config.GetBool('level-visibility', 1)
WantVisibility = ConfigVariableBool('level-visibility', 1).getValue()
ColorZonesAllDOs = 0
FloorCollPrefix = 'zoneFloor'
OuchTaskName = 'ouchTask'

View File

@ -149,7 +149,7 @@ class DistributedLevelAI(DistributedObjectAI.DistributedObjectAI, Level.Level):
self.modified = 1
self.scheduleAutosave()
AutosavePeriod = simbase.config.GetFloat('level-autosave-period-minutes', 5)
AutosavePeriod = ConfigVariableDouble('level-autosave-period-minutes', 5).getValue()
def scheduleAutosave(self):
if hasattr(self, 'autosaveTask'):

View File

@ -1,3 +1,4 @@
from panda3d.core import ConfigVariableString
from direct.showbase.PythonUtil import uniqueElements
EditTargetPostName = 'inGameEditTarget'
EntIdRange = 10000
@ -14,7 +15,7 @@ username2entIdBase = {'darren': 1 * EntIdRange,
'rurbino': 11 * EntIdRange}
usernameConfigVar = 'level-edit-username'
undefinedUsername = 'UNDEFINED_USERNAME'
editUsername = config.GetString(usernameConfigVar, undefinedUsername)
editUsername = ConfigVariableString(usernameConfigVar, undefinedUsername).getValue()
def checkNotReadyToEdit():
if editUsername == undefinedUsername:

View File

@ -3,6 +3,8 @@ import time
import os
from datetime import datetime
from panda3d.core import ConfigVariableString
from direct.directnotify import DirectNotifyGlobal
from direct.distributed.DistributedObjectGlobalUD import DistributedObjectGlobalUD
from direct.distributed.PyDatagram import PyDatagram
@ -45,7 +47,7 @@ class DeveloperAccountDB(AccountDB):
AccountDB.__init__(self, loginManager)
# Setup the accountToId dictionary
self.accountDbFilePath = config.GetString('accountdb-local-file', 'astron/databases/accounts.json')
self.accountDbFilePath = ConfigVariableString('accountdb-local-file', 'astron/databases/accounts.json').getValue()
# Load the JSON file if it exists.
if os.path.exists(self.accountDbFilePath):
with open(self.accountDbFilePath, 'r') as file:
@ -61,7 +63,7 @@ class DeveloperAccountDB(AccountDB):
if playToken not in self.accountToId:
# It is not, so we'll associate them with a brand new account object.
# Get the default access level from config.
accessLevel = config.GetString('default-access-level', "SYSTEM_ADMIN")
accessLevel = ConfigVariableString('default-access-level', "SYSTEM_ADMIN").getValue()
if accessLevel not in OTPGlobals.AccessLevelName2Int:
self.loginManager.notify.warning(f'Access Level "{accessLevel}" isn\'t defined. Reverting back to SYSTEM_ADMIN')
accessLevel = "SYSTEM_ADMIN"

View File

@ -29,10 +29,10 @@ class LoginGSAccount(LoginBase.LoginBase):
return 1
def sendLoginMsg(self):
DISLID = config.GetInt('fake-DISL-PlayerAccountId', 0)
DISLID = ConfigVariableInt('fake-DISL-PlayerAccountId', 0).getValue()
if not DISLID:
NameStringId = 'DISLID_%s' % self.loginName
DISLID = config.GetInt(NameStringId, 0)
DISLID = ConfigVariableInt(NameStringId, 0).getValue()
cr = self.cr
datagram = PyDatagram()
datagram.addUint16(CLIENT_LOGIN)
@ -49,7 +49,7 @@ class LoginGSAccount(LoginBase.LoginBase):
datagram.addString(cr.validateDownload)
datagram.addString(cr.wantMagicWords)
datagram.addUint32(DISLID)
datagram.addString(config.GetString('otp-whitelist', 'YES'))
datagram.addString(ConfigVariableString('otp-whitelist', 'YES').getValue())
cr.send(datagram)
def resendPlayToken(self):

View File

@ -9,7 +9,7 @@ class LoginTTAccount(LoginBase.LoginBase):
def __init__(self, cr):
LoginBase.LoginBase.__init__(self, cr)
self.useTTSpecificLogin = base.config.GetBool('tt-specific-login', 0)
self.useTTSpecificLogin = ConfigVariableBool('tt-specific-login', 0).getValue()
self.notify.info('self.useTTSpecificLogin =%s' % self.useTTSpecificLogin)
def supportsRelogin(self):

View File

@ -32,7 +32,7 @@ class LoginTTSpecificDevAccount(LoginTTAccount.LoginTTAccount):
def sendLoginMsg(self):
cr = self.cr
tokenString = ''
access = base.config.GetString('force-paid-status', '')
access = ConfigVariableString('force-paid-status', '').getValue()
if access == '':
access = 'FULL'
elif access == 'paid':
@ -46,7 +46,7 @@ class LoginTTSpecificDevAccount(LoginTTAccount.LoginTTAccount):
tokenString += 'TOONTOWN_ACCESS=%s&' % access
tokenString += 'TOONTOWN_GAME_KEY=%s&' % self.loginName
wlChatEnabled = 'YES'
if base.config.GetString('otp-whitelist', 'YES') == 'NO':
if ConfigVariableString('otp-whitelist', 'YES').getValue() == 'NO':
wlChatEnabled = 'NO'
tokenString += 'WL_CHAT_ENABLED=%s &' % wlChatEnabled
openChatEnabled = 'NO'
@ -59,22 +59,22 @@ class LoginTTSpecificDevAccount(LoginTTAccount.LoginTTAccount):
tokenString += 'CREATE_FRIENDS_WITH_CHAT=%s&' % createFriendsWithChat
chatCodeCreationRule = 'No'
if cr.allowSecretChat:
if base.config.GetBool('secret-chat-needs-parent-password', 0):
if ConfigVariableBool('secret-chat-needs-parent-password', 0).getValue():
chatCodeCreationRule = 'PARENT'
else:
chatCodeCreationRule = 'YES'
tokenString += 'CHAT_CODE_CREATION_RULE=%s&' % chatCodeCreationRule
DISLID = config.GetInt('fake-DISL-PlayerAccountId', 0)
DISLID = ConfigVariableInt('fake-DISL-PlayerAccountId', 0).getValue()
if not DISLID:
NameStringId = 'DISLID_%s' % self.loginName
DISLID = config.GetInt(NameStringId, 0)
DISLID = ConfigVariableInt(NameStringId, 0).getValue()
tokenString += 'ACCOUNT_NUMBER=%d&' % DISLID
tokenString += 'ACCOUNT_NAME=%s&' % self.loginName
tokenString += 'GAME_USERNAME=%s&' % self.loginName
tokenString += 'ACCOUNT_NAME_APPROVED=TRUE&'
tokenString += 'FAMILY_NUMBER=&'
tokenString += 'Deployment=US&'
withParentAccount = base.config.GetBool('dev-with-parent-account', 0)
withParentAccount = ConfigVariableBool('dev-with-parent-account', 0).getValue()
if withParentAccount:
tokenString += 'TOON_ACCOUNT_TYPE=WITH_PARENT_ACCOUNT&'
else:
@ -88,7 +88,7 @@ class LoginTTSpecificDevAccount(LoginTTAccount.LoginTTAccount):
datagram.addString('dev')
datagram.addUint32(cr.hashVal)
datagram.addUint32(4)
magicWords = base.config.GetString('want-magic-words', '')
magicWords = ConfigVariableString('want-magic-words', '').getValue()
datagram.addString(magicWords)
cr.send(datagram)

View File

@ -43,7 +43,7 @@ class OTPBase(ShowBase):
return
def setTaskChainNetThreaded(self):
if base.config.GetBool('want-threaded-network', 0):
if ConfigVariableBool('want-threaded-network', 0).getValue():
taskMgr.setupTaskChain('net', numThreads=1, frameBudget=0.001, threadPriority=TPLow)
def setTaskChainNetNonthreaded(self):
@ -135,7 +135,7 @@ class OTPBase(ShowBase):
self.pixelZoomCamHistory = 2.0
self.pixelZoomCamMovedList = []
self.pixelZoomStarted = None
flag = self.config.GetBool('enable-pixel-zoom', True)
flag = ConfigVariableBool('enable-pixel-zoom', True).getValue()
self.enablePixelZoom(flag)
return

View File

@ -4,6 +4,8 @@ import math
import random
import time
from panda3d.core import ConfigVariableBool
__all__ = ['enumerate', 'nonRepeatingRandomList', 'describeException', 'pdir', 'choice', 'cmp', 'lerp', 'triglerp']
if not hasattr(builtins, 'enumerate'):
@ -59,10 +61,8 @@ def recordCreationStack(cls):
# __dev__ is not defined at import time, call this after it's defined
def recordFunctorCreationStacks():
global Functor
from direct.showbase import DConfig
config = DConfig
# off by default, very slow
if __dev__ and config.GetBool('record-functor-creation-stacks', 0):
if __dev__ and ConfigVariableBool('record-functor-creation-stacks', 0).getValue():
if not hasattr(Functor, '_functorCreationStacksRecorded'):
Functor = recordCreationStackStr(Functor)
Functor._functorCreationStacksRecorded = True

View File

@ -14,15 +14,15 @@ class SpeedChatGMHandler(DirectObject.DirectObject):
def generateSCStructure(self):
SpeedChatGMHandler.scStructure = [OTPLocalizer.PSCMenuGM]
phraseCount = 0
numGMCategories = base.config.GetInt('num-gm-categories', 0)
numGMCategories = ConfigVariableInt('num-gm-categories', 0).getValue()
for i in range(0, numGMCategories):
categoryName = base.config.GetString('gm-category-%d' % i, '')
categoryName = ConfigVariableString('gm-category-%d' % i, '').getValue()
if categoryName == '':
continue
categoryStructure = [categoryName]
numCategoryPhrases = base.config.GetInt('gm-category-%d-phrases' % i, 0)
numCategoryPhrases = ConfigVariableInt('gm-category-%d-phrases' % i, 0).getValue()
for j in range(0, numCategoryPhrases):
phrase = base.config.GetString('gm-category-%d-phrase-%d' % (i, j), '')
phrase = ConfigVariableString('gm-category-%d-phrase-%d' % (i, j).getValue(), '')
if phrase != '':
idx = 'gm%d' % phraseCount
SpeedChatGMHandler.scList[idx] = phrase
@ -31,9 +31,9 @@ class SpeedChatGMHandler(DirectObject.DirectObject):
SpeedChatGMHandler.scStructure.append(categoryStructure)
numGMPhrases = base.config.GetInt('num-gm-phrases', 0)
numGMPhrases = ConfigVariableInt('num-gm-phrases', 0).getValue()
for i in range(0, numGMPhrases):
phrase = base.config.GetString('gm-phrase-%d' % i, '')
phrase = ConfigVariableString('gm-phrase-%d' % i, '').getValue()
if phrase != '':
idx = 'gm%d' % phraseCount
SpeedChatGMHandler.scList[idx] = phrase

View File

@ -3,7 +3,7 @@ from direct.distributed.ClockDelta import *
from direct.interval.IntervalGlobal import *
from . import HolidayDecorator
from toontown.toonbase import ToontownGlobals
from panda3d.core import Vec4, CSDefault, TransformState, NodePath, TransparencyAttrib
from panda3d.core import Vec4, CSDefault, TransformState, NodePath, TransparencyAttrib, ConfigVariableBool
from panda3d.toontown import loadDNAFile
from toontown.hood import GSHood
@ -21,7 +21,7 @@ class CrashedLeaderBoardDecorator(HolidayDecorator.HolidayDecorator):
holidayIds = base.cr.newsManager.getDecorationHolidayId()
if ToontownGlobals.CRASHED_LEADERBOARD not in holidayIds:
return
if base.config.GetBool('want-crashedLeaderBoard-Smoke', 1):
if ConfigVariableBool('want-crashedLeaderBoard-Smoke', 1).getValue():
self.startSmokeEffect()
def startSmokeEffect(self):
@ -33,7 +33,7 @@ class CrashedLeaderBoardDecorator(HolidayDecorator.HolidayDecorator):
base.cr.playGame.getPlace().loader.stopSmokeEffect()
def undecorate(self):
if base.config.GetBool('want-crashedLeaderBoard-Smoke', 1):
if ConfigVariableBool('want-crashedLeaderBoard-Smoke', 1).getValue():
self.stopSmokeEffect()
holidayIds = base.cr.newsManager.getDecorationHolidayId()
if len(holidayIds) > 0:

View File

@ -61,10 +61,10 @@ class ToontownAIRepository(ToontownInternalRepository):
def __init__(self, baseChannel, serverId, districtName):
ToontownInternalRepository.__init__(self, baseChannel, serverId, dcSuffix='AI')
self.districtName = districtName
self.doLiveUpdates = config.GetBool('want-live-updates', True)
self.wantCogdominiums = config.GetBool('want-cogdominiums', True)
self.useAllMinigames = config.GetBool('want-all-minigames', True)
self.dataFolder = config.GetString('server-data-folder', '')
self.doLiveUpdates = ConfigVariableBool('want-live-updates', True).getValue()
self.wantCogdominiums = ConfigVariableBool('want-cogdominiums', True).getValue()
self.useAllMinigames = ConfigVariableBool('want-all-minigames', True).getValue()
self.dataFolder = ConfigVariableString('server-data-folder', '').getValue()
if self.dataFolder:
self.dataFolder = self.dataFolder + '/'
self.districtId = None

View File

@ -1,3 +1,4 @@
from panda3d.core import ConfigVariableBool
from .BattleBase import *
from .DistributedBattleAI import *
from toontown.toonbase.ToontownBattleGlobals import *
@ -27,13 +28,13 @@ class BattleCalculatorAI:
KBBONUS_LURED_FLAG = 0
KBBONUS_TGT_LURED = 1
notify = DirectNotifyGlobal.directNotify.newCategory('BattleCalculatorAI')
toonsAlwaysHit = simbase.config.GetBool('toons-always-hit', 0)
toonsAlwaysMiss = simbase.config.GetBool('toons-always-miss', 0)
toonsAlways5050 = simbase.config.GetBool('toons-always-5050', 0)
suitsAlwaysHit = simbase.config.GetBool('suits-always-hit', 0)
suitsAlwaysMiss = simbase.config.GetBool('suits-always-miss', 0)
immortalSuits = simbase.config.GetBool('immortal-suits', 0)
propAndOrganicBonusStack = simbase.config.GetBool('prop-and-organic-bonus-stack', 0)
toonsAlwaysHit = ConfigVariableBool('toons-always-hit', 0).getValue()
toonsAlwaysMiss = ConfigVariableBool('toons-always-miss', 0).getValue()
toonsAlways5050 = ConfigVariableBool('toons-always-5050', 0).getValue()
suitsAlwaysHit = ConfigVariableBool('suits-always-hit', 0).getValue()
suitsAlwaysMiss = ConfigVariableBool('suits-always-miss', 0).getValue()
immortalSuits = ConfigVariableBool('immortal-suits', 0).getValue()
propAndOrganicBonusStack = ConfigVariableBool('prop-and-organic-bonus-stack', 0).getValue()
def __init__(self, battle, tutorialFlag=0):
self.battle = battle
@ -751,7 +752,7 @@ class BattleCalculatorAI:
toonId = self.toonAtkOrder[attackIndex]
attack = self.battle.toonAttacks[toonId]
atkTrack = self.__getActualTrack(attack)
TTOStyle = simbase.config.GetBool('want-tto-style-knockback', False)
TTOStyle = ConfigVariableBool('want-tto-style-knockback', False).getValue()
if atkTrack == HEAL or atkTrack == PETSOS:
return
tgts = self.__createToonTargetList(toonId)

View File

@ -1,3 +1,4 @@
from panda3d.core import ConfigVariableBool
from direct.directnotify import DirectNotifyGlobal
from toontown.toonbase import ToontownBattleGlobals
from toontown.suit import SuitDNA
@ -152,7 +153,7 @@ def assignRewards(activeToons, toonSkillPtsGained, suitsKilled, zoneId, helpfulT
toon.d_setInventory(toon.inventory.makeNetString())
toon.b_setAnimState('victory', 1)
if simbase.air.config.GetBool('battle-passing-no-credit', True):
if ConfigVariableBool('battle-passing-no-credit', True).getValue():
if helpfulToons and toon.doId in helpfulToons:
simbase.air.questManager.toonKilledCogs(toon, suitsKilled, zoneId, activeToonList)
simbase.air.cogPageManager.toonKilledCogs(toon, suitsKilled, zoneId)

View File

@ -35,7 +35,7 @@ class BattlePlace(Place.Place):
pass
def enterBattle(self, event):
if base.config.GetBool('want-qa-regression', 0):
if ConfigVariableBool('want-qa-regression', 0).getValue():
self.notify.info('QA-REGRESSION: COGBATTLE: Enter Battle')
self.loader.music.stop()
base.playMusic(self.loader.battleMusic, looping=1, volume=0.9)

View File

@ -1,3 +1,4 @@
from panda3d.core import ConfigVariableBool, ConfigVariableDouble, ConfigVariableString, Point3, Vec3
from toontown.toonbase.ToontownBattleGlobals import *
from .BattleBase import *
from direct.interval.IntervalGlobal import *
@ -33,7 +34,7 @@ from toontown.toonbase import TTLocalizer
from toontown.toon import NPCToons
camPos = Point3(14, 0, 10)
camHpr = Vec3(89, -30, 0)
randomBattleTimestamp = base.config.GetBool('random-battle-timestamp', 0)
randomBattleTimestamp = ConfigVariableBool('random-battle-timestamp', 0).getValue()
class Movie(DirectObject.DirectObject):
notify = DirectNotifyGlobal.directNotify.newCategory('Movie')
@ -356,11 +357,11 @@ class Movie(DirectObject.DirectObject):
self.tutorialTom.setDNA(dna)
self.tutorialTom.setName(TTLocalizer.NPCToonNames[20000])
self.tutorialTom.uniqueName = uniqueName
if base.config.GetString('language', 'english') == 'japanese':
if ConfigVariableString('language', 'english').getValue() == 'japanese':
self.tomDialogue03 = base.loader.loadSfx('phase_3.5/audio/dial/CC_tom_movie_tutorial_reward01.ogg')
self.tomDialogue04 = base.loader.loadSfx('phase_3.5/audio/dial/CC_tom_movie_tutorial_reward02.ogg')
self.tomDialogue05 = base.loader.loadSfx('phase_3.5/audio/dial/CC_tom_movie_tutorial_reward03.ogg')
self.musicVolume = base.config.GetFloat('tutorial-music-volume', 0.5)
self.musicVolume = ConfigVariableDouble('tutorial-music-volume', 0.5).getValue()
else:
self.tomDialogue03 = None
self.tomDialogue04 = None
@ -404,7 +405,7 @@ class Movie(DirectObject.DirectObject):
return
def __doToonAttacks(self):
if base.config.GetBool('want-toon-attack-anims', 1):
if ConfigVariableBool('want-toon-attack-anims', 1).getValue():
track = Sequence(name='toon-attacks')
camTrack = Sequence(name='toon-attacks-cam')
ival, camIval = MovieFire.doFires(self.__findToonAttack(FIRE))
@ -879,7 +880,7 @@ class Movie(DirectObject.DirectObject):
return
def __doSuitAttacks(self):
if base.config.GetBool('want-suit-anims', 1):
if ConfigVariableBool('want-suit-anims', 1).getValue():
track = Sequence(name='suit-attacks')
camTrack = Sequence(name='suit-attacks-cam')
isLocalToonSad = False

View File

@ -1,3 +1,4 @@
from panda3d.core import ConfigVariableBool
from direct.interval.IntervalGlobal import *
from .BattleBase import *
from .BattleProps import *
@ -352,7 +353,7 @@ def __createSuitDamageTrack(battle, suit, hp, lure, trapProp):
sinkPos1.setZ(sinkPos1.getZ() - 3.1)
sinkPos2.setZ(sinkPos2.getZ() - 9.1)
dropPos.setZ(dropPos.getZ() + 15)
if base.config.GetBool('want-new-cogs', 0):
if ConfigVariableBool('want-new-cogs', 0).getValue():
nameTag = suit.find('**/def_nameTag')
else:
nameTag = suit.find('**/joint_nameTag')

View File

@ -1,3 +1,4 @@
from panda3d.core import ConfigVariableBool
from direct.interval.IntervalGlobal import *
from .BattleBase import *
from .BattleProps import *
@ -282,12 +283,12 @@ def __doFlower(squirt, delay, fShowStun):
lodnames = toon.getLODNames()
toonlod0 = toon.getLOD(lodnames[0])
toonlod1 = toon.getLOD(lodnames[1])
if base.config.GetBool('want-new-anims', 1):
if ConfigVariableBool('want-new-anims', 1).getValue():
if not toonlod0.find('**/def_joint_attachFlower').isEmpty():
flower_joint0 = toonlod0.find('**/def_joint_attachFlower')
else:
flower_joint0 = toonlod0.find('**/joint_attachFlower')
if base.config.GetBool('want-new-anims', 1):
if ConfigVariableBool('want-new-anims', 1).getValue():
if not toonlod1.find('**/def_joint_attachFlower').isEmpty():
flower_joint1 = toonlod1.find('**/def_joint_attachFlower')
else:
@ -350,7 +351,7 @@ def __doWaterGlass(squirt, delay, fShowStun):
def getSprayStartPos(toon = toon):
toon.update(0)
lod0 = toon.getLOD(toon.getLODNames()[0])
if base.config.GetBool('want-new-anims', 1):
if ConfigVariableBool('want-new-anims', 1).getValue():
if not lod0.find('**/def_head').isEmpty():
joint = lod0.find('**/def_head')
else:

View File

@ -1,6 +1,5 @@
from panda3d.core import *
from direct.gui.DirectGui import *
from panda3d.core import *
from direct.interval.IntervalGlobal import *
from toontown.toonbase import ToontownBattleGlobals
from . import BattleBase
@ -643,7 +642,7 @@ class RewardPanel(DirectFrame):
else:
num = quest.doesCogCount(avId, cogDict, zoneId, toonShortList)
if num:
if base.config.GetBool('battle-passing-no-credit', True):
if ConfigVariableBool('battle-passing-no-credit', True).getValue():
if avId in helpfulToonsList:
earned += num
else:

View File

@ -1,3 +1,4 @@
from panda3d.core import ConfigVariableString
from .BattleBase import *
import random
from direct.directnotify import DirectNotifyGlobal
@ -72,7 +73,7 @@ def pickSuitAttack(attacks, suitLevel):
break
index = index + 1
configAttackName = simbase.config.GetString('attack-type', 'random')
configAttackName = ConfigVariableString('attack-type', 'random').getValue()
if configAttackName == 'random':
return attackNum
elif configAttackName == 'sequence':

View File

@ -1,3 +1,4 @@
from panda3d.core import ConfigVariableBool
from .ElevatorConstants import *
from . import DistributedBossElevatorAI
@ -10,7 +11,7 @@ class DistributedBBElevatorAI(DistributedBossElevatorAI.DistributedBossElevatorA
def checkBoard(self, av):
result = 0
if simbase.config.GetBool('allow-ceo-elevator', 1):
if ConfigVariableBool('allow-ceo-elevator', 1).getValue():
result = DistributedBossElevatorAI.DistributedBossElevatorAI.checkBoard(self, av)
else:
result = REJECT_NOT_YET_AVAILABLE

View File

@ -39,7 +39,7 @@ class DistributedBoardingParty(DistributedObject.DistributedObject, BoardingPart
canonicalZoneId = ZoneUtil.getCanonicalZoneId(self.zoneId)
self.notify.debug('canonicalZoneId = %s' % canonicalZoneId)
localAvatar.chatMgr.chatInputSpeedChat.addBoardingGroupMenu(canonicalZoneId)
if base.config.GetBool('want-singing', 0):
if ConfigVariableBool('want-singing', 0).getValue():
localAvatar.chatMgr.chatInputSpeedChat.addSingingGroupMenu()
def delete(self):
@ -136,7 +136,7 @@ class DistributedBoardingParty(DistributedObject.DistributedObject, BoardingPart
self.inviterPanels.forceCleanup()
self.groupInviteePanel = GroupInvitee.GroupInvitee()
self.groupInviteePanel.make(self, inviter, leaderId)
if base.config.GetBool('reject-boarding-group-invites', 0):
if ConfigVariableBool('reject-boarding-group-invites', 0).getValue():
self.groupInviteePanel.forceCleanup()
self.groupInviteePanel = None
return

View File

@ -1,3 +1,4 @@
from panda3d.core import ConfigVariableBool
from otp.otpbase import OTPGlobals
from otp.ai.AIBase import *
from toontown.toonbase import ToontownGlobals
@ -94,7 +95,7 @@ class DistributedBoardingPartyAI(DistributedObjectAI.DistributedObjectAI, Boardi
reason = BoardingPartyBase.BOARDCODE_NOT_PAID
self.sendUpdateToAvatarId(inviterId, 'postInviteNotQualify', [inviteeId, reason, 0])
simbase.air.writeServerEvent('suspicious', inviterId, 'User with rights: %s tried to invite someone to a boarding group' % inviter.getGameAccess())
if simbase.config.GetBool('want-ban-boardingparty', True):
if ConfigVariableBool('want-ban-boardingparty', True).getValue():
commentStr = 'User with rights: %s tried to invite someone to a boarding group' % inviter.getGameAccess()
dislId = inviter.DISLid
simbase.air.banManager.ban(inviterId, dislId, commentStr)

View File

@ -343,7 +343,7 @@ class DistributedBuilding(DistributedObject.DistributedObject):
return
def loadAnimToSuitSfx(self):
if base.config.GetBool('want-qa-regression', 0):
if ConfigVariableBool('want-qa-regression', 0).getValue():
self.notify.info('QA-REGRESSION: COGBUILDING: Cog Take Over')
if self.cogDropSound == None:
self.cogDropSound = base.loader.loadSfx(self.TAKEOVER_SFX_PREFIX + 'cogbldg_drop.ogg')
@ -353,7 +353,7 @@ class DistributedBuilding(DistributedObject.DistributedObject):
return
def loadAnimToToonSfx(self):
if base.config.GetBool('want-qa-regression', 0):
if ConfigVariableBool('want-qa-regression', 0).getValue():
self.notify.info('QA-REGRESSION: COGBUILDING: Toon Take Over')
if self.cogWeakenSound == None:
self.cogWeakenSound = base.loader.loadSfx(self.TAKEOVER_SFX_PREFIX + 'cogbldg_weaken.ogg')

View File

@ -1,3 +1,4 @@
from panda3d.core import ConfigVariableBool
from otp.ai.AIBaseGlobal import *
from direct.distributed.ClockDelta import *
import types
@ -412,7 +413,7 @@ class DistributedBuildingAI(DistributedObjectAI.DistributedObjectAI):
def enterToon(self):
self.d_setState('toon')
exteriorZoneId, interiorZoneId = self.getExteriorAndInteriorZoneId()
if simbase.config.GetBool('want-new-toonhall', 1) and ZoneUtil.getCanonicalZoneId(interiorZoneId) == ToonHall:
if ConfigVariableBool('want-new-toonhall', 1).getValue() and ZoneUtil.getCanonicalZoneId(interiorZoneId) == ToonHall:
self.interior = DistributedToonHallInteriorAI.DistributedToonHallInteriorAI(self.block, self.air, interiorZoneId, self)
else:
self.interior = DistributedToonInteriorAI.DistributedToonInteriorAI(self.block, self.air, interiorZoneId, self)

View File

@ -1,3 +1,4 @@
from panda3d.core import ConfigVariableBool
from otp.ai.AIBase import *
from toontown.toonbase import ToontownGlobals
from direct.distributed.ClockDelta import *
@ -11,7 +12,7 @@ class DistributedClubElevatorAI(DistributedElevatorFSMAI.DistributedElevatorFSMA
notify = DirectNotifyGlobal.directNotify.newCategory('DistributedElevatorFloorAI')
defaultTransitions = {'Off': ['Opening', 'Closed'], 'Opening': ['WaitEmpty', 'WaitCountdown', 'Opening', 'Closing'], 'WaitEmpty': ['WaitCountdown', 'Closing', 'WaitEmpty'], 'WaitCountdown': ['WaitEmpty', 'AllAboard', 'Closing', 'WaitCountdown'], 'AllAboard': ['WaitEmpty', 'Closing'], 'Closing': ['Closed', 'WaitEmpty', 'Closing', 'Opening'], 'Closed': ['Opening']}
id = 0
DoBlockedRoomCheck = simbase.config.GetBool('elevator-blocked-rooms-check', 1)
DoBlockedRoomCheck = ConfigVariableBool('elevator-blocked-rooms-check', 1).getValue()
def __init__(self, air, lawOfficeId, bldg, avIds, markerId=None, numSeats=4, antiShuffle=0, minLaff=0):
DistributedElevatorFSMAI.DistributedElevatorFSMAI.__init__(self, air, bldg, numSeats, antiShuffle=antiShuffle, minLaff=minLaff)

View File

@ -1,3 +1,4 @@
from panda3d.core import ConfigVariableBool
from otp.ai.AIBaseGlobal import *
from direct.task.Task import Task
from direct.distributed.ClockDelta import *
@ -102,7 +103,7 @@ class DistributedDoorAI(DistributedObjectAI.DistributedObjectAI):
self.lockedDoor = locked
def isLockedDoor(self):
if simbase.config.GetBool('no-locked-doors', 0):
if ConfigVariableBool('no-locked-doors', 0).getValue():
return 0
else:
return self.lockedDoor

View File

@ -15,7 +15,7 @@ class DistributedElevatorInt(DistributedElevator.DistributedElevator):
def __init__(self, cr):
DistributedElevator.DistributedElevator.__init__(self, cr)
self.countdownTime = base.config.GetFloat('int-elevator-timeout', INTERIOR_ELEVATOR_COUNTDOWN_TIME)
self.countdownTime = ConfigVariableDouble('int-elevator-timeout', INTERIOR_ELEVATOR_COUNTDOWN_TIME).getValue()
def setupElevator(self):
self.leftDoor = self.bldg.leftDoorOut

View File

@ -1,3 +1,4 @@
from panda3d.core import ConfigVariableDouble
from otp.ai.AIBase import *
from toontown.toonbase import ToontownGlobals
from direct.distributed.ClockDelta import *
@ -14,7 +15,7 @@ class DistributedElevatorIntAI(DistributedElevatorAI.DistributedElevatorAI):
def __init__(self, air, bldg, avIds):
DistributedElevatorAI.DistributedElevatorAI.__init__(self, air, bldg)
self.countdownTime = simbase.config.GetFloat('int-elevator-timeout', INTERIOR_ELEVATOR_COUNTDOWN_TIME)
self.countdownTime = ConfigVariableDouble('int-elevator-timeout', INTERIOR_ELEVATOR_COUNTDOWN_TIME).getValue()
self.avIds = copy.copy(avIds)
for avId in avIds:
self.acceptOnce(self.air.getAvatarExitEvent(avId), self.__handleAllAvsUnexpectedExit, extraArgs=[avId])

View File

@ -19,14 +19,9 @@ REJECT_BOARDINGPARTY = 7
REJECT_NOTPAID = 8
MAX_GROUP_BOARDING_TIME = 6.0
if __dev__:
try:
config = simbase.config
except:
config = base.config
elevatorCountdown = config.GetFloat('elevator-countdown', -1)
if elevatorCountdown != -1:
bboard.post('elevatorCountdown', elevatorCountdown)
elevatorCountdown = ConfigVariableDouble('elevator-countdown')
if elevatorCountdown.hasValue():
bboard.post('elevatorCountdown', elevatorCountdown.getValue())
ElevatorData = {ELEVATOR_NORMAL: {'openTime': 2.0,
'closeTime': 2.0,
'width': 3.5,

View File

@ -1,3 +1,4 @@
from panda3d.core import ConfigVariableBool, ConfigVariableString
from otp.ai.AIBaseGlobal import *
import random, functools
from toontown.suit import SuitDNA
@ -9,13 +10,13 @@ class SuitPlannerInteriorAI:
notify = DirectNotifyGlobal.directNotify.newCategory('SuitPlannerInteriorAI')
def __init__(self, numFloors, bldgLevel, bldgTrack, zone, respectInvasions=1):
self.dbg_nSuits1stRound = config.GetBool('n-suits-1st-round', 0)
self.dbg_4SuitsPerFloor = config.GetBool('4-suits-per-floor', 0)
self.dbg_1SuitPerFloor = config.GetBool('1-suit-per-floor', 0)
self.dbg_nSuits1stRound = ConfigVariableBool('n-suits-1st-round', 0).getValue()
self.dbg_4SuitsPerFloor = ConfigVariableBool('4-suits-per-floor', 0).getValue()
self.dbg_1SuitPerFloor = ConfigVariableBool('1-suit-per-floor', 0).getValue()
self.zoneId = zone
self.numFloors = numFloors
self.respectInvasions = respectInvasions
dbg_defaultSuitName = simbase.config.GetString('suit-type', 'random')
dbg_defaultSuitName = ConfigVariableString('suit-type', 'random').getValue()
if dbg_defaultSuitName == 'random':
self.dbg_defaultSuitType = None
else:

View File

@ -1568,7 +1568,7 @@ class CatalogGenerator:
return itemLists
else:
self.__releasedItemLists.clear()
testDaysAhead = simbase.config.GetInt('test-server-holiday-days-ahead', 0)
testDaysAhead = ConfigVariableInt('test-server-holiday-days-ahead', 0).getValue()
nowtuple = time.localtime(weekStart * 60 + testDaysAhead * 24 * 60 * 60)
year = nowtuple[0]
month = nowtuple[1]
@ -1598,7 +1598,7 @@ class CatalogGenerator:
itemLists = self.__itemLists.get(dayNumber)
if itemLists != None:
return itemLists
testDaysAhead = simbase.config.GetInt('test-server-holiday-days-ahead', 0)
testDaysAhead = ConfigVariableInt('test-server-holiday-days-ahead', 0).getValue()
nowtuple = time.localtime(weekStart * 60 + testDaysAhead * 24 * 60 * 60)
year = nowtuple[0]
month = nowtuple[1]

View File

@ -407,7 +407,7 @@ class CatalogItemPanel(DirectFrame):
self.accept('verifyDone', self.__handleVerifyPurchase)
def __handleVerifyPurchase(self):
if base.config.GetBool('want-qa-regression', 0):
if ConfigVariableBool('want-qa-regression', 0).getValue():
self.notify.info('QA-REGRESSION: CATALOG: Order item')
status = self.verify.doneStatus
self.ignore('verifyDone')
@ -439,7 +439,7 @@ class CatalogItemPanel(DirectFrame):
self.accept('verifyGiftDone', self.__handleVerifyGift)
def __handleVerifyGift(self):
if base.config.GetBool('want-qa-regression', 0):
if ConfigVariableBool('want-qa-regression', 0).getValue():
self.notify.info('QA-REGRESSION: CATALOG: Gift item')
status = self.verify.doneStatus
self.ignore('verifyGiftDone')

View File

@ -1,6 +1,5 @@
from panda3d.core import *
from direct.gui.DirectGui import *
from panda3d.core import *
from direct.gui.DirectScrolledList import *
from toontown.toonbase import ToontownGlobals
from toontown.toontowngui import TTDialog
@ -173,7 +172,7 @@ class CatalogScreen(DirectFrame):
self.emblemCatalogButton['state'] = DGG.DISABLED
def showNewItems(self, index = None):
if base.config.GetBool('want-qa-regression', 0):
if ConfigVariableBool('want-qa-regression', 0).getValue():
self.notify.info('QA-REGRESSION: CATALOG: New item')
taskMgr.remove('clarabelleHelpText1')
messenger.send('wakeup')
@ -190,7 +189,7 @@ class CatalogScreen(DirectFrame):
return
def showBackorderItems(self, index = None):
if base.config.GetBool('want-qa-regression', 0):
if ConfigVariableBool('want-qa-regression', 0).getValue():
self.notify.info('QA-REGRESSION: CATALOG: Backorder item')
taskMgr.remove('clarabelleHelpText1')
messenger.send('wakeup')
@ -207,7 +206,7 @@ class CatalogScreen(DirectFrame):
return
def showLoyaltyItems(self, index = None):
if base.config.GetBool('want-qa-regression', 0):
if ConfigVariableBool('want-qa-regression', 0).getValue():
self.notify.info('QA-REGRESSION: CATALOG: Special item')
taskMgr.remove('clarabelleHelpText1')
messenger.send('wakeup')
@ -224,7 +223,7 @@ class CatalogScreen(DirectFrame):
return
def showEmblemItems(self, index = None):
if base.config.GetBool('want-qa-regression', 0):
if ConfigVariableBool('want-qa-regression', 0).getValue():
self.notify.info('QA-REGRESSION: CATALOG: Emblem item')
taskMgr.remove('clarabelleHelpText1')
messenger.send('wakeup')

View File

@ -176,7 +176,7 @@ class MailboxScreen(DirectObject.DirectObject):
messenger.send(self.doneEvent)
def __handleAccept(self):
if base.config.GetBool('want-qa-regression', 0):
if ConfigVariableBool('want-qa-regression', 0).getValue():
self.notify.info('QA-REGRESSION: MAILBOX: Accept item')
if self.acceptingIndex != None:
return

View File

@ -3,7 +3,6 @@ from panda3d.core import *
from panda3d.otp import *
from direct.task import Task
import random
from panda3d.core import *
from direct.directnotify import DirectNotifyGlobal
AnimDict = {'mk': (('walk', 'walk', 3),
('run', 'run', 3),
@ -136,12 +135,12 @@ class Char(Avatar.Avatar):
def setLODs(self):
self.setLODNode()
levelOneIn = base.config.GetInt('lod1-in', 50)
levelOneOut = base.config.GetInt('lod1-out', 1)
levelTwoIn = base.config.GetInt('lod2-in', 100)
levelTwoOut = base.config.GetInt('lod2-out', 50)
levelThreeIn = base.config.GetInt('lod3-in', 280)
levelThreeOut = base.config.GetInt('lod3-out', 100)
levelOneIn = ConfigVariableInt('lod1-in', 50).getValue()
levelOneOut = ConfigVariableInt('lod1-out', 1).getValue()
levelTwoIn = ConfigVariableInt('lod2-in', 100).getValue()
levelTwoOut = ConfigVariableInt('lod2-out', 50).getValue()
levelThreeIn = ConfigVariableInt('lod3-in', 280).getValue()
levelThreeOut = ConfigVariableInt('lod3-out', 100).getValue()
self.addLOD(LODModelDict[self.style.name][0], levelOneIn, levelOneOut)
self.addLOD(LODModelDict[self.style.name][1], levelTwoIn, levelTwoOut)
self.addLOD(LODModelDict[self.style.name][2], levelThreeIn, levelThreeOut)
@ -411,7 +410,7 @@ class Char(Avatar.Avatar):
if self.dialogueArray:
self.notify.warning('loadDialogue() called twice.')
self.unloadDialogue()
language = base.config.GetString('language', 'english')
language = ConfigVariableString('language', 'english').getValue()
if char == 'mk':
dialogueFile = base.loader.loadSfx('phase_3/audio/dial/mickey.ogg')
for i in range(0, 6):

View File

@ -344,7 +344,7 @@ class TTChatInputSpeedChat(DirectObject.DirectObject):
self.insidePartiesMenu = None
self.createSpeedChat()
self.whiteList = None
self.allowWhiteListSpeedChat = base.config.GetBool('white-list-speed-chat', 0)
self.allowWhiteListSpeedChat = ConfigVariableBool('white-list-speed-chat', 0).getValue()
if self.allowWhiteListSpeedChat:
self.addWhiteList()
self.factoryMenu = None
@ -437,7 +437,7 @@ class TTChatInputSpeedChat(DirectObject.DirectObject):
self.chatMgr.fsm.request('mainMenu')
self.terminalSelectedEvent = self.speedChat.getEventName(SpeedChatGlobals.SCTerminalSelectedEvent)
if base.config.GetBool('want-sc-auto-hide', 1):
if ConfigVariableBool('want-sc-auto-hide', 1).getValue():
self.accept(self.terminalSelectedEvent, selectionMade)
self.speedChat.reparentTo(aspect2dp, DGG.FOREGROUND_SORT_INDEX)
scZ = 0.96

View File

@ -11,7 +11,7 @@ from toontown.toonbase import ToontownGlobals
class TTChatInputWhiteList(ChatInputWhiteListFrame):
notify = DirectNotifyGlobal.directNotify.newCategory('TTChatInputWhiteList')
TFToggleKey = base.config.GetString('true-friend-toggle-key', 'alt')
TFToggleKey = ConfigVariableString('true-friend-toggle-key', 'alt').getValue()
TFToggleKeyUp = TFToggleKey + '-up'
def __init__(self, parent = None, **kw):
@ -53,7 +53,7 @@ class TTChatInputWhiteList(ChatInputWhiteListFrame):
self.chatEntry.bind(DGG.OVERFLOW, self.chatOverflow)
self.chatEntry.bind(DGG.TYPE, self.typeCallback)
self.trueFriendChat = 0
if base.config.GetBool('whisper-to-nearby-true-friends', 1):
if ConfigVariableBool('whisper-to-nearby-true-friends', 1).getValue():
self.accept(self.TFToggleKey, self.shiftPressed)
return
@ -178,7 +178,7 @@ class TTChatInputWhiteList(ChatInputWhiteListFrame):
prefixes = []
if base.cr.magicWordManager and base.cr.wantMagicWords:
prefixes.append(base.cr.magicWordManager.chatPrefix)
if config.GetBool('exec-chat', 0):
if ConfigVariableBool('exec-chat', 0).getValue():
prefixes.append('>')
if len(text) > 0 and text[0] in prefixes:
self.okayToSubmit = True

View File

@ -51,7 +51,7 @@ class ToontownChatManager(ChatManager.ChatManager):
self.whisperCancelButton = DirectButton(parent=self.whisperFrame, image=(gui.find('**/CloseBtn_UP'), gui.find('**/CloseBtn_DN'), gui.find('**/CloseBtn_Rllvr')), pos=(0.125, 0, -0.1), scale=1.179, relief=None, text=('', OTPLocalizer.ChatManagerCancel, OTPLocalizer.ChatManagerCancel), text_scale=0.05, text_fg=(0, 0, 0, 1), text_pos=(0, -0.09), textMayChange=0, command=self.__whisperCancelPressed)
gui.removeNode()
ChatManager.ChatManager.__init__(self, cr, localAvatar)
self.defaultToWhiteList = base.config.GetBool('white-list-is-default', 1)
self.defaultToWhiteList = ConfigVariableBool('white-list-is-default', 1).getValue()
self.chatInputSpeedChat = TTChatInputSpeedChat(self)
self.normalPos = Vec3(-1.083, 0, 0.804)
self.whisperPos = Vec3(0.0, 0, 0.71)
@ -364,7 +364,7 @@ class ToontownChatManager(ChatManager.ChatManager):
self.problemActivatingChat.hide()
def __normalButtonPressed(self):
if base.config.GetBool('want-qa-regression', 0):
if ConfigVariableBool('want-qa-regression', 0).getValue():
self.notify.info('QA-REGRESSION: CHAT: Speedchat Plus')
messenger.send('wakeup')
if base.cr.productName in ['DisneyOnline-US', 'ES']:
@ -407,7 +407,7 @@ class ToontownChatManager(ChatManager.ChatManager):
print('ChatManager: productName: %s not recognized' % base.cr.productName)
def __scButtonPressed(self):
if base.config.GetBool('want-qa-regression', 0):
if ConfigVariableBool('want-qa-regression', 0).getValue():
self.notify.info('QA-REGRESSION: CHAT: Speedchat')
messenger.send('wakeup')
if self.fsm.getCurrentState().getName() == 'speedChat':
@ -493,7 +493,7 @@ class ToontownChatManager(ChatManager.ChatManager):
self.fsm.request('mainMenu')
def __whisperScButtonPressed(self, avatarName, avatarId, playerId):
if base.config.GetBool('want-qa-regression', 0):
if ConfigVariableBool('want-qa-regression', 0).getValue():
self.notify.info('QA-REGRESSION: CHAT: Whisper')
messenger.send('wakeup')
hasManager = hasattr(base.cr, 'playerFriendsManager')

View File

@ -1,3 +1,4 @@
from panda3d.core import ConfigVariableBool
from otp.ai.AIBaseGlobal import *
from direct.distributed.ClockDelta import *
from otp.avatar import DistributedAvatarAI
@ -20,7 +21,7 @@ class DistributedCCharBaseAI(DistributedAvatarAI.DistributedAvatarAI):
def generate(self):
DistributedAvatarAI.DistributedAvatarAI.generate(self)
if config.GetBool('classic-char-client-spam', 0):
if ConfigVariableBool('classic-char-client-spam', 0).getValue():
self._ccharSpamTask = taskMgr.add(self._simSpam, 'cchar-spam-%s' % serialNum())
def _simSpam(self, task):

View File

@ -1,3 +1,5 @@
from panda3d.core import ConfigVariableInt
DefaultDbName = 'tt_code_redemption'
RedeemErrors = Enum('Success, CodeDoesntExist, CodeIsInactive, CodeAlreadyRedeemed, AwardCouldntBeGiven, TooManyAttempts, SystemUnavailable, ')
RedeemErrorStrings = {RedeemErrors.Success: 'Success',
@ -7,4 +9,4 @@ RedeemErrorStrings = {RedeemErrors.Success: 'Success',
RedeemErrors.AwardCouldntBeGiven: 'Award could not be given',
RedeemErrors.TooManyAttempts: 'Too many attempts, code ignored',
RedeemErrors.SystemUnavailable: 'Code redemption is currently unavailable'}
MaxCustomCodeLen = config.GetInt('tt-max-custom-code-len', 16)
MaxCustomCodeLen = ConfigVariableInt('tt-max-custom-code-len', 16).getValue()

View File

@ -1,5 +1,5 @@
from direct.controls.GravityWalker import GravityWalker
from panda3d.core import CollisionSphere, CollisionNode, BitMask32, CollisionHandlerEvent, CollisionRay, CollisionHandlerGravity, CollisionHandlerFluidPusher, CollisionHandlerPusher
from panda3d.core import CollisionSphere, CollisionNode, BitMask32, CollisionHandlerEvent, CollisionRay, CollisionHandlerGravity, CollisionHandlerFluidPusher, CollisionHandlerPusher, ConfigVariableBool
from toontown.toonbase import ToontownGlobals
from otp.otpbase import OTPGlobals
@ -25,7 +25,7 @@ class CogdoFlyingCollisions(GravityWalker):
cSphereNodePath = self.avatarNodePath.attachNewNode(cSphereNode)
cSphereNode.setFromCollideMask(bitmask)
cSphereNode.setIntoCollideMask(BitMask32.allOff())
if config.GetBool('want-fluid-pusher', 0):
if ConfigVariableBool('want-fluid-pusher', 0).getValue():
self.pusher = CollisionHandlerFluidPusher()
else:
self.pusher = CollisionHandlerPusher()

View File

@ -1,3 +1,4 @@
from panda3d.core import ConfigVariableBool
from direct.showbase.DirectObject import DirectObject
from direct.task.Task import Task
from direct.showbase.RandomNumGen import RandomNumGen
@ -160,7 +161,7 @@ class CogdoFlyingGame(DirectObject):
self.acceptOnce(CogdoFlyingLocalPlayer.RanOutOfTimeEventName, self.handleLocalPlayerRanOutOfTime)
self.__startUpdateTask()
self.isGameComplete = False
if __debug__ and base.config.GetBool('schellgames-dev', True):
if __debug__ and ConfigVariableBool('schellgames-dev', True).getValue():
self.acceptOnce('end', self.guiMgr.forceTimerDone)
def toggleFog():
@ -192,7 +193,7 @@ class CogdoFlyingGame(DirectObject):
self.ignore(CogdoFlyingLegalEagle.RequestAddTargetAgainEventName)
self.ignore(CogdoFlyingLegalEagle.RequestRemoveTargetEventName)
self.ignore(CogdoFlyingLocalPlayer.PlayWaitingMusicEventName)
if __debug__ and base.config.GetBool('schellgames-dev', True):
if __debug__ and ConfigVariableBool('schellgames-dev', True).getValue():
self.ignore('end')
self.ignore('home')
self.level.update(0.0)

View File

@ -1,4 +1,4 @@
from panda3d.core import NodePath, VBase4
from panda3d.core import ConfigVariableBool, NodePath, VBase4
from direct.showbase.DirectObject import DirectObject
from direct.showbase.RandomNumGen import RandomNumGen
from toontown.minigame.MazeBase import MazeBase
@ -18,7 +18,7 @@ class CogdoMaze(MazeBase, DirectObject):
self._clearColor = VBase4(base.win.getClearColor())
self._clearColor.setW(1.0)
base.win.setClearColor(VBase4(0.0, 0.0, 0.0, 1.0))
if __debug__ and base.config.GetBool('cogdomaze-dev', False):
if __debug__ and ConfigVariableBool('cogdomaze-dev', False).getValue():
self._initCollisionVisuals()
def _initWaterCoolers(self):

View File

@ -1,4 +1,4 @@
from panda3d.core import Point3, CollisionSphere, CollisionNode
from panda3d.core import Point3, CollisionSphere, CollisionNode, ConfigVariableBool
from direct.showbase.DirectObject import DirectObject
from direct.showbase.PythonUtil import Functor
from direct.showbase.RandomNumGen import RandomNumGen
@ -26,7 +26,7 @@ class CogdoMazeGame(DirectObject):
def __init__(self, distGame):
self.distGame = distGame
self._allowSuitsHitToons = base.config.GetBool('cogdomaze-suits-hit-toons', True)
self._allowSuitsHitToons = ConfigVariableBool('cogdomaze-suits-hit-toons', True).getValue()
def load(self, cogdoMazeFactory, numSuits, bossCode):
self._initAudio()

View File

@ -1,4 +1,4 @@
from panda3d.core import ColorBlendAttrib
from panda3d.core import ColorBlendAttrib, ConfigVariableBool
ModelPhase = 5
ModelTypes = {'animation': 'a',
'model': 'm',
@ -39,7 +39,7 @@ class VariableContainer:
class DevVariableContainer:
def __init__(self, name):
self.__dict__['_enabled'] = config.GetBool('%s-dev' % name, False)
self.__dict__['_enabled'] = ConfigVariableBool('%s-dev' % name, False).getValue()
def __setattr__(self, name, value):
self.__dict__[name] = self._enabled and value

View File

@ -1,3 +1,4 @@
from panda3d.core import ConfigVariableBool
from direct.distributed.ClockDelta import globalClockDelta
from toontown.toonbase import TTLocalizer
from .CogdoFlyingGame import CogdoFlyingGame
@ -10,7 +11,7 @@ class DistCogdoFlyingGame(DistCogdoGame):
def __init__(self, cr):
DistCogdoGame.__init__(self, cr)
if __debug__ and base.config.GetBool('schellgames-dev', True):
if __debug__ and ConfigVariableBool('schellgames-dev', True).getValue():
self.accept('onCodeReload', self.__sgOnCodeReload)
self.game = CogdoFlyingGame(self)

View File

@ -1,4 +1,5 @@
import random
from panda3d.core import ConfigVariableBool
from direct.distributed.ClockDelta import globalClockDelta
from .DistCogdoGameAI import DistCogdoGameAI
from . import CogdoFlyingGameGlobals as Globals
@ -20,7 +21,7 @@ class DistCogdoFlyingGameAI(DistCogdoGameAI):
self.broadcastedGotoWinState = False
self.broadcastedGameFinished = False
self._gameState = False
if __debug__ and simbase.config.GetBool('schellgames-dev', True):
if __debug__ and ConfigVariableBool('schellgames-dev', True).getValue():
self.accept('onCodeReload', self._DistCogdoFlyingGameAI__sgOnCodeReload)
def getLegalEagleAttackRoundTime(self, fromCooldown = False):

View File

@ -1,4 +1,4 @@
from panda3d.core import VBase4
from panda3d.core import ConfigVariableBool, VBase4
from direct.gui.DirectGui import DirectLabel
from direct.directnotify.DirectNotifyGlobal import directNotify
from direct.distributed.ClockDelta import globalClockDelta
@ -11,7 +11,7 @@ from toontown.minigame.MinigameRulesPanel import MinigameRulesPanel
from toontown.cogdominium.CogdoGameRulesPanel import CogdoGameRulesPanel
from toontown.minigame import MinigameGlobals
from toontown.toonbase import TTLocalizer as TTL
SCHELLGAMES_DEV = __debug__ and base.config.GetBool('schellgames-dev', False)
SCHELLGAMES_DEV = __debug__ and ConfigVariableBool('schellgames-dev', False).getValue()
class DistCogdoGame(DistCogdoGameBase, DistributedObject):
notify = directNotify.newCategory('DistCogdoGame')

View File

@ -1,3 +1,4 @@
from panda3d.core import ConfigVariableBool
from direct.directnotify.DirectNotifyGlobal import directNotify
from direct.distributed.ClockDelta import globalClockDelta
from direct.distributed.DistributedObjectAI import DistributedObjectAI
@ -12,7 +13,7 @@ class SadCallbackToken:
class DistCogdoGameAI(DistCogdoGameBase, DistributedObjectAI):
notify = directNotify.newCategory('DistCogdoGameAI')
EndlessCogdoGames = simbase.config.GetBool('endless-cogdo-games', 0)
EndlessCogdoGames = ConfigVariableBool('endless-cogdo-games', 0).getValue()
def __init__(self, air, interior):
DistributedObjectAI.__init__(self, air)

View File

@ -1,3 +1,4 @@
from panda3d.core import ConfigVariableBool
from direct.distributed.ClockDelta import globalClockDelta
from toontown.toonbase import TTLocalizer
from .DistCogdoGame import DistCogdoGame
@ -14,7 +15,7 @@ class DistCogdoMazeGame(DistCogdoGame, DistCogdoMazeGameBase):
DistCogdoGame.__init__(self, cr)
self.game = CogdoMazeGame(self)
self._numSuits = (0, 0, 0)
if __debug__ and base.config.GetBool('schellgames-dev', True):
if __debug__ and ConfigVariableBool('schellgames-dev', True).getValue():
self.accept('onCodeReload', self.__sgOnCodeReload)
def delete(self):

View File

@ -1,4 +1,4 @@
from panda3d.core import Vec3, NodePath
from panda3d.core import ConfigVariableBool, ConfigVariableDouble, Vec3, NodePath
from direct.distributed.ClockDelta import globalClockDelta
from otp.avatar.SpeedMonitor import SpeedMonitor
from toontown.cogdominium.CogdoMaze import CogdoMazeFactory
@ -16,7 +16,7 @@ class DistCogdoMazeGameAI(DistCogdoGameAI, DistCogdoMazeGameBase):
TimeoutTimerTaskName = 'CMG_timeoutTimerTask'
CountdownTimerTaskName = 'CMG_countdownTimerTask'
AnnounceGameDoneTimerTaskName = 'CMG_AnnounceGameDoneTimerTask'
SkipCogdoGames = simbase.config.GetBool('skip-cogdo-game', 0)
SkipCogdoGames = ConfigVariableBool('skip-cogdo-game', 0).getValue()
def __init__(self, air, id):
DistCogdoGameAI.__init__(self, air, id)
@ -33,7 +33,7 @@ class DistCogdoMazeGameAI(DistCogdoGameAI, DistCogdoMazeGameBase):
self.jokeLastRequestId = None
self.jokeRequestStartTime = globalClock.getFrameTime()
self.jokeRequestCount = None
if __debug__ and simbase.config.GetBool('schellgames-dev', True):
if __debug__ and ConfigVariableBool('schellgames-dev', True).getValue():
self.accept('onCodeReload', self.__sgOnCodeReload)
def setExteriorZone(self, exteriorZone):
@ -125,7 +125,7 @@ class DistCogdoMazeGameAI(DistCogdoGameAI, DistCogdoMazeGameBase):
secondsPerGrab = elapsed / self.requestCount
if self.requestCount >= 3 and secondsPerGrab <= 0.4:
simbase.air.writeServerEvent('suspicious', avId, 'suitHit %s suits in %s seconds' % (self.requestCount, elapsed))
if simbase.config.GetBool('want-ban-cogdo-maze-suit-hit', False):
if ConfigVariableBool('want-ban-cogdo-maze-suit-hit', False).getValue():
toon.ban('suitHit %s suits in %s seconds' % (self.requestCount, elapsed))
result = False
@ -372,7 +372,7 @@ class DistCogdoMazeGameAI(DistCogdoGameAI, DistCogdoMazeGameBase):
secondsPerGrab = elapsed / self.jokeRequestCount
if self.jokeRequestCount >= 4 and secondsPerGrab <= 0.03:
simbase.air.writeServerEvent('suspicious', senderId, 'requestPickup %s jokes in %s seconds' % (self.jokeRequestCount, elapsed))
if simbase.config.GetBool('want-ban-cogdo-maze-request-pickup', False):
if ConfigVariableBool('want-ban-cogdo-maze-request-pickup', False).getValue():
toon.ban('requestPickup %s jokes in %s seconds' % (self.jokeRequestCount, elapsed))
result = False
@ -400,14 +400,14 @@ class DistCogdoMazeGameAI(DistCogdoGameAI, DistCogdoMazeGameBase):
if toon:
token = self._speedMonitor.addNodepath(toon)
self._toonId2speedToken[toonId] = token
self._speedMonitor.setSpeedLimit(token, config.GetFloat('cogdo-maze-speed-limit', Globals.ToonRunSpeed * 1.1), Functor(self._toonOverSpeedLimit, toonId))
self._speedMonitor.setSpeedLimit(token, ConfigVariableDouble('cogdo-maze-speed-limit', Globals.ToonRunSpeed * 1.1).getValue(), Functor(self._toonOverSpeedLimit, toonId))
def _toonOverSpeedLimit(self, toonId, speed):
self._bootPlayerForHacking(toonId, 'speeding in cogdo maze game (%.2f feet/sec)' % speed, config.GetBool('want-ban-cogdo-maze-speeding', 0))
self._bootPlayerForHacking(toonId, 'speeding in cogdo maze game (%.2f feet/sec)' % speed, ConfigVariableBool('want-ban-cogdo-maze-speeding', 0).getValue())
def _toonHackingRequestGag(self, toonId):
simbase.air.writeServerEvent('suspicious', toonId, 'CogdoMazeGame: toon caught hacking requestGag')
self._bootPlayerForHacking(toonId, 'hacking cogdo maze game requestGag', config.GetBool('want-ban-cogdo-maze-requestgag-hacking', 0))
self._bootPlayerForHacking(toonId, 'hacking cogdo maze game requestGag', ConfigVariableBool('want-ban-cogdo-maze-requestgag-hacking', 0).getValue())
def _bootPlayerForHacking(self, toonId, reason, wantBan):
toon = simbase.air.doId2do.get(toonId)

View File

@ -3,7 +3,7 @@ from direct.interval.IntervalGlobal import *
from direct.distributed.ClockDelta import *
from toontown.building.ElevatorConstants import *
from toontown.toon import NPCToons
from panda3d.core import NodePath
from panda3d.core import ConfigVariableBool, NodePath
from panda3d.otp import *
from toontown.building import ElevatorUtils
from toontown.toonbase import ToontownGlobals
@ -41,7 +41,7 @@ class DistributedCogdoInterior(DistributedObject.DistributedObject):
self.reserveSuits = []
self.joiningReserves = []
self.distBldgDoId = None
self._CogdoGameRepeat = config.GetBool('cogdo-game-repeat', 0)
self._CogdoGameRepeat = ConfigVariableBool('cogdo-game-repeat', 0).getValue()
self.currentFloor = -1
self.elevatorName = self.__uniqueName('elevator')
self.floorModel = None
@ -70,7 +70,7 @@ class DistributedCogdoInterior(DistributedObject.DistributedObject):
120,
12,
38]
self._wantBarrelRoom = config.GetBool('cogdo-want-barrel-room', 0)
self._wantBarrelRoom = ConfigVariableBool('cogdo-want-barrel-room', 0).getValue()
self.barrelRoom = CogdoBarrelRoom.CogdoBarrelRoom()
self.brResults = [[], []]
self.barrelRoomIntroTrack = None

View File

@ -1,5 +1,6 @@
import copy
import random
from panda3d.core import ConfigVariableBool, ConfigVariableString
from direct.directnotify import DirectNotifyGlobal
from direct.distributed import DistributedObjectAI
from direct.distributed.ClockDelta import *
@ -34,7 +35,7 @@ IntGames = set([
'crane',
'flying',
'defense'])
simbase.forcedCogdoGame = config.GetString('cogdo-game', '')
simbase.forcedCogdoGame = ConfigVariableString('cogdo-game', '').getValue()
GameRequests = {}
class DistributedCogdoInteriorAI(DistributedObjectAI.DistributedObjectAI):
@ -67,7 +68,7 @@ class DistributedCogdoInteriorAI(DistributedObjectAI.DistributedObjectAI):
self.bldg = elevator.bldg
self.elevator = elevator
self._game = None
self._CogdoGameRepeat = config.GetBool('cogdo-game-repeat', 0)
self._CogdoGameRepeat = ConfigVariableBool('cogdo-game-repeat', 0).getValue()
self.suits = []
self.activeSuits = []
self.reserveSuits = []
@ -76,7 +77,7 @@ class DistributedCogdoInteriorAI(DistributedObjectAI.DistributedObjectAI):
self.suitsKilledPerFloor = []
self.battle = None
self.timer = Timer.Timer()
self._wantBarrelRoom = config.GetBool('cogdo-want-barrel-room', 0)
self._wantBarrelRoom = ConfigVariableBool('cogdo-want-barrel-room', 0).getValue()
self.barrelRoom = None
self.responses = {}
self.ignoreResponses = 0
@ -533,7 +534,7 @@ class DistributedCogdoInteriorAI(DistributedObjectAI.DistributedObjectAI):
for (toonId, penalty) in self._penaltyLaff.items():
if penalty:
av = self.air.doId2do.get(toonId)
if config.GetBool('want-cogdo-maze-no-sad', 1):
if ConfigVariableBool('want-cogdo-maze-no-sad', 1).getValue():
avHp = av.getHp()
if avHp < 1:
avHp = 1

View File

@ -10,7 +10,7 @@ from toontown.coghq import BossbotHQExterior
from toontown.coghq import BossbotHQBossBattle
from toontown.coghq import BossbotOfficeExterior
from toontown.coghq import CountryClubInterior
from panda3d.core import DecalEffect, TextEncoder
from panda3d.core import ConfigVariableBool, DecalEffect, TextEncoder
import random
aspectSF = 0.7227
@ -55,7 +55,7 @@ class BossbotCogHQLoader(CogHQLoader.CogHQLoader):
origin = top.find('**/tunnel_origin')
origin.setH(-33.33)
elif zoneId == ToontownGlobals.BossbotLobby:
if base.config.GetBool('want-qa-regression', 0):
if ConfigVariableBool('want-qa-regression', 0).getValue():
self.notify.info('QA-REGRESSION: COGHQ: Visit BossbotLobby')
self.notify.debug('cogHQLobbyModelPath = %s' % self.cogHQLobbyModelPath)
self.geom = loader.loadModel(self.cogHQLobbyModelPath)

View File

@ -8,7 +8,7 @@ from toontown.toon import Toon
from direct.fsm import State
from . import CashbotHQExterior
from . import CashbotHQBossBattle
from panda3d.core import DecalEffect
from panda3d.core import ConfigVariableBool, DecalEffect
class CashbotCogHQLoader(CogHQLoader.CogHQLoader):
notify = DirectNotifyGlobal.directNotify.newCategory('CashbotCogHQLoader')
@ -51,7 +51,7 @@ class CashbotCogHQLoader(CogHQLoader.CogHQLoader):
signText.setPosHpr(locator, 0, 0, 0, 0, 0, 0)
signText.setDepthWrite(0)
elif zoneId == ToontownGlobals.CashbotLobby:
if base.config.GetBool('want-qa-regression', 0):
if ConfigVariableBool('want-qa-regression', 0).getValue():
self.notify.info('QA-REGRESSION: COGHQ: Visit CashbotLobby')
self.geom = loader.loadModel(self.cogHQLobbyModelPath)
else:

View File

@ -1,6 +1,6 @@
import math
import random
from panda3d.core import NodePath, Point3, VBase4, TextNode, Vec3, deg2Rad, CollisionSegment, CollisionHandlerQueue, CollisionNode, BitMask32
from panda3d.core import NodePath, Point3, VBase4, TextNode, Vec3, deg2Rad, CollisionSegment, CollisionHandlerQueue, CollisionNode, BitMask32, ConfigVariableDouble
from panda3d.direct import SmoothMover
from direct.fsm import FSM
from direct.distributed import DistributedObject
@ -30,8 +30,8 @@ class DistributedBanquetTable(DistributedObject.DistributedObject, FSM.FSM, Banq
pitcherMinH = -360
pitcherMaxH = 360
rotateSpeed = 30
waterPowerSpeed = base.config.GetDouble('water-power-speed', 15)
waterPowerExponent = base.config.GetDouble('water-power-exponent', 0.75)
waterPowerSpeed = ConfigVariableDouble('water-power-speed', 15).getValue()
waterPowerExponent = ConfigVariableDouble('water-power-exponent', 0.75).getValue()
useNewAnimations = True
TugOfWarControls = False
OnlyUpArrow = True

View File

@ -18,7 +18,7 @@ class DistributedCountryClub(DistributedObject.DistributedObject):
notify = DirectNotifyGlobal.directNotify.newCategory('DistributedCountryClub')
ReadyPost = 'CountryClubReady'
WinEvent = 'CountryClubWinEvent'
doBlockRooms = base.config.GetBool('block-country-club-rooms', 1)
doBlockRooms = ConfigVariableBool('block-country-club-rooms', 1).getValue()
def __init__(self, cr):
DistributedObject.DistributedObject.__init__(self, cr)

View File

@ -1,5 +1,5 @@
import math
from panda3d.core import Point3, CollisionSphere, CollisionNode, CollisionHandlerEvent, TextNode, VBase4, NodePath, BitMask32
from panda3d.core import Point3, CollisionSphere, CollisionNode, CollisionHandlerEvent, TextNode, VBase4, NodePath, BitMask32, ConfigVariableDouble
from panda3d.direct import SmoothMover
from direct.fsm import FSM
from direct.distributed import DistributedObject
@ -22,8 +22,8 @@ class DistributedGolfSpot(DistributedObject.DistributedObject, FSM.FSM):
toonGolfOffsetPos = Point3(-2, 0, -GolfGlobals.GOLF_BALL_RADIUS)
toonGolfOffsetHpr = Point3(-90, 0, 0)
rotateSpeed = 20
golfPowerSpeed = base.config.GetDouble('golf-power-speed', 3)
golfPowerExponent = base.config.GetDouble('golf-power-exponent', 0.75)
golfPowerSpeed = ConfigVariableDouble('golf-power-speed', 3).getValue()
golfPowerExponent = ConfigVariableDouble('golf-power-exponent', 0.75).getValue()
def __init__(self, cr):
DistributedObject.DistributedObject.__init__(self, cr)

View File

@ -1,3 +1,4 @@
from panda3d.core import ConfigVariableBool
from otp.level import LevelMgr
from . import FactoryUtil
from direct.showbase.PythonUtil import Functor
@ -16,7 +17,7 @@ class FactoryLevelMgr(LevelMgr.LevelMgr):
def __init__(self, level, entId):
LevelMgr.LevelMgr.__init__(self, level, entId)
if base.config.GetBool('want-factory-lifter', 0):
if ConfigVariableBool('want-factory-lifter', 0).getValue():
self.toonLifter = FactoryUtil.ToonLifter('f3')
self.callSetters('farPlaneDistance')
self.geom.reparentTo(render)

View File

@ -1,3 +1,4 @@
from panda3d.core import ConfigVariableBool
from direct.directnotify import DirectNotifyGlobal
from direct.fsm import StateData
from . import CogHQLoader
@ -60,7 +61,7 @@ class LawbotCogHQLoader(CogHQLoader.CogHQLoader):
ug = self.geom.find('**/underground')
ug.setBin('ground', -10)
elif zoneId == ToontownGlobals.LawbotLobby:
if base.config.GetBool('want-qa-regression', 0):
if ConfigVariableBool('want-qa-regression', 0).getValue():
self.notify.info('QA-REGRESSION: COGHQ: Visit LawbotLobby')
self.notify.debug('cogHQLobbyModelPath = %s' % self.cogHQLobbyModelPath)
self.geom = loader.loadModel(self.cogHQLobbyModelPath)

View File

@ -14,7 +14,7 @@ class LevelSuitPlannerAI(DirectObject.DirectObject):
self.level = level
self.cogCtor = cogCtor
self.cogSpecs = cogSpecs
if simbase.config.GetBool('level-reserve-suits', 0):
if ConfigVariableBool('level-reserve-suits', 0).getValue():
self.reserveCogSpecs = reserveCogSpecs
else:
self.reserveCogSpecs = []

View File

@ -10,7 +10,7 @@ from . import FactoryExterior
from . import FactoryInterior
from . import SellbotHQExterior
from . import SellbotHQBossBattle
from panda3d.core import DecalEffect
from panda3d.core import ConfigVariableBool, DecalEffect
aspectSF = 0.7227
class SellbotCogHQLoader(CogHQLoader.CogHQLoader):
@ -119,7 +119,7 @@ class SellbotCogHQLoader(CogHQLoader.CogHQLoader):
sdText = DirectGui.OnscreenText(text=TTLocalizer.SellbotSideEntrance, font=ToontownGlobals.getSuitFont(), pos=(0, -0.34), scale=0.1, mayChange=False, parent=sdSign)
sdText.setDepthWrite(0)
elif zoneId == ToontownGlobals.SellbotLobby:
if base.config.GetBool('want-qa-regression', 0):
if ConfigVariableBool('want-qa-regression', 0).getValue():
self.notify.info('QA-REGRESSION: COGHQ: Visit SellbotLobby')
self.geom = loader.loadModel(self.cogHQLobbyModelPath)
front = self.geom.find('**/frontWall')

View File

@ -1,3 +1,4 @@
from panda3d.core import ConfigVariableBool
from direct.distributed.DistributedObjectGlobalUD import DistributedObjectGlobalUD
from direct.directnotify.DirectNotifyGlobal import directNotify
import random
@ -20,8 +21,8 @@ class NonRepeatableRandomSourceUD(DistributedObjectGlobalUD):
self._requests = []
self._fakeIt = 0
if __dev__:
NonRepeatableRandomSourceUD.RandomNumberCacheSize = config.GetInt('random-source-cache-size', 5000)
self._fakeIt = config.GetBool('fake-non-repeatable-random-source', self._fakeIt)
NonRepeatableRandomSourceUD.RandomNumberCacheSize = ConfigVariableInt('random-source-cache-size', 5000).getValue()
self._fakeIt = ConfigVariableBool('fake-non-repeatable-random-source', self._fakeIt).getValue()
def randomSample(self, nrrsDoId, random):
self._randoms = [random] + self._randoms

View File

@ -237,7 +237,7 @@ class PlayGame(StateData.StateData):
loaderName = requestStatus['loader']
avId = requestStatus.get('avId', -1)
ownerId = requestStatus.get('ownerId', avId)
if base.config.GetBool('want-qa-regression', 0):
if ConfigVariableBool('want-qa-regression', 0).getValue():
self.notify.info('QA-REGRESSION: NEIGHBORHOODS: Visit %s' % hoodName)
count = ToontownGlobals.hoodCountMap[canonicalHoodId]
if loaderName == 'safeZoneLoader':
@ -398,8 +398,8 @@ class PlayGame(StateData.StateData):
base.localAvatar.chatMgr.obscure(1, 1)
base.localAvatar.obscureFriendsListButton(1)
requestStatus['how'] = 'tutorial'
if base.config.GetString('language', 'english') == 'japanese':
musicVolume = base.config.GetFloat('tutorial-music-volume', 0.5)
if ConfigVariableString('language', 'english').getValue() == 'japanese':
musicVolume = ConfigVariableDouble('tutorial-music-volume', 0.5).getValue()
requestStatus['musicVolume'] = musicVolume
self.hood.enter(requestStatus)

View File

@ -1,3 +1,4 @@
from panda3d.core import ConfigVariableBool
from otp.ai.AIBaseGlobal import *
from direct.distributed import DistributedObjectAI
from direct.directnotify import DirectNotifyGlobal
@ -30,7 +31,7 @@ class DistributedFireworkShowAI(DistributedObjectAI.DistributedObjectAI):
self.timestamp = timestamp
self.sendUpdate("startShow",
(self.eventId, self.style, self.timestamp))
if simbase.air.config.GetBool('want-old-fireworks', 0):
if ConfigVariableBool('want-old-fireworks', 0).getValue():
duration = getShowDuration(self.eventId, self.style)
taskMgr.doMethodLater(duration, self.fireworkShowDone, self.taskName("waitForShowDone"))
else:

View File

@ -85,7 +85,7 @@ class FireworkEffect(NodePath):
if self.trailTypeId is None:
return self.trailEffectsIval
self.trailEffectsIval.append(Func(random.choice(self.trailSfx).play))
if base.config.GetInt('toontown-sfx-setting', 1) == 0:
if ConfigVariableInt('toontown-sfx-setting', 1).getValue() == 0:
if self.trailTypeId != FireworkTrailType.LongGlowSparkle:
self.trailTypeId = FireworkTrailType.Default
if self.trailTypeId == FireworkTrailType.Default:
@ -167,7 +167,7 @@ class FireworkEffect(NodePath):
trailEffect.setLifespan(3.5)
self.trailEffects.append(trailEffect)
self.trailEffectsIval.append(Func(trailEffect.startLoop))
if base.config.GetInt('toontown-sfx-setting', 1) >= 1:
if ConfigVariableInt('toontown-sfx-setting', 1).getValue() >= 1:
trailEffect = GlowTrail.getEffect()
if trailEffect:
trailEffect.reparentTo(self.effectsNode)
@ -199,7 +199,7 @@ class FireworkEffect(NodePath):
primaryBlast.fadeTime = 0.75
self.burstEffectsIval.append(primaryBlast.getTrack())
self.burstEffects.append(primaryBlast)
if base.config.GetInt('toontown-sfx-setting', 1) >= 1:
if ConfigVariableInt('toontown-sfx-setting', 1).getValue() >= 1:
secondaryBlast = BlastEffect()
secondaryBlast.reparentTo(self.effectsNode)
secondaryBlast.setScale(250 * self.scale)
@ -225,14 +225,14 @@ class FireworkEffect(NodePath):
explosion.startDelay = 0.0
self.burstEffectsIval.append(explosion.getTrack())
self.burstEffects.append(explosion)
if base.config.GetInt('toontown-sfx-setting', 1) >= 1:
if ConfigVariableInt('toontown-sfx-setting', 1).getValue() >= 1:
rays = RayBurst()
rays.reparentTo(self.effectsNode)
rays.setEffectScale(self.scale)
rays.setEffectColor(self.primaryColor)
self.burstEffectsIval.append(rays.getTrack())
self.burstEffects.append(rays)
if base.config.GetInt('toontown-sfx-setting', 1) >= 2:
if ConfigVariableInt('toontown-sfx-setting', 1).getValue() >= 2:
sparkles = FireworkSparkles.getEffect()
if sparkles:
sparkles.reparentTo(self.effectsNode)
@ -241,7 +241,7 @@ class FireworkEffect(NodePath):
sparkles.startDelay = 0.0
self.burstEffectsIval.append(sparkles.getTrack())
self.burstEffects.append(sparkles)
if base.config.GetInt('toontown-sfx-setting', 1) >= 1:
if ConfigVariableInt('toontown-sfx-setting', 1).getValue() >= 1:
explosion = PeonyEffect.getEffect()
if explosion:
explosion.reparentTo(self.effectsNode)
@ -259,7 +259,7 @@ class FireworkEffect(NodePath):
explosion.setEffectColor(self.primaryColor)
self.burstEffectsIval.append(explosion.getTrack())
self.burstEffects.append(explosion)
if base.config.GetInt('toontown-sfx-setting', 1) >= 1:
if ConfigVariableInt('toontown-sfx-setting', 1).getValue() >= 1:
rays = RayBurst()
rays.reparentTo(self.effectsNode)
rays.setEffectScale(self.scale * 0.75)
@ -274,7 +274,7 @@ class FireworkEffect(NodePath):
explosion.setEffectColor(self.primaryColor)
self.burstEffectsIval.append(explosion.getTrack())
self.burstEffects.append(explosion)
if base.config.GetInt('toontown-sfx-setting', 1) >= 1:
if ConfigVariableInt('toontown-sfx-setting', 1).getValue() >= 1:
rays = RayBurst()
rays.reparentTo(self.effectsNode)
rays.setEffectScale(self.scale)
@ -296,7 +296,7 @@ class FireworkEffect(NodePath):
explosion.setEffectColor(self.primaryColor)
self.burstEffectsIval.append(explosion.getTrack())
self.burstEffects.append(explosion)
if base.config.GetInt('toontown-sfx-setting', 1) >= 2:
if ConfigVariableInt('toontown-sfx-setting', 1).getValue() >= 2:
sparkles = FireworkSparkles.getEffect()
if sparkles:
sparkles.reparentTo(self.effectsNode)
@ -352,7 +352,7 @@ class FireworkEffect(NodePath):
explosion.setEffectColor(self.primaryColor)
self.burstEffectsIval.append(Sequence(Wait(0.1), explosion.getTrack()))
self.burstEffects.append(explosion)
if base.config.GetInt('toontown-sfx-setting', 1) >= 1:
if ConfigVariableInt('toontown-sfx-setting', 1).getValue() >= 1:
rays = RayBurst()
rays.reparentTo(self.effectsNode)
rays.setEffectScale(self.scale)
@ -376,14 +376,14 @@ class FireworkEffect(NodePath):
skullFlash.startDelay = 0.08
self.burstEffectsIval.append(skullFlash.getTrack())
self.burstEffects.append(skullFlash)
if base.config.GetInt('toontown-sfx-setting', 1) >= 1:
if ConfigVariableInt('toontown-sfx-setting', 1).getValue() >= 1:
rays = RayBurst()
rays.reparentTo(self.effectsNode)
rays.setEffectScale(self.scale)
rays.setEffectColor(self.primaryColor)
self.burstEffectsIval.append(rays.getTrack())
self.burstEffects.append(rays)
if base.config.GetInt('toontown-sfx-setting', 1) >= 2:
if ConfigVariableInt('toontown-sfx-setting', 1).getValue() >= 2:
sparkles = FireworkSparkles.getEffect()
if sparkles:
sparkles.reparentTo(self.effectsNode)
@ -399,7 +399,7 @@ class FireworkEffect(NodePath):
explosion.reparentTo(self.effectsNode)
explosion.setEffectScale(self.scale)
explosion.setEffectColor(self.primaryColor)
explosion.numTrails = 3 + base.config.GetInt('toontown-sfx-setting', 1)
explosion.numTrails = 3 + ConfigVariableInt('toontown-sfx-setting', 1).getValue()
self.burstEffectsIval.append(explosion.getTrack())
self.burstEffects.append(explosion)
elif self.burstTypeId == FireworkBurstType.IceCream:

View File

@ -1,3 +1,4 @@
from panda3d.core import ConfigVariableBool
from direct.directnotify import DirectNotifyGlobal
from direct.distributed.ClockDelta import *
from direct.interval.IntervalGlobal import *
@ -26,7 +27,7 @@ class FireworkShowMixin:
if self.currentShow:
self.currentShow.pause()
self.currentShow = None
if base.cr.config.GetBool('want-old-fireworks', 0):
if ConfigVariableBool('want-old-fireworks', 0).getValue():
ivalMgr.finishIntervalsMatching('shootFirework*')
else:
self.destroyFireworkShow()
@ -60,7 +61,7 @@ class FireworkShowMixin:
self.timestamp = timestamp
self.showMusic = None
self.eventId = eventId
if base.config.GetBool('want-old-fireworks', 0):
if ConfigVariableBool('want-old-fireworks', 0).getValue():
self.currentShow = self.getFireworkShowIval(eventId, style, t)
if self.currentShow:
self.currentShow.start(t)

View File

@ -75,10 +75,10 @@ class DistributedHouse(DistributedObject.DistributedObject):
self.notify.debug('load')
if not self.house_loaded:
if self.housePosInd == 1:
houseModelIndex = base.config.GetInt('want-custom-house', HouseGlobals.HOUSE_DEFAULT)
houseModelIndex = ConfigVariableInt('want-custom-house', HouseGlobals.HOUSE_DEFAULT).getValue()
else:
houseModelIndex = HouseGlobals.HOUSE_DEFAULT
houseModelIndex = base.config.GetInt('want-custom-house-all', houseModelIndex)
houseModelIndex = ConfigVariableInt('want-custom-house-all', houseModelIndex).getValue()
houseModel = self.cr.playGame.hood.loader.houseModels[houseModelIndex]
self.house = houseModel.copyTo(self.cr.playGame.hood.loader.houseNode[self.housePosInd])
self.house_loaded = 1

View File

@ -106,7 +106,7 @@ class Estate(Place.Place):
hoodId = requestStatus['hoodId']
zoneId = requestStatus['zoneId']
newsManager = base.cr.newsManager
if config.GetBool('want-estate-telemetry-limiter', 1):
if ConfigVariableBool('want-estate-telemetry-limiter', 1).getValue():
limiter = TLGatherAllAvs('Estate', RotationLimitToH)
else:
limiter = TLNull()
@ -355,7 +355,7 @@ class Estate(Place.Place):
self.notify.debug('continuing in __submergeToon')
if hasattr(self, 'loader') and self.loader:
base.playSfx(self.loader.submergeSound)
if base.config.GetBool('disable-flying-glitch') == 0:
if ConfigVariableBool('disable-flying-glitch').getValue() == 0:
self.fsm.request('walk')
self.walkStateData.fsm.request('swimming', [self.loader.swimSound])
pos = base.localAvatar.getPos(render)

View File

@ -1151,7 +1151,7 @@ class ObjectManager(NodePath, DirectObject):
return
def sendItemToAttic(self):
if base.config.GetBool('want-qa-regression', 0):
if ConfigVariableBool('want-qa-regression', 0).getValue():
self.notify.info('QA-REGRESSION: ESTATE: Send Item to Attic')
messenger.send('wakeup')
if self.selectedObject:
@ -1253,7 +1253,7 @@ class ObjectManager(NodePath, DirectObject):
return
def bringItemFromAttic(self, item, itemIndex):
if base.config.GetBool('want-qa-regression', 0):
if ConfigVariableBool('want-qa-regression', 0).getValue():
self.notify.info('QA-REGRESSION: ESTATE: Place Item in Room')
messenger.send('wakeup')
self.__enableItemButtons(0)
@ -1471,7 +1471,7 @@ class ObjectManager(NodePath, DirectObject):
return
def __handleVerifyDeleteOK(self):
if base.config.GetBool('want-qa-regression', 0):
if ConfigVariableBool('want-qa-regression', 0).getValue():
self.notify.info('QA-REGRESSION: ESTATE: Send Item to Trash')
deleteFunction = self.verifyItems[0]
deleteFunctionArgs = self.verifyItems[1:]
@ -1582,7 +1582,7 @@ class ObjectManager(NodePath, DirectObject):
self.verifyItems = (item, itemIndex)
def __handleVerifyReturnFromTrashOK(self):
if base.config.GetBool('want-qa-regression', 0):
if ConfigVariableBool('want-qa-regression', 0).getValue():
self.notify.info('QA-REGRESSION: ESTATE: Send Item to Attic')
item, itemIndex = self.verifyItems
self.__cleanupVerifyDelete()

View File

@ -1,3 +1,4 @@
from panda3d.core import ConfigVariableBool
from . import FishGlobals
from toontown.toonbase import TTLocalizer
from direct.directnotify import DirectNotifyGlobal
@ -56,7 +57,7 @@ class FishBase:
loop = None
delay = None
playRate = None
if base.config.GetBool('want-fish-audio', 1):
if ConfigVariableBool('want-fish-audio', 1).getValue():
soundDict = FishGlobals.FishAudioFileDict
fileInfo = soundDict.get(self.genus, None)
if fileInfo:

View File

@ -2,7 +2,6 @@ from panda3d.core import *
from direct.task.Task import Task
from toontown.toonbase.ToontownGlobals import *
from direct.gui.DirectGui import *
from panda3d.core import *
from direct.showbase import DirectObject
from direct.fsm import ClassicFSM, State
from direct.fsm import State
@ -45,7 +44,7 @@ class FriendInviter(DirectFrame):
notify = DirectNotifyGlobal.directNotify.newCategory('FriendInviter')
def __init__(self, avId, avName, avDisableName):
self.wantPlayerFriends = base.config.GetBool('want-player-friends', 0)
self.wantPlayerFriends = ConfigVariableBool('want-player-friends', 0).getValue()
DirectFrame.__init__(self, pos=(0.3, 0.1, 0.65), image_color=GlobalDialogColor, image_scale=(1.0, 1.0, 0.6), text='', text_wordwrap=TTLocalizer.FIdirectFrameWordwrap, text_scale=TTLocalizer.FIdirectFrame, text_pos=TTLocalizer.FIdirectFramePos)
self['image'] = DGG.getDefaultDialogGeom()
self.avId = avId
@ -455,7 +454,7 @@ class FriendInviter(DirectFrame):
pass
def __handleOk(self):
if base.config.GetBool('want-qa-regression', 0):
if ConfigVariableBool('want-qa-regression', 0).getValue():
self.notify.info('QA-REGRESSION: MAKEAFRIENDSHIP: Make a friendship')
unloadFriendInviter()
@ -466,7 +465,7 @@ class FriendInviter(DirectFrame):
unloadFriendInviter()
def __handleStop(self):
if base.config.GetBool('want-qa-regression', 0):
if ConfigVariableBool('want-qa-regression', 0).getValue():
self.notify.info('QA-REGRESSION: BREAKAFRIENDSHIP: Break a friendship')
self.fsm.request('endFriendship')

View File

@ -561,7 +561,7 @@ class DistributedGolfCourseAI(DistributedObjectAI.DistributedObjectAI, FSM):
def calcHolesToUse(self):
retval = []
if simbase.air.config.GetBool('golf-course-randomized', 1):
if ConfigVariableBool('golf-course-randomized', 1).getValue():
retval = self.calcHolesToUseRandomized(self.courseId)
self.notify.debug('randomized courses!')
for x in range(len(retval)):

View File

@ -1,7 +1,7 @@
import math
import random
import time
from panda3d.core import TextNode, BitMask32, Point3, Vec3, Vec4, deg2Rad, Mat3, NodePath, VBase4, CollisionTraverser, CollisionSegment, CollisionNode, CollisionHandlerQueue
from panda3d.core import TextNode, BitMask32, Point3, Vec3, Vec4, deg2Rad, Mat3, NodePath, VBase4, CollisionTraverser, CollisionSegment, CollisionNode, CollisionHandlerQueue, ConfigVariableBool, ConfigVariableDouble
from panda3d.ode import OdeRayGeom
from direct.distributed import DistributedObject
from direct.directnotify import DirectNotifyGlobal
@ -57,10 +57,10 @@ class DistributedGolfHole(DistributedPhysicsWorld.DistributedPhysicsWorld, FSM,
'Cleanup': ['Off']}
id = 0
notify = directNotify.newCategory('DistributedGolfHole')
unlimitedAimTime = base.config.GetBool('unlimited-aim-time', 0)
unlimitedTeeTime = base.config.GetBool('unlimited-tee-time', 0)
golfPowerSpeed = base.config.GetDouble('golf-power-speed', 3)
golfPowerExponent = base.config.GetDouble('golf-power-exponent', 0.75)
unlimitedAimTime = ConfigVariableBool('unlimited-aim-time', 0).getValue()
unlimitedTeeTime = ConfigVariableBool('unlimited-tee-time', 0).getValue()
golfPowerSpeed = ConfigVariableDouble('golf-power-speed', 3).getValue()
golfPowerExponent = ConfigVariableDouble('golf-power-exponent', 0.75).getValue()
DefaultCamP = -16
MaxCamP = -90
@ -289,7 +289,7 @@ class DistributedGolfHole(DistributedPhysicsWorld.DistributedPhysicsWorld, FSM,
curNodePath = self.hardSurfaceNodePath.find('**/locator%d' % locatorNum)
def loadBlockers(self):
loadAll = base.config.GetBool('golf-all-blockers', 0)
loadAll = ConfigVariableBool('golf-all-blockers', 0).getValue()
self.createLocatorDict()
self.blockerNums = self.holeInfo['blockers']
for locatorNum in self.locDict:

View File

@ -196,7 +196,7 @@ class DistributedGolfHoleAI(DistributedPhysicsWorldAI.DistributedPhysicsWorldAI,
curNodePath = self.hardSurfaceNodePath.find('**/locator%d' % locatorNum)
def loadBlockers(self):
loadAll = simbase.config.GetBool('golf-all-blockers', 0)
loadAll = ConfigVariableBool('golf-all-blockers', 0).getValue()
self.createLocatorDict()
self.blockerNums = self.holeInfo['blockers']
for locatorNum in self.locDict:
@ -240,7 +240,7 @@ class DistributedGolfHoleAI(DistributedPhysicsWorldAI.DistributedPhysicsWorldAI,
def choosePlayerToSimulate(self):
stillPlaying = self.golfCourse.getStillPlayingAvIds()
playerId = 0
if simbase.air.config.GetBool('golf-trust-driver-first', 0):
if ConfigVariableBool('golf-trust-driver-first', 0).getValue():
if stillPlaying:
playerId = stillPlaying[0]
else:

View File

@ -1,4 +1,4 @@
from panda3d.core import Point3
from panda3d.core import ConfigVariableBool, Point3
from direct.directnotify import DirectNotifyGlobal
from . import HoodDataAI
from toontown.toonbase import ToontownGlobals
@ -40,7 +40,7 @@ class BossbotHQDataAI(HoodDataAI.HoodDataAI):
self.lobbyElevator = DistributedBBElevatorAI.DistributedBBElevatorAI(self.air, self.lobbyMgr, ToontownGlobals.BossbotLobby, antiShuffle=1)
self.lobbyElevator.generateWithRequired(ToontownGlobals.BossbotLobby)
self.addDistObj(self.lobbyElevator)
if simbase.config.GetBool('want-boarding-groups', 1):
if ConfigVariableBool('want-boarding-groups', 1).getValue():
self.boardingParty = DistributedBoardingPartyAI.DistributedBoardingPartyAI(self.air, [self.lobbyElevator.doId], 8)
self.boardingParty.generateWithRequired(ToontownGlobals.BossbotLobby)
@ -59,7 +59,7 @@ class BossbotHQDataAI(HoodDataAI.HoodDataAI):
makeDoor(ToontownGlobals.BossbotLobby, 0, 0, FADoorCodes.BB_DISGUISE_INCOMPLETE)
kartIdList = self.createCogKarts()
if simbase.config.GetBool('want-boarding-groups', 1):
if ConfigVariableBool('want-boarding-groups', 1).getValue():
self.courseBoardingParty = DistributedBoardingPartyAI.DistributedBoardingPartyAI(self.air, kartIdList, 4)
self.courseBoardingParty.generateWithRequired(self.zoneId)

View File

@ -1,3 +1,4 @@
from panda3d.core import ConfigVariableBool
from direct.directnotify import DirectNotifyGlobal
from . import HoodDataAI
from toontown.toonbase import ToontownGlobals
@ -35,11 +36,11 @@ class CSHoodDataAI(HoodDataAI.HoodDataAI):
self.lobbyElevator = DistributedVPElevatorAI.DistributedVPElevatorAI(self.air, self.lobbyMgr, ToontownGlobals.SellbotLobby, antiShuffle=1)
self.lobbyElevator.generateWithRequired(ToontownGlobals.SellbotLobby)
self.addDistObj(self.lobbyElevator)
if simbase.config.GetBool('want-boarding-groups', 1):
if ConfigVariableBool('want-boarding-groups', 1).getValue():
self.boardingParty = DistributedBoardingPartyAI.DistributedBoardingPartyAI(self.air, [self.lobbyElevator.doId], 8)
self.boardingParty.generateWithRequired(ToontownGlobals.SellbotLobby)
factoryIdList = [self.testElev0.doId, self.testElev1.doId]
if simbase.config.GetBool('want-boarding-groups', 1):
if ConfigVariableBool('want-boarding-groups', 1).getValue():
self.factoryBoardingParty = DistributedBoardingPartyAI.DistributedBoardingPartyAI(self.air, factoryIdList, 4)
self.factoryBoardingParty.generateWithRequired(ToontownGlobals.SellbotFactoryExt)
destinationZone = ToontownGlobals.SellbotLobby

View File

@ -1,3 +1,4 @@
from panda3d.core import ConfigVariableBool
from direct.directnotify import DirectNotifyGlobal
from . import HoodDataAI
from toontown.toonbase import ToontownGlobals
@ -38,7 +39,7 @@ class CashbotHQDataAI(HoodDataAI.HoodDataAI):
self.lobbyElevator = DistributedCFOElevatorAI.DistributedCFOElevatorAI(self.air, self.lobbyMgr, ToontownGlobals.CashbotLobby, antiShuffle=1)
self.lobbyElevator.generateWithRequired(ToontownGlobals.CashbotLobby)
self.addDistObj(self.lobbyElevator)
if simbase.config.GetBool('want-boarding-groups', 1):
if ConfigVariableBool('want-boarding-groups', 1).getValue():
self.boardingParty = DistributedBoardingPartyAI.DistributedBoardingPartyAI(self.air, [self.lobbyElevator.doId], 8)
self.boardingParty.generateWithRequired(ToontownGlobals.CashbotLobby)
destinationZone = ToontownGlobals.CashbotLobby
@ -50,7 +51,7 @@ class CashbotHQDataAI(HoodDataAI.HoodDataAI):
intDoor0.zoneId = ToontownGlobals.CashbotLobby
mintIdList = [
self.testElev0.doId, self.testElev1.doId, self.testElev2.doId]
if simbase.config.GetBool('want-boarding-groups', 1):
if ConfigVariableBool('want-boarding-groups', 1).getValue():
self.mintBoardingParty = DistributedBoardingPartyAI.DistributedBoardingPartyAI(self.air, mintIdList, 4)
self.mintBoardingParty.generateWithRequired(self.zoneId)
for extDoor in extDoorList:

View File

@ -1,3 +1,4 @@
from panda3d.core import ConfigVariableBool
from toontown.hood import GenericAnimatedProp
class GenericAnimatedBuilding(GenericAnimatedProp.GenericAnimatedProp):
@ -6,5 +7,5 @@ class GenericAnimatedBuilding(GenericAnimatedProp.GenericAnimatedProp):
GenericAnimatedProp.GenericAnimatedProp.__init__(self, node)
def enter(self):
if base.config.GetBool('buildings-animate', False):
if ConfigVariableBool('buildings-animate', False).getValue():
GenericAnimatedProp.GenericAnimatedProp.enter(self)

View File

@ -1,3 +1,4 @@
from panda3d.core import ConfigVariableBool
from . import AnimatedProp
from direct.actor import Actor
from direct.interval.IntervalGlobal import *
@ -112,7 +113,7 @@ class GenericAnimatedProp(AnimatedProp.AnimatedProp):
if theSound:
soundDur = theSound.length()
if maximumDuration < soundDur:
if base.config.GetBool('interactive-prop-info', False):
if ConfigVariableBool('interactive-prop-info', False).getValue():
if self.visId == localAvatar.zoneId and origAnimName != 'tt_a_ara_dga_hydrant_idleIntoFight':
self.notify.warning('anim %s had duration of %s while sound has duration of %s' % (origAnimName, maximumDuration, soundDur))
soundDur = maximumDuration

View File

@ -1,3 +1,4 @@
from panda3d.core import ConfigVariableDouble
from direct.actor import Actor
from direct.directnotify import DirectNotifyGlobal
from direct.interval.IntervalGlobal import Sequence, Func
@ -176,7 +177,7 @@ class HydrantInteractiveProp(InteractiveAnimatedProp.InteractiveAnimatedProp):
ToontownGlobals.MinniesMelodyland: ('tt_a_ara_mml_hydrant_fightBoost', 'tt_a_ara_mml_hydrant_fightCheer', 'tt_a_ara_mml_hydrant_fightIdle'),
ToontownGlobals.TheBrrrgh: ('tt_a_ara_tbr_hydrant_fightBoost', 'tt_a_ara_tbr_hydrant_fightCheer', 'tt_a_ara_tbr_hydrant_fightIdle'),
ToontownGlobals.DonaldsDreamland: ('tt_a_ara_ddl_hydrant_fightBoost', 'tt_a_ara_ddl_hydrant_fightCheer', 'tt_a_ara_ddl_hydrant_fightIdle')}
IdlePauseTime = base.config.GetFloat('prop-idle-pause-time', 0.0)
IdlePauseTime = ConfigVariableDouble('prop-idle-pause-time', 0.0).getValue()
def __init__(self, node):
self.leftWater = None

View File

@ -1,10 +1,11 @@
from panda3d.core import ConfigVariableDouble
from toontown.hood import ZeroAnimatedProp
from toontown.toonbase import ToontownGlobals
from direct.directnotify import DirectNotifyGlobal
class HydrantOneAnimatedProp(ZeroAnimatedProp.ZeroAnimatedProp):
notify = DirectNotifyGlobal.directNotify.newCategory('HydrantOneAnimatedProp')
PauseTimeMult = base.config.GetFloat('zero-pause-mult', 1.0)
PauseTimeMult = ConfigVariableDouble('zero-pause-mult', 1.0).getValue()
PhaseInfo = {0: ('tt_a_ara_ttc_hydrant_firstMoveArmUp1', 40 * PauseTimeMult),
1: ('tt_a_ara_ttc_hydrant_firstMoveStruggle', 20 * PauseTimeMult),
2: ('tt_a_ara_ttc_hydrant_firstMoveArmUp2', 10 * PauseTimeMult),

View File

@ -1,10 +1,11 @@
from panda3d.core import ConfigVariableDouble
from toontown.hood import ZeroAnimatedProp
from toontown.toonbase import ToontownGlobals
from direct.directnotify import DirectNotifyGlobal
class HydrantTwoAnimatedProp(ZeroAnimatedProp.ZeroAnimatedProp):
notify = DirectNotifyGlobal.directNotify.newCategory('HydrantTwoAnimatedProp')
PauseTimeMult = base.config.GetFloat('zero-pause-mult', 1.0)
PauseTimeMult = ConfigVariableDouble('zero-pause-mult', 1.0).getValue()
PhaseInfo = {0: ('tt_a_ara_ttc_hydrant_firstMoveArmUp1', 40 * PauseTimeMult),
1: ('tt_a_ara_ttc_hydrant_firstMoveStruggle', 20 * PauseTimeMult),
2: ('tt_a_ara_ttc_hydrant_firstMoveArmUp2', 10 * PauseTimeMult),

View File

@ -1,10 +1,11 @@
from panda3d.core import ConfigVariableDouble
from toontown.hood import ZeroAnimatedProp
from toontown.toonbase import ToontownGlobals
from direct.directnotify import DirectNotifyGlobal
class HydrantZeroAnimatedProp(ZeroAnimatedProp.ZeroAnimatedProp):
notify = DirectNotifyGlobal.directNotify.newCategory('HydrantZeroAnimatedProp')
PauseTimeMult = base.config.GetFloat('zero-pause-mult', 1.0)
PauseTimeMult = ConfigVariableDouble('zero-pause-mult', 1.0).getValue()
PhaseInfo = {0: ('tt_a_ara_ttc_hydrant_firstMoveArmUp1', 40 * PauseTimeMult),
1: ('tt_a_ara_ttc_hydrant_firstMoveStruggle', 20 * PauseTimeMult),
2: ('tt_a_ara_ttc_hydrant_firstMoveArmUp2', 10 * PauseTimeMult),

View File

@ -5,7 +5,7 @@ from direct.actor import Actor
from direct.interval.IntervalGlobal import Sequence, ActorInterval, Wait, Func, SoundInterval, Parallel
from direct.fsm import FSM
from direct.showbase.PythonUtil import weightedChoice
from panda3d.core import TextNode, Vec3
from panda3d.core import ConfigVariableBool, ConfigVariableDouble, TextNode, Vec3
from toontown.toonbase import ToontownGlobals
from toontown.hood import ZoneUtil
@ -26,7 +26,7 @@ class InteractiveAnimatedProp(GenericAnimatedProp.GenericAnimatedProp, FSM.FSM):
ZoneToFightAnims = {}
ZoneToVictoryAnims = {}
ZoneToSadAnims = {}
IdlePauseTime = base.config.GetFloat('prop-idle-pause-time', 0.0)
IdlePauseTime = ConfigVariableDouble('prop-idle-pause-time', 0.0).getValue()
HpTextGenerator = TextNode('HpTextGenerator')
BattleCheerText = '+'
@ -200,13 +200,13 @@ class InteractiveAnimatedProp(GenericAnimatedProp.GenericAnimatedProp, FSM.FSM):
def enter(self):
GenericAnimatedProp.GenericAnimatedProp.enter(self)
if base.config.GetBool('props-buff-battles', True):
if ConfigVariableBool('props-buff-battles', True).getValue():
self.notify.debug('props buff battles is true')
if base.cr.newsManager.isHolidayRunning(self.holidayId):
self.notify.debug('holiday is running, doing idle interval')
self.node.stop()
self.node.pose('idle0', 0)
if base.config.GetBool('interactive-prop-random-idles', 1):
if ConfigVariableBool('interactive-prop-random-idles', 1).getValue():
self.requestIdleOrSad()
else:
self.idleInterval.loop()
@ -262,7 +262,7 @@ class InteractiveAnimatedProp(GenericAnimatedProp.GenericAnimatedProp, FSM.FSM):
def chooseIdleAnimToRun(self):
result = self.numIdles - 1
if base.config.GetBool('randomize-interactive-idles', True):
if ConfigVariableBool('randomize-interactive-idles', True).getValue():
pairs = []
for i in range(self.numIdles):
reversedChance = self.numIdles - i - 1
@ -482,16 +482,16 @@ class InteractiveAnimatedProp(GenericAnimatedProp.GenericAnimatedProp, FSM.FSM):
if self.hasSpecialIval(origAnimName):
specialIval = self.getSpecialIval(origAnimName)
idleAnimAndSound = Parallel(animIval, soundIval, specialIval)
if base.config.GetBool('interactive-prop-info', False):
if ConfigVariableBool('interactive-prop-info', False).getValue():
idleAnimAndSound.append(printFunc)
else:
idleAnimAndSound = Parallel(animIval, soundIval)
if base.config.GetBool('interactive-prop-info', False):
if ConfigVariableBool('interactive-prop-info', False).getValue():
idleAnimAndSound.append(printFunc)
return idleAnimAndSound
def printAnimIfClose(self, animKey):
if base.config.GetBool('interactive-prop-info', False):
if ConfigVariableBool('interactive-prop-info', False).getValue():
try:
animName = self.node.getAnimFilename(animKey)
baseAnimName = animName.split('/')[-1]

View File

@ -1,3 +1,4 @@
from panda3d.core import ConfigVariableBool
from direct.directnotify import DirectNotifyGlobal
from . import HoodDataAI
from toontown.toonbase import ToontownGlobals
@ -44,7 +45,7 @@ class LawbotHQDataAI(HoodDataAI.HoodDataAI):
self.lobbyElevator = DistributedCJElevatorAI.DistributedCJElevatorAI(self.air, self.lobbyMgr, ToontownGlobals.LawbotLobby, antiShuffle=1)
self.lobbyElevator.generateWithRequired(ToontownGlobals.LawbotLobby)
self.addDistObj(self.lobbyElevator)
if simbase.config.GetBool('want-boarding-groups', 1):
if ConfigVariableBool('want-boarding-groups', 1).getValue():
self.boardingParty = DistributedBoardingPartyAI.DistributedBoardingPartyAI(self.air, [self.lobbyElevator.doId], 8)
self.boardingParty.generateWithRequired(ToontownGlobals.LawbotLobby)
@ -65,6 +66,6 @@ class LawbotHQDataAI(HoodDataAI.HoodDataAI):
makeDoor(ToontownGlobals.LawbotOfficeExt, 0, 0)
officeIdList = [
officeId0, officeId1, officeId2, officeId3]
if simbase.config.GetBool('want-boarding-parties', 1):
if ConfigVariableBool('want-boarding-parties', 1).getValue():
self.officeBoardingParty = DistributedBoardingPartyAI.DistributedBoardingPartyAI(self.air, officeIdList, 4)
self.officeBoardingParty.generateWithRequired(ToontownGlobals.LawbotOfficeExt)

View File

@ -1,3 +1,4 @@
from panda3d.core import ConfigVariableDouble
from direct.actor import Actor
from direct.directnotify import DirectNotifyGlobal
from direct.interval.IntervalGlobal import Sequence, Func
@ -176,7 +177,7 @@ class MailboxInteractiveProp(InteractiveAnimatedProp.InteractiveAnimatedProp):
ToontownGlobals.MinniesMelodyland: ('tt_a_ara_mml_mailbox_fightBoost', 'tt_a_ara_mml_mailbox_fightCheer', 'tt_a_ara_mml_mailbox_fightIdle'),
ToontownGlobals.TheBrrrgh: ('tt_a_ara_tbr_mailbox_fightBoost', 'tt_a_ara_tbr_mailbox_fightCheer', 'tt_a_ara_tbr_mailbox_fightIdle'),
ToontownGlobals.DonaldsDreamland: ('tt_a_ara_ddl_mailbox_fightBoost', 'tt_a_ara_ddl_mailbox_fightCheer', 'tt_a_ara_ddl_mailbox_fightIdle')}
IdlePauseTime = base.config.GetFloat('prop-idle-pause-time', 0.0)
IdlePauseTime = ConfigVariableDouble('prop-idle-pause-time', 0.0).getValue()
def __init__(self, node):
InteractiveAnimatedProp.InteractiveAnimatedProp.__init__(self, node, ToontownGlobals.MAILBOXES_BUFF_BATTLES)

Some files were not shown because too many files have changed in this diff Show More