nametag: Reintroduce nametag imports to the various files.
This commit is contained in:
parent
24f258e87d
commit
5c25f5ad35
7 changed files with 30 additions and 22 deletions
|
@ -1,4 +1,8 @@
|
|||
from pandac.PandaModules import *
|
||||
# TODO -- NAMETAGTODO:
|
||||
#from otp.nametag.Nametag import Nametag
|
||||
#from otp.nametag.NametagGroup import NametagGroup
|
||||
from otp.nametag.NametagConstants import CFSpeech, CFThought, CFTimeout, CFPageButton, CFNoQuitButton, CFQuitButton
|
||||
from otp.otpbase import OTPGlobals
|
||||
from otp.otpbase import OTPLocalizer
|
||||
from direct.actor.Actor import Actor
|
||||
|
@ -38,13 +42,12 @@ class Avatar(Actor, ShadowCaster):
|
|||
self.avatarType = ''
|
||||
self.nametagNodePath = None
|
||||
self.__nameVisible = 1
|
||||
# TODO: Nametags were part of libotp, which we cannot use.
|
||||
self.nametag = self.attachNewNode('nametag')
|
||||
#self.nametag.setAvatar(self)
|
||||
#self.nametag.setFont(OTPGlobals.getInterfaceFont())
|
||||
self.nametag2dContents = 0#Nametag.CName | Nametag.CSpeech
|
||||
self.nametag2dDist = 0#Nametag.CName | Nametag.CSpeech
|
||||
self.nametag2dNormalContents = 0#Nametag.CName | Nametag.CSpeech
|
||||
self.nametag = NametagGroup()
|
||||
self.nametag.setAvatar(self)
|
||||
self.nametag.setFont(OTPGlobals.getInterfaceFont())
|
||||
self.nametag2dContents = Nametag.CName | Nametag.CSpeech
|
||||
self.nametag2dDist = Nametag.CName | Nametag.CSpeech
|
||||
self.nametag2dNormalContents = Nametag.CName | Nametag.CSpeech
|
||||
self.nametag3d = self.attachNewNode('nametag3d')
|
||||
self.nametag3d.setTag('cam', 'nametag')
|
||||
self.nametag3d.setLightOff()
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
from pandac.PandaModules import *
|
||||
# TODO:
|
||||
#from otp.margins.WhisperPopup import WhisperPopup
|
||||
from otp.nametag.NametagConstants import CFQuicktalker, CFPageButton, CFQuitButton, CFSpeech, CFThought, CFTimeout
|
||||
from otp.chat import ChatGarbler
|
||||
import string
|
||||
from direct.task import Task
|
||||
|
@ -127,7 +130,7 @@ class DistributedPlayer(DistributedAvatar.DistributedAvatar, PlayerBase.PlayerBa
|
|||
def setAccountName(self, accountName):
|
||||
self.accountName = accountName
|
||||
|
||||
def setSystemMessage(self, aboutId, chatString, whisperType = None):
|
||||
def setSystemMessage(self, aboutId, chatString, whisperType = WhisperPopup.WTSystem):
|
||||
self.displayWhisper(aboutId, chatString, whisperType)
|
||||
|
||||
def displayWhisper(self, fromId, chatString, whisperType):
|
||||
|
@ -155,7 +158,7 @@ class DistributedPlayer(DistributedAvatar.DistributedAvatar, PlayerBase.PlayerBa
|
|||
return
|
||||
chatString = SCDecoders.decodeSCStaticTextMsg(msgIndex)
|
||||
if chatString:
|
||||
self.displayWhisper(fromId, chatString)
|
||||
self.displayWhisper(fromId, chatString, WhisperPopup.WTQuickTalker)
|
||||
base.talkAssistant.receiveAvatarWhisperSpeedChat(TalkAssistant.SPEEDCHAT_NORMAL, msgIndex, fromId)
|
||||
return
|
||||
|
||||
|
@ -184,7 +187,7 @@ class DistributedPlayer(DistributedAvatar.DistributedAvatar, PlayerBase.PlayerBa
|
|||
return
|
||||
chatString = SCDecoders.decodeSCCustomMsg(msgIndex)
|
||||
if chatString:
|
||||
self.displayWhisper(fromId, chatString)
|
||||
self.displayWhisper(fromId, chatString, WhisperPopup.WTQuickTalker)
|
||||
base.talkAssistant.receiveAvatarWhisperSpeedChat(TalkAssistant.SPEEDCHAT_CUSTOM, msgIndex, fromId)
|
||||
return
|
||||
|
||||
|
@ -205,7 +208,7 @@ class DistributedPlayer(DistributedAvatar.DistributedAvatar, PlayerBase.PlayerBa
|
|||
return
|
||||
chatString = SCDecoders.decodeSCEmoteWhisperMsg(emoteId, handle.getName())
|
||||
if chatString:
|
||||
self.displayWhisper(fromId, chatString)
|
||||
self.displayWhisper(fromId, chatString, WhisperPopup.WTEmote)
|
||||
base.talkAssistant.receiveAvatarWhisperSpeedChat(TalkAssistant.SPEEDCHAT_EMOTE, emoteId, fromId)
|
||||
return
|
||||
|
||||
|
|
|
@ -11,6 +11,7 @@ from otp.chat.TalkHandle import TalkHandle
|
|||
import time
|
||||
from otp.chat.TalkGlobals import *
|
||||
from otp.chat.ChatGlobals import *
|
||||
from otp.nametag.NametagConstants import CFSpeech, CFTimeout, CFThought
|
||||
ThoughtPrefix = '.'
|
||||
|
||||
class TalkAssistant(DirectObject.DirectObject):
|
||||
|
@ -615,10 +616,9 @@ class TalkAssistant(DirectObject.DirectObject):
|
|||
messenger.send('magicWord', [message])
|
||||
self.receiveDeveloperMessage(message)
|
||||
else:
|
||||
#chatFlags = CFSpeech | CFTimeout
|
||||
#if self.isThought(message):
|
||||
# chatFlags = CFThought
|
||||
chatFlags = 0
|
||||
chatFlags = CFSpeech | CFTimeout
|
||||
if self.isThought(message):
|
||||
chatFlags = CFThought
|
||||
base.localAvatar.sendUpdate('setTalk', [0,
|
||||
0,
|
||||
'',
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
from pandac.PandaModules import *
|
||||
from direct.interval.IntervalGlobal import *
|
||||
from otp.avatar import Avatar
|
||||
from otp.nametag.NametagConstants import CFQuicktalker
|
||||
from toontown.char import CharDNA
|
||||
from toontown.char import DistributedChar
|
||||
from direct.directnotify import DirectNotifyGlobal
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
import math
|
||||
import random
|
||||
from pandac.PandaModules import VBase3, CollisionPlane, CollisionNode, CollisionSphere, CollisionTube, NodePath, Plane, Vec3, Vec2, Point3, BitMask32, CollisionHandlerEvent, TextureStage, VBase4, BoundingSphere
|
||||
from otp.nametag.NametagConstants import CFSpeech
|
||||
#from otp.nametag.NametagGroup import NametagGroup # TODO -- NAMETAGTODO
|
||||
from direct.interval.IntervalGlobal import Sequence, Wait, Func, LerpHprInterval, Parallel, LerpPosInterval, Track, ActorInterval, ParallelEndTogether, LerpFunctionInterval, LerpScaleInterval, LerpPosHprInterval, SoundInterval
|
||||
from direct.task import Task
|
||||
from direct.fsm import FSM
|
||||
|
@ -27,7 +29,6 @@ from toontown.suit import SuitDNA
|
|||
from toontown.effects import DustCloud
|
||||
OneBossCog = None
|
||||
TTL = TTLocalizer
|
||||
CFSpeech = None # TODO: NAMETAGTODO
|
||||
|
||||
class DistributedBossbotBoss(DistributedBossCog.DistributedBossCog, FSM.FSM):
|
||||
notify = DirectNotifyGlobal.directNotify.newCategory('DistributedBossbotBoss')
|
||||
|
@ -193,8 +194,7 @@ class DistributedBossbotBoss(DistributedBossCog.DistributedBossCog, FSM.FSM):
|
|||
npc = Toon.Toon()
|
||||
npc.setName(TTLocalizer.BossbotResistanceToonName)
|
||||
npc.setPickable(0)
|
||||
# TODO: NAMETAGTODO
|
||||
#npc.setPlayerType(NametagGroup.CCNonPlayer)
|
||||
npc.setPlayerType(NametagGroup.CCNonPlayer)
|
||||
dna = ToonDNA.ToonDNA()
|
||||
dna.newToonRandom(11237, 'm', 1)
|
||||
dna.head = 'sls'
|
||||
|
|
|
@ -5,6 +5,7 @@ from toontown.toonbase import TTLocalizer
|
|||
from direct.task.Task import Task
|
||||
from direct.distributed import ClockDelta
|
||||
from pandac.PandaModules import Point3
|
||||
from otp.nametag.NametagGlobals import CFSpeech, CFTimeout
|
||||
from toontown.toontowngui import TTDialog
|
||||
from otp.otpbase import OTPLocalizer
|
||||
from toontown.parties import PartyGlobals
|
||||
|
@ -109,7 +110,7 @@ class DistributedNPCPartyPerson(DistributedNPCToonBase):
|
|||
if self.askGui:
|
||||
self.askGui.hide()
|
||||
self.ignore(self.planPartyQuestionGuiDoneEvent)
|
||||
self.setChatAbsolute(TTLocalizer.STOREOWNER_TOOKTOOLONG)
|
||||
self.setChatAbsolute(TTLocalizer.STOREOWNER_TOOKTOOLONG, CFSpeech | CFTimeout)
|
||||
self.resetPartyPerson()
|
||||
elif mode == NPCToons.PARTY_MOVIE_START:
|
||||
self.av = base.cr.doId2do.get(avId)
|
||||
|
@ -124,10 +125,10 @@ class DistributedNPCPartyPerson(DistributedNPCToonBase):
|
|||
camera.lerpPosHpr(-5, 9, base.localAvatar.getHeight() - 0.5, -150, -2, 0, 1, other=self, blendType='easeOut', task=self.uniqueName('lerpCamera'))
|
||||
taskMgr.doMethodLater(1.0, self.popupAskGUI, self.uniqueName('popupAskGUI'))
|
||||
else:
|
||||
self.setChatAbsolute(TTLocalizer.PartyDoYouWantToPlan)
|
||||
self.setChatAbsolute(TTLocalizer.PartyDoYouWantToPlan, CFSpeech | CFTimeout)
|
||||
elif mode == NPCToons.PARTY_MOVIE_COMPLETE:
|
||||
chatStr = TTLocalizer.PartyPlannerOnYourWay
|
||||
self.setChatAbsolute(chatStr)
|
||||
self.setChatAbsolute(chatStr, CFSpeech | CFTimeout)
|
||||
self.resetPartyPerson()
|
||||
if self.isInteractingWithLocalToon:
|
||||
base.localAvatar.aboutToPlanParty = True
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
from direct.distributed.DistributedObject import DistributedObject
|
||||
from direct.distributed.DistributedObjectGlobal import DistributedObjectGlobal
|
||||
from pandac.PandaModules import CFSpeech, CFTimeout
|
||||
from otp.nametag.NametagConstants import CFSpeech, CFTimeout
|
||||
from toontown.toonbase import ToontownGlobals
|
||||
from toontown.toonbase import TTLocalizer
|
||||
from toontown.toon import ToonDNA
|
||||
|
|
Loading…
Reference in a new issue