global: Clean up usage of base.config (using builtin config).

This commit is contained in:
Harvir 2014-08-15 00:35:01 +01:00
parent 575dded46d
commit 431732ac5a
146 changed files with 408 additions and 408 deletions

View file

@ -20,14 +20,14 @@ class TimeManager(DistributedObject.DistributedObject):
def __init__(self, cr): def __init__(self, cr):
DistributedObject.DistributedObject.__init__(self, cr) DistributedObject.DistributedObject.__init__(self, cr)
self.updateFreq = base.config.GetFloat('time-manager-freq', 1800) self.updateFreq = config.GetFloat('time-manager-freq', 1800)
self.minWait = base.config.GetFloat('time-manager-min-wait', 10) self.minWait = config.GetFloat('time-manager-min-wait', 10)
self.maxUncertainty = base.config.GetFloat('time-manager-max-uncertainty', 0.25) self.maxUncertainty = config.GetFloat('time-manager-max-uncertainty', 0.25)
self.maxAttempts = base.config.GetInt('time-manager-max-attempts', 5) self.maxAttempts = config.GetInt('time-manager-max-attempts', 5)
self.extraSkew = base.config.GetInt('time-manager-extra-skew', 0) self.extraSkew = config.GetInt('time-manager-extra-skew', 0)
if self.extraSkew != 0: if self.extraSkew != 0:
self.notify.info('Simulating clock skew of %0.3f s' % self.extraSkew) 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.talkResult = 0
self.thisContext = -1 self.thisContext = -1
self.nextContext = 0 self.nextContext = 0
@ -45,7 +45,7 @@ class TimeManager(DistributedObject.DistributedObject):
DistributedObject.DistributedObject.generate(self) DistributedObject.DistributedObject.generate(self)
self.accept(OTPGlobals.SynchronizeHotkey, self.handleHotkey) self.accept(OTPGlobals.SynchronizeHotkey, self.handleHotkey)
self.accept('clock_error', self.handleClockError) 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) self.accept(OTPGlobals.DetectGarbageHotkey, self.handleDetectGarbageHotkey)
if self.updateFreq > 0: if self.updateFreq > 0:
self.startTask() self.startTask()
@ -210,7 +210,7 @@ class TimeManager(DistributedObject.DistributedObject):
if frameRateInterval == 0: if frameRateInterval == 0:
return return
if not base.frameRateMeter: 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)) globalClock.setAverageFrameRateInterval(min(frameRateInterval, maxFrameRateInterval))
taskMgr.remove('frameRateMonitor') taskMgr.remove('frameRateMonitor')
taskMgr.doMethodLater(frameRateInterval, self.frameRateMonitor, 'frameRateMonitor') taskMgr.doMethodLater(frameRateInterval, self.frameRateMonitor, 'frameRateMonitor')

View file

@ -326,12 +326,12 @@ class Avatar(Actor, ShadowCaster):
sfxIndex = 5 sfxIndex = 5
else: else:
notify.error('unrecognized dialogue type: ', type) notify.error('unrecognized dialogue type: ', type)
# The standard cog phrase gets too repetitive when there are so many cogs running around. # The standard cog phrase gets too repetitive when there are so many cogs running around.
# Let's just choose a random one. # 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 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: if sfxIndex != None and sfxIndex < len(dialogueArray) and dialogueArray[sfxIndex] != None:
base.playSfx(dialogueArray[sfxIndex], node=self) base.playSfx(dialogueArray[sfxIndex], node=self)
return return

View file

