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

        self.districtName = districtName

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

        NPCToons.generateZone2NpcDict()

        self.hoods = []
        self.zoneDataStore = AIZoneDataStore()
        self.dnaStoreMap = {}
        self.dnaDataMap = {}

        self.currentHour = 0
        self.isRaining = False

        self.useAllMinigames = self.config.GetBool('want-all-minigames', False)
        self.doLiveUpdates = self.config.GetBool('want-live-updates', True)
        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.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)

        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.wantCogdominiums = self.config.GetBool('want-cogdominums', False)
        self.temperatureManager = TemperatureManagerAI(self)

        self.statusSender = ShardStatusSender(self)

        self.dnaStoreMap = {}

        self.buildingManagers = {}
        self.suitPlanners = {}
    def createLocals(self):
        """
        Creates "local" objects.
        """

        # Create our holiday manager...
        self.holidayManager = HolidayManagerAI(self)

        # Create our zone data store...
        self.zoneDataStore = AIZoneDataStore()

        # Create our pet manager...
        self.petMgr = PetManagerAI(self)

        # Create our suit invasion manager...
        self.suitInvasionManager = SuitInvasionManagerAI(self)

        # Create our zone allocator...
        self.zoneAllocator = UniqueIdAllocator(
            ToontownGlobals.Zones.DynamicZonesBegin,
            ToontownGlobals.Zones.DynamicZonesEnd)

        # Create our quest manager...
        self.questManager = QuestManagerAI(self)

        # Create our Cog page manager...
        self.cogPageManager = CogPageManagerAI(self)

        # Create our fish manager...
        self.fishManager = FishManagerAI(self)

        # Create our factory manager...
        self.factoryMgr = FactoryManagerAI(self)

        # Create our mint manager...
        self.mintMgr = MintManagerAI(self)

        # Create our law office manager...
        self.lawMgr = LawOfficeManagerAI(self)

        # Create our country club manager...
        self.countryClubMgr = CountryClubManagerAI(self)

        # Create our promotion manager...
        self.promotionMgr = PromotionManagerAI(self)

        # Create our Cog suit manager...
        self.cogSuitMgr = CogSuitManagerAI(self)

        # Create our race manager...
        self.raceMgr = RaceManagerAI(self)

        # Create our Toontown time manager...
        self.toontownTimeManager = ToontownTimeManager(
            serverTimeUponLogin=int(time.time()),
            globalClockRealTimeUponLogin=globalClock.getRealTime())
    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()
Example #4
0
    def createLocals(self):
        """
        Creates "local" (non-distributed) objects.
        """

        # Create our holiday manager...
        self.holidayManager = HolidayManagerAI(self)

        # Create our zone data store...
        self.zoneDataStore = AIZoneDataStore()

        # Create our pet manager...
        self.petMgr = PetManagerAI(self)

        # Create our suit invasion manager...
        self.suitInvasionManager = SuitInvasionManagerAI(self)

        # Create our zone allocator...
        self.zoneAllocator = UniqueIdAllocator(
            ToontownGlobals.DynamicZonesBegin, ToontownGlobals.DynamicZonesEnd)

        # Create our quest manager...
        self.questManager = QuestManagerAI(self)

        # Create our promotion manager...
        self.promotionMgr = PromotionManagerAI(self)

        # Create our Cog page manager...
        self.cogPageManager = CogPageManagerAI(self)

        # Create our race manager...
        self.raceMgr = RaceManagerAI(self)

        # Create our country club manager...
        self.countryClubMgr = CountryClubManagerAI(self)

        # Create our factory manager...
        self.factoryMgr = FactoryManagerAI(self)

        # Create our mint manager...
        self.mintMgr = MintManagerAI(self)

        # Create our law office manager...
        self.lawMgr = LawOfficeManagerAI(self)

        # Create our Cog suit manager...
        self.cogSuitMgr = CogSuitManagerAI(self)
 def __init__(self, baseChannel, serverId, districtName, holidayPasscode,
              serverDescription, miniserverId):
     ToontownInternalRepository.__init__(self,
                                         baseChannel,
                                         serverId,
                                         dcSuffix='AI')
     self.districtName = districtName
     self.holidayPasscode = holidayPasscode
     self.holidayValue = 0
     self.serverDescription = serverDescription
     self.zoneAllocator = UniqueIdAllocator(
         ToontownGlobals.DynamicZonesBegin, ToontownGlobals.DynamicZonesEnd)
     self.zoneId2owner = {}
     NPCToons.generateZone2NpcDict()
     self.zoneTable = {}
     self.hoodArray = []
     self.hoods = []
     self._dnaStoreMap = {}
     self.zoneDataStore = AIZoneDataStore()
     self.useAllMinigames = self.config.GetBool('want-all-minigames', False)
     self.doLiveUpdates = self.config.GetBool('want-live-updates', True)
     self.reachedPlayerLimit = False
     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.wantCogdominiums = self.config.GetBool('want-cogdominums', False)
     self.buildingManagers = {}
     self.suitPlanners = {}
     self.inEpisode = False
     self.cutsceneActivated = False
     self.currentEpisode = None
     self.wantMiniServer = config.GetBool('want-mini-server', False)
     if not self.wantMiniServer:
         self.wantPrologue = config.GetBool('want-prologue', False)
     else:
         self.wantPrologue = False
     return
Example #6
0
    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 = {}
Example #7
0
 def createLocals(self):
     self.holidayManager = HolidayManagerAI(self)
     self.zoneDataStore = AIZoneDataStore()
     self.petMgr = PetManagerAI(self)
     self.suitInvasionManager = SuitInvasionManagerAI(self)
     self.zoneAllocator = UniqueIdAllocator(
         ToontownGlobals.DynamicZonesBegin, ToontownGlobals.DynamicZonesEnd)
     self.questManager = QuestManagerAI(self)
     self.cogPageManager = CogPageManagerAI(self)
     self.fishManager = FishManagerAI(self)
     self.factoryMgr = FactoryManagerAI(self)
     self.mintMgr = MintManagerAI(self)
     self.lawMgr = LawOfficeManagerAI(self)
     self.countryClubMgr = CountryClubManagerAI(self)
     self.promotionMgr = PromotionManagerAI(self)
     self.cogSuitMgr = CogSuitManagerAI(self)
     self.raceMgr = RaceManagerAI(self)
     self.toontownTimeManager = ToontownTimeManager(
         serverTimeUponLogin=int(time.time()),
         globalClockRealTimeUponLogin=globalClock.getRealTime())