From 9a4af9c686edd4c45ea1ced13e72376493fe8a11 Mon Sep 17 00:00:00 2001 From: John Date: Sun, 24 May 2015 17:21:40 +0300 Subject: [PATCH] Remove Welcome Valley --- astron/dclass/united.dc | 7 ---- otp/distributed/DCClassImports.py | 4 +-- otp/distributed/PotentialShard.py | 6 +--- toontown/ai/WelcomeValleyManager.py | 34 ------------------- toontown/ai/WelcomeValleyManagerAI.py | 17 ---------- toontown/building/DistributedBuilding.py | 6 +--- toontown/building/DistributedBuildingAI.py | 7 ++-- toontown/building/DistributedBuildingMgrAI.py | 4 --- toontown/coghq/BossbotHQExterior.py | 1 - toontown/coghq/CashbotHQExterior.py | 1 - toontown/coghq/CogHQExterior.py | 2 +- toontown/coghq/FactoryExterior.py | 3 +- toontown/coghq/LawbotHQExterior.py | 1 - toontown/coghq/SellbotHQExterior.py | 1 - toontown/distributed/HoodMgr.py | 4 +-- .../distributed/ToontownClientRepository.py | 1 - toontown/hood/GSHoodAI.py | 3 +- toontown/hood/GZHoodAI.py | 3 +- toontown/hood/HoodAI.py | 6 +--- toontown/hood/OZHoodAI.py | 6 ++-- toontown/hood/QuietZoneState.py | 26 ++------------ toontown/hood/ZoneUtil.py | 27 +-------------- toontown/safezone/Playground.py | 4 +-- toontown/shtiker/ShardPage.py | 18 ++-------- toontown/suit/DistributedSuitAI.py | 3 +- toontown/suit/DistributedSuitPlannerAI.py | 10 ++---- toontown/toon/DistributedToonAI.py | 3 -- toontown/toonbase/TTLocalizerEnglish.py | 2 -- toontown/toonbase/ToontownGlobals.py | 5 +-- toontown/town/Street.py | 2 +- toontown/town/TownLoader.py | 3 -- 31 files changed, 28 insertions(+), 192 deletions(-) delete mode 100644 toontown/ai/WelcomeValleyManager.py delete mode 100644 toontown/ai/WelcomeValleyManagerAI.py diff --git a/astron/dclass/united.dc b/astron/dclass/united.dc index 569878f0..319a9a5d 100644 --- a/astron/dclass/united.dc +++ b/astron/dclass/united.dc @@ -245,7 +245,6 @@ dclass CallbackObject { }; from direct.distributed import DistributedObjectGlobal -from toontown.ai import WelcomeValleyManager/AI from toontown.building import DistributedAnimatedProp/AI from toontown.toon import DistributedToon/AI/UD from toontown.safezone import DistributedTrolley/AI @@ -626,12 +625,6 @@ dclass ToontownDistrictStats : DistributedObject { setStats : setAvatarCount, setNewAvatarCount; }; -dclass WelcomeValleyManager : DistributedObject { - clientSetZone(uint32) airecv clsend; - requestZoneIdMessage(uint32, uint16) airecv clsend; - requestZoneIdResponse(uint32, uint16); -}; - dclass DistributedAnimatedProp : DistributedObject { setPropId(uint16) required broadcast ram; setAvatarInteract(uint32) required broadcast ram; diff --git a/otp/distributed/DCClassImports.py b/otp/distributed/DCClassImports.py index 2f066f2b..636b4b54 100644 --- a/otp/distributed/DCClassImports.py +++ b/otp/distributed/DCClassImports.py @@ -2,7 +2,7 @@ from pandac.PandaModules import * -hashVal = 3860069384L +hashVal = 4171615815L from toontown.coghq import DistributedCashbotBossSafe, DistributedCashbotBossCrane, DistributedBattleFactory, DistributedCashbotBossTreasure, DistributedCogHQDoor, DistributedSellbotHQDoor, DistributedFactoryElevatorExt, DistributedMintElevatorExt, DistributedLawOfficeElevatorExt, DistributedLawOfficeElevatorInt, LobbyManager, DistributedMegaCorp, DistributedFactory, DistributedLawOffice, DistributedLawOfficeFloor, DistributedLift, DistributedDoorEntity, DistributedSwitch, DistributedButton, DistributedTrigger, DistributedCrushableEntity, DistributedCrusherEntity, DistributedStomper, DistributedStomperPair, DistributedLaserField, DistributedGolfGreenGame, DistributedSecurityCamera, DistributedMover, DistributedElevatorMarker, DistributedBarrelBase, DistributedGagBarrel, DistributedBeanBarrel, DistributedHealBarrel, DistributedGrid, ActiveCell, DirectionalCell, CrusherCell, DistributedCrate, DistributedSinkingPlatform, BattleBlocker, DistributedMint, DistributedMintRoom, DistributedMintBattle, DistributedStage, DistributedStageRoom, DistributedStageBattle, DistributedLawbotBossGavel, DistributedLawbotCannon, DistributedLawbotChair, DistributedCogKart, DistributedCountryClub, DistributedCountryClubRoom, DistributedMoleField, DistributedCountryClubBattle, DistributedMaze, DistributedFoodBelt, DistributedBanquetTable, DistributedGolfSpot @@ -14,7 +14,7 @@ from otp.level import DistributedLevel, DistributedEntity, DistributedInteractiv from toontown.shtiker import PurchaseManager, NewbiePurchaseManager from toontown.groups import GroupManager from toontown.uberdog.ClientServicesManager import ClientServicesManager -from toontown.ai import WelcomeValleyManager, NewsManager, DistributedAprilToonsMgr, DistributedBlackCatMgr, DistributedReportMgr, DistributedPolarPlaceEffectMgr, DistributedGreenToonEffectMgr, DistributedResistanceEmoteMgr, DistributedScavengerHuntTarget, DistributedTrickOrTreatTarget, DistributedWinterCarolingTarget, DistributedJorElCam +from toontown.ai import NewsManager, DistributedAprilToonsMgr, DistributedBlackCatMgr, DistributedReportMgr, DistributedPolarPlaceEffectMgr, DistributedGreenToonEffectMgr, DistributedResistanceEmoteMgr, DistributedScavengerHuntTarget, DistributedTrickOrTreatTarget, DistributedWinterCarolingTarget, DistributedJorElCam from otp.chat import ChatAgent from toontown.parties.GlobalPartyManager import GlobalPartyManager from toontown.racing.DistributedStartingBlock import DistributedViewingBlock diff --git a/otp/distributed/PotentialShard.py b/otp/distributed/PotentialShard.py index c59f5e82..f1d0f767 100644 --- a/otp/distributed/PotentialShard.py +++ b/otp/distributed/PotentialShard.py @@ -1,12 +1,8 @@ - - class PotentialShard: def __init__(self, id): self.id = id self.name = None self.population = 0 - self.welcomeValleyPopulation = 0 self.active = 1 - self.available = 1 - return + self.available = 1 \ No newline at end of file diff --git a/toontown/ai/WelcomeValleyManager.py b/toontown/ai/WelcomeValleyManager.py deleted file mode 100644 index 58ee58b1..00000000 --- a/toontown/ai/WelcomeValleyManager.py +++ /dev/null @@ -1,34 +0,0 @@ -from pandac.PandaModules import * -from direct.distributed import DistributedObject -from direct.directnotify import DirectNotifyGlobal - -class WelcomeValleyManager(DistributedObject.DistributedObject): - notify = DirectNotifyGlobal.directNotify.newCategory('WelcomeValleyManager') - neverDisable = 1 - - def __init__(self, cr): - DistributedObject.DistributedObject.__init__(self, cr) - - def generate(self): - if base.cr.welcomeValleyManager != None: - base.cr.welcomeValleyManager.delete() - base.cr.welcomeValleyManager = self - DistributedObject.DistributedObject.generate(self) - return - - def disable(self): - base.cr.welcomeValleyManager = None - DistributedObject.DistributedObject.disable(self) - return - - def delete(self): - base.cr.welcomeValleyManager = None - DistributedObject.DistributedObject.delete(self) - return - - def requestZoneId(self, origZoneId, callback): - context = self.getCallbackContext(callback) - self.sendUpdate('requestZoneIdMessage', [origZoneId, context]) - - def requestZoneIdResponse(self, zoneId, context): - self.doCallbackContext(context, [zoneId]) diff --git a/toontown/ai/WelcomeValleyManagerAI.py b/toontown/ai/WelcomeValleyManagerAI.py deleted file mode 100644 index 3f7f3b0c..00000000 --- a/toontown/ai/WelcomeValleyManagerAI.py +++ /dev/null @@ -1,17 +0,0 @@ -from direct.directnotify import DirectNotifyGlobal -from direct.distributed.DistributedObjectAI import DistributedObjectAI - -class WelcomeValleyManagerAI(DistributedObjectAI): - notify = DirectNotifyGlobal.directNotify.newCategory("WelcomeValleyManagerAI") - - def clientSetZone(self, todo0): - pass - - def toonSetZone(self, doId, newZoneId): - pass #TODO - - def requestZoneIdMessage(self, todo0, todo1): - pass - - def requestZoneIdResponse(self, todo0, todo1): - pass diff --git a/toontown/building/DistributedBuilding.py b/toontown/building/DistributedBuilding.py index 79cc1358..3ce8c5f4 100644 --- a/toontown/building/DistributedBuilding.py +++ b/toontown/building/DistributedBuilding.py @@ -17,7 +17,6 @@ from toontown.toonbase import TTLocalizer from toontown.distributed import DelayDelete from toontown.toon import TTEmote from otp.avatar import Emote -from toontown.hood import ZoneUtil import sys FO_DICT = {'s': 'tt_m_ara_cbe_fieldOfficeMoverShaker', 'l': 'tt_m_ara_cbe_fieldOfficeLegalEagle', @@ -445,7 +444,6 @@ class DistributedBuilding(DistributedObject.DistributedObject): level = int(self.difficulty / 2) + 1 suitNP = dnaStore.findNode('suit_landmark_' + chr(self.track) + str(level)) zoneId = dnaStore.getZoneFromBlockNumber(self.block) - zoneId = ZoneUtil.getTrueZoneId(zoneId, self.interiorZoneId) newParentNP = base.cr.playGame.hood.loader.zoneDict[zoneId] suitBuildingNP = suitNP.copyTo(newParentNP) buildingTitle = dnaStore.getTitleFromBlockNumber(self.block) @@ -548,7 +546,6 @@ class DistributedBuilding(DistributedObject.DistributedObject): if not suitNP: suitNP = loader.loadModel('phase_5/models/cogdominium/%s' % FO_DICT[chr(self.track)]) zoneId = dnaStore.getZoneFromBlockNumber(self.block) - zoneId = ZoneUtil.getTrueZoneId(zoneId, self.interiorZoneId) newParentNP = base.cr.playGame.hood.loader.zoneDict[zoneId] suitBuildingNP = suitNP.copyTo(newParentNP) buildingTitle = dnaStore.getTitleFromBlockNumber(self.block) @@ -934,8 +931,7 @@ class DistributedBuilding(DistributedObject.DistributedObject): pass def getVisZoneId(self): - exteriorZoneId = base.cr.playGame.hood.dnaStore.getZoneFromBlockNumber(self.block) - return ZoneUtil.getTrueZoneId(exteriorZoneId, self.zoneId) + return base.cr.playGame.hood.dnaStore.getZoneFromBlockNumber(self.block) def getInteractiveProp(self): if self.interactiveProp: diff --git a/toontown/building/DistributedBuildingAI.py b/toontown/building/DistributedBuildingAI.py index b4c506e7..46790a7e 100644 --- a/toontown/building/DistributedBuildingAI.py +++ b/toontown/building/DistributedBuildingAI.py @@ -207,7 +207,6 @@ class DistributedBuildingAI(DistributedObjectAI.DistributedObjectAI): blockNumber = self.block dnaStore = self.air.dnaStoreMap[self.canonicalZoneId] zoneId = dnaStore.getZoneFromBlockNumber(blockNumber) - zoneId = ZoneUtil.getTrueZoneId(zoneId, self.zoneId) interiorZoneId = (zoneId - (zoneId%100)) + 500 + blockNumber return (zoneId, interiorZoneId) @@ -274,13 +273,11 @@ class DistributedBuildingAI(DistributedObjectAI.DistributedObjectAI): def updateSavedBy(self, savedBy): if self.savedBy: for (avId, name, dna) in self.savedBy: - if not ZoneUtil.isWelcomeValley(self.zoneId): - self.trophyMgr.removeTrophy(avId, self.numFloors) + self.trophyMgr.removeTrophy(avId, self.numFloors) self.savedBy = savedBy if self.savedBy: for (avId, name, dna) in self.savedBy: - if not ZoneUtil.isWelcomeValley(self.zoneId): - self.trophyMgr.addTrophy(avId, name, self.numFloors) + self.trophyMgr.addTrophy(avId, name, self.numFloors) def enterWaitForVictors(self, victorList, savedBy): activeToons = [] diff --git a/toontown/building/DistributedBuildingMgrAI.py b/toontown/building/DistributedBuildingMgrAI.py index cb1f0d06..1c2c2d6c 100644 --- a/toontown/building/DistributedBuildingMgrAI.py +++ b/toontown/building/DistributedBuildingMgrAI.py @@ -147,7 +147,6 @@ class DistributedBuildingMgrAI: def newHQBuilding(self, blockNumber): dnaStore = self.air.dnaStoreMap[self.canonicalBranchId] exteriorZoneId = dnaStore.getZoneFromBlockNumber(blockNumber) - exteriorZoneId = ZoneUtil.getTrueZoneId(exteriorZoneId, self.branchId) interiorZoneId = (self.branchId - (self.branchId%100)) + 500 + blockNumber building = HQBuildingAI.HQBuildingAI( self.air, exteriorZoneId, interiorZoneId, blockNumber) @@ -157,7 +156,6 @@ class DistributedBuildingMgrAI: def newGagshopBuilding(self, blockNumber): dnaStore = self.air.dnaStoreMap[self.canonicalBranchId] exteriorZoneId = dnaStore.getZoneFromBlockNumber(blockNumber) - exteriorZoneId = ZoneUtil.getTrueZoneId(exteriorZoneId, self.branchId) interiorZoneId = (self.branchId - (self.branchId%100)) + 500 + blockNumber building = GagshopBuildingAI.GagshopBuildingAI( self.air, exteriorZoneId, interiorZoneId, blockNumber) @@ -167,7 +165,6 @@ class DistributedBuildingMgrAI: def newPetshopBuilding(self, blockNumber): dnaStore = self.air.dnaStoreMap[self.canonicalBranchId] exteriorZoneId = dnaStore.getZoneFromBlockNumber(blockNumber) - exteriorZoneId = ZoneUtil.getTrueZoneId(exteriorZoneId, self.branchId) interiorZoneId = (self.branchId - (self.branchId%100)) + 500 + blockNumber building = PetshopBuildingAI.PetshopBuildingAI( self.air, exteriorZoneId, interiorZoneId, blockNumber) @@ -177,7 +174,6 @@ class DistributedBuildingMgrAI: def newKartShopBuilding(self, blockNumber): dnaStore = self.air.dnaStoreMap[self.canonicalBranchId] exteriorZoneId = dnaStore.getZoneFromBlockNumber(blockNumber) - exteriorZoneId = ZoneUtil.getTrueZoneId(exteriorZoneId, self.branchId) interiorZoneId = (self.branchId - (self.branchId%100)) + 500 + blockNumber building = KartShopBuildingAI.KartShopBuildingAI( self.air, exteriorZoneId, interiorZoneId, blockNumber) diff --git a/toontown/coghq/BossbotHQExterior.py b/toontown/coghq/BossbotHQExterior.py index e56ac8d4..0bbb039a 100644 --- a/toontown/coghq/BossbotHQExterior.py +++ b/toontown/coghq/BossbotHQExterior.py @@ -73,7 +73,6 @@ class BossbotHQExterior(CogHQExterior.CogHQExterior): groupFullName = dnaStore.getDNAVisGroupName(i) visGroup = dnaStore.getDNAVisGroupAI(i) visZoneId = int(base.cr.hoodMgr.extractGroupName(groupFullName)) - visZoneId = ZoneUtil.getTrueZoneId(visZoneId, self.zoneId) visibles = [] for i in xrange(visGroup.getNumVisibles()): visibles.append(int(visGroup.getVisible(i))) diff --git a/toontown/coghq/CashbotHQExterior.py b/toontown/coghq/CashbotHQExterior.py index bc520cb6..a1255e71 100644 --- a/toontown/coghq/CashbotHQExterior.py +++ b/toontown/coghq/CashbotHQExterior.py @@ -69,7 +69,6 @@ class CashbotHQExterior(CogHQExterior.CogHQExterior): groupFullName = dnaStore.getDNAVisGroupName(i) visGroup = dnaStore.getDNAVisGroupAI(i) visZoneId = int(base.cr.hoodMgr.extractGroupName(groupFullName)) - visZoneId = ZoneUtil.getTrueZoneId(visZoneId, self.zoneId) visibles = [] for i in xrange(visGroup.getNumVisibles()): visibles.append(int(visGroup.getVisible(i))) diff --git a/toontown/coghq/CogHQExterior.py b/toontown/coghq/CogHQExterior.py index 6dfdb59a..287e532f 100644 --- a/toontown/coghq/CogHQExterior.py +++ b/toontown/coghq/CogHQExterior.py @@ -70,7 +70,7 @@ class CogHQExterior(BattlePlace.BattlePlace): self.accept('doorDoneEvent', self.handleDoorDoneEvent) self.accept('DistributedDoor_doorTrigger', self.handleDoorTrigger) NametagGlobals.setWant2dNametags(True) - self.tunnelOriginList = base.cr.hoodMgr.addLinkTunnelHooks(self, self.nodeList, self.zoneId) + self.tunnelOriginList = base.cr.hoodMgr.addLinkTunnelHooks(self, self.nodeList) how = requestStatus['how'] self.fsm.request(how, [requestStatus]) diff --git a/toontown/coghq/FactoryExterior.py b/toontown/coghq/FactoryExterior.py index 30d588c6..45077b62 100644 --- a/toontown/coghq/FactoryExterior.py +++ b/toontown/coghq/FactoryExterior.py @@ -75,7 +75,6 @@ class FactoryExterior(BattlePlace.BattlePlace): groupFullName = dnaStore.getDNAVisGroupName(i) visGroup = dnaStore.getDNAVisGroupAI(i) visZoneId = int(base.cr.hoodMgr.extractGroupName(groupFullName)) - visZoneId = ZoneUtil.getTrueZoneId(visZoneId, self.zoneId) visibles = [] for i in xrange(visGroup.getNumVisibles()): visibles.append(int(visGroup.getVisible(i))) @@ -95,7 +94,7 @@ class FactoryExterior(BattlePlace.BattlePlace): self.accept('doorDoneEvent', self.handleDoorDoneEvent) self.accept('DistributedDoor_doorTrigger', self.handleDoorTrigger) NametagGlobals.setWant2dNametags(True) - self.tunnelOriginList = base.cr.hoodMgr.addLinkTunnelHooks(self, self.nodeList, self.zoneId) + self.tunnelOriginList = base.cr.hoodMgr.addLinkTunnelHooks(self, self.nodeList) how = requestStatus['how'] self.fsm.request(how, [requestStatus]) diff --git a/toontown/coghq/LawbotHQExterior.py b/toontown/coghq/LawbotHQExterior.py index e4e8e189..ca8bc85d 100644 --- a/toontown/coghq/LawbotHQExterior.py +++ b/toontown/coghq/LawbotHQExterior.py @@ -27,7 +27,6 @@ class LawbotHQExterior(CogHQExterior.CogHQExterior): groupFullName = dnaStore.getDNAVisGroupName(i) visGroup = dnaStore.getDNAVisGroupAI(i) visZoneId = int(base.cr.hoodMgr.extractGroupName(groupFullName)) - visZoneId = ZoneUtil.getTrueZoneId(visZoneId, self.zoneId) visibles = [] for i in xrange(visGroup.getNumVisibles()): visibles.append(int(visGroup.getVisible(i))) diff --git a/toontown/coghq/SellbotHQExterior.py b/toontown/coghq/SellbotHQExterior.py index 2afff17d..f7d28087 100644 --- a/toontown/coghq/SellbotHQExterior.py +++ b/toontown/coghq/SellbotHQExterior.py @@ -23,7 +23,6 @@ class SellbotHQExterior(CogHQExterior.CogHQExterior): groupFullName = dnaStore.getDNAVisGroupName(i) visGroup = dnaStore.getDNAVisGroupAI(i) visZoneId = int(base.cr.hoodMgr.extractGroupName(groupFullName)) - visZoneId = ZoneUtil.getTrueZoneId(visZoneId, self.zoneId) visibles = [] for i in xrange(visGroup.getNumVisibles()): visibles.append(int(visGroup.getVisible(i))) diff --git a/toontown/distributed/HoodMgr.py b/toontown/distributed/HoodMgr.py index f34284d2..61c1a2b6 100644 --- a/toontown/distributed/HoodMgr.py +++ b/toontown/distributed/HoodMgr.py @@ -249,7 +249,7 @@ class HoodMgr(DirectObject.DirectObject): hoodId = ZoneUtil.getCanonicalZoneId(hoodId) return ToontownGlobals.hoodNameMap[hoodId][-1] - def addLinkTunnelHooks(self, hoodPart, nodeList, currentZoneId): + def addLinkTunnelHooks(self, hoodPart, nodeList): tunnelOriginList = [] for i in nodeList: linkTunnelNPC = i.findAllMatches('**/linktunnel*') @@ -261,8 +261,6 @@ class HoodMgr(DirectObject.DirectObject): zoneStr = nameParts[2] hoodId = self.getIdFromName(hoodStr) zoneId = int(zoneStr) - hoodId = ZoneUtil.getTrueZoneId(hoodId, currentZoneId) - zoneId = ZoneUtil.getTrueZoneId(zoneId, currentZoneId) linkSphere = linkTunnel.find('**/tunnel_trigger') if linkSphere.isEmpty(): linkSphere = linkTunnel.find('**/tunnel_sphere') diff --git a/toontown/distributed/ToontownClientRepository.py b/toontown/distributed/ToontownClientRepository.py index 8acd3619..a6c29bf6 100644 --- a/toontown/distributed/ToontownClientRepository.py +++ b/toontown/distributed/ToontownClientRepository.py @@ -67,7 +67,6 @@ class ToontownClientRepository(OTPClientRepository.OTPClientRepository): self.trophyManager = None self.catalogManager = None self.tutorialManager = None - self.welcomeValleyManager = None self.newsManager = None self.distributedDistrict = None self.partyManager = None diff --git a/toontown/hood/GSHoodAI.py b/toontown/hood/GSHoodAI.py index 726737ca..8ffe6075 100644 --- a/toontown/hood/GSHoodAI.py +++ b/toontown/hood/GSHoodAI.py @@ -62,7 +62,7 @@ class GSHoodAI(HoodAI.HoodAI): racingPads.append(racingPad) elif isinstance(dnaGroup, DNAVisGroup): - zoneId = ZoneUtil.getTrueZoneId(int(dnaGroup.getName().split(':')[0]), zoneId) + zoneId = int(dnaGroup.getName().split(':')[0]) for i in xrange(dnaGroup.getNumChildren()): (foundRacingPads, foundRacingPadGroups) = self.findRacingPads(dnaGroup.at(i), zoneId, area, padType=padType) racingPads.extend(foundRacingPads) @@ -98,7 +98,6 @@ class GSHoodAI(HoodAI.HoodAI): viewingPadGroups = [] for zoneId in self.getZoneTable(): dnaData = self.air.dnaDataMap.get(zoneId, None) - zoneId = ZoneUtil.getTrueZoneId(zoneId, self.zoneId) if dnaData.getName() == 'root': area = ZoneUtil.getCanonicalZoneId(zoneId) (foundRacingPads, foundRacingPadGroups) = self.findRacingPads(dnaData, zoneId, area, padType='racing_pad') diff --git a/toontown/hood/GZHoodAI.py b/toontown/hood/GZHoodAI.py index 96a7fec2..dc97fdd0 100644 --- a/toontown/hood/GZHoodAI.py +++ b/toontown/hood/GZHoodAI.py @@ -37,7 +37,7 @@ class GZHoodAI(HoodAI.HoodAI): golfKart.generateWithRequired(zoneId) golfKarts.append(golfKart) elif isinstance(dnaGroup, DNAVisGroup) and (not overrideDNAZone): - zoneId = ZoneUtil.getTrueZoneId(int(dnaGroup.getName().split(':')[0]), zoneId) + zoneId = int(dnaGroup.getName().split(':')[0]) for i in xrange(dnaGroup.getNumChildren()): foundGolfKarts = self.findGolfKarts(dnaGroup.at(i), zoneId, area, overrideDNAZone=overrideDNAZone) golfKarts.extend(foundGolfKarts) @@ -47,7 +47,6 @@ class GZHoodAI(HoodAI.HoodAI): self.golfKarts = [] for zoneId in self.getZoneTable(): dnaData = self.air.dnaDataMap.get(zoneId, None) - zoneId = ZoneUtil.getTrueZoneId(zoneId, self.zoneId) if dnaData.getName() == 'root': area = ZoneUtil.getCanonicalZoneId(zoneId) foundGolfKarts = self.findGolfKarts(dnaData, zoneId, area, overrideDNAZone=True) diff --git a/toontown/hood/HoodAI.py b/toontown/hood/HoodAI.py index 6ed25d97..592e302f 100644 --- a/toontown/hood/HoodAI.py +++ b/toontown/hood/HoodAI.py @@ -92,7 +92,7 @@ class HoodAI: fishingPonds.append(fishingPond) elif isinstance(dnaGroup, DNAVisGroup): - zoneId = ZoneUtil.getTrueZoneId(int(dnaGroup.getName().split(':')[0]), zoneId) + zoneId = int(dnaGroup.getName().split(':')[0]) for i in xrange(dnaGroup.getNumChildren()): (foundFishingPonds, foundFishingPondGroups) = self.findFishingPonds(dnaGroup.at(i), zoneId, area) fishingPonds.extend(foundFishingPonds) @@ -120,7 +120,6 @@ class HoodAI: fishingPondGroups = [] for zoneId in self.getZoneTable(): dnaData = self.air.dnaDataMap.get(zoneId, None) - zoneId = ZoneUtil.getTrueZoneId(zoneId, self.zoneId) if dnaData.getName() == 'root': area = ZoneUtil.getCanonicalZoneId(zoneId) (foundFishingPonds, foundFishingPondGroups) = self.findFishingPonds(dnaData, zoneId, area) @@ -149,7 +148,6 @@ class HoodAI: self.partyGates = [] for zoneId in self.getZoneTable(): dnaData = self.air.dnaDataMap.get(zoneId, None) - zoneId = ZoneUtil.getTrueZoneId(zoneId, self.zoneId) if dnaData.getName() == 'root': foundPartyGates = self.findPartyGates(dnaData, zoneId) self.partyGates.extend(foundPartyGates) @@ -167,7 +165,6 @@ class HoodAI: def createBuildingManagers(self): for zoneId in self.getZoneTable(): dnaStore = self.air.dnaStoreMap[zoneId] - zoneId = ZoneUtil.getTrueZoneId(zoneId, self.zoneId) buildingManager = DistributedBuildingMgrAI.DistributedBuildingMgrAI( self.air, zoneId, dnaStore, self.air.trophyMgr) self.buildingManagers.append(buildingManager) @@ -177,7 +174,6 @@ class HoodAI: for zoneId in self.getZoneTable(): if zoneId == self.zoneId: continue - zoneId = ZoneUtil.getTrueZoneId(zoneId, self.zoneId) suitPlanner = DistributedSuitPlannerAI.DistributedSuitPlannerAI(self.air, zoneId) suitPlanner.generateWithRequired(zoneId) suitPlanner.d_setZoneId(zoneId) diff --git a/toontown/hood/OZHoodAI.py b/toontown/hood/OZHoodAI.py index d7aa7a28..fc0f6965 100644 --- a/toontown/hood/OZHoodAI.py +++ b/toontown/hood/OZHoodAI.py @@ -52,7 +52,7 @@ class OZHoodAI(HoodAI.HoodAI): picnicTable.generateWithRequired(zoneId) picnicTables.append(picnicTable) elif isinstance(dnaGroup, DNAVisGroup) and (not overrideDNAZone): - zoneId = ZoneUtil.getTrueZoneId(int(dnaGroup.getName().split(':')[0]), zoneId) + zoneId = int(dnaGroup.getName().split(':')[0]) for i in xrange(dnaGroup.getNumChildren()): foundPicnicTables = self.findPicnicTables( dnaGroup.at(i), zoneId, area, overrideDNAZone=overrideDNAZone) @@ -63,7 +63,6 @@ class OZHoodAI(HoodAI.HoodAI): self.picnicTables = [] for zoneId in self.getZoneTable(): dnaData = self.air.dnaDataMap.get(zoneId, None) - zoneId = ZoneUtil.getTrueZoneId(zoneId, self.zoneId) if dnaData.getName() == 'root': area = ZoneUtil.getCanonicalZoneId(zoneId) foundPicnicTables = self.findPicnicTables( @@ -86,7 +85,7 @@ class OZHoodAI(HoodAI.HoodAI): gameTable.setTableIndex(tableIndex) gameTable.generateOtpObject(simbase.air.districtId, zoneId, ['setX', 'setY', 'setZ', 'setH', 'setP', 'setR']) elif isinstance(dnaGroup, DNAVisGroup) and (not overrideDNAZone): - zoneId = ZoneUtil.getTrueZoneId(int(dnaGroup.getName().split(':')[0]), zoneId) + zoneId = int(dnaGroup.getName().split(':')[0]) for i in xrange(dnaGroup.getNumChildren()): foundGameTables = self.findGameTables( dnaGroup.at(i), zoneId, area, overrideDNAZone=overrideDNAZone) @@ -97,7 +96,6 @@ class OZHoodAI(HoodAI.HoodAI): self.gameTables = [] for zoneId in self.getZoneTable(): dnaData = self.air.dnaDataMap.get(zoneId, None) - zoneId = ZoneUtil.getTrueZoneId(zoneId, self.zoneId) if dnaData.getName() == 'root': area = ZoneUtil.getCanonicalZoneId(zoneId) foundGameTables = self.findGameTables( diff --git a/toontown/hood/QuietZoneState.py b/toontown/hood/QuietZoneState.py index b76f7b4a..d34ddb4c 100644 --- a/toontown/hood/QuietZoneState.py +++ b/toontown/hood/QuietZoneState.py @@ -205,35 +205,14 @@ class QuietZoneState(StateData.StateData): return def enterWaitForZoneRedirect(self): + print 'entered wait for zone redirect' self.notify.debug('enterWaitForZoneRedirect(requestStatus=' + str(self._requestStatus) + ')') if not self.Disable: base.cr.handler = self.handleWaitForZoneRedirect base.cr.handlerArgs = self._requestStatus base.cr.setInQuietZone(True) self.waitForDatabase('WaitForZoneRedirect') - zoneId = self._requestStatus['zoneId'] - avId = self._requestStatus.get('avId', -1) - allowRedirect = self._requestStatus.get('allowRedirect', 1) - if avId != -1: - allowRedirect = 0 - if not base.cr.welcomeValleyManager: - newZoneId = ZoneUtil.getCanonicalZoneId(zoneId) - if newZoneId != zoneId: - self.gotZoneRedirect(newZoneId) - return - if allowRedirect and ZoneUtil.isWelcomeValley(zoneId): - self.notify.info('Requesting AI redirect from zone %s.' % zoneId) - if base.slowQuietZone: - - def rZI(task, zoneId = zoneId, self = self): - base.cr.welcomeValleyManager.requestZoneId(zoneId, self.gotZoneRedirect) - return Task.done - - taskMgr.doMethodLater(base.slowQuietZoneDelay, rZI, 'slowQuietZone-welcomeValleyRedirect') - else: - base.cr.welcomeValleyManager.requestZoneId(zoneId, self.gotZoneRedirect) - else: - self.fsm.request('waitForSetZoneResponse') + self.fsm.request('waitForSetZoneResponse') def gotZoneRedirect(self, zoneId): self.notify.info('Redirecting to zone %s.' % zoneId) @@ -250,6 +229,7 @@ class QuietZoneState(StateData.StateData): return def enterWaitForSetZoneResponse(self): + print 'entered wait for set zone response - 2' self.notify.debug('enterWaitForSetZoneResponse(requestStatus=' + str(self._requestStatus) + ')') if not self.Disable: messenger.send(self.getEnterWaitForSetZoneResponseMsg(), [self._requestStatus]) diff --git a/toontown/hood/ZoneUtil.py b/toontown/hood/ZoneUtil.py index af307e6d..2ff6997a 100644 --- a/toontown/hood/ZoneUtil.py +++ b/toontown/hood/ZoneUtil.py @@ -87,7 +87,7 @@ def getWhereName(zoneId, isToon): where = 'toonInterior' elif zoneId in tutorialDict['exteriors']: where = 'street' - elif zoneId == ToontownCentral or zoneId == WelcomeValleyToken: + elif zoneId == ToontownCentral: where = 'playground' else: zoneUtilNotify.error('No known zone: ' + str(zoneId)) @@ -144,32 +144,7 @@ def getCanonicalBranchZone(zoneId): return getBranchZone(getCanonicalZoneId(zoneId)) -def isWelcomeValley(zoneId): - return zoneId == WelcomeValleyToken or zoneId >= WelcomeValleyBegin and zoneId < WelcomeValleyEnd - - def getCanonicalZoneId(zoneId): - if zoneId == WelcomeValleyToken: - zoneId = ToontownCentral - elif zoneId >= WelcomeValleyBegin and zoneId < WelcomeValleyEnd: - zoneId = zoneId % 2000 - if zoneId < 1000: - zoneId = zoneId + ToontownCentral - else: - zoneId = zoneId - 1000 + GoofySpeedway - return zoneId - - -def getTrueZoneId(zoneId, currentZoneId): - if zoneId >= WelcomeValleyBegin and zoneId < WelcomeValleyEnd or zoneId == WelcomeValleyToken: - zoneId = getCanonicalZoneId(zoneId) - if currentZoneId >= WelcomeValleyBegin and currentZoneId < WelcomeValleyEnd: - hoodId = getHoodId(zoneId) - offset = currentZoneId - currentZoneId % 2000 - if hoodId == ToontownCentral: - return zoneId - ToontownCentral + offset - elif hoodId == GoofySpeedway: - return zoneId - GoofySpeedway + offset + 1000 return zoneId diff --git a/toontown/safezone/Playground.py b/toontown/safezone/Playground.py index 0522365d..a6046e21 100644 --- a/toontown/safezone/Playground.py +++ b/toontown/safezone/Playground.py @@ -221,7 +221,7 @@ class Playground(Place.Place): lightsOn.start() NametagGlobals.setWant2dNametags(True) self.zoneId = requestStatus['zoneId'] - self.tunnelOriginList = base.cr.hoodMgr.addLinkTunnelHooks(self, self.loader.nodeList, self.zoneId) + self.tunnelOriginList = base.cr.hoodMgr.addLinkTunnelHooks(self, self.loader.nodeList) how = requestStatus['how'] if how == 'teleportIn': how = 'deathAck' @@ -575,7 +575,7 @@ class Playground(Place.Place): else: self.geom = hidden.attachNewNode(node) self.makeDictionaries(self.loader.dnaStore) - self.tunnelOriginList = base.cr.hoodMgr.addLinkTunnelHooks(self, self.nodeList, self.zoneId) + self.tunnelOriginList = base.cr.hoodMgr.addLinkTunnelHooks(self, self.nodeList) self.geom.flattenMedium() gsg = base.win.getGsg() if gsg: diff --git a/toontown/shtiker/ShardPage.py b/toontown/shtiker/ShardPage.py index ee82d3f7..21bd59a8 100644 --- a/toontown/shtiker/ShardPage.py +++ b/toontown/shtiker/ShardPage.py @@ -274,7 +274,7 @@ class ShardPage(ShtikerPage.ShtikerPage): self.currentBTL['state'] = DGG.DISABLED self.currentBTR['state'] = DGG.DISABLED - if shardId == self.getCurrentShardId(): + if shardId == base.localAvatar.defaultShard: self.shardTeleportButton['state'] = DGG.DISABLED if self.shardGroups is not None: @@ -459,14 +459,6 @@ class ShardPage(ShtikerPage.ShtikerPage): zoneId = None return zoneId - def getCurrentShardId(self): - zoneId = self.getCurrentZoneId() - - if zoneId != None and ZoneUtil.isWelcomeValley(zoneId): - return ToontownGlobals.WelcomeValleyToken - else: - return base.localAvatar.defaultShard - def createSuitHead(self, suitName): suitDNA = SuitDNA.SuitDNA() suitDNA.newSuit(suitName) @@ -487,7 +479,6 @@ class ShardPage(ShtikerPage.ShtikerPage): curShardTuples = base.cr.listActiveShards() curShardTuples.sort(compareShardTuples) - currentShardId = self.getCurrentShardId() actualShardId = base.localAvatar.defaultShard actualShardName = None anyChanges = 0 @@ -550,7 +541,7 @@ class ShardPage(ShtikerPage.ShtikerPage): def enter(self): self.askForShardInfoUpdate() self.updateScrollList() - currentShardId = self.getCurrentShardId() + currentShardId = base.localAvatar.defaultShard buttonTuple = self.shardButtonMap.get(currentShardId) if buttonTuple: i = self.shardButtons.index(buttonTuple[0]) @@ -581,16 +572,13 @@ class ShardPage(ShtikerPage.ShtikerPage): def choseShard(self, shardId): zoneId = self.getCurrentZoneId() canonicalHoodId = ZoneUtil.getCanonicalHoodId(base.localAvatar.lastHood) - currentShardId = self.getCurrentShardId() + currentShardId = base.localAvatar.defaultShard if self.currentGroupJoined: self.rejectGroup(5) return if shardId == currentShardId: return - elif shardId == base.localAvatar.defaultShard: - self.doneStatus = {'mode': 'teleport', 'hood': canonicalHoodId} - messenger.send(self.doneEvent) else: try: place = base.cr.playGame.getPlace() diff --git a/toontown/suit/DistributedSuitAI.py b/toontown/suit/DistributedSuitAI.py index 05635e6b..1f3c9e98 100644 --- a/toontown/suit/DistributedSuitAI.py +++ b/toontown/suit/DistributedSuitAI.py @@ -216,7 +216,7 @@ class DistributedSuitAI(DistributedSuitBaseAI.DistributedSuitBaseAI): self.setPathPosition(0, self.pathStartTime) self.pathState = 1 self.currentLeg = 0 - self.zoneId = ZoneUtil.getTrueZoneId(self.legList.getZoneId(0), self.branchId) + self.zoneId = self.legList.getZoneId(0) self.legType = self.legList.getType(0) if self.notify.getDebug(): self.notify.debug('creating suit in zone %s' % self.zoneId) @@ -236,7 +236,6 @@ class DistributedSuitAI(DistributedSuitBaseAI.DistributedSuitBaseAI): self.currentLeg = nextLeg self.__beginLegType(self.legList.getType(nextLeg)) zoneId = self.legList.getZoneId(nextLeg) - zoneId = ZoneUtil.getTrueZoneId(zoneId, self.branchId) if zoneId: self.__enterZone(zoneId) self.notify.debug('Suit %s reached leg %s of %s in zone %s.' % (self.getDoId(), diff --git a/toontown/suit/DistributedSuitPlannerAI.py b/toontown/suit/DistributedSuitPlannerAI.py index fd72e9b0..1047c9de 100644 --- a/toontown/suit/DistributedSuitPlannerAI.py +++ b/toontown/suit/DistributedSuitPlannerAI.py @@ -79,8 +79,6 @@ class DistributedSuitPlannerAI(DistributedObjectAI.DistributedObjectAI, SuitPlan self.SuitHoodInfo[self.hoodInfoIdx][self.SUIT_HOOD_INFO_MIN] + self.SuitHoodInfo[self.hoodInfoIdx][self.SUIT_HOOD_INFO_MAX]) / 2 self.targetNumSuitBuildings = SuitBuildingGlobals.buildingMinMax[self.zoneId][0] - if ZoneUtil.isWelcomeValley(self.zoneId): - self.targetNumSuitBuildings = 0 self.pendingBuildingTracks = [] self.pendingBuildingHeights = [] self.suitList = [] @@ -357,13 +355,9 @@ class DistributedSuitPlannerAI(DistributedObjectAI.DistributedObjectAI, SuitPlan return False numSuitBuildings = len(self.buildingMgr.getSuitBlocks()) if (random.random() * 100) < SuitBuildingGlobals.buildingChance[self.zoneId]: - bmax = SuitBuildingGlobals.buildingMinMax[self.zoneId][1] - if ZoneUtil.isWelcomeValley(self.zoneId): - bmax = 0 - numNeeded = bmax - numSuitBuildings + return SuitBuildingGlobals.buildingMinMax[self.zoneId][1] - numSuitBuildings else: - numNeeded = self.targetNumSuitBuildings - numSuitBuildings - return numNeeded + return self.targetNumSuitBuildings - numSuitBuildings def newSuitShouldAttemptTakeover(self): if not self.SUITS_ENTER_BUILDINGS: diff --git a/toontown/toon/DistributedToonAI.py b/toontown/toon/DistributedToonAI.py index 8512f3cb..a864a683 100644 --- a/toontown/toon/DistributedToonAI.py +++ b/toontown/toon/DistributedToonAI.py @@ -3061,9 +3061,6 @@ class DistributedToonAI(DistributedPlayerAI.DistributedPlayerAI, DistributedSmoo self.air.writeServerEvent('suspicious', self.doId, 'bogus cog summons') self.sendUpdate('cogSummonsResponse', ['fail', suitIndex, 0]) return - if ZoneUtil.isWelcomeValley(self.zoneId): - self.sendUpdate('cogSummonsResponse', ['fail', suitIndex, 0]) - return returnCode = None if type == 'single': returnCode = self.doSummonSingleCog(suitIndex) diff --git a/toontown/toonbase/TTLocalizerEnglish.py b/toontown/toonbase/TTLocalizerEnglish.py index 719e5e49..31846811 100644 --- a/toontown/toonbase/TTLocalizerEnglish.py +++ b/toontown/toonbase/TTLocalizerEnglish.py @@ -131,7 +131,6 @@ CashbotHQ = ('to', 'in', 'Cashbot HQ') LawbotHQ = ('to', 'in', 'Lawbot HQ') Tutorial = ('to the', 'in the', 'Toon-torial') MyEstate = ('to', 'in', 'your house') -WelcomeValley = ('to', 'in', 'Welcome Valley') GolfZone = ('to', 'in', lGolfZone) PartyHood = ('to the', 'in the', lPartyHood) Factory = 'Factory' @@ -3860,7 +3859,6 @@ QuestPosterDialogNo = 'Cancel' ShardPageTitle = 'Districts' ShardPageHelpIntro = 'Each District is a copy of the Toontown world.' ShardPageHelpWhere = ' You are currently in the "%s" District.' -ShardPageHelpWelcomeValley = ' You are currently in the "Welcome Valley" District, within "%s".' ShardPageHelpMove = ' To move to a new District, click on its name.' ShardPagePopulationTotal = 'Total Toontown Population:\n%d' ShardPageScrollTitle = 'Name Population' diff --git a/toontown/toonbase/ToontownGlobals.py b/toontown/toonbase/ToontownGlobals.py index 7cba83ed..f635b3fe 100644 --- a/toontown/toonbase/ToontownGlobals.py +++ b/toontown/toonbase/ToontownGlobals.py @@ -179,7 +179,6 @@ HoodHierarchy = {ToontownCentral: (SillyStreet, LoopyLane, PunchlinePlace), DaisyGardens: (ElmStreet, MapleStreet, OakStreet), DonaldsDreamland: (LullabyLane, PajamaPlace), GoofySpeedway: ()} -WelcomeValleyToken = 0 BossbotHQ = 10000 BossbotLobby = 10100 BossbotCountryClubIntA = 10500 @@ -208,9 +207,7 @@ MyEstate = 16000 GolfZone = 17000 PartyHood = 18000 HoodsAlwaysVisited = [17000, 18000] -WelcomeValleyBegin = 22000 -WelcomeValleyEnd = 61000 -DynamicZonesBegin = 61000 +DynamicZonesBegin = 22000 DynamicZonesEnd = 1 << 20 cogDept2index = {'c': 0, 'l': 1, diff --git a/toontown/town/Street.py b/toontown/town/Street.py index de080620..d3173efe 100644 --- a/toontown/town/Street.py +++ b/toontown/town/Street.py @@ -132,7 +132,7 @@ class Street(BattlePlace.BattlePlace): self.accept('doorDoneEvent', self.handleDoorDoneEvent) self.accept('DistributedDoor_doorTrigger', self.handleDoorTrigger) self.enterZone(requestStatus['zoneId']) - self.tunnelOriginList = base.cr.hoodMgr.addLinkTunnelHooks(self, self.loader.nodeList, self.zoneId) + self.tunnelOriginList = base.cr.hoodMgr.addLinkTunnelHooks(self, self.loader.nodeList) self.fsm.request(requestStatus['how'], [requestStatus]) return diff --git a/toontown/town/TownLoader.py b/toontown/town/TownLoader.py index 0cb5a224..6fe0af40 100644 --- a/toontown/town/TownLoader.py +++ b/toontown/town/TownLoader.py @@ -237,7 +237,6 @@ class TownLoader(StateData.StateData): visGroup = dnaStore.getDNAVisGroupAI(i) groupName = base.cr.hoodMgr.extractGroupName(groupFullName) zoneId = int(groupName) - zoneId = ZoneUtil.getTrueZoneId(zoneId, self.zoneId) groupNode = self.geom.find('**/' + groupFullName) if groupNode.isEmpty(): self.notify.error('Could not find visgroup') @@ -263,12 +262,10 @@ class TownLoader(StateData.StateData): for i in xrange(numVisGroups): groupFullName = dnaStore.getDNAVisGroupName(i) zoneId = int(base.cr.hoodMgr.extractGroupName(groupFullName)) - zoneId = ZoneUtil.getTrueZoneId(zoneId, self.zoneId) for j in xrange(dnaStore.getNumVisiblesInDNAVisGroup(i)): visName = dnaStore.getVisibleName(i, j) groupName = base.cr.hoodMgr.extractGroupName(visName) nextZoneId = int(groupName) - nextZoneId = ZoneUtil.getTrueZoneId(nextZoneId, self.zoneId) visNode = self.zoneDict[nextZoneId] self.nodeDict[zoneId].append(visNode)