@ -15,7 +15,7 @@ from otp.otpbase import OTPGlobals
from otp.avatar.Avatar import teleportNotify from otp.avatar.Avatar import teleportNotify
from otp.distributed.TelemetryLimited import TelemetryLimited from otp.distributed.TelemetryLimited import TelemetryLimited
from otp.ai.MagicWordGlobal import * 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 from otp.switchboard import badwordpy
import os import os
badwordpy.init(os.environ.get('OTP') + '\\src\\switchboard\\', '') badwordpy.init(os.environ.get('OTP') + '\\src\\switchboard\\', '')
@ -45,7 +45,7 @@ class DistributedPlayer(DistributedAvatar.DistributedAvatar, PlayerBase.PlayerBa
self.DISLid = 0 self.DISLid = 0
self.adminAccess = 0 self.adminAccess = 0
self.autoRun = 0 self.autoRun = 0
self.whiteListEnabled = base.config.GetBool('whitelist-chat-enabled', 1) self.whiteListEnabled = config.GetBool('whitelist-chat-enabled', 1)
return return
@ -225,8 +225,8 @@ class DistributedPlayer(DistributedAvatar.DistributedAvatar, PlayerBase.PlayerBa
if self.cr.wantMagicWords and len(chatString) > 0 and chatString[0] == '~': if self.cr.wantMagicWords and len(chatString) > 0 and chatString[0] == '~':
messenger.send('magicWord', [chatString]) messenger.send('magicWord', [chatString])
else: else:
if base.config.GetBool('want-chatfilter-hacks', 0): if config.GetBool('want-chatfilter-hacks', 0):
if base.config.GetBool('want-chatfilter-drop-offending', 0): if config.GetBool('want-chatfilter-drop-offending', 0):
if badwordpy.test(chatString): if badwordpy.test(chatString):
return return
else: else:
@ -356,7 +356,7 @@ class DistributedPlayer(DistributedAvatar.DistributedAvatar, PlayerBase.PlayerBa
teleportNotify.debug('party is ending') teleportNotify.debug('party is ending')
self.d_teleportResponse(self.doId, 0, 0, 0, 0, sendToId=requesterId) self.d_teleportResponse(self.doId, 0, 0, 0, 0, sendToId=requesterId)
return 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') teleportNotify.debug('teleport initiation successful')
self.setSystemMessage(requesterId, OTPLocalizer.WhisperComingToVisit % avatar.getName()) self.setSystemMessage(requesterId, OTPLocalizer.WhisperComingToVisit % avatar.getName())
messenger.send('teleportQuery', [avatar, self]) messenger.send('teleportQuery', [avatar, self])

View file

@ -30,13 +30,13 @@ from toontown.toonbase import ToontownGlobals
class LocalAvatar(DistributedAvatar.DistributedAvatar, DistributedSmoothNode.DistributedSmoothNode): class LocalAvatar(DistributedAvatar.DistributedAvatar, DistributedSmoothNode.DistributedSmoothNode):
notify = DirectNotifyGlobal.directNotify.newCategory('LocalAvatar') notify = DirectNotifyGlobal.directNotify.newCategory('LocalAvatar')
wantDevCameraPositions = base.config.GetBool('want-dev-camera-positions', 0) wantDevCameraPositions = config.GetBool('want-dev-camera-positions', 0)
wantMouse = base.config.GetBool('want-mouse', 0) wantMouse = config.GetBool('want-mouse', 0)
sleepTimeout = base.config.GetInt('sleep-timeout', 120) sleepTimeout = config.GetInt('sleep-timeout', 120)
swimTimeout = base.config.GetInt('afk-timeout', 600) swimTimeout = config.GetInt('afk-timeout', 600)
__enableMarkerPlacement = base.config.GetBool('place-markers', 0) __enableMarkerPlacement = config.GetBool('place-markers', 0)
acceptingNewFriends = base.config.GetBool('accepting-new-friends', 1) acceptingNewFriends = config.GetBool('accepting-new-friends', 1)
acceptingNonFriendWhispers = base.config.GetBool('accepting-non-friend-whispers', 0) acceptingNonFriendWhispers = config.GetBool('accepting-non-friend-whispers', 0)
def __init__(self, cr, chatMgr, talkAssistant = None, passMessagesThrough = False): def __init__(self, cr, chatMgr, talkAssistant = None, passMessagesThrough = False):
try: try:
@ -1263,14 +1263,14 @@ def collisionsOn():
if not base.localAvatar: if not base.localAvatar:
return 'No localAvatar!' return 'No localAvatar!'
base.localAvatar.collisionsOn() base.localAvatar.collisionsOn()
@magicWord(category=CATEGORY_MOBILITY) @magicWord(category=CATEGORY_MOBILITY)
def enableAFGravity(): def enableAFGravity():
"""Turn on Estate April Fools gravity.""" """Turn on Estate April Fools gravity."""
if not base.localAvatar: if not base.localAvatar:
return 'No localAvatar!' return 'No localAvatar!'
base.localAvatar.controlManager.currentControls.setGravity(ToontownGlobals.GravityValue * 0.75) base.localAvatar.controlManager.currentControls.setGravity(ToontownGlobals.GravityValue * 0.75)
@magicWord(category=CATEGORY_MOBILITY, types=[int, bool]) @magicWord(category=CATEGORY_MOBILITY, types=[int, bool])
def setGravity(gravityValue, overrideWarning=False): def setGravity(gravityValue, overrideWarning=False):
"""Set your gravity value!""" """Set your gravity value!"""
@ -1279,21 +1279,21 @@ def setGravity(gravityValue, overrideWarning=False):
if gravityValue < 1 and not overrideWarning: if gravityValue < 1 and not overrideWarning:
return 'A value lower than 1 may crash your client.' return 'A value lower than 1 may crash your client.'
base.localAvatar.controlManager.currentControls.setGravity(gravityValue) base.localAvatar.controlManager.currentControls.setGravity(gravityValue)
@magicWord(category=CATEGORY_MOBILITY) @magicWord(category=CATEGORY_MOBILITY)
def normalGravity(): def normalGravity():
"""Turn off Estate April Fools gravity.""" """Turn off Estate April Fools gravity."""
if not base.localAvatar: if not base.localAvatar:
return 'No localAvatar!' return 'No localAvatar!'
base.localAvatar.controlManager.currentControls.setGravity(ToontownGlobals.GravityValue * 2.0) base.localAvatar.controlManager.currentControls.setGravity(ToontownGlobals.GravityValue * 2.0)
@magicWord(category=CATEGORY_DEBUG) @magicWord(category=CATEGORY_DEBUG)
def getPos(): def getPos():
"""Get current position of your toon.""" """Get current position of your toon."""
if not base.localAvatar: if not base.localAvatar:
return 'No localAvatar!' return 'No localAvatar!'
return base.localAvatar.getPos() return base.localAvatar.getPos()
@magicWord(category=CATEGORY_DEBUG, types=[float, float, float]) @magicWord(category=CATEGORY_DEBUG, types=[float, float, float])
def setPos(toonX, toonY, toonZ): def setPos(toonX, toonY, toonZ):
"""Set position of your toon.""" """Set position of your toon."""

View file

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

View file

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

View file

@ -46,12 +46,12 @@ class ChatInputWhiteListFrame(FSM.FSM, DirectFrame):
wantHistory = 0 wantHistory = 0
if __dev__: if __dev__:
wantHistory = 1 wantHistory = 1
self.wantHistory = base.config.GetBool('want-chat-history', wantHistory) self.wantHistory = config.GetBool('want-chat-history', wantHistory)
self.history = [''] self.history = ['']
self.historySize = base.config.GetInt('chat-history-size', 10) self.historySize = config.GetInt('chat-history-size', 10)
self.historyIndex = 0 self.historyIndex = 0
self.promoteWhiteList = 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.whiteList = None
self.active = 0 self.active = 0
self.autoOff = 0 self.autoOff = 0
@ -193,7 +193,7 @@ class ChatInputWhiteListFrame(FSM.FSM, DirectFrame):
if text: if text:
self.chatEntry.set('') 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:]) text = self.__execMessage(text[1:])
base.localAvatar.setChatAbsolute(text, CFSpeech | CFTimeout) base.localAvatar.setChatAbsolute(text, CFSpeech | CFTimeout)
return return

View file

@ -39,7 +39,7 @@ def removeThoughtPrefix(message):
class ChatManager(DirectObject.DirectObject): class ChatManager(DirectObject.DirectObject):
notify = DirectNotifyGlobal.directNotify.newCategory('ChatManager') notify = DirectNotifyGlobal.directNotify.newCategory('ChatManager')
execChat = base.config.GetBool('exec-chat', 0) execChat = config.GetBool('exec-chat', 0)
def __init__(self, cr, localAvatar): def __init__(self, cr, localAvatar):
self.cr = cr self.cr = cr
@ -280,7 +280,7 @@ class ChatManager(DirectObject.DirectObject):
if hasManager: if hasManager:
if base.cr.playerFriendsManager.askAvatarOnline(avatarId): if base.cr.playerFriendsManager.askAvatarOnline(avatarId):
online = 1 online = 1
avatarUnderstandable = base.cr.config.GetBool('force-avatar-understandable', False) avatarUnderstandable = base.cr.config.GetBool('force-avatar-understandable', False)
playerUnderstandable = base.cr.config.GetBool('force-player-understandable', False) playerUnderstandable = base.cr.config.GetBool('force-player-understandable', False)
av = None av = None

View file

@ -17,7 +17,7 @@ ThoughtPrefix = '.'
class TalkAssistant(DirectObject.DirectObject): class TalkAssistant(DirectObject.DirectObject):
ExecNamespace = None ExecNamespace = None
notify = DirectNotifyGlobal.directNotify.newCategory('TalkAssistant') notify = DirectNotifyGlobal.directNotify.newCategory('TalkAssistant')
execChat = base.config.GetBool('exec-chat', 0) execChat = config.GetBool('exec-chat', 0)
def __init__(self): def __init__(self):
self.logWhispers = 1 self.logWhispers = 1
@ -26,7 +26,7 @@ class TalkAssistant(DirectObject.DirectObject):
self.zeroTimeDay = time.time() self.zeroTimeDay = time.time()
self.zeroTimeGame = globalClock.getRealTime() self.zeroTimeGame = globalClock.getRealTime()
self.floodThreshold = 10.0 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.lastWhisperDoId = None
self.lastWhisperPlayerId = None self.lastWhisperPlayerId = None
self.lastWhisper = None self.lastWhisper = None

View file

@ -195,19 +195,19 @@ class OTPClientRepository(ClientRepositoryBase):
self.loginInterface = LoginTTRAccount.LoginTTRAccount(self) self.loginInterface = LoginTTRAccount.LoginTTRAccount(self)
self.secretChatAllowed = base.config.GetBool('allow-secret-chat', 0) self.secretChatAllowed = config.GetBool('allow-secret-chat', 0)
self.openChatAllowed = base.config.GetBool('allow-open-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.shardListHandle = None
self.uberZoneInterest = None self.uberZoneInterest = None
self.wantSwitchboard = config.GetBool('want-switchboard', 0) 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.__pendingGenerates = {}
self.__pendingMessages = {} self.__pendingMessages = {}
@ -494,7 +494,7 @@ class OTPClientRepository(ClientRepositoryBase):
if self.checkHttp(): if self.checkHttp():
for server in self.serverList: for server in self.serverList:
self.http.addPreapprovedServerCertificateFilename(server, Filename('/phase_3/etc/TTRCA.crt')) 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.http.addPreapprovedServerCertificateFilename(server, Filename('/phase_3/etc/TTRDev.crt'))
self.connect(self.serverList, successCallback=self._sendHello, failureCallback=self.failedToConnect) self.connect(self.serverList, successCallback=self._sendHello, failureCallback=self.failedToConnect)
@ -733,7 +733,7 @@ class OTPClientRepository(ClientRepositoryBase):
@report(types=['args', 'deltaStamp'], dConfigParam='teleport') @report(types=['args', 'deltaStamp'], dConfigParam='teleport')
def waitForGetGameListResponse(self): def waitForGetGameListResponse(self):
if self.isGameListCorrect(): if self.isGameListCorrect():
if base.config.GetBool('game-server-tests', 0): if config.GetBool('game-server-tests', 0):
from otp.distributed import GameServerTestSuite from otp.distributed import GameServerTestSuite
GameServerTestSuite.GameServerTestSuite(self) GameServerTestSuite.GameServerTestSuite(self)
self.loginFSM.request('waitForShardList') self.loginFSM.request('waitForShardList')
@ -1080,7 +1080,7 @@ class OTPClientRepository(ClientRepositoryBase):
else: else:
logFunc = self.notify.warning logFunc = self.notify.warning
allowExit = False 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, logFunc('There are leaks: %s tasks, %s events, %s ivals, %s garbage cycles\nLeaked Events may be due to direct gui editing' % (leakedTasks,
leakedEvents, leakedEvents,
leakedIvals, leakedIvals,
@ -1487,7 +1487,7 @@ class OTPClientRepository(ClientRepositoryBase):
avId = self.handlerArgs['avId'] avId = self.handlerArgs['avId']
if not self.SupportTutorial or base.localAvatar.tutorialAck: if not self.SupportTutorial or base.localAvatar.tutorialAck:
self.gameFSM.request('playGame', [hoodId, zoneId, avId]) 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: if hasattr(self, 'skipTutorialRequest') and self.skipTutorialRequest:
self.gameFSM.request('skipTutorialRequest', [hoodId, zoneId, avId]) self.gameFSM.request('skipTutorialRequest', [hoodId, zoneId, avId])
else: else:
@ -1535,9 +1535,9 @@ class OTPClientRepository(ClientRepositoryBase):
def isFreeTimeExpired(self): def isFreeTimeExpired(self):
if self.accountOldAuth: if self.accountOldAuth:
return 0 return 0
if base.config.GetBool('free-time-expired', 0): if config.GetBool('free-time-expired', 0):
return 1 return 1
if base.config.GetBool('unlimited-free-time', 0): if config.GetBool('unlimited-free-time', 0):
return 0 return 0
if self.freeTimeExpiresAt == -1: if self.freeTimeExpiresAt == -1:
return 0 return 0
@ -1563,7 +1563,7 @@ class OTPClientRepository(ClientRepositoryBase):
return self.blue != None return self.blue != None
def isPaid(self): def isPaid(self):
paidStatus = base.config.GetString('force-paid-status', '') paidStatus = config.GetString('force-paid-status', '')
if not paidStatus: if not paidStatus:
return self.__isPaid return self.__isPaid
elif paidStatus == 'paid': elif paidStatus == 'paid':
@ -1581,7 +1581,7 @@ class OTPClientRepository(ClientRepositoryBase):
self.__isPaid = isPaid self.__isPaid = isPaid
def allowFreeNames(self): def allowFreeNames(self):
return base.config.GetInt('allow-free-names', 1) return config.GetInt('allow-free-names', 1)
def allowSecretChat(self): def allowSecretChat(self):
return self.secretChatAllowed or self.productName == 'Terra-DMC' and self.isBlue() and self.secretChatAllowed return self.secretChatAllowed or self.productName == 'Terra-DMC' and self.isBlue() and self.secretChatAllowed

View file

@ -53,7 +53,7 @@ class GuildManager(DistributedObjectGlobal):
self.id2Rank = {} self.id2Rank = {}
self.id2Online = {} self.id2Online = {}
self.pendingMsgs = [] self.pendingMsgs = []
self.whiteListEnabled = base.config.GetBool('whitelist-chat-enabled', 1) self.whiteListEnabled = config.GetBool('whitelist-chat-enabled', 1)
self.emailNotification = 0 self.emailNotification = 0
self.emailNotificationAddress = None self.emailNotificationAddress = None
self.receivingNewList = False self.receivingNewList = False

View file

@ -37,7 +37,7 @@ class DummyLauncherBase:
return return
def isTestServer(self): def isTestServer(self):
return base.config.GetBool('is-test-server', 0) return config.GetBool('is-test-server', 0)
def setPhaseCompleteArray(self, newPhaseComplete): def setPhaseCompleteArray(self, newPhaseComplete):
self.phaseComplete = newPhaseComplete self.phaseComplete = newPhaseComplete
@ -72,7 +72,7 @@ class DummyLauncherBase:
return self.ServerVersion return self.ServerVersion
def getIsNewInstallation(self): def getIsNewInstallation(self):
return base.config.GetBool('new-installation', 0) return config.GetBool('new-installation', 0)
def setIsNotNewInstallation(self): def setIsNotNewInstallation(self):
pass pass

View file

@ -1578,7 +1578,7 @@ class LauncherBase(DirectObject):
def getIsNewInstallation(self): def getIsNewInstallation(self):
result = self.getValue(self.NewInstallationKey, 1) result = self.getValue(self.NewInstallationKey, 1)
result = base.config.GetBool('new-installation', result) result = config.GetBool('new-installation', result)
return result return result
def setIsNotNewInstallation(self): def setIsNotNewInstallation(self):
@ -1855,7 +1855,7 @@ class LauncherBase(DirectObject):
self.notify.info("Third party programs installed:") self.notify.info("Third party programs installed:")
for hack in hacksInstalled.keys(): for hack in hacksInstalled.keys():
self.notify.info(hack) self.notify.info(hack)
if len(hacksRunning) > 0: if len(hacksRunning) > 0:
self.notify.info("Third party programs running:") self.notify.info("Third party programs running:")
for hack in hacksRunning.keys(): for hack in hacksRunning.keys():

View file

@ -24,11 +24,11 @@ class AccountServerConstants(RemoteValueSet):
'pricePerMonth': '9.95'} 'pricePerMonth': '9.95'}
noquery = 1 noquery = 1
if cr.productName == 'DisneyOnline-US': if cr.productName == 'DisneyOnline-US':
if base.config.GetBool('tt-specific-login', 0): if config.GetBool('tt-specific-login', 0):
pass pass
else: else:
noquery = 0 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.notify.debug('setting defaults, not using account server constants')
self.dict = {} self.dict = {}
for constantName in self.expectedConstants: for constantName in self.expectedConstants:

View file

@ -9,7 +9,7 @@ import copy
accountServer = '' accountServer = ''
accountServer = launcher.getAccountServer() accountServer = launcher.getAccountServer()
print 'TTAccount: accountServer from launcher: ', accountServer print 'TTAccount: accountServer from launcher: ', accountServer
configAccountServer = base.config.GetString('account-server', '') configAccountServer = config.GetString('account-server', '')
if configAccountServer: if configAccountServer:
accountServer = configAccountServer accountServer = configAccountServer
print 'TTAccount: overriding accountServer from config: ', accountServer print 'TTAccount: overriding accountServer from config: ', accountServer

View file

@ -12,7 +12,7 @@ class MarginCell(NodePath):
self.debugSquare = None self.debugSquare = None
self.debugMode = False self.debugMode = False
self.setDebug(base.config.GetBool('want-cell-debug', False)) self.setDebug(config.GetBool('want-cell-debug', False))
def setAvailable(self, available): def setAvailable(self, available):
if not available and self.hasContent(): if not available and self.hasContent():

View file

@ -45,7 +45,7 @@ class OTPBase(ShowBase):
return return
def setTaskChainNetThreaded(self): 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) taskMgr.setupTaskChain('net', numThreads=1, frameBudget=0.001, threadPriority=TPLow)
def setTaskChainNetNonthreaded(self): def setTaskChainNetNonthreaded(self):

View file

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

View file

@ -20,7 +20,7 @@ class CrashedLeaderBoardDecorator(HolidayDecorator.HolidayDecorator):
holidayIds = base.cr.newsManager.getDecorationHolidayId() holidayIds = base.cr.newsManager.getDecorationHolidayId()
if ToontownGlobals.CRASHED_LEADERBOARD not in holidayIds: if ToontownGlobals.CRASHED_LEADERBOARD not in holidayIds:
return return
if base.config.GetBool('want-crashedLeaderBoard-Smoke', 1): if config.GetBool('want-crashedLeaderBoard-Smoke', 1):
self.startSmokeEffect() self.startSmokeEffect()
def startSmokeEffect(self): def startSmokeEffect(self):
@ -32,7 +32,7 @@ class CrashedLeaderBoardDecorator(HolidayDecorator.HolidayDecorator):
base.cr.playGame.getPlace().loader.stopSmokeEffect() base.cr.playGame.getPlace().loader.stopSmokeEffect()
def undecorate(self): def undecorate(self):
if base.config.GetBool('want-crashedLeaderBoard-Smoke', 1): if config.GetBool('want-crashedLeaderBoard-Smoke', 1):
self.stopSmokeEffect() self.stopSmokeEffect()
holidayIds = base.cr.newsManager.getDecorationHolidayId() holidayIds = base.cr.newsManager.getDecorationHolidayId()
if len(holidayIds) > 0: if len(holidayIds) > 0:

View file

@ -34,7 +34,7 @@ class NewsManager(DistributedObject.DistributedObject):
self.population = 0 self.population = 0
self.invading = 0 self.invading = 0
forcedHolidayDecorations = base.config.GetString('force-holiday-decorations', '') forcedHolidayDecorations = config.GetString('force-holiday-decorations', '')
self.decorationHolidayIds = [] self.decorationHolidayIds = []
if forcedHolidayDecorations != '': if forcedHolidayDecorations != '':

View file

@ -33,7 +33,7 @@ class BattlePlace(Place.Place):
pass pass
def enterBattle(self, event): 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.notify.info('QA-REGRESSION: COGBATTLE: Enter Battle')
self.loader.music.stop() self.loader.music.stop()
base.playMusic(self.loader.battleMusic, looping=1, volume=0.9) base.playMusic(self.loader.battleMusic, looping=1, volume=0.9)

View file

@ -238,7 +238,7 @@ class PropPool:
self.propCache = [] self.propCache = []
self.propStrings = {} self.propStrings = {}
self.propTypes = {} self.propTypes = {}
self.maxPoolSize = base.config.GetInt('prop-pool-size', 8) self.maxPoolSize = config.GetInt('prop-pool-size', 8)
for p in Props: for p in Props:
phase = p[0] phase = p[0]
propName = p[1] propName = p[1]

View file

@ -11,7 +11,7 @@ class BattleSounds:
self.isValid = 0 self.isValid = 0
if self.mgr != None and self.mgr.isValid(): if self.mgr != None and self.mgr.isValid():
self.isValid = 1 self.isValid = 1
limit = base.config.GetInt('battle-sound-cache-size', 15) limit = config.GetInt('battle-sound-cache-size', 15)
self.mgr.setCacheLimit(limit) self.mgr.setCacheLimit(limit)
base.addSfxManager(self.mgr) base.addSfxManager(self.mgr)
self.setupSearchPath() self.setupSearchPath()

View file

@ -34,7 +34,7 @@ from otp.nametag.NametagConstants import *
from otp.nametag import NametagGlobals from otp.nametag import NametagGlobals
camPos = Point3(14, 0, 10) camPos = Point3(14, 0, 10)
camHpr = Vec3(89, -30, 0) camHpr = Vec3(89, -30, 0)
randomBattleTimestamp = base.config.GetBool('random-battle-timestamp', 0) randomBattleTimestamp = config.GetBool('random-battle-timestamp', 0)
class Movie(DirectObject.DirectObject): class Movie(DirectObject.DirectObject):
notify = DirectNotifyGlobal.directNotify.newCategory('Movie') notify = DirectNotifyGlobal.directNotify.newCategory('Movie')
@ -351,11 +351,11 @@ class Movie(DirectObject.DirectObject):
self.tutorialTom = NPCToons.createLocalNPC(20000) self.tutorialTom = NPCToons.createLocalNPC(20000)
self.tutorialTom.uniqueName = uniqueName 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.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.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.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: else:
self.tomDialogue03 = None self.tomDialogue03 = None
self.tomDialogue04 = None self.tomDialogue04 = None
@ -399,7 +399,7 @@ class Movie(DirectObject.DirectObject):
return return
def __doToonAttacks(self): 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') track = Sequence(name='toon-attacks')
camTrack = Sequence(name='toon-attacks-cam') camTrack = Sequence(name='toon-attacks-cam')
ival, camIval = MovieFire.doFires(self.__findToonAttack(FIRE)) ival, camIval = MovieFire.doFires(self.__findToonAttack(FIRE))
@ -878,7 +878,7 @@ class Movie(DirectObject.DirectObject):
return return
def __doSuitAttacks(self): def __doSuitAttacks(self):
if base.config.GetBool('want-suit-anims', 1): if config.GetBool('want-suit-anims', 1):
track = Sequence(name='suit-attacks') track = Sequence(name='suit-attacks')
camTrack = Sequence(name='suit-attacks-cam') camTrack = Sequence(name='suit-attacks-cam')
isLocalToonSad = False isLocalToonSad = False

View file

@ -352,7 +352,7 @@ def __createSuitDamageTrack(battle, suit, hp, lure, trapProp):
sinkPos1.setZ(sinkPos1.getZ() - 3.1) sinkPos1.setZ(sinkPos1.getZ() - 3.1)
sinkPos2.setZ(sinkPos2.getZ() - 9.1) sinkPos2.setZ(sinkPos2.getZ() - 9.1)
dropPos.setZ(dropPos.getZ() + 15) 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') nameTag = suit.find('**/def_nameTag')
else: else:
nameTag = suit.find('**/joint_nameTag') nameTag = suit.find('**/joint_nameTag')

View file

@ -26,7 +26,7 @@ WaterSprayColor = Point4(0.75, 0.75, 1.0, 0.8)
def doSquirts(squirts): def doSquirts(squirts):
if len(squirts) == 0: if len(squirts) == 0:
return (None, None) return (None, None)
suitSquirtsDict = {} suitSquirtsDict = {}
doneUber = 0 doneUber = 0
skip = 0 skip = 0
@ -50,7 +50,7 @@ def doSquirts(squirts):
suitSquirtsDict[suitId] = [squirt] suitSquirtsDict[suitId] = [squirt]
suitSquirts = suitSquirtsDict.values() suitSquirts = suitSquirtsDict.values()
def compFunc(a, b): def compFunc(a, b):
if len(a) > len(b): if len(a) > len(b):
return 1 return 1
@ -281,12 +281,12 @@ def __doFlower(squirt, delay, fShowStun):
lodnames = toon.getLODNames() lodnames = toon.getLODNames()
toonlod0 = toon.getLOD(lodnames[0]) toonlod0 = toon.getLOD(lodnames[0])
toonlod1 = toon.getLOD(lodnames[1]) 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(): if not toonlod0.find('**/def_joint_attachFlower').isEmpty():
flower_joint0 = toonlod0.find('**/def_joint_attachFlower') flower_joint0 = toonlod0.find('**/def_joint_attachFlower')
else: else:
flower_joint0 = toonlod0.find('**/joint_attachFlower') 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(): if not toonlod1.find('**/def_joint_attachFlower').isEmpty():
flower_joint1 = toonlod1.find('**/def_joint_attachFlower') flower_joint1 = toonlod1.find('**/def_joint_attachFlower')
else: else:
@ -350,7 +350,7 @@ def __doWaterGlass(squirt, delay, fShowStun):
def getSprayStartPos(toon = toon): def getSprayStartPos(toon = toon):
toon.update(0) toon.update(0)
lod0 = toon.getLOD(toon.getLODNames()[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(): if not lod0.find('**/def_head').isEmpty():
joint = lod0.find('**/def_head') joint = lod0.find('**/def_head')
else: else:

View file

@ -50,13 +50,13 @@ class ToonVictorySkipper(DirectObject):
self._ivals = ivals self._ivals = ivals
def _setupSkipListen(self, index): 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) func = Functor(self._skipToon, index)
self.accept('escape', func) self.accept('escape', func)
self.accept(RewardPanel.SkipBattleMovieEvent, func) self.accept(RewardPanel.SkipBattleMovieEvent, func)
def _teardownSkipListen(self, index): 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('escape')
self.ignore(RewardPanel.SkipBattleMovieEvent) self.ignore(RewardPanel.SkipBattleMovieEvent)

View file

@ -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))) 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') 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.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_skipSectionDown'),
self._battleGui.find('**/tt_t_gui_gen_skipSectionRollOver'), self._battleGui.find('**/tt_t_gui_gen_skipSectionRollOver'),
@ -197,7 +197,7 @@ class RewardPanel(DirectFrame):
self.missedItemFrame.hide() self.missedItemFrame.hide()
trackBarOffset = 0 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) self.skipButton['state'] = choice(noSkip, DGG.DISABLED, DGG.NORMAL)
for i in range(len(SuitDNA.suitDepts)): for i in range(len(SuitDNA.suitDepts)):
@ -652,7 +652,7 @@ class RewardPanel(DirectFrame):
else: else:
num = quest.doesCogCount(avId, cogDict, zoneId, toonShortList) num = quest.doesCogCount(avId, cogDict, zoneId, toonShortList)
if num: if num:
if base.config.GetBool('battle-passing-no-credit', True): if config.GetBool('battle-passing-no-credit', True):
if avId in helpfulToonsList: if avId in helpfulToonsList:
earned += num earned += num
else: else:

