예제 #1
0
    def createShop(self, streetZone, shopZone, hqZone):
        shopInterior = DistributedTutorialInteriorAI(2, self.air, shopZone)

        desc = NPCToons.NPCToonDict.get(20000)
        npc = NPCToons.createNPC(self.air, 20000, desc, shopZone)
        npc.setTutorial(1)
        shopInterior.setTutorialNpcId(npc.doId)
        shopInterior.generateWithRequired(shopZone)

        extShopDoor = DistributedDoorAI.DistributedDoorAI(
            self.air,
            2,
            DoorTypes.EXT_STANDARD,
            lockValue=FADoorCodes.DEFEAT_FLUNKY_TOM)
        intShopDoor = DistributedDoorAI.DistributedDoorAI(
            self.air,
            2,
            DoorTypes.INT_STANDARD,
            lockValue=FADoorCodes.TALK_TO_TOM)
        extShopDoor.setOtherDoor(intShopDoor)
        intShopDoor.setOtherDoor(extShopDoor)
        extShopDoor.zoneId = streetZone
        intShopDoor.zoneId = shopZone
        extShopDoor.generateWithRequired(streetZone)
        extShopDoor.sendUpdate('setDoorIndex', [extShopDoor.getDoorIndex()])
        intShopDoor.generateWithRequired(shopZone)
        intShopDoor.sendUpdate('setDoorIndex', [intShopDoor.getDoorIndex()])

        self.accept('intShopDoor-{0}'.format(shopZone),
                    intShopDoor.setDoorLock)
        self.accept('extShopDoor-{0}'.format(streetZone),
                    extShopDoor.setDoorLock)
    def createShop(self, streetZone, shopZone, hqZone):
        shopInterior = DistributedTutorialInteriorAI(2, self.air, shopZone)

        desc = NPCToons.NPCToonDict.get(20000)
        npc = NPCToons.createNPC(self.air, 20000, desc, shopZone)
        npc.setTutorial(1)
        shopInterior.setTutorialNpcId(npc.doId)
        shopInterior.generateWithRequired(shopZone)

        extShopDoor = DistributedDoorAI.DistributedDoorAI(self.air, 2, DoorTypes.EXT_STANDARD,
                                        lockValue=FADoorCodes.DEFEAT_FLUNKY_TOM)
        intShopDoor = DistributedDoorAI.DistributedDoorAI(self.air, 2, DoorTypes.INT_STANDARD,
                                        lockValue=FADoorCodes.TALK_TO_TOM)
        extShopDoor.setOtherDoor(intShopDoor)
        intShopDoor.setOtherDoor(extShopDoor)
        extShopDoor.zoneId = streetZone
        intShopDoor.zoneId = shopZone
        extShopDoor.generateWithRequired(streetZone)
        extShopDoor.sendUpdate('setDoorIndex', [extShopDoor.getDoorIndex()])
        intShopDoor.generateWithRequired(shopZone)
        intShopDoor.sendUpdate('setDoorIndex', [intShopDoor.getDoorIndex()])

        self.accept('intShopDoor-{0}'.format(shopZone), intShopDoor.setDoorLock)
        self.accept('extShopDoor-{0}'.format(streetZone), extShopDoor.setDoorLock)