def spawn(air, zone, element, match):
    if zone % 1000 != 0:
        # This should hopefully create the Fishermen NPCs on streets.
        NPCToons.createNpcsInZone(air, zone)
    pond = DistributedFishingPondAI(air)
    area = ZoneUtil.getBranchZone(zone)
    pond.setArea(area)
    pond.generateWithRequired(zone)
    bingoMgr = DistributedPondBingoManagerAI(air)
    bingoMgr.setPondDoId(pond.getDoId())
    bingoMgr.generateWithRequired(zone)
    pond.bingoMgr = bingoMgr
    pond.bingoMgr.createGame()
    simbase.air.fishManager.ponds[zone] = pond
    
    for i in range(FishingTargetGlobals.getNumTargets(area)):
                target = DistributedFishingTargetAI(simbase.air)
                target.setPondDoId(pond.getDoId())
                target.generateWithRequired(zone)
    for child in element.children:
        if isinstance(child, DNAProp) and 'fishing_spot' in child.code:
            spot = DistributedFishingSpotAI(air)
            spot.setPondDoId(pond.getDoId())
            x, y, z = child.getPos()
            h, p, r = child.getHpr()
            spot.setPosHpr(x, y, z, h, p, r)
            spot.generateWithRequired(zone)
    def announceGenerate(self):
        DistributedObjectAI.announceGenerate(self)

        # Spawn our treasures:
        self.treasurePlanner = ETreasurePlannerAI(self.zoneId)
        self.treasurePlanner.start()

        # Generate our fishing pond:
        self.pond = DistributedFishingPondAI(self.air)
        self.pond.setArea(ToontownGlobals.Zones.MyEstate)
        self.pond.generateWithRequired(self.zoneId)
        self.pond.generateTargets()

        # Generate our fishing spots:
        for i in xrange(len(self.spotPosHpr)):
            spot = DistributedFishingSpotAI(self.air)
            spot.setPondDoId(self.pond.doId)
            spot.setPosHpr(*self.spotPosHpr[i])
            if not isinstance(spot, DistributedFishingSpotAI):
                self.notify.warning('Failed to generate spot for pond %d!' %
                                    self.pond.doId)
                continue

            spot.generateWithRequired(self.zoneId)
            self.pond.addSpot(spot)

        # Start the collision loop:
        taskMgr.add(self.__collisionLoop,
                    self.uniqueName('collisionLoop'),
                    sort=30)
Exemple #3
0
 def generateSpots(self, dnaData, fishingPond):
     zoneId = fishingPond.zoneId
     doId = fishingPond.doId
     fishingSpot = DistributedFishingSpotAI(self.air)
     fishingSpot.setPondDoId(doId)
     x, y, z = dnaData.getPos()
     h, p, r = dnaData.getHpr()
     fishingSpot.setPosHpr(x, y, z, h, p, r)
     fishingSpot.generateWithRequired(zoneId)
     return fishingSpot
Exemple #4
0
    def generate(self):
        DistributedObjectAI.generate(self)
        self.pond = DistributedFishingPondAI(simbase.air)
        self.pond.setArea(ToontownGlobals.MyEstate)
        self.pond.generateWithRequired(self.zoneId)
        for i in range(FishingTargetGlobals.getNumTargets(ToontownGlobals.MyEstate)):
            target = DistributedFishingTargetAI(self.air)
            target.setPondDoId(self.pond.getDoId())
            target.generateWithRequired(self.zoneId)
            self.targets.append(target)

        spot = DistributedFishingSpotAI(self.air)
        spot.setPondDoId(self.pond.getDoId())
        spot.setPosHpr(49.1029, -124.805, 0.344704, 90, 0, 0)
        spot.generateWithRequired(self.zoneId)
        self.spots.append(spot)
        spot = DistributedFishingSpotAI(self.air)
        spot.setPondDoId(self.pond.getDoId())
        spot.setPosHpr(46.5222, -134.739, 0.390713, 75, 0, 0)
        spot.generateWithRequired(self.zoneId)
        self.spots.append(spot)
        spot = DistributedFishingSpotAI(self.air)
        spot.setPondDoId(self.pond.getDoId())
        spot.setPosHpr(41.31, -144.559, 0.375978, 45, 0, 0)
        spot.generateWithRequired(self.zoneId)
        self.spots.append(spot)
        spot = DistributedFishingSpotAI(self.air)
        spot.setPondDoId(self.pond.getDoId())
        spot.setPosHpr(46.8254, -113.682, 0.46015, 135, 0, 0)
        spot.generateWithRequired(self.zoneId)
        self.spots.append(spot)
        self.createTreasurePlanner()
    def findFishingSpots(self, dnaGroup, fishingPond):
        fishingSpots = []
        if isinstance(dnaGroup, DNAGroup) and ('fishing_spot' in dnaGroup.getName()):
            fishingSpot = DistributedFishingSpotAI(simbase.air)
            fishingSpot.setPondDoId(fishingPond.doId)
            x, y, z = dnaGroup.getPos()
            h, p, r = dnaGroup.getHpr()
            fishingSpot.setPosHpr(x, y, z, h, p, r)
            fishingSpot.generateWithRequired(fishingPond.zoneId)

            fishingSpots.append(fishingSpot)
        for i in xrange(dnaGroup.getNumChildren()):
            foundFishingSpots = self.findFishingSpots(dnaGroup.at(i), fishingPond)
            fishingSpots.extend(foundFishingSpots)
        return fishingSpots