View file

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

View file

@ -349,7 +349,7 @@ class DistributedBuilding(DistributedObject.DistributedObject):
return return
def loadAnimToSuitSfx(self): 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') self.notify.info('QA-REGRESSION: COGBUILDING: Cog Take Over')
if self.cogDropSound == None: if self.cogDropSound == None:
self.cogDropSound = base.loadSfx(self.TAKEOVER_SFX_PREFIX + 'cogbldg_drop.ogg') self.cogDropSound = base.loadSfx(self.TAKEOVER_SFX_PREFIX + 'cogbldg_drop.ogg')
@ -359,7 +359,7 @@ class DistributedBuilding(DistributedObject.DistributedObject):
return return
def loadAnimToToonSfx(self): 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') self.notify.info('QA-REGRESSION: COGBUILDING: Toon Take Over')
if self.cogWeakenSound == None: if self.cogWeakenSound == None:
self.cogWeakenSound = base.loadSfx(self.TAKEOVER_SFX_PREFIX + 'cogbldg_weaken.ogg') self.cogWeakenSound = base.loadSfx(self.TAKEOVER_SFX_PREFIX + 'cogbldg_weaken.ogg')

View file

@ -161,7 +161,7 @@ class DistributedDoor(DistributedObject.DistributedObject, DelayDeletable):
TRIGGER_SHIFT_Y = 0.25 TRIGGER_SHIFT_Y = 0.25
TRIGGER_SHIFT_Z = 1.00 TRIGGER_SHIFT_Z = 1.00
if "_gag_shop_" in building.getName(): 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. # gag shop compared to every other building.
doorTrigger.setY(doorTrigger.getY() + TRIGGER_SHIFT_Y) doorTrigger.setY(doorTrigger.getY() + TRIGGER_SHIFT_Y)
else: else:
@ -299,7 +299,7 @@ class DistributedDoor(DistributedObject.DistributedObject, DelayDeletable):
return yToTest < -0.5 return yToTest < -0.5
def enterDoor(self): def enterDoor(self):
if base.config.GetBool('want-doomsday', False): if config.GetBool('want-doomsday', False):
base.localAvatar.disableAvatarControls() base.localAvatar.disableAvatarControls()
self.confirm = TTDialog.TTGlobalDialog(doneEvent='confirmDone', message=SafezoneInvasionGlobals.LeaveToontownCentralAlert, style=TTDialog.Acknowledge) self.confirm = TTDialog.TTGlobalDialog(doneEvent='confirmDone', message=SafezoneInvasionGlobals.LeaveToontownCentralAlert, style=TTDialog.Acknowledge)
self.confirm.show() self.confirm.show()

View file

@ -15,7 +15,7 @@ class DistributedElevatorInt(DistributedElevator.DistributedElevator):
def __init__(self, cr): def __init__(self, cr):
DistributedElevator.DistributedElevator.__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): def setupElevator(self):
self.leftDoor = self.bldg.leftDoorOut self.leftDoor = self.bldg.leftDoorOut

View file

@ -407,7 +407,7 @@ class CatalogItemPanel(DirectFrame):
self.accept('verifyDone', self.__handleVerifyPurchase) self.accept('verifyDone', self.__handleVerifyPurchase)
def __handleVerifyPurchase(self): 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') self.notify.info('QA-REGRESSION: CATALOG: Order item')
status = self.verify.doneStatus status = self.verify.doneStatus
self.ignore('verifyDone') self.ignore('verifyDone')
@ -439,7 +439,7 @@ class CatalogItemPanel(DirectFrame):
self.accept('verifyGiftDone', self.__handleVerifyGift) self.accept('verifyGiftDone', self.__handleVerifyGift)
def __handleVerifyGift(self): 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') self.notify.info('QA-REGRESSION: CATALOG: Gift item')
status = self.verify.doneStatus status = self.verify.doneStatus
self.ignore('verifyGiftDone') self.ignore('verifyGiftDone')

View file

@ -181,7 +181,7 @@ class CatalogScreen(DirectFrame):
self.emblemCatalogButton['state'] = DGG.DISABLED self.emblemCatalogButton['state'] = DGG.DISABLED
def showNewItems(self, index = None): 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') self.notify.info('QA-REGRESSION: CATALOG: New item')
taskMgr.remove('clarabelleHelpText1') taskMgr.remove('clarabelleHelpText1')
messenger.send('wakeup') messenger.send('wakeup')
@ -198,7 +198,7 @@ class CatalogScreen(DirectFrame):
return return
def showBackorderItems(self, index = None): 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') self.notify.info('QA-REGRESSION: CATALOG: Backorder item')
taskMgr.remove('clarabelleHelpText1') taskMgr.remove('clarabelleHelpText1')
messenger.send('wakeup') messenger.send('wakeup')
@ -215,7 +215,7 @@ class CatalogScreen(DirectFrame):
return return
def showLoyaltyItems(self, index = None): 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') self.notify.info('QA-REGRESSION: CATALOG: Special item')
taskMgr.remove('clarabelleHelpText1') taskMgr.remove('clarabelleHelpText1')
messenger.send('wakeup') messenger.send('wakeup')
@ -232,7 +232,7 @@ class CatalogScreen(DirectFrame):
return return
def showEmblemItems(self, index = None): 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') self.notify.info('QA-REGRESSION: CATALOG: Emblem item')
taskMgr.remove('clarabelleHelpText1') taskMgr.remove('clarabelleHelpText1')
messenger.send('wakeup') messenger.send('wakeup')

View file

@ -176,7 +176,7 @@ class MailboxScreen(DirectObject.DirectObject):
messenger.send(self.doneEvent) messenger.send(self.doneEvent)
def __handleAccept(self): 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') self.notify.info('QA-REGRESSION: MAILBOX: Accept item')
if self.acceptingIndex != None: if self.acceptingIndex != None:
return return

View file

@ -136,12 +136,12 @@ class Char(Avatar.Avatar):
def setLODs(self): def setLODs(self):
self.setLODNode() self.setLODNode()
levelOneIn = base.config.GetInt('lod1-in', 50) levelOneIn = config.GetInt('lod1-in', 50)
levelOneOut = base.config.GetInt('lod1-out', 1) levelOneOut = config.GetInt('lod1-out', 1)
levelTwoIn = base.config.GetInt('lod2-in', 100) levelTwoIn = config.GetInt('lod2-in', 100)
levelTwoOut = base.config.GetInt('lod2-out', 50) levelTwoOut = config.GetInt('lod2-out', 50)
levelThreeIn = base.config.GetInt('lod3-in', 280) levelThreeIn = config.GetInt('lod3-in', 280)
levelThreeOut = base.config.GetInt('lod3-out', 100) levelThreeOut = config.GetInt('lod3-out', 100)
self.addLOD(LODModelDict[self.style.name][0], levelOneIn, levelOneOut) self.addLOD(LODModelDict[self.style.name][0], levelOneIn, levelOneOut)
self.addLOD(LODModelDict[self.style.name][1], levelTwoIn, levelTwoOut) self.addLOD(LODModelDict[self.style.name][1], levelTwoIn, levelTwoOut)
self.addLOD(LODModelDict[self.style.name][2], levelThreeIn, levelThreeOut) self.addLOD(LODModelDict[self.style.name][2], levelThreeIn, levelThreeOut)
@ -411,7 +411,7 @@ class Char(Avatar.Avatar):
if self.dialogueArray: if self.dialogueArray:
self.notify.warning('loadDialogue() called twice.') self.notify.warning('loadDialogue() called twice.')
self.unloadDialogue() self.unloadDialogue()
language = base.config.GetString('language', 'english') language = config.GetString('language', 'english')
if char == 'mk': if char == 'mk':
dialogueFile = base.loadSfx('phase_3/audio/dial/mickey.ogg') dialogueFile = base.loadSfx('phase_3/audio/dial/mickey.ogg')
for i in range(0, 6): for i in range(0, 6):

View file

