当前位置: 首页>>代码示例>>Python>>正文


Python ToontownInternalRepository.ToontownInternalRepository类代码示例

本文整理汇总了Python中toontown.distributed.ToontownInternalRepository.ToontownInternalRepository的典型用法代码示例。如果您正苦于以下问题:Python ToontownInternalRepository类的具体用法?Python ToontownInternalRepository怎么用?Python ToontownInternalRepository使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了ToontownInternalRepository类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: handleConnected

    def handleConnected(self):
        self.notify.info('Yarn. Waking up (This may take a while!).')
        ToontownInternalRepository.handleConnected(self)
        self.districtId = self.allocateChannel()
        self.distributedDistrict = ToontownDistrictAI(self)
        self.distributedDistrict.setName(self.districtName)
        self.distributedDistrict.generateWithRequiredAndId(
            self.districtId, self.getGameDoId(), 2)

        # Claim ownership of that district...
        dg = PyDatagram()
        dg.addServerHeader(
            self.districtId,
            self.ourChannel,
            STATESERVER_OBJECT_SET_AI)
        dg.addChannel(self.ourChannel)
        self.send(dg)

        self.notify.info('Creating Global Managers')
        self.createGlobals()
        self.notify.info('Creating Toontown')
        self.createZones()

        self.statusSender.start()

        self.distributedDistrict.b_setAvailable(1)
        self.notify.info('District is now ready.')
开发者ID:Toonerz,项目名称:Toontown-World-Online-Leak,代码行数:27,代码来源:ToontownAIRepository.py

示例2: __init__

    def __init__(self, baseChannel, stateServerChannel, districtName):
        ToontownInternalRepository.__init__(
            self, baseChannel, stateServerChannel, dcSuffix='AI')

        self.districtName = districtName

        self.notify.setInfo(True)  # Our AI repository should always log info.
        self.hoods = []
        self.cogHeadquarters = []
        self.dnaStoreMap = {}
        self.dnaDataMap = {}
        self.suitPlanners = {}
        self.buildingManagers = {}
        self.factoryMgr = None
        self.mintMgr = None
        self.lawOfficeMgr = None
        self.countryClubMgr = None

        self.zoneAllocator = UniqueIdAllocator(ToontownGlobals.DynamicZonesBegin,
                                               ToontownGlobals.DynamicZonesEnd)
        self.zoneDataStore = AIZoneDataStore()

        self.wantFishing = self.config.GetBool('want-fishing', True)
        self.wantHousing = self.config.GetBool('want-housing', True)
        self.wantPets = self.config.GetBool('want-pets', True)
        self.wantKarts = self.config.GetBool('want-karts', True)
        self.wantParties = self.config.GetBool('want-parties', True)
        self.wantEmblems = self.config.GetBool('want-emblems', True)
        self.wantCogbuildings = self.config.GetBool('want-cogbuildings', True)
        self.wantCogdominiums = self.config.GetBool('want-cogdominiums', True)
        self.wantTrackClsends = self.config.GetBool('want-track-clsends', False)
        self.wantTopToons = self.config.GetBool('want-top-toons', True)
        self.baseXpMultiplier = self.config.GetFloat('base-xp-multiplier', 1.0)

        self.cogSuitMessageSent = False
开发者ID:BmanGames,项目名称:ToontownStride,代码行数:35,代码来源:ToontownAIRepository.py

示例3: handleConnected

 def handleConnected(self):
     ToontownInternalRepository.handleConnected(self)
     if config.GetBool('want-ClientServicesManagerUD', self.wantUD):
         # Only generate the root object once, with the CSMUD.
         rootObj = DistributedDirectoryAI(self)
         rootObj.generateWithRequiredAndId(self.getGameDoId(), 0, 0)
     self.createGlobals()
开发者ID:Toonerz,项目名称:Toontown-World-Online-Leak,代码行数:7,代码来源:ToontownUberRepository.py

