Remove classic chars and add Match Blinky minigame

This commit is contained in:
Daniel 2015-03-29 20:45:32 +03:00
parent 983eb61b68
commit 48998e45ce
77 changed files with 80 additions and 6691 deletions

View file

@ -443,25 +443,6 @@ from direct.distributed import DistributedObjectGlobal
from toontown.ai import WelcomeValleyManager/AI
from toontown.building import DistributedAnimatedProp/AI
from toontown.toon import DistributedToon/AI/UD
from toontown.classicchars import DistributedCCharBase/AI
from toontown.classicchars import DistributedMickey/AI
from toontown.classicchars import DistributedVampireMickey/AI
from toontown.classicchars import DistributedMinnie/AI
from toontown.classicchars import DistributedWitchMinnie/AI
from toontown.classicchars import DistributedGoofy/AI
from toontown.classicchars import DistributedSuperGoofy/AI
from toontown.classicchars import DistributedDaisy/AI
from toontown.classicchars import DistributedSockHopDaisy/AI
from toontown.classicchars import DistributedChip/AI
from toontown.classicchars import DistributedPoliceChip/AI
from toontown.classicchars import DistributedDale/AI
from toontown.classicchars import DistributedJailbirdDale/AI
from toontown.classicchars import DistributedGoofySpeedway/AI
from toontown.classicchars import DistributedDonald/AI
from toontown.classicchars import DistributedFrankenDonald/AI
from toontown.classicchars import DistributedDonaldDock/AI
from toontown.classicchars import DistributedPluto/AI
from toontown.classicchars import DistributedWesternPluto/AI
from toontown.safezone import DistributedTrolley/AI
from toontown.safezone import DistributedPartyGate/AI
from toontown.suit import DistributedSuitPlanner/AI
@ -1070,74 +1051,6 @@ dclass DistributedToon : DistributedPlayer {
setEmblems(uint32[] = [0, 0]) required ownrecv db;
};
dclass DistributedCCharBase : DistributedObject {
setChat(uint32, uint32, uint32) broadcast;
fadeAway() broadcast;
setWalk(string, string, int16) required broadcast ram;
avatarEnter() airecv clsend;
avatarExit() airecv clsend;
setNearbyAvatarChat(char [0-1024]) airecv clsend;
setNearbyAvatarSC(uint16) airecv clsend;
setNearbyAvatarSCCustom(uint16) airecv clsend;
setNearbyAvatarSCToontask(uint32, uint32, uint32, uint8) airecv clsend;
};
dclass DistributedMickey : DistributedCCharBase {
};
dclass DistributedVampireMickey : DistributedMickey {
};
dclass DistributedWitchMinnie : DistributedMickey {
};
dclass DistributedMinnie : DistributedCCharBase {
};
dclass DistributedGoofy : DistributedCCharBase {
};
dclass DistributedDaisy : DistributedCCharBase {
};
dclass DistributedSockHopDaisy : DistributedDaisy {
};
dclass DistributedChip : DistributedCCharBase {
};
dclass DistributedPoliceChip : DistributedChip {
};
dclass DistributedDale : DistributedCCharBase {
setFollowChip(string, string, int16, int16/100, int16/100) broadcast ram;
setChipId(uint32) required broadcast ram;
};
dclass DistributedJailbirdDale : DistributedDale {
};
dclass DistributedDonald : DistributedCCharBase {
};
dclass DistributedFrankenDonald : DistributedDonald {
};
dclass DistributedDonaldDock : DistributedCCharBase {
};
dclass DistributedPluto : DistributedCCharBase {
};
dclass DistributedWesternPluto : DistributedPluto {
};
dclass DistributedGoofySpeedway : DistributedCCharBase {
};
dclass DistributedSuperGoofy : DistributedGoofySpeedway {
};
dclass DistributedPartyGate : DistributedObject {
getPartyList(uint32) airecv clsend;
partyChoiceRequest(uint32, uint64, uint64) airecv clsend;

View file

@ -74,17 +74,6 @@ want-treasure-planners #t
want-suit-planners #t
want-butterflies #f
# Classic characters:
want-classic-chars #t
want-mickey #t
want-donald-dock #t
want-daisy #t
want-minnie #t
want-pluto #t
want-donald-dreamland #t
want-chip-and-dale #t
want-goofy #t
# Trolley minigames:
want-minigames #t
want-photo-game #f

View file

@ -2,7 +2,7 @@
from pandac.PandaModules import *
hashVal = 188749006
hashVal = 598642574
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
@ -18,7 +18,6 @@ from toontown.ai import WelcomeValleyManager, NewsManager, DistributedAprilToons
from toontown.ai.DistributedTrashcanZeroMgr import DistributedTrashcanZeroMgr
from toontown.uberdog.DistributedMailManager import DistributedMailManager
from otp.chat import ChatAgent
from toontown.classicchars import DistributedCCharBase, DistributedMickey, DistributedVampireMickey, DistributedMinnie, DistributedWitchMinnie, DistributedGoofy, DistributedSuperGoofy, DistributedDaisy, DistributedSockHopDaisy, DistributedChip, DistributedPoliceChip, DistributedDale, DistributedJailbirdDale, DistributedGoofySpeedway, DistributedDonald, DistributedFrankenDonald, DistributedDonaldDock, DistributedPluto, DistributedWesternPluto
from toontown.parties.GlobalPartyManager import GlobalPartyManager
from toontown.racing.DistributedStartingBlock import DistributedViewingBlock
from toontown.ai.DistributedPhaseEventMgr import DistributedPhaseEventMgr

View file

@ -220,11 +220,6 @@ ToonForwardSlowSpeed = 6.0
ToonJumpSlowForce = 4.0
ToonReverseSlowSpeed = 2.5
ToonRotateSlowSpeed = 33.0
MickeySpeed = 5.0
MinnieSpeed = 3.2
DonaldSpeed = 3.68
GoofySpeed = 5.2
PlutoSpeed = 5.5
ThinkPosHotkey = 'shift-f1'
PlaceMarkerHotkey = 'f2'
FriendsListHotkey = 'f7'
@ -337,17 +332,6 @@ PeriodOnlyAfterLetter = 'You can use a period in your name, but only after a let
ApostropheOnlyAfterLetter = 'You can use an apostrophe in your name, but only after a letter.'
NoNumbersInTheMiddle = 'Numeric digits may not appear in the middle of a word.'
ThreeWordsOrLess = 'Your name must be three words or fewer.'
CopyrightedNames = ('mickey',
'mickey mouse',
'mickeymouse',
'minnie',
'minnie mouse',
'minniemouse',
'donald',
'donald duck',
'donaldduck',
'pluto',
'goofy')
GuildUpdateMembersEvent = 'guildUpdateMembersEvent'
GuildInvitationEvent = 'guildInvitationEvent'
GuildAcceptInviteEvent = 'guildAcceptInviteEvent'

View file

@ -2769,17 +2769,6 @@ PeriodOnlyAfterLetter = 'You can use a period in your name, but only after a let
ApostropheOnlyAfterLetter = 'You can use an apostrophe in your name, but only after a letter.'
NoNumbersInTheMiddle = 'Numeric digits may not appear in the middle of a word.'
ThreeWordsOrLess = 'Your name must be three words or fewer.'
CopyrightedNames = ('mickey',
'mickey mouse',
'mickeymouse',
'minnie',
'minnie mouse',
'minniemouse',
'donald',
'donald duck',
'donaldduck',
'pluto',
'goofy')
NCTooShort = 'That name is too short.'
NCNoDigits = 'Your name cannot contain numbers.'
NCNeedLetters = 'Each word in your name must contain some letters.'

View file

@ -10,7 +10,6 @@ from direct.distributed import DistributedObject
import random
import ToonInteriorColors
from toontown.hood import ZoneUtil
from toontown.char import Char
from toontown.suit import SuitDNA
from toontown.suit import Suit
from toontown.quest import QuestParser

View file

@ -1,632 +0,0 @@
from otp.avatar import Avatar
from toontown.nametag import NametagGlobals
from pandac.PandaModules import *
from direct.task import Task
import random
from pandac.PandaModules import *
from direct.directnotify import DirectNotifyGlobal
AnimDict = {'mk': (('walk', 'walk', 3),
('run', 'run', 3),
('neutral', 'wait', 3),
('left-point-start', 'left-start', 3.5),
('left-point', 'left', 3.5),
('right-point-start', 'right-start', 3.5),
('right-point', 'right', 3.5)),
'vmk': (('walk', 'sneak', 3),
('run', 'run', 3),
('neutral', 'idle', 3),
('sneak', 'sneak', 3),
('into_sneak', 'into_sneak', 3),
('chat', 'run', 3),
('into_idle', 'into_idle', 3)),
'wmn': (('walk', 'walkHalloween3', 3), ('neutral', 'neutral2', 3)),
'mn': (('walk', 'walk', 3),
('run', 'run', 3),
('neutral', 'wait', 3),
('left-point-start', 'start-Lpoint', 3.5),
('left-point', 'Lpoint', 3.5),
('right-point-start', 'start-Rpoint', 3.5),
('right-point', 'Rpoint', 3.5),
('up', 'up', 4),
('down', 'down', 4),
('left', 'left', 4),
('right', 'right', 4)),
'g': (('walk', 'Walk', 6), ('run', 'Run', 6), ('neutral', 'Wait', 6)),
'sg': (('walk', 'walkStrut2', 6), ('neutral', 'neutral', 6)),
'd': (('walk', 'walk', 6),
('trans', 'transition', 6),
('neutral', 'neutral', 6),
('trans-back', 'transBack', 6)),
'fd': (('walk', 'walk', 6), ('neutral', 'idle', 6)),
'dw': (('wheel', 'wheel', 6), ('neutral', 'wheel', 6)),
'p': (('walk', 'walk', 6),
('sit', 'sit', 6),
('neutral', 'neutral', 6),
('stand', 'stand', 6)),
'wp': (('walk', 'walk', 6),
('sit', 'sitStart', 6),
('neutral', 'sitLoop', 6),
('stand', 'sitStop', 6)),
'cl': (),
'dd': (('walk', 'walk', 4), ('neutral', 'idle', 4)),
'shdd': (('walk', 'walk', 4), ('neutral', 'idle', 4)),
'ch': (('walk', 'walk', 6), ('neutral', 'idle', 6)),
'pch': (('walk', 'walk', 6), ('neutral', 'idle', 6)),
'da': (('walk', 'walk', 6), ('neutral', 'idle', 6)),
'jda': (('walk', 'walk', 6), ('neutral', 'idle', 6))}
ModelDict = {'mk': 'phase_3/models/char/mickey-',
'vmk': 'phase_3.5/models/char/tt_a_chr_csc_mickey_vampire_',
'mn': 'phase_3/models/char/minnie-',
'wmn': 'phase_3.5/models/char/tt_a_chr_csc_witchMinnie_',
'g': 'phase_6/models/char/TT_G',
'sg': 'phase_6/models/char/tt_a_chr_csc_goofyCostume_',
'd': 'phase_6/models/char/DL_donald-',
'fd': 'phase_6/models/char/tt_a_chr_csc_donaldCostume_',
'dw': 'phase_6/models/char/donald-wheel-',
'p': 'phase_6/models/char/pluto-',
'wp': 'phase_6/models/char/tt_a_chr_csc_plutoCostume_',
'cl': 'phase_5.5/models/estate/Clara_pose2-',
'dd': 'phase_4/models/char/daisyduck_',
'shdd': 'phase_4/models/char/tt_a_chr_csc_daisyCostume_',
'ch': 'phase_6/models/char/chip_',
'pch': 'phase_6/models/char/tt_a_chr_csc_chipCostume_',
'da': 'phase_6/models/char/dale_',
'jda': 'phase_6/models/char/tt_a_chr_csc_daleCostume_'}
LODModelDict = {'mk': [1200, 800, 400],
'vmk': [1200, 800, 400],
'wmn': [1200, 800, 400],
'mn': [1200, 800, 400],
'g': [1500, 1000, 500],
'sg': [1200, 800, 400],
'd': [1000, 500, 250],
'fd': ['default'],
'dw': [1000],
'p': [1000, 500, 300],
'wp': [1200, 800, 400],
'cl': [],
'dd': [1600, 800, 400],
'shdd': ['default'],
'ch': [1000, 500, 250],
'pch': ['default'],
'da': [1000, 500, 250],
'jda': ['default']}
class Char(Avatar.Avatar):
notify = DirectNotifyGlobal.directNotify.newCategory('Char')
def __init__(self):
try:
self.Char_initialized
except:
self.Char_initialized = 1
Avatar.Avatar.__init__(self)
self.setPickable(0)
self.setPlayerType(NametagGlobals.CCNonPlayer)
self.dialogueArray = []
self.chatterArray = [[], [], []]
def delete(self):
try:
self.Char_deleted
except:
self.Char_deleted = 1
self.unloadDialogue()
Avatar.Avatar.delete(self)
def updateCharDNA(self, newDNA):
if newDNA.name != self.style.name:
self.swapCharModel(newDNA)
def setDNAString(self, dnaString):
newDNA = CharDNA.CharDNA()
newDNA.makeFromNetString(dnaString)
self.setDNA(newDNA)
def setDNA(self, dna):
if self.style:
self.updateCharDNA(dna)
else:
self.style = dna
self.generateChar()
self.initializeDropShadow()
self.initializeNametag3d()
self.nametag3d.setBin('fixed', 0)
if self.name == 'chip' or self.name == 'dale' or self.name == 'police_chip' or self.name == 'jailbird_dale':
self.find('**/drop-shadow').setScale(0.33)
def setLODs(self):
self.setLODNode()
levelOneIn = base.config.GetInt('lod1-in', 50)
levelOneOut = base.config.GetInt('lod1-out', 1)
levelTwoIn = base.config.GetInt('lod2-in', 100)
levelTwoOut = base.config.GetInt('lod2-out', 50)
levelThreeIn = base.config.GetInt('lod3-in', 280)
levelThreeOut = base.config.GetInt('lod3-out', 100)
self.addLOD(LODModelDict[self.style.name][0], levelOneIn, levelOneOut)
self.addLOD(LODModelDict[self.style.name][1], levelTwoIn, levelTwoOut)
self.addLOD(LODModelDict[self.style.name][2], levelThreeIn, levelThreeOut)
def generateChar(self):
dna = self.style
self.name = dna.getCharName()
self.geoEyes = 0
if len(LODModelDict[dna.name]) > 1:
self.setLODs()
filePrefix = ModelDict[dna.name]
if self.name == 'mickey':
height = 3.0
elif self.name == 'vampire_mickey':
height = 3.0
elif self.name == 'minnie':
height = 3.0
elif self.name == 'witch_minnie':
height = 3.0
elif self.name == 'goofy':
height = 4.8
elif self.name == 'super_goofy':
height = 4.8
elif self.name == 'donald' or self.name == 'donald-wheel' or self.name == 'franken_donald':
height = 4.5
elif self.name == 'daisy' or self.name == 'sockHop_daisy':
height = 4.5
elif self.name == 'pluto':
height = 3.0
elif self.name == 'western_pluto':
height = 4.5
elif self.name == 'clarabelle':
height = 3.0
elif self.name == 'chip':
height = 2.0
elif self.name == 'dale':
height = 2.0
elif self.name == 'police_chip':
height = 2.0
elif self.name == 'jailbird_dale':
height = 2.0
self.lodStrings = []
for lod in LODModelDict[self.style.name]:
self.lodStrings.append(str(lod))
if self.lodStrings:
for lodStr in self.lodStrings:
if len(self.lodStrings) > 1:
lodName = lodStr
else:
lodName = 'lodRoot'
if self.name == 'goofy':
self.loadModel(filePrefix + '-' + lodStr, lodName=lodName)
else:
self.loadModel(filePrefix + lodStr, lodName=lodName)
else:
self.loadModel(filePrefix)
animDict = {}
animList = AnimDict[self.style.name]
for anim in animList:
animFilePrefix = filePrefix[:6] + str(anim[2]) + filePrefix[7:]
animDict[anim[0]] = animFilePrefix + anim[1]
for lodStr in self.lodStrings:
if len(self.lodStrings) > 1:
lodName = lodStr
else:
lodName = 'lodRoot'
self.loadAnims(animDict, lodName=lodName)
self.setHeight(height)
self.loadDialogue(dna.name)
self.ears = []
if self.name == 'mickey' or self.name == 'vampire_mickey' or self.name == 'minnie':
for bundle in self.getPartBundleDict().values():
bundle = bundle['modelRoot'].getBundle()
earNull = bundle.findChild('sphere3')
if not earNull:
earNull = bundle.findChild('*sphere3')
earNull.clearNetTransforms()
for bundle in self.getPartBundleDict().values():
charNodepath = bundle['modelRoot'].partBundleNP
bundle = bundle['modelRoot'].getBundle()
earNull = bundle.findChild('sphere3')
if not earNull:
earNull = bundle.findChild('*sphere3')
ears = charNodepath.find('**/sphere3')
if ears.isEmpty():
ears = charNodepath.find('**/*sphere3')
ears.clearEffect(CharacterJointEffect.getClassType())
earRoot = charNodepath.attachNewNode('earRoot')
earPitch = earRoot.attachNewNode('earPitch')
earPitch.setP(40.0)
ears.reparentTo(earPitch)
earNull.addNetTransform(earRoot.node())
ears.clearMat()
ears.node().setPreserveTransform(ModelNode.PTNone)
ears.setP(-40.0)
ears.flattenMedium()
self.ears.append(ears)
ears.setBillboardAxis()
self.eyes = None
self.lpupil = None
self.rpupil = None
self.eyesOpen = None
self.eyesClosed = None
if self.name == 'mickey' or self.name == 'minnie':
self.eyesOpen = loader.loadTexture('phase_3/maps/eyes1.jpg', 'phase_3/maps/eyes1_a.rgb')
self.eyesClosed = loader.loadTexture('phase_3/maps/mickey_eyes_closed.jpg', 'phase_3/maps/mickey_eyes_closed_a.rgb')
self.eyes = self.find('**/1200/**/eyes')
self.eyes.setBin('transparent', 0)
self.lpupil = self.find('**/1200/**/joint_pupilL')
self.rpupil = self.find('**/1200/**/joint_pupilR')
for lodName in self.getLODNames():
self.drawInFront('joint_pupil?', 'eyes*', -3, lodName=lodName)
elif (self.name == 'witch_minnie' or
self.name == 'vampire_mickey' or
self.name == 'super_goofy' or
self.name == 'western_pluto' or
self.name == 'police_chip' or
self.name == 'jailbird_dale' or
self.name == 'franken_donald' or
self.name == 'sockHop_daisy'):
self.geoEyes = 1
self.eyeOpenList = []
self.eyeCloseList = []
if self.find('**/1200/**/eyesOpen').isEmpty():
self.eyeCloseList.append(self.find('**/eyesClosed'))
self.eyeOpenList.append(self.find('**/eyesOpen'))
else:
self.eyeCloseList.append(self.find('**/1200/**/eyesClosed'))
self.eyeOpenList.append(self.find('**/1200/**/eyesOpen'))
for part in self.eyeOpenList:
part.show()
for part in self.eyeCloseList:
part.hide()
elif self.name == 'pluto':
self.eyesOpen = loader.loadTexture('phase_6/maps/plutoEyesOpen.jpg', 'phase_6/maps/plutoEyesOpen_a.rgb')
self.eyesClosed = loader.loadTexture('phase_6/maps/plutoEyesClosed.jpg', 'phase_6/maps/plutoEyesClosed_a.rgb')
self.eyes = self.find('**/1000/**/eyes')
self.lpupil = self.find('**/1000/**/joint_pupilL')
self.rpupil = self.find('**/1000/**/joint_pupilR')
for lodName in self.getLODNames():
self.drawInFront('joint_pupil?', 'eyes*', -3, lodName=lodName)
elif self.name == 'daisy':
self.geoEyes = 1
self.eyeOpenList = []
self.eyeCloseList = []
self.eyeCloseList.append(self.find('**/1600/**/eyesclose'))
self.eyeCloseList.append(self.find('**/800/**/eyesclose'))
self.eyeOpenList.append(self.find('**/1600/**/eyesclose'))
self.eyeOpenList.append(self.find('**/800/**/eyesclose'))
self.eyeOpenList.append(self.find('**/1600/**/eyespupil'))
self.eyeOpenList.append(self.find('**/800/**/eyespupil'))
self.eyeOpenList.append(self.find('**/1600/**/eyesopen'))
self.eyeOpenList.append(self.find('**/800/**/eyesopen'))
for part in self.eyeOpenList:
part.show()
for part in self.eyeCloseList:
part.hide()
elif self.name == 'donald-wheel':
self.eyes = self.find('**/eyes')
self.lpupil = self.find('**/joint_pupilL')
self.rpupil = self.find('**/joint_pupilR')
self.drawInFront('joint_pupil?', 'eyes*', -3)
elif self.name == 'chip' or self.name == 'dale':
self.eyesOpen = loader.loadTexture('phase_6/maps/dale_eye1.jpg', 'phase_6/maps/dale_eye1_a.rgb')
self.eyesClosed = loader.loadTexture('phase_6/maps/chip_dale_eye1_blink.jpg', 'phase_6/maps/chip_dale_eye1_blink_a.rgb')
self.eyes = self.find('**/eyes')
self.lpupil = self.find('**/pupil_left')
self.rpupil = self.find('**/pupil_right')
self.find('**/blink').hide()
if self.lpupil != None:
self.lpupil.adjustAllPriorities(1)
self.rpupil.adjustAllPriorities(1)
if self.eyesOpen:
self.eyesOpen.setMinfilter(Texture.FTLinear)
self.eyesOpen.setMagfilter(Texture.FTLinear)
if self.eyesClosed:
self.eyesClosed.setMinfilter(Texture.FTLinear)
self.eyesClosed.setMagfilter(Texture.FTLinear)
if self.name == 'mickey':
pupilParent = self.rpupil.getParent()
pupilOffsetNode = pupilParent.attachNewNode('pupilOffsetNode')
pupilOffsetNode.setPos(0, 0.025, 0)
self.rpupil.reparentTo(pupilOffsetNode)
self.__blinkName = 'blink-' + self.name
return
def swapCharModel(self, charStyle):
for lodStr in self.lodStrings:
if len(self.lodStrings) > 1:
lodName = lodStr
else:
lodName = 'lodRoot'
self.removePart('modelRoot', lodName=lodName)
self.setStyle(charStyle)
self.generateChar()
def getDialogue(self, type, length):
sfxIndex = None
if type == 'statementA' or type == 'statementB':
if length == 1:
sfxIndex = 0
elif length == 2:
sfxIndex = 1
elif length >= 3:
sfxIndex = 2
elif type == 'question':
sfxIndex = 3
elif type == 'exclamation':
sfxIndex = 4
elif type == 'special':
sfxIndex = 5
else:
self.notify.error('unrecognized dialogue type: ', type)
if sfxIndex != None and sfxIndex < len(self.dialogueArray) and self.dialogueArray[sfxIndex] != None:
return self.dialogueArray[sfxIndex]
else:
return
return
def playDialogue(self, type, length, delay = None):
dialogue = self.getDialogue(type, length)
base.playSfx(dialogue)
def getChatterDialogue(self, category, msg):
try:
return self.chatterArray[category][msg]
except IndexError:
return None
return None
def getShadowJoint(self):
return self.getGeomNode()
def getNametagJoints(self):
return []
def loadChatterDialogue(self, name, audioIndexArray, loadPath, language):
chatterTypes = ['greetings', 'comments', 'goodbyes']
for categoryIndex in xrange(len(audioIndexArray)):
chatterType = chatterTypes[categoryIndex]
for fileIndex in audioIndexArray[categoryIndex]:
if fileIndex:
self.chatterArray[categoryIndex].append(base.loadSfx('%s/CC_%s_chatter_%s%02d.ogg' % (loadPath,
name,
chatterType,
fileIndex)))
else:
self.chatterArray[categoryIndex].append(None)
return
def loadDialogue(self, char):
if self.dialogueArray:
self.notify.warning('loadDialogue() called twice.')
self.unloadDialogue()
language = base.config.GetString('language', 'english')
if char == 'mk':
dialogueFile = base.loadSfx('phase_3/audio/dial/mickey.ogg')
for i in xrange(0, 6):
self.dialogueArray.append(dialogueFile)
if language == 'japanese':
chatterIndexArray = ([1, 2], [1,
2,
3,
4], [1,
2,
3,
4,
5])
self.loadChatterDialogue('mickey', chatterIndexArray, 'phase_3/audio/dial', language)
elif char == 'vmk':
dialogueFile = base.loadSfx('phase_3/audio/dial/mickey.ogg')
for i in xrange(0, 6):
self.dialogueArray.append(dialogueFile)
if language == 'japanese':
chatterIndexArray = ([1, 2], [1,
2,
3,
4], [1,
2,
3,
4,
5])
self.loadChatterDialogue('mickey', chatterIndexArray, 'phase_3/audio/dial', language)
elif char == 'mn' or char == 'wmn':
dialogueFile = base.loadSfx('phase_3/audio/dial/minnie.ogg')
for i in xrange(0, 6):
self.dialogueArray.append(dialogueFile)
if language == 'japanese':
chatterIndexArray = ([1, 2], [1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17], [1, 2, 3])
self.loadChatterDialogue('minnie', chatterIndexArray, 'phase_3/audio/dial', language)
elif char == 'dd' or char == 'shdd':
dialogueFile = base.loadSfx('phase_4/audio/dial/daisy.ogg')
for i in xrange(0, 6):
self.dialogueArray.append(dialogueFile)
if language == 'japanese':
chatterIndexArray = ([1, 2, 3], [1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12], [1,
2,
3,
4])
self.loadChatterDialogue('daisy', chatterIndexArray, 'phase_8/audio/dial', language)
elif char == 'g' or char == 'sg':
dialogueFile = base.loadSfx('phase_6/audio/dial/goofy.ogg')
for i in xrange(0, 6):
self.dialogueArray.append(dialogueFile)
if language == 'japanese':
chatterIndexArray = ([1, 2, 3], [1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12], [1,
2,
3,
4])
self.loadChatterDialogue('goofy', chatterIndexArray, 'phase_6/audio/dial', language)
elif char == 'd' or char == 'dw' or char == 'fd':
dialogueFile = base.loadSfx('phase_6/audio/dial/donald.ogg')
for i in xrange(0, 6):
self.dialogueArray.append(dialogueFile)
if char == 'd':
if language == 'japanese':
chatterIndexArray = ([1, 2], [1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11], [1,
2,
3,
4])
self.loadChatterDialogue('donald', chatterIndexArray, 'phase_6/audio/dial', language)
elif char == 'p' or char == 'wp':
dialogueFile = base.loadSfx('phase_3.5/audio/dial/AV_dog_med.ogg')
for i in xrange(0, 6):
self.dialogueArray.append(dialogueFile)
elif char == 'cl':
dialogueFile = base.loadSfx('phase_3.5/audio/dial/AV_dog_med.ogg')
for i in xrange(0, 6):
self.dialogueArray.append(dialogueFile)
elif char == 'ch':
dialogueFile = base.loadSfx('phase_6/audio/dial/chip.ogg')
for i in xrange(0, 6):
self.dialogueArray.append(dialogueFile)
elif char == 'da':
dialogueFile = base.loadSfx('phase_6/audio/dial/dale.ogg')
for i in xrange(0, 6):
self.dialogueArray.append(dialogueFile)
elif char == 'pch':
dialogueFile = base.loadSfx('phase_6/audio/dial/chip.ogg')
for i in xrange(0, 6):
self.dialogueArray.append(dialogueFile)
elif char == 'jda':
dialogueFile = base.loadSfx('phase_6/audio/dial/dale.ogg')
for i in xrange(0, 6):
self.dialogueArray.append(dialogueFile)
else:
self.notify.error('unknown character %s' % char)
def unloadDialogue(self):
self.dialogueArray = []
self.chatterArray = [[], [], []]
def __blinkOpenEyes(self, task):
self.openEyes()
r = random.random()
if r < 0.1:
t = 0.2
else:
t = r * 4.0 + 1.0
taskMgr.doMethodLater(t, self.__blinkCloseEyes, self.__blinkName)
return Task.done
def __blinkCloseEyes(self, task):
self.closeEyes()
taskMgr.doMethodLater(0.125, self.__blinkOpenEyes, self.__blinkName)
return Task.done
def openEyes(self):
if self.geoEyes:
for part in self.eyeOpenList:
part.show()
for part in self.eyeCloseList:
part.hide()
else:
if self.eyes:
self.eyes.setTexture(self.eyesOpen, 1)
self.lpupil.show()
self.rpupil.show()
def closeEyes(self):
if self.geoEyes:
for part in self.eyeOpenList:
part.hide()
for part in self.eyeCloseList:
part.show()
else:
if self.eyes:
self.eyes.setTexture(self.eyesClosed, 1)
self.lpupil.hide()
self.rpupil.hide()
def startBlink(self):
if self.eyesOpen or self.geoEyes:
taskMgr.remove(self.__blinkName)
taskMgr.doMethodLater(random.random() * 4 + 1, self.__blinkCloseEyes, self.__blinkName)
def stopBlink(self):
if self.eyesOpen or self.geoEyes:
taskMgr.remove(self.__blinkName)
self.openEyes()
def startEarTask(self):
pass
def stopEarTask(self):
pass
def uniqueName(self, idString):
return idString + '-' + str(self.this)

View file

@ -1,127 +0,0 @@
import random
from pandac.PandaModules import *
from direct.directnotify.DirectNotifyGlobal import *
import random
from direct.distributed.PyDatagram import PyDatagram
from direct.distributed.PyDatagramIterator import PyDatagramIterator
from otp.avatar import AvatarDNA
notify = directNotify.newCategory('CharDNA')
charTypes = ['mk',
'vmk',
'mn',
'wmn',
'g',
'sg',
'd',
'fd',
'dw',
'p',
'wp',
'cl',
'dd',
'shdd',
'ch',
'da',
'pch',
'jda']
class CharDNA(AvatarDNA.AvatarDNA):
def __init__(self, str = None, type = None, dna = None, r = None, b = None, g = None):
if str != None:
self.makeFromNetString(str)
elif type != None:
if type == 'c':
self.newChar(dna)
else:
self.type = 'u'
return
def __str__(self):
if self.type == 'c':
return 'type = char, name = %s' % self.name
else:
return 'type undefined'
def makeNetString(self):
dg = PyDatagram()
dg.addFixedString(self.type, 1)
if self.type == 'c':
dg.addFixedString(self.name, 2)
elif self.type == 'u':
notify.error('undefined avatar')
else:
notify.error('unknown avatar type: ', self.type)
return dg.getMessage()
def makeFromNetString(self, string):
dg = PyDatagram(string)
dgi = PyDatagramIterator(dg)
self.type = dgi.getFixedString(1)
if self.type == 'c':
self.name = sgi.getFixedString(2)
else:
notify.error('unknown avatar type: ', self.type)
return None
def __defaultChar(self):
self.type = 'c'
self.name = charTypes[0]
def newChar(self, name = None):
if name == None:
self.__defaultChar()
else:
self.type = 'c'
if name in charTypes:
self.name = name
else:
notify.error('unknown avatar type: %s' % name)
return
def getType(self):
if self.type == 'c':
type = self.getCharName()
else:
notify.error('Invalid DNA type: ', self.type)
return type
def getCharName(self):
if self.name == 'mk':
return 'mickey'
elif self.name == 'vmk':
return 'vampire_mickey'
elif self.name == 'mn':
return 'minnie'
elif self.name == 'wmn':
return 'witch_minnie'
elif self.name == 'g':
return 'goofy'
elif self.name == 'sg':
return 'super_goofy'
elif self.name == 'd':
return 'donald'
elif self.name == 'dw':
return 'donald-wheel'
elif self.name == 'fd':
return 'franken_donald'
elif self.name == 'dd':
return 'daisy'
elif self.name == 'shdd':
return 'sockHop_daisy'
elif self.name == 'p':
return 'pluto'
elif self.name == 'wp':
return 'western_pluto'
elif self.name == 'cl':
return 'clarabelle'
elif self.name == 'ch':
return 'chip'
elif self.name == 'da':
return 'dale'
elif self.name == 'pch':
return 'police_chip'
elif self.name == 'jda':
return 'jailbird_dale'
else:
notify.error('unknown char type: ', self.name)

View file

@ -1,32 +0,0 @@
from otp.avatar import DistributedAvatar
import Char
class DistributedChar(DistributedAvatar.DistributedAvatar, Char.Char):
def __init__(self, cr):
try:
self.DistributedChar_initialized
except:
self.DistributedChar_initialized = 1
DistributedAvatar.DistributedAvatar.__init__(self, cr)
Char.Char.__init__(self)
def delete(self):
try:
self.DistributedChar_deleted
except:
self.DistributedChar_deleted = 1
Char.Char.delete(self)
DistributedAvatar.DistributedAvatar.delete(self)
def setDNAString(self, dnaString):
Char.Char.setDNAString(self, dnaString)
def setDNA(self, dna):
Char.Char.setDNA(self, dna)
def playDialogue(self, *args):
Char.Char.playDialogue(self, *args)
def setHp(self, hp):
self.hp = hp

View file

@ -1,266 +0,0 @@
from toontown.toonbase import TTLocalizer
from toontown.toonbase import ToontownGlobals
GREETING = 0
COMMENT = 1
GOODBYE = 2
DaisyChatter = TTLocalizer.DaisyChatter
MickeyChatter = TTLocalizer.MickeyChatter
VampireMickeyChatter = TTLocalizer.VampireMickeyChatter
MinnieChatter = TTLocalizer.MinnieChatter
GoofyChatter = TTLocalizer.GoofyChatter
GoofySpeedwayChatter = TTLocalizer.GoofySpeedwayChatter
DonaldChatter = TTLocalizer.DonaldChatter
ChipChatter = TTLocalizer.ChipChatter
DaleChatter = TTLocalizer.DaleChatter
def getExtendedChat(chatset, extendedChat):
newChat = []
for chatList in chatset:
newChat.append(list(chatList))
newChat[1] += extendedChat
return newChat
def getChatter(charName, chatterType):
if charName == TTLocalizer.Mickey:
if chatterType == ToontownGlobals.APRIL_FOOLS_COSTUMES:
return TTLocalizer.AFMickeyChatter
elif chatterType == ToontownGlobals.WINTER_CAROLING:
return TTLocalizer.WinterMickeyCChatter
elif chatterType == ToontownGlobals.WINTER_DECORATIONS:
return TTLocalizer.WinterMickeyDChatter
elif chatterType == ToontownGlobals.WACKY_WINTER_CAROLING:
return TTLocalizer.WinterMickeyCChatter
elif chatterType == ToontownGlobals.WACKY_WINTER_DECORATIONS:
return TTLocalizer.WinterMickeyDChatter
elif chatterType == ToontownGlobals.VALENTINES_DAY:
return TTLocalizer.ValentinesMickeyChatter
elif chatterType == ToontownGlobals.SILLY_CHATTER_ONE:
SillyMickeyChatter = getExtendedChat(MickeyChatter, TTLocalizer.SillyPhase1Chatter)
return SillyMickeyChatter
elif chatterType == ToontownGlobals.SILLY_CHATTER_TWO:
SillyMickeyChatter = getExtendedChat(MickeyChatter, TTLocalizer.SillyPhase2Chatter)
return SillyMickeyChatter
elif chatterType == ToontownGlobals.SILLY_CHATTER_THREE:
SillyMickeyChatter = getExtendedChat(MickeyChatter, TTLocalizer.SillyPhase3Chatter)
return SillyMickeyChatter
elif chatterType == ToontownGlobals.SILLY_CHATTER_FOUR:
SillyMickeyChatter = getExtendedChat(MickeyChatter, TTLocalizer.SillyPhase4Chatter)
return SillyMickeyChatter
elif chatterType == ToontownGlobals.SELLBOT_FIELD_OFFICE:
fieldOfficeMickeyChatter = getExtendedChat(MickeyChatter, TTLocalizer.FieldOfficeMickeyChatter)
return fieldOfficeMickeyChatter
else:
return MickeyChatter
elif charName == TTLocalizer.VampireMickey:
return VampireMickeyChatter
elif charName == TTLocalizer.Minnie:
if chatterType == ToontownGlobals.APRIL_FOOLS_COSTUMES:
return TTLocalizer.AFMinnieChatter
elif chatterType == ToontownGlobals.WINTER_CAROLING:
return TTLocalizer.WinterMinnieCChatter
elif chatterType == ToontownGlobals.WINTER_DECORATIONS:
return TTLocalizer.WinterMinnieDChatter
elif chatterType == ToontownGlobals.WACKY_WINTER_CAROLING:
return TTLocalizer.WinterMinnieCChatter
elif chatterType == ToontownGlobals.WACKY_WINTER_DECORATIONS:
return TTLocalizer.WinterMinnieDChatter
elif chatterType == ToontownGlobals.VALENTINES_DAY:
return TTLocalizer.ValentinesMinnieChatter
elif chatterType == ToontownGlobals.SILLY_CHATTER_ONE:
SillyMinnieChatter = getExtendedChat(MinnieChatter, TTLocalizer.SillyPhase1Chatter)
return SillyMinnieChatter
elif chatterType == ToontownGlobals.SILLY_CHATTER_TWO:
SillyMinnieChatter = getExtendedChat(MinnieChatter, TTLocalizer.SillyPhase2Chatter)
return SillyMinnieChatter
elif chatterType == ToontownGlobals.SILLY_CHATTER_THREE:
SillyMinnieChatter = getExtendedChat(MinnieChatter, TTLocalizer.SillyPhase3Chatter)
return SillyMinnieChatter
elif chatterType == ToontownGlobals.SILLY_CHATTER_FOUR:
SillyMinnieChatter = getExtendedChat(MinnieChatter, TTLocalizer.SillyPhase4Chatter)
return SillyMinnieChatter
elif chatterType == ToontownGlobals.SELLBOT_FIELD_OFFICE:
fieldOfficeMinnieChatter = getExtendedChat(MinnieChatter, TTLocalizer.FieldOfficeMinnieChatter)
return fieldOfficeMinnieChatter
else:
return MinnieChatter
elif charName == TTLocalizer.WitchMinnie:
return TTLocalizer.WitchMinnieChatter
elif charName == TTLocalizer.Daisy or charName == TTLocalizer.SockHopDaisy:
if chatterType == ToontownGlobals.APRIL_FOOLS_COSTUMES:
return TTLocalizer.AFDaisyChatter
elif chatterType == ToontownGlobals.HALLOWEEN_COSTUMES:
return TTLocalizer.HalloweenDaisyChatter
elif chatterType == ToontownGlobals.SPOOKY_COSTUMES:
return TTLocalizer.HalloweenDaisyChatter
elif chatterType == ToontownGlobals.WINTER_CAROLING:
return TTLocalizer.WinterDaisyCChatter
elif chatterType == ToontownGlobals.WINTER_DECORATIONS:
return TTLocalizer.WinterDaisyDChatter
elif chatterType == ToontownGlobals.WACKY_WINTER_CAROLING:
return TTLocalizer.WinterDaisyCChatter
elif chatterType == ToontownGlobals.WACKY_WINTER_DECORATIONS:
return TTLocalizer.WinterDaisyDChatter
elif chatterType == ToontownGlobals.VALENTINES_DAY:
return TTLocalizer.ValentinesDaisyChatter
elif chatterType == ToontownGlobals.SILLY_CHATTER_ONE:
SillyDaisyChatter = getExtendedChat(DaisyChatter, TTLocalizer.SillyPhase1Chatter)
return SillyDaisyChatter
elif chatterType == ToontownGlobals.SILLY_CHATTER_TWO:
SillyDaisyChatter = getExtendedChat(DaisyChatter, TTLocalizer.SillyPhase2Chatter)
return SillyDaisyChatter
elif chatterType == ToontownGlobals.SILLY_CHATTER_THREE:
SillyDaisyChatter = getExtendedChat(DaisyChatter, TTLocalizer.SillyPhase3Chatter)
return SillyDaisyChatter
elif chatterType == ToontownGlobals.SILLY_CHATTER_FOUR:
SillyDaisyChatter = getExtendedChat(DaisyChatter, TTLocalizer.SillyPhase4Chatter)
return SillyDaisyChatter
elif chatterType == ToontownGlobals.SELLBOT_FIELD_OFFICE:
fieldOfficeDaisyChatter = getExtendedChat(DaisyChatter, TTLocalizer.FieldOfficeDaisyChatter)
return fieldOfficeDaisyChatter
else:
return DaisyChatter
elif charName == TTLocalizer.Goofy:
if chatterType == ToontownGlobals.APRIL_FOOLS_COSTUMES:
return TTLocalizer.AFGoofySpeedwayChatter
elif chatterType == ToontownGlobals.CRASHED_LEADERBOARD:
return TTLocalizer.CLGoofySpeedwayChatter
elif chatterType == ToontownGlobals.CIRCUIT_RACING_EVENT:
return TTLocalizer.GPGoofySpeedwayChatter
elif chatterType == ToontownGlobals.WINTER_DECORATIONS or chatterType == ToontownGlobals.WINTER_CAROLING or chatterType == ToontownGlobals.WACKY_WINTER_DECORATIONS or chatterType == ToontownGlobals.WACKY_WINTER_CAROLING:
return TTLocalizer.WinterGoofyChatter
elif chatterType == ToontownGlobals.VALENTINES_DAY:
return TTLocalizer.ValentinesGoofyChatter
elif chatterType == ToontownGlobals.SILLY_CHATTER_ONE:
SillyGoofySpeedwayChatter = getExtendedChat(GoofySpeedwayChatter, TTLocalizer.SillyPhase1Chatter)
return SillyGoofySpeedwayChatter
elif chatterType == ToontownGlobals.SILLY_CHATTER_TWO:
SillyGoofySpeedwayChatter = getExtendedChat(GoofySpeedwayChatter, TTLocalizer.SillyPhase2Chatter)
return SillyGoofySpeedwayChatter
elif chatterType == ToontownGlobals.SILLY_CHATTER_THREE:
SillyGoofySpeedwayChatter = getExtendedChat(GoofySpeedwayChatter, TTLocalizer.SillyPhase3Chatter)
return SillyGoofySpeedwayChatter
elif chatterType == ToontownGlobals.SILLY_CHATTER_FOUR:
SillyGoofySpeedwayChatter = getExtendedChat(GoofySpeedwayChatter, TTLocalizer.SillyPhase4Chatter)
return SillyGoofySpeedwayChatter
else:
return GoofySpeedwayChatter
elif charName == TTLocalizer.SuperGoofy:
return TTLocalizer.SuperGoofyChatter
elif charName == TTLocalizer.Donald or charName == TTLocalizer.FrankenDonald:
if chatterType == ToontownGlobals.APRIL_FOOLS_COSTUMES:
return TTLocalizer.AFDonaldChatter
elif chatterType == ToontownGlobals.HALLOWEEN_COSTUMES:
return TTLocalizer.HalloweenDreamlandChatter
elif chatterType == ToontownGlobals.SPOOKY_COSTUMES:
return TTLocalizer.HalloweenDreamlandChatter
elif chatterType == ToontownGlobals.WINTER_CAROLING:
return TTLocalizer.WinterDreamlandCChatter
elif chatterType == ToontownGlobals.WINTER_DECORATIONS:
return TTLocalizer.WinterDreamlandDChatter
elif chatterType == ToontownGlobals.WACKY_WINTER_CAROLING:
return TTLocalizer.WinterDreamlandCChatter
elif chatterType == ToontownGlobals.WACKY_WINTER_DECORATIONS:
return TTLocalizer.WinterDreamlandDChatter
elif chatterType == ToontownGlobals.VALENTINES_DAY:
return TTLocalizer.ValentinesDreamlandChatter
elif chatterType == ToontownGlobals.SELLBOT_FIELD_OFFICE:
fieldOfficeDreamlandChatter = getExtendedChat(DonaldChatter, TTLocalizer.FieldOfficeDreamlandChatter)
return fieldOfficeDreamlandChatter
else:
return DonaldChatter
elif charName == TTLocalizer.DonaldDock:
if chatterType == ToontownGlobals.APRIL_FOOLS_COSTUMES:
return TTLocalizer.AFDonaldDockChatter
elif chatterType == ToontownGlobals.HALLOWEEN_COSTUMES:
return TTLocalizer.HalloweenDonaldChatter
elif chatterType == ToontownGlobals.SPOOKY_COSTUMES:
return TTLocalizer.HalloweenDonaldChatter
elif chatterType == ToontownGlobals.WINTER_CAROLING:
return TTLocalizer.WinterDonaldCChatter
elif chatterType == ToontownGlobals.WINTER_DECORATIONS:
return TTLocalizer.WinterDonaldDChatter
elif chatterType == ToontownGlobals.WACKY_WINTER_CAROLING:
return TTLocalizer.WinterDonaldCChatter
elif chatterType == ToontownGlobals.WACKY_WINTER_DECORATIONS:
return TTLocalizer.WinterDonaldDChatter
elif chatterType == ToontownGlobals.VALENTINES_DAY:
return TTLocalizer.ValentinesDonaldChatter
else:
return None
elif charName == TTLocalizer.Pluto:
if chatterType == ToontownGlobals.APRIL_FOOLS_COSTUMES:
return TTLocalizer.AFPlutoChatter
elif chatterType == ToontownGlobals.HALLOWEEN_COSTUMES:
return TTLocalizer.WesternPlutoChatter
elif chatterType == ToontownGlobals.SPOOKY_COSTUMES:
return TTLocalizer.WesternPlutoChatter
elif chatterType == ToontownGlobals.WINTER_CAROLING:
return TTLocalizer.WinterPlutoCChatter
elif chatterType == ToontownGlobals.WINTER_DECORATIONS:
return TTLocalizer.WinterPlutoDChatter
elif chatterType == ToontownGlobals.WACKY_WINTER_CAROLING:
return TTLocalizer.WinterPlutoCChatter
elif chatterType == ToontownGlobals.WACKY_WINTER_DECORATIONS:
return TTLocalizer.WinterPlutoDChatter
else:
return None
elif charName == TTLocalizer.WesternPluto:
if chatterType == ToontownGlobals.HALLOWEEN_COSTUMES:
return TTLocalizer.WesternPlutoChatter
elif chatterType == ToontownGlobals.SPOOKY_COSTUMES:
return TTLocalizer.WesternPlutoChatter
else:
return None
elif charName == TTLocalizer.Chip or charName == TTLocalizer.PoliceChip:
if chatterType == ToontownGlobals.APRIL_FOOLS_COSTUMES:
return TTLocalizer.AFChipChatter
elif chatterType == ToontownGlobals.HALLOWEEN_COSTUMES:
return TTLocalizer.HalloweenChipChatter
elif chatterType == ToontownGlobals.SPOOKY_COSTUMES:
return TTLocalizer.HalloweenChipChatter
elif chatterType == ToontownGlobals.WINTER_DECORATIONS or chatterType == ToontownGlobals.WINTER_CAROLING or chatterType == ToontownGlobals.WACKY_WINTER_DECORATIONS or chatterType == ToontownGlobals.WACKY_WINTER_CAROLING:
return TTLocalizer.WinterChipChatter
elif chatterType == ToontownGlobals.VALENTINES_DAY:
return TTLocalizer.ValentinesChipChatter
elif chatterType == ToontownGlobals.SILLY_CHATTER_ONE:
SillyChipChatter = getExtendedChat(ChipChatter, TTLocalizer.SillyPhase1Chatter)
return SillyChipChatter
elif chatterType == ToontownGlobals.SILLY_CHATTER_TWO:
SillyChipChatter = getExtendedChat(ChipChatter, TTLocalizer.SillyPhase2Chatter)
return SillyChipChatter
elif chatterType == ToontownGlobals.SILLY_CHATTER_THREE:
SillyChipChatter = getExtendedChat(ChipChatter, TTLocalizer.SillyPhase3Chatter)
return SillyChipChatter
elif chatterType == ToontownGlobals.SILLY_CHATTER_FOUR:
SillyChipChatter = getExtendedChat(ChipChatter, TTLocalizer.SillyPhase4Chatter)
return SillyChipChatter
else:
return ChipChatter
elif charName == TTLocalizer.Dale or TTLocalizer.JailbirdDale:
if chatterType == ToontownGlobals.APRIL_FOOLS_COSTUMES:
return TTLocalizer.AFDaleChatter
elif chatterType == ToontownGlobals.HALLOWEEN_COSTUMES:
return TTLocalizer.HalloweenDaleChatter
elif chatterType == ToontownGlobals.SPOOKY_COSTUMES:
return TTLocalizer.HalloweenDaleChatter
elif chatterType == ToontownGlobals.WINTER_DECORATIONS or chatterType == ToontownGlobals.WINTER_CAROLING or chatterType == ToontownGlobals.WACKY_WINTER_DECORATIONS or chatterType == ToontownGlobals.WACKY_WINTER_CAROLING:
return TTLocalizer.WinterDaleChatter
elif chatterType == ToontownGlobals.VALENTINES_DAY:
return TTLocalizer.ValentinesDaleChatter
elif chatterType == ToontownGlobals.SILLY_CHATTER_ONE:
SillyDaleChatter = getExtendedChat(DaleChatter, TTLocalizer.SillyPhase1Chatter)
return SillyDaleChatter
elif chatterType == ToontownGlobals.SILLY_CHATTER_TWO:
SillyDaleChatter = getExtendedChat(DaleChatter, TTLocalizer.SillyPhase2Chatter)
return SillyDaleChatter
elif chatterType == ToontownGlobals.SILLY_CHATTER_THREE:
SillyDaleChatter = getExtendedChat(DaleChatter, TTLocalizer.SillyPhase3Chatter)
return SillyDaleChatter
elif chatterType == ToontownGlobals.SILLY_CHATTER_FOUR:
SillyDaleChatter = getExtendedChat(DaleChatter, TTLocalizer.SillyPhase4Chatter)
return SillyDaleChatter
else:
return DaleChatter
return None

View file

@ -1,459 +0,0 @@
from pandac.PandaModules import Point3
from pandac.PandaModules import Vec3
import copy
from toontown.toonbase import TTLocalizer
__mickeyPaths = {'a': (Point3(17, -17, 4.025), ('b', 'e')),
'b': (Point3(17.5, 7.6, 4.025), ('c', 'e')),
'c': (Point3(85, 11.5, 4.025), ('d',)),
'd': (Point3(85, -13, 4.025), ('a',)),
'e': (Point3(-27.5, -5.25, 0.0), ('a', 'b', 'f')),
'f': (Point3(-106.15, -4.0, -2.5), ('e',
'g',
'h',
'i')),
'g': (Point3(-89.5, 93.5, 0.5), ('f', 'h')),
'h': (Point3(-139.95, 1.69, 0.5), ('f', 'g', 'i')),
'i': (Point3(-110.95, -68.57, 0.5), ('f', 'h'))}
__mickeyWaypoints = (('a',
'e',
1,
[]),
('b',
'e',
1,
[]),
('e',
'f',
1,
[Point3(-76.87, -7.85, -1.85), Point3(-80.57, -4.0, -1.85)]),
('f',
'g',
1,
[Point3(-106.62, 28.65, -1.5)]),
('g',
'h',
1,
[Point3(-128.38, 60.27, 0.5)]),
('h',
'f',
1,
[]),
('h',
'i',
1,
[Point3(-137.13, -42.79, 0.5)]),
('i',
'f',
1,
[]))
__minniePaths = {'a': (Point3(53.334, 71.057, 6.525), ('b', 'r')),
'b': (Point3(127.756, 58.665, -11.75), ('a', 's', 'c')),
'c': (Point3(130.325, 15.174, -2.003), ('b', 'd')),
'd': (Point3(126.173, 7.057, 0.522), ('c', 'e')),
'e': (Point3(133.843, -6.618, 4.71), ('d',
'f',
'g',
'h')),
'f': (Point3(116.876, 1.119, 3.304), 'e'),
'g': (Point3(116.271, -41.568, 3.304), ('e', 'h')),
'h': (Point3(128.983, -49.656, -0.231), ('e',
'g',
'i',
'j')),
'i': (Point3(106.024, -75.249, -4.498), 'h'),
'j': (Point3(135.016, -93.072, -13.376), ('h', 'k', 'z')),
'k': (Point3(123.966, -100.242, -10.879), ('j', 'l')),
'l': (Point3(52.859, -109.081, 6.525), ('k', 'm')),
'm': (Point3(-32.071, -107.049, 6.525), ('l', 'n')),
'n': (Point3(-40.519, -99.685, 6.525), ('m', 'o')),
'o': (Point3(-40.245, -88.634, 6.525), ('n', 'p')),
'p': (Point3(-66.3, -62.192, 6.525), ('o', 'q')),
'q': (Point3(-66.212, 23.069, 6.525), ('p', 'r')),
'r': (Point3(-18.344, 69.532, 6.525), ('q', 'a')),
's': (Point3(91.357, 44.546, -13.475), ('b', 't')),
't': (Point3(90.355, 6.279, -13.475), ('s', 'u')),
'u': (Point3(-13.765, 42.362, -14.553), ('t', 'v')),
'v': (Point3(-52.627, 7.428, -14.553), ('u', 'w')),
'w': (Point3(-50.654, -54.879, -14.553), ('v', 'x')),
'x': (Point3(-3.711, -81.819, -14.553), ('w', 'y')),
'y': (Point3(90.777, -49.714, -13.475), ('z', 'x')),
'z': (Point3(90.059, -79.426, -13.475), ('j', 'y'))}
__minnieWaypoints = (('a',
'b',
1,
[]),
('k',
'l',
1,
[]),
('b',
'c',
1,
[]),
('c',
'd',
1,
[]),
('d',
'e',
1,
[]),
('e',
'f',
1,
[]),
('e',
'g',
1,
[]),
('e',
'h',
1,
[]),
('g',
'h',
1,
[]),
('h',
'i',
1,
[]),
('h',
'j',
1,
[]),
('s',
'b',
1,
[]),
('t',
'u',
1,
[]),
('x',
'y',
1,
[]))
__goofyPaths = {'a': (Point3(64.995, 169.665, 10.027), ('b', 'q')),
'b': (Point3(48.893, 208.912, 10.027), ('a', 'c')),
'c': (Point3(5.482, 210.479, 10.03), ('b', 'd')),
'd': (Point3(-34.153, 203.284, 10.029), ('c', 'e')),
'e': (Point3(-66.656, 174.334, 10.026), ('d', 'f')),
'f': (Point3(-55.994, 162.33, 10.026), ('e', 'g')),
'g': (Point3(-84.554, 142.099, 0.027), ('f', 'h')),
'h': (Point3(-92.215, 96.446, 0.027), ('g', 'i')),
'i': (Point3(-63.168, 60.055, 0.027), ('h', 'j')),
'j': (Point3(-37.637, 69.974, 0.027), ('i', 'k')),
'k': (Point3(-3.018, 26.157, 0.027), ('j', 'l', 'm')),
'l': (Point3(-0.711, 46.843, 0.027), 'k'),
'm': (Point3(26.071, 46.401, 0.027), ('k', 'n')),
'n': (Point3(30.87, 67.432, 0.027), ('m', 'o')),
'o': (Point3(93.903, 90.685, 0.027), ('n', 'p')),
'p': (Point3(88.129, 140.575, 0.027), ('o', 'q')),
'q': (Point3(53.988, 158.232, 10.027), ('p', 'a'))}
__goofyWaypoints = (('f',
'g',
1,
[]), ('p',
'q',
1,
[]))
__goofySpeedwayPaths = {'a': (Point3(-9.0, -19.517, -0.323), ('b', 'k')),
'b': (Point3(-30.047, -1.578, -0.373), ('a', 'c')),
'c': (Point3(-10.367, 49.042, -0.373), ('b', 'd')),
'd': (Point3(38.439, 44.348, -0.373), ('c', 'e')),
'e': (Point3(25.527, -2.395, -0.373), ('d', 'f')),
'f': (Point3(-4.043, -59.865, -0.003), ('e', 'g')),
'g': (Point3(0.39, -99.475, -0.009), ('f', 'h')),
'h': (Point3(21.147, -109.127, -0.013), ('g', 'i')),
'i': (Point3(5.981, -147.606, -0.013), ('h', 'j')),
'j': (Point3(-24.898, -120.618, -0.013), ('i', 'k')),
'k': (Point3(-2.71, -90.315, -0.011), ('j', 'a'))}
__goofySpeedwayWaypoints = (('a',
'k',
1,
[]), ('k',
'a',
1,
[]))
__donaldPaths = {'a': (Point3(-94.883, -94.024, 0.025), 'b'),
'b': (Point3(-13.962, -92.233, 0.025), ('a', 'h')),
'c': (Point3(68.417, -91.929, 0.025), ('m', 'g')),
'd': (Point3(68.745, 91.227, 0.025), ('k', 'i')),
'e': (Point3(4.047, 94.26, 0.025), ('i', 'j')),
'f': (Point3(-91.271, 90.987, 0.025), 'j'),
'g': (Point3(43.824, -94.129, 0.025), ('c', 'h')),
'h': (Point3(13.905, -91.334, 0.025), ('b', 'g')),
'i': (Point3(43.062, 88.152, 0.025), ('d', 'e')),
'j': (Point3(-48.96, 88.565, 0.025), ('e', 'f')),
'k': (Point3(75.118, 52.84, -16.62), ('d', 'l')),
'l': (Point3(44.677, 27.091, -15.385), ('k', 'm')),
'm': (Point3(77.009, -16.022, -14.975), ('l', 'c'))}
__donaldWaypoints = (('d',
'k',
1,
[]),
('k',
'l',
1,
[]),
('l',
'm',
1,
[]),
('m',
'c',
1,
[]),
('b',
'a',
1,
[Point3(-55.883, -89.0, 0.025)]))
__plutoPaths = {'a': (Point3(-110.0, -37.8, 8.6), ('b', 'c')),
'b': (Point3(-11.9, -128.2, 6.2), ('a', 'c')),
'c': (Point3(48.9, -14.4, 6.2), ('b', 'a', 'd')),
'd': (Point3(0.25, 80.5, 6.2), ('c', 'e')),
'e': (Point3(-83.3, 36.1, 6.2), ('d', 'a'))}
__plutoWaypoints = (('a',
'b',
1,
[Point3(-90.4, -57.2, 3.0), Point3(-63.6, -79.8, 3.0), Point3(-50.1, -89.1, 6.2)]),
('c',
'a',
1,
[Point3(-15.6, -25.6, 6.2),
Point3(-37.5, -38.5, 3.0),
Point3(-55.0, -55.0, 3.0),
Point3(-85.0, -46.4, 3.0)]),
('d',
'e',
0,
[Point3(-25.8, 60.0, 6.2), Point3(-61.9, 64.5, 6.2)]),
('e',
'a',
1,
[Point3(-77.2, 28.5, 6.2), Point3(-76.4, 12.0, 3.0), Point3(-93.2, -21.2, 3.0)]))
__daisyPaths = {'a': (Point3(64.995, 169.665, 10.027), ('b', 'q')),
'b': (Point3(48.893, 208.912, 10.027), ('a', 'c')),
'c': (Point3(5.482, 210.479, 10.03), ('b', 'd')),
'd': (Point3(-34.153, 203.284, 10.029), ('c', 'e')),
'e': (Point3(-66.656, 174.334, 10.026), ('d', 'f')),
'f': (Point3(-55.994, 162.33, 10.026), ('e', 'g')),
'g': (Point3(-84.554, 142.099, 0.027), ('f', 'h')),
'h': (Point3(-92.215, 96.446, 0.027), ('g', 'i')),
'i': (Point3(-63.168, 60.055, 0.027), ('h', 'j')),
'j': (Point3(-37.637, 69.974, 0.027), ('i', 'k')),
'k': (Point3(-3.018, 26.157, 0.027), ('j', 'l', 'm')),
'l': (Point3(-0.711, 46.843, 0.027), 'k'),
'm': (Point3(26.071, 46.401, 0.027), ('k', 'n')),
'n': (Point3(30.87, 67.432, 0.027), ('m', 'o')),
'o': (Point3(93.903, 90.685, 0.027), ('n', 'p')),
'p': (Point3(88.129, 140.575, 0.027), ('o', 'q')),
'q': (Point3(53.988, 158.232, 10.027), ('p', 'a'))}
__daisyWaypoints = (('f',
'g',
1,
[]), ('p',
'q',
1,
[]))
__chipPaths = {'a': (Point3(50.004, 102.725, 0.6), ('b', 'k')),
'b': (Point3(-29.552, 112.531, 0.6), ('c', 'a')),
'c': (Point3(-51.941, 146.155, 0.025), ('d', 'b')),
'd': (Point3(-212.334, -3.639, 0.025), ('e', 'c')),
'e': (Point3(-143.466, -67.526, 0.025), ('f', 'd', 'i')),
'f': (Point3(-107.556, -62.257, 0.025), ('g', 'e', 'j')),
'g': (Point3(-43.103, -71.518, 0.2734), ('h', 'f', 'j')),
'h': (Point3(-40.605, -125.124, 0.025), ('i', 'g')),
'i': (Point3(-123.05, -124.542, 0.025), ('h', 'e')),
'j': (Point3(-40.092, 2.784, 1.268), ('k',
'b',
'f',
'g')),
'k': (Point3(75.295, 26.715, 1.4), ('a', 'j'))}
__chipWaypoints = (('a',
'b',
1,
[]),
('a',
'k',
1,
[]),
('b',
'c',
1,
[]),
('b',
'j',
1,
[]),
('c',
'd',
1,
[]),
('d',
'e',
1,
[]),
('e',
'f',
1,
[]),
('e',
'i',
1,
[]),
('f',
'g',
1,
[]),
('f',
'j',
1,
[]),
('g',
'h',
1,
[]),
('g',
'j',
1,
[]),
('h',
'i',
1,
[]),
('j',
'k',
1,
[]))
DaleOrbitDistanceOverride = {('b', 'c'): 2.5,
('e', 'f'): 2.5}
startNode = 'a'
def getPaths(charName, location = 0):
if charName == TTLocalizer.Mickey:
return __mickeyPaths
elif charName == TTLocalizer.VampireMickey:
return __mickeyPaths
elif charName == TTLocalizer.Minnie:
return __minniePaths
elif charName == TTLocalizer.WitchMinnie:
return __minniePaths
elif charName == TTLocalizer.Daisy or charName == TTLocalizer.SockHopDaisy:
return __daisyPaths
elif charName == TTLocalizer.Goofy:
if location == 0:
return __goofyPaths
else:
return __goofySpeedwayPaths
elif charName == TTLocalizer.SuperGoofy:
return __goofySpeedwayPaths
elif charName == TTLocalizer.Donald or charName == TTLocalizer.FrankenDonald:
return __donaldPaths
elif charName == TTLocalizer.Pluto:
return __plutoPaths
elif charName == TTLocalizer.WesternPluto:
return __plutoPaths
elif charName == TTLocalizer.Chip or charName == TTLocalizer.PoliceChip:
return __chipPaths
elif charName == TTLocalizer.Dale or charName == TTLocalizer.JailbirdDale:
return __chipPaths
elif charName == TTLocalizer.DonaldDock:
return {'a': (Point3(0, 0, 0), 'a')}
def __getWaypointList(paths):
if paths == __mickeyPaths:
return __mickeyWaypoints
elif paths == __minniePaths:
return __minnieWaypoints
elif paths == __daisyPaths:
return __daisyWaypoints
elif paths == __goofyPaths:
return __goofyWaypoints
elif paths == __goofySpeedwayPaths:
return __goofySpeedwayWaypoints
elif paths == __donaldPaths:
return __donaldWaypoints
elif paths == __plutoPaths:
return __plutoWaypoints
elif paths == __chipPaths:
return __chipWaypoints
elif paths == __dalePaths:
return __chipWaypoints
def getNodePos(node, paths):
return paths[node][0]
def getAdjacentNodes(node, paths):
return paths[node][1]
def getWayPoints(fromNode, toNode, paths, wpts = None):
list = []
if fromNode != toNode:
if wpts == None:
wpts = __getWaypointList(paths)
for path in wpts:
if path[0] == fromNode and path[1] == toNode:
for point in path[3]:
list.append(Point3(point))
break
elif path[0] == toNode and path[1] == fromNode:
for point in path[3]:
list = [Point3(point)] + list
break
return list
def getRaycastFlag(fromNode, toNode, paths):
result = 0
if fromNode != toNode:
wpts = __getWaypointList(paths)
for path in wpts:
if path[0] == fromNode and path[1] == toNode:
if path[2]:
result = 1
break
elif path[0] == toNode and path[1] == fromNode:
if path[2]:
result = 1
break
return result
def getPointsFromTo(fromNode, toNode, paths):
startPoint = Point3(getNodePos(fromNode, paths))
endPoint = Point3(getNodePos(toNode, paths))
return [startPoint] + getWayPoints(fromNode, toNode, paths) + [endPoint]
def getWalkDuration(fromNode, toNode, velocity, paths):
posPoints = getPointsFromTo(fromNode, toNode, paths)
duration = 0
for pointIndex in xrange(len(posPoints) - 1):
startPoint = posPoints[pointIndex]
endPoint = posPoints[pointIndex + 1]
distance = Vec3(endPoint - startPoint).length()
duration += distance / velocity
return duration
def getWalkDistance(fromNode, toNode, velocity, paths):
posPoints = getPointsFromTo(fromNode, toNode, paths)
retval = 0
for pointIndex in xrange(len(posPoints) - 1):
startPoint = posPoints[pointIndex]
endPoint = posPoints[pointIndex + 1]
distance = Vec3(endPoint - startPoint).length()
retval += distance
return retval

View file

@ -1,225 +0,0 @@
from pandac.PandaModules import *
from direct.interval.IntervalGlobal import *
from direct.distributed.ClockDelta import *
from direct.fsm import StateData
from direct.directnotify import DirectNotifyGlobal
from direct.showbase.PythonUtil import *
from direct.task import Task
import CCharPaths
from toontown.toonbase import ToontownGlobals
class CharNeutralState(StateData.StateData):
notify = DirectNotifyGlobal.directNotify.newCategory('CharNeutralState')
def __init__(self, doneEvent, character):
StateData.StateData.__init__(self, doneEvent)
self.__doneEvent = doneEvent
self.character = character
def enter(self, startTrack = None, playRate = None):
StateData.StateData.enter(self)
self.notify.debug('Neutral ' + self.character.getName() + '...')
self.__neutralTrack = Sequence(name=self.character.getName() + '-neutral')
if startTrack:
self.__neutralTrack.append(startTrack)
if playRate:
self.__neutralTrack.append(Func(self.character.setPlayRate, playRate, 'neutral'))
self.__neutralTrack.append(Func(self.character.loop, 'neutral'))
self.__neutralTrack.start()
def exit(self):
StateData.StateData.exit(self)
self.__neutralTrack.finish()
def __doneHandler(self):
doneStatus = {}
doneStatus['state'] = 'walk'
doneStatus['status'] = 'done'
messenger.send(self.__doneEvent, [doneStatus])
return Task.done
class CharWalkState(StateData.StateData):
notify = DirectNotifyGlobal.directNotify.newCategory('CharWalkState')
def __init__(self, doneEvent, character, diffPath = None):
StateData.StateData.__init__(self, doneEvent)
self.doneEvent = doneEvent
self.character = character
if diffPath == None:
self.paths = CCharPaths.getPaths(character.getName(), character.getCCLocation())
else:
self.paths = CCharPaths.getPaths(diffPath, character.getCCLocation())
self.speed = character.walkSpeed()
self.offsetX = 0
self.offsetY = 0
self.oldOffsetX = 0
self.olfOffsetY = 0
self.walkTrack = None
return
def enter(self, startTrack = None, playRate = None):
StateData.StateData.enter(self)
self.notify.debug('Walking ' + self.character.getName() + '... from ' + str(self.walkInfo[0]) + ' to ' + str(self.walkInfo[1]))
posPoints = CCharPaths.getPointsFromTo(self.walkInfo[0], self.walkInfo[1], self.paths)
lastPos = posPoints[-1]
newLastPos = Point3(lastPos[0] + self.offsetX, lastPos[1] + self.offsetY, lastPos[2])
posPoints[-1] = newLastPos
firstPos = posPoints[0]
newFirstPos = Point3(firstPos[0] + self.oldOffsetX, firstPos[1] + self.oldOffsetY, firstPos[2])
posPoints[0] = newFirstPos
self.walkTrack = Sequence(name=self.character.getName() + '-walk')
if startTrack:
self.walkTrack.append(startTrack)
self.character.setPos(posPoints[0])
raycast = CCharPaths.getRaycastFlag(self.walkInfo[0], self.walkInfo[1], self.paths)
moveTrack = self.makePathTrack(self.character, posPoints, self.speed, raycast)
if playRate:
self.walkTrack.append(Func(self.character.setPlayRate, playRate, 'walk'))
self.walkTrack.append(Func(self.character.loop, 'walk'))
self.walkTrack.append(moveTrack)
doneEventName = self.character.getName() + 'WalkDone'
self.walkTrack.append(Func(messenger.send, doneEventName))
ts = globalClockDelta.localElapsedTime(self.walkInfo[2])
self.accept(doneEventName, self.doneHandler)
self.notify.debug('walkTrack.start(%s)' % ts)
self.walkTrack.start(ts)
def makePathTrack(self, nodePath, posPoints, velocity, raycast = 0):
track = Sequence()
if raycast:
track.append(Func(nodePath.enableRaycast, 1))
startHpr = nodePath.getHpr()
for pointIndex in xrange(len(posPoints) - 1):
startPoint = posPoints[pointIndex]
endPoint = posPoints[pointIndex + 1]
track.append(Func(nodePath.setPos, startPoint))
distance = Vec3(endPoint - startPoint).length()
duration = distance / velocity
curHpr = nodePath.getHpr()
nodePath.headsUp(endPoint[0], endPoint[1], endPoint[2])
destHpr = nodePath.getHpr()
reducedCurH = reduceAngle(curHpr[0])
reducedCurHpr = Vec3(reducedCurH, curHpr[1], curHpr[2])
reducedDestH = reduceAngle(destHpr[0])
shortestAngle = closestDestAngle(reducedCurH, reducedDestH)
shortestHpr = Vec3(shortestAngle, destHpr[1], destHpr[2])
turnTime = abs(shortestAngle) / 270.0
nodePath.setHpr(shortestHpr)
if duration - turnTime > 0.01:
track.append(Parallel(Func(nodePath.loop, 'walk'), LerpHprInterval(nodePath, turnTime, shortestHpr, startHpr=reducedCurHpr, name='lerp' + nodePath.getName() + 'Hpr'), LerpPosInterval(nodePath, duration=duration - turnTime, pos=Point3(endPoint), startPos=Point3(startPoint), fluid=1)))
nodePath.setHpr(startHpr)
if raycast:
track.append(Func(nodePath.enableRaycast, 0))
return track
def doneHandler(self):
doneStatus = {}
doneStatus['state'] = 'walk'
doneStatus['status'] = 'done'
messenger.send(self.doneEvent, [doneStatus])
return Task.done
def exit(self):
StateData.StateData.exit(self)
self.ignore(self.character.getName() + 'WalkDone')
if self.walkTrack:
self.walkTrack.finish()
self.walkTrack = None
return
def setWalk(self, srcNode, destNode, timestamp, offsetX = 0, offsetY = 0):
self.oldOffsetX = self.offsetX
self.oldOffsetY = self.offsetY
self.walkInfo = (srcNode, destNode, timestamp)
self.offsetX = offsetX
self.offsetY = offsetY
class CharFollowChipState(CharWalkState):
notify = DirectNotifyGlobal.directNotify.newCategory('CharFollowChipState')
completeRevolutionDistance = 13
def __init__(self, doneEvent, character, chipId):
CharWalkState.__init__(self, doneEvent, character)
self.offsetDict = {'a': (ToontownGlobals.DaleOrbitDistance, 0)}
self.chipId = chipId
def setWalk(self, srcNode, destNode, timestamp, offsetX = 0, offsetY = 0):
self.offsetDict[destNode] = (offsetX, offsetY)
self.srcNode = srcNode
self.destNode = destNode
self.orbitDistance = ToontownGlobals.DaleOrbitDistance
if (srcNode, destNode) in CCharPaths.DaleOrbitDistanceOverride:
self.orbitDistance = CCharPaths.DaleOrbitDistanceOverride[srcNode, destNode]
elif (destNode, srcNode) in CCharPaths.DaleOrbitDistanceOverride:
self.orbitDistance = CCharPaths.DaleOrbitDistanceOverride[destNode, srcNode]
CharWalkState.setWalk(self, srcNode, destNode, timestamp, offsetX, offsetY)
def makePathTrack(self, nodePath, posPoints, velocity, raycast = 0):
retval = Sequence()
if raycast:
retval.append(Func(nodePath.enableRaycast, 1))
chip = base.cr.doId2do.get(self.chipId)
self.chipPaths = CCharPaths.getPaths(chip.getName(), chip.getCCLocation())
self.posPoints = posPoints
chipDuration = chip.walk.walkTrack.getDuration()
self.notify.debug('chipDuration = %f' % chipDuration)
chipDistance = CCharPaths.getWalkDistance(self.srcNode, self.destNode, ToontownGlobals.ChipSpeed, self.chipPaths)
self.revolutions = chipDistance / self.completeRevolutionDistance
srcOffset = (0, 0)
if self.srcNode in self.offsetDict:
srcOffset = self.offsetDict[self.srcNode]
srcTheta = math.atan2(srcOffset[1], srcOffset[0])
if srcTheta < 0:
srcTheta += 2 * math.pi
if srcTheta > 0:
srcRev = (2 * math.pi - srcTheta) / (2 * math.pi)
else:
srcRev = 0
self.srcTheta = srcTheta
destOffset = (0, 0)
if self.destNode in self.offsetDict:
destOffset = self.offsetDict[self.destNode]
destTheta = math.atan2(destOffset[1], destOffset[0])
if destTheta < 0:
destTheta += 2 * math.pi
self.destTheta = destTheta
self.revolutions += srcRev
endingTheta = srcTheta + self.revolutions % 1.0 * 2 * math.pi
diffTheta = destTheta - endingTheta
destRev = diffTheta / (2 * math.pi)
self.revolutions += destRev
while self.revolutions < 1:
self.revolutions += 1
def positionDale(t):
self.orbitChip(t)
retval.append(LerpFunctionInterval(positionDale, chipDuration))
if raycast:
retval.append(Func(nodePath.enableRaycast, 0))
return retval
def orbitChip(self, t):
srcOffset = (0, 0)
if self.srcNode in self.offsetDict:
srcOffset = self.offsetDict[self.srcNode]
chipSrcPos = Point3(self.posPoints[0][0] - srcOffset[0], self.posPoints[0][1] - srcOffset[1], self.posPoints[0][2])
destOffset = (0, 0)
if self.destNode in self.offsetDict:
destOffset = self.offsetDict[self.destNode]
chipDestPos = Point3(self.posPoints[-1][0] - destOffset[0], self.posPoints[-1][1] - destOffset[1], self.posPoints[-1][2])
displacement = chipDestPos - chipSrcPos
displacement *= t
chipPos = chipSrcPos + displacement
diffTheta = t * self.revolutions * 2 * math.pi
curTheta = self.srcTheta + diffTheta
newOffsetX = math.cos(curTheta) * self.orbitDistance
newOffsetY = math.sin(curTheta) * self.orbitDistance
dalePos = Point3(chipPos[0] + newOffsetX, chipPos[1] + newOffsetY, chipPos[2])
self.character.setPos(dalePos)
newHeading = rad2Deg(curTheta)
newHeading %= 360
self.character.setH(newHeading)

View file

@ -1,385 +0,0 @@
# File: C (Python 2.4)
from otp.ai.AIBaseGlobal import *
from direct.distributed.ClockDelta import *
from direct.fsm import StateData
from direct.directnotify import DirectNotifyGlobal
import random
from direct.task import Task
from toontown.toonbase import ToontownGlobals
import CCharChatter
import CCharPaths
class CharLonelyStateAI(StateData.StateData):
notify = DirectNotifyGlobal.directNotify.newCategory('CharLonelyStateAI')
def __init__(self, doneEvent, character):
StateData.StateData.__init__(self, doneEvent)
self._CharLonelyStateAI__doneEvent = doneEvent
self.character = character
def enter(self):
if hasattr(self.character, 'name'):
name = self.character.getName()
else:
name = 'character'
self.notify.debug('Lonely ' + self.character.getName() + '...')
StateData.StateData.enter(self)
duration = random.randint(3, 15)
taskMgr.doMethodLater(duration, self._CharLonelyStateAI__doneHandler, self.character.taskName('startWalking'))
def exit(self):
StateData.StateData.exit(self)
taskMgr.remove(self.character.taskName('startWalking'))
def _CharLonelyStateAI__doneHandler(self, task):
doneStatus = { }
doneStatus['state'] = 'lonely'
doneStatus['status'] = 'done'
messenger.send(self._CharLonelyStateAI__doneEvent, [
doneStatus])
return Task.done
class CharChattyStateAI(StateData.StateData):
notify = DirectNotifyGlobal.directNotify.newCategory('CharChattyStateAI')
def __init__(self, doneEvent, character):
StateData.StateData.__init__(self, doneEvent)
self._CharChattyStateAI__doneEvent = doneEvent
self.character = character
self._CharChattyStateAI__chatTaskName = 'characterChat-' + str(character)
self.lastChatTarget = 0
self.nextChatTime = 0
self.lastMessage = [
-1,
-1]
def enter(self):
if hasattr(self.character, 'name'):
name = self.character.getName()
else:
name = 'character'
self.notify.debug('Chatty ' + self.character.getName() + '...')
self.chatter = CCharChatter.getChatter(self.character.getName(), self.character.getCCChatter())
if self.chatter != None:
taskMgr.remove(self._CharChattyStateAI__chatTaskName)
taskMgr.add(self.blather, self._CharChattyStateAI__chatTaskName)
StateData.StateData.enter(self)
def pickMsg(self, category):
self.getLatestChatter()
if self.chatter:
return random.randint(0, len(self.chatter[category]) - 1)
else:
return None
def getLatestChatter(self):
self.chatter = CCharChatter.getChatter(self.character.getName(), self.character.getCCChatter())
def setCorrectChatter(self):
self.chatter = CCharChatter.getChatter(self.character.getName(), self.character.getCCChatter())
def blather(self, task):
now = globalClock.getFrameTime()
if now < self.nextChatTime:
return Task.cont
self.getLatestChatter()
if self.character.lostInterest():
self.leave()
return Task.done
if not self.chatter:
self.notify.debug('I do not want to talk')
return Task.done
if not self.character.getNearbyAvatars():
return Task.cont
target = self.character.getNearbyAvatars()[0]
if self.lastChatTarget != target:
self.lastChatTarget = target
category = CCharChatter.GREETING
else:
category = CCharChatter.COMMENT
self.setCorrectChatter()
if category == self.lastMessage[0] and len(self.chatter[category]) > 1:
msg = self.lastMessage[1]
lastMsgIndex = self.lastMessage[1]
if lastMsgIndex < len(self.chatter[category]) and lastMsgIndex >= 0:
while self.chatter[category][msg] == self.chatter[category][lastMsgIndex]:
msg = self.pickMsg(category)
if not msg:
break
continue
else:
msg = self.pickMsg(category)
else:
msg = self.pickMsg(category)
if msg == None:
self.notify.debug('I do not want to talk')
return Task.done
self.character.sendUpdate('setChat', [
category,
msg,
target])
self.lastMessage = [
category,
msg]
self.nextChatTime = now + 8.0 + random.random() * 4.0
return Task.cont
def leave(self):
if self.chatter != None:
category = CCharChatter.GOODBYE
msg = random.randint(0, len(self.chatter[CCharChatter.GOODBYE]) - 1)
target = self.character.getNearbyAvatars()[0]
self.character.sendUpdate('setChat', [
category,
msg,
target])
taskMgr.doMethodLater(1, self.doneHandler, self.character.taskName('waitToFinish'))
def exit(self):
StateData.StateData.exit(self)
taskMgr.remove(self._CharChattyStateAI__chatTaskName)
def doneHandler(self, task):
doneStatus = { }
doneStatus['state'] = 'chatty'
doneStatus['status'] = 'done'
messenger.send(self._CharChattyStateAI__doneEvent, [
doneStatus])
return Task.done
class CharWalkStateAI(StateData.StateData):
notify = DirectNotifyGlobal.directNotify.newCategory('CharWalkStateAI')
def __init__(self, doneEvent, character, diffPath = None):
StateData.StateData.__init__(self, doneEvent)
self._CharWalkStateAI__doneEvent = doneEvent
self.character = character
if diffPath == None:
self.paths = CCharPaths.getPaths(character.getName(), character.getCCLocation())
else:
self.paths = CCharPaths.getPaths(diffPath, character.getCCLocation())
self.speed = character.walkSpeed()
self._CharWalkStateAI__lastWalkNode = CCharPaths.startNode
self._CharWalkStateAI__curWalkNode = CCharPaths.startNode
def enter(self):
destNode = self._CharWalkStateAI__lastWalkNode
choices = CCharPaths.getAdjacentNodes(self._CharWalkStateAI__curWalkNode, self.paths)
if len(choices) == 1:
destNode = choices[0]
else:
while destNode == self._CharWalkStateAI__lastWalkNode:
destNode = random.choice(CCharPaths.getAdjacentNodes(self._CharWalkStateAI__curWalkNode, self.paths))
self.notify.debug('Walking ' + self.character.getName() + '... from ' + str(self._CharWalkStateAI__curWalkNode) + '(' + str(CCharPaths.getNodePos(self._CharWalkStateAI__curWalkNode, self.paths)) + ') to ' + str(destNode) + '(' + str(CCharPaths.getNodePos(destNode, self.paths)) + ')')
self.character.sendUpdate('setWalk', [
self._CharWalkStateAI__curWalkNode,
destNode,
globalClockDelta.getRealNetworkTime()])
duration = CCharPaths.getWalkDuration(self._CharWalkStateAI__curWalkNode, destNode, self.speed, self.paths)
t = taskMgr.doMethodLater(duration, self.doneHandler, self.character.taskName(self.character.getName() + 'DoneWalking'))
t.newWalkNode = destNode
self.destNode = destNode
def exit(self):
StateData.StateData.exit(self)
taskMgr.remove(self.character.taskName(self.character.getName() + 'DoneWalking'))
def getDestNode(self):
if hasattr(self, 'destNode') and self.destNode:
return self.destNode
else:
return self._CharWalkStateAI__curWalkNode
def setCurNode(self, curWalkNode):
self._CharWalkStateAI__curWalkNode = curWalkNode
def doneHandler(self, task):
self._CharWalkStateAI__lastWalkNode = self._CharWalkStateAI__curWalkNode
self._CharWalkStateAI__curWalkNode = task.newWalkNode
self.character.sendUpdate('setWalk', [
self._CharWalkStateAI__curWalkNode,
self._CharWalkStateAI__curWalkNode,
globalClockDelta.getRealNetworkTime()])
doneStatus = { }
doneStatus['state'] = 'walk'
doneStatus['status'] = 'done'
messenger.send(self._CharWalkStateAI__doneEvent, [
doneStatus])
return Task.done
class CharFollowChipStateAI(StateData.StateData):
notify = DirectNotifyGlobal.directNotify.newCategory('CharFollowChipStateAI')
def __init__(self, doneEvent, character, followedChar):
StateData.StateData.__init__(self, doneEvent)
self._CharFollowChipStateAI__doneEvent = doneEvent
self.character = character
self.followedChar = followedChar
self.paths = CCharPaths.getPaths(character.getName(), character.getCCLocation())
self.speed = character.walkSpeed()
self._CharFollowChipStateAI__lastWalkNode = CCharPaths.startNode
self._CharFollowChipStateAI__curWalkNode = CCharPaths.startNode
def enter(self, chipDestNode):
destNode = self._CharFollowChipStateAI__lastWalkNode
choices = CCharPaths.getAdjacentNodes(self._CharFollowChipStateAI__curWalkNode, self.paths)
if len(choices) == 1:
destNode = choices[0]
else:
while destNode == self._CharFollowChipStateAI__lastWalkNode:
destNode = random.choice(CCharPaths.getAdjacentNodes(self._CharFollowChipStateAI__curWalkNode, self.paths))
destNode = chipDestNode
self.notify.debug('Walking ' + self.character.getName() + '... from ' + str(self._CharFollowChipStateAI__curWalkNode) + '(' + str(CCharPaths.getNodePos(self._CharFollowChipStateAI__curWalkNode, self.paths)) + ') to ' + str(destNode) + '(' + str(CCharPaths.getNodePos(destNode, self.paths)) + ')')
self.offsetDistance = ToontownGlobals.DaleOrbitDistance
angle = random.randint(0, 359)
self.offsetX = math.cos(deg2Rad(angle)) * self.offsetDistance
self.offsetY = math.sin(deg2Rad(angle)) * self.offsetDistance
self.character.sendUpdate('setFollowChip', [
self._CharFollowChipStateAI__curWalkNode,
destNode,
globalClockDelta.getRealNetworkTime(),
self.offsetX,
self.offsetY])
duration = CCharPaths.getWalkDuration(self._CharFollowChipStateAI__curWalkNode, destNode, self.speed, self.paths)
t = taskMgr.doMethodLater(duration, self._CharFollowChipStateAI__doneHandler, self.character.taskName(self.character.getName() + 'DoneWalking'))
t.newWalkNode = destNode
def exit(self):
StateData.StateData.exit(self)
taskMgr.remove(self.character.taskName(self.character.getName() + 'DoneWalking'))
def _CharFollowChipStateAI__doneHandler(self, task):
self._CharFollowChipStateAI__lastWalkNode = self._CharFollowChipStateAI__curWalkNode
self._CharFollowChipStateAI__curWalkNode = task.newWalkNode
self.character.sendUpdate('setFollowChip', [
self._CharFollowChipStateAI__curWalkNode,
self._CharFollowChipStateAI__curWalkNode,
globalClockDelta.getRealNetworkTime(),
self.offsetX,
self.offsetY])
doneStatus = { }
doneStatus['state'] = 'walk'
doneStatus['status'] = 'done'
messenger.send(self._CharFollowChipStateAI__doneEvent, [
doneStatus])
return Task.done
class ChipChattyStateAI(CharChattyStateAI):
notify = DirectNotifyGlobal.directNotify.newCategory('ChipChattyStateAI')
def setDaleId(self, daleId):
self.daleId = daleId
self.dale = simbase.air.doId2do.get(self.daleId)
def blather(self, task):
now = globalClock.getFrameTime()
if now < self.nextChatTime:
return Task.cont
self.getLatestChatter()
if self.character.lostInterest():
self.leave()
return Task.done
if not self.chatter:
self.notify.debug('I do not want to talk')
return Task.done
if not self.character.getNearbyAvatars():
return Task.cont
target = self.character.getNearbyAvatars()[0]
if self.lastChatTarget != target:
self.lastChatTarget = target
category = CCharChatter.GREETING
else:
category = CCharChatter.COMMENT
if category == self.lastMessage[0] and len(self.chatter[category]) > 1:
msg = self.lastMessage[1]
lastMsgIndex = self.lastMessage[1]
if lastMsgIndex < len(self.chatter[category]) and lastMsgIndex >= 0:
while self.chatter[category][msg] == self.chatter[category][lastMsgIndex]:
msg = self.pickMsg(category)
if not msg:
break
continue
else:
msg = self.pickMsg(category)
else:
msg = self.pickMsg(category)
if msg == None:
self.notify.debug('I do not want to talk')
return Task.done
self.character.sendUpdate('setChat', [
category,
msg,
target])
if hasattr(self, 'dale') and self.dale:
self.dale.sendUpdate('setChat', [
category,
msg,
target])
self.lastMessage = [
category,
msg]
self.nextChatTime = now + 8.0 + random.random() * 4.0
return Task.cont
def leave(self):
if self.chatter != None:
category = CCharChatter.GOODBYE
msg = random.randint(0, len(self.chatter[CCharChatter.GOODBYE]) - 1)
target = self.character.getNearbyAvatars()[0]
self.character.sendUpdate('setChat', [
category,
msg,
target])
if hasattr(self, 'dale') and self.dale:
self.dale.sendUpdate('setChat', [
category,
msg,
target])
taskMgr.doMethodLater(1, self.doneHandler, self.character.taskName('waitToFinish'))

View file

@ -1,295 +0,0 @@
import copy
from direct.controls.ControlManager import CollisionHandlerRayStart
from direct.directnotify import DirectNotifyGlobal
from direct.fsm import ClassicFSM
from direct.fsm import State
from direct.interval.IntervalGlobal import *
from pandac.PandaModules import *
import string
import CCharChatter
import CCharPaths
from otp.avatar import Avatar
from toontown.char import CharDNA
from toontown.char import DistributedChar
from toontown.chat.ChatGlobals import *
from toontown.effects import DustCloud
from toontown.toonbase import ToontownGlobals
from toontown.toonbase.TTLocalizer import Donald, DonaldDock, WesternPluto, Pluto
class DistributedCCharBase(DistributedChar.DistributedChar):
notify = DirectNotifyGlobal.directNotify.newCategory('DistributedCCharBase')
def __init__(self, cr, name, dnaName):
try:
self.DistributedCCharBase_initialized
return
except:
self.DistributedCCharBase_initialized = 1
DistributedChar.DistributedChar.__init__(self, cr)
dna = CharDNA.CharDNA()
dna.newChar(dnaName)
self.setDNA(dna)
self.setName(name)
self.setTransparency(TransparencyAttrib.MDual, 1)
fadeIn = self.colorScaleInterval(0.5, Vec4(1, 1, 1, 1), startColorScale=Vec4(1, 1, 1, 0), blendType='easeInOut')
fadeIn.start()
self.diffPath = None
self.transitionToCostume = 0
self.__initCollisions()
return
def __initCollisions(self):
self.cSphere = CollisionSphere(0.0, 0.0, 0.0, 8.0)
self.cSphere.setTangible(0)
self.cSphereNode = CollisionNode(self.getName() + 'BlatherSphere')
self.cSphereNode.addSolid(self.cSphere)
self.cSphereNodePath = self.attachNewNode(self.cSphereNode)
self.cSphereNodePath.hide()
self.cSphereNode.setCollideMask(ToontownGlobals.WallBitmask)
self.acceptOnce('enter' + self.cSphereNode.getName(), self.__handleCollisionSphereEnter)
self.cRay = CollisionRay(0.0, 0.0, CollisionHandlerRayStart, 0.0, 0.0, -1.0)
self.cRayNode = CollisionNode(self.getName() + 'cRay')
self.cRayNode.addSolid(self.cRay)
self.cRayNodePath = self.attachNewNode(self.cRayNode)
self.cRayNodePath.hide()
self.cRayBitMask = ToontownGlobals.FloorBitmask
self.cRayNode.setFromCollideMask(self.cRayBitMask)
self.cRayNode.setIntoCollideMask(BitMask32.allOff())
self.lifter = CollisionHandlerFloor()
self.lifter.setOffset(ToontownGlobals.FloorOffset)
self.lifter.setReach(10.0)
self.lifter.setMaxVelocity(0.0)
self.lifter.addCollider(self.cRayNodePath, self)
self.cTrav = base.localAvatar.cTrav
def __deleteCollisions(self):
del self.cSphere
del self.cSphereNode
self.cSphereNodePath.removeNode()
del self.cSphereNodePath
self.cRay = None
self.cRayNode = None
self.cRayNodePath = None
self.lifter = None
self.cTrav = None
return
def disable(self):
self.stopBlink()
self.ignoreAll()
self.chatTrack.finish()
del self.chatTrack
if self.chatterDialogue:
self.chatterDialogue.stop()
del self.chatterDialogue
DistributedChar.DistributedChar.disable(self)
self.stopEarTask()
def delete(self):
try:
self.DistributedCCharBase_deleted
except:
self.setParent(NodePath('Temp'))
self.DistributedCCharBase_deleted = 1
self.__deleteCollisions()
DistributedChar.DistributedChar.delete(self)
def generate(self, diffPath = None):
DistributedChar.DistributedChar.generate(self)
if diffPath == None:
self.setPos(CCharPaths.getNodePos(CCharPaths.startNode, CCharPaths.getPaths(self.getName(), self.getCCLocation())))
else:
self.setPos(CCharPaths.getNodePos(CCharPaths.startNode, CCharPaths.getPaths(diffPath, self.getCCLocation())))
self.setHpr(0, 0, 0)
self.setParent(ToontownGlobals.SPRender)
self.startBlink()
self.startEarTask()
self.chatTrack = Sequence()
self.chatterDialogue = None
self.acceptOnce('enter' + self.cSphereNode.getName(), self.__handleCollisionSphereEnter)
self.accept('exitSafeZone', self.__handleExitSafeZone)
return
def __handleExitSafeZone(self):
self.__handleCollisionSphereExit(None)
return
def __handleCollisionSphereEnter(self, collEntry):
self.notify.debug('Entering collision sphere...')
self.sendUpdate('avatarEnter', [])
self.accept('chatUpdate', self.__handleChatUpdate)
self.accept('chatUpdateSC', self.__handleChatUpdateSC)
self.accept('chatUpdateSCCustom', self.__handleChatUpdateSCCustom)
self.accept('chatUpdateSCToontask', self.__handleChatUpdateSCToontask)
self.nametag3d.setBin('transparent', 100)
self.acceptOnce('exit' + self.cSphereNode.getName(), self.__handleCollisionSphereExit)
def __handleCollisionSphereExit(self, collEntry):
self.notify.debug('Exiting collision sphere...')
self.sendUpdate('avatarExit', [])
self.ignore('chatUpdate')
self.ignore('chatUpdateSC')
self.ignore('chatUpdateSCCustom')
self.ignore('chatUpdateSCToontask')
self.acceptOnce('enter' + self.cSphereNode.getName(), self.__handleCollisionSphereEnter)
def __handleChatUpdate(self, msg, chatFlags):
self.sendUpdate('setNearbyAvatarChat', [msg])
def __handleChatUpdateSC(self, msgIndex):
self.sendUpdate('setNearbyAvatarSC', [msgIndex])
def __handleChatUpdateSCCustom(self, msgIndex):
self.sendUpdate('setNearbyAvatarSCCustom', [msgIndex])
def __handleChatUpdateSCToontask(self, taskId, toNpcId, toonProgress, msgIndex):
self.sendUpdate('setNearbyAvatarSCToontask', [taskId,
toNpcId,
toonProgress,
msgIndex])
def makeTurnToHeadingTrack(self, heading):
curHpr = self.getHpr()
destHpr = self.getHpr()
destHpr.setX(heading)
if destHpr[0] - curHpr[0] > 180.0:
destHpr.setX(destHpr[0] - 360)
elif destHpr[0] - curHpr[0] < -180.0:
destHpr.setX(destHpr[0] + 360)
turnSpeed = 180.0
time = abs(destHpr[0] - curHpr[0]) / turnSpeed
turnTracks = Parallel()
if time > 0.2:
turnTracks.append(Sequence(Func(self.loop, 'walk'), Wait(time), Func(self.loop, 'neutral')))
turnTracks.append(LerpHprInterval(self, time, destHpr, name='lerp' + self.getName() + 'Hpr'))
return turnTracks
def setChat(self, category, msg, avId):
if avId in self.cr.doId2do:
avatar = self.cr.doId2do[avId]
chatter = CCharChatter.getChatter(self.getName(), self.getCCChatter())
if category >= len(chatter):
self.notify.debug("Chatter's changed")
return
elif len(chatter[category]) <= msg:
self.notify.debug("Chatter's changed")
return
str = chatter[category][msg]
if '%' in str:
str = copy.deepcopy(str)
avName = avatar.getName()
str = str.replace('%', avName)
track = Sequence()
if category != CCharChatter.GOODBYE:
curHpr = self.getHpr()
self.headsUp(avatar)
destHpr = self.getHpr()
self.setHpr(curHpr)
track.append(self.makeTurnToHeadingTrack(destHpr[0]))
if self.getName() == Donald or self.getName() == WesternPluto or self.getName() == Pluto:
chatFlags = CFThought | CFTimeout
if hasattr(base.cr, 'newsManager') and base.cr.newsManager:
holidayIds = base.cr.newsManager.getHolidayIdList()
if ToontownGlobals.APRIL_FOOLS_COSTUMES in holidayIds:
if self.getName() == Pluto:
chatFlags = CFTimeout | CFSpeech
elif self.getName() == DonaldDock:
chatFlags = CFTimeout | CFSpeech
self.nametag3d.hide()
else:
chatFlags = CFTimeout | CFSpeech
self.chatterDialogue = self.getChatterDialogue(category, msg)
track.append(Func(self.setChatAbsolute, str, chatFlags, self.chatterDialogue))
self.chatTrack.finish()
self.chatTrack = track
self.chatTrack.start()
def setWalk(self, srcNode, destNode, timestamp):
pass
def walkSpeed(self):
return 0.1
def enableRaycast(self, enable = 1):
if not self.cTrav or not hasattr(self, 'cRayNode') or not self.cRayNode:
self.notify.debug('raycast info not found for ' + self.getName())
return
self.cTrav.removeCollider(self.cRayNodePath)
if enable:
if self.notify.getDebug():
self.notify.debug('enabling raycast for ' + self.getName())
self.cTrav.addCollider(self.cRayNodePath, self.lifter)
elif self.notify.getDebug():
self.notify.debug('disabling raycast for ' + self.getName())
def getCCLocation(self):
return 0
def getCCChatter(self):
self.handleHolidays()
return self.CCChatter
def handleHolidays(self):
self.CCChatter = 0
if hasattr(base.cr, 'newsManager') and base.cr.newsManager:
holidayIds = base.cr.newsManager.getHolidayIdList()
if ToontownGlobals.CRASHED_LEADERBOARD in holidayIds:
self.CCChatter = ToontownGlobals.CRASHED_LEADERBOARD
elif ToontownGlobals.CIRCUIT_RACING_EVENT in holidayIds:
self.CCChatter = ToontownGlobals.CIRCUIT_RACING_EVENT
elif ToontownGlobals.WINTER_CAROLING in holidayIds:
self.CCChatter = ToontownGlobals.WINTER_CAROLING
elif ToontownGlobals.WINTER_DECORATIONS in holidayIds:
self.CCChatter = ToontownGlobals.WINTER_DECORATIONS
elif ToontownGlobals.WACKY_WINTER_CAROLING in holidayIds:
self.CCChatter = ToontownGlobals.WACKY_WINTER_CAROLING
elif ToontownGlobals.WACKY_WINTER_DECORATIONS in holidayIds:
self.CCChatter = ToontownGlobals.WACKY_WINTER_DECORATIONS
elif ToontownGlobals.VALENTINES_DAY in holidayIds:
self.CCChatter = ToontownGlobals.VALENTINES_DAY
elif ToontownGlobals.APRIL_FOOLS_COSTUMES in holidayIds:
self.CCChatter = ToontownGlobals.APRIL_FOOLS_COSTUMES
elif ToontownGlobals.SILLY_CHATTER_ONE in holidayIds:
self.CCChatter = ToontownGlobals.SILLY_CHATTER_ONE
elif ToontownGlobals.SILLY_CHATTER_TWO in holidayIds:
self.CCChatter = ToontownGlobals.SILLY_CHATTER_TWO
elif ToontownGlobals.SILLY_CHATTER_THREE in holidayIds:
self.CCChatter = ToontownGlobals.SILLY_CHATTER_THREE
elif ToontownGlobals.SILLY_CHATTER_FOUR in holidayIds:
self.CCChatter = ToontownGlobals.SILLY_CHATTER_FOUR
elif ToontownGlobals.SILLY_CHATTER_FIVE in holidayIds:
self.CCChatter = ToontownGlobals.SILLY_CHATTER_FOUR
elif ToontownGlobals.HALLOWEEN_COSTUMES in holidayIds:
self.CCChatter = ToontownGlobals.HALLOWEEN_COSTUMES
elif ToontownGlobals.SPOOKY_COSTUMES in holidayIds:
self.CCChatter = ToontownGlobals.SPOOKY_COSTUMES
elif ToontownGlobals.SELLBOT_FIELD_OFFICE in holidayIds:
self.CCChatter = ToontownGlobals.SELLBOT_FIELD_OFFICE
def fadeAway(self):
fadeOut = self.colorScaleInterval(0.5, Vec4(1, 1, 1, 0.5), startColorScale=Vec4(1, 1, 1, 1), blendType='easeInOut')
fadeOut.start()
self.loop('neutral')
if self.fsm:
self.fsm.addState(State.State('TransitionToCostume', self.enterTransitionToCostume, self.exitTransitionToCostume, ['Off']))
self.fsm.request('TransitionToCostume', force=1)
self.ignoreAll()
def enterTransitionToCostume(self):
def getDustCloudIval():
dustCloud = DustCloud.DustCloud(fBillboard=0, wantSound=1)
dustCloud.setBillboardAxis(2.0)
dustCloud.setZ(4)
dustCloud.setScale(0.6)
dustCloud.createTrack()
return Sequence(Func(dustCloud.reparentTo, self), dustCloud.track, Func(dustCloud.destroy), name='dustCloadIval')
dust = getDustCloudIval()
dust.start()
def exitTransitionToCostume(self):
pass

View file

@ -1,208 +0,0 @@
# File: D (Python 2.4)
from otp.ai.AIBaseGlobal import *
from direct.distributed.ClockDelta import *
from otp.avatar import DistributedAvatarAI
from direct.directnotify import DirectNotifyGlobal
from toontown.toonbase import ToontownGlobals
class DistributedCCharBaseAI(DistributedAvatarAI.DistributedAvatarAI):
notify = DirectNotifyGlobal.directNotify.newCategory('DistributedCCharBaseAI')
def __init__(self, air, name):
DistributedAvatarAI.DistributedAvatarAI.__init__(self, air)
self.setName(name)
self.exitOff()
self.transitionToCostume = 0
self.diffPath = None
def delete(self):
self.ignoreAll()
DistributedAvatarAI.DistributedAvatarAI.delete(self)
def exitOff(self):
self._DistributedCCharBaseAI__initAttentionSpan()
self._DistributedCCharBaseAI__clearNearbyAvatars()
def avatarEnter(self):
avId = self.air.getAvatarIdFromSender()
self.notify.debug('adding avatar ' + str(avId) + ' to the nearby avatar list')
if avId not in self.nearbyAvatars:
self.nearbyAvatars.append(avId)
else:
self.air.writeServerEvent('suspicious', avId, 'CCharBase.avatarEnter')
self.notify.warning('Avatar %s already in nearby avatars!' % avId)
self.nearbyAvatarInfoDict[avId] = { }
self.nearbyAvatarInfoDict[avId]['enterTime'] = globalClock.getRealTime()
self.nearbyAvatarInfoDict[avId]['lastChatTime'] = 0
self.sortNearbyAvatars()
self._DistributedCCharBaseAI__interestingAvatarEventOccured()
avExitEvent = self.air.getAvatarExitEvent(avId)
self.acceptOnce(avExitEvent, self._DistributedCCharBaseAI__handleExitedAvatar, [
avId])
self.avatarEnterNextState()
def avatarExit(self):
avId = self.air.getAvatarIdFromSender()
self._DistributedCCharBaseAI__doAvatarExit(avId)
def _DistributedCCharBaseAI__doAvatarExit(self, avId):
avId = self.air.getAvatarIdFromSender()
self.notify.debug('removing avatar ' + str(avId) + ' from the nearby avatar list')
if avId not in self.nearbyAvatars:
self.notify.debug('avatar ' + str(avId) + ' not in the nearby avatar list')
else:
avExitEvent = self.air.getAvatarExitEvent(avId)
self.ignore(avExitEvent)
del self.nearbyAvatarInfoDict[avId]
self.nearbyAvatars.remove(avId)
self.avatarExitNextState()
def avatarEnterNextState():
pass
def avatarExitNextState():
pass
def _DistributedCCharBaseAI__clearNearbyAvatars(self):
self.nearbyAvatars = []
self.nearbyAvatarInfoDict = { }
def sortNearbyAvatars(self):
def nAv_compare(a, b, nAvIDict = self.nearbyAvatarInfoDict):
tsA = nAvIDict[a]['enterTime']
tsB = nAvIDict[b]['enterTime']
if tsA == tsB:
return 0
elif tsA < tsB:
return -1
else:
return 1
self.nearbyAvatars.sort(nAv_compare)
def getNearbyAvatars(self):
return self.nearbyAvatars
def _DistributedCCharBaseAI__avatarSpoke(self, avId):
now = globalClock.getRealTime()
if avId in self.nearbyAvatarInfoDict:
self.nearbyAvatarInfoDict[avId]['lastChatTime'] = now
self._DistributedCCharBaseAI__interestingAvatarEventOccured()
def _DistributedCCharBaseAI__initAttentionSpan(self):
self._DistributedCCharBaseAI__avatarTimeoutBase = 0
def _DistributedCCharBaseAI__interestingAvatarEventOccured(self, t = None):
if t == None:
t = globalClock.getRealTime()
self._DistributedCCharBaseAI__avatarTimeoutBase = t
def lostInterest(self):
now = globalClock.getRealTime()
if now > self._DistributedCCharBaseAI__avatarTimeoutBase + 50.0:
return 1
return 0
def _DistributedCCharBaseAI__handleExitedAvatar(self, avId):
self._DistributedCCharBaseAI__doAvatarExit(avId)
def setNearbyAvatarChat(self, msg):
avId = self.air.getAvatarIdFromSender()
self.notify.debug('setNearbyAvatarChat: avatar ' + str(avId) + ' said ' + str(msg))
self._DistributedCCharBaseAI__avatarSpoke(avId)
self.air.doFind('DistributedSmartNPC').sendUpdate('talkMessage', [avId, msg])
def setNearbyAvatarSC(self, msgIndex):
avId = self.air.getAvatarIdFromSender()
self.notify.debug('setNearbyAvatarSC: avatar %s said SpeedChat phrase %s' % (avId, msgIndex))
self._DistributedCCharBaseAI__avatarSpoke(avId)
def setNearbyAvatarSCCustom(self, msgIndex):
avId = self.air.getAvatarIdFromSender()
self.notify.debug('setNearbyAvatarSCCustom: avatar %s said custom SpeedChat phrase %s' % (avId, msgIndex))
self._DistributedCCharBaseAI__avatarSpoke(avId)
def setNearbyAvatarSCToontask(self, taskId, toNpcId, toonProgress, msgIndex):
avId = self.air.getAvatarIdFromSender()
self.notify.debug('setNearbyAvatarSCToontask: avatar %s said %s' % (avId, (taskId, toNpcId, toonProgress, msgIndex)))
self._DistributedCCharBaseAI__avatarSpoke(avId)
def getWalk(self):
return ('', '', 0)
def walkSpeed(self):
return 0.10000000000000001
def handleHolidays(self):
self.CCChatter = 0
if hasattr(simbase.air, 'holidayManager'):
if ToontownGlobals.CRASHED_LEADERBOARD in simbase.air.holidayManager.currentHolidays:
self.CCChatter = ToontownGlobals.CRASHED_LEADERBOARD
elif ToontownGlobals.CIRCUIT_RACING_EVENT in simbase.air.holidayManager.currentHolidays:
self.CCChatter = ToontownGlobals.CIRCUIT_RACING_EVENT
elif ToontownGlobals.WINTER_CAROLING in simbase.air.holidayManager.currentHolidays:
self.CCChatter = ToontownGlobals.WINTER_CAROLING
elif ToontownGlobals.WINTER_DECORATIONS in simbase.air.holidayManager.currentHolidays:
self.CCChatter = ToontownGlobals.WINTER_DECORATIONS
elif ToontownGlobals.VALENTINES_DAY in simbase.air.holidayManager.currentHolidays:
self.CCChatter = ToontownGlobals.VALENTINES_DAY
elif ToontownGlobals.APRIL_FOOLS_COSTUMES in simbase.air.holidayManager.currentHolidays:
self.CCChatter = ToontownGlobals.APRIL_FOOLS_COSTUMES
elif ToontownGlobals.SILLY_CHATTER_ONE in simbase.air.holidayManager.currentHolidays:
self.CCChatter = ToontownGlobals.SILLY_CHATTER_ONE
elif ToontownGlobals.SILLY_CHATTER_TWO in simbase.air.holidayManager.currentHolidays:
self.CCChatter = ToontownGlobals.SILLY_CHATTER_TWO
elif ToontownGlobals.SILLY_CHATTER_THREE in simbase.air.holidayManager.currentHolidays:
self.CCChatter = ToontownGlobals.SILLY_CHATTER_THREE
elif ToontownGlobals.SILLY_CHATTER_FOUR in simbase.air.holidayManager.currentHolidays:
self.CCChatter = ToontownGlobals.SILLY_CHATTER_FOUR
elif ToontownGlobals.SILLY_CHATTER_FIVE in simbase.air.holidayManager.currentHolidays:
self.CCChatter = ToontownGlobals.SILLY_CHATTER_FOUR
def getCCLocation(self):
return 0
def getCCChatter(self):
self.handleHolidays()
return self.CCChatter
def fadeAway(self):
self.sendUpdate('fadeAway', [])
def transitionCostume(self):
self.transitionToCostume = 1

View file

@ -1,80 +0,0 @@
from direct.showbase.ShowBaseGlobal import *
import DistributedCCharBase
from direct.directnotify import DirectNotifyGlobal
from direct.fsm import ClassicFSM
from direct.fsm import State
import CharStateDatas
from toontown.toonbase import ToontownGlobals
from toontown.toonbase import TTLocalizer
class DistributedChip(DistributedCCharBase.DistributedCCharBase):
notify = DirectNotifyGlobal.directNotify.newCategory('DistributedChip')
def __init__(self, cr):
try:
self.DistributedChip_initialized
except:
self.DistributedChip_initialized = 1
DistributedCCharBase.DistributedCCharBase.__init__(self, cr, TTLocalizer.Chip, 'ch')
self.fsm = ClassicFSM.ClassicFSM(self.getName(), [State.State('Off', self.enterOff, self.exitOff, ['Neutral']), State.State('Neutral', self.enterNeutral, self.exitNeutral, ['Walk']), State.State('Walk', self.enterWalk, self.exitWalk, ['Neutral'])], 'Off', 'Off')
self.fsm.enterInitialState()
self.handleHolidays()
def disable(self):
self.fsm.requestFinalState()
DistributedCCharBase.DistributedCCharBase.disable(self)
del self.neutralDoneEvent
del self.neutral
del self.walkDoneEvent
del self.walk
self.fsm.requestFinalState()
def delete(self):
try:
self.DistributedChip_deleted
except:
del self.fsm
self.DistributedChip_deleted = 1
DistributedCCharBase.DistributedCCharBase.delete(self)
def generate(self):
DistributedCCharBase.DistributedCCharBase.generate(self)
name = self.getName()
self.neutralDoneEvent = self.taskName(name + '-neutral-done')
self.neutral = CharStateDatas.CharNeutralState(self.neutralDoneEvent, self)
self.walkDoneEvent = self.taskName(name + '-walk-done')
self.walk = CharStateDatas.CharWalkState(self.walkDoneEvent, self)
self.fsm.request('Neutral')
def enterOff(self):
pass
def exitOff(self):
pass
def enterNeutral(self):
self.neutral.enter()
self.acceptOnce(self.neutralDoneEvent, self.__decideNextState)
def exitNeutral(self):
self.ignore(self.neutralDoneEvent)
self.neutral.exit()
def enterWalk(self):
self.walk.enter()
self.acceptOnce(self.walkDoneEvent, self.__decideNextState)
def exitWalk(self):
self.ignore(self.walkDoneEvent)
self.walk.exit()
def __decideNextState(self, doneStatus):
self.fsm.request('Neutral')
def setWalk(self, srcNode, destNode, timestamp):
if destNode and not destNode == srcNode:
self.walk.setWalk(srcNode, destNode, timestamp)
self.fsm.request('Walk')
def walkSpeed(self):
return ToontownGlobals.ChipSpeed

View file

@ -1,165 +0,0 @@
# File: D (Python 2.4)
from otp.ai.AIBaseGlobal import *
import DistributedCCharBaseAI
from direct.directnotify import DirectNotifyGlobal
from direct.fsm import ClassicFSM
from direct.fsm import State
from direct.task import Task
import random
from toontown.toonbase import ToontownGlobals
from toontown.toonbase import TTLocalizer
import CharStateDatasAI
class DistributedChipAI(DistributedCCharBaseAI.DistributedCCharBaseAI):
notify = DirectNotifyGlobal.directNotify.newCategory('DistributedChipAI')
def __init__(self, air):
DistributedCCharBaseAI.DistributedCCharBaseAI.__init__(self, air, TTLocalizer.Chip)
self.fsm = ClassicFSM.ClassicFSM('DistributedChipAI', [
State.State('Off', self.enterOff, self.exitOff, [
'Lonely']),
State.State('Lonely', self.enterLonely, self.exitLonely, [
'Chatty',
'Walk']),
State.State('Chatty', self.enterChatty, self.exitChatty, [
'Lonely',
'Walk']),
State.State('Walk', self.enterWalk, self.exitWalk, [
'Lonely',
'Chatty'])], 'Off', 'Off')
self.fsm.enterInitialState()
self.dale = None
self.handleHolidays()
def delete(self):
self.fsm.requestFinalState()
DistributedCCharBaseAI.DistributedCCharBaseAI.delete(self)
self.lonelyDoneEvent = None
self.lonely = None
self.chattyDoneEvent = None
self.chatty = None
self.walkDoneEvent = None
self.walk = None
def generate(self):
DistributedCCharBaseAI.DistributedCCharBaseAI.generate(self)
name = self.getName()
self.lonelyDoneEvent = self.taskName(name + '-lonely-done')
self.lonely = CharStateDatasAI.CharLonelyStateAI(self.lonelyDoneEvent, self)
self.chattyDoneEvent = self.taskName(name + '-chatty-done')
self.chatty = CharStateDatasAI.ChipChattyStateAI(self.chattyDoneEvent, self)
self.walkDoneEvent = self.taskName(name + '-walk-done')
self.walk = CharStateDatasAI.CharWalkStateAI(self.walkDoneEvent, self)
def walkSpeed(self):
return ToontownGlobals.ChipSpeed
def start(self):
self.fsm.request('Lonely')
def _DistributedChipAI__decideNextState(self, doneStatus):
if doneStatus['state'] == 'lonely' and doneStatus['status'] == 'done':
self.fsm.request('Walk')
elif doneStatus['state'] == 'chatty' and doneStatus['status'] == 'done':
self.fsm.request('Walk')
elif doneStatus['state'] == 'walk' and doneStatus['status'] == 'done':
if len(self.nearbyAvatars) > 0:
self.fsm.request('Chatty')
else:
self.fsm.request('Lonely')
def enterOff(self):
pass
def exitOff(self):
DistributedCCharBaseAI.DistributedCCharBaseAI.exitOff(self)
def enterLonely(self):
self.lonely.enter()
self.acceptOnce(self.lonelyDoneEvent, self._DistributedChipAI__decideNextState)
if self.dale:
self.dale.chipEnteringState(self.fsm.getCurrentState().getName())
def exitLonely(self):
self.ignore(self.lonelyDoneEvent)
self.lonely.exit()
if self.dale:
self.dale.chipLeavingState(self.fsm.getCurrentState().getName())
def _DistributedChipAI__goForAWalk(self, task):
self.notify.debug('going for a walk')
self.fsm.request('Walk')
return Task.done
def enterChatty(self):
self.chatty.enter()
self.acceptOnce(self.chattyDoneEvent, self._DistributedChipAI__decideNextState)
if self.dale:
self.dale.chipEnteringState(self.fsm.getCurrentState().getName())
def exitChatty(self):
self.ignore(self.chattyDoneEvent)
self.chatty.exit()
if self.dale:
self.dale.chipLeavingState(self.fsm.getCurrentState().getName())
def enterWalk(self):
self.notify.debug('going for a walk')
self.walk.enter()
self.acceptOnce(self.walkDoneEvent, self._DistributedChipAI__decideNextState)
if self.dale:
self.dale.chipEnteringState(self.fsm.getCurrentState().getName())
def exitWalk(self):
self.ignore(self.walkDoneEvent)
self.walk.exit()
if self.dale:
self.dale.chipLeavingState(self.fsm.getCurrentState().getName())
def avatarEnterNextState(self):
if len(self.nearbyAvatars) == 1:
if self.fsm.getCurrentState().getName() != 'Walk':
self.fsm.request('Chatty')
else:
self.notify.debug('avatarEnterNextState: in walk state')
else:
self.notify.debug('avatarEnterNextState: num avatars: ' + str(len(self.nearbyAvatars)))
def avatarExitNextState(self):
if len(self.nearbyAvatars) == 0:
if self.fsm.getCurrentState().getName() != 'Walk':
self.fsm.request('Lonely')
def setDaleId(self, daleId):
self.daleId = daleId
self.dale = self.air.doId2do.get(daleId)
self.chatty.setDaleId(self.daleId)

View file

@ -1,93 +0,0 @@
from direct.showbase.ShowBaseGlobal import *
import DistributedCCharBase
from direct.directnotify import DirectNotifyGlobal
from direct.fsm import ClassicFSM
from direct.fsm import State
import CharStateDatas
from toontown.toonbase import ToontownGlobals
from toontown.toonbase import TTLocalizer
from toontown.hood import TTHood
class DistributedDaisy(DistributedCCharBase.DistributedCCharBase):
notify = DirectNotifyGlobal.directNotify.newCategory('DistributedDaisy')
def __init__(self, cr):
try:
self.DistributedDaisy_initialized
except:
self.DistributedDaisy_initialized = 1
DistributedCCharBase.DistributedCCharBase.__init__(self, cr, TTLocalizer.Daisy, 'dd')
self.fsm = ClassicFSM.ClassicFSM(self.getName(), [State.State('Off', self.enterOff, self.exitOff, ['Neutral']), State.State('Neutral', self.enterNeutral, self.exitNeutral, ['Walk']), State.State('Walk', self.enterWalk, self.exitWalk, ['Neutral'])], 'Off', 'Off')
self.fsm.enterInitialState()
self.handleHolidays()
def disable(self):
self.fsm.requestFinalState()
DistributedCCharBase.DistributedCCharBase.disable(self)
del self.neutralDoneEvent
del self.neutral
del self.walkDoneEvent
del self.walk
self.fsm.requestFinalState()
def delete(self):
try:
self.DistributedDaisy_deleted
except:
del self.fsm
self.DistributedDaisy_deleted = 1
DistributedCCharBase.DistributedCCharBase.delete(self)
def generate(self):
DistributedCCharBase.DistributedCCharBase.generate(self, self.diffPath)
name = self.getName()
self.neutralDoneEvent = self.taskName(name + '-neutral-done')
self.neutral = CharStateDatas.CharNeutralState(self.neutralDoneEvent, self)
self.walkDoneEvent = self.taskName(name + '-walk-done')
if self.diffPath == None:
self.walk = CharStateDatas.CharWalkState(self.walkDoneEvent, self)
else:
self.walk = CharStateDatas.CharWalkState(self.walkDoneEvent, self, self.diffPath)
self.fsm.request('Neutral')
return
def enterOff(self):
pass
def exitOff(self):
pass
def enterNeutral(self):
self.neutral.enter()
self.acceptOnce(self.neutralDoneEvent, self.__decideNextState)
def exitNeutral(self):
self.ignore(self.neutralDoneEvent)
self.neutral.exit()
def enterWalk(self):
self.walk.enter()
self.acceptOnce(self.walkDoneEvent, self.__decideNextState)
def exitWalk(self):
self.ignore(self.walkDoneEvent)
self.walk.exit()
def __decideNextState(self, doneStatus):
self.fsm.request('Neutral')
def setWalk(self, srcNode, destNode, timestamp):
if destNode and not destNode == srcNode:
self.walk.setWalk(srcNode, destNode, timestamp)
self.fsm.request('Walk')
def walkSpeed(self):
return ToontownGlobals.DaisySpeed
def handleHolidays(self):
DistributedCCharBase.DistributedCCharBase.handleHolidays(self)
if hasattr(base.cr, 'newsManager') and base.cr.newsManager:
holidayIds = base.cr.newsManager.getHolidayIdList()
if ToontownGlobals.APRIL_FOOLS_COSTUMES in holidayIds and isinstance(self.cr.playGame.hood, TTHood.TTHood):
self.diffPath = TTLocalizer.Mickey

View file

@ -1,183 +0,0 @@
# File: D (Python 2.4)
from otp.ai.AIBaseGlobal import *
import DistributedCCharBaseAI
from direct.directnotify import DirectNotifyGlobal
from direct.fsm import ClassicFSM
from direct.fsm import State
from direct.task import Task
import random
from toontown.toonbase import ToontownGlobals
from toontown.toonbase import TTLocalizer
import CharStateDatasAI
class DistributedDaisyAI(DistributedCCharBaseAI.DistributedCCharBaseAI):
notify = DirectNotifyGlobal.directNotify.newCategory('DistributedDaisyAI')
def __init__(self, air):
DistributedCCharBaseAI.DistributedCCharBaseAI.__init__(self, air, TTLocalizer.Daisy)
self.fsm = ClassicFSM.ClassicFSM('DistributedDaisyAI', [
State.State('Off', self.enterOff, self.exitOff, [
'Lonely',
'TransitionToCostume',
'Walk']),
State.State('Lonely', self.enterLonely, self.exitLonely, [
'Chatty',
'Walk',
'TransitionToCostume']),
State.State('Chatty', self.enterChatty, self.exitChatty, [
'Lonely',
'Walk',
'TransitionToCostume']),
State.State('Walk', self.enterWalk, self.exitWalk, [
'Lonely',
'Chatty',
'TransitionToCostume']),
State.State('TransitionToCostume', self.enterTransitionToCostume, self.exitTransitionToCostume, [
'Off'])], 'Off', 'Off')
self.fsm.enterInitialState()
self.handleHolidays()
def delete(self):
self.fsm.requestFinalState()
DistributedCCharBaseAI.DistributedCCharBaseAI.delete(self)
self.lonelyDoneEvent = None
self.lonely = None
self.chattyDoneEvent = None
self.chatty = None
self.walkDoneEvent = None
self.walk = None
def generate(self):
DistributedCCharBaseAI.DistributedCCharBaseAI.generate(self)
name = self.getName()
self.lonelyDoneEvent = self.taskName(name + '-lonely-done')
self.lonely = CharStateDatasAI.CharLonelyStateAI(self.lonelyDoneEvent, self)
self.chattyDoneEvent = self.taskName(name + '-chatty-done')
self.chatty = CharStateDatasAI.CharChattyStateAI(self.chattyDoneEvent, self)
self.walkDoneEvent = self.taskName(name + '-walk-done')
if self.diffPath == None:
self.walk = CharStateDatasAI.CharWalkStateAI(self.walkDoneEvent, self)
else:
self.walk = CharStateDatasAI.CharWalkStateAI(self.walkDoneEvent, self, self.diffPath)
def walkSpeed(self):
return ToontownGlobals.DaisySpeed
def start(self):
self.fsm.request('Lonely')
def _DistributedDaisyAI__decideNextState(self, doneStatus):
if self.transitionToCostume == 1:
curWalkNode = self.walk.getDestNode()
if simbase.air.holidayManager:
if ToontownGlobals.HALLOWEEN_COSTUMES in simbase.air.holidayManager.currentHolidays and simbase.air.holidayManager.currentHolidays[ToontownGlobals.HALLOWEEN_COSTUMES]:
simbase.air.holidayManager.currentHolidays[ToontownGlobals.HALLOWEEN_COSTUMES].triggerSwitch(curWalkNode, self)
self.fsm.request('TransitionToCostume')
elif ToontownGlobals.APRIL_FOOLS_COSTUMES in simbase.air.holidayManager.currentHolidays and simbase.air.holidayManager.currentHolidays[ToontownGlobals.APRIL_FOOLS_COSTUMES]:
simbase.air.holidayManager.currentHolidays[ToontownGlobals.APRIL_FOOLS_COSTUMES].triggerSwitch(curWalkNode, self)
self.fsm.request('TransitionToCostume')
else:
self.notify.warning('transitionToCostume == 1 but no costume holiday')
else:
self.notify.warning('transitionToCostume == 1 but no holiday Manager')
if doneStatus['state'] == 'lonely' and doneStatus['status'] == 'done':
self.fsm.request('Walk')
elif doneStatus['state'] == 'chatty' and doneStatus['status'] == 'done':
self.fsm.request('Walk')
elif doneStatus['state'] == 'walk' and doneStatus['status'] == 'done':
if len(self.nearbyAvatars) > 0:
self.fsm.request('Chatty')
else:
self.fsm.request('Lonely')
def enterOff(self):
pass
def exitOff(self):
DistributedCCharBaseAI.DistributedCCharBaseAI.exitOff(self)
def enterLonely(self):
self.lonely.enter()
self.acceptOnce(self.lonelyDoneEvent, self._DistributedDaisyAI__decideNextState)
def exitLonely(self):
self.ignore(self.lonelyDoneEvent)
self.lonely.exit()
def _DistributedDaisyAI__goForAWalk(self, task):
self.notify.debug('going for a walk')
self.fsm.request('Walk')
return Task.done
def enterChatty(self):
self.chatty.enter()
self.acceptOnce(self.chattyDoneEvent, self._DistributedDaisyAI__decideNextState)
def exitChatty(self):
self.ignore(self.chattyDoneEvent)
self.chatty.exit()
def enterWalk(self):
self.notify.debug('going for a walk')
self.walk.enter()
self.acceptOnce(self.walkDoneEvent, self._DistributedDaisyAI__decideNextState)
def exitWalk(self):
self.ignore(self.walkDoneEvent)
self.walk.exit()
def avatarEnterNextState(self):
if len(self.nearbyAvatars) == 1:
if self.fsm.getCurrentState().getName() != 'Walk':
self.fsm.request('Chatty')
else:
self.notify.debug('avatarEnterNextState: in walk state')
else:
self.notify.debug('avatarEnterNextState: num avatars: ' + str(len(self.nearbyAvatars)))
def avatarExitNextState(self):
if len(self.nearbyAvatars) == 0:
if self.fsm.getCurrentState().getName() != 'Walk':
self.fsm.request('Lonely')
def enterTransitionToCostume(self):
pass
def exitTransitionToCostume(self):
pass
def handleHolidays(self):
DistributedCCharBaseAI.DistributedCCharBaseAI.handleHolidays(self)
if hasattr(simbase.air, 'holidayManager'):
if ToontownGlobals.APRIL_FOOLS_COSTUMES in simbase.air.holidayManager.currentHolidays:
if simbase.air.holidayManager.currentHolidays[ToontownGlobals.APRIL_FOOLS_COSTUMES] != None and simbase.air.holidayManager.currentHolidays[ToontownGlobals.APRIL_FOOLS_COSTUMES].getRunningState():
self.diffPath = TTLocalizer.Mickey

View file

@ -1,94 +0,0 @@
from direct.showbase.ShowBaseGlobal import *
import DistributedCCharBase
from direct.directnotify import DirectNotifyGlobal
from direct.fsm import ClassicFSM
from direct.fsm import State
import CharStateDatas
from toontown.toonbase import ToontownGlobals
from toontown.toonbase import TTLocalizer
class DistributedDale(DistributedCCharBase.DistributedCCharBase):
notify = DirectNotifyGlobal.directNotify.newCategory('DistributedDale')
def __init__(self, cr):
try:
self.DistributedDale_initialized
except:
self.DistributedDale_initialized = 1
DistributedCCharBase.DistributedCCharBase.__init__(self, cr, TTLocalizer.Dale, 'da')
self.fsm = ClassicFSM.ClassicFSM(self.getName(), [State.State('Off', self.enterOff, self.exitOff, ['Neutral']), State.State('Neutral', self.enterNeutral, self.exitNeutral, ['Walk']), State.State('Walk', self.enterWalk, self.exitWalk, ['Neutral'])], 'Off', 'Off')
self.fsm.enterInitialState()
self.handleHolidays()
def disable(self):
self.fsm.requestFinalState()
DistributedCCharBase.DistributedCCharBase.disable(self)
del self.neutralDoneEvent
del self.neutral
del self.walkDoneEvent
if self.walk:
self.walk.exit()
del self.walk
self.fsm.requestFinalState()
def delete(self):
try:
self.DistributedDale_deleted
except:
del self.fsm
self.DistributedDale_deleted = 1
DistributedCCharBase.DistributedCCharBase.delete(self)
def generate(self):
DistributedCCharBase.DistributedCCharBase.generate(self)
self.setX(self.getX() + ToontownGlobals.DaleOrbitDistance)
name = self.getName()
self.neutralDoneEvent = self.taskName(name + '-neutral-done')
self.neutral = CharStateDatas.CharNeutralState(self.neutralDoneEvent, self)
self.walkDoneEvent = self.taskName(name + '-walk-done')
self.fsm.request('Neutral')
def announceGenerate(self):
DistributedCCharBase.DistributedCCharBase.announceGenerate(self)
self.walk = CharStateDatas.CharFollowChipState(self.walkDoneEvent, self, self.chipId)
def enterOff(self):
pass
def exitOff(self):
pass
def enterNeutral(self):
self.neutral.enter()
self.acceptOnce(self.neutralDoneEvent, self.__decideNextState)
def exitNeutral(self):
self.ignore(self.neutralDoneEvent)
self.neutral.exit()
def enterWalk(self):
self.walk.enter()
self.acceptOnce(self.walkDoneEvent, self.__decideNextState)
def exitWalk(self):
self.ignore(self.walkDoneEvent)
self.walk.exit()
def __decideNextState(self, doneStatus):
self.fsm.request('Neutral')
def setWalk(self, srcNode, destNode, timestamp, offsetX = 0, offsetY = 0):
if destNode and not destNode == srcNode:
self.walk.setWalk(srcNode, destNode, timestamp, offsetX, offsetY)
self.fsm.request('Walk')
def walkSpeed(self):
return ToontownGlobals.DaleSpeed
def setFollowChip(self, srcNode, destNode, timestamp, offsetX, offsetY):
if destNode and not destNode == srcNode:
self.walk.setWalk(srcNode, destNode, timestamp, offsetX, offsetY)
self.fsm.request('Walk')
def setChipId(self, chipId):
self.chipId = chipId

View file

@ -1,176 +0,0 @@
# File: D (Python 2.4)
from otp.ai.AIBaseGlobal import *
import DistributedCCharBaseAI
from direct.directnotify import DirectNotifyGlobal
from direct.fsm import ClassicFSM
from direct.fsm import State
from direct.task import Task
import random
from toontown.toonbase import ToontownGlobals
from toontown.toonbase import TTLocalizer
import CharStateDatasAI
class DistributedDaleAI(DistributedCCharBaseAI.DistributedCCharBaseAI):
notify = DirectNotifyGlobal.directNotify.newCategory('DistributedDaleAI')
def __init__(self, air, chipId):
DistributedCCharBaseAI.DistributedCCharBaseAI.__init__(self, air, TTLocalizer.Dale)
self.chipId = chipId
self.chip = air.doId2do.get(chipId)
self.fsm = ClassicFSM.ClassicFSM('DistributedDaleAI', [
State.State('Off', self.enterOff, self.exitOff, [
'Lonely']),
State.State('Lonely', self.enterLonely, self.exitLonely, [
'Chatty',
'FollowChip',
'Walk']),
State.State('Chatty', self.enterChatty, self.exitChatty, [
'Lonely',
'FollowChip',
'Walk']),
State.State('Walk', self.enterWalk, self.exitWalk, [
'Lonely',
'Chatty']),
State.State('FollowChip', self.enterFollowChip, self.exitFollowChip, [
'Lonely',
'Chatty',
'FollowChip'])], 'Off', 'Off')
self.fsm.enterInitialState()
self.handleHolidays()
def delete(self):
self.fsm.requestFinalState()
DistributedCCharBaseAI.DistributedCCharBaseAI.delete(self)
self.lonelyDoneEvent = None
self.lonely = None
self.chattyDoneEvent = None
self.chatty = None
self.walkDoneEvent = None
self.walk = None
def generate(self):
DistributedCCharBaseAI.DistributedCCharBaseAI.generate(self)
self.lonely = CharStateDatasAI.CharLonelyStateAI(None, self)
self.chatty = CharStateDatasAI.CharChattyStateAI(None, self)
self.followChip = CharStateDatasAI.CharFollowChipStateAI(None, self, self.chip)
def walkSpeed(self):
return ToontownGlobals.DaleSpeed
def start(self):
self.fsm.request('Lonely')
def _DistributedDaleAI__decideNextState(self, doneStatus):
if doneStatus['state'] == 'lonely' and doneStatus['status'] == 'done':
self.fsm.request('Walk')
elif doneStatus['state'] == 'chatty' and doneStatus['status'] == 'done':
self.fsm.request('Walk')
elif doneStatus['state'] == 'walk' and doneStatus['status'] == 'done':
if len(self.nearbyAvatars) > 0:
self.fsm.request('Chatty')
else:
self.fsm.request('Lonely')
def enterOff(self):
pass
def exitOff(self):
DistributedCCharBaseAI.DistributedCCharBaseAI.exitOff(self)
def enterLonely(self):
self.lonely.enter()
def exitLonely(self):
self.lonely.exit()
def _DistributedDaleAI__goForAWalk(self, task):
self.notify.debug('going for a walk')
self.fsm.request('Walk')
return Task.done
def enterChatty(self):
self.chatty.enter()
def exitChatty(self):
self.chatty.exit()
def enterWalk(self):
self.notify.debug('going for a walk')
self.walk.enter()
self.acceptOnce(self.walkDoneEvent, self._DistributedDaleAI__decideNextState)
def exitWalk(self):
self.ignore(self.walkDoneEvent)
self.walk.exit()
def enterFollowChip(self):
self.notify.debug('enterFollowChip')
walkState = self.chip.walk
destNode = walkState.getDestNode()
self.followChip.enter(destNode)
def exitFollowChip(self):
self.notify.debug('exitFollowChip')
self.followChip.exit()
def avatarEnterNextState(self):
if len(self.nearbyAvatars) == 1:
if False:
self.fsm.request('Chatty')
else:
self.notify.debug('avatarEnterNextState: in walk state')
else:
self.notify.debug('avatarEnterNextState: num avatars: ' + str(len(self.nearbyAvatars)))
def avatarExitNextState(self):
if len(self.nearbyAvatars) == 0:
if self.fsm.getCurrentState().getName() != 'Walk':
pass
def chipEnteringState(self, newState):
if newState == 'Walk':
self.doFollowChip()
def chipLeavingState(self, oldState):
pass
def doFollowChip(self):
walkState = self.chip.walk
destNode = walkState.getDestNode()
self.fsm.request('FollowChip')
def doChatty(self):
pass
def getChipId(self):
return self.chipId

View file

@ -1,112 +0,0 @@
from pandac.PandaModules import *
from direct.interval.IntervalGlobal import *
import DistributedCCharBase
from direct.directnotify import DirectNotifyGlobal
from direct.fsm import ClassicFSM, State
from direct.fsm import State
import CharStateDatas
import CCharChatter
from toontown.toonbase import ToontownGlobals
from toontown.toonbase import TTLocalizer
from toontown.hood import GSHood
class DistributedDonald(DistributedCCharBase.DistributedCCharBase):
notify = DirectNotifyGlobal.directNotify.newCategory('DistributedDonald')
def __init__(self, cr):
try:
self.DistributedDonald_initialized
except:
self.DistributedDonald_initialized = 1
DistributedCCharBase.DistributedCCharBase.__init__(self, cr, TTLocalizer.Donald, 'd')
self.fsm = ClassicFSM.ClassicFSM(self.getName(), [State.State('Off', self.enterOff, self.exitOff, ['Neutral']), State.State('Neutral', self.enterNeutral, self.exitNeutral, ['Walk']), State.State('Walk', self.enterWalk, self.exitWalk, ['Neutral'])], 'Off', 'Off')
self.fsm.enterInitialState()
self.handleHolidays()
def disable(self):
self.fsm.requestFinalState()
DistributedCCharBase.DistributedCCharBase.disable(self)
del self.neutralDoneEvent
del self.neutral
del self.walkDoneEvent
del self.walk
del self.walkStartTrack
del self.neutralStartTrack
self.fsm.requestFinalState()
def delete(self):
try:
self.DistributedDonald_deleted
except:
self.DistributedDonald_deleted = 1
del self.fsm
DistributedCCharBase.DistributedCCharBase.delete(self)
def generate(self):
DistributedCCharBase.DistributedCCharBase.generate(self, self.diffPath)
name = self.getName()
self.neutralDoneEvent = self.taskName(name + '-neutral-done')
self.neutral = CharStateDatas.CharNeutralState(self.neutralDoneEvent, self)
self.walkDoneEvent = self.taskName(name + '-walk-done')
if self.diffPath == None:
self.walk = CharStateDatas.CharWalkState(self.walkDoneEvent, self)
else:
self.walk = CharStateDatas.CharWalkState(self.walkDoneEvent, self, self.diffPath)
self.walkStartTrack = self.actorInterval('trans-back')
self.neutralStartTrack = self.actorInterval('trans')
self.fsm.request('Neutral')
return
def enterOff(self):
pass
def exitOff(self):
pass
def enterNeutral(self):
self.notify.debug('Neutral ' + self.getName() + '...')
self.neutral.enter(startTrack=self.neutralStartTrack, playRate=0.5)
self.acceptOnce(self.neutralDoneEvent, self.__decideNextState)
def exitNeutral(self):
self.ignore(self.neutralDoneEvent)
self.neutral.exit()
def enterWalk(self):
self.notify.debug('Walking ' + self.getName() + '...')
self.walk.enter(startTrack=self.walkStartTrack)
self.acceptOnce(self.walkDoneEvent, self.__decideNextState)
def exitWalk(self):
self.ignore(self.walkDoneEvent)
self.walk.exit()
def __decideNextState(self, doneStatus):
self.fsm.request('Neutral')
def setWalk(self, srcNode, destNode, timestamp):
if destNode and not destNode == srcNode:
self.walk.setWalk(srcNode, destNode, timestamp)
self.fsm.request('Walk')
def walkSpeed(self):
return ToontownGlobals.DonaldSpeed
def handleHolidays(self):
DistributedCCharBase.DistributedCCharBase.handleHolidays(self)
if hasattr(base.cr, 'newsManager') and base.cr.newsManager:
holidayIds = base.cr.newsManager.getHolidayIdList()
if ToontownGlobals.APRIL_FOOLS_COSTUMES in holidayIds and isinstance(self.cr.playGame.hood, GSHood.GSHood):
self.diffPath = TTLocalizer.Goofy
def getCCLocation(self):
if self.diffPath != None:
return 1
else:
return 0
return
def getCCChatter(self):
self.handleHolidays()
return self.CCChatter

View file

@ -1,190 +0,0 @@
# File: D (Python 2.4)
from otp.ai.AIBaseGlobal import *
import DistributedCCharBaseAI
from direct.directnotify import DirectNotifyGlobal
from direct.fsm import ClassicFSM, State
from direct.fsm import State
from direct.task import Task
import random
from toontown.toonbase import ToontownGlobals
from toontown.toonbase import TTLocalizer
import CharStateDatasAI
class DistributedDonaldAI(DistributedCCharBaseAI.DistributedCCharBaseAI):
notify = DirectNotifyGlobal.directNotify.newCategory('DistributedDonaldAI')
def __init__(self, air):
DistributedCCharBaseAI.DistributedCCharBaseAI.__init__(self, air, TTLocalizer.Donald)
self.fsm = ClassicFSM.ClassicFSM('DistributedDonaldAI', [
State.State('Off', self.enterOff, self.exitOff, [
'Lonely',
'TransitionToCostume',
'Walk']),
State.State('Lonely', self.enterLonely, self.exitLonely, [
'Chatty',
'Walk',
'TransitionToCostume']),
State.State('Chatty', self.enterChatty, self.exitChatty, [
'Lonely',
'Walk',
'TransitionToCostume']),
State.State('Walk', self.enterWalk, self.exitWalk, [
'Lonely',
'Chatty',
'TransitionToCostume']),
State.State('TransitionToCostume', self.enterTransitionToCostume, self.exitTransitionToCostume, [
'Off'])], 'Off', 'Off')
self.fsm.enterInitialState()
self.handleHolidays()
def delete(self):
self.fsm.requestFinalState()
DistributedCCharBaseAI.DistributedCCharBaseAI.delete(self)
self.lonelyDoneEvent = None
self.lonely = None
self.chattyDoneEvent = None
self.chatty = None
self.walkDoneEvent = None
self.walk = None
def generate(self):
DistributedCCharBaseAI.DistributedCCharBaseAI.generate(self)
name = self.getName()
self.lonelyDoneEvent = self.taskName(name + '-lonely-done')
self.lonely = CharStateDatasAI.CharLonelyStateAI(self.lonelyDoneEvent, self)
self.chattyDoneEvent = self.taskName(name + '-chatty-done')
self.chatty = CharStateDatasAI.CharChattyStateAI(self.chattyDoneEvent, self)
self.walkDoneEvent = self.taskName(name + '-walk-done')
if self.diffPath == None:
self.walk = CharStateDatasAI.CharWalkStateAI(self.walkDoneEvent, self)
else:
self.walk = CharStateDatasAI.CharWalkStateAI(self.walkDoneEvent, self, self.diffPath)
def walkSpeed(self):
return ToontownGlobals.DonaldSpeed
def start(self):
self.fsm.request('Lonely')
def _DistributedDonaldAI__decideNextState(self, doneStatus):
if self.transitionToCostume == 1:
curWalkNode = self.walk.getDestNode()
if simbase.air.holidayManager:
if ToontownGlobals.HALLOWEEN_COSTUMES in simbase.air.holidayManager.currentHolidays and simbase.air.holidayManager.currentHolidays[ToontownGlobals.HALLOWEEN_COSTUMES]:
simbase.air.holidayManager.currentHolidays[ToontownGlobals.HALLOWEEN_COSTUMES].triggerSwitch(curWalkNode, self)
self.fsm.request('TransitionToCostume')
elif ToontownGlobals.APRIL_FOOLS_COSTUMES in simbase.air.holidayManager.currentHolidays and simbase.air.holidayManager.currentHolidays[ToontownGlobals.APRIL_FOOLS_COSTUMES]:
simbase.air.holidayManager.currentHolidays[ToontownGlobals.APRIL_FOOLS_COSTUMES].triggerSwitch(curWalkNode, self)
self.fsm.request('TransitionToCostume')
else:
self.notify.warning('transitionToCostume == 1 but no costume holiday')
else:
self.notify.warning('transitionToCostume == 1 but no holiday Manager')
if doneStatus['state'] == 'lonely' and doneStatus['status'] == 'done':
self.fsm.request('Walk')
elif doneStatus['state'] == 'chatty' and doneStatus['status'] == 'done':
self.fsm.request('Walk')
elif doneStatus['state'] == 'walk' and doneStatus['status'] == 'done':
if len(self.nearbyAvatars) > 0:
self.fsm.request('Chatty')
else:
self.fsm.request('Lonely')
def enterOff(self):
pass
def exitOff(self):
DistributedCCharBaseAI.DistributedCCharBaseAI.exitOff(self)
def enterLonely(self):
self.lonely.enter()
self.acceptOnce(self.lonelyDoneEvent, self._DistributedDonaldAI__decideNextState)
def exitLonely(self):
self.ignore(self.lonelyDoneEvent)
self.lonely.exit()
def _DistributedDonaldAI__goForAWalk(self, task):
self.notify.debug('going for a walk')
self.fsm.request('Walk')
return Task.done
def enterChatty(self):
self.chatty.enter()
self.acceptOnce(self.chattyDoneEvent, self._DistributedDonaldAI__decideNextState)
def exitChatty(self):
self.ignore(self.chattyDoneEvent)
self.chatty.exit()
def enterWalk(self):
self.notify.debug('going for a walk')
self.walk.enter()
self.acceptOnce(self.walkDoneEvent, self._DistributedDonaldAI__decideNextState)
def exitWalk(self):
self.ignore(self.walkDoneEvent)
self.walk.exit()
def avatarEnterNextState(self):
if len(self.nearbyAvatars) == 1:
if self.fsm.getCurrentState().getName() != 'Walk':
self.fsm.request('Chatty')
else:
self.notify.debug('avatarEnterNextState: in walk state')
else:
self.notify.debug('avatarEnterNextState: num avatars: ' + str(len(self.nearbyAvatars)))
def avatarExitNextState(self):
if len(self.nearbyAvatars) == 0:
if self.fsm.getCurrentState().getName() != 'Walk':
self.fsm.request('Lonely')
def handleHolidays(self):
DistributedCCharBaseAI.DistributedCCharBaseAI.handleHolidays(self)
if hasattr(simbase.air, 'holidayManager'):
if ToontownGlobals.APRIL_FOOLS_COSTUMES in simbase.air.holidayManager.currentHolidays:
if simbase.air.holidayManager.currentHolidays[ToontownGlobals.APRIL_FOOLS_COSTUMES] != None and simbase.air.holidayManager.currentHolidays[ToontownGlobals.APRIL_FOOLS_COSTUMES].getRunningState():
self.diffPath = TTLocalizer.Goofy
def getCCLocation(self):
if self.diffPath != None:
return 1
else:
return 0
def enterTransitionToCostume(self):
pass
def exitTransitionToCostume(self):
pass

View file

@ -1,68 +0,0 @@
from pandac.PandaModules import *
from direct.interval.IntervalGlobal import *
import DistributedCCharBase
from direct.directnotify import DirectNotifyGlobal
from direct.fsm import ClassicFSM, State
from direct.fsm import State
from toontown.toonbase import ToontownGlobals
import CharStateDatas
from direct.fsm import StateData
from direct.task import Task
from toontown.toonbase import TTLocalizer
class DistributedDonaldDock(DistributedCCharBase.DistributedCCharBase):
notify = DirectNotifyGlobal.directNotify.newCategory('DistributedDonaldDock')
def __init__(self, cr):
try:
self.DistributedDonaldDock_initialized
except:
self.DistributedDonaldDock_initialized = 1
DistributedCCharBase.DistributedCCharBase.__init__(self, cr, TTLocalizer.DonaldDock, 'dw')
self.fsm = ClassicFSM.ClassicFSM('DistributedDonaldDock', [State.State('Off', self.enterOff, self.exitOff, ['Neutral']), State.State('Neutral', self.enterNeutral, self.exitNeutral, ['Off'])], 'Off', 'Off')
self.fsm.enterInitialState()
self.nametag.setText(TTLocalizer.Donald)
self.handleHolidays()
def disable(self):
self.fsm.requestFinalState()
DistributedCCharBase.DistributedCCharBase.disable(self)
taskMgr.remove('enterNeutralTask')
del self.neutralDoneEvent
del self.neutral
self.fsm.requestFinalState()
def delete(self):
try:
self.DistributedDonaldDock_deleted
except:
self.DistributedDonaldDock_deleted = 1
del self.fsm
DistributedCCharBase.DistributedCCharBase.delete(self)
def generate(self):
DistributedCCharBase.DistributedCCharBase.generate(self)
boat = base.cr.playGame.hood.loader.boat
self.setPos(0, -1, 3.95)
self.reparentTo(boat)
self.neutralDoneEvent = self.taskName('DonaldDock-neutral-done')
self.neutral = CharStateDatas.CharNeutralState(self.neutralDoneEvent, self)
self.fsm.request('Neutral')
def enterOff(self):
pass
def exitOff(self):
pass
def enterNeutral(self):
self.notify.debug('Neutral ' + self.getName() + '...')
self.neutral.enter()
self.acceptOnce(self.neutralDoneEvent, self.__decideNextState)
def exitNeutral(self):
self.ignore(self.neutralDoneEvent)
self.neutral.exit()
def __decideNextState(self, doneStatus):
self.fsm.request('Neutral')

View file

@ -1,119 +0,0 @@
# File: D (Python 2.4)
from otp.ai.AIBaseGlobal import *
import DistributedCCharBaseAI
from direct.directnotify import DirectNotifyGlobal
from direct.fsm import ClassicFSM, State
from direct.fsm import State
from direct.task import Task
import random
import CharStateDatasAI
from toontown.toonbase import ToontownGlobals
from toontown.toonbase import TTLocalizer
class DistributedDonaldDockAI(DistributedCCharBaseAI.DistributedCCharBaseAI):
notify = DirectNotifyGlobal.directNotify.newCategory('DistributedDonaldDockAI')
def __init__(self, air):
DistributedCCharBaseAI.DistributedCCharBaseAI.__init__(self, air, TTLocalizer.DonaldDock)
self.fsm = ClassicFSM.ClassicFSM('DistributedDonaldDockAI', [
State.State('Off', self.enterOff, self.exitOff, [
'Lonely',
'TransitionToCostume']),
State.State('Lonely', self.enterLonely, self.exitLonely, [
'Chatty',
'TransitionToCostume']),
State.State('Chatty', self.enterChatty, self.exitChatty, [
'Lonely',
'TransitionToCostume']),
State.State('TransitionToCostume', self.enterTransitionToCostume, self.exitTransitionToCostume, [
'Off'])], 'Off', 'Off')
self.fsm.enterInitialState()
self.handleHolidays()
def delete(self):
self.fsm.requestFinalState()
DistributedCCharBaseAI.DistributedCCharBaseAI.delete(self)
self.lonelyDoneEvent = None
self.lonely = None
self.chattyDoneEvent = None
self.chatty = None
def generate(self):
DistributedCCharBaseAI.DistributedCCharBaseAI.generate(self)
self.lonelyDoneEvent = self.taskName('DonaldDock-lonely-done')
self.lonely = CharStateDatasAI.CharLonelyStateAI(self.lonelyDoneEvent, self)
self.chattyDoneEvent = self.taskName('DonaldDock-chatty-done')
self.chatty = CharStateDatasAI.CharChattyStateAI(self.chattyDoneEvent, self)
def start(self):
self.fsm.request('Lonely')
def _DistributedDonaldDockAI__decideNextState(self, doneStatus):
if doneStatus['state'] == 'lonely' and doneStatus['status'] == 'done':
if len(self.nearbyAvatars) > 0:
self.fsm.request('Chatty')
else:
self.fsm.request('Lonely')
elif doneStatus['state'] == 'chatty' and doneStatus['status'] == 'done':
self.fsm.request('Lonely')
def enterOff(self):
pass
def exitOff(self):
DistributedCCharBaseAI.DistributedCCharBaseAI.exitOff(self)
def enterLonely(self):
self.notify.debug('Entering Lonely')
self.lonely.enter()
self.acceptOnce(self.lonelyDoneEvent, self._DistributedDonaldDockAI__decideNextState)
def exitLonely(self):
self.notify.debug('Exiting Lonely')
self.ignore(self.lonelyDoneEvent)
self.lonely.exit()
def enterChatty(self):
self.notify.debug('Entering Chatty')
self.chatty.enter()
self.acceptOnce(self.chattyDoneEvent, self._DistributedDonaldDockAI__decideNextState)
def exitChatty(self):
self.notify.debug('Exiting Chatty')
self.ignore(self.chattyDoneEvent)
self.chatty.exit()
def avatarEnterNextState(self):
if len(self.nearbyAvatars) == 1:
self.fsm.request('Chatty')
else:
self.notify.debug('avatarEnterNextState: num avatars: ' + str(len(self.nearbyAvatars)))
def avatarExitNextState(self):
if len(self.nearbyAvatars) == 0:
self.fsm.request('Lonely')
def enterTransitionToCostume(self):
pass
def exitTransitionToCostume(self):
pass

View file

@ -1,64 +0,0 @@
from pandac.PandaModules import *
from direct.interval.IntervalGlobal import *
import DistributedCCharBase
import DistributedDonald
from direct.directnotify import DirectNotifyGlobal
from direct.fsm import ClassicFSM, State
from direct.fsm import State
import CharStateDatas
import CCharChatter
from toontown.toonbase import ToontownGlobals
from toontown.toonbase import TTLocalizer
from toontown.hood import GSHood
class DistributedFrankenDonald(DistributedDonald.DistributedDonald):
notify = DirectNotifyGlobal.directNotify.newCategory('DistributedFrankenDonald')
def __init__(self, cr):
try:
self.DistributedFrankenDonald_initialized
except:
self.DistributedFrankenDonald_initialized = 1
DistributedCCharBase.DistributedCCharBase.__init__(self, cr, TTLocalizer.FrankenDonald, 'fd')
self.fsm = ClassicFSM.ClassicFSM(self.getName(), [State.State('Off', self.enterOff, self.exitOff, ['Neutral']), State.State('Neutral', self.enterNeutral, self.exitNeutral, ['Walk']), State.State('Walk', self.enterWalk, self.exitWalk, ['Neutral'])], 'Off', 'Off')
self.fsm.enterInitialState()
self.nametag.setText(TTLocalizer.Donald)
self.handleHolidays()
def disable(self):
self.fsm.requestFinalState()
DistributedCCharBase.DistributedCCharBase.disable(self)
del self.neutralDoneEvent
del self.neutral
del self.walkDoneEvent
del self.walk
self.fsm.requestFinalState()
def generate(self):
DistributedCCharBase.DistributedCCharBase.generate(self, self.diffPath)
name = self.getName()
self.neutralDoneEvent = self.taskName(name + '-neutral-done')
self.neutral = CharStateDatas.CharNeutralState(self.neutralDoneEvent, self)
self.walkDoneEvent = self.taskName(name + '-walk-done')
if self.diffPath == None:
self.walk = CharStateDatas.CharWalkState(self.walkDoneEvent, self)
else:
self.walk = CharStateDatas.CharWalkState(self.walkDoneEvent, self, self.diffPath)
self.fsm.request('Neutral')
return
def enterNeutral(self):
self.notify.debug('Neutral ' + self.getName() + '...')
self.neutral.enter()
self.acceptOnce(self.neutralDoneEvent, self.__decideNextState)
def enterWalk(self):
self.notify.debug('Walking ' + self.getName() + '...')
self.walk.enter()
self.acceptOnce(self.walkDoneEvent, self.__decideNextState)
def __decideNextState(self, doneStatus):
self.fsm.request('Neutral')
def walkSpeed(self):
return ToontownGlobals.FrankenDonaldSpeed

View file

@ -1,6 +0,0 @@
from direct.directnotify import DirectNotifyGlobal
from toontown.classicchars.DistributedDonaldAI import DistributedDonaldAI
class DistributedFrankenDonaldAI(DistributedDonaldAI):
notify = DirectNotifyGlobal.directNotify.newCategory("DistributedFrankenDonaldAI")

View file

@ -1,79 +0,0 @@
from pandac.PandaModules import *
import DistributedCCharBase
from direct.directnotify import DirectNotifyGlobal
from direct.fsm import ClassicFSM, State
from direct.fsm import State
import CharStateDatas
from toontown.toonbase import ToontownGlobals
from toontown.toonbase import TTLocalizer
class DistributedGoofy(DistributedCCharBase.DistributedCCharBase):
notify = DirectNotifyGlobal.directNotify.newCategory('DistributedGoofy')
def __init__(self, cr):
try:
self.DistributedGoofy_initialized
except:
self.DistributedGoofy_initialized = 1
DistributedCCharBase.DistributedCCharBase.__init__(self, cr, TTLocalizer.Goofy, 'g')
self.fsm = ClassicFSM.ClassicFSM(self.getName(), [State.State('Off', self.enterOff, self.exitOff, ['Neutral']), State.State('Neutral', self.enterNeutral, self.exitNeutral, ['Walk']), State.State('Walk', self.enterWalk, self.exitWalk, ['Neutral'])], 'Off', 'Off')
self.fsm.enterInitialState()
def disable(self):
self.fsm.requestFinalState()
DistributedCCharBase.DistributedCCharBase.disable(self)
del self.neutralDoneEvent
del self.neutral
del self.walkDoneEvent
del self.walk
self.fsm.requestFinalState()
def delete(self):
try:
self.DistributedGoofy_deleted
except:
del self.fsm
self.DistributedGoofy_deleted = 1
DistributedCCharBase.DistributedCCharBase.delete(self)
def generate(self):
DistributedCCharBase.DistributedCCharBase.generate(self)
name = self.getName()
self.neutralDoneEvent = self.taskName(name + '-neutral-done')
self.neutral = CharStateDatas.CharNeutralState(self.neutralDoneEvent, self)
self.walkDoneEvent = self.taskName(name + '-walk-done')
self.walk = CharStateDatas.CharWalkState(self.walkDoneEvent, self)
self.fsm.request('Neutral')
def enterOff(self):
pass
def exitOff(self):
pass
def enterNeutral(self):
self.neutral.enter()
self.acceptOnce(self.neutralDoneEvent, self.__decideNextState)
def exitNeutral(self):
self.ignore(self.neutralDoneEvent)
self.neutral.exit()
def enterWalk(self):
self.walk.enter()
self.acceptOnce(self.walkDoneEvent, self.__decideNextState)
def exitWalk(self):
self.ignore(self.walkDoneEvent)
self.walk.exit()
def __decideNextState(self, doneStatus):
self.fsm.request('Neutral')
def setWalk(self, srcNode, destNode, timestamp):
if destNode and not destNode == srcNode:
self.walk.setWalk(srcNode, destNode, timestamp)
self.fsm.request('Walk')
def walkSpeed(self):
return ToontownGlobals.GoofySpeed

View file

@ -1,6 +0,0 @@
from direct.directnotify import DirectNotifyGlobal
from toontown.classicchars.DistributedCCharBaseAI import DistributedCCharBaseAI
class DistributedGoofyAI(DistributedCCharBaseAI):
notify = DirectNotifyGlobal.directNotify.newCategory("DistributedGoofyAI")

View file

@ -1,100 +0,0 @@
from pandac.PandaModules import *
import DistributedCCharBase
from direct.directnotify import DirectNotifyGlobal
from direct.fsm import ClassicFSM, State
from direct.fsm import State
import CharStateDatas
from toontown.toonbase import ToontownGlobals
from toontown.toonbase import TTLocalizer
from toontown.hood import DLHood
class DistributedGoofySpeedway(DistributedCCharBase.DistributedCCharBase):
notify = DirectNotifyGlobal.directNotify.newCategory('DistributedGoofySpeedway')
def __init__(self, cr):
try:
self.DistributedGoofySpeedway_initialized
except:
self.DistributedGoofySpeedway_initialized = 1
DistributedCCharBase.DistributedCCharBase.__init__(self, cr, TTLocalizer.Goofy, 'g')
self.fsm = ClassicFSM.ClassicFSM(self.getName(), [State.State('Off', self.enterOff, self.exitOff, ['Neutral']), State.State('Neutral', self.enterNeutral, self.exitNeutral, ['Walk']), State.State('Walk', self.enterWalk, self.exitWalk, ['Neutral'])], 'Off', 'Off')
self.fsm.enterInitialState()
self.handleHolidays()
def disable(self):
self.fsm.requestFinalState()
DistributedCCharBase.DistributedCCharBase.disable(self)
del self.neutralDoneEvent
del self.neutral
del self.walkDoneEvent
del self.walk
self.fsm.requestFinalState()
def delete(self):
try:
self.DistributedGoofySpeedway_deleted
except:
del self.fsm
self.DistributedGoofySpeedway_deleted = 1
DistributedCCharBase.DistributedCCharBase.delete(self)
def generate(self):
DistributedCCharBase.DistributedCCharBase.generate(self, self.diffPath)
name = self.getName()
self.neutralDoneEvent = self.taskName(name + '-neutral-done')
self.neutral = CharStateDatas.CharNeutralState(self.neutralDoneEvent, self)
self.walkDoneEvent = self.taskName(name + '-walk-done')
if self.diffPath == None:
self.walk = CharStateDatas.CharWalkState(self.walkDoneEvent, self)
else:
self.walk = CharStateDatas.CharWalkState(self.walkDoneEvent, self, self.diffPath)
self.fsm.request('Neutral')
return
def enterOff(self):
pass
def exitOff(self):
pass
def enterNeutral(self):
self.neutral.enter()
self.acceptOnce(self.neutralDoneEvent, self.__decideNextState)
def exitNeutral(self):
self.ignore(self.neutralDoneEvent)
self.neutral.exit()
def enterWalk(self):
self.walk.enter()
self.acceptOnce(self.walkDoneEvent, self.__decideNextState)
def exitWalk(self):
self.ignore(self.walkDoneEvent)
self.walk.exit()
def __decideNextState(self, doneStatus):
self.fsm.request('Neutral')
def setWalk(self, srcNode, destNode, timestamp):
if destNode and not destNode == srcNode:
self.walk.setWalk(srcNode, destNode, timestamp)
self.fsm.request('Walk')
def walkSpeed(self):
return ToontownGlobals.GoofySpeed
def handleHolidays(self):
DistributedCCharBase.DistributedCCharBase.handleHolidays(self)
if hasattr(base.cr, 'newsManager') and base.cr.newsManager:
holidayIds = base.cr.newsManager.getHolidayIdList()
if ToontownGlobals.APRIL_FOOLS_COSTUMES in holidayIds and isinstance(self.cr.playGame.hood, DLHood.DLHood):
self.diffPath = TTLocalizer.Donald
def getCCLocation(self):
if self.diffPath == None:
return 1
else:
return 0
return

View file

@ -1,190 +0,0 @@
# File: D (Python 2.4)
from otp.ai.AIBaseGlobal import *
import DistributedCCharBaseAI
from direct.directnotify import DirectNotifyGlobal
from direct.fsm import ClassicFSM, State
from direct.fsm import State
from direct.task import Task
import random
from toontown.toonbase import ToontownGlobals
from toontown.toonbase import TTLocalizer
import CharStateDatasAI
class DistributedGoofySpeedwayAI(DistributedCCharBaseAI.DistributedCCharBaseAI):
notify = DirectNotifyGlobal.directNotify.newCategory('DistributedGoofySpeedwayAI')
def __init__(self, air):
DistributedCCharBaseAI.DistributedCCharBaseAI.__init__(self, air, TTLocalizer.Goofy)
self.fsm = ClassicFSM.ClassicFSM('DistributedGoofySpeedwayAI', [
State.State('Off', self.enterOff, self.exitOff, [
'Lonely',
'TransitionToCostume',
'Walk']),
State.State('Lonely', self.enterLonely, self.exitLonely, [
'Chatty',
'Walk',
'TransitionToCostume']),
State.State('Chatty', self.enterChatty, self.exitChatty, [
'Lonely',
'Walk',
'TransitionToCostume']),
State.State('Walk', self.enterWalk, self.exitWalk, [
'Lonely',
'Chatty',
'TransitionToCostume']),
State.State('TransitionToCostume', self.enterTransitionToCostume, self.exitTransitionToCostume, [
'Off'])], 'Off', 'Off')
self.fsm.enterInitialState()
self.handleHolidays()
def delete(self):
self.fsm.requestFinalState()
DistributedCCharBaseAI.DistributedCCharBaseAI.delete(self)
self.lonelyDoneEvent = None
self.lonely = None
self.chattyDoneEvent = None
self.chatty = None
self.walkDoneEvent = None
self.walk = None
def generate(self):
DistributedCCharBaseAI.DistributedCCharBaseAI.generate(self)
name = self.getName()
self.lonelyDoneEvent = self.taskName(name + '-lonely-done')
self.lonely = CharStateDatasAI.CharLonelyStateAI(self.lonelyDoneEvent, self)
self.chattyDoneEvent = self.taskName(name + '-chatty-done')
self.chatty = CharStateDatasAI.CharChattyStateAI(self.chattyDoneEvent, self)
self.walkDoneEvent = self.taskName(name + '-walk-done')
if self.diffPath == None:
self.walk = CharStateDatasAI.CharWalkStateAI(self.walkDoneEvent, self)
else:
self.walk = CharStateDatasAI.CharWalkStateAI(self.walkDoneEvent, self, self.diffPath)
def walkSpeed(self):
return ToontownGlobals.GoofySpeed
def start(self):
self.fsm.request('Lonely')
def _DistributedGoofySpeedwayAI__decideNextState(self, doneStatus):
if self.transitionToCostume == 1:
curWalkNode = self.walk.getDestNode()
if simbase.air.holidayManager:
if ToontownGlobals.HALLOWEEN_COSTUMES in simbase.air.holidayManager.currentHolidays and simbase.air.holidayManager.currentHolidays[ToontownGlobals.HALLOWEEN_COSTUMES]:
simbase.air.holidayManager.currentHolidays[ToontownGlobals.HALLOWEEN_COSTUMES].triggerSwitch(curWalkNode, self)
self.fsm.request('TransitionToCostume')
elif ToontownGlobals.APRIL_FOOLS_COSTUMES in simbase.air.holidayManager.currentHolidays and simbase.air.holidayManager.currentHolidays[ToontownGlobals.APRIL_FOOLS_COSTUMES]:
simbase.air.holidayManager.currentHolidays[ToontownGlobals.APRIL_FOOLS_COSTUMES].triggerSwitch(curWalkNode, self)
self.fsm.request('TransitionToCostume')
else:
self.notify.warning('transitionToCostume == 1 but no costume holiday')
else:
self.notify.warning('transitionToCostume == 1 but no holiday Manager')
if doneStatus['state'] == 'lonely' and doneStatus['status'] == 'done':
self.fsm.request('Walk')
elif doneStatus['state'] == 'chatty' and doneStatus['status'] == 'done':
self.fsm.request('Walk')
elif doneStatus['state'] == 'walk' and doneStatus['status'] == 'done':
if len(self.nearbyAvatars) > 0:
self.fsm.request('Chatty')
else:
self.fsm.request('Lonely')
def enterOff(self):
pass
def exitOff(self):
DistributedCCharBaseAI.DistributedCCharBaseAI.exitOff(self)
def enterLonely(self):
self.lonely.enter()
self.acceptOnce(self.lonelyDoneEvent, self._DistributedGoofySpeedwayAI__decideNextState)
def exitLonely(self):
self.ignore(self.lonelyDoneEvent)
self.lonely.exit()
def _DistributedGoofySpeedwayAI__goForAWalk(self, task):
self.notify.debug('going for a walk')
self.fsm.request('Walk')
return Task.done
def enterChatty(self):
self.chatty.enter()
self.acceptOnce(self.chattyDoneEvent, self._DistributedGoofySpeedwayAI__decideNextState)
def exitChatty(self):
self.ignore(self.chattyDoneEvent)
self.chatty.exit()
def enterWalk(self):
self.notify.debug('going for a walk')
self.walk.enter()
self.acceptOnce(self.walkDoneEvent, self._DistributedGoofySpeedwayAI__decideNextState)
def exitWalk(self):
self.ignore(self.walkDoneEvent)
self.walk.exit()
def avatarEnterNextState(self):
if len(self.nearbyAvatars) == 1:
if self.fsm.getCurrentState().getName() != 'Walk':
self.fsm.request('Chatty')
else:
self.notify.debug('avatarEnterNextState: in walk state')
else:
self.notify.debug('avatarEnterNextState: num avatars: ' + str(len(self.nearbyAvatars)))
def avatarExitNextState(self):
if len(self.nearbyAvatars) == 0:
if self.fsm.getCurrentState().getName() != 'Walk':
self.fsm.request('Lonely')
def handleHolidays(self):
DistributedCCharBaseAI.DistributedCCharBaseAI.handleHolidays(self)
if hasattr(simbase.air, 'holidayManager'):
if ToontownGlobals.APRIL_FOOLS_COSTUMES in simbase.air.holidayManager.currentHolidays:
if simbase.air.holidayManager.currentHolidays[ToontownGlobals.APRIL_FOOLS_COSTUMES] != None and simbase.air.holidayManager.currentHolidays[ToontownGlobals.APRIL_FOOLS_COSTUMES].getRunningState():
self.diffPath = TTLocalizer.Donald
def getCCLocation(self):
if self.diffPath == None:
return 1
else:
return 0
def enterTransitionToCostume(self):
pass
def exitTransitionToCostume(self):
pass

View file

@ -1,23 +0,0 @@
from direct.showbase.ShowBaseGlobal import *
import DistributedCCharBase
from direct.directnotify import DirectNotifyGlobal
from direct.fsm import ClassicFSM
from direct.fsm import State
import CharStateDatas
from toontown.toonbase import ToontownGlobals
from toontown.toonbase import TTLocalizer
import DistributedDale
class DistributedJailbirdDale(DistributedDale.DistributedDale):
notify = DirectNotifyGlobal.directNotify.newCategory('DistributedJailbirdDale')
def __init__(self, cr):
try:
self.DistributedDale_initialized
except:
self.DistributedDale_initialized = 1
DistributedCCharBase.DistributedCCharBase.__init__(self, cr, TTLocalizer.JailbirdDale, 'jda')
self.fsm = ClassicFSM.ClassicFSM(self.getName(), [State.State('Off', self.enterOff, self.exitOff, ['Neutral']), State.State('Neutral', self.enterNeutral, self.exitNeutral, ['Walk']), State.State('Walk', self.enterWalk, self.exitWalk, ['Neutral'])], 'Off', 'Off')
self.fsm.enterInitialState()
self.handleHolidays()
self.nametag.setText(TTLocalizer.Dale)

View file

@ -1,6 +0,0 @@
from direct.directnotify import DirectNotifyGlobal
from toontown.classicchars.DistributedDaleAI import DistributedDaleAI
class DistributedJailbirdDaleAI(DistributedDaleAI):
notify = DirectNotifyGlobal.directNotify.newCategory("DistributedJailbirdDaleAI")

View file

@ -1,96 +0,0 @@
from pandac.PandaModules import *
import DistributedCCharBase
from direct.directnotify import DirectNotifyGlobal
from direct.fsm import ClassicFSM, State
from direct.fsm import State
import CharStateDatas
from toontown.toonbase import ToontownGlobals
from toontown.toonbase import TTLocalizer
from toontown.hood import DGHood
class DistributedMickey(DistributedCCharBase.DistributedCCharBase):
notify = DirectNotifyGlobal.directNotify.newCategory('DistributedMickey')
def __init__(self, cr):
try:
self.DistributedMickey_initialized
except:
self.DistributedMickey_initialized = 1
DistributedCCharBase.DistributedCCharBase.__init__(self, cr, TTLocalizer.Mickey, 'mk')
self.fsm = ClassicFSM.ClassicFSM(self.getName(), [State.State('Off', self.enterOff, self.exitOff, ['Neutral']), State.State('Neutral', self.enterNeutral, self.exitNeutral, ['Walk']), State.State('Walk', self.enterWalk, self.exitWalk, ['Neutral'])], 'Off', 'Off')
self.fsm.enterInitialState()
self.handleHolidays()
def disable(self):
self.fsm.requestFinalState()
DistributedCCharBase.DistributedCCharBase.disable(self)
self.neutralDoneEvent = None
self.neutral = None
self.walkDoneEvent = None
self.walk = None
self.fsm.requestFinalState()
self.notify.debug('Mickey Disbled')
return
def delete(self):
try:
self.DistributedMickey_deleted
except:
self.DistributedMickey_deleted = 1
del self.fsm
DistributedCCharBase.DistributedCCharBase.delete(self)
self.notify.debug('Mickey Deleted')
def generate(self):
DistributedCCharBase.DistributedCCharBase.generate(self, self.diffPath)
name = self.getName()
self.neutralDoneEvent = self.taskName(name + '-neutral-done')
self.neutral = CharStateDatas.CharNeutralState(self.neutralDoneEvent, self)
self.walkDoneEvent = self.taskName(name + '-walk-done')
if self.diffPath == None:
self.walk = CharStateDatas.CharWalkState(self.walkDoneEvent, self)
else:
self.walk = CharStateDatas.CharWalkState(self.walkDoneEvent, self, self.diffPath)
self.fsm.request('Neutral')
return
def enterOff(self):
pass
def exitOff(self):
pass
def enterNeutral(self):
self.neutral.enter()
self.acceptOnce(self.neutralDoneEvent, self.__decideNextState)
def exitNeutral(self):
self.ignore(self.neutralDoneEvent)
self.neutral.exit()
def enterWalk(self):
self.walk.enter()
self.acceptOnce(self.walkDoneEvent, self.__decideNextState)
def exitWalk(self):
self.ignore(self.walkDoneEvent)
self.walk.exit()
def __decideNextState(self, doneStatus):
self.fsm.request('Neutral')
def setWalk(self, srcNode, destNode, timestamp):
if destNode and not destNode == srcNode:
self.walk.setWalk(srcNode, destNode, timestamp)
self.fsm.request('Walk')
def walkSpeed(self):
return ToontownGlobals.MickeySpeed
def handleHolidays(self):
DistributedCCharBase.DistributedCCharBase.handleHolidays(self)
if hasattr(base.cr, 'newsManager') and base.cr.newsManager:
holidayIds = base.cr.newsManager.getHolidayIdList()
if ToontownGlobals.APRIL_FOOLS_COSTUMES in holidayIds and isinstance(self.cr.playGame.hood, DGHood.DGHood):
self.diffPath = TTLocalizer.Daisy

View file

@ -1,183 +0,0 @@
# File: D (Python 2.4)
from otp.ai.AIBaseGlobal import *
import DistributedCCharBaseAI
from direct.directnotify import DirectNotifyGlobal
from direct.fsm import ClassicFSM, State
from direct.fsm import State
from direct.task import Task
import random
from toontown.toonbase import ToontownGlobals
import CharStateDatasAI
from toontown.toonbase import TTLocalizer
class DistributedMickeyAI(DistributedCCharBaseAI.DistributedCCharBaseAI):
notify = DirectNotifyGlobal.directNotify.newCategory('DistributedMickeyAI')
def __init__(self, air):
DistributedCCharBaseAI.DistributedCCharBaseAI.__init__(self, air, TTLocalizer.Mickey)
self.fsm = ClassicFSM.ClassicFSM('DistributedMickeyAI', [
State.State('Off', self.enterOff, self.exitOff, [
'Lonely',
'TransitionToCostume',
'Walk']),
State.State('Lonely', self.enterLonely, self.exitLonely, [
'Chatty',
'Walk',
'TransitionToCostume']),
State.State('Chatty', self.enterChatty, self.exitChatty, [
'Lonely',
'Walk',
'TransitionToCostume']),
State.State('Walk', self.enterWalk, self.exitWalk, [
'Lonely',
'Chatty',
'TransitionToCostume']),
State.State('TransitionToCostume', self.enterTransitionToCostume, self.exitTransitionToCostume, [
'Off'])], 'Off', 'Off')
self.fsm.enterInitialState()
self.handleHolidays()
def delete(self):
self.fsm.requestFinalState()
del self.fsm
DistributedCCharBaseAI.DistributedCCharBaseAI.delete(self)
self.lonelyDoneEvent = None
self.lonely = None
self.chattyDoneEvent = None
self.chatty = None
self.walkDoneEvent = None
self.walk = None
self.notify.debug('MickeyAI Deleted')
def generate(self):
DistributedCCharBaseAI.DistributedCCharBaseAI.generate(self)
name = self.getName()
self.lonelyDoneEvent = self.taskName(name + '-lonely-done')
self.lonely = CharStateDatasAI.CharLonelyStateAI(self.lonelyDoneEvent, self)
self.chattyDoneEvent = self.taskName(name + '-chatty-done')
self.chatty = CharStateDatasAI.CharChattyStateAI(self.chattyDoneEvent, self)
self.walkDoneEvent = self.taskName(name + '-walk-done')
if self.diffPath == None:
self.walk = CharStateDatasAI.CharWalkStateAI(self.walkDoneEvent, self)
else:
self.walk = CharStateDatasAI.CharWalkStateAI(self.walkDoneEvent, self, self.diffPath)
def walkSpeed(self):
return ToontownGlobals.MickeySpeed
def start(self):
self.fsm.request('Lonely')
def _DistributedMickeyAI__decideNextState(self, doneStatus):
if self.transitionToCostume == 1:
curWalkNode = self.walk.getDestNode()
if simbase.air.holidayManager:
if ToontownGlobals.HALLOWEEN_COSTUMES in simbase.air.holidayManager.currentHolidays and simbase.air.holidayManager.currentHolidays[ToontownGlobals.HALLOWEEN_COSTUMES]:
simbase.air.holidayManager.currentHolidays[ToontownGlobals.HALLOWEEN_COSTUMES].triggerSwitch(curWalkNode, self)
self.fsm.request('TransitionToCostume')
elif ToontownGlobals.APRIL_FOOLS_COSTUMES in simbase.air.holidayManager.currentHolidays and simbase.air.holidayManager.currentHolidays[ToontownGlobals.APRIL_FOOLS_COSTUMES]:
simbase.air.holidayManager.currentHolidays[ToontownGlobals.APRIL_FOOLS_COSTUMES].triggerSwitch(curWalkNode, self)
self.fsm.request('TransitionToCostume')
else:
self.notify.warning('transitionToCostume == 1 but no costume holiday')
else:
self.notify.warning('transitionToCostume == 1 but no holiday Manager')
if doneStatus['state'] == 'lonely' and doneStatus['status'] == 'done':
self.fsm.request('Walk')
elif doneStatus['state'] == 'chatty' and doneStatus['status'] == 'done':
self.fsm.request('Walk')
elif doneStatus['state'] == 'walk' and doneStatus['status'] == 'done':
if len(self.nearbyAvatars) > 0:
self.fsm.request('Chatty')
else:
self.fsm.request('Lonely')
def enterOff(self):
pass
def exitOff(self):
DistributedCCharBaseAI.DistributedCCharBaseAI.exitOff(self)
def enterLonely(self):
self.lonely.enter()
self.acceptOnce(self.lonelyDoneEvent, self._DistributedMickeyAI__decideNextState)
def exitLonely(self):
self.ignore(self.lonelyDoneEvent)
self.lonely.exit()
def _DistributedMickeyAI__goForAWalk(self, task):
self.notify.debug('going for a walk')
self.fsm.request('Walk')
return Task.done
def enterChatty(self):
self.chatty.enter()
self.acceptOnce(self.chattyDoneEvent, self._DistributedMickeyAI__decideNextState)
def exitChatty(self):
self.ignore(self.chattyDoneEvent)
self.chatty.exit()
def enterWalk(self):
self.notify.debug('going for a walk')
self.walk.enter()
self.acceptOnce(self.walkDoneEvent, self._DistributedMickeyAI__decideNextState)
def exitWalk(self):
self.ignore(self.walkDoneEvent)
self.walk.exit()
def avatarEnterNextState(self):
if len(self.nearbyAvatars) == 1:
if self.fsm.getCurrentState().getName() != 'Walk':
self.fsm.request('Chatty')
else:
self.notify.debug('avatarEnterNextState: in walk state')
else:
self.notify.debug('avatarEnterNextState: num avatars: ' + str(len(self.nearbyAvatars)))
def avatarExitNextState(self):
if len(self.nearbyAvatars) == 0:
if self.fsm.getCurrentState().getName() != 'Walk':
self.fsm.request('Lonely')
def enterTransitionToCostume(self):
pass
def exitTransitionToCostume(self):
pass
def handleHolidays(self):
DistributedCCharBaseAI.DistributedCCharBaseAI.handleHolidays(self)
if hasattr(simbase.air, 'holidayManager'):
if ToontownGlobals.APRIL_FOOLS_COSTUMES in simbase.air.holidayManager.currentHolidays and simbase.air.holidayManager.currentHolidays[ToontownGlobals.APRIL_FOOLS_COSTUMES] != None and simbase.air.holidayManager.currentHolidays[ToontownGlobals.APRIL_FOOLS_COSTUMES].getRunningState():
self.diffPath = TTLocalizer.Daisy

View file

@ -1,93 +0,0 @@
from pandac.PandaModules import *
import DistributedCCharBase
from direct.directnotify import DirectNotifyGlobal
from direct.fsm import ClassicFSM, State
from direct.fsm import State
import CharStateDatas
from toontown.toonbase import ToontownGlobals
from toontown.toonbase import TTLocalizer
from toontown.hood import BRHood
class DistributedMinnie(DistributedCCharBase.DistributedCCharBase):
notify = DirectNotifyGlobal.directNotify.newCategory('DistributedMinnie')
def __init__(self, cr):
try:
self.DistributedMinnie_initialized
except:
self.DistributedMinnie_initialized = 1
DistributedCCharBase.DistributedCCharBase.__init__(self, cr, TTLocalizer.Minnie, 'mn')
self.fsm = ClassicFSM.ClassicFSM(self.getName(), [State.State('Off', self.enterOff, self.exitOff, ['Neutral']), State.State('Neutral', self.enterNeutral, self.exitNeutral, ['Walk']), State.State('Walk', self.enterWalk, self.exitWalk, ['Neutral'])], 'Off', 'Off')
self.fsm.enterInitialState()
self.handleHolidays()
def disable(self):
self.fsm.requestFinalState()
DistributedCCharBase.DistributedCCharBase.disable(self)
self.neutralDoneEvent = None
self.neutral = None
self.walkDoneEvent = None
self.walk = None
self.fsm.requestFinalState()
return
def delete(self):
try:
self.DistributedMinnie_deleted
except:
self.DistributedMinnie_deleted = 1
del self.fsm
DistributedCCharBase.DistributedCCharBase.delete(self)
def generate(self):
DistributedCCharBase.DistributedCCharBase.generate(self, self.diffPath)
self.neutralDoneEvent = self.taskName('minnie-neutral-done')
self.neutral = CharStateDatas.CharNeutralState(self.neutralDoneEvent, self)
self.walkDoneEvent = self.taskName('minnie-walk-done')
if self.diffPath == None:
self.walk = CharStateDatas.CharWalkState(self.walkDoneEvent, self)
else:
self.walk = CharStateDatas.CharWalkState(self.walkDoneEvent, self, self.diffPath)
self.fsm.request('Neutral')
return
def enterOff(self):
pass
def exitOff(self):
pass
def enterNeutral(self):
self.neutral.enter()
self.acceptOnce(self.neutralDoneEvent, self.__decideNextState)
def exitNeutral(self):
self.ignore(self.neutralDoneEvent)
self.neutral.exit()
def enterWalk(self):
self.walk.enter()
self.acceptOnce(self.walkDoneEvent, self.__decideNextState)
def exitWalk(self):
self.ignore(self.walkDoneEvent)
self.walk.exit()
def __decideNextState(self, doneStatus):
self.fsm.request('Neutral')
def setWalk(self, srcNode, destNode, timestamp):
if destNode and not destNode == srcNode:
self.walk.setWalk(srcNode, destNode, timestamp)
self.fsm.request('Walk')
def walkSpeed(self):
return ToontownGlobals.MinnieSpeed
def handleHolidays(self):
DistributedCCharBase.DistributedCCharBase.handleHolidays(self)
if hasattr(base.cr, 'newsManager') and base.cr.newsManager:
holidayIds = base.cr.newsManager.getHolidayIdList()
if ToontownGlobals.APRIL_FOOLS_COSTUMES in holidayIds and isinstance(self.cr.playGame.hood, BRHood.BRHood):
self.diffPath = TTLocalizer.Pluto

View file

@ -1,181 +0,0 @@
# File: D (Python 2.4)
from otp.ai.AIBaseGlobal import *
import DistributedCCharBaseAI
from direct.directnotify import DirectNotifyGlobal
from direct.fsm import ClassicFSM, State
from direct.fsm import State
from direct.task import Task
import random
from toontown.toonbase import ToontownGlobals
from toontown.toonbase import TTLocalizer
import CharStateDatasAI
class DistributedMinnieAI(DistributedCCharBaseAI.DistributedCCharBaseAI):
notify = DirectNotifyGlobal.directNotify.newCategory('DistributedMinnieAI')
def __init__(self, air):
DistributedCCharBaseAI.DistributedCCharBaseAI.__init__(self, air, TTLocalizer.Minnie)
self.fsm = ClassicFSM.ClassicFSM('DistributedMinnieAI', [
State.State('Off', self.enterOff, self.exitOff, [
'Lonely',
'TransitionToCostume',
'Walk']),
State.State('Lonely', self.enterLonely, self.exitLonely, [
'Chatty',
'Walk',
'TransitionToCostume']),
State.State('Chatty', self.enterChatty, self.exitChatty, [
'Lonely',
'Walk',
'TransitionToCostume']),
State.State('Walk', self.enterWalk, self.exitWalk, [
'Lonely',
'Chatty',
'TransitionToCostume']),
State.State('TransitionToCostume', self.enterTransitionToCostume, self.exitTransitionToCostume, [
'Off'])], 'Off', 'Off')
self.fsm.enterInitialState()
self.handleHolidays()
def delete(self):
self.fsm.requestFinalState()
DistributedCCharBaseAI.DistributedCCharBaseAI.delete(self)
self.lonelyDoneEvent = None
self.lonely = None
self.chattyDoneEvent = None
self.chatty = None
self.walkDoneEvent = None
self.walk = None
def generate(self):
DistributedCCharBaseAI.DistributedCCharBaseAI.generate(self)
name = self.getName()
self.lonelyDoneEvent = self.taskName(name + '-lonely-done')
self.lonely = CharStateDatasAI.CharLonelyStateAI(self.lonelyDoneEvent, self)
self.chattyDoneEvent = self.taskName(name + '-chatty-done')
self.chatty = CharStateDatasAI.CharChattyStateAI(self.chattyDoneEvent, self)
self.walkDoneEvent = self.taskName(name + '-walk-done')
if self.diffPath == None:
self.walk = CharStateDatasAI.CharWalkStateAI(self.walkDoneEvent, self)
else:
self.walk = CharStateDatasAI.CharWalkStateAI(self.walkDoneEvent, self, self.diffPath)
def walkSpeed(self):
return ToontownGlobals.MinnieSpeed
def start(self):
self.fsm.request('Lonely')
def _DistributedMinnieAI__decideNextState(self, doneStatus):
if self.transitionToCostume == 1:
curWalkNode = self.walk.getDestNode()
if simbase.air.holidayManager:
if ToontownGlobals.HALLOWEEN_COSTUMES in simbase.air.holidayManager.currentHolidays and simbase.air.holidayManager.currentHolidays[ToontownGlobals.HALLOWEEN_COSTUMES]:
simbase.air.holidayManager.currentHolidays[ToontownGlobals.HALLOWEEN_COSTUMES].triggerSwitch(curWalkNode, self)
self.fsm.request('TransitionToCostume')
elif ToontownGlobals.APRIL_FOOLS_COSTUMES in simbase.air.holidayManager.currentHolidays and simbase.air.holidayManager.currentHolidays[ToontownGlobals.APRIL_FOOLS_COSTUMES]:
simbase.air.holidayManager.currentHolidays[ToontownGlobals.APRIL_FOOLS_COSTUMES].triggerSwitch(curWalkNode, self)
self.fsm.request('TransitionToCostume')
else:
self.notify.warning('transitionToCostume == 1 but no costume holiday')
else:
self.notify.warning('transitionToCostume == 1 but no holiday Manager')
if doneStatus['state'] == 'lonely' and doneStatus['status'] == 'done':
self.fsm.request('Walk')
elif doneStatus['state'] == 'chatty' and doneStatus['status'] == 'done':
self.fsm.request('Walk')
elif doneStatus['state'] == 'walk' and doneStatus['status'] == 'done':
if len(self.nearbyAvatars) > 0:
self.fsm.request('Chatty')
else:
self.fsm.request('Lonely')
def enterOff(self):
pass
def exitOff(self):
DistributedCCharBaseAI.DistributedCCharBaseAI.exitOff(self)
def enterLonely(self):
self.lonely.enter()
self.acceptOnce(self.lonelyDoneEvent, self._DistributedMinnieAI__decideNextState)
def exitLonely(self):
self.ignore(self.lonelyDoneEvent)
self.lonely.exit()
def _DistributedMinnieAI__goForAWalk(self, task):
self.notify.debug('going for a walk')
self.fsm.request('Walk')
return Task.done
def enterChatty(self):
self.chatty.enter()
self.acceptOnce(self.chattyDoneEvent, self._DistributedMinnieAI__decideNextState)
def exitChatty(self):
self.ignore(self.chattyDoneEvent)
self.chatty.exit()
def enterWalk(self):
self.notify.debug('going for a walk')
self.walk.enter()
self.acceptOnce(self.walkDoneEvent, self._DistributedMinnieAI__decideNextState)
def exitWalk(self):
self.ignore(self.walkDoneEvent)
self.walk.exit()
def avatarEnterNextState(self):
if len(self.nearbyAvatars) == 1:
if self.fsm.getCurrentState().getName() != 'Walk':
self.fsm.request('Chatty')
else:
self.notify.debug('avatarEnterNextState: in walk state')
else:
self.notify.debug('avatarEnterNextState: num avatars: ' + str(len(self.nearbyAvatars)))
def avatarExitNextState(self):
if len(self.nearbyAvatars) == 0:
if self.fsm.getCurrentState().getName() != 'Walk':
self.fsm.request('Lonely')
def handleHolidays(self):
DistributedCCharBaseAI.DistributedCCharBaseAI.handleHolidays(self)
if hasattr(simbase.air, 'holidayManager'):
if ToontownGlobals.APRIL_FOOLS_COSTUMES in simbase.air.holidayManager.currentHolidays and simbase.air.holidayManager.currentHolidays[ToontownGlobals.APRIL_FOOLS_COSTUMES] != None and simbase.air.holidayManager.currentHolidays[ToontownGlobals.APRIL_FOOLS_COSTUMES].getRunningState():
self.diffPath = TTLocalizer.Pluto
def enterTransitionToCostume(self):
pass
def exitTransitionToCostume(self):
pass

View file

@ -1,119 +0,0 @@
from pandac.PandaModules import *
from direct.interval.IntervalGlobal import *
import DistributedCCharBase
from direct.directnotify import DirectNotifyGlobal
from direct.fsm import ClassicFSM, State
from direct.fsm import State
from toontown.toonbase import ToontownGlobals
import CharStateDatas
from direct.fsm import StateData
from direct.task import Task
from toontown.toonbase import TTLocalizer
from toontown.hood import MMHood
class DistributedPluto(DistributedCCharBase.DistributedCCharBase):
notify = DirectNotifyGlobal.directNotify.newCategory('DistributedPluto')
def __init__(self, cr):
try:
self.DistributedPluto_initialized
except:
self.DistributedPluto_initialized = 1
DistributedCCharBase.DistributedCCharBase.__init__(self, cr, TTLocalizer.Pluto, 'p')
self.fsm = ClassicFSM.ClassicFSM('DistributedPluto', [State.State('Off', self.enterOff, self.exitOff, ['Neutral']), State.State('Neutral', self.enterNeutral, self.exitNeutral, ['Walk']), State.State('Walk', self.enterWalk, self.exitWalk, ['Neutral'])], 'Off', 'Off')
self.fsm.enterInitialState()
self.handleHolidays()
def disable(self):
self.fsm.requestFinalState()
DistributedCCharBase.DistributedCCharBase.disable(self)
taskMgr.remove('enterNeutralTask')
taskMgr.remove('enterWalkTask')
del self.neutralDoneEvent
del self.neutral
del self.walkDoneEvent
del self.walk
del self.neutralStartTrack
del self.walkStartTrack
self.fsm.requestFinalState()
def delete(self):
try:
self.DistributedPluto_deleted
except:
self.DistributedPluto_deleted = 1
del self.fsm
DistributedCCharBase.DistributedCCharBase.delete(self)
def generate(self):
DistributedCCharBase.DistributedCCharBase.generate(self, self.diffPath)
self.neutralDoneEvent = self.taskName('pluto-neutral-done')
self.neutral = CharStateDatas.CharNeutralState(self.neutralDoneEvent, self)
self.walkDoneEvent = self.taskName('pluto-walk-done')
if self.diffPath == None:
self.walk = CharStateDatas.CharWalkState(self.walkDoneEvent, self)
else:
self.walk = CharStateDatas.CharWalkState(self.walkDoneEvent, self, self.diffPath)
self.walkStartTrack = Sequence(self.actorInterval('stand'), Func(self.stand))
self.neutralStartTrack = Sequence(self.actorInterval('sit'), Func(self.sit))
self.fsm.request('Neutral')
return
def stand(self):
self.dropShadow.setScale(0.9, 1.35, 0.9)
if hasattr(self, 'collNodePath'):
self.collNodePath.setScale(1.0, 1.5, 1.0)
def sit(self):
self.dropShadow.setScale(0.9)
if hasattr(self, 'collNodePath'):
self.collNodePath.setScale(1.0)
def enterOff(self):
pass
def exitOff(self):
pass
def enterNeutral(self):
self.notify.debug('Neutral ' + self.getName() + '...')
self.neutral.enter(self.neutralStartTrack)
self.acceptOnce(self.neutralDoneEvent, self.__decideNextState)
def exitNeutral(self):
self.ignore(self.neutralDoneEvent)
self.neutral.exit()
def enterWalk(self):
self.notify.debug('Walking ' + self.getName() + '...')
self.walk.enter(self.walkStartTrack)
self.acceptOnce(self.walkDoneEvent, self.__decideNextState)
def exitWalk(self):
self.ignore(self.walkDoneEvent)
self.walk.exit()
def __decideNextState(self, doneStatus):
self.fsm.request('Neutral')
def setWalk(self, srcNode, destNode, timestamp):
if destNode and not destNode == srcNode:
self.walk.setWalk(srcNode, destNode, timestamp)
self.fsm.request('Walk')
def walkSpeed(self):
return ToontownGlobals.PlutoSpeed
def handleHolidays(self):
DistributedCCharBase.DistributedCCharBase.handleHolidays(self)
if hasattr(base.cr, 'newsManager') and base.cr.newsManager:
holidayIds = base.cr.newsManager.getHolidayIdList()
if ToontownGlobals.APRIL_FOOLS_COSTUMES in holidayIds and isinstance(self.cr.playGame.hood, MMHood.MMHood):
self.diffPath = TTLocalizer.Minnie
def getCCLocation(self):
if self.diffPath == None:
return 1
else:
return 0
return

View file

@ -1,182 +0,0 @@
# File: D (Python 2.4)
from otp.ai.AIBaseGlobal import *
import DistributedCCharBaseAI
from direct.directnotify import DirectNotifyGlobal
from direct.fsm import ClassicFSM, State
from direct.fsm import State
from direct.task import Task
import random
import CharStateDatasAI
from toontown.toonbase import ToontownGlobals
from toontown.toonbase import TTLocalizer
class DistributedPlutoAI(DistributedCCharBaseAI.DistributedCCharBaseAI):
notify = DirectNotifyGlobal.directNotify.newCategory('DistributedPlutoAI')
def __init__(self, air):
DistributedCCharBaseAI.DistributedCCharBaseAI.__init__(self, air, TTLocalizer.Pluto)
self.fsm = ClassicFSM.ClassicFSM('DistributedPlutoAI', [
State.State('Off', self.enterOff, self.exitOff, [
'Lonely',
'TransitionToCostume',
'Walk']),
State.State('Lonely', self.enterLonely, self.exitLonely, [
'Chatty',
'Walk',
'TransitionToCostume']),
State.State('Chatty', self.enterChatty, self.exitChatty, [
'Lonely',
'Walk',
'TransitionToCostume']),
State.State('Walk', self.enterWalk, self.exitWalk, [
'Lonely',
'Chatty',
'TransitionToCostume']),
State.State('TransitionToCostume', self.enterTransitionToCostume, self.exitTransitionToCostume, [
'Off'])], 'Off', 'Off')
self.fsm.enterInitialState()
self.handleHolidays()
def delete(self):
self.fsm.requestFinalState()
DistributedCCharBaseAI.DistributedCCharBaseAI.delete(self)
self.lonelyDoneEvent = None
self.lonely = None
self.chattyDoneEvent = None
self.chatty = None
self.walkDoneEvent = None
self.walk = None
def generate(self):
DistributedCCharBaseAI.DistributedCCharBaseAI.generate(self)
self.lonelyDoneEvent = self.taskName('pluto-lonely-done')
self.lonely = CharStateDatasAI.CharLonelyStateAI(self.lonelyDoneEvent, self)
self.chattyDoneEvent = self.taskName('pluto-chatty-done')
self.chatty = CharStateDatasAI.CharChattyStateAI(self.chattyDoneEvent, self)
self.walkDoneEvent = self.taskName('pluto-walk-done')
if self.diffPath == None:
self.walk = CharStateDatasAI.CharWalkStateAI(self.walkDoneEvent, self)
else:
self.walk = CharStateDatasAI.CharWalkStateAI(self.walkDoneEvent, self, self.diffPath)
def walkSpeed(self):
return ToontownGlobals.PlutoSpeed
def start(self):
self.fsm.request('Lonely')
def _DistributedPlutoAI__decideNextState(self, doneStatus):
if self.transitionToCostume == 1:
curWalkNode = self.walk.getDestNode()
if simbase.air.holidayManager:
if ToontownGlobals.HALLOWEEN_COSTUMES in simbase.air.holidayManager.currentHolidays and simbase.air.holidayManager.currentHolidays[ToontownGlobals.HALLOWEEN_COSTUMES]:
simbase.air.holidayManager.currentHolidays[ToontownGlobals.HALLOWEEN_COSTUMES].triggerSwitch(curWalkNode, self)
self.fsm.request('TransitionToCostume')
elif ToontownGlobals.APRIL_FOOLS_COSTUMES in simbase.air.holidayManager.currentHolidays and simbase.air.holidayManager.currentHolidays[ToontownGlobals.APRIL_FOOLS_COSTUMES]:
simbase.air.holidayManager.currentHolidays[ToontownGlobals.APRIL_FOOLS_COSTUMES].triggerSwitch(curWalkNode, self)
self.fsm.request('TransitionToCostume')
else:
self.notify.warning('transitionToCostume == 1 but no costume holiday')
else:
self.notify.warning('transitionToCostume == 1 but no holiday Manager')
if doneStatus['state'] == 'lonely' and doneStatus['status'] == 'done':
self.fsm.request('Walk')
elif doneStatus['state'] == 'chatty' and doneStatus['status'] == 'done':
self.fsm.request('Walk')
elif doneStatus['state'] == 'walk' and doneStatus['status'] == 'done':
if len(self.nearbyAvatars) > 0:
self.fsm.request('Chatty')
else:
self.fsm.request('Lonely')
def enterOff(self):
pass
def exitOff(self):
DistributedCCharBaseAI.DistributedCCharBaseAI.exitOff(self)
def enterLonely(self):
self.lonely.enter()
self.acceptOnce(self.lonelyDoneEvent, self._DistributedPlutoAI__decideNextState)
def exitLonely(self):
self.ignore(self.lonelyDoneEvent)
self.lonely.exit()
def _DistributedPlutoAI__goForAWalk(self, task):
self.notify.debug('going for a walk')
self.fsm.request('Walk')
return Task.done
def enterChatty(self):
self.chatty.enter()
self.acceptOnce(self.chattyDoneEvent, self._DistributedPlutoAI__decideNextState)
def exitChatty(self):
self.ignore(self.chattyDoneEvent)
self.chatty.exit()
def enterWalk(self):
self.notify.debug('going for a walk')
self.walk.enter()
self.acceptOnce(self.walkDoneEvent, self._DistributedPlutoAI__decideNextState)
def exitWalk(self):
self.ignore(self.walkDoneEvent)
self.walk.exit()
def avatarEnterNextState(self):
if len(self.nearbyAvatars) == 1:
if self.fsm.getCurrentState().getName() != 'Walk':
self.fsm.request('Chatty')
else:
self.notify.debug('avatarEnterNextState: in walk state')
else:
self.notify.debug('avatarEnterNextState: num avatars: ' + str(len(self.nearbyAvatars)))
def avatarExitNextState(self):
if len(self.nearbyAvatars) == 0:
if self.fsm.getCurrentState().getName() != 'Walk':
self.fsm.request('Lonely')
def handleHolidays(self):
DistributedCCharBaseAI.DistributedCCharBaseAI.handleHolidays(self)
if hasattr(simbase.air, 'holidayManager'):
if ToontownGlobals.APRIL_FOOLS_COSTUMES in simbase.air.holidayManager.currentHolidays:
if simbase.air.holidayManager.currentHolidays[ToontownGlobals.APRIL_FOOLS_COSTUMES] != None and simbase.air.holidayManager.currentHolidays[ToontownGlobals.APRIL_FOOLS_COSTUMES].getRunningState():
self.diffPath = TTLocalizer.Minnie
def enterTransitionToCostume(self):
pass
def exitTransitionToCostume(self):
pass

View file

@ -1,23 +0,0 @@
from direct.showbase.ShowBaseGlobal import *
import DistributedCCharBase
from direct.directnotify import DirectNotifyGlobal
from direct.fsm import ClassicFSM
from direct.fsm import State
import CharStateDatas
from toontown.toonbase import ToontownGlobals
from toontown.toonbase import TTLocalizer
import DistributedChip
class DistributedPoliceChip(DistributedChip.DistributedChip):
notify = DirectNotifyGlobal.directNotify.newCategory('DistributedPoliceChip')
def __init__(self, cr):
try:
self.DistributedChip_initialized
except:
self.DistributedChip_initialized = 1
DistributedCCharBase.DistributedCCharBase.__init__(self, cr, TTLocalizer.PoliceChip, 'pch')
self.fsm = ClassicFSM.ClassicFSM(self.getName(), [State.State('Off', self.enterOff, self.exitOff, ['Neutral']), State.State('Neutral', self.enterNeutral, self.exitNeutral, ['Walk']), State.State('Walk', self.enterWalk, self.exitWalk, ['Neutral'])], 'Off', 'Off')
self.fsm.enterInitialState()
self.handleHolidays()
self.nametag.setText(TTLocalizer.Chip)

View file

@ -1,6 +0,0 @@
from direct.directnotify import DirectNotifyGlobal
from toontown.classicchars.DistributedChipAI import DistributedChipAI
class DistributedPoliceChipAI(DistributedChipAI):
notify = DirectNotifyGlobal.directNotify.newCategory("DistributedPoliceChipAI")

View file

@ -1,24 +0,0 @@
from direct.showbase.ShowBaseGlobal import *
import DistributedCCharBase
import DistributedDaisy
from direct.directnotify import DirectNotifyGlobal
from direct.fsm import ClassicFSM
from direct.fsm import State
import CharStateDatas
from toontown.toonbase import ToontownGlobals
from toontown.toonbase import TTLocalizer
from toontown.hood import TTHood
class DistributedSockHopDaisy(DistributedDaisy.DistributedDaisy):
notify = DirectNotifyGlobal.directNotify.newCategory('DistributedSockHopDaisy')
def __init__(self, cr):
try:
self.DistributedSockHopDaisy_initialized
except:
self.DistributedSockHopDaisy_initialized = 1
DistributedCCharBase.DistributedCCharBase.__init__(self, cr, TTLocalizer.SockHopDaisy, 'shdd')
self.fsm = ClassicFSM.ClassicFSM(self.getName(), [State.State('Off', self.enterOff, self.exitOff, ['Neutral']), State.State('Neutral', self.enterNeutral, self.exitNeutral, ['Walk']), State.State('Walk', self.enterWalk, self.exitWalk, ['Neutral'])], 'Off', 'Off')
self.fsm.enterInitialState()
self.nametag.setText(TTLocalizer.Daisy)
self.handleHolidays()

View file

@ -1,6 +0,0 @@
from direct.directnotify import DirectNotifyGlobal
from toontown.classicchars.DistributedDaisyAI import DistributedDaisyAI
class DistributedSockHopDaisyAI(DistributedDaisyAI):
notify = DirectNotifyGlobal.directNotify.newCategory("DistributedSockHopDaisyAI")

View file

@ -1,26 +0,0 @@
from pandac.PandaModules import *
import DistributedCCharBase
from direct.directnotify import DirectNotifyGlobal
from direct.fsm import ClassicFSM, State
from direct.fsm import State
from toontown.classicchars import DistributedGoofySpeedway
import CharStateDatas
from toontown.toonbase import ToontownGlobals
from toontown.toonbase import TTLocalizer
import DistributedCCharBase
class DistributedSuperGoofy(DistributedGoofySpeedway.DistributedGoofySpeedway):
notify = DirectNotifyGlobal.directNotify.newCategory('DistributedSuperGoofy')
def __init__(self, cr):
try:
self.DistributedGoofySpeedway_initialized
except:
self.DistributedGoofySpeedway_initialized = 1
DistributedCCharBase.DistributedCCharBase.__init__(self, cr, TTLocalizer.SuperGoofy, 'sg')
self.fsm = ClassicFSM.ClassicFSM(self.getName(), [State.State('Off', self.enterOff, self.exitOff, ['Neutral']), State.State('Neutral', self.enterNeutral, self.exitNeutral, ['Walk']), State.State('Walk', self.enterWalk, self.exitWalk, ['Neutral'])], 'Off', 'Off')
self.fsm.enterInitialState()
self.nametag.setText(TTLocalizer.Goofy)
def walkSpeed(self):
return ToontownGlobals.SuperGoofySpeed

View file

@ -1,6 +0,0 @@
from direct.directnotify import DirectNotifyGlobal
from toontown.classicchars.DistributedGoofySpeedwayAI import DistributedGoofySpeedwayAI
class DistributedSuperGoofyAI(DistributedGoofySpeedwayAI):
notify = DirectNotifyGlobal.directNotify.newCategory("DistributedSuperGoofyAI")

View file

@ -1,26 +0,0 @@
from pandac.PandaModules import *
import DistributedCCharBase
from direct.directnotify import DirectNotifyGlobal
from direct.fsm import ClassicFSM, State
from direct.fsm import State
from toontown.classicchars import DistributedMickey
import CharStateDatas
from toontown.toonbase import ToontownGlobals
from toontown.toonbase import TTLocalizer
import DistributedCCharBase
class DistributedVampireMickey(DistributedMickey.DistributedMickey):
notify = DirectNotifyGlobal.directNotify.newCategory('DistributedVampireMickey')
def __init__(self, cr):
try:
self.DistributedMickey_initialized
except:
self.DistributedMickey_initialized = 1
DistributedCCharBase.DistributedCCharBase.__init__(self, cr, TTLocalizer.VampireMickey, 'vmk')
self.fsm = ClassicFSM.ClassicFSM(self.getName(), [State.State('Off', self.enterOff, self.exitOff, ['Neutral']), State.State('Neutral', self.enterNeutral, self.exitNeutral, ['Walk']), State.State('Walk', self.enterWalk, self.exitWalk, ['Neutral'])], 'Off', 'Off')
self.fsm.enterInitialState()
self.nametag.setText(TTLocalizer.Mickey)
def walkSpeed(self):
return ToontownGlobals.VampireMickeySpeed

View file

@ -1,6 +0,0 @@
from direct.directnotify import DirectNotifyGlobal
from toontown.classicchars.DistributedMickeyAI import DistributedMickeyAI
class DistributedVampireMickeyAI(DistributedMickeyAI):
notify = DirectNotifyGlobal.directNotify.newCategory("DistributedVampireMickeyAI")

View file

@ -1,26 +0,0 @@
from pandac.PandaModules import *
import DistributedCCharBase
from direct.directnotify import DirectNotifyGlobal
from direct.fsm import ClassicFSM, State
from direct.fsm import State
from toontown.classicchars import DistributedPluto
import CharStateDatas
from toontown.toonbase import ToontownGlobals
from toontown.toonbase import TTLocalizer
import DistributedCCharBase
class DistributedWesternPluto(DistributedPluto.DistributedPluto):
notify = DirectNotifyGlobal.directNotify.newCategory('DistributedWesternPluto')
def __init__(self, cr):
try:
self.DistributedPluto_initialized
except:
self.DistributedPluto_initialized = 1
DistributedCCharBase.DistributedCCharBase.__init__(self, cr, TTLocalizer.WesternPluto, 'wp')
self.fsm = ClassicFSM.ClassicFSM('DistributedWesternPluto', [State.State('Off', self.enterOff, self.exitOff, ['Neutral']), State.State('Neutral', self.enterNeutral, self.exitNeutral, ['Walk']), State.State('Walk', self.enterWalk, self.exitWalk, ['Neutral'])], 'Off', 'Off')
self.fsm.enterInitialState()
self.nametag.setText(TTLocalizer.Pluto)
def walkSpeed(self):
return ToontownGlobals.WesternPlutoSpeed

View file

@ -1,6 +0,0 @@
from direct.directnotify import DirectNotifyGlobal
from toontown.classicchars.DistributedPlutoAI import DistributedPlutoAI
class DistributedWesternPlutoAI(DistributedPlutoAI):
notify = DirectNotifyGlobal.directNotify.newCategory("DistributedWesternPlutoAI")

View file

@ -1,26 +0,0 @@
from pandac.PandaModules import *
import DistributedCCharBase
from direct.directnotify import DirectNotifyGlobal
from direct.fsm import ClassicFSM, State
from direct.fsm import State
from toontown.classicchars import DistributedMinnie
import CharStateDatas
from toontown.toonbase import ToontownGlobals
from toontown.toonbase import TTLocalizer
import DistributedCCharBase
class DistributedWitchMinnie(DistributedMinnie.DistributedMinnie):
notify = DirectNotifyGlobal.directNotify.newCategory('DistributedWitchMinnie')
def __init__(self, cr):
try:
self.DistributedMinnie_initialized
except:
self.DistributedMinnie_initialized = 1
DistributedCCharBase.DistributedCCharBase.__init__(self, cr, TTLocalizer.WitchMinnie, 'wmn')
self.fsm = ClassicFSM.ClassicFSM(self.getName(), [State.State('Off', self.enterOff, self.exitOff, ['Neutral']), State.State('Neutral', self.enterNeutral, self.exitNeutral, ['Walk']), State.State('Walk', self.enterWalk, self.exitWalk, ['Neutral'])], 'Off', 'Off')
self.fsm.enterInitialState()
self.nametag.setText(TTLocalizer.Minnie)
def walkSpeed(self):
return ToontownGlobals.WitchMinnieSpeed

View file

@ -1,6 +0,0 @@
from direct.directnotify import DirectNotifyGlobal
from toontown.classicchars.DistributedMickeyAI import DistributedMickeyAI
class DistributedWitchMinnieAI(DistributedMickeyAI):
notify = DirectNotifyGlobal.directNotify.newCategory("DistributedWitchMinnieAI")

View file

@ -1,11 +1,9 @@
from toontown.classicchars import DistributedPlutoAI
from toontown.hood import HoodAI
from toontown.safezone import DistributedTrolleyAI
from toontown.toonbase import ToontownGlobals
from toontown.ai import DistributedPolarPlaceEffectMgrAI
from toontown.ai import DistributedTrickOrTreatTargetAI
class BRHoodAI(HoodAI.HoodAI):
def __init__(self, air):
HoodAI.HoodAI.__init__(self, air,
@ -13,7 +11,6 @@ class BRHoodAI(HoodAI.HoodAI):
ToontownGlobals.TheBrrrgh)
self.trolley = None
self.classicChar = None
self.startup()
@ -22,9 +19,6 @@ class BRHoodAI(HoodAI.HoodAI):
if simbase.config.GetBool('want-minigames', True):
self.createTrolley()
if simbase.config.GetBool('want-classic-chars', True):
if simbase.config.GetBool('want-pluto', True):
self.createClassicChar()
self.PolarPlaceEffectManager = DistributedPolarPlaceEffectMgrAI.DistributedPolarPlaceEffectMgrAI(self.air)
self.PolarPlaceEffectManager.generateWithRequired(3821)
@ -36,9 +30,4 @@ class BRHoodAI(HoodAI.HoodAI):
def createTrolley(self):
self.trolley = DistributedTrolleyAI.DistributedTrolleyAI(self.air)
self.trolley.generateWithRequired(self.zoneId)
self.trolley.start()
def createClassicChar(self):
self.classicChar = DistributedPlutoAI.DistributedPlutoAI(self.air)
self.classicChar.generateWithRequired(self.zoneId)
self.classicChar.start()
self.trolley.start()

View file

@ -1,4 +1,3 @@
from toontown.classicchars import DistributedDonaldDockAI
from toontown.hood import HoodAI
from toontown.safezone import DistributedBoatAI
from toontown.safezone import DistributedTrolleyAI
@ -14,7 +13,6 @@ class DDHoodAI(HoodAI.HoodAI):
self.trolley = None
self.boat = None
self.classicChar = None
self.startup()
@ -24,9 +22,6 @@ class DDHoodAI(HoodAI.HoodAI):
if simbase.config.GetBool('want-minigames', True):
self.createTrolley()
self.createBoat()
if simbase.config.GetBool('want-classic-chars', True):
if simbase.config.GetBool('want-donald-dock', True):
self.createClassicChar()
if simbase.air.wantHalloween:
self.TrickOrTreatTargetManager = DistributedTrickOrTreatTargetAI.DistributedTrickOrTreatTargetAI(self.air)
@ -40,9 +35,4 @@ class DDHoodAI(HoodAI.HoodAI):
def createBoat(self):
self.boat = DistributedBoatAI.DistributedBoatAI(self.air)
self.boat.generateWithRequired(self.zoneId)
self.boat.start()
def createClassicChar(self):
self.classicChar = DistributedDonaldDockAI.DistributedDonaldDockAI(self.air)
self.classicChar.generateWithRequired(self.zoneId)
self.classicChar.start()
self.boat.start()

View file

@ -1,4 +1,3 @@
from toontown.classicchars import DistributedDaisyAI
from toontown.hood import HoodAI
from toontown.safezone import ButterflyGlobals
from toontown.safezone import DistributedButterflyAI
@ -17,7 +16,6 @@ class DGHoodAI(HoodAI.HoodAI):
self.trolley = None
self.flower = None
self.classicChar = None
self.startup()
@ -27,9 +25,6 @@ class DGHoodAI(HoodAI.HoodAI):
if simbase.config.GetBool('want-minigames', True):
self.createTrolley()
self.createFlower()
if simbase.config.GetBool('want-classic-chars', True):
if simbase.config.GetBool('want-daisy', True):
self.createClassicChar()
if simbase.config.GetBool('want-butterflies', True):
self.createButterflies()
@ -55,11 +50,6 @@ class DGHoodAI(HoodAI.HoodAI):
self.flower.generateWithRequired(self.zoneId)
self.flower.start()
def createClassicChar(self):
self.classicChar = DistributedDaisyAI.DistributedDaisyAI(self.air)
self.classicChar.generateWithRequired(self.zoneId)
self.classicChar.start()
def createButterflies(self, playground):
ButterflyGlobals.generateIndexes(self.zoneId, ButterflyGlobals.DG)
for i in xrange(0, ButterflyGlobals.NUM_BUTTERFLY_AREAS[ButterflyGlobals.DG]):

View file

@ -1,4 +1,3 @@
from toontown.classicchars import DistributedDonaldAI
from toontown.hood import HoodAI
from toontown.safezone import DistributedTrolleyAI
from toontown.toonbase import ToontownGlobals
@ -13,7 +12,6 @@ class DLHoodAI(HoodAI.HoodAI):
ToontownGlobals.DonaldsDreamland)
self.trolley = None
self.classicChar = None
self.startup()
@ -22,9 +20,6 @@ class DLHoodAI(HoodAI.HoodAI):
if simbase.config.GetBool('want-minigames', True):
self.createTrolley()
if simbase.config.GetBool('want-classic-chars', True):
if simbase.config.GetBool('want-donald-dreamland', True):
self.createClassicChar()
self.resistanceEmoteManager = DistributedResistanceEmoteMgrAI.DistributedResistanceEmoteMgrAI(self.air)
self.resistanceEmoteManager.generateWithRequired(9720)
@ -35,9 +30,4 @@ class DLHoodAI(HoodAI.HoodAI):
def createTrolley(self):
self.trolley = DistributedTrolleyAI.DistributedTrolleyAI(self.air)
self.trolley.generateWithRequired(self.zoneId)
self.trolley.start()
def createClassicChar(self):
self.classicChar = DistributedDonaldAI.DistributedDonaldAI(self.air)
self.classicChar.generateWithRequired(self.zoneId)
self.classicChar.start()
self.trolley.start()

