doomsday: RIP Slappy's balloon

This commit is contained in:
Joey Z 2014-03-18 22:38:41 -04:00
parent 72ea1aee19
commit b7ff8534eb
4 changed files with 42 additions and 19 deletions

View file

@ -195,18 +195,8 @@ class DistributedElectionEvent(DistributedObject, FSM):
def enterEvent(self, offset):
self.eventInterval = Sequence(
Func(base.cr.playGame.hood.loader.music.stop),
Wait(3),
Func(self.enterBegin, offset),
Wait(10),
#Func(self.enterAlecSpeech, offset),
#Wait(140),
Func(self.enterVoteBuildup, offset),
Wait(12),
Func(self.enterWinnerAnnounce, offset),
Wait(12),
Func(self.enterCogLanding, offset),
Wait(80),
Func(self.enterInvasion, offset),
# Just keeping this sequence here in case we need it in the future
# If it's election day and this isn't being used, remove it.
)
self.eventInterval.start()
self.eventInterval.setT(offset)

View file

@ -20,7 +20,8 @@ class DistributedElectionEventAI(DistributedObjectAI, FSM):
self.air = air
self.stateTime = globalClockDelta.getRealNetworkTime()
self.pieTypeAmount = [4, 20, 1]
self.balloon = None
# For the DistributedInvasionSuitAI
self.master = InvasionMasterAI(self)
self.toons = []
@ -56,8 +57,10 @@ class DistributedElectionEventAI(DistributedObjectAI, FSM):
def enterIdle(self):
# Generate Slappy's Hot Air Balloon!
self.balloon = DistributedHotAirBalloonAI(self.air)
self.balloon.generateWithRequired(self.zoneId)
if self.balloon is None:
# Pump some self.air into Slappy's Balloon
self.balloon = DistributedHotAirBalloonAI(self.air)
self.balloon.generateWithRequired(self.zoneId)
self.balloon.b_setState('ElectionIdle')
def enterEvent(self):
@ -65,9 +68,23 @@ class DistributedElectionEventAI(DistributedObjectAI, FSM):
if event is None:
event = DistributedElectionEventAI(simbase.air)
event.generateWithRequired(2000)
if self.balloon is None:
# Pump some self.air into Slappy's Balloon
self.balloon = DistributedHotAirBalloonAI(self.air)
self.balloon.generateWithRequired(self.zoneId)
self.eventSequence = Sequence(
Wait(260),
Func(event.b_setState, 'Invasion'),
Wait(3),
Func(event.b_setState, 'Begin'),
Wait(10),
#Func(event.b_setState, 'AlecSpeech'),
#Wait(140),
Func(event.b_setState, 'VoteBuildup'),
Wait(12),
Func(event.b_setState, 'WinnerAnnounce'),
Wait(12),
Func(event.b_setState, 'CogLanding'),
Wait(90),
Func(event.b_setState, 'Invasion')
)
self.eventSequence.start()
@ -78,7 +95,11 @@ class DistributedElectionEventAI(DistributedObjectAI, FSM):
pass
def enterCogLanding(self):
pass
self.landingSequence = Sequence(
Wait(65),
Func(self.balloon.b_setState, 'ElectionCrashing')
)
self.landingSequence.start()
def enterInvasion(self):
invasion = simbase.air.doFind('SafezoneInvasion')

View file

@ -74,7 +74,6 @@ class DistributedHotAirBalloon(DistributedObject, FSM):
def enterElectionIdle(self, offset):
# Slappy is off for the election, but he left his balloon parked in TTC.
# When Slappy dies, we'll see this falling out of the sky.
self.balloon.setPos(*ElectionGlobals.BalloonElectionPosition)
self.balloon.setH(283)
self.balloonElectionIdle = Sequence(
@ -83,6 +82,16 @@ class DistributedHotAirBalloon(DistributedObject, FSM):
)
self.balloonElectionIdle.loop()
self.balloonElectionIdle.setT(offset)
def enterElectionCrashing(self, offset):
# Slappy has gone sad, and in turn his balloon has ran out of silliness.
# It's tumbling down behind Toon Hall.
self.balloonElectionFall = Sequence(
self.balloon.posHprInterval(17, (200.0, 20.0, 0.0), (105, -5, -5), blendType='easeInOut'),
Func(self.balloon.hide)
)
self.balloonElectionFall.start()
self.balloonElectionIdle.setT(offset)
def __handleToonEnter(self, collEntry):

View file

@ -41,6 +41,9 @@ class DistributedHotAirBalloonAI(DistributedObjectAI, FSM):
def enterElectionIdle(self):
pass
def enterElectionCrashing(self):
pass
def requestEnter(self):
avId = self.air.getAvatarIdFromSender()