示例4: __init__

    def __init__(self, baseChannel, stateServerChannel, districtName):
        ToontownInternalRepository.__init__(
            self, baseChannel, stateServerChannel, dcSuffix='AI')

        self.districtName = districtName

        self.notify.setInfo(True)  # Our AI repository should always log info.
        self.hoods = []
        self.cogHeadquarters = []
        self.dnaStoreMap = {}
        self.dnaDataMap = {}
        self.suitPlanners = {}
        self.buildingManagers = {}
        self.factoryMgr = None
        self.mintMgr = None
        self.lawOfficeMgr = None
        self.countryClubMgr = None

        self.zoneAllocator = UniqueIdAllocator(ToontownGlobals.DynamicZonesBegin,
                                               ToontownGlobals.DynamicZonesEnd)
        self.zoneDataStore = AIZoneDataStore()

        self.wantFishing = self.config.GetBool('want-fishing', True)
        self.wantHousing = self.config.GetBool('want-housing', True)
        self.wantPets = self.config.GetBool('want-pets', True)
        self.wantParties = self.config.GetBool('want-parties', True)
        self.wantCogbuildings = self.config.GetBool('want-cogbuildings', True)
        self.wantCogdominiums = self.config.GetBool('want-cogdominiums', True)
        self.doLiveUpdates = self.config.GetBool('want-live-updates', False)
        self.wantTrackClsends = self.config.GetBool('want-track-clsends', False)
        self.wantAchievements = self.config.GetBool('want-achievements', True)
开发者ID:spikewildtoon,项目名称:ToontownEdits,代码行数:31,代码来源:ToontownAIRepository.py

示例5: handleConnected

    def handleConnected(self):
        ToontownInternalRepository.handleConnected(self)
        rootObj = DistributedDirectoryAI(self)
        rootObj.generateWithRequiredAndId(self.getGameDoId(), 0, 0)

        if config.GetBool('want-rpc-server', False):
            endpoint = config.GetString('rpc-server-endpoint', 'http://localhost:8080/')
            self.rpcServer = ToontownRPCServer(endpoint, ToontownRPCHandler(self))
            self.rpcServer.start(useTaskChain=True)

        self.createGlobals()
        self.notify.info('Done.')
开发者ID:RandomToon,项目名称:Toontown-2,代码行数:12,代码来源:ToontownUberRepository.py

示例6: __init__

    def __init__(self, baseChannel, serverId):
        ToontownInternalRepository.__init__(self, baseChannel, serverId, dcSuffix='UD')

        if config.GetBool('want-mongo-client', False):
            url = config.GetString('mongodb-url', 'mongodb://localhost')
            replicaset = config.GetString('mongodb-replicaset', '')
            if replicaset:
                self.mongo = pymongo.MongoClient(url, replicaset=replicaset)
            else:
                self.mongo = pymongo.MongoClient(url)
            db = (urlparse.urlparse(url).path or '/test')[1:]
            self.mongodb = self.mongo[db]

        self.notify.setInfo(True)
开发者ID:CoolFangs,项目名称:src,代码行数:14,代码来源:ToontownUberRepository.py

