def __init__(self, air, parent, activityTuple):
     DistributedPartyActivityAI.__init__(self, air, parent, activityTuple)
     FSM.__init__(self, 'DistributedPartyActivityAI')
     self.state = 'Idle'
     self.parent = parent
     self.eventId = PartyGlobals.FireworkShows.Summer
     self.showStyle = random.randint(0, len(FireworkShows.shows[PartyGlobals.FireworkShows.Summer]) - 1)
 def __init__(self, air, parent, activityTuple):
     DistributedPartyActivityAI.__init__(self, air, parent, activityTuple)
     self.numGenerations = 1
     self.generations = []
     self.player2catches = {}
     self.startTimestamp = globalClockDelta.getRealNetworkTime(bits=32)
     self.playing = False
 def __init__(self, air, parent, activityTuple):
     DistributedPartyActivityAI.__init__(self, air, parent, activityTuple)
     FSM.__init__(self, 'DistributedPartyTrampolineActivityAI')
     self.currentAv = 0
     self.record = 0
     self.jellybeans = []
     self.collected = 0
示例#4
0
 def __init__(self, air, parent, activityTuple):
     DistributedPartyActivityAI.__init__(self, air, parent, activityTuple)
     self.music = PartyGlobals.PhaseToMusicData40
     self.queue = []
     self.owners = []
     self.currentToon = 0
     self.playing = False
 def toonJoinRequest(self):
     DistributedPartyActivityAI.toonJoinRequest(self)
     avId = self.air.getAvatarIdFromSender()
     self.player2catches[avId] = 0
     if not self.playing:
         self.__startGame()
         self.sendUpdate('setState', ['Active', globalClockDelta.getRealNetworkTime()])
     self.updateToonsPlaying()
 def handleUnexpectedExit(self, avId, team):
     DistributedPartyActivityAI.handleUnexpectedExit(self, avId)
     if avId in self.teamDict[team]:
         del self.teamDict[team]
     if avId in self.leftTeam:
         self.leftTeam.remove(avId)
     if avId in self.rightTeam:
         self.rightTeam.remove(avId)
     self.updateToonsPlaying()
示例#7
0
 def handleUnexpectedExit(self, avId, team):
     DistributedPartyActivityAI.handleUnexpectedExit(self, avId)
     if avId in self.teamDict[team]:
         del self.teamDict[team]
     if avId in self.leftTeam:
         self.leftTeam.remove(avId)
     if avId in self.rightTeam:
         self.rightTeam.remove(avId)
     self.updateToonsPlaying()
 def __init__(self, air, parent, activityTuple):
     DistributedPartyActivityAI.__init__(self, air, parent, activityTuple)
     FSM.__init__(self, 'DistributedPartyActivityAI')
     self.state = 'Idle'
     self.parent = parent
     self.eventId = PartyGlobals.FireworkShows.Summer
     self.showStyle = random.randint(
         0,
         len(FireworkShows.shows[PartyGlobals.FireworkShows.Summer]) - 1)
    def __init__(self, air, party, activityInfo):
        DistributedPartyActivityAI.__init__(self, air, party, activityInfo)

        self.leftTeam = []
        self.rightTeam = []

        self.teamDict = {
            PartyGlobals.TeamActivityTeams.LeftTeam: self.leftTeam,
            PartyGlobals.TeamActivityTeams.RightTeam: self.rightTeam,
        }
示例#10
0
    def __init__(self, air, party, activityInfo):
        DistributedPartyActivityAI.__init__(self, air, party, activityInfo)

        self.leftTeam = []
        self.rightTeam = []

        self.teamDict = {
            PartyGlobals.TeamActivityTeams.LeftTeam: self.leftTeam,
            PartyGlobals.TeamActivityTeams.RightTeam: self.rightTeam
        }
 def toonExitDemand(self):
     avId = self.air.getAvatarIdFromSender()
     if avId not in self.toonsPlaying:
         self.air.writeServerEvent('suspicious', avId, 'Toon tried to exit a party game they\'re not using!')
         return
     catches = self.player2catches[avId]
     del self.player2catches[avId]
     av = self.air.doId2do.get(avId, None)
     if not av:
         self.air.writeServerEvent('suspicious', avId, 'Toon tried to award beans while not in district!')
         return
     if catches > PartyGlobals.CatchMaxTotalReward:
         catches = PartyGlobals.CatchMaxTotalReward
     self.sendUpdateToAvatarId(avId, 'showJellybeanReward', [catches, av.getMoney(), TTLocalizer.PartyCatchRewardMessage % (catches, catches)])
     av.addMoney(catches)
     DistributedPartyActivityAI.toonExitDemand(self)
     self.updateToonsPlaying()
示例#12
0
 def delete(self):
     taskMgr.remove('playSong%d' % self.doId)
     DistributedPartyActivityAI.delete(self)
 def delete(self):
     taskMgr.remove('newGeneration%d' % self.doId)
     DistributedPartyActivityAI.delete(self)
示例#14
0
    def generate(self):
        DistributedPartyActivityAI.generate(self)

        self.setState('WaitForEnough')
 def __init__(self, air, parent, activityTuple):
     DistributedPartyActivityAI.__init__(self, air, parent, activityTuple)
     self.toons = []
     self.headings = []
    def generate(self):
        DistributedPartyActivityAI.generate(self)

        self.setState("WaitForEnough")
 def generate(self):
     DistributedPartyActivityAI.generate(self)
     self.sendUpdate('setState', ['Active', globalClockDelta.getRealNetworkTime()])
示例#18
0
 def __init__(self, air, parent, activityTuple):
     DistributedPartyActivityAI.__init__(self, air, parent, activityTuple)
     self.cloudColors = {}
     self.cloudsHit = {}
示例#19
0
 def generate(self):
     DistributedPartyActivityAI.generate(self)
     self.sendUpdate(
         'setState',
         ['Active', globalClockDelta.getRealNetworkTime()])
示例#20
0
 def __init__(self, air, parent, activityTuple):
     DistributedPartyActivityAI.__init__(self, air, parent, activityTuple)
     self.toons = []
     self.headings = []
 def __init__(self, air, parent, activityTuple):
     DistributedPartyActivityAI.__init__(self, air, parent, activityTuple)
     self.cloudColors = {}
     self.cloudsHit = {}