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


Python Quests.avatarHasCompletedTrolleyQuest方法代码示例

本文整理汇总了Python中toontown.quest.Quests.avatarHasCompletedTrolleyQuest方法的典型用法代码示例。如果您正苦于以下问题:Python Quests.avatarHasCompletedTrolleyQuest方法的具体用法?Python Quests.avatarHasCompletedTrolleyQuest怎么用?Python Quests.avatarHasCompletedTrolleyQuest使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在toontown.quest.Quests的用法示例。


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

示例1: trolleyLeft

# 需要导入模块: from toontown.quest import Quests [as 别名]
# 或者: from toontown.quest.Quests import avatarHasCompletedTrolleyQuest [as 别名]
 def trolleyLeft(self):
     numPlayers = self.countFullSeats()
     if numPlayers > 0:
         newbieIds = []
         for avId in self.seats:
             if avId:
                 toon = self.air.doId2do.get(avId)
                 if toon:
                     if Quests.avatarHasTrolleyQuest(toon):
                         if not Quests.avatarHasCompletedTrolleyQuest(toon):
                             newbieIds.append(avId)
         playerArray = []
         for i in self.seats:
             if i not in [None, 0]:
                 playerArray.append(i)
         mgDict = MinigameCreatorAI.createMinigame(
             self.air, playerArray, self.zoneId, newbieIds=newbieIds)
         minigameZone = mgDict['minigameZone']
         minigameId = mgDict['minigameId']
         for seatIndex in xrange(len(self.seats)):
             avId = self.seats[seatIndex]
             if avId:
                 self.sendUpdateToAvatarId(avId, 'setMinigameZone', [minigameZone, minigameId])
                 self.clearFullNow(seatIndex)
     else:
         self.notify.warning('The trolley left, but was empty.')
     self.enter()
开发者ID:BmanGames,项目名称:ToontownStride,代码行数:29,代码来源:DistributedTrolleyAI.py

示例2: trolleyLeft

# 需要导入模块: from toontown.quest import Quests [as 别名]
# 或者: from toontown.quest.Quests import avatarHasCompletedTrolleyQuest [as 别名]
    def trolleyLeft(self):
        numPlayers = self.countFullSeats()
        if numPlayers > 0:
            newbieIds = []
            for avId in self.seats:
                if avId:
                    toon = self.air.doId2do.get(avId)
                    if toon:
                        if Quests.avatarHasTrolleyQuest(toon):
                            if not Quests.avatarHasCompletedTrolleyQuest(toon):
                                newbieIds.append(avId)

            playerArray = []
            for i in self.seats:
                if i not in [None, 0]:
                    playerArray.append(i)

            startingVotes = None
            metagameRound = -1
            trolleyGoesToMetagame = simbase.config.GetBool('trolley-goes-to-metagame', 0)
            trolleyHoliday = bboard.get(TrolleyHolidayMgrAI.TrolleyHolidayMgrAI.PostName)
            trolleyWeekend = bboard.get(TrolleyWeekendMgrAI.TrolleyWeekendMgrAI.PostName)
            if trolleyGoesToMetagame or trolleyHoliday or trolleyWeekend:
                metagameRound = 0
                if simbase.config.GetBool('metagame-min-2-players', 1) and len(playerArray) == 1:
                    metagameRound = -1
            mgDict = MinigameCreatorAI.createMinigame(self.air, playerArray, self.zoneId, newbieIds=newbieIds, startingVotes=startingVotes, metagameRound=metagameRound)
            minigameZone = mgDict['minigameZone']
            minigameId = mgDict['minigameId']
            for seatIndex in range(len(self.seats)):
                avId = self.seats[seatIndex]
                if avId:
                    self.sendUpdateToAvatarId(avId, 'setMinigameZone', [minigameZone, minigameId])
                    self.clearFullNow(seatIndex)

        else:
            self.notify.warning('The trolley left, but was empty.')
        self.enter()
        return
开发者ID:Toonerz,项目名称:Possible-Toontown-Online-Source,代码行数:41,代码来源:DistributedTrolleyAI.py

