mirror of
https://github.com/Sneed-Group/Poodletooth-iLand
synced 2024-12-23 11:42:39 -06:00
DANIEL: Remove Welcome Valley '9a4af9c686edd4c45ea1ced13e72376493fe8a11'
This commit is contained in:
commit
e702145334
30 changed files with 46 additions and 218 deletions
7
dependencies/astron/dclass/stride.dc
vendored
7
dependencies/astron/dclass/stride.dc
vendored
|
@ -246,7 +246,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
|
||||
|
@ -638,12 +637,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;
|
||||
|
|
|
@ -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
|
|
@ -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])
|
|
@ -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
|
|
@ -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',
|
||||
|
@ -236,8 +235,11 @@ class DistributedBuilding(DistributedObject.DistributedObject):
|
|||
pass
|
||||
|
||||
def enterToon(self, ts):
|
||||
if self.getInteractiveProp():
|
||||
self.getInteractiveProp().buildingLiberated(self.doId)
|
||||
prop = self.getInteractiveProp()
|
||||
|
||||
if prop:
|
||||
prop.buildingLiberated(self.doId)
|
||||
|
||||
self.setToToon()
|
||||
|
||||
def exitToon(self):
|
||||
|
@ -256,7 +258,11 @@ class DistributedBuilding(DistributedObject.DistributedObject):
|
|||
pass
|
||||
|
||||
def enterSuit(self, ts):
|
||||
self.makePropSad()
|
||||
prop = self.getInteractiveProp()
|
||||
|
||||
if prop and not prop.state == 'Sad':
|
||||
prop.gotoSad(self.doId)
|
||||
|
||||
self.setToSuit()
|
||||
|
||||
def exitSuit(self):
|
||||
|
@ -438,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)
|
||||
|
@ -541,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)
|
||||
|
@ -921,38 +925,22 @@ class DistributedBuilding(DistributedObject.DistributedObject):
|
|||
self.elevatorNodePath.setPosHpr(0, 0, 0, 0, 0, 0)
|
||||
|
||||
def getSbSearchString(self):
|
||||
result = 'landmarkBlocks/sb' + str(self.block) + ':*_landmark_*_DNARoot'
|
||||
return result
|
||||
return 'landmarkBlocks/sb' + str(self.block) + ':*_landmark_*_DNARoot'
|
||||
|
||||
def adjustSbNodepathScale(self, nodePath):
|
||||
pass
|
||||
|
||||
def getVisZoneId(self):
|
||||
exteriorZoneId = base.cr.playGame.hood.dnaStore.getZoneFromBlockNumber(self.block)
|
||||
visZoneId = ZoneUtil.getTrueZoneId(exteriorZoneId, self.zoneId)
|
||||
return visZoneId
|
||||
return base.cr.playGame.hood.dnaStore.getZoneFromBlockNumber(self.block)
|
||||
|
||||
def getInteractiveProp(self):
|
||||
result = None
|
||||
if self.interactiveProp:
|
||||
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
|
||||
return self.interactiveProp
|
||||
elif base.cr.playGame.hood:
|
||||
loader = base.cr.playGame.hood.loader
|
||||
|
||||
def makePropSad(self):
|
||||
self.notify.debug('makePropSad')
|
||||
if self.getInteractiveProp():
|
||||
if self.getInteractiveProp().state == 'Sad':
|
||||
pass
|
||||
self.getInteractiveProp().gotoSad(self.doId)
|
||||
if hasattr(loader, 'getInteractiveProp'):
|
||||
self.interactiveProp = base.cr.playGame.hood.loader.getInteractiveProp(self.getVisZoneId())
|
||||
|
||||
return self.interactiveProp
|
||||
return None
|
||||
|
|
|
@ -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 = []
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)))
|
||||
|
|
|
@ -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)))
|
||||
|
|
|
@ -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])
|
||||
|
||||
|
|
|
@ -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])
|
||||
|
||||
|
|
|
@ -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)))
|
||||
|
|
|
@ -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)))
|
||||
|
|
|
@ -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')
|
||||
|
|
|
@ -73,7 +73,6 @@ class ToontownClientRepository(OTPClientRepository.OTPClientRepository):
|
|||
self.trophyManager = None
|
||||
self.catalogManager = None
|
||||
self.tutorialManager = None
|
||||
self.welcomeValleyManager = None
|
||||
self.newsManager = None
|
||||
self.streetSign = None
|
||||
self.distributedDistrict = None
|
||||
|
|
|
@ -64,7 +64,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)
|
||||
|
@ -100,7 +100,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')
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -51,7 +51,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)
|
||||
|
@ -62,7 +62,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(
|
||||
|
@ -85,7 +84,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)
|
||||
|
@ -96,7 +95,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(
|
||||
|
|
|
@ -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])
|
||||
|
|
|
@ -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
|
||||
|
||||
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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(),
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -132,7 +132,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'
|
||||
|
@ -3867,7 +3866,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'
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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])
|
||||
self.replaceStreetSignTextures()
|
||||
return
|
||||
|
@ -397,4 +397,4 @@ class Street(BattlePlace.BattlePlace):
|
|||
if inDreamland:
|
||||
sign.setColorScale(0.525, 0.525, 0.525, 1)
|
||||
|
||||
return
|
||||
return
|
||||
|
|
|
@ -233,7 +233,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')
|
||||
|
@ -259,12 +258,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)
|
||||
|
||||
|
|
Loading…
Reference in a new issue