global: Clean up usage of base.config (using builtin config).
This commit is contained in:
parent
575dded46d
commit
431732ac5a
146 changed files with 408 additions and 408 deletions
|
@ -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', 0.25)
|
||||
self.maxAttempts = base.config.GetInt('time-manager-max-attempts', 5)
|
||||
self.extraSkew = base.config.GetInt('time-manager-extra-skew', 0)
|
||||
self.updateFreq = config.GetFloat('time-manager-freq', 1800)
|
||||
self.minWait = config.GetFloat('time-manager-min-wait', 10)
|
||||
self.maxUncertainty = config.GetFloat('time-manager-max-uncertainty', 0.25)
|
||||
self.maxAttempts = config.GetInt('time-manager-max-attempts', 5)
|
||||
self.extraSkew = config.GetInt('time-manager-extra-skew', 0)
|
||||
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 = config.GetDouble('report-frame-rate-interval', 300.0)
|
||||
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 config.GetBool('enable-garbage-hotkey', 0):
|
||||
self.accept(OTPGlobals.DetectGarbageHotkey, self.handleDetectGarbageHotkey)
|
||||
if self.updateFreq > 0:
|
||||
self.startTask()
|
||||
|
@ -210,7 +210,7 @@ class TimeManager(DistributedObject.DistributedObject):
|
|||
if frameRateInterval == 0:
|
||||
return
|
||||
if not base.frameRateMeter:
|
||||
maxFrameRateInterval = base.config.GetDouble('max-frame-rate-interval', 30.0)
|
||||
maxFrameRateInterval = config.GetDouble('max-frame-rate-interval', 30.0)
|
||||
globalClock.setAverageFrameRateInterval(min(frameRateInterval, maxFrameRateInterval))
|
||||
taskMgr.remove('frameRateMonitor')
|
||||
taskMgr.doMethodLater(frameRateInterval, self.frameRateMonitor, 'frameRateMonitor')
|
||||
|
|
|
@ -326,12 +326,12 @@ class Avatar(Actor, ShadowCaster):
|
|||
sfxIndex = 5
|
||||
else:
|
||||
notify.error('unrecognized dialogue type: ', type)
|
||||
|
||||
|
||||
# The standard cog phrase gets too repetitive when there are so many cogs running around.
|
||||
# Let's just choose a random one.
|
||||
if base.config.GetBool('want-doomsday', False) and self.playerType == NametagGroup.CCSuit:
|
||||
if config.GetBool('want-doomsday', False) and self.playerType == NametagGroup.CCSuit:
|
||||
sfxIndex = random.choice([1, 2, 2, 2, 2, 3, 3, 3]) #Duplicates are Intentional
|
||||
|
||||
|
||||
if sfxIndex != None and sfxIndex < len(dialogueArray) and dialogueArray[sfxIndex] != None:
|
||||
base.playSfx(dialogueArray[sfxIndex], node=self)
|
||||
return
|
||||
|
|
|
@ -15,7 +15,7 @@ from otp.otpbase import OTPGlobals
|
|||
from otp.avatar.Avatar import teleportNotify
|
||||
from otp.distributed.TelemetryLimited import TelemetryLimited
|
||||
from otp.ai.MagicWordGlobal import *
|
||||
if base.config.GetBool('want-chatfilter-hacks', 0):
|
||||
if config.GetBool('want-chatfilter-hacks', 0):
|
||||
from otp.switchboard import badwordpy
|
||||
import os
|
||||
badwordpy.init(os.environ.get('OTP') + '\\src\\switchboard\\', '')
|
||||
|
@ -45,7 +45,7 @@ class DistributedPlayer(DistributedAvatar.DistributedAvatar, PlayerBase.PlayerBa
|
|||
self.DISLid = 0
|
||||
self.adminAccess = 0
|
||||
self.autoRun = 0
|
||||
self.whiteListEnabled = base.config.GetBool('whitelist-chat-enabled', 1)
|
||||
self.whiteListEnabled = config.GetBool('whitelist-chat-enabled', 1)
|
||||
|
||||
return
|
||||
|
||||
|
@ -225,8 +225,8 @@ class DistributedPlayer(DistributedAvatar.DistributedAvatar, PlayerBase.PlayerBa
|
|||
if self.cr.wantMagicWords and len(chatString) > 0 and chatString[0] == '~':
|
||||
messenger.send('magicWord', [chatString])
|
||||
else:
|
||||
if base.config.GetBool('want-chatfilter-hacks', 0):
|
||||
if base.config.GetBool('want-chatfilter-drop-offending', 0):
|
||||
if config.GetBool('want-chatfilter-hacks', 0):
|
||||
if config.GetBool('want-chatfilter-drop-offending', 0):
|
||||
if badwordpy.test(chatString):
|
||||
return
|
||||
else:
|
||||
|
@ -356,7 +356,7 @@ class DistributedPlayer(DistributedAvatar.DistributedAvatar, PlayerBase.PlayerBa
|
|||
teleportNotify.debug('party is ending')
|
||||
self.d_teleportResponse(self.doId, 0, 0, 0, 0, sendToId=requesterId)
|
||||
return
|
||||
if self.__teleportAvailable and not self.ghostMode and base.config.GetBool('can-be-teleported-to', 1):
|
||||
if self.__teleportAvailable and not self.ghostMode and config.GetBool('can-be-teleported-to', 1):
|
||||
teleportNotify.debug('teleport initiation successful')
|
||||
self.setSystemMessage(requesterId, OTPLocalizer.WhisperComingToVisit % avatar.getName())
|
||||
messenger.send('teleportQuery', [avatar, self])
|
||||
|
|
|
@ -30,13 +30,13 @@ from toontown.toonbase import ToontownGlobals
|
|||
|
||||
class LocalAvatar(DistributedAvatar.DistributedAvatar, DistributedSmoothNode.DistributedSmoothNode):
|
||||
notify = DirectNotifyGlobal.directNotify.newCategory('LocalAvatar')
|
||||
wantDevCameraPositions = base.config.GetBool('want-dev-camera-positions', 0)
|
||||
wantMouse = base.config.GetBool('want-mouse', 0)
|
||||
sleepTimeout = base.config.GetInt('sleep-timeout', 120)
|
||||
swimTimeout = base.config.GetInt('afk-timeout', 600)
|
||||
__enableMarkerPlacement = base.config.GetBool('place-markers', 0)
|
||||
acceptingNewFriends = base.config.GetBool('accepting-new-friends', 1)
|
||||
acceptingNonFriendWhispers = base.config.GetBool('accepting-non-friend-whispers', 0)
|
||||
wantDevCameraPositions = config.GetBool('want-dev-camera-positions', 0)
|
||||
wantMouse = config.GetBool('want-mouse', 0)
|
||||
sleepTimeout = config.GetInt('sleep-timeout', 120)
|
||||
swimTimeout = config.GetInt('afk-timeout', 600)
|
||||
__enableMarkerPlacement = config.GetBool('place-markers', 0)
|
||||
acceptingNewFriends = config.GetBool('accepting-new-friends', 1)
|
||||
acceptingNonFriendWhispers = config.GetBool('accepting-non-friend-whispers', 0)
|
||||
|
||||
def __init__(self, cr, chatMgr, talkAssistant = None, passMessagesThrough = False):
|
||||
try:
|
||||
|
@ -1263,14 +1263,14 @@ def collisionsOn():
|
|||
if not base.localAvatar:
|
||||
return 'No localAvatar!'
|
||||
base.localAvatar.collisionsOn()
|
||||
|
||||
|
||||
@magicWord(category=CATEGORY_MOBILITY)
|
||||
def enableAFGravity():
|
||||
"""Turn on Estate April Fools gravity."""
|
||||
if not base.localAvatar:
|
||||
return 'No localAvatar!'
|
||||
base.localAvatar.controlManager.currentControls.setGravity(ToontownGlobals.GravityValue * 0.75)
|
||||
|
||||
|
||||
@magicWord(category=CATEGORY_MOBILITY, types=[int, bool])
|
||||
def setGravity(gravityValue, overrideWarning=False):
|
||||
"""Set your gravity value!"""
|
||||
|
@ -1279,21 +1279,21 @@ def setGravity(gravityValue, overrideWarning=False):
|
|||
if gravityValue < 1 and not overrideWarning:
|
||||
return 'A value lower than 1 may crash your client.'
|
||||
base.localAvatar.controlManager.currentControls.setGravity(gravityValue)
|
||||
|
||||
|
||||
@magicWord(category=CATEGORY_MOBILITY)
|
||||
def normalGravity():
|
||||
"""Turn off Estate April Fools gravity."""
|
||||
if not base.localAvatar:
|
||||
return 'No localAvatar!'
|
||||
base.localAvatar.controlManager.currentControls.setGravity(ToontownGlobals.GravityValue * 2.0)
|
||||
|
||||
|
||||
@magicWord(category=CATEGORY_DEBUG)
|
||||
def getPos():
|
||||
"""Get current position of your toon."""
|
||||
if not base.localAvatar:
|
||||
return 'No localAvatar!'
|
||||
return base.localAvatar.getPos()
|
||||
|
||||
|
||||
@magicWord(category=CATEGORY_DEBUG, types=[float, float, float])
|
||||
def setPos(toonX, toonY, toonZ):
|
||||
"""Set position of your toon."""
|
||||
|
|
|
@ -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 = config.GetBool('want-chat-history', wantHistory)
|
||||
self.history = ['']
|
||||
self.historySize = base.config.GetInt('chat-history-size', 10)
|
||||
self.historySize = config.GetInt('chat-history-size', 10)
|
||||
self.historyIndex = 0
|
||||
return
|
||||
|
||||
|
|
|
@ -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 = config.GetBool('want-chat-history', wantHistory)
|
||||
self.history = ['']
|
||||
self.historySize = base.config.GetInt('chat-history-size', 10)
|
||||
self.historySize = config.GetInt('chat-history-size', 10)
|
||||
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 config.GetBool('exec-chat', 0) and text[0] == '>':
|
||||
text = self.__execMessage(text[1:])
|
||||
base.localAvatar.setChatAbsolute(text, CFSpeech | CFTimeout)
|
||||
return
|
||||
|
|
|
@ -46,12 +46,12 @@ class ChatInputWhiteListFrame(FSM.FSM, DirectFrame):
|
|||
wantHistory = 0
|
||||
if __dev__:
|
||||
wantHistory = 1
|
||||
self.wantHistory = base.config.GetBool('want-chat-history', wantHistory)
|
||||
self.wantHistory = config.GetBool('want-chat-history', wantHistory)
|
||||
self.history = ['']
|
||||
self.historySize = base.config.GetInt('chat-history-size', 10)
|
||||
self.historySize = config.GetInt('chat-history-size', 10)
|
||||
self.historyIndex = 0
|
||||
self.promoteWhiteList = 0
|
||||
self.checkBeforeSend = base.config.GetBool('white-list-check-before-send', 0)
|
||||
self.checkBeforeSend = config.GetBool('white-list-check-before-send', 0)
|
||||
self.whiteList = None
|
||||
self.active = 0
|
||||
self.autoOff = 0
|
||||
|
@ -193,7 +193,7 @@ class ChatInputWhiteListFrame(FSM.FSM, DirectFrame):
|
|||
|
||||
if text:
|
||||
self.chatEntry.set('')
|
||||
if base.config.GetBool('exec-chat', 0) and text[0] == '>':
|
||||
if config.GetBool('exec-chat', 0) and text[0] == '>':
|
||||
text = self.__execMessage(text[1:])
|
||||
base.localAvatar.setChatAbsolute(text, CFSpeech | CFTimeout)
|
||||
return
|
||||
|
|
|
@ -39,7 +39,7 @@ def removeThoughtPrefix(message):
|
|||
|
||||
class ChatManager(DirectObject.DirectObject):
|
||||
notify = DirectNotifyGlobal.directNotify.newCategory('ChatManager')
|
||||
execChat = base.config.GetBool('exec-chat', 0)
|
||||
execChat = config.GetBool('exec-chat', 0)
|
||||
|
||||
def __init__(self, cr, localAvatar):
|
||||
self.cr = cr
|
||||
|
@ -280,7 +280,7 @@ class ChatManager(DirectObject.DirectObject):
|
|||
if hasManager:
|
||||
if base.cr.playerFriendsManager.askAvatarOnline(avatarId):
|
||||
online = 1
|
||||
|
||||
|
||||
avatarUnderstandable = base.cr.config.GetBool('force-avatar-understandable', False)
|
||||
playerUnderstandable = base.cr.config.GetBool('force-player-understandable', False)
|
||||
av = None
|
||||
|
|
|
@ -17,7 +17,7 @@ ThoughtPrefix = '.'
|
|||
class TalkAssistant(DirectObject.DirectObject):
|
||||
ExecNamespace = None
|
||||
notify = DirectNotifyGlobal.directNotify.newCategory('TalkAssistant')
|
||||
execChat = base.config.GetBool('exec-chat', 0)
|
||||
execChat = config.GetBool('exec-chat', 0)
|
||||
|
||||
def __init__(self):
|
||||
self.logWhispers = 1
|
||||
|
@ -26,7 +26,7 @@ class TalkAssistant(DirectObject.DirectObject):
|
|||
self.zeroTimeDay = time.time()
|
||||
self.zeroTimeGame = globalClock.getRealTime()
|
||||
self.floodThreshold = 10.0
|
||||
self.useWhiteListFilter = base.config.GetBool('white-list-filter-openchat', 0)
|
||||
self.useWhiteListFilter = config.GetBool('white-list-filter-openchat', 0)
|
||||
self.lastWhisperDoId = None
|
||||
self.lastWhisperPlayerId = None
|
||||
self.lastWhisper = None
|
||||
|
|
|
@ -195,19 +195,19 @@ class OTPClientRepository(ClientRepositoryBase):
|
|||
self.loginInterface = LoginTTRAccount.LoginTTRAccount(self)
|
||||
|
||||
|
||||
self.secretChatAllowed = base.config.GetBool('allow-secret-chat', 0)
|
||||
self.openChatAllowed = base.config.GetBool('allow-open-chat', 0)
|
||||
self.secretChatAllowed = config.GetBool('allow-secret-chat', 0)
|
||||
self.openChatAllowed = config.GetBool('allow-open-chat', 0)
|
||||
|
||||
|
||||
self.secretChatNeedsParentPassword = base.config.GetBool('secret-chat-needs-parent-password', 0)
|
||||
self.secretChatNeedsParentPassword = config.GetBool('secret-chat-needs-parent-password', 0)
|
||||
|
||||
|
||||
|
||||
|
||||
self.parentPasswordSet = base.config.GetBool('parent-password-set', 0)
|
||||
self.parentPasswordSet = config.GetBool('parent-password-set', 0)
|
||||
|
||||
|
||||
self.userSignature = base.config.GetString('signature', 'none')
|
||||
self.userSignature = config.GetString('signature', 'none')
|
||||
|
||||
|
||||
|
||||
|
@ -439,7 +439,7 @@ class OTPClientRepository(ClientRepositoryBase):
|
|||
self.shardListHandle = None
|
||||
self.uberZoneInterest = None
|
||||
self.wantSwitchboard = config.GetBool('want-switchboard', 0)
|
||||
self.wantSwitchboardHacks = base.config.GetBool('want-switchboard-hacks', 0)
|
||||
self.wantSwitchboardHacks = config.GetBool('want-switchboard-hacks', 0)
|
||||
|
||||
self.__pendingGenerates = {}
|
||||
self.__pendingMessages = {}
|
||||
|
@ -494,7 +494,7 @@ class OTPClientRepository(ClientRepositoryBase):
|
|||
if self.checkHttp():
|
||||
for server in self.serverList:
|
||||
self.http.addPreapprovedServerCertificateFilename(server, Filename('/phase_3/etc/TTRCA.crt'))
|
||||
if base.config.GetBool('want-dev-certificate-trust', 0):
|
||||
if config.GetBool('want-dev-certificate-trust', 0):
|
||||
self.http.addPreapprovedServerCertificateFilename(server, Filename('/phase_3/etc/TTRDev.crt'))
|
||||
|
||||
self.connect(self.serverList, successCallback=self._sendHello, failureCallback=self.failedToConnect)
|
||||
|
@ -733,7 +733,7 @@ class OTPClientRepository(ClientRepositoryBase):
|
|||
@report(types=['args', 'deltaStamp'], dConfigParam='teleport')
|
||||
def waitForGetGameListResponse(self):
|
||||
if self.isGameListCorrect():
|
||||
if base.config.GetBool('game-server-tests', 0):
|
||||
if config.GetBool('game-server-tests', 0):
|
||||
from otp.distributed import GameServerTestSuite
|
||||
GameServerTestSuite.GameServerTestSuite(self)
|
||||
self.loginFSM.request('waitForShardList')
|
||||
|
@ -1080,7 +1080,7 @@ class OTPClientRepository(ClientRepositoryBase):
|
|||
else:
|
||||
logFunc = self.notify.warning
|
||||
allowExit = False
|
||||
if base.config.GetBool('direct-gui-edit', 0):
|
||||
if config.GetBool('direct-gui-edit', 0):
|
||||
logFunc('There are leaks: %s tasks, %s events, %s ivals, %s garbage cycles\nLeaked Events may be due to direct gui editing' % (leakedTasks,
|
||||
leakedEvents,
|
||||
leakedIvals,
|
||||
|
@ -1487,7 +1487,7 @@ class OTPClientRepository(ClientRepositoryBase):
|
|||
avId = self.handlerArgs['avId']
|
||||
if not self.SupportTutorial or base.localAvatar.tutorialAck:
|
||||
self.gameFSM.request('playGame', [hoodId, zoneId, avId])
|
||||
elif base.config.GetBool('force-tutorial', 1):
|
||||
elif config.GetBool('force-tutorial', 1):
|
||||
if hasattr(self, 'skipTutorialRequest') and self.skipTutorialRequest:
|
||||
self.gameFSM.request('skipTutorialRequest', [hoodId, zoneId, avId])
|
||||
else:
|
||||
|
@ -1535,9 +1535,9 @@ class OTPClientRepository(ClientRepositoryBase):
|
|||
def isFreeTimeExpired(self):
|
||||
if self.accountOldAuth:
|
||||
return 0
|
||||
if base.config.GetBool('free-time-expired', 0):
|
||||
if config.GetBool('free-time-expired', 0):
|
||||
return 1
|
||||
if base.config.GetBool('unlimited-free-time', 0):
|
||||
if config.GetBool('unlimited-free-time', 0):
|
||||
return 0
|
||||
if self.freeTimeExpiresAt == -1:
|
||||
return 0
|
||||
|
@ -1563,7 +1563,7 @@ class OTPClientRepository(ClientRepositoryBase):
|
|||
return self.blue != None
|
||||
|
||||
def isPaid(self):
|
||||
paidStatus = base.config.GetString('force-paid-status', '')
|
||||
paidStatus = config.GetString('force-paid-status', '')
|
||||
if not paidStatus:
|
||||
return self.__isPaid
|
||||
elif paidStatus == 'paid':
|
||||
|
@ -1581,7 +1581,7 @@ class OTPClientRepository(ClientRepositoryBase):
|
|||
self.__isPaid = isPaid
|
||||
|
||||
def allowFreeNames(self):
|
||||
return base.config.GetInt('allow-free-names', 1)
|
||||
return config.GetInt('allow-free-names', 1)
|
||||
|
||||
def allowSecretChat(self):
|
||||
return self.secretChatAllowed or self.productName == 'Terra-DMC' and self.isBlue() and self.secretChatAllowed
|
||||
|
|
|
@ -53,7 +53,7 @@ class GuildManager(DistributedObjectGlobal):
|
|||
self.id2Rank = {}
|
||||
self.id2Online = {}
|
||||
self.pendingMsgs = []
|
||||
self.whiteListEnabled = base.config.GetBool('whitelist-chat-enabled', 1)
|
||||
self.whiteListEnabled = config.GetBool('whitelist-chat-enabled', 1)
|
||||
self.emailNotification = 0
|
||||
self.emailNotificationAddress = None
|
||||
self.receivingNewList = False
|
||||
|
|
|
@ -37,7 +37,7 @@ class DummyLauncherBase:
|
|||
return
|
||||
|
||||
def isTestServer(self):
|
||||
return base.config.GetBool('is-test-server', 0)
|
||||
return config.GetBool('is-test-server', 0)
|
||||
|
||||
def setPhaseCompleteArray(self, newPhaseComplete):
|
||||
self.phaseComplete = newPhaseComplete
|
||||
|
@ -72,7 +72,7 @@ class DummyLauncherBase:
|
|||
return self.ServerVersion
|
||||
|
||||
def getIsNewInstallation(self):
|
||||
return base.config.GetBool('new-installation', 0)
|
||||
return config.GetBool('new-installation', 0)
|
||||
|
||||
def setIsNotNewInstallation(self):
|
||||
pass
|
||||
|
|
|
@ -1578,7 +1578,7 @@ class LauncherBase(DirectObject):
|
|||
|
||||
def getIsNewInstallation(self):
|
||||
result = self.getValue(self.NewInstallationKey, 1)
|
||||
result = base.config.GetBool('new-installation', result)
|
||||
result = config.GetBool('new-installation', result)
|
||||
return result
|
||||
|
||||
def setIsNotNewInstallation(self):
|
||||
|
@ -1855,7 +1855,7 @@ class LauncherBase(DirectObject):
|
|||
self.notify.info("Third party programs installed:")
|
||||
for hack in hacksInstalled.keys():
|
||||
self.notify.info(hack)
|
||||
|
||||
|
||||
if len(hacksRunning) > 0:
|
||||
self.notify.info("Third party programs running:")
|
||||
for hack in hacksRunning.keys():
|
||||
|
|
|
@ -24,11 +24,11 @@ class AccountServerConstants(RemoteValueSet):
|
|||
'pricePerMonth': '9.95'}
|
||||
noquery = 1
|
||||
if cr.productName == 'DisneyOnline-US':
|
||||
if base.config.GetBool('tt-specific-login', 0):
|
||||
if config.GetBool('tt-specific-login', 0):
|
||||
pass
|
||||
else:
|
||||
noquery = 0
|
||||
if cr.accountOldAuth or base.config.GetBool('default-server-constants', noquery):
|
||||
if cr.accountOldAuth or config.GetBool('default-server-constants', noquery):
|
||||
self.notify.debug('setting defaults, not using account server constants')
|
||||
self.dict = {}
|
||||
for constantName in self.expectedConstants:
|
||||
|
|
|
@ -9,7 +9,7 @@ import copy
|
|||
accountServer = ''
|
||||
accountServer = launcher.getAccountServer()
|
||||
print 'TTAccount: accountServer from launcher: ', accountServer
|
||||
configAccountServer = base.config.GetString('account-server', '')
|
||||
configAccountServer = config.GetString('account-server', '')
|
||||
if configAccountServer:
|
||||
accountServer = configAccountServer
|
||||
print 'TTAccount: overriding accountServer from config: ', accountServer
|
||||
|
|
|
@ -12,7 +12,7 @@ class MarginCell(NodePath):
|
|||
self.debugSquare = None
|
||||
self.debugMode = False
|
||||
|
||||
self.setDebug(base.config.GetBool('want-cell-debug', False))
|
||||
self.setDebug(config.GetBool('want-cell-debug', False))
|
||||
|
||||
def setAvailable(self, available):
|
||||
if not available and self.hasContent():
|
||||
|
|
|
@ -45,7 +45,7 @@ class OTPBase(ShowBase):
|
|||
return
|
||||
|
||||
def setTaskChainNetThreaded(self):
|
||||
if base.config.GetBool('want-threaded-network', 0):
|
||||
if config.GetBool('want-threaded-network', 0):
|
||||
taskMgr.setupTaskChain('net', numThreads=1, frameBudget=0.001, threadPriority=TPLow)
|
||||
|
||||
def setTaskChainNetNonthreaded(self):
|
||||
|
|
|
@ -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 = config.GetInt('num-gm-categories', 0)
|
||||
for i in range(0, numGMCategories):
|
||||
categoryName = base.config.GetString('gm-category-%d' % i, '')
|
||||
categoryName = config.GetString('gm-category-%d' % i, '')
|
||||
if categoryName == '':
|
||||
continue
|
||||
categoryStructure = [categoryName]
|
||||
numCategoryPhrases = base.config.GetInt('gm-category-%d-phrases' % i, 0)
|
||||
numCategoryPhrases = config.GetInt('gm-category-%d-phrases' % i, 0)
|
||||
for j in range(0, numCategoryPhrases):
|
||||
phrase = base.config.GetString('gm-category-%d-phrase-%d' % (i, j), '')
|
||||
phrase = config.GetString('gm-category-%d-phrase-%d' % (i, j), '')
|
||||
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 = config.GetInt('num-gm-phrases', 0)
|
||||
for i in range(0, numGMPhrases):
|
||||
phrase = base.config.GetString('gm-phrase-%d' % i, '')
|
||||
phrase = config.GetString('gm-phrase-%d' % i, '')
|
||||
if phrase != '':
|
||||
idx = 'gm%d' % phraseCount
|
||||
SpeedChatGMHandler.scList[idx] = phrase
|
||||
|
|
|
@ -20,7 +20,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 config.GetBool('want-crashedLeaderBoard-Smoke', 1):
|
||||
self.startSmokeEffect()
|
||||
|
||||
def startSmokeEffect(self):
|
||||
|
@ -32,7 +32,7 @@ class CrashedLeaderBoardDecorator(HolidayDecorator.HolidayDecorator):
|
|||
base.cr.playGame.getPlace().loader.stopSmokeEffect()
|
||||
|
||||
def undecorate(self):
|
||||
if base.config.GetBool('want-crashedLeaderBoard-Smoke', 1):
|
||||
if config.GetBool('want-crashedLeaderBoard-Smoke', 1):
|
||||
self.stopSmokeEffect()
|
||||
holidayIds = base.cr.newsManager.getDecorationHolidayId()
|
||||
if len(holidayIds) > 0:
|
||||
|
|
|
@ -34,7 +34,7 @@ class NewsManager(DistributedObject.DistributedObject):
|
|||
self.population = 0
|
||||
self.invading = 0
|
||||
|
||||
forcedHolidayDecorations = base.config.GetString('force-holiday-decorations', '')
|
||||
forcedHolidayDecorations = config.GetString('force-holiday-decorations', '')
|
||||
self.decorationHolidayIds = []
|
||||
|
||||
if forcedHolidayDecorations != '':
|
||||
|
|
|
@ -33,7 +33,7 @@ class BattlePlace(Place.Place):
|
|||
pass
|
||||
|
||||
def enterBattle(self, event):
|
||||
if base.config.GetBool('want-qa-regression', 0):
|
||||
if config.GetBool('want-qa-regression', 0):
|
||||
self.notify.info('QA-REGRESSION: COGBATTLE: Enter Battle')
|
||||
self.loader.music.stop()
|
||||
base.playMusic(self.loader.battleMusic, looping=1, volume=0.9)
|
||||
|
|
|
@ -238,7 +238,7 @@ class PropPool:
|
|||
self.propCache = []
|
||||
self.propStrings = {}
|
||||
self.propTypes = {}
|
||||
self.maxPoolSize = base.config.GetInt('prop-pool-size', 8)
|
||||
self.maxPoolSize = config.GetInt('prop-pool-size', 8)
|
||||
for p in Props:
|
||||
phase = p[0]
|
||||
propName = p[1]
|
||||
|
|
|
@ -11,7 +11,7 @@ class BattleSounds:
|
|||
self.isValid = 0
|
||||
if self.mgr != None and self.mgr.isValid():
|
||||
self.isValid = 1
|
||||
limit = base.config.GetInt('battle-sound-cache-size', 15)
|
||||
limit = config.GetInt('battle-sound-cache-size', 15)
|
||||
self.mgr.setCacheLimit(limit)
|
||||
base.addSfxManager(self.mgr)
|
||||
self.setupSearchPath()
|
||||
|
|
|
@ -34,7 +34,7 @@ from otp.nametag.NametagConstants import *
|
|||
from otp.nametag import NametagGlobals
|
||||
camPos = Point3(14, 0, 10)
|
||||
camHpr = Vec3(89, -30, 0)
|
||||
randomBattleTimestamp = base.config.GetBool('random-battle-timestamp', 0)
|
||||
randomBattleTimestamp = config.GetBool('random-battle-timestamp', 0)
|
||||
|
||||
class Movie(DirectObject.DirectObject):
|
||||
notify = DirectNotifyGlobal.directNotify.newCategory('Movie')
|
||||
|
@ -351,11 +351,11 @@ class Movie(DirectObject.DirectObject):
|
|||
|
||||
self.tutorialTom = NPCToons.createLocalNPC(20000)
|
||||
self.tutorialTom.uniqueName = uniqueName
|
||||
if base.config.GetString('language', 'english') == 'japanese':
|
||||
if config.GetString('language', 'english') == 'japanese':
|
||||
self.tomDialogue03 = base.loadSfx('phase_3.5/audio/dial/CC_tom_movie_tutorial_reward01.ogg')
|
||||
self.tomDialogue04 = base.loadSfx('phase_3.5/audio/dial/CC_tom_movie_tutorial_reward02.ogg')
|
||||
self.tomDialogue05 = base.loadSfx('phase_3.5/audio/dial/CC_tom_movie_tutorial_reward03.ogg')
|
||||
self.musicVolume = base.config.GetFloat('tutorial-music-volume', 0.5)
|
||||
self.musicVolume = config.GetFloat('tutorial-music-volume', 0.5)
|
||||
else:
|
||||
self.tomDialogue03 = None
|
||||
self.tomDialogue04 = None
|
||||
|
@ -399,7 +399,7 @@ class Movie(DirectObject.DirectObject):
|
|||
return
|
||||
|
||||
def __doToonAttacks(self):
|
||||
if base.config.GetBool('want-toon-attack-anims', 1):
|
||||
if config.GetBool('want-toon-attack-anims', 1):
|
||||
track = Sequence(name='toon-attacks')
|
||||
camTrack = Sequence(name='toon-attacks-cam')
|
||||
ival, camIval = MovieFire.doFires(self.__findToonAttack(FIRE))
|
||||
|
@ -878,7 +878,7 @@ class Movie(DirectObject.DirectObject):
|
|||
return
|
||||
|
||||
def __doSuitAttacks(self):
|
||||
if base.config.GetBool('want-suit-anims', 1):
|
||||
if config.GetBool('want-suit-anims', 1):
|
||||
track = Sequence(name='suit-attacks')
|
||||
camTrack = Sequence(name='suit-attacks-cam')
|
||||
isLocalToonSad = False
|
||||
|
|
|
@ -352,7 +352,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 config.GetBool('want-new-cogs', 0):
|
||||
nameTag = suit.find('**/def_nameTag')
|
||||
else:
|
||||
nameTag = suit.find('**/joint_nameTag')
|
||||
|
|
|
@ -26,7 +26,7 @@ WaterSprayColor = Point4(0.75, 0.75, 1.0, 0.8)
|
|||
def doSquirts(squirts):
|
||||
if len(squirts) == 0:
|
||||
return (None, None)
|
||||
|
||||
|
||||
suitSquirtsDict = {}
|
||||
doneUber = 0
|
||||
skip = 0
|
||||
|
@ -50,7 +50,7 @@ def doSquirts(squirts):
|
|||
suitSquirtsDict[suitId] = [squirt]
|
||||
|
||||
suitSquirts = suitSquirtsDict.values()
|
||||
|
||||
|
||||
def compFunc(a, b):
|
||||
if len(a) > len(b):
|
||||
return 1
|
||||
|
@ -281,12 +281,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 config.GetBool('want-new-anims', 1):
|
||||
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 config.GetBool('want-new-anims', 1):
|
||||
if not toonlod1.find('**/def_joint_attachFlower').isEmpty():
|
||||
flower_joint1 = toonlod1.find('**/def_joint_attachFlower')
|
||||
else:
|
||||
|
@ -350,7 +350,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 config.GetBool('want-new-anims', 1):
|
||||
if not lod0.find('**/def_head').isEmpty():
|
||||
joint = lod0.find('**/def_head')
|
||||
else:
|
||||
|
|
|
@ -50,13 +50,13 @@ class ToonVictorySkipper(DirectObject):
|
|||
self._ivals = ivals
|
||||
|
||||
def _setupSkipListen(self, index):
|
||||
if (not self._noSkip) and base.config.GetBool('want-skip-button', 0):
|
||||
if (not self._noSkip) and config.GetBool('want-skip-button', 0):
|
||||
func = Functor(self._skipToon, index)
|
||||
self.accept('escape', func)
|
||||
self.accept(RewardPanel.SkipBattleMovieEvent, func)
|
||||
|
||||
def _teardownSkipListen(self, index):
|
||||
if (not self._noSkip) and base.config.GetBool('want-skip-button', 0):
|
||||
if (not self._noSkip) and config.GetBool('want-skip-button', 0):
|
||||
self.ignore('escape')
|
||||
self.ignore(RewardPanel.SkipBattleMovieEvent)
|
||||
|
||||
|
|
|
@ -92,7 +92,7 @@ class RewardPanel(DirectFrame):
|
|||
1), text='0/0', text_scale=0.18, text_fg=(0, 0, 0, 1), text_align=TextNode.ACenter, text_pos=(0, -0.05), pos=(0.4, 0, -0.09 * i)))
|
||||
|
||||
self._battleGui = loader.loadModel('phase_3.5/models/gui/battle_gui')
|
||||
if base.config.GetBool('want-skip-button', 0):
|
||||
if config.GetBool('want-skip-button', 0):
|
||||
self.skipButton = DirectButton(parent=self, relief=None, image=(self._battleGui.find('**/tt_t_gui_gen_skipSectionUp'),
|
||||
self._battleGui.find('**/tt_t_gui_gen_skipSectionDown'),
|
||||
self._battleGui.find('**/tt_t_gui_gen_skipSectionRollOver'),
|
||||
|
@ -197,7 +197,7 @@ class RewardPanel(DirectFrame):
|
|||
self.missedItemFrame.hide()
|
||||
trackBarOffset = 0
|
||||
|
||||
if base.config.GetBool('want-skip-button', 0):
|
||||
if config.GetBool('want-skip-button', 0):
|
||||
self.skipButton['state'] = choice(noSkip, DGG.DISABLED, DGG.NORMAL)
|
||||
|
||||
for i in range(len(SuitDNA.suitDepts)):
|
||||
|
@ -652,7 +652,7 @@ class RewardPanel(DirectFrame):
|
|||
else:
|
||||
num = quest.doesCogCount(avId, cogDict, zoneId, toonShortList)
|
||||
if num:
|
||||
if base.config.GetBool('battle-passing-no-credit', True):
|
||||
if config.GetBool('battle-passing-no-credit', True):
|
||||
if avId in helpfulToonsList:
|
||||
earned += num
|
||||
else:
|
||||
|
|
|
@ -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 config.GetBool('want-singing', 0):
|
||||
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 config.GetBool('reject-boarding-group-invites', 0):
|
||||
self.groupInviteePanel.forceCleanup()
|
||||
self.groupInviteePanel = None
|
||||
return
|
||||
|
|
|
@ -349,7 +349,7 @@ class DistributedBuilding(DistributedObject.DistributedObject):
|
|||
return
|
||||
|
||||
def loadAnimToSuitSfx(self):
|
||||
if base.config.GetBool('want-qa-regression', 0):
|
||||
if config.GetBool('want-qa-regression', 0):
|
||||
self.notify.info('QA-REGRESSION: COGBUILDING: Cog Take Over')
|
||||
if self.cogDropSound == None:
|
||||
self.cogDropSound = base.loadSfx(self.TAKEOVER_SFX_PREFIX + 'cogbldg_drop.ogg')
|
||||
|
@ -359,7 +359,7 @@ class DistributedBuilding(DistributedObject.DistributedObject):
|
|||
return
|
||||
|
||||
def loadAnimToToonSfx(self):
|
||||
if base.config.GetBool('want-qa-regression', 0):
|
||||
if config.GetBool('want-qa-regression', 0):
|
||||
self.notify.info('QA-REGRESSION: COGBUILDING: Toon Take Over')
|
||||
if self.cogWeakenSound == None:
|
||||
self.cogWeakenSound = base.loadSfx(self.TAKEOVER_SFX_PREFIX + 'cogbldg_weaken.ogg')
|
||||
|
|
|
@ -161,7 +161,7 @@ class DistributedDoor(DistributedObject.DistributedObject, DelayDeletable):
|
|||
TRIGGER_SHIFT_Y = 0.25
|
||||
TRIGGER_SHIFT_Z = 1.00
|
||||
if "_gag_shop_" in building.getName():
|
||||
# Some dipshit put the triggers on backwards for the
|
||||
# Some dipshit put the triggers on backwards for the
|
||||
# gag shop compared to every other building.
|
||||
doorTrigger.setY(doorTrigger.getY() + TRIGGER_SHIFT_Y)
|
||||
else:
|
||||
|
@ -299,7 +299,7 @@ class DistributedDoor(DistributedObject.DistributedObject, DelayDeletable):
|
|||
return yToTest < -0.5
|
||||
|
||||
def enterDoor(self):
|
||||
if base.config.GetBool('want-doomsday', False):
|
||||
if config.GetBool('want-doomsday', False):
|
||||
base.localAvatar.disableAvatarControls()
|
||||
self.confirm = TTDialog.TTGlobalDialog(doneEvent='confirmDone', message=SafezoneInvasionGlobals.LeaveToontownCentralAlert, style=TTDialog.Acknowledge)
|
||||
self.confirm.show()
|
||||
|
|
|
@ -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 = config.GetFloat('int-elevator-timeout', INTERIOR_ELEVATOR_COUNTDOWN_TIME)
|
||||
|
||||
def setupElevator(self):
|
||||
self.leftDoor = self.bldg.leftDoorOut
|
||||
|
|
|
@ -407,7 +407,7 @@ class CatalogItemPanel(DirectFrame):
|
|||
self.accept('verifyDone', self.__handleVerifyPurchase)
|
||||
|
||||
def __handleVerifyPurchase(self):
|
||||
if base.config.GetBool('want-qa-regression', 0):
|
||||
if config.GetBool('want-qa-regression', 0):
|
||||
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 config.GetBool('want-qa-regression', 0):
|
||||
self.notify.info('QA-REGRESSION: CATALOG: Gift item')
|
||||
status = self.verify.doneStatus
|
||||
self.ignore('verifyGiftDone')
|
||||
|
|
|
@ -181,7 +181,7 @@ class CatalogScreen(DirectFrame):
|
|||
self.emblemCatalogButton['state'] = DGG.DISABLED
|
||||
|
||||
def showNewItems(self, index = None):
|
||||
if base.config.GetBool('want-qa-regression', 0):
|
||||
if config.GetBool('want-qa-regression', 0):
|
||||
self.notify.info('QA-REGRESSION: CATALOG: New item')
|
||||
taskMgr.remove('clarabelleHelpText1')
|
||||
messenger.send('wakeup')
|
||||
|
@ -198,7 +198,7 @@ class CatalogScreen(DirectFrame):
|
|||
return
|
||||
|
||||
def showBackorderItems(self, index = None):
|
||||
if base.config.GetBool('want-qa-regression', 0):
|
||||
if config.GetBool('want-qa-regression', 0):
|
||||
self.notify.info('QA-REGRESSION: CATALOG: Backorder item')
|
||||
taskMgr.remove('clarabelleHelpText1')
|
||||
messenger.send('wakeup')
|
||||
|
@ -215,7 +215,7 @@ class CatalogScreen(DirectFrame):
|
|||
return
|
||||
|
||||
def showLoyaltyItems(self, index = None):
|
||||
if base.config.GetBool('want-qa-regression', 0):
|
||||
if config.GetBool('want-qa-regression', 0):
|
||||
self.notify.info('QA-REGRESSION: CATALOG: Special item')
|
||||
taskMgr.remove('clarabelleHelpText1')
|
||||
messenger.send('wakeup')
|
||||
|
@ -232,7 +232,7 @@ class CatalogScreen(DirectFrame):
|
|||
return
|
||||
|
||||
def showEmblemItems(self, index = None):
|
||||
if base.config.GetBool('want-qa-regression', 0):
|
||||
if config.GetBool('want-qa-regression', 0):
|
||||
self.notify.info('QA-REGRESSION: CATALOG: Emblem item')
|
||||
taskMgr.remove('clarabelleHelpText1')
|
||||
messenger.send('wakeup')
|
||||
|
|
|
@ -176,7 +176,7 @@ class MailboxScreen(DirectObject.DirectObject):
|
|||
messenger.send(self.doneEvent)
|
||||
|
||||
def __handleAccept(self):
|
||||
if base.config.GetBool('want-qa-regression', 0):
|
||||
if config.GetBool('want-qa-regression', 0):
|
||||
self.notify.info('QA-REGRESSION: MAILBOX: Accept item')
|
||||
if self.acceptingIndex != None:
|
||||
return
|
||||
|
|
|
@ -136,12 +136,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 = config.GetInt('lod1-in', 50)
|
||||
levelOneOut = config.GetInt('lod1-out', 1)
|
||||
levelTwoIn = config.GetInt('lod2-in', 100)
|
||||
levelTwoOut = config.GetInt('lod2-out', 50)
|
||||
levelThreeIn = config.GetInt('lod3-in', 280)
|
||||
levelThreeOut = config.GetInt('lod3-out', 100)
|
||||
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 +411,7 @@ class Char(Avatar.Avatar):
|
|||
if self.dialogueArray:
|
||||
self.notify.warning('loadDialogue() called twice.')
|
||||
self.unloadDialogue()
|
||||
language = base.config.GetString('language', 'english')
|
||||
language = config.GetString('language', 'english')
|
||||
if char == 'mk':
|
||||
dialogueFile = base.loadSfx('phase_3/audio/dial/mickey.ogg')
|
||||
for i in range(0, 6):
|
||||
|
|
|
@ -292,9 +292,9 @@ scStructure = [
|
|||
6062,
|
||||
6063,
|
||||
6064,
|
||||
6065]],
|
||||
[OTPLocalizer.SCMenuBattleGags,
|
||||
1500,
|
||||
6065]],
|
||||
[OTPLocalizer.SCMenuBattleGags,
|
||||
1500,
|
||||
1501,
|
||||
1502,
|
||||
1503,
|
||||
|
@ -424,7 +424,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 = config.GetBool('white-list-speed-chat', 0)
|
||||
if self.allowWhiteListSpeedChat:
|
||||
self.addWhiteList()
|
||||
self.factoryMenu = None
|
||||
|
@ -497,7 +497,7 @@ class TTChatInputSpeedChat(DirectObject.DirectObject):
|
|||
structure.append([TTSCResistanceMenu, OTPLocalizer.SCMenuResistance])
|
||||
if hasattr(base, 'wantPets') and base.wantPets:
|
||||
structure += scPetMenuStructure
|
||||
if base.config.GetBool('want-doomsday', False):
|
||||
if config.GetBool('want-doomsday', False):
|
||||
structure.append([OTPLocalizer.SCMenuElection, 10100, 10101, 10102, 10103, 10104, 10105])
|
||||
structure += scStructure
|
||||
self.createSpeedChatObject(structure)
|
||||
|
@ -519,7 +519,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 config.GetBool('want-sc-auto-hide', 1):
|
||||
self.accept(self.terminalSelectedEvent, selectionMade)
|
||||
self.speedChat.reparentTo(base.a2dpTopLeft, DGG.FOREGROUND_SORT_INDEX)
|
||||
scZ = -0.04
|
||||
|
|
|
@ -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 = config.GetString('true-friend-toggle-key', 'alt')
|
||||
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 config.GetBool('whisper-to-nearby-true-friends', 1):
|
||||
self.accept(self.TFToggleKey, self.shiftPressed)
|
||||
return
|
||||
|
||||
|
|
|
@ -70,8 +70,8 @@ class TTWhiteList(WhiteList):
|
|||
self.updateWhitelist()
|
||||
|
||||
def getWhitelistUrl(self):
|
||||
result = base.config.GetString('fallback-whitelist-url', 'http://cdn.toontown.disney.go.com/toontown/en/')
|
||||
override = base.config.GetString('whitelist-url', '')
|
||||
result = config.GetString('fallback-whitelist-url', 'http://cdn.toontown.disney.go.com/toontown/en/')
|
||||
override = config.GetString('whitelist-url', '')
|
||||
if override:
|
||||
self.notify.info('got an override url, using %s for the whitelist' % override)
|
||||
result = override
|
||||
|
|
|
@ -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.06, 0, 0.033), 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 = config.GetBool('white-list-is-default', 1)
|
||||
self.chatInputSpeedChat = TTChatInputSpeedChat(self)
|
||||
self.normalPos = Vec3(0.25, 0, -0.196)
|
||||
self.whisperPos = Vec3(0.25, 0, -0.28)
|
||||
|
@ -365,13 +365,13 @@ class ToontownChatManager(ChatManager.ChatManager):
|
|||
self.problemActivatingChat.hide()
|
||||
|
||||
def __normalButtonPressed(self):
|
||||
if base.config.GetBool('want-qa-regression', 0):
|
||||
if config.GetBool('want-qa-regression', 0):
|
||||
self.notify.info('QA-REGRESSION: CHAT: Speedchat Plus')
|
||||
messenger.send('wakeup')
|
||||
self.fsm.request('normalChat')
|
||||
|
||||
def __scButtonPressed(self):
|
||||
if base.config.GetBool('want-qa-regression', 0):
|
||||
if config.GetBool('want-qa-regression', 0):
|
||||
self.notify.info('QA-REGRESSION: CHAT: Speedchat')
|
||||
messenger.send('wakeup')
|
||||
if self.fsm.getCurrentState().getName() == 'speedChat':
|
||||
|
@ -457,7 +457,7 @@ class ToontownChatManager(ChatManager.ChatManager):
|
|||
self.fsm.request('mainMenu')
|
||||
|
||||
def __whisperScButtonPressed(self, avatarName, avatarId, playerId):
|
||||
if base.config.GetBool('want-qa-regression', 0):
|
||||
if config.GetBool('want-qa-regression', 0):
|
||||
self.notify.info('QA-REGRESSION: CHAT: Whisper')
|
||||
messenger.send('wakeup')
|
||||
hasManager = hasattr(base.cr, 'playerFriendsManager')
|
||||
|
|
|
@ -160,7 +160,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 config.GetBool('schellgames-dev', True):
|
||||
self.acceptOnce('end', self.guiMgr.forceTimerDone)
|
||||
|
||||
def toggleFog():
|
||||
|
@ -192,7 +192,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 config.GetBool('schellgames-dev', True):
|
||||
self.ignore('end')
|
||||
self.ignore('home')
|
||||
self.level.update(0.0)
|
||||
|
|
|
@ -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 config.GetBool('cogdomaze-dev', False):
|
||||
self._initCollisionVisuals()
|
||||
|
||||
def _initWaterCoolers(self):
|
||||
|
|
|
@ -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 = config.GetBool('cogdomaze-suits-hit-toons', True)
|
||||
|
||||
def load(self, cogdoMazeFactory, numSuits, bossCode):
|
||||
self._initAudio()
|
||||
|
|
|
@ -10,7 +10,7 @@ class DistCogdoFlyingGame(DistCogdoGame):
|
|||
|
||||
def __init__(self, cr):
|
||||
DistCogdoGame.__init__(self, cr)
|
||||
if __debug__ and base.config.GetBool('schellgames-dev', True):
|
||||
if __debug__ and config.GetBool('schellgames-dev', True):
|
||||
self.accept('onCodeReload', self.__sgOnCodeReload)
|
||||
self.game = CogdoFlyingGame(self)
|
||||
|
||||
|
|
|
@ -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 config.GetBool('schellgames-dev', False)
|
||||
|
||||
class DistCogdoGame(DistCogdoGameBase, DistributedObject):
|
||||
notify = directNotify.newCategory('DistCogdoGame')
|
||||
|
|
|
@ -14,7 +14,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 config.GetBool('schellgames-dev', True):
|
||||
self.accept('onCodeReload', self.__sgOnCodeReload)
|
||||
|
||||
def delete(self):
|
||||
|
|
|
@ -54,7 +54,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 config.GetBool('want-qa-regression', 0):
|
||||
self.notify.info('QA-REGRESSION: COGHQ: Visit BossbotLobby')
|
||||
self.notify.debug('cogHQLobbyModelPath = %s' % self.cogHQLobbyModelPath)
|
||||
self.geom = loader.loadModel(self.cogHQLobbyModelPath)
|
||||
|
|
|
@ -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 config.GetBool('want-qa-regression', 0):
|
||||
self.notify.info('QA-REGRESSION: COGHQ: Visit CashbotLobby')
|
||||
self.geom = loader.loadModel(self.cogHQLobbyModelPath)
|
||||
else:
|
||||
|
|
|
@ -29,8 +29,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 = config.GetDouble('water-power-speed', 15)
|
||||
waterPowerExponent = config.GetDouble('water-power-exponent', 0.75)
|
||||
useNewAnimations = True
|
||||
TugOfWarControls = False
|
||||
OnlyUpArrow = True
|
||||
|
|
|
@ -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 = config.GetBool('block-country-club-rooms', 1)
|
||||
|
||||
def __init__(self, cr):
|
||||
DistributedObject.DistributedObject.__init__(self, cr)
|
||||
|
|
|
@ -21,8 +21,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 = config.GetDouble('golf-power-speed', 3)
|
||||
golfPowerExponent = config.GetDouble('golf-power-exponent', 0.75)
|
||||
|
||||
def __init__(self, cr):
|
||||
DistributedObject.DistributedObject.__init__(self, cr)
|
||||
|
|
|
@ -16,7 +16,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 config.GetBool('want-factory-lifter', 0):
|
||||
self.toonLifter = FactoryUtil.ToonLifter('f3')
|
||||
self.callSetters('farPlaneDistance')
|
||||
self.geom.reparentTo(render)
|
||||
|
|
|
@ -60,7 +60,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 config.GetBool('want-qa-regression', 0):
|
||||
self.notify.info('QA-REGRESSION: COGHQ: Visit LawbotLobby')
|
||||
self.notify.debug('cogHQLobbyModelPath = %s' % self.cogHQLobbyModelPath)
|
||||
self.geom = loader.loadModel(self.cogHQLobbyModelPath)
|
||||
|
|
|
@ -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 config.GetBool('want-qa-regression', 0):
|
||||
self.notify.info('QA-REGRESSION: COGHQ: Visit SellbotLobby')
|
||||
self.geom = loader.loadModel(self.cogHQLobbyModelPath)
|
||||
front = self.geom.find('**/frontWall')
|
||||
|
|
|
@ -244,7 +244,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 config.GetBool('want-qa-regression', 0):
|
||||
self.notify.info('QA-REGRESSION: NEIGHBORHOODS: Visit %s' % hoodName)
|
||||
count = ToontownGlobals.hoodCountMap[canonicalHoodId]
|
||||
if loaderName == 'safeZoneLoader':
|
||||
|
@ -405,8 +405,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 config.GetString('language', 'english') == 'japanese':
|
||||
musicVolume = config.GetFloat('tutorial-music-volume', 0.5)
|
||||
requestStatus['musicVolume'] = musicVolume
|
||||
self.hood.enter(requestStatus)
|
||||
|
||||
|
|
|
@ -135,9 +135,9 @@ class ToontownClientRepository(OTPClientRepository.OTPClientRepository):
|
|||
state = self.loginFSM.getStateNamed('playingGame')
|
||||
state.addTransition('credits')
|
||||
|
||||
self.wantCogdominiums = base.config.GetBool('want-cogdominiums', 1)
|
||||
self.wantEmblems = base.config.GetBool('want-emblems', 0)
|
||||
if base.config.GetBool('tt-node-check', 0):
|
||||
self.wantCogdominiums = config.GetBool('want-cogdominiums', 1)
|
||||
self.wantEmblems = config.GetBool('want-emblems', 0)
|
||||
if config.GetBool('tt-node-check', 0):
|
||||
for species in ToonDNA.toonSpeciesTypes:
|
||||
for head in ToonDNA.getHeadList(species):
|
||||
for torso in ToonDNA.toonTorsoTypes:
|
||||
|
|
|
@ -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 config.GetInt('toontown-sfx-setting', 1) == 0:
|
||||
if self.trailTypeId != FireworkTrailType.LongGlowSparkle:
|
||||
self.trailTypeId = FireworkTrailType.Default
|
||||
if self.trailTypeId == FireworkTrailType.Default:
|
||||
|
@ -151,7 +151,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 config.GetInt('toontown-sfx-setting', 1) >= 1:
|
||||
trailEffect = GlowTrail.getEffect()
|
||||
if trailEffect:
|
||||
trailEffect.reparentTo(self.effectsNode)
|
||||
|
@ -183,7 +183,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 config.GetInt('toontown-sfx-setting', 1) >= 1:
|
||||
secondaryBlast = BlastEffect()
|
||||
secondaryBlast.reparentTo(self.effectsNode)
|
||||
secondaryBlast.setScale(250 * self.scale)
|
||||
|
@ -209,14 +209,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 config.GetInt('toontown-sfx-setting', 1) >= 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 config.GetInt('toontown-sfx-setting', 1) >= 2:
|
||||
sparkles = FireworkSparkles.getEffect()
|
||||
if sparkles:
|
||||
sparkles.reparentTo(self.effectsNode)
|
||||
|
@ -225,7 +225,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 config.GetInt('toontown-sfx-setting', 1) >= 1:
|
||||
explosion = PeonyEffect.getEffect()
|
||||
if explosion:
|
||||
explosion.reparentTo(self.effectsNode)
|
||||
|
@ -243,7 +243,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 config.GetInt('toontown-sfx-setting', 1) >= 1:
|
||||
rays = RayBurst()
|
||||
rays.reparentTo(self.effectsNode)
|
||||
rays.setEffectScale(self.scale * 0.75)
|
||||
|
@ -258,7 +258,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 config.GetInt('toontown-sfx-setting', 1) >= 1:
|
||||
rays = RayBurst()
|
||||
rays.reparentTo(self.effectsNode)
|
||||
rays.setEffectScale(self.scale)
|
||||
|
@ -280,7 +280,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 config.GetInt('toontown-sfx-setting', 1) >= 2:
|
||||
sparkles = FireworkSparkles.getEffect()
|
||||
if sparkles:
|
||||
sparkles.reparentTo(self.effectsNode)
|
||||
|
@ -336,7 +336,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 config.GetInt('toontown-sfx-setting', 1) >= 1:
|
||||
rays = RayBurst()
|
||||
rays.reparentTo(self.effectsNode)
|
||||
rays.setEffectScale(self.scale)
|
||||
|
@ -360,14 +360,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 config.GetInt('toontown-sfx-setting', 1) >= 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 config.GetInt('toontown-sfx-setting', 1) >= 2:
|
||||
sparkles = FireworkSparkles.getEffect()
|
||||
if sparkles:
|
||||
sparkles.reparentTo(self.effectsNode)
|
||||
|
@ -383,7 +383,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 + config.GetInt('toontown-sfx-setting', 1)
|
||||
self.burstEffectsIval.append(explosion.getTrack())
|
||||
self.burstEffects.append(explosion)
|
||||
elif self.burstTypeId == FireworkBurstType.IceCream:
|
||||
|
|
|
@ -61,7 +61,7 @@ class FireworkShowMixin:
|
|||
self.timestamp = timestamp
|
||||
self.showMusic = None
|
||||
self.eventId = eventId
|
||||
if base.config.GetBool('want-old-fireworks', False):
|
||||
if config.GetBool('want-old-fireworks', False):
|
||||
self.currentShow = self.getFireworkShowIval(eventId, style, songId, t)
|
||||
if self.currentShow:
|
||||
self.currentShow.start(t)
|
||||
|
@ -115,7 +115,7 @@ class FireworkShowMixin:
|
|||
else:
|
||||
FireworkShowMixin.notify.warning('Invalid fireworks event ID: %d' % eventId)
|
||||
return None
|
||||
|
||||
|
||||
self.showMusic = loader.loadMusic(musicFile)
|
||||
self.showMusic.setVolume(1)
|
||||
|
||||
|
@ -145,18 +145,18 @@ class FireworkShowMixin:
|
|||
return
|
||||
if self.__checkHoodValidity() and hasattr(base.cr.playGame, 'hood') and base.cr.playGame.hood and hasattr(base.cr.playGame.hood, 'sky') and base.cr.playGame.hood.sky:
|
||||
preShow = Sequence(
|
||||
Func(base.localAvatar.setSystemMessage, 0, startMessage),
|
||||
Parallel(LerpColorScaleInterval(base.cr.playGame.hood.sky, 2.5, Vec4(0.0, 0.0, 0.0, 1.0)),
|
||||
LerpColorScaleInterval(base.cr.playGame.hood.loader.geom, 2.5, Vec4(0.25, 0.25, 0.35, 1)),
|
||||
LerpColorScaleInterval(base.localAvatar, 2.5, Vec4(0.85, 0.85, 0.85, 1)),
|
||||
Func(__lightDecorationOn__)),
|
||||
Func(base.localAvatar.setSystemMessage, 0, startMessage),
|
||||
Parallel(LerpColorScaleInterval(base.cr.playGame.hood.sky, 2.5, Vec4(0.0, 0.0, 0.0, 1.0)),
|
||||
LerpColorScaleInterval(base.cr.playGame.hood.loader.geom, 2.5, Vec4(0.25, 0.25, 0.35, 1)),
|
||||
LerpColorScaleInterval(base.localAvatar, 2.5, Vec4(0.85, 0.85, 0.85, 1)),
|
||||
Func(__lightDecorationOn__)),
|
||||
Func(self.trySettingBackground, 0),
|
||||
Func(self.__checkDDFog),
|
||||
Func(base.camLens.setFar, 1000.0),
|
||||
Func(base.cr.playGame.hood.sky.hide),
|
||||
Func(base.localAvatar.setSystemMessage, 0, instructionMessage),
|
||||
Func(self.getLoader().music.stop),
|
||||
Wait(2.0),
|
||||
Func(self.__checkDDFog),
|
||||
Func(base.camLens.setFar, 1000.0),
|
||||
Func(base.cr.playGame.hood.sky.hide),
|
||||
Func(base.localAvatar.setSystemMessage, 0, instructionMessage),
|
||||
Func(self.getLoader().music.stop),
|
||||
Wait(2.0),
|
||||
Func(base.playMusic, self.showMusic, 0, 1, 0.8, max(0, startT))
|
||||
)
|
||||
return preShow
|
||||
|
@ -192,19 +192,19 @@ class FireworkShowMixin:
|
|||
else:
|
||||
FireworkShowMixin.notify.warning('Invalid fireworks event ID: %d' % eventId)
|
||||
return None
|
||||
|
||||
|
||||
if self.__checkHoodValidity() and hasattr(base.cr.playGame.hood, 'sky') and base.cr.playGame.hood.sky:
|
||||
postShow = Sequence(
|
||||
Func(base.cr.playGame.hood.sky.show),
|
||||
Func(base.cr.playGame.hood.sky.show),
|
||||
Parallel(
|
||||
LerpColorScaleInterval(base.cr.playGame.hood.sky, 2.5, Vec4(1, 1, 1, 1)),
|
||||
LerpColorScaleInterval(base.cr.playGame.hood.loader.geom, 2.5, Vec4(1, 1, 1, 1)),
|
||||
LerpColorScaleInterval(base.cr.playGame.hood.sky, 2.5, Vec4(1, 1, 1, 1)),
|
||||
LerpColorScaleInterval(base.cr.playGame.hood.loader.geom, 2.5, Vec4(1, 1, 1, 1)),
|
||||
LerpColorScaleInterval(base.localAvatar, 2.5, Vec4(1, 1, 1, 1))
|
||||
),
|
||||
Func(self.__restoreDDFog),
|
||||
Func(self.restoreCameraLens),
|
||||
),
|
||||
Func(self.__restoreDDFog),
|
||||
Func(self.restoreCameraLens),
|
||||
Func(self.trySettingBackground, 1),
|
||||
Func(self.showMusic.stop),
|
||||
Func(self.showMusic.stop),
|
||||
Func(base.localAvatar.setSystemMessage, 0, endMessage)
|
||||
)
|
||||
|
||||
|
@ -228,7 +228,7 @@ class FireworkShowMixin:
|
|||
self.fireworkShow.begin(timeStamp)
|
||||
self.fireworkShow.reparentTo(root)
|
||||
hood = self.getHood()
|
||||
|
||||
|
||||
# Dammit disney
|
||||
from toontown.hood import TTHood
|
||||
from toontown.hood import DDHood
|
||||
|
|
|
@ -20,7 +20,7 @@ from otp.speedchat import SpeedChatGlobals
|
|||
|
||||
class DistributedElectionEvent(DistributedObject, FSM):
|
||||
notify = DirectNotifyGlobal.directNotify.newCategory("DistributedElectionEvent")
|
||||
|
||||
|
||||
def __init__(self, cr):
|
||||
DistributedObject.__init__(self, cr)
|
||||
FSM.__init__(self, 'ElectionFSM')
|
||||
|
@ -88,7 +88,7 @@ class DistributedElectionEvent(DistributedObject, FSM):
|
|||
wheelbarrowJoint.setPosHprScale(3.94, 0.00, 1.06, 270.00, 344.74, 0.00, 1.43, 1.12, 1.0)
|
||||
self.restockSfx = loader.loadSfx('phase_9/audio/sfx/CHQ_SOS_pies_restock.ogg')
|
||||
self.splashSfx = loader.loadSfx('phase_9/audio/sfx/CHQ_FACT_paint_splash.ogg')
|
||||
|
||||
|
||||
|
||||
# Find FlippyStand's collision to give people pies.
|
||||
# The new animated model doesn't have any collisions, so this needs to be replaced with a collision box. Harv did it once, just need to look back in the commit history.
|
||||
|
@ -96,7 +96,7 @@ class DistributedElectionEvent(DistributedObject, FSM):
|
|||
self.pieCollision = self.flippyStand.attachNewNode(CollisionNode('wheelbarrow_collision'))
|
||||
self.pieCollision.node().addSolid(cs)
|
||||
self.accept('enter' + self.pieCollision.node().getName(), self.handleWheelbarrowCollisionSphereEnter)
|
||||
|
||||
|
||||
csSlappy = CollisionBox(Point3(-4.2, 0, 0), 9.5, 5.5, 18)
|
||||
self.goopCollision = self.slappyStand.attachNewNode(CollisionNode('goop_collision'))
|
||||
self.goopCollision.node().addSolid(csSlappy)
|
||||
|
@ -241,9 +241,9 @@ class DistributedElectionEvent(DistributedObject, FSM):
|
|||
|
||||
def delete(self):
|
||||
self.demand('Off', 0.)
|
||||
|
||||
|
||||
self.ignore('entercnode')
|
||||
|
||||
|
||||
# Clean up everything...
|
||||
self.showFloor.removeNode()
|
||||
self.stopInteractiveFlippy()
|
||||
|
@ -258,7 +258,7 @@ class DistributedElectionEvent(DistributedObject, FSM):
|
|||
These bits are for things used before Election Day, and mostly unrelated to the Election Sequence.
|
||||
'''
|
||||
def enterIdle(self, offset):
|
||||
if base.config.GetBool('want-doomsday', False):
|
||||
if config.GetBool('want-doomsday', False):
|
||||
# We're waiting for the election to start, so Surlee comes by to keep us occupied during his studies of "sillyness".
|
||||
self.surlee.show()
|
||||
self.surlee.addActive()
|
||||
|
@ -274,7 +274,7 @@ class DistributedElectionEvent(DistributedObject, FSM):
|
|||
Wait(8),
|
||||
Func(self.surlee.setChatAbsolute, 'When the clock strikes two we\'ll see them march through those doors and onto the stage. Are you toons ready?', CFSpeech|CFTimeout),
|
||||
Wait(8),
|
||||
Func(self.surlee.setChatAbsolute, 'I must say, surprisingly, the silliness around here couldn\'t be higher at this time.', CFSpeech|CFTimeout),
|
||||
Func(self.surlee.setChatAbsolute, 'I must say, surprisingly, the silliness around here couldn\'t be higher at this time.', CFSpeech|CFTimeout),
|
||||
Wait(8),
|
||||
Func(self.surlee.setChatAbsolute, 'My fellow scientists of silliness, Professor Prepostera and Doctor Dimm, are over there tracking the amount of silliness being taken in from the campaign stands.', CFSpeech|CFTimeout),
|
||||
Wait(8),
|
||||
|
@ -289,9 +289,9 @@ class DistributedElectionEvent(DistributedObject, FSM):
|
|||
|
||||
|
||||
def exitIdle(self):
|
||||
if base.config.GetBool('want-doomsday', False):
|
||||
if config.GetBool('want-doomsday', False):
|
||||
self.surleeIntroInterval.finish()
|
||||
|
||||
|
||||
def startInteractiveFlippy(self):
|
||||
self.flippy.reparentTo(self.showFloor)
|
||||
self.flippy.setPosHpr(-40.6, -18.5, 0.01, 20, 0, 0)
|
||||
|
@ -317,7 +317,7 @@ class DistributedElectionEvent(DistributedObject, FSM):
|
|||
if phraseId in phraseIdList:
|
||||
self.sendUpdate('phraseSaidToFlippy', [phraseId])
|
||||
break
|
||||
|
||||
|
||||
def flippySpeech(self, avId, phraseId):
|
||||
av = self.cr.doId2do.get(avId)
|
||||
if not av:
|
||||
|
@ -1034,7 +1034,7 @@ class DistributedElectionEvent(DistributedObject, FSM):
|
|||
# Tell the credits our toon name and dna.
|
||||
NodePath(base.marginManager).hide()
|
||||
base.cr.credits.setLocalToonDetails(base.localAvatar.getName(), base.localAvatar.style)
|
||||
|
||||
|
||||
# This starts here so that we can drift towards Flippy for his speech,
|
||||
# but some of it should be moved over to the real credits sequence which is called after this.
|
||||
# A safe time to cut to the real sequence would be after the portable hole nosedive, or right when the camera arrives at Flippy before "Toons of the world... UNITE!"
|
||||
|
@ -1047,7 +1047,7 @@ class DistributedElectionEvent(DistributedObject, FSM):
|
|||
self.logo.setScale(0.6)
|
||||
self.logo.setPos(0, 1, 0.3)
|
||||
self.logo.setColorScale(1, 1, 1, 0)
|
||||
|
||||
|
||||
self.portal = loader.loadModel('phase_3.5/models/props/portal-mod')
|
||||
self.portal.reparentTo(render)
|
||||
self.portal.setPosHprScale(93.1, 0.4, 4, 4, 355, 45, 0, 0, 0)
|
||||
|
@ -1126,10 +1126,10 @@ class DistributedElectionEvent(DistributedObject, FSM):
|
|||
|
||||
def saySurleePhrase(self, phrase, interrupt, broadcast):
|
||||
self.surlee.setChatAbsolute(phrase, CFSpeech|CFTimeout, interrupt = interrupt)
|
||||
|
||||
|
||||
# If we want everyone to see this message, even if not near Surlee, we'll send it as a whisper.
|
||||
if broadcast and Vec3(base.localAvatar.getPos(self.surleeR)).length() >= 15:
|
||||
base.localAvatar.setSystemMessage(0, self.surleeR.getName()+ ': ' + phrase, WTEmote)
|
||||
|
||||
|
||||
def setState(self, state, timestamp):
|
||||
self.request(state, globalClockDelta.localElapsedTime(timestamp))
|
||||
|
|
|
@ -175,7 +175,7 @@ class DistributedPhone(DistributedFurnitureItem.DistributedFurnitureItem):
|
|||
return
|
||||
if self.hasLocalAvatar:
|
||||
self.freeAvatar()
|
||||
if base.config.GetBool('want-pets', 1):
|
||||
if config.GetBool('want-pets', 1):
|
||||
base.localAvatar.lookupPetDNA()
|
||||
self.notify.debug('Entering Phone Sphere....')
|
||||
taskMgr.remove(self.uniqueName('ringDoLater'))
|
||||
|
|
|
@ -133,7 +133,7 @@ class Estate(Place.Place):
|
|||
#if hasattr(base.cr, 'aprilToonsMgr'):
|
||||
#if self.isEventActive(AprilToonsGlobals.EventEstateGravity):
|
||||
#base.localAvatar.startAprilToonsControls()
|
||||
if base.config.GetBool('want-april-toons'):
|
||||
if config.GetBool('want-april-toons'):
|
||||
base.localAvatar.startAprilToonsControls()
|
||||
self.accept('doorDoneEvent', self.handleDoorDoneEvent)
|
||||
self.accept('DistributedDoor_doorTrigger', self.handleDoorTrigger)
|
||||
|
@ -345,7 +345,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 config.GetBool('disable-flying-glitch') == 0:
|
||||
self.fsm.request('walk')
|
||||
self.walkStateData.fsm.request('swimming', [self.loader.swimSound])
|
||||
pos = base.localAvatar.getPos(render)
|
||||
|
@ -363,7 +363,7 @@ class Estate(Place.Place):
|
|||
#if hasattr(base.cr, 'aprilToonsMgr'):
|
||||
#if self.isEventActive(AprilToonsGlobals.EventEstateGravity):
|
||||
#base.localAvatar.startAprilToonsControls()
|
||||
if base.config.GetBool('want-april-toons'):
|
||||
if config.GetBool('want-april-toons'):
|
||||
base.localAvatar.startAprilToonsControls()
|
||||
|
||||
def __setUnderwaterFog(self):
|
||||
|
|
|
@ -518,7 +518,7 @@ class ObjectManager(NodePath, DirectObject):
|
|||
else:
|
||||
self.sendToAtticButton.show()
|
||||
return
|
||||
|
||||
|
||||
self.sendToAtticButton.show()
|
||||
|
||||
def deselectObject(self):
|
||||
|
@ -1165,7 +1165,7 @@ class ObjectManager(NodePath, DirectObject):
|
|||
return
|
||||
|
||||
def sendItemToAttic(self):
|
||||
if base.config.GetBool('want-qa-regression', 0):
|
||||
if config.GetBool('want-qa-regression', 0):
|
||||
self.notify.info('QA-REGRESSION: ESTATE: Send Item to Attic')
|
||||
messenger.send('wakeup')
|
||||
if self.selectedObject:
|
||||
|
@ -1267,7 +1267,7 @@ class ObjectManager(NodePath, DirectObject):
|
|||
return
|
||||
|
||||
def bringItemFromAttic(self, item, itemIndex):
|
||||
if base.config.GetBool('want-qa-regression', 0):
|
||||
if config.GetBool('want-qa-regression', 0):
|
||||
self.notify.info('QA-REGRESSION: ESTATE: Place Item in Room')
|
||||
messenger.send('wakeup')
|
||||
self.__enableItemButtons(0)
|
||||
|
@ -1485,7 +1485,7 @@ class ObjectManager(NodePath, DirectObject):
|
|||
return
|
||||
|
||||
def __handleVerifyDeleteOK(self):
|
||||
if base.config.GetBool('want-qa-regression', 0):
|
||||
if config.GetBool('want-qa-regression', 0):
|
||||
self.notify.info('QA-REGRESSION: ESTATE: Send Item to Trash')
|
||||
deleteFunction = self.verifyItems[0]
|
||||
deleteFunctionArgs = self.verifyItems[1:]
|
||||
|
@ -1596,7 +1596,7 @@ class ObjectManager(NodePath, DirectObject):
|
|||
self.verifyItems = (item, itemIndex)
|
||||
|
||||
def __handleVerifyReturnFromTrashOK(self):
|
||||
if base.config.GetBool('want-qa-regression', 0):
|
||||
if config.GetBool('want-qa-regression', 0):
|
||||
self.notify.info('QA-REGRESSION: ESTATE: Send Item to Attic')
|
||||
item, itemIndex = self.verifyItems
|
||||
self.__cleanupVerifyDelete()
|
||||
|
|
|
@ -56,7 +56,7 @@ class FishBase:
|
|||
loop = None
|
||||
delay = None
|
||||
playRate = None
|
||||
if base.config.GetBool('want-fish-audio', 1):
|
||||
if config.GetBool('want-fish-audio', 1):
|
||||
soundDict = FishGlobals.FishAudioFileDict
|
||||
fileInfo = soundDict.get(self.genus, None)
|
||||
if fileInfo:
|
||||
|
|
|
@ -45,7 +45,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 = config.GetBool('want-player-friends', 0)
|
||||
DirectFrame.__init__(self, pos=(-1.033, 0.1, -0.35), parent=base.a2dTopRight, 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 +455,7 @@ class FriendInviter(DirectFrame):
|
|||
pass
|
||||
|
||||
def __handleOk(self):
|
||||
if base.config.GetBool('want-qa-regression', 0):
|
||||
if config.GetBool('want-qa-regression', 0):
|
||||
self.notify.info('QA-REGRESSION: MAKEAFRIENDSHIP: Make a friendship')
|
||||
unloadFriendInviter()
|
||||
|
||||
|
@ -466,7 +466,7 @@ class FriendInviter(DirectFrame):
|
|||
unloadFriendInviter()
|
||||
|
||||
def __handleStop(self):
|
||||
if base.config.GetBool('want-qa-regression', 0):
|
||||
if config.GetBool('want-qa-regression', 0):
|
||||
self.notify.info('QA-REGRESSION: BREAKAFRIENDSHIP: Break a friendship')
|
||||
self.fsm.request('endFriendship')
|
||||
|
||||
|
|
|
@ -56,10 +56,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 = config.GetBool('unlimited-aim-time', 0)
|
||||
unlimitedTeeTime = config.GetBool('unlimited-tee-time', 0)
|
||||
golfPowerSpeed = config.GetDouble('golf-power-speed', 3)
|
||||
golfPowerExponent = config.GetDouble('golf-power-exponent', 0.75)
|
||||
DefaultCamP = -16
|
||||
MaxCamP = -90
|
||||
|
||||
|
@ -288,7 +288,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 = config.GetBool('golf-all-blockers', 0)
|
||||
self.createLocatorDict()
|
||||
self.blockerNums = self.holeInfo['blockers']
|
||||
for locatorNum in self.locDict:
|
||||
|
|
|
@ -6,5 +6,5 @@ class GenericAnimatedBuilding(GenericAnimatedProp.GenericAnimatedProp):
|
|||
GenericAnimatedProp.GenericAnimatedProp.__init__(self, node)
|
||||
|
||||
def enter(self):
|
||||
if base.config.GetBool('buildings-animate', False):
|
||||
if config.GetBool('buildings-animate', False):
|
||||
GenericAnimatedProp.GenericAnimatedProp.enter(self)
|
||||
|
|
|
@ -112,7 +112,7 @@ class GenericAnimatedProp(AnimatedProp.AnimatedProp):
|
|||
if theSound:
|
||||
soundDur = theSound.length()
|
||||
if maximumDuration < soundDur:
|
||||
if base.config.GetBool('interactive-prop-info', False):
|
||||
if config.GetBool('interactive-prop-info', False):
|
||||
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
|
||||
|
|
|
@ -176,7 +176,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 = config.GetFloat('prop-idle-pause-time', 0.0)
|
||||
|
||||
def __init__(self, node):
|
||||
self.leftWater = None
|
||||
|
|
|
@ -4,7 +4,7 @@ from direct.directnotify import DirectNotifyGlobal
|
|||
|
||||
class HydrantOneAnimatedProp(ZeroAnimatedProp.ZeroAnimatedProp):
|
||||
notify = DirectNotifyGlobal.directNotify.newCategory('HydrantOneAnimatedProp')
|
||||
PauseTimeMult = base.config.GetFloat('zero-pause-mult', 1.0)
|
||||
PauseTimeMult = config.GetFloat('zero-pause-mult', 1.0)
|
||||
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),
|
||||
|
|
|
@ -4,7 +4,7 @@ from direct.directnotify import DirectNotifyGlobal
|
|||
|
||||
class HydrantTwoAnimatedProp(ZeroAnimatedProp.ZeroAnimatedProp):
|
||||
notify = DirectNotifyGlobal.directNotify.newCategory('HydrantTwoAnimatedProp')
|
||||
PauseTimeMult = base.config.GetFloat('zero-pause-mult', 1.0)
|
||||
PauseTimeMult = config.GetFloat('zero-pause-mult', 1.0)
|
||||
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),
|
||||
|
|
|
@ -4,7 +4,7 @@ from direct.directnotify import DirectNotifyGlobal
|
|||
|
||||
class HydrantZeroAnimatedProp(ZeroAnimatedProp.ZeroAnimatedProp):
|
||||
notify = DirectNotifyGlobal.directNotify.newCategory('HydrantZeroAnimatedProp')
|
||||
PauseTimeMult = base.config.GetFloat('zero-pause-mult', 1.0)
|
||||
PauseTimeMult = config.GetFloat('zero-pause-mult', 1.0)
|
||||
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),
|
||||
|
|
|
@ -26,7 +26,7 @@ class InteractiveAnimatedProp(GenericAnimatedProp.GenericAnimatedProp, FSM.FSM):
|
|||
ZoneToFightAnims = {}
|
||||
ZoneToVictoryAnims = {}
|
||||
ZoneToSadAnims = {}
|
||||
IdlePauseTime = base.config.GetFloat('prop-idle-pause-time', 0.0)
|
||||
IdlePauseTime = config.GetFloat('prop-idle-pause-time', 0.0)
|
||||
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 config.GetBool('props-buff-battles', True):
|
||||
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 config.GetBool('interactive-prop-random-idles', 1):
|
||||
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 config.GetBool('randomize-interactive-idles', True):
|
||||
pairs = []
|
||||
for i in xrange(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 config.GetBool('interactive-prop-info', False):
|
||||
idleAnimAndSound.append(printFunc)
|
||||
else:
|
||||
idleAnimAndSound = Parallel(animIval, soundIval)
|
||||
if base.config.GetBool('interactive-prop-info', False):
|
||||
if config.GetBool('interactive-prop-info', False):
|
||||
idleAnimAndSound.append(printFunc)
|
||||
return idleAnimAndSound
|
||||
|
||||
def printAnimIfClose(self, animKey):
|
||||
if base.config.GetBool('interactive-prop-info', False):
|
||||
if config.GetBool('interactive-prop-info', False):
|
||||
try:
|
||||
animName = self.node.getAnimFilename(animKey)
|
||||
baseAnimName = animName.split('/')[-1]
|
||||
|
|
|
@ -176,7 +176,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 = config.GetFloat('prop-idle-pause-time', 0.0)
|
||||
|
||||
def __init__(self, node):
|
||||
InteractiveAnimatedProp.InteractiveAnimatedProp.__init__(self, node, ToontownGlobals.MAILBOXES_BUFF_BATTLES)
|
||||
|
|
|
@ -4,7 +4,7 @@ from direct.directnotify import DirectNotifyGlobal
|
|||
|
||||
class MailboxOneAnimatedProp(ZeroAnimatedProp.ZeroAnimatedProp):
|
||||
notify = DirectNotifyGlobal.directNotify.newCategory('MailboxOneAnimatedProp')
|
||||
PauseTimeMult = base.config.GetFloat('zero-pause-mult', 1.0)
|
||||
PauseTimeMult = config.GetFloat('zero-pause-mult', 1.0)
|
||||
PhaseInfo = {0: ('tt_a_ara_dod_mailbox_firstMoveFlagSpin1', 40 * PauseTimeMult),
|
||||
1: (('tt_a_ara_dod_mailbox_firstMoveStruggle', 'tt_a_ara_dod_mailbox_firstMoveJump'), 20 * PauseTimeMult),
|
||||
2: ('tt_a_ara_dod_mailbox_firstMoveFlagSpin2', 10 * PauseTimeMult),
|
||||
|
|
|
@ -4,7 +4,7 @@ from direct.directnotify import DirectNotifyGlobal
|
|||
|
||||
class MailboxTwoAnimatedProp(ZeroAnimatedProp.ZeroAnimatedProp):
|
||||
notify = DirectNotifyGlobal.directNotify.newCategory('MailboxTwoAnimatedProp')
|
||||
PauseTimeMult = base.config.GetFloat('zero-pause-mult', 1.0)
|
||||
PauseTimeMult = config.GetFloat('zero-pause-mult', 1.0)
|
||||
PhaseInfo = {0: ('tt_a_ara_dod_mailbox_firstMoveFlagSpin1', 40 * PauseTimeMult),
|
||||
1: (('tt_a_ara_dod_mailbox_firstMoveStruggle', 'tt_a_ara_dod_mailbox_firstMoveJump'), 20 * PauseTimeMult),
|
||||
2: ('tt_a_ara_dod_mailbox_firstMoveFlagSpin2', 10 * PauseTimeMult),
|
||||
|
|
|
@ -4,7 +4,7 @@ from direct.directnotify import DirectNotifyGlobal
|
|||
|
||||
class MailboxZeroAnimatedProp(ZeroAnimatedProp.ZeroAnimatedProp):
|
||||
notify = DirectNotifyGlobal.directNotify.newCategory('MailboxZeroAnimatedProp')
|
||||
PauseTimeMult = base.config.GetFloat('zero-pause-mult', 1.0)
|
||||
PauseTimeMult = config.GetFloat('zero-pause-mult', 1.0)
|
||||
PhaseInfo = {0: ('tt_a_ara_dod_mailbox_firstMoveFlagSpin1', 40 * PauseTimeMult),
|
||||
1: (('tt_a_ara_dod_mailbox_firstMoveStruggle', 'tt_a_ara_dod_mailbox_firstMoveJump'), 20 * PauseTimeMult),
|
||||
2: ('tt_a_ara_dod_mailbox_firstMoveFlagSpin2', 10 * PauseTimeMult),
|
||||
|
|
|
@ -147,7 +147,7 @@ class Place(StateData.StateData, FriendsListManager.FriendsListManager):
|
|||
return 1
|
||||
|
||||
def handleTeleportQuery(self, fromAvatar, toAvatar):
|
||||
if base.config.GetBool('want-tptrack', False):
|
||||
if config.GetBool('want-tptrack', False):
|
||||
if toAvatar == localAvatar:
|
||||
toAvatar.doTeleportResponse(fromAvatar, toAvatar, toAvatar.doId, 1, toAvatar.defaultShard, base.cr.playGame.getPlaceId(), self.getZoneId(), fromAvatar.doId)
|
||||
else:
|
||||
|
@ -635,7 +635,7 @@ class Place(StateData.StateData, FriendsListManager.FriendsListManager):
|
|||
base.localAvatar.b_setAnimState('Died', 1, callback, [requestStatus])
|
||||
base.localAvatar.obscureMoveFurnitureButton(1)
|
||||
return
|
||||
|
||||
|
||||
def __pgdiedDone(self):
|
||||
self.fsm.request('walk')
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ class StreetSign(DistributedObject.DistributedObject):
|
|||
RedownloadTaskName = 'RedownloadStreetSign'
|
||||
StreetSignFileName = config.GetString('street-sign-filename', 'texture.jpg')
|
||||
StreetSignBaseDir = config.GetString('street-sign-base-dir', 'sign')
|
||||
StreetSignUrl = base.config.GetString('street-sign-url', 'http://cdn.toontown.disney.go.com/toontown/en/street-signs/img/')
|
||||
StreetSignUrl = config.GetString('street-sign-url', 'http://cdn.toontown.disney.go.com/toontown/en/street-signs/img/')
|
||||
notify = DirectNotifyGlobal.directNotify.newCategory('StreetSign')
|
||||
|
||||
def __init__(self):
|
||||
|
|
|
@ -178,7 +178,7 @@ class TrashcanInteractiveProp(InteractiveAnimatedProp.InteractiveAnimatedProp):
|
|||
'tt_a_ara_mml_trashcan_fightIdle'),
|
||||
ToontownGlobals.TheBrrrgh: ('tt_a_ara_tbr_trashcan_fightBoost', 'tt_a_ara_tbr_trashcan_fightCheer', 'tt_a_ara_tbr_trashcan_fightIdle'),
|
||||
ToontownGlobals.DonaldsDreamland: ('tt_a_ara_ddl_trashcan_fightBoost', 'tt_a_ara_ddl_trashcan_fightCheer', 'tt_a_ara_ddl_trashcan_fightIdle')}
|
||||
IdlePauseTime = base.config.GetFloat('prop-idle-pause-time', 0.0)
|
||||
IdlePauseTime = config.GetFloat('prop-idle-pause-time', 0.0)
|
||||
|
||||
def __init__(self, node):
|
||||
InteractiveAnimatedProp.InteractiveAnimatedProp.__init__(self, node, ToontownGlobals.TRASHCANS_BUFF_BATTLES)
|
||||
|
|
|
@ -4,7 +4,7 @@ from direct.directnotify import DirectNotifyGlobal
|
|||
|
||||
class TrashcanOneAnimatedProp(ZeroAnimatedProp.ZeroAnimatedProp):
|
||||
notify = DirectNotifyGlobal.directNotify.newCategory('TrashcanOneAnimatedProp')
|
||||
PauseTimeMult = base.config.GetFloat('zero-pause-mult', 1.0)
|
||||
PauseTimeMult = config.GetFloat('zero-pause-mult', 1.0)
|
||||
PhaseInfo = {0: ('tt_a_ara_dga_trashcan_firstMoveLidFlip1', 40 * PauseTimeMult),
|
||||
1: ('tt_a_ara_dga_trashcan_firstMoveStruggle', 20 * PauseTimeMult),
|
||||
2: ('tt_a_ara_dga_trashcan_firstMoveLidFlip2', 10 * PauseTimeMult),
|
||||
|
|
|
@ -4,7 +4,7 @@ from direct.directnotify import DirectNotifyGlobal
|
|||
|
||||
class TrashcanTwoAnimatedProp(ZeroAnimatedProp.ZeroAnimatedProp):
|
||||
notify = DirectNotifyGlobal.directNotify.newCategory('TrashcanTwoAnimatedProp')
|
||||
PauseTimeMult = base.config.GetFloat('zero-pause-mult', 1.0)
|
||||
PauseTimeMult = config.GetFloat('zero-pause-mult', 1.0)
|
||||
PhaseInfo = {0: ('tt_a_ara_dga_trashcan_firstMoveLidFlip1', 40 * PauseTimeMult),
|
||||
1: ('tt_a_ara_dga_trashcan_firstMoveStruggle', 20 * PauseTimeMult),
|
||||
2: ('tt_a_ara_dga_trashcan_firstMoveLidFlip2', 10 * PauseTimeMult),
|
||||
|
|
|
@ -4,7 +4,7 @@ from direct.directnotify import DirectNotifyGlobal
|
|||
|
||||
class TrashcanZeroAnimatedProp(ZeroAnimatedProp.ZeroAnimatedProp):
|
||||
notify = DirectNotifyGlobal.directNotify.newCategory('TrashcanZeroAnimatedProp')
|
||||
PauseTimeMult = base.config.GetFloat('zero-pause-mult', 1.0)
|
||||
PauseTimeMult = config.GetFloat('zero-pause-mult', 1.0)
|
||||
PhaseInfo = {0: ('tt_a_ara_dga_trashcan_firstMoveLidFlip1', 40 * PauseTimeMult),
|
||||
1: ('tt_a_ara_dga_trashcan_firstMoveStruggle', 20 * PauseTimeMult),
|
||||
2: ('tt_a_ara_dga_trashcan_firstMoveLidFlip2', 10 * PauseTimeMult),
|
||||
|
|
|
@ -95,7 +95,7 @@ class ZeroAnimatedProp(GenericAnimatedProp.GenericAnimatedProp, FSM.FSM):
|
|||
|
||||
def chooseAnimToRun(self):
|
||||
result = self.curPhase
|
||||
if base.config.GetBool('anim-props-randomized', True):
|
||||
if config.GetBool('anim-props-randomized', True):
|
||||
pairs = []
|
||||
for i in xrange(self.curPhase + 1):
|
||||
pairs.append((math.pow(2, i), i))
|
||||
|
|
|
@ -19,7 +19,7 @@ class AccountServerDate:
|
|||
if self.__grabbed and not force:
|
||||
self.notify.debug('using cached account server date')
|
||||
return
|
||||
if base.cr.accountOldAuth or base.config.GetBool('use-local-date', 0):
|
||||
if base.cr.accountOldAuth or config.GetBool('use-local-date', 0):
|
||||
self.__useLocalClock()
|
||||
return
|
||||
url = URLSpec(self.getServer())
|
||||
|
|
|
@ -240,7 +240,7 @@ class AvatarChoice(DirectButton):
|
|||
self.deleteWithPasswordFrame.hide()
|
||||
base.transitions.noTransitions()
|
||||
messenger.send(self.doneEvent, ['delete', self.position])
|
||||
if base.config.GetBool('want-qa-regression', 0):
|
||||
if config.GetBool('want-qa-regression', 0):
|
||||
self.notify.info('QA-REGRESSION: DELETEATOON: Deleting A Toon')
|
||||
else:
|
||||
if errorMsg is not None:
|
||||
|
@ -259,7 +259,7 @@ class AvatarChoice(DirectButton):
|
|||
self.deleteWithPasswordFrame.hide()
|
||||
base.transitions.noTransitions()
|
||||
messenger.send(self.doneEvent, ['delete', self.position])
|
||||
if base.config.GetBool('want-qa-regression', 0):
|
||||
if config.GetBool('want-qa-regression', 0):
|
||||
self.notify.info('QA-REGRESSION: DELETEATOON: Deleting A Toon')
|
||||
else:
|
||||
self.deleteWithPasswordFrame['text'] = TTLocalizer.AvatarChoiceDeleteWrongConfirm % {'name': self.name,
|
||||
|
|
|
@ -58,7 +58,7 @@ class AvatarChooser(StateData.StateData):
|
|||
self.pickAToonBG.setBin('background', 1)
|
||||
self.pickAToonBG.reparentTo(aspect2d)
|
||||
base.setBackgroundColor(Vec4(0.145, 0.368, 0.78, 1))
|
||||
choice = base.config.GetInt('auto-avatar-choice', -1)
|
||||
choice = config.GetInt('auto-avatar-choice', -1)
|
||||
for panel in self.panelList:
|
||||
panel.show()
|
||||
self.accept(panel.doneEvent, self.__handlePanelDone)
|
||||
|
|
|
@ -91,7 +91,7 @@ class MakeAToon(StateData.StateData):
|
|||
|
||||
def enter(self):
|
||||
self.notify.debug('Starting Make A Toon.')
|
||||
if base.config.GetBool('want-qa-regression', 0):
|
||||
if config.GetBool('want-qa-regression', 0):
|
||||
self.notify.info('QA-REGRESSION: MAKEATOON: Starting Make A Toon')
|
||||
base.cr.centralLogger.writeClientEvent('MAT - startingMakeAToon')
|
||||
base.camLens.setFov(ToontownGlobals.MakeAToonCameraFov)
|
||||
|
@ -252,8 +252,8 @@ class MakeAToon(StateData.StateData):
|
|||
self.cls.load()
|
||||
self.ns.load()
|
||||
self.music = base.loadMusic('phase_3/audio/bgm/create_a_toon.ogg')
|
||||
self.musicVolume = base.config.GetFloat('makeatoon-music-volume', 1)
|
||||
self.sfxVolume = base.config.GetFloat('makeatoon-sfx-volume', 1)
|
||||
self.musicVolume = config.GetFloat('makeatoon-music-volume', 1)
|
||||
self.sfxVolume = config.GetFloat('makeatoon-sfx-volume', 1)
|
||||
self.soundBack = base.loadSfx('phase_3/audio/sfx/GUI_create_toon_back.ogg')
|
||||
self.crashSounds = []
|
||||
self.crashSounds.append(base.loadSfx('phase_3/audio/sfx/tt_s_ara_mat_crash_boing.ogg'))
|
||||
|
@ -598,7 +598,7 @@ class MakeAToon(StateData.StateData):
|
|||
self.ns.rejectName(TTLocalizer.RejectNameText)
|
||||
|
||||
def __handleNameShopDone(self):
|
||||
if base.config.GetBool('want-qa-regression', 0):
|
||||
if config.GetBool('want-qa-regression', 0):
|
||||
self.notify.info('QA-REGRESSION: MAKEATOON: Creating A Toon')
|
||||
self.guiLastButton.hide()
|
||||
self.guiCheckButton.hide()
|
||||
|
|
|
@ -1023,12 +1023,12 @@ class NameShop(StateData.StateData):
|
|||
def __openTutorialDialog(self, choice = 0):
|
||||
if choice == 1:
|
||||
self.notify.debug('enterTutorial')
|
||||
if base.config.GetBool('want-qa-regression', 0):
|
||||
if config.GetBool('want-qa-regression', 0):
|
||||
self.notify.info('QA-REGRESSION: ENTERTUTORIAL: Enter Tutorial')
|
||||
self.__createAvatar()
|
||||
else:
|
||||
self.notify.debug('skipTutorial')
|
||||
if base.config.GetBool('want-qa-regression', 0):
|
||||
if config.GetBool('want-qa-regression', 0):
|
||||
self.notify.info('QA-REGRESSION: SKIPTUTORIAL: Skip Tutorial')
|
||||
self.__handleSkipTutorial()
|
||||
self.promptTutorialDialog.destroy()
|
||||
|
|
|
@ -364,7 +364,7 @@ class DistributedCannonGame(DistributedMinigame):
|
|||
DistributedMinigame.setGameStart(self, timestamp)
|
||||
self.__stopIntro()
|
||||
self.__putCameraBehindCannon()
|
||||
if not base.config.GetBool('endless-cannon-game', 0):
|
||||
if not config.GetBool('endless-cannon-game', 0):
|
||||
self.timer.show()
|
||||
self.timer.countdown(CannonGameGlobals.GameTime, self.__gameTimerExpired)
|
||||
self.rewardPanel.reparentTo(base.a2dTopRight)
|
||||
|
|
|
@ -634,7 +634,7 @@ class DistributedCatchGame(DistributedMinigame):
|
|||
self.timer.hide()
|
||||
|
||||
#For the Alpha Blueprint ARG
|
||||
if base.config.GetBool('want-blueprint4-ARG', False):
|
||||
if config.GetBool('want-blueprint4-ARG', False):
|
||||
MinigameGlobals.generateDebugARGPhrase()
|
||||
|
||||
if self.fruitsCaught >= self.numFruits:
|
||||
|
|
|
@ -43,7 +43,7 @@ class DistributedCogThiefGame(DistributedMinigame):
|
|||
self.cogInfo = {}
|
||||
self.lastTimeControlPressed = 0
|
||||
self.stolenBarrels = []
|
||||
self.useOrthoWalk = base.config.GetBool('cog-thief-ortho', 0)
|
||||
self.useOrthoWalk = config.GetBool('cog-thief-ortho', 0)
|
||||
self.resultIval = None
|
||||
self.gameIsEnding = False
|
||||
self.__textGen = TextNode('cogThiefGame')
|
||||
|
@ -250,7 +250,7 @@ class DistributedCogThiefGame(DistributedMinigame):
|
|||
return
|
||||
self.notify.debug('setGameStart')
|
||||
DistributedMinigame.setGameStart(self, timestamp)
|
||||
if not base.config.GetBool('cog-thief-endless', 0):
|
||||
if not config.GetBool('cog-thief-endless', 0):
|
||||
self.timer.show()
|
||||
self.timer.countdown(CTGG.GameTime, self.__gameTimerExpired)
|
||||
self.clockStopTime = None
|
||||
|
@ -321,7 +321,7 @@ class DistributedCogThiefGame(DistributedMinigame):
|
|||
camera.reparentTo(render)
|
||||
p = self.cameraTopView
|
||||
camera.setPosHpr(p[0], p[1], p[2], p[3], p[4], p[5])
|
||||
camera.setZ(camera.getZ() + base.config.GetFloat('cog-thief-z-camera-adjust', 0.0))
|
||||
camera.setZ(camera.getZ() + config.GetFloat('cog-thief-z-camera-adjust', 0.0))
|
||||
|
||||
def destroyGameWalk(self):
|
||||
self.notify.debug('destroyOrthoWalk')
|
||||
|
@ -766,8 +766,8 @@ class DistributedCogThiefGame(DistributedMinigame):
|
|||
self.stolenBarrels.append(barrelIndex)
|
||||
barrel = self.barrels[barrelIndex]
|
||||
barrel.hide()
|
||||
if base.config.GetBool('cog-thief-check-barrels', 1):
|
||||
if not base.config.GetBool('cog-thief-endless', 0):
|
||||
if config.GetBool('cog-thief-check-barrels', 1):
|
||||
if not config.GetBool('cog-thief-endless', 0):
|
||||
if len(self.stolenBarrels) == len(self.barrels):
|
||||
localStamp = globalClockDelta.networkToLocalTime(timestamp, bits=32)
|
||||
gameTime = self.local2GameTime(localStamp)
|
||||
|
@ -838,7 +838,7 @@ class DistributedCogThiefGame(DistributedMinigame):
|
|||
return False
|
||||
|
||||
def getNumCogs(self):
|
||||
result = base.config.GetInt('cog-thief-num-cogs', 0)
|
||||
result = config.GetInt('cog-thief-num-cogs', 0)
|
||||
if not result:
|
||||
safezone = self.getSafezoneId()
|
||||
result = CTGG.calculateCogs(self.numPlayers, safezone)
|
||||
|
@ -899,7 +899,7 @@ class DistributedCogThiefGame(DistributedMinigame):
|
|||
self.resultIval = Parallel(textTrack, soundTrack)
|
||||
self.resultIval.start()
|
||||
#For the Alpha Blueprint ARG
|
||||
if base.config.GetBool('want-blueprint4-ARG', False):
|
||||
if config.GetBool('want-blueprint4-ARG', False):
|
||||
MinigameGlobals.generateDebugARGPhrase()
|
||||
|
||||
def __genText(self, text):
|
||||
|
|
|
@ -1095,7 +1095,7 @@ class DistributedMazeGame(DistributedMinigame):
|
|||
self.showScoreTrack.start()
|
||||
|
||||
#For the Alpha Blueprint ARG
|
||||
if base.config.GetBool('want-blueprint4-ARG', False):
|
||||
if config.GetBool('want-blueprint4-ARG', False):
|
||||
MinigameGlobals.generateDebugARGPhrase()
|
||||
|
||||
def exitShowScores(self):
|
||||
|
|
|
@ -891,7 +891,7 @@ class DistributedPhotoGame(DistributedMinigame, PhotoGameBase.PhotoGameBase):
|
|||
DistributedMinigame.setGameStart(self, timestamp)
|
||||
self.__stopIntro()
|
||||
self.__putCameraOnTripod()
|
||||
if not base.config.GetBool('endless-cannon-game', 0):
|
||||
if not config.GetBool('endless-cannon-game', 0):
|
||||
self.timer.show()
|
||||
self.timer.countdown(self.data['TIME'], self.__gameTimerExpired)
|
||||
self.filmPanel.reparentTo(base.a2dTopRight)
|
||||
|
|
|
@ -944,7 +944,7 @@ class DistributedTugOfWarGame(DistributedMinigame):
|
|||
return
|
||||
if self.suit:
|
||||
#For the Alpha Blueprint ARG
|
||||
if base.config.GetBool('want-blueprint4-ARG', False):
|
||||
if config.GetBool('want-blueprint4-ARG', False):
|
||||
MinigameGlobals.generateDebugARGPhrase()
|
||||
if self.suitId in winners:
|
||||
newPos = VBase3(2.65, 18, 0.1)
|
||||
|
|
|
@ -243,7 +243,7 @@ class DistributedTwoDGame(DistributedMinigame):
|
|||
self.showScoreTrack.start()
|
||||
|
||||
#For the Alpha Blueprint ARG
|
||||
if base.config.GetBool('want-blueprint4-ARG', False):
|
||||
if config.GetBool('want-blueprint4-ARG', False):
|
||||
MinigameGlobals.generateDebugARGPhrase()
|
||||
|
||||
def exitShowScores(self):
|
||||
|
|
|
@ -34,7 +34,7 @@ class CalendarGuiDay(DirectFrame):
|
|||
self.partiesInvitedToToday = []
|
||||
self.hostedPartiesToday = []
|
||||
self.yearlyHolidaysToday = []
|
||||
self.showMarkers = base.config.GetBool('show-calendar-markers', 0)
|
||||
self.showMarkers = config.GetBool('show-calendar-markers', 0)
|
||||
self.filter = ToontownGlobals.CalendarFilterShowAll
|
||||
self.load()
|
||||
self.createGuiObjects()
|
||||
|
@ -181,7 +181,7 @@ class CalendarGuiDay(DirectFrame):
|
|||
self.addTitleAndDescToScrollList(holidayName, holidayDesc)
|
||||
|
||||
self.scrollList.refresh()
|
||||
if base.config.GetBool('calendar-test-items', 0):
|
||||
if config.GetBool('calendar-test-items', 0):
|
||||
if self.myDate.date() + datetime.timedelta(days=-1) == base.cr.toontownTimeManager.getCurServerDateTime().date():
|
||||
testItems = ('1:00 AM Party', '2:00 AM CEO', '11:15 AM Party', '5:30 PM CJ', '11:00 PM Party', 'Really Really Long String')
|
||||
for text in testItems:
|
||||
|
|
|
@ -18,7 +18,7 @@ class CalendarGuiMonth(DirectFrame):
|
|||
if self.onlyFutureDaysClickable:
|
||||
self.onlyFutureMonthsClickable = True
|
||||
DirectFrame.__init__(self, parent=parent, scale=scale, pos=pos)
|
||||
self.showMarkers = base.config.GetBool('show-calendar-markers', 0)
|
||||
self.showMarkers = config.GetBool('show-calendar-markers', 0)
|
||||
self.load()
|
||||
self.createGuiObjects()
|
||||
self.lastSelectedDate = None
|
||||
|
|
|
@ -19,7 +19,7 @@ class DistributedPartyTeamActivity(DistributedPartyActivity):
|
|||
self._maxPlayersPerTeam = 0
|
||||
self._minPlayersPerTeam = 0
|
||||
self._duration = 0
|
||||
self._startDelay = base.config.GetFloat('party-team-activity-start-delay', startDelay)
|
||||
self._startDelay = config.GetFloat('party-team-activity-start-delay', startDelay)
|
||||
self._willBalanceTeams = balanceTeams
|
||||
self._currentStatus = ''
|
||||
return
|
||||
|
|
|
@ -276,7 +276,7 @@ class Party(Place.Place):
|
|||
if self.isPartyEnding:
|
||||
teleportNotify.debug('party ending, sending teleportResponse')
|
||||
fromAvatar.d_teleportResponse(toAvatar.doId, 0, toAvatar.defaultShard, base.cr.playGame.getPlaceId(), self.getZoneId())
|
||||
elif base.config.GetBool('want-tptrack', False):
|
||||
elif config.GetBool('want-tptrack', False):
|
||||
if toAvatar == localAvatar:
|
||||
localAvatar.doTeleportResponse(fromAvatar, toAvatar, toAvatar.doId, 1, toAvatar.defaultShard, base.cr.playGame.getPlaceId(), self.getZoneId(), fromAvatar.doId)
|
||||
else:
|
||||
|
|
|
@ -59,7 +59,7 @@ class PartyPlanner(DirectFrame, FSM):
|
|||
'minute': (15, -15),
|
||||
'ampm': (1, -1)}
|
||||
self.partyInfo = None
|
||||
self.asapMinuteRounding = base.config.GetInt('party-asap-minute-rounding', PartyGlobals.PartyPlannerAsapMinuteRounding)
|
||||
self.asapMinuteRounding = config.GetInt('party-asap-minute-rounding', PartyGlobals.PartyPlannerAsapMinuteRounding)
|
||||
self.load()
|
||||
self.request('Welcome')
|
||||
return
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue