From 31b47fd0a96372715b0306bc555cc773c00e8b51 Mon Sep 17 00:00:00 2001 From: John Cote Date: Wed, 7 Jul 2021 21:57:15 -0400 Subject: [PATCH] settings: Minor edits for consistency --- toontown/shtiker/OptionsPage.py | 20 ++++++++++---------- toontown/toon/LocalToon.py | 4 ++-- toontown/toonbase/DisplayOptions.py | 10 +++++----- toontown/toonbase/ToonBase.py | 8 ++++---- 4 files changed, 21 insertions(+), 21 deletions(-) diff --git a/toontown/shtiker/OptionsPage.py b/toontown/shtiker/OptionsPage.py index 02162bc..a3f6798 100644 --- a/toontown/shtiker/OptionsPage.py +++ b/toontown/shtiker/OptionsPage.py @@ -253,10 +253,10 @@ class OptionsTabPage(DirectFrame): messenger.send('wakeup') if base.musicActive: base.enableMusic(0) - base.settings.updateSetting('music', 0) + base.settings.updateSetting('music', False) else: base.enableMusic(1) - base.settings.updateSetting('music', 1) + base.settings.updateSetting('music', True) self.settingsChanged = 1 self.__setMusicButton() @@ -272,10 +272,10 @@ class OptionsTabPage(DirectFrame): messenger.send('wakeup') if base.sfxActive: base.enableSoundEffects(0) - base.settings.updateSetting('sfx', 0) + base.settings.updateSetting('sfx', False) else: base.enableSoundEffects(1) - base.settings.updateSetting('sfx', 1) + base.settings.updateSetting('sfx', True) self.settingsChanged = 1 self.__setSoundFXButton() @@ -283,10 +283,10 @@ class OptionsTabPage(DirectFrame): messenger.send('wakeup') if base.toonChatSounds: base.toonChatSounds = 0 - base.settings.updateSetting('toon-chat-sounds', 0) + base.settings.updateSetting('toon-chat-sounds', False) else: base.toonChatSounds = 1 - base.settings.updateSetting('toon-chat-sounds', 1) + base.settings.updateSetting('toon-chat-sounds', True) self.settingsChanged = 1 self.__setToonChatSoundsButton() @@ -317,10 +317,10 @@ class OptionsTabPage(DirectFrame): messenger.send('wakeup') if base.localAvatar.acceptingNewFriends: base.localAvatar.acceptingNewFriends = 0 - base.settings.updateSetting('accepting-new-friends', 0) + base.settings.updateSetting('accepting-new-friends', False) else: base.localAvatar.acceptingNewFriends = 1 - base.settings.updateSetting('accepting-new-friends', 1) + base.settings.updateSetting('accepting-new-friends', True) self.settingsChanged = 1 self.__setAcceptFriendsButton() @@ -328,10 +328,10 @@ class OptionsTabPage(DirectFrame): messenger.send('wakeup') if base.localAvatar.acceptingNonFriendWhispers: base.localAvatar.acceptingNonFriendWhispers = 0 - base.settings.updateSetting('accepting-non-friend-whispers', 0) + base.settings.updateSetting('accepting-non-friend-whispers', False) else: base.localAvatar.acceptingNonFriendWhispers = 1 - base.settings.updateSetting('accepting-non-friend-whispers', 1) + base.settings.updateSetting('accepting-non-friend-whispers', True) self.settingsChanged = 1 self.__setAcceptWhispersButton() diff --git a/toontown/toon/LocalToon.py b/toontown/toon/LocalToon.py index e0ae93d..eaa7cab 100644 --- a/toontown/toon/LocalToon.py +++ b/toontown/toon/LocalToon.py @@ -162,8 +162,8 @@ class LocalToon(DistributedToon.DistributedToon, LocalAvatar.LocalAvatar): if not hasattr(base.cr, 'lastLoggedIn'): base.cr.lastLoggedIn = self.cr.toontownTimeManager.convertStrToToontownTime('') self.setLastTimeReadNews(base.cr.lastLoggedIn) - self.acceptingNewFriends = base.settings.getSetting('accepting-new-friends', 1) and base.config.GetBool('accepting-new-friends-default', True) - self.acceptingNonFriendWhispers = base.settings.getSetting('accepting-non-friend-whispers', 1) and base.config.GetBool('accepting-non-friend-whispers-default', True) + self.acceptingNewFriends = base.settings.getSetting('accepting-new-friends', True) and base.config.GetBool('accepting-new-friends-default', True) + self.acceptingNonFriendWhispers = base.settings.getSetting('accepting-non-friend-whispers', True) and base.config.GetBool('accepting-non-friend-whispers-default', True) self.physControls.event.addAgainPattern('again%in') self.oldPos = None self.questMap = None diff --git a/toontown/toonbase/DisplayOptions.py b/toontown/toonbase/DisplayOptions.py index d970292..7e7cba5 100644 --- a/toontown/toonbase/DisplayOptions.py +++ b/toontown/toonbase/DisplayOptions.py @@ -22,12 +22,12 @@ class DisplayOptions: def loadFromSettings(self): base.settings.readSettings() - mode = not base.settings.getSetting('windowed-mode', 1) - music = base.settings.getSetting('music', 1) - sfx = base.settings.getSetting('sfx', 1) - toonChatSounds = base.settings.getSetting('toon-chat-sounds', 1) + mode = not base.settings.getSetting('windowed-mode', True) + music = base.settings.getSetting('music', True) + sfx = base.settings.getSetting('sfx', True) + toonChatSounds = base.settings.getSetting('toon-chat-sounds', True) res = base.settings.getSetting('resolution', (800, 600)) - embed = base.settings.getSetting('embedded-mode', 0) + embed = base.settings.getSetting('embedded-mode', False) self.notify.debug('before prc settings embedded mode=%s' % str(embed)) self.notify.debug('before prc settings full screen mode=%s' % str(mode)) if mode == None: diff --git a/toontown/toonbase/ToonBase.py b/toontown/toonbase/ToonBase.py index ab5cb59..355231a 100644 --- a/toontown/toonbase/ToonBase.py +++ b/toontown/toonbase/ToonBase.py @@ -25,10 +25,10 @@ class ToonBase(OTPBase.OTPBase): self.settings = Settings() if not config.GetInt('ignore-user-options', 0): self.settings.readSettings() - mode = not self.settings.getSetting('windowed-mode', 1) - music = self.settings.getSetting('music', 1) - sfx = self.settings.getSetting('sfx', 1) - toonChatSounds = self.settings.getSetting('toon-chat-sounds', 1) + mode = not self.settings.getSetting('windowed-mode', True) + music = self.settings.getSetting('music', True) + sfx = self.settings.getSetting('sfx', True) + toonChatSounds = self.settings.getSetting('toon-chat-sounds', True) res = self.settings.getSetting('resolution', (800, 600)) if mode == None: mode = 1