mirror of
https://github.com/Sneed-Group/Poodletooth-iLand
synced 2024-12-24 04:02:40 -06:00
Reconsider toons only when switching true friends/speedchat
This commit is contained in:
parent
6c94355d39
commit
884e452e32
3 changed files with 9 additions and 5 deletions
|
@ -6,11 +6,11 @@ from pandac.PandaModules import *
|
||||||
|
|
||||||
import DisplaySettingsDialog
|
import DisplaySettingsDialog
|
||||||
import ShtikerPage
|
import ShtikerPage
|
||||||
from otp.avatar import Avatar
|
|
||||||
from otp.speedchat import SCColorScheme
|
from otp.speedchat import SCColorScheme
|
||||||
from otp.speedchat import SCStaticTextTerminal
|
from otp.speedchat import SCStaticTextTerminal
|
||||||
from otp.speedchat import SpeedChat
|
from otp.speedchat import SpeedChat
|
||||||
from toontown.toonbase import TTLocalizer, ToontownGlobals
|
from toontown.toonbase import TTLocalizer, ToontownGlobals
|
||||||
|
from toontown.toon import Toon
|
||||||
from toontown.toontowngui import TTDialog
|
from toontown.toontowngui import TTDialog
|
||||||
import webbrowser
|
import webbrowser
|
||||||
|
|
||||||
|
@ -790,7 +790,7 @@ class ExtraOptionsTabPage(DirectFrame):
|
||||||
def __doToggleSpeedchatPlus(self):
|
def __doToggleSpeedchatPlus(self):
|
||||||
messenger.send('wakeup')
|
messenger.send('wakeup')
|
||||||
settings['speedchatPlus'] = not settings['speedchatPlus']
|
settings['speedchatPlus'] = not settings['speedchatPlus']
|
||||||
Avatar.reconsiderAllUnderstandable()
|
Toon.reconsiderAllToonsUnderstandable()
|
||||||
self.settingsChanged = 1
|
self.settingsChanged = 1
|
||||||
self.__setSpeedchatPlusButton()
|
self.__setSpeedchatPlusButton()
|
||||||
|
|
||||||
|
@ -801,7 +801,7 @@ class ExtraOptionsTabPage(DirectFrame):
|
||||||
def __doToggleTrueFriends(self):
|
def __doToggleTrueFriends(self):
|
||||||
messenger.send('wakeup')
|
messenger.send('wakeup')
|
||||||
settings['trueFriends'] = not settings['trueFriends']
|
settings['trueFriends'] = not settings['trueFriends']
|
||||||
Avatar.reconsiderAllUnderstandable()
|
Toon.reconsiderAllToonsUnderstandable()
|
||||||
self.settingsChanged = 1
|
self.settingsChanged = 1
|
||||||
self.__setTrueFriendsButton()
|
self.__setTrueFriendsButton()
|
||||||
|
|
||||||
|
|
|
@ -65,7 +65,6 @@ from toontown.battle import BattleParticles
|
||||||
if base.wantKarts:
|
if base.wantKarts:
|
||||||
from toontown.racing.KartDNA import *
|
from toontown.racing.KartDNA import *
|
||||||
|
|
||||||
|
|
||||||
class DistributedToon(DistributedPlayer.DistributedPlayer, Toon.Toon, DistributedSmoothNode.DistributedSmoothNode, DelayDeletable):
|
class DistributedToon(DistributedPlayer.DistributedPlayer, Toon.Toon, DistributedSmoothNode.DistributedSmoothNode, DelayDeletable):
|
||||||
notify = DirectNotifyGlobal.directNotify.newCategory('DistributedToon')
|
notify = DirectNotifyGlobal.directNotify.newCategory('DistributedToon')
|
||||||
partyNotify = DirectNotifyGlobal.directNotify.newCategory('DistributedToon_Party')
|
partyNotify = DirectNotifyGlobal.directNotify.newCategory('DistributedToon_Party')
|
||||||
|
@ -2519,7 +2518,7 @@ class DistributedToon(DistributedPlayer.DistributedPlayer, Toon.Toon, Distribute
|
||||||
self.d_setTrueFriends(trueFriends)
|
self.d_setTrueFriends(trueFriends)
|
||||||
|
|
||||||
def setTrueFriends(self, trueFriends):
|
def setTrueFriends(self, trueFriends):
|
||||||
Avatar.reconsiderAllUnderstandable()
|
Toon.reconsiderAllToonsUnderstandable()
|
||||||
self.trueFriends = trueFriends
|
self.trueFriends = trueFriends
|
||||||
|
|
||||||
def d_setTrueFriends(self, trueFriends):
|
def d_setTrueFriends(self, trueFriends):
|
||||||
|
|
|
@ -395,6 +395,11 @@ def unloadDialog():
|
||||||
BearDialogueArray = []
|
BearDialogueArray = []
|
||||||
PigDialogueArray = []
|
PigDialogueArray = []
|
||||||
|
|
||||||
|
def reconsiderAllToonsUnderstandable():
|
||||||
|
for av in Avatar.Avatar.ActiveAvatars:
|
||||||
|
if isinstance(av, Toon):
|
||||||
|
av.considerUnderstandable()
|
||||||
|
|
||||||
class Toon(Avatar.Avatar, ToonHead):
|
class Toon(Avatar.Avatar, ToonHead):
|
||||||
notify = DirectNotifyGlobal.directNotify.newCategory('Toon')
|
notify = DirectNotifyGlobal.directNotify.newCategory('Toon')
|
||||||
afkTimeout = base.config.GetInt('afk-timeout', 600)
|
afkTimeout = base.config.GetInt('afk-timeout', 600)
|
||||||
|
|
Loading…
Reference in a new issue