mirror of
https://github.com/Sneed-Group/Poodletooth-iLand
synced 2024-12-24 04:02:40 -06:00
More work
This commit is contained in:
parent
ac15b0e4b5
commit
e8a57d7251
4 changed files with 28 additions and 35 deletions
|
@ -6,7 +6,8 @@ import MovieCamera
|
||||||
from direct.directnotify import DirectNotifyGlobal
|
from direct.directnotify import DirectNotifyGlobal
|
||||||
import types
|
import types
|
||||||
notify = DirectNotifyGlobal.directNotify.newCategory('MovieToonVictory')
|
notify = DirectNotifyGlobal.directNotify.newCategory('MovieToonVictory')
|
||||||
from toontown.nametag import NametagGlobals
|
from otp.nametag.NametagConstants import *
|
||||||
|
from otp.nametag import NametagGlobals
|
||||||
|
|
||||||
def __findToonReward(rewards, toon):
|
def __findToonReward(rewards, toon):
|
||||||
for r in rewards:
|
for r in rewards:
|
||||||
|
@ -76,7 +77,7 @@ def doToonVictory(localToonActive, toons, rewardToonIds, rewardDicts, deathList,
|
||||||
track = Sequence()
|
track = Sequence()
|
||||||
if localToonActive == 1:
|
if localToonActive == 1:
|
||||||
track.append(Func(rpanel.show))
|
track.append(Func(rpanel.show))
|
||||||
track.append(Func(NametagGlobals.setForceOnscreenChat, True))
|
track.append(Func(NametagGlobals.setOnscreenChatForced, 1))
|
||||||
camTrack = Sequence()
|
camTrack = Sequence()
|
||||||
endTrack = Sequence()
|
endTrack = Sequence()
|
||||||
danceSound = globalBattleSoundCache.getSound('ENC_Win.ogg')
|
danceSound = globalBattleSoundCache.getSound('ENC_Win.ogg')
|
||||||
|
@ -121,7 +122,7 @@ def doToonVictory(localToonActive, toons, rewardToonIds, rewardDicts, deathList,
|
||||||
track.append(Func(skipper.destroy))
|
track.append(Func(skipper.destroy))
|
||||||
if localToonActive == 1:
|
if localToonActive == 1:
|
||||||
track.append(Func(rpanel.hide))
|
track.append(Func(rpanel.hide))
|
||||||
track.append(Func(NametagGlobals.setForceOnscreenChat, False))
|
track.append(Func(NametagGlobals.setOnscreenChatForced, 0))
|
||||||
track.append(endTrack)
|
track.append(endTrack)
|
||||||
trackdur = track.getDuration()
|
trackdur = track.getDuration()
|
||||||
soundTrack = SoundInterval(danceSound, duration=trackdur, loop=1)
|
soundTrack = SoundInterval(danceSound, duration=trackdur, loop=1)
|
||||||
|
|
|
@ -13,8 +13,8 @@ from toontown.hood import ZoneUtil
|
||||||
from toontown.suit import Suit
|
from toontown.suit import Suit
|
||||||
from toontown.toonbase.ToonBaseGlobal import *
|
from toontown.toonbase.ToonBaseGlobal import *
|
||||||
from toontown.toontowngui import TTDialog
|
from toontown.toontowngui import TTDialog
|
||||||
from toontown.nametag.NametagGroup import NametagGroup
|
from otp.nametag.NametagGroup import NametagGroup
|
||||||
from toontown.nametag.Nametag import Nametag
|
from otp.nametag.Nametag import Nametag
|
||||||
|
|
||||||
|
|
||||||
class DistributedDoor(DistributedObject.DistributedObject, DelayDeletable):
|
class DistributedDoor(DistributedObject.DistributedObject, DelayDeletable):
|
||||||
|
@ -105,25 +105,23 @@ class DistributedDoor(DistributedObject.DistributedObject, DelayDeletable):
|
||||||
return
|
return
|
||||||
if self.nametag == None:
|
if self.nametag == None:
|
||||||
self.nametag = NametagGroup()
|
self.nametag = NametagGroup()
|
||||||
self.nametag.setNametag3d(None)
|
|
||||||
self.nametag.setFont(ToontownGlobals.getBuildingNametagFont())
|
self.nametag.setFont(ToontownGlobals.getBuildingNametagFont())
|
||||||
if TTLocalizer.BuildingNametagShadow:
|
if TTLocalizer.BuildingNametagShadow:
|
||||||
self.nametag.setShadow(*TTLocalizer.BuildingNametagShadow)
|
self.nametag.setShadow(*TTLocalizer.BuildingNametagShadow)
|
||||||
self.nametag.hideChat()
|
self.nametag.setContents(Nametag.CName)
|
||||||
self.nametag.hideThought()
|
self.nametag.setColorCode(NametagGroup.CCToonBuilding)
|
||||||
nametagColor = NametagGlobals.NametagColors[NametagGlobals.CCToonBuilding]
|
self.nametag.setActive(0)
|
||||||
self.nametag.setNametagColor(nametagColor)
|
|
||||||
self.nametag.setActive(False)
|
|
||||||
self.nametag.setAvatar(self.getDoorNodePath())
|
self.nametag.setAvatar(self.getDoorNodePath())
|
||||||
name = self.cr.playGame.dnaStore.getTitleFromBlockNumber(self.block)
|
self.nametag.setObjectCode(self.block)
|
||||||
self.nametag.setText(name)
|
name = self.cr.playGame.dnaData.getBlock(self.block).title
|
||||||
|
self.nametag.setName(name)
|
||||||
self.nametag.manage(base.marginManager)
|
self.nametag.manage(base.marginManager)
|
||||||
self.nametag.updateAll()
|
|
||||||
|
|
||||||
def clearNametag(self):
|
def clearNametag(self):
|
||||||
if self.nametag is not None:
|
if self.nametag is not None:
|
||||||
self.nametag.unmanage(base.marginManager)
|
self.nametag.unmanage(base.marginManager)
|
||||||
self.nametag.setAvatar(NodePath())
|
self.nametag.setAvatar(NodePath())
|
||||||
|
self.nametag.destroy()
|
||||||
self.nametag = None
|
self.nametag = None
|
||||||
|
|
||||||
def getTriggerName(self):
|
def getTriggerName(self):
|
||||||
|
|
|
@ -9,9 +9,9 @@ import DistributedElevator
|
||||||
from ElevatorConstants import *
|
from ElevatorConstants import *
|
||||||
from ElevatorUtils import *
|
from ElevatorUtils import *
|
||||||
from toontown.hood import ZoneUtil
|
from toontown.hood import ZoneUtil
|
||||||
from toontown.nametag import NametagGlobals
|
from otp.nametag.NametagGroup import NametagGroup
|
||||||
from toontown.nametag.Nametag import Nametag
|
from otp.nametag.Nametag import Nametag
|
||||||
from toontown.nametag.NametagGroup import NametagGroup
|
from otp.nametag.NametagConstants import *
|
||||||
from toontown.toonbase import TTLocalizer
|
from toontown.toonbase import TTLocalizer
|
||||||
from toontown.toonbase import ToontownGlobals
|
from toontown.toonbase import ToontownGlobals
|
||||||
|
|
||||||
|
@ -41,20 +41,17 @@ class DistributedElevatorExt(DistributedElevator.DistributedElevator):
|
||||||
self.nametag.setFont(ToontownGlobals.getBuildingNametagFont())
|
self.nametag.setFont(ToontownGlobals.getBuildingNametagFont())
|
||||||
if TTLocalizer.BuildingNametagShadow:
|
if TTLocalizer.BuildingNametagShadow:
|
||||||
self.nametag.setShadow(*TTLocalizer.BuildingNametagShadow)
|
self.nametag.setShadow(*TTLocalizer.BuildingNametagShadow)
|
||||||
self.nametag.hideChat()
|
self.nametag.setContents(Nametag.CName)
|
||||||
self.nametag.hideThought()
|
self.nametag.setColorCode(NametagGroup.CCSuitBuilding)
|
||||||
nametagColor = NametagGlobals.NametagColors[NametagGlobals.CCSuitBuilding]
|
self.nametag.setActive(0)
|
||||||
self.nametag.setNametagColor(nametagColor)
|
|
||||||
self.nametag.setActive(False)
|
|
||||||
self.nametag.setAvatar(self.getElevatorModel())
|
self.nametag.setAvatar(self.getElevatorModel())
|
||||||
name = self.cr.playGame.dnaStore.getTitleFromBlockNumber(self.bldg.block)
|
name = self.cr.playGame.dnaStore.getTitleFromBlockNumber(self.bldg.block)
|
||||||
if not name:
|
if not name:
|
||||||
name = TTLocalizer.CogsInc
|
name = TTLocalizer.CogsInc
|
||||||
else:
|
else:
|
||||||
name += TTLocalizer.CogsIncExt
|
name += TTLocalizer.CogsIncExt
|
||||||
self.nametag.setText(name)
|
self.nametag.setName(name)
|
||||||
self.nametag.manage(base.marginManager)
|
self.nametag.manage(base.marginManager)
|
||||||
self.nametag.updateAll()
|
|
||||||
|
|
||||||
def clearNametag(self):
|
def clearNametag(self):
|
||||||
if self.nametag != None:
|
if self.nametag != None:
|
||||||
|
|
|
@ -5,12 +5,11 @@ from panda3d.core import *
|
||||||
|
|
||||||
import DistributedAnimatedProp
|
import DistributedAnimatedProp
|
||||||
from KnockKnockJokes import *
|
from KnockKnockJokes import *
|
||||||
from toontown.chat.ChatGlobals import *
|
|
||||||
from toontown.distributed import DelayDelete
|
from toontown.distributed import DelayDelete
|
||||||
from toontown.nametag.NametagGlobals import *
|
|
||||||
from toontown.nametag.NametagGroup import NametagGroup
|
|
||||||
from toontown.toonbase import TTLocalizer
|
from toontown.toonbase import TTLocalizer
|
||||||
from toontown.toonbase import ToontownGlobals
|
from toontown.toonbase import ToontownGlobals
|
||||||
|
from otp.nametag.NametagGroup import NametagGroup
|
||||||
|
from otp.nametag.NametagConstants import *
|
||||||
import random
|
import random
|
||||||
|
|
||||||
class DistributedKnockKnockDoor(DistributedAnimatedProp.DistributedAnimatedProp):
|
class DistributedKnockKnockDoor(DistributedAnimatedProp.DistributedAnimatedProp):
|
||||||
|
@ -76,21 +75,19 @@ class DistributedKnockKnockDoor(DistributedAnimatedProp.DistributedAnimatedProp)
|
||||||
return
|
return
|
||||||
self.nametag = NametagGroup()
|
self.nametag = NametagGroup()
|
||||||
self.nametag.setAvatar(doorNP)
|
self.nametag.setAvatar(doorNP)
|
||||||
toonFont = ToontownGlobals.getToonFont()
|
self.nametag.setFont(ToontownGlobals.getToonFont())
|
||||||
self.nametag.setFont(toonFont)
|
self.nametag.setSpeechFont(ToontownGlobals.getToonFont())
|
||||||
self.nametag.setChatFont(toonFont)
|
self.nametag.setName(doorName)
|
||||||
self.nametag.setText(doorName)
|
self.nametag.setActive(0)
|
||||||
self.nametag.setActive(False)
|
|
||||||
self.nametag.hideNametag()
|
|
||||||
self.nametag.manage(base.marginManager)
|
self.nametag.manage(base.marginManager)
|
||||||
self.nametag.getNametag3d().setBillboardOffset(6)
|
self.nametag.getNametag3d().setBillboardOffset(4)
|
||||||
nametagNode = self.nametag.getNametag3d()
|
nametagNode = self.nametag.getNametag3d()
|
||||||
self.nametagNP = render.attachNewNode(nametagNode)
|
self.nametagNP = render.attachNewNode(nametagNode)
|
||||||
self.nametagNP.setName('knockKnockDoor_nt_' + str(self.propId))
|
self.nametagNP.setName('knockKnockDoor_nt_' + str(self.propId))
|
||||||
pos = doorNP.getBounds().getCenter()
|
pos = doorNP.getBounds().getCenter()
|
||||||
self.nametagNP.setPos(pos + Vec3(0, 0, avatar.getHeight() + 2))
|
self.nametagNP.setPos(pos + Vec3(0, 0, avatar.getHeight() + 2))
|
||||||
d = duration * 0.125
|
d = duration * 0.125
|
||||||
track = Sequence(Parallel(Sequence(Wait(d * 0.5), SoundInterval(self.knockSfx)), Func(self.nametag.setChatText, TTLocalizer.DoorKnockKnock), Wait(d)), Func(avatar.setChatAbsolute, TTLocalizer.DoorWhosThere, CFSpeech | CFTimeout, openEnded=0), Wait(d), Func(self.nametag.setChatText, joke[0]), Wait(d), Func(avatar.setChatAbsolute, joke[0] + TTLocalizer.DoorWhoAppendix, CFSpeech | CFTimeout, openEnded=0), Wait(d), Func(self.nametag.setChatText, joke[1]), Parallel(SoundInterval(self.rimshot, startTime=2.0), Wait(d * 4)), Func(self.cleanupTrack))
|
track = Sequence(Parallel(Sequence(Wait(d * 0.5), SoundInterval(self.knockSfx)), Func(self.nametag.setChat, TTLocalizer.DoorKnockKnock, CFSpeech), Wait(d)), Func(avatar.setChatAbsolute, TTLocalizer.DoorWhosThere, CFSpeech | CFTimeout, openEnded=0), Wait(d), Func(self.nametag.setChat, joke[0], CFSpeech), Wait(d), Func(avatar.setChatAbsolute, joke[0] + TTLocalizer.DoorWhoAppendix, CFSpeech | CFTimeout, openEnded=0), Wait(d), Func(self.nametag.setChat, joke[1], CFSpeech), Parallel(SoundInterval(self.rimshot, startTime=2.0), Wait(d * 4)), Func(self.cleanupTrack))
|
||||||
track.delayDelete = DelayDelete.DelayDelete(avatar, 'knockKnockTrack')
|
track.delayDelete = DelayDelete.DelayDelete(avatar, 'knockKnockTrack')
|
||||||
return track
|
return track
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue