本文整理汇总了Python中toontown.estate.GardenGlobals.getMaxShovelSkill方法的典型用法代码示例。如果您正苦于以下问题:Python GardenGlobals.getMaxShovelSkill方法的具体用法?Python GardenGlobals.getMaxShovelSkill怎么用?Python GardenGlobals.getMaxShovelSkill使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类toontown.estate.GardenGlobals
的用法示例。
在下文中一共展示了GardenGlobals.getMaxShovelSkill方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: handlePicking
# 需要导入模块: from toontown.estate import GardenGlobals [as 别名]
# 或者: from toontown.estate.GardenGlobals import getMaxShovelSkill [as 别名]
def handlePicking(self):
messenger.send('wakeup')
fullName = GardenGlobals.getFlowerVarietyName(self.species, self.variety)
if self.isWilted():
self.confirmDialog = TTDialog.TTDialog(style=TTDialog.YesNo, text=TTLocalizer.ConfirmWiltedFlower % {'plant': fullName}, command=self.confirmCallback)
elif not self.isFruiting():
self.confirmDialog = TTDialog.TTDialog(style=TTDialog.YesNo, text=TTLocalizer.ConfirmUnbloomingFlower % {'plant': fullName}, command=self.confirmCallback)
elif base.localAvatar.isFlowerBasketFull():
self.confirmDialog = TTDialog.TTDialog(style=TTDialog.CancelOnly, text=TTLocalizer.ConfirmBasketFull, command=self.confirmCallback)
else:
shovel = base.localAvatar.shovel
skill = base.localAvatar.shovelSkill
shovelPower = GardenGlobals.getShovelPower(shovel, skill)
giveSkillUp = True
beansRequired = GardenGlobals.getNumBeansRequired(self.species, self.variety)
if not shovelPower == beansRequired:
giveSkillUp = False
if giveSkillUp:
if skill == GardenGlobals.getMaxShovelSkill():
text = (TTLocalizer.ConfirmMaxedSkillFlower % {'plant': fullName},)
else:
text = TTLocalizer.ConfirmSkillupFlower % {'plant': fullName}
self.confirmDialog = TTDialog.TTDialog(style=TTDialog.YesNo, text=text, command=self.confirmCallback)
else:
self.confirmDialog = TTDialog.TTDialog(style=TTDialog.YesNo, text=TTLocalizer.ConfirmNoSkillupFlower % {'plant': fullName}, command=self.confirmCallback)
self.confirmDialog.show()
base.localAvatar.setInGardenAction(self)
base.cr.playGame.getPlace().detectedGardenPlotUse()