Exemple #6
0
    def generate(self):
        DistributedObjectAI.generate(self)

        # Gone fishin'
        self.pond = DistributedFishingPondAI(simbase.air)
        self.pond.setArea(ToontownGlobals.MyEstate)
        self.pond.generateWithRequired(self.zoneId)

        for i in range(
                FishingTargetGlobals.getNumTargets(ToontownGlobals.MyEstate)):
            target = DistributedFishingTargetAI(self.air)
            target.setPondDoId(self.pond.getDoId())
            target.generateWithRequired(self.zoneId)
            self.targets.append(target)

        for i in xrange(6):
            avItems = self.items[i]
            for item in avItems:
                type, hardPoint, waterLevel, growthLevel, optional = item
                if type == 2:  # broken for now, rip
                    boxes = GardenGlobals.estateBoxes[i]
                    box = DistributedGardenBoxAI(self.air)
                    box.setPlot(i)
                    box.setOwnerIndex(i)
                    box.setTypeIndex(boxes[hardPoint][3])
                    box.setPosition(boxes[hardPoint][0], boxes[hardPoint][1],
                                    20)
                    box.setHeading(boxes[hardPoint][2])
                    box.generateWithRequired(self.zoneId)

        spot = DistributedFishingSpotAI(self.air)
        spot.setPondDoId(self.pond.getDoId())
        spot.setPosHpr(49.1029, -124.805, 0.344704, 90, 0, 0)
        spot.generateWithRequired(self.zoneId)
        self.spots.append(spot)

        spot = DistributedFishingSpotAI(self.air)
        spot.setPondDoId(self.pond.getDoId())
        spot.setPosHpr(46.5222, -134.739, 0.390713, 75, 0, 0)
        spot.generateWithRequired(self.zoneId)
        self.spots.append(spot)

        spot = DistributedFishingSpotAI(self.air)
        spot.setPondDoId(self.pond.getDoId())
        spot.setPosHpr(41.31, -144.559, 0.375978, 45, 0, 0)
        spot.generateWithRequired(self.zoneId)
        self.spots.append(spot)

        spot = DistributedFishingSpotAI(self.air)
        spot.setPondDoId(self.pond.getDoId())
        spot.setPosHpr(46.8254, -113.682, 0.46015, 135, 0, 0)
        spot.generateWithRequired(self.zoneId)
        self.spots.append(spot)

        # Let's place some popsicles
        self.createTreasurePlanner()
    def generate(self):
        DistributedObjectAI.generate(self)

        # Gone fishin'
        self.pond = DistributedFishingPondAI(simbase.air)
        self.pond.setArea(ToontownGlobals.MyEstate)
        self.pond.generateWithRequired(self.zoneId)

        for i in range(FishingTargetGlobals.getNumTargets(ToontownGlobals.MyEstate)):
            target = DistributedFishingTargetAI(self.air)
            target.setPondDoId(self.pond.getDoId())
            target.generateWithRequired(self.zoneId)
            self.targets.append(target)

        for i in xrange(6):
            avItems = self.items[i]
            for item in avItems:
                type, hardPoint, waterLevel, growthLevel, optional = item
                if type == 2: # broken for now, rip
                    boxes = GardenGlobals.estateBoxes[i]
                    box = DistributedGardenBoxAI(self.air)
                    box.setPlot(i)
                    box.setOwnerIndex(i)
                    box.setTypeIndex(boxes[hardPoint][3])
                    box.setPosition(boxes[hardPoint][0], boxes[hardPoint][1], 20)
                    box.setHeading(boxes[hardPoint][2])
                    box.generateWithRequired(self.zoneId)

        spot = DistributedFishingSpotAI(self.air)
        spot.setPondDoId(self.pond.getDoId())
        spot.setPosHpr(49.1029, -124.805, 0.344704, 90, 0, 0)
        spot.generateWithRequired(self.zoneId)
        self.spots.append(spot)

        spot = DistributedFishingSpotAI(self.air)
        spot.setPondDoId(self.pond.getDoId())
        spot.setPosHpr(46.5222, -134.739, 0.390713, 75, 0, 0)
        spot.generateWithRequired(self.zoneId)
        self.spots.append(spot)

        spot = DistributedFishingSpotAI(self.air)
        spot.setPondDoId(self.pond.getDoId())
        spot.setPosHpr(41.31, -144.559, 0.375978, 45, 0, 0)
        spot.generateWithRequired(self.zoneId)
        self.spots.append(spot)

        spot = DistributedFishingSpotAI(self.air)
        spot.setPondDoId(self.pond.getDoId())
        spot.setPosHpr(46.8254, -113.682, 0.46015, 135, 0, 0)
        spot.generateWithRequired(self.zoneId)
        self.spots.append(spot)

        # Let's place some popsicles
        self.createTreasurePlanner()
Exemple #8
0
    def generate(self):
        DistributedObjectAI.generate(self)

        self.pond = DistributedFishingPondAI(simbase.air)
        self.pond.setArea(ToontownGlobals.MyEstate)
        self.pond.generateWithRequired(self.zoneId)

        for i in range(
                FishingTargetGlobals.getNumTargets(ToontownGlobals.MyEstate)):
            target = DistributedFishingTargetAI(self.air)
            target.setPondDoId(self.pond.getDoId())
            target.generateWithRequired(self.zoneId)
            self.targets.append(target)

        self.treasurePlanner = ETreasurePlannerAI.ETreasurePlannerAI(
            self.zoneId)
        self.treasurePlanner.start()

        spot = DistributedFishingSpotAI(self.air)
        spot.setPondDoId(self.pond.getDoId())
        spot.setPosHpr(49.1029, -124.805, 0.344704, 90, 0, 0)
        spot.generateWithRequired(self.zoneId)
        self.spots.append(spot)

        spot = DistributedFishingSpotAI(self.air)
        spot.setPondDoId(self.pond.getDoId())
        spot.setPosHpr(46.5222, -134.739, 0.390713, 75, 0, 0)
        spot.generateWithRequired(self.zoneId)
        self.spots.append(spot)

        spot = DistributedFishingSpotAI(self.air)
        spot.setPondDoId(self.pond.getDoId())
        spot.setPosHpr(41.31, -144.559, 0.375978, 45, 0, 0)
        spot.generateWithRequired(self.zoneId)
        self.spots.append(spot)

        spot = DistributedFishingSpotAI(self.air)
        spot.setPondDoId(self.pond.getDoId())
        spot.setPosHpr(46.8254, -113.682, 0.46015, 135, 0, 0)
        spot.generateWithRequired(self.zoneId)
        self.spots.append(spot)

        ButterflyGlobals.generateIndexes(self.zoneId, ButterflyGlobals.ESTATE)
        for i in range(
                0,
                ButterflyGlobals.NUM_BUTTERFLY_AREAS[ButterflyGlobals.ESTATE]):
            for j in range(
                    0,
                    ButterflyGlobals.NUM_BUTTERFLIES[ButterflyGlobals.ESTATE]):
                bfly = DistributedButterflyAI.DistributedButterflyAI(
                    self.air, ButterflyGlobals.ESTATE, i, self.zoneId)
                bfly.generateWithRequired(self.zoneId)
                bfly.start()
                self.addDistObj(bfly)
Exemple #9
0
    def generate(self):
        DistributedObjectAI.generate(self)

        self.pond = DistributedFishingPondAI(self.air)
        self.pond.setArea(ToontownGlobals.MyEstate)
        self.pond.generateWithRequired(self.zoneId)

        self.pond.bingoMgr = DistributedPondBingoManagerAI(self.air)
        self.pond.bingoMgr.setPondDoId(self.pond.doId)
        self.pond.bingoMgr.generateWithRequired(self.zoneId)

        if self.air.holidayManager.isHolidayRunning(
                ToontownGlobals.FISH_BINGO_NIGHT):
            self.pond.bingoMgr.enableBingo()

        for i in xrange(
                FishingTargetGlobals.getNumTargets(ToontownGlobals.MyEstate)):
            target = DistributedFishingTargetAI(self.air)
            target.setPondDoId(self.pond.getDoId())
            target.generateWithRequired(self.zoneId)
            self.targets.append(target)

        if simbase.config.GetBool('want-estate-fisherman', False):
            self.fisherman = NPCToons.createNPC(self.air, 91919,
                                                NPCToons.NPCToonDict[91919],
                                                self.zoneId)

        spot = DistributedFishingSpotAI(self.air)
        spot.setPondDoId(self.pond.getDoId())
        spot.setPosHpr(49.1029, -124.805, 0.344704, 90, 0, 0)
        spot.generateWithRequired(self.zoneId)
        self.spots.append(spot)

        spot = DistributedFishingSpotAI(self.air)
        spot.setPondDoId(self.pond.getDoId())
        spot.setPosHpr(46.5222, -134.739, 0.390713, 75, 0, 0)
        spot.generateWithRequired(self.zoneId)
        self.spots.append(spot)

        spot = DistributedFishingSpotAI(self.air)
        spot.setPondDoId(self.pond.getDoId())
        spot.setPosHpr(41.31, -144.559, 0.375978, 45, 0, 0)
        spot.generateWithRequired(self.zoneId)
        self.spots.append(spot)

        spot = DistributedFishingSpotAI(self.air)
        spot.setPondDoId(self.pond.getDoId())
        spot.setPosHpr(46.8254, -113.682, 0.46015, 135, 0, 0)
        spot.generateWithRequired(self.zoneId)
        self.spots.append(spot)

        self.createTreasurePlanner()
    def generate(self):
        DistributedObjectAI.generate(self)
        
        self.pond = DistributedFishingPondAI(simbase.air)
        self.pond.setArea(ToontownGlobals.MyEstate)
        self.pond.generateWithRequired(self.zoneId)
        self.pond.start()

        treasureType, healAmount, spawnPoints, spawnRate, maxTreasures = TreasureGlobals.SafeZoneTreasureSpawns[ToontownGlobals.MyEstate]
        self.treasurePlanner = SZTreasurePlannerAI(self.zoneId, treasureType, healAmount, spawnPoints, spawnRate, maxTreasures)
        self.treasurePlanner.start()

        spot = DistributedFishingSpotAI(self.air)
        spot.setPondDoId(self.pond.getDoId())
        spot.setPosHpr(49.1029, -124.805, 0.344704, 90, 0, 0)
        spot.generateWithRequired(self.zoneId)
        self.spots.append(spot)

        spot = DistributedFishingSpotAI(self.air)
        spot.setPondDoId(self.pond.getDoId())
        spot.setPosHpr(46.5222, -134.739, 0.390713, 75, 0, 0)
        spot.generateWithRequired(self.zoneId)
        self.spots.append(spot)

        spot = DistributedFishingSpotAI(self.air)
        spot.setPondDoId(self.pond.getDoId())
        spot.setPosHpr(41.31, -144.559, 0.375978, 45, 0, 0)
        spot.generateWithRequired(self.zoneId)
        self.spots.append(spot)

        spot = DistributedFishingSpotAI(self.air)
        spot.setPondDoId(self.pond.getDoId())
        spot.setPosHpr(46.8254, -113.682, 0.46015, 135, 0, 0)
        spot.generateWithRequired(self.zoneId)
        self.spots.append(spot)
        
        self.jukebox = DistributedPartyJukeboxActivityAI(self.air, self.doId, (0, 0, 0, 0))
        self.jukebox.generateWithRequired(self.zoneId)
        self.jukebox.sendUpdate('setX', [-21.8630])
        self.jukebox.sendUpdate('setY', [-154.669])
        self.jukebox.sendUpdate('setH', [148.7050])
        self.jukebox.sendUpdate('unloadSign')

        ButterflyGlobals.generateIndexes(self.zoneId, ButterflyGlobals.ESTATE)
        for i in xrange(0, ButterflyGlobals.NUM_BUTTERFLY_AREAS[ButterflyGlobals.ESTATE]):
            for j in xrange(0, ButterflyGlobals.NUM_BUTTERFLIES[ButterflyGlobals.ESTATE]):
                butterfly = DistributedButterflyAI.DistributedButterflyAI(self.air, ButterflyGlobals.ESTATE, i, self.zoneId)
                butterfly.generateWithRequired(self.zoneId)
                butterfly.start()
                self.butterflies.append(butterfly)
Exemple #11
0
    def generate(self):
        DistributedObjectAI.generate(self)
        self.pond = DistributedFishingPondAI(simbase.air)
        self.pond.setArea(ToontownGlobals.MyEstate)
        self.pond.generateWithRequired(self.zoneId)
        for i in xrange(
                FishingTargetGlobals.getNumTargets(ToontownGlobals.MyEstate)):
            target = DistributedFishingTargetAI(self.air)
            target.setPondDoId(self.pond.getDoId())
            target.generateWithRequired(self.zoneId)
            self.targets.append(target)

        spot = DistributedFishingSpotAI(self.air)
        spot.setPondDoId(self.pond.getDoId())
        spot.setPosHpr(49.1029, -124.805, 0.344704, 90, 0, 0)
        spot.generateWithRequired(self.zoneId)
        self.spots.append(spot)
        spot = DistributedFishingSpotAI(self.air)
        spot.setPondDoId(self.pond.getDoId())
        spot.setPosHpr(46.5222, -134.739, 0.390713, 75, 0, 0)
        spot.generateWithRequired(self.zoneId)
        self.spots.append(spot)
        spot = DistributedFishingSpotAI(self.air)
        spot.setPondDoId(self.pond.getDoId())
        spot.setPosHpr(41.31, -144.559, 0.375978, 45, 0, 0)
        spot.generateWithRequired(self.zoneId)
        self.spots.append(spot)
        spot = DistributedFishingSpotAI(self.air)
        spot.setPondDoId(self.pond.getDoId())
        spot.setPosHpr(46.8254, -113.682, 0.46015, 135, 0, 0)
        spot.generateWithRequired(self.zoneId)
        self.spots.append(spot)
        self.createTreasurePlanner()
        self.jukebox = DistributedPartyJukebox40ActivityAI.DistributedPartyJukebox40ActivityAI(
            self.air, self.doId, (0, 0, 0, 0))
        self.jukebox.generateWithRequired(self.zoneId)
        self.jukebox.sendUpdate('setX', [118])
        self.jukebox.sendUpdate('setY', [-18])
        self.jukebox.sendUpdate('setH', [-80])
        doIds = []
        for i in range(40):
            x = random.randint(100, 300) - 200
            y = random.randint(100, 300) - 200
            treasure = DistributedTreasureAI.DistributedTreasureAI(
                self.air, self, 8, x, y, 35)
            treasure.generateWithRequired(self.zoneId)
            self.treasures.append(treasure)
            doIds.append(treasure.doId)

        self.setTreasureIds(doIds)
    def generate(self):
        DistributedObjectAI.generate(self)

        self.pond = DistributedFishingPondAI(self.air)
        self.pond.setArea(ToontownGlobals.MyEstate)
        self.pond.generateWithRequired(self.zoneId)

        self.pond.bingoMgr = DistributedPondBingoManagerAI(self.air)
        self.pond.bingoMgr.setPondDoId(self.pond.doId)
        self.pond.bingoMgr.generateWithRequired(self.zoneId)

        if self.air.holidayManager.isHolidayRunning(ToontownGlobals.FISH_BINGO_NIGHT):
            self.pond.bingoMgr.enableBingo()

        for i in xrange(FishingTargetGlobals.getNumTargets(ToontownGlobals.MyEstate)):
            target = DistributedFishingTargetAI(self.air)
            target.setPondDoId(self.pond.getDoId())
            target.generateWithRequired(self.zoneId)
            self.targets.append(target)

        if simbase.config.GetBool('want-estate-fisherman', False):
            self.fisherman = NPCToons.createNPC(self.air, 91919,
                                NPCToons.NPCToonDict[91919], self.zoneId)

        spot = DistributedFishingSpotAI(self.air)
        spot.setPondDoId(self.pond.getDoId())
        spot.setPosHpr(49.1029, -124.805, 0.344704, 90, 0, 0)
        spot.generateWithRequired(self.zoneId)
        self.spots.append(spot)

        spot = DistributedFishingSpotAI(self.air)
        spot.setPondDoId(self.pond.getDoId())
        spot.setPosHpr(46.5222, -134.739, 0.390713, 75, 0, 0)
        spot.generateWithRequired(self.zoneId)
        self.spots.append(spot)

        spot = DistributedFishingSpotAI(self.air)
        spot.setPondDoId(self.pond.getDoId())
        spot.setPosHpr(41.31, -144.559, 0.375978, 45, 0, 0)
        spot.generateWithRequired(self.zoneId)
        self.spots.append(spot)

        spot = DistributedFishingSpotAI(self.air)
        spot.setPondDoId(self.pond.getDoId())
        spot.setPosHpr(46.8254, -113.682, 0.46015, 135, 0, 0)
        spot.generateWithRequired(self.zoneId)
        self.spots.append(spot)

        self.createTreasurePlanner()
    def generate(self):
        DistributedObjectAI.generate(self)
        
        self.pond = DistributedFishingPondAI(simbase.air)
        self.pond.setArea(ToontownGlobals.MyEstate)
        self.pond.generateWithRequired(self.zoneId)
            
        for i in range(FishingTargetGlobals.getNumTargets(ToontownGlobals.MyEstate)):
            target = DistributedFishingTargetAI(self.air)
            target.setPondDoId(self.pond.getDoId())
            target.generateWithRequired(self.zoneId)
            self.targets.append(target)

        self.treasurePlanner = ETreasurePlannerAI.ETreasurePlannerAI(self.zoneId)
        self.treasurePlanner.start()

        spot = DistributedFishingSpotAI(self.air)
        spot.setPondDoId(self.pond.getDoId())
        spot.setPosHpr(49.1029, -124.805, 0.344704, 90, 0, 0)
        spot.generateWithRequired(self.zoneId)
        self.spots.append(spot)

        spot = DistributedFishingSpotAI(self.air)
        spot.setPondDoId(self.pond.getDoId())
        spot.setPosHpr(46.5222, -134.739, 0.390713, 75, 0, 0)
        spot.generateWithRequired(self.zoneId)
        self.spots.append(spot)

        spot = DistributedFishingSpotAI(self.air)
        spot.setPondDoId(self.pond.getDoId())
        spot.setPosHpr(41.31, -144.559, 0.375978, 45, 0, 0)
        spot.generateWithRequired(self.zoneId)
        self.spots.append(spot)

        spot = DistributedFishingSpotAI(self.air)
        spot.setPondDoId(self.pond.getDoId())
        spot.setPosHpr(46.8254, -113.682, 0.46015, 135, 0, 0)
        spot.generateWithRequired(self.zoneId)
        self.spots.append(spot)

        ButterflyGlobals.generateIndexes(self.zoneId, ButterflyGlobals.ESTATE)
        for i in range(0, ButterflyGlobals.NUM_BUTTERFLY_AREAS[ButterflyGlobals.ESTATE]):
            for j in range(0, ButterflyGlobals.NUM_BUTTERFLIES[ButterflyGlobals.ESTATE]):
                bfly = DistributedButterflyAI.DistributedButterflyAI(self.air, ButterflyGlobals.ESTATE, i, self.zoneId)
                bfly.generateWithRequired(self.zoneId)
                bfly.start()
                self.addDistObj(bfly)
    def generate(self):
        DistributedObjectAI.generate(self)

        self.pond = DistributedFishingPondAI(simbase.air)
        self.pond.setArea(ToontownGlobals.MyEstate)
        self.pond.generateWithRequired(self.zoneId)

        for i in range(
                FishingTargetGlobals.getNumTargets(ToontownGlobals.MyEstate)):
            target = DistributedFishingTargetAI(self.air)
            target.setPondDoId(self.pond.getDoId())
            target.generateWithRequired(self.zoneId)
            self.targets.append(target)

        spot = DistributedFishingSpotAI(self.air)
        spot.setPondDoId(self.pond.getDoId())
        spot.setPosHpr(49.1029, -124.805, 0.344704, 90, 0, 0)
        spot.generateWithRequired(self.zoneId)
        self.spots.append(spot)

        spot = DistributedFishingSpotAI(self.air)
        spot.setPondDoId(self.pond.getDoId())
        spot.setPosHpr(46.5222, -134.739, 0.390713, 75, 0, 0)
        spot.generateWithRequired(self.zoneId)
        self.spots.append(spot)

        spot = DistributedFishingSpotAI(self.air)
        spot.setPondDoId(self.pond.getDoId())
        spot.setPosHpr(41.31, -144.559, 0.375978, 45, 0, 0)
        spot.generateWithRequired(self.zoneId)
        self.spots.append(spot)

        spot = DistributedFishingSpotAI(self.air)
        spot.setPondDoId(self.pond.getDoId())
        spot.setPosHpr(46.8254, -113.682, 0.46015, 135, 0, 0)
        spot.generateWithRequired(self.zoneId)
        self.spots.append(spot)
        NPCToons.createNPC(simbase.air,
                           16010,
                           (self.zoneId, TTLocalizer.NPCToonNames[16010],
                            ('mss', 'm', 'm', 'm', 36, 36, 36, 36, 86, 27, 75,
                             27, 0, 18), 'm', 0, NPCToons.NPC_FISHERMAN),
                           self.zoneId,
                           posIndex=0)
        self.createTreasurePlanner()
    def generate(self):
        DistributedObjectAI.generate(self)
        
        self.pond = DistributedFishingPondAI(simbase.air)
        self.pond.setArea(ToontownGlobals.MyEstate)
        self.pond.generateWithRequired(self.zoneId)
        self.pond.start()

        treasureType, healAmount, spawnPoints, spawnRate, maxTreasures = TreasureGlobals.SafeZoneTreasureSpawns[ToontownGlobals.MyEstate]
        self.treasurePlanner = SZTreasurePlannerAI(self.zoneId, treasureType, healAmount, spawnPoints, spawnRate, maxTreasures)
        self.treasurePlanner.start()

        spot = DistributedFishingSpotAI(self.air)
        spot.setPondDoId(self.pond.getDoId())
        spot.setPosHpr(49.1029, -124.805, 0.344704, 90, 0, 0)
        spot.generateWithRequired(self.zoneId)
        self.spots.append(spot)

        spot = DistributedFishingSpotAI(self.air)
        spot.setPondDoId(self.pond.getDoId())
        spot.setPosHpr(46.5222, -134.739, 0.390713, 75, 0, 0)
        spot.generateWithRequired(self.zoneId)
        self.spots.append(spot)

        spot = DistributedFishingSpotAI(self.air)
        spot.setPondDoId(self.pond.getDoId())
        spot.setPosHpr(41.31, -144.559, 0.375978, 45, 0, 0)
        spot.generateWithRequired(self.zoneId)
        self.spots.append(spot)

        spot = DistributedFishingSpotAI(self.air)
        spot.setPondDoId(self.pond.getDoId())
        spot.setPosHpr(46.8254, -113.682, 0.46015, 135, 0, 0)
        spot.generateWithRequired(self.zoneId)
        self.spots.append(spot)
        
        ButterflyGlobals.generateIndexes(self.zoneId, ButterflyGlobals.ESTATE)
        for i in xrange(0, ButterflyGlobals.NUM_BUTTERFLY_AREAS[ButterflyGlobals.ESTATE]):
            for j in xrange(0, ButterflyGlobals.NUM_BUTTERFLIES[ButterflyGlobals.ESTATE]):
                butterfly = DistributedButterflyAI.DistributedButterflyAI(self.air, ButterflyGlobals.ESTATE, i, self.zoneId)
                butterfly.generateWithRequired(self.zoneId)
                butterfly.start()
                self.butterflies.append(butterfly)
    def generate(self):
        DistributedObjectAI.generate(self)
        
        self.pond = DistributedFishingPondAI(simbase.air)
        self.pond.setArea(ToontownGlobals.MyEstate)
        self.pond.generateWithRequired(self.zoneId)
            
        for i in xrange(FishingTargetGlobals.getNumTargets(ToontownGlobals.MyEstate)):
            target = DistributedFishingTargetAI(self.air)
            target.setPondDoId(self.pond.getDoId())
            target.generateWithRequired(self.zoneId)
            self.targets.append(target)


        spot = DistributedFishingSpotAI(self.air)
        spot.setPondDoId(self.pond.getDoId())
        spot.setPosHpr(49.1029, -124.805, 0.344704, 90, 0, 0)
        spot.generateWithRequired(self.zoneId)
        self.spots.append(spot)

        spot = DistributedFishingSpotAI(self.air)
        spot.setPondDoId(self.pond.getDoId())
        spot.setPosHpr(46.5222, -134.739, 0.390713, 75, 0, 0)
        spot.generateWithRequired(self.zoneId)
        self.spots.append(spot)

        spot = DistributedFishingSpotAI(self.air)
        spot.setPondDoId(self.pond.getDoId())
        spot.setPosHpr(41.31, -144.559, 0.375978, 45, 0, 0)
        spot.generateWithRequired(self.zoneId)
        self.spots.append(spot)

        spot = DistributedFishingSpotAI(self.air)
        spot.setPondDoId(self.pond.getDoId())
        spot.setPosHpr(46.8254, -113.682, 0.46015, 135, 0, 0)
        spot.generateWithRequired(self.zoneId)
        self.spots.append(spot)

        self.createTreasurePlanner()
