mirror of
https://github.com/Sneed-Group/Poodletooth-iLand
synced 2025-01-09 17:53:50 +00:00
Add messages for CEO. TODO: Banquet Speech.
This commit is contained in:
parent
cb532a3fc8
commit
ec8ee69769
5 changed files with 50 additions and 35 deletions
|
@ -1,6 +1,7 @@
|
|||
from direct.actor.Actor import Actor
|
||||
from direct.directnotify import DirectNotifyGlobal
|
||||
from direct.distributed import ClockDelta
|
||||
from direct.interval.IntervalGlobal import *
|
||||
from direct.showbase.PythonUtil import recordCreationStack
|
||||
from panda3d.core import *
|
||||
import random
|
||||
|
@ -14,7 +15,7 @@ from otp.otpbase import OTPLocalizer
|
|||
from otp.otpbase import OTPRender
|
||||
from otp.nametag.Nametag import Nametag
|
||||
from otp.nametag.NametagGroup import NametagGroup
|
||||
from otp.nametag.NametagConstants import CFSpeech, CFThought, CFTimeout, CFPageButton, CFNoQuitButton, CFQuitButton
|
||||
from otp.nametag.NametagConstants import *
|
||||
|
||||
|
||||
teleportNotify = DirectNotifyGlobal.directNotify.newCategory('Teleport')
|
||||
|
@ -596,7 +597,17 @@ class Avatar(Actor, ShadowCaster):
|
|||
|
||||
def loop(self, animName, restart = 1, partName = None, fromFrame = None, toFrame = None):
|
||||
return Actor.loop(self, animName, restart, partName, fromFrame, toFrame)
|
||||
|
||||
def createTalkSequence(self, speech, waitTime, name='talkSequence'):
|
||||
sequence = Sequence(name=name)
|
||||
|
||||
for text in speech:
|
||||
sequence.append(Func(self.setChatAbsolute, text, CFSpeech))
|
||||
sequence.append(Wait(len(text.split(' '))))
|
||||
sequence.append(Func(self.clearChat))
|
||||
sequence.append(Wait(waitTime))
|
||||
|
||||
return sequence
|
||||
|
||||
@magicWord(category=CATEGORY_COMMUNITY_MANAGER, types=[])
|
||||
def target():
|
||||
|
|
|
@ -432,6 +432,11 @@ class DistributedBossbotBoss(DistributedBossCog.DistributedBossCog, FSM.FSM):
|
|||
self.servingTimer.countdown(ToontownGlobals.BossbotBossServingDuration)
|
||||
base.playMusic(self.phaseTwoMusic, looping=1, volume=0.9)
|
||||
|
||||
intervalName = 'BattleTwoSpeech'
|
||||
seq = self.createTalkSequence(TTLocalizer.CEOSpeech, 10, intervalName)
|
||||
seq.start()
|
||||
self.storeInterval(seq, intervalName)
|
||||
|
||||
def exitBattleTwo(self):
|
||||
if self.servingTimer:
|
||||
self.servingTimer.destroy()
|
||||
|
@ -440,6 +445,7 @@ class DistributedBossbotBoss(DistributedBossCog.DistributedBossCog, FSM.FSM):
|
|||
for toonId in self.involvedToons:
|
||||
self.removeFoodFromToon(toonId)
|
||||
|
||||
self.clearInterval('BattleTwoSpeech')
|
||||
self.phaseTwoMusic.stop()
|
||||
return
|
||||
|
||||
|
|
|
@ -910,18 +910,33 @@ class DistributedBossbotBossAI(DistributedBossCogAI.DistributedBossCogAI, FSM.FS
|
|||
return self.moveAttackAllowed
|
||||
|
||||
|
||||
def getCEO(toon):
|
||||
for object in simbase.air.doId2do.values():
|
||||
if isinstance(object, DistributedBossbotBossAI):
|
||||
if toon.doId in object.involvedToons:
|
||||
return object
|
||||
|
||||
return None
|
||||
|
||||
@magicWord(category=CATEGORY_ADMINISTRATOR)
|
||||
def skipCEOBanquet():
|
||||
"""
|
||||
Skips to the banquet stage of the CEO.
|
||||
"""
|
||||
boss = getCEO(spellbook.getInvoker())
|
||||
if not boss:
|
||||
return "You aren't in a CEO!"
|
||||
if boss.state in ('PrepareBattleTwo', 'BattleTwo'):
|
||||
return "You can't skip this round."
|
||||
boss.exitIntroduction()
|
||||
boss.b_setState('PrepareBattleTwo')
|
||||
|
||||
@magicWord(category=CATEGORY_ADMINISTRATOR)
|
||||
def skipCEO():
|
||||
"""
|
||||
Skips to the final round of the CEO.
|
||||
"""
|
||||
invoker = spellbook.getInvoker()
|
||||
boss = None
|
||||
for do in simbase.air.doId2do.values():
|
||||
if isinstance(do, DistributedBossbotBossAI):
|
||||
if invoker.doId in do.involvedToons:
|
||||
boss = do
|
||||
break
|
||||
boss = getCEO(spellbook.getInvoker())
|
||||
if not boss:
|
||||
return "You aren't in a CEO!"
|
||||
if boss.state in ('PrepareBattleThree', 'BattleThree'):
|
||||
|
@ -929,19 +944,12 @@ def skipCEO():
|
|||
boss.exitIntroduction()
|
||||
boss.b_setState('PrepareBattleThree')
|
||||
|
||||
|
||||
@magicWord(category=CATEGORY_ADMINISTRATOR)
|
||||
def killCEO():
|
||||
"""
|
||||
Kills the CEO.
|
||||
"""
|
||||
invoker = spellbook.getInvoker()
|
||||
boss = None
|
||||
for do in simbase.air.doId2do.values():
|
||||
if isinstance(do, DistributedBossbotBossAI):
|
||||
if invoker.doId in do.involvedToons:
|
||||
boss = do
|
||||
break
|
||||
boss = getCEO(spellbook.getInvoker())
|
||||
if not boss:
|
||||
return "You aren't in a CEO!"
|
||||
boss.b_setState('Victory')
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
from direct.actor import Actor
|
||||
from direct.directnotify import DirectNotifyGlobal
|
||||
from direct.interval.IntervalGlobal import *
|
||||
from direct.showbase.PythonUtil import Functor
|
||||
from direct.task.Task import Task
|
||||
from panda3d.core import *
|
||||
import random
|
||||
|
@ -3013,17 +3012,6 @@ class Toon(Avatar.Avatar, ToonHead):
|
|||
def exitScientistPlay(self):
|
||||
self.stop()
|
||||
|
||||
def createTalkSequence(self, speech, waitTime):
|
||||
sequence = Sequence()
|
||||
|
||||
for text in speech:
|
||||
sequence.append(Func(self.setChatAbsolute, text, CFSpeech))
|
||||
sequence.append(Wait(len(text.split(' '))))
|
||||
sequence.append(Func(self.clearChat))
|
||||
sequence.append(Wait(waitTime))
|
||||
|
||||
return sequence
|
||||
|
||||
def getDustCloud(self, delay=0.5, color=None):
|
||||
dustCloud = DustCloud.DustCloud(fBillboard=0, wantSound=1)
|
||||
|
||||
|
|
|
@ -8565,13 +8565,19 @@ DirectedAttackBossTaunts = {
|
|||
'Have a free sample!',
|
||||
'I see you over there!',
|
||||
'My products beat out all of Toontown!',
|
||||
"Don't think I skipped you, %(toon)s!"
|
||||
"Don't think I've skipped you, %(toon)s!"
|
||||
],
|
||||
'm': [
|
||||
"Here's money well spent.",
|
||||
'Hey! Get away from that crane!',
|
||||
'Stop!',
|
||||
'%(toon)s, get over here!'
|
||||
],
|
||||
'c': [
|
||||
'These are brand new tables!',
|
||||
"A little water isn't going to affect me!",
|
||||
'Bug off! This is my clubhouse!',
|
||||
"You've ruined my banquet! Now you'll pay!"
|
||||
]
|
||||
}
|
||||
VPSpinMessages = [
|
||||
|
@ -8591,10 +8597,6 @@ JumpBossTaunts = {
|
|||
"You're all in contempt of court!"
|
||||
]
|
||||
}
|
||||
BossTaunts = [
|
||||
"You can't stop this. We'll just keep on coming.",
|
||||
'Break time is over.',
|
||||
"Your laffable fun can't stop our work.",
|
||||
'You toons need to be taught some manners.',
|
||||
"We're only starting our business proposal."
|
||||
CEOSpeech = [
|
||||
"Who's gonna write all this speech?"
|
||||
]
|
Loading…
Reference in a new issue