diff --git a/.gitignore b/.gitignore old mode 100644 new mode 100755 index aa9f1259..9d2f1973 --- a/.gitignore +++ b/.gitignore @@ -23,4 +23,4 @@ contentpacks/ resources/ save.dat ai-crash.txt -gentokenlr.py \ No newline at end of file +gentokenlr.py diff --git a/PPYTHON_PATH b/PPYTHON_PATH deleted file mode 100644 index c2b0c1a9..00000000 --- a/PPYTHON_PATH +++ /dev/null @@ -1 +0,0 @@ -"panda/python/ppython.exe" diff --git a/README.md b/README.md old mode 100644 new mode 100755 index 4150a096..a672a90f --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # src # -The source code for Toontown United. +The source code for Toontown Stride. ### What is this repository for? ### diff --git a/all.bat b/all.bat deleted file mode 100644 index 1aa70b30..00000000 --- a/all.bat +++ /dev/null @@ -1,3 +0,0 @@ -start astron -start ai -start ud \ No newline at end of file diff --git a/astron/.gitignore b/astron/.gitignore old mode 100644 new mode 100755 index e099404e..12eb8cb3 --- a/astron/.gitignore +++ b/astron/.gitignore @@ -1,4 +1,3 @@ -*.dll -astrond +# Exclude the debug builds of Astron. astrond_debug astrond_debug.exe diff --git a/astron/astrond.exe b/astron/astrond.exe old mode 100644 new mode 100755 diff --git a/astron/config/clientagent-0.yml b/astron/config/clientagent-0.yml old mode 100644 new mode 100755 index c4c6a700..a2df499f --- a/astron/config/clientagent-0.yml +++ b/astron/config/clientagent-0.yml @@ -20,7 +20,7 @@ uberdogs: id: 4501 anonymous: false - - class: TTUFriendsManager + - class: TTSFriendsManager id: 4666 anonymous: false @@ -34,7 +34,7 @@ messagedirector: roles: - type: clientagent bind: 0.0.0.0:7199 - version: "united-dev" + version: "stride-dev" client: relocate: true add_interest: enabled diff --git a/astron/config/clientagent-1.yml b/astron/config/clientagent-1.yml old mode 100644 new mode 100755 index 9549b6f6..66c70dd0 --- a/astron/config/clientagent-1.yml +++ b/astron/config/clientagent-1.yml @@ -20,7 +20,7 @@ uberdogs: id: 4501 anonymous: false - - class: TTUFriendsManager + - class: TTSFriendsManager id: 4666 anonymous: false @@ -34,7 +34,7 @@ messagedirector: roles: - type: clientagent bind: 0.0.0.0:7299 - version: "united-dev" + version: "stride-dev" client: relocate: true add_interest: enabled diff --git a/astron/config/clientagent-2.yml b/astron/config/clientagent-2.yml old mode 100644 new mode 100755 index b671201b..fa09576f --- a/astron/config/clientagent-2.yml +++ b/astron/config/clientagent-2.yml @@ -20,7 +20,7 @@ uberdogs: id: 4501 anonymous: false - - class: TTUFriendsManager + - class: TTSFriendsManager id: 4666 anonymous: false @@ -34,7 +34,7 @@ messagedirector: roles: - type: clientagent bind: 0.0.0.0:7399 - version: "united-dev" + version: "stride-dev" client: relocate: true add_interest: enabled diff --git a/astron/config/clientagent-3.yml b/astron/config/clientagent-3.yml old mode 100644 new mode 100755 index 3fabcc4a..d4426e7f --- a/astron/config/clientagent-3.yml +++ b/astron/config/clientagent-3.yml @@ -20,7 +20,7 @@ uberdogs: id: 4501 anonymous: false - - class: TTUFriendsManager + - class: TTSFriendsManager id: 4666 anonymous: false @@ -34,7 +34,7 @@ messagedirector: roles: - type: clientagent bind: 0.0.0.0:7499 - version: "united-dev" + version: "stride-dev" client: relocate: true add_interest: enabled diff --git a/astron/config/clientagent-4.yml b/astron/config/clientagent-4.yml old mode 100644 new mode 100755 index d1402e41..4dd14e09 --- a/astron/config/clientagent-4.yml +++ b/astron/config/clientagent-4.yml @@ -20,7 +20,7 @@ uberdogs: id: 4501 anonymous: false - - class: TTUFriendsManager + - class: TTSFriendsManager id: 4666 anonymous: false @@ -34,7 +34,7 @@ messagedirector: roles: - type: clientagent bind: 0.0.0.0:7599 - version: "united-dev" + version: "stride-dev" client: relocate: true add_interest: enabled diff --git a/astron/config/clientagent-5.yml b/astron/config/clientagent-5.yml old mode 100644 new mode 100755 index 18484f46..0d86b2bb --- a/astron/config/clientagent-5.yml +++ b/astron/config/clientagent-5.yml @@ -20,7 +20,7 @@ uberdogs: id: 4501 anonymous: false - - class: TTUFriendsManager + - class: TTSFriendsManager id: 4666 anonymous: false @@ -34,7 +34,7 @@ messagedirector: roles: - type: clientagent bind: 0.0.0.0:7699 - version: "united-dev" + version: "stride-dev" client: relocate: true add_interest: enabled diff --git a/astron/config/clientagent-6.yml b/astron/config/clientagent-6.yml old mode 100644 new mode 100755 index f8375932..f5ed2029 --- a/astron/config/clientagent-6.yml +++ b/astron/config/clientagent-6.yml @@ -20,7 +20,7 @@ uberdogs: id: 4501 anonymous: false - - class: TTUFriendsManager + - class: TTSFriendsManager id: 4666 anonymous: false @@ -34,7 +34,7 @@ messagedirector: roles: - type: clientagent bind: 0.0.0.0:7799 - version: "united-dev" + version: "stride-dev" client: relocate: true add_interest: enabled diff --git a/astron/config/clientagent-7.yml b/astron/config/clientagent-7.yml old mode 100644 new mode 100755 index 4d6bb36c..ff0244b2 --- a/astron/config/clientagent-7.yml +++ b/astron/config/clientagent-7.yml @@ -20,7 +20,7 @@ uberdogs: id: 4501 anonymous: false - - class: TTUFriendsManager + - class: TTSFriendsManager id: 4666 anonymous: false @@ -34,7 +34,7 @@ messagedirector: roles: - type: clientagent bind: 0.0.0.0:7899 - version: "united-dev" + version: "stride-dev" client: relocate: true add_interest: enabled diff --git a/astron/config/cluster.yml b/astron/config/cluster.yml old mode 100644 new mode 100755 index b626b0d2..63ea9f74 --- a/astron/config/cluster.yml +++ b/astron/config/cluster.yml @@ -4,7 +4,7 @@ daemon: general: eventlogger: 127.0.0.1:7198 dc_files: - - ../dclass/united.dc + - ../dclass/stride.dc messagedirector: bind: 127.0.0.1:7100 @@ -22,7 +22,7 @@ uberdogs: id: 4501 anonymous: false - - class: TTUFriendsManager + - class: TTSFriendsManager id: 4666 anonymous: false @@ -33,7 +33,7 @@ uberdogs: roles: - type: clientagent bind: 0.0.0.0:7199 - version: "ttu-dev" + version: "tts-dev" client: relocate: true add_interest: enabled @@ -61,4 +61,4 @@ roles: - type: eventlogger bind: 127.0.0.1:7198 - output: ../logs/events-%y%m%d_%H%M%S.log \ No newline at end of file + output: ../logs/events-%y%m%d_%H%M%S.log diff --git a/astron/config/eventlogger.yml b/astron/config/eventlogger.yml old mode 100644 new mode 100755 diff --git a/astron/config/production-cluster.yml b/astron/config/production-cluster.yml old mode 100644 new mode 100755 diff --git a/astron/darwin/start-ai-server.sh b/astron/darwin/start-ai-server.sh old mode 100644 new mode 100755 index 93b3726f..d49b8dcf --- a/astron/darwin/start-ai-server.sh +++ b/astron/darwin/start-ai-server.sh @@ -17,7 +17,7 @@ read -p "Base channel (DEFAULT: 401000000): " BASE_CHANNEL BASE_CHANNEL=${BASE_CHANNEL:-401000000} echo "===============================" -echo "Starting Toontown United AI server..." +echo "Starting Toontown Stride AI server..." echo "District name: $DISTRICT_NAME" echo "Base channel: $BASE_CHANNEL" echo "Max channels: $MAX_CHANNELS" diff --git a/astron/darwin/start-astron-cluster.sh b/astron/darwin/start-astron-cluster.sh old mode 100644 new mode 100755 diff --git a/astron/darwin/start-uberdog-server.sh b/astron/darwin/start-uberdog-server.sh old mode 100644 new mode 100755 index fd013a9d..175a636b --- a/astron/darwin/start-uberdog-server.sh +++ b/astron/darwin/start-uberdog-server.sh @@ -15,7 +15,7 @@ read -p "Base channel (DEFAULT: 1000000): " BASE_CHANNEL BASE_CHANNEL=${BASE_CHANNEL:-1000000} echo "===============================" -echo "Starting Toontown United UberDOG server..." +echo "Starting Toontown Stride UberDOG server..." echo "Base channel: $BASE_CHANNEL" echo "Max channels: $MAX_CHANNELS" echo "State Server: $STATESERVER" diff --git a/astron/databases/.gitignore b/astron/databases/.gitignore old mode 100644 new mode 100755 index 3997bead..98e6ef67 --- a/astron/databases/.gitignore +++ b/astron/databases/.gitignore @@ -1 +1 @@ -*.db \ No newline at end of file +*.db diff --git a/astron/databases/air_cache/.gitignore b/astron/databases/air_cache/.gitignore deleted file mode 100644 index 73350e1b..00000000 --- a/astron/databases/air_cache/.gitignore +++ /dev/null @@ -1 +0,0 @@ -*.pets \ No newline at end of file diff --git a/astron/databases/air_cache/pets_401000001.pets b/astron/databases/air_cache/pets_401000001.pets new file mode 100644 index 00000000..d700191f --- /dev/null +++ b/astron/databases/air_cache/pets_401000001.pets @@ -0,0 +1,47 @@ +(dp1 +I4000 +(lp2 +I236 +aI34 +aI250 +aI67 +aI13 +asI1000 +(lp3 +I17 +aI118 +aI99 +aI16 +aI29 +asI9000 +(lp4 +I222 +aI104 +aI121 +aI59 +aI93 +asI2000 +(lp5 +I86 +aI139 +aI161 +aI64 +aI194 +asI5000 +(lp6 +I41 +aI130 +aI85 +aI100 +aI251 +asI3000 +(lp7 +I157 +aI215 +aI208 +aI242 +aI207 +asS'day' +p8 +I16579 +s. \ No newline at end of file diff --git a/astron/databases/astrondb/.gitignore b/astron/databases/astrondb/.gitignore old mode 100644 new mode 100755 diff --git a/astron/dclass/united.dc b/astron/dclass/stride.dc old mode 100644 new mode 100755 similarity index 99% rename from astron/dclass/united.dc rename to astron/dclass/stride.dc index b5d7108d..0db75b73 --- a/astron/dclass/united.dc +++ b/astron/dclass/stride.dc @@ -210,10 +210,6 @@ dclass FriendManager : DistributedObject { friendResponse(int8, int32); inviteeFriendQuery(int32, string, blob, int32); inviteeCancelFriendQuery(int32); - requestSecret() airecv clsend; - requestSecretResponse(int8, string); - submitSecret(string(0-256)) airecv clsend; - submitSecretResponse(int8, int32); }; struct leaderBoardRecordResponces { @@ -416,7 +412,7 @@ from toontown.coghq import DistributedMintBattle/AI from toontown.coghq import DistributedStage/AI from toontown.coghq import DistributedStageRoom/AI from toontown.coghq import DistributedStageBattle/AI -from toontown.pets.PetDCImports/AI import * +from toontown.pets.DistributedPet/AI import * from toontown.pets import DistributedPetProxy/AI from toontown.distributed import ToontownDistrict/AI from toontown.distributed import ToontownDistrictStats/AI @@ -477,7 +473,7 @@ from toontown.parties import DistributedPartyJukeboxActivity/AI from toontown.parties import DistributedPartyJukebox40Activity/AI from toontown.parties import DistributedPartyValentineJukeboxActivity/AI from toontown.parties import DistributedPartyValentineJukebox40Activity/AI -from toontown.friends import TTUFriendsManager/UD +from toontown.friends import TTSFriendsManager/UD from toontown.safezone import DistributedGolfKart/AI from toontown.safezone import DistributedPicnicBasket/AI from toontown.distributed import DistributedTimer/AI @@ -503,7 +499,6 @@ from toontown.safezone import DistributedCheckers/AI from toontown.safezone import DistributedFindFour/AI from toontown.uberdog.DistributedPartyManager/AI/UD import DistributedPartyManager/AI/UD from toontown.coderedemption.TTCodeRedemptionMgr/AI import TTCodeRedemptionMgr/AI -from toontown.friends.TrueFriendsMgr/AI import TrueFriendsMgr/AI from toontown.cogdominium import DistributedCogdoInterior/AI from toontown.cogdominium import DistributedCogdoBattleBldg/AI from toontown.cogdominium import DistributedCogdoElevatorExt/AI @@ -654,17 +649,16 @@ typedef int16 pair16[2]; dclass DistributedToon : DistributedPlayer { setDNAString(blob) required broadcast ownrecv db; setGM(uint16 = 0) required broadcast ownrecv db; - setMoney(int16 = 0) required ownrecv db; - setBankMoney(int32 = 0) required ownrecv; - setMaxMoney(int16 = 40) required broadcast ownrecv db; - setMaxBankMoney(int32 = 10000) required broadcast ownrecv db; + setMaxBankMoney(int16 maxMoney = 10000) required broadcast ownrecv db; + setBankMoney(int16 money = 0) required broadcast ownrecv db; + setMaxMoney(int16 maxMoney = 40) required broadcast ownrecv db; + setMoney(int16 money = 0) required broadcast ownrecv db; setMaxHp(int16 = 15) required broadcast ownrecv db; setHp(int16 = 15) required broadcast ownrecv db; toonUp(uint16) broadcast ownrecv; takeDamage(uint16) broadcast ownrecv; setBattleId(uint32 = 0) required broadcast ram; setExperience(blob = [0*14]) required broadcast db; - setTrueFriends(uint32[]) required ownrecv db; setIgnored(uint32[]) required clsend airecv ownrecv db; setReported(uint32[]) required ownrecv db; setMaxCarry(uint8 = 20) required ownrecv db; @@ -739,8 +733,6 @@ dclass DistributedToon : DistributedPlayer { setCogTypes(uint8[] = [0 * 4]) required broadcast ownrecv db; setCogParts(uint32[] = [0 * 4]) required broadcast ownrecv db; setCogMerits(uint16[] = [0 * 4]) required ownrecv db; - setPromotionStatus(uint8[] = [0 * 4]) required broadcast ownrecv db; - requestPromotion(uint8) ownsend airecv; setCogIndex(int8) broadcast ram; setDisguisePageFlag(int8) ownrecv; setSosPageFlag(int8) ownrecv; @@ -836,7 +828,6 @@ dclass DistributedToon : DistributedPlayer { setNeverStartedPartyRefunded(uint64, int8, uint16) ownrecv; setDISLname(string) ram; setDISLid(uint32) ram db airecv; - flagAv(uint32, uint16, string []) airecv ownsend; setAnimalSound(uint8 index) ram broadcast ownrecv; setBuffs(uint32[] = []) required ownrecv db; setRedeemedCodes(string [] = []) required ownrecv db; @@ -3307,13 +3298,6 @@ dclass TTCodeRedemptionMgr : DistributedObject { redeemCodeResult(uint32); }; -dclass TrueFriendsMgr : DistributedObject { - requestId() airecv clsend; - requestIdResult(uint32, string, string); - redeemId(string) airecv clsend; - redeemIdResult(uint32, string); -}; - struct Friend { uint32 doId; @@ -3322,7 +3306,7 @@ blob dna; uint32 petId; }; -dclass TTUFriendsManager : DistributedObjectGlobal { +dclass TTSFriendsManager : DistributedObjectGlobal { removeFriend(uint32) clsend; requestAvatarInfo(uint32[]) clsend; @@ -3357,12 +3341,6 @@ dclass TTUFriendsManager : DistributedObjectGlobal { whisperSCEmoteTo(uint32 toId, uint16 emoteId) clsend; setWhisperSCEmoteFrom(uint32 fromId, uint16 emoteId); - requestSecret() clsend; - requestSecretResponse(int8 status, string secret); - - submitSecret(string(0-256) secret) clsend; - submitSecretResponse(int8 status, int32 avId); - sendTalkWhisper(uint32 toId, string message) clsend; receiveTalkWhisper(uint32 fromId, string message); @@ -3380,4 +3358,4 @@ dclass TTUFriendsManager : DistributedObjectGlobal { }; dclass ARGManager : DistributedObjectGlobal { -}; \ No newline at end of file +}; diff --git a/astron/libeay32.dll b/astron/libeay32.dll old mode 100644 new mode 100755 diff --git a/astron/linux/start-ai-server.sh b/astron/linux/start-ai-server.sh old mode 100644 new mode 100755 index 6161b3e0..fb3d573f --- a/astron/linux/start-ai-server.sh +++ b/astron/linux/start-ai-server.sh @@ -14,7 +14,7 @@ read -p "Base channel (DEFAULT: 401000000): " BASE_CHANNEL BASE_CHANNEL=${BASE_CHANNEL:-401000000} echo "===============================" -echo "Starting Toontown United AI server..." +echo "Starting Toontown Stride AI server..." echo "District name: $DISTRICT_NAME" echo "Base channel: $BASE_CHANNEL" echo "Max channels: $MAX_CHANNELS" diff --git a/astron/linux/start-astron-cluster.sh b/astron/linux/start-astron-cluster.sh old mode 100644 new mode 100755 diff --git a/astron/linux/start-uberdog-server.sh b/astron/linux/start-uberdog-server.sh old mode 100644 new mode 100755 index 8799fc21..8dc6114b --- a/astron/linux/start-uberdog-server.sh +++ b/astron/linux/start-uberdog-server.sh @@ -12,7 +12,7 @@ read -p "Base channel (DEFAULT: 1000000): " BASE_CHANNEL BASE_CHANNEL=${BASE_CHANNEL:-1000000} echo "===============================" -echo "Starting Toontown United UberDOG server..." +echo "Starting Toontown Stride UberDOG server..." echo "Base channel: $BASE_CHANNEL" echo "Max channels: $MAX_CHANNELS" echo "State Server: $STATESERVER" diff --git a/astron/msvcp120.dll b/astron/msvcp120.dll new file mode 100644 index 00000000..a237d2d7 Binary files /dev/null and b/astron/msvcp120.dll differ diff --git a/astron/msvcr120.dll b/astron/msvcr120.dll new file mode 100644 index 00000000..8c36149a Binary files /dev/null and b/astron/msvcr120.dll differ diff --git a/astron/ssleay32.dll b/astron/ssleay32.dll old mode 100644 new mode 100755 diff --git a/astron/win32/start-all.bat b/astron/win32/start-all.bat new file mode 100755 index 00000000..d643f14e --- /dev/null +++ b/astron/win32/start-all.bat @@ -0,0 +1,5 @@ +rem Starts a Localhost server. This is meant for Windows. To connect to the developer server, use the option in start-game for your OS. + +start start-astron-cluster +start start-uberdog-server +start start-ai-server diff --git a/client.bat b/client.bat deleted file mode 100644 index c7f10165..00000000 --- a/client.bat +++ /dev/null @@ -1,32 +0,0 @@ -@echo off -title TTU Game Launcher -set /P PPYTHON_PATH=".' print 'When you are done and want to save your changes, type "exit()".' diff --git a/tools/write_patcher.py b/tools/write_patcher.py old mode 100644 new mode 100755 index b7d0c113..b31f3da4 --- a/tools/write_patcher.py +++ b/tools/write_patcher.py @@ -8,19 +8,19 @@ import xml.etree.ElementTree as ET parser = argparse.ArgumentParser() parser.add_argument('--build-dir', default='build', - help='The directory of the Toontown United build.') + help='The directory of the Toontown Stride build.') parser.add_argument('--dest-dir', default='.', help='The directory in which to store the patcher.') parser.add_argument('--output', default='patcher.xml', help='The name of the output file.') -parser.add_argument('--launcher-version', default='united-dev', - help='The current version of the Toontown United launcher.') -parser.add_argument('--account-server', default='toontownunited.com', - help='The address of the Toontown United account server.') +parser.add_argument('--launcher-version', default='stride-dev', + help='The current version of the Toontown Stride launcher.') +parser.add_argument('--account-server', default='toontownstride.com', + help='The address of the Toontown Stride account server.') parser.add_argument('--client-agent', default='192.99.200.107', help='The IP address of the Client Agent to connect to.') -parser.add_argument('--server-version', default='united-dev', - help='The current version of the Toontown United game.') +parser.add_argument('--server-version', default='stride-dev', + help='The current version of the Toontown Stride game.') parser.add_argument('--resources-revision', default='', help='The current revision of the resources repository.') parser.add_argument('includes', nargs='*', default=['GameData.bin'], @@ -71,7 +71,7 @@ print 'Writing %s...' % args.output # First, add the element: patcher = ET.Element('patcher') -# Next, add the Toontown United launcher version: +# Next, add the Toontown Stride launcher version: launcher_version = ET.SubElement(patcher, 'launcher-version') launcher_version.text = args.launcher_version diff --git a/tools/write_rpc_doc.py b/tools/write_rpc_doc.py old mode 100644 new mode 100755 diff --git a/toontown/__init__.py b/toontown/__init__.py old mode 100644 new mode 100755 diff --git a/toontown/ai/CogPageManagerAI.py b/toontown/ai/CogPageManagerAI.py old mode 100644 new mode 100755 diff --git a/toontown/ai/CogSuitManagerAI.py b/toontown/ai/CogSuitManagerAI.py old mode 100644 new mode 100755 diff --git a/toontown/ai/CrashedLeaderBoardDecorator.py b/toontown/ai/CrashedLeaderBoardDecorator.py deleted file mode 100644 index eb9aee23..00000000 --- a/toontown/ai/CrashedLeaderBoardDecorator.py +++ /dev/null @@ -1,46 +0,0 @@ -from direct.directnotify import DirectNotifyGlobal -from direct.distributed.ClockDelta import * -from direct.interval.IntervalGlobal import * -import HolidayDecorator -from toontown.toonbase import ToontownGlobals -from pandac.PandaModules import Vec4, TransformState, NodePath, TransparencyAttrib -from toontown.hood import GSHood - -class CrashedLeaderBoardDecorator(HolidayDecorator.HolidayDecorator): - notify = DirectNotifyGlobal.directNotify.newCategory('CrashedLeaderBoardDecorator') - - def __init__(self): - HolidayDecorator.HolidayDecorator.__init__(self) - - def decorate(self): - self.updateHoodDNAStore() - self.swapIval = self.getSwapVisibleIval() - if self.swapIval: - self.swapIval.start() - holidayIds = base.cr.newsManager.getDecorationHolidayId() - if ToontownGlobals.CRASHED_LEADERBOARD not in holidayIds: - return - if base.config.GetBool('want-crashedLeaderBoard-Smoke', 1): - self.startSmokeEffect() - - def startSmokeEffect(self): - if isinstance(base.cr.playGame.getPlace().loader.hood, GSHood.GSHood): - base.cr.playGame.getPlace().loader.startSmokeEffect() - - def stopSmokeEffect(self): - if isinstance(base.cr.playGame.getPlace().loader.hood, GSHood.GSHood): - base.cr.playGame.getPlace().loader.stopSmokeEffect() - - def undecorate(self): - if base.config.GetBool('want-crashedLeaderBoard-Smoke', 1): - self.stopSmokeEffect() - holidayIds = base.cr.newsManager.getDecorationHolidayId() - if len(holidayIds) > 0: - self.decorate() - return - storageFile = base.cr.playGame.hood.storageDNAFile - if storageFile: - loadDNAFile(self.dnaStore, storageFile, CSDefault) - self.swapIval = self.getSwapVisibleIval() - if self.swapIval: - self.swapIval.start() diff --git a/toontown/ai/DatabaseObject.py b/toontown/ai/DatabaseObject.py old mode 100644 new mode 100755 diff --git a/toontown/ai/DistributedAprilToonsMgr.py b/toontown/ai/DistributedAprilToonsMgr.py old mode 100644 new mode 100755 diff --git a/toontown/ai/DistributedAprilToonsMgrAI.py b/toontown/ai/DistributedAprilToonsMgrAI.py old mode 100644 new mode 100755 diff --git a/toontown/ai/DistributedBlackCatMgr.py b/toontown/ai/DistributedBlackCatMgr.py old mode 100644 new mode 100755 diff --git a/toontown/ai/DistributedBlackCatMgrAI.py b/toontown/ai/DistributedBlackCatMgrAI.py old mode 100644 new mode 100755 diff --git a/toontown/ai/DistributedGreenToonEffectMgr.py b/toontown/ai/DistributedGreenToonEffectMgr.py old mode 100644 new mode 100755 diff --git a/toontown/ai/DistributedGreenToonEffectMgrAI.py b/toontown/ai/DistributedGreenToonEffectMgrAI.py old mode 100644 new mode 100755 diff --git a/toontown/ai/DistributedJorElCam.py b/toontown/ai/DistributedJorElCam.py old mode 100644 new mode 100755 index 5c9cec5e..1120ca5b --- a/toontown/ai/DistributedJorElCam.py +++ b/toontown/ai/DistributedJorElCam.py @@ -42,10 +42,11 @@ class DistributedJorElCam(DistributedObject): base.cr.jorElHead = self.head def delete(self): - self.head = None + del self.head del base.cr.jorElHead DistributedObject.delete(self) def disable(self): + self.head.cleanup() self.head.removeNode() DistributedObject.disable(self) diff --git a/toontown/ai/DistributedJorElCamAI.py b/toontown/ai/DistributedJorElCamAI.py old mode 100644 new mode 100755 diff --git a/toontown/ai/DistributedPolarPlaceEffectMgr.py b/toontown/ai/DistributedPolarPlaceEffectMgr.py old mode 100644 new mode 100755 diff --git a/toontown/ai/DistributedPolarPlaceEffectMgrAI.py b/toontown/ai/DistributedPolarPlaceEffectMgrAI.py old mode 100644 new mode 100755 diff --git a/toontown/ai/DistributedReportMgr.py b/toontown/ai/DistributedReportMgr.py old mode 100644 new mode 100755 diff --git a/toontown/ai/DistributedReportMgrAI.py b/toontown/ai/DistributedReportMgrAI.py old mode 100644 new mode 100755 diff --git a/toontown/ai/DistributedResistanceEmoteMgr.py b/toontown/ai/DistributedResistanceEmoteMgr.py old mode 100644 new mode 100755 diff --git a/toontown/ai/DistributedResistanceEmoteMgrAI.py b/toontown/ai/DistributedResistanceEmoteMgrAI.py old mode 100644 new mode 100755 diff --git a/toontown/ai/DistributedScavengerHuntTarget.py b/toontown/ai/DistributedScavengerHuntTarget.py old mode 100644 new mode 100755 diff --git a/toontown/ai/DistributedScavengerHuntTargetAI.py b/toontown/ai/DistributedScavengerHuntTargetAI.py old mode 100644 new mode 100755 diff --git a/toontown/ai/DistributedTrickOrTreatTarget.py b/toontown/ai/DistributedTrickOrTreatTarget.py old mode 100644 new mode 100755 diff --git a/toontown/ai/DistributedTrickOrTreatTargetAI.py b/toontown/ai/DistributedTrickOrTreatTargetAI.py old mode 100644 new mode 100755 diff --git a/toontown/ai/DistributedWinterCarolingTarget.py b/toontown/ai/DistributedWinterCarolingTarget.py old mode 100644 new mode 100755 diff --git a/toontown/ai/DistributedWinterCarolingTargetAI.py b/toontown/ai/DistributedWinterCarolingTargetAI.py old mode 100644 new mode 100755 diff --git a/toontown/ai/FishManagerAI.py b/toontown/ai/FishManagerAI.py old mode 100644 new mode 100755 diff --git a/toontown/ai/HalloweenHolidayDecorator.py b/toontown/ai/HalloweenHolidayDecorator.py old mode 100644 new mode 100755 diff --git a/toontown/ai/HolidayBaseAI.py b/toontown/ai/HolidayBaseAI.py old mode 100644 new mode 100755 diff --git a/toontown/ai/HolidayDecorator.py b/toontown/ai/HolidayDecorator.py old mode 100644 new mode 100755 diff --git a/toontown/ai/HolidayManagerAI.py b/toontown/ai/HolidayManagerAI.py old mode 100644 new mode 100755 diff --git a/toontown/ai/NewsManager.py b/toontown/ai/NewsManager.py old mode 100644 new mode 100755 index 4e877e08..04fdb48f --- a/toontown/ai/NewsManager.py +++ b/toontown/ai/NewsManager.py @@ -1,30 +1,22 @@ +from otp.ai.MagicWordGlobal import * from pandac.PandaModules import * from direct.distributed import DistributedObject from direct.directnotify import DirectNotifyGlobal -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import ToontownBattleGlobals -from toontown.battle import SuitBattleGlobals -from toontown.toonbase import TTLocalizer -import HolidayDecorator -import HalloweenHolidayDecorator -import CrashedLeaderBoardDecorator from direct.interval.IntervalGlobal import * -import calendar -from copy import deepcopy +from toontown.toonbase import TTLocalizer, ToontownGlobals, ToontownBattleGlobals +from toontown.battle import SuitBattleGlobals from toontown.suit import SuitDNA -from otp.ai.MagicWordGlobal import * - +from copy import deepcopy +import HolidayDecorator, HalloweenHolidayDecorator, calendar decorationHolidays = [ToontownGlobals.WINTER_DECORATIONS, ToontownGlobals.WACKY_WINTER_DECORATIONS, ToontownGlobals.HALLOWEEN_PROPS, ToontownGlobals.SPOOKY_PROPS, ToontownGlobals.HALLOWEEN_COSTUMES, - ToontownGlobals.SPOOKY_COSTUMES, - ToontownGlobals.CRASHED_LEADERBOARD] + ToontownGlobals.SPOOKY_COSTUMES] promotionalSpeedChatHolidays = [] - class NewsManager(DistributedObject.DistributedObject): notify = DirectNotifyGlobal.directNotify.newCategory('NewsManager') neverDisable = 1 @@ -186,8 +178,6 @@ class NewsManager(DistributedObject.DistributedObject): if hasattr(base.cr.playGame, 'dnaStore') and hasattr(base.cr.playGame, 'hood') and hasattr(base.cr.playGame.hood, 'loader'): if holidayId == ToontownGlobals.HALLOWEEN_COSTUMES or holidayId == ToontownGlobals.SPOOKY_COSTUMES: self.holidayDecorator = HalloweenHolidayDecorator.HalloweenHolidayDecorator() - elif holidayId == ToontownGlobals.CRASHED_LEADERBOARD: - self.holidayDecorator = CrashedLeaderBoardDecorator.CrashedLeaderBoardDecorator() else: self.holidayDecorator = HolidayDecorator.HolidayDecorator() self.holidayDecorator.decorate() @@ -303,8 +293,6 @@ class NewsManager(DistributedObject.DistributedObject): if hasattr(base.cr.playGame, 'dnaStore') and hasattr(base.cr.playGame, 'hood') and hasattr(base.cr.playGame.hood, 'loader'): if holidayId == ToontownGlobals.HALLOWEEN_COSTUMES or holidayId == ToontownGlobals.SPOOKY_COSTUMES: self.holidayDecorator = HalloweenHolidayDecorator.HalloweenHolidayDecorator() - elif holidayId == ToontownGlobals.CRASHED_LEADERBOARD: - self.holidayDecorator = CrashedLeaderBoardDecorator.CrashedLeaderBoardDecorator() else: self.holidayDecorator = HolidayDecorator.HolidayDecorator() self.holidayDecorator.undecorate() diff --git a/toontown/ai/NewsManagerAI.py b/toontown/ai/NewsManagerAI.py old mode 100644 new mode 100755 diff --git a/toontown/ai/PromotionManagerAI.py b/toontown/ai/PromotionManagerAI.py old mode 100644 new mode 100755 diff --git a/toontown/ai/QuestManagerAI.py b/toontown/ai/QuestManagerAI.py old mode 100644 new mode 100755 diff --git a/toontown/ai/ReportGlobals.py b/toontown/ai/ReportGlobals.py old mode 100644 new mode 100755 diff --git a/toontown/ai/ServerEventBuffer.py b/toontown/ai/ServerEventBuffer.py old mode 100644 new mode 100755 diff --git a/toontown/ai/ServiceStart.py b/toontown/ai/ServiceStart.py old mode 100644 new mode 100755 diff --git a/toontown/ai/ToonBarrier.py b/toontown/ai/ToonBarrier.py old mode 100644 new mode 100755 diff --git a/toontown/ai/ToontownAIMsgTypes.py b/toontown/ai/ToontownAIMsgTypes.py old mode 100644 new mode 100755 diff --git a/toontown/ai/ToontownAIRepository.py b/toontown/ai/ToontownAIRepository.py old mode 100644 new mode 100755 index ddb0fae1..77c1e344 --- a/toontown/ai/ToontownAIRepository.py +++ b/toontown/ai/ToontownAIRepository.py @@ -30,7 +30,6 @@ from toontown.distributed.ToontownInternalRepository import ToontownInternalRepo from toontown.coderedemption.TTCodeRedemptionMgrAI import TTCodeRedemptionMgrAI from toontown.dna.DNAParser import loadDNAFileAI from toontown.estate.EstateManagerAI import EstateManagerAI -from toontown.friends.TrueFriendsMgrAI import TrueFriendsMgrAI from toontown.hood import BRHoodAI from toontown.hood import BossbotHQAI from toontown.hood import CashbotHQAI @@ -87,7 +86,6 @@ class ToontownAIRepository(ToontownInternalRepository): self.wantCogbuildings = self.config.GetBool('want-cogbuildings', True) self.wantCogdominiums = self.config.GetBool('want-cogdominiums', True) self.wantTrackClsends = self.config.GetBool('want-track-clsends', False) - self.wantGloveNpc = self.config.GetBool('want-glove-npc', True) self.baseXpMultiplier = self.config.GetFloat('base-xp-multiplier', 1.0) self.wantHalloween = self.config.GetBool('want-halloween', False) self.wantChristmas = self.config.GetBool('want-christmas', False) @@ -128,8 +126,6 @@ class ToontownAIRepository(ToontownInternalRepository): self.buildingQueryMgr = DistributedBuildingQueryMgrAI(self) self.buildingQueryMgr.generateWithRequired(2) self.groupManager.generateWithRequired(2) - self.trueFriendsMgr = TrueFriendsMgrAI(self) - self.trueFriendsMgr.generateWithRequired(2) if self.wantFishing: self.fishManager = FishManagerAI(self) if self.wantHousing: diff --git a/toontown/ai/WelcomeValleyManager.py b/toontown/ai/WelcomeValleyManager.py old mode 100644 new mode 100755 diff --git a/toontown/ai/WelcomeValleyManagerAI.py b/toontown/ai/WelcomeValleyManagerAI.py old mode 100644 new mode 100755 diff --git a/toontown/ai/__init__.py b/toontown/ai/__init__.py old mode 100644 new mode 100755 diff --git a/toontown/battle/BattleBase.py b/toontown/battle/BattleBase.py old mode 100644 new mode 100755 diff --git a/toontown/battle/BattleCalculatorAI.py b/toontown/battle/BattleCalculatorAI.py old mode 100644 new mode 100755 index f967c851..55964e51 --- a/toontown/battle/BattleCalculatorAI.py +++ b/toontown/battle/BattleCalculatorAI.py @@ -260,7 +260,10 @@ class BattleCalculatorAI: return def __checkPropBonus(self, track): - return self.battle.getInteractivePropTrackBonus() == track + result = False + if self.battle.getInteractivePropTrackBonus() == track: + result = True + return result def __targetDefense(self, suit, atkTrack): if atkTrack == HEAL: diff --git a/toontown/battle/BattleExperience.py b/toontown/battle/BattleExperience.py old mode 100644 new mode 100755 diff --git a/toontown/battle/BattleExperienceAI.py b/toontown/battle/BattleExperienceAI.py old mode 100644 new mode 100755 diff --git a/toontown/battle/BattleManagerAI.py b/toontown/battle/BattleManagerAI.py old mode 100644 new mode 100755 diff --git a/toontown/battle/BattleParticles.py b/toontown/battle/BattleParticles.py old mode 100644 new mode 100755 index d4cc42c5..15c6636d --- a/toontown/battle/BattleParticles.py +++ b/toontown/battle/BattleParticles.py @@ -1,8 +1,7 @@ from direct.particles.ParticleEffect import * -import os from direct.directnotify import DirectNotifyGlobal -from direct.showbase import AppRunnerGlobal import ParticleDefs + notify = DirectNotifyGlobal.directNotify.newCategory('BattleParticles') TutorialParticleEffects = ('gearExplosionBig.ptf', 'gearExplosionSmall.ptf', 'gearExplosion.ptf') ParticleNames = ('audit-div', 'audit-five', 'audit-four', 'audit-minus', 'audit-mult', 'audit-one', 'audit-plus', 'audit-six', 'audit-three', 'audit-two', 'blah', 'brainstorm-box', 'brainstorm-env', 'brainstorm-track', 'buzzwords-crash', 'buzzwords-inc', 'buzzwords-main', 'buzzwords-over', 'buzzwords-syn', 'confetti', 'doubletalk-double', 'doubletalk-dup', 'doubletalk-good', 'filibuster-cut', 'filibuster-fiscal', 'filibuster-impeach', 'filibuster-inc', 'jargon-brow', 'jargon-deep', 'jargon-hoop', 'jargon-ipo', 'legalese-hc', 'legalese-qpq', 'legalese-vd', 'mumbojumbo-boiler', 'mumbojumbo-creative', 'mumbojumbo-deben', 'mumbojumbo-high', 'mumbojumbo-iron', 'poundsign', 'schmooze-genius', 'schmooze-instant', 'schmooze-master', 'schmooze-viz', 'roll-o-dex', 'rollodex-card', 'dagger', 'fire', 'snow-particle', 'raindrop', 'gear', 'checkmark', 'dollar-sign', 'spark') @@ -13,8 +12,6 @@ def loadParticles(): global particleModel if particleModel == None: particleModel = loader.loadModel('phase_3.5/models/props/suit-particles') - return - def unloadParticles(): global particleModel @@ -22,8 +19,6 @@ def unloadParticles(): particleModel.removeNode() del particleModel particleModel = None - return - def getParticle(name): if name in ParticleNames: @@ -34,7 +29,6 @@ def getParticle(name): return None return None - def loadParticleFile(name): assert name.endswith('.ptf') name = name[:-4] # Strip .ptf @@ -44,7 +38,6 @@ def loadParticleFile(name): particleFunc(effect) return effect - def createParticleEffect(name = None, file = None, numParticles = None, color = None): if not name: fileName = file + '.ptf' @@ -111,7 +104,6 @@ def createParticleEffect(name = None, file = None, numParticles = None, color = notify.warning('createParticleEffect() - no name: %s' % name) return None - def setEffectTexture(effect, name, color = None): particles = effect.getParticlesNamed('particles-1') np = getParticle(name) @@ -119,7 +111,6 @@ def setEffectTexture(effect, name, color = None): particles.renderer.setColor(color) particles.renderer.setFromNode(np) - def __makeGearExplosion(numParticles = None, style = 'Normal'): if style == 'Normal': effect = loadParticleFile('gearExplosion.ptf') @@ -132,7 +123,6 @@ def __makeGearExplosion(numParticles = None, style = 'Normal'): particles.setPoolSize(numParticles) return effect - def __makeRubOut(color = None): effect = loadParticleFile('demotionUnFreeze.ptf') loadParticles() @@ -148,7 +138,6 @@ def __makeRubOut(color = None): particles.renderer.setColor(Vec4(0.54, 0.92, 0.32, 0.7)) return effect - def __makeShiftLift(): effect = loadParticleFile('pixieDrop.ptf') particles = effect.getParticlesNamed('particles-1') @@ -157,4 +146,4 @@ def __makeShiftLift(): particles.emitter.setRadius(0.01) effect.setHpr(0, 180, 0) effect.setPos(0, 0, 0) - return effect + return effect \ No newline at end of file diff --git a/toontown/battle/BattlePlace.py b/toontown/battle/BattlePlace.py old mode 100644 new mode 100755 diff --git a/toontown/battle/BattleProps.py b/toontown/battle/BattleProps.py old mode 100644 new mode 100755 diff --git a/toontown/battle/BattleSounds.py b/toontown/battle/BattleSounds.py old mode 100644 new mode 100755 index 23ef5e2a..905ada38 --- a/toontown/battle/BattleSounds.py +++ b/toontown/battle/BattleSounds.py @@ -1,7 +1,5 @@ from pandac.PandaModules import * from direct.directnotify import DirectNotifyGlobal -from direct.showbase import AppRunnerGlobal -import os class BattleSounds: notify = DirectNotifyGlobal.directNotify.newCategory('BattleSounds') @@ -15,7 +13,6 @@ class BattleSounds: self.mgr.setCacheLimit(limit) base.addSfxManager(self.mgr) self.setupSearchPath() - return def setupSearchPath(self): self.sfxSearchPath = DSearchPath() @@ -46,5 +43,4 @@ class BattleSounds: return self.mgr.getSound(filename.getFullpath()) return self.mgr.getNullSound() - -globalBattleSoundCache = BattleSounds() +globalBattleSoundCache = BattleSounds() \ No newline at end of file diff --git a/toontown/battle/DistributedBattle.py b/toontown/battle/DistributedBattle.py old mode 100644 new mode 100755 index aa067c1f..6a5efed7 --- a/toontown/battle/DistributedBattle.py +++ b/toontown/battle/DistributedBattle.py @@ -39,6 +39,25 @@ class DistributedBattle(DistributedBattleBase.DistributedBattleBase): self.ignore(self.PlayGameSetPlaceEvent) self.removeCollisionData() + def setInteractivePropTrackBonus(self, trackBonus): + DistributedBattleBase.DistributedBattleBase.setInteractivePropTrackBonus(self, trackBonus) + if self.interactivePropTrackBonus >= 0: + if base.cr.playGame.hood: + self.calcInteractiveProp() + else: + self.acceptOnce(self.PlayGameSetPlaceEvent, self.calcInteractiveProp) + + def calcInteractiveProp(self): + if base.cr.playGame.hood: + loader = base.cr.playGame.hood.loader + if hasattr(loader, 'getInteractiveProp'): + self.interactiveProp = loader.getInteractiveProp(self.zoneId) + self.notify.debug('self.interactiveProp = %s' % self.interactiveProp) + else: + self.notify.warning('no loader.getInteractiveProp self.interactiveProp is None') + else: + self.notify.warning('no hood self.interactiveProp is None') + def setMembers(self, suits, suitsJoining, suitsPending, suitsActive, suitsLured, suitTraps, toons, toonsJoining, toonsPending, toonsActive, toonsRunning, timestamp): if self.battleCleanedUp(): return @@ -133,10 +152,8 @@ class DistributedBattle(DistributedBattleBase.DistributedBattleBase): if len(self.toons) > 0 and base.localAvatar == self.toons[0]: Emote.globalEmote.disableAll(self.toons[0], 'dbattle, enterFaceOff') self.__faceOff(ts, self.faceOffName, self.__handleFaceOffDone) - prop = self.getInteractiveProp() - - if prop: - prop.gotoBattleCheer() + if self.interactiveProp: + self.interactiveProp.gotoFaceoff() def __handleFaceOffDone(self): self.notify.debug('FaceOff done') @@ -164,10 +181,8 @@ class DistributedBattle(DistributedBattleBase.DistributedBattleBase): toon.startSmooth() self.accept('resumeAfterReward', self.handleResumeAfterReward) - prop = self.getInteractiveProp() - - if prop: - prop.gotoVictory() + if self.interactiveProp: + self.interactiveProp.gotoVictory() self.playReward(ts) def playReward(self, ts): @@ -195,10 +210,8 @@ class DistributedBattle(DistributedBattleBase.DistributedBattleBase): self.notify.debug('enterResume()') if self.hasLocalToon(): self.removeLocalToon() - prop = self.getInteractiveProp() - - if prop: - prop.requestIdleOrSad() + if self.interactiveProp: + self.interactiveProp.requestIdleOrSad() def exitResume(self): pass diff --git a/toontown/battle/DistributedBattleAI.py b/toontown/battle/DistributedBattleAI.py old mode 100644 new mode 100755 diff --git a/toontown/battle/DistributedBattleBase.py b/toontown/battle/DistributedBattleBase.py old mode 100644 new mode 100755 index 2b0713c6..51b6c89a --- a/toontown/battle/DistributedBattleBase.py +++ b/toontown/battle/DistributedBattleBase.py @@ -318,25 +318,11 @@ class DistributedBattleBase(DistributedNode.DistributedNode, BattleBase): def setBattleCellId(self, battleCellId): pass - def getInteractiveProp(self): - if config.GetBool('want-anim-props', True): - if self.interactiveProp: - return self.interactiveProp - elif base.cr.playGame.hood and hasattr(base.cr.playGame.hood, 'loader'): - loader = base.cr.playGame.hood.loader - - if hasattr(loader, 'getInteractiveProp'): - self.interactiveProp = base.cr.playGame.hood.loader.getInteractiveProp(self.zoneId) - - return self.interactiveProp - return None - else: - return None + def setInteractivePropTrackBonus(self, trackBonus): + self.interactivePropTrackBonus = trackBonus def getInteractivePropTrackBonus(self): - prop = self.getInteractiveProp() - - return prop.BattleTrack if prop else -1 + return self.interactivePropTrackBonus def setPosition(self, x, y, z): self.notify.debug('setPosition() - %d %d %d' % (x, y, z)) @@ -377,17 +363,12 @@ class DistributedBattleBase(DistributedNode.DistributedNode, BattleBase): oldsuits = self.suits self.suits = [] suitGone = 0 - prop = self.getInteractiveProp() - for s in suits: if s in self.cr.doId2do: suit = self.cr.doId2do[s] suit.setState('Battle') self.suits.append(suit) - - if prop: - suit.interactivePropTrackBonus = prop.BattleTrack - + suit.interactivePropTrackBonus = self.interactivePropTrackBonus try: suit.battleTrap except: @@ -1067,10 +1048,9 @@ class DistributedBattleBase(DistributedNode.DistributedNode, BattleBase): return Task.done def enterWaitForInput(self, ts = 0): - prop = self.getInteractiveProp() - - if prop: - prop.gotoBattleCheer() + self.notify.debug('enterWaitForInput()') + if self.interactiveProp: + self.interactiveProp.gotoBattleCheer() self.choseAttackAlready = 0 if self.localToonActive(): self.__enterLocalToonWaitForInput() @@ -1262,10 +1242,7 @@ class DistributedBattleBase(DistributedNode.DistributedNode, BattleBase): if base.cr.playGame.getPlace() != None: base.cr.playGame.getPlace().setState('battle', self.localToonBattleEvent) if localAvatar and hasattr(localAvatar, 'inventory') and localAvatar.inventory: - prop = self.getInteractiveProp() - - if prop: - localAvatar.inventory.setInteractivePropTrackBonus(prop.BattleTrack) + localAvatar.inventory.setInteractivePropTrackBonus(self.interactivePropTrackBonus) camera.wrtReparentTo(self) base.camLens.setMinFov(self.camFov/(4./3.)) return diff --git a/toontown/battle/DistributedBattleBaseAI.py b/toontown/battle/DistributedBattleBaseAI.py old mode 100644 new mode 100755 diff --git a/toontown/battle/DistributedBattleBldg.py b/toontown/battle/DistributedBattleBldg.py old mode 100644 new mode 100755 diff --git a/toontown/battle/DistributedBattleBldgAI.py b/toontown/battle/DistributedBattleBldgAI.py old mode 100644 new mode 100755 diff --git a/toontown/battle/DistributedBattleDiners.py b/toontown/battle/DistributedBattleDiners.py old mode 100644 new mode 100755 diff --git a/toontown/battle/DistributedBattleDinersAI.py b/toontown/battle/DistributedBattleDinersAI.py old mode 100644 new mode 100755 diff --git a/toontown/battle/DistributedBattleFinal.py b/toontown/battle/DistributedBattleFinal.py old mode 100644 new mode 100755 diff --git a/toontown/battle/DistributedBattleFinalAI.py b/toontown/battle/DistributedBattleFinalAI.py old mode 100644 new mode 100755 diff --git a/toontown/battle/DistributedBattleWaiters.py b/toontown/battle/DistributedBattleWaiters.py old mode 100644 new mode 100755 diff --git a/toontown/battle/DistributedBattleWaitersAI.py b/toontown/battle/DistributedBattleWaitersAI.py old mode 100644 new mode 100755 diff --git a/toontown/battle/Fanfare.py b/toontown/battle/Fanfare.py old mode 100644 new mode 100755 diff --git a/toontown/battle/FireCogPanel.py b/toontown/battle/FireCogPanel.py old mode 100644 new mode 100755 diff --git a/toontown/battle/HealJokes.py b/toontown/battle/HealJokes.py old mode 100644 new mode 100755 diff --git a/toontown/battle/Movie.py b/toontown/battle/Movie.py old mode 100644 new mode 100755 index 1f3b4132..c3b3245b --- a/toontown/battle/Movie.py +++ b/toontown/battle/Movie.py @@ -400,7 +400,8 @@ class Movie(DirectObject.DirectObject): if ival: track.append(ival) camTrack.append(camIval) - ival, camIval = MovieHeal.doHeals(self.__findToonAttack(HEAL), self.battle.getInteractivePropTrackBonus() == HEAL) + hasHealBonus = self.battle.getInteractivePropTrackBonus() == HEAL + ival, camIval = MovieHeal.doHeals(self.__findToonAttack(HEAL), hasHealBonus) if ival: track.append(ival) camTrack.append(camIval) diff --git a/toontown/battle/MovieCamera.py b/toontown/battle/MovieCamera.py old mode 100644 new mode 100755 diff --git a/toontown/battle/MovieDrop.py b/toontown/battle/MovieDrop.py old mode 100644 new mode 100755 diff --git a/toontown/battle/MovieFire.py b/toontown/battle/MovieFire.py old mode 100644 new mode 100755 diff --git a/toontown/battle/MovieHeal.py b/toontown/battle/MovieHeal.py old mode 100644 new mode 100755 diff --git a/toontown/battle/MovieLure.py b/toontown/battle/MovieLure.py old mode 100644 new mode 100755 diff --git a/toontown/battle/MovieNPCSOS.py b/toontown/battle/MovieNPCSOS.py old mode 100644 new mode 100755 diff --git a/toontown/battle/MoviePetSOS.py b/toontown/battle/MoviePetSOS.py old mode 100644 new mode 100755 diff --git a/toontown/battle/MovieSOS.py b/toontown/battle/MovieSOS.py old mode 100644 new mode 100755 diff --git a/toontown/battle/MovieSound.py b/toontown/battle/MovieSound.py old mode 100644 new mode 100755 diff --git a/toontown/battle/MovieSquirt.py b/toontown/battle/MovieSquirt.py old mode 100644 new mode 100755 diff --git a/toontown/battle/MovieSuitAttacks.py b/toontown/battle/MovieSuitAttacks.py old mode 100644 new mode 100755 diff --git a/toontown/battle/MovieThrow.py b/toontown/battle/MovieThrow.py old mode 100644 new mode 100755 diff --git a/toontown/battle/MovieToonVictory.py b/toontown/battle/MovieToonVictory.py old mode 100644 new mode 100755 diff --git a/toontown/battle/MovieTrap.py b/toontown/battle/MovieTrap.py old mode 100644 new mode 100755 diff --git a/toontown/battle/MovieUtil.py b/toontown/battle/MovieUtil.py old mode 100644 new mode 100755 diff --git a/toontown/battle/ParticleDefs.py b/toontown/battle/ParticleDefs.py old mode 100644 new mode 100755 index 0cdf09d1..02db034b --- a/toontown/battle/ParticleDefs.py +++ b/toontown/battle/ParticleDefs.py @@ -65,61 +65,6 @@ def gearExplosion(self): f0.addForce(force0) self.addForceGroup(f0) - -@particle -def smokeTest4(self): - self.reset() - self.setPos(0.000, 0.000, 0.000) - self.setHpr(0.000, 0.000, 0.000) - self.setScale(1.000, 1.000, 1.000) - p0 = Particles.Particles('particles-1') - - p0.setFactory("PointParticleFactory") - p0.setRenderer("SpriteParticleRenderer") - p0.setEmitter("DiscEmitter") - p0.setPoolSize(30) - p0.setBirthRate(0.1000) - p0.setLitterSize(1) - p0.setLitterSpread(0) - p0.setSystemLifespan(0.0000) - p0.setLocalVelocityFlag(1) - p0.setSystemGrowsOlderFlag(0) - - p0.factory.setLifespanBase(2.0000) - p0.factory.setLifespanSpread(0.5000) - p0.factory.setMassBase(1.0000) - p0.factory.setMassSpread(0.0000) - p0.factory.setTerminalVelocityBase(400.0000) - p0.factory.setTerminalVelocitySpread(0.0000) - - p0.renderer.setAlphaMode(BaseParticleRenderer.PRALPHAINOUT) - p0.renderer.setUserAlpha(0.57) - - p0.renderer.addTextureFromFile('../../ttmodels/src/maps/tt_t_efx_ext_smoke.tif') - p0.renderer.setColor(Vec4(1.00, 1.00, 1.00, 1.00)) - p0.renderer.setXScaleFlag(1) - p0.renderer.setYScaleFlag(1) - p0.renderer.setAnimAngleFlag(0) - p0.renderer.setInitialXScale(2.0000) - p0.renderer.setFinalXScale(4.0000) - p0.renderer.setInitialYScale(2.0000) - p0.renderer.setFinalYScale(4.0000) - p0.renderer.setNonanimatedTheta(0.0000) - p0.renderer.setAlphaBlendMethod(BaseParticleRenderer.PPBLENDLINEAR) - p0.renderer.setAlphaDisable(0) - p0.renderer.getColorInterpolationManager().addLinear(0.0,1.0,Vec4(0.28235295414924622,0.28235295414924622,0.28235295414924622,1.0),Vec4(0.28235295414924622,0.28235295414924622,0.28235295414924622,1.0),1) - - p0.emitter.setEmissionType(BaseParticleEmitter.ETRADIATE) - p0.emitter.setAmplitude(0.4000) - p0.emitter.setAmplitudeSpread(0.0000) - p0.emitter.setOffsetForce(Vec3(0.0000, 0.0000, 6.0000)) - p0.emitter.setExplicitLaunchVector(Vec3(1.0000, 0.0000, 0.0000)) - p0.emitter.setRadiateOrigin(Point3(0.0000, 0.0000, 0.0000)) - - p0.emitter.setRadius(1.0000) - self.addParticles(p0) - - @particle def gearExplosionSmall(self): self.reset() diff --git a/toontown/battle/PlayByPlayText.py b/toontown/battle/PlayByPlayText.py old mode 100644 new mode 100755 diff --git a/toontown/battle/RewardPanel.py b/toontown/battle/RewardPanel.py old mode 100644 new mode 100755 index 29bd6e36..415394ea --- a/toontown/battle/RewardPanel.py +++ b/toontown/battle/RewardPanel.py @@ -195,7 +195,6 @@ class RewardPanel(DirectFrame): totalMerits = CogDisguiseGlobals.getTotalMerits(toon, i) merits = meritList[i] self.meritIncLabels[i].hide() - promoStatus = toon.promotionStatus[i] if CogDisguiseGlobals.isSuitComplete(toon.cogParts, i): if not self.trackBarsOffset: trackBarOffset = 0.47 @@ -206,19 +205,14 @@ class RewardPanel(DirectFrame): if totalMerits: meritBar['range'] = totalMerits meritBar['value'] = merits - if promoStatus != ToontownGlobals.PendingPromotion: + if merits == totalMerits: + meritBar['text'] = TTLocalizer.RewardPanelMeritAlert + else: meritBar['text'] = '%s/%s %s' % (merits, totalMerits, TTLocalizer.RewardPanelMeritBarLabels[i]) - maxSuitType = SuitDNA.suitsPerDept - 1 - maxSuitLevel = (SuitDNA.levelsPerSuit-1) + maxSuitType - if toon.cogLevels[i] == maxSuitLevel: - if promoStatus == ToontownGlobals.PendingPromotion: - meritBar['range'] = 1 - meritBar['value'] = 1 - meritBar['text'] = TTLocalizer.RewardPanelMeritsMaxed - elif promoStatus == ToontownGlobals.PendingPromotion: + else: meritBar['range'] = 1 meritBar['value'] = 1 - meritBar['text'] = TTLocalizer.RewardPanelPromotionPending + meritBar['text'] = TTLocalizer.RewardPanelMeritsMaxed self.resetMeritBarColor(i) else: meritBar.hide() @@ -276,12 +270,18 @@ class RewardPanel(DirectFrame): def incrementMerits(self, toon, dept, newValue, totalMerits): meritBar = self.meritBars[dept] - promoStatus = toon.promotionStatus[dept] + oldValue = meritBar['value'] if totalMerits: newValue = min(totalMerits, newValue) meritBar['range'] = totalMerits meritBar['value'] = newValue - if promoStatus != ToontownGlobals.PendingPromotion: + if newValue == totalMerits: + meritBar['text'] = TTLocalizer.RewardPanelMeritAlert + meritBar['barColor'] = (DisguisePage.DeptColors[dept][0], + DisguisePage.DeptColors[dept][1], + DisguisePage.DeptColors[dept][2], + 1) + else: meritBar['text'] = '%s/%s %s' % (newValue, totalMerits, TTLocalizer.RewardPanelMeritBarLabels[dept]) def resetMeritBarColor(self, dept): diff --git a/toontown/battle/SuitBattleGlobals.py b/toontown/battle/SuitBattleGlobals.py old mode 100644 new mode 100755 diff --git a/toontown/battle/__init__.py b/toontown/battle/__init__.py old mode 100644 new mode 100755 diff --git a/toontown/building/BoardingGroupShow.py b/toontown/building/BoardingGroupShow.py old mode 100644 new mode 100755 diff --git a/toontown/building/BoardingPartyBase.py b/toontown/building/BoardingPartyBase.py old mode 100644 new mode 100755 diff --git a/toontown/building/DistributedAnimatedProp.py b/toontown/building/DistributedAnimatedProp.py old mode 100644 new mode 100755 diff --git a/toontown/building/DistributedAnimatedPropAI.py b/toontown/building/DistributedAnimatedPropAI.py old mode 100644 new mode 100755 diff --git a/toontown/building/DistributedBBElevator.py b/toontown/building/DistributedBBElevator.py old mode 100644 new mode 100755 diff --git a/toontown/building/DistributedBBElevatorAI.py b/toontown/building/DistributedBBElevatorAI.py old mode 100644 new mode 100755 diff --git a/toontown/building/DistributedBoardingParty.py b/toontown/building/DistributedBoardingParty.py old mode 100644 new mode 100755 diff --git a/toontown/building/DistributedBoardingPartyAI.py b/toontown/building/DistributedBoardingPartyAI.py old mode 100644 new mode 100755 diff --git a/toontown/building/DistributedBossElevator.py b/toontown/building/DistributedBossElevator.py old mode 100644 new mode 100755 diff --git a/toontown/building/DistributedBossElevatorAI.py b/toontown/building/DistributedBossElevatorAI.py old mode 100644 new mode 100755 diff --git a/toontown/building/DistributedBuilding.py b/toontown/building/DistributedBuilding.py old mode 100644 new mode 100755 index 79cc1358..c2e2cf00 --- a/toontown/building/DistributedBuilding.py +++ b/toontown/building/DistributedBuilding.py @@ -236,11 +236,8 @@ class DistributedBuilding(DistributedObject.DistributedObject): pass def enterToon(self, ts): - prop = self.getInteractiveProp() - - if prop: - prop.buildingLiberated(self.doId) - + if self.getInteractiveProp(): + self.getInteractiveProp().buildingLiberated(self.doId) self.setToToon() def exitToon(self): @@ -259,11 +256,7 @@ class DistributedBuilding(DistributedObject.DistributedObject): pass def enterSuit(self, ts): - prop = self.getInteractiveProp() - - if prop and not prop.state == 'Sad': - prop.gotoSad(self.doId) - + self.makePropSad() self.setToSuit() def exitSuit(self): @@ -928,23 +921,38 @@ class DistributedBuilding(DistributedObject.DistributedObject): self.elevatorNodePath.setPosHpr(0, 0, 0, 0, 0, 0) def getSbSearchString(self): - return 'landmarkBlocks/sb' + str(self.block) + ':*_landmark_*_DNARoot' + result = 'landmarkBlocks/sb' + str(self.block) + ':*_landmark_*_DNARoot' + return result def adjustSbNodepathScale(self, nodePath): pass def getVisZoneId(self): exteriorZoneId = base.cr.playGame.hood.dnaStore.getZoneFromBlockNumber(self.block) - return ZoneUtil.getTrueZoneId(exteriorZoneId, self.zoneId) + visZoneId = ZoneUtil.getTrueZoneId(exteriorZoneId, self.zoneId) + return visZoneId def getInteractiveProp(self): + result = None if self.interactiveProp: - return self.interactiveProp - elif base.cr.playGame.hood: - loader = base.cr.playGame.hood.loader + result = self.interactiveProp + else: + visZoneId = self.getVisZoneId() + if base.cr.playGame.hood: + loader = base.cr.playGame.hood.loader + if hasattr(loader, 'getInteractiveProp'): + self.interactiveProp = loader.getInteractiveProp(visZoneId) + result = self.interactiveProp + self.notify.debug('self.interactiveProp = %s' % self.interactiveProp) + else: + self.notify.warning('no loader.getInteractiveProp self.interactiveProp is None') + else: + self.notify.warning('no hood self.interactiveProp is None') + return result - if hasattr(loader, 'getInteractiveProp'): - self.interactiveProp = base.cr.playGame.hood.loader.getInteractiveProp(self.getVisZoneId()) - - return self.interactiveProp - return None + def makePropSad(self): + self.notify.debug('makePropSad') + if self.getInteractiveProp(): + if self.getInteractiveProp().state == 'Sad': + pass + self.getInteractiveProp().gotoSad(self.doId) diff --git a/toontown/building/DistributedBuildingAI.py b/toontown/building/DistributedBuildingAI.py old mode 100644 new mode 100755 diff --git a/toontown/building/DistributedBuildingMgrAI.py b/toontown/building/DistributedBuildingMgrAI.py old mode 100644 new mode 100755 diff --git a/toontown/building/DistributedBuildingQueryMgr.py b/toontown/building/DistributedBuildingQueryMgr.py old mode 100644 new mode 100755 diff --git a/toontown/building/DistributedBuildingQueryMgrAI.py b/toontown/building/DistributedBuildingQueryMgrAI.py old mode 100644 new mode 100755 diff --git a/toontown/building/DistributedCFOElevator.py b/toontown/building/DistributedCFOElevator.py old mode 100644 new mode 100755 diff --git a/toontown/building/DistributedCFOElevatorAI.py b/toontown/building/DistributedCFOElevatorAI.py old mode 100644 new mode 100755 diff --git a/toontown/building/DistributedCJElevator.py b/toontown/building/DistributedCJElevator.py old mode 100644 new mode 100755 diff --git a/toontown/building/DistributedCJElevatorAI.py b/toontown/building/DistributedCJElevatorAI.py old mode 100644 new mode 100755 diff --git a/toontown/building/DistributedClubElevator.py b/toontown/building/DistributedClubElevator.py old mode 100644 new mode 100755 diff --git a/toontown/building/DistributedClubElevatorAI.py b/toontown/building/DistributedClubElevatorAI.py old mode 100644 new mode 100755 diff --git a/toontown/building/DistributedDoor.py b/toontown/building/DistributedDoor.py old mode 100644 new mode 100755 diff --git a/toontown/building/DistributedDoorAI.py b/toontown/building/DistributedDoorAI.py old mode 100644 new mode 100755 diff --git a/toontown/building/DistributedElevator.py b/toontown/building/DistributedElevator.py old mode 100644 new mode 100755 diff --git a/toontown/building/DistributedElevatorAI.py b/toontown/building/DistributedElevatorAI.py old mode 100644 new mode 100755 diff --git a/toontown/building/DistributedElevatorExt.py b/toontown/building/DistributedElevatorExt.py old mode 100644 new mode 100755 diff --git a/toontown/building/DistributedElevatorExtAI.py b/toontown/building/DistributedElevatorExtAI.py old mode 100644 new mode 100755 diff --git a/toontown/building/DistributedElevatorFSM.py b/toontown/building/DistributedElevatorFSM.py old mode 100644 new mode 100755 diff --git a/toontown/building/DistributedElevatorFSMAI.py b/toontown/building/DistributedElevatorFSMAI.py old mode 100644 new mode 100755 diff --git a/toontown/building/DistributedElevatorFloor.py b/toontown/building/DistributedElevatorFloor.py old mode 100644 new mode 100755 diff --git a/toontown/building/DistributedElevatorFloorAI.py b/toontown/building/DistributedElevatorFloorAI.py old mode 100644 new mode 100755 diff --git a/toontown/building/DistributedElevatorInt.py b/toontown/building/DistributedElevatorInt.py old mode 100644 new mode 100755 diff --git a/toontown/building/DistributedElevatorIntAI.py b/toontown/building/DistributedElevatorIntAI.py old mode 100644 new mode 100755 diff --git a/toontown/building/DistributedGagshopInterior.py b/toontown/building/DistributedGagshopInterior.py old mode 100644 new mode 100755 diff --git a/toontown/building/DistributedGagshopInteriorAI.py b/toontown/building/DistributedGagshopInteriorAI.py old mode 100644 new mode 100755 diff --git a/toontown/building/DistributedHQInterior.py b/toontown/building/DistributedHQInterior.py old mode 100644 new mode 100755 index 34d6566e..6eae4c03 --- a/toontown/building/DistributedHQInterior.py +++ b/toontown/building/DistributedHQInterior.py @@ -27,7 +27,6 @@ class DistributedHQInterior(DistributedObject.DistributedObject): self.interior = loader.loadModel('phase_3.5/models/modules/HQ_interior') self.interior.reparentTo(render) self.interior.find('**/cream').hide() - self.interior.find('**/crashed_piano').hide() self.buildLeaderBoard() def announceGenerate(self): diff --git a/toontown/building/DistributedHQInteriorAI.py b/toontown/building/DistributedHQInteriorAI.py old mode 100644 new mode 100755 diff --git a/toontown/building/DistributedKartShopInterior.py b/toontown/building/DistributedKartShopInterior.py old mode 100644 new mode 100755 diff --git a/toontown/building/DistributedKartShopInteriorAI.py b/toontown/building/DistributedKartShopInteriorAI.py old mode 100644 new mode 100755 diff --git a/toontown/building/DistributedKnockKnockDoor.py b/toontown/building/DistributedKnockKnockDoor.py old mode 100644 new mode 100755 diff --git a/toontown/building/DistributedKnockKnockDoorAI.py b/toontown/building/DistributedKnockKnockDoorAI.py old mode 100644 new mode 100755 diff --git a/toontown/building/DistributedPetshopInterior.py b/toontown/building/DistributedPetshopInterior.py old mode 100644 new mode 100755 diff --git a/toontown/building/DistributedPetshopInteriorAI.py b/toontown/building/DistributedPetshopInteriorAI.py old mode 100644 new mode 100755 diff --git a/toontown/building/DistributedSuitInterior.py b/toontown/building/DistributedSuitInterior.py old mode 100644 new mode 100755 diff --git a/toontown/building/DistributedSuitInteriorAI.py b/toontown/building/DistributedSuitInteriorAI.py old mode 100644 new mode 100755 diff --git a/toontown/building/DistributedToonHallInterior.py b/toontown/building/DistributedToonHallInterior.py old mode 100644 new mode 100755 diff --git a/toontown/building/DistributedToonHallInteriorAI.py b/toontown/building/DistributedToonHallInteriorAI.py old mode 100644 new mode 100755 diff --git a/toontown/building/DistributedToonInterior.py b/toontown/building/DistributedToonInterior.py old mode 100644 new mode 100755 diff --git a/toontown/building/DistributedToonInteriorAI.py b/toontown/building/DistributedToonInteriorAI.py old mode 100644 new mode 100755 diff --git a/toontown/building/DistributedTrophyMgr.py b/toontown/building/DistributedTrophyMgr.py old mode 100644 new mode 100755 diff --git a/toontown/building/DistributedTrophyMgrAI.py b/toontown/building/DistributedTrophyMgrAI.py old mode 100644 new mode 100755 diff --git a/toontown/building/DistributedTutorialInterior.py b/toontown/building/DistributedTutorialInterior.py old mode 100644 new mode 100755 diff --git a/toontown/building/DistributedTutorialInteriorAI.py b/toontown/building/DistributedTutorialInteriorAI.py old mode 100644 new mode 100755 diff --git a/toontown/building/DistributedVPElevator.py b/toontown/building/DistributedVPElevator.py old mode 100644 new mode 100755 diff --git a/toontown/building/DistributedVPElevatorAI.py b/toontown/building/DistributedVPElevatorAI.py old mode 100644 new mode 100755 diff --git a/toontown/building/DoorTypes.py b/toontown/building/DoorTypes.py old mode 100644 new mode 100755 diff --git a/toontown/building/Elevator.py b/toontown/building/Elevator.py old mode 100644 new mode 100755 diff --git a/toontown/building/ElevatorConstants.py b/toontown/building/ElevatorConstants.py old mode 100644 new mode 100755 diff --git a/toontown/building/ElevatorUtils.py b/toontown/building/ElevatorUtils.py old mode 100644 new mode 100755 diff --git a/toontown/building/FADoorCodes.py b/toontown/building/FADoorCodes.py old mode 100644 new mode 100755 diff --git a/toontown/building/GagshopBuildingAI.py b/toontown/building/GagshopBuildingAI.py old mode 100644 new mode 100755 diff --git a/toontown/building/HQBuildingAI.py b/toontown/building/HQBuildingAI.py old mode 100644 new mode 100755 diff --git a/toontown/building/KartShopBuildingAI.py b/toontown/building/KartShopBuildingAI.py old mode 100644 new mode 100755 diff --git a/toontown/building/KnockKnockJokes.py b/toontown/building/KnockKnockJokes.py old mode 100644 new mode 100755 diff --git a/toontown/building/PetshopBuildingAI.py b/toontown/building/PetshopBuildingAI.py old mode 100644 new mode 100755 index d0216bf3..b77f9f69 --- a/toontown/building/PetshopBuildingAI.py +++ b/toontown/building/PetshopBuildingAI.py @@ -35,8 +35,6 @@ class PetshopBuildingAI: self.interior.generateWithRequired(self.interiorZone) self.npcs = NPCToons.createNpcsInZone(self.air, self.interiorZone) - - seeds = self.air.petMgr.getAvailablePets(1, len(self.npcs)) door = DistributedDoorAI.DistributedDoorAI( self.air, blockNumber, DoorTypes.EXT_STANDARD) diff --git a/toontown/building/SuitBuildingGlobals.py b/toontown/building/SuitBuildingGlobals.py old mode 100644 new mode 100755 diff --git a/toontown/building/SuitInterior.py b/toontown/building/SuitInterior.py old mode 100644 new mode 100755 diff --git a/toontown/building/SuitPlannerInteriorAI.py b/toontown/building/SuitPlannerInteriorAI.py old mode 100644 new mode 100755 diff --git a/toontown/building/ToonInterior.py b/toontown/building/ToonInterior.py old mode 100644 new mode 100755 diff --git a/toontown/building/ToonInteriorColors.py b/toontown/building/ToonInteriorColors.py old mode 100644 new mode 100755 diff --git a/toontown/building/TutorialBuildingAI.py b/toontown/building/TutorialBuildingAI.py old mode 100644 new mode 100755 diff --git a/toontown/building/__init__.py b/toontown/building/__init__.py old mode 100644 new mode 100755 diff --git a/toontown/catalog/AccountDate.py b/toontown/catalog/AccountDate.py old mode 100644 new mode 100755 diff --git a/toontown/catalog/AccountDateAI.py b/toontown/catalog/AccountDateAI.py old mode 100644 new mode 100755 diff --git a/toontown/catalog/CatalogAccessoryItem.py b/toontown/catalog/CatalogAccessoryItem.py old mode 100644 new mode 100755 index 225be227..366fa278 --- a/toontown/catalog/CatalogAccessoryItem.py +++ b/toontown/catalog/CatalogAccessoryItem.py @@ -10,9 +10,9 @@ from pandac.PandaModules import * class CatalogAccessoryItem(CatalogItem.CatalogItem): - def makeNewItem(self, accessoryType, loyaltyDays = 0): + def makeNewItem(self, accessoryType, isSpecial = False): self.accessoryType = accessoryType - self.loyaltyDays = loyaltyDays + self.isSpecial = isSpecial CatalogItem.CatalogItem.makeNewItem(self) def storedInTrunk(self): @@ -382,10 +382,7 @@ class CatalogAccessoryItem(CatalogItem.CatalogItem): def decodeDatagram(self, di, versionNumber, store): CatalogItem.CatalogItem.decodeDatagram(self, di, versionNumber, store) self.accessoryType = di.getUint16() - if versionNumber >= 6: - self.loyaltyDays = di.getUint16() - else: - self.loyaltyDays = 0 + self.isSpecial = di.getBool() str = AccessoryTypes[self.accessoryType][ATString] if self.isHat(): defn = ToonDNA.HatStyles[str] @@ -400,18 +397,10 @@ class CatalogAccessoryItem(CatalogItem.CatalogItem): def encodeDatagram(self, dg, store): CatalogItem.CatalogItem.encodeDatagram(self, dg, store) dg.addUint16(self.accessoryType) - dg.addUint16(self.loyaltyDays) + dg.addBool(self.isSpecial) def isGift(self): - if self.getEmblemPrices(): - return 0 - if self.loyaltyRequirement() > 0: - return 0 - elif self.accessoryType in LoyaltyAccessoryItems: - return 0 - else: - return 1 - + return not self.getEmblemPrices() def getAllAccessories(*accessoryTypes): list = [] @@ -419,4 +408,4 @@ def getAllAccessories(*accessoryTypes): base = CatalogAccessoryItem(accessoryType) list.append(base) - return list + return list \ No newline at end of file diff --git a/toontown/catalog/CatalogAccessoryItemGlobals.py b/toontown/catalog/CatalogAccessoryItemGlobals.py old mode 100644 new mode 100755 index c7b02f15..c87f58d6 --- a/toontown/catalog/CatalogAccessoryItemGlobals.py +++ b/toontown/catalog/CatalogAccessoryItemGlobals.py @@ -739,5 +739,4 @@ AccessoryTypes = {101: (AHat, 449: (AShoes, 'shw2', APriceCool, - 7)} -LoyaltyAccessoryItems = [] + 7)} \ No newline at end of file diff --git a/toontown/catalog/CatalogAnimatedFurnitureItem.py b/toontown/catalog/CatalogAnimatedFurnitureItem.py old mode 100644 new mode 100755 diff --git a/toontown/catalog/CatalogAtticItem.py b/toontown/catalog/CatalogAtticItem.py old mode 100644 new mode 100755 diff --git a/toontown/catalog/CatalogBeanItem.py b/toontown/catalog/CatalogBeanItem.py old mode 100644 new mode 100755 diff --git a/toontown/catalog/CatalogChatBalloon.py b/toontown/catalog/CatalogChatBalloon.py old mode 100644 new mode 100755 diff --git a/toontown/catalog/CatalogChatItem.py b/toontown/catalog/CatalogChatItem.py old mode 100644 new mode 100755 diff --git a/toontown/catalog/CatalogChatItemPicker.py b/toontown/catalog/CatalogChatItemPicker.py old mode 100644 new mode 100755 diff --git a/toontown/catalog/CatalogClothingItem.py b/toontown/catalog/CatalogClothingItem.py old mode 100644 new mode 100755 index 7ad4b8e0..2a1ef3b7 --- a/toontown/catalog/CatalogClothingItem.py +++ b/toontown/catalog/CatalogClothingItem.py @@ -292,22 +292,13 @@ ClothingTypes = {101: (ABoysShirt, 'bss1', 40), 1819: (AGirlsSkirt, 'sa_gs21', 5000), 1820: (AShirt, 'sa_ss55', 5000), 1821: (AShirt, 'weed', 5000)} -LoyaltyClothingItems = (1600, - 1601, - 1602, - 1603, - 1604, - 1605, - 1606, - 1607, - 1608) class CatalogClothingItem(CatalogItem.CatalogItem): - def makeNewItem(self, clothingType, colorIndex, loyaltyDays = 0): + def makeNewItem(self, clothingType, colorIndex, isSpecial = False): self.clothingType = clothingType self.colorIndex = colorIndex - self.loyaltyDays = loyaltyDays + self.isSpecial = isSpecial CatalogItem.CatalogItem.makeNewItem(self) def storedInCloset(self): @@ -565,10 +556,7 @@ class CatalogClothingItem(CatalogItem.CatalogItem): CatalogItem.CatalogItem.decodeDatagram(self, di, versionNumber, store) self.clothingType = di.getUint16() self.colorIndex = di.getUint8() - if versionNumber >= 6: - self.loyaltyDays = di.getUint16() - else: - self.loyaltyDays = 0 + self.isSpecial = di.getBool() str = ClothingTypes[self.clothingType][CTString] if self.isShirt(): color = ToonDNA.ShirtStyles[str][2][self.colorIndex] @@ -579,18 +567,10 @@ class CatalogClothingItem(CatalogItem.CatalogItem): CatalogItem.CatalogItem.encodeDatagram(self, dg, store) dg.addUint16(self.clothingType) dg.addUint8(self.colorIndex) - dg.addUint16(self.loyaltyDays) + dg.addBool(self.isSpecial) def isGift(self): - if self.getEmblemPrices(): - return 0 - if self.loyaltyRequirement() > 0: - return 0 - elif self.clothingType in LoyaltyClothingItems: - return 0 - else: - return 1 - + return not self.getEmblemPrices() def getAllClothes(*clothingTypes): list = [] @@ -600,4 +580,4 @@ def getAllClothes(*clothingTypes): for n in range(1, len(base.getColorChoices())): list.append(CatalogClothingItem(clothingType, n)) - return list + return list \ No newline at end of file diff --git a/toontown/catalog/CatalogEmoteItem.py b/toontown/catalog/CatalogEmoteItem.py old mode 100644 new mode 100755 index 2b6596ce..fa173bc6 --- a/toontown/catalog/CatalogEmoteItem.py +++ b/toontown/catalog/CatalogEmoteItem.py @@ -3,15 +3,14 @@ from toontown.toonbase import ToontownGlobals from toontown.toonbase import TTLocalizer from otp.otpbase import OTPLocalizer from direct.interval.IntervalGlobal import * -LoyaltyEmoteItems = (20, 21, 22, 23, 24, 25, 26) class CatalogEmoteItem(CatalogItem.CatalogItem): sequenceNumber = 0 pictureToon = None - def makeNewItem(self, emoteIndex, loyaltyDays = 0): + def makeNewItem(self, emoteIndex, isSpecial = False): self.emoteIndex = emoteIndex - self.loyaltyDays = loyaltyDays + self.isSpecial = isSpecial CatalogItem.CatalogItem.makeNewItem(self) def getPurchaseLimit(self): @@ -115,24 +114,14 @@ class CatalogEmoteItem(CatalogItem.CatalogItem): def decodeDatagram(self, di, versionNumber, store): CatalogItem.CatalogItem.decodeDatagram(self, di, versionNumber, store) self.emoteIndex = di.getUint8() - if versionNumber >= 6: - self.loyaltyDays = di.getUint16() - else: - self.loyaltyDays = 0 + self.isSpecial = di.getBool() if self.emoteIndex > len(OTPLocalizer.EmoteList): raise ValueError def encodeDatagram(self, dg, store): CatalogItem.CatalogItem.encodeDatagram(self, dg, store) dg.addUint8(self.emoteIndex) - dg.addUint16(self.loyaltyDays) + dg.addBool(self.isSpecial) def isGift(self): - if self.getEmblemPrices(): - return 0 - if self.loyaltyRequirement() > 0: - return 0 - elif self.emoteIndex in LoyaltyEmoteItems: - return 0 - else: - return 1 + return not self.getEmblemPrices() \ No newline at end of file diff --git a/toontown/catalog/CatalogFlooringItem.py b/toontown/catalog/CatalogFlooringItem.py old mode 100644 new mode 100755 index e5fc7144..93fd53d0 --- a/toontown/catalog/CatalogFlooringItem.py +++ b/toontown/catalog/CatalogFlooringItem.py @@ -108,11 +108,8 @@ class CatalogFlooringItem(CatalogSurfaceItem): def decodeDatagram(self, di, versionNumber, store): CatalogAtticItem.CatalogAtticItem.decodeDatagram(self, di, versionNumber, store) - if versionNumber < 3: - self.patternIndex = di.getUint8() - else: - self.patternIndex = di.getUint16() - if versionNumber < 4 or store & CatalogItem.Customization: + self.patternIndex = di.getUint16() + if store & CatalogItem.Customization: self.colorIndex = di.getUint8() else: self.colorIndex = 0 diff --git a/toontown/catalog/CatalogFurnitureItem.py b/toontown/catalog/CatalogFurnitureItem.py old mode 100644 new mode 100755 diff --git a/toontown/catalog/CatalogGardenItem.py b/toontown/catalog/CatalogGardenItem.py old mode 100644 new mode 100755 diff --git a/toontown/catalog/CatalogGardenStarterItem.py b/toontown/catalog/CatalogGardenStarterItem.py old mode 100644 new mode 100755 diff --git a/toontown/catalog/CatalogGenerator.py b/toontown/catalog/CatalogGenerator.py old mode 100644 new mode 100755 index cddaa4a8..e87888d0 --- a/toontown/catalog/CatalogGenerator.py +++ b/toontown/catalog/CatalogGenerator.py @@ -540,22 +540,19 @@ MonthlySchedule = ((7, CatalogGardenStarterItem(), CatalogNametagItem(100), CatalogNametagItem(0), - CatalogClothingItem(1608, 0, 90), - CatalogClothingItem(1605, 0, 90), - CatalogClothingItem(1602, 0, 90), - CatalogClothingItem(1607, 0, 60), - CatalogClothingItem(1604, 0, 60), - CatalogClothingItem(1601, 0, 60), - CatalogClothingItem(1606, 0, 30), - CatalogClothingItem(1603, 0, 30), - CatalogClothingItem(1600, 0, 30), - CatalogEmoteItem(20, 30), - CatalogEmoteItem(21, 45), - CatalogEmoteItem(22, 60), - CatalogEmoteItem(23, 75), - CatalogEmoteItem(24, 90), - CatalogEmoteItem(25, 115), - CatalogEmoteItem(26, 130))), + CatalogClothingItem(1605, 0, True), + CatalogClothingItem(1602, 0, True), + CatalogClothingItem(1604, 0, True), + CatalogClothingItem(1601, 0, True), + CatalogClothingItem(1603, 0, True), + CatalogClothingItem(1600, 0, True), + CatalogEmoteItem(20, True), + CatalogEmoteItem(21, True), + CatalogEmoteItem(22, True), + CatalogEmoteItem(23, True), + CatalogEmoteItem(24, True), + CatalogEmoteItem(25, True), + CatalogEmoteItem(26, True))), (5, 26, 6, diff --git a/toontown/catalog/CatalogHouseItem.py b/toontown/catalog/CatalogHouseItem.py old mode 100644 new mode 100755 index 2dbd8bb6..fe1d3faa --- a/toontown/catalog/CatalogHouseItem.py +++ b/toontown/catalog/CatalogHouseItem.py @@ -40,6 +40,9 @@ class CatalogHouseItem(CatalogItem.CatalogItem): def getName(self): return TTLocalizer.HouseNames[self.houseId] + + def getDeliveryTime(self): + return 0 def getEmblemPrices(self): return HouseGlobals.HouseEmblemPrices[self.houseId] @@ -66,4 +69,4 @@ class CatalogHouseItem(CatalogItem.CatalogItem): def getAllHouses(): return [CatalogHouseItem(i) for i in xrange(6)] - \ No newline at end of file + diff --git a/toontown/catalog/CatalogInvalidItem.py b/toontown/catalog/CatalogInvalidItem.py old mode 100644 new mode 100755 diff --git a/toontown/catalog/CatalogItem.py b/toontown/catalog/CatalogItem.py old mode 100644 new mode 100755 index 619c3c02..bba97cda --- a/toontown/catalog/CatalogItem.py +++ b/toontown/catalog/CatalogItem.py @@ -8,7 +8,7 @@ from direct.distributed.PyDatagramIterator import PyDatagramIterator import types import sys CatalogReverseType = None -CatalogItemVersion = 8 +CatalogItemVersion = 0 CatalogBackorderMarkup = 1.2 CatalogSaleMarkdown = 0.75 Customization = 1 @@ -20,7 +20,7 @@ CatalogTypeUnspecified = 0 CatalogTypeWeekly = 1 CatalogTypeBackorder = 2 CatalogTypeMonthly = 3 -CatalogTypeLoyalty = 4 +CatalogTypeSpecial = 4 class CatalogItem: notify = DirectNotifyGlobal.directNotify.newCategory('CatalogItem') @@ -32,6 +32,7 @@ class CatalogItem: self.giftTag = None self.giftCode = 0 self.hasPicture = False + self.isSpecial = False self.volume = 0 self.specialEventId = 0 if len(args) >= 1 and isinstance(args[0], DatagramIterator): @@ -127,14 +128,8 @@ class CatalogItem: def forGirlsOnly(self): return 0 - def setLoyaltyRequirement(self, days): - self.loyaltyDays = days - - def loyaltyRequirement(self): - if not hasattr(self, 'loyaltyDays'): - return 0 - else: - return self.loyaltyDays + def getIsSpecial(self): + return self.isSpecial def getPrice(self, catalogType): if catalogType == CatalogTypeBackorder: @@ -279,22 +274,9 @@ class CatalogItem: x = di.getArg(STInt16, 10) y = di.getArg(STInt16, 10) z = di.getArg(STInt16, 100) - if versionNumber < 2: - h = di.getArg(STInt16, 10) - p = 0.0 - r = 0.0 - elif versionNumber < 5: - h = di.getArg(STInt8, 256.0 / 360.0) - p = di.getArg(STInt8, 256.0 / 360.0) - r = di.getArg(STInt8, 256.0 / 360.0) - hpr = oldToNewHpr(VBase3(h, p, r)) - h = hpr[0] - p = hpr[1] - r = hpr[2] - else: - h = di.getArg(STInt8, 256.0 / 360.0) - p = di.getArg(STInt8, 256.0 / 360.0) - r = di.getArg(STInt8, 256.0 / 360.0) + h = di.getArg(STInt8, 256.0 / 360.0) + p = di.getArg(STInt8, 256.0 / 360.0) + r = di.getArg(STInt8, 256.0 / 360.0) self.posHpr = (x, y, z, @@ -303,10 +285,7 @@ class CatalogItem: r) if store & GiftTag: self.giftTag = di.getString() - if versionNumber >= 8: - self.specialEventId = di.getUint8() - else: - self.specialEventId = 0 + self.specialEventId = di.getUint8() def encodeDatagram(self, dg, store): if store & DeliveryDate: @@ -395,14 +374,6 @@ class CatalogItem: def getRequestPurchaseErrorTextTimeout(self): return 6 - def getDaysToGo(self, avatar): - accountDays = avatar.getAccountDays() - daysToGo = self.loyaltyRequirement() - accountDays - if daysToGo < 0: - daysToGo = 0 - return int(daysToGo) - - def encodeCatalogItem(dg, item, store): import CatalogItemTypes flags = item.getTypeCode() diff --git a/toontown/catalog/CatalogItemList.py b/toontown/catalog/CatalogItemList.py old mode 100644 new mode 100755 diff --git a/toontown/catalog/CatalogItemPanel.py b/toontown/catalog/CatalogItemPanel.py old mode 100644 new mode 100755 index b9c451ad..944776c7 --- a/toontown/catalog/CatalogItemPanel.py +++ b/toontown/catalog/CatalogItemPanel.py @@ -311,12 +311,9 @@ class CatalogItemPanel(DirectFrame): elif hasattr(self['item'], 'isSkillTooLow') and self['item'].isSkillTooLow(base.localAvatar): auxText = TTLocalizer.SkillTooLow self.buyButton['state'] = DGG.DISABLED - elif hasattr(self['item'], 'getDaysToGo') and self['item'].getDaysToGo(base.localAvatar): - auxText = TTLocalizer.DaysToGo % self['item'].getDaysToGo(base.localAvatar) - self.buyButton['state'] = DGG.DISABLED elif self['item'].getEmblemPrices() and not base.localAvatar.isEnoughMoneyAndEmblemsToBuy(self['item'].getPrice(self['type']), self['item'].getEmblemPrices()): self.buyButton['state'] = DGG.DISABLED - elif self['item'].__class__.__name__ == "CatalogHouseItem" and self['item'].houseId == localAvatar.houseType: + elif hasattr(self['item'], 'houseId') and self['item'].houseId == localAvatar.houseType: auxText = TTLocalizer.CatalogPurchasedMaxText elif self['item'].getPrice(self['type']) <= base.localAvatar.getMoney() + base.localAvatar.getBankMoney(): self.buyButton['state'] = DGG.NORMAL diff --git a/toontown/catalog/CatalogItemTypes.py b/toontown/catalog/CatalogItemTypes.py old mode 100644 new mode 100755 diff --git a/toontown/catalog/CatalogManager.py b/toontown/catalog/CatalogManager.py old mode 100644 new mode 100755 diff --git a/toontown/catalog/CatalogManagerAI.py b/toontown/catalog/CatalogManagerAI.py old mode 100644 new mode 100755 diff --git a/toontown/catalog/CatalogMouldingItem.py b/toontown/catalog/CatalogMouldingItem.py old mode 100644 new mode 100755 index 858c9041..d3472e6c --- a/toontown/catalog/CatalogMouldingItem.py +++ b/toontown/catalog/CatalogMouldingItem.py @@ -93,10 +93,7 @@ class CatalogMouldingItem(CatalogSurfaceItem): def decodeDatagram(self, di, versionNumber, store): CatalogAtticItem.CatalogAtticItem.decodeDatagram(self, di, versionNumber, store) - if versionNumber < 3: - self.patternIndex = di.getUint8() - else: - self.patternIndex = di.getUint16() + self.patternIndex = di.getUint16() self.colorIndex = di.getUint8() wtype = MouldingTypes[self.patternIndex] diff --git a/toontown/catalog/CatalogNametagItem.py b/toontown/catalog/CatalogNametagItem.py old mode 100644 new mode 100755 diff --git a/toontown/catalog/CatalogNotifyDialog.py b/toontown/catalog/CatalogNotifyDialog.py old mode 100644 new mode 100755 diff --git a/toontown/catalog/CatalogPetTrickItem.py b/toontown/catalog/CatalogPetTrickItem.py old mode 100644 new mode 100755 diff --git a/toontown/catalog/CatalogPoleItem.py b/toontown/catalog/CatalogPoleItem.py old mode 100644 new mode 100755 diff --git a/toontown/catalog/CatalogRentalItem.py b/toontown/catalog/CatalogRentalItem.py old mode 100644 new mode 100755 index 48b0c073..51dd0ae2 --- a/toontown/catalog/CatalogRentalItem.py +++ b/toontown/catalog/CatalogRentalItem.py @@ -92,10 +92,7 @@ class CatalogRentalItem(CatalogItem.CatalogItem): def decodeDatagram(self, di, versionNumber, store): CatalogItem.CatalogItem.decodeDatagram(self, di, versionNumber, store) - if versionNumber >= 7: - self.cost = di.getUint16() - else: - self.cost = 1000 + self.cost = di.getUint16() self.duration = di.getUint16() self.typeIndex = di.getUint16() diff --git a/toontown/catalog/CatalogScreen.py b/toontown/catalog/CatalogScreen.py old mode 100644 new mode 100755 index 1c40f137..36eb9d3c --- a/toontown/catalog/CatalogScreen.py +++ b/toontown/catalog/CatalogScreen.py @@ -112,8 +112,8 @@ class CatalogScreen(DirectFrame): def setNumBackPages(self, numBackPages): self.numBackPages = numBackPages - def setNumLoyaltyPages(self, numLoyaltyPages): - self.numLoyaltyPages = numLoyaltyPages + def setNumSpecialPages(self, numSpecialPages): + self.numSpecialPages = numSpecialPages def setNumEmblemPages(self, numEmblemPages): self.numEmblemPages = numEmblemPages @@ -127,49 +127,49 @@ class CatalogScreen(DirectFrame): def enableBackorderCatalogButton(self): self.backCatalogButton['state'] = DGG.NORMAL self.newCatalogButton['state'] = DGG.DISABLED - self.loyaltyCatalogButton['state'] = DGG.DISABLED + self.specialCatalogButton['state'] = DGG.DISABLED self.emblemCatalogButton['state'] = DGG.DISABLED def enableNewCatalogButton(self): self.backCatalogButton['state'] = DGG.DISABLED self.newCatalogButton['state'] = DGG.NORMAL - self.loyaltyCatalogButton['state'] = DGG.DISABLED + self.specialCatalogButton['state'] = DGG.DISABLED self.emblemCatalogButton['state'] = DGG.DISABLED - def enableLoyaltyCatalogButton(self): + def enableSpecialCatalogButton(self): self.backCatalogButton['state'] = DGG.DISABLED self.newCatalogButton['state'] = DGG.DISABLED - self.loyaltyCatalogButton['state'] = DGG.NORMAL + self.specialCatalogButton['state'] = DGG.NORMAL self.emblemCatalogButton['state'] = DGG.DISABLED def enableEmblemCatalogButton(self): self.backCatalogButton['state'] = DGG.DISABLED self.newCatalogButton['state'] = DGG.DISABLED - self.loyaltyCatalogButton['state'] = DGG.DISABLED + self.specialCatalogButton['state'] = DGG.DISABLED self.emblemCatalogButton['state'] = DGG.NORMAL def modeBackorderCatalog(self): self.backCatalogButton['state'] = DGG.DISABLED self.newCatalogButton['state'] = DGG.NORMAL - self.loyaltyCatalogButton['state'] = DGG.NORMAL + self.specialCatalogButton['state'] = DGG.NORMAL self.emblemCatalogButton['state'] = DGG.NORMAL def modeNewCatalog(self): self.backCatalogButton['state'] = DGG.NORMAL self.newCatalogButton['state'] = DGG.DISABLED - self.loyaltyCatalogButton['state'] = DGG.NORMAL + self.specialCatalogButton['state'] = DGG.NORMAL self.emblemCatalogButton['state'] = DGG.NORMAL - def modeLoyaltyCatalog(self): + def modeSpecialCatalog(self): self.backCatalogButton['state'] = DGG.NORMAL self.newCatalogButton['state'] = DGG.NORMAL - self.loyaltyCatalogButton['state'] = DGG.DISABLED + self.specialCatalogButton['state'] = DGG.DISABLED self.emblemCatalogButton['state'] = DGG.NORMAL def modeEmblemCatalog(self): self.backCatalogButton['state'] = DGG.NORMAL self.newCatalogButton['state'] = DGG.NORMAL - self.loyaltyCatalogButton['state'] = DGG.NORMAL + self.specialCatalogButton['state'] = DGG.NORMAL self.emblemCatalogButton['state'] = DGG.DISABLED def showNewItems(self, index = None): @@ -206,15 +206,15 @@ class CatalogScreen(DirectFrame): self.showPageItems() return - def showLoyaltyItems(self, index = None): + def showSpecialItems(self, index = None): if config.GetBool('want-qa-regression', 0): self.notify.info('QA-REGRESSION: CATALOG: Special item') taskMgr.remove('clarabelleHelpText1') messenger.send('wakeup') - self.viewing = 'Loyalty' - self.modeLoyaltyCatalog() - self.setMaxPageIndex(self.numLoyaltyPages) - if self.numLoyaltyPages == 0: + self.viewing = 'Special' + self.modeSpecialCatalog() + self.setMaxPageIndex(self.numSpecialPages) + if self.numSpecialPages == 0: self.setPageIndex(-1) elif index is not None: self.setPageIndex(index) @@ -249,11 +249,11 @@ class CatalogScreen(DirectFrame): self.viewing == 'New' if self.viewing == 'New' and self.pageIndex > self.maxPageIndex and self.numBackPages > 0: self.showBackorderItems() - if self.viewing == 'New' and self.pageIndex > self.maxPageIndex and self.numLoyaltyPages > 0: - self.showLoyaltyItems() - elif self.viewing == 'Backorder' and self.pageIndex > self.maxPageIndex and self.numLoyaltyPages > 0: - self.showLoyaltyItems() - elif self.viewing == 'Loyalty' and self.pageIndex > self.maxPageIndex and self.numEmblemPages > 0: + if self.viewing == 'New' and self.pageIndex > self.maxPageIndex and self.numSpecialPages > 0: + self.showSpecialItems() + elif self.viewing == 'Backorder' and self.pageIndex > self.maxPageIndex and self.numSpecialPages > 0: + self.showSpecialItems() + elif self.viewing == 'Special' and self.pageIndex > self.maxPageIndex and self.numEmblemPages > 0: self.showEmblemItems() else: self.pageIndex = min(self.pageIndex, self.maxPageIndex) @@ -266,10 +266,10 @@ class CatalogScreen(DirectFrame): self.pageIndex = self.pageIndex - 1 if self.viewing == 'Backorder' and self.pageIndex < 0 and self.numNewPages > 0: self.showNewItems(self.numNewPages - 1) - elif self.viewing == 'Loyalty' and self.pageIndex < 0 and self.numBackPages > 0: + elif self.viewing == 'Special' and self.pageIndex < 0 and self.numBackPages > 0: self.showBackorderItems(self.numBackPages - 1) - elif self.viewing == 'Emblem' and self.pageIndex < 0 and self.numLoyaltyPages > 0: - self.showLoyaltyItems(self.numLoyaltyPages - 1) + elif self.viewing == 'Emblem' and self.pageIndex < 0 and self.numSpecialPages > 0: + self.showSpecialItems(self.numSpecialPages - 1) else: self.pageIndex = max(self.pageIndex, -1) self.showPageItems() @@ -285,16 +285,16 @@ class CatalogScreen(DirectFrame): self.openCover() if self.viewing == 'New': page = self.pageList[self.pageIndex] - newOrBackOrLoyalty = 0 + newOrBackOrSpecial = 0 elif self.viewing == 'Backorder': page = self.backPageList[self.pageIndex] - newOrBackOrLoyalty = 1 - elif self.viewing == 'Loyalty': - page = self.loyaltyPageList[self.pageIndex] - newOrBackOrLoyalty = 2 + newOrBackOrSpecial = 1 + elif self.viewing == 'Special': + page = self.specialPageList[self.pageIndex] + newOrBackOrSpecial = 2 elif self.viewing == 'Emblem': page = self.emblemPageList[self.pageIndex] - newOrBackOrLoyalty = 3 + newOrBackOrSpecial = 3 page.show() for panel in self.panelDict[page.get_key()]: panel.load() @@ -304,7 +304,7 @@ class CatalogScreen(DirectFrame): pIndex = 0 randGen = random.Random() - randGen.seed(base.localAvatar.catalogScheduleCurrentWeek + (self.pageIndex << 8) + (newOrBackOrLoyalty << 16)) + randGen.seed(base.localAvatar.catalogScheduleCurrentWeek + (self.pageIndex << 8) + (newOrBackOrSpecial << 16)) for i in range(NUM_CATALOG_ROWS): for j in range(NUM_CATALOG_COLS): if pIndex < len(self.visiblePanels): @@ -319,8 +319,8 @@ class CatalogScreen(DirectFrame): if self.viewing == 'New': text = TTLocalizer.CatalogNew - elif self.viewing == 'Loyalty': - text = TTLocalizer.CatalogLoyalty + elif self.viewing == 'Special': + text = TTLocalizer.CatalogSpecial elif self.viewing == 'Backorder': text = TTLocalizer.CatalogBackorder elif self.viewing == 'Emblem': @@ -328,13 +328,13 @@ class CatalogScreen(DirectFrame): self.pageLabel['text'] = text + ' - %d' % (self.pageIndex + 1) if self.pageIndex < self.maxPageIndex: self.nextPageButton.show() - elif self.viewing == 'New' and self.numBackPages == 0 and self.numLoyaltyPages == 0: + elif self.viewing == 'New' and self.numBackPages == 0 and self.numSpecialPages == 0: self.nextPageButton.hide() - elif self.viewing == 'Backorder' and self.numLoyaltyPages == 0: + elif self.viewing == 'Backorder' and self.numSpecialPages == 0: self.nextPageButton.hide() - elif self.viewing == 'Loyalty' and self.numEmblemPages == 0: + elif self.viewing == 'Special' and self.numEmblemPages == 0: self.nextPageButton.hide() - elif self.viewing == 'Loyalty' and self.numEmblemPages > 0: + elif self.viewing == 'Special' and self.numEmblemPages > 0: self.nextPageButton.show() elif self.viewing == 'Emblem': self.nextPageButton.hide() @@ -369,7 +369,7 @@ class CatalogScreen(DirectFrame): for page in self.backPageList: page.hide() - for page in self.loyaltyPageList: + for page in self.specialPageList: page.hide() for page in self.emblemPageList: @@ -400,26 +400,26 @@ class CatalogScreen(DirectFrame): self.newCatalogButton2.show() if self.numBackPages > 0: self.backCatalogButton2.show() - if self.numLoyaltyPages > 0: - self.loyaltyCatalogButton2.show() + if self.numSpecialPages > 0: + self.specialCatalogButton2.show() if self.numEmblemPages > 0: self.emblemCatalogButton2.show() self.newCatalogButton.hide() self.backCatalogButton.hide() - self.loyaltyCatalogButton.hide() + self.specialCatalogButton.hide() self.emblemCatalogButton.hide() def hideDummyTabs(self): self.newCatalogButton2.hide() self.backCatalogButton2.hide() - self.loyaltyCatalogButton2.hide() + self.specialCatalogButton2.hide() self.emblemCatalogButton2.hide() if self.numNewPages > 0: self.newCatalogButton.show() if self.numBackPages > 0: self.backCatalogButton.show() - if self.numLoyaltyPages > 0: - self.loyaltyCatalogButton.show() + if self.numSpecialPages > 0: + self.specialCatalogButton.show() if self.numEmblemPages > 0: self.emblemCatalogButton.show() @@ -453,14 +453,14 @@ class CatalogScreen(DirectFrame): self.maxPageIndex = 0 self.numNewPages = 0 self.numBackPages = 5 - self.numLoyaltyPages = 0 + self.numSpecialPages = 0 self.viewing = 'New' self.panelList = [] self.backPanelList = [] self.pageList = [] self.backPageList = [] - self.loyaltyPanelList = [] - self.loyaltyPageList = [] + self.specialPanelList = [] + self.specialPageList = [] self.emblemPanelList = [] self.emblemPageList = [] self.panelDict = {} @@ -516,19 +516,19 @@ class CatalogScreen(DirectFrame): -0.2, 0.4), image_scale=(1.0, 1.0, smash), image_pos=(0.0, 0.0, lift), image=backDown, pressEffect=0, command=self.showBackorderItems, text=TTLocalizer.CatalogBackorder, text_font=ToontownGlobals.getSignFont(), text_pos=(0.25 - lift, 0.132), text_scale=TTLocalizer.CSbackCatalogButton, text_fg=(0.392, 0.549, 0.627, 1.0), text2_fg=(0.392, 0.349, 0.427, 1.0)) self.backCatalogButton2.hide() - self.loyaltyCatalogButton = DirectButton(self.base, relief=None, pos=(0, 0, 0.469), frameSize=(-0.2, + self.specialCatalogButton = DirectButton(self.base, relief=None, pos=(0, 0, 0.469), frameSize=(-0.2, 0.25, -0.85, -0.3), image=[newDown, newDown, newDown, - newUp], image_scale=(1.0, 1.0, smash), image_pos=(0.0, 0.0, -1.4 + lift), pressEffect=0, command=self.showLoyaltyItems, text=TTLocalizer.CatalogLoyalty, text_font=ToontownGlobals.getSignFont(), text_pos=(1.0 - lift, 0.132), text3_pos=(1.0 - lift, 0.112), text_scale=0.065, text_fg=(0.353, 0.627, 0.627, 1.0), text2_fg=(0.353, 0.427, 0.427, 1.0)) - self.loyaltyCatalogButton.hide() - self.loyaltyCatalogButton2 = DirectButton(self.base, relief=None, pos=(0, 0, 0.469), frameSize=(-0.2, + newUp], image_scale=(1.0, 1.0, smash), image_pos=(0.0, 0.0, -1.4 + lift), pressEffect=0, command=self.showSpecialItems, text=TTLocalizer.CatalogSpecial, text_font=ToontownGlobals.getSignFont(), text_pos=(1.0 - lift, 0.132), text3_pos=(1.0 - lift, 0.112), text_scale=0.065, text_fg=(0.353, 0.627, 0.627, 1.0), text2_fg=(0.353, 0.427, 0.427, 1.0)) + self.specialCatalogButton.hide() + self.specialCatalogButton2 = DirectButton(self.base, relief=None, pos=(0, 0, 0.469), frameSize=(-0.2, 0.25, -0.85, - -0.3), image_scale=(1.0, 1.0, smash), image_pos=(0.0, 0.0, -1.4 + lift), image=newDown, pressEffect=0, command=self.showLoyaltyItems, text=TTLocalizer.CatalogLoyalty, text_font=ToontownGlobals.getSignFont(), text_pos=(1.0 - lift, 0.132), text_scale=0.065, text_fg=(0.353, 0.627, 0.627, 1.0), text2_fg=(0.353, 0.427, 0.427, 1.0)) - self.loyaltyCatalogButton2.hide() + -0.3), image_scale=(1.0, 1.0, smash), image_pos=(0.0, 0.0, -1.4 + lift), image=newDown, pressEffect=0, command=self.showSpecialItems, text=TTLocalizer.CatalogSpecial, text_font=ToontownGlobals.getSignFont(), text_pos=(1.0 - lift, 0.132), text_scale=0.065, text_fg=(0.353, 0.627, 0.627, 1.0), text2_fg=(0.353, 0.427, 0.427, 1.0)) + self.specialCatalogButton2.hide() self.emblemCatalogButton = DirectButton(self.base, relief=None, pos=(0, 0, 1.05), frameSize=(-0.2, 0.25, -2.0, @@ -578,8 +578,8 @@ class CatalogScreen(DirectFrame): self.newCatalogButton2.component('text%d' % i).setR(90) self.backCatalogButton.component('text%d' % i).setR(90) self.backCatalogButton2.component('text%d' % i).setR(90) - self.loyaltyCatalogButton.component('text%d' % i).setR(90) - self.loyaltyCatalogButton2.component('text%d' % i).setR(90) + self.specialCatalogButton.component('text%d' % i).setR(90) + self.specialCatalogButton2.component('text%d' % i).setR(90) self.emblemCatalogButton.component('text%d' % i).setR(90) self.emblemCatalogButton2.component('text%d' % i).setR(90) @@ -623,8 +623,8 @@ class CatalogScreen(DirectFrame): continue if isMaxBankOffered and item in allBankItems and item.furnitureType != CatalogFurnitureItem.MaxBankId: continue - if item.loyaltyRequirement() != 0: - self.loyaltyPanelList.append(CatalogItemPanel.CatalogItemPanel(parent=hidden, item=item, type=CatalogItem.CatalogTypeLoyalty, parentCatalogScreen=self)) + if item.getIsSpecial(): + self.specialPanelList.append(CatalogItemPanel.CatalogItemPanel(parent=hidden, item=item, type=CatalogItem.CatalogTypeSpecial, parentCatalogScreen=self)) elif item.getEmblemPrices(): self.emblemPanelList.append(CatalogItemPanel.CatalogItemPanel(parent=hidden, item=item, type=CatalogItem.CatalogTypeWeekly, parentCatalogScreen=self)) else: @@ -641,10 +641,10 @@ class CatalogScreen(DirectFrame): continue if isMaxBankOffered and item in allBankItems and item.furnitureType != CatalogFurnitureItem.MaxBankId: continue - if item.loyaltyRequirement() != 0: - self.loyaltyPanelList.append(CatalogItemPanel.CatalogItemPanel(parent=hidden, item=item, type=CatalogItem.CatalogTypeLoyalty, parentCatalogScreen=self)) + if item.getIsSpecial(): + self.specialPanelList.append(CatalogItemPanel.CatalogItemPanel(parent=hidden, item=item, type=CatalogItem.CatalogTypeSpecial, parentCatalogScreen=self)) elif item.getEmblemPrices(): - self.emblemPanelList.append(CatalogItemPanel.CatalogItemPanel(parent=hidden, item=item, type=CatalogItem.CatalogTypeBackOrder, parentCatalogScreen=self)) + self.emblemPanelList.append(CatalogItemPanel.CatalogItemPanel(parent=hidden, item=item, type=CatalogItem.CatalogTypeBackorder, parentCatalogScreen=self)) else: self.backPanelList.append(CatalogItemPanel.CatalogItemPanel(parent=hidden, item=item, type=CatalogItem.CatalogTypeBackorder, parentCatalogScreen=self)) @@ -652,8 +652,8 @@ class CatalogScreen(DirectFrame): self.setNumNewPages(numPages) numPages = self.packPages(self.backPanelList, self.backPageList, 'back') self.setNumBackPages(numPages) - numPages = self.packPages(self.loyaltyPanelList, self.loyaltyPageList, 'loyalty') - self.setNumLoyaltyPages(numPages) + numPages = self.packPages(self.specialPanelList, self.specialPageList, 'special') + self.setNumSpecialPages(numPages) numPages = self.packPages(self.emblemPanelList, self.emblemPageList, 'emblem') self.setNumEmblemPages(numPages) currentWeek = base.localAvatar.catalogScheduleCurrentWeek - 1 @@ -766,7 +766,7 @@ class CatalogScreen(DirectFrame): self.clarabelleFrame.setPosHprScale(-0.01, 0.0, -0.01, 0.0, 0.0, 0.0, 1.02, 1.0, 1.02) def reload(self): - for panel in self.panelList + self.backPanelList + self.loyaltyPanelList + self.emblemPanelList: + for panel in self.panelList + self.backPanelList + self.specialPanelList + self.emblemPanelList: panel.destroy() def priceSort(a, b, type): @@ -778,23 +778,23 @@ class CatalogScreen(DirectFrame): self.maxPageIndex = 0 self.numNewPages = 0 self.numBackPages = 5 - self.numLoyaltyPages = 0 + self.numSpecialPages = 0 self.viewing = 'New' self.panelList = [] self.backPanelList = [] - self.loyaltyList = [] + self.specialList = [] self.pageList = [] self.backPageList = [] - self.loyaltyPanelList = [] - self.loyaltyPageList = [] + self.specialPanelList = [] + self.specialPageList = [] self.panelDict = {} self.visiblePanels = [] itemList = base.localAvatar.monthlyCatalog + base.localAvatar.weeklyCatalog itemList.sort(lambda a, b: priceSort(a, b, CatalogItem.CatalogTypeWeekly)) itemList.reverse() for item in itemList: - if item.loyaltyRequirement() != 0: - self.loyaltyPanelList.append(CatalogItemPanel.CatalogItemPanel(parent=hidden, item=item, type=CatalogItem.CatalogTypeLoyalty, parentCatalogScreen=self)) + if item.getIsSpecial(): + self.specialPanelList.append(CatalogItemPanel.CatalogItemPanel(parent=hidden, item=item, type=CatalogItem.CatalogTypeSpecial, parentCatalogScreen=self)) else: self.panelList.append(CatalogItemPanel.CatalogItemPanel(parent=hidden, item=item, type=CatalogItem.CatalogTypeWeekly)) @@ -802,8 +802,8 @@ class CatalogScreen(DirectFrame): itemList.sort(lambda a, b: priceSort(a, b, CatalogItem.CatalogTypeBackorder)) itemList.reverse() for item in itemList: - if item.loyaltyRequirement() != 0: - self.loyaltyPanelList.append(CatalogItemPanel.CatalogItemPanel(parent=hidden, item=item, type=CatalogItem.CatalogTypeLoyalty, parentCatalogScreen=self)) + if item.getIsSpecial(): + self.specialPanelList.append(CatalogItemPanel.CatalogItemPanel(parent=hidden, item=item, type=CatalogItem.CatalogTypeSpecial, parentCatalogScreen=self)) else: self.backPanelList.append(CatalogItemPanel.CatalogItemPanel(parent=hidden, item=item, type=CatalogItem.CatalogTypeBackorder)) @@ -811,8 +811,8 @@ class CatalogScreen(DirectFrame): self.setNumNewPages(numPages) numPages = self.packPages(self.backPanelList, self.backPageList, 'back') self.setNumBackPages(numPages) - numPages = self.packPages(self.loyaltyPanelList, self.loyaltyPageList, 'loyalty') - self.setNumLoyaltyPages(numPages) + numPages = self.packPages(self.specialPanelList, self.specialPageList, 'special') + self.setNumSpecialPages(numPages) seriesNumber = (base.localAvatar.catalogScheduleCurrentWeek - 1) / ToontownGlobals.CatalogNumWeeksPerSeries + 1 self.catalogSeries['text'] = Localizer.CatalogSeriesLabel % seriesNumber weekNumber = (base.localAvatar.catalogScheduleCurrentWeek - 1) % ToontownGlobals.CatalogNumWeeksPerSeries + 1 @@ -835,7 +835,7 @@ class CatalogScreen(DirectFrame): self.destroy() del self.base del self.squares - for panel in self.panelList + self.backPanelList + self.loyaltyPanelList + self.emblemPanelList: + for panel in self.panelList + self.backPanelList + self.specialPanelList + self.emblemPanelList: panel.destroy() del self.panelList @@ -853,8 +853,8 @@ class CatalogScreen(DirectFrame): del self.newCatalogButton2 del self.backCatalogButton del self.backCatalogButton2 - del self.loyaltyCatalogButton - del self.loyaltyCatalogButton2 + del self.specialCatalogButton + del self.specialCatalogButton2 del self.pageLabel if self.createdGiftGui: del self.giftToggle @@ -899,8 +899,8 @@ class CatalogScreen(DirectFrame): self.newCatalogButton2.hide() self.backCatalogButton.hide() self.backCatalogButton2.hide() - self.loyaltyCatalogButton.hide() - self.loyaltyCatalogButton2.hide() + self.specialCatalogButton.hide() + self.specialCatalogButton2.hide() self.emblemCatalogButton.hide() self.emblemCatalogButton2.hide() self.hangup.hide() @@ -924,7 +924,7 @@ class CatalogScreen(DirectFrame): if hasattr(self, 'beanBank'): self.beanBank['text'] = str(base.localAvatar.getTotalMoney()) if lock == 0: - for item in self.panelList + self.backPanelList + self.loyaltyPanelList + self.emblemPanelList: + for item in self.panelList + self.backPanelList + self.specialPanelList + self.emblemPanelList: if type(item) != type(''): item.updateButtons(self.gifting) diff --git a/toontown/catalog/CatalogSurfaceColors.py b/toontown/catalog/CatalogSurfaceColors.py old mode 100644 new mode 100755 diff --git a/toontown/catalog/CatalogSurfaceItem.py b/toontown/catalog/CatalogSurfaceItem.py old mode 100644 new mode 100755 diff --git a/toontown/catalog/CatalogToonStatueItem.py b/toontown/catalog/CatalogToonStatueItem.py old mode 100644 new mode 100755 diff --git a/toontown/catalog/CatalogWainscotingItem.py b/toontown/catalog/CatalogWainscotingItem.py old mode 100644 new mode 100755 index accd3951..9fff0f3b --- a/toontown/catalog/CatalogWainscotingItem.py +++ b/toontown/catalog/CatalogWainscotingItem.py @@ -84,10 +84,7 @@ class CatalogWainscotingItem(CatalogSurfaceItem): def decodeDatagram(self, di, versionNumber, store): CatalogAtticItem.CatalogAtticItem.decodeDatagram(self, di, versionNumber, store) - if versionNumber < 3: - self.patternIndex = di.getUint8() - else: - self.patternIndex = di.getUint16() + self.patternIndex = di.getUint16() self.colorIndex = di.getUint8() wtype = WainscotingTypes[self.patternIndex] diff --git a/toontown/catalog/CatalogWallpaperItem.py b/toontown/catalog/CatalogWallpaperItem.py old mode 100644 new mode 100755 index 486b5638..ae6aed86 --- a/toontown/catalog/CatalogWallpaperItem.py +++ b/toontown/catalog/CatalogWallpaperItem.py @@ -665,23 +665,13 @@ class CatalogWallpaperItem(CatalogSurfaceItem): def decodeDatagram(self, di, versionNumber, store): CatalogAtticItem.CatalogAtticItem.decodeDatagram(self, di, versionNumber, store) self.colorIndex = 0 - if store & CatalogItem.Customization: - self.borderIndex = 0 - else: - self.borderIndex = 0 + self.borderIndex = 0 self.borderColorIndex = 0 - if versionNumber < 3: - self.patternIndex = di.getUint8() + self.patternIndex = di.getUint16() + if store & CatalogItem.Customization: self.colorIndex = di.getUint8() - elif versionNumber == 3: - self.patternIndex = di.getUint16() - self.colorIndex = di.getUint8() - else: - self.patternIndex = di.getUint16() - if store & CatalogItem.Customization: - self.colorIndex = di.getUint8() - self.borderIndex = di.getUint16() - self.borderColorIndex = di.getUint8() + self.borderIndex = di.getUint16() + self.borderColorIndex = di.getUint8() wtype = WallpaperTypes[self.patternIndex] return diff --git a/toontown/catalog/CatalogWindowItem.py b/toontown/catalog/CatalogWindowItem.py old mode 100644 new mode 100755 diff --git a/toontown/catalog/MailboxScreen.py b/toontown/catalog/MailboxScreen.py old mode 100644 new mode 100755 diff --git a/toontown/catalog/__init__.py b/toontown/catalog/__init__.py old mode 100644 new mode 100755 diff --git a/toontown/chat/ChatBalloon.py b/toontown/chat/ChatBalloon.py old mode 100644 new mode 100755 diff --git a/toontown/chat/ChatGlobals.py b/toontown/chat/ChatGlobals.py old mode 100644 new mode 100755 diff --git a/toontown/chat/ResistanceChat.py b/toontown/chat/ResistanceChat.py old mode 100644 new mode 100755 diff --git a/toontown/chat/TTChatInputSpeedChat.py b/toontown/chat/TTChatInputSpeedChat.py old mode 100644 new mode 100755 diff --git a/toontown/chat/TTChatInputWhiteList.py b/toontown/chat/TTChatInputWhiteList.py old mode 100644 new mode 100755 diff --git a/toontown/chat/TTSCWhiteListTerminal.py b/toontown/chat/TTSCWhiteListTerminal.py old mode 100644 new mode 100755 diff --git a/toontown/chat/TTTalkAssistant.py b/toontown/chat/TTTalkAssistant.py old mode 100644 new mode 100755 diff --git a/toontown/chat/TTWhiteList.py b/toontown/chat/TTWhiteList.py old mode 100644 new mode 100755 diff --git a/toontown/chat/ToonChatGarbler.py b/toontown/chat/ToonChatGarbler.py old mode 100644 new mode 100755 diff --git a/toontown/chat/ToontownChatManager.py b/toontown/chat/ToontownChatManager.py old mode 100644 new mode 100755 index 83ac3663..a46d6873 --- a/toontown/chat/ToontownChatManager.py +++ b/toontown/chat/ToontownChatManager.py @@ -93,19 +93,19 @@ class ToontownChatManager(ChatManager.ChatManager): else: ChatManager.ChatManager.enterMainMenu(self) - def enterNoSecretChatAtAll(self): - if self.noSecretChatAtAll == None: + def enterNoTrueFriendsAtAll(self): + if self.noTrueFriendsAtAll == None: buttons = loader.loadModel('phase_3/models/gui/dialog_box_buttons_gui') okButtonImage = (buttons.find('**/ChtBx_OKBtn_UP'), buttons.find('**/ChtBx_OKBtn_DN'), buttons.find('**/ChtBx_OKBtn_Rllvr')) - self.noSecretChatAtAll = DirectFrame(parent=aspect2dp, pos=(0.0, 0.1, 0.2), relief=None, image=DGG.getDefaultDialogGeom(), image_color=OTPGlobals.GlobalDialogColor, image_scale=(1.4, 1.0, 1.1), text=OTPLocalizer.NoSecretChatAtAll, text_wordwrap=20, textMayChange=0, text_scale=0.06, text_pos=(0, 0.3)) - DirectLabel(parent=self.noSecretChatAtAll, relief=None, pos=(0, 0, 0.4), text=OTPLocalizer.NoSecretChatAtAllTitle, textMayChange=0, text_scale=0.08) - DirectButton(self.noSecretChatAtAll, image=okButtonImage, relief=None, text=OTPLocalizer.NoSecretChatAtAllOK, text_scale=0.05, text_pos=(0.0, -0.1), textMayChange=0, pos=(0.0, 0.0, -0.4), command=self.__handleNoSecretChatAtAllOK) + self.noTrueFriendsAtAll = DirectFrame(parent=aspect2dp, pos=(0.0, 0.1, 0.2), relief=None, image=DGG.getDefaultDialogGeom(), image_color=OTPGlobals.GlobalDialogColor, image_scale=(1.4, 1.0, 1.1), text=OTPLocalizer.NoTrueFriendsAtAll, text_wordwrap=20, textMayChange=0, text_scale=0.06, text_pos=(0, 0.3)) + DirectLabel(parent=self.noTrueFriendsAtAll, relief=None, pos=(0, 0, 0.4), text=OTPLocalizer.NoTrueFriendsAtAllTitle, textMayChange=0, text_scale=0.08) + DirectButton(self.noTrueFriendsAtAll, image=okButtonImage, relief=None, text=OTPLocalizer.NoTrueFriendsAtAllOK, text_scale=0.05, text_pos=(0.0, -0.1), textMayChange=0, pos=(0.0, 0.0, -0.4), command=self.__handleNoTrueFriendsAtAllOK) buttons.removeNode() - self.noSecretChatAtAll.show() + self.noTrueFriendsAtAll.show() return - def exitNoSecretChatAtAll(self): - self.noSecretChatAtAll.hide() + def exitNoTrueFriendsAtAll(self): + self.noTrueFriendsAtAll.hide() def __normalButtonPressed(self): if base.config.GetBool('want-qa-regression', 0): @@ -143,19 +143,19 @@ class ToontownChatManager(ChatManager.ChatManager): self.fsm.request('mainMenu') return - def enterNoSecretChatAtAllAndNoWhitelist(self): - if self.noSecretChatAtAllAndNoWhitelist == None: + def enterNoTrueFriendsAtAllAndNoWhitelist(self): + if self.noTrueFriendsAtAllAndNoWhitelist == None: buttons = loader.loadModel('phase_3/models/gui/dialog_box_buttons_gui') okButtonImage = (buttons.find('**/ChtBx_OKBtn_UP'), buttons.find('**/ChtBx_OKBtn_DN'), buttons.find('**/ChtBx_OKBtn_Rllvr')) - self.noSecretChatAtAllAndNoWhitelist = DirectFrame(parent=aspect2dp, pos=(0.0, 0.1, 0.05), relief=None, image=DGG.getDefaultDialogGeom(), image_color=OTPGlobals.GlobalDialogColor, image_scale=(1.4, 1.0, 1.58), text=OTPLocalizer.NoSecretChatAtAllAndNoWhitelist, text_wordwrap=20, textMayChange=0, text_scale=0.06, text_pos=(0, 0.55)) - DirectLabel(parent=self.noSecretChatAtAllAndNoWhitelist, relief=None, pos=(0, 0, 0.67), text=OTPLocalizer.NoSecretChatAtAllAndNoWhitelistTitle, textMayChange=0, text_scale=0.08) - DirectButton(self.noSecretChatAtAllAndNoWhitelist, image=okButtonImage, relief=None, text=OTPLocalizer.NoSecretChatAtAllOK, text_scale=0.05, text_pos=(0.0, -0.1), textMayChange=0, pos=(0.0, 0.0, -0.64), command=self.__handleNoSecretChatAtAllOK) + self.noTrueFriendsAtAllAndNoWhitelist = DirectFrame(parent=aspect2dp, pos=(0.0, 0.1, 0.05), relief=None, image=DGG.getDefaultDialogGeom(), image_color=OTPGlobals.GlobalDialogColor, image_scale=(1.4, 1.0, 1.58), text=OTPLocalizer.NoTrueFriendsAtAllAndNoWhitelist, text_wordwrap=20, textMayChange=0, text_scale=0.06, text_pos=(0, 0.55)) + DirectLabel(parent=self.noTrueFriendsAtAllAndNoWhitelist, relief=None, pos=(0, 0, 0.67), text=OTPLocalizer.NoTrueFriendsAtAllAndNoWhitelistTitle, textMayChange=0, text_scale=0.08) + DirectButton(self.noTrueFriendsAtAllAndNoWhitelist, image=okButtonImage, relief=None, text=OTPLocalizer.NoTrueFriendsAtAllOK, text_scale=0.05, text_pos=(0.0, -0.1), textMayChange=0, pos=(0.0, 0.0, -0.64), command=self.__handleNoTrueFriendsAtAllOK) buttons.removeNode() - self.noSecretChatAtAllAndNoWhitelist.show() + self.noTrueFriendsAtAllAndNoWhitelist.show() return - def exitNoSecretChatAtAllAndNoWhitelist(self): - self.noSecretChatAtAllAndNoWhitelist.hide() + def exitNoTrueFriendsAtAllAndNoWhitelist(self): + self.noTrueFriendsAtAllAndNoWhitelist.hide() def __whisperScButtonPressed(self, avatarName, avatarId): messenger.send('wakeup') @@ -168,7 +168,7 @@ class ToontownChatManager(ChatManager.ChatManager): def __whisperCancelPressed(self): self.fsm.request('mainMenu') - def __handleNoSecretChatAtAllOK(self): + def __handleNoTrueFriendsAtAllOK(self): self.fsm.request('mainMenu') def messageSent(self): diff --git a/toontown/chat/WhisperPopup.py b/toontown/chat/WhisperPopup.py old mode 100644 new mode 100755 diff --git a/toontown/chat/WhiteListData.py b/toontown/chat/WhiteListData.py old mode 100644 new mode 100755 index 5ef584e1..2cf88f59 --- a/toontown/chat/WhiteListData.py +++ b/toontown/chat/WhiteListData.py @@ -565,6 +565,7 @@ WHITELIST = [ 'aching', 'achoo', 'achy', + 'ack', 'acknowledge', 'acknowledged', 'acknowledgement', @@ -33157,8 +33158,8 @@ WHITELIST = [ 'toonter', 'toontorial', 'toontown', - 'toontownunited', - 'toontownunited.com', + 'toontownstride', + 'toontownstride.com', 'toontrooper', 'toontroopers', 'toonup', @@ -33718,8 +33719,8 @@ WHITELIST = [ 'tti', 'tto', 'ttr', - 'ttu', - 'ttunited', + 'tts', + 'ttstride', 'ttyl', 'tub', 'tuba', @@ -36175,7 +36176,7 @@ WHITELIST = [ 'wut', 'wwod', 'www.toonhq.org', - 'www.toontownunited.com', + 'www.toontownstride.com', "wyatt's", 'wyda', 'wynken', @@ -36744,4 +36745,4 @@ WHITELIST = [ 'zzzzzs', 'denialmc', 'loudrob' -] \ No newline at end of file +] diff --git a/toontown/chat/__init__.py b/toontown/chat/__init__.py old mode 100644 new mode 100755 diff --git a/toontown/coderedemption/TTCodeRedemptionMgr.py b/toontown/coderedemption/TTCodeRedemptionMgr.py old mode 100644 new mode 100755 diff --git a/toontown/coderedemption/TTCodeRedemptionMgrAI.py b/toontown/coderedemption/TTCodeRedemptionMgrAI.py old mode 100644 new mode 100755 diff --git a/toontown/coderedemption/__init__.py b/toontown/coderedemption/__init__.py old mode 100644 new mode 100755 diff --git a/toontown/cogdominium/CogdoBarrelRoom.py b/toontown/cogdominium/CogdoBarrelRoom.py old mode 100644 new mode 100755 diff --git a/toontown/cogdominium/CogdoBarrelRoomConsts.py b/toontown/cogdominium/CogdoBarrelRoomConsts.py old mode 100644 new mode 100755 diff --git a/toontown/cogdominium/CogdoBarrelRoomMovies.py b/toontown/cogdominium/CogdoBarrelRoomMovies.py old mode 100644 new mode 100755 diff --git a/toontown/cogdominium/CogdoBarrelRoomRewardPanel.py b/toontown/cogdominium/CogdoBarrelRoomRewardPanel.py old mode 100644 new mode 100755 diff --git a/toontown/cogdominium/CogdoBoardroomGameBase.py b/toontown/cogdominium/CogdoBoardroomGameBase.py old mode 100644 new mode 100755 diff --git a/toontown/cogdominium/CogdoBoardroomGameConsts.py b/toontown/cogdominium/CogdoBoardroomGameConsts.py old mode 100644 new mode 100755 diff --git a/toontown/cogdominium/CogdoBoardroomGameSpec.py b/toontown/cogdominium/CogdoBoardroomGameSpec.py old mode 100644 new mode 100755 diff --git a/toontown/cogdominium/CogdoCraneGame.py b/toontown/cogdominium/CogdoCraneGame.py old mode 100644 new mode 100755 diff --git a/toontown/cogdominium/CogdoCraneGameBase.py b/toontown/cogdominium/CogdoCraneGameBase.py old mode 100644 new mode 100755 diff --git a/toontown/cogdominium/CogdoCraneGameConsts.py b/toontown/cogdominium/CogdoCraneGameConsts.py old mode 100644 new mode 100755 diff --git a/toontown/cogdominium/CogdoCraneGameSpec.py b/toontown/cogdominium/CogdoCraneGameSpec.py old mode 100644 new mode 100755 diff --git a/toontown/cogdominium/CogdoElevatorMovie.py b/toontown/cogdominium/CogdoElevatorMovie.py old mode 100644 new mode 100755 diff --git a/toontown/cogdominium/CogdoEntityCreator.py b/toontown/cogdominium/CogdoEntityCreator.py old mode 100644 new mode 100755 diff --git a/toontown/cogdominium/CogdoEntityCreatorAI.py b/toontown/cogdominium/CogdoEntityCreatorAI.py old mode 100644 new mode 100755 diff --git a/toontown/cogdominium/CogdoEntityTypes.py b/toontown/cogdominium/CogdoEntityTypes.py old mode 100644 new mode 100755 diff --git a/toontown/cogdominium/CogdoExecutiveSuiteMovies.py b/toontown/cogdominium/CogdoExecutiveSuiteMovies.py old mode 100644 new mode 100755 diff --git a/toontown/cogdominium/CogdoFlyingCameraManager.py b/toontown/cogdominium/CogdoFlyingCameraManager.py old mode 100644 new mode 100755 diff --git a/toontown/cogdominium/CogdoFlyingCollisions.py b/toontown/cogdominium/CogdoFlyingCollisions.py old mode 100644 new mode 100755 diff --git a/toontown/cogdominium/CogdoFlyingGame.py b/toontown/cogdominium/CogdoFlyingGame.py old mode 100644 new mode 100755 diff --git a/toontown/cogdominium/CogdoFlyingGameGlobals.py b/toontown/cogdominium/CogdoFlyingGameGlobals.py old mode 100644 new mode 100755 diff --git a/toontown/cogdominium/CogdoFlyingGameGuis.py b/toontown/cogdominium/CogdoFlyingGameGuis.py old mode 100644 new mode 100755 diff --git a/toontown/cogdominium/CogdoFlyingGameMovies.py b/toontown/cogdominium/CogdoFlyingGameMovies.py old mode 100644 new mode 100755 diff --git a/toontown/cogdominium/CogdoFlyingGuiManager.py b/toontown/cogdominium/CogdoFlyingGuiManager.py old mode 100644 new mode 100755 diff --git a/toontown/cogdominium/CogdoFlyingInputManager.py b/toontown/cogdominium/CogdoFlyingInputManager.py old mode 100644 new mode 100755 diff --git a/toontown/cogdominium/CogdoFlyingLegalEagle.py b/toontown/cogdominium/CogdoFlyingLegalEagle.py old mode 100644 new mode 100755 diff --git a/toontown/cogdominium/CogdoFlyingLevel.py b/toontown/cogdominium/CogdoFlyingLevel.py old mode 100644 new mode 100755 diff --git a/toontown/cogdominium/CogdoFlyingLevelQuadrant.py b/toontown/cogdominium/CogdoFlyingLevelQuadrant.py old mode 100644 new mode 100755 diff --git a/toontown/cogdominium/CogdoFlyingLocalPlayer.py b/toontown/cogdominium/CogdoFlyingLocalPlayer.py old mode 100644 new mode 100755 diff --git a/toontown/cogdominium/CogdoFlyingObjects.py b/toontown/cogdominium/CogdoFlyingObjects.py old mode 100644 new mode 100755 diff --git a/toontown/cogdominium/CogdoFlyingObstacles.py b/toontown/cogdominium/CogdoFlyingObstacles.py old mode 100644 new mode 100755 diff --git a/toontown/cogdominium/CogdoFlyingPlayer.py b/toontown/cogdominium/CogdoFlyingPlayer.py old mode 100644 new mode 100755 diff --git a/toontown/cogdominium/CogdoFlyingShadowPlacer.py b/toontown/cogdominium/CogdoFlyingShadowPlacer.py old mode 100644 new mode 100755 diff --git a/toontown/cogdominium/CogdoFlyingUtil.py b/toontown/cogdominium/CogdoFlyingUtil.py old mode 100644 new mode 100755 diff --git a/toontown/cogdominium/CogdoGameAudioManager.py b/toontown/cogdominium/CogdoGameAudioManager.py old mode 100644 new mode 100755 diff --git a/toontown/cogdominium/CogdoGameConsts.py b/toontown/cogdominium/CogdoGameConsts.py old mode 100644 new mode 100755 diff --git a/toontown/cogdominium/CogdoGameExit.py b/toontown/cogdominium/CogdoGameExit.py old mode 100644 new mode 100755 diff --git a/toontown/cogdominium/CogdoGameGatherable.py b/toontown/cogdominium/CogdoGameGatherable.py old mode 100644 new mode 100755 diff --git a/toontown/cogdominium/CogdoGameMessageDisplay.py b/toontown/cogdominium/CogdoGameMessageDisplay.py old mode 100644 new mode 100755 diff --git a/toontown/cogdominium/CogdoGameRulesPanel.py b/toontown/cogdominium/CogdoGameRulesPanel.py old mode 100644 new mode 100755 diff --git a/toontown/cogdominium/CogdoInterior.py b/toontown/cogdominium/CogdoInterior.py old mode 100644 new mode 100755 diff --git a/toontown/cogdominium/CogdoLayout.py b/toontown/cogdominium/CogdoLayout.py old mode 100644 new mode 100755 diff --git a/toontown/cogdominium/CogdoLevelMgr.py b/toontown/cogdominium/CogdoLevelMgr.py old mode 100644 new mode 100755 diff --git a/toontown/cogdominium/CogdoLevelMgrAI.py b/toontown/cogdominium/CogdoLevelMgrAI.py old mode 100644 new mode 100755 diff --git a/toontown/cogdominium/CogdoMaze.py b/toontown/cogdominium/CogdoMaze.py old mode 100644 new mode 100755 diff --git a/toontown/cogdominium/CogdoMazeCameraManager.py b/toontown/cogdominium/CogdoMazeCameraManager.py old mode 100644 new mode 100755 diff --git a/toontown/cogdominium/CogdoMazeData.py b/toontown/cogdominium/CogdoMazeData.py old mode 100644 new mode 100755 diff --git a/toontown/cogdominium/CogdoMazeGame.py b/toontown/cogdominium/CogdoMazeGame.py old mode 100644 new mode 100755 diff --git a/toontown/cogdominium/CogdoMazeGameGlobals.py b/toontown/cogdominium/CogdoMazeGameGlobals.py old mode 100644 new mode 100755 diff --git a/toontown/cogdominium/CogdoMazeGameGuis.py b/toontown/cogdominium/CogdoMazeGameGuis.py old mode 100644 new mode 100755 diff --git a/toontown/cogdominium/CogdoMazeGameMovies.py b/toontown/cogdominium/CogdoMazeGameMovies.py old mode 100644 new mode 100755 diff --git a/toontown/cogdominium/CogdoMazeGameObjects.py b/toontown/cogdominium/CogdoMazeGameObjects.py old mode 100644 new mode 100755 diff --git a/toontown/cogdominium/CogdoMazeGuiManager.py b/toontown/cogdominium/CogdoMazeGuiManager.py old mode 100644 new mode 100755 diff --git a/toontown/cogdominium/CogdoMazeLocalPlayer.py b/toontown/cogdominium/CogdoMazeLocalPlayer.py old mode 100644 new mode 100755 diff --git a/toontown/cogdominium/CogdoMazePlayer.py b/toontown/cogdominium/CogdoMazePlayer.py old mode 100644 new mode 100755 diff --git a/toontown/cogdominium/CogdoMazeSuits.py b/toontown/cogdominium/CogdoMazeSuits.py old mode 100644 new mode 100755 diff --git a/toontown/cogdominium/CogdoMemoGui.py b/toontown/cogdominium/CogdoMemoGui.py old mode 100644 new mode 100755 diff --git a/toontown/cogdominium/CogdoUtil.py b/toontown/cogdominium/CogdoUtil.py old mode 100644 new mode 100755 diff --git a/toontown/cogdominium/DistCogdoBoardroomGame.py b/toontown/cogdominium/DistCogdoBoardroomGame.py old mode 100644 new mode 100755 diff --git a/toontown/cogdominium/DistCogdoBoardroomGameAI.py b/toontown/cogdominium/DistCogdoBoardroomGameAI.py old mode 100644 new mode 100755 diff --git a/toontown/cogdominium/DistCogdoCrane.py b/toontown/cogdominium/DistCogdoCrane.py old mode 100644 new mode 100755 diff --git a/toontown/cogdominium/DistCogdoCraneAI.py b/toontown/cogdominium/DistCogdoCraneAI.py old mode 100644 new mode 100755 diff --git a/toontown/cogdominium/DistCogdoCraneCog.py b/toontown/cogdominium/DistCogdoCraneCog.py old mode 100644 new mode 100755 diff --git a/toontown/cogdominium/DistCogdoCraneCogAI.py b/toontown/cogdominium/DistCogdoCraneCogAI.py old mode 100644 new mode 100755 diff --git a/toontown/cogdominium/DistCogdoCraneGame.py b/toontown/cogdominium/DistCogdoCraneGame.py old mode 100644 new mode 100755 diff --git a/toontown/cogdominium/DistCogdoCraneGameAI.py b/toontown/cogdominium/DistCogdoCraneGameAI.py old mode 100644 new mode 100755 diff --git a/toontown/cogdominium/DistCogdoCraneMoneyBag.py b/toontown/cogdominium/DistCogdoCraneMoneyBag.py old mode 100644 new mode 100755 diff --git a/toontown/cogdominium/DistCogdoCraneMoneyBagAI.py b/toontown/cogdominium/DistCogdoCraneMoneyBagAI.py old mode 100644 new mode 100755 diff --git a/toontown/cogdominium/DistCogdoCraneObject.py b/toontown/cogdominium/DistCogdoCraneObject.py old mode 100644 new mode 100755 diff --git a/toontown/cogdominium/DistCogdoFlyingGame.py b/toontown/cogdominium/DistCogdoFlyingGame.py old mode 100644 new mode 100755 diff --git a/toontown/cogdominium/DistCogdoFlyingGameAI.py b/toontown/cogdominium/DistCogdoFlyingGameAI.py old mode 100644 new mode 100755 diff --git a/toontown/cogdominium/DistCogdoGame.py b/toontown/cogdominium/DistCogdoGame.py old mode 100644 new mode 100755 diff --git a/toontown/cogdominium/DistCogdoGameAI.py b/toontown/cogdominium/DistCogdoGameAI.py old mode 100644 new mode 100755 diff --git a/toontown/cogdominium/DistCogdoGameBase.py b/toontown/cogdominium/DistCogdoGameBase.py old mode 100644 new mode 100755 diff --git a/toontown/cogdominium/DistCogdoLevelGame.py b/toontown/cogdominium/DistCogdoLevelGame.py old mode 100644 new mode 100755 diff --git a/toontown/cogdominium/DistCogdoLevelGameAI.py b/toontown/cogdominium/DistCogdoLevelGameAI.py old mode 100644 new mode 100755 diff --git a/toontown/cogdominium/DistCogdoMazeGame.py b/toontown/cogdominium/DistCogdoMazeGame.py old mode 100644 new mode 100755 diff --git a/toontown/cogdominium/DistCogdoMazeGameAI.py b/toontown/cogdominium/DistCogdoMazeGameAI.py old mode 100644 new mode 100755 diff --git a/toontown/cogdominium/DistCogdoMazeGameBase.py b/toontown/cogdominium/DistCogdoMazeGameBase.py old mode 100644 new mode 100755 diff --git a/toontown/cogdominium/DistributedCogdoBarrel.py b/toontown/cogdominium/DistributedCogdoBarrel.py old mode 100644 new mode 100755 diff --git a/toontown/cogdominium/DistributedCogdoBarrelAI.py b/toontown/cogdominium/DistributedCogdoBarrelAI.py old mode 100644 new mode 100755 diff --git a/toontown/cogdominium/DistributedCogdoBattleBldg.py b/toontown/cogdominium/DistributedCogdoBattleBldg.py old mode 100644 new mode 100755 diff --git a/toontown/cogdominium/DistributedCogdoBattleBldgAI.py b/toontown/cogdominium/DistributedCogdoBattleBldgAI.py old mode 100644 new mode 100755 diff --git a/toontown/cogdominium/DistributedCogdoElevatorExt.py b/toontown/cogdominium/DistributedCogdoElevatorExt.py old mode 100644 new mode 100755 diff --git a/toontown/cogdominium/DistributedCogdoElevatorExtAI.py b/toontown/cogdominium/DistributedCogdoElevatorExtAI.py old mode 100644 new mode 100755 diff --git a/toontown/cogdominium/DistributedCogdoElevatorInt.py b/toontown/cogdominium/DistributedCogdoElevatorInt.py old mode 100644 new mode 100755 diff --git a/toontown/cogdominium/DistributedCogdoElevatorIntAI.py b/toontown/cogdominium/DistributedCogdoElevatorIntAI.py old mode 100644 new mode 100755 diff --git a/toontown/cogdominium/DistributedCogdoInterior.py b/toontown/cogdominium/DistributedCogdoInterior.py old mode 100644 new mode 100755 diff --git a/toontown/cogdominium/DistributedCogdoInteriorAI.py b/toontown/cogdominium/DistributedCogdoInteriorAI.py old mode 100644 new mode 100755 diff --git a/toontown/cogdominium/SuitPlannerCogdoInteriorAI.py b/toontown/cogdominium/SuitPlannerCogdoInteriorAI.py old mode 100644 new mode 100755 diff --git a/toontown/cogdominium/__init__.py b/toontown/cogdominium/__init__.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/ActiveCell.py b/toontown/coghq/ActiveCell.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/ActiveCellAI.py b/toontown/coghq/ActiveCellAI.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/BanquetTableBase.py b/toontown/coghq/BanquetTableBase.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/BarrelBase.py b/toontown/coghq/BarrelBase.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/BattleBlocker.py b/toontown/coghq/BattleBlocker.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/BattleBlockerAI.py b/toontown/coghq/BattleBlockerAI.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/BattleExperienceAggregatorAI.py b/toontown/coghq/BattleExperienceAggregatorAI.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/BossbotCogHQLoader.py b/toontown/coghq/BossbotCogHQLoader.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/BossbotCountryClubEntrance_Action00.py b/toontown/coghq/BossbotCountryClubEntrance_Action00.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/BossbotCountryClubFairwayRoom_Battle00.py b/toontown/coghq/BossbotCountryClubFairwayRoom_Battle00.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/BossbotCountryClubFairwayRoom_Battle00_Cogs.py b/toontown/coghq/BossbotCountryClubFairwayRoom_Battle00_Cogs.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/BossbotCountryClubGreenRoom_Action00.py b/toontown/coghq/BossbotCountryClubGreenRoom_Action00.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/BossbotCountryClubGreenRoom_Action01.py b/toontown/coghq/BossbotCountryClubGreenRoom_Action01.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/BossbotCountryClubGreenRoom_Action02.py b/toontown/coghq/BossbotCountryClubGreenRoom_Action02.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/BossbotCountryClubKartRoom_Battle00.py b/toontown/coghq/BossbotCountryClubKartRoom_Battle00.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/BossbotCountryClubKartRoom_Battle00_Cogs.py b/toontown/coghq/BossbotCountryClubKartRoom_Battle00_Cogs.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/BossbotCountryClubMazeRoom_Battle00.py b/toontown/coghq/BossbotCountryClubMazeRoom_Battle00.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/BossbotCountryClubMazeRoom_Battle00_Cogs.py b/toontown/coghq/BossbotCountryClubMazeRoom_Battle00_Cogs.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/BossbotCountryClubMazeRoom_Battle01.py b/toontown/coghq/BossbotCountryClubMazeRoom_Battle01.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/BossbotCountryClubMazeRoom_Battle01_Cogs.py b/toontown/coghq/BossbotCountryClubMazeRoom_Battle01_Cogs.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/BossbotCountryClubMazeRoom_Battle02.py b/toontown/coghq/BossbotCountryClubMazeRoom_Battle02.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/BossbotCountryClubMazeRoom_Battle02_Cogs.py b/toontown/coghq/BossbotCountryClubMazeRoom_Battle02_Cogs.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/BossbotCountryClubMazeRoom_Battle03_Cogs.py b/toontown/coghq/BossbotCountryClubMazeRoom_Battle03_Cogs.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/BossbotCountryClubPresidentRoom_Battle00.py b/toontown/coghq/BossbotCountryClubPresidentRoom_Battle00.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/BossbotCountryClubPresidentRoom_Battle00_Cogs.py b/toontown/coghq/BossbotCountryClubPresidentRoom_Battle00_Cogs.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/BossbotCountryClubTeeOffRoom_Action00.py b/toontown/coghq/BossbotCountryClubTeeOffRoom_Action00.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/BossbotCountryClubTeeOffRoom_Action01.py b/toontown/coghq/BossbotCountryClubTeeOffRoom_Action01.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/BossbotCountryClubTeeOffRoom_Action02.py b/toontown/coghq/BossbotCountryClubTeeOffRoom_Action02.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/BossbotHQBossBattle.py b/toontown/coghq/BossbotHQBossBattle.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/BossbotHQExterior.py b/toontown/coghq/BossbotHQExterior.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/BossbotOfficeExterior.py b/toontown/coghq/BossbotOfficeExterior.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/CashbotCogHQLoader.py b/toontown/coghq/CashbotCogHQLoader.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/CashbotHQBossBattle.py b/toontown/coghq/CashbotHQBossBattle.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/CashbotHQExterior.py b/toontown/coghq/CashbotHQExterior.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/CashbotMintBoilerRoom_Action00.py b/toontown/coghq/CashbotMintBoilerRoom_Action00.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/CashbotMintBoilerRoom_Battle00.py b/toontown/coghq/CashbotMintBoilerRoom_Battle00.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/CashbotMintBoilerRoom_Battle00_Cogs.py b/toontown/coghq/CashbotMintBoilerRoom_Battle00_Cogs.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/CashbotMintBoilerRoom_Battle01.py b/toontown/coghq/CashbotMintBoilerRoom_Battle01.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/CashbotMintBoilerRoom_Battle01_Cogs.py b/toontown/coghq/CashbotMintBoilerRoom_Battle01_Cogs.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/CashbotMintControlRoom_Battle00.py b/toontown/coghq/CashbotMintControlRoom_Battle00.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/CashbotMintControlRoom_Battle00_Cogs.py b/toontown/coghq/CashbotMintControlRoom_Battle00_Cogs.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/CashbotMintDuctRoom_Action00.py b/toontown/coghq/CashbotMintDuctRoom_Action00.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/CashbotMintDuctRoom_Battle00.py b/toontown/coghq/CashbotMintDuctRoom_Battle00.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/CashbotMintDuctRoom_Battle00_Cogs.py b/toontown/coghq/CashbotMintDuctRoom_Battle00_Cogs.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/CashbotMintDuctRoom_Battle01.py b/toontown/coghq/CashbotMintDuctRoom_Battle01.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/CashbotMintDuctRoom_Battle01_Cogs.py b/toontown/coghq/CashbotMintDuctRoom_Battle01_Cogs.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/CashbotMintEntrance_Action00.py b/toontown/coghq/CashbotMintEntrance_Action00.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/CashbotMintGearRoom_Action00.py b/toontown/coghq/CashbotMintGearRoom_Action00.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/CashbotMintGearRoom_Battle00.py b/toontown/coghq/CashbotMintGearRoom_Battle00.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/CashbotMintGearRoom_Battle00_Cogs.py b/toontown/coghq/CashbotMintGearRoom_Battle00_Cogs.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/CashbotMintGearRoom_Battle01.py b/toontown/coghq/CashbotMintGearRoom_Battle01.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/CashbotMintGearRoom_Battle01_Cogs.py b/toontown/coghq/CashbotMintGearRoom_Battle01_Cogs.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/CashbotMintLavaRoomFoyer_Action00.py b/toontown/coghq/CashbotMintLavaRoomFoyer_Action00.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/CashbotMintLavaRoomFoyer_Action01.py b/toontown/coghq/CashbotMintLavaRoomFoyer_Action01.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/CashbotMintLavaRoomFoyer_Battle00.py b/toontown/coghq/CashbotMintLavaRoomFoyer_Battle00.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/CashbotMintLavaRoomFoyer_Battle00_Cogs.py b/toontown/coghq/CashbotMintLavaRoomFoyer_Battle00_Cogs.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/CashbotMintLavaRoomFoyer_Battle01.py b/toontown/coghq/CashbotMintLavaRoomFoyer_Battle01.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/CashbotMintLavaRoomFoyer_Battle01_Cogs.py b/toontown/coghq/CashbotMintLavaRoomFoyer_Battle01_Cogs.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/CashbotMintLavaRoom_Action00.py b/toontown/coghq/CashbotMintLavaRoom_Action00.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/CashbotMintLobby_Action00.py b/toontown/coghq/CashbotMintLobby_Action00.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/CashbotMintLobby_Battle00.py b/toontown/coghq/CashbotMintLobby_Battle00.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/CashbotMintLobby_Battle00_Cogs.py b/toontown/coghq/CashbotMintLobby_Battle00_Cogs.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/CashbotMintLobby_Battle01.py b/toontown/coghq/CashbotMintLobby_Battle01.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/CashbotMintLobby_Battle01_Cogs.py b/toontown/coghq/CashbotMintLobby_Battle01_Cogs.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/CashbotMintOilRoom_Battle00.py b/toontown/coghq/CashbotMintOilRoom_Battle00.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/CashbotMintOilRoom_Battle00_Cogs.py b/toontown/coghq/CashbotMintOilRoom_Battle00_Cogs.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/CashbotMintPaintMixerReward_Battle00.py b/toontown/coghq/CashbotMintPaintMixerReward_Battle00.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/CashbotMintPaintMixerReward_Battle00_Cogs.py b/toontown/coghq/CashbotMintPaintMixerReward_Battle00_Cogs.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/CashbotMintPaintMixer_Action00.py b/toontown/coghq/CashbotMintPaintMixer_Action00.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/CashbotMintPipeRoom_Action00.py b/toontown/coghq/CashbotMintPipeRoom_Action00.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/CashbotMintPipeRoom_Battle00.py b/toontown/coghq/CashbotMintPipeRoom_Battle00.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/CashbotMintPipeRoom_Battle00_Cogs.py b/toontown/coghq/CashbotMintPipeRoom_Battle00_Cogs.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/CashbotMintPipeRoom_Battle01.py b/toontown/coghq/CashbotMintPipeRoom_Battle01.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/CashbotMintPipeRoom_Battle01_Cogs.py b/toontown/coghq/CashbotMintPipeRoom_Battle01_Cogs.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/CashbotMintStomperAlley_Action00.py b/toontown/coghq/CashbotMintStomperAlley_Action00.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/CogDisguiseGlobals.py b/toontown/coghq/CogDisguiseGlobals.py old mode 100644 new mode 100755 index 30c7cef6..27a36076 --- a/toontown/coghq/CogDisguiseGlobals.py +++ b/toontown/coghq/CogDisguiseGlobals.py @@ -3,8 +3,6 @@ import types from toontown.toonbase import TTLocalizer from direct.showbase import PythonUtil from otp.otpbase import OTPGlobals -from toontown.battle import SuitBattleGlobals - PartsPerSuit = (17, 14, 12, @@ -14,8 +12,320 @@ PartsPerSuitBitmasks = (131071, 56447, 56411) AllBits = 131071 -MinPartLoss = 1 -MaxPartLoss = 2 +MinPartLoss = 2 +MaxPartLoss = 4 +MeritsPerLevel = ((100, + 130, + 160, + 190, + 800), + (160, + 210, + 260, + 310, + 1300), + (260, + 340, + 420, + 500, + 2100), + (420, + 550, + 680, + 810, + 3400), + (680, + 890, + 1100, + 1310, + 5500), + (1100, + 1440, + 1780, + 2120, + 8900), + (1780, + 2330, + 2880, + 3430, + 14400), + (2880, + 3770, + 4660, + 5500, + 23300, + 2880, + 23300, + 2880, + 3770, + 4660, + 5500, + 23300, + 2880, + 3770, + 4660, + 5500, + 6440, + 7330, + 8220, + 9110, + 10000, + 23300, + 2880, + 3770, + 4660, + 5500, + 6440, + 7330, + 8220, + 9110, + 10000, + 23300, + 2880, + 3770, + 4660, + 5500, + 6440, + 7330, + 8220, + 9110, + 10000, + 23300, + 0), + (60, + 80, + 100, + 120, + 500), + (100, + 130, + 160, + 190, + 800), + (160, + 210, + 260, + 310, + 1300), + (260, + 340, + 420, + 500, + 2100), + (420, + 550, + 680, + 810, + 3400), + (680, + 890, + 1100, + 1310, + 5500), + (1100, + 1440, + 1780, + 2120, + 8900), + (1780, + 2330, + 2880, + 3430, + 14400, + 1780, + 14400, + 1780, + 2330, + 2880, + 3430, + 14400, + 1780, + 2330, + 2880, + 3430, + 3980, + 4530, + 5080, + 5630, + 6180, + 14400, + 1780, + 2330, + 2880, + 3430, + 3980, + 4530, + 5080, + 5630, + 6180, + 14400, + 1780, + 2330, + 2880, + 3430, + 3980, + 4530, + 5080, + 5630, + 6180, + 14400, + 0), + (40, + 50, + 60, + 70, + 300), + (60, + 80, + 100, + 120, + 500), + (100, + 130, + 160, + 190, + 800), + (160, + 210, + 260, + 310, + 1300), + (260, + 340, + 420, + 500, + 2100), + (420, + 550, + 680, + 810, + 3400), + (680, + 890, + 1100, + 1310, + 5500), + (1100, + 1440, + 1780, + 2120, + 8900, + 1100, + 8900, + 1100, + 1440, + 1780, + 2120, + 8900, + 1100, + 1440, + 1780, + 2120, + 2460, + 2800, + 3140, + 3480, + 3820, + 8900, + 1100, + 1440, + 1780, + 2120, + 2460, + 2800, + 3140, + 3480, + 3820, + 8900, + 1100, + 1440, + 1780, + 2120, + 2460, + 2800, + 3140, + 3480, + 3820, + 8900, + 0), + (20, + 30, + 40, + 50, + 200), + (40, + 50, + 60, + 70, + 300), + (60, + 80, + 100, + 120, + 500), + (100, + 130, + 160, + 190, + 800), + (160, + 210, + 260, + 310, + 1300), + (260, + 340, + 420, + 500, + 2100), + (420, + 550, + 680, + 810, + 3400), + (680, + 890, + 1100, + 1310, + 5500, + 680, + 5500, + 680, + 890, + 1100, + 1310, + 5500, + 680, + 890, + 1100, + 1310, + 1520, + 1730, + 1940, + 2150, + 2360, + 5500, + 680, + 890, + 1100, + 1310, + 1520, + 1730, + 1940, + 2150, + 2360, + 5500, + 680, + 890, + 1100, + 1310, + 1520, + 1730, + 1940, + 2150, + 2360, + 5500, + 0)) leftLegUpper = 1 leftLegLower = 2 leftLegFoot = 4 @@ -121,22 +431,6 @@ PartsQueryNames = ({1: PartNameStrings[0], 65536: PartNameStrings[15]}) suitTypes = PythonUtil.Enum(('NoSuit', 'NoMerits', 'FullSuit')) -def makeMeritHierarchy(baseMerits): - meritHierarchy = [] - for _ in xrange(SuitDNA.suitsPerDept): - meritTier = [] - for _ in xrange(SuitDNA.levelsPerSuit): - baseMerits += (baseMerits*25) / 100 - meritTier.append(baseMerits) - meritHierarchy.append(tuple(meritTier)) - baseMerits /= 2 - return meritHierarchy - -MeritsPerLevel = makeMeritHierarchy(100) # Bossbot -MeritsPerLevel += makeMeritHierarchy(75) # Lawbot -MeritsPerLevel += makeMeritHierarchy(50) # Cashbot -MeritsPerLevel += makeMeritHierarchy(25) # Sellbot - def getNextPart(parts, partIndex, dept): dept = dept2deptIndex(dept) needMask = PartsPerSuitBitmasks[dept] & PartsQueryMasks[partIndex] @@ -146,6 +440,7 @@ def getNextPart(parts, partIndex, dept): nextPart = nextPart + 1 >> 1 return nextPart + def getPartName(partArray): index = 0 for part in partArray: @@ -153,14 +448,27 @@ def getPartName(partArray): return PartsQueryNames[index][part] index += 1 + def isSuitComplete(parts, dept): dept = dept2deptIndex(dept) - for p in xrange(len(PartsQueryMasks)): + for p in range(len(PartsQueryMasks)): if getNextPart(parts, p, dept): return 0 return 1 + +def isPaidSuitComplete(av, parts, dept): + isPaid = 0 + base = getBase() + if av and av.getGameAccess() == OTPGlobals.AccessFull: + isPaid = 1 + if isPaid: + if isSuitComplete(parts, dept): + return 1 + return 0 + + def getTotalMerits(toon, index): from toontown.battle import SuitBattleGlobals cogIndex = toon.cogTypes[index] + SuitDNA.suitsPerDept * index @@ -170,13 +478,15 @@ def getTotalMerits(toon, index): cogLevel = max(min(cogLevel, len(MeritsPerLevel[cogIndex]) - 1), 0) return MeritsPerLevel[cogIndex][cogLevel] + def getTotalParts(bitString, shiftWidth = 32): sum = 0 - for shift in xrange(0, shiftWidth): + for shift in range(0, shiftWidth): sum = sum + (bitString >> shift & 1) return sum + def asBitstring(number): array = [] shift = 0 @@ -190,19 +500,21 @@ def asBitstring(number): shift += 1 str = '' - for i in xrange(0, len(array)): + for i in range(0, len(array)): str = str + array[i] return str + def asNumber(bitstring): num = 0 - for i in xrange(0, len(bitstring)): + for i in range(0, len(bitstring)): if bitstring[i] == '1': num += pow(2, len(bitstring) - 1 - i) return num + def dept2deptIndex(dept): if type(dept) == types.StringType: dept = SuitDNA.suitDepts.index(dept) diff --git a/toontown/coghq/CogHQBossBattle.py b/toontown/coghq/CogHQBossBattle.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/CogHQExterior.py b/toontown/coghq/CogHQExterior.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/CogHQLoader.py b/toontown/coghq/CogHQLoader.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/CogHQLobby.py b/toontown/coghq/CogHQLobby.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/ConveyorBelt.py b/toontown/coghq/ConveyorBelt.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/CountryClubInterior.py b/toontown/coghq/CountryClubInterior.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/CountryClubLayout.py b/toontown/coghq/CountryClubLayout.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/CountryClubManagerAI.py b/toontown/coghq/CountryClubManagerAI.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/CountryClubRoom.py b/toontown/coghq/CountryClubRoom.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/CountryClubRoomBase.py b/toontown/coghq/CountryClubRoomBase.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/CountryClubRoomSpecs.py b/toontown/coghq/CountryClubRoomSpecs.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/CrateGlobals.py b/toontown/coghq/CrateGlobals.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/CrusherCell.py b/toontown/coghq/CrusherCell.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/CrusherCellAI.py b/toontown/coghq/CrusherCellAI.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/DinerStatusIndicator.py b/toontown/coghq/DinerStatusIndicator.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/DirectionalCell.py b/toontown/coghq/DirectionalCell.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/DirectionalCellAI.py b/toontown/coghq/DirectionalCellAI.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/DistributedBanquetTable.py b/toontown/coghq/DistributedBanquetTable.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/DistributedBanquetTableAI.py b/toontown/coghq/DistributedBanquetTableAI.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/DistributedBarrelBase.py b/toontown/coghq/DistributedBarrelBase.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/DistributedBarrelBaseAI.py b/toontown/coghq/DistributedBarrelBaseAI.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/DistributedBattleFactory.py b/toontown/coghq/DistributedBattleFactory.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/DistributedBattleFactoryAI.py b/toontown/coghq/DistributedBattleFactoryAI.py old mode 100644 new mode 100755 index 5a0c3395..75a865f0 --- a/toontown/coghq/DistributedBattleFactoryAI.py +++ b/toontown/coghq/DistributedBattleFactoryAI.py @@ -34,10 +34,9 @@ class DistributedBattleFactoryAI(DistributedLevelBattleAI.DistributedLevelBattle else: self.notify.debug('toon %d not helpful, skipping merits' % toon.doId) if self.bossBattle: - self.toonParts[toon.doId] = self.air.cogSuitMgr.recoverPart( - toon, 'fullSuit', self.suitTrack, - self.getTaskZoneId(), toons) - self.notify.debug('toonParts = %s' % self.toonParts) + self.toonParts[toon.doId] = self.air.cogSuitMgr.recoverPart(toon, self.level.factoryType, self.suitTrack, self.getTaskZoneId(), toons) + self.notify.debug('toonParts = %s' % self.toonParts) + def enterFactoryReward(self): self.joinableFsm.request('Unjoinable') diff --git a/toontown/coghq/DistributedBeanBarrel.py b/toontown/coghq/DistributedBeanBarrel.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/DistributedBeanBarrelAI.py b/toontown/coghq/DistributedBeanBarrelAI.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/DistributedButton.py b/toontown/coghq/DistributedButton.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/DistributedButtonAI.py b/toontown/coghq/DistributedButtonAI.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/DistributedCashbotBossCrane.py b/toontown/coghq/DistributedCashbotBossCrane.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/DistributedCashbotBossCraneAI.py b/toontown/coghq/DistributedCashbotBossCraneAI.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/DistributedCashbotBossObject.py b/toontown/coghq/DistributedCashbotBossObject.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/DistributedCashbotBossObjectAI.py b/toontown/coghq/DistributedCashbotBossObjectAI.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/DistributedCashbotBossSafe.py b/toontown/coghq/DistributedCashbotBossSafe.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/DistributedCashbotBossSafeAI.py b/toontown/coghq/DistributedCashbotBossSafeAI.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/DistributedCashbotBossTreasure.py b/toontown/coghq/DistributedCashbotBossTreasure.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/DistributedCashbotBossTreasureAI.py b/toontown/coghq/DistributedCashbotBossTreasureAI.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/DistributedCogHQDoor.py b/toontown/coghq/DistributedCogHQDoor.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/DistributedCogHQDoorAI.py b/toontown/coghq/DistributedCogHQDoorAI.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/DistributedCogKart.py b/toontown/coghq/DistributedCogKart.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/DistributedCogKartAI.py b/toontown/coghq/DistributedCogKartAI.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/DistributedCountryClub.py b/toontown/coghq/DistributedCountryClub.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/DistributedCountryClubAI.py b/toontown/coghq/DistributedCountryClubAI.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/DistributedCountryClubBattle.py b/toontown/coghq/DistributedCountryClubBattle.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/DistributedCountryClubBattleAI.py b/toontown/coghq/DistributedCountryClubBattleAI.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/DistributedCountryClubRoom.py b/toontown/coghq/DistributedCountryClubRoom.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/DistributedCountryClubRoomAI.py b/toontown/coghq/DistributedCountryClubRoomAI.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/DistributedCrate.py b/toontown/coghq/DistributedCrate.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/DistributedCrateAI.py b/toontown/coghq/DistributedCrateAI.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/DistributedCrushableEntity.py b/toontown/coghq/DistributedCrushableEntity.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/DistributedCrushableEntityAI.py b/toontown/coghq/DistributedCrushableEntityAI.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/DistributedCrusherEntity.py b/toontown/coghq/DistributedCrusherEntity.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/DistributedCrusherEntityAI.py b/toontown/coghq/DistributedCrusherEntityAI.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/DistributedDoorEntity.py b/toontown/coghq/DistributedDoorEntity.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/DistributedDoorEntityAI.py b/toontown/coghq/DistributedDoorEntityAI.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/DistributedDoorEntityBase.py b/toontown/coghq/DistributedDoorEntityBase.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/DistributedElevatorMarker.py b/toontown/coghq/DistributedElevatorMarker.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/DistributedElevatorMarkerAI.py b/toontown/coghq/DistributedElevatorMarkerAI.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/DistributedFactory.py b/toontown/coghq/DistributedFactory.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/DistributedFactoryAI.py b/toontown/coghq/DistributedFactoryAI.py old mode 100644 new mode 100755 index 26350389..2b1c4f95 --- a/toontown/coghq/DistributedFactoryAI.py +++ b/toontown/coghq/DistributedFactoryAI.py @@ -1,16 +1,10 @@ -from otp.level import DistributedLevelAI from direct.directnotify import DirectNotifyGlobal -import cPickle -import LevelSuitPlannerAI -import FactoryBase from direct.task import Task -import FactoryEntityCreatorAI -import FactorySpecs -from otp.level import LevelSpec -import CogDisguiseGlobals +from otp.level import DistributedLevelAI, LevelSpec from toontown.suit import DistributedFactorySuitAI from toontown.toonbase import ToontownGlobals, ToontownBattleGlobals from toontown.coghq import DistributedBattleFactoryAI +import FactoryBase, FactoryEntityCreatorAI, FactorySpecs, LevelSuitPlannerAI class DistributedFactoryAI(DistributedLevelAI.DistributedLevelAI, FactoryBase.FactoryBase): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedFactoryAI') diff --git a/toontown/coghq/DistributedFactoryElevatorExt.py b/toontown/coghq/DistributedFactoryElevatorExt.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/DistributedFactoryElevatorExtAI.py b/toontown/coghq/DistributedFactoryElevatorExtAI.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/DistributedFoodBelt.py b/toontown/coghq/DistributedFoodBelt.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/DistributedFoodBeltAI.py b/toontown/coghq/DistributedFoodBeltAI.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/DistributedGagBarrel.py b/toontown/coghq/DistributedGagBarrel.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/DistributedGagBarrelAI.py b/toontown/coghq/DistributedGagBarrelAI.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/DistributedGolfGreenGame.py b/toontown/coghq/DistributedGolfGreenGame.py old mode 100644 new mode 100755 index e16fb483..9e9dbfbf --- a/toontown/coghq/DistributedGolfGreenGame.py +++ b/toontown/coghq/DistributedGolfGreenGame.py @@ -4,7 +4,6 @@ from direct.particles import ParticleEffect from StomperGlobals import * from direct.distributed import ClockDelta from direct.showbase.PythonUtil import lerp -import math from otp.level import DistributedEntity from direct.directnotify import DirectNotifyGlobal from pandac.PandaModules import NodePath @@ -17,19 +16,14 @@ from toontown.toonbase import ToontownBattleGlobals from direct.distributed.ClockDelta import * from toontown.golf import BuildGeometry from direct.gui.DirectGui import * -import random from direct.showbase import RandomNumGen -import GameSprite3D -from math import pi -import math -import random -import cPickle from toontown.distributed import DelayDelete from toontown.toon import ToonHeadFrame from toontown.battle import BattleParticles from toontown.battle import MovieUtil -import time from toontown.toonbase import ToontownTimer +from math import pi +import GameSprite3D, math, random class DistributedGolfGreenGame(BattleBlocker.BattleBlocker): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedGolfGreenGame') diff --git a/toontown/coghq/DistributedGolfGreenGameAI.py b/toontown/coghq/DistributedGolfGreenGameAI.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/DistributedGolfSpot.py b/toontown/coghq/DistributedGolfSpot.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/DistributedGolfSpotAI.py b/toontown/coghq/DistributedGolfSpotAI.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/DistributedGrid.py b/toontown/coghq/DistributedGrid.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/DistributedGridAI.py b/toontown/coghq/DistributedGridAI.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/DistributedGridGoonAI.py b/toontown/coghq/DistributedGridGoonAI.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/DistributedHealBarrel.py b/toontown/coghq/DistributedHealBarrel.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/DistributedHealBarrelAI.py b/toontown/coghq/DistributedHealBarrelAI.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/DistributedLaserField.py b/toontown/coghq/DistributedLaserField.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/DistributedLaserFieldAI.py b/toontown/coghq/DistributedLaserFieldAI.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/DistributedLawOffice.py b/toontown/coghq/DistributedLawOffice.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/DistributedLawOfficeAI.py b/toontown/coghq/DistributedLawOfficeAI.py old mode 100644 new mode 100755 index c7d01617..1e54fb41 --- a/toontown/coghq/DistributedLawOfficeAI.py +++ b/toontown/coghq/DistributedLawOfficeAI.py @@ -1,10 +1,3 @@ -import cPickle - -import CogDisguiseGlobals -import FactoryEntityCreatorAI -import FactorySpecs -import LawOfficeBase -import LevelSuitPlannerAI from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectAI import * from direct.showbase import PythonUtil @@ -13,13 +6,10 @@ from otp.level import DistributedLevelAI from otp.level import LevelSpec from toontown.ai.ToonBarrier import * from toontown.building import DistributedElevatorFloorAI -from toontown.coghq import DistributedBattleFactoryAI -from toontown.coghq import DistributedLawOfficeElevatorIntAI -from toontown.coghq import DistributedLawOfficeFloorAI -from toontown.coghq import LawOfficeLayout +from toontown.coghq import DistributedBattleFactoryAI, DistributedLawOfficeElevatorIntAI, DistributedLawOfficeFloorAI, LawOfficeLayout from toontown.suit import DistributedFactorySuitAI from toontown.toonbase import ToontownGlobals, ToontownBattleGlobals - +import FactoryEntityCreatorAI, FactorySpecs, LawOfficeBase, LevelSuitPlannerAI class DistributedLawOfficeAI(DistributedObjectAI, LawOfficeBase.LawOfficeBase): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedLawOfficeAI') diff --git a/toontown/coghq/DistributedLawOfficeElevatorExt.py b/toontown/coghq/DistributedLawOfficeElevatorExt.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/DistributedLawOfficeElevatorExtAI.py b/toontown/coghq/DistributedLawOfficeElevatorExtAI.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/DistributedLawOfficeElevatorInt.py b/toontown/coghq/DistributedLawOfficeElevatorInt.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/DistributedLawOfficeElevatorIntAI.py b/toontown/coghq/DistributedLawOfficeElevatorIntAI.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/DistributedLawOfficeFloor.py b/toontown/coghq/DistributedLawOfficeFloor.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/DistributedLawOfficeFloorAI.py b/toontown/coghq/DistributedLawOfficeFloorAI.py old mode 100644 new mode 100755 index 0a5fb334..6385d28b --- a/toontown/coghq/DistributedLawOfficeFloorAI.py +++ b/toontown/coghq/DistributedLawOfficeFloorAI.py @@ -1,22 +1,12 @@ -import cPickle - -import CogDisguiseGlobals -import FactoryEntityCreatorAI -import FactorySpecs -import LawOfficeBase -import LevelSuitPlannerAI from direct.directnotify import DirectNotifyGlobal from direct.distributed import DistributedObjectAI from direct.task import Task -from otp.level import DistributedLevelAI -from otp.level import LevelSpec +from otp.level import DistributedLevelAI, LevelSpec from toontown.ai.ToonBarrier import * -from toontown.coghq import DistributedBattleFactoryAI -from toontown.coghq import DistributedLawOfficeElevatorIntAI -from toontown.coghq import LawOfficeLayout +from toontown.coghq import DistributedBattleFactoryAI, DistributedLawOfficeElevatorIntAI, LawOfficeLayout from toontown.suit import DistributedFactorySuitAI from toontown.toonbase import ToontownGlobals, ToontownBattleGlobals - +import FactoryEntityCreatorAI, FactorySpecs, LawOfficeBase, LevelSuitPlannerAI class DistributedLawOfficeFloorAI(DistributedLevelAI.DistributedLevelAI, LawOfficeBase.LawOfficeBase): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedLawOfficeAI') @@ -134,4 +124,4 @@ class DistributedLawOfficeFloorAI(DistributedLevelAI.DistributedLevelAI, LawOffi suitIds = [] for suit in self.reserveSuits: suitIds.append(suit[0].doId) - return suitIds + return suitIds \ No newline at end of file diff --git a/toontown/coghq/DistributedLawbotBossGavel.py b/toontown/coghq/DistributedLawbotBossGavel.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/DistributedLawbotBossGavelAI.py b/toontown/coghq/DistributedLawbotBossGavelAI.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/DistributedLawbotCannon.py b/toontown/coghq/DistributedLawbotCannon.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/DistributedLawbotCannonAI.py b/toontown/coghq/DistributedLawbotCannonAI.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/DistributedLawbotChair.py b/toontown/coghq/DistributedLawbotChair.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/DistributedLawbotChairAI.py b/toontown/coghq/DistributedLawbotChairAI.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/DistributedLevelBattle.py b/toontown/coghq/DistributedLevelBattle.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/DistributedLevelBattleAI.py b/toontown/coghq/DistributedLevelBattleAI.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/DistributedLift.py b/toontown/coghq/DistributedLift.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/DistributedLiftAI.py b/toontown/coghq/DistributedLiftAI.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/DistributedMaze.py b/toontown/coghq/DistributedMaze.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/DistributedMazeAI.py b/toontown/coghq/DistributedMazeAI.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/DistributedMegaCorp.py b/toontown/coghq/DistributedMegaCorp.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/DistributedMegaCorpAI.py b/toontown/coghq/DistributedMegaCorpAI.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/DistributedMint.py b/toontown/coghq/DistributedMint.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/DistributedMintAI.py b/toontown/coghq/DistributedMintAI.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/DistributedMintBattle.py b/toontown/coghq/DistributedMintBattle.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/DistributedMintBattleAI.py b/toontown/coghq/DistributedMintBattleAI.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/DistributedMintElevatorExt.py b/toontown/coghq/DistributedMintElevatorExt.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/DistributedMintElevatorExtAI.py b/toontown/coghq/DistributedMintElevatorExtAI.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/DistributedMintRoom.py b/toontown/coghq/DistributedMintRoom.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/DistributedMintRoomAI.py b/toontown/coghq/DistributedMintRoomAI.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/DistributedMoleField.py b/toontown/coghq/DistributedMoleField.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/DistributedMoleFieldAI.py b/toontown/coghq/DistributedMoleFieldAI.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/DistributedMover.py b/toontown/coghq/DistributedMover.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/DistributedMoverAI.py b/toontown/coghq/DistributedMoverAI.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/DistributedSecurityCamera.py b/toontown/coghq/DistributedSecurityCamera.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/DistributedSecurityCameraAI.py b/toontown/coghq/DistributedSecurityCameraAI.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/DistributedSellbotHQDoor.py b/toontown/coghq/DistributedSellbotHQDoor.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/DistributedSellbotHQDoorAI.py b/toontown/coghq/DistributedSellbotHQDoorAI.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/DistributedSinkingPlatform.py b/toontown/coghq/DistributedSinkingPlatform.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/DistributedSinkingPlatformAI.py b/toontown/coghq/DistributedSinkingPlatformAI.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/DistributedStage.py b/toontown/coghq/DistributedStage.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/DistributedStageAI.py b/toontown/coghq/DistributedStageAI.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/DistributedStageBattle.py b/toontown/coghq/DistributedStageBattle.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/DistributedStageBattleAI.py b/toontown/coghq/DistributedStageBattleAI.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/DistributedStageRoom.py b/toontown/coghq/DistributedStageRoom.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/DistributedStageRoomAI.py b/toontown/coghq/DistributedStageRoomAI.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/DistributedStomper.py b/toontown/coghq/DistributedStomper.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/DistributedStomperAI.py b/toontown/coghq/DistributedStomperAI.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/DistributedStomperPair.py b/toontown/coghq/DistributedStomperPair.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/DistributedStomperPairAI.py b/toontown/coghq/DistributedStomperPairAI.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/DistributedSwitch.py b/toontown/coghq/DistributedSwitch.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/DistributedSwitchAI.py b/toontown/coghq/DistributedSwitchAI.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/DistributedSwitchBase.py b/toontown/coghq/DistributedSwitchBase.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/DistributedTrigger.py b/toontown/coghq/DistributedTrigger.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/DistributedTriggerAI.py b/toontown/coghq/DistributedTriggerAI.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/FactoryBase.py b/toontown/coghq/FactoryBase.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/FactoryCameraViews.py b/toontown/coghq/FactoryCameraViews.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/FactoryEntityCreator.py b/toontown/coghq/FactoryEntityCreator.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/FactoryEntityCreatorAI.py b/toontown/coghq/FactoryEntityCreatorAI.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/FactoryExterior.py b/toontown/coghq/FactoryExterior.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/FactoryInterior.py b/toontown/coghq/FactoryInterior.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/FactoryLevelMgr.py b/toontown/coghq/FactoryLevelMgr.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/FactoryLevelMgrAI.py b/toontown/coghq/FactoryLevelMgrAI.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/FactoryManagerAI.py b/toontown/coghq/FactoryManagerAI.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/FactorySpecs.py b/toontown/coghq/FactorySpecs.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/FactoryUtil.py b/toontown/coghq/FactoryUtil.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/FoodBeltBase.py b/toontown/coghq/FoodBeltBase.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/GameSprite3D.py b/toontown/coghq/GameSprite3D.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/GearEntity.py b/toontown/coghq/GearEntity.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/GolfGreenGameGlobals.py b/toontown/coghq/GolfGreenGameGlobals.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/GoonClipPlane.py b/toontown/coghq/GoonClipPlane.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/LaserGameAvoid.py b/toontown/coghq/LaserGameAvoid.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/LaserGameBase.py b/toontown/coghq/LaserGameBase.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/LaserGameDrag.py b/toontown/coghq/LaserGameDrag.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/LaserGameMineSweeper.py b/toontown/coghq/LaserGameMineSweeper.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/LaserGameRoll.py b/toontown/coghq/LaserGameRoll.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/LawOfficeBase.py b/toontown/coghq/LawOfficeBase.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/LawOfficeLayout.py b/toontown/coghq/LawOfficeLayout.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/LawOfficeManagerAI.py b/toontown/coghq/LawOfficeManagerAI.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/LawOffice_Spec_Tier0_a.py b/toontown/coghq/LawOffice_Spec_Tier0_a.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/LawOffice_Spec_Tier0_b.py b/toontown/coghq/LawOffice_Spec_Tier0_b.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/LawbotCogHQLoader.py b/toontown/coghq/LawbotCogHQLoader.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/LawbotHQBossBattle.py b/toontown/coghq/LawbotHQBossBattle.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/LawbotHQExterior.py b/toontown/coghq/LawbotHQExterior.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/LawbotLegFactoryCogs.py b/toontown/coghq/LawbotLegFactoryCogs.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/LawbotLegFactorySpec.py b/toontown/coghq/LawbotLegFactorySpec.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/LawbotOfficeBoilerRoom_Action01.py b/toontown/coghq/LawbotOfficeBoilerRoom_Action01.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/LawbotOfficeBoilerRoom_Battle00.py b/toontown/coghq/LawbotOfficeBoilerRoom_Battle00.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/LawbotOfficeBoilerRoom_Battle00_Cogs.py b/toontown/coghq/LawbotOfficeBoilerRoom_Battle00_Cogs.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/LawbotOfficeBoilerRoom_Security00.py b/toontown/coghq/LawbotOfficeBoilerRoom_Security00.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/LawbotOfficeBoilerRoom_Trap00.py b/toontown/coghq/LawbotOfficeBoilerRoom_Trap00.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/LawbotOfficeBoilerRoom_Trap00_Cogs.py b/toontown/coghq/LawbotOfficeBoilerRoom_Trap00_Cogs.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/LawbotOfficeDiamondRoom_Action00.py b/toontown/coghq/LawbotOfficeDiamondRoom_Action00.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/LawbotOfficeDiamondRoom_Action01.py b/toontown/coghq/LawbotOfficeDiamondRoom_Action01.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/LawbotOfficeDiamondRoom_Battle00.py b/toontown/coghq/LawbotOfficeDiamondRoom_Battle00.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/LawbotOfficeDiamondRoom_Battle00_Cogs.py b/toontown/coghq/LawbotOfficeDiamondRoom_Battle00_Cogs.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/LawbotOfficeDiamondRoom_Security00.py b/toontown/coghq/LawbotOfficeDiamondRoom_Security00.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/LawbotOfficeDiamondRoom_Trap00.py b/toontown/coghq/LawbotOfficeDiamondRoom_Trap00.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/LawbotOfficeDiamondRoom_Trap00_Cogs.py b/toontown/coghq/LawbotOfficeDiamondRoom_Trap00_Cogs.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/LawbotOfficeEntrance_Action00.py b/toontown/coghq/LawbotOfficeEntrance_Action00.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/LawbotOfficeExterior.py b/toontown/coghq/LawbotOfficeExterior.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/LawbotOfficeGearRoom_Action00.py b/toontown/coghq/LawbotOfficeGearRoom_Action00.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/LawbotOfficeGearRoom_Battle00.py b/toontown/coghq/LawbotOfficeGearRoom_Battle00.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/LawbotOfficeGearRoom_Battle00_Cogs.py b/toontown/coghq/LawbotOfficeGearRoom_Battle00_Cogs.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/LawbotOfficeGearRoom_Platform00.py b/toontown/coghq/LawbotOfficeGearRoom_Platform00.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/LawbotOfficeGearRoom_Security00.py b/toontown/coghq/LawbotOfficeGearRoom_Security00.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/LawbotOfficeLobby_Action00.py b/toontown/coghq/LawbotOfficeLobby_Action00.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/LawbotOfficeLobby_Action01.py b/toontown/coghq/LawbotOfficeLobby_Action01.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/LawbotOfficeLobby_Lights00.py b/toontown/coghq/LawbotOfficeLobby_Lights00.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/LawbotOfficeLobby_Trap00.py b/toontown/coghq/LawbotOfficeLobby_Trap00.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/LawbotOfficeLobby_Trap00_Cogs.py b/toontown/coghq/LawbotOfficeLobby_Trap00_Cogs.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/LawbotOfficeOilRoom_Battle00.py b/toontown/coghq/LawbotOfficeOilRoom_Battle00.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/LawbotOfficeOilRoom_Battle00_Cogs.py b/toontown/coghq/LawbotOfficeOilRoom_Battle00_Cogs.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/LawbotOfficeOilRoom_Battle01.py b/toontown/coghq/LawbotOfficeOilRoom_Battle01.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/LawbotOfficeOilRoom_Battle01_Cogs.py b/toontown/coghq/LawbotOfficeOilRoom_Battle01_Cogs.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/LevelBattleManagerAI.py b/toontown/coghq/LevelBattleManagerAI.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/LevelSuitPlannerAI.py b/toontown/coghq/LevelSuitPlannerAI.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/LiftConstants.py b/toontown/coghq/LiftConstants.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/LobbyManager.py b/toontown/coghq/LobbyManager.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/LobbyManagerAI.py b/toontown/coghq/LobbyManagerAI.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/MegaCorpInterior.py b/toontown/coghq/MegaCorpInterior.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/MintInterior.py b/toontown/coghq/MintInterior.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/MintLayout.py b/toontown/coghq/MintLayout.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/MintManagerAI.py b/toontown/coghq/MintManagerAI.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/MintProduct.py b/toontown/coghq/MintProduct.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/MintProductPallet.py b/toontown/coghq/MintProductPallet.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/MintRoom.py b/toontown/coghq/MintRoom.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/MintRoomBase.py b/toontown/coghq/MintRoomBase.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/MintRoomSpecs.py b/toontown/coghq/MintRoomSpecs.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/MintShelf.py b/toontown/coghq/MintShelf.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/MoleFieldBase.py b/toontown/coghq/MoleFieldBase.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/MoleHill.py b/toontown/coghq/MoleHill.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/MovingPlatform.py b/toontown/coghq/MovingPlatform.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/NullCogs.py b/toontown/coghq/NullCogs.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/PaintMixer.py b/toontown/coghq/PaintMixer.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/PathMasterEntity.py b/toontown/coghq/PathMasterEntity.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/PlatformEntity.py b/toontown/coghq/PlatformEntity.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/RenderingEntity.py b/toontown/coghq/RenderingEntity.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/SellbotCogHQLoader.py b/toontown/coghq/SellbotCogHQLoader.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/SellbotHQBossBattle.py b/toontown/coghq/SellbotHQBossBattle.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/SellbotHQExterior.py b/toontown/coghq/SellbotHQExterior.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/SellbotLegFactoryCogs.py b/toontown/coghq/SellbotLegFactoryCogs.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/SellbotLegFactorySpec.py b/toontown/coghq/SellbotLegFactorySpec.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/SellbotMegaCorpLegCogs.py b/toontown/coghq/SellbotMegaCorpLegCogs.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/SellbotMegaCorpLegSpec.py b/toontown/coghq/SellbotMegaCorpLegSpec.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/SinkingPlatformGlobals.py b/toontown/coghq/SinkingPlatformGlobals.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/SpecImports.py b/toontown/coghq/SpecImports.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/StageInterior.py b/toontown/coghq/StageInterior.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/StageLayout.py b/toontown/coghq/StageLayout.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/StageRoom.py b/toontown/coghq/StageRoom.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/StageRoomBase.py b/toontown/coghq/StageRoomBase.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/StageRoomSpecs.py b/toontown/coghq/StageRoomSpecs.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/StomperGlobals.py b/toontown/coghq/StomperGlobals.py old mode 100644 new mode 100755 diff --git a/toontown/coghq/__init__.py b/toontown/coghq/__init__.py old mode 100644 new mode 100755 diff --git a/toontown/distributed/DelayDeletable.py b/toontown/distributed/DelayDeletable.py old mode 100644 new mode 100755 diff --git a/toontown/distributed/DelayDelete.py b/toontown/distributed/DelayDelete.py old mode 100644 new mode 100755 diff --git a/toontown/distributed/DistributedTimer.py b/toontown/distributed/DistributedTimer.py old mode 100644 new mode 100755 diff --git a/toontown/distributed/DistributedTimerAI.py b/toontown/distributed/DistributedTimerAI.py old mode 100644 new mode 100755 diff --git a/toontown/distributed/HoodMgr.py b/toontown/distributed/HoodMgr.py old mode 100644 new mode 100755 diff --git a/toontown/distributed/PlayGame.py b/toontown/distributed/PlayGame.py old mode 100644 new mode 100755 diff --git a/toontown/distributed/ShardStatusReceiver.py b/toontown/distributed/ShardStatusReceiver.py old mode 100644 new mode 100755 diff --git a/toontown/distributed/ToontownClientRepository.py b/toontown/distributed/ToontownClientRepository.py old mode 100644 new mode 100755 index 004cf113..55638219 --- a/toontown/distributed/ToontownClientRepository.py +++ b/toontown/distributed/ToontownClientRepository.py @@ -28,7 +28,6 @@ from toontown.toonbase.ToontownGlobals import * from toontown.distributed import DelayDelete from toontown.friends import FriendHandle from toontown.friends import FriendsListPanel -from toontown.friends import ToontownFriendSecret from toontown.login import AvatarChooser from toontown.makeatoon import MakeAToon from toontown.pets import DistributedPet, PetDetail, PetHandle @@ -76,9 +75,9 @@ class ToontownClientRepository(OTPClientRepository.OTPClientRepository): self.toontownTimeManager = ToontownTimeManager.ToontownTimeManager() self.csm = self.generateGlobalObject(OtpDoGlobals.OTP_DO_ID_CLIENT_SERVICES_MANAGER, 'ClientServicesManager') - self.ttuFriendsManager = self.generateGlobalObject(OtpDoGlobals.OTP_DO_ID_TTU_FRIENDS_MANAGER, 'TTUFriendsManager') + self.ttsFriendsManager = self.generateGlobalObject(OtpDoGlobals.OTP_DO_ID_TTS_FRIENDS_MANAGER, 'TTSFriendsManager') - self.argManager = self.generateGlobalObject(OtpDoGlobals.OTP_DO_ID_TTU_ARG_MANAGER, 'ARGManager') + self.argManager = self.generateGlobalObject(OtpDoGlobals.OTP_DO_ID_TTS_ARG_MANAGER, 'ARGManager') self.furnitureManager = None self.objectManager = None @@ -130,7 +129,9 @@ class ToontownClientRepository(OTPClientRepository.OTPClientRepository): def congratulations(self, avatarChoice): self.acceptedScreen = loader.loadModel('phase_3/models/gui/toon_council') + self.acceptedScreen.find('**/chars').removeNode() self.acceptedScreen.setScale(0.667) + self.acceptedScreen.setPos(0, 0, 0.2) self.acceptedScreen.reparentTo(aspect2d) base.setBackgroundColor(Vec4(0.7647, 0.3529, 0.2352, 1)) buttons = loader.loadModel('phase_3/models/gui/dialog_box_buttons_gui') @@ -329,9 +330,9 @@ class ToontownClientRepository(OTPClientRepository.OTPClientRepository): def __sendGetAvatarDetails(self, avId, pet=0): if pet: - self.ttuFriendsManager.d_getPetDetails(avId) + self.ttsFriendsManager.d_getPetDetails(avId) else: - self.ttuFriendsManager.d_getAvatarDetails(avId) + self.ttsFriendsManager.d_getAvatarDetails(avId) def n_handleGetAvatarDetailsResp(self, avId, fields): self.notify.info('Query reponse for avId %d' % avId) @@ -407,7 +408,6 @@ class ToontownClientRepository(OTPClientRepository.OTPClientRepository): if self.objectManager != None: self.objectManager.destroy() self.objectManager = None - ToontownFriendSecret.unloadFriendSecret() FriendsListPanel.unloadFriendsList() messenger.send('cancelFriendInvitation') base.removeGlitchMessage() @@ -695,7 +695,7 @@ class ToontownClientRepository(OTPClientRepository.OTPClientRepository): return 1 def removeFriend(self, avatarId): - self.ttuFriendsManager.d_removeFriend(avatarId) + self.ttsFriendsManager.d_removeFriend(avatarId) def clearFriendState(self): self.friendsMap = {} @@ -706,7 +706,7 @@ class ToontownClientRepository(OTPClientRepository.OTPClientRepository): def sendGetFriendsListRequest(self): self.friendsMapPending = 1 self.friendsListError = 0 - self.ttuFriendsManager.d_requestFriendsList() + self.ttsFriendsManager.d_requestFriendsList() def cleanPetsFromFriendsMap(self): for objId, obj in self.friendsMap.items(): @@ -988,7 +988,7 @@ class ToontownClientRepository(OTPClientRepository.OTPClientRepository): def requestAvatarInfo(self, avId): if avId == 0: return - self.ttuFriendsManager.d_requestAvatarInfo([avId]) + self.ttsFriendsManager.d_requestAvatarInfo([avId]) def queueRequestAvatarInfo(self, avId): removeTask = 0 @@ -1005,4 +1005,4 @@ class ToontownClientRepository(OTPClientRepository.OTPClientRepository): return if len(self.avatarInfoRequests) == 0: return - self.ttuFriendsManager.d_requestAvatarInfo(self.avatarInfoRequests) + self.ttsFriendsManager.d_requestAvatarInfo(self.avatarInfoRequests) diff --git a/toontown/distributed/ToontownDistrict.py b/toontown/distributed/ToontownDistrict.py old mode 100644 new mode 100755 diff --git a/toontown/distributed/ToontownDistrictAI.py b/toontown/distributed/ToontownDistrictAI.py old mode 100644 new mode 100755 diff --git a/toontown/distributed/ToontownDistrictStats.py b/toontown/distributed/ToontownDistrictStats.py old mode 100644 new mode 100755 diff --git a/toontown/distributed/ToontownDistrictStatsAI.py b/toontown/distributed/ToontownDistrictStatsAI.py old mode 100644 new mode 100755 diff --git a/toontown/distributed/ToontownInternalRepository.py b/toontown/distributed/ToontownInternalRepository.py old mode 100644 new mode 100755 diff --git a/toontown/distributed/ToontownMsgTypes.py b/toontown/distributed/ToontownMsgTypes.py old mode 100644 new mode 100755 diff --git a/toontown/distributed/__init__.py b/toontown/distributed/__init__.py old mode 100644 new mode 100755 diff --git a/toontown/dna/DNAParser.py b/toontown/dna/DNAParser.py old mode 100644 new mode 100755 index 76e49481..ef366db9 --- a/toontown/dna/DNAParser.py +++ b/toontown/dna/DNAParser.py @@ -36,10 +36,8 @@ def loadDNAFileAI(dnaStorage, file): def setupDoor(a, b, c, d, e, f): try: e = int(str(e).split('_')[0]) - except: print 'setupDoor: error parsing', e e = 9999 - - DNADoor.setupDoor(a, b, c, d, e, f) + DNADoor.setupDoor(a, b, c, d, e, f) diff --git a/toontown/dna/__init__.py b/toontown/dna/__init__.py old mode 100644 new mode 100755 diff --git a/toontown/effects/BlastEffect.py b/toontown/effects/BlastEffect.py old mode 100644 new mode 100755 diff --git a/toontown/effects/Bubbles.py b/toontown/effects/Bubbles.py old mode 100644 new mode 100755 diff --git a/toontown/effects/CarSmoke.py b/toontown/effects/CarSmoke.py deleted file mode 100644 index e0ca403d..00000000 --- a/toontown/effects/CarSmoke.py +++ /dev/null @@ -1,54 +0,0 @@ -from pandac.PandaModules import * -from direct.particles import ParticleEffect -from direct.directnotify import DirectNotifyGlobal -from direct.showbase import AppRunnerGlobal -import os - -class CarSmoke(NodePath): - - def __init__(self, parent): - NodePath.__init__(self) - notify = DirectNotifyGlobal.directNotify.newCategory('CarSmokeParticles') - self.effectNode = parent.attachNewNode('carSmoke') - self.effectNode.setBin('fixed', 1) - self.effectNode.setDepthWrite(0) - self.effect = ParticleEffect.ParticleEffect() - particleSearchPath = DSearchPath() - if AppRunnerGlobal.appRunner: - particleSearchPath.appendDirectory(Filename.expandFrom('$TT_3_5_ROOT/phase_3.5/etc')) - else: - basePath = os.path.expandvars('$TOONTOWN') or './toontown' - particleSearchPath.appendDirectory(Filename.fromOsSpecific(basePath + '/src/effects')) - particleSearchPath.appendDirectory(Filename('phase_3.5/etc')) - particleSearchPath.appendDirectory(Filename('phase_4/etc')) - particleSearchPath.appendDirectory(Filename('phase_5/etc')) - particleSearchPath.appendDirectory(Filename('phase_6/etc')) - particleSearchPath.appendDirectory(Filename('phase_7/etc')) - particleSearchPath.appendDirectory(Filename('phase_8/etc')) - particleSearchPath.appendDirectory(Filename('phase_9/etc')) - particleSearchPath.appendDirectory(Filename('.')) - pfile = Filename('smokeTest4.ptf') - found = vfs.resolveFilename(pfile, particleSearchPath) - if not found: - notify.warning('loadParticleFile() - no path: %s' % pfile) - return - notify.debug('Loading particle file: %s' % pfile) - self.effect.loadConfig(pfile) - ren = self.effect.getParticlesNamed('particles-1').getRenderer() - ren.setTextureFromNode('phase_4/models/props/tt_m_efx_ext_smoke', '**/*') - - def start(self): - self.effect.start(parent=self.effectNode) - - def stop(self): - try: - self.effect.disable() - except AttributeError: - pass - - def destroy(self): - self.stop() - self.effect.cleanup() - self.effectNode.removeNode() - del self.effect - del self.effectNode diff --git a/toontown/effects/ChrysanthemumEffect.py b/toontown/effects/ChrysanthemumEffect.py old mode 100644 new mode 100755 diff --git a/toontown/effects/DistributedFireworkShow.py b/toontown/effects/DistributedFireworkShow.py old mode 100644 new mode 100755 diff --git a/toontown/effects/DistributedFireworkShowAI.py b/toontown/effects/DistributedFireworkShowAI.py old mode 100644 new mode 100755 diff --git a/toontown/effects/Drift.py b/toontown/effects/Drift.py old mode 100644 new mode 100755 diff --git a/toontown/effects/DustCloud.py b/toontown/effects/DustCloud.py old mode 100644 new mode 100755 diff --git a/toontown/effects/EffectController.py b/toontown/effects/EffectController.py old mode 100644 new mode 100755 diff --git a/toontown/effects/Firework.py b/toontown/effects/Firework.py old mode 100644 new mode 100755 diff --git a/toontown/effects/FireworkEffect.py b/toontown/effects/FireworkEffect.py old mode 100644 new mode 100755 diff --git a/toontown/effects/FireworkGlobals.py b/toontown/effects/FireworkGlobals.py old mode 100644 new mode 100755 diff --git a/toontown/effects/FireworkShow.py b/toontown/effects/FireworkShow.py old mode 100644 new mode 100755 diff --git a/toontown/effects/FireworkShowMixin.py b/toontown/effects/FireworkShowMixin.py old mode 100644 new mode 100755 diff --git a/toontown/effects/FireworkShows.py b/toontown/effects/FireworkShows.py old mode 100644 new mode 100755 diff --git a/toontown/effects/FireworkSparkles.py b/toontown/effects/FireworkSparkles.py old mode 100644 new mode 100755 diff --git a/toontown/effects/Fireworks.py b/toontown/effects/Fireworks.py old mode 100644 new mode 100755 diff --git a/toontown/effects/FlashEffect.py b/toontown/effects/FlashEffect.py old mode 100644 new mode 100755 diff --git a/toontown/effects/Glow.py b/toontown/effects/Glow.py old mode 100644 new mode 100755 diff --git a/toontown/effects/GlowTrail.py b/toontown/effects/GlowTrail.py old mode 100644 new mode 100755 diff --git a/toontown/effects/IceCream.py b/toontown/effects/IceCream.py old mode 100644 new mode 100755 diff --git a/toontown/effects/NoiseSparkles.py b/toontown/effects/NoiseSparkles.py old mode 100644 new mode 100755 diff --git a/toontown/effects/PeonyEffect.py b/toontown/effects/PeonyEffect.py old mode 100644 new mode 100755 diff --git a/toontown/effects/PolyTrail.py b/toontown/effects/PolyTrail.py old mode 100644 new mode 100755 diff --git a/toontown/effects/PooledEffect.py b/toontown/effects/PooledEffect.py old mode 100644 new mode 100755 diff --git a/toontown/effects/RayBurst.py b/toontown/effects/RayBurst.py old mode 100644 new mode 100755 diff --git a/toontown/effects/RingEffect.py b/toontown/effects/RingEffect.py old mode 100644 new mode 100755 diff --git a/toontown/effects/Ripples.py b/toontown/effects/Ripples.py old mode 100644 new mode 100755 diff --git a/toontown/effects/RocketExplosion.py b/toontown/effects/RocketExplosion.py old mode 100644 new mode 100755 diff --git a/toontown/effects/ScavengerHuntEffects.py b/toontown/effects/ScavengerHuntEffects.py old mode 100644 new mode 100755 diff --git a/toontown/effects/SimpleSparkles.py b/toontown/effects/SimpleSparkles.py old mode 100644 new mode 100755 diff --git a/toontown/effects/SkullBurst.py b/toontown/effects/SkullBurst.py old mode 100644 new mode 100755 diff --git a/toontown/effects/SkullFlash.py b/toontown/effects/SkullFlash.py old mode 100644 new mode 100755 diff --git a/toontown/effects/Sparks.py b/toontown/effects/Sparks.py old mode 100644 new mode 100755 diff --git a/toontown/effects/SparksTrail.py b/toontown/effects/SparksTrail.py old mode 100644 new mode 100755 diff --git a/toontown/effects/SparksTrailLong.py b/toontown/effects/SparksTrailLong.py old mode 100644 new mode 100755 diff --git a/toontown/effects/Splash.py b/toontown/effects/Splash.py old mode 100644 new mode 100755 diff --git a/toontown/effects/StarBurst.py b/toontown/effects/StarBurst.py old mode 100644 new mode 100755 diff --git a/toontown/effects/TrailExplosion.py b/toontown/effects/TrailExplosion.py old mode 100644 new mode 100755 diff --git a/toontown/effects/Wake.py b/toontown/effects/Wake.py old mode 100644 new mode 100755 diff --git a/toontown/effects/__init__.py b/toontown/effects/__init__.py old mode 100644 new mode 100755 diff --git a/toontown/estate/BankGUI.py b/toontown/estate/BankGUI.py old mode 100644 new mode 100755 diff --git a/toontown/estate/BankGlobals.py b/toontown/estate/BankGlobals.py old mode 100644 new mode 100755 diff --git a/toontown/estate/BeanRecipeGui.py b/toontown/estate/BeanRecipeGui.py old mode 100644 new mode 100755 diff --git a/toontown/estate/CannonGlobals.py b/toontown/estate/CannonGlobals.py old mode 100644 new mode 100755 diff --git a/toontown/estate/ClosetGUI.py b/toontown/estate/ClosetGUI.py old mode 100644 new mode 100755 diff --git a/toontown/estate/ClosetGlobals.py b/toontown/estate/ClosetGlobals.py old mode 100644 new mode 100755 diff --git a/toontown/estate/DNAFurnitureReaderAI.py b/toontown/estate/DNAFurnitureReaderAI.py old mode 100644 new mode 100755 diff --git a/toontown/estate/DistributedAnimatedStatuary.py b/toontown/estate/DistributedAnimatedStatuary.py old mode 100644 new mode 100755 diff --git a/toontown/estate/DistributedAnimatedStatuaryAI.py b/toontown/estate/DistributedAnimatedStatuaryAI.py old mode 100644 new mode 100755 diff --git a/toontown/estate/DistributedBank.py b/toontown/estate/DistributedBank.py old mode 100644 new mode 100755 diff --git a/toontown/estate/DistributedBankAI.py b/toontown/estate/DistributedBankAI.py old mode 100644 new mode 100755 diff --git a/toontown/estate/DistributedCannon.py b/toontown/estate/DistributedCannon.py old mode 100644 new mode 100755 diff --git a/toontown/estate/DistributedCannonAI.py b/toontown/estate/DistributedCannonAI.py old mode 100644 new mode 100755 diff --git a/toontown/estate/DistributedChangingStatuary.py b/toontown/estate/DistributedChangingStatuary.py old mode 100644 new mode 100755 diff --git a/toontown/estate/DistributedChangingStatuaryAI.py b/toontown/estate/DistributedChangingStatuaryAI.py old mode 100644 new mode 100755 diff --git a/toontown/estate/DistributedCloset.py b/toontown/estate/DistributedCloset.py old mode 100644 new mode 100755 diff --git a/toontown/estate/DistributedClosetAI.py b/toontown/estate/DistributedClosetAI.py old mode 100644 new mode 100755 diff --git a/toontown/estate/DistributedEstate.py b/toontown/estate/DistributedEstate.py old mode 100644 new mode 100755 diff --git a/toontown/estate/DistributedEstateAI.py b/toontown/estate/DistributedEstateAI.py old mode 100644 new mode 100755 diff --git a/toontown/estate/DistributedFireworksCannon.py b/toontown/estate/DistributedFireworksCannon.py old mode 100644 new mode 100755 diff --git a/toontown/estate/DistributedFireworksCannonAI.py b/toontown/estate/DistributedFireworksCannonAI.py old mode 100644 new mode 100755 diff --git a/toontown/estate/DistributedFlower.py b/toontown/estate/DistributedFlower.py old mode 100644 new mode 100755 diff --git a/toontown/estate/DistributedFlowerAI.py b/toontown/estate/DistributedFlowerAI.py old mode 100644 new mode 100755 diff --git a/toontown/estate/DistributedFurnitureItem.py b/toontown/estate/DistributedFurnitureItem.py old mode 100644 new mode 100755 diff --git a/toontown/estate/DistributedFurnitureItemAI.py b/toontown/estate/DistributedFurnitureItemAI.py old mode 100644 new mode 100755 diff --git a/toontown/estate/DistributedFurnitureManager.py b/toontown/estate/DistributedFurnitureManager.py old mode 100644 new mode 100755 diff --git a/toontown/estate/DistributedFurnitureManagerAI.py b/toontown/estate/DistributedFurnitureManagerAI.py old mode 100644 new mode 100755 diff --git a/toontown/estate/DistributedGagTree.py b/toontown/estate/DistributedGagTree.py old mode 100644 new mode 100755 diff --git a/toontown/estate/DistributedGagTreeAI.py b/toontown/estate/DistributedGagTreeAI.py old mode 100644 new mode 100755 diff --git a/toontown/estate/DistributedGarden.py b/toontown/estate/DistributedGarden.py old mode 100644 new mode 100755 index f7b1263e..3af35d34 --- a/toontown/estate/DistributedGarden.py +++ b/toontown/estate/DistributedGarden.py @@ -1,22 +1,9 @@ from pandac.PandaModules import * -from toontown.toonbase.ToonBaseGlobal import * -from direct.gui.DirectGui import * -from pandac.PandaModules import * -from direct.distributed.ClockDelta import * -from toontown.toonbase import ToontownGlobals from direct.distributed import DistributedObject +from direct.distributed.ClockDelta import * from direct.directnotify import DirectNotifyGlobal -from direct.fsm import ClassicFSM -from direct.fsm import State -from toontown.toon import Toon -from direct.showbase import RandomNumGen -from toontown.toonbase import TTLocalizer -import random -import random -import cPickle -from direct.showbase import PythonUtil -from toontown.hood import Place -import Estate +from direct.gui.DirectGui import * +from toontown.toonbase.ToonBaseGlobal import * import HouseGlobals class DistributedGarden(DistributedObject.DistributedObject): diff --git a/toontown/estate/DistributedGardenAI.py b/toontown/estate/DistributedGardenAI.py old mode 100644 new mode 100755 diff --git a/toontown/estate/DistributedGardenBox.py b/toontown/estate/DistributedGardenBox.py old mode 100644 new mode 100755 diff --git a/toontown/estate/DistributedGardenBoxAI.py b/toontown/estate/DistributedGardenBoxAI.py old mode 100644 new mode 100755 diff --git a/toontown/estate/DistributedGardenPlot.py b/toontown/estate/DistributedGardenPlot.py old mode 100644 new mode 100755 diff --git a/toontown/estate/DistributedGardenPlotAI.py b/toontown/estate/DistributedGardenPlotAI.py old mode 100644 new mode 100755 diff --git a/toontown/estate/DistributedHouse.py b/toontown/estate/DistributedHouse.py old mode 100644 new mode 100755 diff --git a/toontown/estate/DistributedHouseAI.py b/toontown/estate/DistributedHouseAI.py old mode 100644 new mode 100755 diff --git a/toontown/estate/DistributedHouseDoor.py b/toontown/estate/DistributedHouseDoor.py old mode 100644 new mode 100755 diff --git a/toontown/estate/DistributedHouseDoorAI.py b/toontown/estate/DistributedHouseDoorAI.py old mode 100644 new mode 100755 diff --git a/toontown/estate/DistributedHouseInterior.py b/toontown/estate/DistributedHouseInterior.py old mode 100644 new mode 100755 diff --git a/toontown/estate/DistributedHouseInteriorAI.py b/toontown/estate/DistributedHouseInteriorAI.py old mode 100644 new mode 100755 diff --git a/toontown/estate/DistributedHouseItem.py b/toontown/estate/DistributedHouseItem.py old mode 100644 new mode 100755 diff --git a/toontown/estate/DistributedLawnDecor.py b/toontown/estate/DistributedLawnDecor.py old mode 100644 new mode 100755 diff --git a/toontown/estate/DistributedLawnDecorAI.py b/toontown/estate/DistributedLawnDecorAI.py old mode 100644 new mode 100755 diff --git a/toontown/estate/DistributedMailbox.py b/toontown/estate/DistributedMailbox.py old mode 100644 new mode 100755 diff --git a/toontown/estate/DistributedMailboxAI.py b/toontown/estate/DistributedMailboxAI.py old mode 100644 new mode 100755 diff --git a/toontown/estate/DistributedPhone.py b/toontown/estate/DistributedPhone.py old mode 100644 new mode 100755 diff --git a/toontown/estate/DistributedPhoneAI.py b/toontown/estate/DistributedPhoneAI.py old mode 100644 new mode 100755 index 59271837..aa08fd29 --- a/toontown/estate/DistributedPhoneAI.py +++ b/toontown/estate/DistributedPhoneAI.py @@ -98,9 +98,6 @@ class DistributedPhoneAI(DistributedFurnitureItemAI): if isinstance(item, CatalogInvalidItem): self.air.writeServerEvent('suspicious', avId, 'Tried to purchase invalid catalog item.') return - if item.loyaltyRequirement(): - self.air.writeServerEvent('suspicious', avId, 'Tried to purchase an unimplemented loyalty item!') - return if item in av.backCatalog: price = item.getPrice(CatalogItem.CatalogTypeBackorder) elif item in av.weeklyCatalog or item in av.monthlyCatalog: diff --git a/toontown/estate/DistributedPlantBase.py b/toontown/estate/DistributedPlantBase.py old mode 100644 new mode 100755 diff --git a/toontown/estate/DistributedPlantBaseAI.py b/toontown/estate/DistributedPlantBaseAI.py old mode 100644 new mode 100755 diff --git a/toontown/estate/DistributedStatuary.py b/toontown/estate/DistributedStatuary.py old mode 100644 new mode 100755 diff --git a/toontown/estate/DistributedStatuaryAI.py b/toontown/estate/DistributedStatuaryAI.py old mode 100644 new mode 100755 diff --git a/toontown/estate/DistributedTarget.py b/toontown/estate/DistributedTarget.py old mode 100644 new mode 100755 diff --git a/toontown/estate/DistributedTargetAI.py b/toontown/estate/DistributedTargetAI.py old mode 100644 new mode 100755 diff --git a/toontown/estate/DistributedToonStatuary.py b/toontown/estate/DistributedToonStatuary.py old mode 100644 new mode 100755 diff --git a/toontown/estate/DistributedToonStatuaryAI.py b/toontown/estate/DistributedToonStatuaryAI.py old mode 100644 new mode 100755 diff --git a/toontown/estate/DistributedTrunk.py b/toontown/estate/DistributedTrunk.py old mode 100644 new mode 100755 diff --git a/toontown/estate/DistributedTrunkAI.py b/toontown/estate/DistributedTrunkAI.py old mode 100644 new mode 100755 diff --git a/toontown/estate/Estate.py b/toontown/estate/Estate.py old mode 100644 new mode 100755 diff --git a/toontown/estate/EstateLoader.py b/toontown/estate/EstateLoader.py old mode 100644 new mode 100755 diff --git a/toontown/estate/EstateManager.py b/toontown/estate/EstateManager.py old mode 100644 new mode 100755 diff --git a/toontown/estate/EstateManagerAI.py b/toontown/estate/EstateManagerAI.py old mode 100644 new mode 100755 diff --git a/toontown/estate/FireworkItemPanel.py b/toontown/estate/FireworkItemPanel.py old mode 100644 new mode 100755 diff --git a/toontown/estate/FireworksGui.py b/toontown/estate/FireworksGui.py old mode 100644 new mode 100755 diff --git a/toontown/estate/FlowerBase.py b/toontown/estate/FlowerBase.py old mode 100644 new mode 100755 diff --git a/toontown/estate/FlowerBasket.py b/toontown/estate/FlowerBasket.py old mode 100644 new mode 100755 diff --git a/toontown/estate/FlowerBrowser.py b/toontown/estate/FlowerBrowser.py old mode 100644 new mode 100755 diff --git a/toontown/estate/FlowerCollection.py b/toontown/estate/FlowerCollection.py old mode 100644 new mode 100755 diff --git a/toontown/estate/FlowerPanel.py b/toontown/estate/FlowerPanel.py old mode 100644 new mode 100755 diff --git a/toontown/estate/FlowerPhoto.py b/toontown/estate/FlowerPhoto.py old mode 100644 new mode 100755 diff --git a/toontown/estate/FlowerPicker.py b/toontown/estate/FlowerPicker.py old mode 100644 new mode 100755 diff --git a/toontown/estate/FlowerSellGUI.py b/toontown/estate/FlowerSellGUI.py old mode 100644 new mode 100755 diff --git a/toontown/estate/FlowerSpeciesPanel.py b/toontown/estate/FlowerSpeciesPanel.py old mode 100644 new mode 100755 diff --git a/toontown/estate/GameSprite.py b/toontown/estate/GameSprite.py old mode 100644 new mode 100755 diff --git a/toontown/estate/GardenDropGame.py b/toontown/estate/GardenDropGame.py old mode 100644 new mode 100755 diff --git a/toontown/estate/GardenGameGlobals.py b/toontown/estate/GardenGameGlobals.py old mode 100644 new mode 100755 diff --git a/toontown/estate/GardenGlobals.py b/toontown/estate/GardenGlobals.py old mode 100644 new mode 100755 diff --git a/toontown/estate/GardenProgressMeter.py b/toontown/estate/GardenProgressMeter.py old mode 100644 new mode 100755 index ff9917ce..0a092012 --- a/toontown/estate/GardenProgressMeter.py +++ b/toontown/estate/GardenProgressMeter.py @@ -1,26 +1,13 @@ from pandac.PandaModules import * -from toontown.toonbase.ToonBaseGlobal import * -from direct.gui.DirectGui import * -from pandac.PandaModules import * -from direct.gui.DirectScrolledList import * -from direct.distributed.ClockDelta import * -from toontown.toontowngui import TTDialog -import math -from toontown.toonbase import ToontownGlobals from direct.distributed import DistributedObject from direct.directnotify import DirectNotifyGlobal -from direct.fsm import ClassicFSM -from direct.fsm import State -from toontown.toon import Toon -from direct.showbase import RandomNumGen -from toontown.toonbase import TTLocalizer -import random -import random -import cPickle -from direct.showbase import PythonUtil -import GameSprite -from math import pi +from direct.distributed.ClockDelta import * +from direct.gui.DirectScrolledList import * +from direct.gui.DirectGui import * +from toontown.toonbase.ToonBaseGlobal import * +from toontown.toonbase import ToontownGlobals, TTLocalizer from toontown.estate import GardenGlobals + SHOVEL = 0 WATERINGCAN = 1 GAMEWIN = 2 diff --git a/toontown/estate/GardenTutorial.py b/toontown/estate/GardenTutorial.py old mode 100644 new mode 100755 diff --git a/toontown/estate/House.py b/toontown/estate/House.py old mode 100644 new mode 100755 diff --git a/toontown/estate/HouseGlobals.py b/toontown/estate/HouseGlobals.py old mode 100644 new mode 100755 diff --git a/toontown/estate/MailboxGlobals.py b/toontown/estate/MailboxGlobals.py old mode 100644 new mode 100755 diff --git a/toontown/estate/PhoneGlobals.py b/toontown/estate/PhoneGlobals.py old mode 100644 new mode 100755 diff --git a/toontown/estate/PlantTreeGUI.py b/toontown/estate/PlantTreeGUI.py old mode 100644 new mode 100755 diff --git a/toontown/estate/PlantingGUI.py b/toontown/estate/PlantingGUI.py old mode 100644 new mode 100755 diff --git a/toontown/estate/SpecialsPhoto.py b/toontown/estate/SpecialsPhoto.py old mode 100644 new mode 100755 diff --git a/toontown/estate/TableGlobals.py b/toontown/estate/TableGlobals.py old mode 100644 new mode 100755 diff --git a/toontown/estate/ToonStatueSelectionGUI.py b/toontown/estate/ToonStatueSelectionGUI.py old mode 100644 new mode 100755 diff --git a/toontown/estate/TrunkGUI.py b/toontown/estate/TrunkGUI.py old mode 100644 new mode 100755 diff --git a/toontown/estate/__init__.py b/toontown/estate/__init__.py old mode 100644 new mode 100755 diff --git a/toontown/estate/houseDesign.py b/toontown/estate/houseDesign.py old mode 100644 new mode 100755 diff --git a/toontown/fishing/BingoCardBase.py b/toontown/fishing/BingoCardBase.py old mode 100644 new mode 100755 diff --git a/toontown/fishing/BingoCardCell.py b/toontown/fishing/BingoCardCell.py old mode 100644 new mode 100755 diff --git a/toontown/fishing/BingoCardGui.py b/toontown/fishing/BingoCardGui.py old mode 100644 new mode 100755 diff --git a/toontown/fishing/BingoGlobals.py b/toontown/fishing/BingoGlobals.py old mode 100644 new mode 100755 diff --git a/toontown/fishing/BlockoutBingo.py b/toontown/fishing/BlockoutBingo.py old mode 100644 new mode 100755 diff --git a/toontown/fishing/DiagonalBingo.py b/toontown/fishing/DiagonalBingo.py old mode 100644 new mode 100755 diff --git a/toontown/fishing/DistributedFishingPond.py b/toontown/fishing/DistributedFishingPond.py old mode 100644 new mode 100755 diff --git a/toontown/fishing/DistributedFishingPondAI.py b/toontown/fishing/DistributedFishingPondAI.py old mode 100644 new mode 100755 diff --git a/toontown/fishing/DistributedFishingTarget.py b/toontown/fishing/DistributedFishingTarget.py old mode 100644 new mode 100755 diff --git a/toontown/fishing/DistributedFishingTargetAI.py b/toontown/fishing/DistributedFishingTargetAI.py old mode 100644 new mode 100755 diff --git a/toontown/fishing/DistributedPondBingoManager.py b/toontown/fishing/DistributedPondBingoManager.py old mode 100644 new mode 100755 diff --git a/toontown/fishing/DistributedPondBingoManagerAI.py b/toontown/fishing/DistributedPondBingoManagerAI.py old mode 100644 new mode 100755 diff --git a/toontown/fishing/FishBase.py b/toontown/fishing/FishBase.py old mode 100644 new mode 100755 diff --git a/toontown/fishing/FishBrowser.py b/toontown/fishing/FishBrowser.py old mode 100644 new mode 100755 diff --git a/toontown/fishing/FishCollection.py b/toontown/fishing/FishCollection.py old mode 100644 new mode 100755 diff --git a/toontown/fishing/FishGlobals.py b/toontown/fishing/FishGlobals.py old mode 100644 new mode 100755 diff --git a/toontown/fishing/FishPanel.py b/toontown/fishing/FishPanel.py old mode 100644 new mode 100755 diff --git a/toontown/fishing/FishPhoto.py b/toontown/fishing/FishPhoto.py old mode 100644 new mode 100755 diff --git a/toontown/fishing/FishPicker.py b/toontown/fishing/FishPicker.py old mode 100644 new mode 100755 diff --git a/toontown/fishing/FishSellGUI.py b/toontown/fishing/FishSellGUI.py old mode 100644 new mode 100755 diff --git a/toontown/fishing/FishTank.py b/toontown/fishing/FishTank.py old mode 100644 new mode 100755 diff --git a/toontown/fishing/FishingTargetGlobals.py b/toontown/fishing/FishingTargetGlobals.py old mode 100644 new mode 100755 diff --git a/toontown/fishing/FourCornerBingo.py b/toontown/fishing/FourCornerBingo.py old mode 100644 new mode 100755 diff --git a/toontown/fishing/GenusPanel.py b/toontown/fishing/GenusPanel.py old mode 100644 new mode 100755 diff --git a/toontown/fishing/NormalBingo.py b/toontown/fishing/NormalBingo.py old mode 100644 new mode 100755 diff --git a/toontown/fishing/ThreewayBingo.py b/toontown/fishing/ThreewayBingo.py old mode 100644 new mode 100755 diff --git a/toontown/fishing/__init__.py b/toontown/fishing/__init__.py old mode 100644 new mode 100755 diff --git a/toontown/friends/FriendHandle.py b/toontown/friends/FriendHandle.py old mode 100644 new mode 100755 index dccb08c2..7a3e376f --- a/toontown/friends/FriendHandle.py +++ b/toontown/friends/FriendHandle.py @@ -40,26 +40,26 @@ class FriendHandle: return idString + '-' + str(self.getDoId()) def d_battleSOS(self, sendToId): - base.cr.ttuFriendsManager.d_battleSOS(self.doId) + base.cr.ttsFriendsManager.d_battleSOS(self.doId) def d_teleportQuery(self, requesterId): teleportNotify.debug('sending d_teleportQuery(%s)' % (requesterId,)) - base.cr.ttuFriendsManager.d_teleportQuery(self.doId) + base.cr.ttsFriendsManager.d_teleportQuery(self.doId) def d_teleportResponse(self, avId, available, shardId, hoodId, zoneId): teleportNotify.debug('sending teleportResponse%s' % ((avId, available, shardId, hoodId, zoneId),) ) - base.cr.ttuFriendsManager.d_teleportResponse(self.doId, available, + base.cr.ttsFriendsManager.d_teleportResponse(self.doId, available, shardId, hoodId, zoneId ) def d_teleportGiveup(self, requesterId): teleportNotify.debug('sending d_teleportGiveup(%s)' % (requesterId,)) - base.cr.ttuFriendsManager.d_teleportGiveup(self.doId) + base.cr.ttsFriendsManager.d_teleportGiveup(self.doId) def isUnderstandable(self): if self.commonChatFlags & base.localAvatar.commonChatFlags & ToontownGlobals.CommonChat: diff --git a/toontown/friends/FriendInvitee.py b/toontown/friends/FriendInvitee.py old mode 100644 new mode 100755 diff --git a/toontown/friends/FriendInviter.py b/toontown/friends/FriendInviter.py old mode 100644 new mode 100755 index 36b6f928..06c44890 --- a/toontown/friends/FriendInviter.py +++ b/toontown/friends/FriendInviter.py @@ -179,6 +179,9 @@ class FriendInviter(DirectFrame): def enterCheckAvailability(self): self.accept(self.avDisableName, self.__handleDisableAvatar) + if base.localAvatar.hasPet() and base.localAvatar.getPetId() == self.avId: + self.fsm.request('askingPet') + return if self.avId not in base.cr.doId2do: self.fsm.request('wentAway') return @@ -262,13 +265,12 @@ class FriendInviter(DirectFrame): return Task.done def enterAskingPet(self): - self['text'] = OTPLocalizer.FriendInviterAskingPet % self.getName() - if base.localAvatar.hasPet(): - if base.localAvatar.getPetId() == self.avId: - self['text'] = OTPLocalizer.FriendInviterAskingMyPet % self.getName() + if base.localAvatar.hasPet() and base.localAvatar.getPetId() == self.avId: + self['text'] = OTPLocalizer.FriendInviterAskingMyPet % self.getName() + else: + self['text'] = OTPLocalizer.FriendInviterAskingPet % self.getName() self.context = None self.bOk.show() - return def exitAskingPet(self): self.bOk.hide() diff --git a/toontown/friends/FriendNotifier.py b/toontown/friends/FriendNotifier.py old mode 100644 new mode 100755 diff --git a/toontown/friends/FriendsListManager.py b/toontown/friends/FriendsListManager.py old mode 100644 new mode 100755 index d1f2b06c..0ff6b616 --- a/toontown/friends/FriendsListManager.py +++ b/toontown/friends/FriendsListManager.py @@ -5,7 +5,6 @@ import FriendInvitee import FriendNotifier from direct.directnotify import DirectNotifyGlobal from toontown.toon import ToonTeleportPanel -from toontown.friends import ToontownFriendSecret from toontown.pets import PetAvatarPanel from toontown.toon import ToonAvatarPanel from toontown.suit import SuitAvatarPanel @@ -74,7 +73,6 @@ class FriendsListManager: self.ignore('friendAvatar') self.ignore('avatarDetails') FriendsListPanel.hideFriendsList() - ToontownFriendSecret.hideFriendSecret() if base.cr.friendManager: base.cr.friendManager.setAvailable(0) self.ignore('friendInvitation') diff --git a/toontown/friends/FriendsListPanel.py b/toontown/friends/FriendsListPanel.py old mode 100644 new mode 100755 index b897ce04..f5a792f7 --- a/toontown/friends/FriendsListPanel.py +++ b/toontown/friends/FriendsListPanel.py @@ -3,7 +3,6 @@ from direct.gui.DirectGui import * from pandac.PandaModules import * from direct.fsm import StateData from toontown.toon import ToonAvatarPanel -from toontown.friends import ToontownFriendSecret from toontown.toonbase import ToontownGlobals from toontown.toonbase import TTLocalizer from otp.otpbase import OTPGlobals @@ -139,10 +138,6 @@ class FriendsListPanel(DirectFrame, StateData.StateData): gui.find('**/Horiz_Arrow_Rllvr'), gui.find('**/Horiz_Arrow_UP')), image3_color=Vec4(0.6, 0.6, 0.6, 0.6), pos=(0.17, 0, -0.38), command=self.__right) self.newFriend = DirectButton(parent=self, relief=None, pos=(-0.14, 0.0, 0.14), image=(auxGui.find('**/Frnds_Btn_UP'), auxGui.find('**/Frnds_Btn_DN'), auxGui.find('**/Frnds_Btn_RLVR')), text=('', TTLocalizer.FriendsListPanelNewFriend, TTLocalizer.FriendsListPanelNewFriend), text_scale=TTLocalizer.FLPnewFriend, text_fg=(0, 0, 0, 1), text_bg=(1, 1, 1, 1), text_pos=(0.1, -0.085), textMayChange=0, command=self.__newFriend) - self.secrets = DirectButton(parent=self, relief=None, pos=TTLocalizer.FLPsecretsPos, image=(auxGui.find('**/ChtBx_ChtBtn_UP'), auxGui.find('**/ChtBx_ChtBtn_DN'), auxGui.find('**/ChtBx_ChtBtn_RLVR')), text=('', - TTLocalizer.FriendsListPanelSecrets, - TTLocalizer.FriendsListPanelSecrets, - ''), text_scale=TTLocalizer.FLPsecrets, text_fg=(0, 0, 0, 1), text_bg=(1, 1, 1, 1), text_pos=(-0.04, -0.085), textMayChange=0, command=self.__secrets) gui.removeNode() auxGui.removeNode() return @@ -245,10 +240,6 @@ class FriendsListPanel(DirectFrame, StateData.StateData): self.__updateTitle() self.__updateArrows() - def __secrets(self): - messenger.send('wakeup') - ToontownFriendSecret.showFriendSecret() - def __newFriend(self): messenger.send('wakeup') messenger.send('friendAvatar', [None, None, None]) diff --git a/toontown/friends/TTUFriendsManager.py b/toontown/friends/TTSFriendsManager.py old mode 100644 new mode 100755 similarity index 93% rename from toontown/friends/TTUFriendsManager.py rename to toontown/friends/TTSFriendsManager.py index 87237c36..2dead968 --- a/toontown/friends/TTUFriendsManager.py +++ b/toontown/friends/TTSFriendsManager.py @@ -2,7 +2,7 @@ from direct.distributed.DistributedObjectGlobal import DistributedObjectGlobal from otp.otpbase import OTPLocalizer from toontown.hood import ZoneUtil -class TTUFriendsManager(DistributedObjectGlobal): +class TTSFriendsManager(DistributedObjectGlobal): def d_removeFriend(self, friendId): self.sendUpdate('removeFriend', [friendId]) @@ -131,18 +131,6 @@ class TTUFriendsManager(DistributedObjectGlobal): if toon: base.localAvatar.setTalkWhisper(fromId, 0, toon.getName(), message, [], 0) - def d_requestSecret(self): - self.sendUpdate('requestSecret', []) - - def requestSecretResponse(self, result, secret): - messenger.send('requestSecretResponse', [result, secret]) - - def d_submitSecret(self, secret): - self.sendUpdate('submitSecret', [secret]) - - def submitSecretResponse(self, result, avId): - messenger.send('submitSecretResponse', [result, avId]) - def d_battleSOS(self, toId): self.sendUpdate('battleSOS', [toId]) diff --git a/toontown/friends/TTUFriendsManagerUD.py b/toontown/friends/TTSFriendsManagerUD.py old mode 100644 new mode 100755 similarity index 93% rename from toontown/friends/TTUFriendsManagerUD.py rename to toontown/friends/TTSFriendsManagerUD.py index 168458ab..75b23311 --- a/toontown/friends/TTUFriendsManagerUD.py +++ b/toontown/friends/TTSFriendsManagerUD.py @@ -1,12 +1,8 @@ +from direct.directnotify.DirectNotifyGlobal import directNotify from direct.distributed.DistributedObjectGlobalUD import DistributedObjectGlobalUD from direct.distributed.PyDatagram import * -from direct.task import Task -from direct.directnotify.DirectNotifyGlobal import directNotify -import string -import random -import functools -import time from direct.fsm.FSM import FSM +import time # -- FSMS -- class OperationFSM(FSM): @@ -189,8 +185,8 @@ class ClearListOperation(OperationFSM): # -- FriendsManager -- -class TTUFriendsManagerUD(DistributedObjectGlobalUD): - notify = directNotify.newCategory('TTUFriendsManagerUD') +class TTSFriendsManagerUD(DistributedObjectGlobalUD): + notify = directNotify.newCategory('TTSFriendsManagerUD') def announceGenerate(self): DistributedObjectGlobalUD.announceGenerate(self) @@ -199,7 +195,6 @@ class TTUFriendsManagerUD(DistributedObjectGlobalUD): self.tpRequests = {} self.whisperRequests = {} self.operations = [] - self.secret2avId = {} self.delayTime = 1.0 # -- Friends list -- @@ -397,31 +392,6 @@ class TTUFriendsManagerUD(DistributedObjectGlobalUD): self.sendUpdateToAvatarId(toId, 'receiveTalkWhisper', [fromId, message]) self.air.writeServerEvent('whisper-said', fromId, toId, message) - # -- Secret Friends -- - def requestSecret(self): - avId = self.air.getAvatarIdFromSender() - allowed = string.lowercase + string.digits - secret = '' - for i in xrange(6): - secret += random.choice(allowed) - if i == 2: - secret += ' ' - self.secret2avId[secret] = avId - self.sendUpdateToAvatarId(avId, 'requestSecretResponse', [1, secret]) - - def submitSecret(self, secret): - requester = self.air.getAvatarIdFromSender() - owner = self.secret2avId.get(secret) - if not owner: - self.sendUpdateToAvatarId(requester, 'submitSecretResponse', [0, 0]) - return - if owner == requester: - del self.secret2avId[secret] - self.sendUpdateToAvatarId(requester, 'submitSecretResponse', [3, 0]) - return - - self.sendUpdateToAvatarId(requester, 'submitSecretResponse', [5, 0]) - # -- Routes -- def battleSOS(self, toId): requester = self.air.getAvatarIdFromSender() diff --git a/toontown/friends/ToontownFriendSecret.py b/toontown/friends/ToontownFriendSecret.py deleted file mode 100644 index affb37d7..00000000 --- a/toontown/friends/ToontownFriendSecret.py +++ /dev/null @@ -1,197 +0,0 @@ -from pandac.PandaModules import * -from direct.gui.DirectGui import * -from direct.directnotify import DirectNotifyGlobal -from toontown.toonbase import TTLocalizer -from otp.otpbase import OTPGlobals -from toontown.nametag import NametagGlobals - -globalFriendSecret = None - -def showFriendSecret(): - global globalFriendSecret - if not settings['trueFriends']: - chatMgr = base.localAvatar.chatMgr - chatMgr.fsm.request('noSecretChatAtAll') - else: - if globalFriendSecret != None: - globalFriendSecret.unload() - globalFriendSecret = ToontownFriendSecret() - globalFriendSecret.enter() - -def hideFriendSecret(): - if globalFriendSecret != None: - globalFriendSecret.exit() - -def unloadFriendSecret(): - global globalFriendSecret - if globalFriendSecret != None: - globalFriendSecret.unload() - globalFriendSecret = None - return - -class ToontownFriendSecret(DirectFrame): - notify = DirectNotifyGlobal.directNotify.newCategory('ToontownFriendSecret') - - def __init__(self): - DirectFrame.__init__(self, parent=aspect2dp, pos=(0, 0, 0.3), relief=None, image=DGG.getDefaultDialogGeom(), image_scale=(1.6, 1, 1.4), image_pos=(0, 0, -0.05), image_color=OTPGlobals.GlobalDialogColor, borderWidth=(0.01, 0.01)) - self.initialiseoptions(ToontownFriendSecret) - self.isLoaded = 0 - self.isEntered = 0 - - def unload(self): - if self.isLoaded == 0: - return None - self.isLoaded = 0 - self.exit() - del self.introText - del self.getSecret - del self.enterSecretText - del self.enterSecret - del self.ok1 - del self.ok2 - del self.cancel - del self.secretText - DirectFrame.destroy(self) - return None - - def load(self): - if self.isLoaded == 1: - return None - self.isLoaded = 1 - self.introText = DirectLabel(parent=self, relief=None, pos=(0, 0, 0.4), scale=0.05, text=TTLocalizer.FriendSecretIntro, text_fg=(0, 0, 0, 1), text_wordwrap=30) - self.introText.hide() - guiButton = loader.loadModel('phase_3/models/gui/quit_button') - self.getSecret = DirectButton(parent=self, relief=None, pos=(0, 0, -0.11), image=(guiButton.find('**/QuitBtn_UP'), guiButton.find('**/QuitBtn_DN'), guiButton.find('**/QuitBtn_RLVR')), image_scale=TTLocalizer.FSgetSecret, text=TTLocalizer.FriendSecretGetSecret, text_scale=TTLocalizer.FSgetSecretButton, text_pos=(0, -0.02), command=self.__getSecret) - self.getSecret.hide() - self.enterSecretText = DirectLabel(parent=self, relief=None, pos=TTLocalizer.FSenterSecretTextPos, scale=0.05, text=TTLocalizer.FriendSecretEnterSecret, text_fg=(0, 0, 0, 1), text_wordwrap=30) - self.enterSecretText.hide() - self.enterSecret = DirectEntry(parent=self, relief=DGG.SUNKEN, scale=0.06, pos=(-0.6, 0, -0.38), frameColor=(0.8, 0.8, 0.5, 1), borderWidth=(0.1, 0.1), numLines=1, width=20, frameSize=(-0.4, - 20.4, - -0.4, - 1.1), command=self.__enterSecret) - self.enterSecret.resetFrameSize() - self.enterSecret.hide() - self.ok1 = DirectButton(parent=self, relief=None, image=(guiButton.find('**/QuitBtn_UP'), guiButton.find('**/QuitBtn_DN'), guiButton.find('**/QuitBtn_RLVR')), image_scale=TTLocalizer.FSok1, text=TTLocalizer.FriendSecretEnter, text_scale=0.06, text_pos=(0, -0.02), pos=(0, 0, -0.5), command=self.__ok1) - self.ok1.hide() - self.ok2 = DirectButton(parent=self, relief=None, image=(guiButton.find('**/QuitBtn_UP'), guiButton.find('**/QuitBtn_DN'), guiButton.find('**/QuitBtn_RLVR')), image_scale=TTLocalizer.FSok2, text=TTLocalizer.FriendSecretOK, text_scale=0.06, text_pos=(0, -0.02), pos=(0, 0, -0.57), command=self.__ok2) - self.ok2.hide() - self.cancel = DirectButton(parent=self, relief=None, text=TTLocalizer.FriendSecretCancel, image=(guiButton.find('**/QuitBtn_UP'), guiButton.find('**/QuitBtn_DN'), guiButton.find('**/QuitBtn_RLVR')), image_scale=TTLocalizer.FScancel, text_scale=0.06, text_pos=(0, -0.02), pos=(0, 0, -0.57), command=self.__cancel) - self.cancel.hide() - self.nextText = DirectLabel(parent=self, relief=None, pos=(0, 0, 0.3), scale=0.06, text='', text_scale=TTLocalizer.FSnextText, text_fg=(0, 0, 0, 1), text_wordwrap=25.5) - self.nextText.hide() - self.secretText = DirectLabel(parent=self, relief=None, pos=(0, 0, -0.42), scale=0.08, text='', text_fg=(0, 0, 0, 1), text_wordwrap=30) - self.secretText.hide() - guiButton.removeNode() - - def enter(self): - if self.isEntered == 1: - return - self.isEntered = 1 - if self.isLoaded == 0: - self.load() - self.show() - self.introText.show() - self.getSecret.show() - self.enterSecretText.show() - self.enterSecret.show() - self.ok1.show() - self.ok2.hide() - self.cancel.hide() - self.nextText.hide() - self.secretText.hide() - base.localAvatar.chatMgr.fsm.request('otherDialog') - self.enterSecret['focus'] = 1 - NametagGlobals.setForceOnscreenChat(True) - - def exit(self): - if self.isEntered == 0: - return - self.isEntered = 0 - NametagGlobals.setForceOnscreenChat(False) - self.__cleanupFirstPage() - self.hide() - - def __getSecret(self): - self.__cleanupFirstPage() - self.nextText['text'] = TTLocalizer.FriendSecretGettingSecret - self.nextText.setPos(0, 0, 0.3) - self.nextText.show() - self.ok1.hide() - self.cancel.show() - base.cr.trueFriendsMgr.requestId(self.gotSecret) - - def gotSecret(self, id, result1, result2): - if id == 0: - self.rejectGetSecret(TTLocalizer.FriendSecretNoServer) - elif id == 1: - self.rejectGetSecret(TTLocalizer.FriendSecretNoServerResponse if not result1 else result1) - elif id == 2: - self.successGetSecret(result1, result2) - - def rejectGetSecret(self, reason): - self.nextText['text'] = reason - self.nextText.show() - self.secretText.show() - self.cancel.hide() - self.ok1.hide() - self.ok2.show() - - def successGetSecret(self, secret, expires): - self.nextText['text'] = TTLocalizer.FriendSecretGotSecret % expires - self.nextText.setPos(*TTLocalizer.FSgotSecretPos) - self.secretText['text'] = secret - self.nextText.show() - self.secretText.show() - self.cancel.hide() - self.ok1.hide() - self.ok2.show() - - def __enterSecret(self, secret): - self.enterSecret.set('') - secret = secret.strip() - - if not secret: - self.exit() - return - - self.__cleanupFirstPage() - self.nextText['text'] = TTLocalizer.FriendSecretTryingSecret - base.cr.trueFriendsMgr.redeemId(secret, self.gotResponse) - self.nextText.setPos(0, 0, 0.3) - self.nextText.show() - self.cancel.hide() - self.ok1.hide() - self.ok2.show() - - def gotResponse(self, id, name): - if id == 0: - self.nextText['text'] = TTLocalizer.FriendSecretNoServer - elif id == 1: - self.nextText['text'] = TTLocalizer.FriendSecretNoServerResponse if not result1 else result1 - elif id == 2: - self.nextText['text'] = TTLocalizer.FriendSecretEnteredCodeSelf - elif id == 3: - self.nextText['text'] = TTLocalizer.FriendSecretAlreadyTrueFriend - elif id == 4: - self.nextText['text'] = TTLocalizer.FriendSecretSuccess % name - self.nextText.show() - self.cancel.hide() - self.ok1.hide() - self.ok2.show() - - def __ok1(self): - secret = self.enterSecret.get() - self.__enterSecret(secret) - - def __ok2(self): - self.exit() - - def __cancel(self): - self.exit() - - def __cleanupFirstPage(self): - self.introText.hide() - self.getSecret.hide() - self.enterSecretText.hide() - self.enterSecret.hide() - base.localAvatar.chatMgr.fsm.request('mainMenu') diff --git a/toontown/friends/TrueFriendsMgr.py b/toontown/friends/TrueFriendsMgr.py deleted file mode 100644 index aeafa92f..00000000 --- a/toontown/friends/TrueFriendsMgr.py +++ /dev/null @@ -1,34 +0,0 @@ -from direct.distributed.DistributedObject import DistributedObject -from direct.directnotify.DirectNotifyGlobal import directNotify - -class TrueFriendsMgr(DistributedObject): - neverDisable = 1 - notify = directNotify.newCategory('TrueFriendsMgr') - - def __init__(self, cr): - DistributedObject.__init__(self, cr) - self.requestCallback = None - self.redeemCallback = None - - def announceGenerate(self): - DistributedObject.announceGenerate(self) - base.cr.trueFriendsMgr = self - - def delete(self): - if hasattr(base.cr, 'trueFriendsMgr'): - del base.cr.trueFriendsMgr - DistributedObject.delete(self) - - def requestId(self, callback): - self.requestCallback = callback - self.sendUpdate('requestId') - - def redeemId(self, id, callback): - self.redeemCallback = callback - self.sendUpdate('redeemId', [id]) - - def requestIdResult(self, id, result1, result2): - self.requestCallback(id, result1, result2) - - def redeemIdResult(self, id, name): - self.redeemCallback(id, name) \ No newline at end of file diff --git a/toontown/friends/TrueFriendsMgrAI.py b/toontown/friends/TrueFriendsMgrAI.py deleted file mode 100644 index a2c30a49..00000000 --- a/toontown/friends/TrueFriendsMgrAI.py +++ /dev/null @@ -1,90 +0,0 @@ -from direct.directnotify import DirectNotifyGlobal -from direct.distributed.DistributedObjectAI import DistributedObjectAI -from toontown.uberdog.ClientServicesManagerUD import executeHttpRequestAndLog - -class TrueFriendsMgrAI(DistributedObjectAI): - notify = DirectNotifyGlobal.directNotify.newCategory("TrueFriendsMgrAI") - - def announceGenerate(self): - DistributedObjectAI.announceGenerate(self) - - def requestId(self): - avId = self.air.getAvatarIdFromSender() - av = self.air.doId2do.get(avId) - - if not av: - return - - if config.GetString('accountdb-type', 'developer') != 'remote': - self.sendUpdateToAvatarId(avId, 'requestIdResult', [0, None, None]) - return - - result = executeHttpRequestAndLog('truefriend', avid=avId) - - if result is None: - self.sendUpdateToAvatarId(avId, 'requestIdResult', [1, None, None]) - return - elif 'error' in result: - self.sendUpdateToAvatarId(avId, 'requestIdResult', [1, result['error'], None]) - return - - self.sendUpdateToAvatarId(avId, 'requestIdResult', [2, result['id'], result['expires']]) - - def redeemId(self, id): - avId = self.air.getAvatarIdFromSender() - av = self.air.doId2do.get(avId) - - if not av: - return - - if simbase.config.GetString('accountdb-type', 'developer') != 'remote': - self.sendUpdateToAvatarId(avId, 'redeemIdResult', [0, None]) - return - - result = executeHttpRequestAndLog('truefriend', id=id) - - if result is None: - self.sendUpdateToAvatarId(avId, 'redeemIdResult', [1, None]) - return - elif 'error' in result: - self.sendUpdateToAvatarId(avId, 'redeemIdResult', [1, result['error']]) - return - - targetId = int(result['avId']) - - if targetId == avId: - self.sendUpdateToAvatarId(avId, 'redeemIdResult', [2, None]) - return - elif av.isTrueFriend(targetId): - self.sendUpdateToAvatarId(avId, 'redeemIdResult', [3, None]) - return - - av.addTrueFriend(targetId) - target = self.air.doId2do.get(targetId) - - if target: - target.addTrueFriend(avId) - self.sendUpdateToAvatarId(avId, 'redeemIdResult', [4, target.getName()]) - else: - TrueFriendsOperation(targetId, avId) - -class TrueFriendsOperation: - - def __init__(self, targetId, avId): - self.targetId = targetId - self.avId = avId - simbase.air.dbInterface.queryObject(simbase.air.dbId, self.targetId, self.gotResponse) - - def gotResponse(self, dclass, fields): - if dclass != simbase.air.dclassesByName['DistributedToonAI'] or not 'setName' in fields: - return - - trueFriends = fields['setTrueFriends'] - - if self.avId in trueFriends: - self.sendUpdateToAvatarId(self.avId, 'redeemIdResult', [3, None]) - return - - trueFriends.append(self.avId) - simbase.air.dbInterface.updateObject(simbase.air.dbId, self.targetId, simbase.air.dclassesByName['DistributedToonAI'], {'setTrueFriends': [trueFriends]}) - self.sendUpdateToAvatarId(self.avId, 'redeemIdResult', [4, fields['setName']]) \ No newline at end of file diff --git a/toontown/friends/__init__.py b/toontown/friends/__init__.py old mode 100644 new mode 100755 diff --git a/toontown/golf/BuildGeometry.py b/toontown/golf/BuildGeometry.py old mode 100644 new mode 100755 diff --git a/toontown/golf/DistributedGolfCourse.py b/toontown/golf/DistributedGolfCourse.py old mode 100644 new mode 100755 diff --git a/toontown/golf/DistributedGolfCourseAI.py b/toontown/golf/DistributedGolfCourseAI.py old mode 100644 new mode 100755 diff --git a/toontown/golf/DistributedGolfHole.py b/toontown/golf/DistributedGolfHole.py old mode 100644 new mode 100755 diff --git a/toontown/golf/DistributedGolfHoleAI.py b/toontown/golf/DistributedGolfHoleAI.py old mode 100644 new mode 100755 diff --git a/toontown/golf/DistributedPhysicsWorld.py b/toontown/golf/DistributedPhysicsWorld.py old mode 100644 new mode 100755 diff --git a/toontown/golf/DistributedPhysicsWorldAI.py b/toontown/golf/DistributedPhysicsWorldAI.py old mode 100644 new mode 100755 diff --git a/toontown/golf/GolfGlobals.py b/toontown/golf/GolfGlobals.py old mode 100644 new mode 100755 diff --git a/toontown/golf/GolfHoleBase.py b/toontown/golf/GolfHoleBase.py old mode 100644 new mode 100755 diff --git a/toontown/golf/GolfManagerAI.py b/toontown/golf/GolfManagerAI.py old mode 100644 new mode 100755 diff --git a/toontown/golf/GolfRewardDialog.py b/toontown/golf/GolfRewardDialog.py old mode 100644 new mode 100755 diff --git a/toontown/golf/GolfScoreBoard.py b/toontown/golf/GolfScoreBoard.py old mode 100644 new mode 100755 diff --git a/toontown/golf/PhysicsWorldBase.py b/toontown/golf/PhysicsWorldBase.py old mode 100644 new mode 100755 diff --git a/toontown/golf/__init__.py b/toontown/golf/__init__.py old mode 100644 new mode 100755 diff --git a/toontown/groups/GlobalGroup.py b/toontown/groups/GlobalGroup.py old mode 100644 new mode 100755 diff --git a/toontown/groups/GroupManager.py b/toontown/groups/GroupManager.py old mode 100644 new mode 100755 diff --git a/toontown/groups/GroupManagerAI.py b/toontown/groups/GroupManagerAI.py old mode 100644 new mode 100755 diff --git a/toontown/groups/GroupManagerUD.py b/toontown/groups/GroupManagerUD.py old mode 100644 new mode 100755 diff --git a/toontown/groups/__init__.py b/toontown/groups/__init__.py old mode 100644 new mode 100755 diff --git a/toontown/hood/AnimatedProp.py b/toontown/hood/AnimatedProp.py old mode 100644 new mode 100755 diff --git a/toontown/hood/BRHood.py b/toontown/hood/BRHood.py old mode 100644 new mode 100755 diff --git a/toontown/hood/BRHoodAI.py b/toontown/hood/BRHoodAI.py old mode 100644 new mode 100755 diff --git a/toontown/hood/BossbotHQ.py b/toontown/hood/BossbotHQ.py old mode 100644 new mode 100755 diff --git a/toontown/hood/BossbotHQAI.py b/toontown/hood/BossbotHQAI.py old mode 100644 new mode 100755 diff --git a/toontown/hood/CashbotHQ.py b/toontown/hood/CashbotHQ.py old mode 100644 new mode 100755 diff --git a/toontown/hood/CashbotHQAI.py b/toontown/hood/CashbotHQAI.py old mode 100644 new mode 100755 diff --git a/toontown/hood/CogHQAI.py b/toontown/hood/CogHQAI.py old mode 100644 new mode 100755 diff --git a/toontown/hood/CogHood.py b/toontown/hood/CogHood.py old mode 100644 new mode 100755 diff --git a/toontown/hood/DDHood.py b/toontown/hood/DDHood.py old mode 100644 new mode 100755 diff --git a/toontown/hood/DDHoodAI.py b/toontown/hood/DDHoodAI.py old mode 100644 new mode 100755 diff --git a/toontown/hood/DGHood.py b/toontown/hood/DGHood.py old mode 100644 new mode 100755 diff --git a/toontown/hood/DGHoodAI.py b/toontown/hood/DGHoodAI.py old mode 100644 new mode 100755 diff --git a/toontown/hood/DLHood.py b/toontown/hood/DLHood.py old mode 100644 new mode 100755 diff --git a/toontown/hood/DLHoodAI.py b/toontown/hood/DLHoodAI.py old mode 100644 new mode 100755 diff --git a/toontown/hood/EstateHood.py b/toontown/hood/EstateHood.py old mode 100644 new mode 100755 diff --git a/toontown/hood/FishAnimatedProp.py b/toontown/hood/FishAnimatedProp.py old mode 100644 new mode 100755 diff --git a/toontown/hood/GSHood.py b/toontown/hood/GSHood.py old mode 100644 new mode 100755 index 88978a6a..83cfd0fe --- a/toontown/hood/GSHood.py +++ b/toontown/hood/GSHood.py @@ -2,7 +2,6 @@ from toontown.safezone.GSSafeZoneLoader import GSSafeZoneLoader from toontown.toonbase import ToontownGlobals from toontown.hood.ToonHood import ToonHood - class GSHood(ToonHood): notify = directNotify.newCategory('GSHood') @@ -13,9 +12,6 @@ class GSHood(ToonHood): SPOOKY_SKY_FILE = 'phase_3.5/models/props/BR_sky' TITLE_COLOR = (1.0, 0.5, 0.4, 1.0) - HOLIDAY_DNA = { - ToontownGlobals.CRASHED_LEADERBOARD: ['phase_6/dna/crashed_leaderboard_storage_GS.pdna']} - def enter(self, requestStatus): ToonHood.enter(self, requestStatus) diff --git a/toontown/hood/GSHoodAI.py b/toontown/hood/GSHoodAI.py old mode 100644 new mode 100755 diff --git a/toontown/hood/GZHood.py b/toontown/hood/GZHood.py old mode 100644 new mode 100755 diff --git a/toontown/hood/GZHoodAI.py b/toontown/hood/GZHoodAI.py old mode 100644 new mode 100755 diff --git a/toontown/hood/GenericAnimatedProp.py b/toontown/hood/GenericAnimatedProp.py old mode 100644 new mode 100755 index d439b675..c8f68d69 --- a/toontown/hood/GenericAnimatedProp.py +++ b/toontown/hood/GenericAnimatedProp.py @@ -46,7 +46,19 @@ class GenericAnimatedProp(AnimatedProp.AnimatedProp): def enter(self): self.node.postFlatten() AnimatedProp.AnimatedProp.enter(self) - self.node.loop('anim') + doAnimLoop = True + try: + if type(self).__name__ == 'instance': + if self.__class__.__name__ == 'GenericAnimatedProp': + if base.cr.newsManager.isHolidayRunning(ToontownGlobals.HYDRANTS_BUFF_BATTLES): + doAnimLoop = True + else: + doAnimLoop = False + except: + pass + + if doAnimLoop: + self.node.loop('anim') def exit(self): AnimatedProp.AnimatedProp.exit(self) diff --git a/toontown/hood/HQPeriscopeAnimatedProp.py b/toontown/hood/HQPeriscopeAnimatedProp.py old mode 100644 new mode 100755 diff --git a/toontown/hood/HQTelescopeAnimatedProp.py b/toontown/hood/HQTelescopeAnimatedProp.py old mode 100644 new mode 100755 diff --git a/toontown/hood/Hood.py b/toontown/hood/Hood.py old mode 100644 new mode 100755 diff --git a/toontown/hood/HoodAI.py b/toontown/hood/HoodAI.py old mode 100644 new mode 100755 diff --git a/toontown/hood/HoodUtil.py b/toontown/hood/HoodUtil.py old mode 100644 new mode 100755 diff --git a/toontown/hood/HydrantInteractiveProp.py b/toontown/hood/HydrantInteractiveProp.py old mode 100644 new mode 100755 index 15463bce..7ce722b9 --- a/toontown/hood/HydrantInteractiveProp.py +++ b/toontown/hood/HydrantInteractiveProp.py @@ -2,94 +2,235 @@ from direct.actor import Actor from direct.directnotify import DirectNotifyGlobal from direct.interval.IntervalGlobal import Sequence, Func from toontown.hood import InteractiveAnimatedProp +from toontown.hood import GenericAnimatedProp from toontown.toonbase import ToontownGlobals, ToontownBattleGlobals, TTLocalizer class HydrantInteractiveProp(InteractiveAnimatedProp.InteractiveAnimatedProp): notify = DirectNotifyGlobal.directNotify.newCategory('HydrantInteractiveProp') - BattleTrack = ToontownBattleGlobals.SQUIRT_TRACK - BattleCheerText = TTLocalizer.InteractivePropTrackBonusTerms[BattleTrack] - - ZoneToIdles = { - ToontownGlobals.ToontownCentral: (('tt_a_ara_ttc_hydrant_idle0', 1, 1, None, 3, 10), - ('tt_a_ara_ttc_hydrant_idle2', 1, 1, None, 3, 10), - ('tt_a_ara_ttc_hydrant_idle1', 1, 1, None, 3, 10), - ('tt_a_ara_ttc_hydrant_idleAwesome3', 1, 1, None, 3, 10)), - ToontownGlobals.DonaldsDock: (('tt_a_ara_ttc_hydrant_idle0', 1, 1, None, 3, 10), - ('tt_a_ara_ttc_hydrant_idle2', 1, 1, None, 3, 10), - ('tt_a_ara_ttc_hydrant_idle1', 1, 1, None, 3, 10), - ('tt_a_ara_ttc_hydrant_idleAwesome3', 1, 1, None, 3, 10)), - ToontownGlobals.DaisyGardens: (('tt_a_ara_dga_hydrant_idle0', 3, 10, 'tt_a_ara_dga_hydrant_idle0settle', 3, 10), - ('tt_a_ara_dga_hydrant_idleLook1', 1, 1, None, 3, 10), - ('tt_a_ara_dga_hydrant_idleSneeze2', 1, 1, None, 3, 10), - ('tt_a_ara_dga_hydrant_idleAwesome3', 1, 1, None, 3, 10)), - ToontownGlobals.MinniesMelodyland: (('tt_a_ara_mml_hydrant_idle0', 3, 10, 'tt_a_ara_mml_hydrant_idle0settle', 3, 10), - ('tt_a_ara_mml_hydrant_idle2', 3, 10, 'tt_a_ara_mml_hydrant_idle2settle', 3, 10), - ('tt_a_ara_mml_hydrant_idle1', 3, 10, 'tt_a_ara_mml_hydrant_idle1settle', 3, 10), - ('tt_a_ara_mml_hydrant_idleAwesome3', 1, 1, None, 3, 10)), - ToontownGlobals.TheBrrrgh: (('tt_a_ara_tbr_hydrant_idleShiver1', 1, 1, None, 3, 10), - ('tt_a_ara_tbr_hydrant_idleRubNose0', 1, 1, None, 3, 10), - ('tt_a_ara_tbr_hydrant_idleSneeze2', 1, 1, None, 3, 10), - ('tt_a_ara_tbr_hydrant_idleAwesome3', 1, 1, None, 3, 10)), - ToontownGlobals.DonaldsDreamland: (('tt_a_ara_ddl_hydrant_idle0', 3, 10, None, 0, 0), - ('tt_a_ara_ddl_hydrant_idle1', 1, 1, None, 0, 0), - ('tt_a_ara_ddl_hydrant_idle2', 1, 1, None, 0, 0), - ('tt_a_ara_ddl_hydrant_idleAwesome3', 1, 1, None, 0, 0))} - - ZoneToIdleIntoFightAnims = { - ToontownGlobals.ToontownCentral: 'tt_a_ara_ttc_hydrant_idleIntoFight', - ToontownGlobals.DonaldsDock: 'tt_a_ara_ttc_hydrant_idleIntoFight', - ToontownGlobals.DaisyGardens: 'tt_a_ara_dga_hydrant_idleIntoFight', - ToontownGlobals.MinniesMelodyland: 'tt_a_ara_mml_hydrant_idleIntoFight', - ToontownGlobals.TheBrrrgh: 'tt_a_ara_tbr_hydrant_idleIntoFight', - ToontownGlobals.DonaldsDreamland: 'tt_a_ara_ddl_hydrant_idleIntoFight'} - - ZoneToVictoryAnims = { - ToontownGlobals.ToontownCentral: 'tt_a_ara_ttc_hydrant_victoryDance', - ToontownGlobals.DonaldsDock: 'tt_a_ara_ttc_hydrant_victoryDance', - ToontownGlobals.DaisyGardens: 'tt_a_ara_dga_hydrant_victoryDance', - ToontownGlobals.MinniesMelodyland: 'tt_a_ara_mml_hydrant_victoryDance', - ToontownGlobals.TheBrrrgh: 'tt_a_ara_tbr_hydrant_victoryDance', - ToontownGlobals.DonaldsDreamland: 'tt_a_ara_ddl_hydrant_victoryDance'} - - ZoneToSadAnims = { - ToontownGlobals.ToontownCentral: 'tt_a_ara_ttc_hydrant_fightSad', - ToontownGlobals.DonaldsDock: 'tt_a_ara_ttc_hydrant_fightSad', - ToontownGlobals.DaisyGardens: 'tt_a_ara_dga_hydrant_fightSad', - ToontownGlobals.MinniesMelodyland: 'tt_a_ara_mml_hydrant_fightSad', - ToontownGlobals.TheBrrrgh: 'tt_a_ara_tbr_hydrant_fightSad', - ToontownGlobals.DonaldsDreamland: 'tt_a_ara_ddl_hydrant_fightSad'} - - ZoneToFightAnims = { - ToontownGlobals.ToontownCentral: ('tt_a_ara_ttc_hydrant_fightBoost', 'tt_a_ara_ttc_hydrant_fightCheer', 'tt_a_ara_ttc_hydrant_fightIdle'), - ToontownGlobals.DonaldsDock: ('tt_a_ara_ttc_hydrant_fightBoost', 'tt_a_ara_ttc_hydrant_fightCheer', 'tt_a_ara_ttc_hydrant_fightIdle'), - ToontownGlobals.DaisyGardens: ('tt_a_ara_dga_hydrant_fightBoost', 'tt_a_ara_dga_hydrant_fightCheer', 'tt_a_ara_dga_hydrant_fightIdle'), - ToontownGlobals.MinniesMelodyland: ('tt_a_ara_mml_hydrant_fightBoost', 'tt_a_ara_mml_hydrant_fightCheer', 'tt_a_ara_mml_hydrant_fightIdle'), - ToontownGlobals.TheBrrrgh: ('tt_a_ara_tbr_hydrant_fightBoost', 'tt_a_ara_tbr_hydrant_fightCheer', 'tt_a_ara_tbr_hydrant_fightIdle'), - ToontownGlobals.DonaldsDreamland: ('tt_a_ara_ddl_hydrant_fightBoost', 'tt_a_ara_ddl_hydrant_fightCheer', 'tt_a_ara_ddl_hydrant_fightIdle')} - + BattleCheerText = TTLocalizer.InteractivePropTrackBonusTerms[ToontownBattleGlobals.SQUIRT_TRACK] + ZoneToIdles = {ToontownGlobals.ToontownCentral: (('tt_a_ara_ttc_hydrant_idle0', + 1, + 1, + None, + 3, + 10), + ('tt_a_ara_ttc_hydrant_idle2', + 1, + 1, + None, + 3, + 10), + ('tt_a_ara_ttc_hydrant_idle1', + 1, + 1, + None, + 3, + 10), + ('tt_a_ara_ttc_hydrant_idleAwesome3', + 1, + 1, + None, + 3, + 10)), + ToontownGlobals.FunnyFarm: (('tt_a_ara_ttc_hydrant_idle0', + 1, + 1, + None, + 3, + 10), + ('tt_a_ara_ttc_hydrant_idle2', + 1, + 1, + None, + 3, + 10), + ('tt_a_ara_ttc_hydrant_idle1', + 1, + 1, + None, + 3, + 10), + ('tt_a_ara_ttc_hydrant_idleAwesome3', + 1, + 1, + None, + 3, + 10)), + ToontownGlobals.DonaldsDock: (('tt_a_ara_ttc_hydrant_idle0', + 1, + 1, + None, + 3, + 10), + ('tt_a_ara_ttc_hydrant_idle2', + 1, + 1, + None, + 3, + 10), + ('tt_a_ara_ttc_hydrant_idle1', + 1, + 1, + None, + 3, + 10), + ('tt_a_ara_ttc_hydrant_idleAwesome3', + 1, + 1, + None, + 3, + 10)), + ToontownGlobals.DaisyGardens: (('tt_a_ara_dga_hydrant_idle0', + 3, + 10, + 'tt_a_ara_dga_hydrant_idle0settle', + 3, + 10), + ('tt_a_ara_dga_hydrant_idleLook1', + 1, + 1, + None, + 3, + 10), + ('tt_a_ara_dga_hydrant_idleSneeze2', + 1, + 1, + None, + 3, + 10), + ('tt_a_ara_dga_hydrant_idleAwesome3', + 1, + 1, + None, + 3, + 10)), + ToontownGlobals.MinniesMelodyland: (('tt_a_ara_mml_hydrant_idle0', + 3, + 10, + 'tt_a_ara_mml_hydrant_idle0settle', + 3, + 10), + ('tt_a_ara_mml_hydrant_idle2', + 3, + 10, + 'tt_a_ara_mml_hydrant_idle2settle', + 3, + 10), + ('tt_a_ara_mml_hydrant_idle1', + 3, + 10, + 'tt_a_ara_mml_hydrant_idle1settle', + 3, + 10), + ('tt_a_ara_mml_hydrant_idleAwesome3', + 1, + 1, + None, + 3, + 10)), + ToontownGlobals.TheBrrrgh: (('tt_a_ara_tbr_hydrant_idleShiver1', + 1, + 1, + None, + 3, + 10), + ('tt_a_ara_tbr_hydrant_idleRubNose0', + 1, + 1, + None, + 3, + 10), + ('tt_a_ara_tbr_hydrant_idleSneeze2', + 1, + 1, + None, + 3, + 10), + ('tt_a_ara_tbr_hydrant_idleAwesome3', + 1, + 1, + None, + 3, + 10)), + ToontownGlobals.DonaldsDreamland: (('tt_a_ara_ddl_hydrant_idle0', + 3, + 10, + None, + 0, + 0), + ('tt_a_ara_ddl_hydrant_idle1', + 1, + 1, + None, + 0, + 0), + ('tt_a_ara_ddl_hydrant_idle2', + 1, + 1, + None, + 0, + 0), + ('tt_a_ara_ddl_hydrant_idleAwesome3', + 1, + 1, + None, + 0, + 0))} + ZoneToIdleIntoFightAnims = {ToontownGlobals.ToontownCentral: 'tt_a_ara_ttc_hydrant_idleIntoFight', + ToontownGlobals.FunnyFarm: 'tt_a_ara_ddl_hydrant_idleIntoFight', + ToontownGlobals.DonaldsDock: 'tt_a_ara_ttc_hydrant_idleIntoFight', + ToontownGlobals.DaisyGardens: 'tt_a_ara_dga_hydrant_idleIntoFight', + ToontownGlobals.MinniesMelodyland: 'tt_a_ara_mml_hydrant_idleIntoFight', + ToontownGlobals.TheBrrrgh: 'tt_a_ara_tbr_hydrant_idleIntoFight', + ToontownGlobals.DonaldsDreamland: 'tt_a_ara_ddl_hydrant_idleIntoFight'} + ZoneToVictoryAnims = {ToontownGlobals.ToontownCentral: 'tt_a_ara_ttc_hydrant_victoryDance', + ToontownGlobals.FunnyFarm: 'tt_a_ara_ttc_hydrant_victoryDance', + ToontownGlobals.DonaldsDock: 'tt_a_ara_ttc_hydrant_victoryDance', + ToontownGlobals.DaisyGardens: 'tt_a_ara_dga_hydrant_victoryDance', + ToontownGlobals.MinniesMelodyland: 'tt_a_ara_mml_hydrant_victoryDance', + ToontownGlobals.TheBrrrgh: 'tt_a_ara_tbr_hydrant_victoryDance', + ToontownGlobals.DonaldsDreamland: 'tt_a_ara_ddl_hydrant_victoryDance'} + ZoneToSadAnims = {ToontownGlobals.ToontownCentral: 'tt_a_ara_ttc_hydrant_fightSad', + ToontownGlobals.FunnyFarm: 'tt_a_ara_ttc_hydrant_fightSad', + ToontownGlobals.DonaldsDock: 'tt_a_ara_ttc_hydrant_fightSad', + ToontownGlobals.DaisyGardens: 'tt_a_ara_dga_hydrant_fightSad', + ToontownGlobals.MinniesMelodyland: 'tt_a_ara_mml_hydrant_fightSad', + ToontownGlobals.TheBrrrgh: 'tt_a_ara_tbr_hydrant_fightSad', + ToontownGlobals.DonaldsDreamland: 'tt_a_ara_ddl_hydrant_fightSad'} + ZoneToFightAnims = {ToontownGlobals.ToontownCentral: ('tt_a_ara_ttc_hydrant_fightBoost', 'tt_a_ara_ttc_hydrant_fightCheer', 'tt_a_ara_ttc_hydrant_fightIdle'), + ToontownGlobals.FunnyFarm: ('tt_a_ara_ttc_hydrant_fightBoost', 'tt_a_ara_ttc_hydrant_fightCheer', 'tt_a_ara_ttc_hydrant_fightIdle'), + ToontownGlobals.DonaldsDock: ('tt_a_ara_ttc_hydrant_fightBoost', 'tt_a_ara_ttc_hydrant_fightCheer', 'tt_a_ara_ttc_hydrant_fightIdle'), + ToontownGlobals.DaisyGardens: ('tt_a_ara_dga_hydrant_fightBoost', 'tt_a_ara_dga_hydrant_fightCheer', 'tt_a_ara_dga_hydrant_fightIdle'), + ToontownGlobals.MinniesMelodyland: ('tt_a_ara_mml_hydrant_fightBoost', 'tt_a_ara_mml_hydrant_fightCheer', 'tt_a_ara_mml_hydrant_fightIdle'), + ToontownGlobals.TheBrrrgh: ('tt_a_ara_tbr_hydrant_fightBoost', 'tt_a_ara_tbr_hydrant_fightCheer', 'tt_a_ara_tbr_hydrant_fightIdle'), + ToontownGlobals.DonaldsDreamland: ('tt_a_ara_ddl_hydrant_fightBoost', 'tt_a_ara_ddl_hydrant_fightCheer', 'tt_a_ara_ddl_hydrant_fightIdle')} IdlePauseTime = base.config.GetFloat('prop-idle-pause-time', 0.0) def __init__(self, node): self.leftWater = None self.rightWater = None - InteractiveAnimatedProp.InteractiveAnimatedProp.__init__(self, node) + InteractiveAnimatedProp.InteractiveAnimatedProp.__init__(self, node, ToontownGlobals.HYDRANTS_BUFF_BATTLES) + return def setupActor(self, node): InteractiveAnimatedProp.InteractiveAnimatedProp.setupActor(self, node) - if not self.hoodId == ToontownGlobals.TheBrrrgh: water = loader.loadModel('phase_5/models/char/tt_m_efx_hydrantSquirt') self.leftWater = water.find('**/efx_hydrantSquirtLeft') self.rightWater = water.find('**/efx_hydrantSquirtRight') - + dx_left_water = self.node.find('**/dx_left_water') if self.leftWater: - self.leftWater.reparentTo(self.node.find('**/dx_left_water')) + self.leftWater.reparentTo(dx_left_water) base.leftWater = self.leftWater self.leftWater.hide() - + else: + self.notify.warning('couldnt find %s in rig for hood %d' % ('dx_left_water', self.hoodId)) + dx_right_water = self.node.find('**/dx_right_water') if self.rightWater: - self.rightWater.reparentTo(self.node.find('**/dx_right_water')) + self.rightWater.reparentTo(dx_right_water) self.rightWater.hide() + else: + self.notify.warning('couldnt find %s in rig for hood %d' % ('dx_left_water', self.hoodId)) def hideWater(self): if self.leftWater: @@ -104,15 +245,20 @@ class HydrantInteractiveProp(InteractiveAnimatedProp.InteractiveAnimatedProp): self.rightWater.show() def hasOverrideIval(self, origAnimName): - return ('fightBoost' in origAnimName or 'fightCheer' in origAnimName) and not self.hoodId == ToontownGlobals.TheBrrrgh + result = False + if ('fightBoost' in origAnimName or 'fightCheer' in origAnimName) and not self.hoodId == ToontownGlobals.TheBrrrgh: + result = True + return result def getOverrideIval(self, origAnimName): result = Sequence() - - if self.hasOverrideIval(origAnimName): + if ('fightBoost' in origAnimName or 'fightCheer' in origAnimName) and not self.hoodId == ToontownGlobals.TheBrrrgh: result.append(Func(self.showWater)) - anim = self.createAnimIval('fight0' if 'fightBoost' in origAnimName else 'fight1') - result.append(anim) + if 'fightBoost' in origAnimName: + animKey = 'fight0' + else: + animKey = 'fight1' + animAndSound = self.createAnimAndSoundIval(animKey) + result.append(animAndSound) result.append(Func(self.hideWater)) - return result diff --git a/toontown/hood/InteractiveAnimatedProp.py b/toontown/hood/InteractiveAnimatedProp.py old mode 100644 new mode 100755 index 18123b11..af0b93a5 --- a/toontown/hood/InteractiveAnimatedProp.py +++ b/toontown/hood/InteractiveAnimatedProp.py @@ -2,7 +2,7 @@ import math import random import GenericAnimatedProp from direct.actor import Actor -from direct.interval.IntervalGlobal import Sequence, ActorInterval, Wait, Func, Parallel +from direct.interval.IntervalGlobal import Sequence, ActorInterval, Wait, Func, SoundInterval, Parallel from direct.fsm import FSM from direct.showbase.PythonUtil import weightedChoice from pandac.PandaModules import TextNode, Vec3 @@ -30,8 +30,9 @@ class InteractiveAnimatedProp(GenericAnimatedProp.GenericAnimatedProp, FSM.FSM): HpTextGenerator = TextNode('HpTextGenerator') BattleCheerText = '+' - def __init__(self, node): + def __init__(self, node, holidayId = -1): FSM.FSM.__init__(self, 'InteractiveProp-%s' % str(node)) + self.holidayId = holidayId self.numIdles = 0 self.numFightAnims = 0 self.idleInterval = None @@ -44,9 +45,11 @@ class InteractiveAnimatedProp(GenericAnimatedProp.GenericAnimatedProp, FSM.FSM): self.okToStartNextAnim = False cellIndexStr = node.getTag('DNACellIndex') self.cellIndex = ord(cellIndexStr) + self.origAnimNameToSound = {} self.lastPlayingAnimPhase = 0 self.buildingsMakingMeSad = set() GenericAnimatedProp.GenericAnimatedProp.__init__(self, node) + return def delete(self): self.exit() @@ -55,6 +58,7 @@ class InteractiveAnimatedProp(GenericAnimatedProp.GenericAnimatedProp, FSM.FSM): self.battleCheerInterval = None self.sadInterval = None self.victoryInterval = None + return def getCellIndex(self): return self.cellIndex @@ -110,6 +114,7 @@ class InteractiveAnimatedProp(GenericAnimatedProp.GenericAnimatedProp, FSM.FSM): self.battleCheerInterval = self.createBattleCheerInterval() self.victoryInterval = self.createVictoryInterval() self.sadInterval = self.createSadInterval() + return def createIdleInterval(self): result = Sequence() @@ -154,14 +159,14 @@ class InteractiveAnimatedProp(GenericAnimatedProp.GenericAnimatedProp, FSM.FSM): result = Sequence() for i in xrange(self.numFightAnims): animKey = 'fight%d' % i - animIval = self.createAnimIval(animKey) + animAndSoundIval = self.createAnimAndSoundIval(animKey) origAnimName = self.node.getAnimFilename(animKey).split('/')[-1] if self.hasOverrideIval(origAnimName): result.append(self.getOverrideIval(origAnimName)) elif self.hasSpecialIval(origAnimName): - result.append(Parallel(animIval, self.getSpecialIval(origAnimName))) + result.append(Parallel(animAndSoundIval, self.getSpecialIval(origAnimName))) else: - result.append(animIval) + result.append(animAndSoundIval) self.createBattleCheerText() battleCheerTextIval = Sequence(Func(self.hpText.show), self.hpText.posInterval(duration=4.0, pos=Vec3(0, 0, 7), startPos=(0, 0, 3)), Func(self.hpText.hide)) @@ -171,7 +176,7 @@ class InteractiveAnimatedProp(GenericAnimatedProp.GenericAnimatedProp, FSM.FSM): def createSadInterval(self): result = Sequence() if self.hoodId in self.ZoneToSadAnims: - result = self.createAnimIval('sad') + result = self.createAnimAndSoundIval('sad') return result def hasSpecialIval(self, origAnimName): @@ -189,17 +194,26 @@ class InteractiveAnimatedProp(GenericAnimatedProp.GenericAnimatedProp, FSM.FSM): def createVictoryInterval(self): result = Sequence() if self.hoodId in self.ZoneToVictoryAnims: - animIval = self.createAnimIval('victory') - result.append(animIval) + animAndSoundIval = self.createAnimAndSoundIval('victory') + result.append(animAndSoundIval) return result def enter(self): GenericAnimatedProp.GenericAnimatedProp.enter(self) if base.config.GetBool('props-buff-battles', True): self.notify.debug('props buff battles is true') - self.node.stop() - self.node.pose('idle0', 0) - self.idleInterval.loop() + if base.cr.newsManager.isHolidayRunning(self.holidayId): + self.notify.debug('holiday is running, doing idle interval') + self.node.stop() + self.node.pose('idle0', 0) + if base.config.GetBool('interactive-prop-random-idles', 1): + self.requestIdleOrSad() + else: + self.idleInterval.loop() + else: + self.notify.debug('holiday is NOT running, doing nothing') + self.node.stop() + self.node.pose('idle0', 0) else: self.notify.debug('props do not buff battles') self.node.stop() @@ -274,6 +288,8 @@ class InteractiveAnimatedProp(GenericAnimatedProp.GenericAnimatedProp, FSM.FSM): whichAnim = self.chooseIdleAnimToRun() if self.visId == localAvatar.zoneId: self.notify.debug('whichAnim=%s' % whichAnim) + if __dev__: + self.notify.info('whichAnim=%s %s' % (whichAnim, self.getOrigIdleAnimName(whichAnim))) self.lastPlayingAnimPhase = whichAnim self.curIval = self.createIdleAnimSequence(whichAnim) self.notify.debug('starting curIval of length %s' % self.curIval.getDuration()) @@ -283,25 +299,28 @@ class InteractiveAnimatedProp(GenericAnimatedProp.GenericAnimatedProp, FSM.FSM): self.notify.debug('false self.okToStartNextAnim=%s' % self.okToStartNextAnim) return - def createIdleAnimInterval(self, whichIdleAnim, startingTime = 0): + def createIdleAnimAndSoundInterval(self, whichIdleAnim, startingTime = 0): animIval = self.node.actorInterval('idle%d' % whichIdleAnim, startTime=startingTime) animIvalDuration = animIval.getDuration() origAnimName = self.ZoneToIdles[self.hoodId][whichIdleAnim] if isinstance(origAnimName, tuple): origAnimName = origAnimName[0] + soundIval = self.createSoundInterval(origAnimName, animIvalDuration) + soundIvalDuration = soundIval.getDuration() if self.hasSpecialIval(origAnimName): specialIval = self.getSpecialIval(origAnimName) - return Parallel(animIval, specialIval) + idleAnimAndSound = Parallel(animIval, soundIval, specialIval) else: - return animIval + idleAnimAndSound = Parallel(animIval, soundIval) + return idleAnimAndSound def createIdleAnimSequence(self, whichIdleAnim): dummyResult = Sequence(Wait(self.IdlePauseTime)) if not hasattr(self, 'node') or not self.node: self.notify.warning("createIdleAnimSequence returning dummyResult hasattr(self,'node')=%s" % hasattr(self, 'node')) return dummyResult - idleAnim = self.createIdleAnimInterval(whichIdleAnim) - result = Sequence(idleAnim, Wait(self.IdlePauseTime), Func(self.startNextIdleAnim)) + idleAnimAndSound = self.createIdleAnimAndSoundInterval(whichIdleAnim) + result = Sequence(idleAnimAndSound, Wait(self.IdlePauseTime), Func(self.startNextIdleAnim)) if isinstance(self.ZoneToIdles[self.hoodId][whichIdleAnim], tuple) and len(self.ZoneToIdles[self.hoodId][whichIdleAnim]) > 2: info = self.ZoneToIdles[self.hoodId][whichIdleAnim] origAnimName = info[0] @@ -314,7 +333,7 @@ class InteractiveAnimatedProp(GenericAnimatedProp.GenericAnimatedProp, FSM.FSM): pauseTime = random.randrange(minPauseTime, maxPauseTime + 1) result = Sequence() for i in xrange(numberOfLoops): - result.append(idleAnim) + result.append(idleAnimAndSound) if self.getSettleName(whichIdleAnim): result.append(self.node.actorInterval('settle%d' % whichIdleAnim)) @@ -324,24 +343,39 @@ class InteractiveAnimatedProp(GenericAnimatedProp.GenericAnimatedProp, FSM.FSM): def gotoFaceoff(self): self.notify.debugStateCall(self) - self.request('Faceoff') + if base.cr.newsManager.isHolidayRunning(self.holidayId): + self.request('Faceoff') + else: + self.notify.debug('not going to faceoff because holiday %d is not running' % self.holidayId) def gotoBattleCheer(self): self.notify.debugStateCall(self) - self.request('BattleCheer') + if base.cr.newsManager.isHolidayRunning(self.holidayId): + self.request('BattleCheer') + else: + self.notify.debug('not going to battleCheer because holiday %d is not running' % self.holidayId) def gotoIdle(self): self.notify.debugStateCall(self) - self.request('DoIdleAnim') + if base.cr.newsManager.isHolidayRunning(self.holidayId): + self.request('DoIdleAnim') + else: + self.notify.debug('not going to idle because holiday %d is not running' % self.holidayId) def gotoVictory(self): self.notify.debugStateCall(self) - self.request('Victory') + if base.cr.newsManager.isHolidayRunning(self.holidayId): + self.request('Victory') + else: + self.notify.debug('not going to victory because holiday %d is not running' % self.holidayId) def gotoSad(self, buildingDoId): self.notify.debugStateCall(self) self.buildingsMakingMeSad.add(buildingDoId) - self.request('Sad') + if base.cr.newsManager.isHolidayRunning(self.holidayId): + self.request('Sad') + else: + self.notify.debug('not going to sad because holiday %d is not running' % self.holidayId) def buildingLiberated(self, buildingDoId): self.buildingsMakingMeSad.discard(buildingDoId) @@ -357,6 +391,7 @@ class InteractiveAnimatedProp(GenericAnimatedProp.GenericAnimatedProp, FSM.FSM): self.notify.debugStateCall(self) self.curIval.pause() self.curIval = None + return def calcWhichIdleAnim(self, animName): result = 0 @@ -377,9 +412,9 @@ class InteractiveAnimatedProp(GenericAnimatedProp.GenericAnimatedProp, FSM.FSM): result = Sequence() if self.lastIdleAnimName: whichIdleAnim = self.calcWhichIdleAnim(self.lastIdleAnimName) - anim = self.createIdleAnimInterval(whichIdleAnim, self.lastIdleTime) - result.append(anim) - idleIntoFightIval = self.createAnimIval('idleIntoFight') + animAndSound = self.createIdleAnimAndSoundInterval(whichIdleAnim, self.lastIdleTime) + result.append(animAndSound) + idleIntoFightIval = self.createAnimAndSoundIval('idleIntoFight') result.append(idleIntoFightIval) result.append(Func(self.gotoBattleCheer)) return result @@ -437,18 +472,37 @@ class InteractiveAnimatedProp(GenericAnimatedProp.GenericAnimatedProp, FSM.FSM): result = self.ZoneToIdles[self.hoodId][whichIdleAnim] return result - def createAnimIval(self, animKey): + def createAnimAndSoundIval(self, animKey): animIval = self.node.actorInterval(animKey) animIvalDuration = animIval.getDuration() origAnimName = self.node.getAnimFilename(animKey) + soundIval = self.createSoundInterval(origAnimName, animIvalDuration) + soundIvalDuration = soundIval.getDuration() + printFunc = Func(self.printAnimIfClose, animKey) if self.hasSpecialIval(origAnimName): specialIval = self.getSpecialIval(origAnimName) - return Parallel(animIval, specialIval) + idleAnimAndSound = Parallel(animIval, soundIval, specialIval) + if base.config.GetBool('interactive-prop-info', False): + idleAnimAndSound.append(printFunc) else: - return animIval + idleAnimAndSound = Parallel(animIval, soundIval) + if base.config.GetBool('interactive-prop-info', False): + idleAnimAndSound.append(printFunc) + return idleAnimAndSound + + def printAnimIfClose(self, animKey): + if base.config.GetBool('interactive-prop-info', False): + try: + animName = self.node.getAnimFilename(animKey) + baseAnimName = animName.split('/')[-1] + if localAvatar.zoneId == self.visId: + self.notify.info('playing %s' % baseAnimName) + except Exception, e: + self.notify.warning('Unknown error in printAnimIfClose, giving up:\n%s' % str(e)) def clearCurIval(self): if self.curIval: self.curIval.finish() clearPythonIvals(self.curIval) self.curIval = None + return diff --git a/toontown/hood/LawbotHQ.py b/toontown/hood/LawbotHQ.py old mode 100644 new mode 100755 diff --git a/toontown/hood/LawbotHQAI.py b/toontown/hood/LawbotHQAI.py old mode 100644 new mode 100755 diff --git a/toontown/hood/MMHood.py b/toontown/hood/MMHood.py old mode 100644 new mode 100755 diff --git a/toontown/hood/MMHoodAI.py b/toontown/hood/MMHoodAI.py old mode 100644 new mode 100755 diff --git a/toontown/hood/MailboxInteractiveProp.py b/toontown/hood/MailboxInteractiveProp.py old mode 100644 new mode 100755 index fa2a315f..da13ea7f --- a/toontown/hood/MailboxInteractiveProp.py +++ b/toontown/hood/MailboxInteractiveProp.py @@ -2,92 +2,229 @@ from direct.actor import Actor from direct.directnotify import DirectNotifyGlobal from direct.interval.IntervalGlobal import Sequence, Func from toontown.hood import InteractiveAnimatedProp +from toontown.hood import GenericAnimatedProp from toontown.toonbase import ToontownGlobals, ToontownBattleGlobals, TTLocalizer class MailboxInteractiveProp(InteractiveAnimatedProp.InteractiveAnimatedProp): notify = DirectNotifyGlobal.directNotify.newCategory('MailboxInteractiveProp') - BattleTrack = ToontownBattleGlobals.THROW_TRACK - BattleCheerText = TTLocalizer.InteractivePropTrackBonusTerms[BattleTrack] - - ZoneToIdles = { - ToontownGlobals.ToontownCentral: (('tt_a_ara_ttc_mailbox_idle0', 3, 10, 'tt_a_ara_ttc_mailbox_idle0settle', 3, 10), - ('tt_a_ara_ttc_mailbox_idleTake2', 1, 1, None, 3, 10), - ('tt_a_ara_ttc_mailbox_idleLook1', 1, 1, None, 3, 10), - ('tt_a_ara_ttc_mailbox_idleAwesome3', 1, 1, None, 3, 10)), - ToontownGlobals.DonaldsDock: (('tt_a_ara_dod_mailbox_idle0', 3, 10, 'tt_a_ara_dod_mailbox_idle0settle', 3, 10), - ('tt_a_ara_dod_mailbox_idle2', 1, 1, None, 3, 10), - ('tt_a_ara_dod_mailbox_idle1', 1, 1, None, 3, 10), - ('tt_a_ara_dod_mailbox_idleAwesome3', 1, 1, None, 3, 10)), - ToontownGlobals.DaisyGardens: (('tt_a_ara_dga_mailbox_idle0', 3, 10, 'tt_a_ara_dga_mailbox_idle0settle', 3, 10), - ('tt_a_ara_dga_mailbox_idleTake1', 1, 1, None, 3, 10), - ('tt_a_ara_dga_mailbox_idleLook2', 1, 1, None, 3, 10), - ('tt_a_ara_dga_mailbox_idleAwesome3', 1, 1, None, 3, 10)), - ToontownGlobals.MinniesMelodyland: (('tt_a_ara_mml_mailbox_idle0', 3, 10, 'tt_a_ara_mml_mailbox_idle0settle', 3, 10), - ('tt_a_ara_mml_mailbox_idleTake1', 1, 1, None, 3, 10), - ('tt_a_ara_mml_mailbox_idleLook2', 1, 1, None, 3, 10), - ('tt_a_ara_mml_mailbox_idleAwesome3', 1, 1, None, 3, 10)), - ToontownGlobals.TheBrrrgh: (('tt_a_ara_tbr_mailbox_idleShiver1', 1, 1, None, 3, 10), - ('tt_a_ara_tbr_mailbox_idleSneeze2', 1, 1, None, 3, 10), - ('tt_a_ara_tbr_mailbox_idleSpin0', 1, 1, None, 3, 10), - ('tt_a_ara_tbr_mailbox_idleAwesome3', 1, 1, None, 3, 10)), - ToontownGlobals.DonaldsDreamland: (('tt_a_ara_ddl_mailbox_idleSleep0', 3, 10, None, 0, 0), - ('tt_a_ara_ddl_mailbox_idleShake2', 1, 1, None, 0, 0), - ('tt_a_ara_ddl_mailbox_idleSnore1', 1, 1, None, 0, 0), - ('tt_a_ara_ddl_mailbox_idleAwesome3', 1, 1, None, 0, 0))} - - ZoneToIdleIntoFightAnims = { - ToontownGlobals.ToontownCentral: 'tt_a_ara_ttc_mailbox_idleIntoFight', - ToontownGlobals.DonaldsDock: 'tt_a_ara_dod_mailbox_idleIntoFight', - ToontownGlobals.DaisyGardens: 'tt_a_ara_dga_mailbox_idleIntoFight', - ToontownGlobals.MinniesMelodyland: 'tt_a_ara_mml_mailbox_idleIntoFight', - ToontownGlobals.TheBrrrgh: 'tt_a_ara_tbr_mailbox_idleIntoFight', - ToontownGlobals.DonaldsDreamland: 'tt_a_ara_ddl_mailbox_idleIntoFight'} - - ZoneToVictoryAnims = { - ToontownGlobals.ToontownCentral: 'tt_a_ara_ttc_mailbox_victoryDance', - ToontownGlobals.DonaldsDock: 'tt_a_ara_dod_mailbox_victoryDance', - ToontownGlobals.DaisyGardens: 'tt_a_ara_dga_mailbox_victoryDance', - ToontownGlobals.MinniesMelodyland: 'tt_a_ara_mml_mailbox_victoryDance', - ToontownGlobals.TheBrrrgh: 'tt_a_ara_tbr_mailbox_victoryDance', - ToontownGlobals.DonaldsDreamland: 'tt_a_ara_ddl_mailbox_victoryDance'} - - ZoneToSadAnims = { - ToontownGlobals.ToontownCentral: 'tt_a_ara_ttc_mailbox_fightSad', - ToontownGlobals.DonaldsDock: 'tt_a_ara_dod_mailbox_fightSad', - ToontownGlobals.DaisyGardens: 'tt_a_ara_dga_mailbox_fightSad', - ToontownGlobals.MinniesMelodyland: 'tt_a_ara_mml_mailbox_fightSad', - ToontownGlobals.TheBrrrgh: 'tt_a_ara_tbr_mailbox_fightSad', - ToontownGlobals.DonaldsDreamland: 'tt_a_ara_ddl_mailbox_fightSad'} - - ZoneToFightAnims = { - ToontownGlobals.ToontownCentral: ('tt_a_ara_ttc_mailbox_fightBoost', 'tt_a_ara_ttc_mailbox_fightCheer', 'tt_a_ara_ttc_mailbox_fightIdle'), - ToontownGlobals.DonaldsDock: ('tt_a_ara_dod_mailbox_fightBoost', 'tt_a_ara_dod_mailbox_fightCheer', 'tt_a_ara_dod_mailbox_fightIdle'), - ToontownGlobals.DaisyGardens: ('tt_a_ara_dga_mailbox_fightBoost', 'tt_a_ara_dga_mailbox_fightCheer', 'tt_a_ara_dga_mailbox_fightIdle'), - ToontownGlobals.MinniesMelodyland: ('tt_a_ara_mml_mailbox_fightBoost', 'tt_a_ara_mml_mailbox_fightCheer', 'tt_a_ara_mml_mailbox_fightIdle'), - ToontownGlobals.TheBrrrgh: ('tt_a_ara_tbr_mailbox_fightBoost', 'tt_a_ara_tbr_mailbox_fightCheer', 'tt_a_ara_tbr_mailbox_fightIdle'), - ToontownGlobals.DonaldsDreamland: ('tt_a_ara_ddl_mailbox_fightBoost', 'tt_a_ara_ddl_mailbox_fightCheer', 'tt_a_ara_ddl_mailbox_fightIdle')} - + BattleCheerText = TTLocalizer.InteractivePropTrackBonusTerms[ToontownBattleGlobals.THROW_TRACK] + ZoneToIdles = {ToontownGlobals.ToontownCentral: (('tt_a_ara_ttc_mailbox_idle0', + 3, + 10, + 'tt_a_ara_ttc_mailbox_idle0settle', + 3, + 10), + ('tt_a_ara_ttc_mailbox_idleTake2', + 1, + 1, + None, + 3, + 10), + ('tt_a_ara_ttc_mailbox_idleLook1', + 1, + 1, + None, + 3, + 10), + ('tt_a_ara_ttc_mailbox_idleAwesome3', + 1, + 1, + None, + 3, + 10)), + ToontownGlobals.FunnyFarm: (('tt_a_ara_ttc_mailbox_idle0', + 3, + 10, + 'tt_a_ara_ttc_mailbox_idle0settle', + 3, + 10), + ('tt_a_ara_ttc_mailbox_idleTake2', + 1, + 1, + None, + 3, + 10), + ('tt_a_ara_ttc_mailbox_idleLook1', + 1, + 1, + None, + 3, + 10), + ('tt_a_ara_ttc_mailbox_idleAwesome3', + 1, + 1, + None, + 3, + 10)), + ToontownGlobals.DonaldsDock: (('tt_a_ara_dod_mailbox_idle0', + 3, + 10, + 'tt_a_ara_dod_mailbox_idle0settle', + 3, + 10), + ('tt_a_ara_dod_mailbox_idle2', + 1, + 1, + None, + 3, + 10), + ('tt_a_ara_dod_mailbox_idle1', + 1, + 1, + None, + 3, + 10), + ('tt_a_ara_dod_mailbox_idleAwesome3', + 1, + 1, + None, + 3, + 10)), + ToontownGlobals.DaisyGardens: (('tt_a_ara_dga_mailbox_idle0', + 3, + 10, + 'tt_a_ara_dga_mailbox_idle0settle', + 3, + 10), + ('tt_a_ara_dga_mailbox_idleTake1', + 1, + 1, + None, + 3, + 10), + ('tt_a_ara_dga_mailbox_idleLook2', + 1, + 1, + None, + 3, + 10), + ('tt_a_ara_dga_mailbox_idleAwesome3', + 1, + 1, + None, + 3, + 10)), + ToontownGlobals.MinniesMelodyland: (('tt_a_ara_mml_mailbox_idle0', + 3, + 10, + 'tt_a_ara_mml_mailbox_idle0settle', + 3, + 10), + ('tt_a_ara_mml_mailbox_idleTake1', + 1, + 1, + None, + 3, + 10), + ('tt_a_ara_mml_mailbox_idleLook2', + 1, + 1, + None, + 3, + 10), + ('tt_a_ara_mml_mailbox_idleAwesome3', + 1, + 1, + None, + 3, + 10)), + ToontownGlobals.TheBrrrgh: (('tt_a_ara_tbr_mailbox_idleShiver1', + 1, + 1, + None, + 3, + 10), + ('tt_a_ara_tbr_mailbox_idleSneeze2', + 1, + 1, + None, + 3, + 10), + ('tt_a_ara_tbr_mailbox_idleSpin0', + 1, + 1, + None, + 3, + 10), + ('tt_a_ara_tbr_mailbox_idleAwesome3', + 1, + 1, + None, + 3, + 10)), + ToontownGlobals.DonaldsDreamland: (('tt_a_ara_ddl_mailbox_idleSleep0', + 3, + 10, + None, + 0, + 0), + ('tt_a_ara_ddl_mailbox_idleShake2', + 1, + 1, + None, + 0, + 0), + ('tt_a_ara_ddl_mailbox_idleSnore1', + 1, + 1, + None, + 0, + 0), + ('tt_a_ara_ddl_mailbox_idleAwesome3', + 1, + 1, + None, + 0, + 0))} + ZoneToIdleIntoFightAnims = {ToontownGlobals.ToontownCentral: 'tt_a_ara_ttc_mailbox_idleIntoFight', + ToontownGlobals.FunnyFarm: 'tt_a_ara_ttc_mailbox_idleIntoFight', + ToontownGlobals.DonaldsDock: 'tt_a_ara_dod_mailbox_idleIntoFight', + ToontownGlobals.DaisyGardens: 'tt_a_ara_dga_mailbox_idleIntoFight', + ToontownGlobals.MinniesMelodyland: 'tt_a_ara_mml_mailbox_idleIntoFight', + ToontownGlobals.TheBrrrgh: 'tt_a_ara_tbr_mailbox_idleIntoFight', + ToontownGlobals.DonaldsDreamland: 'tt_a_ara_ddl_mailbox_idleIntoFight'} + ZoneToVictoryAnims = {ToontownGlobals.ToontownCentral: 'tt_a_ara_ttc_mailbox_victoryDance', + ToontownGlobals.FunnyFarm: 'tt_a_ara_ttc_mailbox_victoryDance', + ToontownGlobals.DonaldsDock: 'tt_a_ara_dod_mailbox_victoryDance', + ToontownGlobals.DaisyGardens: 'tt_a_ara_dga_mailbox_victoryDance', + ToontownGlobals.MinniesMelodyland: 'tt_a_ara_mml_mailbox_victoryDance', + ToontownGlobals.TheBrrrgh: 'tt_a_ara_tbr_mailbox_victoryDance', + ToontownGlobals.DonaldsDreamland: 'tt_a_ara_ddl_mailbox_victoryDance'} + ZoneToSadAnims = {ToontownGlobals.ToontownCentral: 'tt_a_ara_ttc_mailbox_fightSad', + ToontownGlobals.FunnyFarm: 'tt_a_ara_ttc_mailbox_fightSad', + ToontownGlobals.DonaldsDock: 'tt_a_ara_dod_mailbox_fightSad', + ToontownGlobals.DaisyGardens: 'tt_a_ara_dga_mailbox_fightSad', + ToontownGlobals.MinniesMelodyland: 'tt_a_ara_mml_mailbox_fightSad', + ToontownGlobals.TheBrrrgh: 'tt_a_ara_tbr_mailbox_fightSad', + ToontownGlobals.DonaldsDreamland: 'tt_a_ara_ddl_mailbox_fightSad'} + ZoneToFightAnims = {ToontownGlobals.ToontownCentral: ('tt_a_ara_ttc_mailbox_fightBoost', 'tt_a_ara_ttc_mailbox_fightCheer', 'tt_a_ara_ttc_mailbox_fightIdle'), + ToontownGlobals.FunnyFarm: ('tt_a_ara_ttc_mailbox_fightBoost', 'tt_a_ara_ttc_mailbox_fightCheer', 'tt_a_ara_ttc_mailbox_fightIdle'), + ToontownGlobals.DonaldsDock: ('tt_a_ara_dod_mailbox_fightBoost', 'tt_a_ara_dod_mailbox_fightCheer', 'tt_a_ara_dod_mailbox_fightIdle'), + ToontownGlobals.DaisyGardens: ('tt_a_ara_dga_mailbox_fightBoost', 'tt_a_ara_dga_mailbox_fightCheer', 'tt_a_ara_dga_mailbox_fightIdle'), + ToontownGlobals.MinniesMelodyland: ('tt_a_ara_mml_mailbox_fightBoost', 'tt_a_ara_mml_mailbox_fightCheer', 'tt_a_ara_mml_mailbox_fightIdle'), + ToontownGlobals.TheBrrrgh: ('tt_a_ara_tbr_mailbox_fightBoost', 'tt_a_ara_tbr_mailbox_fightCheer', 'tt_a_ara_tbr_mailbox_fightIdle'), + ToontownGlobals.DonaldsDreamland: ('tt_a_ara_ddl_mailbox_fightBoost', 'tt_a_ara_ddl_mailbox_fightCheer', 'tt_a_ara_ddl_mailbox_fightIdle')} IdlePauseTime = base.config.GetFloat('prop-idle-pause-time', 0.0) def __init__(self, node): - InteractiveAnimatedProp.InteractiveAnimatedProp.__init__(self, node) + InteractiveAnimatedProp.InteractiveAnimatedProp.__init__(self, node, ToontownGlobals.MAILBOXES_BUFF_BATTLES) def setupActor(self, node): self.pieActor = Actor.Actor('phase_5/models/char/tt_r_prp_ext_piePackage', {'fightBoost': 'phase_5/models/char/tt_a_prp_ext_piePackage_fightBoost'}) self.pieActor.reparentTo(self.node) self.pieActor.hide() - InteractiveAnimatedProp.InteractiveAnimatedProp.setupActor(self, node) def hasSpecialIval(self, origAnimName): - return 'fightBoost' in origAnimName + result = False + if 'fightBoost' in origAnimName: + result = True + return result def getSpecialIval(self, origAnimName): result = Sequence() - - if self.hasSpecialIval(origAnimName): + if 'fightBoost' in origAnimName: result.append(Func(self.pieActor.show)) result.append(self.pieActor.actorInterval('fightBoost')) result.append(Func(self.pieActor.hide)) - return result diff --git a/toontown/hood/OZHood.py b/toontown/hood/OZHood.py old mode 100644 new mode 100755 diff --git a/toontown/hood/OZHoodAI.py b/toontown/hood/OZHoodAI.py old mode 100644 new mode 100755 diff --git a/toontown/hood/PartyHood.py b/toontown/hood/PartyHood.py old mode 100644 new mode 100755 diff --git a/toontown/hood/PetShopFishAnimatedProp.py b/toontown/hood/PetShopFishAnimatedProp.py old mode 100644 new mode 100755 diff --git a/toontown/hood/Place.py b/toontown/hood/Place.py old mode 100644 new mode 100755 diff --git a/toontown/hood/QuietZoneState.py b/toontown/hood/QuietZoneState.py old mode 100644 new mode 100755 diff --git a/toontown/hood/SellbotHQ.py b/toontown/hood/SellbotHQ.py old mode 100644 new mode 100755 diff --git a/toontown/hood/SellbotHQAI.py b/toontown/hood/SellbotHQAI.py old mode 100644 new mode 100755 diff --git a/toontown/hood/SkyUtil.py b/toontown/hood/SkyUtil.py old mode 100644 new mode 100755 diff --git a/toontown/hood/SleepingHydrantAnimatedProp.py b/toontown/hood/SleepingHydrantAnimatedProp.py old mode 100644 new mode 100755 diff --git a/toontown/hood/TTHood.py b/toontown/hood/TTHood.py old mode 100644 new mode 100755 diff --git a/toontown/hood/TTHoodAI.py b/toontown/hood/TTHoodAI.py old mode 100644 new mode 100755 index 9bc94b2f..69817bf0 --- a/toontown/hood/TTHoodAI.py +++ b/toontown/hood/TTHoodAI.py @@ -28,11 +28,10 @@ class TTHoodAI(HoodAI.HoodAI): if simbase.config.GetBool('want-butterflies', True): self.createButterflies() - if simbase.air.wantGloveNpc: - NPCToons.createNPC( - simbase.air, 2021, - (ToontownGlobals.ToontownCentral, TTLocalizer.NPCToonNames[2021], ('dss', 'ls', 's', 'm', 13, 41, 13, 13, 1, 6, 1, 6, 0, 18, 0), 'm', 1, NPCToons.NPC_GLOVE), - ToontownGlobals.ToontownCentral, posIndex=0) + NPCToons.createNPC( + simbase.air, 2021, + (ToontownGlobals.ToontownCentral, TTLocalizer.NPCToonNames[2021], ('dss', 'ls', 's', 'm', 13, 41, 13, 13, 1, 6, 1, 6, 0, 18, 0), 'm', 1, NPCToons.NPC_GLOVE), + ToontownGlobals.ToontownCentral, posIndex=0) if simbase.air.wantHalloween: self.TrickOrTreatTargetManager = DistributedTrickOrTreatTargetAI.DistributedTrickOrTreatTargetAI(self.air) diff --git a/toontown/hood/ToonHood.py b/toontown/hood/ToonHood.py old mode 100644 new mode 100755 diff --git a/toontown/hood/TrashcanInteractiveProp.py b/toontown/hood/TrashcanInteractiveProp.py old mode 100644 new mode 100755 index 1ac6c658..b5eee585 --- a/toontown/hood/TrashcanInteractiveProp.py +++ b/toontown/hood/TrashcanInteractiveProp.py @@ -1,72 +1,212 @@ from direct.actor import Actor from direct.directnotify import DirectNotifyGlobal from toontown.hood import InteractiveAnimatedProp +from toontown.hood import GenericAnimatedProp from toontown.toonbase import ToontownGlobals, ToontownBattleGlobals, TTLocalizer class TrashcanInteractiveProp(InteractiveAnimatedProp.InteractiveAnimatedProp): notify = DirectNotifyGlobal.directNotify.newCategory('TrashcanInteractiveProp') - BattleTrack = ToontownBattleGlobals.HEAL_TRACK - BattleCheerText = TTLocalizer.InteractivePropTrackBonusTerms[BattleTrack] - - ZoneToIdles = { - ToontownGlobals.ToontownCentral: (('tt_a_ara_ttc_trashcan_idleTake2', 1, 1, None, 3, 10), - ('tt_a_ara_ttc_trashcan_idleHiccup0', 1, 1, None, 3, 10), - ('tt_a_ara_ttc_trashcan_idleLook1', 1, 1, None, 3, 10), - ('tt_a_ara_ttc_trashcan_idleAwesome3', 1, 1, None, 3, 10)), - ToontownGlobals.DonaldsDock: (('tt_a_ara_dod_trashcan_idleBounce2', 3, 10, 'tt_a_ara_dod_trashcan_idle0settle', 3, 10), - ('tt_a_ara_dod_trashcan_idle0', 1, 1, None, 3, 10), - ('tt_a_ara_dod_trashcan_idle1', 1, 1, None, 3, 10), - ('tt_a_ara_dod_trashcan_idleAwesome3', 1, 1, None, 3, 10)), - ToontownGlobals.DaisyGardens: (('tt_a_ara_dga_trashcan_idleTake2', 1, 1, None, 3, 10), - ('tt_a_ara_dga_trashcan_idleHiccup0', 1, 1, None, 3, 10), - ('tt_a_ara_dga_trashcan_idleLook1', 1, 1, None, 3, 10), - ('tt_a_ara_dga_trashcan_idleAwesome3', 1, 1, None, 3, 10)), - ToontownGlobals.MinniesMelodyland: (('tt_a_ara_mml_trashcan_idleBounce0', 3, 10, 'tt_a_ara_mml_trashcan_idle0settle', 3, 10), - ('tt_a_ara_mml_trashcan_idleLook1', 1, 1, None, 3, 10), - ('tt_a_ara_mml_trashcan_idleHelicopter2', 1, 1, None, 3, 10), - ('tt_a_ara_mml_trashcan_idleAwesome3', 1, 1, None, 3, 10)), - ToontownGlobals.TheBrrrgh: (('tt_a_ara_tbr_trashcan_idleShiver1', 1, 1, None, 3, 10), - ('tt_a_ara_tbr_trashcan_idleSneeze2', 1, 1, None, 3, 10), - ('tt_a_ara_tbr_trashcan_idle0', 1, 1, None, 3, 10), - ('tt_a_ara_tbr_trashcan_idleAwesome3', 1, 1, None, 3, 10)), - ToontownGlobals.DonaldsDreamland: (('tt_a_ara_ddl_trashcan_idleSleep0', 3, 10, None, 0, 0), - ('tt_a_ara_ddl_trashcan_idleShake2', 1, 1, None, 0, 0), - ('tt_a_ara_ddl_trashcan_idleSnore1', 1, 1, None, 0, 0), - ('tt_a_ara_ddl_trashcan_idleAwesome3', 1, 1, None, 0, 0))} - - ZoneToIdleIntoFightAnims = { - ToontownGlobals.ToontownCentral: 'tt_a_ara_ttc_trashcan_idleIntoFight', - ToontownGlobals.DonaldsDock: 'tt_a_ara_dod_trashcan_idleIntoFight', - ToontownGlobals.DaisyGardens: 'tt_a_ara_dga_trashcan_idleIntoFight', - ToontownGlobals.MinniesMelodyland: 'tt_a_ara_mml_trashcan_idleIntoFight', - ToontownGlobals.TheBrrrgh: 'tt_a_ara_tbr_trashcan_idleIntoFight', - ToontownGlobals.DonaldsDreamland: 'tt_a_ara_ddl_trashcan_idleIntoFight'} - - ZoneToVictoryAnims = { - ToontownGlobals.ToontownCentral: 'tt_a_ara_ttc_trashcan_victoryDance', - ToontownGlobals.DonaldsDock: 'tt_a_ara_dod_trashcan_victoryDance', - ToontownGlobals.DaisyGardens: 'tt_a_ara_dga_trashcan_victoryDance', - ToontownGlobals.MinniesMelodyland: 'tt_a_ara_mml_trashcan_victoryDance', - ToontownGlobals.TheBrrrgh: 'tt_a_ara_tbr_trashcan_victoryDance', - ToontownGlobals.DonaldsDreamland: 'tt_a_ara_ddl_trashcan_victoryDance'} - - ZoneToSadAnims = { - ToontownGlobals.ToontownCentral: 'tt_a_ara_ttc_trashcan_fightSad', - ToontownGlobals.DonaldsDock: 'tt_a_ara_dod_trashcan_fightSad', - ToontownGlobals.DaisyGardens: 'tt_a_ara_dga_trashcan_fightSad', - ToontownGlobals.MinniesMelodyland: 'tt_a_ara_mml_trashcan_fightSad', - ToontownGlobals.TheBrrrgh: 'tt_a_ara_tbr_trashcan_fightSad', - ToontownGlobals.DonaldsDreamland: 'tt_a_ara_ddl_trashcan_fightSad'} - - ZoneToFightAnims = { - ToontownGlobals.ToontownCentral: ('tt_a_ara_ttc_trashcan_fightBoost', 'tt_a_ara_ttc_trashcan_fightCheer', 'tt_a_ara_ttc_trashcan_fightIdle'), - ToontownGlobals.DonaldsDock: ('tt_a_ara_dod_trashcan_fightBoost', 'tt_a_ara_dod_trashcan_fightCheer', 'tt_a_ara_dod_trashcan_fightIdle'), - ToontownGlobals.DaisyGardens: ('tt_a_ara_dga_trashcan_fightBoost', 'tt_a_ara_dga_trashcan_fightCheer', 'tt_a_ara_dga_trashcan_fightIdle'), - ToontownGlobals.MinniesMelodyland: ('tt_a_ara_mml_trashcan_fightBoost', 'tt_a_ara_mml_trashcan_fightCheer0', 'tt_a_ara_mml_trashcan_fightCheer1', 'tt_a_ara_mml_trashcan_fightIdle'), - ToontownGlobals.TheBrrrgh: ('tt_a_ara_tbr_trashcan_fightBoost', 'tt_a_ara_tbr_trashcan_fightCheer', 'tt_a_ara_tbr_trashcan_fightIdle'), - ToontownGlobals.DonaldsDreamland: ('tt_a_ara_ddl_trashcan_fightBoost', 'tt_a_ara_ddl_trashcan_fightCheer', 'tt_a_ara_ddl_trashcan_fightIdle')} - + BattleCheerText = TTLocalizer.InteractivePropTrackBonusTerms[ToontownBattleGlobals.HEAL_TRACK] + ZoneToIdles = {ToontownGlobals.ToontownCentral: (('tt_a_ara_ttc_trashcan_idleTake2', + 1, + 1, + None, + 3, + 10), + ('tt_a_ara_ttc_trashcan_idleHiccup0', + 1, + 1, + None, + 3, + 10), + ('tt_a_ara_ttc_trashcan_idleLook1', + 1, + 1, + None, + 3, + 10), + ('tt_a_ara_ttc_trashcan_idleAwesome3', + 1, + 1, + None, + 3, + 10)), + ToontownGlobals.FunnyFarm: (('tt_a_ara_ttc_trashcan_idleTake2', + 1, + 1, + None, + 3, + 10), + ('tt_a_ara_ttc_trashcan_idleHiccup0', + 1, + 1, + None, + 3, + 10), + ('tt_a_ara_ttc_trashcan_idleLook1', + 1, + 1, + None, + 3, + 10), + ('tt_a_ara_ttc_trashcan_idleAwesome3', + 1, + 1, + None, + 3, + 10)), + ToontownGlobals.DonaldsDock: (('tt_a_ara_dod_trashcan_idleBounce2', + 3, + 10, + 'tt_a_ara_dod_trashcan_idle0settle', + 3, + 10), + ('tt_a_ara_dod_trashcan_idle0', + 1, + 1, + None, + 3, + 10), + ('tt_a_ara_dod_trashcan_idle1', + 1, + 1, + None, + 3, + 10), + ('tt_a_ara_dod_trashcan_idleAwesome3', + 1, + 1, + None, + 3, + 10)), + ToontownGlobals.DaisyGardens: (('tt_a_ara_dga_trashcan_idleTake2', + 1, + 1, + None, + 3, + 10), + ('tt_a_ara_dga_trashcan_idleHiccup0', + 1, + 1, + None, + 3, + 10), + ('tt_a_ara_dga_trashcan_idleLook1', + 1, + 1, + None, + 3, + 10), + ('tt_a_ara_dga_trashcan_idleAwesome3', + 1, + 1, + None, + 3, + 10)), + ToontownGlobals.MinniesMelodyland: (('tt_a_ara_mml_trashcan_idleBounce0', + 3, + 10, + 'tt_a_ara_mml_trashcan_idle0settle', + 3, + 10), + ('tt_a_ara_mml_trashcan_idleLook1', + 1, + 1, + None, + 3, + 10), + ('tt_a_ara_mml_trashcan_idleHelicopter2', + 1, + 1, + None, + 3, + 10), + ('tt_a_ara_mml_trashcan_idleAwesome3', + 1, + 1, + None, + 3, + 10)), + ToontownGlobals.TheBrrrgh: (('tt_a_ara_tbr_trashcan_idleShiver1', + 1, + 1, + None, + 3, + 10), + ('tt_a_ara_tbr_trashcan_idleSneeze2', + 1, + 1, + None, + 3, + 10), + ('tt_a_ara_tbr_trashcan_idle0', + 1, + 1, + None, + 3, + 10), + ('tt_a_ara_tbr_trashcan_idleAwesome3', + 1, + 1, + None, + 3, + 10)), + ToontownGlobals.DonaldsDreamland: (('tt_a_ara_ddl_trashcan_idleSleep0', + 3, + 10, + None, + 0, + 0), + ('tt_a_ara_ddl_trashcan_idleShake2', + 1, + 1, + None, + 0, + 0), + ('tt_a_ara_ddl_trashcan_idleSnore1', + 1, + 1, + None, + 0, + 0), + ('tt_a_ara_ddl_trashcan_idleAwesome3', + 1, + 1, + None, + 0, + 0))} + ZoneToIdleIntoFightAnims = {ToontownGlobals.ToontownCentral: 'tt_a_ara_ttc_trashcan_idleIntoFight', + ToontownGlobals.FunnyFarm: 'tt_a_ara_ttc_trashcan_idleIntoFight', + ToontownGlobals.DonaldsDock: 'tt_a_ara_dod_trashcan_idleIntoFight', + ToontownGlobals.DaisyGardens: 'tt_a_ara_dga_trashcan_idleIntoFight', + ToontownGlobals.MinniesMelodyland: 'tt_a_ara_mml_trashcan_idleIntoFight', + ToontownGlobals.TheBrrrgh: 'tt_a_ara_tbr_trashcan_idleIntoFight', + ToontownGlobals.DonaldsDreamland: 'tt_a_ara_ddl_trashcan_idleIntoFight'} + ZoneToVictoryAnims = {ToontownGlobals.ToontownCentral: 'tt_a_ara_ttc_trashcan_victoryDance', + ToontownGlobals.FunnyFarm: 'tt_a_ara_ttc_trashcan_victoryDance', + ToontownGlobals.DonaldsDock: 'tt_a_ara_dod_trashcan_victoryDance', + ToontownGlobals.DaisyGardens: 'tt_a_ara_dga_trashcan_victoryDance', + ToontownGlobals.MinniesMelodyland: 'tt_a_ara_mml_trashcan_victoryDance', + ToontownGlobals.TheBrrrgh: 'tt_a_ara_tbr_trashcan_victoryDance', + ToontownGlobals.DonaldsDreamland: 'tt_a_ara_ddl_trashcan_victoryDance'} + ZoneToSadAnims = {ToontownGlobals.ToontownCentral: 'tt_a_ara_ttc_trashcan_fightSad', + ToontownGlobals.FunnyFarm: 'tt_a_ara_ttc_trashcan_fightSad', + ToontownGlobals.DonaldsDock: 'tt_a_ara_dod_trashcan_fightSad', + ToontownGlobals.DaisyGardens: 'tt_a_ara_dga_trashcan_fightSad', + ToontownGlobals.MinniesMelodyland: 'tt_a_ara_mml_trashcan_fightSad', + ToontownGlobals.TheBrrrgh: 'tt_a_ara_tbr_trashcan_fightSad', + ToontownGlobals.DonaldsDreamland: 'tt_a_ara_ddl_trashcan_fightSad'} + ZoneToFightAnims = {ToontownGlobals.ToontownCentral: ('tt_a_ara_ttc_trashcan_fightBoost', 'tt_a_ara_ttc_trashcan_fightCheer', 'tt_a_ara_ttc_trashcan_fightIdle'), + ToontownGlobals.FunnyFarm: ('tt_a_ara_ttc_trashcan_fightBoost', 'tt_a_ara_ttc_trashcan_fightCheer', 'tt_a_ara_ttc_trashcan_fightIdle'), + ToontownGlobals.DonaldsDock: ('tt_a_ara_dod_trashcan_fightBoost', 'tt_a_ara_dod_trashcan_fightCheer', 'tt_a_ara_dod_trashcan_fightIdle'), + ToontownGlobals.DaisyGardens: ('tt_a_ara_dga_trashcan_fightBoost', 'tt_a_ara_dga_trashcan_fightCheer', 'tt_a_ara_dga_trashcan_fightIdle'), + ToontownGlobals.MinniesMelodyland: ('tt_a_ara_mml_trashcan_fightBoost', + 'tt_a_ara_mml_trashcan_fightCheer0', + 'tt_a_ara_mml_trashcan_fightCheer1', + 'tt_a_ara_mml_trashcan_fightIdle'), + ToontownGlobals.TheBrrrgh: ('tt_a_ara_tbr_trashcan_fightBoost', 'tt_a_ara_tbr_trashcan_fightCheer', 'tt_a_ara_tbr_trashcan_fightIdle'), + ToontownGlobals.DonaldsDreamland: ('tt_a_ara_ddl_trashcan_fightBoost', 'tt_a_ara_ddl_trashcan_fightCheer', 'tt_a_ara_ddl_trashcan_fightIdle')} IdlePauseTime = base.config.GetFloat('prop-idle-pause-time', 0.0) def __init__(self, node): - InteractiveAnimatedProp.InteractiveAnimatedProp.__init__(self, node) \ No newline at end of file + InteractiveAnimatedProp.InteractiveAnimatedProp.__init__(self, node, ToontownGlobals.TRASHCANS_BUFF_BATTLES) diff --git a/toontown/hood/TutorialHood.py b/toontown/hood/TutorialHood.py old mode 100644 new mode 100755 diff --git a/toontown/hood/ZoneUtil.py b/toontown/hood/ZoneUtil.py old mode 100644 new mode 100755 diff --git a/toontown/hood/__init__.py b/toontown/hood/__init__.py old mode 100644 new mode 100755 diff --git a/toontown/language/LanguageSelector.py b/toontown/language/LanguageSelector.py old mode 100644 new mode 100755 index 70420137..3b59e6d3 --- a/toontown/language/LanguageSelector.py +++ b/toontown/language/LanguageSelector.py @@ -4,7 +4,7 @@ from toontown.toontowngui import TTDialog import os class LanguageSelector: - + def __init__(self, leaveFunction): self.title = None self.current = None @@ -14,13 +14,13 @@ class LanguageSelector: self.backButton = None self.confirmDialog = None self.leaveFunction = leaveFunction - + def create(self): self.background = OnscreenImage(parent=render2d, image="phase_3.5/maps/blackboardEmpty.jpg") self.gui = loader.loadModel('phase_3/models/gui/tt_m_gui_mat_mainGui') self.shuffleUp = self.gui.find('**/tt_t_gui_mat_shuffleUp') self.shuffleDown = self.gui.find('**/tt_t_gui_mat_shuffleDown') - + self.title = DirectLabel(aspect2d, relief=None, text=TTLocalizer.LanguageSelectorTitle, text_fg=(0, 1, 0, 1), text_scale=0.15, text_font=ToontownGlobals.getSuitFont(), pos=(0, 0, 0.70), text_shadow=(0, 0.392, 0, 1)) @@ -51,22 +51,22 @@ class LanguageSelector: if element: element.destroy() element = None - + self.leaveFunction() - + def switchLanguage(self, language): if language == settings['language']: self.confirmDialog = TTDialog.TTDialog(style=TTDialog.Acknowledge, text=TTLocalizer.LanguageSelectorSameLanguage, command=self.cleanupDialog) else: self.confirmDialog = TTDialog.TTDialog(style=TTDialog.YesNo, text=TTLocalizer.LanguageSelectorConfirm % language, command=self.confirmSwitchLanguage, extraArgs=[language]) self.confirmDialog.show() - + def confirmSwitchLanguage(self, value, language): if value > 0: settings['language'] = language os._exit(1) else: self.cleanupDialog() - + def cleanupDialog(self, value=0): - self.confirmDialog.cleanup() \ No newline at end of file + self.confirmDialog.cleanup() diff --git a/toontown/language/__init__.py b/toontown/language/__init__.py old mode 100644 new mode 100755 diff --git a/toontown/launcher/TTULauncher.py b/toontown/launcher/TTSLauncher.py old mode 100644 new mode 100755 similarity index 78% rename from toontown/launcher/TTULauncher.py rename to toontown/launcher/TTSLauncher.py index 15d81d44..ec30a843 --- a/toontown/launcher/TTULauncher.py +++ b/toontown/launcher/TTSLauncher.py @@ -1,6 +1,8 @@ from pandac.PandaModules import * from direct.directnotify import DirectNotifyGlobal -import os, sys, time, argparse +import os +import sys +import time class LogAndOutput: def __init__(self, orig, log): @@ -17,17 +19,13 @@ class LogAndOutput: self.log.flush() self.orig.flush() -class TTULauncher: - notify = DirectNotifyGlobal.directNotify.newCategory('TTULauncher') +class TTSLauncher: + notify = DirectNotifyGlobal.directNotify.newCategory('TTSLauncher') def __init__(self): - self.logPrefix = 'united-' self.http = HTTPClient() - - parser = argparse.ArgumentParser() - parser.add_argument('token') - parser.add_argument('server') - self.args = parser.parse_args() + + self.logPrefix = 'stride-' ltime = 1 and time.localtime() logSuffix = '%02d%02d%02d_%02d%02d%02d' % (ltime[0] - 2000, ltime[1], ltime[2], ltime[3], ltime[4], ltime[5]) @@ -45,11 +43,14 @@ class TTULauncher: sys.stderr = logErr def getPlayToken(self): - return self.args.token + return self.getValue('TTS_PLAYCOOKIE') def getGameServer(self): - return self.args.server - + return self.getValue('TTS_GAMESERVER') + + def getValue(self, key, default = None): + return os.environ.get(key, default) + def setPandaErrorCode(self): pass diff --git a/toontown/launcher/__init__.py b/toontown/launcher/__init__.py old mode 100644 new mode 100755 diff --git a/toontown/login/AvatarChoice.py b/toontown/login/AvatarChoice.py old mode 100644 new mode 100755 diff --git a/toontown/login/AvatarChooser.py b/toontown/login/AvatarChooser.py old mode 100644 new mode 100755 index 407291de..9e7f180c --- a/toontown/login/AvatarChooser.py +++ b/toontown/login/AvatarChooser.py @@ -39,7 +39,8 @@ class AvatarChooser(StateData.StateData): base.disableMouse() self.title.reparentTo(aspect2d) self.quitButton.show() - self.languageButton.show() + if config.GetBool('want-language-selection', False): + self.languageButton.show() self.pickAToonBG.setBin('background', 1) self.pickAToonBG.reparentTo(aspect2d) base.setBackgroundColor(Vec4(0.145, 0.368, 0.78, 1)) @@ -80,6 +81,7 @@ class AvatarChooser(StateData.StateData): self.quitButton.reparentTo(base.a2dBottomRight) self.languageButton = DirectButton(relief=None, image=(quitHover, quitHover, quitHover), text=TTLocalizer.LanguageButtonText, text_font=ToontownGlobals.getSignFont(), text_fg=(0.977, 0.816, 0.133, 1), text_scale=TTLocalizer.AClanguageButton, text_pos=(0, -0.025), pos=(0.25, 0, 0.075), image_scale=1.05, image1_scale=1.05, image2_scale=1.05, scale=1.05, command=self.openLanguageGui) self.languageButton.reparentTo(base.a2dBottomLeft) + self.languageButton.hide() gui.removeNode() gui2.removeNode() newGui.removeNode() @@ -212,13 +214,16 @@ class AvatarChooser(StateData.StateData): elif panelDoneStatus == 'nameIt': self.__handleChoice() elif panelDoneStatus == 'delete': - self.__handleChoice() + self.__handleDelete() elif panelDoneStatus == 'create': self.__handleChoice() def __handleChoice(self): base.transitions.fadeOut(finishIval=EventInterval(self.doneEvent, [self.doneStatus])) + def __handleDelete(self): + messenger.send(self.doneEvent, [self.doneStatus]) + def __handleQuit(self): cleanupDialog('globalDialog') self.doneStatus = {'mode': 'exit'} @@ -226,7 +231,7 @@ class AvatarChooser(StateData.StateData): def getChoice(self): return self.choice - + def openLanguageGui(self): self.exit() - LanguageSelector.LanguageSelector(self.enter).create() \ No newline at end of file + LanguageSelector.LanguageSelector(self.enter).create() diff --git a/toontown/login/__init__.py b/toontown/login/__init__.py old mode 100644 new mode 100755 diff --git a/toontown/makeatoon/BodyShop.py b/toontown/makeatoon/BodyShop.py old mode 100644 new mode 100755 diff --git a/toontown/makeatoon/ClothesGUI.py b/toontown/makeatoon/ClothesGUI.py old mode 100644 new mode 100755 diff --git a/toontown/makeatoon/ColorShop.py b/toontown/makeatoon/ColorShop.py old mode 100644 new mode 100755 diff --git a/toontown/makeatoon/GenderShop.py b/toontown/makeatoon/GenderShop.py old mode 100644 new mode 100755 diff --git a/toontown/makeatoon/MakeAToon.py b/toontown/makeatoon/MakeAToon.py old mode 100644 new mode 100755 diff --git a/toontown/makeatoon/MakeAToonGlobals.py b/toontown/makeatoon/MakeAToonGlobals.py old mode 100644 new mode 100755 diff --git a/toontown/makeatoon/MakeClothesGUI.py b/toontown/makeatoon/MakeClothesGUI.py old mode 100644 new mode 100755 diff --git a/toontown/makeatoon/NameGenerator.py b/toontown/makeatoon/NameGenerator.py old mode 100644 new mode 100755 index 3325ae28..c7f36632 --- a/toontown/makeatoon/NameGenerator.py +++ b/toontown/makeatoon/NameGenerator.py @@ -1,12 +1,7 @@ from pandac.PandaModules import * -import random -import string -import copy -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import TTLocalizer -import os -from direct.showbase import AppRunnerGlobal from direct.directnotify import DirectNotifyGlobal +from toontown.toonbase import TTLocalizer, ToontownGlobals +import random class NameGenerator: text = TextNode('text') @@ -364,4 +359,4 @@ class NameGenerator: totalTitleFirstLasts = neutralTitleFirstLasts + boyTitleFirstLasts + girlTitleFirstLasts print 'Total title first lasts: ' + str(totalTitleFirstLasts) totalNames = firsts + lasts + totalTitleFirsts + totalTitleLasts + totalFirstLasts + totalTitleFirstLasts - print 'Total Names: ' + str(totalNames) + print 'Total Names: ' + str(totalNames) \ No newline at end of file diff --git a/toontown/makeatoon/NameShop.py b/toontown/makeatoon/NameShop.py old mode 100644 new mode 100755 index 44e0e485..b91e79e0 --- a/toontown/makeatoon/NameShop.py +++ b/toontown/makeatoon/NameShop.py @@ -78,11 +78,9 @@ class NameShop(StateData.StateData): State.State('PickAName', self.enterPickANameState, self.exitPickANameState, ['TypeAName', 'Done']), State.State('TypeAName', self.enterTypeANameState, self.exitTypeANameState, ['PickAName', 'Approval', - 'Accepted', 'Rejected']), State.State('Approval', self.enterApprovalState, self.exitApprovalState, ['PickAName', 'ApprovalAccepted']), State.State('ApprovalAccepted', self.enterApprovalAcceptedState, self.exitApprovalAcceptedState, ['Done']), - State.State('Accepted', self.enterAcceptedState, self.exitAcceptedState, ['Done']), State.State('Rejected', self.enterRejectedState, self.exitRejectedState, ['TypeAName']), State.State('Done', self.enterDone, self.exitDone, ['Init'])], 'Init', 'Done') self.parentFSM = makeAToon.fsm @@ -764,21 +762,6 @@ class NameShop(StateData.StateData): def exitApprovalAcceptedState(self): pass - def enterAcceptedState(self): - self.notify.debug('enterAcceptedState') - self.acceptedDialog = TTDialog.TTGlobalDialog(doneEvent='acceptedDone', message=TTLocalizer.NameShopNameAccepted, style=TTDialog.Acknowledge) - self.acceptedDialog.show() - self.acceptOnce('acceptedDone', self.__handleAccepted) - - def __handleAccepted(self): - self.acceptedDialog.cleanup() - self.doneStatus = 'done' - self.storeSkipTutorialRequest() - messenger.send(self.doneEvent) - - def exitAcceptedState(self): - pass - def enterRejectedState(self): self.notify.debug('enterRejectedState') self.rejectedDialog = TTDialog.TTGlobalDialog(doneEvent='rejectedDone', message=TTLocalizer.NameShopNameRejected, style=TTDialog.Acknowledge) diff --git a/toontown/makeatoon/ShuffleButton.py b/toontown/makeatoon/ShuffleButton.py old mode 100644 new mode 100755 diff --git a/toontown/makeatoon/TTPickANamePattern.py b/toontown/makeatoon/TTPickANamePattern.py old mode 100644 new mode 100755 diff --git a/toontown/makeatoon/TrackShop.py b/toontown/makeatoon/TrackShop.py old mode 100644 new mode 100755 diff --git a/toontown/makeatoon/__init__.py b/toontown/makeatoon/__init__.py old mode 100644 new mode 100755 diff --git a/toontown/margins/MarginCell.py b/toontown/margins/MarginCell.py old mode 100644 new mode 100755 diff --git a/toontown/margins/MarginGlobals.py b/toontown/margins/MarginGlobals.py old mode 100644 new mode 100755 diff --git a/toontown/margins/MarginManager.py b/toontown/margins/MarginManager.py old mode 100644 new mode 100755 diff --git a/toontown/margins/MarginVisible.py b/toontown/margins/MarginVisible.py old mode 100644 new mode 100755 diff --git a/toontown/margins/__init__.py b/toontown/margins/__init__.py old mode 100644 new mode 100755 diff --git a/toontown/minigame/ArrowKeys.py b/toontown/minigame/ArrowKeys.py old mode 100644 new mode 100755 diff --git a/toontown/minigame/CannonGameGlobals.py b/toontown/minigame/CannonGameGlobals.py old mode 100644 new mode 100755 diff --git a/toontown/minigame/CatchGameGlobals.py b/toontown/minigame/CatchGameGlobals.py old mode 100644 new mode 100755 diff --git a/toontown/minigame/CatchGameToonSD.py b/toontown/minigame/CatchGameToonSD.py old mode 100644 new mode 100755 diff --git a/toontown/minigame/ClerkPurchase.py b/toontown/minigame/ClerkPurchase.py old mode 100644 new mode 100755 diff --git a/toontown/minigame/CogThief.py b/toontown/minigame/CogThief.py old mode 100644 new mode 100755 diff --git a/toontown/minigame/CogThiefGameGlobals.py b/toontown/minigame/CogThiefGameGlobals.py old mode 100644 new mode 100755 diff --git a/toontown/minigame/CogThiefGameToonSD.py b/toontown/minigame/CogThiefGameToonSD.py old mode 100644 new mode 100755 diff --git a/toontown/minigame/CogThiefWalk.py b/toontown/minigame/CogThiefWalk.py old mode 100644 new mode 100755 diff --git a/toontown/minigame/DistributedCannonGame.py b/toontown/minigame/DistributedCannonGame.py old mode 100644 new mode 100755 diff --git a/toontown/minigame/DistributedCannonGameAI.py b/toontown/minigame/DistributedCannonGameAI.py old mode 100644 new mode 100755 diff --git a/toontown/minigame/DistributedCatchGame.py b/toontown/minigame/DistributedCatchGame.py old mode 100644 new mode 100755 diff --git a/toontown/minigame/DistributedCatchGameAI.py b/toontown/minigame/DistributedCatchGameAI.py old mode 100644 new mode 100755 diff --git a/toontown/minigame/DistributedCogThiefGame.py b/toontown/minigame/DistributedCogThiefGame.py old mode 100644 new mode 100755 diff --git a/toontown/minigame/DistributedCogThiefGameAI.py b/toontown/minigame/DistributedCogThiefGameAI.py old mode 100644 new mode 100755 diff --git a/toontown/minigame/DistributedDivingGame.py b/toontown/minigame/DistributedDivingGame.py old mode 100644 new mode 100755 diff --git a/toontown/minigame/DistributedDivingGameAI.py b/toontown/minigame/DistributedDivingGameAI.py old mode 100644 new mode 100755 diff --git a/toontown/minigame/DistributedIceGame.py b/toontown/minigame/DistributedIceGame.py old mode 100644 new mode 100755 diff --git a/toontown/minigame/DistributedIceGameAI.py b/toontown/minigame/DistributedIceGameAI.py old mode 100644 new mode 100755 diff --git a/toontown/minigame/DistributedIceWorld.py b/toontown/minigame/DistributedIceWorld.py old mode 100644 new mode 100755 diff --git a/toontown/minigame/DistributedMazeGame.py b/toontown/minigame/DistributedMazeGame.py old mode 100644 new mode 100755 diff --git a/toontown/minigame/DistributedMazeGameAI.py b/toontown/minigame/DistributedMazeGameAI.py old mode 100644 new mode 100755 diff --git a/toontown/minigame/DistributedMinigame.py b/toontown/minigame/DistributedMinigame.py old mode 100644 new mode 100755 diff --git a/toontown/minigame/DistributedMinigameAI.py b/toontown/minigame/DistributedMinigameAI.py old mode 100644 new mode 100755 diff --git a/toontown/minigame/DistributedMinigamePhysicsWorld.py b/toontown/minigame/DistributedMinigamePhysicsWorld.py old mode 100644 new mode 100755 diff --git a/toontown/minigame/DistributedMinigameTemplate.py b/toontown/minigame/DistributedMinigameTemplate.py old mode 100644 new mode 100755 diff --git a/toontown/minigame/DistributedMinigameTemplateAI.py b/toontown/minigame/DistributedMinigameTemplateAI.py old mode 100644 new mode 100755 diff --git a/toontown/minigame/DistributedPatternGame.py b/toontown/minigame/DistributedPatternGame.py old mode 100644 new mode 100755 diff --git a/toontown/minigame/DistributedPatternGameAI.py b/toontown/minigame/DistributedPatternGameAI.py old mode 100644 new mode 100755 diff --git a/toontown/minigame/DistributedRaceGame.py b/toontown/minigame/DistributedRaceGame.py old mode 100644 new mode 100755 diff --git a/toontown/minigame/DistributedRaceGameAI.py b/toontown/minigame/DistributedRaceGameAI.py old mode 100644 new mode 100755 diff --git a/toontown/minigame/DistributedRingGame.py b/toontown/minigame/DistributedRingGame.py old mode 100644 new mode 100755 diff --git a/toontown/minigame/DistributedRingGameAI.py b/toontown/minigame/DistributedRingGameAI.py old mode 100644 new mode 100755 diff --git a/toontown/minigame/DistributedTagGame.py b/toontown/minigame/DistributedTagGame.py old mode 100644 new mode 100755 diff --git a/toontown/minigame/DistributedTagGameAI.py b/toontown/minigame/DistributedTagGameAI.py old mode 100644 new mode 100755 diff --git a/toontown/minigame/DistributedTargetGame.py b/toontown/minigame/DistributedTargetGame.py old mode 100644 new mode 100755 diff --git a/toontown/minigame/DistributedTargetGameAI.py b/toontown/minigame/DistributedTargetGameAI.py old mode 100644 new mode 100755 diff --git a/toontown/minigame/DistributedTugOfWarGame.py b/toontown/minigame/DistributedTugOfWarGame.py old mode 100644 new mode 100755 diff --git a/toontown/minigame/DistributedTugOfWarGameAI.py b/toontown/minigame/DistributedTugOfWarGameAI.py old mode 100644 new mode 100755 diff --git a/toontown/minigame/DistributedTwoDGame.py b/toontown/minigame/DistributedTwoDGame.py old mode 100644 new mode 100755 diff --git a/toontown/minigame/DistributedTwoDGameAI.py b/toontown/minigame/DistributedTwoDGameAI.py old mode 100644 new mode 100755 diff --git a/toontown/minigame/DistributedVineGame.py b/toontown/minigame/DistributedVineGame.py old mode 100644 new mode 100755 diff --git a/toontown/minigame/DistributedVineGameAI.py b/toontown/minigame/DistributedVineGameAI.py old mode 100644 new mode 100755 diff --git a/toontown/minigame/DivingFishSpawn.py b/toontown/minigame/DivingFishSpawn.py old mode 100644 new mode 100755 diff --git a/toontown/minigame/DivingGameGlobals.py b/toontown/minigame/DivingGameGlobals.py old mode 100644 new mode 100755 diff --git a/toontown/minigame/DivingGameToonSD.py b/toontown/minigame/DivingGameToonSD.py old mode 100644 new mode 100755 diff --git a/toontown/minigame/DivingTreasure.py b/toontown/minigame/DivingTreasure.py old mode 100644 new mode 100755 diff --git a/toontown/minigame/DropPlacer.py b/toontown/minigame/DropPlacer.py old mode 100644 new mode 100755 diff --git a/toontown/minigame/DropScheduler.py b/toontown/minigame/DropScheduler.py old mode 100644 new mode 100755 diff --git a/toontown/minigame/FogOverlay.py b/toontown/minigame/FogOverlay.py old mode 100644 new mode 100755 diff --git a/toontown/minigame/IceGameGlobals.py b/toontown/minigame/IceGameGlobals.py old mode 100644 new mode 100755 diff --git a/toontown/minigame/IceTreasure.py b/toontown/minigame/IceTreasure.py old mode 100644 new mode 100755 diff --git a/toontown/minigame/Maze.py b/toontown/minigame/Maze.py old mode 100644 new mode 100755 diff --git a/toontown/minigame/MazeBase.py b/toontown/minigame/MazeBase.py old mode 100644 new mode 100755 diff --git a/toontown/minigame/MazeData.py b/toontown/minigame/MazeData.py old mode 100644 new mode 100755 diff --git a/toontown/minigame/MazeGameGlobals.py b/toontown/minigame/MazeGameGlobals.py old mode 100644 new mode 100755 diff --git a/toontown/minigame/MazeMapGui.py b/toontown/minigame/MazeMapGui.py old mode 100644 new mode 100755 diff --git a/toontown/minigame/MazeSuit.py b/toontown/minigame/MazeSuit.py old mode 100644 new mode 100755 diff --git a/toontown/minigame/MazeTreasure.py b/toontown/minigame/MazeTreasure.py old mode 100644 new mode 100755 diff --git a/toontown/minigame/MinigameAvatarScorePanel.py b/toontown/minigame/MinigameAvatarScorePanel.py old mode 100644 new mode 100755 diff --git a/toontown/minigame/MinigameCreatorAI.py b/toontown/minigame/MinigameCreatorAI.py old mode 100644 new mode 100755 diff --git a/toontown/minigame/MinigameGlobals.py b/toontown/minigame/MinigameGlobals.py old mode 100644 new mode 100755 diff --git a/toontown/minigame/MinigamePhysicsWorldBase.py b/toontown/minigame/MinigamePhysicsWorldBase.py old mode 100644 new mode 100755 diff --git a/toontown/minigame/MinigamePowerMeter.py b/toontown/minigame/MinigamePowerMeter.py old mode 100644 new mode 100755 diff --git a/toontown/minigame/MinigameRulesPanel.py b/toontown/minigame/MinigameRulesPanel.py old mode 100644 new mode 100755 diff --git a/toontown/minigame/OrthoDrive.py b/toontown/minigame/OrthoDrive.py old mode 100644 new mode 100755 diff --git a/toontown/minigame/OrthoWalk.py b/toontown/minigame/OrthoWalk.py old mode 100644 new mode 100755 diff --git a/toontown/minigame/PatternGameGlobals.py b/toontown/minigame/PatternGameGlobals.py old mode 100644 new mode 100755 diff --git a/toontown/minigame/Purchase.py b/toontown/minigame/Purchase.py old mode 100644 new mode 100755 diff --git a/toontown/minigame/PurchaseBase.py b/toontown/minigame/PurchaseBase.py old mode 100644 new mode 100755 diff --git a/toontown/minigame/RaceGameGlobals.py b/toontown/minigame/RaceGameGlobals.py old mode 100644 new mode 100755 diff --git a/toontown/minigame/Ring.py b/toontown/minigame/Ring.py old mode 100644 new mode 100755 diff --git a/toontown/minigame/RingAction.py b/toontown/minigame/RingAction.py old mode 100644 new mode 100755 diff --git a/toontown/minigame/RingGameGlobals.py b/toontown/minigame/RingGameGlobals.py old mode 100644 new mode 100755 diff --git a/toontown/minigame/RingGroup.py b/toontown/minigame/RingGroup.py old mode 100644 new mode 100755 diff --git a/toontown/minigame/RingTrack.py b/toontown/minigame/RingTrack.py old mode 100644 new mode 100755 diff --git a/toontown/minigame/RingTrackGroup.py b/toontown/minigame/RingTrackGroup.py old mode 100644 new mode 100755 diff --git a/toontown/minigame/RingTrackGroups.py b/toontown/minigame/RingTrackGroups.py old mode 100644 new mode 100755 diff --git a/toontown/minigame/RingTracks.py b/toontown/minigame/RingTracks.py old mode 100644 new mode 100755 diff --git a/toontown/minigame/RubberBand.py b/toontown/minigame/RubberBand.py old mode 100644 new mode 100755 diff --git a/toontown/minigame/SwingVine.py b/toontown/minigame/SwingVine.py old mode 100644 new mode 100755 diff --git a/toontown/minigame/TagGameGlobals.py b/toontown/minigame/TagGameGlobals.py old mode 100644 new mode 100755 diff --git a/toontown/minigame/TagTreasurePlannerAI.py b/toontown/minigame/TagTreasurePlannerAI.py old mode 100644 new mode 100755 diff --git a/toontown/minigame/TargetGameGlobals.py b/toontown/minigame/TargetGameGlobals.py old mode 100644 new mode 100755 diff --git a/toontown/minigame/ToonBlitzAssetMgr.py b/toontown/minigame/ToonBlitzAssetMgr.py old mode 100644 new mode 100755 diff --git a/toontown/minigame/ToonBlitzGlobals.py b/toontown/minigame/ToonBlitzGlobals.py old mode 100644 new mode 100755 diff --git a/toontown/minigame/Trajectory.py b/toontown/minigame/Trajectory.py old mode 100644 new mode 100755 diff --git a/toontown/minigame/TreasureScorePanel.py b/toontown/minigame/TreasureScorePanel.py old mode 100644 new mode 100755 diff --git a/toontown/minigame/TrolleyHolidayMgrAI.py b/toontown/minigame/TrolleyHolidayMgrAI.py old mode 100644 new mode 100755 diff --git a/toontown/minigame/TrolleyWeekendMgrAI.py b/toontown/minigame/TrolleyWeekendMgrAI.py old mode 100644 new mode 100755 diff --git a/toontown/minigame/TugOfWarGameGlobals.py b/toontown/minigame/TugOfWarGameGlobals.py old mode 100644 new mode 100755 diff --git a/toontown/minigame/TwoDBattleMgr.py b/toontown/minigame/TwoDBattleMgr.py old mode 100644 new mode 100755 diff --git a/toontown/minigame/TwoDBlock.py b/toontown/minigame/TwoDBlock.py old mode 100644 new mode 100755 diff --git a/toontown/minigame/TwoDCamera.py b/toontown/minigame/TwoDCamera.py old mode 100644 new mode 100755 diff --git a/toontown/minigame/TwoDDrive.py b/toontown/minigame/TwoDDrive.py old mode 100644 new mode 100755 diff --git a/toontown/minigame/TwoDEnemy.py b/toontown/minigame/TwoDEnemy.py old mode 100644 new mode 100755 diff --git a/toontown/minigame/TwoDEnemyMgr.py b/toontown/minigame/TwoDEnemyMgr.py old mode 100644 new mode 100755 diff --git a/toontown/minigame/TwoDGameToonSD.py b/toontown/minigame/TwoDGameToonSD.py old mode 100644 new mode 100755 diff --git a/toontown/minigame/TwoDSection.py b/toontown/minigame/TwoDSection.py old mode 100644 new mode 100755 diff --git a/toontown/minigame/TwoDSectionMgr.py b/toontown/minigame/TwoDSectionMgr.py old mode 100644 new mode 100755 diff --git a/toontown/minigame/TwoDSpawnPointMgr.py b/toontown/minigame/TwoDSpawnPointMgr.py old mode 100644 new mode 100755 diff --git a/toontown/minigame/TwoDStomper.py b/toontown/minigame/TwoDStomper.py old mode 100644 new mode 100755 diff --git a/toontown/minigame/TwoDStomperMgr.py b/toontown/minigame/TwoDStomperMgr.py old mode 100644 new mode 100755 diff --git a/toontown/minigame/TwoDTreasure.py b/toontown/minigame/TwoDTreasure.py old mode 100644 new mode 100755 diff --git a/toontown/minigame/TwoDTreasureMgr.py b/toontown/minigame/TwoDTreasureMgr.py old mode 100644 new mode 100755 diff --git a/toontown/minigame/TwoDWalk.py b/toontown/minigame/TwoDWalk.py old mode 100644 new mode 100755 diff --git a/toontown/minigame/VineBat.py b/toontown/minigame/VineBat.py old mode 100644 new mode 100755 diff --git a/toontown/minigame/VineGameGlobals.py b/toontown/minigame/VineGameGlobals.py old mode 100644 new mode 100755 diff --git a/toontown/minigame/VineHeadFrame.py b/toontown/minigame/VineHeadFrame.py old mode 100644 new mode 100755 diff --git a/toontown/minigame/VineSpider.py b/toontown/minigame/VineSpider.py old mode 100644 new mode 100755 diff --git a/toontown/minigame/VineTreasure.py b/toontown/minigame/VineTreasure.py old mode 100644 new mode 100755 diff --git a/toontown/minigame/__init__.py b/toontown/minigame/__init__.py old mode 100644 new mode 100755 diff --git a/toontown/nametag/Nametag.py b/toontown/nametag/Nametag.py old mode 100644 new mode 100755 diff --git a/toontown/nametag/Nametag2d.py b/toontown/nametag/Nametag2d.py old mode 100644 new mode 100755 diff --git a/toontown/nametag/Nametag3d.py b/toontown/nametag/Nametag3d.py old mode 100644 new mode 100755 diff --git a/toontown/nametag/NametagFloat2d.py b/toontown/nametag/NametagFloat2d.py old mode 100644 new mode 100755 diff --git a/toontown/nametag/NametagFloat3d.py b/toontown/nametag/NametagFloat3d.py old mode 100644 new mode 100755 diff --git a/toontown/nametag/NametagGlobals.py b/toontown/nametag/NametagGlobals.py old mode 100644 new mode 100755 diff --git a/toontown/nametag/NametagGroup.py b/toontown/nametag/NametagGroup.py old mode 100644 new mode 100755 diff --git a/toontown/nametag/__init__.py b/toontown/nametag/__init__.py old mode 100644 new mode 100755 diff --git a/toontown/parties/ActivityBase.py b/toontown/parties/ActivityBase.py old mode 100644 new mode 100755 diff --git a/toontown/parties/BaseActivityFSM.py b/toontown/parties/BaseActivityFSM.py old mode 100644 new mode 100755 diff --git a/toontown/parties/CalendarGuiDay.py b/toontown/parties/CalendarGuiDay.py old mode 100644 new mode 100755 diff --git a/toontown/parties/CalendarGuiMonth.py b/toontown/parties/CalendarGuiMonth.py old mode 100644 new mode 100755 diff --git a/toontown/parties/Cannon.py b/toontown/parties/Cannon.py old mode 100644 new mode 100755 diff --git a/toontown/parties/CannonGui.py b/toontown/parties/CannonGui.py old mode 100644 new mode 100755 diff --git a/toontown/parties/DecorBase.py b/toontown/parties/DecorBase.py old mode 100644 new mode 100755 diff --git a/toontown/parties/Decoration.py b/toontown/parties/Decoration.py old mode 100644 new mode 100755 diff --git a/toontown/parties/DistributedParty.py b/toontown/parties/DistributedParty.py old mode 100644 new mode 100755 diff --git a/toontown/parties/DistributedPartyAI.py b/toontown/parties/DistributedPartyAI.py old mode 100644 new mode 100755 diff --git a/toontown/parties/DistributedPartyActivity.py b/toontown/parties/DistributedPartyActivity.py old mode 100644 new mode 100755 diff --git a/toontown/parties/DistributedPartyActivityAI.py b/toontown/parties/DistributedPartyActivityAI.py old mode 100644 new mode 100755 diff --git a/toontown/parties/DistributedPartyCannon.py b/toontown/parties/DistributedPartyCannon.py old mode 100644 new mode 100755 diff --git a/toontown/parties/DistributedPartyCannonAI.py b/toontown/parties/DistributedPartyCannonAI.py old mode 100644 new mode 100755 diff --git a/toontown/parties/DistributedPartyCannonActivity.py b/toontown/parties/DistributedPartyCannonActivity.py old mode 100644 new mode 100755 diff --git a/toontown/parties/DistributedPartyCannonActivityAI.py b/toontown/parties/DistributedPartyCannonActivityAI.py old mode 100644 new mode 100755 diff --git a/toontown/parties/DistributedPartyCatchActivity.py b/toontown/parties/DistributedPartyCatchActivity.py old mode 100644 new mode 100755 diff --git a/toontown/parties/DistributedPartyCatchActivityAI.py b/toontown/parties/DistributedPartyCatchActivityAI.py old mode 100644 new mode 100755 diff --git a/toontown/parties/DistributedPartyCatchActivityBase.py b/toontown/parties/DistributedPartyCatchActivityBase.py old mode 100644 new mode 100755 diff --git a/toontown/parties/DistributedPartyCogActivity.py b/toontown/parties/DistributedPartyCogActivity.py old mode 100644 new mode 100755 diff --git a/toontown/parties/DistributedPartyCogActivityAI.py b/toontown/parties/DistributedPartyCogActivityAI.py old mode 100644 new mode 100755 diff --git a/toontown/parties/DistributedPartyDance20Activity.py b/toontown/parties/DistributedPartyDance20Activity.py old mode 100644 new mode 100755 diff --git a/toontown/parties/DistributedPartyDance20ActivityAI.py b/toontown/parties/DistributedPartyDance20ActivityAI.py old mode 100644 new mode 100755 diff --git a/toontown/parties/DistributedPartyDanceActivity.py b/toontown/parties/DistributedPartyDanceActivity.py old mode 100644 new mode 100755 diff --git a/toontown/parties/DistributedPartyDanceActivityAI.py b/toontown/parties/DistributedPartyDanceActivityAI.py old mode 100644 new mode 100755 diff --git a/toontown/parties/DistributedPartyDanceActivityBase.py b/toontown/parties/DistributedPartyDanceActivityBase.py old mode 100644 new mode 100755 diff --git a/toontown/parties/DistributedPartyDanceActivityBaseAI.py b/toontown/parties/DistributedPartyDanceActivityBaseAI.py old mode 100644 new mode 100755 diff --git a/toontown/parties/DistributedPartyFireworksActivity.py b/toontown/parties/DistributedPartyFireworksActivity.py old mode 100644 new mode 100755 diff --git a/toontown/parties/DistributedPartyFireworksActivityAI.py b/toontown/parties/DistributedPartyFireworksActivityAI.py old mode 100644 new mode 100755 diff --git a/toontown/parties/DistributedPartyJukebox40Activity.py b/toontown/parties/DistributedPartyJukebox40Activity.py old mode 100644 new mode 100755 diff --git a/toontown/parties/DistributedPartyJukebox40ActivityAI.py b/toontown/parties/DistributedPartyJukebox40ActivityAI.py old mode 100644 new mode 100755 diff --git a/toontown/parties/DistributedPartyJukeboxActivity.py b/toontown/parties/DistributedPartyJukeboxActivity.py old mode 100644 new mode 100755 diff --git a/toontown/parties/DistributedPartyJukeboxActivityAI.py b/toontown/parties/DistributedPartyJukeboxActivityAI.py old mode 100644 new mode 100755 diff --git a/toontown/parties/DistributedPartyJukeboxActivityBase.py b/toontown/parties/DistributedPartyJukeboxActivityBase.py old mode 100644 new mode 100755 diff --git a/toontown/parties/DistributedPartyJukeboxActivityBaseAI.py b/toontown/parties/DistributedPartyJukeboxActivityBaseAI.py old mode 100644 new mode 100755 diff --git a/toontown/parties/DistributedPartyTeamActivity.py b/toontown/parties/DistributedPartyTeamActivity.py old mode 100644 new mode 100755 diff --git a/toontown/parties/DistributedPartyTeamActivityAI.py b/toontown/parties/DistributedPartyTeamActivityAI.py old mode 100644 new mode 100755 diff --git a/toontown/parties/DistributedPartyTrampolineActivity.py b/toontown/parties/DistributedPartyTrampolineActivity.py old mode 100644 new mode 100755 diff --git a/toontown/parties/DistributedPartyTrampolineActivityAI.py b/toontown/parties/DistributedPartyTrampolineActivityAI.py old mode 100644 new mode 100755 diff --git a/toontown/parties/DistributedPartyTugOfWarActivity.py b/toontown/parties/DistributedPartyTugOfWarActivity.py old mode 100644 new mode 100755 diff --git a/toontown/parties/DistributedPartyTugOfWarActivityAI.py b/toontown/parties/DistributedPartyTugOfWarActivityAI.py old mode 100644 new mode 100755 diff --git a/toontown/parties/DistributedPartyValentineDance20Activity.py b/toontown/parties/DistributedPartyValentineDance20Activity.py old mode 100644 new mode 100755 diff --git a/toontown/parties/DistributedPartyValentineDance20ActivityAI.py b/toontown/parties/DistributedPartyValentineDance20ActivityAI.py old mode 100644 new mode 100755 diff --git a/toontown/parties/DistributedPartyValentineDanceActivity.py b/toontown/parties/DistributedPartyValentineDanceActivity.py old mode 100644 new mode 100755 diff --git a/toontown/parties/DistributedPartyValentineDanceActivityAI.py b/toontown/parties/DistributedPartyValentineDanceActivityAI.py old mode 100644 new mode 100755 diff --git a/toontown/parties/DistributedPartyValentineJukebox40Activity.py b/toontown/parties/DistributedPartyValentineJukebox40Activity.py old mode 100644 new mode 100755 diff --git a/toontown/parties/DistributedPartyValentineJukebox40ActivityAI.py b/toontown/parties/DistributedPartyValentineJukebox40ActivityAI.py old mode 100644 new mode 100755 diff --git a/toontown/parties/DistributedPartyValentineJukeboxActivity.py b/toontown/parties/DistributedPartyValentineJukeboxActivity.py old mode 100644 new mode 100755 diff --git a/toontown/parties/DistributedPartyValentineJukeboxActivityAI.py b/toontown/parties/DistributedPartyValentineJukeboxActivityAI.py old mode 100644 new mode 100755 diff --git a/toontown/parties/DistributedPartyValentineTrampolineActivity.py b/toontown/parties/DistributedPartyValentineTrampolineActivity.py old mode 100644 new mode 100755 diff --git a/toontown/parties/DistributedPartyValentineTrampolineActivityAI.py b/toontown/parties/DistributedPartyValentineTrampolineActivityAI.py old mode 100644 new mode 100755 diff --git a/toontown/parties/DistributedPartyVictoryTrampolineActivity.py b/toontown/parties/DistributedPartyVictoryTrampolineActivity.py old mode 100644 new mode 100755 diff --git a/toontown/parties/DistributedPartyVictoryTrampolineActivityAI.py b/toontown/parties/DistributedPartyVictoryTrampolineActivityAI.py old mode 100644 new mode 100755 diff --git a/toontown/parties/DistributedPartyWinterCatchActivity.py b/toontown/parties/DistributedPartyWinterCatchActivity.py old mode 100644 new mode 100755 diff --git a/toontown/parties/DistributedPartyWinterCatchActivityAI.py b/toontown/parties/DistributedPartyWinterCatchActivityAI.py old mode 100644 new mode 100755 diff --git a/toontown/parties/DistributedPartyWinterCogActivity.py b/toontown/parties/DistributedPartyWinterCogActivity.py old mode 100644 new mode 100755 diff --git a/toontown/parties/DistributedPartyWinterCogActivityAI.py b/toontown/parties/DistributedPartyWinterCogActivityAI.py old mode 100644 new mode 100755 diff --git a/toontown/parties/DistributedPartyWinterTrampolineActivity.py b/toontown/parties/DistributedPartyWinterTrampolineActivity.py old mode 100644 new mode 100755 diff --git a/toontown/parties/DistributedPartyWinterTrampolineActivityAI.py b/toontown/parties/DistributedPartyWinterTrampolineActivityAI.py old mode 100644 new mode 100755 diff --git a/toontown/parties/GlobalPartyManager.py b/toontown/parties/GlobalPartyManager.py old mode 100644 new mode 100755 diff --git a/toontown/parties/GlobalPartyManagerAI.py b/toontown/parties/GlobalPartyManagerAI.py old mode 100644 new mode 100755 diff --git a/toontown/parties/GlobalPartyManagerUD.py b/toontown/parties/GlobalPartyManagerUD.py old mode 100644 new mode 100755 diff --git a/toontown/parties/InviteInfo.py b/toontown/parties/InviteInfo.py old mode 100644 new mode 100755 diff --git a/toontown/parties/InviteVisual.py b/toontown/parties/InviteVisual.py old mode 100644 new mode 100755 diff --git a/toontown/parties/JellybeanRewardGui.py b/toontown/parties/JellybeanRewardGui.py old mode 100644 new mode 100755 diff --git a/toontown/parties/JukeboxGui.py b/toontown/parties/JukeboxGui.py old mode 100644 new mode 100755 diff --git a/toontown/parties/KeyCodes.py b/toontown/parties/KeyCodes.py old mode 100644 new mode 100755 diff --git a/toontown/parties/KeyCodesGui.py b/toontown/parties/KeyCodesGui.py old mode 100644 new mode 100755 diff --git a/toontown/parties/Party.py b/toontown/parties/Party.py old mode 100644 new mode 100755 diff --git a/toontown/parties/PartyCatchActivityToonSD.py b/toontown/parties/PartyCatchActivityToonSD.py old mode 100644 new mode 100755 diff --git a/toontown/parties/PartyCog.py b/toontown/parties/PartyCog.py old mode 100644 new mode 100755 diff --git a/toontown/parties/PartyCogActivity.py b/toontown/parties/PartyCogActivity.py old mode 100644 new mode 100755 diff --git a/toontown/parties/PartyCogActivityGui.py b/toontown/parties/PartyCogActivityGui.py old mode 100644 new mode 100755 diff --git a/toontown/parties/PartyCogActivityInput.py b/toontown/parties/PartyCogActivityInput.py old mode 100644 new mode 100755 diff --git a/toontown/parties/PartyCogActivityPlayer.py b/toontown/parties/PartyCogActivityPlayer.py old mode 100644 new mode 100755 diff --git a/toontown/parties/PartyCogUtils.py b/toontown/parties/PartyCogUtils.py old mode 100644 new mode 100755 diff --git a/toontown/parties/PartyDanceActivityToonFSM.py b/toontown/parties/PartyDanceActivityToonFSM.py old mode 100644 new mode 100755 diff --git a/toontown/parties/PartyEditor.py b/toontown/parties/PartyEditor.py old mode 100644 new mode 100755 diff --git a/toontown/parties/PartyEditorGrid.py b/toontown/parties/PartyEditorGrid.py old mode 100644 new mode 100755 diff --git a/toontown/parties/PartyEditorGridElement.py b/toontown/parties/PartyEditorGridElement.py old mode 100644 new mode 100755 diff --git a/toontown/parties/PartyEditorGridSquare.py b/toontown/parties/PartyEditorGridSquare.py old mode 100644 new mode 100755 diff --git a/toontown/parties/PartyEditorListElement.py b/toontown/parties/PartyEditorListElement.py old mode 100644 new mode 100755 diff --git a/toontown/parties/PartyGlobals.py b/toontown/parties/PartyGlobals.py old mode 100644 new mode 100755 index cb04ef98..f4ecd96d --- a/toontown/parties/PartyGlobals.py +++ b/toontown/parties/PartyGlobals.py @@ -70,10 +70,10 @@ ChangePartyFieldErrorCode = PythonUtil.Enum(('AllOk', 'AlreadyRefunded')) ActivityTypes = PythonUtil.Enum(('HostInitiated', 'GuestInitiated', 'Continuous')) PartyGateDenialReasons = PythonUtil.Enum(('Unavailable', 'Full')) -ActivityIds = PythonUtil.Enum(('PartyJukebox', +ActivityIds = PythonUtil.Enum(('PartyCatch', + 'PartyJukebox', 'PartyCannon', 'PartyTrampoline', - 'PartyCatch', 'PartyDance', 'PartyTugOfWar', 'PartyFireworks', @@ -697,7 +697,7 @@ PhaseToMusicData = {3.5: {'TC_SZ.ogg': [TTLocalizer.MusicTcSz, 57]}, PhaseToMusicData40 = {3.5: {'encntr_general_bg.ogg': [TTLocalizer.MusicEncntrGeneralBg, 30], 'TC_SZ.ogg': [TTLocalizer.MusicTcSz, 57]}, 3: {'create_a_toon.ogg': [TTLocalizer.MusicCreateAToon, 175], - 'tt_theme.ogg': [TTLocalizer.MusicTtuTheme, 51]}, + 'tt_theme.ogg': [TTLocalizer.MusicTtsTheme, 51]}, 4: {'minigame_race.ogg': [TTLocalizer.MusicMinigameRace, 77], 'TC_nbrhood.ogg': [TTLocalizer.MusicTcNbrhood, 59], 'MG_TwoDGame.ogg': [TTLocalizer.MusicMgTwodgame, 60], diff --git a/toontown/parties/PartyInfo.py b/toontown/parties/PartyInfo.py old mode 100644 new mode 100755 diff --git a/toontown/parties/PartyLoader.py b/toontown/parties/PartyLoader.py old mode 100644 new mode 100755 diff --git a/toontown/parties/PartyPlanner.py b/toontown/parties/PartyPlanner.py old mode 100644 new mode 100755 diff --git a/toontown/parties/PartyReplyInfo.py b/toontown/parties/PartyReplyInfo.py old mode 100644 new mode 100755 diff --git a/toontown/parties/PartyUtils.py b/toontown/parties/PartyUtils.py old mode 100644 new mode 100755 diff --git a/toontown/parties/PublicPartyGui.py b/toontown/parties/PublicPartyGui.py old mode 100644 new mode 100755 diff --git a/toontown/parties/ScrolledFriendList.py b/toontown/parties/ScrolledFriendList.py old mode 100644 new mode 100755 diff --git a/toontown/parties/ServerTimeGui.py b/toontown/parties/ServerTimeGui.py old mode 100644 new mode 100755 diff --git a/toontown/parties/SimpleMailBase.py b/toontown/parties/SimpleMailBase.py old mode 100644 new mode 100755 diff --git a/toontown/parties/StretchingArrow.py b/toontown/parties/StretchingArrow.py old mode 100644 new mode 100755 diff --git a/toontown/parties/TeamActivityGui.py b/toontown/parties/TeamActivityGui.py old mode 100644 new mode 100755 diff --git a/toontown/parties/ToontownTimeManager.py b/toontown/parties/ToontownTimeManager.py old mode 100644 new mode 100755 diff --git a/toontown/parties/ToontownTimeZone.py b/toontown/parties/ToontownTimeZone.py old mode 100644 new mode 100755 diff --git a/toontown/parties/WinterPartyCatchActivityToonSD.py b/toontown/parties/WinterPartyCatchActivityToonSD.py old mode 100644 new mode 100755 diff --git a/toontown/parties/__init__.py b/toontown/parties/__init__.py old mode 100644 new mode 100755 diff --git a/toontown/parties/activityFSMMixins.py b/toontown/parties/activityFSMMixins.py old mode 100644 new mode 100755 diff --git a/toontown/parties/activityFSMs.py b/toontown/parties/activityFSMs.py old mode 100644 new mode 100755 diff --git a/toontown/pets/DistributedPet.py b/toontown/pets/DistributedPet.py old mode 100644 new mode 100755 diff --git a/toontown/pets/DistributedPetAI.py b/toontown/pets/DistributedPetAI.py old mode 100644 new mode 100755 diff --git a/toontown/pets/DistributedPetProxy.py b/toontown/pets/DistributedPetProxy.py old mode 100644 new mode 100755 diff --git a/toontown/pets/DistributedPetProxyAI.py b/toontown/pets/DistributedPetProxyAI.py old mode 100644 new mode 100755 diff --git a/toontown/pets/Pet.py b/toontown/pets/Pet.py old mode 100644 new mode 100755 diff --git a/toontown/pets/PetActionFSM.py b/toontown/pets/PetActionFSM.py old mode 100644 new mode 100755 diff --git a/toontown/pets/PetAvatarPanel.py b/toontown/pets/PetAvatarPanel.py old mode 100644 new mode 100755 diff --git a/toontown/pets/PetBase.py b/toontown/pets/PetBase.py old mode 100644 new mode 100755 diff --git a/toontown/pets/PetBrain.py b/toontown/pets/PetBrain.py old mode 100644 new mode 100755 diff --git a/toontown/pets/PetConstants.py b/toontown/pets/PetConstants.py old mode 100644 new mode 100755 diff --git a/toontown/pets/PetDCImports.py b/toontown/pets/PetDCImports.py deleted file mode 100644 index 09d5b9e2..00000000 --- a/toontown/pets/PetDCImports.py +++ /dev/null @@ -1,2 +0,0 @@ -if hasattr(base, 'wantPets') and base.wantPets: - import DistributedPet diff --git a/toontown/pets/PetDCImportsAI.py b/toontown/pets/PetDCImportsAI.py deleted file mode 100644 index fb2b5c86..00000000 --- a/toontown/pets/PetDCImportsAI.py +++ /dev/null @@ -1,2 +0,0 @@ -if hasattr(simbase, 'wantPets') and simbase.wantPets: - import DistributedPetAI diff --git a/toontown/pets/PetDNA.py b/toontown/pets/PetDNA.py old mode 100644 new mode 100755 diff --git a/toontown/pets/PetDetail.py b/toontown/pets/PetDetail.py old mode 100644 new mode 100755 diff --git a/toontown/pets/PetDetailPanel.py b/toontown/pets/PetDetailPanel.py old mode 100644 new mode 100755 diff --git a/toontown/pets/PetGoal.py b/toontown/pets/PetGoal.py old mode 100644 new mode 100755 diff --git a/toontown/pets/PetGoalMgr.py b/toontown/pets/PetGoalMgr.py old mode 100644 new mode 100755 diff --git a/toontown/pets/PetHandle.py b/toontown/pets/PetHandle.py old mode 100644 new mode 100755 diff --git a/toontown/pets/PetLookerAI.py b/toontown/pets/PetLookerAI.py old mode 100644 new mode 100755 diff --git a/toontown/pets/PetManager.py b/toontown/pets/PetManager.py old mode 100644 new mode 100755 diff --git a/toontown/pets/PetManagerAI.py b/toontown/pets/PetManagerAI.py old mode 100644 new mode 100755 index 2ee18b96..79c03f7b --- a/toontown/pets/PetManagerAI.py +++ b/toontown/pets/PetManagerAI.py @@ -1,31 +1,19 @@ -from direct.fsm.FSM import FSM -import PetUtil, PetDNA -from toontown.toonbase import ToontownGlobals -from toontown.toonbase import TTLocalizer -import cPickle, time, random, os +from toontown.toonbase import ToontownGlobals, TTLocalizer +import PetUtil, PetDNA, time, random -MINUTE = 60 -HOUR = 60 * MINUTE -DAY = 24 * HOUR +DAY = 24 * 60 * 60 def getDayId(): - return int(time.time() // DAY) + return int(time.time() / DAY) class PetManagerAI: - NUM_DAILY_PETS = 5 # Per hood. - cachePath = config.GetString('air-pet-cache', 'astron/databases/air_cache/') + NUM_DAILY_PETS = 10 def __init__(self, air): self.air = air - self.cacheFile = '%spets_%d.pets' % (self.cachePath, self.air.districtId) - if os.path.isfile(self.cacheFile): - with open(self.cacheFile, 'rb') as f: - data = f.read() + self.seeds = simbase.backups.load('pet-seeds', (self.air.districtId,), default={}) - self.seeds = cPickle.loads(data) - if self.seeds.get('day', -1) != getDayId() or len(self.seeds.get(ToontownGlobals.ToontownCentral, [])) != self.NUM_DAILY_PETS: - self.generateSeeds() - else: + if self.seeds.get('day', -1) != getDayId(): self.generateSeeds() def generateSeeds(self): @@ -35,18 +23,16 @@ class PetManagerAI: self.seeds = {} for hood in (ToontownGlobals.ToontownCentral, ToontownGlobals.DonaldsDock, ToontownGlobals.DaisyGardens, ToontownGlobals.MinniesMelodyland, ToontownGlobals.TheBrrrgh, ToontownGlobals.DonaldsDreamland): - self.seeds[hood] = [seeds.pop() for _ in xrange(self.NUM_DAILY_PETS)] + self.seeds[str(hood)] = [seeds.pop() for _ in xrange(self.NUM_DAILY_PETS)] self.seeds['day'] = getDayId() + simbase.backups.save('pet-seeds', (self.air.districtId,), self.seeds) - with open(self.cacheFile, 'wb') as f: - f.write(cPickle.dumps(self.seeds)) - - def getAvailablePets(self, seed, safezoneId): + def getAvailablePets(self, safezoneId): if self.seeds.get('day', -1) != getDayId(): self.generateSeeds() - return list(set(self.seeds.get(safezoneId, [seed]))) + return self.seeds.get(str(safezoneId), [random.randint(0, 255)]) def createNewPetFromSeed(self, avId, seed, nameIndex, gender, safeZoneId): av = self.air.doId2do[avId] diff --git a/toontown/pets/PetMood.py b/toontown/pets/PetMood.py old mode 100644 new mode 100755 diff --git a/toontown/pets/PetMoverAI.py b/toontown/pets/PetMoverAI.py old mode 100644 new mode 100755 diff --git a/toontown/pets/PetObserve.py b/toontown/pets/PetObserve.py old mode 100644 new mode 100755 diff --git a/toontown/pets/PetTraits.py b/toontown/pets/PetTraits.py old mode 100644 new mode 100755 diff --git a/toontown/pets/PetTricks.py b/toontown/pets/PetTricks.py old mode 100644 new mode 100755 diff --git a/toontown/pets/PetTutorial.py b/toontown/pets/PetTutorial.py old mode 100644 new mode 100755 diff --git a/toontown/pets/PetUtil.py b/toontown/pets/PetUtil.py old mode 100644 new mode 100755 diff --git a/toontown/pets/PetshopGUI.py b/toontown/pets/PetshopGUI.py old mode 100644 new mode 100755 diff --git a/toontown/pets/__init__.py b/toontown/pets/__init__.py old mode 100644 new mode 100755 diff --git a/toontown/quest/BlinkingArrows.py b/toontown/quest/BlinkingArrows.py old mode 100644 new mode 100755 diff --git a/toontown/quest/QuestBookPoster.py b/toontown/quest/QuestBookPoster.py old mode 100644 new mode 100755 diff --git a/toontown/quest/QuestChoiceGui.py b/toontown/quest/QuestChoiceGui.py old mode 100644 new mode 100755 diff --git a/toontown/quest/QuestMap.py b/toontown/quest/QuestMap.py old mode 100644 new mode 100755 diff --git a/toontown/quest/QuestMapGlobals.py b/toontown/quest/QuestMapGlobals.py old mode 100644 new mode 100755 index f1f042dd..08af68fa --- a/toontown/quest/QuestMapGlobals.py +++ b/toontown/quest/QuestMapGlobals.py @@ -67,4 +67,4 @@ CornerPosTable = {'daisys_garden_5200_english': [Point3(781.219727, 476.963623, 'daisys_garden_5100_english': [Point3(760.089722, 526.236206, 0), Point3(-139.510132, -373.3638, 0)], 'toontown_central_2300_english': [Point3(870.224243, 536.165771, 0), Point3(-89.175751, -423.234344, 0)], 'toontown_central_2100_english': [Point3(161.735336, -59.985107, 0), Point3(-512.664612, -734.385193, 0)], - 'the_burrrgh_3200_english': [Point3(429.647949, 561.224304, 0), Point3(-31.951935, 99.624283, 0)]} + 'the_burrrgh_3200_english': [Point3(429.647949, 561.224304, 0), Point3(-31.951935, 99.624283, 0)]} \ No newline at end of file diff --git a/toontown/quest/QuestParser.py b/toontown/quest/QuestParser.py old mode 100644 new mode 100755 index 655ba59c..bce91616 --- a/toontown/quest/QuestParser.py +++ b/toontown/quest/QuestParser.py @@ -1,17 +1,12 @@ +from pandac.PandaModules import * from direct.directnotify import DirectNotifyGlobal from direct.interval.IntervalGlobal import * -from direct.showbase import AppRunnerGlobal from direct.showbase import DirectObject -from direct.showbase import PythonUtil -from pandac.PandaModules import * from otp.speedchat import SpeedChatGlobals -from toontown.ai import DistributedBlackCatMgr from toontown.chat.ChatGlobals import * -from toontown.suit import Suit -from toontown.suit import SuitDNA +from toontown.suit import Suit, SuitDNA from toontown.toon import ToonHeadFrame -from toontown.toonbase import TTLocalizer -from toontown.toonbase import ToontownBattleGlobals +from toontown.toonbase import TTLocalizer, ToontownBattleGlobals from toontown.quest import QuestScripts import copy, re, tokenize, BlinkingArrows, StringIO diff --git a/toontown/quest/QuestPoster.py b/toontown/quest/QuestPoster.py old mode 100644 new mode 100755 diff --git a/toontown/quest/QuestRewardCounter.py b/toontown/quest/QuestRewardCounter.py old mode 100644 new mode 100755 index a2e5ef8a..8bc91e19 --- a/toontown/quest/QuestRewardCounter.py +++ b/toontown/quest/QuestRewardCounter.py @@ -70,7 +70,15 @@ class QuestRewardCounter: cogTypes = av.getCogTypes() suitHp = 0 for dept in HQdepts: - suitHp += levels[dept] + level = levels[dept] + type = cogTypes[dept] + if type >= SuitDNA.suitsPerDept - 1: + for milestoneLevel in ToontownGlobals.CogSuitHPLevels: + if level >= milestoneLevel: + suitHp += 1 + else: + break + self.notify.debug('Adding %s hp for cog suits' % suitHp) self.maxHp += suitHp kartingHp = int(av.kartingTrophies.count(1) / RaceGlobals.TrophiesPerCup) diff --git a/toontown/quest/QuestScripts.py b/toontown/quest/QuestScripts.py old mode 100644 new mode 100755 diff --git a/toontown/quest/Quests.py b/toontown/quest/Quests.py old mode 100644 new mode 100755 diff --git a/toontown/quest/TrackChoiceGui.py b/toontown/quest/TrackChoiceGui.py old mode 100644 new mode 100755 diff --git a/toontown/quest/__init__.py b/toontown/quest/__init__.py old mode 100644 new mode 100755 diff --git a/toontown/racing/DistributedGag.py b/toontown/racing/DistributedGag.py old mode 100644 new mode 100755 diff --git a/toontown/racing/DistributedGagAI.py b/toontown/racing/DistributedGagAI.py old mode 100644 new mode 100755 diff --git a/toontown/racing/DistributedKartPad.py b/toontown/racing/DistributedKartPad.py old mode 100644 new mode 100755 diff --git a/toontown/racing/DistributedKartPadAI.py b/toontown/racing/DistributedKartPadAI.py old mode 100644 new mode 100755 diff --git a/toontown/racing/DistributedLeaderBoard.py b/toontown/racing/DistributedLeaderBoard.py old mode 100644 new mode 100755 index 7b0fcf40..6c129d4f --- a/toontown/racing/DistributedLeaderBoard.py +++ b/toontown/racing/DistributedLeaderBoard.py @@ -1,11 +1,10 @@ +from pandac.PandaModules import * from direct.distributed import DistributedObject from direct.directnotify import DirectNotifyGlobal -from toontown.toonbase import TTLocalizer from toontown.racing import KartShopGlobals +from toontown.toonbase import TTLocalizer from toontown.toonbase.ToonBaseGlobal import * -from pandac.PandaModules import * from toontown.toonbase.ToontownGlobals import * -import random import cPickle class DistributedLeaderBoard(DistributedObject.DistributedObject): @@ -20,7 +19,6 @@ class DistributedLeaderBoard(DistributedObject.DistributedObject): self.updateCount = 0 self.board = None self.surface = None - return def generateInit(self): DistributedObject.DistributedObject.generateInit(self) @@ -33,18 +31,6 @@ class DistributedLeaderBoard(DistributedObject.DistributedObject): def announceGenerate(self): DistributedObject.DistributedObject.announceGenerate(self) self.board.reparentTo(render) - self.accept('decorator-holiday-%d-ending' % ToontownGlobals.CRASHED_LEADERBOARD, self.showLists) - self.accept('decorator-holiday-%d-starting' % ToontownGlobals.CRASHED_LEADERBOARD, self.hideLists) - newsManager = base.cr.newsManager - if newsManager: - if ToontownGlobals.CRASHED_LEADERBOARD in newsManager.holidayIdList: - self.hideLists() - - def showLists(self): - self.board.show() - - def hideLists(self): - self.board.hide() def setPosHpr(self, x, y, z, h, p, r): self.surface.setPosHpr(x, y, z, h, p, r) @@ -165,4 +151,4 @@ class DistributedLeaderBoard(DistributedObject.DistributedObject): self.notify.debug('delete: deleting local leaderboard') self.ignoreAll() self.board.removeNode() - DistributedObject.DistributedObject.delete(self) + DistributedObject.DistributedObject.delete(self) \ No newline at end of file diff --git a/toontown/racing/DistributedLeaderBoardAI.py b/toontown/racing/DistributedLeaderBoardAI.py old mode 100644 new mode 100755 diff --git a/toontown/racing/DistributedProjectile.py b/toontown/racing/DistributedProjectile.py old mode 100644 new mode 100755 diff --git a/toontown/racing/DistributedProjectileAI.py b/toontown/racing/DistributedProjectileAI.py old mode 100644 new mode 100755 diff --git a/toontown/racing/DistributedRace.py b/toontown/racing/DistributedRace.py old mode 100644 new mode 100755 diff --git a/toontown/racing/DistributedRaceAI.py b/toontown/racing/DistributedRaceAI.py old mode 100644 new mode 100755 diff --git a/toontown/racing/DistributedRacePad.py b/toontown/racing/DistributedRacePad.py old mode 100644 new mode 100755 diff --git a/toontown/racing/DistributedRacePadAI.py b/toontown/racing/DistributedRacePadAI.py old mode 100644 new mode 100755 diff --git a/toontown/racing/DistributedStartingBlock.py b/toontown/racing/DistributedStartingBlock.py old mode 100644 new mode 100755 diff --git a/toontown/racing/DistributedStartingBlockAI.py b/toontown/racing/DistributedStartingBlockAI.py old mode 100644 new mode 100755 diff --git a/toontown/racing/DistributedVehicle.py b/toontown/racing/DistributedVehicle.py old mode 100644 new mode 100755 diff --git a/toontown/racing/DistributedVehicleAI.py b/toontown/racing/DistributedVehicleAI.py old mode 100644 new mode 100755 diff --git a/toontown/racing/DistributedViewPad.py b/toontown/racing/DistributedViewPad.py old mode 100644 new mode 100755 diff --git a/toontown/racing/DistributedViewPadAI.py b/toontown/racing/DistributedViewPadAI.py old mode 100644 new mode 100755 diff --git a/toontown/racing/DroppedGag.py b/toontown/racing/DroppedGag.py old mode 100644 new mode 100755 diff --git a/toontown/racing/EffectManager.py b/toontown/racing/EffectManager.py old mode 100644 new mode 100755 diff --git a/toontown/racing/FlyingGag.py b/toontown/racing/FlyingGag.py old mode 100644 new mode 100755 diff --git a/toontown/racing/Kart.py b/toontown/racing/Kart.py old mode 100644 new mode 100755 diff --git a/toontown/racing/KartDNA.py b/toontown/racing/KartDNA.py old mode 100644 new mode 100755 diff --git a/toontown/racing/KartShopGlobals.py b/toontown/racing/KartShopGlobals.py old mode 100644 new mode 100755 diff --git a/toontown/racing/KartShopGui.py b/toontown/racing/KartShopGui.py old mode 100644 new mode 100755 diff --git a/toontown/racing/Piejectile.py b/toontown/racing/Piejectile.py old mode 100644 new mode 100755 diff --git a/toontown/racing/PiejectileManager.py b/toontown/racing/PiejectileManager.py old mode 100644 new mode 100755 diff --git a/toontown/racing/RaceEndPanels.py b/toontown/racing/RaceEndPanels.py old mode 100644 new mode 100755 diff --git a/toontown/racing/RaceGUI.py b/toontown/racing/RaceGUI.py old mode 100644 new mode 100755 diff --git a/toontown/racing/RaceGag.py b/toontown/racing/RaceGag.py old mode 100644 new mode 100755 diff --git a/toontown/racing/RaceGlobals.py b/toontown/racing/RaceGlobals.py old mode 100644 new mode 100755 diff --git a/toontown/racing/RaceHeadFrame.py b/toontown/racing/RaceHeadFrame.py old mode 100644 new mode 100755 diff --git a/toontown/racing/__init__.py b/toontown/racing/__init__.py old mode 100644 new mode 100755 diff --git a/toontown/rpc/ToontownRPCConnection.py b/toontown/rpc/ToontownRPCConnection.py old mode 100644 new mode 100755 index 1aa7dc55..3841cba5 --- a/toontown/rpc/ToontownRPCConnection.py +++ b/toontown/rpc/ToontownRPCConnection.py @@ -207,7 +207,7 @@ class ToontownRPCConnection: # Add the standard headers: response += 'Date: %s\r\n' % time.strftime('%a, %d %b %Y %H:%M:%S GMT', time.gmtime()) - response += 'Server: TTU-RPCServer/0.1\r\n' + response += 'Server: TTS-RPCServer/0.1\r\n' # Add the content headers: response += 'Content-Length: %d\r\n' % len(body) diff --git a/toontown/rpc/ToontownRPCDispatcher.py b/toontown/rpc/ToontownRPCDispatcher.py old mode 100644 new mode 100755 diff --git a/toontown/rpc/ToontownRPCHandler.py b/toontown/rpc/ToontownRPCHandler.py old mode 100644 new mode 100755 diff --git a/toontown/rpc/ToontownRPCHandlerBase.py b/toontown/rpc/ToontownRPCHandlerBase.py old mode 100644 new mode 100755 diff --git a/toontown/rpc/ToontownRPCServer.py b/toontown/rpc/ToontownRPCServer.py old mode 100644 new mode 100755 diff --git a/toontown/rpc/__init__.py b/toontown/rpc/__init__.py old mode 100644 new mode 100755 diff --git a/toontown/safezone/BRPlayground.py b/toontown/safezone/BRPlayground.py old mode 100644 new mode 100755 diff --git a/toontown/safezone/BRSafeZoneLoader.py b/toontown/safezone/BRSafeZoneLoader.py old mode 100644 new mode 100755 diff --git a/toontown/safezone/ButterflyGlobals.py b/toontown/safezone/ButterflyGlobals.py old mode 100644 new mode 100755 diff --git a/toontown/safezone/CheckersBoard.py b/toontown/safezone/CheckersBoard.py old mode 100644 new mode 100755 diff --git a/toontown/safezone/ChineseCheckersBoard.py b/toontown/safezone/ChineseCheckersBoard.py old mode 100644 new mode 100755 diff --git a/toontown/safezone/DDPlayground.py b/toontown/safezone/DDPlayground.py old mode 100644 new mode 100755 diff --git a/toontown/safezone/DDSafeZoneLoader.py b/toontown/safezone/DDSafeZoneLoader.py old mode 100644 new mode 100755 diff --git a/toontown/safezone/DGPlayground.py b/toontown/safezone/DGPlayground.py old mode 100644 new mode 100755 diff --git a/toontown/safezone/DGSafeZoneLoader.py b/toontown/safezone/DGSafeZoneLoader.py old mode 100644 new mode 100755 diff --git a/toontown/safezone/DLSafeZoneLoader.py b/toontown/safezone/DLSafeZoneLoader.py old mode 100644 new mode 100755 diff --git a/toontown/safezone/DistributedBoat.py b/toontown/safezone/DistributedBoat.py old mode 100644 new mode 100755 diff --git a/toontown/safezone/DistributedBoatAI.py b/toontown/safezone/DistributedBoatAI.py old mode 100644 new mode 100755 diff --git a/toontown/safezone/DistributedButterfly.py b/toontown/safezone/DistributedButterfly.py old mode 100644 new mode 100755 diff --git a/toontown/safezone/DistributedButterflyAI.py b/toontown/safezone/DistributedButterflyAI.py old mode 100644 new mode 100755 diff --git a/toontown/safezone/DistributedCheckers.py b/toontown/safezone/DistributedCheckers.py old mode 100644 new mode 100755 diff --git a/toontown/safezone/DistributedCheckersAI.py b/toontown/safezone/DistributedCheckersAI.py old mode 100644 new mode 100755 diff --git a/toontown/safezone/DistributedChineseCheckers.py b/toontown/safezone/DistributedChineseCheckers.py old mode 100644 new mode 100755 diff --git a/toontown/safezone/DistributedChineseCheckersAI.py b/toontown/safezone/DistributedChineseCheckersAI.py old mode 100644 new mode 100755 diff --git a/toontown/safezone/DistributedDGFlower.py b/toontown/safezone/DistributedDGFlower.py old mode 100644 new mode 100755 diff --git a/toontown/safezone/DistributedDGFlowerAI.py b/toontown/safezone/DistributedDGFlowerAI.py old mode 100644 new mode 100755 diff --git a/toontown/safezone/DistributedEFlyingTreasure.py b/toontown/safezone/DistributedEFlyingTreasure.py old mode 100644 new mode 100755 diff --git a/toontown/safezone/DistributedFindFour.py b/toontown/safezone/DistributedFindFour.py old mode 100644 new mode 100755 index d1d97c61..24caa1e9 --- a/toontown/safezone/DistributedFindFour.py +++ b/toontown/safezone/DistributedFindFour.py @@ -15,6 +15,7 @@ from toontown.toonbase import ToontownGlobals from direct.distributed.ClockDelta import * from otp.otpbase import OTPGlobals from direct.showbase import PythonUtil +import random class DistributedFindFour(DistributedNode.DistributedNode): @@ -565,8 +566,7 @@ class DistributedFindFour(DistributedNode.DistributedNode): else: hasfound = False while hasfound == False: - from random import * - x = randint(0, 6) + x = random.randint(0, 6) if self.board[0][x] == 0: self.d_requestMove(x) self.moveCol = None diff --git a/toontown/safezone/DistributedFindFourAI.py b/toontown/safezone/DistributedFindFourAI.py old mode 100644 new mode 100755 diff --git a/toontown/safezone/DistributedFishingSpot.py b/toontown/safezone/DistributedFishingSpot.py old mode 100644 new mode 100755 diff --git a/toontown/safezone/DistributedFishingSpotAI.py b/toontown/safezone/DistributedFishingSpotAI.py old mode 100644 new mode 100755 diff --git a/toontown/safezone/DistributedGolfKart.py b/toontown/safezone/DistributedGolfKart.py old mode 100644 new mode 100755 diff --git a/toontown/safezone/DistributedGolfKartAI.py b/toontown/safezone/DistributedGolfKartAI.py old mode 100644 new mode 100755 diff --git a/toontown/safezone/DistributedMMPiano.py b/toontown/safezone/DistributedMMPiano.py old mode 100644 new mode 100755 diff --git a/toontown/safezone/DistributedMMPianoAI.py b/toontown/safezone/DistributedMMPianoAI.py old mode 100644 new mode 100755 diff --git a/toontown/safezone/DistributedPartyGate.py b/toontown/safezone/DistributedPartyGate.py old mode 100644 new mode 100755 diff --git a/toontown/safezone/DistributedPartyGateAI.py b/toontown/safezone/DistributedPartyGateAI.py old mode 100644 new mode 100755 diff --git a/toontown/safezone/DistributedPicnicBasket.py b/toontown/safezone/DistributedPicnicBasket.py old mode 100644 new mode 100755 diff --git a/toontown/safezone/DistributedPicnicBasketAI.py b/toontown/safezone/DistributedPicnicBasketAI.py old mode 100644 new mode 100755 diff --git a/toontown/safezone/DistributedPicnicTable.py b/toontown/safezone/DistributedPicnicTable.py old mode 100644 new mode 100755 diff --git a/toontown/safezone/DistributedPicnicTableAI.py b/toontown/safezone/DistributedPicnicTableAI.py old mode 100644 new mode 100755 diff --git a/toontown/safezone/DistributedTreasure.py b/toontown/safezone/DistributedTreasure.py old mode 100644 new mode 100755 diff --git a/toontown/safezone/DistributedTreasureAI.py b/toontown/safezone/DistributedTreasureAI.py old mode 100644 new mode 100755 diff --git a/toontown/safezone/DistributedTrolley.py b/toontown/safezone/DistributedTrolley.py old mode 100644 new mode 100755 diff --git a/toontown/safezone/DistributedTrolleyAI.py b/toontown/safezone/DistributedTrolleyAI.py old mode 100644 new mode 100755 diff --git a/toontown/safezone/GSPlayground.py b/toontown/safezone/GSPlayground.py old mode 100644 new mode 100755 diff --git a/toontown/safezone/GSSafeZoneLoader.py b/toontown/safezone/GSSafeZoneLoader.py old mode 100644 new mode 100755 index 28208bfb..537d4e4b --- a/toontown/safezone/GSSafeZoneLoader.py +++ b/toontown/safezone/GSSafeZoneLoader.py @@ -1,13 +1,9 @@ +from pandac.PandaModules import * from direct.directnotify import DirectNotifyGlobal from direct.fsm import ClassicFSM, State -from direct.fsm import State -from pandac.PandaModules import * from toontown.hood import ZoneUtil from toontown.safezone.SafeZoneLoader import SafeZoneLoader from toontown.safezone.GSPlayground import GSPlayground -from toontown.effects.CarSmoke import CarSmoke -from toontown.toonbase import ToontownGlobals -import random class GSSafeZoneLoader(SafeZoneLoader): @@ -24,23 +20,14 @@ class GSSafeZoneLoader(SafeZoneLoader): State.State('quietZone', self.enterQuietZone, self.exitQuietZone, ['playground', 'toonInterior', 'racetrack']), State.State('racetrack', self.enterRacetrack, self.exitRacetrack, ['quietZone', 'playground']), State.State('final', self.enterFinal, self.exitFinal, ['start'])], 'start', 'final') - self.smoke = None - return def load(self): SafeZoneLoader.load(self) - if base.cr.newsManager: - holidayIds = base.cr.newsManager.getDecorationHolidayId() - if ToontownGlobals.CRASHED_LEADERBOARD in holidayIds: - self.startSmokeEffect() self.birdSound = map(base.loadSfx, ['phase_4/audio/sfx/SZ_TC_bird1.ogg', 'phase_4/audio/sfx/SZ_TC_bird2.ogg', 'phase_4/audio/sfx/SZ_TC_bird3.ogg']) def unload(self): del self.birdSound - if self.smoke != None: - self.stopSmokeEffect() SafeZoneLoader.unload(self) - return def enterPlayground(self, requestStatus): self.playgroundClass = GSPlayground @@ -51,7 +38,6 @@ class GSSafeZoneLoader(SafeZoneLoader): self.hood.hideTitleText() SafeZoneLoader.exitPlayground(self) self.playgroundClass = None - return def handlePlaygroundDone(self): status = self.place.doneStatus @@ -63,7 +49,6 @@ class GSSafeZoneLoader(SafeZoneLoader): else: self.doneStatus = status messenger.send(self.doneEvent) - return def enteringARace(self, status): if not status['where'] == 'racetrack': @@ -93,21 +78,4 @@ class GSSafeZoneLoader(SafeZoneLoader): 'hoodId': 8000, 'shardId': None} self.fsm.request('quietZone', [req]) - return - - def startSmokeEffect(self): - if base.config.GetBool('want-crashedLeaderBoard-Smoke', 1): - leaderBoard = self.geom.find('**/*crashed*') - locator = leaderBoard.find('**/*locator_smoke*') - if locator != None: - self.smoke = CarSmoke(locator) - self.smoke.start() - return - - def stopSmokeEffect(self): - if base.config.GetBool('want-crashedLeaderBoard-Smoke', 1): - if self.smoke != None: - self.smoke.stop() - self.smoke.destroy() - self.smoke = None - return + return \ No newline at end of file diff --git a/toontown/safezone/GZPlayground.py b/toontown/safezone/GZPlayground.py old mode 100644 new mode 100755 diff --git a/toontown/safezone/GZSafeZoneLoader.py b/toontown/safezone/GZSafeZoneLoader.py old mode 100644 new mode 100755 diff --git a/toontown/safezone/GameGlobals.py b/toontown/safezone/GameGlobals.py old mode 100644 new mode 100755 diff --git a/toontown/safezone/GameMenu.py b/toontown/safezone/GameMenu.py old mode 100644 new mode 100755 diff --git a/toontown/safezone/GameTutorials.py b/toontown/safezone/GameTutorials.py old mode 100644 new mode 100755 diff --git a/toontown/safezone/GolfKart.py b/toontown/safezone/GolfKart.py old mode 100644 new mode 100755 diff --git a/toontown/safezone/MMPlayground.py b/toontown/safezone/MMPlayground.py old mode 100644 new mode 100755 diff --git a/toontown/safezone/MMSafeZoneLoader.py b/toontown/safezone/MMSafeZoneLoader.py old mode 100644 new mode 100755 diff --git a/toontown/safezone/OZPlayground.py b/toontown/safezone/OZPlayground.py old mode 100644 new mode 100755 diff --git a/toontown/safezone/OZSafeZoneLoader.py b/toontown/safezone/OZSafeZoneLoader.py old mode 100644 new mode 100755 diff --git a/toontown/safezone/PicnicBasket.py b/toontown/safezone/PicnicBasket.py old mode 100644 new mode 100755 diff --git a/toontown/safezone/PicnicGameGlobals.py b/toontown/safezone/PicnicGameGlobals.py old mode 100644 new mode 100755 diff --git a/toontown/safezone/PicnicGameSelectMenu.py b/toontown/safezone/PicnicGameSelectMenu.py old mode 100644 new mode 100755 diff --git a/toontown/safezone/PicnicGameTutorial.py b/toontown/safezone/PicnicGameTutorial.py old mode 100644 new mode 100755 diff --git a/toontown/safezone/Playground.py b/toontown/safezone/Playground.py old mode 100644 new mode 100755 diff --git a/toontown/safezone/PublicWalk.py b/toontown/safezone/PublicWalk.py old mode 100644 new mode 100755 diff --git a/toontown/safezone/RegenTreasurePlannerAI.py b/toontown/safezone/RegenTreasurePlannerAI.py old mode 100644 new mode 100755 diff --git a/toontown/safezone/SZTreasurePlannerAI.py b/toontown/safezone/SZTreasurePlannerAI.py old mode 100644 new mode 100755 diff --git a/toontown/safezone/SafeZoneLoader.py b/toontown/safezone/SafeZoneLoader.py old mode 100644 new mode 100755 index ad673b46..1f63df6f --- a/toontown/safezone/SafeZoneLoader.py +++ b/toontown/safezone/SafeZoneLoader.py @@ -222,6 +222,22 @@ class SafeZoneLoader(StateData.StateData): animPropList = self.animPropDict.setdefault(i, []) animPropList.append(animPropObj) + interactivePropNodes = i.findAllMatches('**/interactive_prop_*') + numInteractivePropNodes = interactivePropNodes.getNumPaths() + for j in xrange(numInteractivePropNodes): + interactivePropNode = interactivePropNodes.getPath(j) + className = 'GenericAnimatedProp' + symbols = {} + base.cr.importModule(symbols, 'toontown.hood', [className]) + classObj = getattr(symbols[className], className) + interactivePropObj = classObj(interactivePropNode) + animPropList = self.animPropDict.get(i) + if animPropList is None: + animPropList = self.animPropDict.setdefault(i, []) + animPropList.append(interactivePropObj) + + return + def deleteAnimatedProps(self): for zoneNode, animPropList in self.animPropDict.items(): for animProp in animPropList: diff --git a/toontown/safezone/SafeZoneManager.py b/toontown/safezone/SafeZoneManager.py old mode 100644 new mode 100755 diff --git a/toontown/safezone/SafeZoneManagerAI.py b/toontown/safezone/SafeZoneManagerAI.py old mode 100644 new mode 100755 diff --git a/toontown/safezone/TTPlayground.py b/toontown/safezone/TTPlayground.py old mode 100644 new mode 100755 diff --git a/toontown/safezone/TTSafeZoneLoader.py b/toontown/safezone/TTSafeZoneLoader.py old mode 100644 new mode 100755 diff --git a/toontown/safezone/Train.py b/toontown/safezone/Train.py old mode 100644 new mode 100755 diff --git a/toontown/safezone/TreasureGlobals.py b/toontown/safezone/TreasureGlobals.py old mode 100644 new mode 100755 diff --git a/toontown/safezone/TreasurePlannerAI.py b/toontown/safezone/TreasurePlannerAI.py old mode 100644 new mode 100755 diff --git a/toontown/safezone/TrolleyConstants.py b/toontown/safezone/TrolleyConstants.py old mode 100644 new mode 100755 diff --git a/toontown/safezone/Walk.py b/toontown/safezone/Walk.py old mode 100644 new mode 100755 diff --git a/toontown/safezone/__init__.py b/toontown/safezone/__init__.py old mode 100644 new mode 100755 diff --git a/toontown/shtiker/CogPageGlobals.py b/toontown/shtiker/CogPageGlobals.py old mode 100644 new mode 100755 diff --git a/toontown/shtiker/DeleteManager.py b/toontown/shtiker/DeleteManager.py old mode 100644 new mode 100755 diff --git a/toontown/shtiker/DeleteManagerAI.py b/toontown/shtiker/DeleteManagerAI.py old mode 100644 new mode 100755 diff --git a/toontown/shtiker/DisguisePage.py b/toontown/shtiker/DisguisePage.py old mode 100644 new mode 100755 index 3424910b..bc485bf9 --- a/toontown/shtiker/DisguisePage.py +++ b/toontown/shtiker/DisguisePage.py @@ -1,27 +1,18 @@ +import ShtikerPage from direct.gui.DirectGui import * from pandac.PandaModules import * - -import ShtikerPage -from toontown.battle import SuitBattleGlobals -from toontown.coghq import CogDisguiseGlobals -from toontown.suit import SuitDNA -from toontown.toonbase import TTLocalizer from toontown.toonbase import ToontownGlobals - - -DeptColors = ( - Vec4(0.647, 0.608, 0.596, 1.0), - Vec4(0.588, 0.635, 0.671, 1.0), - Vec4(0.596, 0.714, 0.659, 1.0), - Vec4(0.761, 0.678, 0.69, 1.0) -) +from toontown.toonbase import TTLocalizer +from toontown.suit import SuitDNA +from toontown.battle import SuitBattleGlobals +from toontown.minigame import MinigamePowerMeter +from toontown.coghq import CogDisguiseGlobals +DeptColors = (Vec4(0.647, 0.608, 0.596, 1.0), + Vec4(0.588, 0.635, 0.671, 1.0), + Vec4(0.596, 0.714, 0.659, 1.0), + Vec4(0.761, 0.678, 0.69, 1.0)) NumParts = max(CogDisguiseGlobals.PartsPerSuit) -PartNames = ( - 'lUpleg', 'lLowleg', 'lShoe', 'rUpleg', 'rLowleg', 'rShoe', 'lShoulder', - 'rShoulder', 'chest', 'waist', 'hip', 'lUparm', 'lLowarm', 'lHand', - 'rUparm', 'rLowarm', 'rHand' -) - +PartNames = ('lUpleg', 'lLowleg', 'lShoe', 'rUpleg', 'rLowleg', 'rShoe', 'lShoulder', 'rShoulder', 'chest', 'waist', 'hip', 'lUparm', 'lLowarm', 'lHand', 'rUparm', 'rLowarm', 'rHand') class DisguisePage(ShtikerPage.ShtikerPage): meterColor = Vec4(0.87, 0.87, 0.827, 1.0) @@ -31,14 +22,13 @@ class DisguisePage(ShtikerPage.ShtikerPage): ShtikerPage.ShtikerPage.__init__(self) self.activeTab = 0 self.progressTitle = None + return def load(self): ShtikerPage.ShtikerPage.load(self) - - gui = loader.loadModel('phase_9/models/gui/cog_disguises.bam') + gui = loader.loadModel('phase_9/models/gui/cog_disguises') self.frame = DirectFrame(parent=self, relief=None, scale=0.47, pos=(0.02, 1, 0)) - self.bkgd = DirectFrame( - parent=self.frame, geom=gui.find('**/base'), relief=None, scale=(0.98, 1, 1)) + self.bkgd = DirectFrame(parent=self.frame, geom=gui.find('**/base'), relief=None, scale=(0.98, 1, 1)) self.bkgd.setTextureOff(1) self.tabs = [] self.pageFrame = DirectFrame(parent=self.frame, relief=None) @@ -57,116 +47,51 @@ class DisguisePage(ShtikerPage.ShtikerPage): textPos = (1.57, -1.05) pageGeom = gui.find('**/page%d' % tabIndex) tabGeom = gui.find('**/tab%d' % tabIndex) - tab = DirectButton( - parent=self.pageFrame, relief=None, geom=tabGeom, - geom_color=DeptColors[tabIndex - 1], - text=SuitDNA.suitDeptFullnames[dept], - text_font=ToontownGlobals.getSuitFont(), text_pos=textPos, - text_roll=-90, text_scale=TTLocalizer.DPtab, - text_align=TextNode.ACenter, text1_fg=Vec4(1, 0, 0, 1), - text2_fg=Vec4(0.5, 0.4, 0.4, 1), - text3_fg=Vec4(0.4, 0.4, 0.4, 1), command=self.doTab, - extraArgs=[len(self.tabs)], pressEffect=0) + tab = DirectButton(parent=self.pageFrame, relief=None, geom=tabGeom, geom_color=DeptColors[tabIndex - 1], text=SuitDNA.suitDeptFullnames[dept], text_font=ToontownGlobals.getSuitFont(), text_pos=textPos, text_roll=-90, text_scale=TTLocalizer.DPtab, text_align=TextNode.ACenter, text1_fg=Vec4(1, 0, 0, 1), text2_fg=Vec4(0.5, 0.4, 0.4, 1), text3_fg=Vec4(0.4, 0.4, 0.4, 1), command=self.doTab, extraArgs=[len(self.tabs)], pressEffect=0) self.tabs.append(tab) - DirectFrame(parent=tab, relief=None, geom=pageGeom) + page = DirectFrame(parent=tab, relief=None, geom=pageGeom) - self.deptLabel = DirectLabel( - parent=self.frame, text='', - text_font=ToontownGlobals.getSuitFont(), - text_scale=TTLocalizer.DPdeptLabel, text_pos=(-0.1, 0.8)) + self.deptLabel = DirectLabel(parent=self.frame, text='', text_font=ToontownGlobals.getSuitFont(), text_scale=TTLocalizer.DPdeptLabel, text_pos=(-0.1, 0.8)) DirectFrame(parent=self.frame, relief=None, geom=gui.find('**/pipe_frame')) self.tube = DirectFrame(parent=self.frame, relief=None, geom=gui.find('**/tube')) DirectFrame(parent=self.frame, relief=None, geom=gui.find('**/robot/face')) - DirectLabel( - parent=self.frame, relief=None, - geom=gui.find('**/text_cog_disguises'), geom_pos=(0, 0.1, 0)) - self.meritTitle = DirectLabel( - parent=self.frame, relief=None, - geom=gui.find('**/text_merit_progress'), geom_pos=(0, 0.1, 0)) + DirectLabel(parent=self.frame, relief=None, geom=gui.find('**/text_cog_disguises'), geom_pos=(0, 0.1, 0)) + self.meritTitle = DirectLabel(parent=self.frame, relief=None, geom=gui.find('**/text_merit_progress'), geom_pos=(0, 0.1, 0)) self.meritTitle.hide() - self.cogbuckTitle = DirectLabel( - parent=self.frame, relief=None, - geom=gui.find('**/text_cashbuck_progress'), geom_pos=(0, 0.1, 0)) + self.cogbuckTitle = DirectLabel(parent=self.frame, relief=None, geom=gui.find('**/text_cashbuck_progress'), geom_pos=(0, 0.1, 0)) self.cogbuckTitle.hide() - self.juryNoticeTitle = DirectLabel( - parent=self.frame, relief=None, - geom=gui.find('**/text_jury_notice_progress'), geom_pos=(0, 0.1, 0)) + self.juryNoticeTitle = DirectLabel(parent=self.frame, relief=None, geom=gui.find('**/text_jury_notice_progress'), geom_pos=(0, 0.1, 0)) self.juryNoticeTitle.hide() - self.stockOptionTitle = DirectLabel( - parent=self.frame, relief=None, - geom=gui.find('**/text_stock_option_progress'), geom_pos=(0, 0.1, 0)) + self.stockOptionTitle = DirectLabel(parent=self.frame, relief=None, geom=gui.find('**/text_stock_option_progress'), geom_pos=(0, 0.1, 0)) self.stockOptionTitle.hide() self.progressTitle = self.meritTitle - self.promotionTitle = DirectLabel( - parent=self.frame, relief=None, - geom=gui.find('**/text_ready4promotion'), geom_pos=(0, 0.1, 0)) - self.cogName = DirectLabel( - parent=self.frame, relief=None, text='', - text_font=ToontownGlobals.getSuitFont(), - text_scale=TTLocalizer.DPcogName, text_align=TextNode.ACenter, - pos=(-0.948, 0, -1.15)) - self.cogLevel = DirectLabel( - parent=self.frame, relief=None, text='', - text_font=ToontownGlobals.getSuitFont(), text_scale=0.09, - text_align=TextNode.ACenter, pos=(-0.91, 0, -1.02)) + self.promotionTitle = DirectLabel(parent=self.frame, relief=None, geom=gui.find('**/text_ready4promotion'), geom_pos=(0, 0.1, 0)) + self.cogName = DirectLabel(parent=self.frame, relief=None, text='', text_font=ToontownGlobals.getSuitFont(), text_scale=TTLocalizer.DPcogName, text_align=TextNode.ACenter, pos=(-0.948, 0, -1.15)) + self.cogLevel = DirectLabel(parent=self.frame, relief=None, text='', text_font=ToontownGlobals.getSuitFont(), text_scale=0.09, text_align=TextNode.ACenter, pos=(-0.91, 0, -1.02)) self.partFrame = DirectFrame(parent=self.frame, relief=None) self.parts = [] - for partNum in xrange(0, 17): - self.parts.append( - DirectFrame(parent=self.partFrame, relief=None, - geom=gui.find('**/robot/' + PartNames[partNum]))) + for partNum in range(0, NumParts): + self.parts.append(DirectFrame(parent=self.partFrame, relief=None, geom=gui.find('**/robot/' + PartNames[partNum]))) + self.holes = [] - for partNum in xrange(0, 17): - self.holes.append( - DirectFrame(parent=self.partFrame, relief=None, - geom=gui.find('**/robot_hole/' + PartNames[partNum]))) - self.cogPartRatio = DirectLabel( - parent=self.frame, relief=None, text='', - text_font=ToontownGlobals.getSuitFont(), text_scale=0.08, - text_align=TextNode.ACenter, pos=(-0.91, 0, -0.82)) - self.cogMeritRatio = DirectLabel( - parent=self.frame, relief=None, text='', - text_font=ToontownGlobals.getSuitFont(), text_scale=0.08, - text_align=TextNode.ACenter, pos=(0.45, 0, -0.36)) + for partNum in range(0, NumParts): + self.holes.append(DirectFrame(parent=self.partFrame, relief=None, geom=gui.find('**/robot_hole/' + PartNames[partNum]))) + + self.cogPartRatio = DirectLabel(parent=self.frame, relief=None, text='', text_font=ToontownGlobals.getSuitFont(), text_scale=0.08, text_align=TextNode.ACenter, pos=(-0.91, 0, -0.82)) + self.cogMeritRatio = DirectLabel(parent=self.frame, relief=None, text='', text_font=ToontownGlobals.getSuitFont(), text_scale=0.08, text_align=TextNode.ACenter, pos=(0.45, 0, -0.36)) meterFace = gui.find('**/meter_face_whole') meterFaceHalf = gui.find('**/meter_face_half') - self.meterFace = DirectLabel( - parent=self.frame, relief=None, geom=meterFace, - color=self.meterColor, pos=(0.455, 0.0, 0.04)) - self.meterFaceHalf1 = DirectLabel( - parent=self.frame, relief=None, geom=meterFaceHalf, - color=self.meterActiveColor, pos=(0.455, 0.0, 0.04)) - self.meterFaceHalf2 = DirectLabel( - parent=self.frame, relief=None, geom=meterFaceHalf, - color=self.meterColor, pos=(0.455, 0.0, 0.04)) - self.promotionSfx = loader.loadSfx('phase_5/audio/sfx/suit_promotion_sfx.ogg') - self.buttonModels = loader.loadModel('phase_3.5/models/gui/inventory_gui.bam') - upButton = self.buttonModels.find('**//InventoryButtonUp') - downButton = self.buttonModels.find('**/InventoryButtonDown') - rolloverButton = self.buttonModels.find('**/InventoryButtonRollover') - self.promoteButton = DirectButton( - parent=self.frame, relief=None, text='Promote', - text_fg=(0.9, 0.9, 0.9, 1), text_pos=(0, -0.2), - text_font=ToontownGlobals.getSuitFont(), - text_scale=0.6, image=(upButton, downButton, rolloverButton), - image_color=(0.5, 0.5, 0.5, 1), image_scale=(20, 1, 11), - pos=(0.94, 0, -1.125), scale=0.125, - command=self.sendPromotionRequest, extraArgs=[3]) - self.promoteButton.hide() - if base.localAvatar.promotionStatus[3] == ToontownGlobals.PendingPromotion: - self.promoteButton.show() - if base.localAvatar.cogLevels[3] == ToontownGlobals.MaxCogSuitLevel: - self.promoteButton['state'] = DGG.DISABLED + self.meterFace = DirectLabel(parent=self.frame, relief=None, geom=meterFace, color=self.meterColor, pos=(0.455, 0.0, 0.04)) + self.meterFaceHalf1 = DirectLabel(parent=self.frame, relief=None, geom=meterFaceHalf, color=self.meterActiveColor, pos=(0.455, 0.0, 0.04)) + self.meterFaceHalf2 = DirectLabel(parent=self.frame, relief=None, geom=meterFaceHalf, color=self.meterColor, pos=(0.455, 0.0, 0.04)) self.frame.hide() self.activeTab = 3 self.updatePage() + return def unload(self): ShtikerPage.ShtikerPage.unload(self) - del self.promotionSfx - self.buttonModels.removeNode() - def enter(self): self.frame.show() ShtikerPage.ShtikerPage.enter(self) @@ -236,10 +161,9 @@ class DisguisePage(ShtikerPage.ShtikerPage): self.meterFaceHalf2.setR(180 * (progress / 0.5)) def doTab(self, index): - self.promoteButton.hide() self.activeTab = index self.tabs[index].reparentTo(self.pageFrame) - for i in xrange(len(self.tabs)): + for i in range(len(self.tabs)): tab = self.tabs[i] if i == index: tab['text0_fg'] = (1, 0, 0, 1) @@ -270,17 +194,3 @@ class DisguisePage(ShtikerPage.ShtikerPage): self.updatePartsDisplay(index, numParts, numPartsRequired) self.updateMeritBar(index) self.cogPartRatio['text'] = '%d/%d' % (CogDisguiseGlobals.getTotalParts(numParts), numPartsRequired) - if base.localAvatar.promotionStatus[index] == ToontownGlobals.PendingPromotion: - self.promoteButton['extraArgs'] = [index] - if base.localAvatar.cogLevels[index] == ToontownGlobals.MaxCogSuitLevel: - self.promoteButton['state'] = DGG.DISABLED - else: - self.promoteButton['state'] = DGG.NORMAL - self.promoteButton.show() - - def sendPromotionRequest(self, dept): - self.promoteButton.hide() - base.playSfx(self.promotionSfx) - base.localAvatar.promotionStatus[dept] = 0 - base.localAvatar.sendUpdate('requestPromotion', [dept]) - self.updatePage() diff --git a/toontown/shtiker/DisplaySettingsDialog.py b/toontown/shtiker/DisplaySettingsDialog.py old mode 100644 new mode 100755 diff --git a/toontown/shtiker/EventsPage.py b/toontown/shtiker/EventsPage.py old mode 100644 new mode 100755 diff --git a/toontown/shtiker/FishPage.py b/toontown/shtiker/FishPage.py old mode 100644 new mode 100755 diff --git a/toontown/shtiker/GardenPage.py b/toontown/shtiker/GardenPage.py old mode 100644 new mode 100755 diff --git a/toontown/shtiker/GolfPage.py b/toontown/shtiker/GolfPage.py old mode 100644 new mode 100755 diff --git a/toontown/shtiker/InventoryPage.py b/toontown/shtiker/InventoryPage.py old mode 100644 new mode 100755 diff --git a/toontown/shtiker/KartPage.py b/toontown/shtiker/KartPage.py old mode 100644 new mode 100755 diff --git a/toontown/shtiker/MapPage.py b/toontown/shtiker/MapPage.py old mode 100644 new mode 100755 diff --git a/toontown/shtiker/NPCFriendPage.py b/toontown/shtiker/NPCFriendPage.py old mode 100644 new mode 100755 diff --git a/toontown/shtiker/NewbiePurchaseManager.py b/toontown/shtiker/NewbiePurchaseManager.py old mode 100644 new mode 100755 diff --git a/toontown/shtiker/NewbiePurchaseManagerAI.py b/toontown/shtiker/NewbiePurchaseManagerAI.py old mode 100644 new mode 100755 diff --git a/toontown/shtiker/OptionsPage.py b/toontown/shtiker/OptionsPage.py old mode 100644 new mode 100755 diff --git a/toontown/shtiker/PhotoAlbumPage.py b/toontown/shtiker/PhotoAlbumPage.py old mode 100644 new mode 100755 index bdb93d32..12438ade --- a/toontown/shtiker/PhotoAlbumPage.py +++ b/toontown/shtiker/PhotoAlbumPage.py @@ -22,7 +22,6 @@ class PhotoAlbumPage(ShtikerPage.ShtikerPage): self.photos = {} self.selectedFileName = None self.selectedFilePath = None - #TODO: Localizer support for screenshot storing and names self.installPath = os.getcwd() self.photoPath = TTLocalizer.ScreenshotPath self.photoIndex = 0 @@ -232,7 +231,7 @@ class PhotoAlbumPage(ShtikerPage.ShtikerPage): files = os.listdir(self.photoPath) photos = [] for fileName in files: - if fileName[0:17] == 'united-screenshot' and fileName[-4:] == '.jpg': + if fileName[0:17] == 'stride-screenshot' and fileName[-4:] == '.jpg': photos.append(fileName) return photos diff --git a/toontown/shtiker/PurchaseManager.py b/toontown/shtiker/PurchaseManager.py old mode 100644 new mode 100755 diff --git a/toontown/shtiker/PurchaseManagerAI.py b/toontown/shtiker/PurchaseManagerAI.py old mode 100644 new mode 100755 diff --git a/toontown/shtiker/PurchaseManagerConstants.py b/toontown/shtiker/PurchaseManagerConstants.py old mode 100644 new mode 100755 diff --git a/toontown/shtiker/QuestPage.py b/toontown/shtiker/QuestPage.py old mode 100644 new mode 100755 diff --git a/toontown/shtiker/ShardPage.py b/toontown/shtiker/ShardPage.py old mode 100644 new mode 100755 diff --git a/toontown/shtiker/ShtikerBook.py b/toontown/shtiker/ShtikerBook.py old mode 100644 new mode 100755 diff --git a/toontown/shtiker/ShtikerPage.py b/toontown/shtiker/ShtikerPage.py old mode 100644 new mode 100755 diff --git a/toontown/shtiker/SuitPage.py b/toontown/shtiker/SuitPage.py old mode 100644 new mode 100755 diff --git a/toontown/shtiker/SummonCogDialog.py b/toontown/shtiker/SummonCogDialog.py old mode 100644 new mode 100755 diff --git a/toontown/shtiker/TIPPage.py b/toontown/shtiker/TIPPage.py old mode 100644 new mode 100755 diff --git a/toontown/shtiker/TrackPage.py b/toontown/shtiker/TrackPage.py old mode 100644 new mode 100755 diff --git a/toontown/shtiker/__init__.py b/toontown/shtiker/__init__.py old mode 100644 new mode 100755 diff --git a/toontown/speedchat/TTSCAprilToonsMenu.py b/toontown/speedchat/TTSCAprilToonsMenu.py old mode 100644 new mode 100755 diff --git a/toontown/speedchat/TTSCBoardingMenu.py b/toontown/speedchat/TTSCBoardingMenu.py old mode 100644 new mode 100755 diff --git a/toontown/speedchat/TTSCCogMenu.py b/toontown/speedchat/TTSCCogMenu.py old mode 100644 new mode 100755 diff --git a/toontown/speedchat/TTSCDecoders.py b/toontown/speedchat/TTSCDecoders.py old mode 100644 new mode 100755 diff --git a/toontown/speedchat/TTSCFactoryMenu.py b/toontown/speedchat/TTSCFactoryMenu.py old mode 100644 new mode 100755 diff --git a/toontown/speedchat/TTSCGolfMenu.py b/toontown/speedchat/TTSCGolfMenu.py old mode 100644 new mode 100755 diff --git a/toontown/speedchat/TTSCHalloweenMenu.py b/toontown/speedchat/TTSCHalloweenMenu.py old mode 100644 new mode 100755 diff --git a/toontown/speedchat/TTSCIdesOfMarchMenu.py b/toontown/speedchat/TTSCIdesOfMarchMenu.py old mode 100644 new mode 100755 diff --git a/toontown/speedchat/TTSCIndexedTerminal.py b/toontown/speedchat/TTSCIndexedTerminal.py old mode 100644 new mode 100755 diff --git a/toontown/speedchat/TTSCJellybeanJamMenu.py b/toontown/speedchat/TTSCJellybeanJamMenu.py old mode 100644 new mode 100755 diff --git a/toontown/speedchat/TTSCKartRacingMenu.py b/toontown/speedchat/TTSCKartRacingMenu.py old mode 100644 new mode 100755 diff --git a/toontown/speedchat/TTSCPetTrickMenu.py b/toontown/speedchat/TTSCPetTrickMenu.py old mode 100644 new mode 100755 diff --git a/toontown/speedchat/TTSCPromotionalMenu.py b/toontown/speedchat/TTSCPromotionalMenu.py old mode 100644 new mode 100755 diff --git a/toontown/speedchat/TTSCResistanceMenu.py b/toontown/speedchat/TTSCResistanceMenu.py old mode 100644 new mode 100755 diff --git a/toontown/speedchat/TTSCResistanceTerminal.py b/toontown/speedchat/TTSCResistanceTerminal.py old mode 100644 new mode 100755 diff --git a/toontown/speedchat/TTSCSellbotFieldOfficeMenu.py b/toontown/speedchat/TTSCSellbotFieldOfficeMenu.py old mode 100644 new mode 100755 diff --git a/toontown/speedchat/TTSCSellbotInvasionMenu.py b/toontown/speedchat/TTSCSellbotInvasionMenu.py old mode 100644 new mode 100755 diff --git a/toontown/speedchat/TTSCSellbotNerfMenu.py b/toontown/speedchat/TTSCSellbotNerfMenu.py old mode 100644 new mode 100755 diff --git a/toontown/speedchat/TTSCSillyPhaseFiveMenu.py b/toontown/speedchat/TTSCSillyPhaseFiveMenu.py old mode 100644 new mode 100755 diff --git a/toontown/speedchat/TTSCSillyPhaseFourMenu.py b/toontown/speedchat/TTSCSillyPhaseFourMenu.py old mode 100644 new mode 100755 diff --git a/toontown/speedchat/TTSCSillyPhaseOneMenu.py b/toontown/speedchat/TTSCSillyPhaseOneMenu.py old mode 100644 new mode 100755 diff --git a/toontown/speedchat/TTSCSillyPhaseThreeMenu.py b/toontown/speedchat/TTSCSillyPhaseThreeMenu.py old mode 100644 new mode 100755 diff --git a/toontown/speedchat/TTSCSillyPhaseTwoMenu.py b/toontown/speedchat/TTSCSillyPhaseTwoMenu.py old mode 100644 new mode 100755 diff --git a/toontown/speedchat/TTSCToontaskMenu.py b/toontown/speedchat/TTSCToontaskMenu.py old mode 100644 new mode 100755 diff --git a/toontown/speedchat/TTSCToontaskTerminal.py b/toontown/speedchat/TTSCToontaskTerminal.py old mode 100644 new mode 100755 diff --git a/toontown/speedchat/TTSCVictoryPartiesMenu.py b/toontown/speedchat/TTSCVictoryPartiesMenu.py old mode 100644 new mode 100755 diff --git a/toontown/speedchat/TTSCWinterMenu.py b/toontown/speedchat/TTSCWinterMenu.py old mode 100644 new mode 100755 diff --git a/toontown/speedchat/TTSpeedChatGlobals.py b/toontown/speedchat/TTSpeedChatGlobals.py old mode 100644 new mode 100755 diff --git a/toontown/speedchat/TTSpeedChatTypes.py b/toontown/speedchat/TTSpeedChatTypes.py old mode 100644 new mode 100755 diff --git a/toontown/speedchat/__init__.py b/toontown/speedchat/__init__.py old mode 100644 new mode 100755 diff --git a/toontown/suit/BossCog.py b/toontown/suit/BossCog.py old mode 100644 new mode 100755 diff --git a/toontown/suit/DistributedBossCog.py b/toontown/suit/DistributedBossCog.py old mode 100644 new mode 100755 diff --git a/toontown/suit/DistributedBossCogAI.py b/toontown/suit/DistributedBossCogAI.py old mode 100644 new mode 100755 diff --git a/toontown/suit/DistributedBossbotBoss.py b/toontown/suit/DistributedBossbotBoss.py old mode 100644 new mode 100755 index daad5aa5..e3c56994 --- a/toontown/suit/DistributedBossbotBoss.py +++ b/toontown/suit/DistributedBossbotBoss.py @@ -843,19 +843,11 @@ class DistributedBossbotBoss(DistributedBossCog.DistributedBossCog, FSM.FSM): def __talkAboutPromotion(self, speech): if self.prevCogSuitLevel < ToontownGlobals.MaxCogSuitLevel: - deptIndex = CogDisguiseGlobals.dept2deptIndex(self.style.dept) - cogLevels = base.localAvatar.getCogLevels() - newCogSuitLevel = cogLevels[deptIndex] - cogTypes = base.localAvatar.getCogTypes() - maxCogSuitLevel = (SuitDNA.levelsPerSuit-1) + cogTypes[deptIndex] - if self.prevCogSuitLevel != maxCogSuitLevel: - speech += TTLocalizer.BossbotRTLevelPromotion - if newCogSuitLevel == maxCogSuitLevel: - if newCogSuitLevel != ToontownGlobals.MaxCogSuitLevel: - suitIndex = (SuitDNA.suitsPerDept*deptIndex) + cogTypes[deptIndex] - cogTypeStr = SuitDNA.suitHeadTypes[suitIndex] - cogName = SuitBattleGlobals.SuitAttributes[cogTypeStr]['name'] - speech += TTLocalizer.BossbotRTSuitPromotion % cogName + newCogSuitLevel = localAvatar.getCogLevels()[CogDisguiseGlobals.dept2deptIndex(self.style.dept)] + if newCogSuitLevel == ToontownGlobals.MaxCogSuitLevel: + speech += TTLocalizer.BossbotRTLastPromotion % (ToontownGlobals.MaxCogSuitLevel + 1) + if newCogSuitLevel in ToontownGlobals.CogSuitHPLevels: + speech += TTLocalizer.BossbotRTHPBoost else: speech += TTLocalizer.BossbotRTMaxed % (ToontownGlobals.MaxCogSuitLevel + 1) return speech diff --git a/toontown/suit/DistributedBossbotBossAI.py b/toontown/suit/DistributedBossbotBossAI.py old mode 100644 new mode 100755 diff --git a/toontown/suit/DistributedCashbotBoss.py b/toontown/suit/DistributedCashbotBoss.py old mode 100644 new mode 100755 index 2c6c8695..bce110c5 --- a/toontown/suit/DistributedCashbotBoss.py +++ b/toontown/suit/DistributedCashbotBoss.py @@ -648,19 +648,11 @@ class DistributedCashbotBoss(DistributedBossCog.DistributedBossCog, FSM.FSM): def __talkAboutPromotion(self, speech): if self.prevCogSuitLevel < ToontownGlobals.MaxCogSuitLevel: - deptIndex = CogDisguiseGlobals.dept2deptIndex(self.style.dept) - cogLevels = base.localAvatar.getCogLevels() - newCogSuitLevel = cogLevels[deptIndex] - cogTypes = base.localAvatar.getCogTypes() - maxCogSuitLevel = (SuitDNA.levelsPerSuit-1) + cogTypes[deptIndex] - if self.prevCogSuitLevel != maxCogSuitLevel: - speech += TTLocalizer.ResistanceToonLevelPromotion - if newCogSuitLevel == maxCogSuitLevel: - if newCogSuitLevel != ToontownGlobals.MaxCogSuitLevel: - suitIndex = (SuitDNA.suitsPerDept*deptIndex) + cogTypes[deptIndex] - cogTypeStr = SuitDNA.suitHeadTypes[suitIndex] - cogName = SuitBattleGlobals.SuitAttributes[cogTypeStr]['name'] - speech += TTLocalizer.ResistanceToonSuitPromotion % cogName + newCogSuitLevel = localAvatar.getCogLevels()[CogDisguiseGlobals.dept2deptIndex(self.style.dept)] + if newCogSuitLevel == ToontownGlobals.MaxCogSuitLevel: + speech += TTLocalizer.ResistanceToonLastPromotion % (ToontownGlobals.MaxCogSuitLevel + 1) + if newCogSuitLevel in ToontownGlobals.CogSuitHPLevels: + speech += TTLocalizer.ResistanceToonHPBoost else: speech += TTLocalizer.ResistanceToonMaxed % (ToontownGlobals.MaxCogSuitLevel + 1) return speech diff --git a/toontown/suit/DistributedCashbotBossAI.py b/toontown/suit/DistributedCashbotBossAI.py old mode 100644 new mode 100755 diff --git a/toontown/suit/DistributedCashbotBossGoon.py b/toontown/suit/DistributedCashbotBossGoon.py old mode 100644 new mode 100755 diff --git a/toontown/suit/DistributedCashbotBossGoonAI.py b/toontown/suit/DistributedCashbotBossGoonAI.py old mode 100644 new mode 100755 diff --git a/toontown/suit/DistributedFactorySuit.py b/toontown/suit/DistributedFactorySuit.py old mode 100644 new mode 100755 diff --git a/toontown/suit/DistributedFactorySuitAI.py b/toontown/suit/DistributedFactorySuitAI.py old mode 100644 new mode 100755 diff --git a/toontown/suit/DistributedGoon.py b/toontown/suit/DistributedGoon.py old mode 100644 new mode 100755 diff --git a/toontown/suit/DistributedGoonAI.py b/toontown/suit/DistributedGoonAI.py old mode 100644 new mode 100755 diff --git a/toontown/suit/DistributedGridGoon.py b/toontown/suit/DistributedGridGoon.py old mode 100644 new mode 100755 diff --git a/toontown/suit/DistributedGridGoonAI.py b/toontown/suit/DistributedGridGoonAI.py old mode 100644 new mode 100755 diff --git a/toontown/suit/DistributedLawbotBoss.py b/toontown/suit/DistributedLawbotBoss.py old mode 100644 new mode 100755 index 3cfe8951..115436fa --- a/toontown/suit/DistributedLawbotBoss.py +++ b/toontown/suit/DistributedLawbotBoss.py @@ -1659,19 +1659,11 @@ class DistributedLawbotBoss(DistributedBossCog.DistributedBossCog, FSM.FSM): def __talkAboutPromotion(self, speech): if self.prevCogSuitLevel < ToontownGlobals.MaxCogSuitLevel: - deptIndex = CogDisguiseGlobals.dept2deptIndex(self.style.dept) - cogLevels = base.localAvatar.getCogLevels() - newCogSuitLevel = cogLevels[deptIndex] - cogTypes = base.localAvatar.getCogTypes() - maxCogSuitLevel = (SuitDNA.levelsPerSuit-1) + cogTypes[deptIndex] - if self.prevCogSuitLevel != maxCogSuitLevel: - speech += TTLocalizer.WitnessToonLevelPromotion - if newCogSuitLevel == maxCogSuitLevel: - if newCogSuitLevel != ToontownGlobals.MaxCogSuitLevel: - suitIndex = (SuitDNA.suitsPerDept*deptIndex) + cogTypes[deptIndex] - cogTypeStr = SuitDNA.suitHeadTypes[suitIndex] - cogName = SuitBattleGlobals.SuitAttributes[cogTypeStr]['name'] - speech += TTLocalizer.WitnessToonSuitPromotion % cogName + newCogSuitLevel = localAvatar.getCogLevels()[CogDisguiseGlobals.dept2deptIndex(self.style.dept)] + if newCogSuitLevel == ToontownGlobals.MaxCogSuitLevel: + speech += TTLocalizer.WitnessToonLastPromotion % (ToontownGlobals.MaxCogSuitLevel + 1) + if newCogSuitLevel in ToontownGlobals.CogSuitHPLevels: + speech += TTLocalizer.WitnessToonHPBoost else: speech += TTLocalizer.WitnessToonMaxed % (ToontownGlobals.MaxCogSuitLevel + 1) return speech diff --git a/toontown/suit/DistributedLawbotBossAI.py b/toontown/suit/DistributedLawbotBossAI.py old mode 100644 new mode 100755 diff --git a/toontown/suit/DistributedLawbotBossSuit.py b/toontown/suit/DistributedLawbotBossSuit.py old mode 100644 new mode 100755 diff --git a/toontown/suit/DistributedLawbotBossSuitAI.py b/toontown/suit/DistributedLawbotBossSuitAI.py old mode 100644 new mode 100755 diff --git a/toontown/suit/DistributedMintSuit.py b/toontown/suit/DistributedMintSuit.py old mode 100644 new mode 100755 diff --git a/toontown/suit/DistributedMintSuitAI.py b/toontown/suit/DistributedMintSuitAI.py old mode 100644 new mode 100755 diff --git a/toontown/suit/DistributedSellbotBoss.py b/toontown/suit/DistributedSellbotBoss.py old mode 100644 new mode 100755 index 1cbe26a5..a920181c --- a/toontown/suit/DistributedSellbotBoss.py +++ b/toontown/suit/DistributedSellbotBoss.py @@ -444,20 +444,15 @@ class DistributedSellbotBoss(DistributedBossCog.DistributedBossCog, FSM.FSM): return bossTrack def __talkAboutPromotion(self, speech): - if self.prevCogSuitLevel < ToontownGlobals.MaxCogSuitLevel: - deptIndex = CogDisguiseGlobals.dept2deptIndex(self.style.dept) - cogLevels = base.localAvatar.getCogLevels() - newCogSuitLevel = cogLevels[deptIndex] - cogTypes = base.localAvatar.getCogTypes() - maxCogSuitLevel = (SuitDNA.levelsPerSuit-1) + cogTypes[deptIndex] - if self.prevCogSuitLevel != maxCogSuitLevel: - speech += TTLocalizer.CagedToonLevelPromotion - if newCogSuitLevel == maxCogSuitLevel: - if newCogSuitLevel != ToontownGlobals.MaxCogSuitLevel: - suitIndex = (SuitDNA.suitsPerDept*deptIndex) + cogTypes[deptIndex] - cogTypeStr = SuitDNA.suitHeadTypes[suitIndex] - cogName = SuitBattleGlobals.SuitAttributes[cogTypeStr]['name'] - speech += TTLocalizer.CagedToonSuitPromotion % cogName + if not self.localToonPromoted: + pass + elif self.prevCogSuitLevel < ToontownGlobals.MaxCogSuitLevel: + speech += TTLocalizer.CagedToonPromotion + newCogSuitLevel = localAvatar.getCogLevels()[CogDisguiseGlobals.dept2deptIndex(self.style.dept)] + if newCogSuitLevel == ToontownGlobals.MaxCogSuitLevel: + speech += TTLocalizer.CagedToonLastPromotion % (ToontownGlobals.MaxCogSuitLevel + 1) + if newCogSuitLevel in ToontownGlobals.CogSuitHPLevels: + speech += TTLocalizer.CagedToonHPBoost else: speech += TTLocalizer.CagedToonMaxed % (ToontownGlobals.MaxCogSuitLevel + 1) return speech diff --git a/toontown/suit/DistributedSellbotBossAI.py b/toontown/suit/DistributedSellbotBossAI.py old mode 100644 new mode 100755 diff --git a/toontown/suit/DistributedStageSuit.py b/toontown/suit/DistributedStageSuit.py old mode 100644 new mode 100755 diff --git a/toontown/suit/DistributedStageSuitAI.py b/toontown/suit/DistributedStageSuitAI.py old mode 100644 new mode 100755 diff --git a/toontown/suit/DistributedSuit.py b/toontown/suit/DistributedSuit.py old mode 100644 new mode 100755 diff --git a/toontown/suit/DistributedSuitAI.py b/toontown/suit/DistributedSuitAI.py old mode 100644 new mode 100755 diff --git a/toontown/suit/DistributedSuitBase.py b/toontown/suit/DistributedSuitBase.py old mode 100644 new mode 100755 index 0b17b62b..186479e5 --- a/toontown/suit/DistributedSuitBase.py +++ b/toontown/suit/DistributedSuitBase.py @@ -60,9 +60,7 @@ class DistributedSuitBase(DistributedAvatar.DistributedAvatar, Suit.Suit, SuitBa self.maxSkeleRevives = 0 self.sillySurgeText = False self.interactivePropTrackBonus = -1 - - def setInteractivePropTrackBonus(self, trackBonus): - self.interactivePropTrackBonus = trackBonus + return def setVirtual(self, virtual): pass diff --git a/toontown/suit/DistributedSuitBaseAI.py b/toontown/suit/DistributedSuitBaseAI.py old mode 100644 new mode 100755 diff --git a/toontown/suit/DistributedSuitPlanner.py b/toontown/suit/DistributedSuitPlanner.py old mode 100644 new mode 100755 diff --git a/toontown/suit/DistributedSuitPlannerAI.py b/toontown/suit/DistributedSuitPlannerAI.py old mode 100644 new mode 100755 diff --git a/toontown/suit/DistributedTutorialSuit.py b/toontown/suit/DistributedTutorialSuit.py old mode 100644 new mode 100755 diff --git a/toontown/suit/DistributedTutorialSuitAI.py b/toontown/suit/DistributedTutorialSuitAI.py old mode 100644 new mode 100755 diff --git a/toontown/suit/Goon.py b/toontown/suit/Goon.py old mode 100644 new mode 100755 diff --git a/toontown/suit/GoonDeath.py b/toontown/suit/GoonDeath.py old mode 100644 new mode 100755 diff --git a/toontown/suit/GoonGlobals.py b/toontown/suit/GoonGlobals.py old mode 100644 new mode 100755 diff --git a/toontown/suit/GoonPathData.py b/toontown/suit/GoonPathData.py old mode 100644 new mode 100755 diff --git a/toontown/suit/RoguesGallery.py b/toontown/suit/RoguesGallery.py old mode 100644 new mode 100755 diff --git a/toontown/suit/SellbotBossGlobals.py b/toontown/suit/SellbotBossGlobals.py old mode 100644 new mode 100755 diff --git a/toontown/suit/Suit.py b/toontown/suit/Suit.py old mode 100644 new mode 100755 index a1fdb8a7..d5f2dd70 --- a/toontown/suit/Suit.py +++ b/toontown/suit/Suit.py @@ -1,19 +1,12 @@ -from direct.actor import Actor -from otp.avatar import Avatar -import SuitDNA -from toontown.toonbase import ToontownGlobals from pandac.PandaModules import * -from toontown.battle import SuitBattleGlobals -from toontown.nametag import NametagGlobals +from direct.actor import Actor from direct.task.Task import Task -from toontown.battle import BattleProps -from toontown.toonbase import TTLocalizer -from pandac.PandaModules import VirtualFileMountHTTP, VirtualFileSystem, Filename, DSearchPath -from direct.showbase import AppRunnerGlobal -from toontown.nametag import NametagGroup -import string -import os +from otp.avatar import Avatar +from toontown.battle import BattleProps, SuitBattleGlobals +from toontown.nametag import NametagGlobals +from toontown.toonbase import TTLocalizer, ToontownGlobals from toontown.suit import SuitGlobals +import SuitDNA, string aSize = 6.06 bSize = 5.29 diff --git a/toontown/suit/SuitAvatarPanel.py b/toontown/suit/SuitAvatarPanel.py old mode 100644 new mode 100755 diff --git a/toontown/suit/SuitBase.py b/toontown/suit/SuitBase.py old mode 100644 new mode 100755 diff --git a/toontown/suit/SuitDNA.py b/toontown/suit/SuitDNA.py old mode 100644 new mode 100755 index b3ad661d..f74c1356 --- a/toontown/suit/SuitDNA.py +++ b/toontown/suit/SuitDNA.py @@ -100,7 +100,6 @@ suitsPerLevel = [1, 1, 1] suitsPerDept = 8 -levelsPerSuit = 5 goonTypes = ['pg', 'sg'] def getSuitBodyType(name): diff --git a/toontown/suit/SuitDialog.py b/toontown/suit/SuitDialog.py old mode 100644 new mode 100755 diff --git a/toontown/suit/SuitGlobals.py b/toontown/suit/SuitGlobals.py old mode 100644 new mode 100755 diff --git a/toontown/suit/SuitInvasionGlobals.py b/toontown/suit/SuitInvasionGlobals.py old mode 100644 new mode 100755 diff --git a/toontown/suit/SuitInvasionManagerAI.py b/toontown/suit/SuitInvasionManagerAI.py old mode 100644 new mode 100755 diff --git a/toontown/suit/SuitPlannerBase.py b/toontown/suit/SuitPlannerBase.py old mode 100644 new mode 100755 diff --git a/toontown/suit/SuitTimings.py b/toontown/suit/SuitTimings.py old mode 100644 new mode 100755 diff --git a/toontown/suit/__init__.py b/toontown/suit/__init__.py old mode 100644 new mode 100755 diff --git a/toontown/toon/AccessoryGlobals.py b/toontown/toon/AccessoryGlobals.py old mode 100644 new mode 100755 diff --git a/toontown/toon/AvatarPanelBase.py b/toontown/toon/AvatarPanelBase.py old mode 100644 new mode 100755 diff --git a/toontown/toon/BoardingGroupInviterPanels.py b/toontown/toon/BoardingGroupInviterPanels.py old mode 100644 new mode 100755 diff --git a/toontown/toon/DeathForceAcknowledge.py b/toontown/toon/DeathForceAcknowledge.py old mode 100644 new mode 100755 diff --git a/toontown/toon/DistributedNPCBlocker.py b/toontown/toon/DistributedNPCBlocker.py old mode 100644 new mode 100755 diff --git a/toontown/toon/DistributedNPCBlockerAI.py b/toontown/toon/DistributedNPCBlockerAI.py old mode 100644 new mode 100755 diff --git a/toontown/toon/DistributedNPCClerk.py b/toontown/toon/DistributedNPCClerk.py old mode 100644 new mode 100755 diff --git a/toontown/toon/DistributedNPCClerkAI.py b/toontown/toon/DistributedNPCClerkAI.py old mode 100644 new mode 100755 diff --git a/toontown/toon/DistributedNPCFisherman.py b/toontown/toon/DistributedNPCFisherman.py old mode 100644 new mode 100755 diff --git a/toontown/toon/DistributedNPCFishermanAI.py b/toontown/toon/DistributedNPCFishermanAI.py old mode 100644 new mode 100755 diff --git a/toontown/toon/DistributedNPCFlippyInToonHall.py b/toontown/toon/DistributedNPCFlippyInToonHall.py old mode 100644 new mode 100755 diff --git a/toontown/toon/DistributedNPCFlippyInToonHallAI.py b/toontown/toon/DistributedNPCFlippyInToonHallAI.py old mode 100644 new mode 100755 diff --git a/toontown/toon/DistributedNPCGlove.py b/toontown/toon/DistributedNPCGlove.py old mode 100644 new mode 100755 diff --git a/toontown/toon/DistributedNPCGloveAI.py b/toontown/toon/DistributedNPCGloveAI.py old mode 100644 new mode 100755 diff --git a/toontown/toon/DistributedNPCKartClerk.py b/toontown/toon/DistributedNPCKartClerk.py old mode 100644 new mode 100755 diff --git a/toontown/toon/DistributedNPCKartClerkAI.py b/toontown/toon/DistributedNPCKartClerkAI.py old mode 100644 new mode 100755 diff --git a/toontown/toon/DistributedNPCLaffRestock.py b/toontown/toon/DistributedNPCLaffRestock.py old mode 100644 new mode 100755 index 4dc05f14..f6963d48 --- a/toontown/toon/DistributedNPCLaffRestock.py +++ b/toontown/toon/DistributedNPCLaffRestock.py @@ -91,6 +91,9 @@ class DistributedNPCLaffRestock(DistributedNPCToonBase): elif mode == LaffRestockGlobals.NoMoney: self.setChatAbsolute(TTLocalizer.RestockNoMoneyMessage, CFSpeech | CFTimeout) self.resetLaffClerk() + elif mode == NPCToons.SELL_MOVIE_CHEATER: + self.setChatAbsolute(TTLocalizer.RestockCheaterMessage, CFSpeech | CFTimeout) + self.resetLaffClerk() def __handleRestock(self, laff, cost): self.sendUpdate('restock', [self.av.doId, laff, cost]) diff --git a/toontown/toon/DistributedNPCLaffRestockAI.py b/toontown/toon/DistributedNPCLaffRestockAI.py old mode 100644 new mode 100755 index 7799375d..5f267a36 --- a/toontown/toon/DistributedNPCLaffRestockAI.py +++ b/toontown/toon/DistributedNPCLaffRestockAI.py @@ -89,6 +89,11 @@ class DistributedNPCLaffRestockAI(DistributedNPCToonBaseAI): return av = simbase.air.doId2do.get(avId) if av: - movieType = NPCToons.SELL_MOVIE_COMPLETE - av.takeMoney(cost) - av.b_setHp(av.getHp() + laff) + if av.getMaxHp() < (av.getHp() + laff): + movieType = NPCToons.SELL_MOVIE_CHEATER + self.air.writeServerEvent('suspicious', avId, 'DistributedNPCLaffRestockAI.restock invalid restock') + self.notify.warning('somebody tried to buy an invalid hp restock! avId: %s' % avId) + else: + movieType = NPCToons.SELL_MOVIE_COMPLETE + av.takeMoney(cost) + av.b_setHp(av.getHp() + laff) diff --git a/toontown/toon/DistributedNPCPartyPerson.py b/toontown/toon/DistributedNPCPartyPerson.py old mode 100644 new mode 100755 diff --git a/toontown/toon/DistributedNPCPartyPersonAI.py b/toontown/toon/DistributedNPCPartyPersonAI.py old mode 100644 new mode 100755 diff --git a/toontown/toon/DistributedNPCPetclerk.py b/toontown/toon/DistributedNPCPetclerk.py old mode 100644 new mode 100755 diff --git a/toontown/toon/DistributedNPCPetclerkAI.py b/toontown/toon/DistributedNPCPetclerkAI.py old mode 100644 new mode 100755 index 2daee72d..beb7b5c2 --- a/toontown/toon/DistributedNPCPetclerkAI.py +++ b/toontown/toon/DistributedNPCPetclerkAI.py @@ -27,7 +27,7 @@ class DistributedNPCPetclerkAI(DistributedNPCToonBaseAI): if self.isBusy(): self.freeAvatar(avId) return - self.petSeeds = self.air.petMgr.getAvailablePets(3, ZoneUtil.getCanonicalHoodId(self.zoneId)) + self.petSeeds = self.air.petMgr.getAvailablePets(ZoneUtil.getCanonicalHoodId(self.zoneId)) numGenders = len(PetDNA.PetGenders) self.petSeeds *= numGenders self.petSeeds.sort() diff --git a/toontown/toon/DistributedNPCScientist.py b/toontown/toon/DistributedNPCScientist.py old mode 100644 new mode 100755 diff --git a/toontown/toon/DistributedNPCScientistAI.py b/toontown/toon/DistributedNPCScientistAI.py old mode 100644 new mode 100755 diff --git a/toontown/toon/DistributedNPCSpecialQuestGiver.py b/toontown/toon/DistributedNPCSpecialQuestGiver.py old mode 100644 new mode 100755 diff --git a/toontown/toon/DistributedNPCSpecialQuestGiverAI.py b/toontown/toon/DistributedNPCSpecialQuestGiverAI.py old mode 100644 new mode 100755 diff --git a/toontown/toon/DistributedNPCTailor.py b/toontown/toon/DistributedNPCTailor.py old mode 100644 new mode 100755 diff --git a/toontown/toon/DistributedNPCTailorAI.py b/toontown/toon/DistributedNPCTailorAI.py old mode 100644 new mode 100755 diff --git a/toontown/toon/DistributedNPCToon.py b/toontown/toon/DistributedNPCToon.py old mode 100644 new mode 100755 diff --git a/toontown/toon/DistributedNPCToonAI.py b/toontown/toon/DistributedNPCToonAI.py old mode 100644 new mode 100755 diff --git a/toontown/toon/DistributedNPCToonBase.py b/toontown/toon/DistributedNPCToonBase.py old mode 100644 new mode 100755 diff --git a/toontown/toon/DistributedNPCToonBaseAI.py b/toontown/toon/DistributedNPCToonBaseAI.py old mode 100644 new mode 100755 diff --git a/toontown/toon/DistributedSmartNPC.py b/toontown/toon/DistributedSmartNPC.py old mode 100644 new mode 100755 diff --git a/toontown/toon/DistributedSmartNPCAI.py b/toontown/toon/DistributedSmartNPCAI.py old mode 100644 new mode 100755 diff --git a/toontown/toon/DistributedToon.py b/toontown/toon/DistributedToon.py old mode 100644 new mode 100755 index b67e5c51..20a86fc6 --- a/toontown/toon/DistributedToon.py +++ b/toontown/toon/DistributedToon.py @@ -180,10 +180,8 @@ class DistributedToon(DistributedPlayer.DistributedPlayer, Toon.Toon, Distribute self.gmNameTagEnabled = 0 self.gmNameTagColor = 'whiteGM' self.gmNameTagString = '' - self.promotionStatus = [0, 0, 0, 0] self.buffs = [] self.redeemedCodes = [] - self.trueFriends = [] self.ignored = [] self.reported = [] @@ -371,7 +369,7 @@ class DistributedToon(DistributedPlayer.DistributedPlayer, Toon.Toon, Distribute ResistanceChat.doEffect(msgIndex, self, nearbyToons) def d_battleSOS(self, sendToId): - self.cr.ttuFriendsManager.d_battleSOS(sendToId) + self.cr.ttsFriendsManager.d_battleSOS(sendToId) def battleSOS(self, requesterId): avatar = base.cr.identifyAvatar(requesterId) @@ -473,7 +471,7 @@ class DistributedToon(DistributedPlayer.DistributedPlayer, Toon.Toon, Distribute print ':%s: setTalk: %r, %r, %r' % (timestamp, fromAV, avatarName, chat) if base.config.GetBool('want-sleep-reply-on-regular-chat', 0): if base.localAvatar.sleepFlag == 1: - base.cr.ttuFriendsManager.d_sleepAutoReply(fromAV) + base.cr.ttsFriendsManager.d_sleepAutoReply(fromAV) newText, scrubbed = self.scrubTalk(chat, mods) self.displayTalk(newText) base.talkAssistant.receiveOpenTalk(fromAV, avatarName, fromAC, None, newText) @@ -491,7 +489,7 @@ class DistributedToon(DistributedPlayer.DistributedPlayer, Toon.Toon, Distribute return if base.localAvatar.sleepFlag == 1: if not base.cr.identifyAvatar(fromAV) == base.localAvatar: - base.cr.ttuFriendsManager.d_sleepAutoReply(fromAV) + base.cr.ttsFriendsManager.d_sleepAutoReply(fromAV) newText, scrubbed = self.scrubTalk(chat, mods) self.displayTalkWhisper(fromAV, avatarName, chat, mods) timestamp = time.strftime('%m-%d-%Y %H:%M:%S', time.localtime()) @@ -518,7 +516,7 @@ class DistributedToon(DistributedPlayer.DistributedPlayer, Toon.Toon, Distribute return if base.localAvatar.sleepFlag == 1: if not base.cr.identifyAvatar(fromId) == base.localAvatar: - base.cr.ttuFriendsManager.d_sleepAutoReply(fromId) + base.cr.ttsFriendsManager.d_sleepAutoReply(fromId) chatString = SCDecoders.decodeSCEmoteWhisperMsg(emoteId, handle.getName()) if chatString: self.displayWhisper(fromId, chatString, WTEmote) @@ -539,7 +537,7 @@ class DistributedToon(DistributedPlayer.DistributedPlayer, Toon.Toon, Distribute return if base.localAvatar.sleepFlag == 1: if not base.cr.identifyAvatar(fromId) == base.localAvatar: - base.cr.ttuFriendsManager.d_sleepAutoReply(fromId) + base.cr.ttsFriendsManager.d_sleepAutoReply(fromId) chatString = SCDecoders.decodeSCStaticTextMsg(msgIndex) if chatString: self.displayWhisper(fromId, chatString, WTQuickTalker) @@ -558,7 +556,7 @@ class DistributedToon(DistributedPlayer.DistributedPlayer, Toon.Toon, Distribute def whisperSCToontaskTo(self, taskId, toNpcId, toonProgress, msgIndex, sendToId): messenger.send('wakeup') - base.cr.ttuFriendsManager.d_whisperSCToontaskTo(sendToId, taskId, + base.cr.ttsFriendsManager.d_whisperSCToontaskTo(sendToId, taskId, toNpcId, toonProgress, msgIndex ) @@ -890,9 +888,6 @@ class DistributedToon(DistributedPlayer.DistributedPlayer, Toon.Toon, Distribute if self.disguisePage: self.disguisePage.updatePage() - def getCogTypes(self): - return self.cogTypes - def setCogLevels(self, levels): self.cogLevels = levels if self.disguisePage: @@ -936,9 +931,6 @@ class DistributedToon(DistributedPlayer.DistributedPlayer, Toon.Toon, Distribute else: self.putOnSuit(index, rental=True) - def setPromotionStatus(self, status): - self.promotionStatus = status - def isCog(self): if self.cogIndex == -1: return 0 @@ -2585,12 +2577,6 @@ class DistributedToon(DistributedPlayer.DistributedPlayer, Toon.Toon, Distribute def setRedeemedCodes(self, redeemedCodes): self.redeemedCodes = redeemedCodes - def setTrueFriends(self, trueFriends): - self.trueFriends = trueFriends - - def isTrueFriend(self, doId): - return doId in self.trueFriends - def b_setIgnored(self, ignored): self.setIgnored(ignored) self.d_setIgnored(ignored) @@ -2659,15 +2645,6 @@ def zone(zoneId): base.cr.sendSetZoneMsg(zoneId, [zoneId]) return 'You have been moved to zone %d.' % zoneId -@magicWord(category=CATEGORY_ADMINISTRATOR, types=[int]) -def promote(deptIndex): - """ - sends a request to promote the invoker's [deptIndex] Cog disguise. - """ - invoker = spellbook.getInvoker() - invoker.sendUpdate('requestPromotion', [deptIndex]) - return 'Your promotion request has been sent.' - @magicWord(category=CATEGORY_ADMINISTRATOR) def blackCat(): """ diff --git a/toontown/toon/DistributedToonAI.py b/toontown/toon/DistributedToonAI.py old mode 100644 new mode 100755 index a73f36a7..08c497f8 --- a/toontown/toon/DistributedToonAI.py +++ b/toontown/toon/DistributedToonAI.py @@ -1,55 +1,36 @@ +from pandac.PandaModules import * from direct.directnotify import DirectNotifyGlobal from direct.distributed import DistributedSmoothNodeAI from direct.distributed.ClockDelta import * from direct.distributed.MsgTypes import * from direct.distributed.PyDatagram import PyDatagram from direct.task import Task -from pandac.PandaModules import * -import random -import time -import re - -import Experience -import InventoryBase -from NPCToons import npcFriends -import ToonDNA from otp.ai.AIBaseGlobal import * from otp.ai.MagicWordGlobal import * -from otp.avatar import DistributedAvatarAI -from otp.avatar import DistributedPlayerAI -from otp.otpbase import OTPGlobals -from otp.otpbase import OTPLocalizer +from otp.avatar import DistributedAvatarAI, DistributedPlayerAI +from otp.otpbase import OTPGlobals, OTPLocalizer from toontown.battle import SuitBattleGlobals -from toontown.catalog import CatalogAccessoryItem -from toontown.catalog import CatalogItem -from toontown.catalog import CatalogItemList +from toontown.catalog import CatalogAccessoryItem, CatalogItem, CatalogItemList from toontown.chat import ResistanceChat from toontown.coghq import CogDisguiseGlobals -from toontown.estate import FlowerBasket -from toontown.estate import FlowerCollection -from toontown.estate import GardenGlobals -from toontown.fishing import FishCollection -from toontown.fishing import FishTank +from toontown.estate import FlowerBasket, FlowerCollection, GardenGlobals +from toontown.fishing import FishCollection, FishTank from toontown.golf import GolfGlobals from toontown.hood import ZoneUtil -from toontown.minigame import MinigameCreatorAI from toontown.parties import PartyGlobals from toontown.parties.InviteInfo import InviteInfoBase from toontown.parties.PartyGlobals import InviteStatus from toontown.parties.PartyInfo import PartyInfoAI from toontown.parties.PartyReplyInfo import PartyReplyInfoBase -from toontown.quest import QuestRewardCounter -from toontown.quest import Quests +from toontown.quest import QuestRewardCounter, Quests from toontown.racing import RaceGlobals from toontown.shtiker import CogPageGlobals from toontown.suit import SuitDNA from toontown.toon import NPCToons -from toontown.toonbase import TTLocalizer -from toontown.toonbase import ToontownBattleGlobals -from toontown.toonbase import ToontownGlobals +from toontown.toonbase import TTLocalizer, ToontownBattleGlobals, ToontownGlobals from toontown.toonbase.ToontownGlobals import * -from toontown.toonbase.TTLocalizerEnglish import SuitNameDropper - +from NPCToons import npcFriends +import Experience, InventoryBase, ToonDNA, random, time if simbase.wantPets: from toontown.pets import PetLookerAI, PetObserve @@ -72,8 +53,6 @@ class DistributedToonAI(DistributedPlayerAI.DistributedPlayerAI, DistributedSmoo ToontownGlobals.FT_Leg: (CogDisguiseGlobals.leftLegIndex, CogDisguiseGlobals.rightLegIndex), ToontownGlobals.FT_Arm: (CogDisguiseGlobals.leftArmIndex, CogDisguiseGlobals.rightArmIndex), ToontownGlobals.FT_Torso: (CogDisguiseGlobals.torsoIndex,)} - lastFlagAvTime = globalClock.getFrameTime() - flagCounts = {} petId = None def __init__(self, air): @@ -85,7 +64,6 @@ class DistributedToonAI(DistributedPlayerAI.DistributedPlayerAI, DistributedSmoo self.air = air self.dna = ToonDNA.ToonDNA() - self.magicWordDNABackups = {} self.inventory = None self.fishCollection = None self.fishTank = None @@ -119,6 +97,7 @@ class DistributedToonAI(DistributedPlayerAI.DistributedPlayerAI, DistributedSmoo self.emoteAccess = [0] * 27 self.maxMoney = 0 self.maxBankMoney = 0 + self.bankMoney = 0 self.gardenSpecials = [] self.houseId = 0 self.posIndex = 0 @@ -177,10 +156,8 @@ class DistributedToonAI(DistributedPlayerAI.DistributedPlayerAI, DistributedSmoo self.partyReplyInfoBases = [] self.teleportOverride = 0 self._gmDisabled = False - self.promotionStatus = [0, 0, 0, 0] self.buffs = [] self.redeemedCodes = [] - self.trueFriends = [] self.ignored = [] self.reported = [] @@ -432,27 +409,6 @@ class DistributedToonAI(DistributedPlayerAI.DistributedPlayerAI, DistributedSmoo def getExperience(self): return self.experience.makeNetString() - def b_setTrueFriends(self, trueFriends): - self.d_setTrueFriends(trueFriends) - self.setTrueFriends(trueFriends) - - def d_setTrueFriends(self, trueFriends): - self.sendUpdate('setTrueFriends', [trueFriends]) - - def setTrueFriends(self, trueFriends): - self.trueFriends = trueFriends - - def getTrueFriends(self): - return self.trueFriends - - def isTrueFriend(self, doId): - return doId in self.trueFriends - - def addTrueFriend(self, doId): - if not self.isTrueFriend(doId): - self.trueFriends.append(doId) - self.d_setTrueFriends(self.trueFriends) - def b_setIgnored(self, ignored): self.d_setIgnored(ignored) self.setIgnored(ignored) @@ -1244,38 +1200,31 @@ class DistributedToonAI(DistributedPlayerAI.DistributedPlayerAI, DistributedSmoo def getCogLevels(self): return self.cogLevels - def incCogLevel(self, deptIndex): - cogLevel = self.cogLevels[deptIndex] - maxSuitType = SuitDNA.suitsPerDept - 1 - maxSuitLevel = (SuitDNA.levelsPerSuit-1) + maxSuitType - maxCogLevel = (SuitDNA.levelsPerSuit-1) + self.cogTypes[deptIndex] - if (cogLevel == maxCogLevel) or (cogLevel == maxSuitLevel): - self.promotionStatus[deptIndex] = ToontownGlobals.PendingPromotion - self.d_setPromotionStatus(self.promotionStatus) + def incCogLevel(self, dept): + newLevel = self.cogLevels[dept] + 1 + cogTypeStr = SuitDNA.suitHeadTypes[self.cogTypes[dept]] + lastCog = self.cogTypes[dept] >= SuitDNA.suitsPerDept - 1 + if not lastCog: + maxLevel = SuitBattleGlobals.SuitAttributes[cogTypeStr]['level'] + 4 else: - self.cogLevels[deptIndex] += 1 + maxLevel = ToontownGlobals.MaxCogSuitLevel + if newLevel > maxLevel: + if not lastCog: + self.cogTypes[dept] += 1 + self.d_setCogTypes(self.cogTypes) + cogTypeStr = SuitDNA.suitHeadTypes[self.cogTypes[dept]] + self.cogLevels[dept] = SuitBattleGlobals.SuitAttributes[cogTypeStr]['level'] + self.d_setCogLevels(self.cogLevels) + else: + self.cogLevels[dept] += 1 self.d_setCogLevels(self.cogLevels) - self.cogMerits[deptIndex] = 0 - self.d_setCogMerits(self.cogMerits) - self.air.writeServerEvent( - 'cogSuit', self.doId, - '%s|%s|%s' % (deptIndex, self.cogTypes[deptIndex], self.cogLevels[deptIndex])) - - def requestPromotion(self, dept): - if self.promotionStatus[dept] == ToontownGlobals.PendingPromotion: - self.cogTypes[dept] += 1 - self.d_setCogTypes(self.cogTypes) - cogTypeStr = SuitDNA.suitHeadTypes[self.cogTypes[dept]] - self.cogLevels[dept] = SuitBattleGlobals.SuitAttributes[cogTypeStr]['level'] - self.d_setCogLevels(self.cogLevels) - self.cogMerits[dept] = 0 - self.d_setCogMerits(self.cogMerits) - maxHp = self.getMaxHp() - maxHp = min(ToontownGlobals.MaxHpLimit, maxHp + 1) - self.b_setMaxHp(maxHp) - self.toonUp(maxHp) - self.promotionStatus[dept] = ToontownGlobals.WantPromotion - self.d_setPromotionStatus(self.promotionStatus) + if lastCog: + if self.cogLevels[dept] in ToontownGlobals.CogSuitHPLevels: + maxHp = self.getMaxHp() + maxHp = min(ToontownGlobals.MaxHpLimit, maxHp + 1) + self.b_setMaxHp(maxHp) + self.toonUp(maxHp) + self.air.writeServerEvent('cogSuit', self.doId, '%s|%s|%s' % (dept, self.cogTypes[dept], self.cogLevels[dept])) def getNumPromotions(self, dept): if dept not in SuitDNA.suitDepts: @@ -1375,15 +1324,19 @@ class DistributedToonAI(DistributedPlayerAI.DistributedPlayerAI, DistributedSmoo def getCogMerits(self): return self.cogMerits - def b_promote(self, deptIndex): - self.promote(deptIndex) - self.d_promote(deptIndex) + def b_promote(self, dept): + self.promote(dept) + self.d_promote(dept) - def promote(self, deptIndex): - self.incCogLevel(deptIndex) + def promote(self, dept): + if self.cogLevels[dept] < ToontownGlobals.MaxCogSuitLevel: + self.cogMerits[dept] = 0 + self.incCogLevel(dept) - def d_promote(self, deptIndex): + def d_promote(self, dept): merits = self.getCogMerits() + if self.cogLevels[dept] < ToontownGlobals.MaxCogSuitLevel: + merits[dept] = 0 self.d_setCogMerits(merits) def readyForPromotion(self, dept): @@ -1417,19 +1370,6 @@ class DistributedToonAI(DistributedPlayerAI.DistributedPlayerAI, DistributedSmoo def getCogIndex(self): return self.cogIndex - def setPromotionStatus(self, status): - self.promotionStatus = status - - def d_setPromotionStatus(self, status): - self.sendUpdate('setPromotionStatus', [status]) - - def b_setPromotionStatus(self, status): - self.setPromotionStatus(status) - self.d_setPromotionStatus(status) - - def getPromotionStatus(self): - return self.promotionStatus - def b_setDisguisePageFlag(self, flag): self.setDisguisePageFlag(flag) self.d_setDisguisePageFlag(flag) @@ -2147,7 +2087,6 @@ class DistributedToonAI(DistributedPlayerAI.DistributedPlayerAI, DistributedSmoo return 0 def restockAllResistanceMessages(self, charges = 1): - from toontown.chat import ResistanceChat msgs = [] for menuIndex in ResistanceChat.resistanceMenu: for itemIndex in ResistanceChat.getItems(menuIndex): @@ -3622,9 +3561,6 @@ class DistributedToonAI(DistributedPlayerAI.DistributedPlayerAI, DistributedSmoo senderId = self.air.getAvatarIdFromSender() eventStr = 'senderId=%s ' % senderId eventStr += eventName - strSearch = re.compile('AvatarHackWarning! nodename') - if strSearch.search(eventName, 0, 100): - self.air.district.recordSuspiciousEventData(len(eventStr)) self.air.writeServerEvent('suspicious', self.doId, eventStr) if simbase.config.GetBool('want-ban-setAnimState', True): if eventName.startswith('setAnimState: '): @@ -4048,91 +3984,6 @@ class DistributedToonAI(DistributedPlayerAI.DistributedPlayerAI, DistributedSmoo def staticGetLogicalZoneChangeAllEvent(): return 'DOLogicalChangeZone-all' - def flagAv(self, avId, reason, params): - self.notify.debug('reason: %s timepassed: %s' % (reason, globalClock.getFrameTime() - DistributedToonAI.lastFlagAvTime)) - if reason == AV_FLAG_REASON_TOUCH and globalClock.getFrameTime() - DistributedToonAI.lastFlagAvTime > AV_TOUCH_CHECK_DELAY_AI: - DistributedToonAI.lastFlagAvTime = globalClock.getFrameTime() - av = self.air.doId2do.get(avId) - otherAv = self.air.doId2do.get(int(params[0])) - self.notify.debug('checking suspicious avatar positioning %s for %s with %s' % (avId, reason, params)) - if av and otherAv and isinstance(av, DistributedToonAI) and isinstance(otherAv, DistributedToonAI) and av.zoneId == otherAv.zoneId and av.zoneId not in MinigameCreatorAI.MinigameZoneRefs: - self.notify.debug('...in zone %s' % av.zoneId) - componentNode = av.getParent().attachNewNode('blah') - componentNode.setPos(av.getComponentX(), av.getComponentY(), av.getComponentZ()) - avPos = componentNode.getPos(av.getRender()) - componentNode.reparentTo(otherAv.getParent()) - componentNode.setPos(otherAv.getComponentX(), otherAv.getComponentY(), otherAv.getComponentZ()) - otherAvPos = componentNode.getPos(otherAv.getRender()) - componentNode.removeNode() - zDist = avPos.getZ() - otherAvPos.getZ() - avPos2D = copy.copy(avPos) - avPos2D.setZ(0) - otherAvPos2D = copy.copy(otherAvPos) - otherAvPos2D.setZ(0) - moveVec = avPos2D - otherAvPos2D - dist = moveVec.length() - self.notify.debug('2d dist between avs is %s %s %s' % (dist, avPos, otherAvPos)) - if dist < AV_TOUCH_CHECK_DIST and zDist < AV_TOUCH_CHECK_DIST_Z: - self.notify.debug('...moving!') - if dist == 0.0: - moveVec = Vec3(1.0, 0, 0) - else: - moveVec.normalize() - moveVec = moveVec * AV_TOUCH_CHECK_DIST - avHpr = av.getHpr(av.getRender()) - newX = avPos.getX() + moveVec.getX() - newY = avPos.getY() + moveVec.getY() - newZ = avPos.getZ() + moveVec.getZ() - newH = avHpr.getX() - newP = avHpr.getY() - newR = avHpr.getZ() - av.setPosHpr(av.getRender(), newX, newY, newZ, newH, newP, newR) - newAvPos = av.getPos() - if newAvPos.getX() > 3000 or newAvPos.getX() < -3000 or newAvPos.getY() > 3000 or newAvPos.getY() < -3000: - return - av.d_setXY(newAvPos.getX(), newAvPos.getY()) - self.notify.debug('setting ai pos: %s %s %s and sending pos: %s' % (newX, - newY, - newZ, - newAvPos)) - if len(DistributedToonAI.flagCounts) > AV_FLAG_HISTORY_LEN: - DistributedToonAI.flagCounts = {} - avPairKey = str(min(av.doId, otherAv.doId)) + '+' + str(max(av.doId, otherAv.doId)) - prevCount = DistributedToonAI.flagCounts.setdefault(avPairKey, [{}, globalClock.getFrameTime(), {}]) - if av.doId not in prevCount[2]: - prevCount[2][av.doId] = [None, None] - if av.doId not in prevCount[0]: - prevCount[0][av.doId] = 0 - self.notify.debug('moving av %s, newPos: %s oldPos: %s' % (av.doId, prevCount[2][av.doId], avPos)) - if prevCount[2][av.doId][0] == None or prevCount[2][av.doId][1] == None: - pass - elif prevCount[2][av.doId][0] != avPos.getX() or prevCount[2][av.doId][1] != avPos.getY(): - prevCount[0][av.doId] += 1 - prevCount[2][av.doId] = [newX, newY] - if prevCount[0][av.doId] > AV_TOUCH_COUNT_LIMIT: - if globalClock.getFrameTime() - prevCount[1] < AV_TOUCH_COUNT_TIME: - zoneId = not hasattr(av, 'zoneId') and 'undef' or av.zoneId - battleId = not hasattr(av, 'battleId') and 'undef' or av.battleId - animName = not hasattr(av, 'animName') and 'undef' or av.animName - inEstate = not hasattr(av, 'isInEstate') and 'undef' or av.isInEstate() - ghostMode = not hasattr(av, 'ghostMode') and 'undef' or av.ghostMode - immortalMode = not hasattr(av, 'immortalMode') and 'undef' or av.immortalMode - isGm = not hasattr(av, '_isGM') and 'undef' or av._isGM - valStr = '%s %s %s %s %s %s %s %s' % (otherAv.doId, - zoneId, - battleId, - animName, - inEstate, - ghostMode, - immortalMode, - isGm) - self.notify.info('av %s is consistently in an inappropriate position with %s...' % (av.doId, valStr)) - self.air.writeServerEvent('suspicious', avId, ' consistently in an inappropriate position with toon %s' % valStr) - response = simbase.config.GetString('toon-pos-hack-response', 'nothing') - av.handleHacking(response, 'collision and position hacking', [otherAv]) - del DistributedToonAI.flagCounts[avPairKey] - return - def handleHacking(self, response, comment, coconspirators = []): if response == 'quietzone': self.b_setLocation(self.parentId, ToontownGlobals.QuietZone) @@ -4334,22 +4185,16 @@ def maxToon(missingTrack=None): invoker.b_setEmoteAccess(emotes) # Max out their Cog suits: - suitDeptCount = len(SuitDNA.suitDepts) - cogParts = [] - for i in xrange(suitDeptCount): - cogParts.append(CogDisguiseGlobals.PartsPerSuitBitmasks[i]) - invoker.b_setCogParts(cogParts) - maxSuitType = SuitDNA.suitsPerDept - 1 - invoker.b_setCogTypes([maxSuitType] * suitDeptCount) - maxSuitLevel = (SuitDNA.levelsPerSuit-1) + maxSuitType - invoker.b_setCogLevels([maxSuitLevel] * suitDeptCount) - cogMerits = [] - for i in xrange(suitDeptCount): - suitIndex = (SuitDNA.suitsPerDept * (i+1)) - 1 - suitMerits = CogDisguiseGlobals.MeritsPerLevel[suitIndex] - cogMerits.append(suitMerits[SuitDNA.levelsPerSuit - 1]) - invoker.b_setCogMerits(cogMerits) - invoker.b_setPromotionStatus([1] * suitDeptCount) + invoker.b_setCogParts( + [ + CogDisguiseGlobals.PartsPerSuitBitmasks[0], # Bossbot + CogDisguiseGlobals.PartsPerSuitBitmasks[1], # Lawbot + CogDisguiseGlobals.PartsPerSuitBitmasks[2], # Cashbot + CogDisguiseGlobals.PartsPerSuitBitmasks[3] # Sellbot + ] + ) + invoker.b_setCogLevels([49] * 4) + invoker.b_setCogTypes([7, 7, 7, 7]) # Max their Cog gallery: deptCount = len(SuitDNA.suitDepts) diff --git a/toontown/toon/DistributedToonUD.py b/toontown/toon/DistributedToonUD.py old mode 100644 new mode 100755 index 07eb751d..806eb479 --- a/toontown/toon/DistributedToonUD.py +++ b/toontown/toon/DistributedToonUD.py @@ -18,9 +18,6 @@ class DistributedToonUD(DistributedObjectUD): def setMaxMoney(self, todo0): pass - - def setMaxBankMoney(self, todo0): - pass def setMoney(self, todo0): pass @@ -541,11 +538,5 @@ class DistributedToonUD(DistributedObjectUD): def setDISLid(self, todo0): pass - def flagAv(self, todo0, todo1, todo2): - pass - def setRedeemedCodes(self, redeemedCodes): - pass - - def setTrueFriends(self, trueFriends): pass \ No newline at end of file diff --git a/toontown/toon/ElevatorNotifier.py b/toontown/toon/ElevatorNotifier.py old mode 100644 new mode 100755 diff --git a/toontown/toon/Experience.py b/toontown/toon/Experience.py old mode 100644 new mode 100755 diff --git a/toontown/toon/GroupInvitee.py b/toontown/toon/GroupInvitee.py old mode 100644 new mode 100755 diff --git a/toontown/toon/GroupPanel.py b/toontown/toon/GroupPanel.py old mode 100644 new mode 100755 diff --git a/toontown/toon/HealthForceAcknowledge.py b/toontown/toon/HealthForceAcknowledge.py old mode 100644 new mode 100755 diff --git a/toontown/toon/InventoryBase.py b/toontown/toon/InventoryBase.py old mode 100644 new mode 100755 diff --git a/toontown/toon/InventoryNew.py b/toontown/toon/InventoryNew.py old mode 100644 new mode 100755 index 02769171..33d775b6 --- a/toontown/toon/InventoryNew.py +++ b/toontown/toon/InventoryNew.py @@ -1187,7 +1187,10 @@ class InventoryNew(InventoryBase.InventoryBase, DirectFrame): messenger.send('exitTrackFrame', [track]) def checkPropBonus(self, track): - return track == self.interactivePropTrackBonus + result = False + if track == self.interactivePropTrackBonus: + result = True + return result def stopAndClearPropBonusIval(self): if self.propBonusIval and self.propBonusIval.isPlaying(): diff --git a/toontown/toon/LaffMeter.py b/toontown/toon/LaffMeter.py old mode 100644 new mode 100755 diff --git a/toontown/toon/LaffRestockGlobals.py b/toontown/toon/LaffRestockGlobals.py old mode 100644 new mode 100755 diff --git a/toontown/toon/LaffShopGui.py b/toontown/toon/LaffShopGui.py old mode 100644 new mode 100755 diff --git a/toontown/toon/LaughingManGlobals.py b/toontown/toon/LaughingManGlobals.py old mode 100644 new mode 100755 diff --git a/toontown/toon/LocalToon.py b/toontown/toon/LocalToon.py old mode 100644 new mode 100755 index c2c1e2d3..baee8074 --- a/toontown/toon/LocalToon.py +++ b/toontown/toon/LocalToon.py @@ -162,6 +162,7 @@ class LocalToon(DistributedToon.DistributedToon, LocalAvatar.LocalAvatar): self.oldPos = None self.questMap = None self.prevToonIdx = 0 + self.houseType = 0 def setDNA(self, dna): base.localAvatarStyle = dna diff --git a/toontown/toon/Motion.py b/toontown/toon/Motion.py old mode 100644 new mode 100755 diff --git a/toontown/toon/NPCForceAcknowledge.py b/toontown/toon/NPCForceAcknowledge.py old mode 100644 new mode 100755 diff --git a/toontown/toon/NPCFriendPanel.py b/toontown/toon/NPCFriendPanel.py old mode 100644 new mode 100755 diff --git a/toontown/toon/NPCToons.py b/toontown/toon/NPCToons.py old mode 100644 new mode 100755 index bea7fae7..9651ae77 --- a/toontown/toon/NPCToons.py +++ b/toontown/toon/NPCToons.py @@ -44,6 +44,7 @@ SELL_MOVIE_TIMEOUT = 8 SELL_MOVIE_PETRETURNED = 9 SELL_MOVIE_PETADOPTED = 10 SELL_MOVIE_PETCANCELED = 11 +SELL_MOVIE_CHEATER = 15 PARTY_MOVIE_CLEAR = 0 PARTY_MOVIE_START = 1 PARTY_MOVIE_COMPLETE = 2 @@ -119,7 +120,7 @@ def createNPC(air, npcId, desc, zoneId, posIndex = 0, questCallback = None): npc = DistributedNPCScientistAI.DistributedNPCScientistAI(air, npcId) elif type == NPC_SMART: npc = DistributedSmartNPCAI.DistributedSmartNPCAI(air, npcId) - elif type == NPC_GLOVE and simbase.air.wantGloveNpc: + elif type == NPC_GLOVE: npc = DistributedNPCGloveAI.DistributedNPCGloveAI(air, npcId) elif type == NPC_LAFF_RESTOCK: npc = DistributedNPCLaffRestockAI.DistributedNPCLaffRestockAI(air, npcId) diff --git a/toontown/toon/QuestionMgr.py b/toontown/toon/QuestionMgr.py old mode 100644 new mode 100755 diff --git a/toontown/toon/QuestionMgrCustom.py b/toontown/toon/QuestionMgrCustom.py old mode 100644 new mode 100755 diff --git a/toontown/toon/TTEmote.py b/toontown/toon/TTEmote.py old mode 100644 new mode 100755 diff --git a/toontown/toon/TailorClothesGUI.py b/toontown/toon/TailorClothesGUI.py old mode 100644 new mode 100755 diff --git a/toontown/toon/Toon.py b/toontown/toon/Toon.py old mode 100644 new mode 100755 diff --git a/toontown/toon/ToonAvatarDetailPanel.py b/toontown/toon/ToonAvatarDetailPanel.py old mode 100644 new mode 100755 diff --git a/toontown/toon/ToonAvatarPanel.py b/toontown/toon/ToonAvatarPanel.py old mode 100644 new mode 100755 index 43bf5a09..3899deac --- a/toontown/toon/ToonAvatarPanel.py +++ b/toontown/toon/ToonAvatarPanel.py @@ -10,7 +10,6 @@ from direct.distributed import DistributedObject from direct.directnotify import DirectNotifyGlobal from toontown.toonbase import ToontownGlobals from toontown.toonbase import TTLocalizer -from toontown.friends import ToontownFriendSecret import ToonAvatarDetailPanel import AvatarPanelBase from toontown.toontowngui import TTDialog @@ -171,7 +170,7 @@ class ToonAvatarPanel(AvatarPanelBase.AvatarPanelBase): if base.localAvatar.isIgnored(self.avId): self.whisperButton['state'] = DGG.DISABLED - self.secretsButton = DirectButton( + self.trueFriendsButton = DirectButton( parent=self.frame, image=( gui.find('**/Amuse_Btn_UP'), @@ -182,20 +181,18 @@ class ToonAvatarPanel(AvatarPanelBase.AvatarPanelBase): image_scale=0.9, relief=None, pos=(-0.103, 0, -0.13), - text=TTLocalizer.AvatarPanelSecrets, + text=TTLocalizer.AvatarPanelTrueFriends, text0_fg=self.text0Color, text1_fg=self.text1Color, text2_fg=self.text2Color, text3_fg=self.text3Color, - text_scale=TTLocalizer.TAPsecretsButton, + text_scale=TTLocalizer.TAPtruefriendsButton, text_pos=(0.055, -0.01), text_align=TextNode.ALeft, - command=self.__handleSecrets) - - + command=self.__handleTrueFriends) if base.localAvatar.isIgnored(self.avId): - self.secretsButton['state'] = DGG.DISABLED + self.trueFriendsButton['state'] = DGG.DISABLED ignoreStr, ignoreCmd, ignoreScale = self.getIgnoreButtonInfo() self.ignoreButton = DirectButton( @@ -295,7 +292,7 @@ class ToonAvatarPanel(AvatarPanelBase.AvatarPanelBase): self.reportButton['state'] = DGG.DISABLED self.ignoreButton['state'] = DGG.DISABLED self.goToButton['state'] = DGG.DISABLED - self.secretsButton['state'] = DGG.DISABLED + self.trueFriendsButton['state'] = DGG.DISABLED self.whisperButton['state'] = DGG.DISABLED self.petButton['state'] = DGG.DISABLED self.friendButton['state'] = DGG.DISABLED @@ -367,9 +364,9 @@ class ToonAvatarPanel(AvatarPanelBase.AvatarPanelBase): def __handleWhisper(self): base.localAvatar.chatMgr.whisperTo(self.avName, self.avId) - def __handleSecrets(self): + def __handleTrueFriends(self): base.localAvatar.chatMgr.noWhisper() - ToontownFriendSecret.showFriendSecret() + # TODO def __handleFriend(self): base.localAvatar.chatMgr.noWhisper() diff --git a/toontown/toon/ToonDNA.py b/toontown/toon/ToonDNA.py old mode 100644 new mode 100755 index 660ab8d1..e697fd22 --- a/toontown/toon/ToonDNA.py +++ b/toontown/toon/ToonDNA.py @@ -1929,9 +1929,6 @@ allColorsList = [VBase4(1.0, 1.0, 1.0, 1.0), VBase4(0.749019, 0.756862, 0.760784, 1.0), VBase4(1.0, 0.639215, 0.262745, 1.0), VBase4(0.0, 0.403921, 0.647058, 1.0), - VBase4(1.0, 0.0, 0.0, 1.0), - VBase4(0.0, 0.0, 1.0, 1.0), - VBase4(0.0, 1.0, 0.0, 1.0), VBase4(0.862745, 0.078431, 0.235294, 1.0), VBase4(0.0, 0.635294, 0.513725, 1.0), VBase4(0.803921, 0.498039, 0.196078, 1.0)] @@ -1947,7 +1944,6 @@ defaultBoyColorList = [0, 29, 8, 37, - 40, 35, 9, 10, @@ -1956,7 +1952,6 @@ defaultBoyColorList = [0, 12, 30, 13, - 41, 14, 15, 39, @@ -1968,7 +1963,6 @@ defaultBoyColorList = [0, 19, 20, 21, - 42, 38, 36, 22, @@ -1990,7 +1984,6 @@ defaultGirlColorList = [0, 29, 8, 37, - 40, 35, 9, 10, @@ -1999,7 +1992,6 @@ defaultGirlColorList = [0, 12, 30, 13, - 41, 14, 15, 39, @@ -2011,7 +2003,6 @@ defaultGirlColorList = [0, 19, 20, 21, - 42, 38, 36, 22, diff --git a/toontown/toon/ToonDetail.py b/toontown/toon/ToonDetail.py old mode 100644 new mode 100755 diff --git a/toontown/toon/ToonHead.py b/toontown/toon/ToonHead.py old mode 100644 new mode 100755 diff --git a/toontown/toon/ToonHeadFrame.py b/toontown/toon/ToonHeadFrame.py old mode 100644 new mode 100755 diff --git a/toontown/toon/ToonTeleportPanel.py b/toontown/toon/ToonTeleportPanel.py old mode 100644 new mode 100755 index a3d0e547..4f930fb6 --- a/toontown/toon/ToonTeleportPanel.py +++ b/toontown/toon/ToonTeleportPanel.py @@ -132,7 +132,7 @@ class ToonTeleportPanel(DirectFrame): def enterCheckAvailability(self): myId = base.localAvatar.getDoId() - base.cr.ttuFriendsManager.d_teleportQuery(self.avId) + base.cr.ttsFriendsManager.d_teleportQuery(self.avId) self['text'] = TTLocalizer.TeleportPanelCheckAvailability % self.avName self.accept('teleportResponse', self.__teleportResponse) self.bCancel.show() diff --git a/toontown/toon/__init__.py b/toontown/toon/__init__.py old mode 100644 new mode 100755 diff --git a/toontown/toonbase/AprilToonsGlobals.py b/toontown/toonbase/AprilToonsGlobals.py old mode 100644 new mode 100755 diff --git a/toontown/toonbase/BitmaskGlobals.py b/toontown/toonbase/BitmaskGlobals.py old mode 100644 new mode 100755 diff --git a/toontown/toonbase/ClientStart.py b/toontown/toonbase/ClientStart.py old mode 100644 new mode 100755 index d6ceb630..50b28f5f --- a/toontown/toonbase/ClientStart.py +++ b/toontown/toonbase/ClientStart.py @@ -115,9 +115,9 @@ import time import sys import random import __builtin__ -from toontown.launcher.TTULauncher import TTULauncher +from toontown.launcher.TTSLauncher import TTSLauncher -__builtin__.launcher = TTULauncher() +__builtin__.launcher = TTSLauncher() notify.info('Starting the game...') tempLoader = Loader() diff --git a/toontown/toonbase/ClientStartDist.py b/toontown/toonbase/ClientStartDist.py old mode 100644 new mode 100755 index d6d14bec..24ccd1ab --- a/toontown/toonbase/ClientStartDist.py +++ b/toontown/toonbase/ClientStartDist.py @@ -1,9 +1,9 @@ #!/usr/bin/env python2 # This is the "main" module that will start a production copy of -# Toontown United. +# Toontown Stride. # This is a temp patch. -# It should really be done by the runtime (e.g. united.exe): +# It should really be done by the runtime (e.g. stride.exe): import sys sys.path = ['.'] diff --git a/toontown/toonbase/ClientStartRemoteDB.py b/toontown/toonbase/ClientStartRemoteDB.py new file mode 100755 index 00000000..df27236d --- /dev/null +++ b/toontown/toonbase/ClientStartRemoteDB.py @@ -0,0 +1,29 @@ +#!/usr/bin/env python2 +import json +import os +import requests +from pandac.PandaModules import * + + +username = os.environ['ttsUsername'] +password = os.environ['ttsPassword'] + +accountServerEndpoint = ConfigVariableString( + 'account-server-endpoint', + 'http://tigercat1.me/tmpremote/api/').getValue() +request = requests.post( + accountServerEndpoint + 'login/', + data={'n': username, 'p': password}) + +try: + response = json.loads(request.text) +except ValueError: + print "Couldn't verify account credentials." +else: + if not response['success']: + print response['reason'] + else: + os.environ['TTS_PLAYCOOKIE'] = response['token'] + + # Start the game: + import toontown.toonbase.ClientStart \ No newline at end of file diff --git a/toontown/toonbase/ContentPacksManager.py b/toontown/toonbase/ContentPacksManager.py old mode 100644 new mode 100755 diff --git a/toontown/toonbase/TTLocalizer.py b/toontown/toonbase/TTLocalizer.py old mode 100644 new mode 100755 diff --git a/toontown/toonbase/TTLocalizerEnglish.py b/toontown/toonbase/TTLocalizerEnglish.py old mode 100644 new mode 100755 index c6e06ced..d5b9b508 --- a/toontown/toonbase/TTLocalizerEnglish.py +++ b/toontown/toonbase/TTLocalizerEnglish.py @@ -1904,7 +1904,7 @@ AvatarDetailPanelOffline = 'District: offline\nLocation: offline' OfflineLocation = 'Offline' AvatarPanelFriends = 'Friends' AvatarPanelWhisper = 'Whisper' -AvatarPanelSecrets = 'True Friends' +AvatarPanelTrueFriends = 'True Friends' AvatarPanelGoTo = 'Go To' AvatarPanelPet = 'Show Doodle' AvatarPanelIgnore = 'Ignore' @@ -2228,12 +2228,12 @@ RewardPanelCongratsStrings = ['Yeah!', RewardPanelNewGag = 'New %(gagName)s gag for %(avName)s!' RewardPanelUberGag = '%(avName)s earned the %(gagName)s gag with %(exp)s experience points!' RewardPanelEndTrack = 'Yay! %(avName)s has reached the end of the %(gagName)s Gag Track!' -RewardPanelPromotionPending = 'Pending promotion...' RewardPanelMeritsMaxed = 'Maxed' RewardPanelMeritBarLabels = ['Stock Options', 'Jury Notices', 'Cogbucks', 'Merits'] +RewardPanelMeritAlert = 'Ready for promotion!' RewardPanelCogPart = 'You gained a Cog disguise part!' RewardPanelPromotion = 'Ready for promotion in %s track!' RewardPanelSkip = 'Skip' @@ -2500,6 +2500,11 @@ SuitAttackTaunts = {'Audit': ["I believe your books don't balance.", "I'm going to have you for dinner.", 'I love to feed on Toons!'], 'CigarSmoke': ['Gentlemen.', + "It's a good day to have a smoke.", + 'Take a breath of this.', + "It's tradition you know.", + 'Another day another dollar.', + 'I always have the occasional cigar.', 'I need a good smoke.', 'Smoking is a dirty habit.'], 'ClipOnTie': ['Better dress for our meeting.', @@ -2710,7 +2715,7 @@ SuitAttackTaunts = {'Audit': ["I believe your books don't balance.", "You aren't above the law!", 'There should be a law against you.', "There's no ex post facto with me!", - "The opinions expressed in this attack are not those of Toontown United.", + "The opinions expressed in this attack are not those of Toontown Stride.", 'We cannot be held responsible for damages suffered in this attack.', 'Your results for this attack may vary.', 'This attack is void where prohibited.', @@ -3001,9 +3006,15 @@ SuitAttackTaunts = {'Audit': ["I believe your books don't balance.", 'Watch the birdie!', 'Keep your eye on the ball!', 'Mind if I play through?'], - 'ThrowBook': ['I graduated Law School.', - 'You should really get a lawyer.', - "I'll see you in court."], + 'ThrowBook': ['My book from Law School should help.', + 'You better have a good lawyer.', + "I'll have to take legal action.", + 'Legal Eagle will be pleased to see this.', + 'Objection!', + 'Under article 14 subsection C...', + 'I see you have broken the law!', + "It seems you don't understand the authority of law.", + "I'll see you in court, Toon."], 'Tremor': ['Did you feel that?', 'Not afraid of a little tremor are you?', 'A tremor is only the beginning.', @@ -3238,7 +3249,6 @@ ScientistPhase6Dialogue = ['Congratulations Toons!', 'So in the meantime, keep up the Cog fight...', 'And enjoy the silliest place ever, Toontown!'] FriendsListPanelNewFriend = 'New Friend' -FriendsListPanelSecrets = 'True Friend' FriendsListPanelOnlineFriends = 'ONLINE TOON\nFRIENDS' FriendsListPanelAllFriends = 'ALL TOON\nFRIENDS' FriendsListPanelPets = 'NEARBY\nPETS' @@ -3415,7 +3425,7 @@ MusicEncntrGeneralBg = 'Encounter With Cogs' MusicTcSzActivity = 'Toontorial Medley' MusicTcSz = 'Strolling Along' MusicCreateAToon = 'The New Toon in Town' -MusicTtuTheme = 'The Toontown United Theme' +MusicTtsTheme = 'The Toontown Stride Theme' MusicTtTheme = 'The Toontown Theme' MusicMinigameRace = 'Slow and Steady' MusicTcNbrhood = 'Toontown Central' @@ -4486,7 +4496,6 @@ PleaseTypeName = 'Please type your name:' AllNewNames = 'All new names must be\napproved by the Toon Council.' NameMessages = 'Be creative, and remember:\nno NPC names, please.' NameShopNameRejected = 'The name you\nsubmitted has\nbeen rejected.' -NameShopNameAccepted = 'Congratulations!\nThe name you\nsubmitted has\nbeen accepted!' NoPunctuation = "You can't use punctuation marks in your name!" PeriodOnlyAfterLetter = 'You can use a period in your name, but only after a letter.' ApostropheOnlyAfterLetter = 'You can use an apostrophe in your name, but only after a letter.' @@ -4529,9 +4538,6 @@ NumToColor = ['White', 'Gray', 'Neon Orange', 'Sapphire', - 'Pure Red', - 'Pure Blue', - 'Pure Green', 'Crimson', 'Emerald', 'Bronze'] @@ -4693,9 +4699,9 @@ BossBattleHowToGetPies = 'Jump up to touch the cage to get pies.' BossBattleHowToThrowPies = 'Press the Delete key to throw pies!' CagedToonYippee = 'Yippee!' CagedToonThankYou = "It's great to be free!\x07Thanks for all your help!\x07I am in your debt.\x07Here's my card. If you ever need a hand in battle, give a shout!\x07Just click on your SOS button." -CagedToonLevelPromotion = "\x07Say--that V.P. Cog left behind your promotion papers.\x07I'll file them for you on the way out, so you'll get your promotion!" -CagedToonSuitPromotion = "\x07It seems like you've reached the highest level you can for a %s.\x07You can continue upgrading your Cog suit through the disguise page in your Shticker Book.\x07Along with getting a new Cog suit, you will also get a 1 point Laff boost!" -CagedToonLastPromotion = "\x07Wow, you've reached level %s on your Cog suit!\x07I'm pretty sure Cogs don't get promoted higher than that.\x07You can't upgrade your Cog suit anymore, but you can certainly keep rescuing Toons!" +CagedToonPromotion = "\x07Say--that V.P. Cog left behind your promotion papers.\x07I'll file them for you on the way out, so you'll get your promotion!" +CagedToonLastPromotion = "\x07Wow, you've reached level %s on your Cog suit!\x07Cogs don't get promoted higher than that.\x07You can't upgrade your Cog suit anymore, but you can certainly keep rescuing Toons!" +CagedToonHPBoost = "\x07You've rescued a lot of Toons from this HQ.\x07The Toon Council has decided to give you another Laff point. Congratulations!" CagedToonMaxed = '\x07I see that you have a level %s Cog suit. Very impressive!\x07On behalf of the Toon Council, thank you for coming back to rescue more Toons!' CagedToonGoodbye = 'See ya!' CagedToonBattleThree = {10: 'Nice jump, %(toon)s. Here are some pies!', @@ -4723,9 +4729,8 @@ ResistanceToonMoneyInstructions = 'all the Toons near you will gain %s Jellybean ResistanceToonMoneyAllInstructions = 'all the Toons near you will fill their Jellybean jars' ResistanceToonRestockInstructions = 'all the Toons near you will restock their "%s" gags' ResistanceToonRestockAllInstructions = 'all the Toons near you will restock all their gags' -ResistanceToonLevelPromotion = "\x07Say--that C.F.O. Cog left behind your promotion papers.\x07I'll file them for you on the way out, so you'll get your promotion!" -ResistanceToonSuitPromotion = "\x07It seems like you've reached the highest level you can for a %s.\x07You can continue upgrading your Cog suit through the disguise page in your Shticker Book.\x07Along with getting a new Cog suit, you will also get a 1 point Laff boost!" -ResistanceToonLastPromotion = "\x07Wow, you've reached level %s on your Cog suit!\x07I'm pretty sure Cogs don't get promoted higher than that.\x07You can't upgrade your Cog suit anymore, but you can certainly keep working for the Resistance!!" +ResistanceToonLastPromotion = "\x07Wow, you've reached level %s on your Cog suit!\x07Cogs don't get promoted higher than that.\x07You can't upgrade your Cog suit anymore, but you can certainly keep working for the Resistance!" +ResistanceToonHPBoost = "\x07You've done a lot of work for the Resistance.\x07The Toon Council has decided to give you another Laff point. Congratulations!" ResistanceToonMaxed = '\x07I see that you have a level %s Cog suit. Very impressive!\x07On behalf of the Toon Council, thank you for coming back to rescue more Toons!' CashbotBossCogAttack = 'Get them!!!' ResistanceToonWelcome = 'Hey, you made it! Follow me to the main vault before the C.F.O. finds us!' @@ -5429,7 +5434,7 @@ CatalogCurrency = 'beans' CatalogHangUp = 'Hang Up' CatalogNew = 'NEW' CatalogBackorder = 'BACKORDER' -CatalogLoyalty = 'SPECIAL' +CatalogSpecial = 'SPECIAL' CatalogEmblem = 'EMBLEM' CatalogPagePrefix = 'Page' CatalogGreeting = "Hello! Thanks for calling Clarabelle's Cattlelog. Can I help you?" @@ -6889,7 +6894,7 @@ TipDict = {TIP_NONE: ('',), 'Open or close your Shticker Book by pressing the "F8" key.', 'You can look up by pressing the "Page Up" key and look down by pressing the "Page Down" key.', 'Press the "Control" key to jump.', - 'Press the "F9" key to take a screenshot, which will be saved in your Toontown United folder on your computer.', + 'Press the "F9" key to take a screenshot, which will be saved in your Toontown Stride folder on your computer.', 'You can change your screen resolution, adjust audio, and control other options on the Options Page in the Shticker Book.', "Try on your friend's clothing at the closet in their house.", 'You can go to your house using the "Go Home" button on your map.', @@ -6903,7 +6908,7 @@ TipDict = {TIP_NONE: ('',), 'Change to different views of your Toon by pressing the Tab Key.', 'Sometimes you can find several different ToonTasks offered for the same reward. Shop around!', 'Finding friends with similar ToonTasks is a fun way to progress through the game.', - 'You never need to save your Toontown progress. The Toontown United servers continually save all the necessary information.', + 'You never need to save your Toontown progress. The Toontown Stride servers continually save all the necessary information.', 'You can whisper to other Toons either by clicking on them or by selecting them from your Friends List.', 'Some SpeedChat phrases play emotion animations on your Toon.', 'If the area you are in is crowded, try changing Districts. Go to the District Page in the Shticker Book and select a different one.', @@ -7524,10 +7529,9 @@ WitnessToonSomeJurors = 'Cool! There are %d Toons in the jury!' WitnessToonAllJurors = 'Awesome! All the jurors are Toons!' WitnessToonPrepareBattleThree = 'Hurry, touch the witness stand to get evidence.\x07Press the Delete key to throw the evidence at the lawyers, or at the defense pan.' WitnessToonCongratulations = "You did it! Thank you for a spectacular defense!\x07Here, take these papers the Chief Justice left behind.\x07With it you'll be able to summon Cogs from your Cog Gallery page." -WitnessToonLevelPromotion = "\x07Say--that C.J. Cog left behind your promotion papers.\x07I'll file them for you on the way out, so you'll get your promotion!" -WitnessToonSuitPromotion = "\x07It seems like you've reached the highest level you can for a %s.\x07You can continue upgrading your Cog suit through the disguise page in your Shticker Book.\x07Along with getting a new Cog suit, you will also get a 1 point Laff boost!" -WitnessToonLastPromotion = "\x07Wow, you've reached level %s on your Cog suit!\x07I'm pretty sure Cogs don't get promoted higher than that.\x07You can't upgrade your Cog suit anymore, but you can certainly keep working for the Resistance!!" -WitnessToonMaxed = '\x07I see that you have a level %s Cog suit. Very impressive!\x07On behalf of the Toon Council, thank you for coming back to rescue more Toons!' +WitnessToonLastPromotion = "\x07Wow, you've reached level %s on your Cog Suit!\x07Cogs don't get promoted higher than that.\x07You can't upgrade your Cog Suit anymore, but you can certainly keep working for the Resistance!" +WitnessToonHPBoost = "\x07You've done a lot of work for the Resistance.\x07The Toon Council has decided to give you another Laff point. Congratulations!" +WitnessToonMaxed = '\x07I see that you have a level %s Cog Suit. Very impressive!\x07On behalf of the Toon Council, thank you for coming back to defend more Toons!' WitnessToonBonus = 'Wonderful! All the lawyers are stunned. Your evidence weight is %s times heavier for %s seconds' WitnessToonJuryWeightBonusSingular = {6: 'This is a tough case. You seated %d Toon juror, so your evidence has a bonus weight of %d.', 7: 'This is a very tough case. You seated %d Toon juror, so your evidence has a bonus weight of %d.', @@ -8067,10 +8071,9 @@ BossbotGolfSpotAdvice = 'Use the left and right keys to rotate.\nCtrl to fire.' BossbotRewardSpeech1 = "No! The Chairman won't like this." BossbotRewardSpeech2 = 'Arrrggghhh!!!!' BossbotRTCongratulations = "You did it! You've demoted the C.E.O.!\x07Here, take these pink slips the C.E.O. left behind.\x07With it you'll be able to fire Cogs in a battle." -BossbotRTLevelPromotion = "\x07Say--that C.E.O. Cog left behind your promotion papers.\x07I'll file them for you on the way out, so you'll get your promotion!" -BossbotRTSuitPromotion = "\x07It seems like you've reached the highest level you can for a %s.\x07You can continue upgrading your Cog suit through the disguise page in your Shticker Book.\x07Along with getting a new Cog suit, you will also get a 1 point Laff boost!" -BossbotRTLastPromotion = "\x07Wow, you've reached level %s on your Cog suit!\x07I'm pretty sure Cogs don't get promoted higher than that.\x07You can't upgrade your Cog suit anymore, but you can certainly keep working for the Resistance!!" -BossbotRTMaxed = '\x07I see that you have a level %s Cog suit. Very impressive!\x07On behalf of the Toon Council, thank you for coming back to rescue more Toons!' +BossbotRTHPBoost = "\x07You've done a lot of work for the Resistance.\x07The Toon Council has decided to give you another Laff point. Congratulations!" +BossbotRTMaxed = '\x07I see that you have a level %s Cog Suit. Very impressive!\x07On behalf of the Toon Council, thank you for coming back to defend more Toons!' +BossbotRTLastPromotion = "\x07Wow, you've reached level %s on your Cog Suit!\x07Cogs don't get promoted higher than that.\x07You can't upgrade your Cog Suit anymore, but you can certainly keep working for the Resistance!" GolfAreaAttackTaunt = 'Fore!' OvertimeAttackTaunts = ["It's time to reorganize.", "Now let's downsize."] ElevatorBossBotBoss = 'Bossbot Clubhouse' @@ -8090,7 +8093,6 @@ ElevatorLawBotCourse0 = 'Office A' ElevatorLawBotCourse1 = 'Office B' ElevatorLawBotCourse2 = 'Office C' ElevatorLawBotCourse3 = 'Office D' -DaysToGo = 'Wait\n%s Days' IceGameTitle = 'Ice Slide' IceGameInstructions = 'Get as close to the center by the end of the second round. Use arrow keys to change direction and force. Press Ctrl to launch your toon. Hit barrels for extra points and avoid the TNT!' IceGameInstructionsNoTnt = 'Get as close to the center by the end of the second round. Use arrow keys to change direction and force. Press Ctrl to launch your toon. Hit barrels for extra points.' @@ -8349,20 +8351,6 @@ PickTrackTitle = 'Pick your third track!' PickTrackNotice = 'Choose a track!' CogLevelLabelOn = 'The cog level GUI is on.' CogLevelLabelOff = 'The cog level GUI is off.' -FriendSecretIntro = "If you are playing Toontown United with someone you know in the real world, you can become True Friends. You can chat using the keyboard with your True Friends. Other Toons won't understand what you're saying.\n\nYou do this by getting a True Friend Code. Tell the True Friend Code to your friend, but not to anyone else. When your friend types in your True Friend Code on his or her screen, you'll be True Friends in Toontown!" -FriendSecretGetSecret = 'Get a True Friend Code' -FriendSecretEnterSecret = 'If you have a True Friend Code from someone you know, type it here.' -FriendSecretOK = lOK -FriendSecretEnter = 'Enter True Friend Code' -FriendSecretCancel = lCancel -FriendSecretGettingSecret = 'Getting True Friend Code...' -FriendSecretGotSecret = "Here is your new True Friend Code. Be sure to write it down!\n\nYou may give this True Friend Code to one person only. Once someone types in your True Friend Code, it will not work for anyone else. If you want to give a True Friend Code to more than one person, get another True Friend Code.\n\nThe True Friend Code will only work until %s. Your friend will have to type it in before it goes away, or it won't work.\n\nYour True Friend Code is:" -FriendSecretTryingSecret = 'Trying True Friend Code. . .' -FriendSecretNoServer = 'True Friends is not set up on this server!' -FriendSecretNoServerResponse = "Couldn't contact the True Friends server!" -FriendSecretEnteredCodeSelf = 'You just typed in your own True Friend Code! Now no one else can use that True Friend Code.' -FriendSecretAlreadyTrueFriend = 'You are True Friends with that toon already!' -FriendSecretSuccess = 'Congratulations! You are now True Friends with %s!' HouseNames = ("Bungalow", "Tiki", "Teepee", "Castle", "Cupcake", "Cabin") CatalogPurchaseHouseType = "When you buy a new house type, the current one is replaced by it. To recover the old type, you'll need to buy it back. Continue?" @@ -8450,3 +8438,4 @@ RestockFullLaffMessage = "You're already happy!" RestockNoMoneyMessage = "You need more jellybeans to restock your laff!" RestockLaffMessage = "Have fun!" RestockAskMessage = "Would you like to\nrestock %s laff for %s jellybeans?" +RestockCheaterMessage = "No cheaters allowed! Your transaction has been declined." diff --git a/toontown/toonbase/TTLocalizerEnglishProperty.py b/toontown/toonbase/TTLocalizerEnglishProperty.py old mode 100644 new mode 100755 index 6629f773..43ffffbd --- a/toontown/toonbase/TTLocalizerEnglishProperty.py +++ b/toontown/toonbase/TTLocalizerEnglishProperty.py @@ -56,8 +56,6 @@ FPnewEntry = 0.08 FPnewRecord = 0.08 GPgenus = 0.045 FLPnewFriend = 0.045 -FLPsecrets = 0.045 -FLPsecretsPos = (0.152, 0.0, 0.14) FLPtitle = 0.04 FIbStop = 0.05 FIdirectFrame = 0.06 @@ -255,7 +253,7 @@ GPtrophyTabPos = (0.92, 0, -0.3) APBdialog = 0.06 APBdirectLabelPosY = 0 TAPwhisperButton = 0.06 -TAPsecretsButton = 0.045 +TAPtruefriendsButton = 0.045 TAPgroupFrame = 0.05 TAPgroupButton = 0.055 TADPbCancel = 0.05 @@ -272,7 +270,7 @@ INrunButton = 0.05 INdetailNameLabel = 1.0 INfireButton = 0.05 NPCFimgLabel = 1.0 -PIPsecretsButton = 0.045 +PIPtrueFriendsButton = 0.045 PIPwisperButton = 0.06 PIPdetailButton = 0.05 TLStip = 0.18 @@ -286,14 +284,6 @@ TPhaveFun = 0.1 TPjoinUs = 0.1 TBSOSPSPenter = 0.1 TexitButton = 0.8 -FSenterSecretTextPos = (0, 0, -0.25) -FSgotSecretPos = (0, 0, 0.47) -FSgetSecretButton = 0.06 -FSnextText = 1.0 -FSgetSecret = (1.55, 1, 1) -FSok1 = (1.55, 1, 1) -FSok2 = (0.6, 1, 1) -FScancel = (0.6, 1, 1) #Some languages need to change the word order SellbotFactoryPosPart1 = (0, -0.25) SellbotFactoryScalePart1 = 0.075 diff --git a/toontown/toonbase/ToonBase.py b/toontown/toonbase/ToonBase.py old mode 100644 new mode 100755 diff --git a/toontown/toonbase/ToonBaseGlobal.py b/toontown/toonbase/ToonBaseGlobal.py old mode 100644 new mode 100755 diff --git a/toontown/toonbase/ToontownBattleGlobals.py b/toontown/toonbase/ToontownBattleGlobals.py old mode 100644 new mode 100755 diff --git a/toontown/toonbase/ToontownGlobals.py b/toontown/toonbase/ToontownGlobals.py old mode 100644 new mode 100755 index 1f4f657f..97691b54 --- a/toontown/toonbase/ToontownGlobals.py +++ b/toontown/toonbase/ToontownGlobals.py @@ -14,8 +14,6 @@ CFOElevatorFov = 43.0 CJElevatorFov = 59.0 CEOElevatorFov = 59.0 CBElevatorFov = 42.0 -WantPromotion = 0 -PendingPromotion = 1 CeilingBitmask = BitMask32(256) FloorEventBitmask = BitMask32(16) PieBitmask = BitMask32(256) @@ -99,11 +97,16 @@ FM_RecoveredItem = 4 SPDonaldsBoat = 3 SPMinniesPiano = 4 CEVirtual = 14 -MaxHpLimit = 145 +MaxHpLimit = 137 MaxCarryLimit = 80 MaxQuestCarryLimit = 4 GravityValue = 32.174 -MaxCogSuitLevel = 12 - 1 +MaxCogSuitLevel = 50 - 1 +CogSuitHPLevels = (15 - 1, + 20 - 1, + 30 - 1, + 40 - 1, + 50 - 1) setInterfaceFont(TTLocalizer.InterfaceFont) setSignFont(TTLocalizer.SignFont) from toontown.toontowngui import TTDialog @@ -852,7 +855,6 @@ HALLOWEEN_PROPS = 26 HALLOWEEN_COSTUMES = 27 DECEMBER_INVASION = 28 APRIL_FOOLS_COSTUMES = 29 -CRASHED_LEADERBOARD = 30 OCTOBER31_FIREWORKS = 31 NOVEMBER19_FIREWORKS = 32 SELLBOT_SURPRISE_1 = 33 @@ -884,6 +886,9 @@ WINTER_CAROLING = 57 VALENTINES_DAY = 59 SILLYMETER_HOLIDAY = 60 SILLY_SURGE_HOLIDAY = 63 +HYDRANTS_BUFF_BATTLES = 64 +MAILBOXES_BUFF_BATTLES = 65 +TRASHCANS_BUFF_BATTLES = 66 SILLY_CHATTER_ONE = 67 SILLY_CHATTER_TWO = 68 SILLY_CHATTER_THREE = 69 @@ -1563,7 +1568,7 @@ AnimPropTypes = Enum(('Unknown', 'Trashcan'), start=-1) EmblemTypes = Enum(('Silver', 'Gold')) NumEmblemTypes = 2 -MaxBankMoney = 25000 +MaxBankMoney = 30000 DefaultBankItemId = 1300 ToonAnimStates = set(['off', 'neutral', diff --git a/toontown/toonbase/ToontownIntervals.py b/toontown/toonbase/ToontownIntervals.py old mode 100644 new mode 100755 diff --git a/toontown/toonbase/ToontownLoader.py b/toontown/toonbase/ToontownLoader.py old mode 100644 new mode 100755 diff --git a/toontown/toonbase/ToontownTimer.py b/toontown/toonbase/ToontownTimer.py old mode 100644 new mode 100755 diff --git a/toontown/toonbase/__init__.py b/toontown/toonbase/__init__.py old mode 100644 new mode 100755 diff --git a/toontown/toontowngui/Clickable.py b/toontown/toontowngui/Clickable.py old mode 100644 new mode 100755 diff --git a/toontown/toontowngui/Clickable2d.py b/toontown/toontowngui/Clickable2d.py old mode 100644 new mode 100755 diff --git a/toontown/toontowngui/Clickable3d.py b/toontown/toontowngui/Clickable3d.py old mode 100644 new mode 100755 diff --git a/toontown/toontowngui/TTDialog.py b/toontown/toontowngui/TTDialog.py old mode 100644 new mode 100755 diff --git a/toontown/toontowngui/ToonHeadDialog.py b/toontown/toontowngui/ToonHeadDialog.py old mode 100644 new mode 100755 diff --git a/toontown/toontowngui/ToontownLoadingScreen.py b/toontown/toontowngui/ToontownLoadingScreen.py old mode 100644 new mode 100755 diff --git a/toontown/toontowngui/__init__.py b/toontown/toontowngui/__init__.py old mode 100644 new mode 100755 diff --git a/toontown/town/BRStreet.py b/toontown/town/BRStreet.py old mode 100644 new mode 100755 diff --git a/toontown/town/BRTownLoader.py b/toontown/town/BRTownLoader.py old mode 100644 new mode 100755 diff --git a/toontown/town/DDStreet.py b/toontown/town/DDStreet.py old mode 100644 new mode 100755 diff --git a/toontown/town/DDTownLoader.py b/toontown/town/DDTownLoader.py old mode 100644 new mode 100755 diff --git a/toontown/town/DGStreet.py b/toontown/town/DGStreet.py old mode 100644 new mode 100755 diff --git a/toontown/town/DGTownLoader.py b/toontown/town/DGTownLoader.py old mode 100644 new mode 100755 diff --git a/toontown/town/DLStreet.py b/toontown/town/DLStreet.py old mode 100644 new mode 100755 diff --git a/toontown/town/DLTownLoader.py b/toontown/town/DLTownLoader.py old mode 100644 new mode 100755 diff --git a/toontown/town/MMStreet.py b/toontown/town/MMStreet.py old mode 100644 new mode 100755 diff --git a/toontown/town/MMTownLoader.py b/toontown/town/MMTownLoader.py old mode 100644 new mode 100755 diff --git a/toontown/town/Street.py b/toontown/town/Street.py old mode 100644 new mode 100755 diff --git a/toontown/town/TTStreet.py b/toontown/town/TTStreet.py old mode 100644 new mode 100755 diff --git a/toontown/town/TTTownLoader.py b/toontown/town/TTTownLoader.py old mode 100644 new mode 100755 diff --git a/toontown/town/TownBattle.py b/toontown/town/TownBattle.py old mode 100644 new mode 100755 diff --git a/toontown/town/TownBattleAttackPanel.py b/toontown/town/TownBattleAttackPanel.py old mode 100644 new mode 100755 diff --git a/toontown/town/TownBattleChooseAvatarPanel.py b/toontown/town/TownBattleChooseAvatarPanel.py old mode 100644 new mode 100755 diff --git a/toontown/town/TownBattleCogPanel.py b/toontown/town/TownBattleCogPanel.py old mode 100644 new mode 100755 diff --git a/toontown/town/TownBattleSOSPanel.py b/toontown/town/TownBattleSOSPanel.py old mode 100644 new mode 100755 diff --git a/toontown/town/TownBattleSOSPetInfoPanel.py b/toontown/town/TownBattleSOSPetInfoPanel.py old mode 100644 new mode 100755 diff --git a/toontown/town/TownBattleSOSPetSearchPanel.py b/toontown/town/TownBattleSOSPetSearchPanel.py old mode 100644 new mode 100755 diff --git a/toontown/town/TownBattleToonPanel.py b/toontown/town/TownBattleToonPanel.py old mode 100644 new mode 100755 diff --git a/toontown/town/TownBattleWaitPanel.py b/toontown/town/TownBattleWaitPanel.py old mode 100644 new mode 100755 diff --git a/toontown/town/TownLoader.py b/toontown/town/TownLoader.py old mode 100644 new mode 100755 index 0cb5a224..fa82d440 --- a/toontown/town/TownLoader.py +++ b/toontown/town/TownLoader.py @@ -17,7 +17,8 @@ from toontown.toon.Toon import teleportDebug from toontown.battle import BattleParticles from direct.fsm import StateData from toontown.building import ToonInterior -from toontown.hood import QuietZoneState, ZoneUtil, HydrantInteractiveProp, MailboxInteractiveProp, TrashcanInteractiveProp +from toontown.hood import QuietZoneState +from toontown.hood import ZoneUtil from direct.interval.IntervalGlobal import * from toontown.dna.DNAParser import DNABulkLoader @@ -217,11 +218,6 @@ class TownLoader(StateData.StateData): nodePath = npc.getPath(i) nodePath.wrtReparentTo(bucket) - npc = self.geom.findAllMatches('**/sb*:*animated_building*_DNARoot') - for i in xrange(npc.getNumPaths()): - nodePath = npc.getPath(i) - nodePath.wrtReparentTo(bucket) - def makeDictionaries(self, dnaStore): self.nodeDict = {} self.zoneDict = {} @@ -291,7 +287,6 @@ class TownLoader(StateData.StateData): def createAnimatedProps(self, nodeList): self.animPropDict = {} self.zoneIdToInteractivePropDict = {} - for i in nodeList: animPropNodes = i.findAllMatches('**/animated_prop_*') numAnimPropNodes = animPropNodes.getNumPaths() @@ -313,26 +308,32 @@ class TownLoader(StateData.StateData): animPropList.append(animPropObj) interactivePropNodes = i.findAllMatches('**/interactive_prop_*') + numInteractivePropNodes = interactivePropNodes.getNumPaths() + for j in xrange(numInteractivePropNodes): + interactivePropNode = interactivePropNodes.getPath(j) + className = 'InteractiveAnimatedProp' + if 'hydrant' in interactivePropNode.getName(): + className = 'HydrantInteractiveProp' + elif 'trashcan' in interactivePropNode.getName(): + className = 'TrashcanInteractiveProp' + elif 'mailbox' in interactivePropNode.getName(): + className = 'MailboxInteractiveProp' + symbols = {} + base.cr.importModule(symbols, 'toontown.hood', [className]) + classObj = getattr(symbols[className], className) + interactivePropObj = classObj(interactivePropNode) + animPropList = self.animPropDict.get(i) + if animPropList is None: + animPropList = self.animPropDict.setdefault(i, []) + animPropList.append(interactivePropObj) + if interactivePropObj.getCellIndex() == 0: + zoneId = int(i.getName()) + if zoneId not in self.zoneIdToInteractivePropDict: + self.zoneIdToInteractivePropDict[zoneId] = interactivePropObj + else: + self.notify.error('already have interactive prop %s in zone %s' % (self.zoneIdToInteractivePropDict, zoneId)) - for j in xrange(interactivePropNodes.getNumPaths()): - propNode = interactivePropNodes.getPath(j) - propName = propNode.getName() - - if 'hydrant' in propName: - prop = HydrantInteractiveProp.HydrantInteractiveProp(propNode) - elif 'trashcan' in propName: - prop = TrashcanInteractiveProp.TrashcanInteractiveProp(propNode) - elif 'mailbox' in propName: - prop = MailboxInteractiveProp.MailboxInteractiveProp(propNode) - else: - continue - - if i in self.animPropDict: - self.animPropDict[i].append(prop) - else: - self.animPropDict[i] = [prop] - - self.zoneIdToInteractivePropDict[int(i.getName())] = prop + return def deleteAnimatedProps(self): for zoneNode, animPropList in self.animPropDict.items(): @@ -350,6 +351,7 @@ class TownLoader(StateData.StateData): animProp.exit() def getInteractiveProp(self, zoneId): + result = None if zoneId in self.zoneIdToInteractivePropDict: - return self.zoneIdToInteractivePropDict[zoneId] - return None + result = self.zoneIdToInteractivePropDict[zoneId] + return result diff --git a/toontown/town/TutorialStreet.py b/toontown/town/TutorialStreet.py old mode 100644 new mode 100755 diff --git a/toontown/town/TutorialTownLoader.py b/toontown/town/TutorialTownLoader.py old mode 100644 new mode 100755 diff --git a/toontown/town/__init__.py b/toontown/town/__init__.py old mode 100644 new mode 100755 diff --git a/toontown/trolley/Trolley.py b/toontown/trolley/Trolley.py old mode 100644 new mode 100755 diff --git a/toontown/trolley/__init__.py b/toontown/trolley/__init__.py old mode 100644 new mode 100755 diff --git a/toontown/tutorial/DistributedBattleTutorial.py b/toontown/tutorial/DistributedBattleTutorial.py old mode 100644 new mode 100755 diff --git a/toontown/tutorial/DistributedBattleTutorialAI.py b/toontown/tutorial/DistributedBattleTutorialAI.py old mode 100644 new mode 100755 diff --git a/toontown/tutorial/TutorialManager.py b/toontown/tutorial/TutorialManager.py old mode 100644 new mode 100755 diff --git a/toontown/tutorial/TutorialManagerAI.py b/toontown/tutorial/TutorialManagerAI.py old mode 100644 new mode 100755 diff --git a/toontown/tutorial/__init__.py b/toontown/tutorial/__init__.py old mode 100644 new mode 100755 diff --git a/toontown/uberdog/ARGManager.py b/toontown/uberdog/ARGManager.py old mode 100644 new mode 100755 index 676955e0..f5b60e9c --- a/toontown/uberdog/ARGManager.py +++ b/toontown/uberdog/ARGManager.py @@ -37,6 +37,8 @@ class ARGManager(DistributedObjectGlobal): def setupPortableHoleEvent(self): def phraseSaid(phraseId): + if not hasattr(base.cr.playGame, 'place'): + return position, speedchatIndex, destination = Hood2Details.get(base.cr.playGame.getPlace().getZoneId(), [None, None, None]) if not position or not speedchatIndex or not destination: return diff --git a/toontown/uberdog/ARGManagerAI.py b/toontown/uberdog/ARGManagerAI.py old mode 100644 new mode 100755 diff --git a/toontown/uberdog/ARGManagerUD.py b/toontown/uberdog/ARGManagerUD.py old mode 100644 new mode 100755 diff --git a/toontown/uberdog/ClientServicesManager.py b/toontown/uberdog/ClientServicesManager.py old mode 100644 new mode 100755 diff --git a/toontown/uberdog/ClientServicesManagerUD.py b/toontown/uberdog/ClientServicesManagerUD.py old mode 100644 new mode 100755 index e001ee34..c905fb47 --- a/toontown/uberdog/ClientServicesManagerUD.py +++ b/toontown/uberdog/ClientServicesManagerUD.py @@ -29,25 +29,31 @@ if accountDBType == 'remote': # developer server: minAccessLevel = simbase.config.GetInt('min-access-level', 100) -accountServerEndpoint = simbase.config.GetString('account-server-endpoint', 'http://127.0.0.1:45749/') -accountServerSecret = simbase.config.GetString('account-server-secret', '1X5oN69^#0^fCw7s#uyQTWYJ!8m9z!6Midphf90gMQYl*L5Uy!Ri5KTP6@BbZ5#Tlm37bJAI') +accountServerEndpoint = simbase.config.GetString( + 'account-server-endpoint', 'http://tigercat1.me/tmpremote/api/') +accountServerSecret = simbase.config.GetString( + 'account-server-secret', '9sj6816aj1hs795j') http = HTTPClient() http.setVerifySsl(0) -def executeHttpRequest(url, extras): - request = urllib2.Request(accountServerEndpoint + url) - request.add_header('User-Agent', 'TTU-Game') - request.add_header('Secret-Key', accountServerSecret) +def executeHttpRequest(url, **extras): + request = urllib2.Request('http://tigercat1.me/tmpremote/api/' + url) + timestamp = str(int(time.time())) + signature = hashlib.sha256(timestamp + accountServerSecret + "h*^ahJGHA017JI&A&*uyhU07") + request.add_header('User-Agent', 'TTS-CSM') + request.add_header('X-CSM-Timestamp', timestamp) + request.add_header('X-CSM-Signature', signature.hexdigest()) for k, v in extras.items(): - request.add_header(k, v) + request.add_header('X-CSM-' + k, v) try: return urllib2.urlopen(request).read() except: return None + notify = directNotify.newCategory('ClientServicesManagerUD') def executeHttpRequestAndLog(url, **extras): @@ -68,23 +74,25 @@ def executeHttpRequestAndLog(url, **extras): return data +blacklist = executeHttpRequest('names/blacklist.json') +if blacklist: + blacklist = json.loads(blacklist) + def judgeName(name): if not name: return False - - for namePart in name.split(' '): - namePart = namePart.lower() - - if len(namePart) < 1: - return False - - if namePart in NameJudgeBlacklist.blacklist: - return False + if blacklist: + for namePart in name.split(' '): + namePart = namePart.lower() + if len(namePart) < 1: + return False + for banned in blacklist: + if banned in namePart: + return False return True - # --- ACCOUNT DATABASES --- -# These classes make up the available account databases for Toontown United. +# These classes make up the available account databases for Toontown Stride. # Databases with login tokens use the PyCrypto module for decrypting them. # DeveloperAccountDB is a special database that accepts a username, and assigns # each user with 700 access automatically upon login. @@ -151,22 +159,30 @@ class RemoteAccountDB(AccountDB): notify = directNotify.newCategory('RemoteAccountDB') def addNameRequest(self, avId, name): - executeHttpRequestAndLog('nameadd', id=avId, name=name) - return True + return executeHttpRequest('names/append', ID=str(avId), Name=name) def getNameStatus(self, avId): - data = executeHttpRequestAndLog('nameget', id=avId) - - if data is None: - return 'PENDING' - - return data['state'] + #return executeHttpRequest('names/status/?Id=' + str(avId)) + return 'APPROVED' # Override temporarily. def removeNameRequest(self, avId): - executeHttpRequestAndLog('nameremove', id=avId) + return executeHttpRequest('names/remove', ID=str(avId)) def lookup(self, token, callback): - if (not token) or (len(token) != 36): + # First, base64 decode the token: + try: + token = base64.b64decode(token) + except TypeError: + self.notify.warning('Could not decode the provided token!') + response = { + 'success': False, + 'reason': "Can't decode this token." + } + callback(response) + return response + + # Ensure this token is a valid size: + if (not token) or ((len(token) % 16) != 0): self.notify.warning('Invalid token length!') response = { 'success': False, @@ -175,25 +191,82 @@ class RemoteAccountDB(AccountDB): callback(response) return response - cookie = executeHttpRequestAndLog('cookie', cookie=token) + # Next, decrypt the token using AES-128 in CBC mode: + accountServerSecret = simbase.config.GetString( + 'account-server-secret', '9sj6816aj1hs795j') - if cookie is None or 'error' in cookie: + # Ensure that our secret is the correct size: + if len(accountServerSecret) > AES.block_size: + self.notify.warning('account-server-secret is too big!') + accountServerSecret = accountServerSecret[:AES.block_size] + elif len(accountServerSecret) < AES.block_size: + self.notify.warning('account-server-secret is too small!') + accountServerSecret += '\x80' + while len(accountServerSecret) < AES.block_size: + accountServerSecret += '\x00' + + # Take the initialization vector off the front of the token: + iv = token[:AES.block_size] + + # Truncate the token to get our cipher text: + cipherText = token[AES.block_size:] + + # Decrypt! + cipher = AES.new(accountServerSecret, mode=AES.MODE_CBC, IV=iv) + try: + token = json.loads(cipher.decrypt(cipherText).replace('\x00', '')) + if ('timestamp' not in token) or (not isinstance(token['timestamp'], int)): + raise ValueError + if ('userid' not in token) or (not isinstance(token['userid'], int)): + raise ValueError + if ('accesslevel' not in token) or (not isinstance(token['accesslevel'], int)): + raise ValueError + except ValueError, e: + print e + self.notify.warning('Invalid token.') response = { 'success': False, - 'reason': "Couldn't contact login server." + 'reason': 'Invalid token.' } callback(response) return response - username = str(cookie['username']) - response = { - 'success': True, - 'userId': username, - 'accountId': int(self.dbm[username]) if username in self.dbm else 0, - 'accessLevel': max(cookie['accessLevel'], minAccessLevel) - } - callback(response) - return response + # Next, check if this token has expired: + expiration = simbase.config.GetInt('account-token-expiration', 1800) + tokenDelta = int(time.time()) - token['timestamp'] + if tokenDelta > expiration: + response = { + 'success': False, + 'reason': 'This token has expired.' + } + callback(response) + return response + + # This token is valid. That's all we need to know. Next, let's check if + # this user's ID is in your account database bridge: + if str(token['userid']) not in self.dbm: + + # Nope. Let's associate them with a brand new Account object! + response = { + 'success': True, + 'userId': token['userid'], + 'accountId': 0, + 'accessLevel': max(int(token['accesslevel']), minAccessLevel) + } + callback(response) + return response + + else: + + # Yep. Let's return their account ID and access level! + response = { + 'success': True, + 'userId': token['userid'], + 'accountId': int(self.dbm[str(token['userid'])]), + 'accessLevel': max(int(token['accesslevel']), minAccessLevel) + } + callback(response) + return response # --- FSMs --- @@ -898,7 +971,7 @@ class UnloadAvatarFSM(OperationFSM): def enterUnloadAvatar(self): channel = self.csm.GetAccountConnectionChannel(self.target) - # Tell TTUFriendsManager somebody is logging off: + # Tell TTSFriendsManager somebody is logging off: self.csm.air.friendsManager.toonOffline(self.avId) # Clear off POSTREMOVE: diff --git a/toontown/uberdog/DistributedPartyManager.py b/toontown/uberdog/DistributedPartyManager.py old mode 100644 new mode 100755 diff --git a/toontown/uberdog/DistributedPartyManagerAI.py b/toontown/uberdog/DistributedPartyManagerAI.py old mode 100644 new mode 100755 diff --git a/toontown/uberdog/DistributedPartyManagerUD.py b/toontown/uberdog/DistributedPartyManagerUD.py old mode 100644 new mode 100755 diff --git a/toontown/uberdog/NameJudgeBlacklist.py b/toontown/uberdog/NameJudgeBlacklist.py old mode 100644 new mode 100755 diff --git a/toontown/uberdog/ServiceStart.py b/toontown/uberdog/ServiceStart.py old mode 100644 new mode 100755 diff --git a/toontown/uberdog/ToontownUberRepository.py b/toontown/uberdog/ToontownUberRepository.py old mode 100644 new mode 100755 index 108680be..fd30475b --- a/toontown/uberdog/ToontownUberRepository.py +++ b/toontown/uberdog/ToontownUberRepository.py @@ -50,6 +50,6 @@ class ToontownUberRepository(ToontownInternalRepository): self.csm = simbase.air.generateGlobalObject(OTP_DO_ID_CLIENT_SERVICES_MANAGER, 'ClientServicesManager') self.chatAgent = simbase.air.generateGlobalObject(OTP_DO_ID_CHAT_MANAGER, 'ChatAgent') - self.friendsManager = simbase.air.generateGlobalObject(OTP_DO_ID_TTU_FRIENDS_MANAGER, 'TTUFriendsManager') + self.friendsManager = simbase.air.generateGlobalObject(OTP_DO_ID_TTS_FRIENDS_MANAGER, 'TTSFriendsManager') self.globalPartyMgr = simbase.air.generateGlobalObject(OTP_DO_ID_GLOBAL_PARTY_MANAGER, 'GlobalPartyManager') self.groupManager = simbase.air.generateGlobalObject(OPT_DO_ID_GROUP_MANAGER, 'GroupManager') diff --git a/toontown/uberdog/__init__.py b/toontown/uberdog/__init__.py old mode 100644 new mode 100755