Exemple #17
0
    def generate(self):
        DistributedObjectAI.generate(self)

        self.pond = DistributedFishingPondAI(simbase.air)
        self.pond.setArea(ToontownGlobals.MyEstate)
        self.pond.generateWithRequired(self.zoneId)

        for i in xrange(
                FishingTargetGlobals.getNumTargets(ToontownGlobals.MyEstate)):
            target = DistributedFishingTargetAI(self.air)
            target.setPondDoId(self.pond.getDoId())
            target.generateWithRequired(self.zoneId)
            self.targets.append(target)

        spot = DistributedFishingSpotAI(self.air)
        spot.setPondDoId(self.pond.getDoId())
        spot.setPosHpr(49.1029, -124.805, 0.344704, 90, 0, 0)
        spot.generateWithRequired(self.zoneId)
        self.spots.append(spot)

        spot = DistributedFishingSpotAI(self.air)
        spot.setPondDoId(self.pond.getDoId())
        spot.setPosHpr(46.5222, -134.739, 0.390713, 75, 0, 0)
        spot.generateWithRequired(self.zoneId)
        self.spots.append(spot)

        spot = DistributedFishingSpotAI(self.air)
        spot.setPondDoId(self.pond.getDoId())
        spot.setPosHpr(41.31, -144.559, 0.375978, 45, 0, 0)
        spot.generateWithRequired(self.zoneId)
        self.spots.append(spot)

        spot = DistributedFishingSpotAI(self.air)
        spot.setPondDoId(self.pond.getDoId())
        spot.setPosHpr(46.8254, -113.682, 0.46015, 135, 0, 0)
        spot.generateWithRequired(self.zoneId)
        self.spots.append(spot)

        self.createTreasurePlanner()

        self.jukebox = DistributedPartyJukebox40ActivityAI.DistributedPartyJukebox40ActivityAI(
            self.air, self.doId, (0, 0, 0, 0))
        self.jukebox.generateWithRequired(self.zoneId)
        self.jukebox.sendUpdate('setX', [118])
        self.jukebox.sendUpdate('setY', [-18])
        self.jukebox.sendUpdate('setH', [-80])

        # trampoline = DistributedPartyTrampolineActivityAI.DistributedPartyTrampolineActivityAI(self.air, self.doId, (0, 0, 0, 0))
        # trampoline.generateWithRequired(self.zoneId)
        # trampoline.sendUpdate('setX', [-130])
        # trampoline.sendUpdate('setY', [27])
        # trampoline.sendUpdate('setH', [80])
        # self.trampolines.append(trampoline)

        # trampoline2 = DistributedPartyTrampolineActivityAI.DistributedPartyTrampolineActivityAI(self.air, self.doId, (0, 0, 0, 0))
        # trampoline2.generateWithRequired(self.zoneId)
        # trampoline2.sendUpdate('setX', [-104])
        # trampoline2.sendUpdate('setY', [-56])
        # trampoline2.sendUpdate('setH', [80])
        # self.trampolines.append(trampoline2)

        # self.target = DistributedTargetAI(self.air)
        # self.target.generateWithRequired(self.zoneId)
        # self.target.setPosition(0, 0, 40)
        # for drop in CannonGlobals.cannonDrops:
        # cannon = DistributedCannonAI(self.air)
        # cannon.setEstateId(self.doId)
        # cannon.setTargetId(self.target.doId)
        # cannon.setPosHpr(*drop)
        # cannon.generateWithRequired(self.zoneId)
        # self.cannons.append(cannon)
        # self.b_setClouds(True)
        doIds = []
        for i in range(40):
            x = random.randint(100, 300) - 200
            y = random.randint(100, 300) - 200
            treasure = DistributedTreasureAI.DistributedTreasureAI(
                self.air, self, 8, x, y, 35)
            treasure.generateWithRequired(self.zoneId)
            self.treasures.append(treasure)
            doIds.append(treasure.doId)
        self.setTreasureIds(doIds)
    def _createObjects(self, group, zone):
        if group.getName()[:13] == "fishing_pond_":
            visGroup = group.getVisGroup()
            pondZone = 0
            if visGroup is None:
                pondZone = zone
            else:
                pondZone = int(visGroup.getName().split(":")[0])

            pondIndex = int(group.getName()[13:])
            pond = DistributedFishingPondAI(simbase.air)
            pond.setArea(zone)
            pond.generateWithRequired(pondZone)

            bingoManager = DistributedPondBingoManagerAI(simbase.air)
            bingoManager.setPondDoId(pond.getDoId())
            bingoManager.generateWithRequired(pondZone)
            # temporary, until we have scheduled stuff
            bingoManager.createGame()
            pond.bingoMgr = bingoManager
            simbase.air.fishManager.ponds[zone] = pond

            for i in range(FishingTargetGlobals.getNumTargets(zone)):
                target = DistributedFishingTargetAI(simbase.air)
                target.setPondDoId(pond.getDoId())
                target.generateWithRequired(pondZone)

            for i in range(group.getNumChildren()):
                posSpot = group.at(i)
                if posSpot.getName()[:13] == "fishing_spot_":
                    posSpot = group.atAsNode(i)
                    spot = DistributedFishingSpotAI(simbase.air)
                    spot.setPondDoId(pond.getDoId())
                    x, y, z = posSpot.getPos()
                    h, p, r = posSpot.getHpr()
                    spot.setPosHpr(x, y, z, h, p, r)
                    spot.generateWithRequired(pondZone)

            NPCToons.createNpcsInZone(simbase.air, pondZone)

        elif group.getName()[:10] == "racing_pad":
            index, dest = group.getName()[11:].split("_", 2)
            index = int(index)

            pad = DistributedRacePadAI(simbase.air)
            pad.setArea(zone)
            pad.nameType = dest
            pad.index = index
            nri = RaceGlobals.getNextRaceInfo(-1, dest, index)
            pad.setTrackInfo([nri[0], nri[1]])
            pad.generateWithRequired(zone)
            for i in range(group.getNumChildren()):
                posSpot = group.at(i)
                if posSpot.getName()[:14] == "starting_block":
                    spotIndex = int(posSpot.getName()[15:])
                    posSpot = group.atAsNode(i)
                    x, y, z = posSpot.getPos()
                    h, p, r = posSpot.getHpr()
                    startingBlock = DistributedStartingBlockAI(simbase.air)
                    startingBlock.setPosHpr(x, y, z, h, p, r)
                    startingBlock.setPadDoId(pad.getDoId())
                    startingBlock.setPadLocationId(index)
                    startingBlock.generateWithRequired(zone)
                    pad.addStartingBlock(startingBlock)

        elif group.getName()[:11] == "viewing_pad":
            pad = DistributedViewPadAI(simbase.air)
            pad.setArea(zone)
            pad.generateWithRequired(zone)
            for i in range(group.getNumChildren()):
                posSpot = group.at(i)
                if posSpot.getName()[:14] == "starting_block":
                    spotIndex = int(posSpot.getName()[15:])
                    posSpot = group.atAsNode(i)
                    x, y, z = posSpot.getPos()
                    h, p, r = posSpot.getHpr()
                    startingBlock = DistributedViewingBlockAI(simbase.air)
                    startingBlock.setPosHpr(x, y, z, h, p, r)
                    startingBlock.setPadDoId(pad.getDoId())
                    startingBlock.setPadLocationId(0)
                    startingBlock.generateWithRequired(zone)
                    pad.addStartingBlock(startingBlock)

        elif group.getName()[:13] == "picnic_table_" and zone != 7000:
            pos = group.getPos()
            hpr = group.getHpr()
            nameInfo = group.getName().split("_")
            picnicTable = DistributedPicnicBasketAI.DistributedPicnicBasketAI(
                simbase.air, nameInfo[2], pos[0], pos[1], pos[2], hpr[0], hpr[1], hpr[2]
            )
            picnicTable.generateWithRequired(zone)
            picnicTable.start()

        elif group.getName() == "prop_game_table_DNARoot" and config.GetBool("want-oz-game-tables", True):
            pos = group.getPos()
            hpr = group.getHpr()
            nameInfo = group.getName().split("_")
            tableIndex = int(group.parent.getName().split("_")[-1])
            picnicTable = DistributedPicnicTableAI.DistributedPicnicTableAI(
                simbase.air, zone, nameInfo[2], pos[0], pos[1], pos[2], hpr[0], hpr[1], hpr[2]
            )
            picnicTable.setTableIndex(tableIndex)
            picnicTable.generateOtpObject(
                simbase.air.districtId, zone, ["setX", "setY", "setZ", "setH", "setP", "setR"]
            )

        elif group.getName()[:9] == "golf_kart" and config.GetBool("want-golf-karts", True):
            info = group.getName()[10:].split("_")
            golfCourse = int(info[0])
            kartId = info[1]
            for i in range(group.getNumChildren()):
                prop = group.at(i)
                if prop.getName()[:15] == "starting_block_":
                    pos, hpr = (prop.getPos(), prop.getHpr())

            kart = DistributedGolfKartAI.DistributedGolfKartAI(
                simbase.air, golfCourse, pos[0], pos[1], pos[2], hpr[0], hpr[1], hpr[2]
            )
            kart.generateWithRequired(zone)
            kart.sendUpdate("setGolfCourse", [golfCourse])
            kart.sendUpdate("setPosHpr", [pos[0], pos[1], pos[2], hpr[0], hpr[1], hpr[2]])
            color = kart.getColor()
            kart.sendUpdate("setColor", [color[0], color[1], color[2]])
            kart.start()

        if group.getName()[:15] == "prop_party_gate" and simbase.air.wantParties:
            gate = DistributedPartyGateAI(simbase.air)
            gate.setArea(zone)
            gate.generateWithRequired(zone)

        for i in range(group.getNumChildren()):
            child = group.at(i)
            self._createObjects(child, zone)
