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


Python TTLocalizer.getResultPlantedSomethingSentence方法代码示例

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


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

示例1: __handleFlowerPlantingDone

# 需要导入模块: from toontown.toonbase import TTLocalizer [as 别名]
# 或者: from toontown.toonbase.TTLocalizer import getResultPlantedSomethingSentence [as 别名]
 def __handleFlowerPlantingDone(self, willPlant = 0, recipeStr = '', special = -1):
     self.ignore(self.plantingGuiDoneEvent)
     self.ignore('stoppedAsleep')
     self.plantingGui.destroy()
     self.plantingGui = None
     base.localAvatar.showGardeningGui()
     base.localAvatar.removeShovelRelatedDoId(self.doId)
     successPlanting = False
     if willPlant:
         recipeKey = GardenGlobals.getRecipeKey(recipeStr, special)
         if recipeKey >= 0:
             species, variety = GardenGlobals.getSpeciesVarietyGivenRecipe(recipeKey)
             if species >= 0 and variety >= 0:
                 self.sendUpdate('plantFlower', [species, variety])
                 successPlanting = True
         else:
             self.notify.debug('%s %d is not a valid recipe' % (recipeStr, special))
             burntBeans = len(recipeStr)
             self.sendUpdate('plantNothing', [burntBeans])
     if successPlanting:
         flowerName = GardenGlobals.getFlowerVarietyName(species, variety)
         stringToShow = TTLocalizer.getResultPlantedSomethingSentence(flowerName)
     elif willPlant:
         self.resultDialog = TTDialog.TTDialog(style=TTDialog.Acknowledge, text=TTLocalizer.ResultPlantedNothing, command=self.popupFlowerPlantingGuiAgain)
     else:
         self.finishInteraction()
开发者ID:Toonerz,项目名称:Toontown-World-Online-Leak,代码行数:28,代码来源:DistributedGardenPlot.py

示例2: doResultDialog

# 需要导入模块: from toontown.toonbase import TTLocalizer [as 别名]
# 或者: from toontown.toonbase.TTLocalizer import getResultPlantedSomethingSentence [as 别名]
 def doResultDialog(self):
     self.startInteraction()
     curTrack, curLevel = GardenGlobals.getTreeTrackAndLevel(self.typeIndex)
     species = GardenGlobals.getTreeTypeIndex(curTrack, curLevel)
     treeName = GardenGlobals.PlantAttributes[species]['name']
     stringToShow = TTLocalizer.getResultPlantedSomethingSentence(treeName)
     self.resultDialog = TTDialog.TTDialog(style=TTDialog.Acknowledge, text=stringToShow, command=self.resultsCallback)
开发者ID:BmanGames,项目名称:ToontownStride,代码行数:9,代码来源:DistributedGagTree.py

示例3: doResultDialog

# 需要导入模块: from toontown.toonbase import TTLocalizer [as 别名]
# 或者: from toontown.toonbase.TTLocalizer import getResultPlantedSomethingSentence [as 别名]
 def doResultDialog(self):
     self.startInteraction()
     flowerName = GardenGlobals.getFlowerVarietyName(self.species, self.variety)
     stringToShow = TTLocalizer.getResultPlantedSomethingSentence(flowerName)
     self.resultDialog = TTDialog.TTDialog(
         style=TTDialog.Acknowledge, text=stringToShow, command=self.resultsCallback
     )
开发者ID:BmanGames,项目名称:ToontownStride,代码行数:9,代码来源:DistributedFlower.py

示例4: __handleItemPlantingDone

# 需要导入模块: from toontown.toonbase import TTLocalizer [as 别名]
# 或者: from toontown.toonbase.TTLocalizer import getResultPlantedSomethingSentence [as 别名]
 def __handleItemPlantingDone(self, willPlant = 0, recipeStr = '', selectedSpecial = -1):
     self.ignore(self.plantingGuiDoneEvent)
     self.ignore('stoppedAsleep')
     self.plantingGui.destroy()
     self.plantingGui = None
     base.localAvatar.showGardeningGui()
     base.localAvatar.removeShovelRelatedDoId(self.doId)
     gardenSpecials = base.localAvatar.getGardenSpecials()
     special = -1
     if selectedSpecial >= 0:
         special = gardenSpecials[selectedSpecial][0]
     successPlanting = False
     successToonStatue = False
     if willPlant:
         recipeKey = GardenGlobals.getRecipeKey(recipeStr, special)
         if recipeKey >= 0:
             species, variety = GardenGlobals.getSpeciesVarietyGivenRecipe(recipeKey)
             if species >= 0 and variety >= 0:
                 if GardenGlobals.PlantAttributes[species]['plantType'] == GardenGlobals.STATUARY_TYPE:
                     successPlanting = True
                     if species >= 205 and species <= 208:
                         successToonStatue = True
                     else:
                         self.sendUpdate('plantStatuary', [species])
         else:
             self.notify.debug('%s %d is not a valid recipe' % (recipeStr, special))
             burntBeans = len(recipeStr)
             self.sendUpdate('plantNothing', [burntBeans])
     if successPlanting:
         itemName = GardenGlobals.PlantAttributes[species]['name']
         stringToShow = TTLocalizer.getResultPlantedSomethingSentence(itemName)
     elif willPlant:
         self.resultDialog = TTDialog.TTDialog(style=TTDialog.Acknowledge, text=TTLocalizer.ResultPlantedNothing, command=self.popupItemPlantingGuiAgain)
     else:
         self.finishInteraction()
     if successToonStatue:
         self.popupToonStatueSelectionGui(species)
     return
开发者ID:AdrianF98,项目名称:Toontown-Rewritten,代码行数:40,代码来源:DistributedGardenPlot.py

示例5: doResultDialog

# 需要导入模块: from toontown.toonbase import TTLocalizer [as 别名]
# 或者: from toontown.toonbase.TTLocalizer import getResultPlantedSomethingSentence [as 别名]
 def doResultDialog(self):
     self.startInteraction()
     itemName = GardenGlobals.PlantAttributes[self.typeIndex]['name']
     stringToShow = TTLocalizer.getResultPlantedSomethingSentence(itemName)
     self.resultDialog = TTDialog.TTDialog(style=TTDialog.Acknowledge, text=stringToShow, command=self.resultsCallback)
开发者ID:BmanGames,项目名称:ToontownStride,代码行数:7,代码来源:DistributedStatuary.py


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