View file

@ -1,4 +1,3 @@
from toontown.classicchars import DistributedGoofySpeedwayAI
from toontown.dna.DNAParser import DNAGroup, DNAVisGroup
from toontown.hood import HoodAI
from toontown.hood import ZoneUtil
@ -21,7 +20,6 @@ class GSHoodAI(HoodAI.HoodAI):
self.viewingBlocks = []
self.startingBlocks = []
self.leaderBoards = []
self.classicChar = None
self.startup()
@ -31,8 +29,6 @@ class GSHoodAI(HoodAI.HoodAI):
self.createStartingBlocks()
self.createLeaderBoards()
self.cycleLeaderBoards()
if simbase.config.GetBool('want-goofy', True):
self.createClassicChar()
def shutdown(self):
HoodAI.HoodAI.shutdown(self)
@ -146,9 +142,4 @@ class GSHoodAI(HoodAI.HoodAI):
def cycleLeaderBoards(self, task=None):
messenger.send('leaderBoardSwap-' + str(self.zoneId))
taskMgr.doMethodLater(10, self.cycleLeaderBoards, 'leaderBoardSwitch')
def createClassicChar(self):
self.classicChar = DistributedGoofySpeedwayAI.DistributedGoofySpeedwayAI(self.air)
self.classicChar.generateWithRequired(self.zoneId)
self.classicChar.start()
taskMgr.doMethodLater(10, self.cycleLeaderBoards, 'leaderBoardSwitch')