Exemple #19
0
    def _createObjects(self, group, zone):
        if group.getName()[:13] == 'fishing_pond_':
            visGroup = group.getVisGroup()
            pondZone = 0
            if visGroup is None:
                pondZone = zone
            else:
                pondZone = int(visGroup.getName().split(':')[0])

            pondIndex = int(group.getName()[13:])
            pond = DistributedFishingPondAI(simbase.air)
            pond.setArea(zone)
            pond.generateWithRequired(pondZone)
            #self.ponds[pondIndex] = pond
            
            bingoManager = DistributedPondBingoManagerAI(simbase.air)
            bingoManager.setPondDoId(pond.getDoId())
            bingoManager.generateWithRequired(pondZone)
            #temporary, until we have scheduled stuff
            bingoManager.createGame()
            pond.bingoMgr = bingoManager
            simbase.air.fishManager.ponds[zone] = pond

            for i in range(FishingTargetGlobals.getNumTargets(zone)):
                target = DistributedFishingTargetAI(simbase.air)
                target.setPondDoId(pond.getDoId())
                target.generateWithRequired(pondZone)

            for i in range(group.getNumChildren()):
                posSpot = group.at(i)
                if posSpot.getName()[:13] == 'fishing_spot_':
                    spot = DistributedFishingSpotAI(simbase.air)
                    spot.setPondDoId(pond.getDoId())
                    x, y, z = posSpot.getPos()
                    h, p, r = posSpot.getHpr()
                    spot.setPosHpr(x, y, z, h, p, r)
                    spot.generateWithRequired(pondZone)
                    
            NPCToons.createNpcsInZone(simbase.air, pondZone)
      
        elif group.getName()[:10] == 'racing_pad':
            index, dest = group.getName()[11:].split('_', 2)
            index = int(index)
            
            pad = DistributedRacePadAI(simbase.air)
            pad.setArea(zone)
            pad.nameType = dest
            pad.index = index
            nri = RaceGlobals.getNextRaceInfo(-1, dest, index)
            pad.setTrackInfo([nri[0], nri[1]])
            pad.generateWithRequired(zone)
            for i in range(group.getNumChildren()):
                posSpot = group.at(i)
                if posSpot.getName()[:14] == 'starting_block':
                    spotIndex = int(posSpot.getName()[15:])
                    x, y, z = posSpot.getPos()
                    h, p, r = posSpot.getHpr()
                    startingBlock = DistributedStartingBlockAI(simbase.air)
                    startingBlock.setPosHpr(x, y, z, h, p, r)
                    startingBlock.setPadDoId(pad.getDoId())
                    startingBlock.setPadLocationId(index)
                    startingBlock.generateWithRequired(zone)
                    pad.addStartingBlock(startingBlock)
        elif group.getName()[:11] == 'viewing_pad':
            pad = DistributedViewPadAI(simbase.air)
            pad.setArea(zone)
            pad.generateWithRequired(zone)
            for i in range(group.getNumChildren()):
                posSpot = group.at(i)
                if posSpot.getName()[:14] == 'starting_block':
                    spotIndex = int(posSpot.getName()[15:])
                    x, y, z = posSpot.getPos()
                    h, p, r = posSpot.getHpr()
                    startingBlock = DistributedViewingBlockAI(simbase.air)
                    startingBlock.setPosHpr(x, y, z, h, p, r)
                    startingBlock.setPadDoId(pad.getDoId())
                    startingBlock.setPadLocationId(0)
                    startingBlock.generateWithRequired(zone)
                    pad.addStartingBlock(startingBlock)
        if group.getName()[:15] == 'prop_party_gate':
            gate = DistributedPartyGateAI(simbase.air)
            gate.setArea(zone)
            gate.generateWithRequired(zone)
        for i in range(group.getNumChildren()):
            self._createObjects(group.at(i), zone)
