本文整理汇总了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()
示例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()
示例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()
示例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
示例5: getFullName
# 需要导入模块: import GardenGlobals [as 别名]
# 或者: from GardenGlobals import getFlowerVarietyName [as 别名]
def getFullName(self):
return GardenGlobals.getFlowerVarietyName(self.species, self.variety)