a bunch of party fixes

This commit is contained in:
Open Toontown 2022-01-18 16:12:05 -05:00
parent 1f63c40772
commit 556ad03dab
8 changed files with 51 additions and 44 deletions

View file

@ -531,7 +531,7 @@ class MiniInviteVisual(DirectFrame):
DirectFrame.__init__(self, parent, pos=(0.1, 0, -0.018)) DirectFrame.__init__(self, parent, pos=(0.1, 0, -0.018))
self.checkedHeight = True self.checkedHeight = True
self.partyInfo = partyInfo self.partyInfo = partyInfo
self.parent = parent self._parent = parent
self.inviteBackgrounds = loader.loadModel('phase_4/models/parties/partyStickerbook') self.inviteBackgrounds = loader.loadModel('phase_4/models/parties/partyStickerbook')
backgrounds = ['calendar_popup_birthday', backgrounds = ['calendar_popup_birthday',
'calendar_popup_fun', 'calendar_popup_fun',
@ -547,9 +547,9 @@ class MiniInviteVisual(DirectFrame):
return return
def show(self): def show(self):
self.reparentTo(self.parent) self.reparentTo(self._parent)
self.setPos(0.1, 0, -0.018) self.setPos(0.1, 0, -0.018)
newParent = self.parent.getParent().getParent() newParent = self._parent.getParent().getParent()
self.wrtReparentTo(newParent) self.wrtReparentTo(newParent)
if self.whosePartyLabel['text'] == ' ': if self.whosePartyLabel['text'] == ' ':
host = base.cr.identifyAvatar(self.partyInfo.hostId) host = base.cr.identifyAvatar(self.partyInfo.hostId)
@ -575,7 +575,7 @@ class MiniInviteVisual(DirectFrame):
def destroy(self): def destroy(self):
del self.checkedHeight del self.checkedHeight
del self.partyInfo del self.partyInfo
del self.parent del self._parent
del self.background del self.background
del self.whosePartyLabel del self.whosePartyLabel
del self.whenTextLabel del self.whenTextLabel

View file

@ -1,11 +1,11 @@
import random import random
import time import time
import datetime import datetime
from pandac.PandaModules import Vec4, TextNode, CardMaker, NodePath from panda3d.core import Vec4, TextNode, CardMaker, NodePath
from direct.distributed import DistributedObject from direct.distributed import DistributedObject
from direct.task.Task import Task
from direct.gui.DirectGui import DirectLabel from direct.gui.DirectGui import DirectLabel
from direct.gui import OnscreenText from direct.gui import OnscreenText
from direct.interval.IntervalGlobal import *
from toontown.toonbase import ToontownGlobals from toontown.toonbase import ToontownGlobals
from toontown.parties.PartyInfo import PartyInfo from toontown.parties.PartyInfo import PartyInfo
from toontown.toonbase import TTLocalizer from toontown.toonbase import TTLocalizer
@ -321,8 +321,8 @@ class DistributedParty(DistributedObject.DistributedObject):
False]] False]]
def fillGrid(x, y, size): def fillGrid(x, y, size):
for i in range(-size[1] / 2 + 1, size[1] / 2 + 1): for i in range(-size[1] // 2 + 1, size[1] // 2 + 1):
for j in range(-size[0] / 2 + 1, size[0] / 2 + 1): for j in range(-size[0] // 2 + 1, size[0] // 2 + 1):
self.grid[i + y][j + x] = False self.grid[i + y][j + x] = False
for activityBase in self.partyInfo.activityList: for activityBase in self.partyInfo.activityList:
@ -572,12 +572,8 @@ class DistributedParty(DistributedObject.DistributedObject):
self.titleText.setColor(Vec4(*self.titleColor)) self.titleText.setColor(Vec4(*self.titleColor))
self.titleText.clearColorScale() self.titleText.clearColorScale()
self.titleText.setFg(self.titleColor) self.titleText.setFg(self.titleColor)
seq = Task.sequence(Task.pause(0.1), Task.pause(6.0), self.titleText.lerpColorScale(Vec4(1.0, 1.0, 1.0, 1.0), Vec4(1.0, 1.0, 1.0, 0.0), 0.5), Task(self.hideTitleTextTask)) seq = Sequence(Wait(0.1), Wait(6.0), self.titleText.colorScaleInterval(0.5, Vec4(1.0, 1.0, 1.0, 0.0)), Func(self.hideTitleText))
taskMgr.add(seq, 'titleText') seq.start()
def hideTitleTextTask(self, task):
self.titleText.hide()
return Task.done
def hideTitleText(self): def hideTitleText(self):
if self.titleText: if self.titleText:

View file

@ -262,7 +262,7 @@ class PartyCogActivity(DirectObject):
if not opening: if not opening:
pos = self._doorStartPos[team] pos = self._doorStartPos[team]
else: else:
pos = (self._doorStartPos[team] + Point3(0, 0, -7.0),) pos = (self._doorStartPos[team] + Point3(0, 0, -7.0))
ival = self._arenaDoors[team].posInterval(0.75, pos, blendType='easeIn') ival = self._arenaDoors[team].posInterval(0.75, pos, blendType='easeIn')
self._arenaDoorIvals[team] = ival self._arenaDoorIvals[team] = ival
ival.start() ival.start()

View file

@ -19,14 +19,14 @@ class PartyEditorGridElement(DirectButton):
self.isDecoration = isDecoration self.isDecoration = isDecoration
self.checkSoldOutAndPaidStatusAndAffordability = checkSoldOutAndPaidStatusAndAffordability self.checkSoldOutAndPaidStatusAndAffordability = checkSoldOutAndPaidStatusAndAffordability
if self.isDecoration: if self.isDecoration:
self.name = TTLocalizer.PartyDecorationNameDict[self.id]['editor'] self._name = TTLocalizer.PartyDecorationNameDict[self.id]['editor']
colorList = ((1.0, 1.0, 1.0, 1.0), colorList = ((1.0, 1.0, 1.0, 1.0),
(0.0, 0.0, 1.0, 1.0), (0.0, 0.0, 1.0, 1.0),
(0.0, 1.0, 1.0, 1.0), (0.0, 1.0, 1.0, 1.0),
(0.5, 0.5, 0.5, 1.0)) (0.5, 0.5, 0.5, 1.0))
self.geom = self.partyEditor.partyPlanner.gui.find('**/%s' % PartyGlobals.DecorationInformationDict[self.id]['gridAsset']) self.geom = self.partyEditor.partyPlanner.gui.find('**/%s' % PartyGlobals.DecorationInformationDict[self.id]['gridAsset'])
else: else:
self.name = TTLocalizer.PartyActivityNameDict[self.id]['editor'] self._name = TTLocalizer.PartyActivityNameDict[self.id]['editor']
colorList = ((1.0, 1.0, 1.0, 1.0), colorList = ((1.0, 1.0, 1.0, 1.0),
(0.0, 1.0, 0.0, 1.0), (0.0, 1.0, 0.0, 1.0),
(1.0, 1.0, 0.0, 1.0), (1.0, 1.0, 0.0, 1.0),
@ -42,15 +42,15 @@ class PartyEditorGridElement(DirectButton):
self.defineoptions(kw, optiondefs) self.defineoptions(kw, optiondefs)
DirectButton.__init__(self, self.partyEditor.parent) DirectButton.__init__(self, self.partyEditor.parent)
self.initialiseoptions(PartyEditorGridElement) self.initialiseoptions(PartyEditorGridElement)
self.setName('%sGridElement' % self.name) self.setName('%sGridElement' % self._name)
self.bind(DirectGuiGlobals.B1PRESS, self.clicked) self.bind(DirectGuiGlobals.B1PRESS, self.clicked)
self.bind(DirectGuiGlobals.B1RELEASE, self.released) self.bind(DirectGuiGlobals.B1RELEASE, self.released)
self.bind(DirectGuiGlobals.ENTER, self.mouseEnter) self.bind(DirectGuiGlobals.ENTER, self.mouseEnter)
self.bind(DirectGuiGlobals.EXIT, self.mouseExit) self.bind(DirectGuiGlobals.EXIT, self.mouseExit)
self.uprightNodePath = NodePath('%sUpright' % self.name) self.uprightNodePath = NodePath('%sUpright' % self._name)
self.uprightNodePath.reparentTo(self) self.uprightNodePath.reparentTo(self)
rollOverZOffset = self.getGridSize()[1] / 30.0 rollOverZOffset = self.getGridSize()[1] / 30.0
self.rolloverTitle = DirectLabel(relief=None, parent=self.uprightNodePath, pos=Point3(0.0, 0.0, rollOverZOffset), text=self.name, text_fg=(1.0, 1.0, 1.0, 1.0), text_shadow=(0.0, 0.0, 0.0, 1.0), text_scale=0.075) self.rolloverTitle = DirectLabel(relief=None, parent=self.uprightNodePath, pos=Point3(0.0, 0.0, rollOverZOffset), text=self._name, text_fg=(1.0, 1.0, 1.0, 1.0), text_shadow=(0.0, 0.0, 0.0, 1.0), text_scale=0.075)
self.rolloverTitle.stash() self.rolloverTitle.stash()
self.stash() self.stash()
self.overValidSquare = False self.overValidSquare = False
@ -84,11 +84,11 @@ class PartyEditorGridElement(DirectButton):
self.getCorrectRotation()) self.getCorrectRotation())
def attach(self, mouseEvent): def attach(self, mouseEvent):
PartyEditorGridElement.notify.debug('attached grid element %s' % self.name) PartyEditorGridElement.notify.debug('attached grid element %s' % self._name)
taskMgr.remove('gridElementDragTask%s' % self.name) taskMgr.remove('gridElementDragTask%s' % self._name)
vWidget2render2d = self.getPos(render2d) vWidget2render2d = self.getPos(render2d)
vMouse2render2d = Point3(mouseEvent.getMouse()[0], 0, mouseEvent.getMouse()[1]) vMouse2render2d = Point3(mouseEvent.getMouse()[0], 0, mouseEvent.getMouse()[1])
taskMgr.add(self.elementDragTask, 'gridElementDragTask%s' % self.name) taskMgr.add(self.elementDragTask, 'gridElementDragTask%s' % self._name)
self.unstash() self.unstash()
self.rolloverTitle.unstash() self.rolloverTitle.unstash()
self.uprightNodePath.reparentTo(self) self.uprightNodePath.reparentTo(self)
@ -198,7 +198,7 @@ class PartyEditorGridElement(DirectButton):
return self.partyEditor.partyEditorGrid.getGridSquare(x, y) return self.partyEditor.partyEditorGrid.getGridSquare(x, y)
def detach(self, mouseEvent): def detach(self, mouseEvent):
taskMgr.remove('gridElementDragTask%s' % self.name) taskMgr.remove('gridElementDragTask%s' % self._name)
self.rolloverTitle.stash() self.rolloverTitle.stash()
if self.overValidSquare: if self.overValidSquare:
self.partyEditor.partyEditorGrid.registerNewElement(self, self.centerGridSquare, self.getGridSize()) self.partyEditor.partyEditorGrid.registerNewElement(self, self.centerGridSquare, self.getGridSize())
@ -237,14 +237,14 @@ class PartyEditorGridElement(DirectButton):
return return
def clicked(self, mouseEvent): def clicked(self, mouseEvent):
PartyEditorGridElement.notify.debug('clicked grid element %s' % self.name) PartyEditorGridElement.notify.debug('clicked grid element %s' % self._name)
if self.centerGridSquare is not None: if self.centerGridSquare is not None:
self.attach(mouseEvent) self.attach(mouseEvent)
self.partyEditor.partyEditorGrid.removeElement(self.centerGridSquare, self.getGridSize()) self.partyEditor.partyEditorGrid.removeElement(self.centerGridSquare, self.getGridSize())
return return
def released(self, mouseEvent): def released(self, mouseEvent):
PartyEditorGridElement.notify.debug('released grid element %s' % self.name) PartyEditorGridElement.notify.debug('released grid element %s' % self._name)
self.detach(mouseEvent) self.detach(mouseEvent)
def mouseEnter(self, mouseEvent): def mouseEnter(self, mouseEvent):

View file

@ -16,7 +16,7 @@ class PartyEditorListElement(DirectButton):
self.unreleased = self.calcUnreleased(id) self.unreleased = self.calcUnreleased(id)
self.comingSoonTextScale = 1.0 self.comingSoonTextScale = 1.0
if self.isDecoration: if self.isDecoration:
self.name = TTLocalizer.PartyDecorationNameDict[self.id]['editor'] self._name = TTLocalizer.PartyDecorationNameDict[self.id]['editor']
colorList = ((1.0, 0.0, 1.0, 1.0), colorList = ((1.0, 0.0, 1.0, 1.0),
(0.0, 0.0, 1.0, 1.0), (0.0, 0.0, 1.0, 1.0),
(0.0, 1.0, 1.0, 1.0), (0.0, 1.0, 1.0, 1.0),
@ -44,7 +44,7 @@ class PartyEditorListElement(DirectButton):
geom_pos = (0.0, 0.0, -3.9) geom_pos = (0.0, 0.0, -3.9)
scale = Vec3(0.05, 0.0001, 0.05) scale = Vec3(0.05, 0.0001, 0.05)
else: else:
self.name = TTLocalizer.PartyActivityNameDict[self.id]['editor'] self._name = TTLocalizer.PartyActivityNameDict[self.id]['editor']
colorList = ((0.0, 0.0, 0.0, 1.0), colorList = ((0.0, 0.0, 0.0, 1.0),
(0.0, 1.0, 0.0, 1.0), (0.0, 1.0, 0.0, 1.0),
(1.0, 1.0, 0.0, 1.0), (1.0, 1.0, 0.0, 1.0),
@ -66,7 +66,7 @@ class PartyEditorListElement(DirectButton):
self.defineoptions(kw, optiondefs) self.defineoptions(kw, optiondefs)
DirectButton.__init__(self, self.partyEditor.elementList) DirectButton.__init__(self, self.partyEditor.elementList)
self.initialiseoptions(PartyEditorListElement) self.initialiseoptions(PartyEditorListElement)
self.setName('%sListElement' % self.name) self.setName('%sListElement' % self._name)
self.setScale(scale) self.setScale(scale)
self.bind(DirectGuiGlobals.B1PRESS, self.clicked) self.bind(DirectGuiGlobals.B1PRESS, self.clicked)
self.bind(DirectGuiGlobals.B1RELEASE, self.released) self.bind(DirectGuiGlobals.B1RELEASE, self.released)
@ -104,15 +104,15 @@ class PartyEditorListElement(DirectButton):
gridElement.removeFromGrid() gridElement.removeFromGrid()
def elementSelectedFromList(self): def elementSelectedFromList(self):
PartyEditorListElement.notify.debug('Element %s clicked' % self.name) PartyEditorListElement.notify.debug('Element %s clicked' % self._name)
if self.isDecoration: if self.isDecoration:
self.partyEditor.partyPlanner.elementDescriptionNode.setText(TTLocalizer.PartyDecorationNameDict[self.id]['description']) self.partyEditor.partyPlanner.elementDescriptionNode.setText(TTLocalizer.PartyDecorationNameDict[self.id]['description'])
self.partyEditor.partyPlanner.elementPriceNode.setText('%d %s' % (PartyGlobals.DecorationInformationDict[self.id]['cost'], TTLocalizer.PartyPlannerBeans)) self.partyEditor.partyPlanner.elementPriceNode.setText('%d %s' % (PartyGlobals.DecorationInformationDict[self.id]['cost'], TTLocalizer.PartyPlannerBeans))
self.partyEditor.partyPlanner.elementTitleLabel['text'] = self.name self.partyEditor.partyPlanner.elementTitleLabel['text'] = self._name
else: else:
self.partyEditor.partyPlanner.elementDescriptionNode.setText(TTLocalizer.PartyActivityNameDict[self.id]['description']) self.partyEditor.partyPlanner.elementDescriptionNode.setText(TTLocalizer.PartyActivityNameDict[self.id]['description'])
self.partyEditor.partyPlanner.elementPriceNode.setText('%d %s' % (PartyGlobals.ActivityInformationDict[self.id]['cost'], TTLocalizer.PartyPlannerBeans)) self.partyEditor.partyPlanner.elementPriceNode.setText('%d %s' % (PartyGlobals.ActivityInformationDict[self.id]['cost'], TTLocalizer.PartyPlannerBeans))
self.partyEditor.partyPlanner.elementTitleLabel['text'] = self.name self.partyEditor.partyPlanner.elementTitleLabel['text'] = self._name
self.checkSoldOutAndPaidStatusAndAffordability() self.checkSoldOutAndPaidStatusAndAffordability()
def checkSoldOutAndPaidStatusAndAffordability(self): def checkSoldOutAndPaidStatusAndAffordability(self):
@ -172,7 +172,7 @@ class PartyEditorListElement(DirectButton):
self.partyEditor.partyPlanner.elementBuyButton['state'] = DirectGuiGlobals.DISABLED self.partyEditor.partyPlanner.elementBuyButton['state'] = DirectGuiGlobals.DISABLED
def clicked(self, mouseEvent): def clicked(self, mouseEvent):
PartyEditorListElement.notify.debug("Element %s's icon was clicked" % self.name) PartyEditorListElement.notify.debug("Element %s's icon was clicked" % self._name)
self.partyEditor.listElementClicked() self.partyEditor.listElementClicked()
for i in range(len(self.partyEditorGridElements)): for i in range(len(self.partyEditorGridElements)):
if not self.partyEditorGridElements[i].overValidSquare: if not self.partyEditorGridElements[i].overValidSquare:
@ -191,7 +191,7 @@ class PartyEditorListElement(DirectButton):
return False return False
def released(self, mouseEvent): def released(self, mouseEvent):
PartyEditorListElement.notify.debug("Element %s's icon was released" % self.name) PartyEditorListElement.notify.debug("Element %s's icon was released" % self._name)
self.partyEditor.listElementReleased() self.partyEditor.listElementReleased()
if self.activeGridElementIndex != -1: if self.activeGridElementIndex != -1:
self.partyEditorGridElements[self.activeGridElementIndex].detach(mouseEvent) self.partyEditorGridElements[self.activeGridElementIndex].detach(mouseEvent)

View file

@ -8,6 +8,7 @@ from toontown.toonbase import TTLocalizer
from toontown.toontowngui import TTDialog from toontown.toontowngui import TTDialog
from toontown.parties import PartyGlobals from toontown.parties import PartyGlobals
from toontown.parties import PartyUtils from toontown.parties import PartyUtils
import functools
class PublicPartyGui(DirectFrame): class PublicPartyGui(DirectFrame):
notify = directNotify.newCategory('PublicPartyGui') notify = directNotify.newCategory('PublicPartyGui')
@ -80,7 +81,7 @@ class PublicPartyGui(DirectFrame):
else: else:
return 1 return 1
sortedList.sort(cmp, reverse=True) sortedList.sort(key=functools.cmp_to_key(cmp), reverse=True)
indexToCut = -1 indexToCut = -1
for index, partyTuple in enumerate(sortedList): for index, partyTuple in enumerate(sortedList):
numberOfGuests = partyTuple[2] numberOfGuests = partyTuple[2]

View file

@ -10,12 +10,12 @@ class ScrolledFriendList(DirectScrolledList):
def __init__(self, parent, gui, clickCallback = None, makeItemsCheckBoxes = False): def __init__(self, parent, gui, clickCallback = None, makeItemsCheckBoxes = False):
self.makeItemsCheckBoxes = makeItemsCheckBoxes self.makeItemsCheckBoxes = makeItemsCheckBoxes
self.clickCallback = clickCallback self.clickCallback = clickCallback
self.parent = parent self._parent = parent
self.gui = gui self.gui = gui
self.scrollSpeed = 1 self.scrollSpeed = 1
DirectScrolledList.__init__(self, parent=parent, relief=None, incButton_image=(self.gui.find('**/inviteButtonDown_up'), self.gui.find('**/inviteButtonDown_down'), self.gui.find('**/inviteButtonDown_rollover')), incButton_relief=None, incButton_pos=(0.0, 0.0, -0.03), incButton_image3_color=Vec4(0.6, 0.6, 0.6, 0.6), decButton_image=(self.gui.find('**/inviteButtonUp_up'), self.gui.find('**/inviteButtonUp_down'), self.gui.find('**/inviteButtonUp_rollover')), decButton_relief=None, decButton_pos=(0.0, 0.0, 0.02), decButton_image3_color=Vec4(0.6, 0.6, 0.6, 0.6), itemFrame_relief=None, forceHeight=0.084, numItemsVisible=8, items=[], incButtonCallback=self.scrollButtonPressed, decButtonCallback=self.scrollButtonPressed, itemFrame_pos=(0.0, 0.0, -0.01)) DirectScrolledList.__init__(self, parent=parent, relief=None, incButton_image=(self.gui.find('**/inviteButtonDown_up'), self.gui.find('**/inviteButtonDown_down'), self.gui.find('**/inviteButtonDown_rollover')), incButton_relief=None, incButton_pos=(0.0, 0.0, -0.03), incButton_image3_color=Vec4(0.6, 0.6, 0.6, 0.6), decButton_image=(self.gui.find('**/inviteButtonUp_up'), self.gui.find('**/inviteButtonUp_down'), self.gui.find('**/inviteButtonUp_rollover')), decButton_relief=None, decButton_pos=(0.0, 0.0, 0.02), decButton_image3_color=Vec4(0.6, 0.6, 0.6, 0.6), itemFrame_relief=None, forceHeight=0.084, numItemsVisible=8, items=[], incButtonCallback=self.scrollButtonPressed, decButtonCallback=self.scrollButtonPressed, itemFrame_pos=(0.0, 0.0, -0.01))
self.incButtonCallback = None self._DirectScrolledList__incButtonCallback = None
self.decButtonCallback = None self._DirectScrolledList__decButtonCallback = None
self.setForceHeight() self.setForceHeight()
return return

View file

@ -4,7 +4,7 @@ from toontown.toon import NPCToons
from toontown.toonbase import TTLocalizer from toontown.toonbase import TTLocalizer
from direct.task.Task import Task from direct.task.Task import Task
from direct.distributed import ClockDelta from direct.distributed import ClockDelta
from pandac.PandaModules import Point3 from panda3d.core import Point3, Quat
from panda3d.otp import CFSpeech, CFTimeout from panda3d.otp import CFSpeech, CFTimeout
from toontown.toontowngui import TTDialog from toontown.toontowngui import TTDialog
from otp.otpbase import OTPLocalizer from otp.otpbase import OTPLocalizer
@ -21,12 +21,15 @@ class DistributedNPCPartyPerson(DistributedNPCToonBase):
self.button = None self.button = None
self.askGui = None self.askGui = None
self.teaserDialog = None self.teaserDialog = None
self.lerpCameraSeq = None
return return
def disable(self): def disable(self):
self.ignoreAll() self.ignoreAll()
taskMgr.remove(self.uniqueName('popupAskGUI')) taskMgr.remove(self.uniqueName('popupAskGUI'))
taskMgr.remove(self.uniqueName('lerpCamera')) if self.lerpCameraSeq:
self.lerpCameraSeq.finish()
self.lerpCameraSeq = None
self.av = None self.av = None
if self.isInteractingWithLocalToon: if self.isInteractingWithLocalToon:
base.localAvatar.posCamera(0, 0) base.localAvatar.posCamera(0, 0)
@ -85,7 +88,9 @@ class DistributedNPCPartyPerson(DistributedNPCToonBase):
def resetPartyPerson(self): def resetPartyPerson(self):
self.ignoreAll() self.ignoreAll()
taskMgr.remove(self.uniqueName('popupAskGUI')) taskMgr.remove(self.uniqueName('popupAskGUI'))
taskMgr.remove(self.uniqueName('lerpCamera')) if self.lerpCameraSeq:
self.lerpCameraSeq.finish()
self.lerpCameraSeq = None
if self.askGui: if self.askGui:
self.askGui.hide() self.askGui.hide()
self.show() self.show()
@ -105,7 +110,9 @@ class DistributedNPCPartyPerson(DistributedNPCToonBase):
if mode == NPCToons.PARTY_MOVIE_CLEAR: if mode == NPCToons.PARTY_MOVIE_CLEAR:
return return
if mode == NPCToons.PARTY_MOVIE_TIMEOUT: if mode == NPCToons.PARTY_MOVIE_TIMEOUT:
taskMgr.remove(self.uniqueName('lerpCamera')) if self.lerpCameraSeq:
self.lerpCameraSeq.finish()
self.lerpCameraSeq = None
if self.isInteractingWithLocalToon: if self.isInteractingWithLocalToon:
self.ignore(self.planPartyQuestionGuiDoneEvent) self.ignore(self.planPartyQuestionGuiDoneEvent)
if self.askGui: if self.askGui:
@ -123,7 +130,10 @@ class DistributedNPCPartyPerson(DistributedNPCToonBase):
self.setupAvatars(self.av) self.setupAvatars(self.av)
if self.isInteractingWithLocalToon: if self.isInteractingWithLocalToon:
camera.wrtReparentTo(render) camera.wrtReparentTo(render)
camera.lerpPosHpr(-5, 9, base.localAvatar.getHeight() - 0.5, -150, -2, 0, 1, other=self, blendType='easeOut', task=self.uniqueName('lerpCamera')) quat = Quat()
quat.setHpr((-150, -2, 0))
self.lerpCameraSeq = camera.posQuatInterval(1, Point3(-5, 9, base.localAvatar.getHeight() - 0.5), quat, other=self, blendType='easeOut', name=self.uniqueName('lerpCamera'))
self.lerpCameraSeq.start()
taskMgr.doMethodLater(1.0, self.popupAskGUI, self.uniqueName('popupAskGUI')) taskMgr.doMethodLater(1.0, self.popupAskGUI, self.uniqueName('popupAskGUI'))
else: else:
self.setChatAbsolute(TTLocalizer.PartyDoYouWantToPlan, CFSpeech | CFTimeout) self.setChatAbsolute(TTLocalizer.PartyDoYouWantToPlan, CFSpeech | CFTimeout)
@ -134,7 +144,7 @@ class DistributedNPCPartyPerson(DistributedNPCToonBase):
if self.isInteractingWithLocalToon: if self.isInteractingWithLocalToon:
base.localAvatar.aboutToPlanParty = True base.localAvatar.aboutToPlanParty = True
base.cr.partyManager.setPartyPlannerStyle(self.style) base.cr.partyManager.setPartyPlannerStyle(self.style)
base.cr.partyManager.setPartyPlannerName(self.name) base.cr.partyManager.setPartyPlannerName(self._name)
base.localAvatar.creatingNewPartyWithMagicWord = False base.localAvatar.creatingNewPartyWithMagicWord = False
loaderId = 'safeZoneLoader' loaderId = 'safeZoneLoader'
whereId = 'party' whereId = 'party'