@ -292,9 +292,9 @@ scStructure = [
6062, 6062,
6063, 6063,
6064, 6064,
6065]], 6065]],
[OTPLocalizer.SCMenuBattleGags, [OTPLocalizer.SCMenuBattleGags,
1500, 1500,
1501, 1501,
1502, 1502,
1503, 1503,
@ -424,7 +424,7 @@ class TTChatInputSpeedChat(DirectObject.DirectObject):
self.insidePartiesMenu = None self.insidePartiesMenu = None
self.createSpeedChat() self.createSpeedChat()
self.whiteList = None 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: if self.allowWhiteListSpeedChat:
self.addWhiteList() self.addWhiteList()
self.factoryMenu = None self.factoryMenu = None
@ -497,7 +497,7 @@ class TTChatInputSpeedChat(DirectObject.DirectObject):
structure.append([TTSCResistanceMenu, OTPLocalizer.SCMenuResistance]) structure.append([TTSCResistanceMenu, OTPLocalizer.SCMenuResistance])
if hasattr(base, 'wantPets') and base.wantPets: if hasattr(base, 'wantPets') and base.wantPets:
structure += scPetMenuStructure 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.append([OTPLocalizer.SCMenuElection, 10100, 10101, 10102, 10103, 10104, 10105])
structure += scStructure structure += scStructure
self.createSpeedChatObject(structure) self.createSpeedChatObject(structure)
@ -519,7 +519,7 @@ class TTChatInputSpeedChat(DirectObject.DirectObject):
self.chatMgr.fsm.request('mainMenu') self.chatMgr.fsm.request('mainMenu')
self.terminalSelectedEvent = self.speedChat.getEventName(SpeedChatGlobals.SCTerminalSelectedEvent) 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.accept(self.terminalSelectedEvent, selectionMade)
self.speedChat.reparentTo(base.a2dpTopLeft, DGG.FOREGROUND_SORT_INDEX) self.speedChat.reparentTo(base.a2dpTopLeft, DGG.FOREGROUND_SORT_INDEX)
scZ = -0.04 scZ = -0.04

View file

@ -11,7 +11,7 @@ from toontown.toonbase import ToontownGlobals
class TTChatInputWhiteList(ChatInputWhiteListFrame): class TTChatInputWhiteList(ChatInputWhiteListFrame):
notify = DirectNotifyGlobal.directNotify.newCategory('TTChatInputWhiteList') 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' TFToggleKeyUp = TFToggleKey + '-up'
def __init__(self, parent = None, **kw): def __init__(self, parent = None, **kw):
@ -53,7 +53,7 @@ class TTChatInputWhiteList(ChatInputWhiteListFrame):
self.chatEntry.bind(DGG.OVERFLOW, self.chatOverflow) self.chatEntry.bind(DGG.OVERFLOW, self.chatOverflow)
self.chatEntry.bind(DGG.TYPE, self.typeCallback) self.chatEntry.bind(DGG.TYPE, self.typeCallback)
self.trueFriendChat = 0 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) self.accept(self.TFToggleKey, self.shiftPressed)
return return

View file

@ -70,8 +70,8 @@ class TTWhiteList(WhiteList):
self.updateWhitelist() self.updateWhitelist()
def getWhitelistUrl(self): def getWhitelistUrl(self):
result = base.config.GetString('fallback-whitelist-url', 'http://cdn.toontown.disney.go.com/toontown/en/') result = config.GetString('fallback-whitelist-url', 'http://cdn.toontown.disney.go.com/toontown/en/')
override = base.config.GetString('whitelist-url', '') override = config.GetString('whitelist-url', '')
if override: if override:
self.notify.info('got an override url, using %s for the whitelist' % override) self.notify.info('got an override url, using %s for the whitelist' % override)
result = override result = override

View file

@ -51,7 +51,7 @@ class ToontownChatManager(ChatManager.ChatManager):
self.whisperCancelButton = DirectButton(parent=self.whisperFrame, image=(gui.find('**/CloseBtn_UP'), gui.find('**/CloseBtn_DN'), gui.find('**/CloseBtn_Rllvr')), pos=(-0.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) 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() gui.removeNode()
ChatManager.ChatManager.__init__(self, cr, localAvatar) 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.chatInputSpeedChat = TTChatInputSpeedChat(self)
self.normalPos = Vec3(0.25, 0, -0.196) self.normalPos = Vec3(0.25, 0, -0.196)
self.whisperPos = Vec3(0.25, 0, -0.28) self.whisperPos = Vec3(0.25, 0, -0.28)
@ -365,13 +365,13 @@ class ToontownChatManager(ChatManager.ChatManager):
self.problemActivatingChat.hide() self.problemActivatingChat.hide()
def __normalButtonPressed(self): 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') self.notify.info('QA-REGRESSION: CHAT: Speedchat Plus')
messenger.send('wakeup') messenger.send('wakeup')
self.fsm.request('normalChat') self.fsm.request('normalChat')
def __scButtonPressed(self): 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') self.notify.info('QA-REGRESSION: CHAT: Speedchat')
messenger.send('wakeup') messenger.send('wakeup')
if self.fsm.getCurrentState().getName() == 'speedChat': if self.fsm.getCurrentState().getName() == 'speedChat':
@ -457,7 +457,7 @@ class ToontownChatManager(ChatManager.ChatManager):
self.fsm.request('mainMenu') self.fsm.request('mainMenu')
def __whisperScButtonPressed(self, avatarName, avatarId, playerId): 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') self.notify.info('QA-REGRESSION: CHAT: Whisper')
messenger.send('wakeup') messenger.send('wakeup')
hasManager = hasattr(base.cr, 'playerFriendsManager') hasManager = hasattr(base.cr, 'playerFriendsManager')

View file

@ -160,7 +160,7 @@ class CogdoFlyingGame(DirectObject):
self.acceptOnce(CogdoFlyingLocalPlayer.RanOutOfTimeEventName, self.handleLocalPlayerRanOutOfTime) self.acceptOnce(CogdoFlyingLocalPlayer.RanOutOfTimeEventName, self.handleLocalPlayerRanOutOfTime)
self.__startUpdateTask() self.__startUpdateTask()
self.isGameComplete = False 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) self.acceptOnce('end', self.guiMgr.forceTimerDone)
def toggleFog(): def toggleFog():
@ -192,7 +192,7 @@ class CogdoFlyingGame(DirectObject):
self.ignore(CogdoFlyingLegalEagle.RequestAddTargetAgainEventName) self.ignore(CogdoFlyingLegalEagle.RequestAddTargetAgainEventName)
self.ignore(CogdoFlyingLegalEagle.RequestRemoveTargetEventName) self.ignore(CogdoFlyingLegalEagle.RequestRemoveTargetEventName)
self.ignore(CogdoFlyingLocalPlayer.PlayWaitingMusicEventName) 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('end')
self.ignore('home') self.ignore('home')
self.level.update(0.0) self.level.update(0.0)

View file

@ -18,7 +18,7 @@ class CogdoMaze(MazeBase, DirectObject):
self._clearColor = VBase4(base.win.getClearColor()) self._clearColor = VBase4(base.win.getClearColor())
self._clearColor.setW(1.0) self._clearColor.setW(1.0)
base.win.setClearColor(VBase4(0.0, 0.0, 0.0, 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() self._initCollisionVisuals()
def _initWaterCoolers(self): def _initWaterCoolers(self):

View file

@ -26,7 +26,7 @@ class CogdoMazeGame(DirectObject):
def __init__(self, distGame): def __init__(self, distGame):
self.distGame = 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): def load(self, cogdoMazeFactory, numSuits, bossCode):
self._initAudio() self._initAudio()

View file

@ -10,7 +10,7 @@ class DistCogdoFlyingGame(DistCogdoGame):
def __init__(self, cr): def __init__(self, cr):
DistCogdoGame.__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.accept('onCodeReload', self.__sgOnCodeReload)
self.game = CogdoFlyingGame(self) self.game = CogdoFlyingGame(self)

View file

@ -11,7 +11,7 @@ from toontown.minigame.MinigameRulesPanel import MinigameRulesPanel
from toontown.cogdominium.CogdoGameRulesPanel import CogdoGameRulesPanel from toontown.cogdominium.CogdoGameRulesPanel import CogdoGameRulesPanel
from toontown.minigame import MinigameGlobals from toontown.minigame import MinigameGlobals
from toontown.toonbase import TTLocalizer as TTL 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): class DistCogdoGame(DistCogdoGameBase, DistributedObject):
notify = directNotify.newCategory('DistCogdoGame') notify = directNotify.newCategory('DistCogdoGame')

View file

@ -14,7 +14,7 @@ class DistCogdoMazeGame(DistCogdoGame, DistCogdoMazeGameBase):
DistCogdoGame.__init__(self, cr) DistCogdoGame.__init__(self, cr)
self.game = CogdoMazeGame(self) self.game = CogdoMazeGame(self)
self._numSuits = (0, 0, 0) 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) self.accept('onCodeReload', self.__sgOnCodeReload)
def delete(self): def delete(self):

View file

@ -54,7 +54,7 @@ class BossbotCogHQLoader(CogHQLoader.CogHQLoader):
origin = top.find('**/tunnel_origin') origin = top.find('**/tunnel_origin')
origin.setH(-33.33) origin.setH(-33.33)
elif zoneId == ToontownGlobals.BossbotLobby: 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.info('QA-REGRESSION: COGHQ: Visit BossbotLobby')
self.notify.debug('cogHQLobbyModelPath = %s' % self.cogHQLobbyModelPath) self.notify.debug('cogHQLobbyModelPath = %s' % self.cogHQLobbyModelPath)
self.geom = loader.loadModel(self.cogHQLobbyModelPath) self.geom = loader.loadModel(self.cogHQLobbyModelPath)

View file

@ -51,7 +51,7 @@ class CashbotCogHQLoader(CogHQLoader.CogHQLoader):
signText.setPosHpr(locator, 0, 0, 0, 0, 0, 0) signText.setPosHpr(locator, 0, 0, 0, 0, 0, 0)
signText.setDepthWrite(0) signText.setDepthWrite(0)
elif zoneId == ToontownGlobals.CashbotLobby: 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.notify.info('QA-REGRESSION: COGHQ: Visit CashbotLobby')
self.geom = loader.loadModel(self.cogHQLobbyModelPath) self.geom = loader.loadModel(self.cogHQLobbyModelPath)
else: else:

View file

@ -29,8 +29,8 @@ class DistributedBanquetTable(DistributedObject.DistributedObject, FSM.FSM, Banq
pitcherMinH = -360 pitcherMinH = -360
pitcherMaxH = 360 pitcherMaxH = 360
rotateSpeed = 30 rotateSpeed = 30
waterPowerSpeed = base.config.GetDouble('water-power-speed', 15) waterPowerSpeed = config.GetDouble('water-power-speed', 15)
waterPowerExponent = base.config.GetDouble('water-power-exponent', 0.75) waterPowerExponent = config.GetDouble('water-power-exponent', 0.75)
useNewAnimations = True useNewAnimations = True
TugOfWarControls = False TugOfWarControls = False
OnlyUpArrow = True OnlyUpArrow = True

View file

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

View file

@ -21,8 +21,8 @@ class DistributedGolfSpot(DistributedObject.DistributedObject, FSM.FSM):
toonGolfOffsetPos = Point3(-2, 0, -GolfGlobals.GOLF_BALL_RADIUS) toonGolfOffsetPos = Point3(-2, 0, -GolfGlobals.GOLF_BALL_RADIUS)
toonGolfOffsetHpr = Point3(-90, 0, 0) toonGolfOffsetHpr = Point3(-90, 0, 0)
rotateSpeed = 20 rotateSpeed = 20
golfPowerSpeed = base.config.GetDouble('golf-power-speed', 3) golfPowerSpeed = config.GetDouble('golf-power-speed', 3)
golfPowerExponent = base.config.GetDouble('golf-power-exponent', 0.75) golfPowerExponent = config.GetDouble('golf-power-exponent', 0.75)
def __init__(self, cr): def __init__(self, cr):
DistributedObject.DistributedObject.__init__(self, cr) DistributedObject.DistributedObject.__init__(self, cr)

View file

@ -16,7 +16,7 @@ class FactoryLevelMgr(LevelMgr.LevelMgr):
def __init__(self, level, entId): def __init__(self, level, entId):
LevelMgr.LevelMgr.__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.toonLifter = FactoryUtil.ToonLifter('f3')
self.callSetters('farPlaneDistance') self.callSetters('farPlaneDistance')
self.geom.reparentTo(render) self.geom.reparentTo(render)

View file

@ -60,7 +60,7 @@ class LawbotCogHQLoader(CogHQLoader.CogHQLoader):
ug = self.geom.find('**/underground') ug = self.geom.find('**/underground')
ug.setBin('ground', -10) ug.setBin('ground', -10)
elif zoneId == ToontownGlobals.LawbotLobby: 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.info('QA-REGRESSION: COGHQ: Visit LawbotLobby')
self.notify.debug('cogHQLobbyModelPath = %s' % self.cogHQLobbyModelPath) self.notify.debug('cogHQLobbyModelPath = %s' % self.cogHQLobbyModelPath)
self.geom = loader.loadModel(self.cogHQLobbyModelPath) self.geom = loader.loadModel(self.cogHQLobbyModelPath)

View file

@ -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 = DirectGui.OnscreenText(text=TTLocalizer.SellbotSideEntrance, font=ToontownGlobals.getSuitFont(), pos=(0, -0.34), scale=0.1, mayChange=False, parent=sdSign)
sdText.setDepthWrite(0) sdText.setDepthWrite(0)
elif zoneId == ToontownGlobals.SellbotLobby: 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.notify.info('QA-REGRESSION: COGHQ: Visit SellbotLobby')
self.geom = loader.loadModel(self.cogHQLobbyModelPath) self.geom = loader.loadModel(self.cogHQLobbyModelPath)
front = self.geom.find('**/frontWall') front = self.geom.find('**/frontWall')

View file

@ -244,7 +244,7 @@ class PlayGame(StateData.StateData):
loaderName = requestStatus['loader'] loaderName = requestStatus['loader']
avId = requestStatus.get('avId', -1) avId = requestStatus.get('avId', -1)
ownerId = requestStatus.get('ownerId', avId) 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) self.notify.info('QA-REGRESSION: NEIGHBORHOODS: Visit %s' % hoodName)
count = ToontownGlobals.hoodCountMap[canonicalHoodId] count = ToontownGlobals.hoodCountMap[canonicalHoodId]
if loaderName == 'safeZoneLoader': if loaderName == 'safeZoneLoader':
@ -405,8 +405,8 @@ class PlayGame(StateData.StateData):
base.localAvatar.chatMgr.obscure(1, 1) base.localAvatar.chatMgr.obscure(1, 1)
base.localAvatar.obscureFriendsListButton(1) base.localAvatar.obscureFriendsListButton(1)
requestStatus['how'] = 'tutorial' requestStatus['how'] = 'tutorial'
if base.config.GetString('language', 'english') == 'japanese': if config.GetString('language', 'english') == 'japanese':
musicVolume = base.config.GetFloat('tutorial-music-volume', 0.5) musicVolume = config.GetFloat('tutorial-music-volume', 0.5)
requestStatus['musicVolume'] = musicVolume requestStatus['musicVolume'] = musicVolume
self.hood.enter(requestStatus) self.hood.enter(requestStatus)

View file

@ -135,9 +135,9 @@ class ToontownClientRepository(OTPClientRepository.OTPClientRepository):
state = self.loginFSM.getStateNamed('playingGame') state = self.loginFSM.getStateNamed('playingGame')
state.addTransition('credits') state.addTransition('credits')
self.wantCogdominiums = base.config.GetBool('want-cogdominiums', 1) self.wantCogdominiums = config.GetBool('want-cogdominiums', 1)
self.wantEmblems = base.config.GetBool('want-emblems', 0) self.wantEmblems = config.GetBool('want-emblems', 0)
if base.config.GetBool('tt-node-check', 0): if config.GetBool('tt-node-check', 0):
for species in ToonDNA.toonSpeciesTypes: for species in ToonDNA.toonSpeciesTypes:
for head in ToonDNA.getHeadList(species): for head in ToonDNA.getHeadList(species):
for torso in ToonDNA.toonTorsoTypes: for torso in ToonDNA.toonTorsoTypes:

View file

