Some final nametag shit

This commit is contained in:
John Cote 2015-06-26 03:09:27 -04:00
parent 9b52f82419
commit 48539188de
54 changed files with 130 additions and 117 deletions

View file

@ -9,6 +9,7 @@ from Avatar import Avatar
from otp.ai.MagicWordGlobal import * from otp.ai.MagicWordGlobal import *
from otp.otpbase import OTPGlobals from otp.otpbase import OTPGlobals
from toontown.battle.BattleProps import globalPropPool from toontown.battle.BattleProps import globalPropPool
from otp.nametag.Nametag import Nametag
class DistributedAvatar(DistributedActor, Avatar): class DistributedAvatar(DistributedActor, Avatar):
@ -84,12 +85,11 @@ class DistributedAvatar(DistributedActor, Avatar):
def do_setParent(self, parentToken): def do_setParent(self, parentToken):
if not self.isDisabled(): if not self.isDisabled():
nametag2d = self.nametag.getNametag2d()
if parentToken == OTPGlobals.SPHidden: if parentToken == OTPGlobals.SPHidden:
nametag2d.hideNametag() self.nametag2dDist &= ~Nametag.CName
else: else:
nametag2d.showNametag() self.nametag2dDist |= Nametag.CName
nametag2d.update() self.nametag.getNametag2d().setContents(self.nametag2dContents & self.nametag2dDist)
DistributedActor.do_setParent(self, parentToken) DistributedActor.do_setParent(self, parentToken)
self.__setTags() self.__setTags()

View file

