mirror of
https://github.com/Sneed-Group/Poodletooth-iLand
synced 2024-12-23 11:42:39 -06:00
More nametag shit
This commit is contained in:
parent
4f155b24c3
commit
dab0ac32d5
11 changed files with 42 additions and 46 deletions
|
@ -7,10 +7,10 @@ from BattleBase import *
|
|||
import DistributedBattleBase
|
||||
import SuitBattleGlobals
|
||||
from otp.avatar import Emote
|
||||
from toontown.chat.ChatGlobals import *
|
||||
from toontown.distributed import DelayDelete
|
||||
from toontown.nametag import NametagGlobals
|
||||
from toontown.toonbase import ToontownBattleGlobals
|
||||
from otp.nametag.NametagConstants import *
|
||||
from otp.nametag import NametagGlobals
|
||||
|
||||
|
||||
class DistributedBattle(DistributedBattleBase.DistributedBattleBase):
|
||||
|
@ -119,7 +119,7 @@ class DistributedBattle(DistributedBattleBase.DistributedBattleBase):
|
|||
soundTrack = Wait(delay + faceoffTime)
|
||||
mtrack = Parallel(suitTrack, toonTrack, soundTrack)
|
||||
if self.hasLocalToon():
|
||||
NametagGlobals.setWant2dNametags(False)
|
||||
NametagGlobals.setMasterArrowsOn(0)
|
||||
mtrack = Parallel(mtrack, camTrack)
|
||||
done = Func(callback)
|
||||
track = Sequence(mtrack, done, name=name)
|
||||
|
@ -157,7 +157,7 @@ class DistributedBattle(DistributedBattleBase.DistributedBattleBase):
|
|||
self.delayDeleteMembers()
|
||||
Emote.globalEmote.disableAll(base.localAvatar, 'dbattle, enterReward')
|
||||
if self.hasLocalToon():
|
||||
NametagGlobals.setWant2dNametags(False)
|
||||
NametagGlobals.setMasterArrowsOn(0)
|
||||
if self.localToonActive() == 0:
|
||||
self.removeInactiveLocalToon(base.localAvatar)
|
||||
for toon in self.toons:
|
||||
|
@ -188,7 +188,7 @@ class DistributedBattle(DistributedBattleBase.DistributedBattleBase):
|
|||
self.ignore('resumeAfterReward')
|
||||
self.movie.resetReward(finish=1)
|
||||
self._removeMembersKeep()
|
||||
NametagGlobals.setWant2dNametags(True)
|
||||
NametagGlobals.setMasterArrowsOn(1)
|
||||
Emote.globalEmote.releaseAll(base.localAvatar, 'dbattle, exitReward')
|
||||
|
||||
def enterResume(self, ts = 0):
|
||||
|
|
|
@ -20,7 +20,8 @@ from toontown.hood import ZoneUtil
|
|||
from toontown.distributed import DelayDelete
|
||||
from toontown.toon import TTEmote
|
||||
from otp.avatar import Emote
|
||||
from toontown.nametag import NametagGlobals
|
||||
from otp.nametag.NametagConstants import *
|
||||
from otp.nametag import NametagGlobals
|
||||
|
||||
|
||||
class DistributedBattleBase(DistributedNode.DistributedNode, BattleBase):
|
||||
|
@ -1039,7 +1040,7 @@ class DistributedBattleBase(DistributedNode.DistributedNode, BattleBase):
|
|||
self.notify.debug('enterLocalToonWaitForInput()')
|
||||
camera.setPosHpr(self.camPos, self.camHpr)
|
||||
base.camLens.setMinFov(self.camMenuFov/(4./3.))
|
||||
NametagGlobals.setWant2dNametags(False)
|
||||
NametagGlobals.setMasterArrowsOn(0)
|
||||
self.townBattle.setState('Attack')
|
||||
self.accept(self.localToonBattleEvent, self.__handleLocalToonBattleEvent)
|
||||
|
||||
|
@ -1205,8 +1206,7 @@ class DistributedBattleBase(DistributedNode.DistributedNode, BattleBase):
|
|||
self.notify.debug('enterPlayMovie()')
|
||||
self.delayDeleteMembers()
|
||||
if self.hasLocalToon():
|
||||
NametagGlobals.setWant2dNametags(False)
|
||||
pass
|
||||
NametagGlobals.setMasterArrowsOn(0)
|
||||
if ToontownBattleGlobals.SkipMovie:
|
||||
self.movie.play(ts, self.__handleMovieDone)
|
||||
self.movie.finish()
|
||||
|
|
|
@ -10,9 +10,8 @@ import DistributedBattleBase
|
|||
import MovieUtil
|
||||
import SuitBattleGlobals
|
||||
from otp.avatar import Emote
|
||||
from toontown.chat.ChatGlobals import *
|
||||
from toontown.nametag import NametagGlobals
|
||||
from toontown.nametag.NametagGlobals import *
|
||||
from otp.nametag.NametagConstants import *
|
||||
from otp.nametag import NametagGlobals
|
||||
from toontown.suit import Suit
|
||||
from toontown.suit import SuitDNA
|
||||
from toontown.toon import TTEmote
|
||||
|
@ -189,15 +188,14 @@ class DistributedBattleBldg(DistributedBattleBase.DistributedBattleBase):
|
|||
self.notify.debug('exitReward()')
|
||||
self.clearInterval(self.uniqueName('floorReward'))
|
||||
self._removeMembersKeep()
|
||||
NametagGlobals.setWant2dNametags(True)
|
||||
NametagGlobals.setMasterArrowsOn(1)
|
||||
for toon in self.toons:
|
||||
toon.startSmooth()
|
||||
|
||||
def enterBuildingReward(self, ts):
|
||||
self.delayDeleteMembers()
|
||||
if self.hasLocalToon():
|
||||
NametagGlobals.setWant2dNametags(False)
|
||||
pass
|
||||
NametagGlobals.setMasterArrowsOn(0)
|
||||
self.movie.playReward(ts, self.uniqueName('building-reward'), self.__handleBuildingRewardDone, noSkip=True)
|
||||
|
||||
def __handleBuildingRewardDone(self):
|
||||
|
@ -209,7 +207,7 @@ class DistributedBattleBldg(DistributedBattleBase.DistributedBattleBase):
|
|||
def exitBuildingReward(self):
|
||||
self.movie.resetReward(finish=1)
|
||||
self._removeMembersKeep()
|
||||
NametagGlobals.setWant2dNametags(True)
|
||||
NametagGlobals.setMasterArrowsOn(1)
|
||||
|
||||
def enterResume(self, ts=0):
|
||||
if self.hasLocalToon():
|
||||
|
|
|
@ -10,7 +10,8 @@ import DistributedBattleBase
|
|||
import MovieUtil
|
||||
import SuitBattleGlobals
|
||||
from toontown.distributed import DelayDelete
|
||||
from toontown.nametag import NametagGlobals
|
||||
from otp.nametag.NametagConstants import *
|
||||
from otp.nametag import NametagGlobals
|
||||
from toontown.suit import Suit
|
||||
from toontown.toonbase import ToontownBattleGlobals
|
||||
from toontown.toonbase import ToontownGlobals
|
||||
|
@ -157,7 +158,7 @@ class DistributedBattleFinal(DistributedBattleBase.DistributedBattleBase):
|
|||
self.notify.debug('exitReward()')
|
||||
self.clearInterval(self.uniqueName('floorReward'), finish=1)
|
||||
self._removeMembersKeep()
|
||||
NametagGlobals.setWant2dNametags(True)
|
||||
NametagGlobals.setMasterArrowsOn(1)
|
||||
for toon in self.toons:
|
||||
toon.startSmooth()
|
||||
|
||||
|
|
|
@ -24,7 +24,6 @@ import MovieUtil
|
|||
import PlayByPlayText
|
||||
import RewardPanel
|
||||
from SuitBattleGlobals import *
|
||||
from toontown.chat.ChatGlobals import *
|
||||
from toontown.distributed import DelayDelete
|
||||
from toontown.toon import NPCToons
|
||||
from toontown.toon import Toon
|
||||
|
@ -32,7 +31,8 @@ from toontown.toonbase import TTLocalizer
|
|||
from toontown.toonbase import ToontownGlobals
|
||||
from toontown.toonbase.ToontownBattleGlobals import *
|
||||
from toontown.toontowngui import TTDialog
|
||||
from toontown.nametag import NametagGlobals
|
||||
from otp.nametag.NametagConstants import *
|
||||
from otp.nametag.NametagGroup import *
|
||||
|
||||
|
||||
camPos = Point3(14, 0, 10)
|
||||
|
@ -342,7 +342,7 @@ class Movie(DirectObject.DirectObject):
|
|||
self.tutorialTom.setDNA(dna)
|
||||
self.tutorialTom.setName(TTLocalizer.NPCToonNames[20000])
|
||||
self.tutorialTom.setPickable(0)
|
||||
self.tutorialTom.setPlayerType(NametagGlobals.CCNonPlayer)
|
||||
self.tutorialTom.setPlayerType(NametagGroup.CCNonPlayer)
|
||||
self.tutorialTom.uniqueName = uniqueName
|
||||
self.musicVolume = 0.9
|
||||
music = base.cr.playGame.place.loader.battleMusic
|
||||
|
|
|
@ -7,8 +7,8 @@ from BattleProps import *
|
|||
from BattleSounds import *
|
||||
import MovieCamera
|
||||
import MovieUtil
|
||||
from toontown.chat.ChatGlobals import *
|
||||
from toontown.nametag.NametagGlobals import *
|
||||
from otp.nametag.NametagConstants import *
|
||||
from otp.nametag import NametagGlobals
|
||||
from toontown.toon import NPCToons
|
||||
from toontown.toonbase import TTLocalizer
|
||||
from toontown.toonbase import ToontownBattleGlobals
|
||||
|
|
|
@ -3,8 +3,8 @@ from direct.interval.IntervalGlobal import *
|
|||
from panda3d.core import *
|
||||
|
||||
import MovieCamera
|
||||
from toontown.chat.ChatGlobals import *
|
||||
from toontown.nametag.NametagGlobals import *
|
||||
from otp.nametag.NametagConstants import *
|
||||
from otp.nametag import NametagGlobals
|
||||
from toontown.toonbase import TTLocalizer
|
||||
|
||||
|
||||
|
|
|
@ -10,9 +10,8 @@ from BattleSounds import *
|
|||
import MovieCamera
|
||||
import MovieUtil
|
||||
from SuitBattleGlobals import *
|
||||
from toontown.chat.ChatGlobals import *
|
||||
from toontown.nametag import NametagGlobals
|
||||
from toontown.nametag.NametagGlobals import *
|
||||
from otp.nametag.NametagConstants import *
|
||||
from otp.nametag import NametagGlobals
|
||||
from toontown.suit.SuitDNA import *
|
||||
from toontown.toonbase import TTLocalizer
|
||||
from toontown.toonbase import ToontownGlobals
|
||||
|
|
|
@ -9,7 +9,8 @@ import DistributedToonInterior
|
|||
from otp.distributed.TelemetryLimiter import RotationLimitToH, TLGatherAllAvs
|
||||
from toontown.hood import Place
|
||||
from toontown.hood import ZoneUtil
|
||||
from toontown.nametag import NametagGlobals
|
||||
from otp.nametag.NametagConstants import *
|
||||
from otp.nametag import NametagGlobals
|
||||
from toontown.toon import HealthForceAcknowledge
|
||||
from toontown.toon import NPCForceAcknowledge
|
||||
from toontown.toonbase import TTLocalizer
|
||||
|
@ -92,7 +93,7 @@ class ToonInterior(Place.Place):
|
|||
volume = requestStatus.get('musicVolume', 0.7)
|
||||
base.playMusic(self.loader.activityMusic, looping=1, volume=volume)
|
||||
self._telemLimiter = TLGatherAllAvs('ToonInterior', RotationLimitToH)
|
||||
NametagGlobals.setWant2dNametags(True)
|
||||
NametagGlobals.setMasterArrowsOn(1)
|
||||
self.fsm.request(requestStatus['how'], [requestStatus])
|
||||
|
||||
def exit(self):
|
||||
|
@ -100,7 +101,7 @@ class ToonInterior(Place.Place):
|
|||
messenger.send('exitToonInterior')
|
||||
self._telemLimiter.destroy()
|
||||
del self._telemLimiter
|
||||
NametagGlobals.setWant2dNametags(False)
|
||||
NametagGlobals.setMasterArrowsOn(0)
|
||||
self.loader.activityMusic.stop()
|
||||
|
||||
def setState(self, state):
|
||||
|
|
|
@ -6,8 +6,8 @@ from direct.task.Task import Task
|
|||
import MinigameGlobals
|
||||
from PurchaseBase import *
|
||||
from toontown.distributed import DelayDelete
|
||||
from toontown.nametag import NametagGlobals
|
||||
from toontown.nametag.NametagFloat2d import *
|
||||
from otp.nametag.NametagFloat2d import *
|
||||
from otp.nametag import NametagGlobals
|
||||
from toontown.toon import ToonHead
|
||||
from toontown.toonbase import ToontownGlobals
|
||||
from toontown.toonbase import ToontownTimer
|
||||
|
@ -304,7 +304,7 @@ class Purchase(PurchaseBase):
|
|||
floorNode = CollisionNode('collision_floor')
|
||||
floorNode.addSolid(floor)
|
||||
self.collisionFloor = render.attachNewNode(floorNode)
|
||||
NametagGlobals.setForceOnscreenChat(True)
|
||||
NametagGlobals.setOnscreenChatForced(1)
|
||||
for index in xrange(len(self.ids)):
|
||||
avId = self.ids[index]
|
||||
if self.states[index] != PURCHASE_NO_CLIENT_STATE and self.states[index] != PURCHASE_DISCONNECTED_STATE and avId in base.cr.doId2do:
|
||||
|
@ -511,7 +511,7 @@ class Purchase(PurchaseBase):
|
|||
self.title.reparentTo(self.frame)
|
||||
self.rewardDoubledJellybeanLabel.hide()
|
||||
base.camLens.setMinFov(settings['fov']/(4./3.))
|
||||
NametagGlobals.setForceOnscreenChat(False)
|
||||
NametagGlobals.setOnscreenChatForced(0)
|
||||
|
||||
def _handleClientCleanup(self):
|
||||
if hasattr(self, 'toonsKeep'):
|
||||
|
@ -626,16 +626,13 @@ class PurchaseHeadFrame(DirectFrame):
|
|||
self.headModel.setupHead(self.av.style, forGui=1)
|
||||
self.headModel.reparentTo(self.head)
|
||||
self.tag2Node = NametagFloat2d()
|
||||
self.tag2Node.hideChat()
|
||||
self.tag2Node.hideThought()
|
||||
self.tag2Node.update()
|
||||
self.av.nametag.add(self.tag2Node)
|
||||
self.tag2Node.setContents(Nametag.CName)
|
||||
self.av.nametag.addNametag(self.tag2Node)
|
||||
self.tag2 = self.attachNewNode(self.tag2Node)
|
||||
self.tag2.setPosHprScale(-0.22, 10.0, 0.12, 0, 0, 0, 0.046, 0.046, 0.046)
|
||||
self.tag1Node = NametagFloat2d()
|
||||
self.tag1Node.hideNametag()
|
||||
self.tag1Node.update()
|
||||
self.av.nametag.add(self.tag1Node)
|
||||
self.tag1Node.setContents(Nametag.CSpeech | Nametag.CThought)
|
||||
self.av.nametag.addNametag(self.tag1Node)
|
||||
self.tag1 = self.attachNewNode(self.tag1Node)
|
||||
self.tag1.setPosHprScale(-0.15, 0, -0.1, 0, 0, 0, 0.046, 0.046, 0.046)
|
||||
self.hide()
|
||||
|
@ -647,8 +644,8 @@ class PurchaseHeadFrame(DirectFrame):
|
|||
del self.headModel
|
||||
self.head.removeNode()
|
||||
del self.head
|
||||
self.av.nametag.remove(self.tag1Node)
|
||||
self.av.nametag.remove(self.tag2Node)
|
||||
self.av.nametag.removeNametag(self.tag1Node)
|
||||
self.av.nametag.removeNametag(self.tag2Node)
|
||||
self.tag1.removeNode()
|
||||
self.tag2.removeNode()
|
||||
del self.tag1
|
||||
|
|
|
@ -9,7 +9,7 @@ import random
|
|||
|
||||
import DistributedToon
|
||||
import NPCToons
|
||||
from toontown.nametag import NametagGlobals
|
||||
from otp.nametag.NametagGroup import NametagGroup
|
||||
from toontown.quest import QuestChoiceGui
|
||||
from toontown.quest import QuestParser
|
||||
from toontown.quest import Quests
|
||||
|
@ -26,7 +26,7 @@ class DistributedNPCToonBase(DistributedToon.DistributedToon):
|
|||
DistributedToon.DistributedToon.__init__(self, cr)
|
||||
self.__initCollisions()
|
||||
self.setPickable(0)
|
||||
self.setPlayerType(NametagGlobals.CCNonPlayer)
|
||||
self.setPlayerType(NametagGroup.CCNonPlayer)
|
||||
|
||||
def disable(self):
|
||||
self.ignore('enter' + self.cSphereNode.getName())
|
||||
|
|
Loading…
Reference in a new issue