示例3: trolleyLeft

# 需要导入模块: from toontown.quest import Quests [as 别名]
# 或者: from toontown.quest.Quests import avatarHasCompletedTrolleyQuest [as 别名]
 def trolleyLeft(self):
     numPlayers = self.countFullSeats()
     if numPlayers > 0:
         newbieIds = []
         for avId in self.seats:
             if avId:
                 toon = self.air.doId2do.get(avId)
                 if toon:
                     if Quests.avatarHasTrolleyQuest(toon):
                         if not Quests.avatarHasCompletedTrolleyQuest(toon):
                             newbieIds.append(avId)
         playerArray = []
         for i in self.seats:
             if i not in [None, 0]:
                 playerArray.append(i)
         startingVotes = None
         metagameRound = -1
         trolleyGoesToMetagame = simbase.config.GetBool('want-travel-game', 0)
         trolleyHoliday = simbase.air.holidayManager.isHolidayRunning(TROLLEY_HOLIDAY) or\
             simbase.air.holidayManager.isHolidayRunning(SILLY_SATURDAY_TROLLEY)
         trolleyWeekend = simbase.air.holidayManager.isHolidayRunning(TROLLEY_WEEKEND)
         if trolleyGoesToMetagame and (trolleyHoliday or trolleyWeekend):
             metagameRound = 0
             if len(playerArray) == 1:
                 metagameRound = -1
         mgDict = MinigameCreatorAI.createMinigame(
             self.air, playerArray, self.zoneId, newbieIds=newbieIds,
             startingVotes=startingVotes, metagameRound=metagameRound)
         minigameZone = mgDict['minigameZone']
         minigameId = mgDict['minigameId']
         for seatIndex in xrange(len(self.seats)):
             avId = self.seats[seatIndex]
             if avId:
                 self.sendUpdateToAvatarId(avId, 'setMinigameZone', [minigameZone, minigameId])
                 self.clearFullNow(seatIndex)
     else:
         self.notify.warning('The trolley left, but was empty.')
     self.enter()
开发者ID:NostalgicTTR,项目名称:Toontown-Infinite-2016-Leak,代码行数:40,代码来源:DistributedTrolleyAI.py

示例4: enterTeleportIn

