From 431732ac5a11ede756c143bd648fdde486c928e7 Mon Sep 17 00:00:00 2001 From: Harvir Date: Fri, 15 Aug 2014 00:35:01 +0100 Subject: [PATCH] global: Clean up usage of base.config (using builtin config). --- otp/ai/TimeManager.py | 16 +++---- otp/avatar/Avatar.py | 6 +-- otp/avatar/DistributedPlayer.py | 10 ++--- otp/avatar/LocalAvatar.py | 24 +++++----- otp/chat/ChatInputNormal.py | 4 +- otp/chat/ChatInputTyped.py | 6 +-- otp/chat/ChatInputWhiteListFrame.py | 8 ++-- otp/chat/ChatManager.py | 4 +- otp/chat/TalkAssistant.py | 4 +- otp/distributed/OTPClientRepository.py | 28 ++++++------ otp/friends/GuildManager.py | 2 +- otp/launcher/DummyLauncherBase.py | 4 +- otp/launcher/LauncherBase.py | 4 +- otp/login/AccountServerConstants.py | 4 +- otp/login/TTAccount.py | 2 +- otp/margins/MarginCell.py | 2 +- otp/otpbase/OTPBase.py | 2 +- otp/speedchat/SpeedChatGMHandler.py | 12 ++--- toontown/ai/CrashedLeaderBoardDecorator.py | 4 +- toontown/ai/NewsManager.py | 2 +- toontown/battle/BattlePlace.py | 2 +- toontown/battle/BattleProps.py | 2 +- toontown/battle/BattleSounds.py | 2 +- toontown/battle/Movie.py | 10 ++--- toontown/battle/MovieLure.py | 2 +- toontown/battle/MovieSquirt.py | 10 ++--- toontown/battle/MovieToonVictory.py | 4 +- toontown/battle/RewardPanel.py | 6 +-- toontown/building/DistributedBoardingParty.py | 4 +- toontown/building/DistributedBuilding.py | 4 +- toontown/building/DistributedDoor.py | 4 +- toontown/building/DistributedElevatorInt.py | 2 +- toontown/catalog/CatalogItemPanel.py | 4 +- toontown/catalog/CatalogScreen.py | 8 ++-- toontown/catalog/MailboxScreen.py | 2 +- toontown/char/Char.py | 14 +++--- toontown/chat/TTChatInputSpeedChat.py | 12 ++--- toontown/chat/TTChatInputWhiteList.py | 4 +- toontown/chat/TTWhiteList.py | 4 +- toontown/chat/ToontownChatManager.py | 8 ++-- toontown/cogdominium/CogdoFlyingGame.py | 4 +- toontown/cogdominium/CogdoMaze.py | 2 +- toontown/cogdominium/CogdoMazeGame.py | 2 +- toontown/cogdominium/DistCogdoFlyingGame.py | 2 +- toontown/cogdominium/DistCogdoGame.py | 2 +- toontown/cogdominium/DistCogdoMazeGame.py | 2 +- toontown/coghq/BossbotCogHQLoader.py | 2 +- toontown/coghq/CashbotCogHQLoader.py | 2 +- toontown/coghq/DistributedBanquetTable.py | 4 +- toontown/coghq/DistributedCountryClub.py | 2 +- toontown/coghq/DistributedGolfSpot.py | 4 +- toontown/coghq/FactoryLevelMgr.py | 2 +- toontown/coghq/LawbotCogHQLoader.py | 2 +- toontown/coghq/SellbotCogHQLoader.py | 2 +- toontown/distributed/PlayGame.py | 6 +-- .../distributed/ToontownClientRepository.py | 6 +-- toontown/effects/FireworkEffect.py | 26 +++++------ toontown/effects/FireworkShowMixin.py | 44 +++++++++---------- toontown/election/DistributedElectionEvent.py | 28 ++++++------ toontown/estate/DistributedPhone.py | 2 +- toontown/estate/Estate.py | 6 +-- toontown/estate/houseDesign.py | 10 ++--- toontown/fishing/FishBase.py | 2 +- toontown/friends/FriendInviter.py | 6 +-- toontown/golf/DistributedGolfHole.py | 10 ++--- toontown/hood/GenericAnimatedBuilding.py | 2 +- toontown/hood/GenericAnimatedProp.py | 2 +- toontown/hood/HydrantInteractiveProp.py | 2 +- toontown/hood/HydrantOneAnimatedProp.py | 2 +- toontown/hood/HydrantTwoAnimatedProp.py | 2 +- toontown/hood/HydrantZeroAnimatedProp.py | 2 +- toontown/hood/InteractiveAnimatedProp.py | 14 +++--- toontown/hood/MailboxInteractiveProp.py | 2 +- toontown/hood/MailboxOneAnimatedProp.py | 2 +- toontown/hood/MailboxTwoAnimatedProp.py | 2 +- toontown/hood/MailboxZeroAnimatedProp.py | 2 +- toontown/hood/Place.py | 4 +- toontown/hood/StreetSign.py | 2 +- toontown/hood/TrashcanInteractiveProp.py | 2 +- toontown/hood/TrashcanOneAnimatedProp.py | 2 +- toontown/hood/TrashcanTwoAnimatedProp.py | 2 +- toontown/hood/TrashcanZeroAnimatedProp.py | 2 +- toontown/hood/ZeroAnimatedProp.py | 2 +- toontown/login/AccountServerDate.py | 2 +- toontown/login/AvatarChoice.py | 4 +- toontown/login/AvatarChooser.py | 2 +- toontown/makeatoon/MakeAToon.py | 8 ++-- toontown/makeatoon/NameShop.py | 4 +- toontown/minigame/DistributedCannonGame.py | 2 +- toontown/minigame/DistributedCatchGame.py | 2 +- toontown/minigame/DistributedCogThiefGame.py | 14 +++--- toontown/minigame/DistributedMazeGame.py | 2 +- toontown/minigame/DistributedPhotoGame.py | 2 +- toontown/minigame/DistributedTugOfWarGame.py | 2 +- toontown/minigame/DistributedTwoDGame.py | 2 +- toontown/parties/CalendarGuiDay.py | 4 +- toontown/parties/CalendarGuiMonth.py | 2 +- .../parties/DistributedPartyTeamActivity.py | 2 +- toontown/parties/Party.py | 2 +- toontown/parties/PartyPlanner.py | 2 +- toontown/pets/Pet.py | 2 +- toontown/pets/PetAvatarPanel.py | 6 +-- toontown/quest/QuestChoiceGui.py | 2 +- toontown/quest/QuestMap.py | 2 +- toontown/quest/QuestParser.py | 6 +-- toontown/racing/DistributedStartingBlock.py | 6 +-- toontown/racing/DistributedVehicle.py | 2 +- toontown/racing/Kart.py | 8 ++-- toontown/safezone/DDPlayground.py | 2 +- toontown/safezone/DistributedFishingSpot.py | 2 +- toontown/safezone/DistributedGolfKart.py | 2 +- toontown/safezone/DistributedPicnicBasket.py | 2 +- toontown/safezone/DistributedTrolley.py | 6 +-- toontown/safezone/GSSafeZoneLoader.py | 4 +- toontown/safezone/GameMenu.py | 6 +-- toontown/safezone/OZPlayground.py | 2 +- toontown/safezone/TTPlayground.py | 2 +- toontown/shtiker/DirectNewsFrame.py | 4 +- toontown/shtiker/EventsPage.py | 6 +-- toontown/shtiker/HtmlView.py | 6 +-- toontown/shtiker/IssueFrame.py | 4 +- toontown/shtiker/MapPage.py | 8 ++-- toontown/shtiker/OptionsPage.py | 4 +- toontown/shtiker/ShtikerBook.py | 8 ++-- toontown/suit/DistributedLawbotBoss.py | 4 +- toontown/suit/DistributedSellbotBoss.py | 2 +- toontown/suit/DistributedSuitBase.py | 2 +- toontown/suit/Suit.py | 24 +++++----- toontown/toon/DistributedNPCPetclerk.py | 2 +- toontown/toon/DistributedToon.py | 10 ++--- toontown/toon/InventoryNew.py | 2 +- toontown/toon/LocalToon.py | 38 ++++++++-------- toontown/toon/TTEmote.py | 16 +++---- toontown/toon/Toon.py | 24 +++++----- toontown/toon/ToonAvatarPanel.py | 2 +- toontown/toon/ToonHead.py | 16 +++---- toontown/toonbase/ToonBase.py | 8 ++-- toontown/toonbase/ToontownStart.py | 2 +- toontown/toontowngui/NewsPageButtonManager.py | 2 +- toontown/toontowngui/TeaserPanel.py | 2 +- toontown/toontowngui/ToontownLoadingScreen.py | 2 +- toontown/town/Street.py | 2 +- toontown/town/TownBattleSOSPanel.py | 2 +- toontown/town/TownLoader.py | 4 +- toontown/trolley/Trolley.py | 2 +- toontown/uberdog/ClientServicesManager.py | 2 +- 146 files changed, 408 insertions(+), 408 deletions(-) diff --git a/otp/ai/TimeManager.py b/otp/ai/TimeManager.py index 0b8284ae..f0b3e867 100644 --- a/otp/ai/TimeManager.py +++ b/otp/ai/TimeManager.py @@ -20,14 +20,14 @@ class TimeManager(DistributedObject.DistributedObject): def __init__(self, cr): DistributedObject.DistributedObject.__init__(self, cr) - self.updateFreq = base.config.GetFloat('time-manager-freq', 1800) - self.minWait = base.config.GetFloat('time-manager-min-wait', 10) - self.maxUncertainty = base.config.GetFloat('time-manager-max-uncertainty', 0.25) - self.maxAttempts = base.config.GetInt('time-manager-max-attempts', 5) - self.extraSkew = base.config.GetInt('time-manager-extra-skew', 0) + self.updateFreq = config.GetFloat('time-manager-freq', 1800) + self.minWait = config.GetFloat('time-manager-min-wait', 10) + self.maxUncertainty = config.GetFloat('time-manager-max-uncertainty', 0.25) + self.maxAttempts = config.GetInt('time-manager-max-attempts', 5) + self.extraSkew = config.GetInt('time-manager-extra-skew', 0) if self.extraSkew != 0: self.notify.info('Simulating clock skew of %0.3f s' % self.extraSkew) - self.reportFrameRateInterval = base.config.GetDouble('report-frame-rate-interval', 300.0) + self.reportFrameRateInterval = config.GetDouble('report-frame-rate-interval', 300.0) self.talkResult = 0 self.thisContext = -1 self.nextContext = 0 @@ -45,7 +45,7 @@ class TimeManager(DistributedObject.DistributedObject): DistributedObject.DistributedObject.generate(self) self.accept(OTPGlobals.SynchronizeHotkey, self.handleHotkey) self.accept('clock_error', self.handleClockError) - if __dev__ and base.config.GetBool('enable-garbage-hotkey', 0): + if __dev__ and config.GetBool('enable-garbage-hotkey', 0): self.accept(OTPGlobals.DetectGarbageHotkey, self.handleDetectGarbageHotkey) if self.updateFreq > 0: self.startTask() @@ -210,7 +210,7 @@ class TimeManager(DistributedObject.DistributedObject): if frameRateInterval == 0: return if not base.frameRateMeter: - maxFrameRateInterval = base.config.GetDouble('max-frame-rate-interval', 30.0) + maxFrameRateInterval = config.GetDouble('max-frame-rate-interval', 30.0) globalClock.setAverageFrameRateInterval(min(frameRateInterval, maxFrameRateInterval)) taskMgr.remove('frameRateMonitor') taskMgr.doMethodLater(frameRateInterval, self.frameRateMonitor, 'frameRateMonitor') diff --git a/otp/avatar/Avatar.py b/otp/avatar/Avatar.py index 23c4cd75..cc3eadda 100644 --- a/otp/avatar/Avatar.py +++ b/otp/avatar/Avatar.py @@ -326,12 +326,12 @@ class Avatar(Actor, ShadowCaster): sfxIndex = 5 else: notify.error('unrecognized dialogue type: ', type) - + # The standard cog phrase gets too repetitive when there are so many cogs running around. # Let's just choose a random one. - if base.config.GetBool('want-doomsday', False) and self.playerType == NametagGroup.CCSuit: + if config.GetBool('want-doomsday', False) and self.playerType == NametagGroup.CCSuit: sfxIndex = random.choice([1, 2, 2, 2, 2, 3, 3, 3]) #Duplicates are Intentional - + if sfxIndex != None and sfxIndex < len(dialogueArray) and dialogueArray[sfxIndex] != None: base.playSfx(dialogueArray[sfxIndex], node=self) return diff --git a/otp/avatar/DistributedPlayer.py b/otp/avatar/DistributedPlayer.py index 2adddc5d..21652ef2 100644 --- a/otp/avatar/DistributedPlayer.py +++ b/otp/avatar/DistributedPlayer.py @@ -15,7 +15,7 @@ from otp.otpbase import OTPGlobals from otp.avatar.Avatar import teleportNotify from otp.distributed.TelemetryLimited import TelemetryLimited from otp.ai.MagicWordGlobal import * -if base.config.GetBool('want-chatfilter-hacks', 0): +if config.GetBool('want-chatfilter-hacks', 0): from otp.switchboard import badwordpy import os badwordpy.init(os.environ.get('OTP') + '\\src\\switchboard\\', '') @@ -45,7 +45,7 @@ class DistributedPlayer(DistributedAvatar.DistributedAvatar, PlayerBase.PlayerBa self.DISLid = 0 self.adminAccess = 0 self.autoRun = 0 - self.whiteListEnabled = base.config.GetBool('whitelist-chat-enabled', 1) + self.whiteListEnabled = config.GetBool('whitelist-chat-enabled', 1) return @@ -225,8 +225,8 @@ class DistributedPlayer(DistributedAvatar.DistributedAvatar, PlayerBase.PlayerBa if self.cr.wantMagicWords and len(chatString) > 0 and chatString[0] == '~': messenger.send('magicWord', [chatString]) else: - if base.config.GetBool('want-chatfilter-hacks', 0): - if base.config.GetBool('want-chatfilter-drop-offending', 0): + if config.GetBool('want-chatfilter-hacks', 0): + if config.GetBool('want-chatfilter-drop-offending', 0): if badwordpy.test(chatString): return else: @@ -356,7 +356,7 @@ class DistributedPlayer(DistributedAvatar.DistributedAvatar, PlayerBase.PlayerBa teleportNotify.debug('party is ending') self.d_teleportResponse(self.doId, 0, 0, 0, 0, sendToId=requesterId) return - if self.__teleportAvailable and not self.ghostMode and base.config.GetBool('can-be-teleported-to', 1): + if self.__teleportAvailable and not self.ghostMode and config.GetBool('can-be-teleported-to', 1): teleportNotify.debug('teleport initiation successful') self.setSystemMessage(requesterId, OTPLocalizer.WhisperComingToVisit % avatar.getName()) messenger.send('teleportQuery', [avatar, self]) diff --git a/otp/avatar/LocalAvatar.py b/otp/avatar/LocalAvatar.py index 4d780204..b9745ab1 100644 --- a/otp/avatar/LocalAvatar.py +++ b/otp/avatar/LocalAvatar.py @@ -30,13 +30,13 @@ from toontown.toonbase import ToontownGlobals class LocalAvatar(DistributedAvatar.DistributedAvatar, DistributedSmoothNode.DistributedSmoothNode): notify = DirectNotifyGlobal.directNotify.newCategory('LocalAvatar') - wantDevCameraPositions = base.config.GetBool('want-dev-camera-positions', 0) - wantMouse = base.config.GetBool('want-mouse', 0) - sleepTimeout = base.config.GetInt('sleep-timeout', 120) - swimTimeout = base.config.GetInt('afk-timeout', 600) - __enableMarkerPlacement = base.config.GetBool('place-markers', 0) - acceptingNewFriends = base.config.GetBool('accepting-new-friends', 1) - acceptingNonFriendWhispers = base.config.GetBool('accepting-non-friend-whispers', 0) + wantDevCameraPositions = config.GetBool('want-dev-camera-positions', 0) + wantMouse = config.GetBool('want-mouse', 0) + sleepTimeout = config.GetInt('sleep-timeout', 120) + swimTimeout = config.GetInt('afk-timeout', 600) + __enableMarkerPlacement = config.GetBool('place-markers', 0) + acceptingNewFriends = config.GetBool('accepting-new-friends', 1) + acceptingNonFriendWhispers = config.GetBool('accepting-non-friend-whispers', 0) def __init__(self, cr, chatMgr, talkAssistant = None, passMessagesThrough = False): try: @@ -1263,14 +1263,14 @@ def collisionsOn(): if not base.localAvatar: return 'No localAvatar!' base.localAvatar.collisionsOn() - + @magicWord(category=CATEGORY_MOBILITY) def enableAFGravity(): """Turn on Estate April Fools gravity.""" if not base.localAvatar: return 'No localAvatar!' base.localAvatar.controlManager.currentControls.setGravity(ToontownGlobals.GravityValue * 0.75) - + @magicWord(category=CATEGORY_MOBILITY, types=[int, bool]) def setGravity(gravityValue, overrideWarning=False): """Set your gravity value!""" @@ -1279,21 +1279,21 @@ def setGravity(gravityValue, overrideWarning=False): if gravityValue < 1 and not overrideWarning: return 'A value lower than 1 may crash your client.' base.localAvatar.controlManager.currentControls.setGravity(gravityValue) - + @magicWord(category=CATEGORY_MOBILITY) def normalGravity(): """Turn off Estate April Fools gravity.""" if not base.localAvatar: return 'No localAvatar!' base.localAvatar.controlManager.currentControls.setGravity(ToontownGlobals.GravityValue * 2.0) - + @magicWord(category=CATEGORY_DEBUG) def getPos(): """Get current position of your toon.""" if not base.localAvatar: return 'No localAvatar!' return base.localAvatar.getPos() - + @magicWord(category=CATEGORY_DEBUG, types=[float, float, float]) def setPos(toonX, toonY, toonZ): """Set position of your toon.""" diff --git a/otp/chat/ChatInputNormal.py b/otp/chat/ChatInputNormal.py index 67826b3d..84daa2c8 100644 --- a/otp/chat/ChatInputNormal.py +++ b/otp/chat/ChatInputNormal.py @@ -18,9 +18,9 @@ class ChatInputNormal(DirectObject.DirectObject): wantHistory = 0 if __dev__: wantHistory = 1 - self.wantHistory = base.config.GetBool('want-chat-history', wantHistory) + self.wantHistory = config.GetBool('want-chat-history', wantHistory) self.history = [''] - self.historySize = base.config.GetInt('chat-history-size', 10) + self.historySize = config.GetInt('chat-history-size', 10) self.historyIndex = 0 return diff --git a/otp/chat/ChatInputTyped.py b/otp/chat/ChatInputTyped.py index 46d0b458..d1c6b2c6 100644 --- a/otp/chat/ChatInputTyped.py +++ b/otp/chat/ChatInputTyped.py @@ -16,9 +16,9 @@ class ChatInputTyped(DirectObject.DirectObject): wantHistory = 0 if __dev__: wantHistory = 1 - self.wantHistory = base.config.GetBool('want-chat-history', wantHistory) + self.wantHistory = config.GetBool('want-chat-history', wantHistory) self.history = [''] - self.historySize = base.config.GetInt('chat-history-size', 10) + self.historySize = config.GetInt('chat-history-size', 10) self.historyIndex = 0 return @@ -111,7 +111,7 @@ class ChatInputTyped(DirectObject.DirectObject): pass elif self.whisperId: pass - elif base.config.GetBool('exec-chat', 0) and text[0] == '>': + elif config.GetBool('exec-chat', 0) and text[0] == '>': text = self.__execMessage(text[1:]) base.localAvatar.setChatAbsolute(text, CFSpeech | CFTimeout) return diff --git a/otp/chat/ChatInputWhiteListFrame.py b/otp/chat/ChatInputWhiteListFrame.py index 1059496c..06235323 100644 --- a/otp/chat/ChatInputWhiteListFrame.py +++ b/otp/chat/ChatInputWhiteListFrame.py @@ -46,12 +46,12 @@ class ChatInputWhiteListFrame(FSM.FSM, DirectFrame): wantHistory = 0 if __dev__: wantHistory = 1 - self.wantHistory = base.config.GetBool('want-chat-history', wantHistory) + self.wantHistory = config.GetBool('want-chat-history', wantHistory) self.history = [''] - self.historySize = base.config.GetInt('chat-history-size', 10) + self.historySize = config.GetInt('chat-history-size', 10) self.historyIndex = 0 self.promoteWhiteList = 0 - self.checkBeforeSend = base.config.GetBool('white-list-check-before-send', 0) + self.checkBeforeSend = config.GetBool('white-list-check-before-send', 0) self.whiteList = None self.active = 0 self.autoOff = 0 @@ -193,7 +193,7 @@ class ChatInputWhiteListFrame(FSM.FSM, DirectFrame): if text: self.chatEntry.set('') - if base.config.GetBool('exec-chat', 0) and text[0] == '>': + if config.GetBool('exec-chat', 0) and text[0] == '>': text = self.__execMessage(text[1:]) base.localAvatar.setChatAbsolute(text, CFSpeech | CFTimeout) return diff --git a/otp/chat/ChatManager.py b/otp/chat/ChatManager.py index 74bbe13c..d646f9fc 100644 --- a/otp/chat/ChatManager.py +++ b/otp/chat/ChatManager.py @@ -39,7 +39,7 @@ def removeThoughtPrefix(message): class ChatManager(DirectObject.DirectObject): notify = DirectNotifyGlobal.directNotify.newCategory('ChatManager') - execChat = base.config.GetBool('exec-chat', 0) + execChat = config.GetBool('exec-chat', 0) def __init__(self, cr, localAvatar): self.cr = cr @@ -280,7 +280,7 @@ class ChatManager(DirectObject.DirectObject): if hasManager: if base.cr.playerFriendsManager.askAvatarOnline(avatarId): online = 1 - + avatarUnderstandable = base.cr.config.GetBool('force-avatar-understandable', False) playerUnderstandable = base.cr.config.GetBool('force-player-understandable', False) av = None diff --git a/otp/chat/TalkAssistant.py b/otp/chat/TalkAssistant.py index 2f07fe1c..ffc65278 100644 --- a/otp/chat/TalkAssistant.py +++ b/otp/chat/TalkAssistant.py @@ -17,7 +17,7 @@ ThoughtPrefix = '.' class TalkAssistant(DirectObject.DirectObject): ExecNamespace = None notify = DirectNotifyGlobal.directNotify.newCategory('TalkAssistant') - execChat = base.config.GetBool('exec-chat', 0) + execChat = config.GetBool('exec-chat', 0) def __init__(self): self.logWhispers = 1 @@ -26,7 +26,7 @@ class TalkAssistant(DirectObject.DirectObject): self.zeroTimeDay = time.time() self.zeroTimeGame = globalClock.getRealTime() self.floodThreshold = 10.0 - self.useWhiteListFilter = base.config.GetBool('white-list-filter-openchat', 0) + self.useWhiteListFilter = config.GetBool('white-list-filter-openchat', 0) self.lastWhisperDoId = None self.lastWhisperPlayerId = None self.lastWhisper = None diff --git a/otp/distributed/OTPClientRepository.py b/otp/distributed/OTPClientRepository.py index 8ffba181..bbe45a7c 100644 --- a/otp/distributed/OTPClientRepository.py +++ b/otp/distributed/OTPClientRepository.py @@ -195,19 +195,19 @@ class OTPClientRepository(ClientRepositoryBase): self.loginInterface = LoginTTRAccount.LoginTTRAccount(self) - self.secretChatAllowed = base.config.GetBool('allow-secret-chat', 0) - self.openChatAllowed = base.config.GetBool('allow-open-chat', 0) + self.secretChatAllowed = config.GetBool('allow-secret-chat', 0) + self.openChatAllowed = config.GetBool('allow-open-chat', 0) - self.secretChatNeedsParentPassword = base.config.GetBool('secret-chat-needs-parent-password', 0) + self.secretChatNeedsParentPassword = config.GetBool('secret-chat-needs-parent-password', 0) - self.parentPasswordSet = base.config.GetBool('parent-password-set', 0) + self.parentPasswordSet = config.GetBool('parent-password-set', 0) - self.userSignature = base.config.GetString('signature', 'none') + self.userSignature = config.GetString('signature', 'none') @@ -439,7 +439,7 @@ class OTPClientRepository(ClientRepositoryBase): self.shardListHandle = None self.uberZoneInterest = None self.wantSwitchboard = config.GetBool('want-switchboard', 0) - self.wantSwitchboardHacks = base.config.GetBool('want-switchboard-hacks', 0) + self.wantSwitchboardHacks = config.GetBool('want-switchboard-hacks', 0) self.__pendingGenerates = {} self.__pendingMessages = {} @@ -494,7 +494,7 @@ class OTPClientRepository(ClientRepositoryBase): if self.checkHttp(): for server in self.serverList: self.http.addPreapprovedServerCertificateFilename(server, Filename('/phase_3/etc/TTRCA.crt')) - if base.config.GetBool('want-dev-certificate-trust', 0): + if config.GetBool('want-dev-certificate-trust', 0): self.http.addPreapprovedServerCertificateFilename(server, Filename('/phase_3/etc/TTRDev.crt')) self.connect(self.serverList, successCallback=self._sendHello, failureCallback=self.failedToConnect) @@ -733,7 +733,7 @@ class OTPClientRepository(ClientRepositoryBase): @report(types=['args', 'deltaStamp'], dConfigParam='teleport') def waitForGetGameListResponse(self): if self.isGameListCorrect(): - if base.config.GetBool('game-server-tests', 0): + if config.GetBool('game-server-tests', 0): from otp.distributed import GameServerTestSuite GameServerTestSuite.GameServerTestSuite(self) self.loginFSM.request('waitForShardList') @@ -1080,7 +1080,7 @@ class OTPClientRepository(ClientRepositoryBase): else: logFunc = self.notify.warning allowExit = False - if base.config.GetBool('direct-gui-edit', 0): + if config.GetBool('direct-gui-edit', 0): logFunc('There are leaks: %s tasks, %s events, %s ivals, %s garbage cycles\nLeaked Events may be due to direct gui editing' % (leakedTasks, leakedEvents, leakedIvals, @@ -1487,7 +1487,7 @@ class OTPClientRepository(ClientRepositoryBase): avId = self.handlerArgs['avId'] if not self.SupportTutorial or base.localAvatar.tutorialAck: self.gameFSM.request('playGame', [hoodId, zoneId, avId]) - elif base.config.GetBool('force-tutorial', 1): + elif config.GetBool('force-tutorial', 1): if hasattr(self, 'skipTutorialRequest') and self.skipTutorialRequest: self.gameFSM.request('skipTutorialRequest', [hoodId, zoneId, avId]) else: @@ -1535,9 +1535,9 @@ class OTPClientRepository(ClientRepositoryBase): def isFreeTimeExpired(self): if self.accountOldAuth: return 0 - if base.config.GetBool('free-time-expired', 0): + if config.GetBool('free-time-expired', 0): return 1 - if base.config.GetBool('unlimited-free-time', 0): + if config.GetBool('unlimited-free-time', 0): return 0 if self.freeTimeExpiresAt == -1: return 0 @@ -1563,7 +1563,7 @@ class OTPClientRepository(ClientRepositoryBase): return self.blue != None def isPaid(self): - paidStatus = base.config.GetString('force-paid-status', '') + paidStatus = config.GetString('force-paid-status', '') if not paidStatus: return self.__isPaid elif paidStatus == 'paid': @@ -1581,7 +1581,7 @@ class OTPClientRepository(ClientRepositoryBase): self.__isPaid = isPaid def allowFreeNames(self): - return base.config.GetInt('allow-free-names', 1) + return config.GetInt('allow-free-names', 1) def allowSecretChat(self): return self.secretChatAllowed or self.productName == 'Terra-DMC' and self.isBlue() and self.secretChatAllowed diff --git a/otp/friends/GuildManager.py b/otp/friends/GuildManager.py index e13b33cb..af54cd5e 100644 --- a/otp/friends/GuildManager.py +++ b/otp/friends/GuildManager.py @@ -53,7 +53,7 @@ class GuildManager(DistributedObjectGlobal): self.id2Rank = {} self.id2Online = {} self.pendingMsgs = [] - self.whiteListEnabled = base.config.GetBool('whitelist-chat-enabled', 1) + self.whiteListEnabled = config.GetBool('whitelist-chat-enabled', 1) self.emailNotification = 0 self.emailNotificationAddress = None self.receivingNewList = False diff --git a/otp/launcher/DummyLauncherBase.py b/otp/launcher/DummyLauncherBase.py index 530669a6..49f285aa 100644 --- a/otp/launcher/DummyLauncherBase.py +++ b/otp/launcher/DummyLauncherBase.py @@ -37,7 +37,7 @@ class DummyLauncherBase: return def isTestServer(self): - return base.config.GetBool('is-test-server', 0) + return config.GetBool('is-test-server', 0) def setPhaseCompleteArray(self, newPhaseComplete): self.phaseComplete = newPhaseComplete @@ -72,7 +72,7 @@ class DummyLauncherBase: return self.ServerVersion def getIsNewInstallation(self): - return base.config.GetBool('new-installation', 0) + return config.GetBool('new-installation', 0) def setIsNotNewInstallation(self): pass diff --git a/otp/launcher/LauncherBase.py b/otp/launcher/LauncherBase.py index 8718303a..ea5cf774 100644 --- a/otp/launcher/LauncherBase.py +++ b/otp/launcher/LauncherBase.py @@ -1578,7 +1578,7 @@ class LauncherBase(DirectObject): def getIsNewInstallation(self): result = self.getValue(self.NewInstallationKey, 1) - result = base.config.GetBool('new-installation', result) + result = config.GetBool('new-installation', result) return result def setIsNotNewInstallation(self): @@ -1855,7 +1855,7 @@ class LauncherBase(DirectObject): self.notify.info("Third party programs installed:") for hack in hacksInstalled.keys(): self.notify.info(hack) - + if len(hacksRunning) > 0: self.notify.info("Third party programs running:") for hack in hacksRunning.keys(): diff --git a/otp/login/AccountServerConstants.py b/otp/login/AccountServerConstants.py index 51fe790e..9d511897 100644 --- a/otp/login/AccountServerConstants.py +++ b/otp/login/AccountServerConstants.py @@ -24,11 +24,11 @@ class AccountServerConstants(RemoteValueSet): 'pricePerMonth': '9.95'} noquery = 1 if cr.productName == 'DisneyOnline-US': - if base.config.GetBool('tt-specific-login', 0): + if config.GetBool('tt-specific-login', 0): pass else: noquery = 0 - if cr.accountOldAuth or base.config.GetBool('default-server-constants', noquery): + if cr.accountOldAuth or config.GetBool('default-server-constants', noquery): self.notify.debug('setting defaults, not using account server constants') self.dict = {} for constantName in self.expectedConstants: diff --git a/otp/login/TTAccount.py b/otp/login/TTAccount.py index eaac4460..cf21e567 100644 --- a/otp/login/TTAccount.py +++ b/otp/login/TTAccount.py @@ -9,7 +9,7 @@ import copy accountServer = '' accountServer = launcher.getAccountServer() print 'TTAccount: accountServer from launcher: ', accountServer -configAccountServer = base.config.GetString('account-server', '') +configAccountServer = config.GetString('account-server', '') if configAccountServer: accountServer = configAccountServer print 'TTAccount: overriding accountServer from config: ', accountServer diff --git a/otp/margins/MarginCell.py b/otp/margins/MarginCell.py index c8367d0b..5fc13874 100644 --- a/otp/margins/MarginCell.py +++ b/otp/margins/MarginCell.py @@ -12,7 +12,7 @@ class MarginCell(NodePath): self.debugSquare = None self.debugMode = False - self.setDebug(base.config.GetBool('want-cell-debug', False)) + self.setDebug(config.GetBool('want-cell-debug', False)) def setAvailable(self, available): if not available and self.hasContent(): diff --git a/otp/otpbase/OTPBase.py b/otp/otpbase/OTPBase.py index 3e4006b4..51fe54c6 100644 --- a/otp/otpbase/OTPBase.py +++ b/otp/otpbase/OTPBase.py @@ -45,7 +45,7 @@ class OTPBase(ShowBase): return def setTaskChainNetThreaded(self): - if base.config.GetBool('want-threaded-network', 0): + if config.GetBool('want-threaded-network', 0): taskMgr.setupTaskChain('net', numThreads=1, frameBudget=0.001, threadPriority=TPLow) def setTaskChainNetNonthreaded(self): diff --git a/otp/speedchat/SpeedChatGMHandler.py b/otp/speedchat/SpeedChatGMHandler.py index 35b30e29..1ce3f3ce 100644 --- a/otp/speedchat/SpeedChatGMHandler.py +++ b/otp/speedchat/SpeedChatGMHandler.py @@ -14,15 +14,15 @@ class SpeedChatGMHandler(DirectObject.DirectObject): def generateSCStructure(self): SpeedChatGMHandler.scStructure = [OTPLocalizer.PSCMenuGM] phraseCount = 0 - numGMCategories = base.config.GetInt('num-gm-categories', 0) + numGMCategories = config.GetInt('num-gm-categories', 0) for i in range(0, numGMCategories): - categoryName = base.config.GetString('gm-category-%d' % i, '') + categoryName = config.GetString('gm-category-%d' % i, '') if categoryName == '': continue categoryStructure = [categoryName] - numCategoryPhrases = base.config.GetInt('gm-category-%d-phrases' % i, 0) + numCategoryPhrases = config.GetInt('gm-category-%d-phrases' % i, 0) for j in range(0, numCategoryPhrases): - phrase = base.config.GetString('gm-category-%d-phrase-%d' % (i, j), '') + phrase = config.GetString('gm-category-%d-phrase-%d' % (i, j), '') if phrase != '': idx = 'gm%d' % phraseCount SpeedChatGMHandler.scList[idx] = phrase @@ -31,9 +31,9 @@ class SpeedChatGMHandler(DirectObject.DirectObject): SpeedChatGMHandler.scStructure.append(categoryStructure) - numGMPhrases = base.config.GetInt('num-gm-phrases', 0) + numGMPhrases = config.GetInt('num-gm-phrases', 0) for i in range(0, numGMPhrases): - phrase = base.config.GetString('gm-phrase-%d' % i, '') + phrase = config.GetString('gm-phrase-%d' % i, '') if phrase != '': idx = 'gm%d' % phraseCount SpeedChatGMHandler.scList[idx] = phrase diff --git a/toontown/ai/CrashedLeaderBoardDecorator.py b/toontown/ai/CrashedLeaderBoardDecorator.py index 59f63fc5..fe9e0716 100644 --- a/toontown/ai/CrashedLeaderBoardDecorator.py +++ b/toontown/ai/CrashedLeaderBoardDecorator.py @@ -20,7 +20,7 @@ class CrashedLeaderBoardDecorator(HolidayDecorator.HolidayDecorator): holidayIds = base.cr.newsManager.getDecorationHolidayId() if ToontownGlobals.CRASHED_LEADERBOARD not in holidayIds: return - if base.config.GetBool('want-crashedLeaderBoard-Smoke', 1): + if config.GetBool('want-crashedLeaderBoard-Smoke', 1): self.startSmokeEffect() def startSmokeEffect(self): @@ -32,7 +32,7 @@ class CrashedLeaderBoardDecorator(HolidayDecorator.HolidayDecorator): base.cr.playGame.getPlace().loader.stopSmokeEffect() def undecorate(self): - if base.config.GetBool('want-crashedLeaderBoard-Smoke', 1): + if config.GetBool('want-crashedLeaderBoard-Smoke', 1): self.stopSmokeEffect() holidayIds = base.cr.newsManager.getDecorationHolidayId() if len(holidayIds) > 0: diff --git a/toontown/ai/NewsManager.py b/toontown/ai/NewsManager.py index 72444357..14397041 100644 --- a/toontown/ai/NewsManager.py +++ b/toontown/ai/NewsManager.py @@ -34,7 +34,7 @@ class NewsManager(DistributedObject.DistributedObject): self.population = 0 self.invading = 0 - forcedHolidayDecorations = base.config.GetString('force-holiday-decorations', '') + forcedHolidayDecorations = config.GetString('force-holiday-decorations', '') self.decorationHolidayIds = [] if forcedHolidayDecorations != '': diff --git a/toontown/battle/BattlePlace.py b/toontown/battle/BattlePlace.py index 57f11aab..7ad3892c 100644 --- a/toontown/battle/BattlePlace.py +++ b/toontown/battle/BattlePlace.py @@ -33,7 +33,7 @@ class BattlePlace(Place.Place): pass def enterBattle(self, event): - if base.config.GetBool('want-qa-regression', 0): + if config.GetBool('want-qa-regression', 0): self.notify.info('QA-REGRESSION: COGBATTLE: Enter Battle') self.loader.music.stop() base.playMusic(self.loader.battleMusic, looping=1, volume=0.9) diff --git a/toontown/battle/BattleProps.py b/toontown/battle/BattleProps.py index 14c86dd5..e82dde63 100644 --- a/toontown/battle/BattleProps.py +++ b/toontown/battle/BattleProps.py @@ -238,7 +238,7 @@ class PropPool: self.propCache = [] self.propStrings = {} self.propTypes = {} - self.maxPoolSize = base.config.GetInt('prop-pool-size', 8) + self.maxPoolSize = config.GetInt('prop-pool-size', 8) for p in Props: phase = p[0] propName = p[1] diff --git a/toontown/battle/BattleSounds.py b/toontown/battle/BattleSounds.py index d8f59958..a5128f98 100644 --- a/toontown/battle/BattleSounds.py +++ b/toontown/battle/BattleSounds.py @@ -11,7 +11,7 @@ class BattleSounds: self.isValid = 0 if self.mgr != None and self.mgr.isValid(): self.isValid = 1 - limit = base.config.GetInt('battle-sound-cache-size', 15) + limit = config.GetInt('battle-sound-cache-size', 15) self.mgr.setCacheLimit(limit) base.addSfxManager(self.mgr) self.setupSearchPath() diff --git a/toontown/battle/Movie.py b/toontown/battle/Movie.py index ab248950..74f0437b 100644 --- a/toontown/battle/Movie.py +++ b/toontown/battle/Movie.py @@ -34,7 +34,7 @@ from otp.nametag.NametagConstants import * from otp.nametag import NametagGlobals camPos = Point3(14, 0, 10) camHpr = Vec3(89, -30, 0) -randomBattleTimestamp = base.config.GetBool('random-battle-timestamp', 0) +randomBattleTimestamp = config.GetBool('random-battle-timestamp', 0) class Movie(DirectObject.DirectObject): notify = DirectNotifyGlobal.directNotify.newCategory('Movie') @@ -351,11 +351,11 @@ class Movie(DirectObject.DirectObject): self.tutorialTom = NPCToons.createLocalNPC(20000) self.tutorialTom.uniqueName = uniqueName - if base.config.GetString('language', 'english') == 'japanese': + if config.GetString('language', 'english') == 'japanese': self.tomDialogue03 = base.loadSfx('phase_3.5/audio/dial/CC_tom_movie_tutorial_reward01.ogg') self.tomDialogue04 = base.loadSfx('phase_3.5/audio/dial/CC_tom_movie_tutorial_reward02.ogg') self.tomDialogue05 = base.loadSfx('phase_3.5/audio/dial/CC_tom_movie_tutorial_reward03.ogg') - self.musicVolume = base.config.GetFloat('tutorial-music-volume', 0.5) + self.musicVolume = config.GetFloat('tutorial-music-volume', 0.5) else: self.tomDialogue03 = None self.tomDialogue04 = None @@ -399,7 +399,7 @@ class Movie(DirectObject.DirectObject): return def __doToonAttacks(self): - if base.config.GetBool('want-toon-attack-anims', 1): + if config.GetBool('want-toon-attack-anims', 1): track = Sequence(name='toon-attacks') camTrack = Sequence(name='toon-attacks-cam') ival, camIval = MovieFire.doFires(self.__findToonAttack(FIRE)) @@ -878,7 +878,7 @@ class Movie(DirectObject.DirectObject): return def __doSuitAttacks(self): - if base.config.GetBool('want-suit-anims', 1): + if config.GetBool('want-suit-anims', 1): track = Sequence(name='suit-attacks') camTrack = Sequence(name='suit-attacks-cam') isLocalToonSad = False diff --git a/toontown/battle/MovieLure.py b/toontown/battle/MovieLure.py index deccba2b..9861505f 100644 --- a/toontown/battle/MovieLure.py +++ b/toontown/battle/MovieLure.py @@ -352,7 +352,7 @@ def __createSuitDamageTrack(battle, suit, hp, lure, trapProp): sinkPos1.setZ(sinkPos1.getZ() - 3.1) sinkPos2.setZ(sinkPos2.getZ() - 9.1) dropPos.setZ(dropPos.getZ() + 15) - if base.config.GetBool('want-new-cogs', 0): + if config.GetBool('want-new-cogs', 0): nameTag = suit.find('**/def_nameTag') else: nameTag = suit.find('**/joint_nameTag') diff --git a/toontown/battle/MovieSquirt.py b/toontown/battle/MovieSquirt.py index daaf4712..36e7b458 100644 --- a/toontown/battle/MovieSquirt.py +++ b/toontown/battle/MovieSquirt.py @@ -26,7 +26,7 @@ WaterSprayColor = Point4(0.75, 0.75, 1.0, 0.8) def doSquirts(squirts): if len(squirts) == 0: return (None, None) - + suitSquirtsDict = {} doneUber = 0 skip = 0 @@ -50,7 +50,7 @@ def doSquirts(squirts): suitSquirtsDict[suitId] = [squirt] suitSquirts = suitSquirtsDict.values() - + def compFunc(a, b): if len(a) > len(b): return 1 @@ -281,12 +281,12 @@ def __doFlower(squirt, delay, fShowStun): lodnames = toon.getLODNames() toonlod0 = toon.getLOD(lodnames[0]) toonlod1 = toon.getLOD(lodnames[1]) - if base.config.GetBool('want-new-anims', 1): + if config.GetBool('want-new-anims', 1): if not toonlod0.find('**/def_joint_attachFlower').isEmpty(): flower_joint0 = toonlod0.find('**/def_joint_attachFlower') else: flower_joint0 = toonlod0.find('**/joint_attachFlower') - if base.config.GetBool('want-new-anims', 1): + if config.GetBool('want-new-anims', 1): if not toonlod1.find('**/def_joint_attachFlower').isEmpty(): flower_joint1 = toonlod1.find('**/def_joint_attachFlower') else: @@ -350,7 +350,7 @@ def __doWaterGlass(squirt, delay, fShowStun): def getSprayStartPos(toon = toon): toon.update(0) lod0 = toon.getLOD(toon.getLODNames()[0]) - if base.config.GetBool('want-new-anims', 1): + if config.GetBool('want-new-anims', 1): if not lod0.find('**/def_head').isEmpty(): joint = lod0.find('**/def_head') else: diff --git a/toontown/battle/MovieToonVictory.py b/toontown/battle/MovieToonVictory.py index d2811f91..3ec35b2b 100644 --- a/toontown/battle/MovieToonVictory.py +++ b/toontown/battle/MovieToonVictory.py @@ -50,13 +50,13 @@ class ToonVictorySkipper(DirectObject): self._ivals = ivals def _setupSkipListen(self, index): - if (not self._noSkip) and base.config.GetBool('want-skip-button', 0): + if (not self._noSkip) and config.GetBool('want-skip-button', 0): func = Functor(self._skipToon, index) self.accept('escape', func) self.accept(RewardPanel.SkipBattleMovieEvent, func) def _teardownSkipListen(self, index): - if (not self._noSkip) and base.config.GetBool('want-skip-button', 0): + if (not self._noSkip) and config.GetBool('want-skip-button', 0): self.ignore('escape') self.ignore(RewardPanel.SkipBattleMovieEvent) diff --git a/toontown/battle/RewardPanel.py b/toontown/battle/RewardPanel.py index 8a06c958..5cfe32c1 100644 --- a/toontown/battle/RewardPanel.py +++ b/toontown/battle/RewardPanel.py @@ -92,7 +92,7 @@ class RewardPanel(DirectFrame): 1), text='0/0', text_scale=0.18, text_fg=(0, 0, 0, 1), text_align=TextNode.ACenter, text_pos=(0, -0.05), pos=(0.4, 0, -0.09 * i))) self._battleGui = loader.loadModel('phase_3.5/models/gui/battle_gui') - if base.config.GetBool('want-skip-button', 0): + if config.GetBool('want-skip-button', 0): self.skipButton = DirectButton(parent=self, relief=None, image=(self._battleGui.find('**/tt_t_gui_gen_skipSectionUp'), self._battleGui.find('**/tt_t_gui_gen_skipSectionDown'), self._battleGui.find('**/tt_t_gui_gen_skipSectionRollOver'), @@ -197,7 +197,7 @@ class RewardPanel(DirectFrame): self.missedItemFrame.hide() trackBarOffset = 0 - if base.config.GetBool('want-skip-button', 0): + if config.GetBool('want-skip-button', 0): self.skipButton['state'] = choice(noSkip, DGG.DISABLED, DGG.NORMAL) for i in range(len(SuitDNA.suitDepts)): @@ -652,7 +652,7 @@ class RewardPanel(DirectFrame): else: num = quest.doesCogCount(avId, cogDict, zoneId, toonShortList) if num: - if base.config.GetBool('battle-passing-no-credit', True): + if config.GetBool('battle-passing-no-credit', True): if avId in helpfulToonsList: earned += num else: diff --git a/toontown/building/DistributedBoardingParty.py b/toontown/building/DistributedBoardingParty.py index f86ca419..e866a77f 100644 --- a/toontown/building/DistributedBoardingParty.py +++ b/toontown/building/DistributedBoardingParty.py @@ -39,7 +39,7 @@ class DistributedBoardingParty(DistributedObject.DistributedObject, BoardingPart canonicalZoneId = ZoneUtil.getCanonicalZoneId(self.zoneId) self.notify.debug('canonicalZoneId = %s' % canonicalZoneId) localAvatar.chatMgr.chatInputSpeedChat.addBoardingGroupMenu(canonicalZoneId) - if base.config.GetBool('want-singing', 0): + if config.GetBool('want-singing', 0): localAvatar.chatMgr.chatInputSpeedChat.addSingingGroupMenu() def delete(self): @@ -136,7 +136,7 @@ class DistributedBoardingParty(DistributedObject.DistributedObject, BoardingPart self.inviterPanels.forceCleanup() self.groupInviteePanel = GroupInvitee.GroupInvitee() self.groupInviteePanel.make(self, inviter, leaderId) - if base.config.GetBool('reject-boarding-group-invites', 0): + if config.GetBool('reject-boarding-group-invites', 0): self.groupInviteePanel.forceCleanup() self.groupInviteePanel = None return diff --git a/toontown/building/DistributedBuilding.py b/toontown/building/DistributedBuilding.py index 73a88686..a0a43fa8 100644 --- a/toontown/building/DistributedBuilding.py +++ b/toontown/building/DistributedBuilding.py @@ -349,7 +349,7 @@ class DistributedBuilding(DistributedObject.DistributedObject): return def loadAnimToSuitSfx(self): - if base.config.GetBool('want-qa-regression', 0): + if config.GetBool('want-qa-regression', 0): self.notify.info('QA-REGRESSION: COGBUILDING: Cog Take Over') if self.cogDropSound == None: self.cogDropSound = base.loadSfx(self.TAKEOVER_SFX_PREFIX + 'cogbldg_drop.ogg') @@ -359,7 +359,7 @@ class DistributedBuilding(DistributedObject.DistributedObject): return def loadAnimToToonSfx(self): - if base.config.GetBool('want-qa-regression', 0): + if config.GetBool('want-qa-regression', 0): self.notify.info('QA-REGRESSION: COGBUILDING: Toon Take Over') if self.cogWeakenSound == None: self.cogWeakenSound = base.loadSfx(self.TAKEOVER_SFX_PREFIX + 'cogbldg_weaken.ogg') diff --git a/toontown/building/DistributedDoor.py b/toontown/building/DistributedDoor.py index 7dbafc0c..adab745e 100644 --- a/toontown/building/DistributedDoor.py +++ b/toontown/building/DistributedDoor.py @@ -161,7 +161,7 @@ class DistributedDoor(DistributedObject.DistributedObject, DelayDeletable): TRIGGER_SHIFT_Y = 0.25 TRIGGER_SHIFT_Z = 1.00 if "_gag_shop_" in building.getName(): - # Some dipshit put the triggers on backwards for the + # Some dipshit put the triggers on backwards for the # gag shop compared to every other building. doorTrigger.setY(doorTrigger.getY() + TRIGGER_SHIFT_Y) else: @@ -299,7 +299,7 @@ class DistributedDoor(DistributedObject.DistributedObject, DelayDeletable): return yToTest < -0.5 def enterDoor(self): - if base.config.GetBool('want-doomsday', False): + if config.GetBool('want-doomsday', False): base.localAvatar.disableAvatarControls() self.confirm = TTDialog.TTGlobalDialog(doneEvent='confirmDone', message=SafezoneInvasionGlobals.LeaveToontownCentralAlert, style=TTDialog.Acknowledge) self.confirm.show() diff --git a/toontown/building/DistributedElevatorInt.py b/toontown/building/DistributedElevatorInt.py index b36b686e..0ad40d3f 100644 --- a/toontown/building/DistributedElevatorInt.py +++ b/toontown/building/DistributedElevatorInt.py @@ -15,7 +15,7 @@ class DistributedElevatorInt(DistributedElevator.DistributedElevator): def __init__(self, cr): DistributedElevator.DistributedElevator.__init__(self, cr) - self.countdownTime = base.config.GetFloat('int-elevator-timeout', INTERIOR_ELEVATOR_COUNTDOWN_TIME) + self.countdownTime = config.GetFloat('int-elevator-timeout', INTERIOR_ELEVATOR_COUNTDOWN_TIME) def setupElevator(self): self.leftDoor = self.bldg.leftDoorOut diff --git a/toontown/catalog/CatalogItemPanel.py b/toontown/catalog/CatalogItemPanel.py index 67f1596a..514ea4d9 100644 --- a/toontown/catalog/CatalogItemPanel.py +++ b/toontown/catalog/CatalogItemPanel.py @@ -407,7 +407,7 @@ class CatalogItemPanel(DirectFrame): self.accept('verifyDone', self.__handleVerifyPurchase) def __handleVerifyPurchase(self): - if base.config.GetBool('want-qa-regression', 0): + if config.GetBool('want-qa-regression', 0): self.notify.info('QA-REGRESSION: CATALOG: Order item') status = self.verify.doneStatus self.ignore('verifyDone') @@ -439,7 +439,7 @@ class CatalogItemPanel(DirectFrame): self.accept('verifyGiftDone', self.__handleVerifyGift) def __handleVerifyGift(self): - if base.config.GetBool('want-qa-regression', 0): + if config.GetBool('want-qa-regression', 0): self.notify.info('QA-REGRESSION: CATALOG: Gift item') status = self.verify.doneStatus self.ignore('verifyGiftDone') diff --git a/toontown/catalog/CatalogScreen.py b/toontown/catalog/CatalogScreen.py index 59ecf2d2..fa9c7d35 100644 --- a/toontown/catalog/CatalogScreen.py +++ b/toontown/catalog/CatalogScreen.py @@ -181,7 +181,7 @@ class CatalogScreen(DirectFrame): self.emblemCatalogButton['state'] = DGG.DISABLED def showNewItems(self, index = None): - if base.config.GetBool('want-qa-regression', 0): + if config.GetBool('want-qa-regression', 0): self.notify.info('QA-REGRESSION: CATALOG: New item') taskMgr.remove('clarabelleHelpText1') messenger.send('wakeup') @@ -198,7 +198,7 @@ class CatalogScreen(DirectFrame): return def showBackorderItems(self, index = None): - if base.config.GetBool('want-qa-regression', 0): + if config.GetBool('want-qa-regression', 0): self.notify.info('QA-REGRESSION: CATALOG: Backorder item') taskMgr.remove('clarabelleHelpText1') messenger.send('wakeup') @@ -215,7 +215,7 @@ class CatalogScreen(DirectFrame): return def showLoyaltyItems(self, index = None): - if base.config.GetBool('want-qa-regression', 0): + if config.GetBool('want-qa-regression', 0): self.notify.info('QA-REGRESSION: CATALOG: Special item') taskMgr.remove('clarabelleHelpText1') messenger.send('wakeup') @@ -232,7 +232,7 @@ class CatalogScreen(DirectFrame): return def showEmblemItems(self, index = None): - if base.config.GetBool('want-qa-regression', 0): + if config.GetBool('want-qa-regression', 0): self.notify.info('QA-REGRESSION: CATALOG: Emblem item') taskMgr.remove('clarabelleHelpText1') messenger.send('wakeup') diff --git a/toontown/catalog/MailboxScreen.py b/toontown/catalog/MailboxScreen.py index 97b00c3e..59206046 100644 --- a/toontown/catalog/MailboxScreen.py +++ b/toontown/catalog/MailboxScreen.py @@ -176,7 +176,7 @@ class MailboxScreen(DirectObject.DirectObject): messenger.send(self.doneEvent) def __handleAccept(self): - if base.config.GetBool('want-qa-regression', 0): + if config.GetBool('want-qa-regression', 0): self.notify.info('QA-REGRESSION: MAILBOX: Accept item') if self.acceptingIndex != None: return diff --git a/toontown/char/Char.py b/toontown/char/Char.py index 8d6b57d6..e240467b 100644 --- a/toontown/char/Char.py +++ b/toontown/char/Char.py @@ -136,12 +136,12 @@ class Char(Avatar.Avatar): def setLODs(self): self.setLODNode() - levelOneIn = base.config.GetInt('lod1-in', 50) - levelOneOut = base.config.GetInt('lod1-out', 1) - levelTwoIn = base.config.GetInt('lod2-in', 100) - levelTwoOut = base.config.GetInt('lod2-out', 50) - levelThreeIn = base.config.GetInt('lod3-in', 280) - levelThreeOut = base.config.GetInt('lod3-out', 100) + levelOneIn = config.GetInt('lod1-in', 50) + levelOneOut = config.GetInt('lod1-out', 1) + levelTwoIn = config.GetInt('lod2-in', 100) + levelTwoOut = config.GetInt('lod2-out', 50) + levelThreeIn = config.GetInt('lod3-in', 280) + levelThreeOut = config.GetInt('lod3-out', 100) self.addLOD(LODModelDict[self.style.name][0], levelOneIn, levelOneOut) self.addLOD(LODModelDict[self.style.name][1], levelTwoIn, levelTwoOut) self.addLOD(LODModelDict[self.style.name][2], levelThreeIn, levelThreeOut) @@ -411,7 +411,7 @@ class Char(Avatar.Avatar): if self.dialogueArray: self.notify.warning('loadDialogue() called twice.') self.unloadDialogue() - language = base.config.GetString('language', 'english') + language = config.GetString('language', 'english') if char == 'mk': dialogueFile = base.loadSfx('phase_3/audio/dial/mickey.ogg') for i in range(0, 6): diff --git a/toontown/chat/TTChatInputSpeedChat.py b/toontown/chat/TTChatInputSpeedChat.py index 9e9b9a9b..11038d82 100644 --- a/toontown/chat/TTChatInputSpeedChat.py +++ b/toontown/chat/TTChatInputSpeedChat.py @@ -292,9 +292,9 @@ scStructure = [ 6062, 6063, 6064, - 6065]], - [OTPLocalizer.SCMenuBattleGags, - 1500, + 6065]], + [OTPLocalizer.SCMenuBattleGags, + 1500, 1501, 1502, 1503, @@ -424,7 +424,7 @@ class TTChatInputSpeedChat(DirectObject.DirectObject): self.insidePartiesMenu = None self.createSpeedChat() self.whiteList = None - self.allowWhiteListSpeedChat = base.config.GetBool('white-list-speed-chat', 0) + self.allowWhiteListSpeedChat = config.GetBool('white-list-speed-chat', 0) if self.allowWhiteListSpeedChat: self.addWhiteList() self.factoryMenu = None @@ -497,7 +497,7 @@ class TTChatInputSpeedChat(DirectObject.DirectObject): structure.append([TTSCResistanceMenu, OTPLocalizer.SCMenuResistance]) if hasattr(base, 'wantPets') and base.wantPets: structure += scPetMenuStructure - if base.config.GetBool('want-doomsday', False): + if config.GetBool('want-doomsday', False): structure.append([OTPLocalizer.SCMenuElection, 10100, 10101, 10102, 10103, 10104, 10105]) structure += scStructure self.createSpeedChatObject(structure) @@ -519,7 +519,7 @@ class TTChatInputSpeedChat(DirectObject.DirectObject): self.chatMgr.fsm.request('mainMenu') self.terminalSelectedEvent = self.speedChat.getEventName(SpeedChatGlobals.SCTerminalSelectedEvent) - if base.config.GetBool('want-sc-auto-hide', 1): + if config.GetBool('want-sc-auto-hide', 1): self.accept(self.terminalSelectedEvent, selectionMade) self.speedChat.reparentTo(base.a2dpTopLeft, DGG.FOREGROUND_SORT_INDEX) scZ = -0.04 diff --git a/toontown/chat/TTChatInputWhiteList.py b/toontown/chat/TTChatInputWhiteList.py index 6911b52f..21790917 100644 --- a/toontown/chat/TTChatInputWhiteList.py +++ b/toontown/chat/TTChatInputWhiteList.py @@ -11,7 +11,7 @@ from toontown.toonbase import ToontownGlobals class TTChatInputWhiteList(ChatInputWhiteListFrame): notify = DirectNotifyGlobal.directNotify.newCategory('TTChatInputWhiteList') - TFToggleKey = base.config.GetString('true-friend-toggle-key', 'alt') + TFToggleKey = config.GetString('true-friend-toggle-key', 'alt') TFToggleKeyUp = TFToggleKey + '-up' def __init__(self, parent = None, **kw): @@ -53,7 +53,7 @@ class TTChatInputWhiteList(ChatInputWhiteListFrame): self.chatEntry.bind(DGG.OVERFLOW, self.chatOverflow) self.chatEntry.bind(DGG.TYPE, self.typeCallback) self.trueFriendChat = 0 - if base.config.GetBool('whisper-to-nearby-true-friends', 1): + if config.GetBool('whisper-to-nearby-true-friends', 1): self.accept(self.TFToggleKey, self.shiftPressed) return diff --git a/toontown/chat/TTWhiteList.py b/toontown/chat/TTWhiteList.py index b2e67580..c4d812ea 100644 --- a/toontown/chat/TTWhiteList.py +++ b/toontown/chat/TTWhiteList.py @@ -70,8 +70,8 @@ class TTWhiteList(WhiteList): self.updateWhitelist() def getWhitelistUrl(self): - result = base.config.GetString('fallback-whitelist-url', 'http://cdn.toontown.disney.go.com/toontown/en/') - override = base.config.GetString('whitelist-url', '') + result = config.GetString('fallback-whitelist-url', 'http://cdn.toontown.disney.go.com/toontown/en/') + override = config.GetString('whitelist-url', '') if override: self.notify.info('got an override url, using %s for the whitelist' % override) result = override diff --git a/toontown/chat/ToontownChatManager.py b/toontown/chat/ToontownChatManager.py index 31b7fbd7..9f9c2f70 100644 --- a/toontown/chat/ToontownChatManager.py +++ b/toontown/chat/ToontownChatManager.py @@ -51,7 +51,7 @@ class ToontownChatManager(ChatManager.ChatManager): self.whisperCancelButton = DirectButton(parent=self.whisperFrame, image=(gui.find('**/CloseBtn_UP'), gui.find('**/CloseBtn_DN'), gui.find('**/CloseBtn_Rllvr')), pos=(-0.06, 0, 0.033), scale=1.179, relief=None, text=('', OTPLocalizer.ChatManagerCancel, OTPLocalizer.ChatManagerCancel), text_scale=0.05, text_fg=(0, 0, 0, 1), text_pos=(0, -0.09), textMayChange=0, command=self.__whisperCancelPressed) gui.removeNode() ChatManager.ChatManager.__init__(self, cr, localAvatar) - self.defaultToWhiteList = base.config.GetBool('white-list-is-default', 1) + self.defaultToWhiteList = config.GetBool('white-list-is-default', 1) self.chatInputSpeedChat = TTChatInputSpeedChat(self) self.normalPos = Vec3(0.25, 0, -0.196) self.whisperPos = Vec3(0.25, 0, -0.28) @@ -365,13 +365,13 @@ class ToontownChatManager(ChatManager.ChatManager): self.problemActivatingChat.hide() def __normalButtonPressed(self): - if base.config.GetBool('want-qa-regression', 0): + if config.GetBool('want-qa-regression', 0): self.notify.info('QA-REGRESSION: CHAT: Speedchat Plus') messenger.send('wakeup') self.fsm.request('normalChat') def __scButtonPressed(self): - if base.config.GetBool('want-qa-regression', 0): + if config.GetBool('want-qa-regression', 0): self.notify.info('QA-REGRESSION: CHAT: Speedchat') messenger.send('wakeup') if self.fsm.getCurrentState().getName() == 'speedChat': @@ -457,7 +457,7 @@ class ToontownChatManager(ChatManager.ChatManager): self.fsm.request('mainMenu') def __whisperScButtonPressed(self, avatarName, avatarId, playerId): - if base.config.GetBool('want-qa-regression', 0): + if config.GetBool('want-qa-regression', 0): self.notify.info('QA-REGRESSION: CHAT: Whisper') messenger.send('wakeup') hasManager = hasattr(base.cr, 'playerFriendsManager') diff --git a/toontown/cogdominium/CogdoFlyingGame.py b/toontown/cogdominium/CogdoFlyingGame.py index c46fe749..76bcf6a1 100644 --- a/toontown/cogdominium/CogdoFlyingGame.py +++ b/toontown/cogdominium/CogdoFlyingGame.py @@ -160,7 +160,7 @@ class CogdoFlyingGame(DirectObject): self.acceptOnce(CogdoFlyingLocalPlayer.RanOutOfTimeEventName, self.handleLocalPlayerRanOutOfTime) self.__startUpdateTask() self.isGameComplete = False - if __debug__ and base.config.GetBool('schellgames-dev', True): + if __debug__ and config.GetBool('schellgames-dev', True): self.acceptOnce('end', self.guiMgr.forceTimerDone) def toggleFog(): @@ -192,7 +192,7 @@ class CogdoFlyingGame(DirectObject): self.ignore(CogdoFlyingLegalEagle.RequestAddTargetAgainEventName) self.ignore(CogdoFlyingLegalEagle.RequestRemoveTargetEventName) self.ignore(CogdoFlyingLocalPlayer.PlayWaitingMusicEventName) - if __debug__ and base.config.GetBool('schellgames-dev', True): + if __debug__ and config.GetBool('schellgames-dev', True): self.ignore('end') self.ignore('home') self.level.update(0.0) diff --git a/toontown/cogdominium/CogdoMaze.py b/toontown/cogdominium/CogdoMaze.py index 9ee56ece..94cfdc26 100644 --- a/toontown/cogdominium/CogdoMaze.py +++ b/toontown/cogdominium/CogdoMaze.py @@ -18,7 +18,7 @@ class CogdoMaze(MazeBase, DirectObject): self._clearColor = VBase4(base.win.getClearColor()) self._clearColor.setW(1.0) base.win.setClearColor(VBase4(0.0, 0.0, 0.0, 1.0)) - if __debug__ and base.config.GetBool('cogdomaze-dev', False): + if __debug__ and config.GetBool('cogdomaze-dev', False): self._initCollisionVisuals() def _initWaterCoolers(self): diff --git a/toontown/cogdominium/CogdoMazeGame.py b/toontown/cogdominium/CogdoMazeGame.py index d950c618..4867934a 100644 --- a/toontown/cogdominium/CogdoMazeGame.py +++ b/toontown/cogdominium/CogdoMazeGame.py @@ -26,7 +26,7 @@ class CogdoMazeGame(DirectObject): def __init__(self, distGame): self.distGame = distGame - self._allowSuitsHitToons = base.config.GetBool('cogdomaze-suits-hit-toons', True) + self._allowSuitsHitToons = config.GetBool('cogdomaze-suits-hit-toons', True) def load(self, cogdoMazeFactory, numSuits, bossCode): self._initAudio() diff --git a/toontown/cogdominium/DistCogdoFlyingGame.py b/toontown/cogdominium/DistCogdoFlyingGame.py index 3c49f035..6d65447f 100644 --- a/toontown/cogdominium/DistCogdoFlyingGame.py +++ b/toontown/cogdominium/DistCogdoFlyingGame.py @@ -10,7 +10,7 @@ class DistCogdoFlyingGame(DistCogdoGame): def __init__(self, cr): DistCogdoGame.__init__(self, cr) - if __debug__ and base.config.GetBool('schellgames-dev', True): + if __debug__ and config.GetBool('schellgames-dev', True): self.accept('onCodeReload', self.__sgOnCodeReload) self.game = CogdoFlyingGame(self) diff --git a/toontown/cogdominium/DistCogdoGame.py b/toontown/cogdominium/DistCogdoGame.py index e0f87ef5..f3aa35a1 100644 --- a/toontown/cogdominium/DistCogdoGame.py +++ b/toontown/cogdominium/DistCogdoGame.py @@ -11,7 +11,7 @@ from toontown.minigame.MinigameRulesPanel import MinigameRulesPanel from toontown.cogdominium.CogdoGameRulesPanel import CogdoGameRulesPanel from toontown.minigame import MinigameGlobals from toontown.toonbase import TTLocalizer as TTL -SCHELLGAMES_DEV = __debug__ and base.config.GetBool('schellgames-dev', False) +SCHELLGAMES_DEV = __debug__ and config.GetBool('schellgames-dev', False) class DistCogdoGame(DistCogdoGameBase, DistributedObject): notify = directNotify.newCategory('DistCogdoGame') diff --git a/toontown/cogdominium/DistCogdoMazeGame.py b/toontown/cogdominium/DistCogdoMazeGame.py index ddd2d34a..9d2e9f7e 100644 --- a/toontown/cogdominium/DistCogdoMazeGame.py +++ b/toontown/cogdominium/DistCogdoMazeGame.py @@ -14,7 +14,7 @@ class DistCogdoMazeGame(DistCogdoGame, DistCogdoMazeGameBase): DistCogdoGame.__init__(self, cr) self.game = CogdoMazeGame(self) self._numSuits = (0, 0, 0) - if __debug__ and base.config.GetBool('schellgames-dev', True): + if __debug__ and config.GetBool('schellgames-dev', True): self.accept('onCodeReload', self.__sgOnCodeReload) def delete(self): diff --git a/toontown/coghq/BossbotCogHQLoader.py b/toontown/coghq/BossbotCogHQLoader.py index d7b96b31..4f025535 100644 --- a/toontown/coghq/BossbotCogHQLoader.py +++ b/toontown/coghq/BossbotCogHQLoader.py @@ -54,7 +54,7 @@ class BossbotCogHQLoader(CogHQLoader.CogHQLoader): origin = top.find('**/tunnel_origin') origin.setH(-33.33) elif zoneId == ToontownGlobals.BossbotLobby: - if base.config.GetBool('want-qa-regression', 0): + if config.GetBool('want-qa-regression', 0): self.notify.info('QA-REGRESSION: COGHQ: Visit BossbotLobby') self.notify.debug('cogHQLobbyModelPath = %s' % self.cogHQLobbyModelPath) self.geom = loader.loadModel(self.cogHQLobbyModelPath) diff --git a/toontown/coghq/CashbotCogHQLoader.py b/toontown/coghq/CashbotCogHQLoader.py index fa3d6312..7552f374 100644 --- a/toontown/coghq/CashbotCogHQLoader.py +++ b/toontown/coghq/CashbotCogHQLoader.py @@ -51,7 +51,7 @@ class CashbotCogHQLoader(CogHQLoader.CogHQLoader): signText.setPosHpr(locator, 0, 0, 0, 0, 0, 0) signText.setDepthWrite(0) elif zoneId == ToontownGlobals.CashbotLobby: - if base.config.GetBool('want-qa-regression', 0): + if config.GetBool('want-qa-regression', 0): self.notify.info('QA-REGRESSION: COGHQ: Visit CashbotLobby') self.geom = loader.loadModel(self.cogHQLobbyModelPath) else: diff --git a/toontown/coghq/DistributedBanquetTable.py b/toontown/coghq/DistributedBanquetTable.py index a02fc30e..dce91444 100644 --- a/toontown/coghq/DistributedBanquetTable.py +++ b/toontown/coghq/DistributedBanquetTable.py @@ -29,8 +29,8 @@ class DistributedBanquetTable(DistributedObject.DistributedObject, FSM.FSM, Banq pitcherMinH = -360 pitcherMaxH = 360 rotateSpeed = 30 - waterPowerSpeed = base.config.GetDouble('water-power-speed', 15) - waterPowerExponent = base.config.GetDouble('water-power-exponent', 0.75) + waterPowerSpeed = config.GetDouble('water-power-speed', 15) + waterPowerExponent = config.GetDouble('water-power-exponent', 0.75) useNewAnimations = True TugOfWarControls = False OnlyUpArrow = True diff --git a/toontown/coghq/DistributedCountryClub.py b/toontown/coghq/DistributedCountryClub.py index 1cb026bd..80801356 100644 --- a/toontown/coghq/DistributedCountryClub.py +++ b/toontown/coghq/DistributedCountryClub.py @@ -18,7 +18,7 @@ class DistributedCountryClub(DistributedObject.DistributedObject): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedCountryClub') ReadyPost = 'CountryClubReady' WinEvent = 'CountryClubWinEvent' - doBlockRooms = base.config.GetBool('block-country-club-rooms', 1) + doBlockRooms = config.GetBool('block-country-club-rooms', 1) def __init__(self, cr): DistributedObject.DistributedObject.__init__(self, cr) diff --git a/toontown/coghq/DistributedGolfSpot.py b/toontown/coghq/DistributedGolfSpot.py index d43e4e5f..0f8c4d36 100644 --- a/toontown/coghq/DistributedGolfSpot.py +++ b/toontown/coghq/DistributedGolfSpot.py @@ -21,8 +21,8 @@ class DistributedGolfSpot(DistributedObject.DistributedObject, FSM.FSM): toonGolfOffsetPos = Point3(-2, 0, -GolfGlobals.GOLF_BALL_RADIUS) toonGolfOffsetHpr = Point3(-90, 0, 0) rotateSpeed = 20 - golfPowerSpeed = base.config.GetDouble('golf-power-speed', 3) - golfPowerExponent = base.config.GetDouble('golf-power-exponent', 0.75) + golfPowerSpeed = config.GetDouble('golf-power-speed', 3) + golfPowerExponent = config.GetDouble('golf-power-exponent', 0.75) def __init__(self, cr): DistributedObject.DistributedObject.__init__(self, cr) diff --git a/toontown/coghq/FactoryLevelMgr.py b/toontown/coghq/FactoryLevelMgr.py index 39c37ee3..249e1d5c 100644 --- a/toontown/coghq/FactoryLevelMgr.py +++ b/toontown/coghq/FactoryLevelMgr.py @@ -16,7 +16,7 @@ class FactoryLevelMgr(LevelMgr.LevelMgr): def __init__(self, level, entId): LevelMgr.LevelMgr.__init__(self, level, entId) - if base.config.GetBool('want-factory-lifter', 0): + if config.GetBool('want-factory-lifter', 0): self.toonLifter = FactoryUtil.ToonLifter('f3') self.callSetters('farPlaneDistance') self.geom.reparentTo(render) diff --git a/toontown/coghq/LawbotCogHQLoader.py b/toontown/coghq/LawbotCogHQLoader.py index a2054d0c..8bef016e 100644 --- a/toontown/coghq/LawbotCogHQLoader.py +++ b/toontown/coghq/LawbotCogHQLoader.py @@ -60,7 +60,7 @@ class LawbotCogHQLoader(CogHQLoader.CogHQLoader): ug = self.geom.find('**/underground') ug.setBin('ground', -10) elif zoneId == ToontownGlobals.LawbotLobby: - if base.config.GetBool('want-qa-regression', 0): + if config.GetBool('want-qa-regression', 0): self.notify.info('QA-REGRESSION: COGHQ: Visit LawbotLobby') self.notify.debug('cogHQLobbyModelPath = %s' % self.cogHQLobbyModelPath) self.geom = loader.loadModel(self.cogHQLobbyModelPath) diff --git a/toontown/coghq/SellbotCogHQLoader.py b/toontown/coghq/SellbotCogHQLoader.py index 9edd33b7..b27af883 100644 --- a/toontown/coghq/SellbotCogHQLoader.py +++ b/toontown/coghq/SellbotCogHQLoader.py @@ -119,7 +119,7 @@ class SellbotCogHQLoader(CogHQLoader.CogHQLoader): sdText = DirectGui.OnscreenText(text=TTLocalizer.SellbotSideEntrance, font=ToontownGlobals.getSuitFont(), pos=(0, -0.34), scale=0.1, mayChange=False, parent=sdSign) sdText.setDepthWrite(0) elif zoneId == ToontownGlobals.SellbotLobby: - if base.config.GetBool('want-qa-regression', 0): + if config.GetBool('want-qa-regression', 0): self.notify.info('QA-REGRESSION: COGHQ: Visit SellbotLobby') self.geom = loader.loadModel(self.cogHQLobbyModelPath) front = self.geom.find('**/frontWall') diff --git a/toontown/distributed/PlayGame.py b/toontown/distributed/PlayGame.py index 985de6c2..2f7e7bec 100644 --- a/toontown/distributed/PlayGame.py +++ b/toontown/distributed/PlayGame.py @@ -244,7 +244,7 @@ class PlayGame(StateData.StateData): loaderName = requestStatus['loader'] avId = requestStatus.get('avId', -1) ownerId = requestStatus.get('ownerId', avId) - if base.config.GetBool('want-qa-regression', 0): + if config.GetBool('want-qa-regression', 0): self.notify.info('QA-REGRESSION: NEIGHBORHOODS: Visit %s' % hoodName) count = ToontownGlobals.hoodCountMap[canonicalHoodId] if loaderName == 'safeZoneLoader': @@ -405,8 +405,8 @@ class PlayGame(StateData.StateData): base.localAvatar.chatMgr.obscure(1, 1) base.localAvatar.obscureFriendsListButton(1) requestStatus['how'] = 'tutorial' - if base.config.GetString('language', 'english') == 'japanese': - musicVolume = base.config.GetFloat('tutorial-music-volume', 0.5) + if config.GetString('language', 'english') == 'japanese': + musicVolume = config.GetFloat('tutorial-music-volume', 0.5) requestStatus['musicVolume'] = musicVolume self.hood.enter(requestStatus) diff --git a/toontown/distributed/ToontownClientRepository.py b/toontown/distributed/ToontownClientRepository.py index 040b7d89..d3bcc1c6 100644 --- a/toontown/distributed/ToontownClientRepository.py +++ b/toontown/distributed/ToontownClientRepository.py @@ -135,9 +135,9 @@ class ToontownClientRepository(OTPClientRepository.OTPClientRepository): state = self.loginFSM.getStateNamed('playingGame') state.addTransition('credits') - self.wantCogdominiums = base.config.GetBool('want-cogdominiums', 1) - self.wantEmblems = base.config.GetBool('want-emblems', 0) - if base.config.GetBool('tt-node-check', 0): + self.wantCogdominiums = config.GetBool('want-cogdominiums', 1) + self.wantEmblems = config.GetBool('want-emblems', 0) + if config.GetBool('tt-node-check', 0): for species in ToonDNA.toonSpeciesTypes: for head in ToonDNA.getHeadList(species): for torso in ToonDNA.toonTorsoTypes: diff --git a/toontown/effects/FireworkEffect.py b/toontown/effects/FireworkEffect.py index 72bec55e..32593a38 100644 --- a/toontown/effects/FireworkEffect.py +++ b/toontown/effects/FireworkEffect.py @@ -85,7 +85,7 @@ class FireworkEffect(NodePath): if self.trailTypeId is None: return self.trailEffectsIval self.trailEffectsIval.append(Func(random.choice(self.trailSfx).play)) - if base.config.GetInt('toontown-sfx-setting', 1) == 0: + if config.GetInt('toontown-sfx-setting', 1) == 0: if self.trailTypeId != FireworkTrailType.LongGlowSparkle: self.trailTypeId = FireworkTrailType.Default if self.trailTypeId == FireworkTrailType.Default: @@ -151,7 +151,7 @@ class FireworkEffect(NodePath): trailEffect.setLifespan(3.5) self.trailEffects.append(trailEffect) self.trailEffectsIval.append(Func(trailEffect.startLoop)) - if base.config.GetInt('toontown-sfx-setting', 1) >= 1: + if config.GetInt('toontown-sfx-setting', 1) >= 1: trailEffect = GlowTrail.getEffect() if trailEffect: trailEffect.reparentTo(self.effectsNode) @@ -183,7 +183,7 @@ class FireworkEffect(NodePath): primaryBlast.fadeTime = 0.75 self.burstEffectsIval.append(primaryBlast.getTrack()) self.burstEffects.append(primaryBlast) - if base.config.GetInt('toontown-sfx-setting', 1) >= 1: + if config.GetInt('toontown-sfx-setting', 1) >= 1: secondaryBlast = BlastEffect() secondaryBlast.reparentTo(self.effectsNode) secondaryBlast.setScale(250 * self.scale) @@ -209,14 +209,14 @@ class FireworkEffect(NodePath): explosion.startDelay = 0.0 self.burstEffectsIval.append(explosion.getTrack()) self.burstEffects.append(explosion) - if base.config.GetInt('toontown-sfx-setting', 1) >= 1: + if config.GetInt('toontown-sfx-setting', 1) >= 1: rays = RayBurst() rays.reparentTo(self.effectsNode) rays.setEffectScale(self.scale) rays.setEffectColor(self.primaryColor) self.burstEffectsIval.append(rays.getTrack()) self.burstEffects.append(rays) - if base.config.GetInt('toontown-sfx-setting', 1) >= 2: + if config.GetInt('toontown-sfx-setting', 1) >= 2: sparkles = FireworkSparkles.getEffect() if sparkles: sparkles.reparentTo(self.effectsNode) @@ -225,7 +225,7 @@ class FireworkEffect(NodePath): sparkles.startDelay = 0.0 self.burstEffectsIval.append(sparkles.getTrack()) self.burstEffects.append(sparkles) - if base.config.GetInt('toontown-sfx-setting', 1) >= 1: + if config.GetInt('toontown-sfx-setting', 1) >= 1: explosion = PeonyEffect.getEffect() if explosion: explosion.reparentTo(self.effectsNode) @@ -243,7 +243,7 @@ class FireworkEffect(NodePath): explosion.setEffectColor(self.primaryColor) self.burstEffectsIval.append(explosion.getTrack()) self.burstEffects.append(explosion) - if base.config.GetInt('toontown-sfx-setting', 1) >= 1: + if config.GetInt('toontown-sfx-setting', 1) >= 1: rays = RayBurst() rays.reparentTo(self.effectsNode) rays.setEffectScale(self.scale * 0.75) @@ -258,7 +258,7 @@ class FireworkEffect(NodePath): explosion.setEffectColor(self.primaryColor) self.burstEffectsIval.append(explosion.getTrack()) self.burstEffects.append(explosion) - if base.config.GetInt('toontown-sfx-setting', 1) >= 1: + if config.GetInt('toontown-sfx-setting', 1) >= 1: rays = RayBurst() rays.reparentTo(self.effectsNode) rays.setEffectScale(self.scale) @@ -280,7 +280,7 @@ class FireworkEffect(NodePath): explosion.setEffectColor(self.primaryColor) self.burstEffectsIval.append(explosion.getTrack()) self.burstEffects.append(explosion) - if base.config.GetInt('toontown-sfx-setting', 1) >= 2: + if config.GetInt('toontown-sfx-setting', 1) >= 2: sparkles = FireworkSparkles.getEffect() if sparkles: sparkles.reparentTo(self.effectsNode) @@ -336,7 +336,7 @@ class FireworkEffect(NodePath): explosion.setEffectColor(self.primaryColor) self.burstEffectsIval.append(Sequence(Wait(0.1), explosion.getTrack())) self.burstEffects.append(explosion) - if base.config.GetInt('toontown-sfx-setting', 1) >= 1: + if config.GetInt('toontown-sfx-setting', 1) >= 1: rays = RayBurst() rays.reparentTo(self.effectsNode) rays.setEffectScale(self.scale) @@ -360,14 +360,14 @@ class FireworkEffect(NodePath): skullFlash.startDelay = 0.08 self.burstEffectsIval.append(skullFlash.getTrack()) self.burstEffects.append(skullFlash) - if base.config.GetInt('toontown-sfx-setting', 1) >= 1: + if config.GetInt('toontown-sfx-setting', 1) >= 1: rays = RayBurst() rays.reparentTo(self.effectsNode) rays.setEffectScale(self.scale) rays.setEffectColor(self.primaryColor) self.burstEffectsIval.append(rays.getTrack()) self.burstEffects.append(rays) - if base.config.GetInt('toontown-sfx-setting', 1) >= 2: + if config.GetInt('toontown-sfx-setting', 1) >= 2: sparkles = FireworkSparkles.getEffect() if sparkles: sparkles.reparentTo(self.effectsNode) @@ -383,7 +383,7 @@ class FireworkEffect(NodePath): explosion.reparentTo(self.effectsNode) explosion.setEffectScale(self.scale) explosion.setEffectColor(self.primaryColor) - explosion.numTrails = 3 + base.config.GetInt('toontown-sfx-setting', 1) + explosion.numTrails = 3 + config.GetInt('toontown-sfx-setting', 1) self.burstEffectsIval.append(explosion.getTrack()) self.burstEffects.append(explosion) elif self.burstTypeId == FireworkBurstType.IceCream: diff --git a/toontown/effects/FireworkShowMixin.py b/toontown/effects/FireworkShowMixin.py index c56febcb..7a4218fa 100644 --- a/toontown/effects/FireworkShowMixin.py +++ b/toontown/effects/FireworkShowMixin.py @@ -61,7 +61,7 @@ class FireworkShowMixin: self.timestamp = timestamp self.showMusic = None self.eventId = eventId - if base.config.GetBool('want-old-fireworks', False): + if config.GetBool('want-old-fireworks', False): self.currentShow = self.getFireworkShowIval(eventId, style, songId, t) if self.currentShow: self.currentShow.start(t) @@ -115,7 +115,7 @@ class FireworkShowMixin: else: FireworkShowMixin.notify.warning('Invalid fireworks event ID: %d' % eventId) return None - + self.showMusic = loader.loadMusic(musicFile) self.showMusic.setVolume(1) @@ -145,18 +145,18 @@ class FireworkShowMixin: return if self.__checkHoodValidity() and hasattr(base.cr.playGame, 'hood') and base.cr.playGame.hood and hasattr(base.cr.playGame.hood, 'sky') and base.cr.playGame.hood.sky: preShow = Sequence( - Func(base.localAvatar.setSystemMessage, 0, startMessage), - Parallel(LerpColorScaleInterval(base.cr.playGame.hood.sky, 2.5, Vec4(0.0, 0.0, 0.0, 1.0)), - LerpColorScaleInterval(base.cr.playGame.hood.loader.geom, 2.5, Vec4(0.25, 0.25, 0.35, 1)), - LerpColorScaleInterval(base.localAvatar, 2.5, Vec4(0.85, 0.85, 0.85, 1)), - Func(__lightDecorationOn__)), + Func(base.localAvatar.setSystemMessage, 0, startMessage), + Parallel(LerpColorScaleInterval(base.cr.playGame.hood.sky, 2.5, Vec4(0.0, 0.0, 0.0, 1.0)), + LerpColorScaleInterval(base.cr.playGame.hood.loader.geom, 2.5, Vec4(0.25, 0.25, 0.35, 1)), + LerpColorScaleInterval(base.localAvatar, 2.5, Vec4(0.85, 0.85, 0.85, 1)), + Func(__lightDecorationOn__)), Func(self.trySettingBackground, 0), - Func(self.__checkDDFog), - Func(base.camLens.setFar, 1000.0), - Func(base.cr.playGame.hood.sky.hide), - Func(base.localAvatar.setSystemMessage, 0, instructionMessage), - Func(self.getLoader().music.stop), - Wait(2.0), + Func(self.__checkDDFog), + Func(base.camLens.setFar, 1000.0), + Func(base.cr.playGame.hood.sky.hide), + Func(base.localAvatar.setSystemMessage, 0, instructionMessage), + Func(self.getLoader().music.stop), + Wait(2.0), Func(base.playMusic, self.showMusic, 0, 1, 0.8, max(0, startT)) ) return preShow @@ -192,19 +192,19 @@ class FireworkShowMixin: else: FireworkShowMixin.notify.warning('Invalid fireworks event ID: %d' % eventId) return None - + if self.__checkHoodValidity() and hasattr(base.cr.playGame.hood, 'sky') and base.cr.playGame.hood.sky: postShow = Sequence( - Func(base.cr.playGame.hood.sky.show), + Func(base.cr.playGame.hood.sky.show), Parallel( - LerpColorScaleInterval(base.cr.playGame.hood.sky, 2.5, Vec4(1, 1, 1, 1)), - LerpColorScaleInterval(base.cr.playGame.hood.loader.geom, 2.5, Vec4(1, 1, 1, 1)), + LerpColorScaleInterval(base.cr.playGame.hood.sky, 2.5, Vec4(1, 1, 1, 1)), + LerpColorScaleInterval(base.cr.playGame.hood.loader.geom, 2.5, Vec4(1, 1, 1, 1)), LerpColorScaleInterval(base.localAvatar, 2.5, Vec4(1, 1, 1, 1)) - ), - Func(self.__restoreDDFog), - Func(self.restoreCameraLens), + ), + Func(self.__restoreDDFog), + Func(self.restoreCameraLens), Func(self.trySettingBackground, 1), - Func(self.showMusic.stop), + Func(self.showMusic.stop), Func(base.localAvatar.setSystemMessage, 0, endMessage) ) @@ -228,7 +228,7 @@ class FireworkShowMixin: self.fireworkShow.begin(timeStamp) self.fireworkShow.reparentTo(root) hood = self.getHood() - + # Dammit disney from toontown.hood import TTHood from toontown.hood import DDHood diff --git a/toontown/election/DistributedElectionEvent.py b/toontown/election/DistributedElectionEvent.py index 80a24650..5cf6a6c0 100644 --- a/toontown/election/DistributedElectionEvent.py +++ b/toontown/election/DistributedElectionEvent.py @@ -20,7 +20,7 @@ from otp.speedchat import SpeedChatGlobals class DistributedElectionEvent(DistributedObject, FSM): notify = DirectNotifyGlobal.directNotify.newCategory("DistributedElectionEvent") - + def __init__(self, cr): DistributedObject.__init__(self, cr) FSM.__init__(self, 'ElectionFSM') @@ -88,7 +88,7 @@ class DistributedElectionEvent(DistributedObject, FSM): wheelbarrowJoint.setPosHprScale(3.94, 0.00, 1.06, 270.00, 344.74, 0.00, 1.43, 1.12, 1.0) self.restockSfx = loader.loadSfx('phase_9/audio/sfx/CHQ_SOS_pies_restock.ogg') self.splashSfx = loader.loadSfx('phase_9/audio/sfx/CHQ_FACT_paint_splash.ogg') - + # Find FlippyStand's collision to give people pies. # The new animated model doesn't have any collisions, so this needs to be replaced with a collision box. Harv did it once, just need to look back in the commit history. @@ -96,7 +96,7 @@ class DistributedElectionEvent(DistributedObject, FSM): self.pieCollision = self.flippyStand.attachNewNode(CollisionNode('wheelbarrow_collision')) self.pieCollision.node().addSolid(cs) self.accept('enter' + self.pieCollision.node().getName(), self.handleWheelbarrowCollisionSphereEnter) - + csSlappy = CollisionBox(Point3(-4.2, 0, 0), 9.5, 5.5, 18) self.goopCollision = self.slappyStand.attachNewNode(CollisionNode('goop_collision')) self.goopCollision.node().addSolid(csSlappy) @@ -241,9 +241,9 @@ class DistributedElectionEvent(DistributedObject, FSM): def delete(self): self.demand('Off', 0.) - + self.ignore('entercnode') - + # Clean up everything... self.showFloor.removeNode() self.stopInteractiveFlippy() @@ -258,7 +258,7 @@ class DistributedElectionEvent(DistributedObject, FSM): These bits are for things used before Election Day, and mostly unrelated to the Election Sequence. ''' def enterIdle(self, offset): - if base.config.GetBool('want-doomsday', False): + if config.GetBool('want-doomsday', False): # We're waiting for the election to start, so Surlee comes by to keep us occupied during his studies of "sillyness". self.surlee.show() self.surlee.addActive() @@ -274,7 +274,7 @@ class DistributedElectionEvent(DistributedObject, FSM): Wait(8), Func(self.surlee.setChatAbsolute, 'When the clock strikes two we\'ll see them march through those doors and onto the stage. Are you toons ready?', CFSpeech|CFTimeout), Wait(8), - Func(self.surlee.setChatAbsolute, 'I must say, surprisingly, the silliness around here couldn\'t be higher at this time.', CFSpeech|CFTimeout), + Func(self.surlee.setChatAbsolute, 'I must say, surprisingly, the silliness around here couldn\'t be higher at this time.', CFSpeech|CFTimeout), Wait(8), Func(self.surlee.setChatAbsolute, 'My fellow scientists of silliness, Professor Prepostera and Doctor Dimm, are over there tracking the amount of silliness being taken in from the campaign stands.', CFSpeech|CFTimeout), Wait(8), @@ -289,9 +289,9 @@ class DistributedElectionEvent(DistributedObject, FSM): def exitIdle(self): - if base.config.GetBool('want-doomsday', False): + if config.GetBool('want-doomsday', False): self.surleeIntroInterval.finish() - + def startInteractiveFlippy(self): self.flippy.reparentTo(self.showFloor) self.flippy.setPosHpr(-40.6, -18.5, 0.01, 20, 0, 0) @@ -317,7 +317,7 @@ class DistributedElectionEvent(DistributedObject, FSM): if phraseId in phraseIdList: self.sendUpdate('phraseSaidToFlippy', [phraseId]) break - + def flippySpeech(self, avId, phraseId): av = self.cr.doId2do.get(avId) if not av: @@ -1034,7 +1034,7 @@ class DistributedElectionEvent(DistributedObject, FSM): # Tell the credits our toon name and dna. NodePath(base.marginManager).hide() base.cr.credits.setLocalToonDetails(base.localAvatar.getName(), base.localAvatar.style) - + # This starts here so that we can drift towards Flippy for his speech, # but some of it should be moved over to the real credits sequence which is called after this. # A safe time to cut to the real sequence would be after the portable hole nosedive, or right when the camera arrives at Flippy before "Toons of the world... UNITE!" @@ -1047,7 +1047,7 @@ class DistributedElectionEvent(DistributedObject, FSM): self.logo.setScale(0.6) self.logo.setPos(0, 1, 0.3) self.logo.setColorScale(1, 1, 1, 0) - + self.portal = loader.loadModel('phase_3.5/models/props/portal-mod') self.portal.reparentTo(render) self.portal.setPosHprScale(93.1, 0.4, 4, 4, 355, 45, 0, 0, 0) @@ -1126,10 +1126,10 @@ class DistributedElectionEvent(DistributedObject, FSM): def saySurleePhrase(self, phrase, interrupt, broadcast): self.surlee.setChatAbsolute(phrase, CFSpeech|CFTimeout, interrupt = interrupt) - + # If we want everyone to see this message, even if not near Surlee, we'll send it as a whisper. if broadcast and Vec3(base.localAvatar.getPos(self.surleeR)).length() >= 15: base.localAvatar.setSystemMessage(0, self.surleeR.getName()+ ': ' + phrase, WTEmote) - + def setState(self, state, timestamp): self.request(state, globalClockDelta.localElapsedTime(timestamp)) diff --git a/toontown/estate/DistributedPhone.py b/toontown/estate/DistributedPhone.py index 4d777cb4..a80aa23b 100644 --- a/toontown/estate/DistributedPhone.py +++ b/toontown/estate/DistributedPhone.py @@ -175,7 +175,7 @@ class DistributedPhone(DistributedFurnitureItem.DistributedFurnitureItem): return if self.hasLocalAvatar: self.freeAvatar() - if base.config.GetBool('want-pets', 1): + if config.GetBool('want-pets', 1): base.localAvatar.lookupPetDNA() self.notify.debug('Entering Phone Sphere....') taskMgr.remove(self.uniqueName('ringDoLater')) diff --git a/toontown/estate/Estate.py b/toontown/estate/Estate.py index 7bbd992e..75ed5d2d 100644 --- a/toontown/estate/Estate.py +++ b/toontown/estate/Estate.py @@ -133,7 +133,7 @@ class Estate(Place.Place): #if hasattr(base.cr, 'aprilToonsMgr'): #if self.isEventActive(AprilToonsGlobals.EventEstateGravity): #base.localAvatar.startAprilToonsControls() - if base.config.GetBool('want-april-toons'): + if config.GetBool('want-april-toons'): base.localAvatar.startAprilToonsControls() self.accept('doorDoneEvent', self.handleDoorDoneEvent) self.accept('DistributedDoor_doorTrigger', self.handleDoorTrigger) @@ -345,7 +345,7 @@ class Estate(Place.Place): self.notify.debug('continuing in __submergeToon') if hasattr(self, 'loader') and self.loader: base.playSfx(self.loader.submergeSound) - if base.config.GetBool('disable-flying-glitch') == 0: + if config.GetBool('disable-flying-glitch') == 0: self.fsm.request('walk') self.walkStateData.fsm.request('swimming', [self.loader.swimSound]) pos = base.localAvatar.getPos(render) @@ -363,7 +363,7 @@ class Estate(Place.Place): #if hasattr(base.cr, 'aprilToonsMgr'): #if self.isEventActive(AprilToonsGlobals.EventEstateGravity): #base.localAvatar.startAprilToonsControls() - if base.config.GetBool('want-april-toons'): + if config.GetBool('want-april-toons'): base.localAvatar.startAprilToonsControls() def __setUnderwaterFog(self): diff --git a/toontown/estate/houseDesign.py b/toontown/estate/houseDesign.py index e7789594..9f7ebe51 100644 --- a/toontown/estate/houseDesign.py +++ b/toontown/estate/houseDesign.py @@ -518,7 +518,7 @@ class ObjectManager(NodePath, DirectObject): else: self.sendToAtticButton.show() return - + self.sendToAtticButton.show() def deselectObject(self): @@ -1165,7 +1165,7 @@ class ObjectManager(NodePath, DirectObject): return def sendItemToAttic(self): - if base.config.GetBool('want-qa-regression', 0): + if config.GetBool('want-qa-regression', 0): self.notify.info('QA-REGRESSION: ESTATE: Send Item to Attic') messenger.send('wakeup') if self.selectedObject: @@ -1267,7 +1267,7 @@ class ObjectManager(NodePath, DirectObject): return def bringItemFromAttic(self, item, itemIndex): - if base.config.GetBool('want-qa-regression', 0): + if config.GetBool('want-qa-regression', 0): self.notify.info('QA-REGRESSION: ESTATE: Place Item in Room') messenger.send('wakeup') self.__enableItemButtons(0) @@ -1485,7 +1485,7 @@ class ObjectManager(NodePath, DirectObject): return def __handleVerifyDeleteOK(self): - if base.config.GetBool('want-qa-regression', 0): + if config.GetBool('want-qa-regression', 0): self.notify.info('QA-REGRESSION: ESTATE: Send Item to Trash') deleteFunction = self.verifyItems[0] deleteFunctionArgs = self.verifyItems[1:] @@ -1596,7 +1596,7 @@ class ObjectManager(NodePath, DirectObject): self.verifyItems = (item, itemIndex) def __handleVerifyReturnFromTrashOK(self): - if base.config.GetBool('want-qa-regression', 0): + if config.GetBool('want-qa-regression', 0): self.notify.info('QA-REGRESSION: ESTATE: Send Item to Attic') item, itemIndex = self.verifyItems self.__cleanupVerifyDelete() diff --git a/toontown/fishing/FishBase.py b/toontown/fishing/FishBase.py index 58dd8003..7cdd4808 100644 --- a/toontown/fishing/FishBase.py +++ b/toontown/fishing/FishBase.py @@ -56,7 +56,7 @@ class FishBase: loop = None delay = None playRate = None - if base.config.GetBool('want-fish-audio', 1): + if config.GetBool('want-fish-audio', 1): soundDict = FishGlobals.FishAudioFileDict fileInfo = soundDict.get(self.genus, None) if fileInfo: diff --git a/toontown/friends/FriendInviter.py b/toontown/friends/FriendInviter.py index 0dc3bcfd..c4c53a7e 100644 --- a/toontown/friends/FriendInviter.py +++ b/toontown/friends/FriendInviter.py @@ -45,7 +45,7 @@ class FriendInviter(DirectFrame): notify = DirectNotifyGlobal.directNotify.newCategory('FriendInviter') def __init__(self, avId, avName, avDisableName): - self.wantPlayerFriends = base.config.GetBool('want-player-friends', 0) + self.wantPlayerFriends = config.GetBool('want-player-friends', 0) DirectFrame.__init__(self, pos=(-1.033, 0.1, -0.35), parent=base.a2dTopRight, image_color=GlobalDialogColor, image_scale=(1.0, 1.0, 0.6), text='', text_wordwrap=TTLocalizer.FIdirectFrameWordwrap, text_scale=TTLocalizer.FIdirectFrame, text_pos=TTLocalizer.FIdirectFramePos) self['image'] = DGG.getDefaultDialogGeom() self.avId = avId @@ -455,7 +455,7 @@ class FriendInviter(DirectFrame): pass def __handleOk(self): - if base.config.GetBool('want-qa-regression', 0): + if config.GetBool('want-qa-regression', 0): self.notify.info('QA-REGRESSION: MAKEAFRIENDSHIP: Make a friendship') unloadFriendInviter() @@ -466,7 +466,7 @@ class FriendInviter(DirectFrame): unloadFriendInviter() def __handleStop(self): - if base.config.GetBool('want-qa-regression', 0): + if config.GetBool('want-qa-regression', 0): self.notify.info('QA-REGRESSION: BREAKAFRIENDSHIP: Break a friendship') self.fsm.request('endFriendship') diff --git a/toontown/golf/DistributedGolfHole.py b/toontown/golf/DistributedGolfHole.py index 207cd40e..2a31df00 100644 --- a/toontown/golf/DistributedGolfHole.py +++ b/toontown/golf/DistributedGolfHole.py @@ -56,10 +56,10 @@ class DistributedGolfHole(DistributedPhysicsWorld.DistributedPhysicsWorld, FSM, 'Cleanup': ['Off']} id = 0 notify = directNotify.newCategory('DistributedGolfHole') - unlimitedAimTime = base.config.GetBool('unlimited-aim-time', 0) - unlimitedTeeTime = base.config.GetBool('unlimited-tee-time', 0) - golfPowerSpeed = base.config.GetDouble('golf-power-speed', 3) - golfPowerExponent = base.config.GetDouble('golf-power-exponent', 0.75) + unlimitedAimTime = config.GetBool('unlimited-aim-time', 0) + unlimitedTeeTime = config.GetBool('unlimited-tee-time', 0) + golfPowerSpeed = config.GetDouble('golf-power-speed', 3) + golfPowerExponent = config.GetDouble('golf-power-exponent', 0.75) DefaultCamP = -16 MaxCamP = -90 @@ -288,7 +288,7 @@ class DistributedGolfHole(DistributedPhysicsWorld.DistributedPhysicsWorld, FSM, curNodePath = self.hardSurfaceNodePath.find('**/locator%d' % locatorNum) def loadBlockers(self): - loadAll = base.config.GetBool('golf-all-blockers', 0) + loadAll = config.GetBool('golf-all-blockers', 0) self.createLocatorDict() self.blockerNums = self.holeInfo['blockers'] for locatorNum in self.locDict: diff --git a/toontown/hood/GenericAnimatedBuilding.py b/toontown/hood/GenericAnimatedBuilding.py index 1390a759..17a97973 100644 --- a/toontown/hood/GenericAnimatedBuilding.py +++ b/toontown/hood/GenericAnimatedBuilding.py @@ -6,5 +6,5 @@ class GenericAnimatedBuilding(GenericAnimatedProp.GenericAnimatedProp): GenericAnimatedProp.GenericAnimatedProp.__init__(self, node) def enter(self): - if base.config.GetBool('buildings-animate', False): + if config.GetBool('buildings-animate', False): GenericAnimatedProp.GenericAnimatedProp.enter(self) diff --git a/toontown/hood/GenericAnimatedProp.py b/toontown/hood/GenericAnimatedProp.py index 58de6d40..a7a83c74 100644 --- a/toontown/hood/GenericAnimatedProp.py +++ b/toontown/hood/GenericAnimatedProp.py @@ -112,7 +112,7 @@ class GenericAnimatedProp(AnimatedProp.AnimatedProp): if theSound: soundDur = theSound.length() if maximumDuration < soundDur: - if base.config.GetBool('interactive-prop-info', False): + if config.GetBool('interactive-prop-info', False): if self.visId == localAvatar.zoneId and origAnimName != 'tt_a_ara_dga_hydrant_idleIntoFight': self.notify.warning('anim %s had duration of %s while sound has duration of %s' % (origAnimName, maximumDuration, soundDur)) soundDur = maximumDuration diff --git a/toontown/hood/HydrantInteractiveProp.py b/toontown/hood/HydrantInteractiveProp.py index e612b6a5..617742f3 100644 --- a/toontown/hood/HydrantInteractiveProp.py +++ b/toontown/hood/HydrantInteractiveProp.py @@ -176,7 +176,7 @@ class HydrantInteractiveProp(InteractiveAnimatedProp.InteractiveAnimatedProp): ToontownGlobals.MinniesMelodyland: ('tt_a_ara_mml_hydrant_fightBoost', 'tt_a_ara_mml_hydrant_fightCheer', 'tt_a_ara_mml_hydrant_fightIdle'), ToontownGlobals.TheBrrrgh: ('tt_a_ara_tbr_hydrant_fightBoost', 'tt_a_ara_tbr_hydrant_fightCheer', 'tt_a_ara_tbr_hydrant_fightIdle'), ToontownGlobals.DonaldsDreamland: ('tt_a_ara_ddl_hydrant_fightBoost', 'tt_a_ara_ddl_hydrant_fightCheer', 'tt_a_ara_ddl_hydrant_fightIdle')} - IdlePauseTime = base.config.GetFloat('prop-idle-pause-time', 0.0) + IdlePauseTime = config.GetFloat('prop-idle-pause-time', 0.0) def __init__(self, node): self.leftWater = None diff --git a/toontown/hood/HydrantOneAnimatedProp.py b/toontown/hood/HydrantOneAnimatedProp.py index 71f2bdde..3dc0ddf1 100644 --- a/toontown/hood/HydrantOneAnimatedProp.py +++ b/toontown/hood/HydrantOneAnimatedProp.py @@ -4,7 +4,7 @@ from direct.directnotify import DirectNotifyGlobal class HydrantOneAnimatedProp(ZeroAnimatedProp.ZeroAnimatedProp): notify = DirectNotifyGlobal.directNotify.newCategory('HydrantOneAnimatedProp') - PauseTimeMult = base.config.GetFloat('zero-pause-mult', 1.0) + PauseTimeMult = config.GetFloat('zero-pause-mult', 1.0) PhaseInfo = {0: ('tt_a_ara_ttc_hydrant_firstMoveArmUp1', 40 * PauseTimeMult), 1: ('tt_a_ara_ttc_hydrant_firstMoveStruggle', 20 * PauseTimeMult), 2: ('tt_a_ara_ttc_hydrant_firstMoveArmUp2', 10 * PauseTimeMult), diff --git a/toontown/hood/HydrantTwoAnimatedProp.py b/toontown/hood/HydrantTwoAnimatedProp.py index c94435ec..3a8a922d 100644 --- a/toontown/hood/HydrantTwoAnimatedProp.py +++ b/toontown/hood/HydrantTwoAnimatedProp.py @@ -4,7 +4,7 @@ from direct.directnotify import DirectNotifyGlobal class HydrantTwoAnimatedProp(ZeroAnimatedProp.ZeroAnimatedProp): notify = DirectNotifyGlobal.directNotify.newCategory('HydrantTwoAnimatedProp') - PauseTimeMult = base.config.GetFloat('zero-pause-mult', 1.0) + PauseTimeMult = config.GetFloat('zero-pause-mult', 1.0) PhaseInfo = {0: ('tt_a_ara_ttc_hydrant_firstMoveArmUp1', 40 * PauseTimeMult), 1: ('tt_a_ara_ttc_hydrant_firstMoveStruggle', 20 * PauseTimeMult), 2: ('tt_a_ara_ttc_hydrant_firstMoveArmUp2', 10 * PauseTimeMult), diff --git a/toontown/hood/HydrantZeroAnimatedProp.py b/toontown/hood/HydrantZeroAnimatedProp.py index 98249ad1..ff2e5ed5 100644 --- a/toontown/hood/HydrantZeroAnimatedProp.py +++ b/toontown/hood/HydrantZeroAnimatedProp.py @@ -4,7 +4,7 @@ from direct.directnotify import DirectNotifyGlobal class HydrantZeroAnimatedProp(ZeroAnimatedProp.ZeroAnimatedProp): notify = DirectNotifyGlobal.directNotify.newCategory('HydrantZeroAnimatedProp') - PauseTimeMult = base.config.GetFloat('zero-pause-mult', 1.0) + PauseTimeMult = config.GetFloat('zero-pause-mult', 1.0) PhaseInfo = {0: ('tt_a_ara_ttc_hydrant_firstMoveArmUp1', 40 * PauseTimeMult), 1: ('tt_a_ara_ttc_hydrant_firstMoveStruggle', 20 * PauseTimeMult), 2: ('tt_a_ara_ttc_hydrant_firstMoveArmUp2', 10 * PauseTimeMult), diff --git a/toontown/hood/InteractiveAnimatedProp.py b/toontown/hood/InteractiveAnimatedProp.py index af0b93a5..8e35efb1 100644 --- a/toontown/hood/InteractiveAnimatedProp.py +++ b/toontown/hood/InteractiveAnimatedProp.py @@ -26,7 +26,7 @@ class InteractiveAnimatedProp(GenericAnimatedProp.GenericAnimatedProp, FSM.FSM): ZoneToFightAnims = {} ZoneToVictoryAnims = {} ZoneToSadAnims = {} - IdlePauseTime = base.config.GetFloat('prop-idle-pause-time', 0.0) + IdlePauseTime = config.GetFloat('prop-idle-pause-time', 0.0) HpTextGenerator = TextNode('HpTextGenerator') BattleCheerText = '+' @@ -200,13 +200,13 @@ class InteractiveAnimatedProp(GenericAnimatedProp.GenericAnimatedProp, FSM.FSM): def enter(self): GenericAnimatedProp.GenericAnimatedProp.enter(self) - if base.config.GetBool('props-buff-battles', True): + if config.GetBool('props-buff-battles', True): self.notify.debug('props buff battles is true') if base.cr.newsManager.isHolidayRunning(self.holidayId): self.notify.debug('holiday is running, doing idle interval') self.node.stop() self.node.pose('idle0', 0) - if base.config.GetBool('interactive-prop-random-idles', 1): + if config.GetBool('interactive-prop-random-idles', 1): self.requestIdleOrSad() else: self.idleInterval.loop() @@ -262,7 +262,7 @@ class InteractiveAnimatedProp(GenericAnimatedProp.GenericAnimatedProp, FSM.FSM): def chooseIdleAnimToRun(self): result = self.numIdles - 1 - if base.config.GetBool('randomize-interactive-idles', True): + if config.GetBool('randomize-interactive-idles', True): pairs = [] for i in xrange(self.numIdles): reversedChance = self.numIdles - i - 1 @@ -482,16 +482,16 @@ class InteractiveAnimatedProp(GenericAnimatedProp.GenericAnimatedProp, FSM.FSM): if self.hasSpecialIval(origAnimName): specialIval = self.getSpecialIval(origAnimName) idleAnimAndSound = Parallel(animIval, soundIval, specialIval) - if base.config.GetBool('interactive-prop-info', False): + if config.GetBool('interactive-prop-info', False): idleAnimAndSound.append(printFunc) else: idleAnimAndSound = Parallel(animIval, soundIval) - if base.config.GetBool('interactive-prop-info', False): + if config.GetBool('interactive-prop-info', False): idleAnimAndSound.append(printFunc) return idleAnimAndSound def printAnimIfClose(self, animKey): - if base.config.GetBool('interactive-prop-info', False): + if config.GetBool('interactive-prop-info', False): try: animName = self.node.getAnimFilename(animKey) baseAnimName = animName.split('/')[-1] diff --git a/toontown/hood/MailboxInteractiveProp.py b/toontown/hood/MailboxInteractiveProp.py index 7d6bd11f..207e3acb 100644 --- a/toontown/hood/MailboxInteractiveProp.py +++ b/toontown/hood/MailboxInteractiveProp.py @@ -176,7 +176,7 @@ class MailboxInteractiveProp(InteractiveAnimatedProp.InteractiveAnimatedProp): ToontownGlobals.MinniesMelodyland: ('tt_a_ara_mml_mailbox_fightBoost', 'tt_a_ara_mml_mailbox_fightCheer', 'tt_a_ara_mml_mailbox_fightIdle'), ToontownGlobals.TheBrrrgh: ('tt_a_ara_tbr_mailbox_fightBoost', 'tt_a_ara_tbr_mailbox_fightCheer', 'tt_a_ara_tbr_mailbox_fightIdle'), ToontownGlobals.DonaldsDreamland: ('tt_a_ara_ddl_mailbox_fightBoost', 'tt_a_ara_ddl_mailbox_fightCheer', 'tt_a_ara_ddl_mailbox_fightIdle')} - IdlePauseTime = base.config.GetFloat('prop-idle-pause-time', 0.0) + IdlePauseTime = config.GetFloat('prop-idle-pause-time', 0.0) def __init__(self, node): InteractiveAnimatedProp.InteractiveAnimatedProp.__init__(self, node, ToontownGlobals.MAILBOXES_BUFF_BATTLES) diff --git a/toontown/hood/MailboxOneAnimatedProp.py b/toontown/hood/MailboxOneAnimatedProp.py index 26ca187d..1dea2844 100644 --- a/toontown/hood/MailboxOneAnimatedProp.py +++ b/toontown/hood/MailboxOneAnimatedProp.py @@ -4,7 +4,7 @@ from direct.directnotify import DirectNotifyGlobal class MailboxOneAnimatedProp(ZeroAnimatedProp.ZeroAnimatedProp): notify = DirectNotifyGlobal.directNotify.newCategory('MailboxOneAnimatedProp') - PauseTimeMult = base.config.GetFloat('zero-pause-mult', 1.0) + PauseTimeMult = config.GetFloat('zero-pause-mult', 1.0) PhaseInfo = {0: ('tt_a_ara_dod_mailbox_firstMoveFlagSpin1', 40 * PauseTimeMult), 1: (('tt_a_ara_dod_mailbox_firstMoveStruggle', 'tt_a_ara_dod_mailbox_firstMoveJump'), 20 * PauseTimeMult), 2: ('tt_a_ara_dod_mailbox_firstMoveFlagSpin2', 10 * PauseTimeMult), diff --git a/toontown/hood/MailboxTwoAnimatedProp.py b/toontown/hood/MailboxTwoAnimatedProp.py index 8c2472a7..b9b63833 100644 --- a/toontown/hood/MailboxTwoAnimatedProp.py +++ b/toontown/hood/MailboxTwoAnimatedProp.py @@ -4,7 +4,7 @@ from direct.directnotify import DirectNotifyGlobal class MailboxTwoAnimatedProp(ZeroAnimatedProp.ZeroAnimatedProp): notify = DirectNotifyGlobal.directNotify.newCategory('MailboxTwoAnimatedProp') - PauseTimeMult = base.config.GetFloat('zero-pause-mult', 1.0) + PauseTimeMult = config.GetFloat('zero-pause-mult', 1.0) PhaseInfo = {0: ('tt_a_ara_dod_mailbox_firstMoveFlagSpin1', 40 * PauseTimeMult), 1: (('tt_a_ara_dod_mailbox_firstMoveStruggle', 'tt_a_ara_dod_mailbox_firstMoveJump'), 20 * PauseTimeMult), 2: ('tt_a_ara_dod_mailbox_firstMoveFlagSpin2', 10 * PauseTimeMult), diff --git a/toontown/hood/MailboxZeroAnimatedProp.py b/toontown/hood/MailboxZeroAnimatedProp.py index 2ccdf35b..16071930 100644 --- a/toontown/hood/MailboxZeroAnimatedProp.py +++ b/toontown/hood/MailboxZeroAnimatedProp.py @@ -4,7 +4,7 @@ from direct.directnotify import DirectNotifyGlobal class MailboxZeroAnimatedProp(ZeroAnimatedProp.ZeroAnimatedProp): notify = DirectNotifyGlobal.directNotify.newCategory('MailboxZeroAnimatedProp') - PauseTimeMult = base.config.GetFloat('zero-pause-mult', 1.0) + PauseTimeMult = config.GetFloat('zero-pause-mult', 1.0) PhaseInfo = {0: ('tt_a_ara_dod_mailbox_firstMoveFlagSpin1', 40 * PauseTimeMult), 1: (('tt_a_ara_dod_mailbox_firstMoveStruggle', 'tt_a_ara_dod_mailbox_firstMoveJump'), 20 * PauseTimeMult), 2: ('tt_a_ara_dod_mailbox_firstMoveFlagSpin2', 10 * PauseTimeMult), diff --git a/toontown/hood/Place.py b/toontown/hood/Place.py index 21142e80..c395aba5 100644 --- a/toontown/hood/Place.py +++ b/toontown/hood/Place.py @@ -147,7 +147,7 @@ class Place(StateData.StateData, FriendsListManager.FriendsListManager): return 1 def handleTeleportQuery(self, fromAvatar, toAvatar): - if base.config.GetBool('want-tptrack', False): + if config.GetBool('want-tptrack', False): if toAvatar == localAvatar: toAvatar.doTeleportResponse(fromAvatar, toAvatar, toAvatar.doId, 1, toAvatar.defaultShard, base.cr.playGame.getPlaceId(), self.getZoneId(), fromAvatar.doId) else: @@ -635,7 +635,7 @@ class Place(StateData.StateData, FriendsListManager.FriendsListManager): base.localAvatar.b_setAnimState('Died', 1, callback, [requestStatus]) base.localAvatar.obscureMoveFurnitureButton(1) return - + def __pgdiedDone(self): self.fsm.request('walk') diff --git a/toontown/hood/StreetSign.py b/toontown/hood/StreetSign.py index b37cb616..14c04a29 100644 --- a/toontown/hood/StreetSign.py +++ b/toontown/hood/StreetSign.py @@ -11,7 +11,7 @@ class StreetSign(DistributedObject.DistributedObject): RedownloadTaskName = 'RedownloadStreetSign' StreetSignFileName = config.GetString('street-sign-filename', 'texture.jpg') StreetSignBaseDir = config.GetString('street-sign-base-dir', 'sign') - StreetSignUrl = base.config.GetString('street-sign-url', 'http://cdn.toontown.disney.go.com/toontown/en/street-signs/img/') + StreetSignUrl = config.GetString('street-sign-url', 'http://cdn.toontown.disney.go.com/toontown/en/street-signs/img/') notify = DirectNotifyGlobal.directNotify.newCategory('StreetSign') def __init__(self): diff --git a/toontown/hood/TrashcanInteractiveProp.py b/toontown/hood/TrashcanInteractiveProp.py index 36a726b2..66fb9ef6 100644 --- a/toontown/hood/TrashcanInteractiveProp.py +++ b/toontown/hood/TrashcanInteractiveProp.py @@ -178,7 +178,7 @@ class TrashcanInteractiveProp(InteractiveAnimatedProp.InteractiveAnimatedProp): 'tt_a_ara_mml_trashcan_fightIdle'), ToontownGlobals.TheBrrrgh: ('tt_a_ara_tbr_trashcan_fightBoost', 'tt_a_ara_tbr_trashcan_fightCheer', 'tt_a_ara_tbr_trashcan_fightIdle'), ToontownGlobals.DonaldsDreamland: ('tt_a_ara_ddl_trashcan_fightBoost', 'tt_a_ara_ddl_trashcan_fightCheer', 'tt_a_ara_ddl_trashcan_fightIdle')} - IdlePauseTime = base.config.GetFloat('prop-idle-pause-time', 0.0) + IdlePauseTime = config.GetFloat('prop-idle-pause-time', 0.0) def __init__(self, node): InteractiveAnimatedProp.InteractiveAnimatedProp.__init__(self, node, ToontownGlobals.TRASHCANS_BUFF_BATTLES) diff --git a/toontown/hood/TrashcanOneAnimatedProp.py b/toontown/hood/TrashcanOneAnimatedProp.py index 68d4331a..7485c15a 100644 --- a/toontown/hood/TrashcanOneAnimatedProp.py +++ b/toontown/hood/TrashcanOneAnimatedProp.py @@ -4,7 +4,7 @@ from direct.directnotify import DirectNotifyGlobal class TrashcanOneAnimatedProp(ZeroAnimatedProp.ZeroAnimatedProp): notify = DirectNotifyGlobal.directNotify.newCategory('TrashcanOneAnimatedProp') - PauseTimeMult = base.config.GetFloat('zero-pause-mult', 1.0) + PauseTimeMult = config.GetFloat('zero-pause-mult', 1.0) PhaseInfo = {0: ('tt_a_ara_dga_trashcan_firstMoveLidFlip1', 40 * PauseTimeMult), 1: ('tt_a_ara_dga_trashcan_firstMoveStruggle', 20 * PauseTimeMult), 2: ('tt_a_ara_dga_trashcan_firstMoveLidFlip2', 10 * PauseTimeMult), diff --git a/toontown/hood/TrashcanTwoAnimatedProp.py b/toontown/hood/TrashcanTwoAnimatedProp.py index f0b86cec..d259643c 100644 --- a/toontown/hood/TrashcanTwoAnimatedProp.py +++ b/toontown/hood/TrashcanTwoAnimatedProp.py @@ -4,7 +4,7 @@ from direct.directnotify import DirectNotifyGlobal class TrashcanTwoAnimatedProp(ZeroAnimatedProp.ZeroAnimatedProp): notify = DirectNotifyGlobal.directNotify.newCategory('TrashcanTwoAnimatedProp') - PauseTimeMult = base.config.GetFloat('zero-pause-mult', 1.0) + PauseTimeMult = config.GetFloat('zero-pause-mult', 1.0) PhaseInfo = {0: ('tt_a_ara_dga_trashcan_firstMoveLidFlip1', 40 * PauseTimeMult), 1: ('tt_a_ara_dga_trashcan_firstMoveStruggle', 20 * PauseTimeMult), 2: ('tt_a_ara_dga_trashcan_firstMoveLidFlip2', 10 * PauseTimeMult), diff --git a/toontown/hood/TrashcanZeroAnimatedProp.py b/toontown/hood/TrashcanZeroAnimatedProp.py index 7b432ad9..d86b5107 100644 --- a/toontown/hood/TrashcanZeroAnimatedProp.py +++ b/toontown/hood/TrashcanZeroAnimatedProp.py @@ -4,7 +4,7 @@ from direct.directnotify import DirectNotifyGlobal class TrashcanZeroAnimatedProp(ZeroAnimatedProp.ZeroAnimatedProp): notify = DirectNotifyGlobal.directNotify.newCategory('TrashcanZeroAnimatedProp') - PauseTimeMult = base.config.GetFloat('zero-pause-mult', 1.0) + PauseTimeMult = config.GetFloat('zero-pause-mult', 1.0) PhaseInfo = {0: ('tt_a_ara_dga_trashcan_firstMoveLidFlip1', 40 * PauseTimeMult), 1: ('tt_a_ara_dga_trashcan_firstMoveStruggle', 20 * PauseTimeMult), 2: ('tt_a_ara_dga_trashcan_firstMoveLidFlip2', 10 * PauseTimeMult), diff --git a/toontown/hood/ZeroAnimatedProp.py b/toontown/hood/ZeroAnimatedProp.py index ab7070f5..6a52249f 100644 --- a/toontown/hood/ZeroAnimatedProp.py +++ b/toontown/hood/ZeroAnimatedProp.py @@ -95,7 +95,7 @@ class ZeroAnimatedProp(GenericAnimatedProp.GenericAnimatedProp, FSM.FSM): def chooseAnimToRun(self): result = self.curPhase - if base.config.GetBool('anim-props-randomized', True): + if config.GetBool('anim-props-randomized', True): pairs = [] for i in xrange(self.curPhase + 1): pairs.append((math.pow(2, i), i)) diff --git a/toontown/login/AccountServerDate.py b/toontown/login/AccountServerDate.py index eed9ee39..2798f184 100644 --- a/toontown/login/AccountServerDate.py +++ b/toontown/login/AccountServerDate.py @@ -19,7 +19,7 @@ class AccountServerDate: if self.__grabbed and not force: self.notify.debug('using cached account server date') return - if base.cr.accountOldAuth or base.config.GetBool('use-local-date', 0): + if base.cr.accountOldAuth or config.GetBool('use-local-date', 0): self.__useLocalClock() return url = URLSpec(self.getServer()) diff --git a/toontown/login/AvatarChoice.py b/toontown/login/AvatarChoice.py index ab0e7ca2..d1dc91e1 100644 --- a/toontown/login/AvatarChoice.py +++ b/toontown/login/AvatarChoice.py @@ -240,7 +240,7 @@ class AvatarChoice(DirectButton): self.deleteWithPasswordFrame.hide() base.transitions.noTransitions() messenger.send(self.doneEvent, ['delete', self.position]) - if base.config.GetBool('want-qa-regression', 0): + if config.GetBool('want-qa-regression', 0): self.notify.info('QA-REGRESSION: DELETEATOON: Deleting A Toon') else: if errorMsg is not None: @@ -259,7 +259,7 @@ class AvatarChoice(DirectButton): self.deleteWithPasswordFrame.hide() base.transitions.noTransitions() messenger.send(self.doneEvent, ['delete', self.position]) - if base.config.GetBool('want-qa-regression', 0): + if config.GetBool('want-qa-regression', 0): self.notify.info('QA-REGRESSION: DELETEATOON: Deleting A Toon') else: self.deleteWithPasswordFrame['text'] = TTLocalizer.AvatarChoiceDeleteWrongConfirm % {'name': self.name, diff --git a/toontown/login/AvatarChooser.py b/toontown/login/AvatarChooser.py index e0dcab95..4a804577 100644 --- a/toontown/login/AvatarChooser.py +++ b/toontown/login/AvatarChooser.py @@ -58,7 +58,7 @@ class AvatarChooser(StateData.StateData): self.pickAToonBG.setBin('background', 1) self.pickAToonBG.reparentTo(aspect2d) base.setBackgroundColor(Vec4(0.145, 0.368, 0.78, 1)) - choice = base.config.GetInt('auto-avatar-choice', -1) + choice = config.GetInt('auto-avatar-choice', -1) for panel in self.panelList: panel.show() self.accept(panel.doneEvent, self.__handlePanelDone) diff --git a/toontown/makeatoon/MakeAToon.py b/toontown/makeatoon/MakeAToon.py index 7498dc98..db2ae6ee 100644 --- a/toontown/makeatoon/MakeAToon.py +++ b/toontown/makeatoon/MakeAToon.py @@ -91,7 +91,7 @@ class MakeAToon(StateData.StateData): def enter(self): self.notify.debug('Starting Make A Toon.') - if base.config.GetBool('want-qa-regression', 0): + if config.GetBool('want-qa-regression', 0): self.notify.info('QA-REGRESSION: MAKEATOON: Starting Make A Toon') base.cr.centralLogger.writeClientEvent('MAT - startingMakeAToon') base.camLens.setFov(ToontownGlobals.MakeAToonCameraFov) @@ -252,8 +252,8 @@ class MakeAToon(StateData.StateData): self.cls.load() self.ns.load() self.music = base.loadMusic('phase_3/audio/bgm/create_a_toon.ogg') - self.musicVolume = base.config.GetFloat('makeatoon-music-volume', 1) - self.sfxVolume = base.config.GetFloat('makeatoon-sfx-volume', 1) + self.musicVolume = config.GetFloat('makeatoon-music-volume', 1) + self.sfxVolume = config.GetFloat('makeatoon-sfx-volume', 1) self.soundBack = base.loadSfx('phase_3/audio/sfx/GUI_create_toon_back.ogg') self.crashSounds = [] self.crashSounds.append(base.loadSfx('phase_3/audio/sfx/tt_s_ara_mat_crash_boing.ogg')) @@ -598,7 +598,7 @@ class MakeAToon(StateData.StateData): self.ns.rejectName(TTLocalizer.RejectNameText) def __handleNameShopDone(self): - if base.config.GetBool('want-qa-regression', 0): + if config.GetBool('want-qa-regression', 0): self.notify.info('QA-REGRESSION: MAKEATOON: Creating A Toon') self.guiLastButton.hide() self.guiCheckButton.hide() diff --git a/toontown/makeatoon/NameShop.py b/toontown/makeatoon/NameShop.py index 891d24ef..9b797b12 100644 --- a/toontown/makeatoon/NameShop.py +++ b/toontown/makeatoon/NameShop.py @@ -1023,12 +1023,12 @@ class NameShop(StateData.StateData): def __openTutorialDialog(self, choice = 0): if choice == 1: self.notify.debug('enterTutorial') - if base.config.GetBool('want-qa-regression', 0): + if config.GetBool('want-qa-regression', 0): self.notify.info('QA-REGRESSION: ENTERTUTORIAL: Enter Tutorial') self.__createAvatar() else: self.notify.debug('skipTutorial') - if base.config.GetBool('want-qa-regression', 0): + if config.GetBool('want-qa-regression', 0): self.notify.info('QA-REGRESSION: SKIPTUTORIAL: Skip Tutorial') self.__handleSkipTutorial() self.promptTutorialDialog.destroy() diff --git a/toontown/minigame/DistributedCannonGame.py b/toontown/minigame/DistributedCannonGame.py index 539b153a..c1a55f09 100644 --- a/toontown/minigame/DistributedCannonGame.py +++ b/toontown/minigame/DistributedCannonGame.py @@ -364,7 +364,7 @@ class DistributedCannonGame(DistributedMinigame): DistributedMinigame.setGameStart(self, timestamp) self.__stopIntro() self.__putCameraBehindCannon() - if not base.config.GetBool('endless-cannon-game', 0): + if not config.GetBool('endless-cannon-game', 0): self.timer.show() self.timer.countdown(CannonGameGlobals.GameTime, self.__gameTimerExpired) self.rewardPanel.reparentTo(base.a2dTopRight) diff --git a/toontown/minigame/DistributedCatchGame.py b/toontown/minigame/DistributedCatchGame.py index 69fd06d6..f53b1cef 100644 --- a/toontown/minigame/DistributedCatchGame.py +++ b/toontown/minigame/DistributedCatchGame.py @@ -634,7 +634,7 @@ class DistributedCatchGame(DistributedMinigame): self.timer.hide() #For the Alpha Blueprint ARG - if base.config.GetBool('want-blueprint4-ARG', False): + if config.GetBool('want-blueprint4-ARG', False): MinigameGlobals.generateDebugARGPhrase() if self.fruitsCaught >= self.numFruits: diff --git a/toontown/minigame/DistributedCogThiefGame.py b/toontown/minigame/DistributedCogThiefGame.py index ab250d51..ddf3bfec 100644 --- a/toontown/minigame/DistributedCogThiefGame.py +++ b/toontown/minigame/DistributedCogThiefGame.py @@ -43,7 +43,7 @@ class DistributedCogThiefGame(DistributedMinigame): self.cogInfo = {} self.lastTimeControlPressed = 0 self.stolenBarrels = [] - self.useOrthoWalk = base.config.GetBool('cog-thief-ortho', 0) + self.useOrthoWalk = config.GetBool('cog-thief-ortho', 0) self.resultIval = None self.gameIsEnding = False self.__textGen = TextNode('cogThiefGame') @@ -250,7 +250,7 @@ class DistributedCogThiefGame(DistributedMinigame): return self.notify.debug('setGameStart') DistributedMinigame.setGameStart(self, timestamp) - if not base.config.GetBool('cog-thief-endless', 0): + if not config.GetBool('cog-thief-endless', 0): self.timer.show() self.timer.countdown(CTGG.GameTime, self.__gameTimerExpired) self.clockStopTime = None @@ -321,7 +321,7 @@ class DistributedCogThiefGame(DistributedMinigame): camera.reparentTo(render) p = self.cameraTopView camera.setPosHpr(p[0], p[1], p[2], p[3], p[4], p[5]) - camera.setZ(camera.getZ() + base.config.GetFloat('cog-thief-z-camera-adjust', 0.0)) + camera.setZ(camera.getZ() + config.GetFloat('cog-thief-z-camera-adjust', 0.0)) def destroyGameWalk(self): self.notify.debug('destroyOrthoWalk') @@ -766,8 +766,8 @@ class DistributedCogThiefGame(DistributedMinigame): self.stolenBarrels.append(barrelIndex) barrel = self.barrels[barrelIndex] barrel.hide() - if base.config.GetBool('cog-thief-check-barrels', 1): - if not base.config.GetBool('cog-thief-endless', 0): + if config.GetBool('cog-thief-check-barrels', 1): + if not config.GetBool('cog-thief-endless', 0): if len(self.stolenBarrels) == len(self.barrels): localStamp = globalClockDelta.networkToLocalTime(timestamp, bits=32) gameTime = self.local2GameTime(localStamp) @@ -838,7 +838,7 @@ class DistributedCogThiefGame(DistributedMinigame): return False def getNumCogs(self): - result = base.config.GetInt('cog-thief-num-cogs', 0) + result = config.GetInt('cog-thief-num-cogs', 0) if not result: safezone = self.getSafezoneId() result = CTGG.calculateCogs(self.numPlayers, safezone) @@ -899,7 +899,7 @@ class DistributedCogThiefGame(DistributedMinigame): self.resultIval = Parallel(textTrack, soundTrack) self.resultIval.start() #For the Alpha Blueprint ARG - if base.config.GetBool('want-blueprint4-ARG', False): + if config.GetBool('want-blueprint4-ARG', False): MinigameGlobals.generateDebugARGPhrase() def __genText(self, text): diff --git a/toontown/minigame/DistributedMazeGame.py b/toontown/minigame/DistributedMazeGame.py index 844240c9..8e76f72f 100644 --- a/toontown/minigame/DistributedMazeGame.py +++ b/toontown/minigame/DistributedMazeGame.py @@ -1095,7 +1095,7 @@ class DistributedMazeGame(DistributedMinigame): self.showScoreTrack.start() #For the Alpha Blueprint ARG - if base.config.GetBool('want-blueprint4-ARG', False): + if config.GetBool('want-blueprint4-ARG', False): MinigameGlobals.generateDebugARGPhrase() def exitShowScores(self): diff --git a/toontown/minigame/DistributedPhotoGame.py b/toontown/minigame/DistributedPhotoGame.py index b1a345cf..b68993c6 100644 --- a/toontown/minigame/DistributedPhotoGame.py +++ b/toontown/minigame/DistributedPhotoGame.py @@ -891,7 +891,7 @@ class DistributedPhotoGame(DistributedMinigame, PhotoGameBase.PhotoGameBase): DistributedMinigame.setGameStart(self, timestamp) self.__stopIntro() self.__putCameraOnTripod() - if not base.config.GetBool('endless-cannon-game', 0): + if not config.GetBool('endless-cannon-game', 0): self.timer.show() self.timer.countdown(self.data['TIME'], self.__gameTimerExpired) self.filmPanel.reparentTo(base.a2dTopRight) diff --git a/toontown/minigame/DistributedTugOfWarGame.py b/toontown/minigame/DistributedTugOfWarGame.py index e161c06f..2db10580 100644 --- a/toontown/minigame/DistributedTugOfWarGame.py +++ b/toontown/minigame/DistributedTugOfWarGame.py @@ -944,7 +944,7 @@ class DistributedTugOfWarGame(DistributedMinigame): return if self.suit: #For the Alpha Blueprint ARG - if base.config.GetBool('want-blueprint4-ARG', False): + if config.GetBool('want-blueprint4-ARG', False): MinigameGlobals.generateDebugARGPhrase() if self.suitId in winners: newPos = VBase3(2.65, 18, 0.1) diff --git a/toontown/minigame/DistributedTwoDGame.py b/toontown/minigame/DistributedTwoDGame.py index 3e584829..9e3d8be4 100644 --- a/toontown/minigame/DistributedTwoDGame.py +++ b/toontown/minigame/DistributedTwoDGame.py @@ -243,7 +243,7 @@ class DistributedTwoDGame(DistributedMinigame): self.showScoreTrack.start() #For the Alpha Blueprint ARG - if base.config.GetBool('want-blueprint4-ARG', False): + if config.GetBool('want-blueprint4-ARG', False): MinigameGlobals.generateDebugARGPhrase() def exitShowScores(self): diff --git a/toontown/parties/CalendarGuiDay.py b/toontown/parties/CalendarGuiDay.py index 71d84acd..c97c4066 100644 --- a/toontown/parties/CalendarGuiDay.py +++ b/toontown/parties/CalendarGuiDay.py @@ -34,7 +34,7 @@ class CalendarGuiDay(DirectFrame): self.partiesInvitedToToday = [] self.hostedPartiesToday = [] self.yearlyHolidaysToday = [] - self.showMarkers = base.config.GetBool('show-calendar-markers', 0) + self.showMarkers = config.GetBool('show-calendar-markers', 0) self.filter = ToontownGlobals.CalendarFilterShowAll self.load() self.createGuiObjects() @@ -181,7 +181,7 @@ class CalendarGuiDay(DirectFrame): self.addTitleAndDescToScrollList(holidayName, holidayDesc) self.scrollList.refresh() - if base.config.GetBool('calendar-test-items', 0): + if config.GetBool('calendar-test-items', 0): if self.myDate.date() + datetime.timedelta(days=-1) == base.cr.toontownTimeManager.getCurServerDateTime().date(): testItems = ('1:00 AM Party', '2:00 AM CEO', '11:15 AM Party', '5:30 PM CJ', '11:00 PM Party', 'Really Really Long String') for text in testItems: diff --git a/toontown/parties/CalendarGuiMonth.py b/toontown/parties/CalendarGuiMonth.py index 8aec1f02..6dcab701 100644 --- a/toontown/parties/CalendarGuiMonth.py +++ b/toontown/parties/CalendarGuiMonth.py @@ -18,7 +18,7 @@ class CalendarGuiMonth(DirectFrame): if self.onlyFutureDaysClickable: self.onlyFutureMonthsClickable = True DirectFrame.__init__(self, parent=parent, scale=scale, pos=pos) - self.showMarkers = base.config.GetBool('show-calendar-markers', 0) + self.showMarkers = config.GetBool('show-calendar-markers', 0) self.load() self.createGuiObjects() self.lastSelectedDate = None diff --git a/toontown/parties/DistributedPartyTeamActivity.py b/toontown/parties/DistributedPartyTeamActivity.py index 38fa5e84..b18a6e8f 100644 --- a/toontown/parties/DistributedPartyTeamActivity.py +++ b/toontown/parties/DistributedPartyTeamActivity.py @@ -19,7 +19,7 @@ class DistributedPartyTeamActivity(DistributedPartyActivity): self._maxPlayersPerTeam = 0 self._minPlayersPerTeam = 0 self._duration = 0 - self._startDelay = base.config.GetFloat('party-team-activity-start-delay', startDelay) + self._startDelay = config.GetFloat('party-team-activity-start-delay', startDelay) self._willBalanceTeams = balanceTeams self._currentStatus = '' return diff --git a/toontown/parties/Party.py b/toontown/parties/Party.py index b8441ef6..de3398bf 100644 --- a/toontown/parties/Party.py +++ b/toontown/parties/Party.py @@ -276,7 +276,7 @@ class Party(Place.Place): if self.isPartyEnding: teleportNotify.debug('party ending, sending teleportResponse') fromAvatar.d_teleportResponse(toAvatar.doId, 0, toAvatar.defaultShard, base.cr.playGame.getPlaceId(), self.getZoneId()) - elif base.config.GetBool('want-tptrack', False): + elif config.GetBool('want-tptrack', False): if toAvatar == localAvatar: localAvatar.doTeleportResponse(fromAvatar, toAvatar, toAvatar.doId, 1, toAvatar.defaultShard, base.cr.playGame.getPlaceId(), self.getZoneId(), fromAvatar.doId) else: diff --git a/toontown/parties/PartyPlanner.py b/toontown/parties/PartyPlanner.py index 0ba9da49..f68f9804 100644 --- a/toontown/parties/PartyPlanner.py +++ b/toontown/parties/PartyPlanner.py @@ -59,7 +59,7 @@ class PartyPlanner(DirectFrame, FSM): 'minute': (15, -15), 'ampm': (1, -1)} self.partyInfo = None - self.asapMinuteRounding = base.config.GetInt('party-asap-minute-rounding', PartyGlobals.PartyPlannerAsapMinuteRounding) + self.asapMinuteRounding = config.GetInt('party-asap-minute-rounding', PartyGlobals.PartyPlannerAsapMinuteRounding) self.load() self.request('Welcome') return diff --git a/toontown/pets/Pet.py b/toontown/pets/Pet.py index 25b4fa51..b78a01ef 100644 --- a/toontown/pets/Pet.py +++ b/toontown/pets/Pet.py @@ -321,7 +321,7 @@ class Pet(Avatar.Avatar): def speakMood(self, mood): if self.moodModel: self.moodModel.hide() - if base.config.GetBool('want-speech-bubble', 1): + if config.GetBool('want-speech-bubble', 1): self.nametag.setChat(random.choice(TTLocalizer.SpokenMoods[mood]), CFSpeech) else: self.nametag.setChat(random.choice(TTLocalizer.SpokenMoods[mood]), CFThought) diff --git a/toontown/pets/PetAvatarPanel.py b/toontown/pets/PetAvatarPanel.py index 9d70bda6..87722101 100644 --- a/toontown/pets/PetAvatarPanel.py +++ b/toontown/pets/PetAvatarPanel.py @@ -218,7 +218,7 @@ class PetAvatarPanel(AvatarPanel.AvatarPanel): return def __handleCall(self): - if base.config.GetBool('want-qa-regression', 0): + if config.GetBool('want-qa-regression', 0): self.notify.info('QA-REGRESSION: PET: Call') self.notify.debug('__handleCall(): doId=%s' % self.avatar.doId) base.localAvatar.b_setPetMovie(self.avId, PetConstants.PET_MOVIE_CALL) @@ -230,7 +230,7 @@ class PetAvatarPanel(AvatarPanel.AvatarPanel): return def __handleFeed(self): - if base.config.GetBool('want-qa-regression', 0): + if config.GetBool('want-qa-regression', 0): self.notify.info('QA-REGRESSION: PET: Feed') self.notify.debug('__handleFeed(): doId=%s' % self.avatar.doId) base.localAvatar.b_setPetMovie(self.avId, PetConstants.PET_MOVIE_FEED) @@ -242,7 +242,7 @@ class PetAvatarPanel(AvatarPanel.AvatarPanel): return def __handleScratch(self): - if base.config.GetBool('want-qa-regression', 1): + if config.GetBool('want-qa-regression', 1): self.notify.info('QA-REGRESSION: PET: Scratch') self.notify.debug('__handleScratch(): doId=%s' % self.avatar.doId) base.localAvatar.b_setPetMovie(self.avId, PetConstants.PET_MOVIE_SCRATCH) diff --git a/toontown/quest/QuestChoiceGui.py b/toontown/quest/QuestChoiceGui.py index 35567e37..465c4c29 100644 --- a/toontown/quest/QuestChoiceGui.py +++ b/toontown/quest/QuestChoiceGui.py @@ -54,7 +54,7 @@ class QuestChoiceGui(DirectFrame): def chooseQuest(self, questId): if questId != 0: - if base.config.GetBool('want-qa-regression', 0): + if config.GetBool('want-qa-regression', 0): self.notify.info('QA-REGRESSION: CREATEATASK: Create A Task.') base.setCellsAvailable(base.leftCells, 1) base.setCellsAvailable([base.bottomCells[0], base.bottomCells[1]], 1) diff --git a/toontown/quest/QuestMap.py b/toontown/quest/QuestMap.py index ff80033a..f3b0b0fa 100644 --- a/toontown/quest/QuestMap.py +++ b/toontown/quest/QuestMap.py @@ -31,7 +31,7 @@ class QuestMap(DirectFrame): self.buildingMarkers = [] self.av = av self.wantToggle = False - if base.config.GetBool('want-toggle-quest-map', True): + if config.GetBool('want-toggle-quest-map', True): self.wantToggle = True self.updateMarker = True self.cornerPosInfo = None diff --git a/toontown/quest/QuestParser.py b/toontown/quest/QuestParser.py index 581539c8..b5812995 100644 --- a/toontown/quest/QuestParser.py +++ b/toontown/quest/QuestParser.py @@ -497,7 +497,7 @@ class NPCMoviePlayer(DirectObject.DirectObject): token, varName, fileName = line if varName == 'tomDialogue_01': notify.debug('VarName tomDialogue getting added. Tutorial Ack: %d' % base.localAvatar.tutorialAck) - if base.config.GetString('language', 'english') == 'japanese': + if config.GetString('language', 'english') == 'japanese': dialogue = base.loadSfx(fileName) else: dialogue = None @@ -511,7 +511,7 @@ class NPCMoviePlayer(DirectObject.DirectObject): else: classicChar = 'minnie' filename = filenameTemplate % classicChar - if base.config.GetString('language', 'english') == 'japanese': + if config.GetString('language', 'english') == 'japanese': dialogue = base.loadSfx(filename) else: dialogue = None @@ -1060,7 +1060,7 @@ class NPCMoviePlayer(DirectObject.DirectObject): return Sequence(Func(grabCurTrackAccess), LerpFunctionInterval(updateGagLevel, fromData=1, toData=7, duration=0.3), WaitInterval(3.5), LerpFunctionInterval(updateGagLevel, fromData=7, toData=1, duration=0.3), Func(restoreTrackAccess), Func(messenger.send, 'doneThrowSquirtPreview')) def parseSetMusicVolume(self, line): - if base.config.GetString('language', 'english') == 'japanese': + if config.GetString('language', 'english') == 'japanese': try: loader = base.cr.playGame.place.loader type = 'music' diff --git a/toontown/racing/DistributedStartingBlock.py b/toontown/racing/DistributedStartingBlock.py index 3bb5fb49..500c7b71 100644 --- a/toontown/racing/DistributedStartingBlock.py +++ b/toontown/racing/DistributedStartingBlock.py @@ -118,7 +118,7 @@ class DistributedStartingBlock(DistributedObject.DistributedObject, FSM): self.setPad(self.cr.doId2do[padDoId]) else: self.acceptOnce('generate-%d' % padDoId, self.setPad) - + def setPad(self, pad): self.kartPad = pad self.kartPad.addStartingBlock(self) @@ -494,7 +494,7 @@ class DistributedStartingBlock(DistributedObject.DistributedObject, FSM): def enterEnterMovie(self): self.notify.debug('%d enterEnterMovie: Entering the Enter Movie State.' % self.doId) - if base.config.GetBool('want-qa-regression', 0): + if config.GetBool('want-qa-regression', 0): raceName = TTLocalizer.KartRace_RaceNames[self.kartPad.trackType] self.notify.info('QA-REGRESSION: KARTING: %s' % raceName) toonTrack = self.generateToonMoveTrack() @@ -675,7 +675,7 @@ class DistributedViewingBlock(DistributedStartingBlock): def enterEnterMovie(self): self.notify.debug('%d enterEnterMovie: Entering the Enter Movie State.' % self.doId) - if base.config.GetBool('want-qa-regression', 0): + if config.GetBool('want-qa-regression', 0): raceName = TTLocalizer.KartRace_RaceNames[self.kartPad.trackType] self.notify.info('QA-REGRESSION: KARTING: %s' % raceName) pos = self.nodePath.getPos(render) diff --git a/toontown/racing/DistributedVehicle.py b/toontown/racing/DistributedVehicle.py index a1d8e770..e710ea1c 100644 --- a/toontown/racing/DistributedVehicle.py +++ b/toontown/racing/DistributedVehicle.py @@ -83,7 +83,7 @@ class DistributedVehicle(DistributedSmoothNode.DistributedSmoothNode, Kart.Kart, DistributedSmoothNode.DistributedSmoothNode.__init__(self, cr) FSM.FSM.__init__(self, 'DistributedVehicle') Kart.Kart.__init__(self) - if base.config.GetBool('want-racer', 0) == 1: + if config.GetBool('want-racer', 0) == 1: DistributedVehicle.proRacer = 1 DistributedVehicle.accelerationMult = 35 DistributedVehicle.accelerationBase = 30 diff --git a/toontown/racing/Kart.py b/toontown/racing/Kart.py index 87acdbd6..f76c4191 100644 --- a/toontown/racing/Kart.py +++ b/toontown/racing/Kart.py @@ -60,13 +60,13 @@ class Kart(NodePath, ShadowCaster.ShadowCaster): self.pitchNode = {} self.toonNode = {} self.rotateNode = self.attachNewNode('rotate') - levelIn = [base.config.GetInt('lod1-in', 30), base.config.GetInt('lod2-in', 80), base.config.GetInt('lod2-in', 200)] - levelOut = [base.config.GetInt('lod1-out', 0), base.config.GetInt('lod2-out', 30), base.config.GetInt('lod2-out', 80)] + levelIn = [config.GetInt('lod1-in', 30), config.GetInt('lod2-in', 80), config.GetInt('lod2-in', 200)] + levelOut = [config.GetInt('lod1-out', 0), config.GetInt('lod2-out', 30), config.GetInt('lod2-out', 80)] lodRequired = 3 if forGui: lodRequired = 1 - levelIn[0] = base.config.GetInt('lod1-in', 2500) - levelIn[1] = base.config.GetInt('lod1-out', 0) + levelIn[0] = config.GetInt('lod1-in', 2500) + levelIn[1] = config.GetInt('lod1-out', 0) self.toonSeat = NodePath('toonSeat') for level in range(lodRequired): self.__createLODKart(level) diff --git a/toontown/safezone/DDPlayground.py b/toontown/safezone/DDPlayground.py index dbba7711..b0008fc0 100644 --- a/toontown/safezone/DDPlayground.py +++ b/toontown/safezone/DDPlayground.py @@ -92,7 +92,7 @@ class DDPlayground(Playground.Playground): if self.toonSubmerged == 1: return base.playSfx(self.loader.submergeSound) - if base.config.GetBool('disable-flying-glitch') == 0: + if config.GetBool('disable-flying-glitch') == 0: self.fsm.request('walk') self.walkStateData.fsm.request('swimming', [self.loader.swimSound]) pos = base.localAvatar.getPos(render) diff --git a/toontown/safezone/DistributedFishingSpot.py b/toontown/safezone/DistributedFishingSpot.py index 4ef459e1..39cdce09 100644 --- a/toontown/safezone/DistributedFishingSpot.py +++ b/toontown/safezone/DistributedFishingSpot.py @@ -593,7 +593,7 @@ class DistributedFishingSpot(DistributedObject.DistributedObject): self.itemGui.detachNode() def __makeGui(self): - if base.config.GetBool('want-qa-regression', 0): + if config.GetBool('want-qa-regression', 0): self.notify.info('QA-REGRESSION: FISHING: ZoneId: %s' % self.pond.getArea()) if self.madeGui: return diff --git a/toontown/safezone/DistributedGolfKart.py b/toontown/safezone/DistributedGolfKart.py index e18c0777..8d846123 100644 --- a/toontown/safezone/DistributedGolfKart.py +++ b/toontown/safezone/DistributedGolfKart.py @@ -31,7 +31,7 @@ class DistributedGolfKart(DistributedObject.DistributedObject): def __init__(self, cr): DistributedObject.DistributedObject.__init__(self, cr) self.localToonOnBoard = 0 - self.trolleyCountdownTime = base.config.GetFloat('trolley-countdown-time', TROLLEY_COUNTDOWN_TIME) + self.trolleyCountdownTime = config.GetFloat('trolley-countdown-time', TROLLEY_COUNTDOWN_TIME) self.fsm = ClassicFSM.ClassicFSM('DistributedTrolley', [State.State('off', self.enterOff, self.exitOff, ['entering', 'waitEmpty', 'waitCountdown', diff --git a/toontown/safezone/DistributedPicnicBasket.py b/toontown/safezone/DistributedPicnicBasket.py index ae643f94..553604c4 100644 --- a/toontown/safezone/DistributedPicnicBasket.py +++ b/toontown/safezone/DistributedPicnicBasket.py @@ -26,7 +26,7 @@ class DistributedPicnicBasket(DistributedObject.DistributedObject): self.localToonOnBoard = 0 self.seed = 0 self.random = None - self.picnicCountdownTime = base.config.GetFloat('picnic-countdown-time', ToontownGlobals.PICNIC_COUNTDOWN_TIME) + self.picnicCountdownTime = config.GetFloat('picnic-countdown-time', ToontownGlobals.PICNIC_COUNTDOWN_TIME) self.picnicBasketTrack = None self.fsm = ClassicFSM.ClassicFSM('DistributedTrolley', [State.State('off', self.enterOff, self.exitOff, ['waitEmpty', 'waitCountdown']), State.State('waitEmpty', self.enterWaitEmpty, self.exitWaitEmpty, ['waitCountdown']), State.State('waitCountdown', self.enterWaitCountdown, self.exitWaitCountdown, ['waitEmpty'])], 'off', 'off') self.fsm.enterInitialState() diff --git a/toontown/safezone/DistributedTrolley.py b/toontown/safezone/DistributedTrolley.py index 93155bfb..03cf617a 100644 --- a/toontown/safezone/DistributedTrolley.py +++ b/toontown/safezone/DistributedTrolley.py @@ -21,7 +21,7 @@ class DistributedTrolley(DistributedObject.DistributedObject): def __init__(self, cr): DistributedObject.DistributedObject.__init__(self, cr) self.localToonOnBoard = 0 - self.trolleyCountdownTime = base.config.GetFloat('trolley-countdown-time', TROLLEY_COUNTDOWN_TIME) + self.trolleyCountdownTime = config.GetFloat('trolley-countdown-time', TROLLEY_COUNTDOWN_TIME) self.fsm = ClassicFSM.ClassicFSM('DistributedTrolley', [State.State('off', self.enterOff, self.exitOff, ['entering', 'waitEmpty', 'waitCountdown', @@ -177,13 +177,13 @@ class DistributedTrolley(DistributedObject.DistributedObject): place.fsm.request('walk') def handleEnterTrolleySphere(self, collEntry): - if base.config.GetBool('want-doomsday', False): + if config.GetBool('want-doomsday', False): base.localAvatar.disableAvatarControls() self.confirm = TTDialog.TTGlobalDialog(doneEvent='confirmDone', message=SafezoneInvasionGlobals.LeaveToontownCentralAlert, style=TTDialog.Acknowledge) self.confirm.show() self.accept('confirmDone', self.handleConfirm) return - + self.notify.debug('Entering Trolley Sphere....') if base.localAvatar.getPos(render).getZ() < self.trolleyCar.getPos(render).getZ(): return diff --git a/toontown/safezone/GSSafeZoneLoader.py b/toontown/safezone/GSSafeZoneLoader.py index 0dce4c3d..a36d2271 100644 --- a/toontown/safezone/GSSafeZoneLoader.py +++ b/toontown/safezone/GSSafeZoneLoader.py @@ -99,7 +99,7 @@ class GSSafeZoneLoader(SafeZoneLoader): return def startSmokeEffect(self): - if base.config.GetBool('want-crashedLeaderBoard-Smoke', 1): + if config.GetBool('want-crashedLeaderBoard-Smoke', 1): leaderBoard = self.geom.find('**/*crashed*') locator = leaderBoard.find('**/*locator_smoke*') if locator != None: @@ -108,7 +108,7 @@ class GSSafeZoneLoader(SafeZoneLoader): return def stopSmokeEffect(self): - if base.config.GetBool('want-crashedLeaderBoard-Smoke', 1): + if config.GetBool('want-crashedLeaderBoard-Smoke', 1): if self.smoke != None: self.smoke.stop() self.smoke.destroy() diff --git a/toontown/safezone/GameMenu.py b/toontown/safezone/GameMenu.py index bedbe38c..0341a27b 100644 --- a/toontown/safezone/GameMenu.py +++ b/toontown/safezone/GameMenu.py @@ -63,13 +63,13 @@ class GameMenu(DirectFrame): relief=0, pos=(-0.8, 0, -0.7), command=self.findFourSelected) - if not base.config.GetBool('want-chinese', 0): + if not config.GetBool('want-chinese', 0): self.ChineseCheckers['command'] = self.doNothing self.ChineseCheckers.setColor(0.7, 0.7, 0.7, 0.7) - if not base.config.GetBool('want-checkers', 0): + if not config.GetBool('want-checkers', 0): self.Checkers['command'] = self.doNothing self.Checkers.setColor(0.7, 0.7, 0.7, 0.7) - if not base.config.GetBool('want-findfour', 0): + if not config.GetBool('want-findfour', 0): self.FindFour['command'] = self.doNothing self.FindFour.setColor(0.7, 0.7, 0.7, 0.7) self.chineseText = OnscreenText( diff --git a/toontown/safezone/OZPlayground.py b/toontown/safezone/OZPlayground.py index 1166e42b..38e04967 100644 --- a/toontown/safezone/OZPlayground.py +++ b/toontown/safezone/OZPlayground.py @@ -92,7 +92,7 @@ class OZPlayground(Playground.Playground): if self.toonSubmerged == 1: return base.playSfx(self.loader.submergeSound) - if base.config.GetBool('disable-flying-glitch') == 0: + if config.GetBool('disable-flying-glitch') == 0: self.fsm.request('walk') self.walkStateData.fsm.request('swimming', [self.loader.swimSound]) pos = base.localAvatar.getPos(render) diff --git a/toontown/safezone/TTPlayground.py b/toontown/safezone/TTPlayground.py index 7c55aecf..20590a5f 100644 --- a/toontown/safezone/TTPlayground.py +++ b/toontown/safezone/TTPlayground.py @@ -34,7 +34,7 @@ class TTPlayground(Playground.Playground): return Task.done def doRequestLeave(self, requestStatus): - if base.config.GetBool('want-doomsday', False): + if config.GetBool('want-doomsday', False): base.localAvatar.disableAvatarControls() self.confirm = TTDialog.TTGlobalDialog(doneEvent='confirmDone', message=SafezoneInvasionGlobals.LeaveToontownCentralAlert, style=TTDialog.Acknowledge) self.confirm.show() diff --git a/toontown/shtiker/DirectNewsFrame.py b/toontown/shtiker/DirectNewsFrame.py index 612c246c..1e059b8e 100644 --- a/toontown/shtiker/DirectNewsFrame.py +++ b/toontown/shtiker/DirectNewsFrame.py @@ -369,8 +369,8 @@ class DirectNewsFrame(DirectObject.DirectObject): self.redownloadNews() def getInGameNewsUrl(self): - result = base.config.GetString('fallback-news-url', 'http://cdn.toontown.disney.go.com/toontown/en/gamenews/') - override = base.config.GetString('in-game-news-url', '') + result = config.GetString('fallback-news-url', 'http://cdn.toontown.disney.go.com/toontown/en/gamenews/') + override = config.GetString('in-game-news-url', '') if override: self.notify.info('got an override url, using %s for in game news' % override) result = override diff --git a/toontown/shtiker/EventsPage.py b/toontown/shtiker/EventsPage.py index 25af19d5..a1672918 100644 --- a/toontown/shtiker/EventsPage.py +++ b/toontown/shtiker/EventsPage.py @@ -22,11 +22,11 @@ EventsPage_News = 3 class EventsPage(ShtikerPage.ShtikerPage): notify = DirectNotifyGlobal.directNotify.newCategory('EventsPage') - UseNewsTab = base.config.GetBool('want-news-tab', 0) + UseNewsTab = config.GetBool('want-news-tab', 0) DefaultNewsUrl = '/news/news_urls.txt' - NewsUrl = base.config.GetString('news-url', DefaultNewsUrl) + NewsUrl = config.GetString('news-url', DefaultNewsUrl) DownloadArticlesTaskName = 'downloadArticlesTask' - NonblockingDownload = base.config.GetBool('news-nonblocking', 1) + NonblockingDownload = config.GetBool('news-nonblocking', 1) def __init__(self): ShtikerPage.ShtikerPage.__init__(self) diff --git a/toontown/shtiker/HtmlView.py b/toontown/shtiker/HtmlView.py index ab300f6e..d83ba5ed 100644 --- a/toontown/shtiker/HtmlView.py +++ b/toontown/shtiker/HtmlView.py @@ -24,7 +24,7 @@ GlobalWebcore = None class HtmlView(DirectObject): notify = DirectNotifyGlobal.directNotify.newCategory('HtmlView') - useHalfTexture = base.config.GetBool('news-half-texture', 0) + useHalfTexture = config.GetBool('news-half-texture', 0) def __init__(self, parent = aspect2d): global GlobalWebcore @@ -75,8 +75,8 @@ class HtmlView(DirectObject): self.accept('mouse3-up', self.mouseUp, [AwWebView.RIGHTMOUSEBTN]) def getInGameNewsUrl(self): - result = base.config.GetString('fallback-news-url', 'http://cdn.toontown.disney.go.com/toontown/en/gamenews/') - override = base.config.GetString('in-game-news-url', '') + result = config.GetString('fallback-news-url', 'http://cdn.toontown.disney.go.com/toontown/en/gamenews/') + override = config.GetString('in-game-news-url', '') if override: self.notify.info('got an override url, using %s for in a game news' % override) result = override diff --git a/toontown/shtiker/IssueFrame.py b/toontown/shtiker/IssueFrame.py index 1e80b3dc..4094723f 100644 --- a/toontown/shtiker/IssueFrame.py +++ b/toontown/shtiker/IssueFrame.py @@ -323,7 +323,7 @@ class IssueFrame(DirectFrame): return def gotoPage(self, section, subsection): - if base.config.GetBool('want-qa-regression', 0): + if config.GetBool('want-qa-regression', 0): self.notify.info('QA-REGRESSION: INGAMENEWS: Goto Page') self.sectionFrames[self.curSection][self.curSubsection].hide() self.sectionFrames[section][subsection].show() @@ -386,6 +386,6 @@ class IssueFrame(DirectFrame): pass def changeWeek(self, newIssueWeek): - if base.config.GetBool('want-qa-regression', 0): + if config.GetBool('want-qa-regression', 0): self.notify.info('QA-REGRESSION: INGAMENEWS: Change Week') messenger.send('newsChangeWeek', [newIssueWeek]) diff --git a/toontown/shtiker/MapPage.py b/toontown/shtiker/MapPage.py index 3426db8e..7014c0a7 100644 --- a/toontown/shtiker/MapPage.py +++ b/toontown/shtiker/MapPage.py @@ -224,20 +224,20 @@ class MapPage(ShtikerPage.ShtikerPage): messenger.send(self.doneEvent) def goHome(self): - if base.config.GetBool('want-doomsday', False): + if config.GetBool('want-doomsday', False): self.confirm = TTDialog.TTGlobalDialog(doneEvent='confirmDone', message=SafezoneInvasionGlobals.LeaveToontownCentralAlert, style=TTDialog.Acknowledge) self.confirm.show() self.accept('confirmDone', self.handleConfirm) return - - if base.config.GetBool('want-qa-regression', 0): + + if config.GetBool('want-qa-regression', 0): self.notify.info('QA-REGRESSION: VISITESTATE: Visit estate') self.doneStatus = {'mode': 'gohome', 'hood': base.localAvatar.lastHood} messenger.send(self.doneEvent) def __buttonCallback(self, hood): - if base.config.GetBool('want-doomsday', False): + if config.GetBool('want-doomsday', False): self.confirm = TTDialog.TTGlobalDialog(doneEvent='confirmDone', message=SafezoneInvasionGlobals.LeaveToontownCentralAlert, style=TTDialog.Acknowledge) self.confirm.show() self.accept('confirmDone', self.handleConfirm) diff --git a/toontown/shtiker/OptionsPage.py b/toontown/shtiker/OptionsPage.py index 69dc9940..b1eadb6c 100644 --- a/toontown/shtiker/OptionsPage.py +++ b/toontown/shtiker/OptionsPage.py @@ -148,8 +148,8 @@ class OptionsTabPage(DirectFrame): notify = DirectNotifyGlobal.directNotify.newCategory('OptionsTabPage') DisplaySettingsTaskName = 'save-display-settings' DisplaySettingsDelay = 60 - ChangeDisplaySettings = base.config.GetBool('change-display-settings', 1) - ChangeDisplayAPI = base.config.GetBool('change-display-api', 0) + ChangeDisplaySettings = config.GetBool('change-display-settings', 1) + ChangeDisplayAPI = config.GetBool('change-display-api', 0) def __init__(self, parent = aspect2d): self.parent = parent diff --git a/toontown/shtiker/ShtikerBook.py b/toontown/shtiker/ShtikerBook.py index 69889bb0..fcdb7cde 100644 --- a/toontown/shtiker/ShtikerBook.py +++ b/toontown/shtiker/ShtikerBook.py @@ -53,7 +53,7 @@ class ShtikerBook(DirectFrame, StateData.StateData): self.safeMode = setting def enter(self): - if base.config.GetBool('want-qa-regression', 0): + if config.GetBool('want-qa-regression', 0): self.notify.info('QA-REGRESSION: SHTICKERBOOK: Open') if self.entered: return @@ -115,7 +115,7 @@ class ShtikerBook(DirectFrame, StateData.StateData): self.ignore(ToontownGlobals.OptionsPageHotkey) self.ignore('arrow_right') self.ignore('arrow_left') - if base.config.GetBool('want-qa-regression', 0): + if config.GetBool('want-qa-regression', 0): self.notify.info('QA-REGRESSION: SHTICKERBOOK: Close') def load(self): @@ -194,7 +194,7 @@ class ShtikerBook(DirectFrame, StateData.StateData): messenger.send('wakeup') base.playSfx(self.pageSound) self.setPage(page) - if base.config.GetBool('want-qa-regression', 0): + if config.GetBool('want-qa-regression', 0): self.notify.info('QA-REGRESSION: SHTICKERBOOK: Browse tabs %s' % page.pageName) localAvatar.newsButtonMgr.setGoingToNewsPageFromStickerBook(False) localAvatar.newsButtonMgr.showAppropriateButton() @@ -434,7 +434,7 @@ class ShtikerBook(DirectFrame, StateData.StateData): localAvatar.newsButtonMgr.setGoingToNewsPageFromStickerBook(True) localAvatar.newsButtonMgr.showAppropriateButton() self.setPage(page) - if base.config.GetBool('want-qa-regression', 0): + if config.GetBool('want-qa-regression', 0): self.notify.info('QA-REGRESSION: SHTICKERBOOK: Browse tabs %s' % page.pageName) self.ignore(ToontownGlobals.StickerBookHotkey) self.ignore(ToontownGlobals.OptionsPageHotkey) diff --git a/toontown/suit/DistributedLawbotBoss.py b/toontown/suit/DistributedLawbotBoss.py index 63e17b0b..02e3f747 100644 --- a/toontown/suit/DistributedLawbotBoss.py +++ b/toontown/suit/DistributedLawbotBoss.py @@ -72,7 +72,7 @@ class DistributedLawbotBoss(DistributedBossCog.DistributedBossCog, FSM.FSM): self.reflectedMainDoor = None self.panFlashInterval = None self.panDamage = ToontownGlobals.LawbotBossDefensePanDamage - if base.config.GetBool('lawbot-boss-cheat', 0): + if config.GetBool('lawbot-boss-cheat', 0): self.panDamage = 25 self.evidenceHitSfx = None self.toonUpSfx = None @@ -484,7 +484,7 @@ class DistributedLawbotBoss(DistributedBossCog.DistributedBossCog, FSM.FSM): colNode.setName('WitnessStand') def loadScale(self): - self.useProgrammerScale = base.config.GetBool('want-injustice-scale-debug', 0) + self.useProgrammerScale = config.GetBool('want-injustice-scale-debug', 0) if self.useProgrammerScale: self.loadScaleOld() else: diff --git a/toontown/suit/DistributedSellbotBoss.py b/toontown/suit/DistributedSellbotBoss.py index 30710f19..df613039 100644 --- a/toontown/suit/DistributedSellbotBoss.py +++ b/toontown/suit/DistributedSellbotBoss.py @@ -1161,7 +1161,7 @@ class DistributedSellbotBoss(DistributedBossCog.DistributedBossCog, FSM.FSM): taskMgr.remove(self.uniqueName('PieAdvice')) def __pieSplat(self, toon, pieCode): - if base.config.GetBool('easy-vp', 0): + if config.GetBool('easy-vp', 0): if not self.dizzy: pieCode = ToontownGlobals.PieCodeBossInsides if pieCode == ToontownGlobals.PieCodeBossInsides: diff --git a/toontown/suit/DistributedSuitBase.py b/toontown/suit/DistributedSuitBase.py index a8617a17..e3cad86c 100644 --- a/toontown/suit/DistributedSuitBase.py +++ b/toontown/suit/DistributedSuitBase.py @@ -160,7 +160,7 @@ class DistributedSuitBase(DistributedAvatar.DistributedAvatar, Suit.Suit, SuitBa self.propInSound = base.loadSfx('phase_5/audio/sfx/ENC_propeller_in.ogg') if self.propOutSound == None: self.propOutSound = base.loadSfx('phase_5/audio/sfx/ENC_propeller_out.ogg') - if base.config.GetBool('want-new-cogs', 0): + if config.GetBool('want-new-cogs', 0): head = self.find('**/to_head') if head.isEmpty(): head = self.find('**/joint_head') diff --git a/toontown/suit/Suit.py b/toontown/suit/Suit.py index bad93bba..5f7e5262 100644 --- a/toontown/suit/Suit.py +++ b/toontown/suit/Suit.py @@ -154,7 +154,7 @@ bw = (('finger-wag', 'fingerwag', 5), ('magic1', 'magic1', 5), ('throw-object', 'throw-object', 5), ('throw-paper', 'throw-paper', 5)) -if not base.config.GetBool('want-new-cogs', 0): +if not config.GetBool('want-new-cogs', 0): ModelDict = {'a': ('/models/char/suitA-', 4), 'b': ('/models/char/suitB-', 4), 'c': ('/models/char/suitC-', 3.5)} @@ -190,12 +190,12 @@ def unloadSuits(level): def loadSuitModelsAndAnims(level, flag = 0): for key in ModelDict.keys(): model, phase = ModelDict[key] - if base.config.GetBool('want-new-cogs', 0): + if config.GetBool('want-new-cogs', 0): headModel, headPhase = HeadModelDict[key] else: headModel, headPhase = ModelDict[key] if flag: - if base.config.GetBool('want-new-cogs', 0): + if config.GetBool('want-new-cogs', 0): filepath = 'phase_3.5' + model + 'zero' if cogExists(model + 'zero'): loader.loadModelNode(filepath) @@ -203,7 +203,7 @@ def loadSuitModelsAndAnims(level, flag = 0): loader.loadModelNode('phase_3.5' + model + 'mod') loader.loadModelNode('phase_' + str(headPhase) + headModel + 'heads') else: - if base.config.GetBool('want-new-cogs', 0): + if config.GetBool('want-new-cogs', 0): filepath = 'phase_3.5' + model + 'zero' if cogExists(model + 'zero'): loader.unloadModel(filepath) @@ -625,7 +625,7 @@ class Suit(Avatar.Avatar): def generateBody(self): animDict = self.generateAnimDict() filePrefix, bodyPhase = ModelDict[self.style.body] - if base.config.GetBool('want-new-cogs', 0): + if config.GetBool('want-new-cogs', 0): if cogExists(filePrefix + 'zero'): self.loadModel('phase_3.5' + filePrefix + 'zero') else: @@ -651,7 +651,7 @@ class Suit(Avatar.Avatar): for anim in AllSuitsBattle: animDict[anim[0]] = 'phase_5' + filePrefix + anim[1] - if not base.config.GetBool('want-new-cogs', 0): + if not config.GetBool('want-new-cogs', 0): if self.style.body == 'a': animDict['neutral'] = 'phase_4/models/char/suitA-neutral' for anim in SuitsCEOBattle: @@ -708,7 +708,7 @@ class Suit(Avatar.Avatar): self.shadowJoint = self.find('**/joint_shadow') self.nametagJoint = self.find('**/joint_nameTag') - if base.config.GetBool('want-new-cogs', 0): + if config.GetBool('want-new-cogs', 0): if dept == 'c': texType = 'bossbot' elif dept == 'm': @@ -766,14 +766,14 @@ class Suit(Avatar.Avatar): modelRoot.find('**/hands').setTexture(handTex, 1) def generateHead(self, headType): - if base.config.GetBool('want-new-cogs', 0): + if config.GetBool('want-new-cogs', 0): filePrefix, phase = HeadModelDict[self.style.body] else: filePrefix, phase = ModelDict[self.style.body] headModel = loader.loadModel('phase_' + str(phase) + filePrefix + 'heads') headReferences = headModel.findAllMatches('**/' + headType) for i in range(0, headReferences.getNumPaths()): - if base.config.GetBool('want-new-cogs', 0): + if config.GetBool('want-new-cogs', 0): headPart = self.instance(headReferences.getPath(i), 'modelRoot', 'to_head') if not headPart: headPart = self.instance(headReferences.getPath(i), 'modelRoot', 'joint_head') @@ -813,7 +813,7 @@ class Suit(Avatar.Avatar): def generateCorporateMedallion(self): icons = loader.loadModel('phase_3/models/gui/cog_icons') dept = self.style.dept - if base.config.GetBool('want-new-cogs', 0): + if config.GetBool('want-new-cogs', 0): chestNull = self.find('**/def_joint_attachMeter') if chestNull.isEmpty(): chestNull = self.find('**/joint_attachMeter') @@ -838,7 +838,7 @@ class Suit(Avatar.Avatar): button.setScale(3.0) button.setH(180.0) button.setColor(self.healthColors[0]) - if base.config.GetBool('want-new-cogs', 0): + if config.GetBool('want-new-cogs', 0): chestNull = self.find('**/def_joint_attachMeter') if chestNull.isEmpty(): chestNull = self.find('**/joint_attachMeter') @@ -916,7 +916,7 @@ class Suit(Avatar.Avatar): return def getLoseActor(self): - if base.config.GetBool('want-new-cogs', 0): + if config.GetBool('want-new-cogs', 0): if self.find('**/body'): return self if self.loseActor == None: diff --git a/toontown/toon/DistributedNPCPetclerk.py b/toontown/toon/DistributedNPCPetclerk.py index fe263c6e..6bb944af 100644 --- a/toontown/toon/DistributedNPCPetclerk.py +++ b/toontown/toon/DistributedNPCPetclerk.py @@ -165,7 +165,7 @@ class DistributedNPCPetclerk(DistributedNPCToonBase): return def __handlePetAdopted(self, whichPet, nameIndex): - if base.config.GetBool('want-qa-regression', 0): + if config.GetBool('want-qa-regression', 0): self.notify.info('QA-REGRESSION: ADOPTADOOLE: Adopt a doodle.') base.cr.removePetFromFriendsMap() self.ignore(self.eventDict['petAdopted']) diff --git a/toontown/toon/DistributedToon.py b/toontown/toon/DistributedToon.py index c3b07555..bbe6546f 100644 --- a/toontown/toon/DistributedToon.py +++ b/toontown/toon/DistributedToon.py @@ -264,7 +264,7 @@ class DistributedToon(DistributedPlayer.DistributedPlayer, Toon.Toon, Distribute #if hasattr(base.cr, 'aprilToonsMgr'): #if self.isEventActive(AprilToonsGlobals.EventGlobalGravity): #self.startAprilToonsControls() - if base.config.GetBool('want-april-toons'): + if config.GetBool('want-april-toons'): self.startAprilToonsControls() def _handleClientCleanup(self): @@ -499,7 +499,7 @@ class DistributedToon(DistributedPlayer.DistributedPlayer, Toon.Toon, Distribute if fromAV in self.ignoreList: self.d_setWhisperIgnored(fromAV) return - if base.config.GetBool('want-sleep-reply-on-regular-chat', 0): + if config.GetBool('want-sleep-reply-on-regular-chat', 0): if base.localAvatar.sleepFlag == 1: self.sendUpdate('setSleepAutoReply', [base.localAvatar.doId], fromAV) newText, scrubbed = self.scrubTalk(chat, mods) @@ -524,7 +524,7 @@ class DistributedToon(DistributedPlayer.DistributedPlayer, Toon.Toon, Distribute if fromAV in self.ignoreList: self.d_setWhisperIgnored(fromAV) return - if base.config.GetBool('ignore-whispers', 0): + if config.GetBool('ignore-whispers', 0): return if base.localAvatar.sleepFlag == 1: if not base.cr.identifyAvatar(fromAV) == base.localAvatar: @@ -910,7 +910,7 @@ class DistributedToon(DistributedPlayer.DistributedPlayer, Toon.Toon, Distribute ts = 0.0 else: ts = globalClockDelta.localElapsedTime(timestamp) - if base.config.GetBool('check-invalid-anims', True): + if config.GetBool('check-invalid-anims', True): if animMultiplier > 1.0 and animName in ['neutral']: animMultiplier = 1.0 if self.animFSM.getStateNamed(animName): @@ -2194,7 +2194,7 @@ class DistributedToon(DistributedPlayer.DistributedPlayer, Toon.Toon, Distribute def setNametagStyle(self, nametagStyle): if hasattr(self, 'gmToonLockStyle') and self.gmToonLockStyle: return - if base.config.GetBool('want-nametag-avids', 0): + if config.GetBool('want-nametag-avids', 0): nametagStyle = 0 self.nametagStyle = nametagStyle self.setDisplayName(self.getName()) diff --git a/toontown/toon/InventoryNew.py b/toontown/toon/InventoryNew.py index 56bdc5cc..9cff9c10 100644 --- a/toontown/toon/InventoryNew.py +++ b/toontown/toon/InventoryNew.py @@ -47,7 +47,7 @@ class InventoryNew(InventoryBase.InventoryBase, DirectFrame): self.gagTutMode = 0 self.showSuperGags = ShowSuperGags self.clickSuperGags = 1 - self.propAndOrganicBonusStack = base.config.GetBool('prop-and-organic-bonus-stack', 0) + self.propAndOrganicBonusStack = config.GetBool('prop-and-organic-bonus-stack', 0) self.propBonusIval = Parallel() self.activateMode = 'book' self.load() diff --git a/toontown/toon/LocalToon.py b/toontown/toon/LocalToon.py index 4116d4c5..b6ece027 100644 --- a/toontown/toon/LocalToon.py +++ b/toontown/toon/LocalToon.py @@ -55,7 +55,7 @@ import Toon import LaffMeter from toontown.quest import QuestMap from toontown.toon.DistributedNPCToonBase import DistributedNPCToonBase -WantNewsPage = base.config.GetBool('want-news-page', ToontownGlobals.DefaultWantNewsPageSetting) +WantNewsPage = config.GetBool('want-news-page', ToontownGlobals.DefaultWantNewsPageSetting) from toontown.toontowngui import NewsPageButtonManager if WantNewsPage: from toontown.shtiker import NewsPage @@ -66,8 +66,8 @@ if (__debug__): class LocalToon(DistributedToon.DistributedToon, LocalAvatar.LocalAvatar): neverDisable = 1 - piePowerSpeed = base.config.GetDouble('pie-power-speed', 0.2) - piePowerExponent = base.config.GetDouble('pie-power-exponent', 0.75) + piePowerSpeed = config.GetDouble('pie-power-speed', 0.2) + piePowerExponent = config.GetDouble('pie-power-exponent', 0.75) def __init__(self, cr): try: @@ -124,9 +124,9 @@ class LocalToon(DistributedToon.DistributedToon, LocalAvatar.LocalAvatar): self.tossPieStart = None self.__presentingPie = 0 self.__pieSequence = 0 - self.wantBattles = base.config.GetBool('want-battles', 1) - self.seeGhosts = base.config.GetBool('see-ghosts', 0) - wantNameTagAvIds = base.config.GetBool('want-nametag-avids', 0) + self.wantBattles = config.GetBool('want-battles', 1) + self.seeGhosts = config.GetBool('see-ghosts', 0) + wantNameTagAvIds = config.GetBool('want-nametag-avids', 0) if wantNameTagAvIds: messenger.send('nameTagShowAvId', []) base.idTags = 1 @@ -137,7 +137,7 @@ class LocalToon(DistributedToon.DistributedToon, LocalAvatar.LocalAvatar): self.ticker = 0 self.glitchOkay = 1 self.tempGreySpacing = 0 - self.wantStatePrint = base.config.GetBool('want-statePrint', 0) + self.wantStatePrint = config.GetBool('want-statePrint', 0) self.__gardeningGui = None self.__gardeningGuiFake = None self.__shovelButton = None @@ -249,13 +249,13 @@ class LocalToon(DistributedToon.DistributedToon, LocalAvatar.LocalAvatar): if base.wantNametags: self.nametag.manage(base.marginManager) DistributedToon.DistributedToon.announceGenerate(self) - self.acceptingNewFriends = base.display.settings.getBool(str(self.getDoId()), 'accepting-new-friends', default=base.config.GetBool('accepting-new-friends-default', True)) - self.acceptingNonFriendWhispers = base.display.settings.getBool(str(self.getDoId()), 'accepting-non-friend-whispers', default=base.config.GetBool('accepting-non-friend-whispers-default', True)) + self.acceptingNewFriends = base.display.settings.getBool(str(self.getDoId()), 'accepting-new-friends', default=config.GetBool('accepting-new-friends-default', True)) + self.acceptingNonFriendWhispers = base.display.settings.getBool(str(self.getDoId()), 'accepting-non-friend-whispers', default=config.GetBool('accepting-non-friend-whispers-default', True)) from otp.friends import FriendInfo if self.adminAccess >= 300: self.seeGhosts = 1 - if base.config.GetBool('want-keep-alive', True): + if config.GetBool('want-keep-alive', True): taskMgr.doMethodLater(config.GetInt('keep-alive-delay', 30), self.keepAliveCheck, self.uniqueName('KeepAliveTimeout'), extraArgs=[]) def disable(self): @@ -491,11 +491,11 @@ class LocalToon(DistributedToon.DistributedToon, LocalAvatar.LocalAvatar): self.notify.debug('Setting GM State: %s in LocalToon' % state) DistributedToon.DistributedToon.setAsGM(self, state) if self.gmState: - if base.config.GetString('gm-nametag-string', '') != '': - self.gmNameTagString = base.config.GetString('gm-nametag-string') - if base.config.GetString('gm-nametag-color', '') != '': - self.gmNameTagColor = base.config.GetString('gm-nametag-color') - if base.config.GetInt('gm-nametag-enabled', 0): + if config.GetString('gm-nametag-string', '') != '': + self.gmNameTagString = config.GetString('gm-nametag-string') + if config.GetString('gm-nametag-color', '') != '': + self.gmNameTagColor = config.GetString('gm-nametag-color') + if config.GetInt('gm-nametag-enabled', 0): self.gmNameTagEnabled = 1 self.d_updateGMNameTag() @@ -1068,14 +1068,14 @@ class LocalToon(DistributedToon.DistributedToon, LocalAvatar.LocalAvatar): if self.__catalogNotifyDialog: self.__catalogNotifyDialog.cleanup() self.__catalogNotifyDialog = None - if base.config.GetBool('want-qa-regression', 0): + if config.GetBool('want-qa-regression', 0): self.notify.info('QA-REGRESSION: VISITESTATE: Visit estate') place.goHomeNow(self.lastHood) return def __startMoveFurniture(self): self.oldPos = self.getPos() - if base.config.GetBool('want-qa-regression', 0): + if config.GetBool('want-qa-regression', 0): self.notify.info('QA-REGRESSION: ESTATE: Furniture Placement') if self.cr.furnitureManager != None: self.cr.furnitureManager.d_suggestDirector(self.doId) @@ -1899,7 +1899,7 @@ class LocalToon(DistributedToon.DistributedToon, LocalAvatar.LocalAvatar): return self.lastTimeReadNews def cheatCogdoMazeGame(self, kindOfCheat = 0): - if base.config.GetBool('allow-cogdo-maze-suit-hit-cheat'): + if config.GetBool('allow-cogdo-maze-suit-hit-cheat'): maze = base.cr.doFind('DistCogdoMazeGame') if maze: if kindOfCheat == 0: @@ -1938,7 +1938,7 @@ class LocalToon(DistributedToon.DistributedToon, LocalAvatar.LocalAvatar): localAvatar.d_teleportResponse(avId, available, shardId, hoodId, zoneId, sendToId) def d_teleportResponse(self, avId, available, shardId, hoodId, zoneId, sendToId = None): - if base.config.GetBool('want-tptrack', False): + if config.GetBool('want-tptrack', False): if available == 1: self.notify.debug('sending teleportResponseToAI') self.sendUpdate('teleportResponseToAI', [avId, diff --git a/toontown/toon/TTEmote.py b/toontown/toon/TTEmote.py index c30bc93b..c87a891d 100644 --- a/toontown/toon/TTEmote.py +++ b/toontown/toon/TTEmote.py @@ -341,7 +341,7 @@ def stopSinginAnim(toon): def singNote1(toon, volume = 1): - if base.config.GetBool('want-octaves', True): + if config.GetBool('want-octaves', True): if toon.style.getTorsoSize() == 'short': return getSingingNote(toon, 'g1') elif toon.style.getTorsoSize() == 'medium': @@ -351,7 +351,7 @@ def singNote1(toon, volume = 1): def singNote2(toon, volume = 1): - if base.config.GetBool('want-octaves', True): + if config.GetBool('want-octaves', True): if toon.style.getTorsoSize() == 'short': return getSingingNote(toon, 'a1') elif toon.style.getTorsoSize() == 'medium': @@ -361,7 +361,7 @@ def singNote2(toon, volume = 1): def singNote3(toon, volume = 1): - if base.config.GetBool('want-octaves', True): + if config.GetBool('want-octaves', True): if toon.style.getTorsoSize() == 'short': return getSingingNote(toon, 'b1') elif toon.style.getTorsoSize() == 'medium': @@ -371,7 +371,7 @@ def singNote3(toon, volume = 1): def singNote4(toon, volume = 1): - if base.config.GetBool('want-octaves', True): + if config.GetBool('want-octaves', True): if toon.style.getTorsoSize() == 'short': return getSingingNote(toon, 'c1') elif toon.style.getTorsoSize() == 'medium': @@ -381,7 +381,7 @@ def singNote4(toon, volume = 1): def singNote5(toon, volume = 1): - if base.config.GetBool('want-octaves', True): + if config.GetBool('want-octaves', True): if toon.style.getTorsoSize() == 'short': return getSingingNote(toon, 'd1') elif toon.style.getTorsoSize() == 'medium': @@ -391,7 +391,7 @@ def singNote5(toon, volume = 1): def singNote6(toon, volume = 1): - if base.config.GetBool('want-octaves', True): + if config.GetBool('want-octaves', True): if toon.style.getTorsoSize() == 'short': return getSingingNote(toon, 'e1') elif toon.style.getTorsoSize() == 'medium': @@ -401,7 +401,7 @@ def singNote6(toon, volume = 1): def singNote7(toon, volume = 1): - if base.config.GetBool('want-octaves', True): + if config.GetBool('want-octaves', True): if toon.style.getTorsoSize() == 'short': return getSingingNote(toon, 'f1') elif toon.style.getTorsoSize() == 'medium': @@ -411,7 +411,7 @@ def singNote7(toon, volume = 1): def singNote8(toon, volume = 1): - if base.config.GetBool('want-octaves', True): + if config.GetBool('want-octaves', True): if toon.style.getTorsoSize() == 'short': return getSingingNote(toon, 'g2') elif toon.style.getTorsoSize() == 'medium': diff --git a/toontown/toon/Toon.py b/toontown/toon/Toon.py index c19e3368..60851058 100644 --- a/toontown/toon/Toon.py +++ b/toontown/toon/Toon.py @@ -162,7 +162,7 @@ Phase6AnimList = (('headdown-putt', 'headdown-putt'), Phase9AnimList = (('push', 'push'),) Phase10AnimList = (('leverReach', 'leverReach'), ('leverPull', 'leverPull'), ('leverNeutral', 'leverNeutral')) Phase12AnimList = () -if not base.config.GetBool('want-new-anims', 1): +if not config.GetBool('want-new-anims', 1): LegDict = {'s': '/models/char/dogSS_Shorts-legs-', 'm': '/models/char/dogMM_Shorts-legs-', 'l': '/models/char/dogLL_Shorts-legs-'} @@ -188,7 +188,7 @@ else: def loadModels(): global Preloaded - preloadAvatars = base.config.GetBool('preload-avatars', 0) + preloadAvatars = config.GetBool('preload-avatars', 0) if preloadAvatars: def loadTex(path): @@ -456,7 +456,7 @@ def unloadDialog(): class Toon(Avatar.Avatar, ToonHead): notify = DirectNotifyGlobal.directNotify.newCategory('Toon') - afkTimeout = base.config.GetInt('afk-timeout', 600) + afkTimeout = config.GetInt('afk-timeout', 600) def __init__(self): try: @@ -645,7 +645,7 @@ class Toon(Avatar.Avatar, ToonHead): def parentToonParts(self): if self.hasLOD(): for lodName in self.getLODNames(): - if base.config.GetBool('want-new-anims', 1): + if config.GetBool('want-new-anims', 1): if not self.getPart('torso', lodName).find('**/def_head').isEmpty(): self.attach('head', 'torso', 'def_head', lodName) else: @@ -672,12 +672,12 @@ class Toon(Avatar.Avatar, ToonHead): def setLODs(self): self.setLODNode() - levelOneIn = base.config.GetInt('lod1-in', 20) - levelOneOut = base.config.GetInt('lod1-out', 0) - levelTwoIn = base.config.GetInt('lod2-in', 80) - levelTwoOut = base.config.GetInt('lod2-out', 20) - levelThreeIn = base.config.GetInt('lod3-in', 280) - levelThreeOut = base.config.GetInt('lod3-out', 80) + levelOneIn = config.GetInt('lod1-in', 20) + levelOneOut = config.GetInt('lod1-out', 0) + levelTwoIn = config.GetInt('lod2-in', 80) + levelTwoOut = config.GetInt('lod2-out', 20) + levelThreeIn = config.GetInt('lod3-in', 280) + levelThreeOut = config.GetInt('lod3-out', 80) self.addLOD(1000, levelOneIn, levelOneOut) self.addLOD(500, levelTwoIn, levelTwoOut) self.addLOD(250, levelThreeIn, levelThreeOut) @@ -702,14 +702,14 @@ class Toon(Avatar.Avatar, ToonHead): self.leftHand = None for lodName in self.getLODNames(): hand = self.getPart('torso', lodName).find('**/joint_Rhold') - if base.config.GetBool('want-new-anims', 1): + if config.GetBool('want-new-anims', 1): if not self.getPart('torso', lodName).find('**/def_joint_right_hold').isEmpty(): hand = self.getPart('torso', lodName).find('**/def_joint_right_hold') else: hand = self.getPart('torso', lodName).find('**/joint_Rhold') self.rightHands.append(hand) rightHand = rightHand.instanceTo(hand) - if base.config.GetBool('want-new-anims', 1): + if config.GetBool('want-new-anims', 1): if not self.getPart('torso', lodName).find('**/def_joint_left_hold').isEmpty(): hand = self.getPart('torso', lodName).find('**/def_joint_left_hold') else: diff --git a/toontown/toon/ToonAvatarPanel.py b/toontown/toon/ToonAvatarPanel.py index 9a4a7bba..a0df2646 100644 --- a/toontown/toon/ToonAvatarPanel.py +++ b/toontown/toon/ToonAvatarPanel.py @@ -528,7 +528,7 @@ class ToonAvatarPanel(AvatarPanelBase.AvatarPanelBase): self.groupButton['command'] = self.handleInvite self.groupButton['image'] = self.inviteImageList self.groupButton['state'] = DGG.NORMAL - if base.config.GetBool('want-boarding-groups', 1): + if config.GetBool('want-boarding-groups', 1): base.setCellsAvailable([base.rightCells[0]], 0) self.groupFrame.show() return diff --git a/toontown/toon/ToonHead.py b/toontown/toon/ToonHead.py index 5594b0fe..0bc2ea6e 100644 --- a/toontown/toon/ToonHead.py +++ b/toontown/toon/ToonHead.py @@ -8,7 +8,7 @@ from direct.interval.IntervalGlobal import * from direct.fsm.ClassicFSM import ClassicFSM from direct.fsm.State import State from direct.directnotify import DirectNotifyGlobal -if not base.config.GetBool('want-new-anims', 1): +if not config.GetBool('want-new-anims', 1): HeadDict = {'dls': '/models/char/dogMM_Shorts-head-', 'dss': '/models/char/dogMM_Skirt-head-', 'dsl': '/models/char/dogSS_Shorts-head-', @@ -569,7 +569,7 @@ class ToonHead(Actor.Actor): if self.hasLOD(): for lodName in self.getLODNames(): self.drawInFront('eyes*', 'head-front*', mode, lodName=lodName) - if base.config.GetBool('want-new-anims', 1): + if config.GetBool('want-new-anims', 1): if not self.find('**/joint_pupil*').isEmpty(): self.drawInFront('joint_pupil*', 'eyes*', -1, lodName=lodName) else: @@ -584,7 +584,7 @@ class ToonHead(Actor.Actor): self.__lod500Eyes = None else: self.__lod500Eyes.setColorOff() - if base.config.GetBool('want-new-anims', 1): + if config.GetBool('want-new-anims', 1): if not self.find('**/joint_pupilL*').isEmpty(): self.__lod500lPupil = self.__lod500Eyes.find('**/joint_pupilL*') self.__lod500rPupil = self.__lod500Eyes.find('**/joint_pupilR*') @@ -598,7 +598,7 @@ class ToonHead(Actor.Actor): self.__lod250Eyes = None else: self.__lod250Eyes.setColorOff() - if base.config.GetBool('want-new-anims', 1): + if config.GetBool('want-new-anims', 1): if not self.find('**/joint_pupilL*').isEmpty(): self.__lod250lPupil = self.__lod250Eyes.find('**/joint_pupilL*') self.__lod250rPupil = self.__lod250Eyes.find('**/joint_pupilR*') @@ -610,7 +610,7 @@ class ToonHead(Actor.Actor): self.__lod250rPupil = self.__lod250Eyes.find('**/joint_pupilR*') else: self.drawInFront('eyes*', 'head-front*', mode) - if base.config.GetBool('want-new-anims', 1): + if config.GetBool('want-new-anims', 1): if not self.find('joint_pupil*').isEmpty(): self.drawInFront('joint_pupil*', 'eyes*', -1) else: @@ -622,7 +622,7 @@ class ToonHead(Actor.Actor): self.__eyes.setColorOff() self.__lpupil = None self.__rpupil = None - if base.config.GetBool('want-new-anims', 1): + if config.GetBool('want-new-anims', 1): if not self.find('**/joint_pupilL*').isEmpty(): if self.getLOD(1000): lp = self.getLOD(1000).find('**/joint_pupilL*') @@ -1180,7 +1180,7 @@ class ToonHead(Actor.Actor): if lodName == '1000' or lodName == '500': filePrefix = DogMuzzleDict[style.head] muzzles = loader.loadModel('phase_3' + filePrefix + lodName) - if base.config.GetBool('want-new-anims', 1): + if config.GetBool('want-new-anims', 1): if not self.find('**/' + lodName + '/**/__Actor_head/def_head').isEmpty(): muzzles.reparentTo(self.find('**/' + lodName + '/**/__Actor_head/def_head')) else: @@ -1206,7 +1206,7 @@ class ToonHead(Actor.Actor): muzzle = self.find('**/muzzle*') filePrefix = DogMuzzleDict[style.head] muzzles = loader.loadModel('phase_3' + filePrefix + '1000') - if base.config.GetBool('want-new-anims', 1): + if config.GetBool('want-new-anims', 1): if not self.find('**/def_head').isEmpty(): muzzles.reparentTo(self.find('**/def_head')) else: diff --git a/toontown/toonbase/ToonBase.py b/toontown/toonbase/ToonBase.py index 12551a1e..ce5fd9e6 100644 --- a/toontown/toonbase/ToonBase.py +++ b/toontown/toonbase/ToonBase.py @@ -388,7 +388,7 @@ class ToonBase(OTPBase.OTPBase): self.cleanupDownloadWatcher() else: self.acceptOnce('launcherAllPhasesComplete', self.cleanupDownloadWatcher) - gameServer = base.config.GetString('game-server', '') + gameServer = config.GetString('game-server', '') if gameServer: self.notify.info('Using game-server from Configrc: %s ' % gameServer) elif launcherServer: @@ -396,18 +396,18 @@ class ToonBase(OTPBase.OTPBase): self.notify.info('Using gameServer from launcher: %s ' % gameServer) else: gameServer = 'localhost' - serverPort = base.config.GetInt('server-port', 7198) + serverPort = config.GetInt('server-port', 7198) serverList = [] for name in gameServer.split(';'): url = URLSpec(name, 1) - if base.config.GetBool('server-force-ssl', False): + if config.GetBool('server-force-ssl', False): url.setScheme('s') if not url.hasPort(): url.setPort(serverPort) serverList.append(url) if len(serverList) == 1: - failover = base.config.GetString('server-failover', '') + failover = config.GetString('server-failover', '') serverURL = serverList[0] for arg in failover.split(): try: diff --git a/toontown/toonbase/ToontownStart.py b/toontown/toonbase/ToontownStart.py index a9fe01f7..60b98234 100644 --- a/toontown/toonbase/ToontownStart.py +++ b/toontown/toonbase/ToontownStart.py @@ -97,7 +97,7 @@ else: music = None import ToontownLoader from direct.gui.DirectGui import * -serverVersion = base.config.GetString('server-version', 'no_version_set') +serverVersion = config.GetString('server-version', 'no_version_set') print 'ToontownStart: serverVersion: ', serverVersion version = OnscreenText(serverVersion, pos=(-1.3, -0.975), scale=0.06, fg=Vec4(0, 0, 1, 0.6), align=TextNode.ALeft) loader.beginBulkLoad('init', TTLocalizer.LoaderLabel, 138, 0, TTLocalizer.TIP_NONE) diff --git a/toontown/toontowngui/NewsPageButtonManager.py b/toontown/toontowngui/NewsPageButtonManager.py index a441bf0b..d1b207b5 100644 --- a/toontown/toontowngui/NewsPageButtonManager.py +++ b/toontown/toontowngui/NewsPageButtonManager.py @@ -113,7 +113,7 @@ class NewsPageButtonManager(FSM.FSM): self.__blinkIval.pause() def isNewIssueButtonShown(self): - if not base.config.GetBool('want-news-tab', 1): + if not config.GetBool('want-news-tab', 1): return False if localAvatar.getLastTimeReadNews() < base.cr.inGameNewsMgr.getLatestIssue(): return True diff --git a/toontown/toontowngui/TeaserPanel.py b/toontown/toontowngui/TeaserPanel.py index 4c71a4b3..d85a44cf 100644 --- a/toontown/toontowngui/TeaserPanel.py +++ b/toontown/toontowngui/TeaserPanel.py @@ -129,7 +129,7 @@ class TeaserPanel(DirectObject): self.dialog.setPos(0, 0, 0.75) self.browser.reparentTo(self.dialog) base.transitions.fadeScreen(0.5) - if base.config.GetBool('want-teaser-scroll-keys', 0): + if config.GetBool('want-teaser-scroll-keys', 0): self.accept('arrow_right', self.showNextPage) self.accept('arrow_left', self.showPrevPage) self.accept('stoppedAsleep', self.__handleDone) diff --git a/toontown/toontowngui/ToontownLoadingScreen.py b/toontown/toontowngui/ToontownLoadingScreen.py index deefd258..b9986195 100644 --- a/toontown/toontowngui/ToontownLoadingScreen.py +++ b/toontown/toontowngui/ToontownLoadingScreen.py @@ -28,7 +28,7 @@ class ToontownLoadingScreen: # This will bring up the placer panel, which is useful for positioning objects but also rather buggy. # Make sure the models in {Panda3D}\models\misc are converted to .bam, or it will crash. # To save you the trouble, you can get the converted models from here: https://dl.dropboxusercontent.com/u/37515491/TTR/misc.zip - Tell someone if the link is broken. - if base.config.GetBool('want-placer-panel', False): + if config.GetBool('want-placer-panel', False): self.gui.place() return diff --git a/toontown/town/Street.py b/toontown/town/Street.py index 2098be5d..81dd268e 100644 --- a/toontown/town/Street.py +++ b/toontown/town/Street.py @@ -20,7 +20,7 @@ from toontown.estate import HouseGlobals from toontown.toonbase import TTLocalizer from direct.interval.IntervalGlobal import * from otp.nametag import NametagGlobals -visualizeZones = base.config.GetBool('visualize-zones', 0) +visualizeZones = config.GetBool('visualize-zones', 0) class Street(BattlePlace.BattlePlace): notify = DirectNotifyGlobal.directNotify.newCategory('Street') diff --git a/toontown/town/TownBattleSOSPanel.py b/toontown/town/TownBattleSOSPanel.py index 546042bd..a116c3e9 100644 --- a/toontown/town/TownBattleSOSPanel.py +++ b/toontown/town/TownBattleSOSPanel.py @@ -160,7 +160,7 @@ class TownBattleSOSPanel(DirectFrame, StateData.StateData): def __updateScrollList(self): newFriends = [] - battlePets = base.config.GetBool('want-pets-in-battle', 1) + battlePets = config.GetBool('want-pets-in-battle', 1) if base.wantPets and battlePets == 1 and base.localAvatar.hasPet(): newFriends.append((base.localAvatar.getPetId(), 0)) if not self.bldg or self.factoryToonIdList is not None: diff --git a/toontown/town/TownLoader.py b/toontown/town/TownLoader.py index 076ed145..cf41fb6f 100644 --- a/toontown/town/TownLoader.py +++ b/toontown/town/TownLoader.py @@ -60,7 +60,7 @@ class TownLoader(StateData.StateData): self.townBattle = TownBattle.TownBattle(self.townBattleDoneEvent) self.townBattle.load() - if base.config.GetBool('want-april-toons', 0): + if config.GetBool('want-april-toons', 0): self.npc = NPCToons.createLocalNPC(91915) self.npc.reparentTo(base.localAvatar) self.npc.setZ(30) @@ -125,7 +125,7 @@ class TownLoader(StateData.StateData): cleanupDialog('globalDialog') ModelPool.garbageCollect() TexturePool.garbageCollect() - if base.config.GetBool('want-april-toons', 0): + if config.GetBool('want-april-toons', 0): self.pianoDropSequence.finish() self.pianoDropSound.finish() del self.pianoDropSequence diff --git a/toontown/trolley/Trolley.py b/toontown/trolley/Trolley.py index b26ad7f3..b2303a07 100644 --- a/toontown/trolley/Trolley.py +++ b/toontown/trolley/Trolley.py @@ -155,7 +155,7 @@ class Trolley(StateData.StateData): return None def enterBoarded(self): - if base.config.GetBool('want-qa-regression', 0): + if config.GetBool('want-qa-regression', 0): self.notify.info('QA-REGRESSION: RIDETHETROLLEY: Ride the Trolley') self.enableExitButton() return None diff --git a/toontown/uberdog/ClientServicesManager.py b/toontown/uberdog/ClientServicesManager.py index 89e7747f..f84bb641 100644 --- a/toontown/uberdog/ClientServicesManager.py +++ b/toontown/uberdog/ClientServicesManager.py @@ -22,7 +22,7 @@ class ClientServicesManager(DistributedObjectGlobal): cookie = self.cr.playToken or 'dev' # Sign the login cookie - key = base.config.GetString('csmud-secret', 'streetlamps') + base.config.GetString('server-version', 'no_version_set') + FIXED_KEY + key = config.GetString('csmud-secret', 'streetlamps') + config.GetString('server-version', 'no_version_set') + FIXED_KEY sig = hmac.new(key, cookie, hashlib.sha256).digest() self.notify.debug('Sending login cookie: ' + cookie)