當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。