@ -17,6 +17,7 @@ CCSuitBuilding = 5
CCHouseBuilding = 6 CCHouseBuilding = 6
CCSpeedChat = 7 CCSpeedChat = 7
CCFreeChat = 8 CCFreeChat = 8
CCAdmin = 9
NAMETAG_COLORS = { NAMETAG_COLORS = {
CCNormal: ( CCNormal: (
@ -145,6 +146,20 @@ NAMETAG_COLORS = {
((0.3, 0.3, 0.7, 1.0), (0.8, 0.8, 0.8, 0.5), # Name ((0.3, 0.3, 0.7, 1.0), (0.8, 0.8, 0.8, 0.5), # Name
(0.0, 0.0, 0.0, 1.0), (1.0, 1.0, 1.0, 1.0)), # Chat (0.0, 0.0, 0.0, 1.0), (1.0, 1.0, 1.0, 1.0)), # Chat
), ),
CCAdmin: (
# Normal FG BG
((1.0, 0.35, 0.25, 1.0), (0.8, 0.8, 0.8, 0.5), # Name
(0.0, 0.0, 0.0, 1.0), (1.0, 1.0, 1.0, 1.0)), # Chat
# Click FG BG
((1.0, 0.35, 0.25, 1.0), (0.2, 0.2, 0.2, 0.6), # Name
(1.0, 0.5, 0.5, 1.0), (1.0, 1.0, 1.0, 1.0)), # Chat
# Hover FG BG
((1.0, 0.5, 0.56, 1.0), (1.0, 1.0, 1.0, 1.0), # Name
(0.0, 0.6, 0.6, 1.0), (1.0, 1.0, 1.0, 1.0)), # Chat
# Disable FG BG
((1.0, 0.35, 0.25, 1.0), (0.8, 0.8, 0.8, 0.5), # Name
(0.0, 0.0, 0.0, 1.0), (1.0, 1.0, 1.0, 1.0)), # Chat
),
} }
ARROW_COLORS = { ARROW_COLORS = {

View file

@ -113,7 +113,7 @@ class DistributedDoor(DistributedObject.DistributedObject, DelayDeletable):
self.nametag.setActive(0) self.nametag.setActive(0)
self.nametag.setAvatar(self.getDoorNodePath()) self.nametag.setAvatar(self.getDoorNodePath())
self.nametag.setObjectCode(self.block) self.nametag.setObjectCode(self.block)
name = self.cr.playGame.dnaData.getBlock(self.block).title name = self.cr.playGame.dnaStore.getTitleFromBlockNumber(self.block)
self.nametag.setName(name) self.nametag.setName(name)
self.nametag.manage(base.marginManager) self.nametag.manage(base.marginManager)

View file

@ -145,8 +145,8 @@ class DistributedTutorialInterior(DistributedObject.DistributedObject):
suitDNA = SuitDNA.SuitDNA() suitDNA = SuitDNA.SuitDNA()
suitDNA.newSuit('f') suitDNA.newSuit('f')
self.suit.setDNA(suitDNA) self.suit.setDNA(suitDNA)
self.suit.nametag.setNametag2d(None) self.suit.nametag3d.stash()
self.suit.nametag.setNametag3d(None) self.suit.nametag.destroy()
self.suit.loop('neutral') self.suit.loop('neutral')
self.suit.setPosHpr(-20, 8, 0, 0, 0, 0) self.suit.setPosHpr(-20, 8, 0, 0, 0, 0)
self.suit.reparentTo(self.interior) self.suit.reparentTo(self.interior)

View file

@ -87,13 +87,13 @@ class CogdoBarrelRoomIntro(CogdoGameMovie):
def start(): def start():
self.frame.show() self.frame.show()
base.setCellsActive(base.bottomCells + base.leftCells + base.rightCells, 0) base.setCellsAvailable(base.bottomCells + base.leftCells + base.rightCells, 0)
def end(): def end():
self._dialogueLabel.reparentTo(hidden) self._dialogueLabel.reparentTo(hidden)
self.toonHead.reparentTo(hidden) self.toonHead.reparentTo(hidden)
self.frame.hide() self.frame.hide()
base.setCellsActive(base.bottomCells + base.leftCells + base.rightCells, 1) base.setCellsAvailable(base.bottomCells + base.leftCells + base.rightCells, 1)
self._stopUpdateTask() self._stopUpdateTask()
self._ival = Sequence(Func(start), Func(self.displayLine, dialogue), Wait(CogdoBarrelRoomConsts.BarrelRoomIntroTimeout), Func(end)) self._ival = Sequence(Func(start), Func(self.displayLine, dialogue), Wait(CogdoBarrelRoomConsts.BarrelRoomIntroTimeout), Func(end))

View file

@ -87,13 +87,13 @@ class CogdoElevatorMovie(CogdoGameMovie):
def start(): def start():
self.frame.show() self.frame.show()
base.setCellsActive(base.bottomCells + base.leftCells + base.rightCells, 0) base.setCellsAvailable(base.bottomCells + base.leftCells + base.rightCells, 0)
def end(): def end():
self._dialogueLabel.reparentTo(hidden) self._dialogueLabel.reparentTo(hidden)
self.toonHead.reparentTo(hidden) self.toonHead.reparentTo(hidden)
self.frame.hide() self.frame.hide()
base.setCellsActive(base.bottomCells + base.leftCells + base.rightCells, 1) base.setCellsAvailable(base.bottomCells + base.leftCells + base.rightCells, 1)
self._stopUpdateTask() self._stopUpdateTask()
self._ival = Sequence(Func(start), Func(self.displayLine, dialogue), Wait(self.elevatorDuration), Func(end)) self._ival = Sequence(Func(start), Func(self.displayLine, dialogue), Wait(self.elevatorDuration), Func(end))

View file

@ -91,7 +91,7 @@ class CogdoExecutiveSuiteIntro(CogdoGameMovie):
def start(): def start():
self.frame.show() self.frame.show()
base.setCellsActive(base.bottomCells + base.leftCells + base.rightCells, 0) base.setCellsAvailable(base.bottomCells + base.leftCells + base.rightCells, 0)
def showShopOwner(): def showShopOwner():
self._setCamTarget(self._shopOwner, -10, offset=Point3(0, 0, 5)) self._setCamTarget(self._shopOwner, -10, offset=Point3(0, 0, 5))
@ -100,7 +100,7 @@ class CogdoExecutiveSuiteIntro(CogdoGameMovie):
self._dialogueLabel.reparentTo(hidden) self._dialogueLabel.reparentTo(hidden)
self.toonHead.reparentTo(hidden) self.toonHead.reparentTo(hidden)
self.frame.hide() self.frame.hide()
base.setCellsActive(base.bottomCells + base.leftCells + base.rightCells, 1) base.setCellsAvailable(base.bottomCells + base.leftCells + base.rightCells, 1)
self._stopUpdateTask() self._stopUpdateTask()
self._ival = Sequence(Func(start), Func(self.displayLine, dialogue), Func(showShopOwner), ParallelEndTogether(camera.posInterval(self.cameraMoveDuration, Point3(8, 0, 13), blendType='easeInOut'), camera.hprInterval(0.5, self._camHelperNode.getHpr(), blendType='easeInOut')), Wait(self.introDuration), Func(end)) self._ival = Sequence(Func(start), Func(self.displayLine, dialogue), Func(showShopOwner), ParallelEndTogether(camera.posInterval(self.cameraMoveDuration, Point3(8, 0, 13), blendType='easeInOut'), camera.hprInterval(0.5, self._camHelperNode.getHpr(), blendType='easeInOut')), Wait(self.introDuration), Func(end))

View file

@ -87,8 +87,8 @@ class CogdoMazeGameIntro(CogdoGameMovie):
d = SuitDNA.SuitDNA() d = SuitDNA.SuitDNA()
d.newSuit(suitData['dnaName']) d.newSuit(suitData['dnaName'])
bossSuit.setDNA(d) bossSuit.setDNA(d)
bossSuit.nametag.setNametag2d(None) bossSuit.nametag3d.stash()
bossSuit.nametag.setNametag3d(None) bossSuit.nametag.destroy()
bossSuit.setScale(suitData['scale']) bossSuit.setScale(suitData['scale'])
bossSuit.loop('neutral') bossSuit.loop('neutral')
bossSuit.reparentTo(render) bossSuit.reparentTo(render)

View file

@ -192,8 +192,8 @@ class DistributedBanquetTable(DistributedObject.DistributedObject, FSM.FSM, Banq
level -= 4 level -= 4
diner.dna.newSuitRandom(level=level, dept='c') diner.dna.newSuitRandom(level=level, dept='c')
diner.setDNA(diner.dna) diner.setDNA(diner.dna)
diner.nametag.setNametag2d(None) diner.nametag3d.stash()
diner.nametag.setNametag3d(None) diner.nametag.destroy()
if self.useNewAnimations: if self.useNewAnimations:
diner.loop('sit', fromFrame=i) diner.loop('sit', fromFrame=i)
else: else:

View file

@ -9,6 +9,7 @@ import CountryClubRoomBase, CountryClubRoom
import FactoryEntityCreator import FactoryEntityCreator
import CountryClubRoomSpecs import CountryClubRoomSpecs
from otp.level import LevelSpec, LevelConstants from otp.level import LevelSpec, LevelConstants
from otp.nametag.NametagConstants import *
from toontown.toonbase import TTLocalizer from toontown.toonbase import TTLocalizer
def getCountryClubRoomReadyPostName(doId): def getCountryClubRoomReadyPostName(doId):

View file

@ -13,6 +13,7 @@ from otp.level import LevelConstants
from toontown.toonbase import TTLocalizer from toontown.toonbase import TTLocalizer
from toontown.coghq import FactoryCameraViews from toontown.coghq import FactoryCameraViews
from direct.controls.ControlManager import CollisionHandlerRayStart from direct.controls.ControlManager import CollisionHandlerRayStart
from otp.nametag.NametagConstants import *
from otp.ai.MagicWordGlobal import * from otp.ai.MagicWordGlobal import *
class DistributedFactory(DistributedLevel.DistributedLevel, FactoryBase.FactoryBase): class DistributedFactory(DistributedLevel.DistributedLevel, FactoryBase.FactoryBase):

View file

@ -419,7 +419,7 @@ class DistributedGolfGreenGame(BattleBlocker.BattleBlocker):
self.isActive = 1 self.isActive = 1
self.__setCamera() self.__setCamera()
self.spriteNode.show() self.spriteNode.show()
base.setCellsActive([base.bottomCells[1], base.bottomCells[2], base.bottomCells[3]], 0) base.setCellsAvailable([base.bottomCells[1], base.bottomCells[2], base.bottomCells[3]], 0)
self.setupFlag = 1 self.setupFlag = 1
def startBoard(self, board, attackPattern): def startBoard(self, board, attackPattern):
@ -557,7 +557,7 @@ class DistributedGolfGreenGame(BattleBlocker.BattleBlocker):
self.isActive = 0 self.isActive = 0
if self.standbySprite: if self.standbySprite:
self.standbySprite.nodeObj.hide() self.standbySprite.nodeObj.hide()
base.setCellsActive([base.bottomCells[1], base.bottomCells[2], base.bottomCells[3]], 1) base.setCellsAvailable([base.bottomCells[1], base.bottomCells[2], base.bottomCells[3]], 1)
self.sendUpdate('leaveGame', []) self.sendUpdate('leaveGame', [])
return return

View file

@ -9,6 +9,7 @@ import MintRoomBase, MintRoom
import MintRoomSpecs import MintRoomSpecs
from otp.level import DistributedLevel from otp.level import DistributedLevel
from otp.level import LevelSpec, LevelConstants from otp.level import LevelSpec, LevelConstants
from otp.nametag.NametagConstants import *
from toontown.toonbase import TTLocalizer from toontown.toonbase import TTLocalizer
from toontown.toonbase.ToontownGlobals import * from toontown.toonbase.ToontownGlobals import *

View file

@ -9,6 +9,7 @@ import StageRoomBase, StageRoom
import FactoryEntityCreator import FactoryEntityCreator
import StageRoomSpecs import StageRoomSpecs
from otp.level import LevelSpec, LevelConstants from otp.level import LevelSpec, LevelConstants
from otp.nametag.NametagConstants import *
from toontown.toonbase import TTLocalizer from toontown.toonbase import TTLocalizer
def getStageRoomReadyPostName(doId): def getStageRoomReadyPostName(doId):

View file

@ -293,13 +293,13 @@ class ToontownClientRepository(OTPClientRepository.OTPClientRepository):
def handleAvatarResponseMsg(self, avatarId, di): def handleAvatarResponseMsg(self, avatarId, di):
self.cleanupWaitingForDatabase() self.cleanupWaitingForDatabase()
dclass = self.dclassesByName['DistributedToon'] dclass = self.dclassesByName['DistributedToon']
NametagGlobals.setWant2dNametags(False) NametagGlobals.setMasterArrowsOn(0)
loader.beginBulkLoad('localAvatarPlayGame', OTPLocalizer.CREnteringToontown, 400, 1, TTLocalizer.TIP_GENERAL, 0) loader.beginBulkLoad('localAvatarPlayGame', OTPLocalizer.CREnteringToontown, 400, 1, TTLocalizer.TIP_GENERAL, 0)
localAvatar = LocalToon.LocalToon(self) localAvatar = LocalToon.LocalToon(self)
localAvatar.dclass = dclass localAvatar.dclass = dclass
base.localAvatar = localAvatar base.localAvatar = localAvatar
__builtins__['localAvatar'] = base.localAvatar __builtins__['localAvatar'] = base.localAvatar
NametagGlobals.setMe(base.localAvatar) NametagGlobals.setToon(base.localAvatar)
localAvatar.doId = avatarId localAvatar.doId = avatarId
self.localAvatarDoId = avatarId self.localAvatarDoId = avatarId
parentId = None parentId = None
@ -423,7 +423,7 @@ class ToontownClientRepository(OTPClientRepository.OTPClientRepository):
self.notify.error('could not delete localAvatar, delayDeletes=%s' % (base.localAvatar.getDelayDeleteNames(),)) self.notify.error('could not delete localAvatar, delayDeletes=%s' % (base.localAvatar.getDelayDeleteNames(),))
base.localAvatar.deleteOrDelay() base.localAvatar.deleteOrDelay()
base.localAvatar.detectLeaks() base.localAvatar.detectLeaks()
NametagGlobals.setMe(base.cam) NametagGlobals.setToon(base.cam)
del base.localAvatar del base.localAvatar
del __builtins__['localAvatar'] del __builtins__['localAvatar']
base.localAvatarStyle = None base.localAvatarStyle = None

View file

@ -155,12 +155,12 @@ class DistributedTarget(DistributedObject.DistributedObject):
def showTimer(self): def showTimer(self):
if base.localAvatar.animFSM.getCurrentState().getName() != 'ReadBook': if base.localAvatar.animFSM.getCurrentState().getName() != 'ReadBook':
base.setCellsActive([base.rightCells[0]], 0) base.setCellsAvailable([base.rightCells[0]], 0)
self.timer.show() self.timer.show()
def hideTimer(self): def hideTimer(self):
self.timer.hide() self.timer.hide()
base.setCellsActive([base.rightCells[0]], 1) base.setCellsAvailable([base.rightCells[0]], 1)
def setPosition(self, x, y, z): def setPosition(self, x, y, z):
self.geom.setPos(x, y, z) self.geom.setPos(x, y, z)

View file

@ -383,7 +383,7 @@ class ObjectManager(NodePath, DirectObject):
self.__updateDeleteButtons() self.__updateDeleteButtons()
self.showAtticPicker() self.showAtticPicker()
base.localAvatar.laffMeter.stop() base.localAvatar.laffMeter.stop()
base.setCellsActive(base.leftCells + [base.bottomCells[0]], 0) base.setCellsAvailable(base.leftCells + [base.bottomCells[0]], 0)
if self.guiInterval: if self.guiInterval:
self.guiInterval.finish() self.guiInterval.finish()
self.guiInterval = self.furnitureGui.posHprScaleInterval(1.0, Point3(0.155, -0.6, -1.045), Vec3(0), Vec3(0.06), startPos=Point3(0.115, 0.0, -0.66), startHpr=Vec3(0), startScale=Vec3(0.04), blendType='easeInOut', name='lerpFurnitureButton') self.guiInterval = self.furnitureGui.posHprScaleInterval(1.0, Point3(0.155, -0.6, -1.045), Vec3(0), Vec3(0.06), startPos=Point3(0.115, 0.0, -0.66), startHpr=Vec3(0), startScale=Vec3(0.04), blendType='easeInOut', name='lerpFurnitureButton')
@ -419,7 +419,7 @@ class ObjectManager(NodePath, DirectObject):
self.inTrashPicker = None self.inTrashPicker = None
self.__cleanupVerifyDelete() self.__cleanupVerifyDelete()
self.furnitureGui.hide() self.furnitureGui.hide()
base.setCellsActive(base.leftCells + [base.bottomCells[0]], 1) base.setCellsAvailable(base.leftCells + [base.bottomCells[0]], 1)
base.localAvatar.laffMeter.start() base.localAvatar.laffMeter.start()
taskMgr.remove('recenterButtonFrameTask') taskMgr.remove('recenterButtonFrameTask')
self.cleanupDialog() self.cleanupDialog()

View file

@ -270,10 +270,10 @@ class FriendsListPanel(DirectFrame, StateData.StateData):
friendButton.destroy() friendButton.destroy()
del self.friends[friendId] del self.friends[friendId]
self.createButtons(petFriends, NametagColors[CCNonPlayer][0][0]) self.createButtons(petFriends, NAMETAG_COLORS[CCNonPlayer][0][0])
self.createButtons(admins, NametagColors[CCAdmin][0][0]) self.createButtons(admins, NAMETAG_COLORS[CCAdmin][0][0])
self.createButtons(trueFriends, NametagColors[CCNormal][0][0]) self.createButtons(trueFriends, NAMETAG_COLORS[CCNormal][0][0])
self.createButtons(friends, NametagColors[CCSpeedChat][0][0]) self.createButtons(friends, NAMETAG_COLORS[CCSpeedChat][0][0])
self.scrollList.index = self.listScrollIndex[self.panelType] self.scrollList.index = self.listScrollIndex[self.panelType]
self.scrollList.refresh() self.scrollList.refresh()

View file

@ -157,7 +157,7 @@ class DistributedGolfCourse(DistributedObject.DistributedObject, FSM, DelayDelet
else: else:
color += 1 color += 1
base.setCellsActive(base.leftCells, 0) base.setCellsAvailable(base.leftCells, 0)
else: else:
self.toonPanels = None self.toonPanels = None
@ -201,7 +201,7 @@ class DistributedGolfCourse(DistributedObject.DistributedObject, FSM, DelayDelet
else: else:
self.notify.warning('GOLF COURSE: Attempting to clean up twice') self.notify.warning('GOLF COURSE: Attempting to clean up twice')
base.setCellsActive(base.leftCells, 1) base.setCellsAvailable(base.leftCells, 1)
def onstage(self): def onstage(self):
self.notify.debug('GOLF COURSE: onstage') self.notify.debug('GOLF COURSE: onstage')

View file

@ -436,7 +436,7 @@ class Place(StateData.StateData, FriendsListManager.FriendsListManager):
self.fsm.request(out[requestStatus['how']], [requestStatus]) self.fsm.request(out[requestStatus['how']], [requestStatus])
def enterDoorIn(self, requestStatus): def enterDoorIn(self, requestStatus):
NametagGlobals.setWant2dNametags(False) NametagGlobals.setMasterArrowsOn(0)
door = base.cr.doId2do.get(requestStatus['doorDoId']) door = base.cr.doId2do.get(requestStatus['doorDoId'])
if not door is None: if not door is None:
door.readyToExit() door.readyToExit()
@ -444,7 +444,7 @@ class Place(StateData.StateData, FriendsListManager.FriendsListManager):
base.localAvatar.startQuestMap() base.localAvatar.startQuestMap()
def exitDoorIn(self): def exitDoorIn(self):
NametagGlobals.setWant2dNametags(True) NametagGlobals.setMasterArrowsOn(1)
base.localAvatar.obscureMoveFurnitureButton(-1) base.localAvatar.obscureMoveFurnitureButton(-1)
def enterDoorOut(self): def enterDoorOut(self):
@ -600,7 +600,7 @@ class Place(StateData.StateData, FriendsListManager.FriendsListManager):
def _placeTeleportInPostZoneComplete(self, requestStatus): def _placeTeleportInPostZoneComplete(self, requestStatus):
teleportDebug(requestStatus, '_placeTeleportInPostZoneComplete(%s)' % (requestStatus,)) teleportDebug(requestStatus, '_placeTeleportInPostZoneComplete(%s)' % (requestStatus,))
NametagGlobals.setWant2dNametags(False) NametagGlobals.setMasterArrowsOn(0)
base.localAvatar.laffMeter.start() base.localAvatar.laffMeter.start()
base.localAvatar.startQuestMap() base.localAvatar.startQuestMap()
base.localAvatar.reconsiderCheesyEffect() base.localAvatar.reconsiderCheesyEffect()
@ -645,7 +645,7 @@ class Place(StateData.StateData, FriendsListManager.FriendsListManager):
def exitTeleportIn(self): def exitTeleportIn(self):
self.removeSetZoneCompleteCallback(self._tiToken) self.removeSetZoneCompleteCallback(self._tiToken)
self._tiToken = None self._tiToken = None
NametagGlobals.setWant2dNametags(True) NametagGlobals.setMasterArrowsOn(1)
base.localAvatar.laffMeter.stop() base.localAvatar.laffMeter.stop()
base.localAvatar.obscureMoveFurnitureButton(-1) base.localAvatar.obscureMoveFurnitureButton(-1)
base.localAvatar.stopUpdateSmartCamera() base.localAvatar.stopUpdateSmartCamera()

View file

@ -116,8 +116,8 @@ class DistributedCatchGame(DistributedMinigame):
d = SuitDNA.SuitDNA() d = SuitDNA.SuitDNA()
d.newSuit(type) d.newSuit(type)
suit.setDNA(d) suit.setDNA(d)
suit.nametag.setNametag2d(None) suit.nametag3d.stash()
suit.nametag.setNametag3d(None) suit.nametag.destroy()
suit.pose('walk', 0) suit.pose('walk', 0)
self.suits.append(suit) self.suits.append(suit)

View file

@ -176,8 +176,8 @@ class DistributedCogThiefGame(DistributedMinigame):
pos = self.cogInfo[cogIndex]['pos'] pos = self.cogInfo[cogIndex]['pos']
suit.reparentTo(self.gameBoard) suit.reparentTo(self.gameBoard)
suit.setPos(pos) suit.setPos(pos)
suit.nametag.setNametag2d(None) suit.nametag3d.stash()
suit.nametag.setNametag3d(None) suit.nametag.destroy()
for avId in self.avIdList: for avId in self.avIdList:
self.toonHitTracks[avId] = Wait(0.1) self.toonHitTracks[avId] = Wait(0.1)

View file

@ -621,7 +621,7 @@ class DistributedMazeGame(DistributedMinigame):
self.scorePanels = [] self.scorePanels = []
self.goalBar.destroy() self.goalBar.destroy()
del self.goalBar del self.goalBar
base.setCellsActive(base.rightCells, 1) base.setCellsAvailable(base.rightCells, 1)
for suit in self.suits: for suit in self.suits:
suit.offstage() suit.offstage()
@ -700,7 +700,7 @@ class DistributedMazeGame(DistributedMinigame):
self.goalBar.show() self.goalBar.show()
self.goalBar['value'] = 0.0 self.goalBar['value'] = 0.0
base.setCellsActive(base.rightCells, 0) base.setCellsAvailable(base.rightCells, 0)
self.__spawnUpdateSuitsTask() self.__spawnUpdateSuitsTask()
orthoDrive = OrthoDrive(self.TOON_SPEED, maxFrameMove=self.MAX_FRAME_MOVE, customCollisionCallback=self.__doMazeCollisions, priority=1) orthoDrive = OrthoDrive(self.TOON_SPEED, maxFrameMove=self.MAX_FRAME_MOVE, customCollisionCallback=self.__doMazeCollisions, priority=1)
self.orthoWalk = OrthoWalk(orthoDrive, broadcast=not self.isSinglePlayer()) self.orthoWalk = OrthoWalk(orthoDrive, broadcast=not self.isSinglePlayer())

View file

@ -162,7 +162,7 @@ class DistributedTagGame(DistributedMinigame):
scorePanel.reparentTo(base.a2dBottomRight) scorePanel.reparentTo(base.a2dBottomRight)
self.scorePanels.append(scorePanel) self.scorePanels.append(scorePanel)
base.setCellsActive(base.rightCells, 0) base.setCellsAvailable(base.rightCells, 0)
self.walkStateData.enter() self.walkStateData.enter()
self.walkStateData.fsm.request('walking') self.walkStateData.fsm.request('walking')
if base.localAvatar.isIt: if base.localAvatar.isIt:
@ -195,7 +195,7 @@ class DistributedTagGame(DistributedMinigame):
panel.cleanup() panel.cleanup()
self.scorePanels = [] self.scorePanels = []
base.setCellsActive(base.rightCells, 1) base.setCellsAvailable(base.rightCells, 1)
base.mouseInterfaceNode.setForwardSpeed(ToontownGlobals.ToonForwardSpeed) base.mouseInterfaceNode.setForwardSpeed(ToontownGlobals.ToonForwardSpeed)
base.mouseInterfaceNode.setRotateSpeed(ToontownGlobals.ToonRotateSpeed) base.mouseInterfaceNode.setRotateSpeed(ToontownGlobals.ToonRotateSpeed)
self.itPointer.reparentTo(hidden) self.itPointer.reparentTo(hidden)

View file

@ -43,8 +43,8 @@ class MazeSuit(DirectObject):
d = SuitDNA.SuitDNA() d = SuitDNA.SuitDNA()
d.newSuit(suitDnaName) d.newSuit(suitDnaName)
self.suit.setDNA(d) self.suit.setDNA(d)
self.suit.nametag.setNametag2d(None) self.suit.nametag3d.stash()
self.suit.nametag.setNametag3d(None) self.suit.nametag.destroy()
if startTile is None: if startTile is None:
defaultStartPos = MazeGameGlobals.SUIT_START_POSITIONS[self.serialNum] defaultStartPos = MazeGameGlobals.SUIT_START_POSITIONS[self.serialNum]
self.startTile = (defaultStartPos[0] * self.maze.width, defaultStartPos[1] * self.maze.height) self.startTile = (defaultStartPos[0] * self.maze.width, defaultStartPos[1] * self.maze.height)

View file

@ -84,8 +84,8 @@ class TwoDEnemy(DirectObject):
self.suit.pose('walk', 0) self.suit.pose('walk', 0)
self.suitName = 'Enemy-%s' % self.index self.suitName = 'Enemy-%s' % self.index
self.suit.setName(self.suitName) self.suit.setName(self.suitName)
self.suit.nametag.setNametag2d(None) self.suit.nametag3d.stash()
self.suit.nametag.setNametag3d(None) self.suit.nametag.destroy()
suitPosAttribs = suitAttribs[1] suitPosAttribs = suitAttribs[1]
initX, initY, initZ = suitPosAttribs[0] initX, initY, initZ = suitPosAttribs[0]
initPos = Point3(initX, initY, initZ) initPos = Point3(initX, initY, initZ)

View file

@ -75,8 +75,8 @@ class CannonGui(DirectObject):
def enable(self, timer = 0): def enable(self, timer = 0):
self.__aimPad.show() self.__aimPad.show()
base.setCellsActive([base.bottomCells[2], base.bottomCells[3]], 0) base.setCellsAvailable([base.bottomCells[2], base.bottomCells[3]], 0)
base.setCellsActive([base.rightCells[1]], 0) base.setCellsAvailable([base.rightCells[1]], 0)
if timer > 0: if timer > 0:
self.__timerPad.setTime(timer) self.__timerPad.setTime(timer)
self.__timerPad.countdown(timer) self.__timerPad.countdown(timer)
@ -85,8 +85,8 @@ class CannonGui(DirectObject):
def disable(self): def disable(self):
self.__aimPad.hide() self.__aimPad.hide()
base.setCellsActive([base.bottomCells[2], base.bottomCells[3]], 1) base.setCellsAvailable([base.bottomCells[2], base.bottomCells[3]], 1)
base.setCellsActive([base.rightCells[1]], 1) base.setCellsAvailable([base.rightCells[1]], 1)
self.__timerPad.hide() self.__timerPad.hide()
self.disableKeys() self.disableKeys()

View file

@ -496,7 +496,7 @@ class DistributedPartyActivity(DistributedObject.DistributedObject):
self.notify.debug('BASE: startRules') self.notify.debug('BASE: startRules')
self.accept(self.rulesDoneEvent, self.handleRulesDone) self.accept(self.rulesDoneEvent, self.handleRulesDone)
self.rulesPanel = MinigameRulesPanel('PartyRulesPanel', self.getTitle(), self.getInstructions(), self.rulesDoneEvent, timeout) self.rulesPanel = MinigameRulesPanel('PartyRulesPanel', self.getTitle(), self.getInstructions(), self.rulesDoneEvent, timeout)
base.setCellsActive(base.bottomCells + [base.leftCells[0], base.rightCells[1]], False) base.setCellsAvailable(base.bottomCells + [base.leftCells[0], base.rightCells[1]], False)
self.rulesPanel.load() self.rulesPanel.load()
self.rulesPanel.enter() self.rulesPanel.enter()
@ -507,7 +507,7 @@ class DistributedPartyActivity(DistributedObject.DistributedObject):
self.rulesPanel.exit() self.rulesPanel.exit()
self.rulesPanel.unload() self.rulesPanel.unload()
del self.rulesPanel del self.rulesPanel
base.setCellsActive(base.bottomCells + [base.leftCells[0], base.rightCells[1]], True) base.setCellsAvailable(base.bottomCells + [base.leftCells[0], base.rightCells[1]], True)
def handleRulesDone(self): def handleRulesDone(self):
self.notify.error('BASE: handleRulesDone should be overridden') self.notify.error('BASE: handleRulesDone should be overridden')

View file

@ -299,7 +299,7 @@ class DistributedPartyTrampolineActivity(DistributedPartyActivity):
def startActive(self): def startActive(self):
DistributedPartyTrampolineActivity.notify.debug('startActive') DistributedPartyTrampolineActivity.notify.debug('startActive')
if self.toon != None and self.toon.doId == base.localAvatar.doId: if self.toon != None and self.toon.doId == base.localAvatar.doId:
base.setCellsActive(base.bottomCells, True) base.setCellsAvailable(base.bottomCells, True)
self.accept('arrow_left', self.onLeft) self.accept('arrow_left', self.onLeft)
self.accept('arrow_left-up', self.onLeftUp) self.accept('arrow_left-up', self.onLeftUp)
self.accept('arrow_right', self.onRight) self.accept('arrow_right', self.onRight)
@ -390,8 +390,8 @@ class DistributedPartyTrampolineActivity(DistributedPartyActivity):
self.timeLeftToSimulate = 0.0 self.timeLeftToSimulate = 0.0
self.doSimulateStep = False self.doSimulateStep = False
taskMgr.add(self.updateTask, self.uniqueName('TrampolineActivity.updateTask')) taskMgr.add(self.updateTask, self.uniqueName('TrampolineActivity.updateTask'))
base.setCellsActive(base.leftCells, False) base.setCellsAvailable(base.leftCells, False)
base.setCellsActive(base.bottomCells, False) base.setCellsAvailable(base.bottomCells, False)
DistributedPartyActivity.startRules(self) DistributedPartyActivity.startRules(self)
def releaseToon(self): def releaseToon(self):
@ -405,7 +405,7 @@ class DistributedPartyTrampolineActivity(DistributedPartyActivity):
self.hopOffAnim.start() self.hopOffAnim.start()
def postHopOff(self): def postHopOff(self):
base.setCellsActive(base.leftCells, True) base.setCellsAvailable(base.leftCells, True)
self.timer.stop() self.timer.stop()
self.timer.hide() self.timer.hide()
self.toon.dropShadow.reparentTo(self.toon.getShadowJoint()) self.toon.dropShadow.reparentTo(self.toon.getShadowJoint())

View file

@ -109,7 +109,7 @@ class PartyCatchActivityToonSD(StateData.StateData):
self.activity.orthoWalk.stop() self.activity.orthoWalk.stop()
self.accept(self.activity.rulesDoneEvent, self.handleRulesDone) self.accept(self.activity.rulesDoneEvent, self.handleRulesDone)
self.rulesPanel = MinigameRulesPanel('PartyRulesPanel', self.activity.getTitle(), self.activity.getInstructions(), self.activity.rulesDoneEvent, PartyGlobals.DefaultRulesTimeout) self.rulesPanel = MinigameRulesPanel('PartyRulesPanel', self.activity.getTitle(), self.activity.getInstructions(), self.activity.rulesDoneEvent, PartyGlobals.DefaultRulesTimeout)
base.setCellsActive(base.bottomCells + [base.leftCells[0], base.rightCells[1]], False) base.setCellsAvailable(base.bottomCells + [base.leftCells[0], base.rightCells[1]], False)
self.rulesPanel.load() self.rulesPanel.load()
self.rulesPanel.enter() self.rulesPanel.enter()
else: else:
@ -125,7 +125,7 @@ class PartyCatchActivityToonSD(StateData.StateData):
self.rulesPanel.exit() self.rulesPanel.exit()
self.rulesPanel.unload() self.rulesPanel.unload()
del self.rulesPanel del self.rulesPanel
base.setCellsActive(base.bottomCells + [base.leftCells[0], base.rightCells[1]], True) base.setCellsAvailable(base.bottomCells + [base.leftCells[0], base.rightCells[1]], True)
def enterNormal(self): def enterNormal(self):
self.notify.debug('enterNormal') self.notify.debug('enterNormal')

View file

@ -254,12 +254,12 @@ class PartyCogActivityGui(DirectObject):
def disableToontownHUD(self): def disableToontownHUD(self):
base.localAvatar.hideName() base.localAvatar.hideName()
base.localAvatar.laffMeter.hide() base.localAvatar.laffMeter.hide()
base.setCellsActive(base.bottomCells + [base.rightCells[1]], False) base.setCellsAvailable(base.bottomCells + [base.rightCells[1]], False)
def enableToontownHUD(self): def enableToontownHUD(self):
base.localAvatar.showName() base.localAvatar.showName()
base.localAvatar.laffMeter.show() base.localAvatar.laffMeter.show()
base.setCellsActive(base.bottomCells + [base.rightCells[1]], True) base.setCellsAvailable(base.bottomCells + [base.rightCells[1]], True)
def setTeam(self, team): def setTeam(self, team):
self.team = team self.team = team

View file

@ -243,9 +243,9 @@ class PublicPartyGui(DirectFrame):
return (list, label) return (list, label)
def stash(self): def stash(self):
base.setCellsActive(base.bottomCells, 1) base.setCellsAvailable(base.bottomCells, 1)
DirectFrame.stash(self) DirectFrame.stash(self)
def unstash(self): def unstash(self):
base.setCellsActive(base.bottomCells, 0) base.setCellsAvailable(base.bottomCells, 0)
DirectFrame.unstash(self) DirectFrame.unstash(self)

View file

@ -19,8 +19,8 @@ class QuestChoiceGui(DirectFrame):
self.timer = ToontownTimer.ToontownTimer() self.timer = ToontownTimer.ToontownTimer()
self.timer.reparentTo(self) self.timer.reparentTo(self)
self.timer.setScale(0.3) self.timer.setScale(0.3)
base.setCellsActive(base.leftCells, 0) base.setCellsAvailable(base.leftCells, 0)
base.setCellsActive([base.bottomCells[0], base.bottomCells[1]], 0) base.setCellsAvailable([base.bottomCells[0], base.bottomCells[1]], 0)
def setQuests(self, quests, fromNpcId, timeout): def setQuests(self, quests, fromNpcId, timeout):
for i in xrange(0, len(quests), 3): for i in xrange(0, len(quests), 3):
@ -56,8 +56,8 @@ class QuestChoiceGui(DirectFrame):
if questId != 0: if questId != 0:
if base.config.GetBool('want-qa-regression', 0): if base.config.GetBool('want-qa-regression', 0):
self.notify.info('QA-REGRESSION: CREATEATASK: Create A Task.') self.notify.info('QA-REGRESSION: CREATEATASK: Create A Task.')
base.setCellsActive(base.leftCells, 1) base.setCellsAvailable(base.leftCells, 1)
base.setCellsActive([base.bottomCells[0], base.bottomCells[1]], 1) base.setCellsAvailable([base.bottomCells[0], base.bottomCells[1]], 1)
self.timer.stop() self.timer.stop()
messenger.send('chooseQuest', [questId]) messenger.send('chooseQuest', [questId])

View file

@ -223,7 +223,7 @@ class DistributedFishingSpot(DistributedObject.DistributedObject):
else: else:
self.collSphere.setTangible(1) self.collSphere.setTangible(1)
if self.avId == base.localAvatar.doId: if self.avId == base.localAvatar.doId:
base.setCellsActive(base.bottomCells, 0) base.setCellsAvailable(base.bottomCells, 0)
self.localToonFishing = 1 self.localToonFishing = 1
if base.wantBingo: if base.wantBingo:
self.pond.setLocalToonSpot(self) self.pond.setLocalToonSpot(self)
@ -240,8 +240,8 @@ class DistributedFishingSpot(DistributedObject.DistributedObject):
self.__hideCastGui() self.__hideCastGui()
if base.wantBingo: if base.wantBingo:
self.pond.setLocalToonSpot() self.pond.setLocalToonSpot()
base.setCellsActive([base.bottomCells[1], base.bottomCells[2]], 1) base.setCellsAvailable([base.bottomCells[1], base.bottomCells[2]], 1)
base.setCellsActive(base.rightCells, 1) base.setCellsAvailable(base.rightCells, 1)
place = base.cr.playGame.getPlace() place = base.cr.playGame.getPlace()
if place: if place:
place.setState('walk') place.setState('walk')
@ -643,7 +643,7 @@ class DistributedFishingSpot(DistributedObject.DistributedObject):
jar = self.castGui.find('**/jar') jar = self.castGui.find('**/jar')
self.castGui.find('**/display_jar').reparentTo(jar) self.castGui.find('**/display_jar').reparentTo(jar)
self.jar.reparentTo(jar) self.jar.reparentTo(jar)
base.setCellsActive(base.rightCells, 0) base.setCellsAvailable(base.rightCells, 0)
bucket.setScale(0.9) bucket.setScale(0.9)
bucket.setX(-1.9) bucket.setX(-1.9)
bucket.setZ(-.11) bucket.setZ(-.11)

View file

@ -500,10 +500,10 @@ class DistributedPicnicTable(DistributedNode.DistributedNode):
self.tableclothSphereNode.setCollideMask(BitMask32(0)) self.tableclothSphereNode.setCollideMask(BitMask32(0))
def enterOff(self): def enterOff(self):
base.setCellsActive(base.leftCells + base.bottomCells, 0) base.setCellsAvailable(base.leftCells + base.bottomCells, 0)
def exitOff(self): def exitOff(self):
base.setCellsActive(base.bottomCells, 0) base.setCellsAvailable(base.bottomCells, 0)
def enterChooseMode(self): def enterChooseMode(self):
self.winTrack = Sequence(autoFinish=1) self.winTrack = Sequence(autoFinish=1)

View file

@ -219,7 +219,7 @@ class Playground(Place.Place):
self.loader.hood.startSky() self.loader.hood.startSky()
lightsOn = LerpColorScaleInterval(base.cr.playGame.hood.loader.geom, 0.1, Vec4(1, 1, 1, 1)) lightsOn = LerpColorScaleInterval(base.cr.playGame.hood.loader.geom, 0.1, Vec4(1, 1, 1, 1))
lightsOn.start() lightsOn.start()
NametagGlobals.setWant2dNametags(True) NametagGlobals.setMasterArrowsOn(1)
self.zoneId = requestStatus['zoneId'] self.zoneId = requestStatus['zoneId']
self.tunnelOriginList = base.cr.hoodMgr.addLinkTunnelHooks(self, self.loader.nodeList) self.tunnelOriginList = base.cr.hoodMgr.addLinkTunnelHooks(self, self.loader.nodeList)
how = requestStatus['how'] how = requestStatus['how']
@ -243,7 +243,7 @@ class Playground(Place.Place):
light.reparentTo(hidden) light.reparentTo(hidden)
newsManager = base.cr.newsManager newsManager = base.cr.newsManager
NametagGlobals.setWant2dNametags(False) NametagGlobals.setMasterArrowsOn(0)
for i in self.loader.nodeList: for i in self.loader.nodeList:
self.loader.exitAnimatedProps(i) self.loader.exitAnimatedProps(i)

View file

@ -183,8 +183,8 @@ class DistributedGoon(DistributedCrushableEntity.DistributedCrushableEntity, Goo
Goon.Goon.delete(self) Goon.Goon.delete(self)
def enterOff(self, *args): def enterOff(self, *args):
self.nametag.setNametag2d(None) self.nametag3d.stash()
self.nametag.setNametag3d(None) self.nametag.destroy()
self.hide() self.hide()
self.isStunned = 0 self.isStunned = 0
self.isDead = 0 self.isDead = 0

View file

@ -6,10 +6,9 @@ import time
from DistributedNPCToonBase import * from DistributedNPCToonBase import *
import NPCToons import NPCToons
from toontown.chat.ChatGlobals import *
from toontown.fishing import FishSellGUI from toontown.fishing import FishSellGUI
from toontown.nametag.NametagGlobals import *
from toontown.toonbase import TTLocalizer from toontown.toonbase import TTLocalizer
from otp.nametag.NametagConstants import *
class DistributedNPCFisherman(DistributedNPCToonBase): class DistributedNPCFisherman(DistributedNPCToonBase):

View file

@ -1,4 +1,4 @@
from toontown.chat.ChatGlobals import CFSpeech, CFTimeout from otp.nametag.NametagConstants import CFSpeech, CFTimeout
from toontown.toonbase import TTLocalizer, ToontownGlobals from toontown.toonbase import TTLocalizer, ToontownGlobals
from toontown.toon import NPCToons from toontown.toon import NPCToons
from DistributedNPCToonBase import DistributedNPCToonBase from DistributedNPCToonBase import DistributedNPCToonBase
@ -45,14 +45,14 @@ class DistributedNPCGlove(DistributedNPCToonBase):
return return
base.cr.playGame.getPlace().fsm.request('stopped') base.cr.playGame.getPlace().fsm.request('stopped')
base.setCellsActive(base.bottomCells, 0) base.setCellsAvailable(base.bottomCells, 0)
self.setChatAbsolute(TTLocalizer.GlovePickColorMessage, CFSpeech|CFTimeout) self.setChatAbsolute(TTLocalizer.GlovePickColorMessage, CFSpeech|CFTimeout)
self.acceptOnce('gloveShopDone', self.__gloveShopDone) self.acceptOnce('gloveShopDone', self.__gloveShopDone)
self.gloveDialog = GloveShopGui.GloveShopGui() self.gloveDialog = GloveShopGui.GloveShopGui()
def freeAvatar(self): def freeAvatar(self):
base.cr.playGame.getPlace().fsm.request('walk') base.cr.playGame.getPlace().fsm.request('walk')
base.setCellsActive(base.bottomCells, 1) base.setCellsAvailable(base.bottomCells, 1)
def __gloveShopDone(self, state, glove): def __gloveShopDone(self, state, glove):
self.freeAvatar() self.freeAvatar()

View file

@ -4,11 +4,10 @@ from panda3d.core import *
from DistributedNPCToonBase import * from DistributedNPCToonBase import *
import NPCToons import NPCToons
from toontown.chat.ChatGlobals import *
from toontown.nametag.NametagGlobals import *
from toontown.racing.KartShopGlobals import * from toontown.racing.KartShopGlobals import *
from toontown.racing.KartShopGui import * from toontown.racing.KartShopGui import *
from toontown.toonbase import TTLocalizer from toontown.toonbase import TTLocalizer
from otp.nametag.NametagConstants import *
class DistributedNPCKartClerk(DistributedNPCToonBase): class DistributedNPCKartClerk(DistributedNPCToonBase):

View file

@ -1,6 +1,6 @@
from panda3d.core import * from panda3d.core import *
from direct.distributed import ClockDelta from direct.distributed import ClockDelta
from toontown.chat.ChatGlobals import CFSpeech, CFTimeout from otp.nametag.NametagConstants import CFSpeech, CFTimeout
from toontown.toonbase import TTLocalizer, ToontownGlobals from toontown.toonbase import TTLocalizer, ToontownGlobals
from toontown.toontowngui import TTDialog from toontown.toontowngui import TTDialog
from toontown.toon import NPCToons from toontown.toon import NPCToons

View file

@ -5,7 +5,7 @@ from panda3d.core import *
from DistributedNPCToonBase import DistributedNPCToonBase from DistributedNPCToonBase import DistributedNPCToonBase
from otp.otpbase import OTPLocalizer from otp.otpbase import OTPLocalizer
from toontown.chat.ChatGlobals import * from otp.nametag.NametagConstants import *
from toontown.parties import PartyGlobals from toontown.parties import PartyGlobals
from toontown.toon import NPCToons from toontown.toon import NPCToons
from toontown.toonbase import TTLocalizer from toontown.toonbase import TTLocalizer

View file

@ -4,11 +4,10 @@ from panda3d.core import *
from DistributedNPCToonBase import * from DistributedNPCToonBase import *
import NPCToons import NPCToons
from toontown.chat.ChatGlobals import *
from toontown.hood import ZoneUtil from toontown.hood import ZoneUtil
from toontown.nametag.NametagGlobals import *
from toontown.pets import PetshopGUI from toontown.pets import PetshopGUI
from toontown.toonbase import TTLocalizer from toontown.toonbase import TTLocalizer
from otp.nametag.NametagConstants import *
class DistributedNPCPetclerk(DistributedNPCToonBase): class DistributedNPCPetclerk(DistributedNPCToonBase):

View file

@ -2,13 +2,12 @@ from direct.interval.IntervalGlobal import *
from panda3d.core import * from panda3d.core import *
from DistributedNPCToonBase import * from DistributedNPCToonBase import *
from toontown.chat.ChatGlobals import *
from toontown.hood import ZoneUtil from toontown.hood import ZoneUtil
from toontown.nametag.NametagGlobals import *
from toontown.quest import QuestChoiceGui from toontown.quest import QuestChoiceGui
from toontown.quest import QuestParser from toontown.quest import QuestParser
from toontown.quest import TrackChoiceGui from toontown.quest import TrackChoiceGui
from toontown.toonbase import TTLocalizer from toontown.toonbase import TTLocalizer
from otp.nametag.NametagConstants import *
ChoiceTimeout = 20 ChoiceTimeout = 20

View file

@ -3,7 +3,6 @@ from direct.task.Task import Task
from panda3d.core import * from panda3d.core import *
from DistributedNPCToonBaseAI import * from DistributedNPCToonBaseAI import *
from toontown.quest import Quests from toontown.quest import Quests
from toontown.nametag.NametagGlobals import *
class DistributedNPCSpecialQuestGiverAI(DistributedNPCToonBaseAI): class DistributedNPCSpecialQuestGiverAI(DistributedNPCToonBaseAI):

View file

@ -6,7 +6,7 @@ from DistributedNPCToonBase import *
import NPCToons import NPCToons
import TailorClothesGUI import TailorClothesGUI
import ToonDNA import ToonDNA
from toontown.chat.ChatGlobals import * from otp.nametag.NametagConstants import *
from toontown.estate import ClosetGlobals from toontown.estate import ClosetGlobals
from toontown.toonbase import TTLocalizer from toontown.toonbase import TTLocalizer

View file

@ -1,9 +1,8 @@
from panda3d.core import * from panda3d.core import *
from DistributedNPCToonBase import * from DistributedNPCToonBase import *
from toontown.chat.ChatGlobals import *
from toontown.hood import ZoneUtil from toontown.hood import ZoneUtil
from toontown.nametag.NametagGlobals import * from otp.nametag.NametagConstants import *
from toontown.quest import QuestChoiceGui from toontown.quest import QuestChoiceGui
from toontown.quest import QuestParser from toontown.quest import QuestParser
from toontown.quest import TrackChoiceGui from toontown.quest import TrackChoiceGui

View file

@ -1211,10 +1211,11 @@ class DistributedToon(DistributedPlayer.DistributedPlayer, Toon.Toon, Distribute
realIndexToUse = 0 realIndexToUse = 0
if type(index) == type(0) and 0 <= index and index < len(speedChatStyles): if type(index) == type(0) and 0 <= index and index < len(speedChatStyles):
realIndexToUse = index realIndexToUse = index
else:
base.cr.centralLogger.writeClientEvent('Hacker victim setSpeedChatStyleIndex invalid attacking toon = %d' % self.doId)
self.speedChatStyleIndex = realIndexToUse self.speedChatStyleIndex = realIndexToUse
nameKey, arrowColor, rolloverColor, frameColor = speedChatStyles[realIndexToUse] nameKey, arrowColor, rolloverColor, frameColor = speedChatStyles[realIndexToUse]
self.nametag.setSpeedChatColor(VBase4(frameColor[0], frameColor[1], frameColor[2], 1)) self.nametag.setQtColor(VBase4(frameColor[0], frameColor[1], frameColor[2], 1))
self.nametag.updateAll()
if self.isLocal(): if self.isLocal():
messenger.send('SpeedChatStyleChange', []) messenger.send('SpeedChatStyleChange', [])
@ -1990,11 +1991,11 @@ class DistributedToon(DistributedPlayer.DistributedPlayer, Toon.Toon, Distribute
base.playSfx(dialogue, node=self) base.playSfx(dialogue, node=self)
elif chatFlags & CFSpeech != 0: elif chatFlags & CFSpeech != 0:
if self.nametag.getNumChatPages() > 0: if self.nametag.getNumChatPages() > 0:
self.playDialogueForString(self.nametag.getChatText()) self.playDialogueForString(self.nametag.getChat())
if self.soundChatBubble != None: if self.soundChatBubble != None:
base.playSfx(self.soundChatBubble, node=self) base.playSfx(self.soundChatBubble, node=self)
elif self.nametag.getStompChatText(): elif self.nametag.getChatStomp():
self.playDialogueForString(self.nametag.getStompChatText(), self.nametag.CHAT_STOMP_DELAY) self.playDialogueForString(self.nametag.getStompText(), self.nametag.getStompDelay())
def playDialogueForString(self, chatString, delay = 0.0): def playDialogueForString(self, chatString, delay = 0.0):
if len(chatString) == 0: if len(chatString) == 0:

View file

@ -1,7 +1,6 @@
from direct.directnotify import DirectNotifyGlobal from direct.directnotify import DirectNotifyGlobal
from toontown.toonbase import ToontownGlobals from toontown.toonbase import ToontownGlobals
from toontown.toonbase import TTLocalizer from toontown.toonbase import TTLocalizer
from toontown.nametag import NametagGlobals
from direct.gui.DirectGui import * from direct.gui.DirectGui import *
from panda3d.core import * from panda3d.core import *
from direct.showbase import DirectObject from direct.showbase import DirectObject
@ -30,7 +29,7 @@ class GroupPanel(DirectObject.DirectObject):
return return
def cleanup(self): def cleanup(self):
base.setCellsActive(base.leftCells, 1) base.setCellsAvailable(base.leftCells, 1)
self.quitButton.destroy() self.quitButton.destroy()
self.hideButton.destroy() self.hideButton.destroy()
self.showButton.destroy() self.showButton.destroy()
@ -103,9 +102,9 @@ class GroupPanel(DirectObject.DirectObject):
self.__makeGoingToLabel() self.__makeGoingToLabel()
self.accept('updateGroupStatus', self.__checkGroupStatus) self.accept('updateGroupStatus', self.__checkGroupStatus)
self.accept('ToonBattleIdUpdate', self.__possibleGroupUpdate) self.accept('ToonBattleIdUpdate', self.__possibleGroupUpdate)
base.setCellsActive([base.leftCells[1], base.leftCells[2]], 0) base.setCellsAvailable([base.leftCells[1], base.leftCells[2]], 0)
if self.boardingParty.isGroupLeader(localAvatar.doId): if self.boardingParty.isGroupLeader(localAvatar.doId):
base.setCellsActive([base.leftCells[0]], 0) base.setCellsAvailable([base.leftCells[0]], 0)
self.__addTestNames(self.boardingParty.maxSize) self.__addTestNames(self.boardingParty.maxSize)
self.guiBg.removeNode() self.guiBg.removeNode()
guiButtons.removeNode() guiButtons.removeNode()

View file

@ -77,7 +77,7 @@ def doSleep(toon, volume = 1):
toon.openEyes() toon.openEyes()
toon.startBlink() toon.startBlink()
toon.setPlayRate(1, 'neutral') toon.setPlayRate(1, 'neutral')
if toon.nametag.getChatText() == TTLocalizer.ToonSleepString: if toon.nametag.getChat() == TTLocalizer.ToonSleepString:
toon.clearChat() toon.clearChat()
toon.lerpLookAt(Point3(0, 1, 0), time=0.25) toon.lerpLookAt(Point3(0, 1, 0), time=0.25)

View file

@ -2023,9 +2023,9 @@ class Toon(Avatar.Avatar, ToonHead):
self.openEyes() self.openEyes()
self.startBlink() self.startBlink()
if config.GetBool('stuck-sleep-fix', 1): if config.GetBool('stuck-sleep-fix', 1):
doClear = SLEEP_STRING in (self.nametag.getChatText(), self.nametag.getStompChatText()) doClear = SLEEP_STRING in (self.nametag.getChat(), self.nametag.getStompText())
else: else:
doClear = self.nametag.getChatText() == SLEEP_STRING doClear = self.nametag.getChat() == SLEEP_STRING
if doClear: if doClear:
self.clearChat() self.clearChat()
self.lerpLookAt(Point3(0, 1, 0), time=0.25) self.lerpLookAt(Point3(0, 1, 0), time=0.25)
@ -2741,10 +2741,10 @@ class Toon(Avatar.Avatar, ToonHead):
name = self.getName() name = self.getName()
suitDept = SuitDNA.suitDepts.index(SuitDNA.getSuitDept(suitType)) suitDept = SuitDNA.suitDepts.index(SuitDNA.getSuitDept(suitType))
suitName = SuitBattleGlobals.SuitAttributes[suitType]['name'] suitName = SuitBattleGlobals.SuitAttributes[suitType]['name']
self.nametag.setText(TTLocalizer.SuitBaseNameWithLevel % {'name': name, self.nametag.setDisplayName(TTLocalizer.SuitBaseNameWithLevel % {'name': name,
'dept': suitName, 'dept': suitName,
'level': self.cogLevels[suitDept] + 1}) 'level': self.cogLevels[suitDept] + 1})
self.nametag.setWordWrap(9.0) self.nametag.setWordwrap(9.0)
def takeOffSuit(self): def takeOffSuit(self):
if not self.isDisguised: if not self.isDisguised:
@ -3027,7 +3027,7 @@ class Toon(Avatar.Avatar, ToonHead):
if self.headMeter: if self.headMeter:
return return
nodePath = NodePath(self.nametag.getIcon()) nodePath = NodePath(self.nametag.getNameIcon())
if nodePath.isEmpty(): if nodePath.isEmpty():
return return
@ -3055,7 +3055,7 @@ class Toon(Avatar.Avatar, ToonHead):
icons = loader.loadModel('phase_3/models/props/gm_icons') icons = loader.loadModel('phase_3/models/props/gm_icons')
self.gmIcon = icons.find('**/access_level_%s' % access) self.gmIcon = icons.find('**/access_level_%s' % access)
np = NodePath(self.nametag.getIcon()) np = NodePath(self.nametag.getNameIcon())
if np.isEmpty() or not self.gmIcon: if np.isEmpty() or not self.gmIcon:
return return
@ -3081,7 +3081,7 @@ class Toon(Avatar.Avatar, ToonHead):
if self.partyHat: if self.partyHat:
return return
nodePath = NodePath(self.nametag.getIcon()) nodePath = NodePath(self.nametag.getNameIcon())
if nodePath.isEmpty(): if nodePath.isEmpty():
return return

View file

@ -326,7 +326,7 @@ class ToonAvatarPanel(AvatarPanelBase.AvatarPanelBase):
self.ignoreAll() self.ignoreAll()
if hasattr(self.avatar, 'bFake') and self.avatar.bFake: if hasattr(self.avatar, 'bFake') and self.avatar.bFake:
self.avatar.delete() self.avatar.delete()
base.setCellsActive([base.rightCells[0]], 1) base.setCellsAvailable([base.rightCells[0]], 1)
AvatarPanelBase.AvatarPanelBase.cleanup(self) AvatarPanelBase.AvatarPanelBase.cleanup(self)
return return
@ -479,7 +479,7 @@ class ToonAvatarPanel(AvatarPanelBase.AvatarPanelBase):
self.groupButton['image'] = self.inviteImageList self.groupButton['image'] = self.inviteImageList
self.groupButton['state'] = DGG.NORMAL self.groupButton['state'] = DGG.NORMAL
if base.config.GetBool('want-boarding-groups', 1): if base.config.GetBool('want-boarding-groups', 1):
base.setCellsActive([base.rightCells[0]], 0) base.setCellsAvailable([base.rightCells[0]], 0)
self.groupFrame.show() self.groupFrame.show()
return return

View file

@ -5,8 +5,8 @@ from panda3d.core import *
from otp.distributed.PotentialAvatar import PotentialAvatar from otp.distributed.PotentialAvatar import PotentialAvatar
from otp.otpbase import OTPGlobals from otp.otpbase import OTPGlobals
from toontown.chat.ChatGlobals import WTSystem from otp.nametag.NametagConstants import WTSystem
from toontown.chat.WhisperPopup import WhisperPopup from otp.margins.WhisperPopup import WhisperPopup
class ClientServicesManager(DistributedObjectGlobal): class ClientServicesManager(DistributedObjectGlobal):

View file

@ -1,7 +1,7 @@
from direct.distributed.DistributedObject import DistributedObject from direct.distributed.DistributedObject import DistributedObject
from direct.distributed.DistributedObjectGlobal import DistributedObjectGlobal from direct.distributed.DistributedObjectGlobal import DistributedObjectGlobal
from toontown.chat.ChatGlobals import * from otp.nametag.NametagConstants import *
from toontown.parties import PartyGlobals from toontown.parties import PartyGlobals
from toontown.toon import ToonDNA from toontown.toon import ToonDNA
from toontown.toonbase import TTLocalizer from toontown.toonbase import TTLocalizer