def __init__(self, air): DistributedObjectAI.__init__(self, air) self.toons = [0, 0, 0, 0, 0, 0] self.items = [[], [], [], [], [], []] self.decorData = [] self.estateType = 0 # NOT SURE IF THIS HAS ANY USE BUT THANKS DISNEY self.cloudType = 0 self.dawnTime = 0 self.lastEpochTimestamp = 0 self.rentalTimestamp = 0 self.houses = [None] * 6 self.pond = None self.spots = [] self.targets = [] self.owner = None self.info = info self.activities = [] self.cannonActivity = None self.avIdsAtParty = [] for activity in self.info['activities']: if activity[0] == ActivityIds.PartyClock: self.partyClockInfo = (activity[1], activity[2], activity[3])
def __init__(self, air): DistributedObjectAI.__init__(self, air) FSM.__init__(self, 'AnimProp') self.state = 'Attract' self.lastTime = globalClockDelta.getRealNetworkTime() self.propId = 0 self.currentAvatar = 0
def __init__(self, air): DistributedObjectAI.__init__(self, air) self.avId = None self.pondDoId = None self.posHpr = [None, None, None, None, None, None] self.cast = False self.lastFish = [None, None, None, None]
def __init__(self, air): DistributedObjectAI.__init__(self, air) self.air = air self.currentContext = 0 self.requests = {} self.tfCodes = {} taskMgr.add(self.__tfCodesTask, 'TrueFriendsCodesClearTask')
def __init__(self, air): DistributedObjectAI.__init__(self, air) self.estate2toons = {} self.toon2estate = {} self.estate2timeout = {} self.zoneId2owner = {}
def __init__(self, block, air, zoneId): DistributedObjectAI.__init__(self, air) self.block = block self.zoneId = zoneId self.bankCollectable = None
def __init__(self, air): DistributedObjectAI.__init__(self, air) self.air = air self.currentContext = 0 self.requests = {} self.tfFsms = {} self.connectToDatabase()
def __init__(self, air): DistributedObjectAI.__init__(self, air) self.name = None self.color = None self.score = 0 self.artBonus = 0 self.game = None self.gameId = 0 self.avId = 0 self.scoreDirty = False # The player's poster, if set. This can be set either from # the AI side, or from the client side through the normal # DistributedObject channels (it is set directly to the server # via a separate POST operation, since JavaScript can't read a # file locally). self.posterData = ('', 0) # The cell onto which this player's poster is/will be applied. self.posterCell = None self.updateScoreTask = None # Which cell the player's avatar appears to be standing in. self.cellLocation = None # A dictionary of other player avatars we've painted on. self.paintedAvatars = {} # Cells that we've painted. self.paintedCells = [] self.accept('deleteAvatar', self.deleteAvatar)
def __init__(self, air): DistributedObjectAI.__init__(self, air) self.area = None self.targets = {} self.spots = {} self.bingoMgr = None
def __init__(self, air): DistributedObjectAI.__init__(self, air) self.gameActive = True self.winners = [] self.artPaintings = [] self.nextGameId = 0 self.timeout = globalClock.getFrameTime() + Globals.GameLengthSeconds self.expireTask = taskMgr.doMethodLater(Globals.GameLengthSeconds, self.expireGame, 'expireGame') self.deleteGameTask = None # Get a unique zoneId to put game objects (like the players) # in. self.objZone = self.air.zoneAllocator.allocate() self.maxNumPlayers = 0 # Player ID's in the game. self.playerIds = [] # Player ID's about to join the game. self.waitingIds = [] # Mapping of player url -> server url for player posters. self.playerPosterMap = {} self.accept('newPlayer', self.newPlayer) self.accept('deletePlayer', self.deletePlayer)
def __init__(self, air): DistributedObjectAI.__init__(self, air) self.air = air self.pad = None self.currentMovie = False self.avId = 0 self.posHpr = [0, 0, 0, 0, 0, 0]
def __init__(self, air, hostId, zoneId, partyInfo): DistributedObjectAI.__init__(self, air) self.hostId = hostId self.zoneId = zoneId self.partyInfo = partyInfo self.startTime = datetime.strftime(datetime.now(ToontownTimeZone()), '%Y-%m-%d %H:%M:%S') self.partyState = PartyGlobals.PartyStatus.Pending self.participants = [] for activity in self.partyInfo['activities']: if activity[0] == PartyGlobals.ActivityIds.PartyClock: self.partyClockInfo = (activity[1], activity[2], activity[3]) self.hostName = '' self.cannonActivityGenerated = 0 host = self.air.doId2do.get(self.hostId) if host is not None: self.hostName = host.getName() else: self.air.dbInterface.queryObject(self.air.dbId, self.hostId, self.__gotHost) self.activities = []
def __init__(self, air): DistributedObjectAI.__init__(self, air) # Define the default events we want for this year self.events = [EventRandomDialogue, EventRandomEffects, EventEstateGravity, EventGlobalGravity]
def __init__(self, air): DistributedObjectAI.__init__(self, air) self.toons = [0, 0, 0, 0, 0, 0] self.items = [[], [], [], [], [], []] self.decorData = [] self.estateType = 0 self.cloudType = 0 self.dawnTime = 0 self.lastEpochTimestamp = 0 self.rentalTimestamp = 0 self.houses = [None] * 6 self.pond = None self.spots = [] self.targets = [] self.treasurePlanner = None self.rentalType = 0 self.rentalHandle = None self.targets = [] self.owner = None
def __init__(self, air): DistributedObjectAI.__init__(self, air) air.cogdoGame = self self.interiorId = 0 self.exteriorZone = 0 self.difficultyOverrides = [2147483647, -1] self.requests = {} self.toons = []
def __init__(self, air): DistributedObjectAI.__init__(self, air) self.accept('avatarEntered', self.__announceIfHoliday) self.HolidayManagerAI = HolidayManagerAI.HolidayManagerAI(air) # self.NewsInvasionAI = NewsInvasionAI.NewsInvasionAI(air) # self.NewsInvasionAI.startInvTick() self.HolidayManagerAI.startFireworksTick() self.HolidayName = []
def __init__(self, air): DistributedObjectAI.__init__(self, air) FSM.__init__(self, 'DistributedTrolleyAI') self.trolleyCountdownTime = config.GetFloat('trolley-countdown-time', TROLLEY_COUNTDOWN_TIME) self.slots = [None, None, None, None] self.boardable = False
def __init__(self, air, parent, activityTuple): DistributedObjectAI.__init__(self, air) self.parent = parent x, y, h = activityTuple[1:] # ignore activity ID self.x = PartyUtils.convertDistanceFromPartyGrid(x, 0) self.y = PartyUtils.convertDistanceFromPartyGrid(y, 1) self.h = h * PartyGlobals.PartyGridHeadingConverter self.toonsPlaying = []
def __init__(self, air): DistributedObjectAI.__init__(self, air) self.skel = False self.curInvading = None self.startTime = 0 self.duration = 0
def __init__(self, block, air, zoneId): DistributedObjectAI.__init__(self, air) self.block = block self.zoneId = zoneId self.tutorial = 0 self.isDirty = False self.accept('leaderboardChanged', self.leaderboardChanged) self.accept('leaderboardFlush', self.leaderboardFlush)
def __init__(self, air, house): DistributedObjectAI.__init__(self, air) self.house = house self.houseId = 0 self.houseIndex = 0 self.wallpaper = '' self.windows = '' self.furnitureManager = DistributedFurnitureManagerAI(self.air, self.house, self)
def __init__(self, air, interior): DistributedObjectAI.__init__(self, air) self._interior = interior self.loadFSM = ClassicFSM.ClassicFSM('DistCogdoGameAI.loaded', [State.State('NotLoaded', self.enterNotLoaded, self.exitNotLoaded, ['Loaded']), State.State('Loaded', self.enterLoaded, self.exitLoaded, ['NotLoaded'])], 'NotLoaded', 'NotLoaded') self.fsm = ClassicFSM.ClassicFSM('DistCogdoGameAI', [State.State('Intro', self.enterIntro, self.exitIntro, ['Game']), State.State('Game', self.enterGame, self.exitGame, ['Finish']), State.State('Finish', self.enterFinish, self.exitFinish, ['Off']), State.State('Off', self.enterOff, self.exitOff, ['Intro'])], 'Off', 'Off')
def __init__(self, air): DistributedObjectAI.__init__(self, air) self.estateId = 0 self.targetId = 0 self.posHpr = (0, 0, 0, 0, 0, 0) self.bumperPos = ToontownGlobals.PinballCannonBumperInitialPos self.active = 0 self.avId = 0
def __init__(self, air, exterior): DistributedObjectAI.__init__(self, air) FSM.FSM.__init__(self, 'CogdoInteriorAIFSM') self.toons = filter(None, exterior.elevator.seats[:]) self.responses = {} self.bldgDoId = exterior.doId self.numFloors = NUM_FLOORS_DICT[exterior.track] self.sosNPC = self.__generateSOS(exterior.difficulty) self.shopOwnerNpcId = 0 self.extZoneId, self.zoneId = exterior.getExteriorAndInteriorZoneId() npcIdList = NPCToons.zone2NpcDict.get(self.zoneId, []) if len(npcIdList) == 0: self.notify.info('No NPC in taken cogdo at %s' % self.zoneId) else: if len(npcIdList) > 1: self.notify.warning('Multiple NPCs in taken cogdo at %s' % self.zoneId) self.shopOwnerNpcId = npcIdList[0] self.gameDone = 0 self.bossBattleDone = 0 self.curFloor = 0 self.topFloor = 2 self.timer = Timer.Timer() self.exterior = exterior self.planner = self.exterior.planner self.savedByMap = { } self.battle = None self.FOType = exterior.track self.gameFloor = 1 self.battleFloor = 2 self.barrelFloor = -1 if self.FOType == 'l': self.battleFloor = 3 self.barrelFloor = 2 self.topFloor += 1 self.toonSkillPtsGained = { } self.toonExp = { } self.toonOrigQuests = { } self.toonItems = { } self.toonOrigMerits = { } self.toonMerits = { } self.toonParts = { } self.helpfulToons = [] self.barrels = [] self.suits = [] self.activeSuits = [] self.reserveSuits = [] self.joinedReserves = [] self.suitsKilled = [] self.suitsKilledPerFloor = [] self.ignoreResponses = 0 self.ignoreElevatorDone = 0 self.ignoreReserveJoinDone = 0
def __init__(self, air): DistributedObjectAI.__init__(self, air) self.area = 0 self.playground = 0 self.stateIndex = 0 self.curIndex = 0 self.destIndex = 0 self.time = 0 self.timestamp = 0
def __init__(self, air): DistributedObjectAI.__init__(self, air) self.state = '' self.stateTime = globalClockDelta.getRealNetworkTime() self.fsm = ClassicFSM.ClassicFSM('DistributedBoat', [State.State('DockedEast', self.enterDockedEast, self.exitDockedEast, ['SailingWest', 'SailingEast', 'DockedWest']), State.State('SailingWest', self.enterSailingWest, self.exitSailingWest, ['DockedWest', 'SailingEast', 'DockedEast']), State.State('DockedWest', self.enterDockedWest, self.exitDockedWest, ['SailingEast', 'SailingWest', 'DockedEast']), State.State('SailingEast', self.enterSailingEast, self.exitSailingEast, ['DockedEast', 'DockedWest', 'SailingWest'])], 'DockedEast', 'DockedEast') self.fsm.enterInitialState()
def __init__(self, air, playground, area, ownerId): DistributedObjectAI.__init__(self, air) self.playground = playground self.area = area self.ownerId = ownerId self.fsm = ClassicFSM.ClassicFSM('DistributedButterfliesAI', [State.State('off', self.enterOff, self.exitOff, ['Flying', 'Landed']), State.State('Flying', self.enterFlying, self.exitFlying, ['Landed']), State.State('Landed', self.enterLanded, self.exitLanded, ['Flying'])], 'off', 'off') self.fsm.enterInitialState() self.curPos, self.curIndex, self.destPos, self.destIndex, self.time = ButterflyGlobals.getFirstRoute(self.playground, self.area, self.ownerId) return None
def __init__(self, air, house): DistributedObjectAI.__init__(self, air) self.busy = False self.user = None self.house = house self.houseId = self.house.doId self.housePos = self.house.housePos self.name = self.house.name
def __init__(self, air): DistributedObjectAI.__init__(self, air) self.air = air self.notify.setInfo(True) self.failAttempts = 0 self.notify.info("Creating code redeemer...") self.activeCodes = {'for-girls': (RedeemErrors.Success, CatalogClothingItem(1204, 0)), 'for-boys': (RedeemErrors.Success, CatalogClothingItem(1745, 0)), 'for-both': (RedeemErrors.Success, CatalogClothingItem(1785, 0)), 'for-none': (RedeemErrors.CodeIsInactive, CatalogClothingItem(1786, 0))}
def __init__(self, air, operation = 'SpeedUp'): DistributedObjectAI.__init__(self, air) FSM.__init__(self, 'ToonfestCogFSM') self.air = air self.validOperations = ['SpeedUp', 'SlowDown', 'Reverse'] if operation in self.validOperations: self.operation = operation else: print 'DistributedToonfestCogAI: Operation %s is not a valid operation.' % operation self.operation = 'SpeedUp'
def __init__(self, air): DistributedObjectAI.__init__(self, air) self.enabled = 0 self.power = 0 self.time = 0 self.highScore = 0
def __init__(self, air, avatarId): DistributedObjectAI.__init__(self, air) self.avatarId = avatarId self.av = self.air.doId2do.get(self.avatarId) self.tutSuit = None
def __init__(self, air): DistributedObjectAI.__init__(self, air) self.avId2disconnectcode = {} self.avId2exceptioninfo = {}
def __init__(self, air): DistributedObjectAI.__init__(self, air) self.name = '' self.population = 0
def __init__(self, air): DistributedObjectAI.__init__(self, air) self.name = 'Not Given' self.available = 0
def __init__(self, cr): DistributedObjectAI.__init__(self, cr) base.messenger.send("addLog", ["Distributed Level AI initialised"]) self.builder = Builder(self, "map.txt", "development")
def __init__(self, air): DistributedObjectAI.__init__(self, air) self.air = air self.currentContext = 0 self.requests = {} self.teleportRequests = {}
def __init__(self, air): DistributedObjectAI.__init__(self, air) self.avId2DcReason = {}
def __init__(self, air): DistributedObjectAI.__init__(self, air) self.name = None self.available = False self.full = False return
def __init__(self, air): DistributedObjectAI.__init__(self, air) FSM.__init__(self, 'WinterCarolingFSM') self.air = air
def __init__(self, air): DistributedObjectAI.__init__(self, air) self.area = None
def __init__(self, air): DistributedObjectAI.__init__(self, air) self.area = None self.startingBlocks = [] self.index = -1
def __init__(self, air): DistributedObjectAI.__init__(self, air) FSM.__init__(self, 'ResistanceFSM') self.air = air
def __init__(self, air): DistributedObjectAI.__init__(self, air) self.leaderInfo = ([], [], [])
def __init__(self, air): DistributedObjectAI.__init__(self, air) self.air = air self.holidayDates = []
def __init__(self, air): DistributedObjectAI.__init__(self, air) FSM.__init__(self, 'ToonfestBalloonFSM') self.avId = 0 self.stateTime = globalClockDelta.getRealNetworkTime() self.flightPathIndex = 0
def __init__(self, air): DistributedObjectAI.__init__(self, air) # Load the leaderboard backup for this shard: self.leaderInfo, self.trophyScores = simbase.backups.load( 'trophy-mgr', (simbase.air.districtId,), default=(([], [], []), {}))
def __init__(self, air): DistributedObjectAI.__init__(self, air)
def __init__(self, air): DistributedObjectAI.__init__(self, air) FSM.__init__(self, 'GreenToonFSM') self.air = air
def __init__(self, air): DistributedObjectAI.__init__(self, air) self.nameObject = None self.senderIdContexttoPhone = {}
def __init__(self, air): DistributedObjectAI.__init__(self, air) self.catalogGenerator = CatalogGenerator.CatalogGenerator() self.currentAvatar = {} self.currentAccount = {}
def __init__(self, air): DistributedObjectAI.__init__(self, air) self.setStartTime(globalClockDelta.getRealNetworkTime(bits=32))
def __init__(self, air, index): DistributedObjectAI.__init__(self, air) self.index = index self.state = CogdoBarrelRoomConsts.StateAvailable self.brLaff = 0
def __init__(self, air): DistributedObjectAI.__init__(self, air) self.avId2fsm = {}
def __init__(self, air): DistributedObjectAI.__init__(self, air) FSM.__init__(self, self.__class__.__name__) self.currSeq = None
def __init__(self, air): DistributedObjectAI.__init__(self, air) self.zoneId = 0 self.block = 0
def __init__(self, air): DistributedObjectAI.__init__(self, air) self.activeHolidays = [] self.fireworkTasks = []
def __init__(self, air): DistributedObjectAI.__init__(self, air) self.modsOnline = [] self.adminsOnline = [] self.sysadminsOnline = []
def __init__(self, air): DistributedObjectAI.__init__(self, air) self.estate2toons = {} self.toon2estate = {} self.estate2timeout = {}
def __init__(self, air): DistributedObjectAI.__init__(self, air) self.catalogGenerator = CatalogGenerator()