@ -85,7 +85,7 @@ class FireworkEffect(NodePath):
if self.trailTypeId is None: if self.trailTypeId is None:
return self.trailEffectsIval return self.trailEffectsIval
self.trailEffectsIval.append(Func(random.choice(self.trailSfx).play)) 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: if self.trailTypeId != FireworkTrailType.LongGlowSparkle:
self.trailTypeId = FireworkTrailType.Default self.trailTypeId = FireworkTrailType.Default
if self.trailTypeId == FireworkTrailType.Default: if self.trailTypeId == FireworkTrailType.Default:
@ -151,7 +151,7 @@ class FireworkEffect(NodePath):
trailEffect.setLifespan(3.5) trailEffect.setLifespan(3.5)
self.trailEffects.append(trailEffect) self.trailEffects.append(trailEffect)
self.trailEffectsIval.append(Func(trailEffect.startLoop)) 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() trailEffect = GlowTrail.getEffect()
if trailEffect: if trailEffect:
trailEffect.reparentTo(self.effectsNode) trailEffect.reparentTo(self.effectsNode)
@ -183,7 +183,7 @@ class FireworkEffect(NodePath):
primaryBlast.fadeTime = 0.75 primaryBlast.fadeTime = 0.75
self.burstEffectsIval.append(primaryBlast.getTrack()) self.burstEffectsIval.append(primaryBlast.getTrack())
self.burstEffects.append(primaryBlast) self.burstEffects.append(primaryBlast)
if base.config.GetInt('toontown-sfx-setting', 1) >= 1: if config.GetInt('toontown-sfx-setting', 1) >= 1:
secondaryBlast = BlastEffect() secondaryBlast = BlastEffect()
secondaryBlast.reparentTo(self.effectsNode) secondaryBlast.reparentTo(self.effectsNode)
secondaryBlast.setScale(250 * self.scale) secondaryBlast.setScale(250 * self.scale)
@ -209,14 +209,14 @@ class FireworkEffect(NodePath):
explosion.startDelay = 0.0 explosion.startDelay = 0.0
self.burstEffectsIval.append(explosion.getTrack()) self.burstEffectsIval.append(explosion.getTrack())
self.burstEffects.append(explosion) self.burstEffects.append(explosion)
if base.config.GetInt('toontown-sfx-setting', 1) >= 1: if config.GetInt('toontown-sfx-setting', 1) >= 1:
rays = RayBurst() rays = RayBurst()
rays.reparentTo(self.effectsNode) rays.reparentTo(self.effectsNode)
rays.setEffectScale(self.scale) rays.setEffectScale(self.scale)
rays.setEffectColor(self.primaryColor) rays.setEffectColor(self.primaryColor)
self.burstEffectsIval.append(rays.getTrack()) self.burstEffectsIval.append(rays.getTrack())
self.burstEffects.append(rays) self.burstEffects.append(rays)
if base.config.GetInt('toontown-sfx-setting', 1) >= 2: if config.GetInt('toontown-sfx-setting', 1) >= 2:
sparkles = FireworkSparkles.getEffect() sparkles = FireworkSparkles.getEffect()
if sparkles: if sparkles:
sparkles.reparentTo(self.effectsNode) sparkles.reparentTo(self.effectsNode)
@ -225,7 +225,7 @@ class FireworkEffect(NodePath):
sparkles.startDelay = 0.0 sparkles.startDelay = 0.0
self.burstEffectsIval.append(sparkles.getTrack()) self.burstEffectsIval.append(sparkles.getTrack())
self.burstEffects.append(sparkles) self.burstEffects.append(sparkles)
if base.config.GetInt('toontown-sfx-setting', 1) >= 1: if config.GetInt('toontown-sfx-setting', 1) >= 1:
explosion = PeonyEffect.getEffect() explosion = PeonyEffect.getEffect()
if explosion: if explosion:
explosion.reparentTo(self.effectsNode) explosion.reparentTo(self.effectsNode)
@ -243,7 +243,7 @@ class FireworkEffect(NodePath):
explosion.setEffectColor(self.primaryColor) explosion.setEffectColor(self.primaryColor)
self.burstEffectsIval.append(explosion.getTrack()) self.burstEffectsIval.append(explosion.getTrack())
self.burstEffects.append(explosion) self.burstEffects.append(explosion)
if base.config.GetInt('toontown-sfx-setting', 1) >= 1: if config.GetInt('toontown-sfx-setting', 1) >= 1:
rays = RayBurst() rays = RayBurst()
rays.reparentTo(self.effectsNode) rays.reparentTo(self.effectsNode)
rays.setEffectScale(self.scale * 0.75) rays.setEffectScale(self.scale * 0.75)
@ -258,7 +258,7 @@ class FireworkEffect(NodePath):
explosion.setEffectColor(self.primaryColor) explosion.setEffectColor(self.primaryColor)
self.burstEffectsIval.append(explosion.getTrack()) self.burstEffectsIval.append(explosion.getTrack())
self.burstEffects.append(explosion) self.burstEffects.append(explosion)
if base.config.GetInt('toontown-sfx-setting', 1) >= 1: if config.GetInt('toontown-sfx-setting', 1) >= 1:
rays = RayBurst() rays = RayBurst()
rays.reparentTo(self.effectsNode) rays.reparentTo(self.effectsNode)
rays.setEffectScale(self.scale) rays.setEffectScale(self.scale)
@ -280,7 +280,7 @@ class FireworkEffect(NodePath):
explosion.setEffectColor(self.primaryColor) explosion.setEffectColor(self.primaryColor)
self.burstEffectsIval.append(explosion.getTrack()) self.burstEffectsIval.append(explosion.getTrack())
self.burstEffects.append(explosion) self.burstEffects.append(explosion)
if base.config.GetInt('toontown-sfx-setting', 1) >= 2: if config.GetInt('toontown-sfx-setting', 1) >= 2:
sparkles = FireworkSparkles.getEffect() sparkles = FireworkSparkles.getEffect()
if sparkles: if sparkles:
sparkles.reparentTo(self.effectsNode) sparkles.reparentTo(self.effectsNode)
@ -336,7 +336,7 @@ class FireworkEffect(NodePath):
explosion.setEffectColor(self.primaryColor) explosion.setEffectColor(self.primaryColor)
self.burstEffectsIval.append(Sequence(Wait(0.1), explosion.getTrack())) self.burstEffectsIval.append(Sequence(Wait(0.1), explosion.getTrack()))
self.burstEffects.append(explosion) self.burstEffects.append(explosion)
if base.config.GetInt('toontown-sfx-setting', 1) >= 1: if config.GetInt('toontown-sfx-setting', 1) >= 1:
rays = RayBurst() rays = RayBurst()
rays.reparentTo(self.effectsNode) rays.reparentTo(self.effectsNode)
rays.setEffectScale(self.scale) rays.setEffectScale(self.scale)
@ -360,14 +360,14 @@ class FireworkEffect(NodePath):
skullFlash.startDelay = 0.08 skullFlash.startDelay = 0.08
self.burstEffectsIval.append(skullFlash.getTrack()) self.burstEffectsIval.append(skullFlash.getTrack())
self.burstEffects.append(skullFlash) self.burstEffects.append(skullFlash)
if base.config.GetInt('toontown-sfx-setting', 1) >= 1: if config.GetInt('toontown-sfx-setting', 1) >= 1:
rays = RayBurst() rays = RayBurst()
rays.reparentTo(self.effectsNode) rays.reparentTo(self.effectsNode)
rays.setEffectScale(self.scale) rays.setEffectScale(self.scale)
rays.setEffectColor(self.primaryColor) rays.setEffectColor(self.primaryColor)
self.burstEffectsIval.append(rays.getTrack()) self.burstEffectsIval.append(rays.getTrack())
self.burstEffects.append(rays) self.burstEffects.append(rays)
if base.config.GetInt('toontown-sfx-setting', 1) >= 2: if config.GetInt('toontown-sfx-setting', 1) >= 2:
sparkles = FireworkSparkles.getEffect() sparkles = FireworkSparkles.getEffect()
if sparkles: if sparkles:
sparkles.reparentTo(self.effectsNode) sparkles.reparentTo(self.effectsNode)
@ -383,7 +383,7 @@ class FireworkEffect(NodePath):
explosion.reparentTo(self.effectsNode) explosion.reparentTo(self.effectsNode)
explosion.setEffectScale(self.scale) explosion.setEffectScale(self.scale)
explosion.setEffectColor(self.primaryColor) 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.burstEffectsIval.append(explosion.getTrack())
self.burstEffects.append(explosion) self.burstEffects.append(explosion)
elif self.burstTypeId == FireworkBurstType.IceCream: elif self.burstTypeId == FireworkBurstType.IceCream:

View file

@ -61,7 +61,7 @@ class FireworkShowMixin:
self.timestamp = timestamp self.timestamp = timestamp
self.showMusic = None self.showMusic = None
self.eventId = eventId 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) self.currentShow = self.getFireworkShowIval(eventId, style, songId, t)
if self.currentShow: if self.currentShow:
self.currentShow.start(t) self.currentShow.start(t)
@ -115,7 +115,7 @@ class FireworkShowMixin:
else: else:
FireworkShowMixin.notify.warning('Invalid fireworks event ID: %d' % eventId) FireworkShowMixin.notify.warning('Invalid fireworks event ID: %d' % eventId)
return None return None
self.showMusic = loader.loadMusic(musicFile) self.showMusic = loader.loadMusic(musicFile)
self.showMusic.setVolume(1) self.showMusic.setVolume(1)
@ -145,18 +145,18 @@ class FireworkShowMixin:
return 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: 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( preShow = Sequence(
Func(base.localAvatar.setSystemMessage, 0, startMessage), Func(base.localAvatar.setSystemMessage, 0, startMessage),
Parallel(LerpColorScaleInterval(base.cr.playGame.hood.sky, 2.5, Vec4(0.0, 0.0, 0.0, 1.0)), 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.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)), LerpColorScaleInterval(base.localAvatar, 2.5, Vec4(0.85, 0.85, 0.85, 1)),
Func(__lightDecorationOn__)), Func(__lightDecorationOn__)),
Func(self.trySettingBackground, 0), Func(self.trySettingBackground, 0),
Func(self.__checkDDFog), Func(self.__checkDDFog),
Func(base.camLens.setFar, 1000.0), Func(base.camLens.setFar, 1000.0),
Func(base.cr.playGame.hood.sky.hide), Func(base.cr.playGame.hood.sky.hide),
Func(base.localAvatar.setSystemMessage, 0, instructionMessage), Func(base.localAvatar.setSystemMessage, 0, instructionMessage),
Func(self.getLoader().music.stop), Func(self.getLoader().music.stop),
Wait(2.0), Wait(2.0),
Func(base.playMusic, self.showMusic, 0, 1, 0.8, max(0, startT)) Func(base.playMusic, self.showMusic, 0, 1, 0.8, max(0, startT))
) )
return preShow return preShow
@ -192,19 +192,19 @@ class FireworkShowMixin:
else: else:
FireworkShowMixin.notify.warning('Invalid fireworks event ID: %d' % eventId) FireworkShowMixin.notify.warning('Invalid fireworks event ID: %d' % eventId)
return None return None
if self.__checkHoodValidity() and hasattr(base.cr.playGame.hood, 'sky') and base.cr.playGame.hood.sky: if self.__checkHoodValidity() and hasattr(base.cr.playGame.hood, 'sky') and base.cr.playGame.hood.sky:
postShow = Sequence( postShow = Sequence(
Func(base.cr.playGame.hood.sky.show), Func(base.cr.playGame.hood.sky.show),
Parallel( Parallel(
LerpColorScaleInterval(base.cr.playGame.hood.sky, 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.cr.playGame.hood.loader.geom, 2.5, Vec4(1, 1, 1, 1)),
LerpColorScaleInterval(base.localAvatar, 2.5, Vec4(1, 1, 1, 1)) LerpColorScaleInterval(base.localAvatar, 2.5, Vec4(1, 1, 1, 1))
), ),
Func(self.__restoreDDFog), Func(self.__restoreDDFog),
Func(self.restoreCameraLens), Func(self.restoreCameraLens),
Func(self.trySettingBackground, 1), Func(self.trySettingBackground, 1),
Func(self.showMusic.stop), Func(self.showMusic.stop),
Func(base.localAvatar.setSystemMessage, 0, endMessage) Func(base.localAvatar.setSystemMessage, 0, endMessage)
) )
@ -228,7 +228,7 @@ class FireworkShowMixin:
self.fireworkShow.begin(timeStamp) self.fireworkShow.begin(timeStamp)
self.fireworkShow.reparentTo(root) self.fireworkShow.reparentTo(root)
hood = self.getHood() hood = self.getHood()
# Dammit disney # Dammit disney
from toontown.hood import TTHood from toontown.hood import TTHood
from toontown.hood import DDHood from toontown.hood import DDHood

View file

