def setup(self, blockNumber): # The interior self.interior = DistributedPetshopInteriorAI.DistributedPetshopInteriorAI( blockNumber, self.air, self.interiorZone) self.npcs = NPCToons.createNpcsInZone(self.air, self.interiorZone) seeds = self.air.petMgr.getAvailablePets(1, len(self.npcs)) #for i in range(len(self.npcs)): # self.wanderingPets = self.createPet(self.npcs[i].doId, seeds[i]) self.interior.generateWithRequired(self.interiorZone) # Outside door door = DistributedDoorAI.DistributedDoorAI(self.air, blockNumber, DoorTypes.EXT_STANDARD) # Inside door insideDoor = DistributedDoorAI.DistributedDoorAI( self.air, blockNumber, DoorTypes.INT_STANDARD) # Tell them about each other: door.setOtherDoor(insideDoor) insideDoor.setOtherDoor(door) # Put them in the right zones door.zoneId = self.exteriorZone insideDoor.zoneId = self.interiorZone # Now that they both now about each other, generate them: door.generateWithRequired(self.exteriorZone) insideDoor.generateWithRequired(self.interiorZone) # keep track of them: self.door = door self.insideDoor = insideDoor return
def setup(self, blockNumber): self.interior = DistributedPetshopInteriorAI.DistributedPetshopInteriorAI(blockNumber, self.air, self.interiorZone) self.npcs = NPCToons.createNpcsInZone(self.air, self.interiorZone) seeds = self.air.petMgr.getAvailablePets(1, len(self.npcs)) self.interior.generateWithRequired(self.interiorZone) door = DistributedDoorAI.DistributedDoorAI(self.air, blockNumber, DoorTypes.EXT_STANDARD) insideDoor = DistributedDoorAI.DistributedDoorAI(self.air, blockNumber, DoorTypes.INT_STANDARD) door.setOtherDoor(insideDoor) insideDoor.setOtherDoor(door) door.zoneId = self.exteriorZone insideDoor.zoneId = self.interiorZone door.generateWithRequired(self.exteriorZone) insideDoor.generateWithRequired(self.interiorZone) self.door = door self.insideDoor = insideDoor