Merge branch 'doomsday-credits' into doomsday
Conflicts: toontown/election/DistributedElectionEvent.py
This commit is contained in:
commit
f93d37e8c9
12 changed files with 445 additions and 17 deletions
181
toontown/credits/AlphaCredits.py
Normal file
181
toontown/credits/AlphaCredits.py
Normal file
|
@ -0,0 +1,181 @@
|
|||
from pandac.PandaModules import *
|
||||
from direct.interval.IntervalGlobal import *
|
||||
from direct.gui.OnscreenText import OnscreenText
|
||||
from direct.gui.OnscreenImage import OnscreenImage
|
||||
from toontown.toonbase import ToontownGlobals
|
||||
|
||||
def doFade(fade, elements):
|
||||
if fade == 'in':
|
||||
for node in elements:
|
||||
Sequence(node.colorScaleInterval(0.5, (1, 1, 1, 1))).start()
|
||||
elif fade == 'out':
|
||||
for node in elements:
|
||||
Sequence(node.colorScaleInterval(0.5, (1, 1, 1, 0))).start()
|
||||
elif fade == 'hide':
|
||||
for node in elements:
|
||||
node.setColorScale(1, 1, 1, 0)
|
||||
|
||||
class Shockley:
|
||||
def __init__(self, preload=False):
|
||||
self.sceneRoot = None
|
||||
self.preload = preload
|
||||
|
||||
def load(self):
|
||||
self.sceneRoot = NodePath('Shockley')
|
||||
base.setBackgroundColor(0, 0, 0, 1)
|
||||
|
||||
self.title = OnscreenText(text='Shockley ', pos=(0.6, 0.15, 0.0), scale=(0.15), fg=(1, 1, 1, 1), font=ToontownGlobals.getSignFont(), align=TextNode.ACenter)
|
||||
self.description = OnscreenText(text='Lead Developer\nNetwork Technician\nGame Systems Engineer', pos=(0.25, 0.05, 0.0), scale=(0.06), fg=(1, 1, 1, 1), font=ToontownGlobals.getMinnieFont(), align=TextNode.ALeft)
|
||||
self.image = OnscreenImage(image='phase_4/maps/news/11-17-13_garden.jpg', pos=(-0.5, 0.0, 0.0), scale=(0.5, 0.30, 0.30))
|
||||
|
||||
self.elements = [self.title, self.description, self.image]
|
||||
for node in self.elements:
|
||||
node.setTransparency(1)
|
||||
if self.preload:
|
||||
node.setColorScale(1, 1, 1, 0)
|
||||
|
||||
def makeInterval(self):
|
||||
return Sequence(
|
||||
ParentInterval(self.sceneRoot, render),
|
||||
# This fades in during the election's WrapUp state to prevent jittering when loading this first scene.
|
||||
Wait(3),
|
||||
Func(doFade, 'out', self.elements),
|
||||
Wait(0.5),
|
||||
ParentInterval(self.sceneRoot, hidden)
|
||||
)
|
||||
|
||||
def unload(self):
|
||||
self.sceneRoot.removeNode()
|
||||
self.title.removeNode()
|
||||
self.description.removeNode()
|
||||
self.image.removeNode()
|
||||
|
||||
class Credits:
|
||||
def __init__(self, name, description, image, side = 'left', number = 1, name2 = None, description2 = None, image2 = None, special = None):
|
||||
self.sceneRoot = None
|
||||
self.twoSlides = None
|
||||
self.toonName = name
|
||||
self.toonDescription = description
|
||||
self.toonImage = image
|
||||
self.side = side
|
||||
self.special = special # For special types of slides, like the final one
|
||||
if number > 1:
|
||||
self.toon2Name = name2
|
||||
self.toon2Description = description2
|
||||
self.toon2Image = image2
|
||||
self.twoSlides = True
|
||||
|
||||
def load(self):
|
||||
self.sceneRoot = NodePath(self.toonName.replace(' ', '').replace('',''))
|
||||
base.setBackgroundColor(0, 0, 0, 1)
|
||||
|
||||
if self.twoSlides:
|
||||
if self.side == 'left':
|
||||
# Left Top
|
||||
titlePos = (0.1, 0.5, 0.0)
|
||||
descriptionPos = (0.2, 0.4, 0.0)
|
||||
imagePos = (-0.55, 0.0, 0.4)
|
||||
textAlignment = TextNode.ALeft
|
||||
# Right Bottom
|
||||
title2Pos = (-0.1, -0.35, 0.0)
|
||||
description2Pos = (-0.1, -0.45, 0.0)
|
||||
image2Pos = (0.55, 0.0, -0.4)
|
||||
text2Alignment = TextNode.ARight
|
||||
else:
|
||||
# Right Top
|
||||
titlePos = (-0.1, 0.5, 0.0)
|
||||
descriptionPos = (-0.1, 0.4, 0.0)
|
||||
imagePos = (0.55, 0.0, 0.4)
|
||||
textAlignment = TextNode.ARight
|
||||
# Left Bottom
|
||||
title2Pos = (0.1, -0.35, 0.0)
|
||||
description2Pos = (0.25, -0.45, 0.0)
|
||||
image2Pos = (-0.55, 0.0, -0.4)
|
||||
text2Alignment = TextNode.ALeft
|
||||
elif self.side == 'left':
|
||||
# Left Middle
|
||||
titlePos = (0.1, 0.15, 0.0)
|
||||
descriptionPos = (0.2, 0.05, 0.0)
|
||||
imagePos = (-0.5, 0.0, 0.0)
|
||||
textAlignment = TextNode.ALeft
|
||||
else:
|
||||
# Right Middle
|
||||
titlePos = (-0.1, 0.1, 0.0)
|
||||
descriptionPos = (-0.11, 0.0, 0.0)
|
||||
imagePos = (0.5, 0.0, 0.0)
|
||||
textAlignment = TextNode.ARight
|
||||
|
||||
self.title = OnscreenText(text=self.toonName, pos=titlePos, scale=(0.15), fg=(1, 1, 1, 1), font=ToontownGlobals.getSignFont(), align=textAlignment)
|
||||
self.description = OnscreenText(text=self.toonDescription, pos=descriptionPos, scale=(0.06), fg=(1, 1, 1, 1), font=ToontownGlobals.getMinnieFont(), align=textAlignment)
|
||||
self.image = OnscreenImage(image='phase_4/maps/news/%s' % self.toonImage, pos=imagePos, scale=(0.5, 0.30, 0.30))
|
||||
self.elements = [self.title, self.description, self.image]
|
||||
|
||||
if self.twoSlides:
|
||||
self.title2 = OnscreenText(text=self.toon2Name, pos=title2Pos, scale=(0.15), fg=(1, 1, 1, 1), font=ToontownGlobals.getSignFont(), align=text2Alignment)
|
||||
self.description2 = OnscreenText(text=self.toon2Description, pos=description2Pos, scale=(0.06), fg=(1, 1, 1, 1), font=ToontownGlobals.getMinnieFont(), align=text2Alignment)
|
||||
self.image2 = OnscreenImage(image='phase_4/maps/news/%s' % self.toon2Image, pos=image2Pos, scale=(0.5, 0.30, 0.30))
|
||||
self.elements.extend([self.title2, self.description2, self.image2])
|
||||
|
||||
for node in self.elements:
|
||||
node.setTransparency(1)
|
||||
node.setColorScale(1, 1, 1, 0)
|
||||
|
||||
def makeInterval(self):
|
||||
if self.special == 'final':
|
||||
# Hide the last slide, rather than fade out
|
||||
return Sequence(
|
||||
ParentInterval(self.sceneRoot, render),
|
||||
Func(doFade, 'in', self.elements),
|
||||
Wait(3),
|
||||
Func(doFade, 'hide', self.elements),
|
||||
ParentInterval(self.sceneRoot, hidden)
|
||||
)
|
||||
else:
|
||||
# Just a normal slide
|
||||
return Sequence(
|
||||
ParentInterval(self.sceneRoot, render),
|
||||
Func(doFade, 'in', self.elements),
|
||||
Wait(3.5),
|
||||
Func(doFade, 'out', self.elements),
|
||||
Wait(0.5),
|
||||
ParentInterval(self.sceneRoot, hidden)
|
||||
)
|
||||
|
||||
def unload(self):
|
||||
self.sceneRoot.removeNode()
|
||||
self.title.removeNode()
|
||||
self.description.removeNode()
|
||||
self.image.removeNode()
|
||||
self.elements = None
|
||||
self.toonName = None
|
||||
self.toonDescription = None
|
||||
self.toonImage = None
|
||||
self.side = None
|
||||
|
||||
CreditsScenes = [
|
||||
# Developers
|
||||
Shockley(),
|
||||
Credits('Sir Max', 'Team Lead\nCommunity Manager\nDeveloper', '10-29-13_cannon.jpg', 'left'),
|
||||
Credits('McQuack', 'Expert of Explosives\nDeveloper', '14-3-17_dontworryhesurvived.jpg', 'right', 2, 'Hawkheart', 'Fish Bingo Controller\nDeveloper', '11-11-13_bingo.jpg'),
|
||||
Credits('Fat McStink', 'Ultimate Party King\nServer Administraitor\nDeveloper', '11-8-13_pieornot.jpg', 'right'),
|
||||
Credits('Hamlet', 'Server Technology Engineer\nDeveloper', 'hamlet.jpg', 'left', 2, 'Muddy Paws', 'Expert Cake Baker\nMac Support\nDeveloper', 'muddy-paws.jpg'),
|
||||
Credits('Goshi', 'Self-proclaimed Police\nSupport Manager\nModerator', '14-4-1_itsabirthdefect-nothingsilly.jpg', 'right', 2, 'J.C.', 'Champion Chatterbox\nMoral Support\nModerator', '11-2-13_whatdoesjcsay.jpg'),
|
||||
|
||||
# Artists
|
||||
Credits('Capt. Sandy', '\n\nLead Art Director\nGraphic Designer\nConcept Artist', 'capt_sandy.jpg', 'left', 2, 'Boo Boo', 'Novice Painter\nTexture Artist', '03-4-19_kickedthebucket.jpg'),
|
||||
Credits('Slate', 'Texture Artist', '12-6-13_slate.jpg', 'right', 2, 'Joyful Roxy', 'Texture Artist', 'roxys_joyful_uber.jpg'),
|
||||
|
||||
# Too Many Secrets
|
||||
Credits('Too Many\nSecrets', '\n\nMany Secret Things\nDeveloper', 'toomanysecrets.jpg', 'left'),
|
||||
|
||||
# Modelers
|
||||
Credits('Roger Dog', 'Roger Dog\n3D Modeler\nAnimator', '11-21-13_hiimrogerdog.jpg', 'left', 2, 'Flippy Cheezer', 'The Speedway Master\n3D Modeler\nCharacter Rigger', '03-4-19_themoldermaker.jpg'),
|
||||
Credits('Scooter', 'Puzzle Piecer\nARG Organizer', '11-16-13_whatisthis.jpg', 'left', 2, 'Joshsora', 'Infinite Patience\nFormer 3D Modeler', '12-21-13_theworldendedtodaylastyear.jpg'),
|
||||
|
||||
# Composers
|
||||
Credits('Cool Peaches', 'Lead Composer\nElection Orchestrator', 'capt_sandy.jpg', 'right', 2, 'Jethred', 'Theme Song Composer', 'capt_sandy.jpg'),
|
||||
|
||||
# Special Thanks to:
|
||||
Credits('Disney Online', 'The owners and creators\nof Toontown.', '11-20-13_donald.jpg', 'left', 2, 'VR Studio', 'For developing Toontown Online.', '11-15-13_grey.jpg'),
|
||||
Credits('Jaymo', 'For his continued efforts\nto bring Toontown back.', '14-1-22_ohmanohmanOHMAN.jpg', 'left'),
|
||||
]
|
73
toontown/credits/CreditsSequence.py
Normal file
73
toontown/credits/CreditsSequence.py
Normal file
|
@ -0,0 +1,73 @@
|
|||
from direct.interval.IntervalGlobal import *
|
||||
from otp.ai.MagicWordGlobal import *
|
||||
|
||||
# I would prefer this to be passed in init so we don't have to load
|
||||
# unnecessary imports for different sequences, but Harv says no :(
|
||||
from AlphaCredits import *
|
||||
|
||||
class CreditsSequence:
|
||||
def __init__(self, sequence):
|
||||
self.loaded = False
|
||||
self.sequence = sequence # So we can load different types of sequences
|
||||
self.interval = None
|
||||
self.localToonName = None
|
||||
|
||||
# Any credits sequence should have "CreditsScenes" to list the order of the sequence.
|
||||
self.creditsScenes = CreditsScenes
|
||||
|
||||
def load(self):
|
||||
if self.loaded:
|
||||
return
|
||||
|
||||
if self.sequence == 'alpha' and self.localToonName is not None:
|
||||
self.creditsScenes.append(
|
||||
Credits(self.localToonName, 'Alpha Tester\nDoomsday Survivor', 'flippy_cheezer.jpg', 'left', special = 'final')
|
||||
)
|
||||
|
||||
for scene in self.creditsScenes:
|
||||
scene.load()
|
||||
|
||||
self.loaded = True
|
||||
|
||||
def unload(self):
|
||||
if not self.loaded:
|
||||
return
|
||||
|
||||
for scene in self.creditsScenes:
|
||||
scene.unload()
|
||||
|
||||
self.loaded = False
|
||||
|
||||
def setLocalToonDetails(self, name, dna):
|
||||
self.localToonName = name
|
||||
self.localToonDNA = dna
|
||||
|
||||
def enter(self):
|
||||
# Begin playing the credits sequence.
|
||||
if self.interval:
|
||||
return # Already playing!
|
||||
|
||||
if not self.loaded:
|
||||
self.load()
|
||||
|
||||
self.interval = Sequence()
|
||||
for scene in self.creditsScenes:
|
||||
self.interval.append(scene.makeInterval())
|
||||
|
||||
self.interval.start()
|
||||
|
||||
def exit(self):
|
||||
if self.interval:
|
||||
self.interval.finish()
|
||||
self.interval = None
|
||||
|
||||
@magicWord()
|
||||
def rollCredits():
|
||||
"""
|
||||
Request that the credits sequence play back.
|
||||
This will disconnect you.
|
||||
"""
|
||||
|
||||
taskMgr.doMethodLater(0.1, base.cr.loginFSM.request,
|
||||
'rollCredits-magic-word',
|
||||
extraArgs=['credits'])
|
77
toontown/credits/TestScenes.py
Normal file
77
toontown/credits/TestScenes.py
Normal file
|
@ -0,0 +1,77 @@
|
|||
from pandac.PandaModules import *
|
||||
from direct.interval.IntervalGlobal import *
|
||||
from otp.nametag.NametagConstants import *
|
||||
from toontown.toon import NPCToons
|
||||
|
||||
class TestScene1:
|
||||
def __init__(self):
|
||||
self.sceneRoot = None
|
||||
|
||||
def load(self):
|
||||
self.sceneRoot = NodePath('scene1')
|
||||
tn = TextNode('text')
|
||||
tn.setText('Hello world!')
|
||||
tn.setAlign(tn.ACenter)
|
||||
self.tnnp = self.sceneRoot.attachNewNode(tn)
|
||||
self.tnnp.setPos(0, 5, 0)
|
||||
|
||||
def makeInterval(self):
|
||||
return Sequence(
|
||||
ParentInterval(self.sceneRoot, render),
|
||||
self.tnnp.hprInterval(10, (0, 0, 360)),
|
||||
ParentInterval(self.sceneRoot, hidden)
|
||||
)
|
||||
|
||||
def unload(self):
|
||||
self.sceneRoot.removeNode()
|
||||
|
||||
class TestScene2:
|
||||
def __init__(self):
|
||||
self.sceneRoot = None
|
||||
|
||||
def load(self):
|
||||
self.sceneRoot = NodePath('scene1')
|
||||
tn = TextNode('text')
|
||||
tn.setText('Scene #2!')
|
||||
self.tnnp = self.sceneRoot.attachNewNode(tn)
|
||||
self.tnnp.setPos(10, 5, 0)
|
||||
|
||||
def makeInterval(self):
|
||||
return Sequence(
|
||||
ParentInterval(self.sceneRoot, render),
|
||||
self.tnnp.posInterval(10, (-10, 5, 0)),
|
||||
ParentInterval(self.sceneRoot, hidden)
|
||||
)
|
||||
|
||||
def unload(self):
|
||||
self.sceneRoot.removeNode()
|
||||
|
||||
class FlippyScene:
|
||||
def __init__(self):
|
||||
self.sceneRoot = None
|
||||
|
||||
def load(self):
|
||||
self.sceneRoot = NodePath('scene1')
|
||||
tn = TextNode('text')
|
||||
tn.setText('Flippy')
|
||||
tn.setAlign(tn.ACenter)
|
||||
self.tnnp = self.sceneRoot.attachNewNode(tn)
|
||||
self.tnnp.setPos(20, 30, 2)
|
||||
|
||||
self.flippy = NPCToons.createLocalNPC(2001)
|
||||
self.flippy.reparentTo(self.sceneRoot)
|
||||
self.flippy.setPos(0, 10, -5)
|
||||
self.flippy.setH(180)
|
||||
|
||||
def makeInterval(self):
|
||||
return Sequence(
|
||||
ParentInterval(self.sceneRoot, render),
|
||||
Func(self.flippy.setChatAbsolute, 'UNITE!', CFSpeech|CFTimeout),
|
||||
Parallel(ActorInterval(self.flippy, 'victory', playRate=0.75, startFrame=0, endFrame=9), self.tnnp.posHprInterval(0.5, (5, 25, 3), (0, 0, 10))),
|
||||
self.tnnp.posHprInterval(2, (4, 26, 3), (5, 0, 30)),
|
||||
Parallel(ActorInterval(self.flippy, 'victory', playRate=0.75, startFrame=9, endFrame=0), self.tnnp.posHprInterval(0.5, (0, 30, 15), (0, 0, -30))),
|
||||
ParentInterval(self.sceneRoot, hidden)
|
||||
)
|
||||
|
||||
def unload(self):
|
||||
self.sceneRoot.removeNode()
|
1
toontown/credits/__init__.py
Normal file
1
toontown/credits/__init__.py
Normal file
|
@ -0,0 +1 @@
|
|||
|
|
@ -48,6 +48,7 @@ from toontown.distributed import ToontownDistrictStats
|
|||
from toontown.makeatoon import TTPickANamePattern
|
||||
from toontown.parties import ToontownTimeManager
|
||||
from toontown.toon import Toon, DistributedToon
|
||||
from toontown.credits.CreditsSequence import CreditsSequence
|
||||
from ToontownMsgTypes import *
|
||||
import HoodMgr
|
||||
import PlayGame
|
||||
|
@ -126,6 +127,13 @@ class ToontownClientRepository(OTPClientRepository.OTPClientRepository):
|
|||
state.addTransition('skipTutorialRequest')
|
||||
state = self.gameFSM.getStateNamed('playGame')
|
||||
state.addTransition('skipTutorialRequest')
|
||||
|
||||
# Alpha Credits
|
||||
self.credits = CreditsSequence('alpha')
|
||||
self.loginFSM.addState(State.State('credits', self.enterCredits, self.exitCredits, ['gameOff']))
|
||||
state = self.loginFSM.getStateNamed('playingGame')
|
||||
state.addTransition('credits')
|
||||
|
||||
self.wantCogdominiums = base.config.GetBool('want-cogdominiums', 1)
|
||||
self.wantEmblems = base.config.GetBool('want-emblems', 0)
|
||||
if base.config.GetBool('tt-node-check', 0):
|
||||
|
@ -497,6 +505,13 @@ class ToontownClientRepository(OTPClientRepository.OTPClientRepository):
|
|||
self.detectLeaks(okTasks=[], okEvents=['destroy-ToontownLoadingScreenTitle', 'destroy-ToontownLoadingScreenTip', 'destroy-ToontownLoadingScreenWaitBar'])
|
||||
return
|
||||
|
||||
def enterCredits(self):
|
||||
self.sendDisconnect()
|
||||
self.credits.enter()
|
||||
|
||||
def exitCredits(self):
|
||||
self.credits.exit()
|
||||
|
||||
def enterGameOff(self):
|
||||
OTPClientRepository.OTPClientRepository.enterGameOff(self)
|
||||
|
||||
|
|
|
@ -36,12 +36,7 @@ from toontown.toonbase import ToontownGlobals
|
|||
|
||||
class DNASpawnerAI:
|
||||
|
||||
def spawnObjects(self, filename, baseZone):
|
||||
if simbase.config.GetBool('want-doomsday', True):
|
||||
if baseZone != 2000:
|
||||
# We only want to spawn TTC during doomsday, as this is the only playground
|
||||
# toons will be in.
|
||||
return
|
||||
def spawnObjects(self, filename, baseZone):
|
||||
dnaStore = DNAStorage()
|
||||
dnaData = simbase.air.loadDNAFileAI(dnaStore, filename)
|
||||
self._createObjects(dnaData, baseZone)
|
||||
|
|
|
@ -234,6 +234,12 @@ class DistributedElectionEvent(DistributedObject, FSM):
|
|||
def exitOff(self):
|
||||
self.showFloor.reparentTo(render)
|
||||
|
||||
def __cleanupNPCs(self):
|
||||
npcs = [self.flippy, self.slappy, self.alec, self.surlee, self.surleeR, self.prepostera, self.dimm, self.suit]
|
||||
for npc in npcs:
|
||||
if npc:
|
||||
npc.removeActive()
|
||||
|
||||
def delete(self):
|
||||
self.demand('Off', 0.)
|
||||
|
||||
|
@ -241,6 +247,8 @@ class DistributedElectionEvent(DistributedObject, FSM):
|
|||
self.showFloor.removeNode()
|
||||
self.stopInteractiveFlippy()
|
||||
self.ignore('enter' + self.pieCollision.node().getName())
|
||||
self.__cleanupNPCs()
|
||||
|
||||
DistributedObject.delete(self)
|
||||
|
||||
|
||||
|
@ -772,22 +780,23 @@ class DistributedElectionEvent(DistributedObject, FSM):
|
|||
def exitInvasion(self):
|
||||
self.surleeIntroInterval.finish()
|
||||
|
||||
def enterWrapUp(self, offset):
|
||||
def enterInvasionEnd(self, offset):
|
||||
# Get ourselves caught up with what just happened
|
||||
self.finishedPreShow = True
|
||||
self.finishedBegin = True
|
||||
self.finishedCogLanding = True
|
||||
self.finishedInvasion = True
|
||||
self.catchUp()
|
||||
|
||||
#Flippy runs onto the stage and throws a cake at the boss, killing him
|
||||
#Flippy now runs onto the stage and throws a cake at the boss, killing him
|
||||
cake = BattleProps.globalPropPool.getProp('wedding-cake')
|
||||
cake.setScale(1.4)
|
||||
sfxCake = loader.loadSfx('phase_5/audio/sfx/AA_throw_wedding_cake.ogg')
|
||||
sfxCakeSplat = loader.loadSfx('phase_5/audio/sfx/AA_throw_wedding_cake_cog.ogg')
|
||||
messenger.send('wrapUpSequence', [offset])
|
||||
messenger.send('invasionEndSequence', [offset])
|
||||
# This sequence is based off of what Hawk did for Flippy's pie throw - remind Joey to clean it up
|
||||
cakeSeq = Sequence(
|
||||
Wait(20)
|
||||
Wait(20),
|
||||
Parallel(Func(base.playSfx, sfxCake, volume=0.9), ActorInterval(self.flippy, 'throw', startFrame=0, endFrame=46), Func(cake.reparentTo, self.flippy.rightHand)),
|
||||
Parallel(
|
||||
Sequence(
|
||||
|
@ -806,6 +815,74 @@ class DistributedElectionEvent(DistributedObject, FSM):
|
|||
cakeSeq.start()
|
||||
cakeSeq.setT(offset)
|
||||
|
||||
def enterWrapUp(self, offset):
|
||||
# Tell the credits our toon name and dna.
|
||||
base.cr.credits.setLocalToonDetails(base.localAvatar.getName(), base.localAvatar.style)
|
||||
|
||||
# This starts here so that we can drift towards Flippy for his speech,
|
||||
# but some of it should be moved over to the real credits sequence which is called after this.
|
||||
# A safe time to cut to the real sequence would be after the portable hole nosedive, or right when the camera arrives at Flippy before "Toons of the world... UNITE!"
|
||||
musicCredits = base.loadMusic(ElectionGlobals.CreditsMusic)
|
||||
base.localAvatar.stopUpdateSmartCamera()
|
||||
base.camera.wrtReparentTo(render)
|
||||
self.logo = loader.loadModel('phase_3/models/gui/toontown-logo.bam')
|
||||
self.logo.reparentTo(aspect2d)
|
||||
self.logo.setTransparency(1)
|
||||
self.logo.setScale(0.6)
|
||||
self.logo.setPos(0, 1, 0.3)
|
||||
self.logo.setColorScale(1, 1, 1, 0)
|
||||
|
||||
# Temporarily put Flippy here manually
|
||||
self.flippy.reparentTo(self.showFloor)
|
||||
self.flippy.setPos(2, -10, 3.23)
|
||||
self.flippy.setH(90)
|
||||
|
||||
self.portal = loader.loadModel('phase_3.5/models/props/portal-mod.bam')
|
||||
self.portal.reparentTo(render)
|
||||
self.portal.setPosHprScale(93.1, 0.4, 4, 4, 355, 45, 0, 0, 0)
|
||||
|
||||
# To prevent some jittering when loading the credits, we'll load the first scene here.
|
||||
from direct.gui.OnscreenText import OnscreenText
|
||||
from direct.gui.OnscreenImage import OnscreenImage
|
||||
from toontown.credits import AlphaCredits
|
||||
self.shockley = AlphaCredits.Shockley(True)
|
||||
self.shockley.load()
|
||||
|
||||
self.wrapUpSequence = Sequence(
|
||||
Func(self.flippy.setChatAbsolute, 'Toons of the world...', CFSpeech|CFTimeout),
|
||||
Func(base.playMusic, musicCredits, looping=0, volume=0.8),
|
||||
Wait(4.5),
|
||||
Func(self.flippy.setChatAbsolute, 'UNITE!', CFSpeech|CFTimeout),
|
||||
ActorInterval(self.flippy, 'victory', playRate=0.75, startFrame=0, endFrame=9),
|
||||
Wait(7.5),
|
||||
ActorInterval(self.flippy, 'victory', playRate=0.75, startFrame=9, endFrame=0),
|
||||
Wait(7.5),
|
||||
Parallel(self.shockley.title.colorScaleInterval(0.5, (1, 1, 1, 1)), self.shockley.description.colorScaleInterval(0.5, (1, 1, 1, 1)), self.shockley.image.colorScaleInterval(0.5, (1, 1, 1, 1))),
|
||||
Func(base.cr.loginFSM.request, 'credits')
|
||||
)
|
||||
self.cameraSequence = Sequence(
|
||||
# Begin to slowly drift towards Flippy as he delivers his speech (He currently doesn't have a speech)
|
||||
base.camera.posHprInterval(10, (75, -9.5, 12), (-90, -10, 0), blendType='easeInOut'),
|
||||
Func(self.wrapUpSequence.start),
|
||||
Wait(12),
|
||||
# Dramatically fade in the logo as the camera rises
|
||||
Parallel(self.logo.posHprScaleInterval(6.5, (0, 0, 0.5), (0), (1), blendType='easeOut'), self.logo.colorScaleInterval(6.5, Vec4(1, 1, 1, 1), blendType='easeOut'), base.camera.posInterval(7.5, (70, 0.6, 42.2), blendType='easeInOut')),
|
||||
# Take a nosedive into a portable hole
|
||||
Parallel(self.logo.colorScaleInterval(0.3, Vec4(1, 1, 1, 0)), base.camera.posHprInterval(0.3, (85, 0, 42), (-90, -30, 0), blendType='easeIn')),
|
||||
Parallel(base.camera.posHprInterval(0.9, (95, 0.6, 6), (-90, -90, 0), blendType='easeOut'), self.portal.scaleInterval(0.5, (2))),
|
||||
)
|
||||
self.cameraSequence.start()
|
||||
self.cameraSequence.setT(offset)
|
||||
|
||||
def exitWrapUp(self):
|
||||
self.logo.removeNode()
|
||||
self.portal.removeNode()
|
||||
self.shockley.title.removeNode()
|
||||
self.shockley.description.removeNode()
|
||||
self.shockley.image.removeNode()
|
||||
self.wrapUpSequence.finish()
|
||||
self.cameraSequence.finish()
|
||||
|
||||
|
||||
'''
|
||||
ELETION DAY MISC.
|
||||
|
|
|
@ -165,6 +165,10 @@ class DistributedElectionEventAI(DistributedObjectAI, FSM):
|
|||
|
||||
def exitInvasion(self):
|
||||
self.invasionSequence.finish()
|
||||
self.surleePhraseLoop.finish()
|
||||
|
||||
def enterInvasionEnd(self):
|
||||
pass
|
||||
|
||||
def enterWrapUp(self):
|
||||
self.cogDead = False
|
||||
|
@ -184,7 +188,7 @@ class DistributedElectionEventAI(DistributedObjectAI, FSM):
|
|||
def setSuitDamage(self, hp):
|
||||
if not self.cogDead:
|
||||
self.cogDead = True
|
||||
if self.state == 'WrapUp':
|
||||
if self.state == 'InvasionEnd':
|
||||
invasion = simbase.air.doFind('SafezoneInvasion')
|
||||
if invasion:
|
||||
invasion.setFinaleSuitStunned(hp)
|
||||
|
|
|
@ -497,7 +497,7 @@ class DistributedInvasionSuit(DistributedSuitBase, InvasionSuitBase, FSM, DelayD
|
|||
self.setPickable(0) # We don't want people to see the cog's true identity, a Level 11 Loanshark.
|
||||
self.setScale(1.1)
|
||||
self.walkSpeed = ToontownGlobals.SuitWalkSpeed # The Director should walk slower than other high-level cogs
|
||||
self.acceptOnce('wrapUpSequence', self.wrapUp)
|
||||
self.acceptOnce('invasionEndSequence', self.wrapUp)
|
||||
elif not finale and self.invasionFinale:
|
||||
pass
|
||||
else:
|
||||
|
|
|
@ -302,7 +302,7 @@ class DistributedInvasionSuitAI(DistributedSuitBaseAI, InvasionSuitBase, FSM):
|
|||
finalX, finalY, = SafezoneInvasionGlobals.FinaleSuitDestinations[4]
|
||||
if (self.finaleX - 1.0 <= oldX <= self.finaleX + 1.0) and (self.finaleY - 1.0 <= oldY <= self.finaleY + 1.0): # Check if it hit its destination
|
||||
if (self.finaleX - 1.0 <= finalX <= self.finaleX + 1.0) and (self.finaleY - 1.0 <= finalY <= self.finaleY + 1.0): # Check if it hit the final destination
|
||||
self.invasion.election.b_setState('WrapUp')
|
||||
self.invasion.election.b_setState('InvasionEnd')
|
||||
self.idle()
|
||||
self.finaleAttack.remove()
|
||||
taskMgr.remove('FinaleAttack-Later')
|
||||
|
|
|
@ -226,6 +226,10 @@ class DistributedSafezoneInvasionAI(DistributedObjectAI, FSM):
|
|||
|
||||
def enterVictory(self):
|
||||
self.b_setInvasionStarted(False)
|
||||
taskMgr.doMethodLater(65, self.wrapUp, self.uniqueName('WrapUp-Later'))
|
||||
|
||||
def wrapUp(self, task):
|
||||
self.election.b_setState('WrapUp')
|
||||
|
||||
def enterOff(self):
|
||||
self.__deleteSuits()
|
||||
|
|
|
@ -28,10 +28,11 @@ FlippyWheelbarrowPies = [
|
|||
########################
|
||||
|
||||
# Election Music
|
||||
IntroMusic = 'phase_4/audio/bgm/EE_Intro.ogg' #Played when Alec, Flippy, and Slappy enter
|
||||
AnnouncementMusic = 'phase_4/audio/bgm/EE_Announcement.ogg' #Played when Alec, Flippy, and Slappy enter
|
||||
VictoryMusic = 'phase_4/audio/bgm/EE_Celebration.ogg' #Played during Slappy's victory, right before the cog lands
|
||||
SadMusic = 'phase_4/audio/bgm/EE_DiesandPies.ogg' #Played when Slappy dies and the first pie thrown
|
||||
IntroMusic = 'phase_4/audio/bgm/EE_Intro.ogg' # Played when Alec, Flippy, and Slappy enter
|
||||
AnnouncementMusic = 'phase_4/audio/bgm/EE_Announcement.ogg' # Played when Alec, Flippy, and Slappy enter
|
||||
VictoryMusic = 'phase_4/audio/bgm/EE_Celebration.ogg' # Played during Slappy's victory, right before the cog lands
|
||||
SadMusic = 'phase_4/audio/bgm/EE_DiesandPies.ogg' # Played when Slappy dies and the first pie thrown
|
||||
CreditsMusic = 'phase_4/audio/bgm/EE_Theme.ogg' # The Election Credits
|
||||
|
||||
SurleeTips = [
|
||||
'Always watch all sides of you, the Cogs are sneaky and love to backstab.',
|
||||
|
|
Loading…
Reference in a new issue