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


Python GardenGlobals.getFlowerVarietyName方法代码示例

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


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

示例1: __handleFlowerPlantingDone

# 需要导入模块: import GardenGlobals [as 别名]
# 或者: from GardenGlobals import getFlowerVarietyName [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: update

# 需要导入模块: import GardenGlobals [as 别名]
# 或者: from GardenGlobals import getFlowerVarietyName [as 别名]
    def update(self):
        if base.localAvatar.flowerCollection.hasSpecies(self.species):
            self.flowerPanel.show(showBackground=0)
            self['text'] = TTLocalizer.FlowerSpeciesNames[self.species]
        for variety in range(len(GardenGlobals.getFlowerVarieties(self.species))):
            if base.localAvatar.flowerCollection.hasFlower(self.species, variety):
                name = GardenGlobals.getFlowerVarietyName(self.species, variety)
                self.speciesLabels[variety]['text'] = name
                self.speciesLabels[variety]['state'] = DGG.NORMAL

        self.showRecipe()
开发者ID:Toonerz,项目名称:Toontown-World-Online-Leaked-Source,代码行数:13,代码来源:FlowerSpeciesPanel.py

示例3: showRecipe

# 需要导入模块: import GardenGlobals [as 别名]
# 或者: from GardenGlobals import getFlowerVarietyName [as 别名]
 def showRecipe(self):
     if base.localAvatar.flowerCollection.hasSpecies(self.species):
         self['text'] = TTLocalizer.FlowerSpeciesNames[self.species]
         if base.localAvatar.flowerCollection.hasFlower(self.species, self.variety):
             name = GardenGlobals.getFlowerVarietyName(self.species, self.variety)
             recipeKey = GardenGlobals.PlantAttributes[self.species]['varieties'][self.variety][0]
             self['text'] = name
             self.createBeanRecipeGui(GardenGlobals.Recipes[recipeKey]['beans'])
         else:
             self.cleanupBeanRecipeGui()
     else:
         self['text'] = TTLocalizer.FlowerUnknown
         self.cleanupBeanRecipeGui()
开发者ID:Toonerz,项目名称:Toontown-World-Online-Leaked-Source,代码行数:15,代码来源:FlowerSpeciesPanel.py

示例4: getFullNameWithRecipe

# 需要导入模块: import GardenGlobals [as 别名]
# 或者: from GardenGlobals import getFlowerVarietyName [as 别名]
 def getFullNameWithRecipe(self):
     name = GardenGlobals.getFlowerVarietyName(self.species, self.variety)
     recipeKey = GardenGlobals.PlantAttributes[self.species]['varieties'][self.variety][0]
     name += ' (%s)' % GardenGlobals.Recipes[recipeKey]['beans']
     return name
开发者ID:MasterLoopyBM,项目名称:c0d3,代码行数:7,代码来源:FlowerBase.py

示例5: getFullName

# 需要导入模块: import GardenGlobals [as 别名]
# 或者: from GardenGlobals import getFlowerVarietyName [as 别名]
 def getFullName(self):
     return GardenGlobals.getFlowerVarietyName(self.species, self.variety)
开发者ID:MasterLoopyBM,项目名称:c0d3,代码行数:4,代码来源:FlowerBase.py


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