示例7: __init__

    def __init__(self, baseChannel, serverId, districtName):
        ToontownInternalRepository.__init__(self, baseChannel, serverId, dcSuffix='AI')

        self.districtName = districtName

        self.zoneAllocator = UniqueIdAllocator(ToontownGlobals.DynamicZonesBegin,
                                               ToontownGlobals.DynamicZonesEnd)

        NPCToons.generateZone2NpcDict()
        
        self.use_libpandadna = simbase.config.GetBool('use-libpandadna', False)
        
        self.hoods = []
        self._dnaStoreMap = {}
        
        if self.use_libpandadna:
            self.__loader = DNALoader()
        
        self.zoneDataStore = AIZoneDataStore()

        self.useAllMinigames = self.config.GetBool('want-all-minigames', False)
        self.doLiveUpdates = True
        
        self.wantCogdominiums = self.config.GetBool('want-cogdo', False)
        self.wantParties = self.config.GetBool('want-parties', False)
        self.wantEmblems = self.config.GetBool('want-emblems', True)
        
        self.questManager = QuestManagerAI(self)
        self.promotionMgr = PromotionManagerAI(self)
        self.cogPageManager = CogPageManagerAI(self)
        self.cogSuitMgr = CogSuitManagerAI(self)

        self.trophyMgr = DistributedTrophyMgrAI(self)
        
        self.fishManager = FishManagerAI()
		
        self.dnaStoreMap = {}
        
        self.mintMgr = MintManagerAI.MintManagerAI(self)
        self.factoryMgr = FactoryManagerAI.FactoryManagerAI(self)
        self.lawMgr = LawOfficeManagerAI.LawOfficeManagerAI(self)
        self.countryClubMgr = CountryClubManagerAI.CountryClubManagerAI(self)
        
        self.buildingManagers = {}
        self.suitPlanners = {}
        
        self.wantMegaInvasions = str(self.ourChannel // 1000000) in self.config.GetString('mega-invasion-shards', '402 403').split()            
开发者ID:Spiderlover,项目名称:Toontown-Crystal-TTH-Edition,代码行数:47,代码来源:ToontownAIRepository.py

示例8: handleConnected

    def handleConnected(self):
        ToontownInternalRepository.handleConnected(self)
        self.notify.info(True)
        if config.GetBool("want-ClientServicesManagerUD", self.wantUD):
            self.notify.info("Creating ClientServicesManagerUD...")
            # Only generate the root object once, with the CSMUD.
            rootObj = DistributedDirectoryAI(self)
            rootObj.generateWithRequiredAndId(self.getGameDoId(), 0, 0)
        self.notify.info("Creating globals...")
        self.createGlobals()

        if config.GetBool("want-rpc-server", False):
            self.notify.info("Starting RPC server...")
            import ToontownRPCHandler

            self.rpcserver = RPCServer(ToontownRPCHandler(self))
        self.notify.info("Done.")
开发者ID:Teku16,项目名称:TTR-Offline,代码行数:17,代码来源:ToontownUberRepository.py

示例9: __init__

    def __init__(self, baseChannel, serverId, districtName):
        ToontownInternalRepository.__init__(
            self, baseChannel, serverId, dcSuffix='AI')

        self.dnaSpawner = DNASpawnerAI(self)

        self.districtName = districtName

        self.zoneAllocator = UniqueIdAllocator(
            ToontownGlobals.DynamicZonesBegin,
            ToontownGlobals.DynamicZonesEnd)
        self.zoneId2owner = {}

        NPCToons.generateZone2NpcDict()

        self.hoods = []
        self.zoneDataStore = AIZoneDataStore()

        self.useAllMinigames = self.config.GetBool('want-all-minigames', False)
        self.doLiveUpdates = self.config.GetBool('want-live-updates', True)
        self.baseXpMultiplier = self.config.GetFloat('base-xp-multiplier', 1.0)
        self.wantHalloween = self.config.GetBool('want-halloween', False)
	self.wantChristmas = self.config.GetBool('want-christmas', False)
        self.holidayManager = HolidayManagerAI(self)
        if config.GetBool('want-pets', True):
            self.PetManager = PetManagerAI(self)
        self.fishManager = FishManagerAI()
        self.questManager = QuestManagerAI(self)
        self.cogPageManager = CogPageManagerAI()
        self.factoryMgr = FactoryManagerAI(self)
        self.mintMgr = MintManagerAI(self)
        self.lawOfficeMgr = LawOfficeManagerAI(self)
        self.countryClubMgr = CountryClubManagerAI(self)
        self.promotionMgr = PromotionManagerAI(self)
        self.cogSuitMgr = CogSuitManagerAI(self)
        self.suitInvasionManager = SuitInvasionManagerAI(self)

        self.statusSender = ShardStatusSender(self)

        self.dnaStoreMap = {}

        self.buildingManagers = {}
        self.suitPlanners = {}
开发者ID:Toonerz,项目名称:Toontown-World-Online-Leak,代码行数:43,代码来源:ToontownAIRepository.py

示例10: __init__

    def __init__(self, baseChannel, serverId):
        ToontownInternalRepository.__init__(self, baseChannel, serverId, dcSuffix="UD")

        self.rpcServer = None
        self.webRpc = None

        if config.GetBool("want-mongo-client", False):
            url = config.GetString("mongodb-url", "mongodb://localhost")
            replicaset = config.GetString("mongodb-replicaset", "")
            if replicaset:
                self.mongo = pymongo.MongoClient(url, replicaset=replicaset)
            else:
                self.mongo = pymongo.MongoClient(url)
            db = (urlparse.urlparse(url).path or "/test")[1:]
            self.mongodb = self.mongo[db]
        else:
            self.mongo = None
            self.mongodb = None

        self.notify.setInfo(True)
开发者ID:ponyboy837,项目名称:TTI-Leak--From-2015-,代码行数:20,代码来源:ToontownUberRepository.py

示例11: __init__

    def __init__(self, baseChannel, serverId, districtName):
        ToontownInternalRepository.__init__(self, baseChannel, serverId, dcSuffix='AI')

        self.dnaSpawner = DNASpawnerAI(self)

        self.districtName = districtName
        
        self.notify.setInfo(True)  # Our AI repository should always log info.

        self.zoneAllocator = UniqueIdAllocator(ToontownGlobals.DynamicZonesBegin,
                                               ToontownGlobals.DynamicZonesEnd)
        self.zoneId2owner = {}

        NPCToons.generateZone2NpcDict()

        self.hoods = []
        self.zoneDataStore = AIZoneDataStore()

        self.useAllMinigames = self.config.GetBool('want-all-minigames', False)
        self.doLiveUpdates = self.config.GetBool('want-live-updates', True)

        self.holidayManager = HolidayManagerAI(self)

        self.fishManager = FishManagerAI()
        self.questManager = QuestManagerAI(self)
        self.cogPageManager = CogPageManagerAI()
        self.factoryMgr = FactoryManagerAI(self)
        self.mintMgr = MintManagerAI(self)
        self.lawOfficeMgr = LawOfficeManagerAI(self)
        self.countryClubMgr = CountryClubManagerAI(self)
        self.promotionMgr = PromotionManagerAI(self)
        self.cogSuitMgr = CogSuitManagerAI(self)
        self.suitInvasionManager = SuitInvasionManagerAI(self)

        self.statusSender = ShardStatusSender(self)

        self.dnaStoreMap = {}

        self.buildingManagers = {}
        self.suitPlanners = {}
开发者ID:Teku16,项目名称:TTR-Offline,代码行数:40,代码来源:ToontownAIRepository.py

示例12: __init__

    def __init__(self, baseChannel, serverId, districtName):
        ToontownInternalRepository.__init__(self, baseChannel, serverId, dcSuffix='AI')

        self.districtName = districtName

        self.zoneAllocator = UniqueIdAllocator(ToontownGlobals.DynamicZonesBegin,
                                               ToontownGlobals.DynamicZonesEnd)

        NPCToons.generateZone2NpcDict()

        self.hoods = []
        self.zoneDataStore = AIZoneDataStore()

        self.useAllMinigames = self.config.GetBool('want-all-minigames', False)
        self.doLiveUpdates = False

        self.holidayManager = HolidayManagerAI()
        
        self.fishManager = FishManagerAI()
        
        self.mintMgr = MintManagerAI.MintManagerAI(self)
        self.factoryMgr = FactoryManagerAI.FactoryManagerAI(self)
开发者ID:OldToontown,项目名称:OldToontown,代码行数:22,代码来源:ToontownAIRepository.py

示例13: __init__

    def __init__(self, baseChannel, serverId):
        ToontownInternalRepository.__init__(self, baseChannel, serverId, dcSuffix='UD')

        self.notify.setInfo(True)
        self.wantTopToons = self.config.GetBool('want-top-toons', True)
开发者ID:RandomToon,项目名称:Toontown-2,代码行数:5,代码来源:ToontownUberRepository.py

示例14: handleConnected

 def handleConnected(self):
     ToontownInternalRepository.handleConnected(self)
     threading.Thread(target=self.startDistrict).start()
开发者ID:BmanGames,项目名称:ToontownStride,代码行数:3,代码来源:ToontownAIRepository.py

示例15: __init__

 def __init__(self, baseChannel, serverId):
     ToontownInternalRepository.__init__(self, baseChannel, serverId, dcSuffix='UD')
开发者ID:OldToontown,项目名称:OldToontown,代码行数:2,代码来源:ToontownUberRepository.py


注:本文中的toontown.distributed.ToontownInternalRepository.ToontownInternalRepository类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。