View file

@ -1,12 +1,9 @@
from toontown.classicchars import DistributedMinnieAI
from toontown.hood import HoodAI
from toontown.safezone import DistributedTrolleyAI
from toontown.safezone import DistributedMMPianoAI
from toontown.toonbase import ToontownGlobals
from toontown.ai import DistributedTrickOrTreatTargetAI
class MMHoodAI(HoodAI.HoodAI):
def __init__(self, air):
HoodAI.HoodAI.__init__(self, air,
@ -15,7 +12,6 @@ class MMHoodAI(HoodAI.HoodAI):
self.trolley = None
self.piano = None
self.classicChar = None
self.startup()
@ -24,9 +20,6 @@ class MMHoodAI(HoodAI.HoodAI):
if simbase.config.GetBool('want-minigames', True):
self.createTrolley()
if simbase.config.GetBool('want-classic-chars', True):
if simbase.config.GetBool('want-minnie', True):
self.createClassicChar()
self.piano = DistributedMMPianoAI.DistributedMMPianoAI(self.air)
self.piano.generateWithRequired(self.zoneId)
@ -38,9 +31,4 @@ class MMHoodAI(HoodAI.HoodAI):
def createTrolley(self):
self.trolley = DistributedTrolleyAI.DistributedTrolleyAI(self.air)
self.trolley.generateWithRequired(self.zoneId)
self.trolley.start()
def createClassicChar(self):
self.classicChar = DistributedMinnieAI.DistributedMinnieAI(self.air)
self.classicChar.generateWithRequired(self.zoneId)
self.classicChar.start()
self.trolley.start()

View file

@ -1,8 +1,6 @@
from toontown.hood import HoodAI
from toontown.toonbase import ToontownGlobals
from toontown.distributed.DistributedTimerAI import DistributedTimerAI
from toontown.classicchars import DistributedChipAI
from toontown.classicchars import DistributedDaleAI
from toontown.dna.DNAParser import DNAGroup, DNAVisGroup
from toontown.safezone.DistributedPicnicBasketAI import DistributedPicnicBasketAI
from toontown.safezone import DistributedGameTableAI
@ -16,8 +14,6 @@ class OZHoodAI(HoodAI.HoodAI):
ToontownGlobals.OutdoorZone)
self.timer = None
self.classicCharChip = None
self.classicCharDale = None
self.picnicTables = []
self.gameTables = []
@ -27,9 +23,6 @@ class OZHoodAI(HoodAI.HoodAI):
HoodAI.HoodAI.startup(self)
self.createTimer()
if simbase.config.GetBool('want-classic-chars', True):
if simbase.config.GetBool('want-chip-and-dale', True):
self.createClassicChars()
self.createPicnicTables()
if simbase.config.GetBool('want-game-tables', True):
self.createGameTables()
@ -38,15 +31,6 @@ class OZHoodAI(HoodAI.HoodAI):
self.timer = DistributedTimerAI(self.air)
self.timer.generateWithRequired(self.zoneId)
def createClassicChars(self):
self.classicCharChip = DistributedChipAI.DistributedChipAI(self.air)
self.classicCharChip.generateWithRequired(self.zoneId)
self.classicCharChip.start()
self.classicCharDale = DistributedDaleAI.DistributedDaleAI(self.air, self.classicCharChip.doId)
self.classicCharDale.generateWithRequired(self.zoneId)
self.classicCharDale.start()
self.classicCharChip.setDaleId(self.classicCharDale.doId)
def findPicnicTables(self, dnaGroup, zoneId, area, overrideDNAZone=False):
picnicTables = []
if isinstance(dnaGroup, DNAGroup) and ('picnic_table' in dnaGroup.getName()):