# 需要导入模块: from toontown.quest import Quests [as 别名]
# 或者: from toontown.quest.Quests import avatarHasCompletedTrolleyQuest [as 别名]
 def enterTeleportIn(self, requestStatus):
     imgScale = 0.25
     if self.dialog:
         x, y, z, h, p, r = base.cr.hoodMgr.getPlaygroundCenterFromId(self.loader.hood.id)
     elif base.localAvatar.hp < 1:
         requestStatus['nextState'] = 'popup'
         x, y, z, h, p, r = base.cr.hoodMgr.getPlaygroundCenterFromId(self.loader.hood.id)
         self.accept('deathAck', self.__handleDeathAck, extraArgs=[requestStatus])
         self.deathAckBox = DeathForceAcknowledge.DeathForceAcknowledge(doneEvent='deathAck')
     elif base.localAvatar.hp > 0 and (Quests.avatarHasTrolleyQuest(base.localAvatar) or Quests.avatarHasFirstCogQuest(base.localAvatar) or Quests.avatarHasFriendQuest(base.localAvatar) or Quests.avatarHasPhoneQuest(base.localAvatar) and Quests.avatarHasCompletedPhoneQuest(base.localAvatar)) and self.loader.hood.id == ToontownGlobals.ToontownCentral:
         requestStatus['nextState'] = 'popup'
         imageModel = loader.loadModel('phase_4/models/gui/tfa_images')
         if base.localAvatar.quests[0][0] == Quests.TROLLEY_QUEST_ID:
             if not Quests.avatarHasCompletedTrolleyQuest(base.localAvatar):
                 x, y, z, h, p, r = base.cr.hoodMgr.getDropPoint(base.cr.hoodMgr.ToontownCentralInitialDropPoints)
                 msg = TTLocalizer.NPCForceAcknowledgeMessage3
                 imgNodePath = imageModel.find('**/trolley-dialog-image')
                 imgPos = (0, 0, 0.04)
                 imgScale = 0.5
             else:
                 x, y, z, h, p, r = base.cr.hoodMgr.getDropPoint(base.cr.hoodMgr.ToontownCentralHQDropPoints)
                 msg = TTLocalizer.NPCForceAcknowledgeMessage4
                 imgNodePath = imageModel.find('**/hq-dialog-image')
                 imgPos = (0, 0, -0.02)
                 imgScale = 0.5
         elif base.localAvatar.quests[0][0] == Quests.FIRST_COG_QUEST_ID:
             if not Quests.avatarHasCompletedFirstCogQuest(base.localAvatar):
                 x, y, z, h, p, r = base.cr.hoodMgr.getDropPoint(base.cr.hoodMgr.ToontownCentralTunnelDropPoints)
                 msg = TTLocalizer.NPCForceAcknowledgeMessage5
                 imgNodePath = imageModel.find('**/tunnelSignA')
                 imgPos = (0, 0, 0.04)
                 imgScale = 0.5
             else:
                 x, y, z, h, p, r = base.cr.hoodMgr.getDropPoint(base.cr.hoodMgr.ToontownCentralHQDropPoints)
                 msg = TTLocalizer.NPCForceAcknowledgeMessage6
                 imgNodePath = imageModel.find('**/hq-dialog-image')
                 imgPos = (0, 0, 0.05)
                 imgScale = 0.5
         elif base.localAvatar.quests[0][0] == Quests.FRIEND_QUEST_ID:
             if not Quests.avatarHasCompletedFriendQuest(base.localAvatar):
                 x, y, z, h, p, r = base.cr.hoodMgr.getDropPoint(base.cr.hoodMgr.ToontownCentralInitialDropPoints)
                 msg = TTLocalizer.NPCForceAcknowledgeMessage7
                 gui = loader.loadModel('phase_3.5/models/gui/friendslist_gui')
                 imgNodePath = gui.find('**/FriendsBox_Closed')
                 imgPos = (0, 0, 0.04)
                 imgScale = 1.0
                 gui.removeNode()
             else:
                 x, y, z, h, p, r = base.cr.hoodMgr.getDropPoint(base.cr.hoodMgr.ToontownCentralHQDropPoints)
                 msg = TTLocalizer.NPCForceAcknowledgeMessage8
                 imgNodePath = imageModel.find('**/hq-dialog-image')
                 imgPos = (0, 0, 0.05)
                 imgScale = 0.5
         elif base.localAvatar.quests[0][0] == Quests.PHONE_QUEST_ID:
             if Quests.avatarHasCompletedPhoneQuest(base.localAvatar):
                 x, y, z, h, p, r = base.cr.hoodMgr.getDropPoint(base.cr.hoodMgr.ToontownCentralHQDropPoints)
                 msg = TTLocalizer.NPCForceAcknowledgeMessage9
                 imgNodePath = imageModel.find('**/hq-dialog-image')
                 imgPos = (0, 0, 0.05)
                 imgScale = 0.5
         self.dialog = TTDialog.TTDialog(text=msg, command=self.__cleanupDialog, style=TTDialog.Acknowledge)
         imgLabel = DirectLabel.DirectLabel(parent=self.dialog, relief=None, pos=imgPos, scale=TTLocalizer.PimgLabel, image=imgNodePath, image_scale=imgScale)
         imageModel.removeNode()
     else:
         requestStatus['nextState'] = 'walk'
         x, y, z, h, p, r = base.cr.hoodMgr.getPlaygroundCenterFromId(self.loader.hood.id)
     base.localAvatar.detachNode()
     base.localAvatar.setPosHpr(render, x, y, z, h, p, r)
     Place.Place.enterTeleportIn(self, requestStatus)
     return
开发者ID:nate97,项目名称:src,代码行数:72,代码来源:Playground.py


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