コード例 #1
0
    def createSuitPlanners(self):
        suitPlanner = DistributedSuitPlannerAI.DistributedSuitPlannerAI(self.air, self.zoneId)
        suitPlanner.generateWithRequired(self.zoneId)
        suitPlanner.d_setZoneId(self.zoneId)
        suitPlanner.initTasks()
        self.suitPlanners.append(suitPlanner)
        self.air.suitPlanners[self.zoneId] = suitPlanner

        suitPlanner = DistributedSuitPlannerAI.DistributedSuitPlannerAI(self.air, ToontownGlobals.SellbotFactoryExt)
        suitPlanner.generateWithRequired(ToontownGlobals.SellbotFactoryExt)
        suitPlanner.d_setZoneId(ToontownGlobals.SellbotFactoryExt)
        suitPlanner.initTasks()
        self.suitPlanners.append(suitPlanner)
        self.air.suitPlanners[ToontownGlobals.SellbotFactoryExt] = suitPlanner
コード例 #2
0
ファイル: BossbotHQDataAI.py プロジェクト: perpi06/ttoffline
 def createPlanner(self, zoneId):
     zoneId = ZoneUtil.getTrueZoneId(zoneId, self.zoneId)
     sp = DistributedSuitPlannerAI.DistributedSuitPlannerAI(self.air, zoneId)
     sp.generateWithRequired(zoneId)
     sp.d_setZoneId(zoneId)
     self.air.suitPlanners[zoneId] = sp
     self.notify.debug('Created new SuitPlanner at %s' % zoneId)
コード例 #3
0
 def createSuitPlanners(self):
     suitPlanner = DistributedSuitPlannerAI.DistributedSuitPlannerAI(self.air, self.zoneId)
     suitPlanner.generateWithRequired(self.zoneId)
     suitPlanner.d_setZoneId(self.zoneId)
     suitPlanner.initTasks()
     self.suitPlanners.append(suitPlanner)
     self.air.suitPlanners[self.zoneId] = suitPlanner
コード例 #4
0
 def createSuitPlanners(self):
     for zone in self.air.zoneTable[self.canonicalHoodId]:
         if zone[2]:
             zoneId = ZoneUtil.getTrueZoneId(zone[0], self.zoneId)
             sp = DistributedSuitPlannerAI.DistributedSuitPlannerAI(self.air, zoneId)
             sp.generateWithRequired(zoneId)
             sp.d_setZoneId(zoneId)
             sp.initTasks()
             self.suitPlanners.append(sp)
             self.air.suitPlanners[zoneId] = sp
コード例 #5
0
 def createSuitPlanners(self):
     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)
         suitPlanner.initTasks()
         self.suitPlanners.append(suitPlanner)
         self.air.suitPlanners[zoneId] = suitPlanner
 def createPlanner(self, zoneId, cogHQDoors=[]):
     zoneId = ZoneUtil.getTrueZoneId(zoneId, self.zoneId)
     sp = DistributedSuitPlannerAI.DistributedSuitPlannerAI(
         self.air, zoneId)
     sp.cogHQDoors = cogHQDoors
     sp.generateWithRequired(zoneId)
     sp.d_setZoneId(zoneId)
     sp.initTasks()
     self.suitPlanners.append(sp)
     self.air.suitPlanners[zoneId] = sp
     self.notify.info('Created new SuitPlanner at %s' % zoneId)
コード例 #7
0
 def createSuitPlanners(self):
     for zone in self.air.zoneTable[self.canonicalHoodId]:
         if zone[2]:
             zoneId = ZoneUtil.getTrueZoneId(zone[0], self.zoneId)
             sp = DistributedSuitPlannerAI.DistributedSuitPlannerAI(self.air, zoneId)
             sp.generateWithRequired(zoneId)
             sp.d_setZoneId(zoneId)
             sp.acceptOnce("startShardActivity", sp.initTasks)
             self.suitPlanners.append(sp)
             self.air.suitPlanners[zoneId] = sp
             self.notify.info('Created new SuitPlanner at %s' % zoneId)
コード例 #8
0
ファイル: HoodDataAI.py プロジェクト: satire6/Anesidora
    def createSuitPlanners(self):
        for zone in self.air.zoneTable[self.canonicalHoodId]:
            if zone[2]:
                zoneId = ZoneUtil.getTrueZoneId(zone[0], self.zoneId)
                sp = DistributedSuitPlannerAI.DistributedSuitPlannerAI(
                    self.air, zoneId)
                sp.generateWithRequired(zoneId)
                sp.d_setZoneId(zoneId)

                # be sure to start up necessary tasks so the suit planner
                # is updated when needed
                #
                sp.initTasks()
                self.suitPlanners.append(sp)
                self.air.suitPlanners[zoneId] = sp
コード例 #9
0
ファイル: LawbotHQDataAI.py プロジェクト: perpi06/ttoffline
    def startup(self):
        self.notify.info('Creating zone... Lawbot HQ')
        HoodDataAI.HoodDataAI.startup(self)

        def makeOfficeElevator(index, antiShuffle=0, minLaff=0):
            destZone = (ToontownGlobals.LawbotStageIntA,
                        ToontownGlobals.LawbotStageIntB,
                        ToontownGlobals.LawbotStageIntC,
                        ToontownGlobals.LawbotStageIntD)[index]
            elev = DistributedLawOfficeElevatorExtAI.DistributedLawOfficeElevatorExtAI(
                self.air,
                self.air.lawOfficeMgr,
                destZone,
                index,
                antiShuffle=0,
                minLaff=minLaff)
            elev.generateWithRequired(ToontownGlobals.LawbotOfficeExt)
            self.addDistObj(elev)
            return elev.doId

        mins = ToontownGlobals.FactoryLaffMinimums[2]
        officeId0 = makeOfficeElevator(0, 0, mins[0])
        officeId1 = makeOfficeElevator(1, 0, mins[1])
        officeId2 = makeOfficeElevator(2, 0, mins[2])
        officeId3 = makeOfficeElevator(3, 0, mins[3])
        self.lobbyMgr = LobbyManagerAI.LobbyManagerAI(
            self.air, DistributedLawbotBossAI.DistributedLawbotBossAI)
        self.lobbyMgr.generateWithRequired(ToontownGlobals.LawbotLobby)
        self.addDistObj(self.lobbyMgr)
        self.lobbyElevator = DistributedCJElevatorAI.DistributedCJElevatorAI(
            self.air,
            self.lobbyMgr,
            ToontownGlobals.LawbotLobby,
            antiShuffle=1)
        self.lobbyElevator.generateWithRequired(ToontownGlobals.LawbotLobby)
        self.addDistObj(self.lobbyElevator)
        if simbase.config.GetBool('want-boarding-groups', 1):
            self.boardingParty = DistributedBoardingPartyAI.DistributedBoardingPartyAI(
                self.air, [self.lobbyElevator.doId], 8)
            self.boardingParty.generateWithRequired(
                ToontownGlobals.LawbotLobby)
        if simbase.config.GetBool('want-suit-planners', 1):
            sp = DistributedSuitPlannerAI.DistributedSuitPlannerAI(
                self.air, self.zoneId)
            sp.generateWithRequired(self.zoneId)
            sp.d_setZoneId(self.zoneId)
            sp.initTasks()
            self.air.suitPlanners[self.zoneId] = sp
            self.notify.debug('Created new SuitPlanner at %s' % self.zoneId)

        def makeDoor(destinationZone, intDoorIndex, extDoorIndex, lock=0):
            intDoor = DistributedCogHQDoorAI.DistributedCogHQDoorAI(
                self.air,
                0,
                DoorTypes.INT_COGHQ,
                self.canonicalHoodId,
                doorIndex=intDoorIndex,
                lockValue=lock)
            intDoor.zoneId = destinationZone
            extDoor = DistributedCogHQDoorAI.DistributedCogHQDoorAI(
                self.air,
                0,
                DoorTypes.EXT_COGHQ,
                destinationZone,
                doorIndex=extDoorIndex,
                lockValue=lock)
            extDoor.setOtherDoor(intDoor)
            intDoor.setOtherDoor(extDoor)
            intDoor.generateWithRequired(destinationZone)
            intDoor.sendUpdate('setDoorIndex', [intDoor.getDoorIndex()])
            self.addDistObj(intDoor)
            extDoor.generateWithRequired(self.canonicalHoodId)
            extDoor.sendUpdate('setDoorIndex', [extDoor.getDoorIndex()])
            self.addDistObj(extDoor)

        makeDoor(ToontownGlobals.LawbotLobby, 0, 1,
                 FADoorCodes.LB_DISGUISE_INCOMPLETE)
        makeDoor(ToontownGlobals.LawbotOfficeExt, 0, 0)
        officeIdList = [officeId0, officeId1, officeId2, officeId3]
        if simbase.config.GetBool('want-boarding-parties', 1):
            self.officeBoardingParty = DistributedBoardingPartyAI.DistributedBoardingPartyAI(
                self.air, officeIdList, 4)
            self.officeBoardingParty.generateWithRequired(
                ToontownGlobals.LawbotOfficeExt)
コード例 #10
0
    def startup(self):
        HoodDataAI.HoodDataAI.startup(self)
        mins = ToontownGlobals.FactoryLaffMinimums[1]
        self.testElev0 = DistributedMintElevatorExtAI.DistributedMintElevatorExtAI(
            self.air,
            self.air.mintMgr,
            ToontownGlobals.CashbotMintIntA,
            antiShuffle=0,
            minLaff=mins[0])
        self.testElev0.generateWithRequired(ToontownGlobals.CashbotHQ)
        self.addDistObj(self.testElev0)
        self.testElev1 = DistributedMintElevatorExtAI.DistributedMintElevatorExtAI(
            self.air,
            self.air.mintMgr,
            ToontownGlobals.CashbotMintIntB,
            antiShuffle=0,
            minLaff=mins[1])
        self.testElev1.generateWithRequired(ToontownGlobals.CashbotHQ)
        self.addDistObj(self.testElev1)
        self.testElev2 = DistributedMintElevatorExtAI.DistributedMintElevatorExtAI(
            self.air,
            self.air.mintMgr,
            ToontownGlobals.CashbotMintIntC,
            antiShuffle=0,
            minLaff=mins[2])
        self.testElev2.generateWithRequired(ToontownGlobals.CashbotHQ)
        self.addDistObj(self.testElev2)
        self.lobbyMgr = LobbyManagerAI.LobbyManagerAI(
            self.air, DistributedCashbotBossAI.DistributedCashbotBossAI)
        self.lobbyMgr.generateWithRequired(ToontownGlobals.CashbotLobby)
        self.addDistObj(self.lobbyMgr)
        self.lobbyElevator = DistributedCFOElevatorAI.DistributedCFOElevatorAI(
            self.air,
            self.lobbyMgr,
            ToontownGlobals.CashbotLobby,
            antiShuffle=1)
        self.lobbyElevator.generateWithRequired(ToontownGlobals.CashbotLobby)
        self.addDistObj(self.lobbyElevator)
        if simbase.config.GetBool('want-boarding-groups', 1):
            self.boardingParty = DistributedBoardingPartyAI.DistributedBoardingPartyAI(
                self.air, [self.lobbyElevator.doId], 8)
            self.boardingParty.generateWithRequired(
                ToontownGlobals.CashbotLobby)

        destinationZone = ToontownGlobals.CashbotLobby
        extDoor0 = DistributedCogHQDoorAI.DistributedCogHQDoorAI(
            self.air,
            0,
            DoorTypes.EXT_COGHQ,
            destinationZone,
            doorIndex=0,
            lockValue=FADoorCodes.CB_DISGUISE_INCOMPLETE)
        extDoorList = [extDoor0]
        intDoor0 = DistributedCogHQDoorAI.DistributedCogHQDoorAI(
            self.air,
            0,
            DoorTypes.INT_COGHQ,
            ToontownGlobals.CashbotHQ,
            doorIndex=0)
        intDoor0.setOtherDoor(extDoor0)
        intDoor0.zoneId = ToontownGlobals.CashbotLobby
        mintIdList = [
            self.testElev0.doId, self.testElev1.doId, self.testElev2.doId
        ]
        if simbase.config.GetBool('want-boarding-groups', 1):
            self.mintBoardingParty = DistributedBoardingPartyAI.DistributedBoardingPartyAI(
                self.air, mintIdList, 4)
            self.mintBoardingParty.generateWithRequired(self.zoneId)

        for extDoor in extDoorList:
            extDoor.setOtherDoor(intDoor0)
            extDoor.zoneId = ToontownGlobals.CashbotHQ
            extDoor.generateWithRequired(ToontownGlobals.CashbotHQ)
            extDoor.sendUpdate('setDoorIndex', [extDoor.getDoorIndex()])
            self.addDistObj(extDoor)

        intDoor0.generateWithRequired(ToontownGlobals.CashbotLobby)
        intDoor0.sendUpdate('setDoorIndex', [intDoor0.getDoorIndex()])
        self.addDistObj(intDoor0)

        sp = DistributedSuitPlannerAI.DistributedSuitPlannerAI(
            self.air, ToontownGlobals.CashbotHQ)
        sp.generateWithRequired(ToontownGlobals.CashbotHQ)
        sp.d_setZoneId(ToontownGlobals.CashbotHQ)
        sp.initTasks()
        self.suitPlanners.append(sp)
        self.air.suitPlanners[ToontownGlobals.CashbotHQ] = sp
        self.notify.info('Created new SuitPlanner at %s' %
                         ToontownGlobals.CashbotHQ)