View file

@ -1,4 +1,3 @@
from toontown.classicchars import DistributedMickeyAI
from toontown.hood import HoodAI
from toontown.safezone import ButterflyGlobals
from toontown.safezone import DistributedButterflyAI
@ -17,7 +16,6 @@ class TTHoodAI(HoodAI.HoodAI):
ToontownGlobals.ToontownCentral)
self.trolley = None
self.classicChar = None
self.startup()
@ -26,9 +24,6 @@ class TTHoodAI(HoodAI.HoodAI):
if simbase.config.GetBool('want-minigames', True):
self.createTrolley()
if simbase.config.GetBool('want-classic-chars', True):
if simbase.config.GetBool('want-mickey', True):
self.createClassicChar()
if simbase.config.GetBool('want-butterflies', True):
self.createButterflies()
@ -56,11 +51,6 @@ class TTHoodAI(HoodAI.HoodAI):
self.trolley.generateWithRequired(self.zoneId)
self.trolley.start()
def createClassicChar(self):
self.classicChar = DistributedMickeyAI.DistributedMickeyAI(self.air)
self.classicChar.generateWithRequired(self.zoneId)
self.classicChar.start()
def createButterflies(self):
ButterflyGlobals.generateIndexes(self.zoneId, ButterflyGlobals.TTC)
for i in xrange(0, ButterflyGlobals.NUM_BUTTERFLY_AREAS[ButterflyGlobals.TTC]):

