mirror of
https://github.com/Sneed-Group/Poodletooth-iLand
synced 2024-12-25 04:32:33 -06:00
Merge branch 'master' of https://gitlab.com/toontown-created/src
This commit is contained in:
commit
49c88deaed
19 changed files with 939 additions and 191 deletions
9
.gitignore
vendored
9
.gitignore
vendored
|
@ -1,13 +1,6 @@
|
||||||
# Python artifacts:
|
# Python artifacts:
|
||||||
*.pyc
|
*.pyc
|
||||||
|
|
||||||
# Windows
|
|
||||||
cmd.exe
|
|
||||||
|
|
||||||
# Eclipse IDE:
|
|
||||||
.project
|
|
||||||
.pydevproject
|
|
||||||
|
|
||||||
# PyCharm
|
# PyCharm
|
||||||
.idea
|
.idea
|
||||||
|
|
||||||
|
@ -17,9 +10,11 @@ cmd.exe
|
||||||
# Game-specific files and directories:
|
# Game-specific files and directories:
|
||||||
preferences.json
|
preferences.json
|
||||||
*.json
|
*.json
|
||||||
|
*.pets
|
||||||
logs/
|
logs/
|
||||||
screenshots/
|
screenshots/
|
||||||
backups/
|
backups/
|
||||||
contentpacks/
|
contentpacks/
|
||||||
resources/
|
resources/
|
||||||
save.dat
|
save.dat
|
||||||
|
ai-crash.txt
|
1
astron/databases/.gitignore
vendored
1
astron/databases/.gitignore
vendored
|
@ -1 +1,2 @@
|
||||||
*.db
|
*.db
|
||||||
|
air_cache/
|
||||||
|
|
|
@ -1,54 +0,0 @@
|
||||||
(dp1
|
|
||||||
I4000
|
|
||||||
(lp2
|
|
||||||
I44
|
|
||||||
aI170
|
|
||||||
aI242
|
|
||||||
aI222
|
|
||||||
aI111
|
|
||||||
asI1000
|
|
||||||
(lp3
|
|
||||||
I162
|
|
||||||
aI246
|
|
||||||
aI230
|
|
||||||
aI9
|
|
||||||
aI130
|
|
||||||
asI9000
|
|
||||||
(lp4
|
|
||||||
I238
|
|
||||||
aI160
|
|
||||||
aI252
|
|
||||||
aI128
|
|
||||||
aI55
|
|
||||||
asI2000
|
|
||||||
(lp5
|
|
||||||
I134
|
|
||||||
aI234
|
|
||||||
aI185
|
|
||||||
aI178
|
|
||||||
aI237
|
|
||||||
asI5000
|
|
||||||
(lp6
|
|
||||||
I227
|
|
||||||
aI61
|
|
||||||
aI35
|
|
||||||
aI72
|
|
||||||
aI121
|
|
||||||
asI7000
|
|
||||||
(lp7
|
|
||||||
I152
|
|
||||||
aI250
|
|
||||||
aI12
|
|
||||||
aI249
|
|
||||||
aI42
|
|
||||||
asI3000
|
|
||||||
(lp8
|
|
||||||
I34
|
|
||||||
aI75
|
|
||||||
aI197
|
|
||||||
aI112
|
|
||||||
aI54
|
|
||||||
asS'day'
|
|
||||||
p9
|
|
||||||
I16524
|
|
||||||
s.
|
|
|
@ -255,8 +255,10 @@ dclass MagicWordManager : DistributedObject {
|
||||||
};
|
};
|
||||||
|
|
||||||
dclass ChatAgent : DistributedObject {
|
dclass ChatAgent : DistributedObject {
|
||||||
adminChat(uint32, string);
|
adminChat(uint32 aboutId, string message);
|
||||||
chatMessage(string(0-256)) clsend;
|
chatMessage(string(0-256) message, uint8 chatMode) clsend;
|
||||||
|
whisperMessage(uint32 receiverAvId, string(0-256) message) clsend;
|
||||||
|
sfWhisperMessage(uint32 receiverAvId, string(0-256) message) clsend;
|
||||||
};
|
};
|
||||||
|
|
||||||
dclass FriendManager : DistributedObject {
|
dclass FriendManager : DistributedObject {
|
||||||
|
|
|
@ -1,14 +1,17 @@
|
||||||
from direct.distributed.DistributedObjectGlobal import DistributedObjectGlobal
|
from direct.distributed.DistributedObjectGlobal import DistributedObjectGlobal
|
||||||
from pandac.PandaModules import *
|
from pandac.PandaModules import *
|
||||||
from otp.otpbase import OTPGlobals
|
from otp.otpbase import OTPGlobals
|
||||||
|
from otp.ai.MagicWordGlobal import *
|
||||||
|
|
||||||
class ChatAgent(DistributedObjectGlobal):
|
class ChatAgent(DistributedObjectGlobal):
|
||||||
def __init__(self, cr):
|
def __init__(self, cr):
|
||||||
DistributedObjectGlobal.__init__(self, cr)
|
DistributedObjectGlobal.__init__(self, cr)
|
||||||
|
self.chatMode = 0
|
||||||
|
|
||||||
def delete(self):
|
def delete(self):
|
||||||
self.ignoreAll()
|
self.ignoreAll()
|
||||||
self.cr.chatManager = None
|
self.cr.chatManager = None
|
||||||
|
self.cr.chatAgent = None
|
||||||
DistributedObjectGlobal.delete(self)
|
DistributedObjectGlobal.delete(self)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
@ -17,4 +20,36 @@ class ChatAgent(DistributedObjectGlobal):
|
||||||
messenger.send('adminChat', [aboutId, message])
|
messenger.send('adminChat', [aboutId, message])
|
||||||
|
|
||||||
def sendChatMessage(self, message):
|
def sendChatMessage(self, message):
|
||||||
self.sendUpdate('chatMessage', [message])
|
self.sendUpdate('chatMessage', [message, self.chatMode])
|
||||||
|
|
||||||
|
def sendWhisperMessage(self, receiverAvId, message):
|
||||||
|
self.sendUpdate('whisperMessage', [receiverAvId, message])
|
||||||
|
|
||||||
|
def sendSFWhisperMessage(self, receiverAvId, message):
|
||||||
|
self.sendUpdate('sfWhisperMessage', [receiverAvId, message])
|
||||||
|
|
||||||
|
@magicWord(category=CATEGORY_MODERATOR, types=[int])
|
||||||
|
def chatmode(mode=-1):
|
||||||
|
""" Set the chat mode of the current avatar. """
|
||||||
|
mode2name = {
|
||||||
|
0 : "user",
|
||||||
|
1 : "moderator",
|
||||||
|
2 : "administrator",
|
||||||
|
3 : "system administrator",
|
||||||
|
}
|
||||||
|
if base.cr.chatAgent is None:
|
||||||
|
return "No ChatAgent found."
|
||||||
|
if mode == -1:
|
||||||
|
return "You are currently talking in the %s chat mode." % mode2name.get(base.cr.chatAgent.chatMode, "N/A")
|
||||||
|
if not 0 <= mode <= 3:
|
||||||
|
return "Invalid chat mode specified."
|
||||||
|
if mode == 3 and spellbook.getInvoker().getAdminAccess() < 500:
|
||||||
|
return "Chat mode 3 is reserved for system administrators."
|
||||||
|
if mode == 2 and spellbook.getInvoker().getAdminAccess() < 400:
|
||||||
|
return "Chat mode 2 is reserved for administrators."
|
||||||
|
if mode == 1 and spellbook.getInvoker().getAdminAccess() < 200:
|
||||||
|
# Like this will ever happen, but whatever.
|
||||||
|
return "Chat mode 1 is reserved for moderators."
|
||||||
|
base.cr.chatAgent.chatMode = mode
|
||||||
|
return "You are now talking in the %s chat mode." % mode2name.get(mode, "N/A")
|
||||||
|
|
||||||
|
|
|
@ -2,41 +2,138 @@ from direct.directnotify import DirectNotifyGlobal
|
||||||
from direct.distributed.DistributedObjectGlobalUD import DistributedObjectGlobalUD
|
from direct.distributed.DistributedObjectGlobalUD import DistributedObjectGlobalUD
|
||||||
# TODO: OTP should not depend on Toontown... Hrrm.
|
# TODO: OTP should not depend on Toontown... Hrrm.
|
||||||
from toontown.chat.TTWhiteList import TTWhiteList
|
from toontown.chat.TTWhiteList import TTWhiteList
|
||||||
|
from otp.distributed import OtpDoGlobals
|
||||||
|
import SequenceList
|
||||||
|
|
||||||
class ChatAgentUD(DistributedObjectGlobalUD):
|
class ChatAgentUD(DistributedObjectGlobalUD):
|
||||||
notify = DirectNotifyGlobal.directNotify.newCategory("ChatAgentUD")
|
notify = DirectNotifyGlobal.directNotify.newCategory("ChatAgentUD")
|
||||||
|
|
||||||
def announceGenerate(self):
|
def announceGenerate(self):
|
||||||
DistributedObjectGlobalUD.announceGenerate(self)
|
DistributedObjectGlobalUD.announceGenerate(self)
|
||||||
|
self.wantBlacklistSequence = config.GetBool('want-blacklist-sequence', True)
|
||||||
|
self.wantWhitelist = config.GetBool('want-whitelist', True)
|
||||||
|
if self.wantWhitelist:
|
||||||
self.whiteList = TTWhiteList()
|
self.whiteList = TTWhiteList()
|
||||||
|
if self.wantBlacklistSequence:
|
||||||
def chatMessage(self, message):
|
self.sequenceList = SequenceList.SequenceList()
|
||||||
|
self.chatMode2channel = {
|
||||||
|
1 : OtpDoGlobals.OTP_MOD_CHANNEL,
|
||||||
|
2 : OtpDoGlobals.OTP_ADMIN_CHANNEL,
|
||||||
|
3 : OtpDoGlobals.OTP_SYSADMIN_CHANNEL,
|
||||||
|
}
|
||||||
|
self.chatMode2prefix = {
|
||||||
|
1 : "[MOD] ",
|
||||||
|
2 : "[ADMIN] ",
|
||||||
|
3 : "[SYSADMIN] ",
|
||||||
|
}
|
||||||
|
# Open chat
|
||||||
|
def chatMessage(self, message, chatMode):
|
||||||
sender = self.air.getAvatarIdFromSender()
|
sender = self.air.getAvatarIdFromSender()
|
||||||
if sender == 0:
|
if sender == 0:
|
||||||
self.air.writeServerEvent('suspicious', self.air.getAccountIdFromSender(),
|
self.air.writeServerEvent('suspicious', accId=self.air.getAccountIdFromSender(),
|
||||||
'Account sent chat without an avatar', message)
|
issue='Account sent chat without an avatar', message=message)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
if self.wantWhitelist:
|
||||||
|
cleanMessage, modifications = self.cleanWhitelist(message)
|
||||||
|
else:
|
||||||
|
cleanMessage, modifications = message, []
|
||||||
|
self.air.writeServerEvent('chat-said', avId=sender, chatMode=chatMode, msg=message, cleanMsg=cleanMessage)
|
||||||
|
|
||||||
|
# TODO: The above is probably a little too ugly for my taste... Maybe AIR
|
||||||
|
# should be given an API for sending updates for unknown objects?
|
||||||
|
if chatMode != 0:
|
||||||
|
# Staff messages do not need to be cleaned. [TODO: Blacklist this?]
|
||||||
|
if message.startswith('.'):
|
||||||
|
# This is a thought bubble, move the point to the start.
|
||||||
|
cleanMessage = '.' + self.chatMode2prefix.get(chatMode, "") + message[1:]
|
||||||
|
else:
|
||||||
|
cleanMessage = self.chatMode2prefix.get(chatMode, "") + message
|
||||||
|
modifications = []
|
||||||
|
DistributedAvatar = self.air.dclassesByName['DistributedAvatarUD']
|
||||||
|
dg = DistributedAvatar.aiFormatUpdate('setTalk', sender, self.chatMode2channel.get(chatMode, sender),
|
||||||
|
self.air.ourChannel,
|
||||||
|
[0, 0, '', cleanMessage, modifications, 0])
|
||||||
|
self.air.send(dg)
|
||||||
|
|
||||||
|
# Regular filtered chat
|
||||||
|
def whisperMessage(self, receiverAvId, message):
|
||||||
|
sender = self.air.getAvatarIdFromSender()
|
||||||
|
if sender == 0:
|
||||||
|
self.air.writeServerEvent('suspicious', accId=self.air.getAccountIdFromSender(),
|
||||||
|
issue='Account sent chat without an avatar', message=message)
|
||||||
|
return
|
||||||
|
|
||||||
|
cleanMessage, modifications = self.cleanWhitelist(message)
|
||||||
|
# Maybe a better "cleaner" way of doing this, but it works
|
||||||
|
self.air.writeServerEvent('whisper-said', avId=sender, reciever=receiverAvId, msg=message, cleanMsg=cleanMessage)
|
||||||
|
DistributedAvatar = self.air.dclassesByName['DistributedAvatarUD']
|
||||||
|
dg = DistributedAvatar.aiFormatUpdate('setTalkWhisper', receiverAvId, receiverAvId, self.air.ourChannel,
|
||||||
|
[sender, sender, '', cleanMessage, modifications, 0])
|
||||||
|
self.air.send(dg)
|
||||||
|
|
||||||
|
# True friend unfiltered chat
|
||||||
|
def sfWhisperMessage(self, receiverAvId, message):
|
||||||
|
sender = self.air.getAvatarIdFromSender()
|
||||||
|
if sender == 0:
|
||||||
|
self.air.writeServerEvent('suspicious', accId=self.air.getAccountIdFromSender(),
|
||||||
|
issue='Account sent chat without an avatar', message=message)
|
||||||
|
return
|
||||||
|
|
||||||
|
cleanMessage = self.cleanBlacklist(message)
|
||||||
|
|
||||||
|
self.air.writeServerEvent('sf-whisper-said', avId=sender, reciever=receiverAvId, msg=message, cleanMsg=cleanMessage)
|
||||||
|
DistributedAvatar = self.air.dclassesByName['DistributedAvatarUD']
|
||||||
|
dg = DistributedAvatar.aiFormatUpdate('setTalkWhisper', receiverAvId, receiverAvId, self.air.ourChannel,
|
||||||
|
[sender, sender, '', cleanMessage, [], 0])
|
||||||
|
self.air.send(dg)
|
||||||
|
|
||||||
|
# Filter the chat message
|
||||||
|
def cleanWhitelist(self, message):
|
||||||
modifications = []
|
modifications = []
|
||||||
words = message.split(' ')
|
words = message.split(' ')
|
||||||
offset = 0
|
offset = 0
|
||||||
WantWhitelist = config.GetBool('want-whitelist', 1)
|
|
||||||
for word in words:
|
for word in words:
|
||||||
if word and not self.whiteList.isWord(word) and WantWhitelist:
|
if word and not self.whiteList.isWord(word):
|
||||||
modifications.append((offset, offset+len(word)-1))
|
modifications.append((offset, offset+len(word)-1))
|
||||||
offset += len(word) + 1
|
offset += len(word) + 1
|
||||||
|
|
||||||
cleanMessage = message
|
cleanMessage = message
|
||||||
|
if self.wantBlacklistSequence:
|
||||||
|
modifications += self.cleanSequences(cleanMessage)
|
||||||
|
|
||||||
for modStart, modStop in modifications:
|
for modStart, modStop in modifications:
|
||||||
cleanMessage = cleanMessage[:modStart] + '*'*(modStop-modStart+1) + cleanMessage[modStop+1:]
|
# Traverse through modification list and replace the characters of non-whitelisted words and/or blacklisted sequences with asterisks.
|
||||||
|
cleanMessage = cleanMessage[:modStart] + '*' * (modStop - modStart + 1) + cleanMessage[modStop + 1:]
|
||||||
|
|
||||||
|
return (cleanMessage, modifications)
|
||||||
|
|
||||||
|
# Check the black list for black-listed words
|
||||||
|
def cleanBlacklist(self, message):
|
||||||
|
# We don't have a black list so we just return the full message
|
||||||
|
return message
|
||||||
|
|
||||||
|
# Check for black-listed word sequences and scrub accordingly.
|
||||||
|
def cleanSequences(self, message):
|
||||||
|
modifications = []
|
||||||
|
offset = 0
|
||||||
|
words = message.split()
|
||||||
|
for wordit in xrange(len(words)):
|
||||||
|
word = words[wordit].lower()
|
||||||
|
seqlist = self.sequenceList.getList(word)
|
||||||
|
if len(seqlist) > 0:
|
||||||
|
for seqit in xrange(len(seqlist)):
|
||||||
|
sequence = seqlist[seqit]
|
||||||
|
splitseq = sequence.split()
|
||||||
|
if len(words) - (wordit + 1) >= len(splitseq):
|
||||||
|
cmplist = words[wordit + 1:]
|
||||||
|
del cmplist[len(splitseq):]
|
||||||
|
cmplist = [word.lower() for word in cmplist]
|
||||||
|
if cmp(cmplist, splitseq) == 0:
|
||||||
|
modifications.append((offset, offset + len(word) + len(sequence) - 1))
|
||||||
|
offset += len(word) + 1
|
||||||
|
|
||||||
|
return modifications
|
||||||
|
|
||||||
|
|
||||||
self.air.writeServerEvent('chat-said', sender, message, cleanMessage)
|
|
||||||
|
|
||||||
# TODO: The above is probably a little too ugly for my taste... Maybe AIR
|
|
||||||
# should be given an API for sending updates for unknown objects?
|
|
||||||
DistributedAvatar = self.air.dclassesByName['DistributedAvatarUD']
|
|
||||||
dg = DistributedAvatar.aiFormatUpdate('setTalk', sender, sender,
|
|
||||||
self.air.ourChannel,
|
|
||||||
[0, 0, '', cleanMessage, modifications, 0])
|
|
||||||
self.air.send(dg)
|
|
350
otp/chat/SequenceList.py
Normal file
350
otp/chat/SequenceList.py
Normal file
|
@ -0,0 +1,350 @@
|
||||||
|
class SequenceList:
|
||||||
|
|
||||||
|
def __init__(self):
|
||||||
|
self.list = {}
|
||||||
|
for line in sequences.split('\n'):
|
||||||
|
if line is '':
|
||||||
|
continue
|
||||||
|
split = line.split(':')
|
||||||
|
self.list[split[0].lower()] = [word.rstrip('\r\n').lower() for word in split[1].split(',')]
|
||||||
|
|
||||||
|
def getList(self, word):
|
||||||
|
if word in self.list:
|
||||||
|
return self.list[word]
|
||||||
|
else:
|
||||||
|
return []
|
||||||
|
|
||||||
|
sequences = '''
|
||||||
|
$:exe,kk zzz,k zzz,ex,hit,hits,hole,whole,ole,ooo le,holes
|
||||||
|
'n:i gg,i grow,i gross,i grr,i grrr,i gah
|
||||||
|
's:exe,kk zzz,k zzz,ex,hit,hits,u kk,uk
|
||||||
|
.:,Y .
|
||||||
|
42:0
|
||||||
|
4:20,2 0,twenty,chan,twin tea,twin ty
|
||||||
|
69:ed,ing
|
||||||
|
8:=,-
|
||||||
|
<:=,-
|
||||||
|
=:8,=,-
|
||||||
|
a,ah,ahh,ahhh,ahhhhh,ahhhhhh:zzz,sees,$,'s
|
||||||
|
ace,as,ash,ask,asp,ashton:hole,whole,ole,ooo le,holes,zzz,'s
|
||||||
|
ack:ools
|
||||||
|
ai,ay,ayy,ayyy,ayyyy:ds
|
||||||
|
al:coco ol,cool
|
||||||
|
an:a hon,a honda,a con,a cone,ail,ails,ailed,ailing,al,ale,ales,all,awl,us,u.s.,u.s.a.,u si,usa,use,used,using,uses,uss
|
||||||
|
ann:a hon,a honda,a con,a cone,al,ails,ailed,ailing,ale,ales,all,awl,us,u.s.,u.s.a.,u si,usa,use,used,using,uses,uss
|
||||||
|
anna:hon,honda,con da,con duh,cone da,cone duh
|
||||||
|
anne:a hon,a honda,a con,a cone,al,us,u.s.,u.s.a.,u si,usa,use,used,using,uses,uss
|
||||||
|
ape's:me,you,him,his,their,him,them,your,yourself,ur self
|
||||||
|
ape:me,you,him,his,their,him,them,your,yourself,ur self
|
||||||
|
apes:me,you,him,his,their,him,them,your,yourself,ur self
|
||||||
|
ate:me out,you out,u out,her out
|
||||||
|
ball:it more
|
||||||
|
ban:gg
|
||||||
|
bass:hole,whole,ole,stir,stir ed,stair,stair ed,tar,star,stared,tt a r ed,holes
|
||||||
|
bat:star,stair,stair ed,star,stared
|
||||||
|
bay:be maker
|
||||||
|
be,bee,bo,boo:ach,i tea see ache,i tee see ache,i tea sea ache,i tee sea ache,eye tea see ache,eye tee see ache,eye tea sea ache,eye tee sea ache,itches,itch,jay,jays,job,jobs,etch,cheese,itching,each,shh,shhh,shhhh,shhhhhh,it cha,cha,ache
|
||||||
|
beast:tea al i tea,tea al i ty,tea al i tie
|
||||||
|
ben:dover,dove err,doves err
|
||||||
|
bend:over
|
||||||
|
bet:ouch
|
||||||
|
big:deck,decks,dock,docks,clock,clocks,cook,cooks
|
||||||
|
bit,bite:cha,chi,chez,chin,chine,china,chose,chow,chess,itch,itches,ach,cheese,cheddar,shh,shhh,shhhh,shhhhhh
|
||||||
|
bla:zz it,zzz it,k tar,kk tar
|
||||||
|
black:tar,k tar,kk tar
|
||||||
|
blew:job,jobs
|
||||||
|
bloat:job,jobs
|
||||||
|
bloo:job,jobs
|
||||||
|
blowfish:job,jobs
|
||||||
|
blowy:job,jobs
|
||||||
|
blue:waffle,job,jobs
|
||||||
|
bob:zzz,zz
|
||||||
|
bon:r,or,err,errs,me,him,it,ro,her
|
||||||
|
bone:r,or,err,errs,me,him,it,ro,her
|
||||||
|
boo:be,bee,bees,by,ty,bye,byes,tay,tea
|
||||||
|
boot:bee,bees,ty,y
|
||||||
|
bos:ton
|
||||||
|
bow:job,jobs
|
||||||
|
brass:hole,whole,ole,ooo le,holes
|
||||||
|
bull:sheep,sheeps,ship,shift
|
||||||
|
bulls:hit,sheep,sheeps,ship,shift
|
||||||
|
burn:in hello
|
||||||
|
but:hole,whole,plug,plugs,sec,toll,head,face
|
||||||
|
by:itch,itches
|
||||||
|
cam:bucket,buckets,dumpster,girl,girls,on me,tastes
|
||||||
|
came:bucket,buckets,dumpster,on me,tastes,in you,in u
|
||||||
|
cee:man,men,min,mins,moon,ex,a tt le,xii,exe,kk zzz
|
||||||
|
chic:a go,ago
|
||||||
|
chin:kk
|
||||||
|
class:hole,whole,ole
|
||||||
|
climb:max,maxed,maxes,maxing
|
||||||
|
climbed:max,maxed,maxes,maxing
|
||||||
|
climbs:max,maxed,maxes,maxing
|
||||||
|
clue:luxe,lucks
|
||||||
|
coca:in,ing
|
||||||
|
cog:awk
|
||||||
|
come:bucket,buckets,dumpster,on me,tastes
|
||||||
|
comes:bucket,buckets,dumpster,on me,tastes
|
||||||
|
con:dim,dims,dome,domes,dooms,doom,do hm,do hmm,do hmmm,do mm
|
||||||
|
concentration:camp
|
||||||
|
coop:kk
|
||||||
|
cop:kk
|
||||||
|
corn:oh graphic,ooo,hoo
|
||||||
|
cunning:link us,link is
|
||||||
|
curry:man cher,men cher,min cher,moon cher
|
||||||
|
da:am,mm,yum
|
||||||
|
dab:itch,itches
|
||||||
|
dah:am,yum
|
||||||
|
dat:as,ask,asp,asset,ashton
|
||||||
|
day:um,yum
|
||||||
|
dee:bag,kay,k
|
||||||
|
di:i do,ill do,ill does,kk,ill dot,i'll do,i'll dot,i'll does,ik,i
|
||||||
|
dill:doe,do,dot,does
|
||||||
|
ding:us,usa,uss,u.s.a.
|
||||||
|
dip:stick
|
||||||
|
dirt:y,ye,eh
|
||||||
|
docs:me,you,him,his,their,him,them,your
|
||||||
|
dot:come
|
||||||
|
dr:ugh,un kk
|
||||||
|
duck,luck,buck:err,error,errors,my life,everyone,me,ing,yourself,your self,ur self
|
||||||
|
ducked:your,ur,his,her,you
|
||||||
|
due:shh,shhh,shhhh,shhhhhh
|
||||||
|
dug:rugs
|
||||||
|
dumbo:as,ash,ask,asp
|
||||||
|
eat:me out,you out,u out,her out
|
||||||
|
eating:me out,you out,u out,her out
|
||||||
|
eats:me out,you out,u out,her out
|
||||||
|
eh:bo la,bowl a,rekt ion,rekt ions,wrekt ion,wrekt ions
|
||||||
|
el:mayo
|
||||||
|
ex:tube,tubes,at,cream mint
|
||||||
|
f.a.q.:ed,err,error,errors,ear,ears,you,ate,eat,gate,goat,got,ing,this,my life,everyone,me,off,king
|
||||||
|
face:book
|
||||||
|
fad:gg ate,gg eat,gate,get,it,goat,git
|
||||||
|
fads:gg ate,gg eat,eat,gate,get,it,goat,git
|
||||||
|
fake:king,k ing,k eng,kk ing,kk eng,off
|
||||||
|
family,dad,sister,brother,mom:dead,deads
|
||||||
|
far:kk,king,k ing,k eng,kk ing,kk eng
|
||||||
|
fat:as,asset,tas
|
||||||
|
faye:get,git,got
|
||||||
|
few:ack or,hack or,kk,king,ok,k ing,k eng,kk ing,kk eng
|
||||||
|
fill:my kitty,your kitty,her kitty,his kitty,their kitty,ur kitty
|
||||||
|
finger,fingers,fin gg err:you,me,her,him,them,us,your,ur,yourself,u
|
||||||
|
flack:you,king,ing,this,my life,everyone,me,off
|
||||||
|
flick:you,king,ing,this,my life,everyone,me,off
|
||||||
|
flock:ed,err,error,errors,ear,ears,you,ate,eat,gate,goat,got,ing,this,my life,everyone,me,off,king,u,you,yourself,ur
|
||||||
|
flowerpot:head,headed,heading,heads
|
||||||
|
flowerpots:head,headed,heading,heads
|
||||||
|
flunk:ing,king,eng,in gg,her,u,you,ur,yourself
|
||||||
|
foe:kk,king,ok,k ing,k eng,kk ing,kk eng
|
||||||
|
fog:ate,eat,gate,get,it,goat,got
|
||||||
|
folk:ed,err,error,errors,ear,ears,you,gate,goat,ing,this,my life,everyone,me,off,king
|
||||||
|
folks:ed,err,error,errors,ear,ears,you,gate,goat,ing,this,my life,everyone,me,off
|
||||||
|
for:kk,king,k ing,k eng,kk ing,kk eng,twenty,twin ty,20,twin tea
|
||||||
|
fork:err,error,errors,ear,ears,you,this,my life,everyone,me,off,king,ing,her,eng,in,u,ur,hair,air
|
||||||
|
four:chan,twenty,20,2 0,twin ty,twin tea
|
||||||
|
freaky:in,ing
|
||||||
|
free:kin,k in,k ing,k eng
|
||||||
|
fuchsia:err,error,errors,ear,ears,you,this,my life,everyone,me,off
|
||||||
|
fun:king,k ing,k eng,kk ing,kk eng,luck
|
||||||
|
gah:ay,yay
|
||||||
|
gee:mail,ay,yay
|
||||||
|
gen:it,i tall,i tail,i tails
|
||||||
|
get:wasted,waste ed,bent,hi,high,higher,highest,lay
|
||||||
|
gets:wasted,waste ed,hi,high,higher,highest,lay
|
||||||
|
getting:wasted,waste ed,hi,high,higher,highest,lay
|
||||||
|
gg:ay,a y,ah y,ayy,aye
|
||||||
|
girl,girls:1 cup,one cup,on cup,won cup,and a cup,plus a cup
|
||||||
|
give:me head,me pleasure,a truck
|
||||||
|
glass,glory:hole,whole,ole,ooo le,holes
|
||||||
|
go:to hello
|
||||||
|
got:wasted,waste ed,hi,high,higher,highest,ooo hello
|
||||||
|
grape:me,you,him,his,their,him,them,your,ed,yourself,ur self
|
||||||
|
grapes:me,you,him,his,their,him,them,your,ed,yourself,ur self
|
||||||
|
grass:hole,whole,ole,ooo le,holes
|
||||||
|
half:baked
|
||||||
|
hand:job,jobs
|
||||||
|
hang:your,yourself,ur self,myself,my self,me,you
|
||||||
|
hate:black people,back people,white people
|
||||||
|
have:sec,see ex
|
||||||
|
haved:sec,see ex
|
||||||
|
having:sec,see ex
|
||||||
|
he:ill,ii,ell,el
|
||||||
|
her:as,asp,bowls,bowl's,bows,bock,butted,but,come,pew,period,ah,dee,ash
|
||||||
|
hill:yourself,your self,ur self,u err self,u r self
|
||||||
|
his:as,asp,bowls,bowl's,bows,bock,butted,but,come,pew,period,ah,dee,ash
|
||||||
|
hit's:learn
|
||||||
|
hit:learn
|
||||||
|
hits:learn
|
||||||
|
hm:arr y juan,arr y jane,arr y jan,arr y jam
|
||||||
|
hmm:arr y juan,arr y jane,arr y jan,arr y jam
|
||||||
|
hmmm:arr y juan,arr y jane,arr y jan,arr y jam
|
||||||
|
horn:y,horn eh,knee,ie,i
|
||||||
|
honk:y,eye
|
||||||
|
hot:mail,come
|
||||||
|
hue:jazz
|
||||||
|
huge:as,mass,ashton,ask,asp,jazz,ash
|
||||||
|
huger:as,mass,ashton,ask,asp,jazz,ash
|
||||||
|
i'm:moist,wet,hard
|
||||||
|
i:es,es bean,es beans,es be an,es be ann,es be anne,es be i an,es be i ann,es be i anne,:c k,=c k,;c k,gg a,gg ah,gg ahh,gg ahhh,gg ahhhhh,gg ha
|
||||||
|
ice:hole,whole,ole,ooo le
|
||||||
|
id:i
|
||||||
|
if:uk
|
||||||
|
im:moist,wet,hard
|
||||||
|
in:he'll,the assistant,your mom,your mother,your assistant,ur assistant,ur mom,ur mother,the as,your as,ur as
|
||||||
|
inst:a gram,ah gram,ahh gram,ahhh gram,ahhhhh gram,ahhhhhh gram
|
||||||
|
instant:graham,grand
|
||||||
|
inter:course
|
||||||
|
jack's:ed,ing,me,myself,her,herself,him,himself,of,off,ourselves,they,themselves,us,you,yourself,u late
|
||||||
|
jack:ed,ing,me,myself,her,herself,him,himself,off,ourselves,they,themselves,us,you,yourself,u late
|
||||||
|
jacks:ed,ing,me,myself,her,herself,him,himself,of,off,ourselves,they,themselves,us,you,yourself,u late
|
||||||
|
jazz:hole,ole,on
|
||||||
|
kay:kay kay
|
||||||
|
kin:kk y
|
||||||
|
kind:kk y
|
||||||
|
king:kk y
|
||||||
|
kk:awk,bock,err,ill,ills,kk
|
||||||
|
knee:gg,grow,gross,grr,grrr,gah,gas,gauss
|
||||||
|
kneed:gg,grow,gross,grr,grrr,gah,gas,gauss
|
||||||
|
knit:gah
|
||||||
|
kun:tt
|
||||||
|
kyle's:yourself,your self,ur self,u err self,u r self
|
||||||
|
kyle:yourself,your self,ur self,u err self,u r self
|
||||||
|
kyles:yourself,your self,ur self,u err self,u r self
|
||||||
|
lap:dance
|
||||||
|
last:name
|
||||||
|
less:be i an,be i ann,be i anne,be an,be ann,be anne,bean,beans
|
||||||
|
little:sit,hitch,itch
|
||||||
|
lucks:clan
|
||||||
|
luxe:clan
|
||||||
|
ma:stir bait
|
||||||
|
making,make,makes,made:him hard,love
|
||||||
|
marry:juan a,juan ha,juan ah,jane,jan,jam
|
||||||
|
mary:juan a,juan ha,juan ah,jane,jan,jam
|
||||||
|
mass:hole,whole,ole,ooo le,stir bait
|
||||||
|
mast:are bait,are baits,are baiter,are bait eng,are bait ed,stir bait
|
||||||
|
master:bait,baits,baiter,bait eng,bait ed
|
||||||
|
mastered:bait,baits,baiter,bait eng,bait ed
|
||||||
|
mastering:bait,baits,baiter,bait eng,bait ed
|
||||||
|
masters:bait,baits,baiter,bait eng,bait ed
|
||||||
|
mayor:a juan,ah juan
|
||||||
|
men:str u ate
|
||||||
|
mexican:brown
|
||||||
|
mike:hawk,hawks,hunt,hunts
|
||||||
|
mm:arr y juan,arr y jane,arr y jan,arr y jam
|
||||||
|
mo,moe,moo:foe,foes,for,four
|
||||||
|
moon:shine
|
||||||
|
mother:flick,flicker,fork,fuchsia,duck,ducking,folk,folks,yuck,flock,heck,truck,funky,flunky,fax,quacker,bucker,bicker,faker,fake,flunk,flunking,tru
|
||||||
|
my,mah:as,asp,bowls,bowl's,bows,bock,butted,but,come,pew,period,ah,dee,ash,di ik,deck,decks,dock,docks,cook,cooks
|
||||||
|
nada:zen,zeke,z.z.
|
||||||
|
nag:zen,zeke,z.z.,grr,grrr,a,ah
|
||||||
|
nah:zen,zeke,z.z.,gg a,gg ah
|
||||||
|
nay:kit,grow,growl,gah,gg a,gg ah
|
||||||
|
neigh,nigh,nik:err,grr,grrr,grrrrrrrl,grow,grove,gurl,girl,gear,gears,gross,ah,a,gah
|
||||||
|
new:york,fork,folk,forks,folks
|
||||||
|
not:zen,zeke,z.z.
|
||||||
|
octopus:y,ye,sea,seas
|
||||||
|
octopuses:y,ye,sea,seas
|
||||||
|
of:u kk,uk
|
||||||
|
oh:rn y
|
||||||
|
old:are you,r you,are u,r u
|
||||||
|
omg:egg al
|
||||||
|
on:your knees,your knee
|
||||||
|
open:legs,leg
|
||||||
|
or:gah some,gah sum,gg y,gee
|
||||||
|
other:flick,flicker,fork,fuchsia,duck,folk,folks,yuck,flock,heck,truck,funky,flunky,fax,quacker,bucker,bicker
|
||||||
|
pah:key,keys
|
||||||
|
pant:tease,teas,ties
|
||||||
|
passed:off
|
||||||
|
pause:i,eek,eh
|
||||||
|
pea:nest,mess,pea,pi,pie,do file,knees,nice,niece
|
||||||
|
peck:err
|
||||||
|
peep:show
|
||||||
|
pen:ice,iced,ices,icing,island,eh tray,eh tate,15,is,1s,i zzz,his,1 5
|
||||||
|
pens:ice,iced,ices,icing,island,eh tray,eh tate,15,is,1s,i zzz,his,1 5
|
||||||
|
period:cramps
|
||||||
|
pet:oh pile,oh piles,oh file,oh files
|
||||||
|
pew:cee,say,says,sea,seas,see,sees,she,shes,she's,si
|
||||||
|
phony:number,numb err
|
||||||
|
pi:pi,ssw
|
||||||
|
piece,peace:of shift,of ship,of shut,of shirt
|
||||||
|
play:boy
|
||||||
|
pooh:cee,say,says,sea,seas,see,sees,she,shes,she's,si
|
||||||
|
pose:eh
|
||||||
|
pound:ed,ing,me,myself,her,herself,him,himself,of,off,ourselves,they,themselves,us,you,yourself
|
||||||
|
pounds:ed,ing,me,myself,her,herself,him,himself,of,off,ourselves,they,themselves,us,you,yourself
|
||||||
|
pour:on,no
|
||||||
|
pro:st i tut,stick tut
|
||||||
|
purr:cee,say,says,sea,seas,see,sees,she,shes,she's,si
|
||||||
|
push:y,ye,cee,say,says,sea,seas,see,sees,she,shes,she's,si
|
||||||
|
put:cee,say,says,sea,seas,see,sees,she,shes,she's,si
|
||||||
|
queue:ear
|
||||||
|
rake:you
|
||||||
|
rap:me,you,her,his,their,him,them,your,ed,35,yourself,ur self,eh me,ping
|
||||||
|
ray:ping,pi
|
||||||
|
re:tar ed,tart,tarts,tar tt ed,tar teed,tar dead,tar deed,tar dee ed,tar dad
|
||||||
|
read:tube,tubes
|
||||||
|
red:tube,tubes
|
||||||
|
reed:tube,tubes
|
||||||
|
rekt:um,hum,u hmm,huh,u hm,u hmmm
|
||||||
|
roll:grass,in the hay,in the hey
|
||||||
|
rub:one off,one of,1 off,1 of,on off,on of
|
||||||
|
san:francisco
|
||||||
|
sass:hole,whole,ole
|
||||||
|
sassy:hole,whole,ole
|
||||||
|
saw:kk
|
||||||
|
sc:hum,um,u hmm,huh,u hm,u hmmm
|
||||||
|
sea,see,sec::man,men,min,mins,moon,ex,a tt le,xii,exe,kk zzz
|
||||||
|
seem:en,an,man,men,min,ex,a tt le
|
||||||
|
sell,selling,sold:cracked,cracked-uptick,crackin',cracking,crackle,crackle's,crackles,crackly,herbs
|
||||||
|
sew:kk
|
||||||
|
she:it,hitting,its,ex i,mail,mails,mailed,mailing,male,males,tt,i,ii
|
||||||
|
shh,shhh,shhhh,shhhhhh,shy:it,eat,hit,hits,its,ex i,he mail,he mails,he mailed,he mailing,he male,he males,ii tt,i it,i tt
|
||||||
|
shut:the duck,the luck
|
||||||
|
si:u tt,exe,kk zzz,k zzz,ex
|
||||||
|
ski:it,ii tt
|
||||||
|
skill:your,yourself,ur self,myself,my self,me,you
|
||||||
|
sky:pea,peas,peel,pen,pet,pi,pie,peta,pico,pens,pop,hype,ape,pets,peep,per,pell,pa
|
||||||
|
snap,nap:chat
|
||||||
|
so:exe,kk zzz,k zzz,ex,kk
|
||||||
|
sock,socks,shucks:it,on it,my deck,my dock,my doc,ur deck,ur dock,your deck,your dock,his deck,his dock,cooks,cook,my cook,ur cook,your cook,his cook,my cooks,ur cooks,your cooks,his cooks,deck,decks,a dock,a deck,a docks,a decks,a cook,a cooks,my duck,my ducks,dock
|
||||||
|
sofa:king,kin,keen,kings
|
||||||
|
some:cricket
|
||||||
|
son,sun:of a bit,of a peach,of a be,of a bee
|
||||||
|
st:on ed,rip
|
||||||
|
stone:ed
|
||||||
|
stu:pit,pod
|
||||||
|
stuck:my duck,my dock,my deck,ing
|
||||||
|
sue:kk,lute,lutes
|
||||||
|
sugar:daddy
|
||||||
|
tah:tas,tah
|
||||||
|
tea:bag,bagged,bagging,bags
|
||||||
|
test:i cools,i cool,tickle,tickles
|
||||||
|
the:di,hello,flunk
|
||||||
|
tho:tt,tea,tee,ty
|
||||||
|
to:he'll
|
||||||
|
too:he'll
|
||||||
|
truck:eh ru,ing,eng,you,u,up,ed,her,or
|
||||||
|
tt:its,its,it
|
||||||
|
two:he'll
|
||||||
|
uk:you,u
|
||||||
|
un:tee
|
||||||
|
under:my skirt,her skirt,your skirt,my dress,her dress,your dress,ur skirt,ur dress
|
||||||
|
ur:but,bum,as,period,hole,holes
|
||||||
|
vague:in a,i nah
|
||||||
|
vern:gen
|
||||||
|
vet:china
|
||||||
|
via:grape
|
||||||
|
wanna:duck
|
||||||
|
wat:the hello,the fork,the duck,the freaky,the yuck,your sky,ur sky,the fire truck,the truck,the he'll
|
||||||
|
we,whee:ed,neigh is,knees
|
||||||
|
what:the hello,the fork,the duck,the freaky,the yuck,your sky,ur sky,the truck,the fire truck,the he'll
|
||||||
|
white:power
|
||||||
|
who:err,errs,re,ree
|
||||||
|
wrap:me,you,him,them,them
|
||||||
|
wut:the hello,the fork,the duck,the freaky,the yuck,your sky,ur sky,the truck,the fire truck,the he'll
|
||||||
|
you:a hole,in me
|
||||||
|
your:as,but,bum,come,period,hole,holes,ash,sass
|
||||||
|
yuck:err,error,errors,my life,me,ing,you,dee
|
||||||
|
zone:tan
|
||||||
|
zzz:3 ex,33 ex,ex,ugh eng,hole,holes
|
||||||
|
'''
|
|
@ -20,3 +20,21 @@ class WhiteList:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
return self.words[i].startswith(text)
|
return self.words[i].startswith(text)
|
||||||
|
|
||||||
|
def prefixCount(self, text):
|
||||||
|
text = self.cleanText(text)
|
||||||
|
i = bisect_left(self.words, text)
|
||||||
|
j = i
|
||||||
|
while j < self.numWords and self.words[j].startswith(text):
|
||||||
|
j += 1
|
||||||
|
|
||||||
|
return j - i
|
||||||
|
|
||||||
|
def prefixList(self, text):
|
||||||
|
text = self.cleanText(text)
|
||||||
|
i = bisect_left(self.words, text)
|
||||||
|
j = i
|
||||||
|
while j < self.numWords and self.words[j].startswith(text):
|
||||||
|
j += 1
|
||||||
|
|
||||||
|
return self.words[i:j]
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
from pandac.PandaModules import *
|
from pandac.PandaModules import *
|
||||||
|
|
||||||
|
|
||||||
hashVal = 598642574
|
hashVal = 4270694562L
|
||||||
|
|
||||||
|
|
||||||
from toontown.coghq import DistributedCashbotBossSafe, DistributedCashbotBossCrane, DistributedBattleFactory, DistributedCashbotBossTreasure, DistributedCogHQDoor, DistributedSellbotHQDoor, DistributedFactoryElevatorExt, DistributedMintElevatorExt, DistributedLawOfficeElevatorExt, DistributedLawOfficeElevatorInt, LobbyManager, DistributedMegaCorp, DistributedFactory, DistributedLawOffice, DistributedLawOfficeFloor, DistributedLift, DistributedDoorEntity, DistributedSwitch, DistributedButton, DistributedTrigger, DistributedCrushableEntity, DistributedCrusherEntity, DistributedStomper, DistributedStomperPair, DistributedLaserField, DistributedGolfGreenGame, DistributedSecurityCamera, DistributedMover, DistributedElevatorMarker, DistributedBarrelBase, DistributedGagBarrel, DistributedBeanBarrel, DistributedHealBarrel, DistributedGrid, ActiveCell, DirectionalCell, CrusherCell, DistributedCrate, DistributedSinkingPlatform, BattleBlocker, DistributedMint, DistributedMintRoom, DistributedMintBattle, DistributedStage, DistributedStageRoom, DistributedStageBattle, DistributedLawbotBossGavel, DistributedLawbotCannon, DistributedLawbotChair, DistributedCogKart, DistributedCountryClub, DistributedCountryClubRoom, DistributedMoleField, DistributedCountryClubBattle, DistributedMaze, DistributedFoodBelt, DistributedBanquetTable, DistributedGolfSpot
|
from toontown.coghq import DistributedCashbotBossSafe, DistributedCashbotBossCrane, DistributedBattleFactory, DistributedCashbotBossTreasure, DistributedCogHQDoor, DistributedSellbotHQDoor, DistributedFactoryElevatorExt, DistributedMintElevatorExt, DistributedLawOfficeElevatorExt, DistributedLawOfficeElevatorInt, LobbyManager, DistributedMegaCorp, DistributedFactory, DistributedLawOffice, DistributedLawOfficeFloor, DistributedLift, DistributedDoorEntity, DistributedSwitch, DistributedButton, DistributedTrigger, DistributedCrushableEntity, DistributedCrusherEntity, DistributedStomper, DistributedStomperPair, DistributedLaserField, DistributedGolfGreenGame, DistributedSecurityCamera, DistributedMover, DistributedElevatorMarker, DistributedBarrelBase, DistributedGagBarrel, DistributedBeanBarrel, DistributedHealBarrel, DistributedGrid, ActiveCell, DirectionalCell, CrusherCell, DistributedCrate, DistributedSinkingPlatform, BattleBlocker, DistributedMint, DistributedMintRoom, DistributedMintBattle, DistributedStage, DistributedStageRoom, DistributedStageBattle, DistributedLawbotBossGavel, DistributedLawbotCannon, DistributedLawbotChair, DistributedCogKart, DistributedCountryClub, DistributedCountryClubRoom, DistributedMoleField, DistributedCountryClubBattle, DistributedMaze, DistributedFoodBelt, DistributedBanquetTable, DistributedGolfSpot
|
||||||
|
|
|
@ -88,4 +88,7 @@ OTP_ZONE_ID_DISTRICTS = 3
|
||||||
OTP_ZONE_ID_DISTRICTS_STATS = 4
|
OTP_ZONE_ID_DISTRICTS_STATS = 4
|
||||||
OTP_ZONE_ID_ELEMENTS = 5
|
OTP_ZONE_ID_ELEMENTS = 5
|
||||||
OTP_NET_MESSENGER_CHANNEL = (OTP_DO_ID_UBER_DOG << 32) + OTP_ZONE_ID_MANAGEMENT
|
OTP_NET_MESSENGER_CHANNEL = (OTP_DO_ID_UBER_DOG << 32) + OTP_ZONE_ID_MANAGEMENT
|
||||||
OTP_STAFF_CHANNEL = 6200
|
OTP_MOD_CHANNEL = 6200
|
||||||
|
OTP_ADMIN_CHANNEL = 6400
|
||||||
|
OTP_SYSADMIN_CHANNEL = 6500
|
||||||
|
|
||||||
|
|
|
@ -54,5 +54,7 @@ except SystemExit:
|
||||||
raise
|
raise
|
||||||
except Exception:
|
except Exception:
|
||||||
info = PythonUtil.describeException()
|
info = PythonUtil.describeException()
|
||||||
simbase.air.writeServerEvent('ai-exception', simbase.air.getAvatarIdFromSender(), simbase.air.getAccountIdFromSender(), info)
|
simbase.air.writeServerEvent('ai-exception', avId=simbase.air.getAvatarIdFromSender(), accId=simbase.air.getAccountIdFromSender(), exception=info)
|
||||||
|
with open(config.GetString('ai-crash-log-name', 'ai-crash.txt'), 'w+') as file:
|
||||||
|
file.write(info + "\n")
|
||||||
raise
|
raise
|
||||||
|
|
|
@ -142,10 +142,10 @@ class DistributedBattleBldgAI(DistributedBattleBaseAI.DistributedBattleBaseAI):
|
||||||
self.resumeLastActiveSuitDied = 0
|
self.resumeLastActiveSuitDied = 0
|
||||||
|
|
||||||
def enterReservesJoining(self, ts=0):
|
def enterReservesJoining(self, ts=0):
|
||||||
pass
|
return None
|
||||||
|
|
||||||
def exitReservesJoining(self, ts=0):
|
def exitReservesJoining(self, ts=0):
|
||||||
pass
|
return None
|
||||||
|
|
||||||
def enterReward(self):
|
def enterReward(self):
|
||||||
self.timer.startCallback(FLOOR_REWARD_TIMEOUT, self.serverRewardDone)
|
self.timer.startCallback(FLOOR_REWARD_TIMEOUT, self.serverRewardDone)
|
||||||
|
|
|
@ -200,6 +200,8 @@ buildingMinMax = {
|
||||||
config.GetInt('lullaby-lane-building-max', 12)],
|
config.GetInt('lullaby-lane-building-max', 12)],
|
||||||
ToontownGlobals.PajamaPlace: [config.GetInt('pajama-place-building-min', 6),
|
ToontownGlobals.PajamaPlace: [config.GetInt('pajama-place-building-min', 6),
|
||||||
config.GetInt('pajama-place-building-max', 12)],
|
config.GetInt('pajama-place-building-max', 12)],
|
||||||
|
ToontownGlobals.RockAByeRoad: [config.GetInt('rock-a-bye-road-building-min', 6),
|
||||||
|
config.GetInt('rock-a-bye-road-building-max', 12)],
|
||||||
ToontownGlobals.SellbotHQ: [0, 0],
|
ToontownGlobals.SellbotHQ: [0, 0],
|
||||||
ToontownGlobals.SellbotFactoryExt: [0, 0],
|
ToontownGlobals.SellbotFactoryExt: [0, 0],
|
||||||
ToontownGlobals.CashbotHQ: [0, 0],
|
ToontownGlobals.CashbotHQ: [0, 0],
|
||||||
|
@ -225,6 +227,7 @@ buildingChance = {
|
||||||
ToontownGlobals.PolarPlace: config.GetFloat('polar-place-building-chance', 100.0),
|
ToontownGlobals.PolarPlace: config.GetFloat('polar-place-building-chance', 100.0),
|
||||||
ToontownGlobals.LullabyLane: config.GetFloat('lullaby-lane-building-chance', 100.0),
|
ToontownGlobals.LullabyLane: config.GetFloat('lullaby-lane-building-chance', 100.0),
|
||||||
ToontownGlobals.PajamaPlace: config.GetFloat('pajama-place-building-chance', 100.0),
|
ToontownGlobals.PajamaPlace: config.GetFloat('pajama-place-building-chance', 100.0),
|
||||||
|
ToontownGlobals.RockAByeRoad: config.GetFloat('rock-a-bye-road-building-chance', 100.0),
|
||||||
ToontownGlobals.SellbotHQ: 0.0,
|
ToontownGlobals.SellbotHQ: 0.0,
|
||||||
ToontownGlobals.SellbotFactoryExt: 0.0,
|
ToontownGlobals.SellbotFactoryExt: 0.0,
|
||||||
ToontownGlobals.CashbotHQ: 0.0,
|
ToontownGlobals.CashbotHQ: 0.0,
|
||||||
|
|
|
@ -1,17 +1,9 @@
|
||||||
import copy
|
|
||||||
from direct.directnotify import DirectNotifyGlobal
|
from direct.directnotify import DirectNotifyGlobal
|
||||||
from direct.interval.IntervalGlobal import *
|
from direct.interval.IntervalGlobal import *
|
||||||
from direct.showbase import AppRunnerGlobal
|
from direct.showbase import AppRunnerGlobal
|
||||||
from direct.showbase import DirectObject
|
from direct.showbase import DirectObject
|
||||||
from direct.showbase import PythonUtil
|
from direct.showbase import PythonUtil
|
||||||
import os
|
|
||||||
from pandac.PandaModules import *
|
from pandac.PandaModules import *
|
||||||
import re
|
|
||||||
import sys
|
|
||||||
import token
|
|
||||||
import tokenize
|
|
||||||
|
|
||||||
import BlinkingArrows
|
|
||||||
from otp.speedchat import SpeedChatGlobals
|
from otp.speedchat import SpeedChatGlobals
|
||||||
from toontown.ai import DistributedBlackCatMgr
|
from toontown.ai import DistributedBlackCatMgr
|
||||||
from toontown.chat.ChatGlobals import *
|
from toontown.chat.ChatGlobals import *
|
||||||
|
@ -20,7 +12,8 @@ from toontown.suit import SuitDNA
|
||||||
from toontown.toon import ToonHeadFrame
|
from toontown.toon import ToonHeadFrame
|
||||||
from toontown.toonbase import TTLocalizer
|
from toontown.toonbase import TTLocalizer
|
||||||
from toontown.toonbase import ToontownBattleGlobals
|
from toontown.toonbase import ToontownBattleGlobals
|
||||||
|
from toontown.quest import QuestScripts
|
||||||
|
import copy, re, tokenize, BlinkingArrows, StringIO
|
||||||
|
|
||||||
notify = DirectNotifyGlobal.directNotify.newCategory('QuestParser')
|
notify = DirectNotifyGlobal.directNotify.newCategory('QuestParser')
|
||||||
lineDict = {}
|
lineDict = {}
|
||||||
|
@ -49,14 +42,16 @@ def init():
|
||||||
def clear():
|
def clear():
|
||||||
globalVarDict.clear()
|
globalVarDict.clear()
|
||||||
|
|
||||||
def readFile(filename):
|
def readFile():
|
||||||
global curId
|
global curId
|
||||||
scriptFile = StreamReader(vfs.openReadFile(filename, 1), 1)
|
script = StringIO.StringIO(QuestScripts.script)
|
||||||
def readline():
|
|
||||||
return scriptFile.readline().replace('\r', '')
|
|
||||||
|
|
||||||
gen = tokenize.generate_tokens(readline)
|
def readLine():
|
||||||
|
return script.readline().replace('\r', '')
|
||||||
|
|
||||||
|
gen = tokenize.generate_tokens(readLine)
|
||||||
line = getLineOfTokens(gen)
|
line = getLineOfTokens(gen)
|
||||||
|
|
||||||
while line is not None:
|
while line is not None:
|
||||||
if line == []:
|
if line == []:
|
||||||
line = getLineOfTokens(gen)
|
line = getLineOfTokens(gen)
|
||||||
|
@ -64,13 +59,12 @@ def readFile(filename):
|
||||||
if line[0] == 'ID':
|
if line[0] == 'ID':
|
||||||
parseId(line)
|
parseId(line)
|
||||||
elif curId is None:
|
elif curId is None:
|
||||||
notify.error('Every script must begin with an ID')
|
notify.error('A script must begin with an ID')
|
||||||
else:
|
else:
|
||||||
lineDict[curId].append(line)
|
lineDict[curId].append(line)
|
||||||
line = getLineOfTokens(gen)
|
line = getLineOfTokens(gen)
|
||||||
|
|
||||||
return
|
script.close()
|
||||||
|
|
||||||
|
|
||||||
def getLineOfTokens(gen):
|
def getLineOfTokens(gen):
|
||||||
tokens = []
|
tokens = []
|
||||||
|
@ -908,13 +902,4 @@ class NPCMoviePlayer(DirectObject.DirectObject):
|
||||||
|
|
||||||
return Sequence(Func(grabCurTrackAccess), LerpFunctionInterval(updateGagLevel, fromData=1, toData=7, duration=0.3), WaitInterval(3.5), LerpFunctionInterval(updateGagLevel, fromData=7, toData=1, duration=0.3), Func(restoreTrackAccess), Func(messenger.send, 'donePreview'))
|
return Sequence(Func(grabCurTrackAccess), LerpFunctionInterval(updateGagLevel, fromData=1, toData=7, duration=0.3), WaitInterval(3.5), LerpFunctionInterval(updateGagLevel, fromData=7, toData=1, duration=0.3), Func(restoreTrackAccess), Func(messenger.send, 'donePreview'))
|
||||||
|
|
||||||
searchPath = DSearchPath()
|
readFile()
|
||||||
if __debug__:
|
|
||||||
searchPath.appendDirectory(Filename('../resources/phase_3/etc'))
|
|
||||||
searchPath.appendDirectory(Filename('resources/phase_3/etc'))
|
|
||||||
searchPath.appendDirectory(Filename('/phase_3/etc'))
|
|
||||||
scriptFile = Filename('QuestScripts.txt')
|
|
||||||
found = vfs.resolveFilename(scriptFile, searchPath)
|
|
||||||
if not found:
|
|
||||||
notify.error('Could not find QuestScripts.txt file')
|
|
||||||
readFile(scriptFile)
|
|
362
toontown/quest/QuestScripts.py
Normal file
362
toontown/quest/QuestScripts.py
Normal file
|
@ -0,0 +1,362 @@
|
||||||
|
script = '''
|
||||||
|
ID quest_assign_101
|
||||||
|
CLEAR_CHAT npc
|
||||||
|
LOAD squirt1 "phase_3.5/models/gui/tutorial_gui" "squirt1"
|
||||||
|
LOAD squirt2 "phase_3.5/models/gui/tutorial_gui" "squirt2"
|
||||||
|
LOAD toonBuilding "phase_3.5/models/gui/tutorial_gui" "toon_buildings"
|
||||||
|
LOAD cogBuilding "phase_3.5/models/gui/tutorial_gui" "suit_buildings"
|
||||||
|
LOAD cogs "phase_3.5/models/gui/tutorial_gui" "suits"
|
||||||
|
POSHPRSCALE cogs -1.05 7 0 0 0 0 1 1 1
|
||||||
|
POSHPRSCALE toonBuilding -1.05 7 0 0 0 0 1.875 1.875 1.875
|
||||||
|
POSHPRSCALE cogBuilding -1.05 7 0 0 0 0 1.875 1.875 1.875
|
||||||
|
POSHPRSCALE squirt1 -1.05 7 0 0 0 0 1.875 1.875 1.875
|
||||||
|
POSHPRSCALE squirt2 -1.05 7 0 0 0 0 1.875 1.875 1.875
|
||||||
|
REPARENTTO camera npc
|
||||||
|
POS camera -2.2 5.2 3.3
|
||||||
|
HPR camera 215 5 0
|
||||||
|
WRTREPARENTTO camera localToon
|
||||||
|
PLAY_ANIM npc "right-hand-start" 1
|
||||||
|
WAIT 1
|
||||||
|
REPARENTTO cogs camera
|
||||||
|
LERP_SCALE cogs 1.875 1.875 1.875 0.5
|
||||||
|
WAIT 1.0833
|
||||||
|
LOOP_ANIM npc "right-hand" 1
|
||||||
|
FUNCTION npc "angryEyes"
|
||||||
|
FUNCTION npc "blinkEyes"
|
||||||
|
LOCAL_CHAT_CONFIRM npc QuestScript101_1 "CFReversed"
|
||||||
|
LOCAL_CHAT_CONFIRM npc QuestScript101_2 "CFReversed"
|
||||||
|
REPARENTTO cogs hidden
|
||||||
|
REPARENTTO toonBuilding camera
|
||||||
|
LOCAL_CHAT_CONFIRM npc QuestScript101_3 "CFReversed"
|
||||||
|
REPARENTTO toonBuilding hidden
|
||||||
|
REPARENTTO cogBuilding camera
|
||||||
|
FUNCTION npc "sadEyes"
|
||||||
|
FUNCTION npc "blinkEyes"
|
||||||
|
LOCAL_CHAT_CONFIRM npc QuestScript101_4 "CFReversed"
|
||||||
|
REPARENTTO cogBuilding hidden
|
||||||
|
REPARENTTO squirt1 camera
|
||||||
|
FUNCTION npc "normalEyes"
|
||||||
|
FUNCTION npc "blinkEyes"
|
||||||
|
LOCAL_CHAT_CONFIRM npc QuestScript101_5 "CFReversed"
|
||||||
|
REPARENTTO squirt1 hidden
|
||||||
|
REPARENTTO squirt2 camera
|
||||||
|
LOCAL_CHAT_CONFIRM npc QuestScript101_6 "CFReversed"
|
||||||
|
LERP_SCALE squirt2 1 1 0.01 0.5
|
||||||
|
WAIT 0.5
|
||||||
|
REPARENTTO squirt2 hidden
|
||||||
|
OBSCURE_LAFFMETER 0
|
||||||
|
SHOW laffMeter
|
||||||
|
POS laffMeter 0 0 0
|
||||||
|
SCALE laffMeter 0.075 0.075 0.075
|
||||||
|
LERP_POS laffMeter 1.7 0 0.87 1
|
||||||
|
LERP_SCALE laffMeter 0.2 0.2 0.2 0.6
|
||||||
|
WAIT 1.0833
|
||||||
|
LOCAL_CHAT_CONFIRM npc QuestScript101_8 "CFReversed"
|
||||||
|
LOCAL_CHAT_CONFIRM npc QuestScript101_9 "CFReversed"
|
||||||
|
FUNCTION npc "sadEyes"
|
||||||
|
FUNCTION npc "blinkEyes"
|
||||||
|
LAFFMETER 15 15
|
||||||
|
WAIT 0.1
|
||||||
|
LAFFMETER 14 15
|
||||||
|
WAIT 0.1
|
||||||
|
LAFFMETER 13 15
|
||||||
|
WAIT 0.1
|
||||||
|
LAFFMETER 12 15
|
||||||
|
WAIT 0.1
|
||||||
|
LAFFMETER 11 15
|
||||||
|
WAIT 0.1
|
||||||
|
LAFFMETER 10 15
|
||||||
|
WAIT 0.1
|
||||||
|
LAFFMETER 9 15
|
||||||
|
WAIT 0.1
|
||||||
|
LAFFMETER 8 15
|
||||||
|
WAIT 0.1
|
||||||
|
LAFFMETER 7 15
|
||||||
|
WAIT 0.1
|
||||||
|
LAFFMETER 6 15
|
||||||
|
WAIT 0.1
|
||||||
|
LAFFMETER 5 15
|
||||||
|
WAIT 0.1
|
||||||
|
LAFFMETER 4 15
|
||||||
|
WAIT 0.1
|
||||||
|
LAFFMETER 3 15
|
||||||
|
WAIT 0.1
|
||||||
|
LAFFMETER 2 15
|
||||||
|
WAIT 0.1
|
||||||
|
LAFFMETER 1 15
|
||||||
|
WAIT 0.1
|
||||||
|
LAFFMETER 0 15
|
||||||
|
LOCAL_CHAT_CONFIRM npc QuestScript101_10 "CFReversed"
|
||||||
|
FUNCTION npc "normalEyes"
|
||||||
|
FUNCTION npc "blinkEyes"
|
||||||
|
LAFFMETER 15 15
|
||||||
|
WAIT 0.5
|
||||||
|
LERP_POS laffMeter 0.15 0.15 0.15 1
|
||||||
|
LERP_SCALE laffMeter 0.085 0.085 0.085 0.6
|
||||||
|
PLAY_ANIM npc "right-hand-start" -2
|
||||||
|
WAIT 1.0625
|
||||||
|
LOOP_ANIM npc "neutral"
|
||||||
|
WAIT 0.5
|
||||||
|
LERP_HPR npc -50 0 0 0.5
|
||||||
|
FUNCTION npc "surpriseEyes"
|
||||||
|
FUNCTION npc "showSurpriseMuzzle"
|
||||||
|
PLAY_ANIM npc "right-point-start" 1.5
|
||||||
|
WAIT 0.6944
|
||||||
|
LOOP_ANIM npc "right-point"
|
||||||
|
LOCAL_CHAT_CONFIRM npc QuestScript101_11 "CFReversed"
|
||||||
|
LOCAL_CHAT_CONFIRM npc QuestScript101_12 "CFReversed"
|
||||||
|
PLAY_ANIM npc "right-point-start" -1
|
||||||
|
LERP_HPR npc -0.068 0 0 0.75
|
||||||
|
WAIT 1.0417
|
||||||
|
FUNCTION npc "angryEyes"
|
||||||
|
FUNCTION npc "blinkEyes"
|
||||||
|
FUNCTION npc "hideSurpriseMuzzle"
|
||||||
|
LOOP_ANIM npc "neutral"
|
||||||
|
FUNCTION localToon "questPage.showQuestsOnscreenTutorial"
|
||||||
|
LOCAL_CHAT_CONFIRM npc QuestScript101_13 "CFReversed"
|
||||||
|
FUNCTION localToon "questPage.hideQuestsOnscreenTutorial"
|
||||||
|
LOCAL_CHAT_CONFIRM npc QuestScript101_14 1 "CFReversed"
|
||||||
|
FUNCTION npc "normalEyes"
|
||||||
|
FUNCTION npc "blinkEyes"
|
||||||
|
UPON_TIMEOUT FUNCTION cogs "removeNode"
|
||||||
|
UPON_TIMEOUT FUNCTION toonBuilding "removeNode"
|
||||||
|
UPON_TIMEOUT FUNCTION cogBuilding "removeNode"
|
||||||
|
UPON_TIMEOUT FUNCTION squirt1 "removeNode"
|
||||||
|
UPON_TIMEOUT FUNCTION squirt2 "removeNode"
|
||||||
|
UPON_TIMEOUT LOOP_ANIM npc "neutral"
|
||||||
|
UPON_TIMEOUT SHOW laffMeter
|
||||||
|
UPON_TIMEOUT POS laffMeter 0.15 0.15 0.15
|
||||||
|
UPON_TIMEOUT SCALE laffMeter 0.085 0.085 0.085
|
||||||
|
POS localToon 0.776 14.6 0
|
||||||
|
HPR localToon 47.5 0 0
|
||||||
|
FINISH_QUEST_MOVIE
|
||||||
|
|
||||||
|
|
||||||
|
ID quest_incomplete_110
|
||||||
|
DEBUG "quest assign 110"
|
||||||
|
LOCAL_CHAT_CONFIRM npc QuestScript110_1
|
||||||
|
OBSCURE_BOOK 0
|
||||||
|
SHOW bookOpenButton
|
||||||
|
LOCAL_CHAT_CONFIRM npc QuestScript110_2
|
||||||
|
ARROWS_ON 1.364477 -0.89 0 1.664477 -0.64 90
|
||||||
|
LOCAL_CHAT_PERSIST npc QuestScript110_3
|
||||||
|
WAIT_EVENT "enterStickerBook"
|
||||||
|
ARROWS_OFF
|
||||||
|
SHOW_BOOK
|
||||||
|
HIDE bookPrevArrow
|
||||||
|
HIDE bookNextArrow
|
||||||
|
CLEAR_CHAT npc
|
||||||
|
WAIT 0.5
|
||||||
|
TOON_HEAD npc -0.2 -0.45 1
|
||||||
|
LOCAL_CHAT_CONFIRM npc QuestScript110_4
|
||||||
|
ARROWS_ON 0.85 -0.75 -90 0.85 -0.75 -90
|
||||||
|
SHOW bookNextArrow
|
||||||
|
LOCAL_CHAT_PERSIST npc QuestScript110_5
|
||||||
|
WAIT_EVENT "stickerBookPageChange-3"
|
||||||
|
HIDE bookPrevArrow
|
||||||
|
HIDE bookNextArrow
|
||||||
|
ARROWS_OFF
|
||||||
|
CLEAR_CHAT npc
|
||||||
|
WAIT 0.5
|
||||||
|
LOCAL_CHAT_CONFIRM npc QuestScript110_6
|
||||||
|
ARROWS_ON 0.85 -0.75 -90 0.85 -0.75 -90
|
||||||
|
SHOW bookNextArrow
|
||||||
|
LOCAL_CHAT_PERSIST npc QuestScript110_7
|
||||||
|
WAIT_EVENT "stickerBookPageChange-4"
|
||||||
|
HIDE bookNextArrow
|
||||||
|
HIDE bookPrevArrow
|
||||||
|
ARROWS_OFF
|
||||||
|
CLEAR_CHAT npc
|
||||||
|
LOCAL_CHAT_CONFIRM npc QuestScript110_8
|
||||||
|
LOCAL_CHAT_CONFIRM npc QuestScript110_9
|
||||||
|
LOCAL_CHAT_PERSIST npc QuestScript110_10
|
||||||
|
ENABLE_CLOSE_BOOK
|
||||||
|
ARROWS_ON 1.364477 -0.89 0 1.664477 -0.64 90
|
||||||
|
WAIT_EVENT "exitStickerBook"
|
||||||
|
ARROWS_OFF
|
||||||
|
TOON_HEAD npc 0 0 0
|
||||||
|
HIDE_BOOK
|
||||||
|
HIDE bookOpenButton
|
||||||
|
LOCAL_CHAT_CONFIRM npc QuestScript110_11 1
|
||||||
|
UPON_TIMEOUT OBSCURE_BOOK 0
|
||||||
|
UPON_TIMEOUT ARROWS_OFF
|
||||||
|
UPON_TIMEOUT HIDE_BOOK
|
||||||
|
UPON_TIMEOUT COLOR_SCALE bookOpenButton 1 1 1 1
|
||||||
|
UPON_TIMEOUT TOON_HEAD npc 0 0 0
|
||||||
|
UPON_TIMEOUT SHOW bookOpenButton
|
||||||
|
FINISH_QUEST_MOVIE
|
||||||
|
|
||||||
|
ID tutorial_blocker
|
||||||
|
HIDE localToon
|
||||||
|
REPARENTTO camera npc
|
||||||
|
FUNCTION npc "stopLookAround"
|
||||||
|
POS camera 0.0 6.0 4.0
|
||||||
|
HPR camera 180.0 0.0 0.0
|
||||||
|
LOCAL_CHAT_CONFIRM npc QuestScriptTutorialBlocker_1
|
||||||
|
WAIT 0.8
|
||||||
|
LOCAL_CHAT_CONFIRM npc QuestScriptTutorialBlocker_2
|
||||||
|
WAIT 0.8
|
||||||
|
POS camera -5.0 -9.0 6.0
|
||||||
|
HPR camera -25.0 -10.0 0.0
|
||||||
|
POS localToon 203.8 18.64 -0.475
|
||||||
|
HPR localToon -90.0 0.0 0.0
|
||||||
|
SHOW localToon
|
||||||
|
LOCAL_CHAT_CONFIRM npc QuestScriptTutorialBlocker_3
|
||||||
|
OBSCURE_CHAT 1 0
|
||||||
|
SHOW chatScButton
|
||||||
|
WAIT 0.6
|
||||||
|
ARROWS_ON -1.3644 0.91 180 -1.5644 0.74 -90
|
||||||
|
LOCAL_CHAT_PERSIST npc QuestScriptTutorialBlocker_4
|
||||||
|
WAIT_EVENT "enterSpeedChat"
|
||||||
|
ARROWS_OFF
|
||||||
|
BLACK_CAT_LISTEN 1
|
||||||
|
WAIT_EVENT "SCChatEvent"
|
||||||
|
BLACK_CAT_LISTEN 0
|
||||||
|
WAIT 0.5
|
||||||
|
CLEAR_CHAT localToon
|
||||||
|
REPARENTTO camera localToon
|
||||||
|
LOCAL_CHAT_CONFIRM npc QuestScriptTutorialBlocker_5 "CFReversed"
|
||||||
|
LOCAL_CHAT_CONFIRM npc QuestScriptTutorialBlocker_6 "CFReversed"
|
||||||
|
OBSCURE_CHAT 0 0
|
||||||
|
SHOW chatNormalButton
|
||||||
|
WAIT 0.6
|
||||||
|
LOCAL_CHAT_CONFIRM npc QuestScriptTutorialBlocker_7 "CFReversed"
|
||||||
|
LOCAL_CHAT_CONFIRM npc QuestScriptTutorialBlocker_8 1 "CFReversed"
|
||||||
|
LOOP_ANIM npc "walk"
|
||||||
|
LERP_HPR npc 270 0 0 0.5
|
||||||
|
WAIT 0.5
|
||||||
|
LOOP_ANIM npc "run"
|
||||||
|
LERP_POS npc 217.4 18.81 -0.475 0.75
|
||||||
|
LERP_HPR npc 240 0 0 0.75
|
||||||
|
WAIT 0.75
|
||||||
|
LERP_POS npc 222.4 15.0 -0.475 0.35
|
||||||
|
LERP_HPR npc 180 0 0 0.35
|
||||||
|
WAIT 0.35
|
||||||
|
LERP_POS npc 222.4 5.0 -0.475 0.75
|
||||||
|
WAIT 0.75
|
||||||
|
REPARENTTO npc hidden
|
||||||
|
FREE_LOCALTOON
|
||||||
|
UPON_TIMEOUT ARROWS_OFF
|
||||||
|
UPON_TIMEOUT OBSCURE_CHAT 0 0
|
||||||
|
UPON_TIMEOUT REPARENTTO camera localToon
|
||||||
|
FINISH_QUEST_MOVIE
|
||||||
|
|
||||||
|
ID gag_intro
|
||||||
|
SEND_EVENT "disableGagPanel"
|
||||||
|
SEND_EVENT "disableBackToPlayground"
|
||||||
|
HIDE inventory
|
||||||
|
TOON_HEAD npc 0 0 1
|
||||||
|
WAIT 0.1
|
||||||
|
LOCAL_CHAT_CONFIRM npc QuestScriptGagShop_1
|
||||||
|
LERP_POS npcToonHead -0.64 0 -0.74 0.7
|
||||||
|
LERP_SCALE npcToonHead 0.82 0.82 0.82 0.7
|
||||||
|
LERP_COLOR_SCALE purchaseBg 1 1 1 1 0.6 0.6 0.6 1 0.7
|
||||||
|
WAIT 0.7
|
||||||
|
SHOW inventory
|
||||||
|
LOCAL_CHAT_CONFIRM npc QuestScriptGagShop_1a
|
||||||
|
LOCAL_CHAT_PERSIST npc QuestScriptGagShop_3
|
||||||
|
SEND_EVENT "enableGagPanel"
|
||||||
|
WAIT_EVENT "inventory-selection"
|
||||||
|
CLEAR_CHAT npc
|
||||||
|
WAIT 0.5
|
||||||
|
LOCAL_CHAT_CONFIRM npc QuestScriptGagShop_4
|
||||||
|
LOCAL_CHAT_PERSIST npc QuestScriptGagShop_5
|
||||||
|
WAIT 0.5
|
||||||
|
SHOW_PREVIEW
|
||||||
|
CLEAR_CHAT npc
|
||||||
|
WAIT 0.5
|
||||||
|
SET_BIN backToPlaygroundButton "gui-popup"
|
||||||
|
LERP_POS backToPlaygroundButton -0.12 0 0.18 0.5
|
||||||
|
LERP_SCALE backToPlaygroundButton 2 2 2 0.5
|
||||||
|
LERP_COLOR_SCALE backToPlaygroundButton 1 1 1 1 2.78 2.78 2.78 1 0.5
|
||||||
|
LERP_COLOR_SCALE inventory 1 1 1 1 0.6 0.6 0.6 1 0.5
|
||||||
|
WAIT 0.5
|
||||||
|
START_THROB backToPlaygroundButton 2.78 2.78 2.78 1 2.78 2.78 2.78 0.7 2
|
||||||
|
LOCAL_CHAT_CONFIRM npc QuestScriptGagShop_6
|
||||||
|
STOP_THROB
|
||||||
|
LERP_POS backToPlaygroundButton 0.72 0 -0.045 0.5
|
||||||
|
LERP_SCALE backToPlaygroundButton 1.04 1.04 1.04 0.5
|
||||||
|
LERP_COLOR_SCALE backToPlaygroundButton 2.78 2.78 2.78 1 1 1 1 1 0.5
|
||||||
|
WAIT 0.5
|
||||||
|
CLEAR_BIN backToPlaygroundButton
|
||||||
|
SET_BIN playAgainButton "gui-popup"
|
||||||
|
LERP_POS playAgainButton -0.12 0 0.18 0.5
|
||||||
|
LERP_SCALE playAgainButton 2 2 2 0.5
|
||||||
|
LERP_COLOR_SCALE playAgainButton 1 1 1 1 2.78 2.78 2.78 1 0.5
|
||||||
|
WAIT 0.5
|
||||||
|
START_THROB playAgainButton 2.78 2.78 2.78 1 2.78 2.78 2.78 0.7 2
|
||||||
|
LOCAL_CHAT_CONFIRM npc QuestScriptGagShop_7
|
||||||
|
STOP_THROB
|
||||||
|
LERP_POS playAgainButton 0.72 0 -0.24 0.5
|
||||||
|
LERP_SCALE playAgainButton 1.04 1.04 1.04 0.5
|
||||||
|
LERP_COLOR_SCALE playAgainButton 2.78 2.78 2.78 1 1 1 1 1 0.5
|
||||||
|
WAIT 0.5
|
||||||
|
CLEAR_BIN playAgainButton
|
||||||
|
LOCAL_CHAT_CONFIRM npc QuestScriptGagShop_8 1
|
||||||
|
TOON_HEAD npc 0 0 0
|
||||||
|
LERP_COLOR_SCALE inventory 0.6 0.6 0.6 1 1 1 1 1 0.5
|
||||||
|
LERP_COLOR_SCALE purchaseBg 0.6 0.6 0.6 1 1 1 1 1 0.5
|
||||||
|
WAIT 0.5
|
||||||
|
SEND_EVENT "enableBackToPlayground"
|
||||||
|
UPON_TIMEOUT TOON_HEAD npc 0 0 0
|
||||||
|
UPON_TIMEOUT SHOW inventory
|
||||||
|
UPON_TIMEOUT SEND_EVENT "enableGagPanel"
|
||||||
|
UPON_TIMEOUT SEND_EVENT "enableBackToPlayground"
|
||||||
|
|
||||||
|
ID quest_incomplete_120
|
||||||
|
CHAT_CONFIRM npc QuestScript120_1
|
||||||
|
CHAT_CONFIRM npc QuestScript120_2 1
|
||||||
|
FINISH_QUEST_MOVIE
|
||||||
|
|
||||||
|
ID quest_assign_121
|
||||||
|
CHAT_CONFIRM npc QuestScript121_1 1
|
||||||
|
FINISH_QUEST_MOVIE
|
||||||
|
|
||||||
|
ID quest_assign_130
|
||||||
|
CHAT_CONFIRM npc QuestScript130_1 1
|
||||||
|
FINISH_QUEST_MOVIE
|
||||||
|
|
||||||
|
ID quest_assign_131
|
||||||
|
CHAT_CONFIRM npc QuestScript131_1 1
|
||||||
|
FINISH_QUEST_MOVIE
|
||||||
|
|
||||||
|
ID quest_assign_140
|
||||||
|
CHAT_CONFIRM npc QuestScript140_1 1
|
||||||
|
FINISH_QUEST_MOVIE
|
||||||
|
|
||||||
|
ID quest_assign_141
|
||||||
|
CHAT_CONFIRM npc QuestScript141_1 1
|
||||||
|
FINISH_QUEST_MOVIE
|
||||||
|
|
||||||
|
ID quest_incomplete_145
|
||||||
|
CHAT_CONFIRM npc QuestScript145_1 1
|
||||||
|
LOAD frame "phase_4/models/gui/tfa_images" "FrameBlankA"
|
||||||
|
LOAD tunnel "phase_4/models/gui/tfa_images" "tunnelSignA"
|
||||||
|
POSHPRSCALE tunnel 0 0 0 0 0 0 0.8 0.8 0.8
|
||||||
|
REPARENTTO tunnel frame
|
||||||
|
POSHPRSCALE frame 0 0 0 0 0 0 0.1 0.1 0.1
|
||||||
|
REPARENTTO frame aspect2d
|
||||||
|
LERP_SCALE frame 1.0 1.0 1.0 1.0
|
||||||
|
WAIT 3.0
|
||||||
|
LERP_SCALE frame 0.1 0.1 0.1 0.5
|
||||||
|
WAIT 0.5
|
||||||
|
REPARENTTO frame hidden
|
||||||
|
CHAT_CONFIRM npc QuestScript145_2 1
|
||||||
|
UPON_TIMEOUT FUNCTION frame "removeNode"
|
||||||
|
FINISH_QUEST_MOVIE
|
||||||
|
|
||||||
|
|
||||||
|
ID quest_incomplete_150
|
||||||
|
CHAT_CONFIRM npc QuestScript150_1
|
||||||
|
ARROWS_ON 1.65 0.51 -120 1.65 0.51 -120
|
||||||
|
SHOW_FRIENDS_LIST
|
||||||
|
CHAT_CONFIRM npc QuestScript150_2
|
||||||
|
ARROWS_OFF
|
||||||
|
HIDE_FRIENDS_LIST
|
||||||
|
CHAT_CONFIRM npc QuestScript150_3
|
||||||
|
HIDE bFriendsList
|
||||||
|
CHAT_CONFIRM npc QuestScript150_4 1
|
||||||
|
UPON_TIMEOUT HIDE_FRIENDS_LIST
|
||||||
|
UPON_TIMEOUT ARROWS_OFF
|
||||||
|
FINISH_QUEST_MOVIE
|
||||||
|
'''
|
|
@ -93,6 +93,7 @@ GlobalStreetNames = {20000: ('to', 'on', 'Tutorial Terrace'),
|
||||||
9000: ('to the', 'in the', 'Playground'),
|
9000: ('to the', 'in the', 'Playground'),
|
||||||
9100: ('to', 'on', 'Lullaby Lane'),
|
9100: ('to', 'on', 'Lullaby Lane'),
|
||||||
9200: ('to', 'on', 'Pajama Place'),
|
9200: ('to', 'on', 'Pajama Place'),
|
||||||
|
9300: ('to', 'on', 'Rock-A-Bye Road'),
|
||||||
10000: ('to', 'in', 'Bossbot HQ Country Club'),
|
10000: ('to', 'in', 'Bossbot HQ Country Club'),
|
||||||
10100: ('to the', 'in the', 'Bossbot HQ Lobby'),
|
10100: ('to the', 'in the', 'Bossbot HQ Lobby'),
|
||||||
10200: ('to the', 'in the', 'The Clubhouse'),
|
10200: ('to the', 'in the', 'The Clubhouse'),
|
||||||
|
|
|
@ -171,6 +171,7 @@ MapleStreet = 5200
|
||||||
OakStreet = 5300
|
OakStreet = 5300
|
||||||
LullabyLane = 9100
|
LullabyLane = 9100
|
||||||
PajamaPlace = 9200
|
PajamaPlace = 9200
|
||||||
|
RockAByeRoad = 9300
|
||||||
ToonHall = 2513
|
ToonHall = 2513
|
||||||
HoodHierarchy = {ToontownCentral: (SillyStreet, LoopyLane, PunchlinePlace),
|
HoodHierarchy = {ToontownCentral: (SillyStreet, LoopyLane, PunchlinePlace),
|
||||||
DonaldsDock: (BarnacleBoulevard, SeaweedStreet, LighthouseLane),
|
DonaldsDock: (BarnacleBoulevard, SeaweedStreet, LighthouseLane),
|
||||||
|
|
|
@ -12,53 +12,6 @@ LOADING_SCREEN_SORT_INDEX = 4000
|
||||||
class ToontownLoadingScreen:
|
class ToontownLoadingScreen:
|
||||||
|
|
||||||
defaultTex = 'phase_3.5/maps/loading/default.jpg'
|
defaultTex = 'phase_3.5/maps/loading/default.jpg'
|
||||||
zone2picture = {
|
|
||||||
ToontownGlobals.GoofySpeedway : 'phase_3.5/maps/loading/gs.jpg',
|
|
||||||
ToontownGlobals.ToontownCentral : 'phase_3.5/maps/loading/ttc.jpg',
|
|
||||||
ToontownGlobals.SillyStreet : 'phase_3.5/maps/loading/ttc_ss.jpg',
|
|
||||||
ToontownGlobals.LoopyLane : 'phase_3.5/maps/loading/ttc_ll.jpg',
|
|
||||||
ToontownGlobals.PunchlinePlace : 'phase_3.5/maps/loading/ttc_pp.jpg',
|
|
||||||
ToontownGlobals.DonaldsDock : 'phase_3.5/maps/loading/dd.jpg',
|
|
||||||
ToontownGlobals.BarnacleBoulevard : 'phase_3.5/maps/loading/dd_bb.jpg',
|
|
||||||
ToontownGlobals.SeaweedStreet : 'phase_3.5/maps/loading/dd_ss.jpg',
|
|
||||||
ToontownGlobals.LighthouseLane : 'phase_3.5/maps/loading/dd_ll.jpg',
|
|
||||||
ToontownGlobals.DaisyGardens : 'phase_3.5/maps/loading/dg.jpg',
|
|
||||||
ToontownGlobals.ElmStreet : 'phase_3.5/maps/loading/dg_es.jpg',
|
|
||||||
ToontownGlobals.MapleStreet : 'phase_3.5/maps/loading/dg_ms.jpg',
|
|
||||||
ToontownGlobals.OakStreet : 'phase_3.5/maps/loading/dg_os.jpg',
|
|
||||||
ToontownGlobals.MinniesMelodyland : 'phase_3.5/maps/loading/mml.jpg',
|
|
||||||
ToontownGlobals.AltoAvenue : 'phase_3.5/maps/loading/mml_aa.jpg',
|
|
||||||
ToontownGlobals.BaritoneBoulevard : 'phase_3.5/maps/loading/mml_bb.jpg',
|
|
||||||
ToontownGlobals.TenorTerrace : 'phase_3.5/maps/loading/mml_tt.jpg',
|
|
||||||
ToontownGlobals.TheBrrrgh : 'phase_3.5/maps/loading/tb.jpg',
|
|
||||||
ToontownGlobals.WalrusWay : 'phase_3.5/maps/loading/tb_ww.jpg',
|
|
||||||
ToontownGlobals.SleetStreet : 'phase_3.5/maps/loading/tb_ss.jpg',
|
|
||||||
ToontownGlobals.PolarPlace : 'phase_3.5/maps/loading/tb_pp.jpg',
|
|
||||||
ToontownGlobals.DonaldsDreamland : 'phase_3.5/maps/loading/ddl.jpg',
|
|
||||||
ToontownGlobals.LullabyLane : 'phase_3.5/maps/loading/ddl_ll.jpg',
|
|
||||||
ToontownGlobals.PajamaPlace : 'phase_3.5/maps/loading/ddl_pp.jpg',
|
|
||||||
ToontownGlobals.OutdoorZone : 'phase_3.5/maps/loading/oz.jpg',
|
|
||||||
ToontownGlobals.GolfZone : 'phase_3.5/maps/loading/gz.jpg',
|
|
||||||
ToontownGlobals.SellbotHQ : 'phase_3.5/maps/loading/sbhq.jpg',
|
|
||||||
ToontownGlobals.CashbotHQ : 'phase_3.5/maps/loading/cbhq.jpg',
|
|
||||||
ToontownGlobals.LawbotHQ : 'phase_3.5/maps/loading/lbhq.jpg',
|
|
||||||
ToontownGlobals.BossbotHQ : 'phase_3.5/maps/loading/bbhq.jpg'
|
|
||||||
}
|
|
||||||
emotes = [
|
|
||||||
{'emote': 'bored', 'frame': 135},
|
|
||||||
{'emote': 'run', 'frame': 7},
|
|
||||||
{'emote': 'victory', 'frame': 10},
|
|
||||||
{'emote': 'applause', 'frame': 23},
|
|
||||||
{'emote': 'sprinkle-dust', 'frame': 40},
|
|
||||||
{'emote': 'hypnotize', 'frame': 25},
|
|
||||||
{'emote': 'cringe', 'frame': 25},
|
|
||||||
{'emote': 'wave', 'frame': 25},
|
|
||||||
{'emote': 'shrug', 'frame': 30},
|
|
||||||
{'emote': 'duck', 'frame': 40},
|
|
||||||
{'emote': 'up', 'frame': 60},
|
|
||||||
{'emote': 'down', 'frame': 23},
|
|
||||||
{'emote': 'bow', 'frame': 45}
|
|
||||||
]
|
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.__expectedCount = 0
|
self.__expectedCount = 0
|
||||||
|
@ -75,13 +28,10 @@ class ToontownLoadingScreen:
|
||||||
scale = self.logo.getScale()
|
scale = self.logo.getScale()
|
||||||
# self.logo.setPos(scale[0], 0, -scale[2])
|
# self.logo.setPos(scale[0], 0, -scale[2])
|
||||||
self.logo.setPos(0, 0, -scale[2])
|
self.logo.setPos(0, 0, -scale[2])
|
||||||
self.toon = None
|
|
||||||
|
|
||||||
def destroy(self):
|
def destroy(self):
|
||||||
self.title.destroy()
|
self.title.destroy()
|
||||||
self.gui.removeNode()
|
self.gui.removeNode()
|
||||||
if self.toon:
|
|
||||||
self.toon.delete()
|
|
||||||
self.logo.removeNode()
|
self.logo.removeNode()
|
||||||
|
|
||||||
def getTip(self, tipCategory):
|
def getTip(self, tipCategory):
|
||||||
|
@ -90,25 +40,11 @@ class ToontownLoadingScreen:
|
||||||
def begin(self, range, label, gui, tipCategory, zoneId):
|
def begin(self, range, label, gui, tipCategory, zoneId):
|
||||||
self.waitBar['range'] = range
|
self.waitBar['range'] = range
|
||||||
self.title['text'] = label
|
self.title['text'] = label
|
||||||
loadingScreenTex = self.zone2picture.get(ZoneUtil.getBranchZone(zoneId), self.defaultTex)
|
loadingScreenTex = self.defaultTex
|
||||||
self.background = loader.loadTexture(loadingScreenTex)
|
self.background = loader.loadTexture(loadingScreenTex)
|
||||||
self.__count = 0
|
self.__count = 0
|
||||||
self.__expectedCount = range
|
self.__expectedCount = range
|
||||||
if gui:
|
if gui:
|
||||||
if base.localAvatarStyle:
|
|
||||||
from toontown.toon import Toon
|
|
||||||
emote = random.choice(self.emotes)
|
|
||||||
self.toon = Toon.Toon()
|
|
||||||
self.toon.setDNA(base.localAvatarStyle)
|
|
||||||
try: self.toon.pose(*emote.values())
|
|
||||||
except: self.toon.pose(emote['emote'], emote['frame'])
|
|
||||||
self.toon.getGeomNode().setDepthWrite(1)
|
|
||||||
self.toon.getGeomNode().setDepthTest(1)
|
|
||||||
self.toon.setHpr(205, 0, 0)
|
|
||||||
self.toon.setScale(0.18)
|
|
||||||
self.toon.setPos(base.a2dBottomRight.getX()/1.25, 0, -0.034)
|
|
||||||
self.toon.reparentTo(self.waitBar)
|
|
||||||
self.waitBar['frameSize'] = (base.a2dLeft+(base.a2dRight/8.15), base.a2dRight-(base.a2dRight/2.57), -0.03, 0.03)
|
|
||||||
self.title.reparentTo(base.a2dpBottomLeft, LOADING_SCREEN_SORT_INDEX)
|
self.title.reparentTo(base.a2dpBottomLeft, LOADING_SCREEN_SORT_INDEX)
|
||||||
self.title.setPos(0.24, 0, 0.23)
|
self.title.setPos(0.24, 0, 0.23)
|
||||||
self.gui.setPos(0, -0.1, 0)
|
self.gui.setPos(0, -0.1, 0)
|
||||||
|
@ -128,8 +64,6 @@ class ToontownLoadingScreen:
|
||||||
self.waitBar.reparentTo(self.gui)
|
self.waitBar.reparentTo(self.gui)
|
||||||
self.title.reparentTo(self.gui)
|
self.title.reparentTo(self.gui)
|
||||||
self.gui.reparentTo(hidden)
|
self.gui.reparentTo(hidden)
|
||||||
if self.toon:
|
|
||||||
self.toon.reparentTo(hidden)
|
|
||||||
self.logo.reparentTo(hidden)
|
self.logo.reparentTo(hidden)
|
||||||
return (self.__expectedCount, self.__count)
|
return (self.__expectedCount, self.__count)
|
||||||
|
|
||||||
|
|
|
@ -422,13 +422,26 @@ class LoginAccountFSM(OperationFSM):
|
||||||
datagram.addChannel(self.csm.GetAccountConnectionChannel(self.accountId))
|
datagram.addChannel(self.csm.GetAccountConnectionChannel(self.accountId))
|
||||||
self.csm.air.send(datagram)
|
self.csm.air.send(datagram)
|
||||||
|
|
||||||
# Add this connection to extra channels which may be useful:
|
# Subscribe to any "staff" channels that the account has access to.
|
||||||
if self.accessLevel > 100:
|
access = self.account.get('ADMIN_ACCESS', 0)
|
||||||
datagram = PyDatagram()
|
if access >= 200:
|
||||||
datagram.addServerHeader(self.target, self.csm.air.ourChannel,
|
# Subscribe to the moderator channel.
|
||||||
CLIENTAGENT_OPEN_CHANNEL)
|
dg = PyDatagram()
|
||||||
datagram.addChannel(OtpDoGlobals.OTP_STAFF_CHANNEL)
|
dg.addServerHeader(self.target, self.csm.air.ourChannel, CLIENTAGENT_OPEN_CHANNEL)
|
||||||
self.csm.air.send(datagram)
|
dg.addChannel(OtpDoGlobals.OTP_MOD_CHANNEL)
|
||||||
|
self.csm.air.send(dg)
|
||||||
|
if access >= 400:
|
||||||
|
# Subscribe to the administrator channel.
|
||||||
|
dg = PyDatagram()
|
||||||
|
dg.addServerHeader(self.target, self.csm.air.ourChannel, CLIENTAGENT_OPEN_CHANNEL)
|
||||||
|
dg.addChannel(OtpDoGlobals.OTP_ADMIN_CHANNEL)
|
||||||
|
self.csm.air.send(dg)
|
||||||
|
if access >= 500:
|
||||||
|
# Subscribe to the system administrator channel.
|
||||||
|
dg = PyDatagram()
|
||||||
|
dg.addServerHeader(self.target, self.csm.air.ourChannel, CLIENTAGENT_OPEN_CHANNEL)
|
||||||
|
dg.addChannel(OtpDoGlobals.OTP_SYSADMIN_CHANNEL)
|
||||||
|
self.csm.air.send(dg)
|
||||||
|
|
||||||
# Now set their sender channel to represent their account affiliation:
|
# Now set their sender channel to represent their account affiliation:
|
||||||
datagram = PyDatagram()
|
datagram = PyDatagram()
|
||||||
|
|
Loading…
Reference in a new issue