@ -20,7 +20,7 @@ from otp.speedchat import SpeedChatGlobals
class DistributedElectionEvent(DistributedObject, FSM): class DistributedElectionEvent(DistributedObject, FSM):
notify = DirectNotifyGlobal.directNotify.newCategory("DistributedElectionEvent") notify = DirectNotifyGlobal.directNotify.newCategory("DistributedElectionEvent")
def __init__(self, cr): def __init__(self, cr):
DistributedObject.__init__(self, cr) DistributedObject.__init__(self, cr)
FSM.__init__(self, 'ElectionFSM') 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) 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.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') self.splashSfx = loader.loadSfx('phase_9/audio/sfx/CHQ_FACT_paint_splash.ogg')
# Find FlippyStand's collision to give people pies. # 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. # 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 = self.flippyStand.attachNewNode(CollisionNode('wheelbarrow_collision'))
self.pieCollision.node().addSolid(cs) self.pieCollision.node().addSolid(cs)
self.accept('enter' + self.pieCollision.node().getName(), self.handleWheelbarrowCollisionSphereEnter) self.accept('enter' + self.pieCollision.node().getName(), self.handleWheelbarrowCollisionSphereEnter)
csSlappy = CollisionBox(Point3(-4.2, 0, 0), 9.5, 5.5, 18) csSlappy = CollisionBox(Point3(-4.2, 0, 0), 9.5, 5.5, 18)
self.goopCollision = self.slappyStand.attachNewNode(CollisionNode('goop_collision')) self.goopCollision = self.slappyStand.attachNewNode(CollisionNode('goop_collision'))
self.goopCollision.node().addSolid(csSlappy) self.goopCollision.node().addSolid(csSlappy)
@ -241,9 +241,9 @@ class DistributedElectionEvent(DistributedObject, FSM):
def delete(self): def delete(self):
self.demand('Off', 0.) self.demand('Off', 0.)
self.ignore('entercnode') self.ignore('entercnode')
# Clean up everything... # Clean up everything...
self.showFloor.removeNode() self.showFloor.removeNode()
self.stopInteractiveFlippy() 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. These bits are for things used before Election Day, and mostly unrelated to the Election Sequence.
''' '''
def enterIdle(self, offset): 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". # 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.show()
self.surlee.addActive() self.surlee.addActive()
@ -274,7 +274,7 @@ class DistributedElectionEvent(DistributedObject, FSM):
Wait(8), 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), 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), 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), 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), 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), Wait(8),
@ -289,9 +289,9 @@ class DistributedElectionEvent(DistributedObject, FSM):
def exitIdle(self): def exitIdle(self):
if base.config.GetBool('want-doomsday', False): if config.GetBool('want-doomsday', False):
self.surleeIntroInterval.finish() self.surleeIntroInterval.finish()
def startInteractiveFlippy(self): def startInteractiveFlippy(self):
self.flippy.reparentTo(self.showFloor) self.flippy.reparentTo(self.showFloor)
self.flippy.setPosHpr(-40.6, -18.5, 0.01, 20, 0, 0) self.flippy.setPosHpr(-40.6, -18.5, 0.01, 20, 0, 0)
@ -317,7 +317,7 @@ class DistributedElectionEvent(DistributedObject, FSM):
if phraseId in phraseIdList: if phraseId in phraseIdList:
self.sendUpdate('phraseSaidToFlippy', [phraseId]) self.sendUpdate('phraseSaidToFlippy', [phraseId])
break break
def flippySpeech(self, avId, phraseId): def flippySpeech(self, avId, phraseId):
av = self.cr.doId2do.get(avId) av = self.cr.doId2do.get(avId)
if not av: if not av:
@ -1034,7 +1034,7 @@ class DistributedElectionEvent(DistributedObject, FSM):
# Tell the credits our toon name and dna. # Tell the credits our toon name and dna.
NodePath(base.marginManager).hide() NodePath(base.marginManager).hide()
base.cr.credits.setLocalToonDetails(base.localAvatar.getName(), base.localAvatar.style) base.cr.credits.setLocalToonDetails(base.localAvatar.getName(), base.localAvatar.style)
# This starts here so that we can drift towards Flippy for his speech, # 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. # 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!" # 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.setScale(0.6)
self.logo.setPos(0, 1, 0.3) self.logo.setPos(0, 1, 0.3)
self.logo.setColorScale(1, 1, 1, 0) self.logo.setColorScale(1, 1, 1, 0)
self.portal = loader.loadModel('phase_3.5/models/props/portal-mod') self.portal = loader.loadModel('phase_3.5/models/props/portal-mod')
self.portal.reparentTo(render) self.portal.reparentTo(render)
self.portal.setPosHprScale(93.1, 0.4, 4, 4, 355, 45, 0, 0, 0) 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): def saySurleePhrase(self, phrase, interrupt, broadcast):
self.surlee.setChatAbsolute(phrase, CFSpeech|CFTimeout, interrupt = interrupt) 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 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: if broadcast and Vec3(base.localAvatar.getPos(self.surleeR)).length() >= 15:
base.localAvatar.setSystemMessage(0, self.surleeR.getName()+ ': ' + phrase, WTEmote) base.localAvatar.setSystemMessage(0, self.surleeR.getName()+ ': ' + phrase, WTEmote)
def setState(self, state, timestamp): def setState(self, state, timestamp):
self.request(state, globalClockDelta.localElapsedTime(timestamp)) self.request(state, globalClockDelta.localElapsedTime(timestamp))

View file

@ -175,7 +175,7 @@ class DistributedPhone(DistributedFurnitureItem.DistributedFurnitureItem):
return return
if self.hasLocalAvatar: if self.hasLocalAvatar:
self.freeAvatar() self.freeAvatar()
if base.config.GetBool('want-pets', 1): if config.GetBool('want-pets', 1):
base.localAvatar.lookupPetDNA() base.localAvatar.lookupPetDNA()
self.notify.debug('Entering Phone Sphere....') self.notify.debug('Entering Phone Sphere....')
taskMgr.remove(self.uniqueName('ringDoLater')) taskMgr.remove(self.uniqueName('ringDoLater'))

View file

@ -133,7 +133,7 @@ class Estate(Place.Place):
#if hasattr(base.cr, 'aprilToonsMgr'): #if hasattr(base.cr, 'aprilToonsMgr'):
#if self.isEventActive(AprilToonsGlobals.EventEstateGravity): #if self.isEventActive(AprilToonsGlobals.EventEstateGravity):
#base.localAvatar.startAprilToonsControls() #base.localAvatar.startAprilToonsControls()
if base.config.GetBool('want-april-toons'): if config.GetBool('want-april-toons'):
base.localAvatar.startAprilToonsControls() base.localAvatar.startAprilToonsControls()
self.accept('doorDoneEvent', self.handleDoorDoneEvent) self.accept('doorDoneEvent', self.handleDoorDoneEvent)
self.accept('DistributedDoor_doorTrigger', self.handleDoorTrigger) self.accept('DistributedDoor_doorTrigger', self.handleDoorTrigger)
@ -345,7 +345,7 @@ class Estate(Place.Place):
self.notify.debug('continuing in __submergeToon') self.notify.debug('continuing in __submergeToon')
if hasattr(self, 'loader') and self.loader: if hasattr(self, 'loader') and self.loader:
base.playSfx(self.loader.submergeSound) 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.fsm.request('walk')
self.walkStateData.fsm.request('swimming', [self.loader.swimSound]) self.walkStateData.fsm.request('swimming', [self.loader.swimSound])
pos = base.localAvatar.getPos(render) pos = base.localAvatar.getPos(render)
@ -363,7 +363,7 @@ class Estate(Place.Place):
#if hasattr(base.cr, 'aprilToonsMgr'): #if hasattr(base.cr, 'aprilToonsMgr'):
#if self.isEventActive(AprilToonsGlobals.EventEstateGravity): #if self.isEventActive(AprilToonsGlobals.EventEstateGravity):
#base.localAvatar.startAprilToonsControls() #base.localAvatar.startAprilToonsControls()
if base.config.GetBool('want-april-toons'): if config.GetBool('want-april-toons'):
base.localAvatar.startAprilToonsControls() base.localAvatar.startAprilToonsControls()
def __setUnderwaterFog(self): def __setUnderwaterFog(self):

View file

@ -518,7 +518,7 @@ class ObjectManager(NodePath, DirectObject):
else: else:
self.sendToAtticButton.show() self.sendToAtticButton.show()
return return
self.sendToAtticButton.show() self.sendToAtticButton.show()
def deselectObject(self): def deselectObject(self):
@ -1165,7 +1165,7 @@ class ObjectManager(NodePath, DirectObject):
return return
def sendItemToAttic(self): 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') self.notify.info('QA-REGRESSION: ESTATE: Send Item to Attic')
messenger.send('wakeup') messenger.send('wakeup')
if self.selectedObject: if self.selectedObject:
@ -1267,7 +1267,7 @@ class ObjectManager(NodePath, DirectObject):
return return
def bringItemFromAttic(self, item, itemIndex): 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') self.notify.info('QA-REGRESSION: ESTATE: Place Item in Room')
messenger.send('wakeup') messenger.send('wakeup')
self.__enableItemButtons(0) self.__enableItemButtons(0)
@ -1485,7 +1485,7 @@ class ObjectManager(NodePath, DirectObject):
return return
def __handleVerifyDeleteOK(self): 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') self.notify.info('QA-REGRESSION: ESTATE: Send Item to Trash')
deleteFunction = self.verifyItems[0] deleteFunction = self.verifyItems[0]
deleteFunctionArgs = self.verifyItems[1:] deleteFunctionArgs = self.verifyItems[1:]
@ -1596,7 +1596,7 @@ class ObjectManager(NodePath, DirectObject):
self.verifyItems = (item, itemIndex) self.verifyItems = (item, itemIndex)
def __handleVerifyReturnFromTrashOK(self): 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') self.notify.info('QA-REGRESSION: ESTATE: Send Item to Attic')
item, itemIndex = self.verifyItems item, itemIndex = self.verifyItems
self.__cleanupVerifyDelete() self.__cleanupVerifyDelete()

View file

@ -56,7 +56,7 @@ class FishBase:
loop = None loop = None
delay = None delay = None
playRate = None playRate = None
if base.config.GetBool('want-fish-audio', 1): if config.GetBool('want-fish-audio', 1):
soundDict = FishGlobals.FishAudioFileDict soundDict = FishGlobals.FishAudioFileDict
fileInfo = soundDict.get(self.genus, None) fileInfo = soundDict.get(self.genus, None)
if fileInfo: if fileInfo:

View file

@ -45,7 +45,7 @@ class FriendInviter(DirectFrame):
notify = DirectNotifyGlobal.directNotify.newCategory('FriendInviter') notify = DirectNotifyGlobal.directNotify.newCategory('FriendInviter')
def __init__(self, avId, avName, avDisableName): 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) 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['image'] = DGG.getDefaultDialogGeom()
self.avId = avId self.avId = avId
@ -455,7 +455,7 @@ class FriendInviter(DirectFrame):
pass pass
def __handleOk(self): 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') self.notify.info('QA-REGRESSION: MAKEAFRIENDSHIP: Make a friendship')
unloadFriendInviter() unloadFriendInviter()
@ -466,7 +466,7 @@ class FriendInviter(DirectFrame):
unloadFriendInviter() unloadFriendInviter()
def __handleStop(self): 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.notify.info('QA-REGRESSION: BREAKAFRIENDSHIP: Break a friendship')
self.fsm.request('endFriendship') self.fsm.request('endFriendship')

View file