View file

@ -10,8 +10,6 @@ from pandac.PandaModules import *
import random, BodyShop, ColorShop, GenderShop, MakeClothesGUI, TrackShop, NameShop
from MakeAToonGlobals import *
from otp.avatar import Avatar
from toontown.char import Char
from toontown.char import CharDNA
from toontown.chat.ChatGlobals import *
from toontown.distributed.ToontownMsgTypes import *
from toontown.toon import LocalToon
@ -429,11 +427,6 @@ class MakeAToon(StateData.StateData):
elif self.shop == NAMESHOP:
self.fsm.request('TrackShop')
def charSez(self, char, statement, dialogue = None):
import pdb
pdb.set_trace()
char.setChatAbsolute(statement, CFSpeech, dialogue)
def enterInit(self):
pass

View file

@ -10,10 +10,9 @@ import string
import ArrowKeys
from DistributedMinigame import *
import PatternGameGlobals
from toontown.char import Char
from toontown.char import CharDNA
from toontown.chat.ChatGlobals import *
from toontown.nametag.NametagGlobals import *
from toontown.toon import NPCToons
from toontown.toon import ToonHead
from toontown.toonbase import TTLocalizer
from toontown.toonbase import ToontownGlobals
@ -37,10 +36,6 @@ class DistributedPatternGame(DistributedMinigame):
strWaitingOtherPlayers = TTLocalizer.PatternGameWaitingOtherPlayers
strPleaseWait = TTLocalizer.PatternGamePleaseWait
strRound = TTLocalizer.PatternGameRound
minnieAnimNames = ['up',
'left',
'down',
'right']
toonAnimNames = ['up',
'left',
'down',
@ -129,18 +124,13 @@ class DistributedPatternGame(DistributedMinigame):
minnieX.removeNode()
minnieCircle.removeNode()
matchingGameGui.removeNode()
self.minnie = Char.Char()
m = self.minnie
dna = CharDNA.CharDNA()
dna.newChar('mn')
m.setDNA(dna)
m.setName(TTLocalizer.Minnie)
m.reparentTo(hidden)
self.blinky = NPCToons.createLocalNPC(7010)
self.blinky.reparentTo(hidden)
self.backRowHome = Point3(3, 11, 0)
self.backRowXSpacing = 1.8
self.frontRowHome = Point3(0, 18, 0)
self.frontRowXSpacing = 3.0
self.stdNumDanceStepPingFrames = self.minnie.getNumFrames(self.minnieAnimNames[0])
self.stdNumDanceStepPingFrames = self.blinky.getNumFrames(self.toonAnimNames[0])
self.stdNumDanceStepPingPongFrames = self.__numPingPongFrames(self.stdNumDanceStepPingFrames)
self.buttonPressDelayPercent = (self.stdNumDanceStepPingFrames - 1.0) / self.stdNumDanceStepPingPongFrames
self.animPlayRates = []
@ -197,8 +187,8 @@ class DistributedPatternGame(DistributedMinigame):
del self.statusBalls
self.room.removeNode()
del self.room
self.minnie.delete()
del self.minnie
self.blinky.delete()
del self.blinky
self.removeChildGameFSM(self.gameFSM)
del self.gameFSM
@ -215,18 +205,12 @@ class DistributedPatternGame(DistributedMinigame):
self.room.reparentTo(render)
self.room.setPosHpr(0.0, 18.39, -ToontownGlobals.FloorOffset, 0.0, 0.0, 0.0)
self.room.setScale(1)
for anim in self.minnieAnimNames:
self.minnie.pose(anim, 0)
for anim in self.toonAnimNames:
self.lt.pose(anim, 0)
self.minnieAnimSpeedMult = {}
self.toonAnimSpeedMult = {}
for anim in self.minnieAnimNames:
numFrames = self.minnie.getNumFrames(anim)
self.minnieAnimSpeedMult[anim] = float(self.__numPingPongFrames(numFrames)) / float(self.stdNumDanceStepPingPongFrames)
for anim in self.toonAnimNames:
numFrames = self.lt.getNumFrames(anim)
self.toonAnimSpeedMult[anim] = float(self.__numPingPongFrames(numFrames)) / float(self.stdNumDanceStepPingPongFrames)
@ -245,7 +229,7 @@ class DistributedPatternGame(DistributedMinigame):
for k in xrange(0, 2):
self.arrowDict['lt'][k].setBillboardAxis()
self.arrowDict['lt'][k].setBin('fixed', 100)
self.arrowDict['lt'][k].reparentTo(jj)
self.arrowDict['lt'][k].reparentTo(self.lt.nametag3d)
if k == 0:
self.arrowDict['lt'][k].setScale(2.5)
self.arrowDict['lt'][k].setColor(self.arrowColor)
@ -254,25 +238,20 @@ class DistributedPatternGame(DistributedMinigame):
self.arrowDict['lt'][k].setColor(self.xColor)
self.arrowDict['lt'][k].setPos(0, 0, 1)
self.formatStatusBalls(self.arrowDict['lt'][2], jj)
m = self.minnie
m.reparentTo(render)
m.setPos(-1.6, 20, 0)
m.setScale(1)
self.makeToonLookatCamera(m)
m.loop('neutral')
m.startBlink()
self.minnie.nametag.manage(base.marginManager)
self.minnie.startEarTask()
self.minnie.setPickable(0)
self.minnie.nametag.getNametag3d().setChatWordWrap(8)
self.formatStatusBalls(self.arrowDict['lt'][2], self.lt.nametag3d)
self.blinky.reparentTo(render)
self.blinky.setPos(-1.6, 20, 0)
self.blinky.setScale(1)
self.makeToonLookatCamera(self.blinky)
self.blinky.loop('neutral')
self.blinky.nametag.manage(base.marginManager)
self.blinky.nametag.getNametag3d().setChatWordWrap(8)
self.arrowDict['m'] = [self.arrows.pop(), self.xs.pop()]
jj = self.minnie.nametag3d
for k in xrange(0, 2):
self.arrowDict['m'][k].setBillboardAxis()
self.arrowDict['m'][k].setBin('fixed', 100)
self.arrowDict['m'][k].setColor(self.arrowColor)
self.arrowDict['m'][k].reparentTo(jj)
self.arrowDict['m'][k].reparentTo(self.blinky.nametag3d)
self.arrowDict['m'][k].setScale(4)
self.arrowDict['m'][k].setPos(0, 0, 1.7)
@ -288,11 +267,9 @@ class DistributedPatternGame(DistributedMinigame):
del self.arrowKeys
self.room.reparentTo(hidden)
self.roundText.hide()
self.minnie.nametag.unmanage(base.marginManager)
self.minnie.stopEarTask()
self.minnie.stop()
self.minnie.stopBlink()
self.minnie.reparentTo(hidden)
self.blinky.nametag.unmanage(base.marginManager)
self.blinky.stop()
self.blinky.reparentTo(hidden)
self.lt.setScale(1)
for avId in self.remoteAvIdList:
toon = self.getAvatar(avId)
@ -410,16 +387,12 @@ class DistributedPatternGame(DistributedMinigame):
def getDanceStepDuration(self):
numFrames = self.stdNumDanceStepPingPongFrames
return numFrames / abs(self.animPlayRate * self.minnieAnimSpeedMult[self.minnieAnimNames[0]] * self.minnie.getFrameRate(self.minnieAnimNames[0]))
return numFrames / abs(self.animPlayRate * self.toonAnimSpeedMult[self.toonAnimNames[0]] * self.blinky.getFrameRate(self.toonAnimNames[0]))
def __getDanceStepAnimTrack(self, toon, anim, speedScale):
numFrames = toon.getNumFrames(anim)
return Sequence(Func(toon.pingpong, anim, fromFrame=0, toFrame=numFrames - 1), Wait(self.getDanceStepDuration()))
def __getMinnieDanceStepAnimTrack(self, minnie, direction):
animName = self.minnieAnimNames[direction]
return self.__getDanceStepAnimTrack(minnie, animName, self.minnieAnimSpeedMult[animName])
def __getToonDanceStepAnimTrack(self, toon, direction):
animName = self.toonAnimNames[direction]
return self.__getDanceStepAnimTrack(toon, animName, self.toonAnimSpeedMult[animName])
@ -516,8 +489,6 @@ class DistributedPatternGame(DistributedMinigame):
def getDanceSequenceAnimTrack(self, toon, pattern):
getDanceStepTrack = self.__getToonDanceStepAnimTrack
if toon == self.minnie:
getDanceStepTrack = self.__getMinnieDanceStepAnimTrack
tracks = Sequence()
for direction in pattern:
tracks.append(getDanceStepTrack(toon, direction))
@ -545,14 +516,12 @@ class DistributedPatternGame(DistributedMinigame):
index = self.avIdList.index(avId)
return self.__getRowPos(self.frontRowHome, self.frontRowXSpacing, index, len(self.avIdList))
def __setMinnieChat(self, str, giggle):
def __setBlinkyChat(self, str, giggle):
str = str.replace('%s', self.getAvatar(self.localAvId).getName())
self.minnie.setChatAbsolute(str, CFSpeech)
if giggle:
self.minnie.playDialogue('statementA', 1)
self.blinky.setChatAbsolute(str, CFSpeech)
def __clearMinnieChat(self):
self.minnie.clearChat()
def __clearBlinkyChat(self):
self.blinky.clearChat()
def enterOff(self):
self.notify.debug('enterOff')
@ -587,14 +556,14 @@ class DistributedPatternGame(DistributedMinigame):
for anim in self.toonAnimNames:
toon.setPlayRate(self.animPlayRate * self.toonAnimSpeedMult[anim], anim)
for anim in self.minnieAnimNames:
self.minnie.setPlayRate(self.animPlayRate * self.minnieAnimSpeedMult[anim], anim)
for anim in self.toonAnimNames:
self.blinky.setPlayRate(self.animPlayRate * self.toonAnimSpeedMult[anim], anim)
text = self.strWatch
danceTrack = self.getDanceSequenceAnimTrack(self.minnie, self.__serverPattern)
danceTrack = self.getDanceSequenceAnimTrack(self.blinky, self.__serverPattern)
arrowTrack = self.getDanceArrowAnimTrack('m', self.__serverPattern, 0)
soundTrack = self.getDanceSequenceButtonSoundTrack(self.__serverPattern)
self.showTrack = Sequence(Func(self.__setMinnieChat, text, 1), Wait(0.5), Parallel(danceTrack, soundTrack, arrowTrack), Wait(0.2), Func(self.__clearMinnieChat), Func(self.gameFSM.request, 'getUserInput'))
self.showTrack = Sequence(Func(self.__setBlinkyChat, text, 1), Wait(0.5), Parallel(danceTrack, soundTrack, arrowTrack), Wait(0.2), Func(self.__clearBlinkyChat), Func(self.gameFSM.request, 'getUserInput'))
self.showTrack.start()
def exitShowServerPattern(self):
@ -636,7 +605,7 @@ class DistributedPatternGame(DistributedMinigame):
self.showStatusBalls(avId)
self.__otherToonIndex[avId] = 0
self.setupTrack = Sequence(Func(self.__setMinnieChat, self.strGo, 0), Func(self.setText, self.roundText, TTLocalizer.PatternGameGo), Func(self.roundText.setScale, 0.3), Func(enableKeys), Func(startTimer), Wait(0.8), Func(self.__clearMinnieChat), Func(self.setText, self.roundText, ' '), Func(self.roundText.setScale, 0.12), Func(self.setTextFG, self.roundText, self.normalTextColor))
self.setupTrack = Sequence(Func(self.__setBlinkyChat, self.strGo, 0), Func(self.setText, self.roundText, TTLocalizer.PatternGameGo), Func(self.roundText.setScale, 0.3), Func(enableKeys), Func(startTimer), Wait(0.8), Func(self.__clearBlinkyChat), Func(self.setText, self.roundText, ' '), Func(self.roundText.setScale, 0.12), Func(self.setTextFG, self.roundText, self.normalTextColor))
self.setupTrack.start()
return
@ -716,7 +685,7 @@ class DistributedPatternGame(DistributedMinigame):
self.proceedTrack.pause()
del self.setupTrack
del self.proceedTrack
self.__clearMinnieChat()
self.__clearBlinkyChat()
def enterWaitForPlayerPatterns(self):
self.notify.debug('enterWaitForPlayerPatterns')
@ -782,7 +751,7 @@ class DistributedPatternGame(DistributedMinigame):
sound = self.incorrectSound
text = self.strWrong
soundTrack = Sequence(Func(base.playSfx, sound), Wait(1.6))
textTrack = Sequence(Wait(0.2), Func(self.__setMinnieChat, text, 0), Wait(1.3), Func(self.__clearMinnieChat))
textTrack = Sequence(Wait(0.2), Func(self.__setBlinkyChat, text, 0), Wait(1.3), Func(self.__clearBlinkyChat))
self.playBackPatternsTrack = Sequence(Parallel(soundTrack, textTrack, jumpTrack), Func(self.gameFSM.request, 'checkGameOver'))
self.playBackPatternsTrack.start()
@ -806,9 +775,9 @@ class DistributedPatternGame(DistributedMinigame):
delay = 2.2
if self.celebrate:
text = TTLocalizer.PatternGameImprov
self.__winTrack = Sequence(Func(self.__setMinnieChat, text, 1), Func(base.playSfx, self.perfectSound), Sequence(self.returnCelebrationIntervals(1)), Sequence(self.returnCelebrationIntervals(0)), Func(self.__clearMinnieChat), Func(self.gameOver))
self.__winTrack = Sequence(Func(self.__setBlinkyChat, text, 1), Func(base.playSfx, self.perfectSound), Sequence(self.returnCelebrationIntervals(1)), Sequence(self.returnCelebrationIntervals(0)), Func(self.__clearBlinkyChat), Func(self.gameOver))
else:
self.__winTrack = Sequence(Func(self.__setMinnieChat, text, 1), Func(base.playSfx, sound), Wait(delay), Func(self.__clearMinnieChat), Func(self.gameOver))
self.__winTrack = Sequence(Func(self.__setBlinkyChat, text, 1), Func(base.playSfx, sound), Wait(delay), Func(self.__clearBlinkyChat), Func(self.gameOver))
self.__winTrack.start()
return

View file

@ -10,7 +10,6 @@ from toontown.toonbase import ToontownTimer
from toontown.toon import ToonHead
from toontown.suit import SuitDNA
from toontown.suit import Suit
from toontown.char import Char
import ArrowKeys
import random
from toontown.toonbase import ToontownGlobals

View file

@ -14,8 +14,6 @@ import tokenize
import BlinkingArrows
from otp.speedchat import SpeedChatGlobals
from toontown.ai import DistributedBlackCatMgr
from toontown.char import Char
from toontown.char import CharDNA
from toontown.chat.ChatGlobals import *
from toontown.suit import Suit
from toontown.suit import SuitDNA
@ -136,7 +134,6 @@ class NPCMoviePlayer(DirectObject.DirectObject):
self.npc = npc
self.privateVarDict = {}
self.toonHeads = {}
self.chars = []
self.uniqueId = 'scriptMovie_' + str(self.scriptId) + '_' + str(toon.getDoId()) + '_' + str(npc.getDoId())
self.setVar('toon', self.toon)
self.setVar('npc', self.npc)
@ -177,9 +174,6 @@ class NPCMoviePlayer(DirectObject.DirectObject):
for toonHeadFrame in self.toonHeads.values():
toonHeadFrame.destroy()
while self.chars:
self.__unloadChar(self.chars[0])
del self.toonHeads
del self.privateVarDict
del self.chapterDict
@ -188,13 +182,6 @@ class NPCMoviePlayer(DirectObject.DirectObject):
del self.timeoutTrack
return
def __unloadChar(self, char):
char.removeActive()
if char.style.name == 'mk' or char.style.name == 'mn':
char.stopEarTask()
char.delete()
self.chars.remove(char)
def timeout(self, fFinish = 0):
if self.timeoutTrack:
if fFinish:
@ -293,41 +280,11 @@ class NPCMoviePlayer(DirectObject.DirectObject):
chapterList = []
self.currentEvent = nextEvent
continue
elif command == 'CC_CHAT_CONFIRM':
if uponTimeout:
self.notify.error('CC_CHAT_CONFIRM not allowed in an UPON_TIMEOUT')
avatarName = line[1]
avatar = self.getVar(avatarName)
nextEvent = avatar.uniqueName('doneChatPage')
iList.append(Func(self.acceptOnce, nextEvent, self.playNextChapter, [nextEvent]))
iList.append(self.parseCCChatConfirm(line))
self.closePreviousChapter(iList)
chapterList = []
self.currentEvent = nextEvent
continue
elif command == 'CC_CHAT_TO_CONFIRM':
if uponTimeout:
self.notify.error('CC_CHAT_TO_CONFIRM not allowed in an UPON_TIMEOUT')
avatarName = line[1]
avatar = self.getVar(avatarName)
nextEvent = avatar.uniqueName('doneChatPage')
iList.append(Func(self.acceptOnce, nextEvent, self.playNextChapter, [nextEvent]))
iList.append(self.parseCCChatToConfirm(line))
self.closePreviousChapter(iList)
chapterList = []
self.currentEvent = nextEvent
continue
if self.isLocalToon:
if command == 'LOAD':
self.parseLoad(line)
elif command == 'LOAD_SFX':
self.parseLoadSfx(line)
elif command == 'LOAD_CHAR':
self.parseLoadChar(line)
elif command == 'LOAD_CLASSIC_CHAR':
self.parseLoadClassicChar(line)
elif command == 'UNLOAD_CHAR':
iList.append(self.parseUnloadChar(line))
elif command == 'LOAD_SUIT':
self.parseLoadSuit(line)
elif command == 'SET':
@ -486,44 +443,6 @@ class NPCMoviePlayer(DirectObject.DirectObject):
sfx = base.loadSfx(fileName)
self.setVar(varName, sfx)
def parseLoadChar(self, line):
token, name, charType = line
char = Char.Char()
dna = CharDNA.CharDNA()
dna.newChar(charType)
char.setDNA(dna)
if charType == 'mk' or charType == 'mn':
char.startEarTask()
char.nametag.manage(base.marginManager)
char.addActive()
char.hideName()
self.setVar(name, char)
def parseLoadClassicChar(self, line):
token, name = line
char = Char.Char()
dna = CharDNA.CharDNA()
if self.toon.getStyle().gender == 'm':
charType = 'mk'
else:
charType = 'mn'
dna.newChar(charType)
char.setDNA(dna)
char.startEarTask()
char.nametag.manage(base.marginManager)
char.addActive()
char.hideName()
self.setVar(name, char)
self.chars.append(char)
def parseUnloadChar(self, line):
token, name = line
char = self.getVar(name)
track = Sequence()
track.append(Func(self.__unloadChar, char))
track.append(Func(self.delVar, name))
return track
def parseLoadSuit(self, line):
token, name, suitType = line
suit = Suit.Suit()
@ -703,33 +622,6 @@ class NPCMoviePlayer(DirectObject.DirectObject):
quitButton, extraChatFlags, dialogueList = self.parseExtraChatArgs(line[4:])
return Func(avatar.setLocalPageChat, chatString, quitButton, extraChatFlags, dialogueList)
def parseCCChatConfirm(self, line):
lineLength = len(line)
avatarName = line[1]
avatar = self.getVar(avatarName)
if self.toon.getStyle().gender == 'm':
chatString = eval('TTLocalizer.' + line[2] % 'Mickey')
else:
chatString = eval('TTLocalizer.' + line[2] % 'Minnie')
quitButton, extraChatFlags, dialogueList = self.parseExtraChatArgs(line[3:])
return Func(avatar.setLocalPageChat, chatString, quitButton, extraChatFlags, dialogueList)
def parseCCChatToConfirm(self, line):
lineLength = len(line)
avatarKey = line[1]
avatar = self.getVar(avatarKey)
toAvatarKey = line[2]
toAvatar = self.getVar(toAvatarKey)
localizerAvatarName = toAvatar.getName().capitalize()
toAvatarName = eval('TTLocalizer.' + localizerAvatarName)
if self.toon.getStyle().gender == 'm':
chatString = eval('TTLocalizer.' + line[3] % 'Mickey')
else:
chatString = eval('TTLocalizer.' + line[3] % 'Minnie')
chatString = chatString.replace('%s', toAvatarName)
quitButton, extraChatFlags, dialogueList = self.parseExtraChatArgs(line[4:])
return Func(avatar.setLocalPageChat, chatString, quitButton, extraChatFlags, dialogueList)
def parsePlaySfx(self, line):
if len(line) == 2:
token, sfxName = line

View file

@ -1,10 +1,6 @@
from direct.task.Task import Task
import random
from toontown.classicchars import CCharPaths
from toontown.safezone import Playground
from toontown.toonbase import TTLocalizer
import random
class BRPlayground(Playground.Playground):
def enter(self, requestStatus):
@ -15,9 +11,6 @@ class BRPlayground(Playground.Playground):
Playground.Playground.exit(self)
taskMgr.remove('BR-wind')
def showPaths(self):
self.showPathPoints(CCharPaths.getPaths(TTLocalizer.Pluto))
def __windTask(self, task):
base.playSfx(random.choice(self.loader.windSound))
time = random.random() * 8.0 + 1

View file

@ -1,10 +1,6 @@
from direct.task import Task
import random
from toontown.classicchars import CCharPaths
from toontown.safezone import Playground
from toontown.toonbase import TTLocalizer
import random
class DGPlayground(Playground.Playground):
def enter(self, requestStatus):
@ -15,9 +11,6 @@ class DGPlayground(Playground.Playground):
Playground.Playground.exit(self)
taskMgr.remove('DG-birds')
def showPaths(self):
self.showPathPoints(CCharPaths.getPaths(TTLocalizer.Goofy))
def __birds(self, task):
base.playSfx(random.choice(self.loader.birdSound))
time = random.random() * 20.0 + 1

View file

@ -1,8 +0,0 @@
from toontown.classicchars import CCharPaths
from toontown.safezone import Playground
from toontown.toonbase import TTLocalizer
class DLPlayground(Playground.Playground):
def showPaths(self):
self.showPathPoints(CCharPaths.getPaths(TTLocalizer.Donald))

View file

@ -1,11 +1,11 @@
from toontown.safezone import DLPlayground
from toontown.safezone import Playground
from toontown.safezone import SafeZoneLoader
class DLSafeZoneLoader(SafeZoneLoader.SafeZoneLoader):
def __init__(self, hood, parentFSM, doneEvent):
SafeZoneLoader.SafeZoneLoader.__init__(self, hood, parentFSM, doneEvent)
self.playgroundClass = DLPlayground.DLPlayground
self.playgroundClass = Playground.Playground
self.musicFile = 'phase_8/audio/bgm/DL_nbrhood.ogg'
self.activityMusicFile = 'phase_8/audio/bgm/DL_SZ_activity.ogg'
self.dnaFile = 'phase_8/dna/donalds_dreamland_sz.pdna'

View file

@ -1,7 +1,6 @@
from pandac.PandaModules import *
from toontown.toonbase import ToontownGlobals
import Playground
from toontown.launcher import DownloadForceAcknowledge
from toontown.building import Elevator
from toontown.toontowngui import TTDialog
from toontown.toonbase import TTLocalizer
@ -107,9 +106,4 @@ class GSPlayground(Playground.Playground):
self.doneStatus = doneStatus
messenger.send(self.doneEvent)
else:
self.notify.error('Unknown mode: ' + where + ' in handleStartingBlockDone')
def showPaths(self):
from toontown.classicchars import CCharPaths
from toontown.toonbase import TTLocalizer
self.showPathPoints(CCharPaths.getPaths(TTLocalizer.Goofy, 1))
self.notify.error('Unknown mode: ' + where + ' in handleStartingBlockDone')

View file

@ -1,10 +1,7 @@
from toontown.classicchars import CCharPaths
from direct.fsm import ClassicFSM, State
import random
from toontown.safezone import Playground
from toontown.toonbase import TTLocalizer
from toontown.toonbase import ToontownGlobals
import random
class MMPlayground(Playground.Playground):
def __init__(self, loader, parentFSM, doneEvent):
@ -12,9 +9,6 @@ class MMPlayground(Playground.Playground):
self.activityFsm = ClassicFSM.ClassicFSM('Activity', [State.State('off', self.enterOff, self.exitOff, ['OnPiano']), State.State('OnPiano', self.enterOnPiano, self.exitOnPiano, ['off'])], 'off', 'off')
self.activityFsm.enterInitialState()
def showPaths(self):
self.showPathPoints(CCharPaths.getPaths(TTLocalizer.Minnie))
def enterOff(self):
return None

View file

@ -175,8 +175,3 @@ class OZPlayground(Playground.Playground):
self.fsm.request('walk')
else:
self.notify.error('Unknown mode: ' + mode + ' in handlePicnicBasketDone')
def showPaths(self):
from toontown.classicchars import CCharPaths
from toontown.toonbase import TTLocalizer
self.showPathPoints(CCharPaths.getPaths(TTLocalizer.Chip))

View file

@ -327,27 +327,6 @@ class Playground(Place.Place):
def hidePaths(self):
self.hideDebugPointText()
def showPathPoints(self, paths, waypoints = None):
self.hideDebugPointText()
lines = LineSegs()
lines.setColor(1, 0, 0, 1)
from toontown.classicchars import CCharPaths
for name, pointDef in paths.items():
self.showDebugPointText(name, pointDef[0])
for connectTo in pointDef[1]:
toDef = paths[connectTo]
fromP = pointDef[0]
toP = toDef[0]
lines.moveTo(fromP[0], fromP[1], fromP[2] + 2.0)
wpList = CCharPaths.getWayPoints(name, connectTo, paths, waypoints)
for wp in wpList:
lines.drawTo(wp[0], wp[1], wp[2] + 2.0)
self.showDebugPointText('*', wp)
lines.drawTo(toP[0], toP[1], toP[2] + 2.0)
self.debugText.attachNewNode(lines.create())
def hideDebugPointText(self):
if hasattr(self, 'debugText'):
children = self.debugText.getChildren()

View file

@ -1,10 +1,6 @@
from direct.task.Task import Task
import random
from toontown.classicchars import CCharPaths
from toontown.safezone import Playground
from toontown.toonbase import TTLocalizer
import random
class TTPlayground(Playground.Playground):
def enter(self, requestStatus):
@ -15,9 +11,6 @@ class TTPlayground(Playground.Playground):
Playground.Playground.exit(self)
taskMgr.remove('TT-birds')
def showPaths(self):
self.showPathPoints(CCharPaths.getPaths(TTLocalizer.Mickey))
def __birds(self, task):
base.playSfx(random.choice(self.loader.birdSound))
time = random.random() * 20.0 + 1

View file

@ -11544,6 +11544,25 @@ NPCToonDict = {20000: (-1,
'm',
0,
NPC_REGULAR),
7010: (-1,
lnames[7010],
('dss',
'ms',
's',
'm',
13,
0,
13,
13,
4,
4,
4,
4,
1,
4),
'm',
0,
NPC_REGULAR),
# Magic Cat SOS
# 5 Stars, Sound SOS, Bikehorn 255 damage. "The Bikehorn of Death".
91917: (-1,

View file

@ -56,24 +56,7 @@ GM_NAMES = ('TOON COUNCIL',
'RESISTANCE RANGER',
'GC')
ProductPrefix = 'TT'
Mickey = 'Mickey'
VampireMickey = 'VampireMickey'
Minnie = 'Minnie'
WitchMinnie = 'WitchMinnie'
Donald = 'Donald'
DonaldDock = 'DonaldDock'
FrankenDonald = 'FrankenDonald'
Daisy = 'Daisy'
SockHopDaisy = 'SockHopDaisy'
Goofy = 'Goofy'
SuperGoofy = 'SuperGoofy'
Pluto = 'Pluto'
WesternPluto = 'WesternPluto'
Flippy = 'Flippy'
Chip = 'Chip'
Dale = 'Dale'
JailbirdDale = 'JailbirdDale'
PoliceChip = 'PoliceChip'
lTheBrrrgh = 'The Brrrgh'
lDaisyGardens = 'Daisy Gardens'
lDonaldsDock = "Donald's Dock"
@ -174,7 +157,6 @@ lNo = 'No'
SleepAutoReply = '%s is sleeping right now.'
lHQOfficerF = 'HQ Officer'
lHQOfficerM = 'HQ Officer'
MickeyMouse = 'Mickey Mouse'
AIStartDefaultDistrict = 'Sillyville'
Cog = 'Cog'
Cogs = 'Cogs'
@ -2129,15 +2111,15 @@ ToonHealJokes = [['What goes TICK-TICK-TICK-WOOF?', 'A watchdog! '],
['Why are elephants big and gray?', "Because if they were small and yellow they'd be canaries."],
['If athletes get tennis elbow what do astronauts get?', 'Missile toe.'],
['Did you hear about the man who hated Santa?', 'He suffered from Claustrophobia.'],
['Why did ' + Donald + ' sprinkle sugar on his pillow?', 'Because he wanted to have sweet dreams.'],
['Why did ' + Goofy + ' take his comb to the dentist?', 'Because it had lost all its teeth.'],
['Why did ' + Goofy + ' wear his shirt in the bath?', 'Because the label said wash and wear.'],
['Why did Joey sprinkle sugar on his pillow?', 'Because he wanted to have sweet dreams.'],
['Why did Goshi take his comb to the dentist?', 'Because it had lost all its teeth.'],
['Why did Denial wear his shirt in the bath?', 'Because the label said wash and wear.'],
['Why did the dirty chicken cross the road?', 'For some fowl purpose.'],
["Why didn't the skeleton go to the party?", 'He had no body to go with.'],
['Why did the burglar take a shower?', 'To make a clean getaway.'],
['Why does a sheep have a woolly coat?', "Because he'd look silly in a plastic one."],
['Why do potatoes argue all the time?', "They can't see eye to eye."],
['Why did ' + Pluto + ' sleep with a banana peel?', 'So he could slip out of bed in the morning.'],
['Why did Quackity sleep with a banana peel?', 'So he could slip out of bed in the morning.'],
['Why did the mouse wear brown sneakers?', 'His white ones were in the wash.'],
['Why are false teeth like stars?', 'They come out at night.'],
['Why are Saturday and Sunday so strong?', 'Because the others are weekdays.'],
@ -2147,7 +2129,7 @@ ToonHealJokes = [['What goes TICK-TICK-TICK-WOOF?', 'A watchdog! '],
['What do you get if you cross a dog with a phone?', 'A golden receiver.'],
['What do you get if you cross an elephant with a shark?', 'Swimming trunks with sharp teeth.'],
['What did the tablecloth say to the table?', "Don't move, I've got you covered."],
['Did you hear about the time ' + Goofy + ' ate a candle?', 'He wanted a light snack.'],
['Did you hear about the time Nick ate a candle?', 'He wanted a light snack.'],
['What did the balloon say to the pin?', 'Hi Buster.'],
['What did the big chimney say to the little chimney?', "You're too young to smoke."],
['What did the carpet say to the floor?', 'I got you covered.'],
@ -2214,8 +2196,7 @@ ToonHealJokes = [['What goes TICK-TICK-TICK-WOOF?', 'A watchdog! '],
['What do you get if you cross a hyena with a mynah bird?', 'An animal that laughs at its own jokes.'],
['What do you get if you cross a railway engine with a stick of gum?', 'A chew-chew train.'],
['What would you get if you crossed an elephant with a computer?', 'A big know-it-all.'],
['What would you get if you crossed an elephant with a skunk?', 'A big stinker.'],
['Why did ' + MickeyMouse + ' take a trip to outer space?', 'He wanted to find ' + Pluto + '.']]
['What would you get if you crossed an elephant with a skunk?', 'A big stinker.']]
MovieHealLaughterMisses = ('hmm',
'heh',
'ha',
@ -3123,7 +3104,7 @@ KnockKnockJokes = [['Who', "Bad echo in here, isn't there?"],
['Cozy', "Cozy who's knocking will you?"],
['Sam', 'Sam person who knocked on the door last time.'],
['Fozzie', 'Fozzie hundredth time, my name is ' + Flippy + '.'],
['Deduct', Donald + ' Deduct.'],
['Deduct', 'Donald Deduct.'],
['Max', 'Max no difference, just open the door.'],
['N.E.', 'N.E. body you like, let me in.'],
['Amos', 'Amos-quito bit me.'],
@ -3219,684 +3200,6 @@ KnockKnockJokes = [['Who', "Bad echo in here, isn't there?"],
['Ida', "It's not Ida who, it's Idaho."],
['Zippy', 'Mrs. Zippy.'],
['Yukon', 'Yukon go away and come back another time.']]
SharedChatterGreetings = ['Hi, %!',
'Yoo-hoo %, nice to see you.',
"I'm glad you're here today!",
'Well, hello there, %.']
SharedChatterComments = ["That's a great name, %.",
'I like your name.',
'Watch out for the ' + Cogs + '.',
'Looks like the trolley is coming!',
'I need to play a trolley game to get some pies!',
'Sometimes I play trolley games just to eat the fruit pie!',
'Whew, I just stopped a bunch of ' + Cogs + '. I need a rest!',
'Yikes, some of those ' + Cogs + ' are big guys!',
"You look like you're having fun.",
"Oh boy, I'm having a good day.",
"I like what you're wearing.",
"I think I'll go fishing this afternoon.",
'Have fun in my neighborhood.',
'I hope you are enjoying your stay in Toontown!',
"I heard it's snowing at the Brrrgh.",
'Have you ridden the trolley today?',
'I like to meet new people.',
'Wow, there are lots of ' + Cogs + ' in the Brrrgh.',
'I love to play tag. Do you?',
'Trolley games are fun to play.',
'I like to make people laugh.',
"It's fun helping my friends.",
"A-hem, are you lost? Don't forget your map is in your shticker Book.",
'Try not to get tied up in the ' + Cogs + "' Red Tape.",
'I hear ' + Daisy + ' has planted some new flowers in her garden.',
'If you press the Page Up key, you can look up!',
'If you help take over Cog buildings, you can earn a bronze star!',
'If you press the Tab key, you can see different views of your surroundings!',
'If you press the Ctrl key, you can jump!']
SharedChatterGoodbyes = ['I have to go now, bye!',
"I think I'll go play a trolley game.",
"Well, so long. I'll be seeing you, %!",
"I'd better hurry and get to work stopping those " + Cogs + '.',
"It's time for me to get going.",
'Sorry, but I have to go.',
'Good-bye.',
'See you later, %!',
"I think I'm going to go practice tossing cupcakes.",
"I'm going to join a group and stop some " + Cogs + '.',
'It was nice to see you today, %.',
"I have a lot to do today. I'd better get busy."]
MickeyChatter = (['Welcome to ' + lToontownCentral + '.', 'Hi, my name is ' + Mickey + ". What's yours?"], ['Hey, have you seen ' + Donald + '?',
"I'm going to go watch the fog roll in at " + lDonaldsDock + '.',
'If you see my pal ' + Goofy + ', say hi to him for me.',
'I hear ' + Daisy + ' has planted some new flowers in her garden.'], ["I'm going to MelodyLand to see " + Minnie + '!',
"Gosh, I'm late for my date with " + Minnie + '!',
"Looks like it's time for " + Pluto + "'s dinner.",
"I think I'll go swimming at " + lDonaldsDock + '.',
"It's time for a nap. I'm going to Dreamland."])
WinterMickeyCChatter = (["Hi, I'm Merry Mickey!",
'Welcome to Tinseltown... I mean, Toontown!',
'Happy Winter Holiday!',
'Happy Winter Holiday, %'], ['Sing your seasonal cheer at Joy Buzzers to the World and Joy is sure to return the favor!',
'Golly, these halls sure are decked!',
'Sing your seasonal cheer at Joy Buzzers to the World and Joy is sure to return the favor!',
'Just look at those tree lights! What a sight!',
'Sing your seasonal cheer at Joy Buzzers to the World and Joy is sure to return the favor!',
'Not a creature is stirring, except this mouse!',
'Sing your seasonal cheer at Joy Buzzers to the World and Joy is sure to return the favor!',
'I love this time of year!',
'Sing your seasonal cheer at Joy Buzzers to the World and Joy is sure to return the favor!',
"I'm feeling jolly, how about you?",
'Sing your seasonal cheer at Joy Buzzers to the World and Joy is sure to return the favor!',
'Know any good carols?',
'Sing your seasonal cheer at Joy Buzzers to the World and Joy is sure to return the favor!',
'Oh boy! I love Winter Holiday!',
'Sing your seasonal cheer at Joy Buzzers to the World and Joy is sure to return the favor!',
"I think I'll trade my gloves for mittens!"], ['Have a happy Winter Holiday!',
'Warm wishes to you!',
'Shucks, sorry you have to go. So long!',
"I'm going caroling with Minnie!"])
ValentinesMickeyChatter = (["Hi, I'm Mickey!",
'Welcome to ValenToontown Central!',
"Happy ValenToon's Day!",
"Happy ValenToon's Day, %"], ['Love is in the air! And butterflies!',
'Those hearts are good for Laff boosts!',
'I hope Minnie likes what I got her!',
"The Cattlelog has lots of ValenToon's Day gifts!",
"Throw a ValenToon's Day party!",
'Show the Cogs you love them with a pie in the face!',
"I'm taking Minnie out to the Kooky Cafe!",
'Will Minnie want chocolates or flowers?'], ['I loved having you visit!', "Tell Minnie I'll pick her up soon!"])
WinterMickeyDChatter = (["Hi, I'm Merry Mickey!",
'Welcome to Tinseltown... I mean, Toontown!',
'Happy Winter Holiday!',
'Happy Winter Holiday, %'], ['Golly, these halls sure are decked!',
'Just look at those tree lights! What a sight!',
'Not a creature is stirring, except this mouse!',
'I love this time of year!',
"I'm feeling jolly, how about you?",
'Know any good carols?',
'Oh boy! I love Winter Holiday!',
"I think I'll trade my gloves for mittens!"], ['Have a happy Winter Holiday!',
'Warm wishes to you!',
'Shucks, sorry you have to go. So long!',
"I'm going caroling with Minnie!"])
VampireMickeyChatter = (['Welcome to ' + lToontownCentral + '.',
'Hi, my name is ' + Mickey + ". What's yours?",
'Happy Halloween!',
'Happy Halloween, %!',
'Welcome to Tombtown... I mean Toontown!'], ['If you think playing tricks is All Fun and Games, go see Lazy Hal for a treat!',
"It's fun to dress up for Halloween!",
'If you think playing tricks is All Fun and Games, go see Lazy Hal for a treat!',
'Do you like my costume?',
'If you think playing tricks is All Fun and Games, go see Lazy Hal for a treat!',
'%, watch out for Bloodsucker Cogs!',
'If you think playing tricks is All Fun and Games, go see Lazy Hal for a treat!',
"Aren't the Halloween decorations great?",
'If you think playing tricks is All Fun and Games, go see Lazy Hal for a treat!',
'Beware of black cats!',
'If you think playing tricks is All Fun and Games, go see Lazy Hal for a treat!',
'Did you see the Toon with the pumpkin head?',
'If you think playing tricks is All Fun and Games, go see Lazy Hal for a treat!',
'Boo! Did I scare you?',
'If you think playing tricks is All Fun and Games, go see Lazy Hal for a treat!',
"Don't forget to brush your fangs!",
'If you think playing tricks is All Fun and Games, go see Lazy Hal for a treat!',
"I'm a vampire, but not a Bloodsucker!",
'If you think playing tricks is All Fun and Games, go see Lazy Hal for a treat!',
"I hope you're enjoying our Halloween fun!",
'If you think playing tricks is All Fun and Games, go see Lazy Hal for a treat!',
'Vampires are really popular this year!'], ["I'm going to check out the cool Halloween decorations.",
"I'm going to MelodyLand to surprise " + Minnie + '!',
"I'm going to sneak up on another Toon! Shhh!",
"I'm going trick-or-treating!",
'Shhh, sneak with me.'])
FieldOfficeMickeyChatter = ['Have you heard about the new Mover & Shaker Field Offices?']
MinnieChatter = (['Welcome to Melodyland.', 'Hi, my name is ' + Minnie + ". What's yours?"], ['The hills are alive with the sound of music!',
'You have a cool outfit, %.',
'Hey, have you seen ' + Mickey + '?',
'If you see my friend ' + Goofy + ', say hi to him for me.',
'Wow, there are lots of ' + Cogs + ' near ' + Donald + "'s Dreamland.",
"I heard it's foggy at the " + lDonaldsDock + '.',
'Be sure and try the maze in ' + lDaisyGardens + '.',
"I think I'll go catch some tunes.",
'Hey %, look at that over there.',
'I love the sound of music.',
"I bet you didn't know Melodyland is also called TuneTown! Hee Hee!",
'I love to play the Matching Game. Do you?',
'I like to make people giggle.',
'Boy, trotting around in heels all day is hard on your feet!',
'Nice shirt, %.',
'Is that a Jellybean on the ground?'], ["Gosh, I'm late for my date with %s!" % Mickey, "Looks like it's time for %s's dinner." % Pluto, "It's time for a nap. I'm going to Dreamland."])
WinterMinnieCChatter = (["Hi, I'm Merry Minnie!",
'Welcome to the land of carols!',
'Happy Winter Holiday!',
'Happy Winter Holiday, %!'], ["You'll get more than a Shave and a Haircut For a Song if you carol to Barbara Seville!",
'Belt out a tune, Toon!',
"You'll get more than a Shave and a Haircut For a Song if you carol to Barbara Seville!",
'Show us how to croon, Toon!',
"You'll get more than a Shave and a Haircut For a Song if you carol to Barbara Seville!",
'Can you carry a melody here in Melodyland?',
"You'll get more than a Shave and a Haircut For a Song if you carol to Barbara Seville!",
'Those lamps look warm in their scarves!',
"You'll get more than a Shave and a Haircut For a Song if you carol to Barbara Seville!",
"The sing's the thing!",
"You'll get more than a Shave and a Haircut For a Song if you carol to Barbara Seville!",
"I'll always like you, for better or verse!",
"You'll get more than a Shave and a Haircut For a Song if you carol to Barbara Seville!",
'Everything looks better with a wreath!'], ['Have a fun Winter Holiday!', 'Happy Trails!', 'Mickey is taking me caroling!'])
WinterMinnieDChatter = (["Hi, I'm Merry Minnie!",
'Welcome to the land of carols!',
'Happy Winter Holiday!',
'Happy Winter Holiday, %!'], ['Belt out a tune, Toon!',
'Show us how to croon, Toon!',
'Can you carry a melody here in Melodyland?',
'Those lamps look warm in their scarves!',
"The sing's the thing!",
"You can't go wrong with a song!",
"I'll always like you, for better or verse!",
'Everything looks better with a wreath!'], ['Have a fun Winter Holiday!', 'Happy Trails!', 'Mickey is taking me caroling!'])
ValentinesMinnieChatter = (["Hello, I'm Minnie!", "Happy ValenToon's Day!", "Happy ValenToon's Day, %"], ['I hope Mickey got me chocolates or flowers!',
'Those hearts are good for Laff boosts!',
'I want to go to a ValenToon Party!',
'I hope Mickey takes me to the Kooky Cafe!',
'Mickey is such a good ValenToon!',
'What did you get your ValenToon?',
"Mickey has never missed a ValenToon's Day!"], ['It was sweet having you visit!'])
WitchMinnieChatter = (['Welcome to Magicland... I mean Melodyland!',
"Hi, my name is Magic Minnie! What's yours?",
"Hello, I think you're enchanting!",
'Happy Halloween!',
'Happy Halloween, %!'], ['I hear Tabitha has treats for Really Kool Katz who can play tricks!',
"It's a magical day, don't you think?",
'I hear Tabitha has treats for Really Kool Katz who can play tricks!',
'Now where did I put my spell book',
'I hear Tabitha has treats for Really Kool Katz who can play tricks!',
'Abra-Cadabra!',
'I hear Tabitha has treats for Really Kool Katz who can play tricks!',
'Toontown looks positively spooky today!',
'I hear Tabitha has treats for Really Kool Katz who can play tricks!',
'Are you seeing stars too?',
'I hear Tabitha has treats for Really Kool Katz who can play tricks!',
'Purple is really my color!',
'I hear Tabitha has treats for Really Kool Katz who can play tricks!',
'I hope your Halloween is bewitching!',
'I hear Tabitha has treats for Really Kool Katz who can play tricks!',
'Beware of musical spiders!',
'I hear Tabitha has treats for Really Kool Katz who can play tricks!',
'I hope you are enjoying our Halloween fun!'], ["I'm going to disappear now!", 'Time for me to vanish!', 'Mickey is taking me Trick-or-Treating!'])
FieldOfficeMinnieChatter = ['Everyone is talking about the new Mover & Shaker Field Offices!']
DaisyChatter = (['Welcome to my garden!', "Hello, I'm " + Daisy + ". What's your name?", "It's so nice to see you %!"], ['My prize winning flower is at the center of the garden maze.',
'I just love strolling through the maze.',
"I haven't seen " + Goofy + ' all day.',
'I wonder where ' + Goofy + ' is.',
'Have you seen ' + Donald + "? I can't find him anywhere.",
'If you see my friend ' + Minnie + ', please say "Hello" to her for me.',
'The better gardening tools you have the better plants you can grow.',
'There are far too many ' + Cogs + ' near ' + lDonaldsDock + '.',
'Watering your garden every day keeps your plants happy.',
'To grow a Pink Daisy plant a yellow and red Jellybean together.',
'Yellow daisies are easy to grow, just plant a yellow Jellybean.',
'If you see sand under a plant it needs water or it will wilt!'], ["I'm going to Melody Land to see %s!" % Minnie,
"I'm late for my picnic with %s!" % Donald,
"I think I'll go swimming at " + lDonaldsDock + '.',
"Oh, I'm a little sleepy. I think I'll go to Dreamland."])
ValentinesDaisyChatter = (["Hi, I'm Daisy!", "Happy ValenToon's Day!", "Happy ValenToon's Day, %"], ["I hope Donald doesn't get me another Amore Eel!",
'Donald is taking me out to the Deep-see Diner!',
'I certainly have enough roses!',
'Those hearts are good for Laff boosts!',
"I'd love to go to a ValenToon's Day party!",
'This is the garden where love grows!',
"Donald better not sleep through ValenToon's Day again!",
'Maybe Donald and I can double-date with Mickey and Minnie!'], ["Tell Donald I'll be waiting for him!", "Have a nice ValenToon's Day!"])
WinterDaisyCChatter = (['Welcome to the only garden that grows in the winter!', 'Happy Winter Holiday!', 'Happy Winter Holiday, %!'], ['Shoshanna at Pine Needle Crafts is a real sap for songs, so why not craft her a carol?',
'My garden needs more mistletoe!',
'Shoshanna at Pine Needle Crafts is a real sap for songs, so why not craft her a carol?',
'I need to plant holly for next year!',
'Shoshanna at Pine Needle Crafts is a real sap for songs, so why not craft her a carol?',
"I'm going to ask Goofy to build me a gingerbread house!",
'Shoshanna at Pine Needle Crafts is a real sap for songs, so why not craft her a carol?',
'Those lights on the lamps are lovely!',
'Shoshanna at Pine Needle Crafts is a real sap for songs, so why not craft her a carol?',
'That is some jolly holly!',
'Shoshanna at Pine Needle Crafts is a real sap for songs, so why not craft her a carol?',
'My snowman keeps melting!',
'Shoshanna at Pine Needle Crafts is a real sap for songs, so why not craft her a carol?',
'That duck is decked out!',
'Shoshanna at Pine Needle Crafts is a real sap for songs, so why not craft her a carol?',
'I grew all these lights myself!'], ['Have a jolly Winter Holiday!',
'Happy planting!',
'Tell Donald to stop by with presents!',
'Donald is taking me caroling!'])
WinterDaisyDChatter = (['Welcome to the only garden that grows in the winter!', 'Happy Winter Holiday!', 'Happy Winter Holiday, %!'], ['My garden needs more mistletoe!',
'I need to plant holly for next year!',
"I'm going to ask Goofy to build me a gingerbread house!",
'Those lights on the lamps are lovely!',
'That is some jolly holly!',
'My snowman keeps melting!',
'That duck is decked out!',
'I grew all these lights myself!'], ['Have a jolly Winter Holiday!',
'Happy planting!',
'Tell Donald to stop by with presents!',
'Donald is taking me caroling!'])
HalloweenDaisyChatter = (['Welcome to Daisy Ghosts... I mean Gardens!', 'Happy Halloween!', 'Happy Halloween, %!'], ['Visit my friend Leif Pyle if you have a trick and Rake Inn the treats!',
'Wanna dance?',
'Visit my friend Leif Pyle if you have a trick and Rake Inn the treats!',
"I'm a duck with a poodle skirt!",
'Visit my friend Leif Pyle if you have a trick and Rake Inn the treats!',
'The pirate tree needs water.',
'Visit my friend Leif Pyle if you have a trick and Rake Inn the treats!',
'Trick-or-Tree!',
'Visit my friend Leif Pyle if you have a trick and Rake Inn the treats!',
'Do you notice anything strange about the trees?',
'Visit my friend Leif Pyle if you have a trick and Rake Inn the treats!',
'I should grow some pumpkins!',
'Visit my friend Leif Pyle if you have a trick and Rake Inn the treats!',
'WHO notices something different about the lamps?',
'Visit my friend Leif Pyle if you have a trick and Rake Inn the treats!',
'Halloween really grows on me!',
'Visit my friend Leif Pyle if you have a trick and Rake Inn the treats!',
'Twig-or-Treat!',
'Visit my friend Leif Pyle if you have a trick and Rake Inn the treats!',
"Owl bet you didn't notice the spooky lamps!",
'Visit my friend Leif Pyle if you have a trick and Rake Inn the treats!',
'I hope you are enjoying our Halloween fun!'], ['Donald is taking me Trick-or-Treating!', "I'm going to check out the fun Halloween decorations."])
FieldOfficeDaisyChatter = ['Those Mover & Shaker Field Offices are popping up like weeds!']
ChipChatter = (['Welcome to %s!' % lOutdoorZone,
"Hello, I'm " + Chip + ". What's your name?",
"No, I'm " + Chip + '.',
"It's so nice to see you %!",
'We are Chip and Dale!'], ['I like golf.', 'We have the best acorns in Toontown.', 'The golf holes with volcanoes are the most challenging for me.'], ["We're going to the " + lTheBrrrgh + ' and play with %s.' % Pluto,
"We'll visit %s and fix him." % Donald,
"I think I'll go swimming at " + lDonaldsDock + '.',
"Oh, I'm a little sleepy. I think I'll go to Dreamland."])
ValentinesChipChatter = (["I'm Chip!", "Happy ValenToon's Day!", "Happy ValenToon's Day, %!"], ["What did you get me for ValenToon's Day, Dale?",
'Those hearts are good for Laff boosts!',
'Will you be my ValenToon, Dale?',
"What did you get the Cogs for ValenToon's Day?",
"I love ValenToon's Day!"], ['Come back any time!'])
WinterChipChatter = (['Happy Winter Holiday!', 'Dressed as chipmunks!', 'Happy Winter Holiday, %!'], ['Happy Winter Holiday, Dale!',
'All this water could freeze any minute!',
'We should switch the golf balls with snowballs!',
'If only chipmunks knew how to sing!',
'Did you remember to store nuts for the winter?',
'Did you get the Cogs a present?'], ['Go nuts this Winter Holiday!', 'Have a joyful winter Holiday!'])
HalloweenChipChatter = (['Play some MiniGhoul... I mean Golf!', 'Happy Halloween!', 'Happy Halloween, %!'], ["We're nuts about Halloween!",
"You're under arrest",
"You can't outrun the long arm of the law",
"I'm a Bobby!",
'I hope you are enjoying our Halloween fun!',
'Play golf and get a Howl-In-One.',
'Candy corns are sweeter than acorns.',
'I hope you are enjoying our Halloween fun!'], ['%, watch out for Bloodsucker Cogs!'])
DaleChatter = (["It's so nice to see you %!",
"Hello, I'm " + Dale + ". What's your name?",
"Hi I'm " + Chip + '.',
'Welcome to %s!' % lOutdoorZone,
'We are Chip and Dale!'], ['I like picnics.', 'Acorns are tasty, try some.', 'Those windmills can be hard too.'], ['Hihihi ' + Pluto + ' is fun to play with.',
"Yeah, let's fix %s." % Donald,
'A swim sounds refreshing.',
"I'm getting tired and could use a nap."])
ValentinesDaleChatter = (["I'm Dale!", "Happy ValenToon's Day!", "Happy ValenToon's Day, %!"], ['Same thing as last year. Nothing!',
'I miss the nuts!',
'Will you be my ValenToon, Chip?',
'A pie in the face',
"Yeah, it's all right."], ['Come back any time!'])
WinterDaleChatter = (['Merry chipmunks!',
"Hi, we're two merry elves!",
'Happy Winter Holiday!',
'Happy Winter Holiday, %!'], ['Happy Winter Holiday, Chip!',
'Better not be on the geyser when it happens!',
'And the golf clubs with icicles!',
'Whoever heard of singing chipmunks?',
'I told YOU to do that!',
'Yes, a cream pie!'], ['And bring some back for us!', 'Have a joyful Winter Holiday!'])
HalloweenDaleChatter = (['Happy Halloween, %!', 'Play some MiniGhoul... I mean Golf!', 'Happy Halloween!'], ["We're nuts about Halloween!",
'Great, I could use a rest!',
'But your arms are short!',
'I thought you were a Chip!',
'Play golf and get a Howl-In-One',
'Candy corns are sweeter than acorns.',
'I hope you are enjoying our Halloween fun!'], ['%, watch out for Bloodsucker Cogs!'])
GoofyChatter = (['Welcome to ' + lDaisyGardens + '.', 'Hi, my name is ' + Goofy + ". What's yours?", "Gawrsh, it's nice to see you %!"], ['Boy it sure is easy to get lost in the garden maze!',
'Be sure and try the maze here.',
"I haven't seen " + Daisy + ' all day.',
'I wonder where ' + Daisy + ' is.',
'Hey, have you seen ' + Donald + '?',
'If you see my friend ' + Mickey + ', say hi to him for me.',
"D'oh! I forgot to fix " + Mickey + "'s breakfast!",
'Gawrsh there sure are a lot of ' + Cogs + ' near ' + lDonaldsDock + '.',
'It looks like ' + Daisy + ' has planted some new flowers in her garden.',
'At the Brrrgh branch of my Gag Shop, Hypno-Goggles are on sale for only 1 Jellybean!',
"Goofy's Gag Shops offer the best jokes, tricks, and funnybone-ticklers in all of Toontown!",
"At Goofy's Gag Shops, every pie in the face is guaranteed to make a laugh or you get your Jellybeans back!"], ["I'm going to Melody Land to see %s!" % Mickey,
"Gosh, I'm late for my game with %s!" % Donald,
"I think I'll go swimming at " + lDonaldsDock + '.',
"It's time for a nap. I'm going to Dreamland."])
WinterGoofyChatter = (["I'm Goofy about the holidays!",
'Welcome to Snowball Speedway!',
'Happy Winter Holiday!',
'Happy Winter Holiday, %!'], ['Who needs reindeer when you have a fast kart?',
'Gawrsh! Is it Winter Holiday already?',
'I need my earmuffs!',
"I haven't done any shopping yet!",
"Don't drive your kart on ice!",
'Seems like it was Winter Holiday only a year ago!',
'Treat your kart to a present and spruce it up!',
'These karts are better than any old sleigh!'], ['Have a cheery Winter Holiday!', 'Drive safe, now!', 'Watch out for flying reindeer!'])
ValentinesGoofyChatter = (["I'm Goofy about ValenToon's Day!", "Happy ValenToon's Day!", "Happy ValenToon's Day, %!"], ["Gawrsh! Is it ValenToon's Day already?",
'I LOVE kart racing!',
'Be sweet to each other out there!',
'Show your sweetie a new kart!',
'Toons love their karts!',
'Make some new friends on the track!'], ['Drive safe, now!', 'Show some love out there!'])
GoofySpeedwayChatter = (['Welcome to ' + lGoofySpeedway + '.', 'Hi, my name is ' + Goofy + ". What's yours?", "Gawrsh, it's nice to see you %!"], ['Boy, I saw a terrific race earlier.',
'Watch out for banana peels on the race track!',
'Have you upgraded your kart lately?',
'We just got in some new rims at the kart shop.',
'Hey, have you seen ' + Donald + '?',
'If you see my friend ' + Mickey + ', say hi to him for me.',
"D'oh! I forgot to fix " + Mickey + "'s breakfast!",
'Gawrsh there sure are a lot of ' + Cogs + ' near ' + lDonaldsDock + '.',
'At the Brrrgh branch of my Gag Shop, Hypno-Goggles are on sale for only 1 Jellybean!',
"Goofy's Gag Shops offer the best jokes, tricks, and funnybone-ticklers in all of Toontown!",
"At Goofy's Gag Shops, every pie in the face is guaranteed to make a laugh or you get your Jellybeans back!"], ["I'm going to Melody Land to see %s!" % Mickey,
"Gosh, I'm late for my game with %s!" % Donald,
"I think I'll go swimming at " + lDonaldsDock + '.',
"It's time for a nap. I'm going to Dreamland."])
SuperGoofyChatter = (['Welcome to my Super Speedway!',
"Hi, I'm Super Goof! What's your name?",
'Happy Halloween!',
'Happy Halloween, %!'], ['I am feeling kind of batty today!',
'Anybody see my cape around? Oh, there it is!',
"Gawrsh! I don't know my own strength!",
'Did somebody call for a superhero?',
"Beware Cogs, I'll save Halloween!",
"There's nothing scarier than me in a kart!",
"I bet you don't know who I am with this mask on!",
"It's fun to dress up for Halloween!",
'I hope you are enjoying our Halloween fun!'], ['Gotta fly!',
'Hi-Ho and away I go!',
"Should I fly or drive to Donald's Dock?",
'Gawrsh, have a Happy Halloween!'])
DonaldChatter = (['Welcome to Dreamland.', "Hi, my name is %s. What's yours?" % Donald], ['Sometimes this place gives me the creeps.',
'Be sure and try the maze in ' + lDaisyGardens + '.',
"Oh boy, I'm having a good day.",
'Hey, have you seen ' + Mickey + '?',
'If you see my buddy ' + Goofy + ', say hi to him for me.',
"I think I'll go fishing this afternoon.",
'Wow, there are lots of ' + Cogs + ' at ' + lDonaldsDock + '.',
"Hey, didn't I take you on a boat ride at " + lDonaldsDock + '?',
"I haven't seen " + Daisy + ' all day.',
'I hear ' + Daisy + ' has planted some new flowers in her garden.',
'Quack.'], ["I'm going to Melody Land to see %s!" % Minnie,
"Gosh, I'm late for my date with %s!" % Daisy,
"I think I'll go swimming at my dock.",
"I think I'll take my boat for a spin at my dock."])
WinterDreamlandCChatter = (["Hi, I'm Dozing Donald!",
'Welcome to Holiday Dreamland!',
'Happy Winter Holiday!',
'Happy Winter Holiday, %!'], ['Willow says that learning a little Sleep Voice Training is a real present, sing her a tune and find out why!',
'I wish I was nestled all snug in my bed!',
'Willow says that learning a little Sleep Voice Training is a real present, sing her a tune and find out why!',
"I'm dreaming of a white Toontown!",
'Willow says that learning a little Sleep Voice Training is a real present, sing her a tune and find out why!',
'I meant to leave out milk and cookies!',
'Willow says that learning a little Sleep Voice Training is a real present, sing her a tune and find out why!',
'When I wake up, I better see lots of presents!',
'Willow says that learning a little Sleep Voice Training is a real present, sing her a tune and find out why!',
"I hope I don't sleep through the holidays!",
'Willow says that learning a little Sleep Voice Training is a real present, sing her a tune and find out why!',
"I love a long winter's nap!",
'Willow says that learning a little Sleep Voice Training is a real present, sing her a tune and find out why!',
'The trees on the streets are covered in night lights!'], ['To all, a good night!', 'Sweet dreams!', 'When I wake up I am going caroling!'])
WinterDreamlandDChatter = (["Hi, I'm Dozing Donald!",
'Welcome to Holiday Dreamland!',
'Happy Winter Holiday!',
'Happy Winter Holiday, %!'], ['I wish I was nestled all snug in my bed!',
"I'm dreaming of a white Toontown!",
'I meant to leave out milk and cookies!',
'When I wake up, I better see lots of presents!',
"I hope I don't sleep through the holidays!",
"I love a long winter's nap!",
'The trees on the streets are covered in night lights!'], ['To all, a good night!', 'Sweet dreams!', 'When I wake up I am going caroling!'])
HalloweenDreamlandChatter = (['Happy Halloween!', 'Happy Halloween, %!', "Hi, I'm FrankenDonald!"], ['If you can play a trick on my friend Max, then you can Relax To The Max with a treat!',
'Am I awake or dreaming?',
'If you can play a trick on my friend Max, then you can Relax To The Max with a treat!',
"I'm so scared, I can't fall asleep!",
'If you can play a trick on my friend Max, then you can Relax To The Max with a treat!',
'So this is what Dreamland looks like!',
'If you can play a trick on my friend Max, then you can Relax To The Max with a treat!',
"Boy, I'm sleepy!",
'If you can play a trick on my friend Max, then you can Relax To The Max with a treat!',
"I hope I don't sleep through Halloween this year!",
'If you can play a trick on my friend Max, then you can Relax To The Max with a treat!',
'I hope you are enjoying our Halloween fun!'], ['Sleep with the lights on tonight!', 'When I wake up, I am going Trick-or-Treating!'])
ValentinesDreamlandChatter = (["Hello, I'm (yawn) Donald!", "Happy ValenToon's Day!", "Happy ValenToon's Day, %!"], ["I hope I don't sleep through ValenToon's Day!",
"I'm dreaming of Daisy!",
"I had a nightmare that I missed ValenToon's Day!",
'Those hearts are good for Laff boosts!',
"Throw a ValenToon's Day party!",
'Show the Cogs you love them with a pie in the face!',
"I couldn't dream of a nicer holiday than ValenToon's Day!",
'I love sleeping!'], ['Nite-nite!', "Wake me when it's ValenToon's Day!"])
FieldOfficeDreamlandChatter = ['I dreamed about something called a Field Office...']
HalloweenDonaldChatter = (['Welcome to my Halloween harbor!',
'Come aboard, if you have treats!',
'Happy Halloween!',
'Happy Halloween, %!'], ['If playing tricks is making you feel Rudderly Ridiculous, then go see Rudy for a treat!',
"I'm dressed as a sailor!",
'If playing tricks is making you feel Rudderly Ridiculous, then go see Rudy for a treat!',
'Pumpkins make great lanterns!',
'If playing tricks is making you feel Rudderly Ridiculous, then go see Rudy for a treat!',
"I've never seen palm trees with hairy legs before!",
'If playing tricks is making you feel Rudderly Ridiculous, then go see Rudy for a treat!',
"Maybe I'll be a pirate next Halloween!",
'If playing tricks is making you feel Rudderly Ridiculous, then go see Rudy for a treat!',
'I think the best treats are starfish!',
'If playing tricks is making you feel Rudderly Ridiculous, then go see Rudy for a treat!',
"I'll take you Trick-or-Treating around the harbor!",
'If playing tricks is making you feel Rudderly Ridiculous, then go see Rudy for a treat!',
'I hope those spiders stay in the trees!',
'If playing tricks is making you feel Rudderly Ridiculous, then go see Rudy for a treat!',
'What do you call a ghost in the water? A BOO-y!',
'If playing tricks is making you feel Rudderly Ridiculous, then go see Rudy for a treat!',
'I hope you are enjoying our Halloween fun!'], ['Set sail for scares!', 'Happy haunting!', "I'm going to check out the spooky Halloween decorations."])
ValentinesDonaldChatter = (["Ahoy, I'm Donald!", "Happy ValenToon's Day!", "Happy ValenToon's Day, %!"], ["Was I supposed to take Daisy somewhere for ValenToon's Day?",
"Just once more around the dock, then I'll get Daisy something.",
"What would Daisy like for ValenToon's Day?",
'Those hearts in the water are good for Laff boosts!',
"Throw a ValenToon's Day party!",
'Show the Cogs you love them with a pie in the face!',
"I'll have to catch an Amore Eel for Daisy!"], ['Aloha!', 'Give the Cogs my best!'])
WinterDonaldCChatter = (["Welcome to Donald's Boat and Sleigh Dock!",
'All aboard for the Winter Holiday cruise!',
'Happy Winter Holiday!',
'Happy Winter Holiday, %!'], ['I hear that Dante has Gifts With A Porpoise, share a song and he may have a gift for you too!',
'How do you like my duck-orations?',
'I hear that Dante has Gifts With A Porpoise, share a song and he may have a gift for you too!',
'What is snow doing on the lamp posts?',
'I hear that Dante has Gifts With A Porpoise, share a song and he may have a gift for you too!',
'This water better not ice over!',
'I hear that Dante has Gifts With A Porpoise, share a song and he may have a gift for you too!',
'How did they get the lights up in those trees?',
'I hear that Dante has Gifts With A Porpoise, share a song and he may have a gift for you too!',
'This boat is better than a sleigh! or is it?',
'I hear that Dante has Gifts With A Porpoise, share a song and he may have a gift for you too!',
"I don't need reindeer to pull this boat!",
'I hear that Dante has Gifts With A Porpoise, share a song and he may have a gift for you too!',
"I'm glad I'm not a turkey this time of year!",
'I hear that Dante has Gifts With A Porpoise, share a song and he may have a gift for you too!',
'My present to you? Free boat rides!',
'I hear that Dante has Gifts With A Porpoise, share a song and he may have a gift for you too!',
"I hope I don't get a lump of coal again!",
'I hear that Dante has Gifts With A Porpoise, share a song and he may have a gift for you too!'], ['All ashore for holiday fun!', 'Remember to tip your boat driver on the way out!', 'Enjoy your holiday!'])
WinterDonaldDChatter = (["Welcome to Donald's Boat and Sleigh Dock!",
'All aboard for the Winter Holiday cruise!',
'Happy Winter Holiday!',
'Happy Winter Holiday, %!'], ['How do you like my duck-orations?',
'What is snow doing on the lamp posts?',
'This water better not ice over!',
'How did they get the lights up in those trees?',
'This boat is better than a sleigh! or is it?',
"I don't need reindeer to pull this boat!",
"I'm glad I'm not a turkey this time of year!",
'My present to you? Free boat rides!',
"I hope I don't get a lump of coal again!"], ['All ashore for holiday fun!', 'Remember to tip your boat driver on the way out!', 'Enjoy your holiday!'])
WesternPlutoChatter = (["Boo! Don't be scared, it's just me ... Pluto!", 'Happy Halloween, pardner!', 'Happy Halloween, %!'], ["Frosty Fred has treats for tricks, they make him feel like there's Snowplace Like Home!",
'I do tricks for treats!',
"Frosty Fred has treats for tricks, they make him feel like there's Snowplace Like Home!",
"Mickey's taking me Trick-or-Treating later!",
"Frosty Fred has treats for tricks, they make him feel like there's Snowplace Like Home!",
'It feels more like Winter Holiday than Halloween!',
"Frosty Fred has treats for tricks, they make him feel like there's Snowplace Like Home!",
"Bark! That's 'Trick-or-Treat' in dog!",
"Frosty Fred has treats for tricks, they make him feel like there's Snowplace Like Home!",
'I hope you are enjoying our Halloween fun!',
"Frosty Fred has treats for tricks, they make him feel like there's Snowplace Like Home!",
'I like to chase Black Cat Toons!',
"Frosty Fred has treats for tricks, they make him feel like there's Snowplace Like Home!",
"There's a snake in my boot!"], ["I'm going to go dig up a treat!", "I'm going to see if Mickey has some treats!", "I'm going to scare Donald!"])
WinterPlutoCChatter = (["Hi, I'm Pluto!",
"Welcome to the Brrgh, where it's winter all year!",
'Happy Winter Holiday!',
'Happy Winter Holiday, %'], ["Eddie could use a good tune, because Snowman's Land is a lonely place for a Yeti!",
'I chewed on an icicle and got frost-bite!',
"Eddie could use a good tune, because Snowman's Land is a lonely place for a Yeti!",
'This is like living in a snow globe!',
"Eddie could use a good tune, because Snowman's Land is a lonely place for a Yeti!",
'I wish I was beside a warm fire!',
"Eddie could use a good tune, because Snowman's Land is a lonely place for a Yeti!",
'Arf! Arf! I need a scarf!',
"Eddie could use a good tune, because Snowman's Land is a lonely place for a Yeti!",
"At least my nose isn't red and glowing!"], ['Have a fun Winter Holiday!', 'Come back any time you want snow!', 'Mickey is taking me caroling!'])
WinterPlutoDChatter = (["Hi, I'm Pluto!",
"Welcome to the Brrgh, where it's winter all year!",
'Happy Winter Holiday!',
'Happy Winter Holiday, %'], ['I chewed on an icicle and got frost-bite!',
'This is like living in a snow globe!',
'I wish I was beside a warm fire!',
'Arf! Arf! I need a scarf!',
"At least my nose isn't red and glowing!"], ['Have a fun Winter Holiday!', 'Come back any time you want snow!', 'Mickey is taking me caroling!'])
AFMickeyChatter = (["Happy April Toons' Week!", "Happy April Toons' Week, %!"], ["Welcome to the Gardens! I'm " + Daisy + '!',
"I'm " + Daisy + ', and I love to garden!',
"April Toons' Week is the silliest week of the year!",
"What, you've never seen a duck with mouse ears?",
"Hi, I'm " + Daisy + '! Quack!',
"It's tough quacking like a duck!",
"I'm not feeling like myself today!",
'Have you heard your Doodle talk yet?',
'Gravity has taken a holiday at the Estates!'], ["Have a wacky April Toons' Week!", 'Tell Mickey I said hi!'])
AFMinnieChatter = (["Happy April Toons' Week!", "Happy April Toons' Week, %!"], ['Welcome to ' + lTheBrrrgh + "! I'm " + Pluto + '!',
"Hi, I'm " + Pluto + "! What's your name?",
"What, you've never seen a dog with mouse ears?",
"I'm not feeling like myself today!",
"Does anyone have a doggie biscuit? I'm hungry!",
'Bark! My name is ' + Pluto + '!',
"Isn't this silly?",
"Don't make me chase you around!",
"April Toons' Week is the silliest week of the year!",
'Have you heard your Doodle talk yet?',
'Gravity has taken a holiday at the Estates!'], ["Have a wacky April Toons' Week!", 'I have to go chase cars now! Bye!'])
AFDaisyChatter = (["Happy April Toons' Week!", "Happy April Toons' Week, %!"], ['Welcome to ' + lToontownCentral + "! I'm " + Mickey + ' Mouse!',
"Hi, I'm " + Mickey + '! The happiest mouse in Toontown!',
'If you see ' + Daisy + ', tell her ' + Mickey + ' said hi!',
"What, you've never seen a mouse with feathers?",
"Isn't this silly?",
"I'm not feeling like myself today!",
"April Toons' Week is the silliest week of the year!",
'Have you heard your Doodle talk yet?',
'Gravity has taken a holiday at the Estates!'], ['Bye! Tell them ' + Mickey + ' sent you!', 'If you go to ' + lDaisyGardens + ', say hi to her for me!'])
AFGoofySpeedwayChatter = (["Happy April Toons' Week!", "Happy April Toons' Week, %!"], ["Welcome to Dreamland! I'm " + Donald + '!',
"Hello, I'm " + Donald + '! Is it nap time yet?',
'A duck needs his beauty rest, you know!',
"What, you've never seen a duck with dog ears?",
'Gawrsh! I mean -- Quack!',
'This would make a great race track ... um, I mean place to nap!',
"I'm not feeling like myself today!",
"April Toons' Week is the silliest week of the year!",
'Have you heard your Doodle talk yet?',
'Gravity has taken a holiday at the Estates!'], ['If you see ' + Goofy + ', tell him ' + Donald + ' says hi!', 'Bye, and good night!'])
AFDonaldChatter = (["Happy April Toons' Week!", "Happy April Toons' Week, %!"], ["Welcome to the Speedway! I'm " + Goofy + '!',
"I'm " + Goofy + ", and I'm dreaming I'm " + Donald + '!',
"I've heard of sleep walking, but sleep kart driving?",
'Gawrsh! It sure is silly being ' + Goofy + '!',
'How can I watch the races with my eyes closed?',
'I better grab a nap before my next race!',
"April Toons' Week is the silliest week of the year!",
"I'm not feeling like myself today!",
'Have you heard your Doodle talk yet?',
'Gravity has taken a holiday at the Estates!'], ["Have a wacky April Toons' Week!", 'I need to work on my karts! Bye!'])
AFDonaldDockChatter = (["Happy April Toons' Week!", "Happy April Toons' Week, %!"], ["Everybody gets April Toons' Week off but me!",
"I'm the only one who has to work this week!",
'I only get time off when I sleep!',
'All my friends are pretending to be somebody else!',
'Round and round in this boat, all day long!',
'I heard Daisy is pretending to be Mickey!',
"The silliest week of the year, and I'm missing it!",
'Have you heard your Doodle talk yet?',
'Gravity has taken a holiday at the Estates!'], ["Have a wacky April Toons' Week!", 'Play a joke on the Cogs for me!'])
AFPlutoChatter = (["Happy April Toons' Week!", "Happy April Toons' Week, %!"], ["Welcome to Melodyland! I'm " + Minnie + '!',
'Hi, my name is ' + Minnie + ' Mouse!',
"I'm as happy as a mouse can be!",
"What, you've never seen a mouse with dog ears?",
'I love when ' + Mickey + ' and I go for walks!',
'What, you never heard a mouse talk before?',
"April Toons' Week is the silliest week of the year!",
'Have you heard your Doodle talk yet?',
'Gravity has taken a holiday at the Estates!'], ["Have a wacky April Toons' Week!", 'If you see ' + Pluto + ', tell him ' + Minnie + ' says hi!'])
AFChipChatter = (["Happy April Toons' Week!", "Happy April Toons' Week, %!"], ["Hi, I'm " + Dale + '!',
'How are you today, ' + Chip + '?',
'I always thought you were ' + Dale + ', ' + Chip + '.',
"You're sure you're " + Chip + ' and not ' + Dale + ', ' + Chip + '?',
"April Toons' Week is the silliest week of the year!"], ['Bye from ' + Chip + ' and ' + Dale + '!'])
AFDaleChatter = (["Happy April Toons' Week!", "Happy April Toons' Week, %!"], ["Hi, I'm " + Chip + '!',
'Very well ' + Dale + ', thanks!',
"Nope, I'm " + Chip + ', ' + Dale + '.',
'Yes, ' + Dale + ", I'm " + Chip + ', not ' + Dale + '.',
'It sure is, ' + Chip + '! I mean, ' + Dale + '.'], ['Or ' + Dale + ' and ' + Chip + '!'])
CLGoofySpeedwayChatter = (['Welcome to ' + lGoofySpeedway + '.',
'Hi, my name is ' + Goofy + ". What's yours?",
"Gawrsh, it's nice to see you %!",
"Hi there! Pardon my dusty clothes I've been busy fixin' that broken Leaderboard."], ['We better get this Leaderboard working soon, Grand Prix Weekend is coming up!',
"Does anybody want to buy a slightly used kart? It's only been through the Leaderboard once!",
'Grand Prix Weekend is coming, better get to practicing.',
'Grand Prix Weekend will be here on Friday, May 22 through Monday, May 25!',
"I'm gonna need a ladder to get that kart down.",
'That Toon really wanted to get on the Leaderboard!',
'Boy, I saw a terrific race earlier.',
'Watch out for banana peels on the race track!',
'Have you upgraded your kart lately?',
'We just got in some new rims at the kart shop.',
'Hey, have you seen ' + Donald + '?',
'If you see my friend ' + Mickey + ', say hi to him for me.',
"D'oh! I forgot to fix " + Mickey + "'s breakfast!",
'Gawrsh there sure are a lot of ' + Cogs + ' near ' + lDonaldsDock + '.',
'At the Brrrgh branch of my Gag Shop, Hypno-Goggles are on sale for only 1 Jellybean!',
"Goofy's Gag Shops offer the best jokes, tricks, and funnybone-ticklers in all of Toontown!",
"At Goofy's Gag Shops, every pie in the face is guaranteed to make a laugh or you get your Jellybeans back!"], ['I better go get my kart a new paint job for the upcoming Grand Prix Weekend.',
"Gosh, I better get workin' on this broken Leaderboard!",
"Hope I'll see y'all on Grand Prix Weekend! Goodbye!",
"It's time for a nap. I'm going to Dreamland to dream about winnin' the Grand Prix."])
GPGoofySpeedwayChatter = (['Welcome to ' + lGoofySpeedway + '.',
'Welcome to Grand Prix Weekend!',
'Hi, my name is ' + Goofy + ". What's yours?",
"Gawrsh, it's nice to see you %!"], ['Are you excited about the Grand Prix Weekend?',
'Grand Prix Weekend really drives up those scores!',
'Get more tickets by racing practice laps.',
"Gawrsh, you're a fast racer!",
'Boy, I saw a terrific race earlier.',
'Watch out for banana peels on the race track!',
'Have you upgraded your kart lately?',
'We just got in some new rims at the kart shop.',
'Hey, have you seen ' + Donald + '? He said he was gonna come watch the Grand Prix!',
'If you see my friend ' + Mickey + ", tell him he's missing some great racing!",
"D'oh! I forgot to fix " + Mickey + "'s breakfast!",
'Gawrsh there sure are a lot of ' + Cogs + ' near ' + lDonaldsDock + '.',
'At the Brrrgh branch of my Gag Shop, Hypno-Goggles are on sale for only 1 Jellybean!',
"Goofy's Gag Shops offer the best jokes, tricks, and funnybone-ticklers in all of Toontown!",
"At Goofy's Gag Shops, every pie in the face is guaranteed to make a laugh or you get your Jellybeans back!"], ['Good luck in the Grand Prix!',
"I'm going to catch the next race in the Grand Prix!",
'Gawrsh I think the next race is about to start!',
'Gosh, I better go check on the new Leaderboard and make sure it is working right!'])
SillyPhase1Chatter = ["If you haven't seen the Silly Meter, head to Toon Hall!",
'Toontown is getting sillier by the day!',
"Cause silly surges in battle to boost Toontown's silly levels!",
@ -3921,13 +3224,6 @@ SillyPhase4Chatter = ['Fire hydrants make your Squirt Gags squirtier!',
'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!']
for chatter in [MickeyChatter,
DonaldChatter,
MinnieChatter,
GoofyChatter]:
chatter[0].extend(SharedChatterGreetings)
chatter[1].extend(SharedChatterComments)
chatter[2].extend(SharedChatterGoodbyes)
BoringTopic = 'Boring'
EmceeDialoguePhase1Topic = 'EmceeDialoguePhase1'
@ -5048,7 +4344,7 @@ TownBattleSOSPetSearchTitle = 'Searching for doodle\n%s...'
TownBattleSOSPetInfoTitle = '%s is %s'
TownBattleSOSPetInfoOK = lOK
TrolleyHFAMessage = 'You may not board the trolley until your Laff meter is smiling.'
TrolleyTFAMessage = 'You may not board the trolley until ' + Mickey + ' says so.'
TrolleyTFAMessage = 'You may not board the trolley until Joey says so.'
TrolleyHopOff = 'Hop off'
FishingExit = 'Exit'
FishingCast = 'Cast'
@ -5082,54 +4378,7 @@ FishPokerPair = 'Pair'
TutorialGreeting1 = 'Hi %s!'
TutorialGreeting2 = 'Hi %s!\nCome over here!'
TutorialGreeting3 = 'Hi %s!\nCome over here!\nUse the arrow keys!'
TutorialMickeyWelcome = 'Welcome to Toontown!'
TutorialFlippyIntro = 'Let me introduce you to my friend %s...' % Flippy
TutorialFlippyHi = 'Hi, %s!'
TutorialQT1 = 'You can talk by using this.'
TutorialQT2 = 'You can talk by using this.\nClick it, then choose "Hi".'
TutorialChat1 = 'You can talk using either of these buttons.'
TutorialChat2 = 'The blue button lets you chat with the keyboard.'
TutorialChat3 = "Be careful! Most other players won't understand what you say you when you use the keyboard."
TutorialChat4 = 'The green button opens the %s.'
TutorialChat5 = 'Everyone can understand you if you use the %s.'
TutorialChat6 = 'Try saying "Hi".'
TutorialBodyClick1 = 'Very good!'
TutorialBodyClick2 = 'Pleased to meet you! Want to be friends?'
TutorialBodyClick3 = 'To make friends with %s, click on him...' % Flippy
TutorialHandleBodyClickSuccess = 'Good Job!'
TutorialHandleBodyClickFail = 'Not quite. Try clicking right on %s...' % Flippy
TutorialFriendsButton = "Now click the 'Friends' button under %s's picture in the right hand corner." % Flippy
TutorialHandleFriendsButton = "And then click on the 'Yes' button.."
TutorialOK = lOK
TutorialYes = lYes
TutorialNo = lNo
TutorialFriendsPrompt = 'Would you like to make friends with %s?' % Flippy
TutorialFriendsPanelMickeyChat = "%s has agreed to be your friend. Click 'Ok' to finish up." % Flippy
TutorialFriendsPanelYes = '%s said yes!' % Flippy
TutorialFriendsPanelNo = "That's not very friendly!"
TutorialFriendsPanelCongrats = 'Congratulations! You made your first friend.'
TutorialFlippyChat1 = 'Come see me when you are ready for your first ToonTask!'
TutorialFlippyChat2 = "I'll be in ToonHall!"
TutorialAllFriendsButton = 'You can view all your friends by clicking the friends button. Try it out...'
TutorialEmptyFriendsList = "Right now your list is empty because %s isn't a real player." % Flippy
TutorialCloseFriendsList = "Click the 'Close'\nbutton to make the\nlist go away"
TutorialShtickerButton = 'The button in the lower, right corner opens your Shticker Book. Try it...'
TutorialBook1 = 'The book contains lots of useful information like this map of Toontown.'
TutorialBook2 = 'You can also check the progress of your ToonTasks.'
TutorialBook3 = 'When you are done click the book button again to make it close'
TutorialLaffMeter1 = 'You will also need this...'
TutorialLaffMeter2 = "You will also need this...\nIt's your Laff meter."
TutorialLaffMeter3 = 'When ' + Cogs + ' attack you, it gets lower.'
TutorialLaffMeter4 = 'When you are in playgrounds like this one, it goes back up.'
TutorialLaffMeter5 = 'When you complete ToonTasks, you will get rewards, like increasing your Laff limit.'
TutorialLaffMeter6 = 'Be careful! If the ' + Cogs + ' defeat you, you will lose all your gags.'
TutorialLaffMeter7 = 'To get more gags, play trolley games.'
TutorialTrolley1 = 'Follow me to the trolley!'
TutorialTrolley2 = 'Hop on board!'
TutorialBye1 = 'Play some games!'
TutorialBye2 = 'Play some games!\nBuy some gags!'
TutorialBye3 = 'Go see %s when you are done!' % Flippy
TutorialForceAcknowledgeMessage = 'You are going the wrong way! Go find %s!' % Mickey
TutorialForceAcknowledgeMessage = 'You are going the wrong way! Go find Flippy!'
PetTutorialTitle1 = 'The Doodle Panel'
PetTutorialTitle2 = 'Doodle SpeedChat'
PetTutorialTitle3 = 'Doodle Cattlelog'
@ -5190,8 +4439,8 @@ TugOfWarGameReady = 'Ready...'
TugOfWarGameEnd = 'Good game!'
TugOfWarGameTie = 'You tied!'
TugOfWarPowerMeter = 'Power meter'
PatternGameTitle = 'Match %s' % Minnie
PatternGameInstructions = Minnie + ' will show you a dance sequence. ' + 'Try to repeat ' + Minnie + "'s dance just the way you see it using the arrow keys!"
PatternGameTitle = 'Match Blinky'
PatternGameInstructions = 'Little Blinky will show you a dance sequence. ' + "Try to repeat Little Blinky's dance just the way you see it using the arrow keys!"
PatternGameWatch = 'Watch these dance steps...'
PatternGameGo = 'GO!'
PatternGameRight = 'Good, %s!'
@ -5303,8 +4552,6 @@ GagShopPlayerDisconnected = '%s has disconnected'
GagShopPlayerExited = '%s has exited'
GagShopPlayerPlayAgain = 'Play Again'
GagShopPlayerBuying = 'Buying'
GenderShopQuestionMickey = 'To make a boy toon, click on me!'
GenderShopQuestionMinnie = 'To make a girl toon, click on me!'
GenderShopFollow = 'Follow me!'
GenderShopSeeYou = 'See you later!'
GenderShopBoyButtonText = 'Boy'
@ -5392,17 +4639,6 @@ PeriodOnlyAfterLetter = 'You can use a period in your name, but only after a let
ApostropheOnlyAfterLetter = 'You can use an apostrophe in your name, but only after a letter.'
NoNumbersInTheMiddle = 'Numeric digits may not appear in the middle of a word.'
ThreeWordsOrLess = 'Your name must be three words or fewer.'
CopyrightedNames = ('mickey',
'mickey mouse',
'mickeymouse',
'minnie',
'minnie mouse',
'minniemouse',
'donald',
'donald duck',
'donaldduck',
'pluto',
'goofy')
NumToColor = ['White',
'Peach',
'Bright Red',
@ -7573,6 +6809,7 @@ NPCToonNames = {20000: 'Tutorial Tom',
7007: 'Dewin Tymme',
7008: 'Ima Cagedtoon',
7009: 'Jimmy Thelock',
7010: 'Little Blinky',
# Start with 91913.
91917: 'Magic Cat',
91918: 'Trap Cat'}
@ -8326,10 +7563,10 @@ TipDict = {TIP_NONE: ('',),
'If you wait too long to attack a lured Cog, it will wake up. Higher level lures last longer.',
'There are fishing ponds on every street in Toontown. Some streets have unique fish.'),
TIP_MINIGAME: ('After you fill up your Jellybean jar, any Jellybeans you get from Trolley Games automatically spill over into your bank.',
'You can use the arrow keys instead of the mouse in the "Match Minnie" Trolley Game.',
'You can use the arrow keys instead of the mouse in the "Match Blinky" Trolley Game.',
'In the Cannon Game you can use the arrow keys to move your cannon and press the "Control" key to fire.',
'In the Ring Game, bonus points are awarded when the entire group successfully swims through its rings.',
'A perfect game of Match Minnie will double your points.',
'A perfect game of Match Blinky will double your points.',
'In the Tug-of-War you are awarded more Jellybeans if you play against a tougher Cog.',
'Trolley Game difficulty varies by neighborhood; ' + lToontownCentral + ' has the easiest and ' + lDonaldsDreamland + ' has the hardest.',
'Certain Trolley Games can only be played in a group.'),

View file

@ -514,20 +514,6 @@ TrophyStarColors = (Vec4(0.9, 0.6, 0.2, 1),
Vec4(0.8, 0.8, 0.8, 1),
Vec4(1, 1, 0, 1),
Vec4(1, 1, 0, 1))
MickeySpeed = 5.0
VampireMickeySpeed = 1.15
MinnieSpeed = 3.2
WitchMinnieSpeed = 1.8
DonaldSpeed = 3.68
FrankenDonaldSpeed = 0.9
DaisySpeed = 2.3
GoofySpeed = 5.2
SuperGoofySpeed = 1.6
PlutoSpeed = 5.5
WesternPlutoSpeed = 3.2
ChipSpeed = 3
DaleSpeed = 3.5
DaleOrbitDistance = 3
SuitWalkSpeed = 4.8
PieThrowArc = 0
PieThrowLinear = 1