本文整理汇总了Python中toontown.estate.GardenGlobals.getRecipeKeyUsingSpecial方法的典型用法代码示例。如果您正苦于以下问题:Python GardenGlobals.getRecipeKeyUsingSpecial方法的具体用法?Python GardenGlobals.getRecipeKeyUsingSpecial怎么用?Python GardenGlobals.getRecipeKeyUsingSpecial使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类toontown.estate.GardenGlobals
的用法示例。
在下文中一共展示了GardenGlobals.getRecipeKeyUsingSpecial方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: getRequestPurchaseErrorText
# 需要导入模块: from toontown.estate import GardenGlobals [as 别名]
# 或者: from toontown.estate.GardenGlobals import getRecipeKeyUsingSpecial [as 别名]
def getRequestPurchaseErrorText(self, retcode):
retval = CatalogItem.CatalogItem.getRequestPurchaseErrorText(self, retcode)
origText = retval
if retval == TTLocalizer.CatalogPurchaseItemAvailable or retval == TTLocalizer.CatalogPurchaseItemOnOrder:
recipeKey = GardenGlobals.getRecipeKeyUsingSpecial(self.gardenIndex)
if not recipeKey == -1:
retval += GardenGlobals.getPlantItWithString(self.gardenIndex)
if self.gardenIndex == GardenGlobals.GardenAcceleratorSpecial:
if GardenGlobals.ACCELERATOR_USED_FROM_SHTIKER_BOOK:
retval = origText
retval += TTLocalizer.UseFromSpecialsTab
retval += TTLocalizer.MakeSureWatered
return retval
示例2: isSkillTooLow
# 需要导入模块: from toontown.estate import GardenGlobals [as 别名]
# 或者: from toontown.estate.GardenGlobals import getRecipeKeyUsingSpecial [as 别名]
def isSkillTooLow(self, avatar):
recipeKey = GardenGlobals.getRecipeKeyUsingSpecial(self.gardenIndex)
recipe = GardenGlobals.Recipes[recipeKey]
numBeansRequired = len(recipe['beans'])
canPlant = avatar.getBoxCapability()
result = False
if canPlant < numBeansRequired:
result = True
if not result and GardenGlobals.Specials.has_key(self.gardenIndex) and GardenGlobals.Specials[self.gardenIndex].has_key('minSkill'):
minSkill = GardenGlobals.Specials[self.gardenIndex]['minSkill']
if avatar.shovelSkill < minSkill:
result = True
else:
result = False
return result