@ -56,10 +56,10 @@ class DistributedGolfHole(DistributedPhysicsWorld.DistributedPhysicsWorld, FSM,
'Cleanup': ['Off']} 'Cleanup': ['Off']}
id = 0 id = 0
notify = directNotify.newCategory('DistributedGolfHole') notify = directNotify.newCategory('DistributedGolfHole')
unlimitedAimTime = base.config.GetBool('unlimited-aim-time', 0) unlimitedAimTime = config.GetBool('unlimited-aim-time', 0)
unlimitedTeeTime = base.config.GetBool('unlimited-tee-time', 0) unlimitedTeeTime = config.GetBool('unlimited-tee-time', 0)
golfPowerSpeed = base.config.GetDouble('golf-power-speed', 3) golfPowerSpeed = config.GetDouble('golf-power-speed', 3)
golfPowerExponent = base.config.GetDouble('golf-power-exponent', 0.75) golfPowerExponent = config.GetDouble('golf-power-exponent', 0.75)
DefaultCamP = -16 DefaultCamP = -16
MaxCamP = -90 MaxCamP = -90
@ -288,7 +288,7 @@ class DistributedGolfHole(DistributedPhysicsWorld.DistributedPhysicsWorld, FSM,
curNodePath = self.hardSurfaceNodePath.find('**/locator%d' % locatorNum) curNodePath = self.hardSurfaceNodePath.find('**/locator%d' % locatorNum)
def loadBlockers(self): def loadBlockers(self):
loadAll = base.config.GetBool('golf-all-blockers', 0) loadAll = config.GetBool('golf-all-blockers', 0)
self.createLocatorDict() self.createLocatorDict()
self.blockerNums = self.holeInfo['blockers'] self.blockerNums = self.holeInfo['blockers']
for locatorNum in self.locDict: for locatorNum in self.locDict:

View file

@ -6,5 +6,5 @@ class GenericAnimatedBuilding(GenericAnimatedProp.GenericAnimatedProp):
GenericAnimatedProp.GenericAnimatedProp.__init__(self, node) GenericAnimatedProp.GenericAnimatedProp.__init__(self, node)
def enter(self): def enter(self):
if base.config.GetBool('buildings-animate', False): if config.GetBool('buildings-animate', False):
GenericAnimatedProp.GenericAnimatedProp.enter(self) GenericAnimatedProp.GenericAnimatedProp.enter(self)

View file

@ -112,7 +112,7 @@ class GenericAnimatedProp(AnimatedProp.AnimatedProp):
if theSound: if theSound:
soundDur = theSound.length() soundDur = theSound.length()
if maximumDuration < soundDur: 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': 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)) self.notify.warning('anim %s had duration of %s while sound has duration of %s' % (origAnimName, maximumDuration, soundDur))
soundDur = maximumDuration soundDur = maximumDuration

View file

@ -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.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.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')} 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): def __init__(self, node):
self.leftWater = None self.leftWater = None

View file

@ -4,7 +4,7 @@ from direct.directnotify import DirectNotifyGlobal
class HydrantOneAnimatedProp(ZeroAnimatedProp.ZeroAnimatedProp): class HydrantOneAnimatedProp(ZeroAnimatedProp.ZeroAnimatedProp):
notify = DirectNotifyGlobal.directNotify.newCategory('HydrantOneAnimatedProp') 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), PhaseInfo = {0: ('tt_a_ara_ttc_hydrant_firstMoveArmUp1', 40 * PauseTimeMult),
1: ('tt_a_ara_ttc_hydrant_firstMoveStruggle', 20 * PauseTimeMult), 1: ('tt_a_ara_ttc_hydrant_firstMoveStruggle', 20 * PauseTimeMult),
2: ('tt_a_ara_ttc_hydrant_firstMoveArmUp2', 10 * PauseTimeMult), 2: ('tt_a_ara_ttc_hydrant_firstMoveArmUp2', 10 * PauseTimeMult),

View file

@ -4,7 +4,7 @@ from direct.directnotify import DirectNotifyGlobal
class HydrantTwoAnimatedProp(ZeroAnimatedProp.ZeroAnimatedProp): class HydrantTwoAnimatedProp(ZeroAnimatedProp.ZeroAnimatedProp):
notify = DirectNotifyGlobal.directNotify.newCategory('HydrantTwoAnimatedProp') 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), PhaseInfo = {0: ('tt_a_ara_ttc_hydrant_firstMoveArmUp1', 40 * PauseTimeMult),
1: ('tt_a_ara_ttc_hydrant_firstMoveStruggle', 20 * PauseTimeMult), 1: ('tt_a_ara_ttc_hydrant_firstMoveStruggle', 20 * PauseTimeMult),
2: ('tt_a_ara_ttc_hydrant_firstMoveArmUp2', 10 * PauseTimeMult), 2: ('tt_a_ara_ttc_hydrant_firstMoveArmUp2', 10 * PauseTimeMult),

View file

@ -4,7 +4,7 @@ from direct.directnotify import DirectNotifyGlobal
class HydrantZeroAnimatedProp(ZeroAnimatedProp.ZeroAnimatedProp): class HydrantZeroAnimatedProp(ZeroAnimatedProp.ZeroAnimatedProp):
notify = DirectNotifyGlobal.directNotify.newCategory('HydrantZeroAnimatedProp') 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), PhaseInfo = {0: ('tt_a_ara_ttc_hydrant_firstMoveArmUp1', 40 * PauseTimeMult),
1: ('tt_a_ara_ttc_hydrant_firstMoveStruggle', 20 * PauseTimeMult), 1: ('tt_a_ara_ttc_hydrant_firstMoveStruggle', 20 * PauseTimeMult),
2: ('tt_a_ara_ttc_hydrant_firstMoveArmUp2', 10 * PauseTimeMult), 2: ('tt_a_ara_ttc_hydrant_firstMoveArmUp2', 10 * PauseTimeMult),

View file

@ -26,7 +26,7 @@ class InteractiveAnimatedProp(GenericAnimatedProp.GenericAnimatedProp, FSM.FSM):
ZoneToFightAnims = {} ZoneToFightAnims = {}
ZoneToVictoryAnims = {} ZoneToVictoryAnims = {}
ZoneToSadAnims = {} ZoneToSadAnims = {}
IdlePauseTime = base.config.GetFloat('prop-idle-pause-time', 0.0) IdlePauseTime = config.GetFloat('prop-idle-pause-time', 0.0)
HpTextGenerator = TextNode('HpTextGenerator') HpTextGenerator = TextNode('HpTextGenerator')
BattleCheerText = '+' BattleCheerText = '+'
@ -200,13 +200,13 @@ class InteractiveAnimatedProp(GenericAnimatedProp.GenericAnimatedProp, FSM.FSM):
def enter(self): def enter(self):
GenericAnimatedProp.GenericAnimatedProp.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') self.notify.debug('props buff battles is true')
if base.cr.newsManager.isHolidayRunning(self.holidayId): if base.cr.newsManager.isHolidayRunning(self.holidayId):
self.notify.debug('holiday is running, doing idle interval') self.notify.debug('holiday is running, doing idle interval')
self.node.stop() self.node.stop()
self.node.pose('idle0', 0) self.node.pose('idle0', 0)
if base.config.GetBool('interactive-prop-random-idles', 1): if config.GetBool('interactive-prop-random-idles', 1):
self.requestIdleOrSad() self.requestIdleOrSad()
else: else:
self.idleInterval.loop() self.idleInterval.loop()
@ -262,7 +262,7 @@ class InteractiveAnimatedProp(GenericAnimatedProp.GenericAnimatedProp, FSM.FSM):
def chooseIdleAnimToRun(self): def chooseIdleAnimToRun(self):
result = self.numIdles - 1 result = self.numIdles - 1
if base.config.GetBool('randomize-interactive-idles', True): if config.GetBool('randomize-interactive-idles', True):
pairs = [] pairs = []
for i in xrange(self.numIdles): for i in xrange(self.numIdles):
reversedChance = self.numIdles - i - 1 reversedChance = self.numIdles - i - 1
@ -482,16 +482,16 @@ class InteractiveAnimatedProp(GenericAnimatedProp.GenericAnimatedProp, FSM.FSM):
if self.hasSpecialIval(origAnimName): if self.hasSpecialIval(origAnimName):
specialIval = self.getSpecialIval(origAnimName) specialIval = self.getSpecialIval(origAnimName)
idleAnimAndSound = Parallel(animIval, soundIval, specialIval) idleAnimAndSound = Parallel(animIval, soundIval, specialIval)
if base.config.GetBool('interactive-prop-info', False): if config.GetBool('interactive-prop-info', False):
idleAnimAndSound.append(printFunc) idleAnimAndSound.append(printFunc)
else: else:
idleAnimAndSound = Parallel(animIval, soundIval) idleAnimAndSound = Parallel(animIval, soundIval)
if base.config.GetBool('interactive-prop-info', False): if config.GetBool('interactive-prop-info', False):
idleAnimAndSound.append(printFunc) idleAnimAndSound.append(printFunc)
return idleAnimAndSound return idleAnimAndSound
def printAnimIfClose(self, animKey): def printAnimIfClose(self, animKey):
if base.config.GetBool('interactive-prop-info', False): if config.GetBool('interactive-prop-info', False):
try: try:
animName = self.node.getAnimFilename(animKey) animName = self.node.getAnimFilename(animKey)
baseAnimName = animName.split('/')[-1] baseAnimName = animName.split('/')[-1]

View file

@ -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.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.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')} 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): def __init__(self, node):
InteractiveAnimatedProp.InteractiveAnimatedProp.__init__(self, node, ToontownGlobals.MAILBOXES_BUFF_BATTLES) InteractiveAnimatedProp.InteractiveAnimatedProp.__init__(self, node, ToontownGlobals.MAILBOXES_BUFF_BATTLES)

View file

@ -4,7 +4,7 @@ from direct.directnotify import DirectNotifyGlobal
class MailboxOneAnimatedProp(ZeroAnimatedProp.ZeroAnimatedProp): class MailboxOneAnimatedProp(ZeroAnimatedProp.ZeroAnimatedProp):
notify = DirectNotifyGlobal.directNotify.newCategory('MailboxOneAnimatedProp') 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), 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), 1: (('tt_a_ara_dod_mailbox_firstMoveStruggle', 'tt_a_ara_dod_mailbox_firstMoveJump'), 20 * PauseTimeMult),
2: ('tt_a_ara_dod_mailbox_firstMoveFlagSpin2', 10 * PauseTimeMult), 2: ('tt_a_ara_dod_mailbox_firstMoveFlagSpin2', 10 * PauseTimeMult),

View file

@ -4,7 +4,7 @@ from direct.directnotify import DirectNotifyGlobal
class MailboxTwoAnimatedProp(ZeroAnimatedProp.ZeroAnimatedProp): class MailboxTwoAnimatedProp(ZeroAnimatedProp.ZeroAnimatedProp):
notify = DirectNotifyGlobal.directNotify.newCategory('MailboxTwoAnimatedProp') 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), 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), 1: (('tt_a_ara_dod_mailbox_firstMoveStruggle', 'tt_a_ara_dod_mailbox_firstMoveJump'), 20 * PauseTimeMult),
2: ('tt_a_ara_dod_mailbox_firstMoveFlagSpin2', 10 * PauseTimeMult), 2: ('tt_a_ara_dod_mailbox_firstMoveFlagSpin2', 10 * PauseTimeMult),

View file

@ -4,7 +4,7 @@ from direct.directnotify import DirectNotifyGlobal
class MailboxZeroAnimatedProp(ZeroAnimatedProp.ZeroAnimatedProp): class MailboxZeroAnimatedProp(ZeroAnimatedProp.ZeroAnimatedProp):
notify = DirectNotifyGlobal.directNotify.newCategory('MailboxZeroAnimatedProp') 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), 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), 1: (('tt_a_ara_dod_mailbox_firstMoveStruggle', 'tt_a_ara_dod_mailbox_firstMoveJump'), 20 * PauseTimeMult),
2: ('tt_a_ara_dod_mailbox_firstMoveFlagSpin2', 10 * PauseTimeMult), 2: ('tt_a_ara_dod_mailbox_firstMoveFlagSpin2', 10 * PauseTimeMult),

View file

@ -147,7 +147,7 @@ class Place(StateData.StateData, FriendsListManager.FriendsListManager):
return 1 return 1
def handleTeleportQuery(self, fromAvatar, toAvatar): def handleTeleportQuery(self, fromAvatar, toAvatar):
if base.config.GetBool('want-tptrack', False): if config.GetBool('want-tptrack', False):
if toAvatar == localAvatar: if toAvatar == localAvatar:
toAvatar.doTeleportResponse(fromAvatar, toAvatar, toAvatar.doId, 1, toAvatar.defaultShard, base.cr.playGame.getPlaceId(), self.getZoneId(), fromAvatar.doId) toAvatar.doTeleportResponse(fromAvatar, toAvatar, toAvatar.doId, 1, toAvatar.defaultShard, base.cr.playGame.getPlaceId(), self.getZoneId(), fromAvatar.doId)
else: else:
@ -635,7 +635,7 @@ class Place(StateData.StateData, FriendsListManager.FriendsListManager):
base.localAvatar.b_setAnimState('Died', 1, callback, [requestStatus]) base.localAvatar.b_setAnimState('Died', 1, callback, [requestStatus])
base.localAvatar.obscureMoveFurnitureButton(1) base.localAvatar.obscureMoveFurnitureButton(1)
return return
def __pgdiedDone(self): def __pgdiedDone(self):
self.fsm.request('walk') self.fsm.request('walk')

View file

@ -11,7 +11,7 @@ class StreetSign(DistributedObject.DistributedObject):
RedownloadTaskName = 'RedownloadStreetSign' RedownloadTaskName = 'RedownloadStreetSign'
StreetSignFileName = config.GetString('street-sign-filename', 'texture.jpg') StreetSignFileName = config.GetString('street-sign-filename', 'texture.jpg')
StreetSignBaseDir = config.GetString('street-sign-base-dir', 'sign') 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') notify = DirectNotifyGlobal.directNotify.newCategory('StreetSign')
def __init__(self): def __init__(self):

View file

@ -178,7 +178,7 @@ class TrashcanInteractiveProp(InteractiveAnimatedProp.InteractiveAnimatedProp):
'tt_a_ara_mml_trashcan_fightIdle'), '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.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')} 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): def __init__(self, node):
InteractiveAnimatedProp.InteractiveAnimatedProp.__init__(self, node, ToontownGlobals.TRASHCANS_BUFF_BATTLES) InteractiveAnimatedProp.InteractiveAnimatedProp.__init__(self, node, ToontownGlobals.TRASHCANS_BUFF_BATTLES)

View file

