mirror of
https://github.com/Sneed-Group/Poodletooth-iLand
synced 2024-12-24 12:12:36 -06:00
Silly Meter is now done!
This commit is contained in:
parent
83e859ae4c
commit
41d1fda2c2
8 changed files with 96 additions and 461 deletions
|
@ -1911,7 +1911,6 @@ dclass DistributedNPCFlippyInToonHall : DistributedNPCToon {
|
||||||
};
|
};
|
||||||
|
|
||||||
dclass DistributedNPCScientist : DistributedNPCToonBase {
|
dclass DistributedNPCScientist : DistributedNPCToonBase {
|
||||||
setChat(char [0-1024], uint8, uint32, uint8, uint8) ownsend broadcast;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
dclass DistributedNPCClerk : DistributedNPCToonBase {
|
dclass DistributedNPCClerk : DistributedNPCToonBase {
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
from pandac.PandaModules import *
|
from pandac.PandaModules import *
|
||||||
|
|
||||||
|
|
||||||
hashVal = 3327868546L
|
hashVal = 216435383
|
||||||
|
|
||||||
|
|
||||||
from toontown.coghq import DistributedCashbotBossSafe, DistributedCashbotBossCrane, DistributedBattleFactory, DistributedCashbotBossTreasure, DistributedCogHQDoor, DistributedSellbotHQDoor, DistributedFactoryElevatorExt, DistributedMintElevatorExt, DistributedLawOfficeElevatorExt, DistributedLawOfficeElevatorInt, LobbyManager, DistributedMegaCorp, DistributedFactory, DistributedLawOffice, DistributedLawOfficeFloor, DistributedLift, DistributedDoorEntity, DistributedSwitch, DistributedButton, DistributedTrigger, DistributedCrushableEntity, DistributedCrusherEntity, DistributedStomper, DistributedStomperPair, DistributedLaserField, DistributedGolfGreenGame, DistributedSecurityCamera, DistributedMover, DistributedElevatorMarker, DistributedBarrelBase, DistributedGagBarrel, DistributedBeanBarrel, DistributedHealBarrel, DistributedGrid, ActiveCell, DirectionalCell, CrusherCell, DistributedCrate, DistributedSinkingPlatform, BattleBlocker, DistributedMint, DistributedMintRoom, DistributedMintBattle, DistributedStage, DistributedStageRoom, DistributedStageBattle, DistributedLawbotBossGavel, DistributedLawbotCannon, DistributedLawbotChair, DistributedCogKart, DistributedCountryClub, DistributedCountryClubRoom, DistributedMoleField, DistributedCountryClubBattle, DistributedMaze, DistributedFoodBelt, DistributedBanquetTable, DistributedGolfSpot
|
from toontown.coghq import DistributedCashbotBossSafe, DistributedCashbotBossCrane, DistributedBattleFactory, DistributedCashbotBossTreasure, DistributedCogHQDoor, DistributedSellbotHQDoor, DistributedFactoryElevatorExt, DistributedMintElevatorExt, DistributedLawOfficeElevatorExt, DistributedLawOfficeElevatorInt, LobbyManager, DistributedMegaCorp, DistributedFactory, DistributedLawOffice, DistributedLawOfficeFloor, DistributedLift, DistributedDoorEntity, DistributedSwitch, DistributedButton, DistributedTrigger, DistributedCrushableEntity, DistributedCrusherEntity, DistributedStomper, DistributedStomperPair, DistributedLaserField, DistributedGolfGreenGame, DistributedSecurityCamera, DistributedMover, DistributedElevatorMarker, DistributedBarrelBase, DistributedGagBarrel, DistributedBeanBarrel, DistributedHealBarrel, DistributedGrid, ActiveCell, DirectionalCell, CrusherCell, DistributedCrate, DistributedSinkingPlatform, BattleBlocker, DistributedMint, DistributedMintRoom, DistributedMintBattle, DistributedStage, DistributedStageRoom, DistributedStageBattle, DistributedLawbotBossGavel, DistributedLawbotCannon, DistributedLawbotChair, DistributedCogKart, DistributedCountryClub, DistributedCountryClubRoom, DistributedMoleField, DistributedCountryClubBattle, DistributedMaze, DistributedFoodBelt, DistributedBanquetTable, DistributedGolfSpot
|
||||||
|
|
|
@ -358,24 +358,6 @@ class DistributedToonHallInterior(DistributedToonInterior):
|
||||||
self.sillyMeter.stop()
|
self.sillyMeter.stop()
|
||||||
self.ignore('SillyMeterPhase')
|
self.ignore('SillyMeterPhase')
|
||||||
|
|
||||||
def enterPhase15(self):
|
|
||||||
self.animSeq = Parallel(ActorInterval(self.sillyMeter, 'phaseFive', duration=604800, constrainedLoop=1, startFrame=1, endFrame=48), Sequence(Func(self.phase5Sfx.play), Func(self.audio3d.attachSoundToObject, self.phase5Sfx, self.sillyMeter)))
|
|
||||||
self.animSeq.start()
|
|
||||||
self.smPhase2.show()
|
|
||||||
self.smPhase3.show()
|
|
||||||
self.smPhase4.show()
|
|
||||||
self.accept('SillyMeterPhase', self.startSillyMeter)
|
|
||||||
|
|
||||||
def exitPhase15(self):
|
|
||||||
self.animSeq.finish()
|
|
||||||
del self.animSeq
|
|
||||||
self.smPhase2.hide()
|
|
||||||
self.smPhase3.hide()
|
|
||||||
self.smPhase4.hide()
|
|
||||||
self.audio3d.detachSound(self.phase5Sfx)
|
|
||||||
self.phase5Sfx.stop()
|
|
||||||
self.sillyMeter.stop()
|
|
||||||
|
|
||||||
def enterOff(self):
|
def enterOff(self):
|
||||||
self.ignore('SillyMeterPhase')
|
self.ignore('SillyMeterPhase')
|
||||||
if hasattr(self, 'sillyMeter'):
|
if hasattr(self, 'sillyMeter'):
|
||||||
|
@ -440,8 +422,8 @@ def sillyPhase(phase):
|
||||||
Set the silly meter phase.
|
Set the silly meter phase.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
if phase < -1 or phase > 15:
|
if phase < -1 or phase > 14:
|
||||||
return 'Phase number must be between 0 and 15!'
|
return 'Phase number must be between 0 and 14!'
|
||||||
|
|
||||||
messenger.send('SillyMeterPhase', [phase])
|
messenger.send('SillyMeterPhase', [phase])
|
||||||
return 'Successfully set the silly meter phase!'
|
return 'Successfully set the silly meter phase!'
|
|
@ -1,7 +1,4 @@
|
||||||
from direct.interval.IntervalGlobal import Sequence, Func, Wait
|
from toontown.safezone import SafeZoneLoader, DDPlayground
|
||||||
from toontown.safezone import SafeZoneLoader
|
|
||||||
from toontown.safezone import DDPlayground
|
|
||||||
from toontown.chat.ChatGlobals import CFSpeech
|
|
||||||
from toontown.toon import NPCToons
|
from toontown.toon import NPCToons
|
||||||
from toontown.toonbase import TTLocalizer
|
from toontown.toonbase import TTLocalizer
|
||||||
import random
|
import random
|
||||||
|
|
|
@ -1,26 +1,7 @@
|
||||||
from pandac.PandaModules import *
|
from toontown.toonbase import TTLocalizer
|
||||||
from toontown.toonbase import TTLocalizer, ToontownGlobals
|
from DistributedNPCToonBase import DistributedNPCToonBase
|
||||||
import DistributedNPCToonBase
|
|
||||||
|
|
||||||
class DistributedNPCScientist(DistributedNPCToonBase.DistributedNPCToonBase):
|
class DistributedNPCScientist(DistributedNPCToonBase):
|
||||||
|
|
||||||
def __init__(self, cr):
|
|
||||||
DistributedNPCToonBase.DistributedNPCToonBase.__init__(self, cr)
|
|
||||||
if base.cr.newsManager.isHolidayRunning(ToontownGlobals.SILLYMETER_HOLIDAY) or base.cr.newsManager.isHolidayRunning(ToontownGlobals.SILLYMETER_EXT_HOLIDAY):
|
|
||||||
self.show()
|
|
||||||
else:
|
|
||||||
self.hide()
|
|
||||||
self.accept('SillyMeterIsRunning', self.sillyMeterIsRunning)
|
|
||||||
|
|
||||||
def disable(self):
|
|
||||||
self.ignore('SillyMeterIsRunning')
|
|
||||||
DistributedNPCToonBase.DistributedNPCToonBase.disable(self)
|
|
||||||
|
|
||||||
def sillyMeterIsRunning(self, isRunning):
|
|
||||||
if isRunning:
|
|
||||||
self.show()
|
|
||||||
else:
|
|
||||||
self.hide()
|
|
||||||
|
|
||||||
def getCollSphereRadius(self):
|
def getCollSphereRadius(self):
|
||||||
return 2.5
|
return 2.5
|
||||||
|
@ -33,86 +14,53 @@ class DistributedNPCScientist(DistributedNPCToonBase.DistributedNPCToonBase):
|
||||||
self.nametag3d.setDepthTest(0)
|
self.nametag3d.setDepthTest(0)
|
||||||
self.nametag3d.setBin('fixed', 0)
|
self.nametag3d.setBin('fixed', 0)
|
||||||
|
|
||||||
def setChat(self, topic, partPos, partId, progress, flags):
|
def setModelHand(self, path):
|
||||||
msg = TTLocalizer.toontownDialogues[topic][partPos, partId][progress]
|
model = loader.loadModel(path)
|
||||||
self.setChatMuted(msg, flags)
|
|
||||||
|
|
||||||
def announceGenerate(self):
|
for hand in self.getRightHands():
|
||||||
DistributedNPCToonBase.DistributedNPCToonBase.announceGenerate(self)
|
placeholder = hand.attachNewNode('RightHandObj')
|
||||||
if base.cr.newsManager.isHolidayRunning(ToontownGlobals.SILLYMETER_HOLIDAY) or base.cr.newsManager.isHolidayRunning(ToontownGlobals.SILLYMETER_EXT_HOLIDAY):
|
placeholder.setH(180)
|
||||||
self.show()
|
placeholder.setScale(render, 1.0)
|
||||||
else:
|
placeholder.setPos(0, 0, 0.1)
|
||||||
self.hide()
|
model.instanceTo(placeholder)
|
||||||
|
|
||||||
def generateToon(self):
|
def generateToon(self):
|
||||||
self.setLODs()
|
DistributedNPCToonBase.generateToon(self)
|
||||||
self.generateToonLegs()
|
|
||||||
self.generateToonHead()
|
|
||||||
self.generateToonTorso()
|
|
||||||
self.generateToonColor()
|
|
||||||
self.parentToonParts()
|
|
||||||
self.rescaleToon()
|
|
||||||
self.resetHeight()
|
|
||||||
self.rightHands = []
|
|
||||||
self.leftHands = []
|
|
||||||
self.headParts = []
|
|
||||||
self.hipsParts = []
|
|
||||||
self.torsoParts = []
|
|
||||||
self.legsParts = []
|
|
||||||
self.__bookActors = []
|
|
||||||
self.__holeActors = []
|
|
||||||
self.setupToonNodes()
|
self.setupToonNodes()
|
||||||
if self.style.getTorsoSize() == 'short' and self.style.getAnimal() == 'duck':
|
self.setModelHand('phase_4/models/props/tt_m_prp_acs_%s' % ('sillyReader' if self.style.getAnimal() == 'duck' else 'clipboard'))
|
||||||
sillyReader = loader.loadModel('phase_4/models/props/tt_m_prp_acs_sillyReader')
|
self.startSequence(config.GetInt('silly-meter-phase', 12))
|
||||||
for rHand in self.getRightHands():
|
self.accept('SillyMeterPhase', self.startSequence)
|
||||||
placeholder = rHand.attachNewNode('SillyReader')
|
|
||||||
sillyReader.instanceTo(placeholder)
|
|
||||||
placeholder.setH(180)
|
|
||||||
placeholder.setScale(render, 1.0)
|
|
||||||
placeholder.setPos(0, 0, 0.1)
|
|
||||||
|
|
||||||
elif self.style.getTorsoSize() == 'long' and self.style.getAnimal() == 'monkey' or self.style.getTorsoSize() == 'medium' and self.style.getAnimal() == 'horse':
|
|
||||||
clipBoard = loader.loadModel('phase_4/models/props/tt_m_prp_acs_clipboard')
|
|
||||||
for rHand in self.getRightHands():
|
|
||||||
placeholder = rHand.attachNewNode('ClipBoard')
|
|
||||||
clipBoard.instanceTo(placeholder)
|
|
||||||
placeholder.setH(180)
|
|
||||||
placeholder.setScale(render, 1.0)
|
|
||||||
placeholder.setPos(0, 0, 0.1)
|
|
||||||
|
|
||||||
def startLookAround(self):
|
def startLookAround(self):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def scientistPlay(self):
|
def startSequence(self, phase):
|
||||||
if self.style.getTorsoSize() == 'short' and self.style.getAnimal() == 'duck':
|
if not self.style.getAnimal() == 'horse':
|
||||||
sillyReaders = self.findAllMatches('**/SillyReader')
|
|
||||||
for sillyReader in sillyReaders:
|
|
||||||
if not sillyReader.isEmpty():
|
|
||||||
sillyReader.stash()
|
|
||||||
sillyReader = None
|
|
||||||
|
|
||||||
elif self.style.getTorsoSize() == 'long' and self.style.getAnimal() == 'monkey':
|
|
||||||
clipBoards = self.findAllMatches('**/ClipBoard')
|
|
||||||
for clipBoard in clipBoards:
|
|
||||||
if not clipBoard.isEmpty():
|
|
||||||
clipBoard.stash()
|
|
||||||
clipBoard = None
|
|
||||||
|
|
||||||
return
|
return
|
||||||
|
|
||||||
def showScientistProp(self):
|
if phase < 4:
|
||||||
if self.style.getTorsoSize() == 'short' and self.style.getAnimal() == 'duck':
|
dialogue = TTLocalizer.ScientistPhase1Dialogue
|
||||||
sillyReaders = self.findAllMatches('**/SillyReader;+s')
|
elif phase < 8:
|
||||||
for sillyReader in sillyReaders:
|
dialogue = TTLocalizer.ScientistPhase2Dialogue
|
||||||
if not sillyReader.isEmpty():
|
elif phase < 12:
|
||||||
sillyReader.unstash()
|
dialogue = TTLocalizer.ScientistPhase3Dialogue
|
||||||
sillyReader = None
|
elif phase == 12:
|
||||||
|
dialogue = TTLocalizer.ScientistPhase4Dialogue
|
||||||
|
elif phase == 13:
|
||||||
|
dialogue = TTLocalizer.ScientistPhase5Dialogue
|
||||||
|
else:
|
||||||
|
dialogue = TTLocalizer.ScientistPhase6Dialogue
|
||||||
|
|
||||||
elif self.style.getTorsoSize() == 'long' and self.style.getAnimal() == 'monkey':
|
self.stopSequence()
|
||||||
clipBoards = self.findAllMatches('**/ClipBoard;+s')
|
self.sequence = self.createTalkSequence(dialogue, 1)
|
||||||
for clipBoard in clipBoards:
|
self.sequence.loop(0)
|
||||||
if not clipBoard.isEmpty():
|
|
||||||
clipBoard.unstash()
|
|
||||||
clipBoard = None
|
|
||||||
|
|
||||||
return
|
def stopSequence(self):
|
||||||
|
if hasattr(self, 'sequence'):
|
||||||
|
self.sequence.pause()
|
||||||
|
del self.sequence
|
||||||
|
|
||||||
|
def disable(self):
|
||||||
|
self.stopSequence()
|
||||||
|
self.ignore('SillyMeterPhase')
|
||||||
|
DistributedNPCToonBase.disable(self)
|
|
@ -1,239 +1,8 @@
|
||||||
import DistributedNPCToonBaseAI
|
import DistributedNPCToonBaseAI, random
|
||||||
from toontown.toonbase import TTLocalizer, ToontownGlobals
|
|
||||||
from direct.fsm import ClassicFSM, State
|
Animation = random.choice(["ScientistPlay", "ScientistWork", "ScientistLessWork", "ScientistJealous"])
|
||||||
from direct.task.Task import Task
|
|
||||||
|
|
||||||
class DistributedNPCScientistAI(DistributedNPCToonBaseAI.DistributedNPCToonBaseAI):
|
class DistributedNPCScientistAI(DistributedNPCToonBaseAI.DistributedNPCToonBaseAI):
|
||||||
|
|
||||||
def __init__(self, air, npcId, questCallback = None, hq = 0):
|
def getStartAnimState(self):
|
||||||
DistributedNPCToonBaseAI.DistributedNPCToonBaseAI.__init__(self, air, npcId, questCallback)
|
return 'ScientistEmcee' if self.npcId == 2020 else Animation
|
||||||
self.scientistFSM = ClassicFSM.ClassicFSM('Scientist', [
|
|
||||||
State.State('Neutral',
|
|
||||||
self.enterNeutral,
|
|
||||||
self.exitNeutral, [
|
|
||||||
'Phase0',
|
|
||||||
'Phase1',
|
|
||||||
'Phase2',
|
|
||||||
'Phase2_5',
|
|
||||||
'Phase3',
|
|
||||||
'Phase4',
|
|
||||||
'Phase5',
|
|
||||||
'Off']),
|
|
||||||
State.State('Phase0',
|
|
||||||
self.enterPhase0,
|
|
||||||
self.exitPhase0, [
|
|
||||||
'Phase1',
|
|
||||||
'Neutral']),
|
|
||||||
State.State('Phase1',
|
|
||||||
self.enterPhase1,
|
|
||||||
self.exitPhase1, [
|
|
||||||
'Phase2',
|
|
||||||
'Neutral']),
|
|
||||||
State.State('Phase2',
|
|
||||||
self.enterPhase2,
|
|
||||||
self.exitPhase2, [
|
|
||||||
'Phase2_5',
|
|
||||||
'Neutral']),
|
|
||||||
State.State('Phase2_5',
|
|
||||||
self.enterPhase2_5,
|
|
||||||
self.exitPhase2_5, [
|
|
||||||
'Phase3',
|
|
||||||
'Neutral']),
|
|
||||||
State.State('Phase3',
|
|
||||||
self.enterPhase3,
|
|
||||||
self.exitPhase3, [
|
|
||||||
'Phase4',
|
|
||||||
'Neutral']),
|
|
||||||
State.State('Phase4',
|
|
||||||
self.enterPhase4,
|
|
||||||
self.exitPhase4, [
|
|
||||||
'Phase5',
|
|
||||||
'Neutral']),
|
|
||||||
State.State('Phase5',
|
|
||||||
self.enterPhase5,
|
|
||||||
self.exitPhase5, [
|
|
||||||
'Neutral']),
|
|
||||||
State.State('Off',
|
|
||||||
self.enterOff,
|
|
||||||
self.exitOff, [])],
|
|
||||||
'Neutral', 'Off')
|
|
||||||
|
|
||||||
if self.npcId == 2018 or self.npcId == 2019:
|
|
||||||
self.startAnimState = 'ScientistJealous'
|
|
||||||
elif self.npcId == 2020:
|
|
||||||
self.startAnimState = 'ScientistEmcee'
|
|
||||||
self.scientistFSM.enterInitialState()
|
|
||||||
|
|
||||||
def selectPhase(self, newPhase):
|
|
||||||
try:
|
|
||||||
if newPhase <= 4:
|
|
||||||
gotoPhase = '0'
|
|
||||||
elif newPhase <= 6:
|
|
||||||
gotoPhase = '1'
|
|
||||||
elif newPhase <= 11:
|
|
||||||
gotoPhase = '2'
|
|
||||||
elif newPhase <= 12:
|
|
||||||
gotoPhase = '2_5'
|
|
||||||
elif newPhase <= 13:
|
|
||||||
gotoPhase = '3'
|
|
||||||
elif newPhase <= 14:
|
|
||||||
gotoPhase = '4'
|
|
||||||
elif newPhase <= 15:
|
|
||||||
gotoPhase = '5'
|
|
||||||
else:
|
|
||||||
if not self.scientistFSM.getCurrentState() == self.scientistFSM.getStateNamed('Neutral'):
|
|
||||||
self.scientistFSM.request('Neutral')
|
|
||||||
return
|
|
||||||
gotoPhase = 'Phase' + gotoPhase
|
|
||||||
if not self.scientistFSM.getCurrentState() == self.scientistFSM.getStateNamed(gotoPhase):
|
|
||||||
self.scientistFSM.request(gotoPhase)
|
|
||||||
except:
|
|
||||||
self.notify.warning('Illegal phase transition requested')
|
|
||||||
|
|
||||||
def startIfNeeded(self):
|
|
||||||
if hasattr(simbase.air, 'holidayManager') and simbase.air.holidayManager:
|
|
||||||
self.curPhase = self.getPhaseToRun()
|
|
||||||
if self.curPhase != -1:
|
|
||||||
self.selectPhase(self.curPhase)
|
|
||||||
|
|
||||||
def getPhaseToRun(self):
|
|
||||||
result = -1
|
|
||||||
enoughInfoToRun = False
|
|
||||||
if simbase.air.holidayManager.isHolidayRunning(ToontownGlobals.SILLYMETER_HOLIDAY) or simbase.air.holidayManager.isHolidayRunning(ToontownGlobals.SILLYMETER_EXT_HOLIDAY):
|
|
||||||
if hasattr(simbase.air, 'SillyMeterMgr'):
|
|
||||||
enoughInfoToRun = True
|
|
||||||
else:
|
|
||||||
self.notify.debug('simbase.air does not have SillyMeterMgr')
|
|
||||||
else:
|
|
||||||
self.notify.debug('holiday is not running')
|
|
||||||
self.notify.debug('enoughInfoToRun = %s' % enoughInfoToRun)
|
|
||||||
if enoughInfoToRun and simbase.air.SillyMeterMgr.getIsRunning():
|
|
||||||
result = simbase.air.SillyMeterMgr.getCurPhase()
|
|
||||||
return result
|
|
||||||
|
|
||||||
def enterNeutral(self):
|
|
||||||
self.accept('SillyMeterPhase', self.selectPhase)
|
|
||||||
self.startIfNeeded()
|
|
||||||
|
|
||||||
def exitNeutral(self):
|
|
||||||
self.ignore('SillyMeterPhase')
|
|
||||||
|
|
||||||
def enterPhase0(self):
|
|
||||||
if self.npcId == 2020:
|
|
||||||
self.air.dialogueManager.requestDialogue(self, TTLocalizer.AprilToonsPhasePreTopTopic, endPause=30)
|
|
||||||
elif self.npcId == 2018 or self.npcId == 2019:
|
|
||||||
self.d_setAnimState('ScientistJealous', 1.0)
|
|
||||||
self.accept('SillyMeterPhase', self.selectPhase)
|
|
||||||
|
|
||||||
def exitPhase0(self):
|
|
||||||
if self.npcId == 2020:
|
|
||||||
self.air.dialogueManager.leaveDialogue(self, TTLocalizer.AprilToonsPhasePreTopTopic)
|
|
||||||
self.ignore('SillyMeterPhase')
|
|
||||||
|
|
||||||
def enterPhase1(self):
|
|
||||||
if self.npcId == 2020:
|
|
||||||
self.air.dialogueManager.requestDialogue(self, TTLocalizer.AprilToonsPhasePreTopTopic, endPause=30)
|
|
||||||
elif self.npcId == 2018 or self.npcId == 2019:
|
|
||||||
self.d_setAnimState('ScientistJealous', 1.0)
|
|
||||||
self.accept('SillyMeterPhase', self.selectPhase)
|
|
||||||
|
|
||||||
def exitPhase1(self):
|
|
||||||
if self.npcId == 2020:
|
|
||||||
self.air.dialogueManager.leaveDialogue(self, TTLocalizer.AprilToonsPhasePreTopTopic)
|
|
||||||
self.ignore('SillyMeterPhase')
|
|
||||||
|
|
||||||
def enterPhase2(self):
|
|
||||||
if self.npcId == 2020:
|
|
||||||
self.air.dialogueManager.requestDialogue(self, TTLocalizer.AprilToonsPhasePreTopTopic, endPause=30)
|
|
||||||
elif self.npcId == 2018 or self.npcId == 2019:
|
|
||||||
self.d_setAnimState('ScientistWork', 1.0)
|
|
||||||
self.accept('SillyMeterPhase', self.selectPhase)
|
|
||||||
|
|
||||||
def exitPhase2(self):
|
|
||||||
if self.npcId == 2020:
|
|
||||||
self.air.dialogueManager.leaveDialogue(self, TTLocalizer.AprilToonsPhasePreTopTopic)
|
|
||||||
self.ignore('SillyMeterPhase')
|
|
||||||
|
|
||||||
def enterPhase2_5(self):
|
|
||||||
if self.npcId == 2020:
|
|
||||||
if simbase.air.holidayManager.isHolidayRunning(ToontownGlobals.SILLYMETER_EXT_HOLIDAY):
|
|
||||||
self.air.dialogueManager.requestDialogue(self, TTLocalizer.AprilToonsExtPhaseTopTopic, endPause=30)
|
|
||||||
else:
|
|
||||||
self.air.dialogueManager.requestDialogue(self, TTLocalizer.AprilToonsPhaseTopTopic, endPause=30)
|
|
||||||
elif self.npcId == 2018 or self.npcId == 2019:
|
|
||||||
self.d_setAnimState('ScientistLessWork', 1.0)
|
|
||||||
self.accept('SillyMeterPhase', self.selectPhase)
|
|
||||||
|
|
||||||
def exitPhase2_5(self):
|
|
||||||
if self.npcId == 2020:
|
|
||||||
if simbase.air.holidayManager.isHolidayRunning(ToontownGlobals.SILLYMETER_EXT_HOLIDAY):
|
|
||||||
self.air.dialogueManager.leaveDialogue(self, TTLocalizer.AprilToonsExtPhaseTopTopic)
|
|
||||||
else:
|
|
||||||
self.air.dialogueManager.leaveDialogue(self, TTLocalizer.AprilToonsPhaseTopTopic)
|
|
||||||
self.ignore('SillyMeterPhase')
|
|
||||||
|
|
||||||
def enterPhase3(self):
|
|
||||||
if self.npcId == 2020:
|
|
||||||
if simbase.air.holidayManager.isHolidayRunning(ToontownGlobals.SILLYMETER_EXT_HOLIDAY):
|
|
||||||
self.air.dialogueManager.requestDialogue(self, TTLocalizer.AprilToonsExtPhaseTopTopic, endPause=30)
|
|
||||||
else:
|
|
||||||
self.air.dialogueManager.requestDialogue(self, TTLocalizer.AprilToonsPhasePostTopTopic, endPause=30)
|
|
||||||
elif self.npcId == 2018 or self.npcId == 2019:
|
|
||||||
self.d_setAnimState('ScientistPlay', 1.0)
|
|
||||||
self.accept('SillyMeterPhase', self.selectPhase)
|
|
||||||
|
|
||||||
def exitPhase3(self):
|
|
||||||
if self.npcId == 2020:
|
|
||||||
if simbase.air.holidayManager.isHolidayRunning(ToontownGlobals.SILLYMETER_EXT_HOLIDAY):
|
|
||||||
self.air.dialogueManager.leaveDialogue(self, TTLocalizer.AprilToonsExtPhaseTopTopic)
|
|
||||||
else:
|
|
||||||
self.air.dialogueManager.leaveDialogue(self, TTLocalizer.AprilToonsPhasePostTopTopic)
|
|
||||||
self.ignore('SillyMeterPhase')
|
|
||||||
|
|
||||||
def enterPhase4(self):
|
|
||||||
if self.npcId == 2020:
|
|
||||||
if simbase.air.holidayManager.isHolidayRunning(ToontownGlobals.SILLYMETER_EXT_HOLIDAY):
|
|
||||||
self.air.dialogueManager.requestDialogue(self, TTLocalizer.AprilToonsExtPhaseTopTopic, endPause=30)
|
|
||||||
else:
|
|
||||||
self.air.dialogueManager.requestDialogue(self, TTLocalizer.AprilToonsPhasePostTopTopic, endPause=30)
|
|
||||||
elif self.npcId == 2018 or self.npcId == 2019:
|
|
||||||
self.d_setAnimState('ScientistPlay', 1.0)
|
|
||||||
self.accept('SillyMeterPhase', self.selectPhase)
|
|
||||||
|
|
||||||
def exitPhase4(self):
|
|
||||||
if self.npcId == 2020:
|
|
||||||
if simbase.air.holidayManager.isHolidayRunning(ToontownGlobals.SILLYMETER_EXT_HOLIDAY):
|
|
||||||
self.air.dialogueManager.leaveDialogue(self, TTLocalizer.AprilToonsExtPhaseTopTopic)
|
|
||||||
else:
|
|
||||||
self.air.dialogueManager.leaveDialogue(self, TTLocalizer.AprilToonsPhasePostTopTopic)
|
|
||||||
self.ignore('SillyMeterPhase')
|
|
||||||
|
|
||||||
def enterPhase5(self):
|
|
||||||
if self.npcId == 2020:
|
|
||||||
if simbase.air.holidayManager.isHolidayRunning(ToontownGlobals.SILLYMETER_EXT_HOLIDAY):
|
|
||||||
self.air.dialogueManager.requestDialogue(self, TTLocalizer.AprilToonsExtPhaseTopTopic, endPause=30)
|
|
||||||
else:
|
|
||||||
self.air.dialogueManager.requestDialogue(self, TTLocalizer.AprilToonsPhasePostTopTopic, endPause=30)
|
|
||||||
elif self.npcId == 2018 or self.npcId == 2019:
|
|
||||||
self.d_setAnimState('ScientistPlay', 1.0)
|
|
||||||
self.accept('SillyMeterPhase', self.selectPhase)
|
|
||||||
|
|
||||||
def exitPhase5(self):
|
|
||||||
if self.npcId == 2020:
|
|
||||||
if simbase.air.holidayManager.isHolidayRunning(ToontownGlobals.SILLYMETER_EXT_HOLIDAY):
|
|
||||||
self.air.dialogueManager.leaveDialogue(self, TTLocalizer.AprilToonsExtPhaseTopTopic)
|
|
||||||
else:
|
|
||||||
self.air.dialogueManager.leaveDialogue(self, TTLocalizer.AprilToonsPhasePostTopTopic)
|
|
||||||
self.ignore('SillyMeterPhase')
|
|
||||||
|
|
||||||
def enterOff(self):
|
|
||||||
pass
|
|
||||||
|
|
||||||
def exitOff(self):
|
|
||||||
pass
|
|
||||||
|
|
||||||
def delete(self):
|
|
||||||
self.scientistFSM.requestFinalState()
|
|
||||||
if hasattr(self, 'scientistFSM'):
|
|
||||||
del self.scientistFSM
|
|
||||||
DistributedNPCToonBaseAI.DistributedNPCToonBaseAI.delete(self)
|
|
|
@ -133,8 +133,8 @@ def createNPC(air, npcId, desc, zoneId, posIndex = 0, questCallback = None):
|
||||||
npc.setMaxHp(15)
|
npc.setMaxHp(15)
|
||||||
npc.setPositionIndex(posIndex)
|
npc.setPositionIndex(posIndex)
|
||||||
npc.generateWithRequired(zoneId)
|
npc.generateWithRequired(zoneId)
|
||||||
if hasattr(npc, 'startAnimState'):
|
if hasattr(npc, 'getStartAnimState'):
|
||||||
npc.d_setAnimState(npc.startAnimState, 1.0)
|
npc.d_setAnimState(npc.getStartAnimState(), 1.0)
|
||||||
else:
|
else:
|
||||||
npc.d_setAnimState('neutral', 1.0)
|
npc.d_setAnimState('neutral', 1.0)
|
||||||
return npc
|
return npc
|
||||||
|
|
|
@ -3190,107 +3190,47 @@ KnockKnockJokes = [['Who', "Bad echo in here, isn't there?"],
|
||||||
['Ida', "It's not Ida who, it's Idaho."],
|
['Ida', "It's not Ida who, it's Idaho."],
|
||||||
['Zippy', 'Mrs. Zippy.'],
|
['Zippy', 'Mrs. Zippy.'],
|
||||||
['Yukon', 'Yukon go away and come back another time.']]
|
['Yukon', 'Yukon go away and come back another time.']]
|
||||||
SillyPhase1Chatter = ["If you haven't seen the Silly Meter, head to Toon Hall!",
|
ScientistPhase1Dialogue = ['Fellow Toons, this is the Silly Meter!',
|
||||||
'Toontown is getting sillier by the day!',
|
|
||||||
"Cause silly surges in battle to boost Toontown's silly levels!",
|
|
||||||
'Objects on the street are starting to animate!',
|
|
||||||
'I saw a fire hydrant on Silly Street move!']
|
|
||||||
SillyPhase2Chatter = ['Silly levels are still rising!',
|
|
||||||
'The Silly Meter has climbed higher and gotten crazier!',
|
|
||||||
'Someone saw a trash can moving on Maple Street!',
|
|
||||||
'A lot of hydrants on Silly Street have come alive!',
|
|
||||||
'A mailbox on Lighthouse Lane has gone nuts!',
|
|
||||||
'Go see the Silly Meter in Toon Hall!',
|
|
||||||
'Keep causing those silly surges!']
|
|
||||||
SillyPhase3Chatter = ['The Cogs hate how silly Toontown is becoming!',
|
|
||||||
'Keep a sharp eye out for Cog Invasions!',
|
|
||||||
'Cog Invasions have caused the silly levels to drop!',
|
|
||||||
'The Silly Meter went down after the Cog Invasions!',
|
|
||||||
'Every street of Toontown has animated objects now!',
|
|
||||||
'Toontown is sillier than ever!']
|
|
||||||
SillyPhase4Chatter = ['Fire hydrants make your Squirt Gags squirtier!',
|
|
||||||
'Mail Boxes give your Throw Gags a special delivery!',
|
|
||||||
'Those crazy Trash Cans can help boost your Toon-up!',
|
|
||||||
'Objects on the street can help you in battle!',
|
|
||||||
"I just know we'll get the Silly Meter back up soon!",
|
|
||||||
'Enjoy the sillier Toontown!']
|
|
||||||
|
|
||||||
BoringTopic = 'Boring'
|
|
||||||
EmceeDialoguePhase1Topic = 'EmceeDialoguePhase1'
|
|
||||||
EmceeDialoguePhase2Topic = 'EmceeDialoguePhase2'
|
|
||||||
EmceeDialoguePhase3Topic = 'EmceeDialoguePhase3'
|
|
||||||
EmceeDialoguePhase3_5Topic = 'EmceeDialoguePhase3.5'
|
|
||||||
EmceeDialoguePhase4Topic = 'EmceeDialoguePhase4'
|
|
||||||
EmceeDialoguePhase5Topic = 'EmceeDialoguePhase5'
|
|
||||||
EmceeDialoguePhase6Topic = 'EmceeDialoguePhase6'
|
|
||||||
AprilToonsPhasePreTopTopic = 'AprilToonsPhasePreTopTopic'
|
|
||||||
AprilToonsPhaseTopTopic = 'AprilToonsPhaseTopTopic'
|
|
||||||
AprilToonsExtPhaseTopTopic = 'AprilToonsExtPhaseTopTopic'
|
|
||||||
AprilToonsPhasePostTopTopic = 'AprilToonsPhasePostTopTopic'
|
|
||||||
toontownDialogues = {BoringTopic: {(1, 2018): ['Hello Albert', 'It looks like the sillyness levels are rising', 'Yes and dont forget April Toons!'],
|
|
||||||
(2, 2019): ['Hello Newton', 'Yes I wonder how much the parties are contributing to all this'],
|
|
||||||
(3, 2020): ['Why hello there Albert and Newton', 'Halloween was pretty silly too!']},
|
|
||||||
AprilToonsPhasePreTopTopic: {(1, 2020): ['Gadzooks! The Silly Meter has come back to life!',
|
|
||||||
"It's rising every day, and will reach the top soon!",
|
|
||||||
'When it does, something silly is sure to happen!',
|
|
||||||
'So get ready to get ridiculous!']},
|
|
||||||
AprilToonsPhaseTopTopic: {(1, 2020): ['The Silly Meter has hit the top!',
|
|
||||||
'Doodles are talking, Estates are bouncy!',
|
|
||||||
"There's only one thing to say\xe2\x80\xa6",
|
|
||||||
'HAPPY APRIL TOONS!']},
|
|
||||||
AprilToonsExtPhaseTopTopic: {(1, 2020): ['The Silly Meter has hit the top!', 'Doodles are talking, Estates are bouncy!']},
|
|
||||||
AprilToonsPhasePostTopTopic: {(1, 2020): ['April Toons is over!',
|
|
||||||
"It's time for us to return to our lab.",
|
|
||||||
'But when things get REALLY crazy again\xe2\x80\xa6',
|
|
||||||
'The Silly Meter will return!']},
|
|
||||||
EmceeDialoguePhase1Topic: {(1, 2020): ['Fellow Toons, this is the Silly Meter!',
|
|
||||||
"It is tracking Toontown's rising silly levels...",
|
"It is tracking Toontown's rising silly levels...",
|
||||||
'Which are causing objects on the street to animate!',
|
'Which are causing objects on the street to animate!',
|
||||||
'And YOU can help push these levels higher!',
|
'And YOU can help push these levels higher!',
|
||||||
'Battle Cogs to cause Silly Surges...',
|
'Battle Cogs to cause Silly Surges...',
|
||||||
'Make Toontown sillier than ever...',
|
'Make Toontown sillier than ever...',
|
||||||
"And let's watch the world come alive!",
|
"And let's watch the world come alive!",
|
||||||
"Now I'll repeat what I said, but only once more."]},
|
"Now I'll repeat what I said, but only once more."]
|
||||||
EmceeDialoguePhase2Topic: {(1, 2020): ['Good Gag work, Toons!',
|
ScientistPhase2Dialogue = ['Good Gag work, Toons!',
|
||||||
"You're keeping those silly levels rising...",
|
"You're keeping those silly levels rising...",
|
||||||
'And Toontown is getting sillier every day!',
|
'And Toontown is getting sillier every day!',
|
||||||
'Fire hydrants, trash cans, and mailboxes are springing to life...',
|
'Fire hydrants, trash cans, and mailboxes are springing to life...',
|
||||||
'Making the world more animated than ever!',
|
'Making the world more animated than ever!',
|
||||||
"You know the Cogs aren't happy about this...",
|
"You know the Cogs aren't happy about this...",
|
||||||
'But Toons sure are!']},
|
'But Toons sure are!']
|
||||||
EmceeDialoguePhase3Topic: {(1, 2020): ['Gadzooks! The Silly Meter is even crazier than expected!',
|
ScientistPhase3Dialogue = ['Gadzooks! The Silly Meter is even crazier than expected!',
|
||||||
'Your Silly Surges are working wonders...',
|
'Your Silly Surges are working wonders...',
|
||||||
'And Toontown is getting more animated every day!',
|
'And Toontown is getting more animated every day!',
|
||||||
'Keep up the good Gag work...',
|
'Keep up the good Gag work...',
|
||||||
'And lets see how silly we can make Toontown!',
|
'And lets see how silly we can make Toontown!',
|
||||||
"You know the Cogs aren't happy about what's going on...",
|
"You know the Cogs aren't happy about what's going on...",
|
||||||
'But Toons sure are!']},
|
'But Toons sure are!']
|
||||||
EmceeDialoguePhase3_5Topic: {(1, 2020): ['YOU DID IT TOONS!',
|
ScientistPhase4Dialogue = ['YOU DID IT TOONS!',
|
||||||
'You brought the streets of Toontown to life!',
|
'You brought the streets of Toontown to life!',
|
||||||
'You deserve a reward!',
|
'You deserve a reward!',
|
||||||
'Enter the code SILLYMETER in your Shticker Book...',
|
'Enter the code SILLYMETER in your Shticker Book...',
|
||||||
'...to get a Silly Meter T-Shirt!']},
|
'...to get a Silly Meter T-Shirt!']
|
||||||
EmceeDialoguePhase4Topic: {(1, 2020): ['Attention all Toons!',
|
ScientistPhase5Dialogue = ['Attention all Toons!',
|
||||||
'The sudden Cog invasions have been an unhappy event.',
|
|
||||||
'As a result, silly levels have rapidly fallen...',
|
|
||||||
'And no new objects are coming to life.',
|
|
||||||
'But those that have are very thankful...',
|
|
||||||
"So perhaps they'll find a way to show their appreciation!",
|
|
||||||
'Stay Tooned!']},
|
|
||||||
EmceeDialoguePhase5Topic: {(1, 2020): ['Attention all Toons!',
|
|
||||||
'The Cog invasions have been an unhappy event.',
|
'The Cog invasions have been an unhappy event.',
|
||||||
'As a result, silly levels have rapidly fallen...',
|
'As a result, silly levels have rapidly fallen...',
|
||||||
'And no new objects are coming to life.',
|
'And no new objects are coming to life.',
|
||||||
'But those that have are very thankful...',
|
'But those that have are very thankful...',
|
||||||
'And are showing their appreciation by helping in battle!',
|
'And are showing their appreciation by helping in battle!',
|
||||||
'We may hold off the Cogs yet, so keep up the fight!']},
|
'We may hold off the Cogs yet, so keep up the fight!']
|
||||||
EmceeDialoguePhase6Topic: {(1, 2020): ['Congratulations Toons!',
|
ScientistPhase6Dialogue = ['Congratulations Toons!',
|
||||||
'You all succesfully held off the Cog Invasions...',
|
'You all succesfully held off the Cog Invasions...',
|
||||||
'With a little help from our newly animated friends...',
|
'With a little help from our newly animated friends...',
|
||||||
'And brought Toontown back to its usual silly self!',
|
'And brought Toontown back to its usual silly self!',
|
||||||
'We hope to get the Silly Meter rising again soon...',
|
'We hope to get the Silly Meter rising again soon...',
|
||||||
'So in the meantime, keep up the Cog fight...',
|
'So in the meantime, keep up the Cog fight...',
|
||||||
'And enjoy the silliest place ever, Toontown!']}}
|
'And enjoy the silliest place ever, Toontown!']
|
||||||
FriendsListPanelNewFriend = 'New Friend'
|
FriendsListPanelNewFriend = 'New Friend'
|
||||||
FriendsListPanelSecrets = 'True Friend'
|
FriendsListPanelSecrets = 'True Friend'
|
||||||
FriendsListPanelOnlineFriends = 'ONLINE TOON\nFRIENDS'
|
FriendsListPanelOnlineFriends = 'ONLINE TOON\nFRIENDS'
|
||||||
|
|
Loading…
Reference in a new issue