mirror of
https://github.com/Sneed-Group/Poodletooth-iLand
synced 2025-01-09 17:53:50 +00:00
Cleanup some code and fix Fireworks.
This commit is contained in:
parent
17fc247f39
commit
3f83a25f3f
5 changed files with 9 additions and 14 deletions
|
@ -25,7 +25,7 @@ class DistributedJorElCam(DistributedObject):
|
|||
self.head.setScale(10)
|
||||
self.head.startBlink()
|
||||
self.head.startLookAround()
|
||||
|
||||
|
||||
pieces = [['*head*', '*muzzle*'], ['*ears*', '*nose*']]
|
||||
for p in pieces[0]:
|
||||
pc = '**/%s' % p
|
||||
|
@ -37,7 +37,7 @@ class DistributedJorElCam(DistributedObject):
|
|||
for node in self.head.findAllMatches(pc):
|
||||
if not node.is_empty():
|
||||
node.setColor(0, 0, 0, 1)
|
||||
|
||||
|
||||
base.cr.jorElHead = self.head
|
||||
|
||||
def delete(self):
|
||||
|
|
|
@ -172,4 +172,4 @@ class ToontownChatManager(ChatManager.ChatManager):
|
|||
self.fsm.request('mainMenu')
|
||||
|
||||
def messageSent(self):
|
||||
pass
|
||||
pass
|
||||
|
|
|
@ -100,14 +100,13 @@ class TTCodeRedemptionMgrAI(DistributedObjectAI):
|
|||
self.sendUpdateToAvatarId(avId, 'redeemCodeResult', [5])
|
||||
print ("%s attempted to redeem code %s but it wasn't usable yet!" % (avId, code))
|
||||
return
|
||||
|
||||
|
||||
av.redeemCode(code)
|
||||
self.requestCodeRedeem(avId, av, codeInfo['items'])
|
||||
print ('%s successfully redeemed %s' % (avId, code))
|
||||
else:
|
||||
self.sendUpdateToAvatarId(avId, 'redeemCodeResult', [1])
|
||||
print ('%s tried to redeem non-existant code %s' % (avId, code))
|
||||
|
||||
|
||||
def requestCodeRedeem(self, avId, av, items):
|
||||
count = self.getMailboxCount(items)
|
||||
|
|
|
@ -52,9 +52,8 @@ def fireworks(showName='july4'):
|
|||
return 'Invalid fireworks show name!'
|
||||
numShows = len(FireworkShows.shows.get(showType, []))
|
||||
showIndex = random.randint(0, numShows - 1)
|
||||
# TODO: Start the fireworks show in all districts.
|
||||
for hood in simbase.air.hoods:
|
||||
if hood.safezone == ToontownGlobals.GolfZone:
|
||||
if hood.zoneId == ToontownGlobals.GolfZone:
|
||||
continue
|
||||
fireworkShow = DistributedFireworkShowAI(simbase.air)
|
||||
fireworkShow.generateWithRequired(hood.zoneId)
|
||||
|
|
|
@ -132,6 +132,9 @@ class FireworkShowMixin:
|
|||
if self.fireworkShow and not self.fireworkShow.isEmpty():
|
||||
self.fireworkShow.setColorScaleOff(0)
|
||||
return
|
||||
if self.__checkHoodValidity() and hasattr(base.cr.playGame, 'hood') and base.cr.playGame.hood and hasattr(base.cr.playGame.hood, 'sky') and base.cr.playGame.hood.sky:
|
||||
preShow = Sequence(Func(base.localAvatar.setSystemMessage, 0, startMessage), Parallel(LerpColorScaleInterval(base.cr.playGame.hood.sky, 2.5, Vec4(0.0, 0.0, 0.0, 1.0)), LerpColorScaleInterval(base.cr.playGame.hood.loader.geom, 2.5, Vec4(0.25, 0.25, 0.35, 1)), LerpColorScaleInterval(base.localAvatar, 2.5, Vec4(0.85, 0.85, 0.85, 1)), Func(__lightDecorationOn__)), Func(base.setBackgroundColor, Vec4(0, 0, 0, 1)), Func(self.__checkDDFog), Func(base.camLens.setFar, 1000.0), Func(base.cr.playGame.hood.sky.hide), Func(base.localAvatar.setSystemMessage, 0, instructionMessage), Func(self.getLoader().music.stop), Wait(2.0), Func(base.playMusic, self.showMusic, 0, 1, 0.8, max(0, startT)))
|
||||
return preShow
|
||||
return None
|
||||
|
||||
def restoreCameraLens(self):
|
||||
|
@ -156,13 +159,7 @@ class FireworkShowMixin:
|
|||
return None
|
||||
|
||||
if self.__checkHoodValidity() and hasattr(base.cr.playGame.hood, 'sky') and base.cr.playGame.hood.sky:
|
||||
# Election Only
|
||||
hood = self.getHood()
|
||||
if hood.id == ToontownCentral:
|
||||
postShow = Sequence(Func(base.cr.playGame.hood.sky.show), Parallel(LerpColorScaleInterval(base.cr.playGame.hood.sky, 2.5, Vec4(1, 1, 1, 1)), LerpColorScaleInterval(base.cr.playGame.hood.loader.geom, 2.5, Vec4(1, 1, 1, 1)), LerpColorScaleInterval(self.electionFloor, 2.5, Vec4(1, 1, 1, 1)), LerpColorScaleInterval(self.slappyBalloon, 2.5, Vec4(1, 1, 1, 1)), LerpColorScaleInterval(base.localAvatar, 2.5, Vec4(1, 1, 1, 1))), Func(self.__restoreDDFog), Func(self.restoreCameraLens), Func(base.setBackgroundColor, DefaultBackgroundColor), Func(self.showMusic.stop), Func(base.localAvatar.setSystemMessage, 0, endMessage))
|
||||
else:
|
||||
postShow = Sequence(Func(base.cr.playGame.hood.sky.show), Parallel(LerpColorScaleInterval(base.cr.playGame.hood.sky, 2.5, Vec4(1, 1, 1, 1)), LerpColorScaleInterval(base.cr.playGame.hood.loader.geom, 2.5, Vec4(1, 1, 1, 1)), LerpColorScaleInterval(base.localAvatar, 2.5, Vec4(1, 1, 1, 1))), Func(self.__restoreDDFog), Func(self.restoreCameraLens), Func(base.setBackgroundColor, DefaultBackgroundColor), Func(self.showMusic.stop), Func(base.localAvatar.setSystemMessage, 0, endMessage))
|
||||
#postShow = Sequence(Func(base.cr.playGame.hood.sky.show), Parallel(LerpColorScaleInterval(base.cr.playGame.hood.sky, 2.5, Vec4(1, 1, 1, 1)), LerpColorScaleInterval(base.cr.playGame.hood.loader.geom, 2.5, Vec4(1, 1, 1, 1)), LerpColorScaleInterval(base.localAvatar, 2.5, Vec4(1, 1, 1, 1))), Func(self.__restoreDDFog), Func(self.restoreCameraLens), Func(base.setBackgroundColor, DefaultBackgroundColor), Func(self.showMusic.stop), Func(base.localAvatar.setSystemMessage, 0, endMessage))
|
||||
postShow = Sequence(Func(base.cr.playGame.hood.sky.show), Parallel(LerpColorScaleInterval(base.cr.playGame.hood.sky, 2.5, Vec4(1, 1, 1, 1)), LerpColorScaleInterval(base.cr.playGame.hood.loader.geom, 2.5, Vec4(1, 1, 1, 1)), LerpColorScaleInterval(base.localAvatar, 2.5, Vec4(1, 1, 1, 1))), Func(self.__restoreDDFog), Func(self.restoreCameraLens), Func(base.setBackgroundColor, DefaultBackgroundColor), Func(self.showMusic.stop), Func(base.localAvatar.setSystemMessage, 0, endMessage))
|
||||
if self.restorePlaygroundMusic:
|
||||
postShow.append(Wait(2.0))
|
||||
postShow.append(Func(base.playMusic, self.getLoader().music, 1, 1, 0.8))
|
||||
|
|
Loading…
Reference in a new issue