@ -4,7 +4,7 @@ from direct.directnotify import DirectNotifyGlobal
class TrashcanOneAnimatedProp(ZeroAnimatedProp.ZeroAnimatedProp): class TrashcanOneAnimatedProp(ZeroAnimatedProp.ZeroAnimatedProp):
notify = DirectNotifyGlobal.directNotify.newCategory('TrashcanOneAnimatedProp') 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), PhaseInfo = {0: ('tt_a_ara_dga_trashcan_firstMoveLidFlip1', 40 * PauseTimeMult),
1: ('tt_a_ara_dga_trashcan_firstMoveStruggle', 20 * PauseTimeMult), 1: ('tt_a_ara_dga_trashcan_firstMoveStruggle', 20 * PauseTimeMult),
2: ('tt_a_ara_dga_trashcan_firstMoveLidFlip2', 10 * PauseTimeMult), 2: ('tt_a_ara_dga_trashcan_firstMoveLidFlip2', 10 * PauseTimeMult),

View file

@ -4,7 +4,7 @@ from direct.directnotify import DirectNotifyGlobal
class TrashcanTwoAnimatedProp(ZeroAnimatedProp.ZeroAnimatedProp): class TrashcanTwoAnimatedProp(ZeroAnimatedProp.ZeroAnimatedProp):
notify = DirectNotifyGlobal.directNotify.newCategory('TrashcanTwoAnimatedProp') 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), PhaseInfo = {0: ('tt_a_ara_dga_trashcan_firstMoveLidFlip1', 40 * PauseTimeMult),
1: ('tt_a_ara_dga_trashcan_firstMoveStruggle', 20 * PauseTimeMult), 1: ('tt_a_ara_dga_trashcan_firstMoveStruggle', 20 * PauseTimeMult),
2: ('tt_a_ara_dga_trashcan_firstMoveLidFlip2', 10 * PauseTimeMult), 2: ('tt_a_ara_dga_trashcan_firstMoveLidFlip2', 10 * PauseTimeMult),

View file

@ -4,7 +4,7 @@ from direct.directnotify import DirectNotifyGlobal
class TrashcanZeroAnimatedProp(ZeroAnimatedProp.ZeroAnimatedProp): class TrashcanZeroAnimatedProp(ZeroAnimatedProp.ZeroAnimatedProp):
notify = DirectNotifyGlobal.directNotify.newCategory('TrashcanZeroAnimatedProp') 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), PhaseInfo = {0: ('tt_a_ara_dga_trashcan_firstMoveLidFlip1', 40 * PauseTimeMult),
1: ('tt_a_ara_dga_trashcan_firstMoveStruggle', 20 * PauseTimeMult), 1: ('tt_a_ara_dga_trashcan_firstMoveStruggle', 20 * PauseTimeMult),
2: ('tt_a_ara_dga_trashcan_firstMoveLidFlip2', 10 * PauseTimeMult), 2: ('tt_a_ara_dga_trashcan_firstMoveLidFlip2', 10 * PauseTimeMult),

View file

@ -95,7 +95,7 @@ class ZeroAnimatedProp(GenericAnimatedProp.GenericAnimatedProp, FSM.FSM):
def chooseAnimToRun(self): def chooseAnimToRun(self):
result = self.curPhase result = self.curPhase
if base.config.GetBool('anim-props-randomized', True): if config.GetBool('anim-props-randomized', True):
pairs = [] pairs = []
for i in xrange(self.curPhase + 1): for i in xrange(self.curPhase + 1):
pairs.append((math.pow(2, i), i)) pairs.append((math.pow(2, i), i))

View file

@ -19,7 +19,7 @@ class AccountServerDate:
if self.__grabbed and not force: if self.__grabbed and not force:
self.notify.debug('using cached account server date') self.notify.debug('using cached account server date')
return 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() self.__useLocalClock()
return return
url = URLSpec(self.getServer()) url = URLSpec(self.getServer())

View file

@ -240,7 +240,7 @@ class AvatarChoice(DirectButton):
self.deleteWithPasswordFrame.hide() self.deleteWithPasswordFrame.hide()
base.transitions.noTransitions() base.transitions.noTransitions()
messenger.send(self.doneEvent, ['delete', self.position]) 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') self.notify.info('QA-REGRESSION: DELETEATOON: Deleting A Toon')
else: else:
if errorMsg is not None: if errorMsg is not None:
@ -259,7 +259,7 @@ class AvatarChoice(DirectButton):
self.deleteWithPasswordFrame.hide() self.deleteWithPasswordFrame.hide()
base.transitions.noTransitions() base.transitions.noTransitions()
messenger.send(self.doneEvent, ['delete', self.position]) 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') self.notify.info('QA-REGRESSION: DELETEATOON: Deleting A Toon')
else: else:
self.deleteWithPasswordFrame['text'] = TTLocalizer.AvatarChoiceDeleteWrongConfirm % {'name': self.name, self.deleteWithPasswordFrame['text'] = TTLocalizer.AvatarChoiceDeleteWrongConfirm % {'name': self.name,

View file

@ -58,7 +58,7 @@ class AvatarChooser(StateData.StateData):
self.pickAToonBG.setBin('background', 1) self.pickAToonBG.setBin('background', 1)
self.pickAToonBG.reparentTo(aspect2d) self.pickAToonBG.reparentTo(aspect2d)
base.setBackgroundColor(Vec4(0.145, 0.368, 0.78, 1)) 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: for panel in self.panelList:
panel.show() panel.show()
self.accept(panel.doneEvent, self.__handlePanelDone) self.accept(panel.doneEvent, self.__handlePanelDone)

View file

@ -91,7 +91,7 @@ class MakeAToon(StateData.StateData):
def enter(self): def enter(self):
self.notify.debug('Starting Make A Toon.') 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') self.notify.info('QA-REGRESSION: MAKEATOON: Starting Make A Toon')
base.cr.centralLogger.writeClientEvent('MAT - startingMakeAToon') base.cr.centralLogger.writeClientEvent('MAT - startingMakeAToon')
base.camLens.setFov(ToontownGlobals.MakeAToonCameraFov) base.camLens.setFov(ToontownGlobals.MakeAToonCameraFov)
@ -252,8 +252,8 @@ class MakeAToon(StateData.StateData):
self.cls.load() self.cls.load()
self.ns.load() self.ns.load()
self.music = base.loadMusic('phase_3/audio/bgm/create_a_toon.ogg') self.music = base.loadMusic('phase_3/audio/bgm/create_a_toon.ogg')
self.musicVolume = base.config.GetFloat('makeatoon-music-volume', 1) self.musicVolume = config.GetFloat('makeatoon-music-volume', 1)
self.sfxVolume = base.config.GetFloat('makeatoon-sfx-volume', 1) self.sfxVolume = config.GetFloat('makeatoon-sfx-volume', 1)
self.soundBack = base.loadSfx('phase_3/audio/sfx/GUI_create_toon_back.ogg') self.soundBack = base.loadSfx('phase_3/audio/sfx/GUI_create_toon_back.ogg')
self.crashSounds = [] self.crashSounds = []
self.crashSounds.append(base.loadSfx('phase_3/audio/sfx/tt_s_ara_mat_crash_boing.ogg')) 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) self.ns.rejectName(TTLocalizer.RejectNameText)
def __handleNameShopDone(self): 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.notify.info('QA-REGRESSION: MAKEATOON: Creating A Toon')
self.guiLastButton.hide() self.guiLastButton.hide()
self.guiCheckButton.hide() self.guiCheckButton.hide()

View file

@ -1023,12 +1023,12 @@ class NameShop(StateData.StateData):
def __openTutorialDialog(self, choice = 0): def __openTutorialDialog(self, choice = 0):
if choice == 1: if choice == 1:
self.notify.debug('enterTutorial') 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.notify.info('QA-REGRESSION: ENTERTUTORIAL: Enter Tutorial')
self.__createAvatar() self.__createAvatar()
else: else:
self.notify.debug('skipTutorial') 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.notify.info('QA-REGRESSION: SKIPTUTORIAL: Skip Tutorial')
self.__handleSkipTutorial() self.__handleSkipTutorial()
self.promptTutorialDialog.destroy() self.promptTutorialDialog.destroy()

View file

@ -364,7 +364,7 @@ class DistributedCannonGame(DistributedMinigame):
DistributedMinigame.setGameStart(self, timestamp) DistributedMinigame.setGameStart(self, timestamp)
self.__stopIntro() self.__stopIntro()
self.__putCameraBehindCannon() self.__putCameraBehindCannon()
if not base.config.GetBool('endless-cannon-game', 0): if not config.GetBool('endless-cannon-game', 0):
self.timer.show() self.timer.show()
self.timer.countdown(CannonGameGlobals.GameTime, self.__gameTimerExpired) self.timer.countdown(CannonGameGlobals.GameTime, self.__gameTimerExpired)
self.rewardPanel.reparentTo(base.a2dTopRight) self.rewardPanel.reparentTo(base.a2dTopRight)

View file

@ -634,7 +634,7 @@ class DistributedCatchGame(DistributedMinigame):
self.timer.hide() self.timer.hide()
#For the Alpha Blueprint ARG #For the Alpha Blueprint ARG
if base.config.GetBool('want-blueprint4-ARG', False): if config.GetBool('want-blueprint4-ARG', False):
MinigameGlobals.generateDebugARGPhrase() MinigameGlobals.generateDebugARGPhrase()
if self.fruitsCaught >= self.numFruits: if self.fruitsCaught >= self.numFruits:

View file

@ -43,7 +43,7 @@ class DistributedCogThiefGame(DistributedMinigame):
self.cogInfo = {} self.cogInfo = {}
self.lastTimeControlPressed = 0 self.lastTimeControlPressed = 0
self.stolenBarrels = [] self.stolenBarrels = []
self.useOrthoWalk = base.config.GetBool('cog-thief-ortho', 0) self.useOrthoWalk = config.GetBool('cog-thief-ortho', 0)
self.resultIval = None self.resultIval = None
self.gameIsEnding = False self.gameIsEnding = False
self.__textGen = TextNode('cogThiefGame') self.__textGen = TextNode('cogThiefGame')
@ -250,7 +250,7 @@ class DistributedCogThiefGame(DistributedMinigame):
return return
self.notify.debug('setGameStart') self.notify.debug('setGameStart')
DistributedMinigame.setGameStart(self, timestamp) 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.show()
self.timer.countdown(CTGG.GameTime, self.__gameTimerExpired) self.timer.countdown(CTGG.GameTime, self.__gameTimerExpired)
self.clockStopTime = None self.clockStopTime = None
@ -321,7 +321,7 @@ class DistributedCogThiefGame(DistributedMinigame):
camera.reparentTo(render) camera.reparentTo(render)
p = self.cameraTopView p = self.cameraTopView
camera.setPosHpr(p[0], p[1], p[2], p[3], p[4], p[5]) 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): def destroyGameWalk(self):
self.notify.debug('destroyOrthoWalk') self.notify.debug('destroyOrthoWalk')
@ -766,8 +766,8 @@ class DistributedCogThiefGame(DistributedMinigame):
self.stolenBarrels.append(barrelIndex) self.stolenBarrels.append(barrelIndex)
barrel = self.barrels[barrelIndex] barrel = self.barrels[barrelIndex]
barrel.hide() barrel.hide()
if base.config.GetBool('cog-thief-check-barrels', 1): if config.GetBool('cog-thief-check-barrels', 1):
if not base.config.GetBool('cog-thief-endless', 0): if not config.GetBool('cog-thief-endless', 0):
if len(self.stolenBarrels) == len(self.barrels): if len(self.stolenBarrels) == len(self.barrels):
localStamp = globalClockDelta.networkToLocalTime(timestamp, bits=32) localStamp = globalClockDelta.networkToLocalTime(timestamp, bits=32)
gameTime = self.local2GameTime(localStamp) gameTime = self.local2GameTime(localStamp)
@ -838,7 +838,7 @@ class DistributedCogThiefGame(DistributedMinigame):
return False return False
def getNumCogs(self): def getNumCogs(self):
result = base.config.GetInt('cog-thief-num-cogs', 0) result = config.GetInt('cog-thief-num-cogs', 0)
if not result: if not result:
safezone = self.getSafezoneId() safezone = self.getSafezoneId()
result = CTGG.calculateCogs(self.numPlayers, safezone) result = CTGG.calculateCogs(self.numPlayers, safezone)
@ -899,7 +899,7 @@ class DistributedCogThiefGame(DistributedMinigame):
self.resultIval = Parallel(textTrack, soundTrack) self.resultIval = Parallel(textTrack, soundTrack)
self.resultIval.start() self.resultIval.start()
#For the Alpha Blueprint ARG #For the Alpha Blueprint ARG
if base.config.GetBool('want-blueprint4-ARG', False): if config.GetBool('want-blueprint4-ARG', False):
MinigameGlobals.generateDebugARGPhrase() MinigameGlobals.generateDebugARGPhrase()
def __genText(self, text): def __genText(self, text):

View file

@ -1095,7 +1095,7 @@ class DistributedMazeGame(DistributedMinigame):
self.showScoreTrack.start() self.showScoreTrack.start()
#For the Alpha Blueprint ARG #For the Alpha Blueprint ARG
if base.config.GetBool('want-blueprint4-ARG', False): if config.GetBool('want-blueprint4-ARG', False):
MinigameGlobals.generateDebugARGPhrase() MinigameGlobals.generateDebugARGPhrase()
def exitShowScores(self): def exitShowScores(self):

View file

@ -891,7 +891,7 @@ class DistributedPhotoGame(DistributedMinigame, PhotoGameBase.PhotoGameBase):
DistributedMinigame.setGameStart(self, timestamp) DistributedMinigame.setGameStart(self, timestamp)
self.__stopIntro() self.__stopIntro()
self.__putCameraOnTripod() self.__putCameraOnTripod()
if not base.config.GetBool('endless-cannon-game', 0): if not config.GetBool('endless-cannon-game', 0):
self.timer.show() self.timer.show()
self.timer.countdown(self.data['TIME'], self.__gameTimerExpired) self.timer.countdown(self.data['TIME'], self.__gameTimerExpired)
self.filmPanel.reparentTo(base.a2dTopRight) self.filmPanel.reparentTo(base.a2dTopRight)

View file

@ -944,7 +944,7 @@ class DistributedTugOfWarGame(DistributedMinigame):
return return
if self.suit: if self.suit:
#For the Alpha Blueprint ARG #For the Alpha Blueprint ARG
if base.config.GetBool('want-blueprint4-ARG', False): if config.GetBool('want-blueprint4-ARG', False):
MinigameGlobals.generateDebugARGPhrase() MinigameGlobals.generateDebugARGPhrase()
if self.suitId in winners: if self.suitId in winners:
newPos = VBase3(2.65, 18, 0.1) newPos = VBase3(2.65, 18, 0.1)

View file

@ -243,7 +243,7 @@ class DistributedTwoDGame(DistributedMinigame):
self.showScoreTrack.start() self.showScoreTrack.start()
#For the Alpha Blueprint ARG #For the Alpha Blueprint ARG
if base.config.GetBool('want-blueprint4-ARG', False): if config.GetBool('want-blueprint4-ARG', False):
MinigameGlobals.generateDebugARGPhrase() MinigameGlobals.generateDebugARGPhrase()
def exitShowScores(self): def exitShowScores(self):

View file

@ -34,7 +34,7 @@ class CalendarGuiDay(DirectFrame):
self.partiesInvitedToToday = [] self.partiesInvitedToToday = []
self.hostedPartiesToday = [] self.hostedPartiesToday = []
self.yearlyHolidaysToday = [] self.yearlyHolidaysToday = []
self.showMarkers = base.config.GetBool('show-calendar-markers', 0) self.showMarkers = config.GetBool('show-calendar-markers', 0)
self.filter = ToontownGlobals.CalendarFilterShowAll self.filter = ToontownGlobals.CalendarFilterShowAll
self.load() self.load()
self.createGuiObjects() self.createGuiObjects()
@ -181,7 +181,7 @@ class CalendarGuiDay(DirectFrame):
self.addTitleAndDescToScrollList(holidayName, holidayDesc) self.addTitleAndDescToScrollList(holidayName, holidayDesc)
self.scrollList.refresh() 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(): 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') 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: for text in testItems:

View file

@ -18,7 +18,7 @@ class CalendarGuiMonth(DirectFrame):
if self.onlyFutureDaysClickable: if self.onlyFutureDaysClickable:
self.onlyFutureMonthsClickable = True self.onlyFutureMonthsClickable = True
DirectFrame.__init__(self, parent=parent, scale=scale, pos=pos) 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.load()
self.createGuiObjects() self.createGuiObjects()
self.lastSelectedDate = None self.lastSelectedDate = None

View file

@ -19,7 +19,7 @@ class DistributedPartyTeamActivity(DistributedPartyActivity):
self._maxPlayersPerTeam = 0 self._maxPlayersPerTeam = 0
self._minPlayersPerTeam = 0 self._minPlayersPerTeam = 0
self._duration = 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._willBalanceTeams = balanceTeams
self._currentStatus = '' self._currentStatus = ''
return return

View file

@ -276,7 +276,7 @@ class Party(Place.Place):
if self.isPartyEnding: if self.isPartyEnding:
teleportNotify.debug('party ending, sending teleportResponse') teleportNotify.debug('party ending, sending teleportResponse')
fromAvatar.d_teleportResponse(toAvatar.doId, 0, toAvatar.defaultShard, base.cr.playGame.getPlaceId(), self.getZoneId()) 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: if toAvatar == localAvatar:
localAvatar.doTeleportResponse(fromAvatar, toAvatar, toAvatar.doId, 1, toAvatar.defaultShard, base.cr.playGame.getPlaceId(), self.getZoneId(), fromAvatar.doId) localAvatar.doTeleportResponse(fromAvatar, toAvatar, toAvatar.doId, 1, toAvatar.defaultShard, base.cr.playGame.getPlaceId(), self.getZoneId(), fromAvatar.doId)
else: else:

View file

@ -59,7 +59,7 @@ class PartyPlanner(DirectFrame, FSM):
'minute': (15, -15), 'minute': (15, -15),
'ampm': (1, -1)} 'ampm': (1, -1)}
self.partyInfo = None 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.load()
self.request('Welcome') self.request('Welcome')
return return

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