more DeprecationWarning removal

This commit is contained in:
Open Toontown 2022-01-19 14:31:52 -05:00
parent e1c842d235
commit 8df97582b2
9 changed files with 52 additions and 75 deletions

View file

@ -1,20 +1,16 @@
from pandac.PandaModules import * from panda3d.core import *
from panda3d.otp import WhisperPopup from panda3d.otp import WhisperPopup
from panda3d.otp import CFQuicktalker, CFPageButton, CFQuitButton, CFSpeech, CFThought, CFTimeout from panda3d.otp import CFQuicktalker, CFPageButton, CFQuitButton, CFSpeech, CFThought, CFTimeout
from otp.chat import ChatGarbler from otp.chat import ChatGarbler
import string
from direct.task import Task
from otp.otpbase import OTPLocalizer from otp.otpbase import OTPLocalizer
from otp.speedchat import SCDecoders from otp.speedchat import SCDecoders
from direct.showbase import PythonUtil
from otp.avatar import DistributedAvatar from otp.avatar import DistributedAvatar
import time
from otp.avatar import Avatar, PlayerBase from otp.avatar import Avatar, PlayerBase
from otp.chat import TalkAssistant from otp.chat import TalkAssistant
from otp.otpbase import OTPGlobals from otp.otpbase import OTPGlobals
from otp.avatar.Avatar import teleportNotify from otp.avatar.Avatar import teleportNotify
from otp.distributed.TelemetryLimited import TelemetryLimited from otp.distributed.TelemetryLimited import TelemetryLimited
if base.config.GetBool('want-chatfilter-hacks', 0): if ConfigVariableBool('want-chatfilter-hacks', 0).value:
from otp.switchboard import badwordpy from otp.switchboard import badwordpy
import os import os
badwordpy.init(os.environ.get('OTP') + '\\src\\switchboard\\', '') badwordpy.init(os.environ.get('OTP') + '\\src\\switchboard\\', '')
@ -44,7 +40,7 @@ class DistributedPlayer(DistributedAvatar.DistributedAvatar, PlayerBase.PlayerBa
self.DISLid = 0 self.DISLid = 0
self.accessLevel = 0 self.accessLevel = 0
self.autoRun = 0 self.autoRun = 0
self.whiteListEnabled = base.config.GetBool('whitelist-chat-enabled', 1) self.whiteListEnabled = ConfigVariableBool('whitelist-chat-enabled', 1).value
return return
@ -224,8 +220,8 @@ class DistributedPlayer(DistributedAvatar.DistributedAvatar, PlayerBase.PlayerBa
if self.cr.wantMagicWords and len(chatString) > 0 and chatString[0] == '~': if self.cr.wantMagicWords and len(chatString) > 0 and chatString[0] == '~':
messenger.send('magicWord', [chatString]) messenger.send('magicWord', [chatString])
else: else:
if base.config.GetBool('want-chatfilter-hacks', 0): if ConfigVariableBool('want-chatfilter-hacks', 0).value:
if base.config.GetBool('want-chatfilter-drop-offending', 0): if ConfigVariableBool('want-chatfilter-drop-offending', 0).value:
if badwordpy.test(chatString): if badwordpy.test(chatString):
return return
else: else:
@ -351,7 +347,7 @@ class DistributedPlayer(DistributedAvatar.DistributedAvatar, PlayerBase.PlayerBa
teleportNotify.debug('party is ending') teleportNotify.debug('party is ending')
self.d_teleportResponse(self.doId, 0, 0, 0, 0, sendToId=requesterId) self.d_teleportResponse(self.doId, 0, 0, 0, 0, sendToId=requesterId)
return return
if self.__teleportAvailable and not self.ghostMode and base.config.GetBool('can-be-teleported-to', 1): if self.__teleportAvailable and not self.ghostMode and ConfigVariableBool('can-be-teleported-to', 1).value:
teleportNotify.debug('teleport initiation successful') teleportNotify.debug('teleport initiation successful')
self.setSystemMessage(requesterId, OTPLocalizer.WhisperComingToVisit % avatar.getName()) self.setSystemMessage(requesterId, OTPLocalizer.WhisperComingToVisit % avatar.getName())
messenger.send('teleportQuery', [avatar, self]) messenger.send('teleportQuery', [avatar, self])

View file

@ -1,40 +1,33 @@
from pandac.PandaModules import * from panda3d.core import *
from panda3d.otp import Nametag, WhisperPopup from panda3d.otp import Nametag, WhisperPopup
from direct.gui.DirectGui import * from direct.gui.DirectGui import *
from direct.showbase.PythonUtil import * from direct.showbase.PythonUtil import *
from direct.interval.IntervalGlobal import * from direct.interval.IntervalGlobal import *
from direct.showbase.InputStateGlobal import inputState from direct.showbase.InputStateGlobal import inputState
from pandac.PandaModules import *
from . import Avatar
from direct.controls import ControlManager from direct.controls import ControlManager
from . import DistributedAvatar from . import DistributedAvatar
from direct.task import Task from direct.task import Task
from . import PositionExaminer
from otp.otpbase import OTPGlobals from otp.otpbase import OTPGlobals
from otp.otpbase import OTPRender
import math import math
import string
import random import random
from direct.directnotify import DirectNotifyGlobal from direct.directnotify import DirectNotifyGlobal
from direct.distributed import DistributedSmoothNode from direct.distributed import DistributedSmoothNode
from direct.gui import DirectGuiGlobals
from otp.otpbase import OTPLocalizer from otp.otpbase import OTPLocalizer
from direct.controls.GhostWalker import GhostWalker from direct.controls.GhostWalker import GhostWalker
from direct.controls.GravityWalker import GravityWalker from direct.controls.GravityWalker import GravityWalker
from direct.controls.ObserverWalker import ObserverWalker from direct.controls.ObserverWalker import ObserverWalker
from direct.controls.PhysicsWalker import PhysicsWalker
from direct.controls.SwimWalker import SwimWalker from direct.controls.SwimWalker import SwimWalker
from direct.controls.TwoDWalker import TwoDWalker from direct.controls.TwoDWalker import TwoDWalker
class LocalAvatar(DistributedAvatar.DistributedAvatar, DistributedSmoothNode.DistributedSmoothNode): class LocalAvatar(DistributedAvatar.DistributedAvatar, DistributedSmoothNode.DistributedSmoothNode):
notify = DirectNotifyGlobal.directNotify.newCategory('LocalAvatar') notify = DirectNotifyGlobal.directNotify.newCategory('LocalAvatar')
wantDevCameraPositions = base.config.GetBool('want-dev-camera-positions', 0) wantDevCameraPositions = ConfigVariableBool('want-dev-camera-positions', 0).value
wantMouse = base.config.GetBool('want-mouse', 0) wantMouse = ConfigVariableBool('want-mouse', 0).value
sleepTimeout = base.config.GetInt('sleep-timeout', 120) sleepTimeout = ConfigVariableInt('sleep-timeout', 120).value
swimTimeout = base.config.GetInt('afk-timeout', 600) swimTimeout = ConfigVariableInt('afk-timeout', 600).value
__enableMarkerPlacement = base.config.GetBool('place-markers', 0) __enableMarkerPlacement = ConfigVariableBool('place-markers', 0).value
acceptingNewFriends = base.config.GetBool('accepting-new-friends', 1) acceptingNewFriends = ConfigVariableBool('accepting-new-friends', 1).value
acceptingNonFriendWhispers = base.config.GetBool('accepting-non-friend-whispers', 0) acceptingNonFriendWhispers = ConfigVariableBool('accepting-non-friend-whispers', 0).value
def __init__(self, cr, chatMgr, talkAssistant = None, passMessagesThrough = False): def __init__(self, cr, chatMgr, talkAssistant = None, passMessagesThrough = False):
try: try:

View file

@ -4,7 +4,7 @@ from otp.otpbase import OTPLocalizer
from direct.directnotify import DirectNotifyGlobal from direct.directnotify import DirectNotifyGlobal
from otp.otpbase import OTPGlobals from otp.otpbase import OTPGlobals
from otp.speedchat import SCDecoders from otp.speedchat import SCDecoders
from pandac.PandaModules import * from panda3d.core import *
from otp.chat.TalkMessage import TalkMessage from otp.chat.TalkMessage import TalkMessage
from otp.chat.TalkHandle import TalkHandle from otp.chat.TalkHandle import TalkHandle
import time import time
@ -16,7 +16,7 @@ ThoughtPrefix = '.'
class TalkAssistant(DirectObject.DirectObject): class TalkAssistant(DirectObject.DirectObject):
ExecNamespace = None ExecNamespace = None
notify = DirectNotifyGlobal.directNotify.newCategory('TalkAssistant') notify = DirectNotifyGlobal.directNotify.newCategory('TalkAssistant')
execChat = base.config.GetBool('exec-chat', 0) execChat = ConfigVariableBool('exec-chat', 0).value
def __init__(self): def __init__(self):
self.logWhispers = 1 self.logWhispers = 1
@ -25,7 +25,7 @@ class TalkAssistant(DirectObject.DirectObject):
self.zeroTimeDay = time.time() self.zeroTimeDay = time.time()
self.zeroTimeGame = globalClock.getRealTime() self.zeroTimeGame = globalClock.getRealTime()
self.floodThreshold = 10.0 self.floodThreshold = 10.0
self.useWhiteListFilter = base.config.GetBool('white-list-filter-openchat', 0) self.useWhiteListFilter = ConfigVariableBool('white-list-filter-openchat', 0).value
self.lastWhisperDoId = None self.lastWhisperDoId = None
self.lastWhisperPlayerId = None self.lastWhisperPlayerId = None
self.lastWhisper = None self.lastWhisper = None

View file

@ -2,14 +2,13 @@ import json
import os import os
import time import time
from datetime import datetime from datetime import datetime
from pandac.PandaModules import * from panda3d.core import *
from direct.distributed.MsgTypes import * from direct.distributed.MsgTypes import *
from direct.gui.DirectGui import * from direct.gui.DirectGui import *
from direct.fsm import StateData from direct.fsm import StateData
from direct.fsm import ClassicFSM from direct.fsm import ClassicFSM
from direct.fsm import State from direct.fsm import State
from direct.directnotify import DirectNotifyGlobal from direct.directnotify import DirectNotifyGlobal
from direct.task import Task
from otp.otpgui import OTPDialog from otp.otpgui import OTPDialog
from otp.otpbase import OTPLocalizer from otp.otpbase import OTPLocalizer
from otp.otpbase import OTPGlobals from otp.otpbase import OTPGlobals
@ -17,8 +16,8 @@ from otp.uberdog.AccountDetailRecord import AccountDetailRecord, SubDetailRecord
from . import GuiScreen from . import GuiScreen
class LoginScreen(StateData.StateData, GuiScreen.GuiScreen): class LoginScreen(StateData.StateData, GuiScreen.GuiScreen):
AutoLoginName = base.config.GetString('%s-auto-login%s' % (game.name, os.getenv('otp_client', '')), '') AutoLoginName = ConfigVariableString('%s-auto-login%s' % (game.name, os.getenv('otp_client', '')), '').value
AutoLoginPassword = base.config.GetString('%s-auto-password%s' % (game.name, os.getenv('otp_client', '')), '') AutoLoginPassword = ConfigVariableString('%s-auto-password%s' % (game.name, os.getenv('otp_client', '')), '').value
notify = DirectNotifyGlobal.directNotify.newCategory('LoginScreen') notify = DirectNotifyGlobal.directNotify.newCategory('LoginScreen')
ActiveEntryColor = Vec4(1, 1, 1, 1) ActiveEntryColor = Vec4(1, 1, 1, 1)
InactiveEntryColor = Vec4(0.8, 0.8, 0.8, 1) InactiveEntryColor = Vec4(0.8, 0.8, 0.8, 1)
@ -439,11 +438,11 @@ class LoginScreen(StateData.StateData, GuiScreen.GuiScreen):
self.cr.whiteListChatEnabled = 1 self.cr.whiteListChatEnabled = 1
else: else:
self.cr.whiteListChatEnabled = 0 self.cr.whiteListChatEnabled = 0
self.lastLoggedInStr = base.config.GetString('last-logged-in', '') self.lastLoggedInStr = ConfigVariableString('last-logged-in', '').value
self.cr.lastLoggedIn = datetime.now() self.cr.lastLoggedIn = datetime.now()
if hasattr(self.cr, 'toontownTimeManager'): if hasattr(self.cr, 'toontownTimeManager'):
self.cr.lastLoggedIn = self.cr.toontownTimeManager.convertStrToToontownTime(self.lastLoggedInStr) self.cr.lastLoggedIn = self.cr.toontownTimeManager.convertStrToToontownTime(self.lastLoggedInStr)
self.cr.withParentAccount = base.config.GetBool('dev-with-parent-account', 0) self.cr.withParentAccount = ConfigVariableBool('dev-with-parent-account', 0).value
self.notify.info('Login response return code %s' % returnCode) self.notify.info('Login response return code %s' % returnCode)
if returnCode == 0: if returnCode == 0:
self.__handleLoginSuccess() self.__handleLoginSuccess()

View file

@ -1,7 +1,6 @@
from pandac.PandaModules import * from panda3d.core import *
from toontown.toonbase.ToontownBattleGlobals import * from toontown.toonbase.ToontownBattleGlobals import *
from direct.task.Timer import * from direct.task.Timer import *
import math
import functools import functools
from direct.directnotify import DirectNotifyGlobal from direct.directnotify import DirectNotifyGlobal
from toontown.toon import NPCToons from toontown.toon import NPCToons
@ -58,10 +57,7 @@ TOON_FIRE_SUIT_DELAY = 1.0
REWARD_TIMEOUT = 120 REWARD_TIMEOUT = 120
FLOOR_REWARD_TIMEOUT = 4 FLOOR_REWARD_TIMEOUT = 4
BUILDING_REWARD_TIMEOUT = 300 BUILDING_REWARD_TIMEOUT = 300
try: CLIENT_INPUT_TIMEOUT = ConfigVariableDouble('battle-input-timeout', TTLocalizer.BBbattleInputTimeout).value
CLIENT_INPUT_TIMEOUT = base.config.GetFloat('battle-input-timeout', TTLocalizer.BBbattleInputTimeout)
except:
CLIENT_INPUT_TIMEOUT = simbase.config.GetFloat('battle-input-timeout', TTLocalizer.BBbattleInputTimeout)
def levelAffectsGroup(track, level): def levelAffectsGroup(track, level):
return attackAffectsGroup(track, level) return attackAffectsGroup(track, level)

View file

@ -1,4 +1,4 @@
from pandac.PandaModules import * from panda3d.core import *
from direct.actor import Actor from direct.actor import Actor
from direct.directnotify import DirectNotifyGlobal from direct.directnotify import DirectNotifyGlobal
from otp.otpbase import OTPGlobals from otp.otpbase import OTPGlobals
@ -237,7 +237,7 @@ class PropPool:
self.propCache = [] self.propCache = []
self.propStrings = {} self.propStrings = {}
self.propTypes = {} self.propTypes = {}
self.maxPoolSize = base.config.GetInt('prop-pool-size', 8) self.maxPoolSize = ConfigVariableInt('prop-pool-size', 8).value
for p in Props: for p in Props:
phase = p[0] phase = p[0]
propName = p[1] propName = p[1]

View file

@ -1,13 +1,11 @@
from pandac.PandaModules import * from panda3d.core import *
from panda3d.otp import * from panda3d.otp import *
from toontown.toonbase import ToontownGlobals from toontown.toonbase import ToontownGlobals
import random
from toontown.hood import ZoneUtil from toontown.hood import ZoneUtil
from . import ToonDNA from . import ToonDNA
from toontown.toonbase import TTLocalizer from toontown.toonbase import TTLocalizer
from toontown.toonbase import ToontownBattleGlobals from toontown.toonbase import ToontownBattleGlobals
import sys, os import os
import string
QUEST_MOVIE_CLEAR = 0 QUEST_MOVIE_CLEAR = 0
QUEST_MOVIE_REJECT = 1 QUEST_MOVIE_REJECT = 1
QUEST_MOVIE_COMPLETE = 2 QUEST_MOVIE_COMPLETE = 2
@ -11488,7 +11486,7 @@ try:
except: except:
config = base.config config = base.config
if config.GetBool('want-new-toonhall', 1): if ConfigVariableBool('want-new-toonhall', 1).value:
NPCToonDict[2001] = (2513, NPCToonDict[2001] = (2513,
lnames[2001], lnames[2001],
('dss', ('dss',

View file

@ -4,25 +4,21 @@ from . import ToonDNA
from direct.task.Task import Task from direct.task.Task import Task
from toontown.suit import SuitDNA from toontown.suit import SuitDNA
from direct.actor import Actor from direct.actor import Actor
import string
from .ToonHead import * from .ToonHead import *
from pandac.PandaModules import * from panda3d.core import *
from panda3d.otp import * from panda3d.otp import *
from direct.interval.IntervalGlobal import * from direct.interval.IntervalGlobal import *
from direct.directnotify import DirectNotifyGlobal from direct.directnotify import DirectNotifyGlobal
from toontown.toonbase import ToontownGlobals from toontown.toonbase import ToontownGlobals
from otp.otpbase import OTPLocalizer from otp.otpbase import OTPLocalizer
from toontown.toonbase import TTLocalizer from toontown.toonbase import TTLocalizer
import random
from toontown.effects import Wake from toontown.effects import Wake
from . import TTEmote
from otp.avatar import Emote from otp.avatar import Emote
from . import Motion from . import Motion
from toontown.hood import ZoneUtil from toontown.hood import ZoneUtil
from toontown.battle import SuitBattleGlobals from toontown.battle import SuitBattleGlobals
from otp.otpbase import OTPGlobals from otp.otpbase import OTPGlobals
from toontown.effects import DustCloud from toontown.effects import DustCloud
from direct.showbase.PythonUtil import Functor
from toontown.distributed import DelayDelete from toontown.distributed import DelayDelete
from . import AccessoryGlobals from . import AccessoryGlobals
import importlib import importlib
@ -164,7 +160,7 @@ Phase6AnimList = (('headdown-putt', 'headdown-putt'),
Phase9AnimList = (('push', 'push'),) Phase9AnimList = (('push', 'push'),)
Phase10AnimList = (('leverReach', 'leverReach'), ('leverPull', 'leverPull'), ('leverNeutral', 'leverNeutral')) Phase10AnimList = (('leverReach', 'leverReach'), ('leverPull', 'leverPull'), ('leverNeutral', 'leverNeutral'))
Phase12AnimList = () Phase12AnimList = ()
if not base.config.GetBool('want-new-anims', 1): if not ConfigVariableBool('want-new-anims', 1).value:
LegDict = {'s': '/models/char/dogSS_Shorts-legs-', LegDict = {'s': '/models/char/dogSS_Shorts-legs-',
'm': '/models/char/dogMM_Shorts-legs-', 'm': '/models/char/dogMM_Shorts-legs-',
'l': '/models/char/dogLL_Shorts-legs-'} 'l': '/models/char/dogLL_Shorts-legs-'}
@ -193,7 +189,7 @@ else:
def loadModels(): def loadModels():
global Preloaded global Preloaded
preloadAvatars = base.config.GetBool('preload-avatars', 0) preloadAvatars = ConfigVariableBool('preload-avatars', 0).value
if preloadAvatars: if preloadAvatars:
def loadTex(path): def loadTex(path):
@ -461,7 +457,7 @@ def unloadDialog():
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 = ConfigVariableInt('afk-timeout', 600).value
def __init__(self): def __init__(self):
try: try:
@ -648,7 +644,7 @@ class Toon(Avatar.Avatar, ToonHead):
def parentToonParts(self): def parentToonParts(self):
if self.hasLOD(): if self.hasLOD():
for lodName in self.getLODNames(): for lodName in self.getLODNames():
if base.config.GetBool('want-new-anims', 1): if ConfigVariableBool('want-new-anims', 1).value:
if not self.getPart('torso', lodName).find('**/def_head').isEmpty(): if not self.getPart('torso', lodName).find('**/def_head').isEmpty():
self.attach('head', 'torso', 'def_head', lodName) self.attach('head', 'torso', 'def_head', lodName)
else: else:
@ -675,12 +671,12 @@ class Toon(Avatar.Avatar, ToonHead):
def setLODs(self): def setLODs(self):
self.setLODNode() self.setLODNode()
levelOneIn = base.config.GetInt('lod1-in', 20) levelOneIn = ConfigVariableInt('lod1-in', 20).value
levelOneOut = base.config.GetInt('lod1-out', 0) levelOneOut = ConfigVariableInt('lod1-out', 0).value
levelTwoIn = base.config.GetInt('lod2-in', 80) levelTwoIn = ConfigVariableInt('lod2-in', 80).value
levelTwoOut = base.config.GetInt('lod2-out', 20) levelTwoOut = ConfigVariableInt('lod2-out', 20).value
levelThreeIn = base.config.GetInt('lod3-in', 280) levelThreeIn = ConfigVariableInt('lod3-in', 280).value
levelThreeOut = base.config.GetInt('lod3-out', 80) levelThreeOut = ConfigVariableInt('lod3-out', 80).value
self.addLOD(1000, levelOneIn, levelOneOut) self.addLOD(1000, levelOneIn, levelOneOut)
self.addLOD(500, levelTwoIn, levelTwoOut) self.addLOD(500, levelTwoIn, levelTwoOut)
self.addLOD(250, levelThreeIn, levelThreeOut) self.addLOD(250, levelThreeIn, levelThreeOut)
@ -705,14 +701,14 @@ class Toon(Avatar.Avatar, ToonHead):
self.leftHand = None self.leftHand = None
for lodName in self.getLODNames(): for lodName in self.getLODNames():
hand = self.getPart('torso', lodName).find('**/joint_Rhold') hand = self.getPart('torso', lodName).find('**/joint_Rhold')
if base.config.GetBool('want-new-anims', 1): if ConfigVariableBool('want-new-anims', 1).value:
if not self.getPart('torso', lodName).find('**/def_joint_right_hold').isEmpty(): if not self.getPart('torso', lodName).find('**/def_joint_right_hold').isEmpty():
hand = self.getPart('torso', lodName).find('**/def_joint_right_hold') hand = self.getPart('torso', lodName).find('**/def_joint_right_hold')
else: else:
hand = self.getPart('torso', lodName).find('**/joint_Rhold') hand = self.getPart('torso', lodName).find('**/joint_Rhold')
self.rightHands.append(hand) self.rightHands.append(hand)
rightHand = rightHand.instanceTo(hand) rightHand = rightHand.instanceTo(hand)
if base.config.GetBool('want-new-anims', 1): if ConfigVariableBool('want-new-anims', 1).value:
if not self.getPart('torso', lodName).find('**/def_joint_left_hold').isEmpty(): if not self.getPart('torso', lodName).find('**/def_joint_left_hold').isEmpty():
hand = self.getPart('torso', lodName).find('**/def_joint_left_hold') hand = self.getPart('torso', lodName).find('**/def_joint_left_hold')
else: else:
@ -2044,7 +2040,7 @@ class Toon(Avatar.Avatar, ToonHead):
self.startLookAround() self.startLookAround()
self.openEyes() self.openEyes()
self.startBlink() self.startBlink()
if config.GetBool('stuck-sleep-fix', 1): if ConfigVariableBool('stuck-sleep-fix', 1).value:
doClear = SLEEP_STRING in (self.nametag.getChat(), self.nametag.getStompText()) doClear = SLEEP_STRING in (self.nametag.getChat(), self.nametag.getStompText())
else: else:
doClear = self.nametag.getChat() == SLEEP_STRING doClear = self.nametag.getChat() == SLEEP_STRING

View file

@ -1,14 +1,13 @@
from direct.actor import Actor from direct.actor import Actor
from direct.task import Task from direct.task import Task
from toontown.toonbase import ToontownGlobals from toontown.toonbase import ToontownGlobals
import string
import random import random
from pandac.PandaModules import * from panda3d.core import *
from direct.interval.IntervalGlobal import * from direct.interval.IntervalGlobal import *
from direct.fsm.ClassicFSM import ClassicFSM from direct.fsm.ClassicFSM import ClassicFSM
from direct.fsm.State import State from direct.fsm.State import State
from direct.directnotify import DirectNotifyGlobal from direct.directnotify import DirectNotifyGlobal
if not base.config.GetBool('want-new-anims', 1): if not ConfigVariableBool('want-new-anims', 1).value:
HeadDict = {'dls': '/models/char/dogMM_Shorts-head-', HeadDict = {'dls': '/models/char/dogMM_Shorts-head-',
'dss': '/models/char/dogMM_Skirt-head-', 'dss': '/models/char/dogMM_Skirt-head-',
'dsl': '/models/char/dogSS_Shorts-head-', 'dsl': '/models/char/dogSS_Shorts-head-',
@ -567,7 +566,7 @@ class ToonHead(Actor.Actor):
if self.hasLOD(): if self.hasLOD():
for lodName in self.getLODNames(): for lodName in self.getLODNames():
self.drawInFront('eyes*', 'head-front*', mode, lodName=lodName) self.drawInFront('eyes*', 'head-front*', mode, lodName=lodName)
if base.config.GetBool('want-new-anims', 1): if ConfigVariableBool('want-new-anims', 1).value:
if not self.find('**/joint_pupil*').isEmpty(): if not self.find('**/joint_pupil*').isEmpty():
self.drawInFront('joint_pupil*', 'eyes*', -1, lodName=lodName) self.drawInFront('joint_pupil*', 'eyes*', -1, lodName=lodName)
else: else:
@ -582,7 +581,7 @@ class ToonHead(Actor.Actor):
self.__lod500Eyes = None self.__lod500Eyes = None
else: else:
self.__lod500Eyes.setColorOff() self.__lod500Eyes.setColorOff()
if base.config.GetBool('want-new-anims', 1): if ConfigVariableBool('want-new-anims', 1).value:
if not self.find('**/joint_pupilL*').isEmpty(): if not self.find('**/joint_pupilL*').isEmpty():
self.__lod500lPupil = self.__lod500Eyes.find('**/joint_pupilL*') self.__lod500lPupil = self.__lod500Eyes.find('**/joint_pupilL*')
self.__lod500rPupil = self.__lod500Eyes.find('**/joint_pupilR*') self.__lod500rPupil = self.__lod500Eyes.find('**/joint_pupilR*')
@ -596,7 +595,7 @@ class ToonHead(Actor.Actor):
self.__lod250Eyes = None self.__lod250Eyes = None
else: else:
self.__lod250Eyes.setColorOff() self.__lod250Eyes.setColorOff()
if base.config.GetBool('want-new-anims', 1): if ConfigVariableBool('want-new-anims', 1).value:
if not self.find('**/joint_pupilL*').isEmpty(): if not self.find('**/joint_pupilL*').isEmpty():
self.__lod250lPupil = self.__lod250Eyes.find('**/joint_pupilL*') self.__lod250lPupil = self.__lod250Eyes.find('**/joint_pupilL*')
self.__lod250rPupil = self.__lod250Eyes.find('**/joint_pupilR*') self.__lod250rPupil = self.__lod250Eyes.find('**/joint_pupilR*')
@ -608,7 +607,7 @@ class ToonHead(Actor.Actor):
self.__lod250rPupil = self.__lod250Eyes.find('**/joint_pupilR*') self.__lod250rPupil = self.__lod250Eyes.find('**/joint_pupilR*')
else: else:
self.drawInFront('eyes*', 'head-front*', mode) self.drawInFront('eyes*', 'head-front*', mode)
if base.config.GetBool('want-new-anims', 1): if ConfigVariableBool('want-new-anims', 1).value:
if not self.find('joint_pupil*').isEmpty(): if not self.find('joint_pupil*').isEmpty():
self.drawInFront('joint_pupil*', 'eyes*', -1) self.drawInFront('joint_pupil*', 'eyes*', -1)
else: else:
@ -620,7 +619,7 @@ class ToonHead(Actor.Actor):
self.__eyes.setColorOff() self.__eyes.setColorOff()
self.__lpupil = None self.__lpupil = None
self.__rpupil = None self.__rpupil = None
if base.config.GetBool('want-new-anims', 1): if ConfigVariableBool('want-new-anims', 1).value:
if not self.find('**/joint_pupilL*').isEmpty(): if not self.find('**/joint_pupilL*').isEmpty():
if self.getLOD(1000): if self.getLOD(1000):
lp = self.getLOD(1000).find('**/joint_pupilL*') lp = self.getLOD(1000).find('**/joint_pupilL*')
@ -1170,7 +1169,7 @@ class ToonHead(Actor.Actor):
if lodName == '1000' or lodName == '500': if lodName == '1000' or lodName == '500':
filePrefix = DogMuzzleDict[style.head] filePrefix = DogMuzzleDict[style.head]
muzzles = loader.loadModel('phase_3' + filePrefix + lodName) muzzles = loader.loadModel('phase_3' + filePrefix + lodName)
if base.config.GetBool('want-new-anims', 1): if ConfigVariableBool('want-new-anims', 1).value:
if not self.find('**/' + lodName + '/**/__Actor_head/def_head').isEmpty(): if not self.find('**/' + lodName + '/**/__Actor_head/def_head').isEmpty():
muzzles.reparentTo(self.find('**/' + lodName + '/**/__Actor_head/def_head')) muzzles.reparentTo(self.find('**/' + lodName + '/**/__Actor_head/def_head'))
else: else:
@ -1196,7 +1195,7 @@ class ToonHead(Actor.Actor):
muzzle = self.find('**/muzzle*') muzzle = self.find('**/muzzle*')
filePrefix = DogMuzzleDict[style.head] filePrefix = DogMuzzleDict[style.head]
muzzles = loader.loadModel('phase_3' + filePrefix + '1000') muzzles = loader.loadModel('phase_3' + filePrefix + '1000')
if base.config.GetBool('want-new-anims', 1): if ConfigVariableBool('want-new-anims', 1).value:
if not self.find('**/def_head').isEmpty(): if not self.find('**/def_head').isEmpty():
muzzles.reparentTo(self.find('**/def_head')) muzzles.reparentTo(self.find('**/def_head'))
else: else: