コード例 #1
0
    def createZones(self):
        """
        Spawn safezone objects, streets, doors, NPCs, etc.
        """
        start = time.clock()

        def clearQueue():
            '''So the TCP window doesn't fill up and we get the axe'''
            while self.readerPollOnce():
                pass

        self.hoods.append(TTHoodAI.TTHoodAI(self))
        clearQueue()
        self.hoods.append(DDHoodAI.DDHoodAI(self))
        clearQueue()
        self.hoods.append(DGHoodAI.DGHoodAI(self))
        clearQueue()
        self.hoods.append(BRHoodAI.BRHoodAI(self))
        clearQueue()
        self.hoods.append(MMHoodAI.MMHoodAI(self))
        clearQueue()
        self.hoods.append(DLHoodAI.DLHoodAI(self))
        clearQueue()
        self.hoods.append(GSHoodAI.GSHoodAI(self))
        clearQueue()
        self.hoods.append(OZHoodAI.OZHoodAI(self))
        clearQueue()
        self.hoods.append(GZHoodAI.GZHoodAI(self))
        clearQueue()

        if config.GetBool('want-toonfest', False):
            self.hoods.append(TFHoodAI.TFHoodAI(self))
            clearQueue()

        if config.GetBool('want-sbhq', True):
            self.hoods.append(SellbotHQAI.SellbotHQAI(self))
            clearQueue()

        if config.GetBool('want-cbhq', True):
            self.hoods.append(CashbotHQAI.CashbotHQAI(self))
            clearQueue()

        if config.GetBool('want-lbhq', True):
            self.hoods.append(LawbotHQAI.LawbotHQAI(self))
            clearQueue()

        if config.GetBool('want-bbhq', True):
            self.hoods.append(BossbotHQAI.BossbotHQAI(self))
            clearQueue()

        for sp in self.suitPlanners.values():
            sp.assignInitialSuitBuildings()
コード例 #2
0
 def createSafeZones(self):
     NPCToons.generateZone2NpcDict()
     if self.config.GetBool('want-toontown-central', True):
         self.hoods.append(TTHoodAI.TTHoodAI(self))
     if self.config.GetBool('want-donalds-dock', True):
         self.hoods.append(DDHoodAI.DDHoodAI(self))
     if self.config.GetBool('want-daisys-garden', True):
         self.hoods.append(DGHoodAI.DGHoodAI(self))
     if self.config.GetBool('want-minnies-melodyland', True):
         self.hoods.append(MMHoodAI.MMHoodAI(self))
     if self.config.GetBool('want-the-burrrgh', True):
         self.hoods.append(BRHoodAI.BRHoodAI(self))
     if self.config.GetBool('want-donalds-dreamland', True):
         self.hoods.append(DLHoodAI.DLHoodAI(self))
コード例 #3
0
 def createSafeZones(self):
     NPCToons.generateZone2NpcDict()
     if self.config.GetBool('want-toontown-central', True):
         hood = TTHoodAI.TTHoodAI(self)
         self.hoods.append(hood)
         self.hoodId2Hood[hood.zoneId] = hood
     if self.config.GetBool('want-donalds-dock', True):
         hood = DDHoodAI.DDHoodAI(self)
         self.hoods.append(hood)
         self.hoodId2Hood[hood.zoneId] = hood
     if self.config.GetBool('want-daisys-garden', True):
         hood = DGHoodAI.DGHoodAI(self)
         self.hoods.append(hood)
         self.hoodId2Hood[hood.zoneId] = hood
     if self.config.GetBool('want-minnies-melodyland', True):
         hood = MMHoodAI.MMHoodAI(self)
         self.hoods.append(hood)
         self.hoodId2Hood[hood.zoneId] = hood
     if self.config.GetBool('want-the-burrrgh', True):
         hood = BRHoodAI.BRHoodAI(self)
         self.hoods.append(hood)
         self.hoodId2Hood[hood.zoneId] = hood
     if self.config.GetBool('want-donalds-dreamland', True):
         hood = DLHoodAI.DLHoodAI(self)
         self.hoods.append(hood)
         self.hoodId2Hood[hood.zoneId] = hood
     if self.config.GetBool('want-goofy-speedway', True):
         hood = GSHoodAI.GSHoodAI(self)
         self.hoods.append(hood)
         self.hoodId2Hood[hood.zoneId] = hood
     if self.config.GetBool('want-outdoor-zone', True):
         hood = OZHoodAI.OZHoodAI(self)
         self.hoods.append(hood)
         self.hoodId2Hood[hood.zoneId] = hood
     if self.config.GetBool('want-golf-zone', True):
         hood = GZHoodAI.GZHoodAI(self)
         self.hoods.append(hood)
         self.hoodId2Hood[hood.zoneId] = hood
     hood = TTOHoodAI.TTOHoodAI(self)
     self.hoods.append(hood)
     self.hoodId2Hood[hood.zoneId] = hood
コード例 #4
0
 def createSafeZones(self):
     NPCToons.generateZone2NpcDict()
     if self.config.GetBool('want-toontown-central', True):
         self.hoods.append(TTHoodAI.TTHoodAI(self))
     if self.config.GetBool('want-donalds-dock', True):
         self.hoods.append(DDHoodAI.DDHoodAI(self))
     if self.config.GetBool('want-daisys-garden', True):
         self.hoods.append(DGHoodAI.DGHoodAI(self))
     if self.config.GetBool('want-minnies-melodyland', True):
         self.hoods.append(MMHoodAI.MMHoodAI(self))
     if self.config.GetBool('want-the-burrrgh', True):
         self.hoods.append(BRHoodAI.BRHoodAI(self))
     if self.config.GetBool('want-donalds-dreamland', True):
         self.hoods.append(DLHoodAI.DLHoodAI(self))
     if self.config.GetBool('want-goofy-speedway', True):
         self.hoods.append(GSHoodAI.GSHoodAI(self))
     if self.config.GetBool('want-outdoor-zone', True):
         self.hoods.append(OZHoodAI.OZHoodAI(self))
     if self.config.GetBool('want-golf-zone', True):
         self.hoods.append(GZHoodAI.GZHoodAI(self))
     if self.config.GetBool('want-toonfest', True):
         self.hoods.append(TFHoodAI.TFHoodAI(self))
コード例 #5
0
    def createZones(self):
        """
        Spawn safezone objects, streets, doors, NPCs, etc.
        """
        self.hoods.append(TTHoodAI.TTHoodAI(self))
        self.hoods.append(DDHoodAI.DDHoodAI(self))
        #self.hoods.append(DGHoodAI.DGHoodAI(self))
        self.hoods.append(BRHoodAI.BRHoodAI(self))
        self.hoods.append(MMHoodAI.MMHoodAI(self))
        self.hoods.append(DLHoodAI.DLHoodAI(self))
        self.hoods.append(GSHoodAI.GSHoodAI(self))
        self.hoods.append(OZHoodAI.OZHoodAI(self))
        self.hoods.append(GZHoodAI.GZHoodAI(self))
        self.hoods.append(SellbotHQAI.SellbotHQAI(self))
        self.hoods.append(CashbotHQAI.CashbotHQAI(self))
        self.hoods.append(LawbotHQAI.LawbotHQAI(self))
        self.hoods.append(BossbotHQAI.BossbotHQAI(self))

        # Calculate time until next hour.
        thetime = time.time() % 3600
        if thetime < 60: # If the AI was started less than a minute after the previous full hour.
            taskMgr.doMethodLater(1, self.startFireworks, 'fireworks-taskmgr-hourly')
        else:
            taskMgr.doMethodLater(3600-thetime, self.startFireworks, 'fireworks-taskmgr-hourly')
コード例 #6
0
    def createZones(self):
        """
        Spawn safezone objects, streets, doors, NPCs, etc.
        """
        start = time.clock()

        def clearQueue():
            '''So the TCP window doesn't fill up and we get the axe'''
            while self.readerPollOnce():
                pass

        self.notify.info('Creating TTC (Toontown Central) ')
        self.hoods.append(TTHoodAI.TTHoodAI(self))
        clearQueue()
        self.notify.info('Creating DD (Donalds Dock)')
        self.hoods.append(DDHoodAI.DDHoodAI(self))
        clearQueue()
        self.notify.info('Creating DG (Daisy Gardens) ')
        self.hoods.append(DGHoodAI.DGHoodAI(self))
        clearQueue()
        self.notify.info('Creating BR (The Brrrgh) ')
        self.hoods.append(BRHoodAI.BRHoodAI(self))
        clearQueue()
        self.notify.info('Creating MML (Minnie Melody Land) ')
        self.hoods.append(MMHoodAI.MMHoodAI(self))
        clearQueue()
        self.notify.info('Creating DDL (Donalds Dream Land) ')
        self.hoods.append(DLHoodAI.DLHoodAI(self))
        clearQueue()
        self.notify.info('Creating GS (SpeedWay) ')
        self.hoods.append(GSHoodAI.GSHoodAI(self))
        clearQueue()
        self.notify.info('Creating OZ (Outdoor Zone)')
        self.hoods.append(OZHoodAI.OZHoodAI(self))
        clearQueue()
        self.notify.info('Creating GZ (Golf Zone) ')
        self.hoods.append(GZHoodAI.GZHoodAI(self))
        clearQueue()
        self.notify.info('Creating TF (Toonfest) ')
        self.hoods.append(TFHoodAI.TFHoodAI(self))
        clearQueue()

        if config.GetBool('want-sbhq', True):
            self.notify.info('Creating SBHQ (Sellbot HQ) ')
            self.hoods.append(SellbotHQAI.SellbotHQAI(self))
            clearQueue()

        if config.GetBool('want-cbhq', True):
            self.notify.info('Creating CBHQ (Cashbot HQ) ')
            self.hoods.append(CashbotHQAI.CashbotHQAI(self))
            clearQueue()

        if config.GetBool('want-lbhq', True):
            self.notify.info('Creating LBHQ (Lawbot HQ) ')
            self.hoods.append(LawbotHQAI.LawbotHQAI(self))
            clearQueue()

        if config.GetBool('want-bbhq', True):
            self.notify.info('Creating BBHQ (Bossbot HQ) ')
            self.hoods.append(BossbotHQAI.BossbotHQAI(self))
            clearQueue()

        for sp in self.suitPlanners.values():
            sp.assignInitialSuitBuildings()