Exemple #20
0
    def _createObjects(self, group, zone):
        if group.getName()[:13] == 'fishing_pond_':
            visGroup = group.getVisGroup()
            pondZone = 0
            if visGroup is None:
                pondZone = zone
            else:
                pondZone = int(visGroup.getName().split(':')[0])

            pondIndex = int(group.getName()[13:])
            pond = DistributedFishingPondAI(simbase.air)
            pond.setArea(zone)
            pond.generateWithRequired(pondZone)

            bingoManager = DistributedPondBingoManagerAI(simbase.air)
            bingoManager.setPondDoId(pond.getDoId())
            bingoManager.generateWithRequired(pondZone)
            #temporary, until we have scheduled stuff
            bingoManager.createGame()
            pond.bingoMgr = bingoManager
            simbase.air.fishManager.ponds[zone] = pond

            for i in range(FishingTargetGlobals.getNumTargets(zone)):
                target = DistributedFishingTargetAI(simbase.air)
                target.setPondDoId(pond.getDoId())
                target.generateWithRequired(pondZone)

            for i in range(group.getNumChildren()):
                posSpot = group.at(i)
                if posSpot.getName()[:13] == 'fishing_spot_':
                    posSpot = group.atAsNode(i)
                    spot = DistributedFishingSpotAI(simbase.air)
                    spot.setPondDoId(pond.getDoId())
                    x, y, z = posSpot.getPos()
                    h, p, r = posSpot.getHpr()
                    spot.setPosHpr(x, y, z, h, p, r)
                    spot.generateWithRequired(pondZone)

            NPCToons.createNpcsInZone(simbase.air, pondZone)

        elif group.getName()[:10] == 'racing_pad':
            index, dest = group.getName()[11:].split('_', 2)
            index = int(index)

            pad = DistributedRacePadAI(simbase.air)
            pad.setArea(zone)
            pad.nameType = dest
            pad.index = index
            nri = RaceGlobals.getNextRaceInfo(-1, dest, index)
            pad.setTrackInfo([nri[0], nri[1]])
            pad.generateWithRequired(zone)
            for i in range(group.getNumChildren()):
                posSpot = group.at(i)
                if posSpot.getName()[:14] == 'starting_block':
                    spotIndex = int(posSpot.getName()[15:])
                    posSpot = group.atAsNode(i)
                    x, y, z = posSpot.getPos()
                    h, p, r = posSpot.getHpr()
                    startingBlock = DistributedStartingBlockAI(simbase.air)
                    startingBlock.setPosHpr(x, y, z, h, p, r)
                    startingBlock.setPadDoId(pad.getDoId())
                    startingBlock.setPadLocationId(index)
                    startingBlock.generateWithRequired(zone)
                    pad.addStartingBlock(startingBlock)

        elif group.getName()[:11] == 'viewing_pad':
            pad = DistributedViewPadAI(simbase.air)
            pad.setArea(zone)
            pad.generateWithRequired(zone)
            for i in range(group.getNumChildren()):
                posSpot = group.at(i)
                if posSpot.getName()[:14] == 'starting_block':
                    spotIndex = int(posSpot.getName()[15:])
                    posSpot = group.atAsNode(i)
                    x, y, z = posSpot.getPos()
                    h, p, r = posSpot.getHpr()
                    startingBlock = DistributedViewingBlockAI(simbase.air)
                    startingBlock.setPosHpr(x, y, z, h, p, r)
                    startingBlock.setPadDoId(pad.getDoId())
                    startingBlock.setPadLocationId(0)
                    startingBlock.generateWithRequired(zone)
                    pad.addStartingBlock(startingBlock)

        elif group.getName()[:13] == 'picnic_table_' and zone != 7000:
            pos = group.getPos()
            hpr = group.getHpr()
            nameInfo = group.getName().split('_')
            picnicTable = DistributedPicnicBasketAI.DistributedPicnicBasketAI(
                simbase.air, nameInfo[2], pos[0], pos[1], pos[2], hpr[0],
                hpr[1], hpr[2])
            picnicTable.generateWithRequired(zone)
            picnicTable.start()

        elif group.getName() == 'prop_game_table_DNARoot' and config.GetBool(
                'want-oz-game-tables', True):
            pos = group.getPos()
            hpr = group.getHpr()
            nameInfo = group.getName().split('_')
            tableIndex = int(group.parent.getName().split('_')[-1])
            picnicTable = DistributedPicnicTableAI.DistributedPicnicTableAI(
                simbase.air, zone, nameInfo[2], pos[0], pos[1], pos[2], hpr[0],
                hpr[1], hpr[2])
            picnicTable.setTableIndex(tableIndex)
            picnicTable.generateOtpObject(
                simbase.air.districtId, zone,
                ['setX', 'setY', 'setZ', 'setH', 'setP', 'setR'])

        elif group.getName()[:9] == 'golf_kart' and config.GetBool(
                'want-golf-karts', False):
            info = group.getName()[10:].split('_')
            golfCourse = int(info[0])
            kartId = info[1]
            for i in range(group.getNumChildren()):
                prop = group.at(i)
                if prop.getName()[:15] == 'starting_block_':
                    pos, hpr = (prop.getPos(), prop.getHpr())

            kart = DistributedGolfKartAI.DistributedGolfKartAI(
                simbase.air, golfCourse, pos[0], pos[1], pos[2], hpr[0],
                hpr[1], hpr[2])
            kart.generateWithRequired(zone)
            kart.sendUpdate('setGolfCourse', [golfCourse])
            kart.sendUpdate('setPosHpr',
                            [pos[0], pos[1], pos[2], hpr[0], hpr[1], hpr[2]])
            color = kart.getColor()
            kart.sendUpdate('setColor', [color[0], color[1], color[2]])
            kart.start()

        if group.getName()[:15] == 'prop_party_gate':
            gate = DistributedPartyGateAI(simbase.air)
            gate.setArea(zone)
            gate.generateWithRequired(zone)

        for i in range(group.getNumChildren()):
            child = group.at(i)
            self._createObjects(child, zone)
    def generate(self):
		DistributedObjectAI.generate(self)
		
		actId2Class = {
			ActivityIds.PartyJukebox: DistributedPartyJukeboxActivityAI,
			ActivityIds.PartyTrampoline: DistributedPartyTrampolineActivityAI,
			ActivityIds.PartyVictoryTrampoline: DistributedPartyVictoryTrampolineActivityAI,
			ActivityIds.PartyCatch: DistributedPartyCatchActivityAI,
			ActivityIds.PartyDance: DistributedPartyDanceActivityAI, 
			ActivityIds.PartyTugOfWar: DistributedPartyTugOfWarActivityAI,
			ActivityIds.PartyFireworks: DistributedPartyFireworksActivityAI,
			ActivityIds.PartyJukebox40: DistributedPartyJukebox40ActivityAI,
			ActivityIds.PartyDance20: DistributedPartyDance20ActivityAI,
			ActivityIds.PartyCog: DistributedPartyCogActivityAI,
		}
		for activity in self.info['activities']:
			actId = activity[0]
			if actId in actId2Class:
				act = actId2Class[actId](self.air, self.doId, activity)
				act.generateWithRequired(self.zoneId)
				self.activities.append(act)
			elif actId == ActivityIds.PartyCannon:
				if not self.cannonActivity:
					self.cannonActivity = DistributedPartyCannonActivityAI(self.air, self.doId, activity)
					self.cannonActivity.generateWithRequired(self.zoneId)
				act = DistributedPartyCannonAI(self.air)
                act.setActivityDoId(self.cannonActivity.doId)
                act.setPosHpr(46.5222, -134.739, 0.390713, 75, 0, 0)
                act.generateWithRequired(self.zoneId)
                self.activities.append(act)
        
		self.pond = DistributedFishingPondAI(simbase.air)
		self.pond.setArea(ToontownGlobals.MyEstate)
		self.pond.generateWithRequired(self.zoneId)
            
		for i in xrange(FishingTargetGlobals.getNumTargets(ToontownGlobals.MyEstate)):
			target = DistributedFishingTargetAI(self.air)
			target.setPondDoId(self.pond.getDoId())
			target.generateWithRequired(self.zoneId)
			self.targets.append(target)


		spot = DistributedFishingSpotAI(self.air)
		spot.setPondDoId(self.pond.getDoId())
		spot.setPosHpr(49.1029, -124.805, 0.344704, 90, 0, 0)
		spot.generateWithRequired(self.zoneId)
		self.spots.append(spot)

		spot = DistributedFishingSpotAI(self.air)
		spot.setPondDoId(self.pond.getDoId())
		spot.setPosHpr(46.5222, -134.739, 0.390713, 75, 0, 0)
		spot.generateWithRequired(self.zoneId)
		self.spots.append(spot)
		
		spot = DistributedFishingSpotAI(self.air)
		spot.setPondDoId(self.pond.getDoId())
		spot.setPosHpr(41.31, -144.559, 0.375978, 45, 0, 0)
		spot.generateWithRequired(self.zoneId)
		self.spots.append(spot)

		spot = DistributedFishingSpotAI(self.air)
		spot.setPondDoId(self.pond.getDoId())
		spot.setPosHpr(46.8254, -113.682, 0.46015, 135, 0, 0)
		spot.generateWithRequired(self.zoneId)
		self.spots.append(spot)