本文整理汇总了Python中system.makemenus.CraftItemAction.processnode方法的典型用法代码示例。如果您正苦于以下问题:Python CraftItemAction.processnode方法的具体用法?Python CraftItemAction.processnode怎么用?Python CraftItemAction.processnode使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类system.makemenus.CraftItemAction
的用法示例。
在下文中一共展示了CraftItemAction.processnode方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: processnode
# 需要导入模块: from system.makemenus import CraftItemAction [as 别名]
# 或者: from system.makemenus.CraftItemAction import processnode [as 别名]
def processnode(self, node, menu):
global CLOTH
if node.name == 'cloth':
amount = hex2dec(node.getattribute('amount', '1'))
if amount > 0:
self.cloth = amount
else:
CraftItemAction.processnode(self, node, menu)
示例2: processnode
# 需要导入模块: from system.makemenus import CraftItemAction [as 别名]
# 或者: from system.makemenus.CraftItemAction import processnode [as 别名]
def processnode(self, node, menu):
if node.name == 'needoven':
self.needoven = True
elif node.name == 'needheat':
self.needheat = True
elif node.name == 'water':
self.water = True
else:
CraftItemAction.processnode(self, node, menu)
示例3: processnode
# 需要导入模块: from system.makemenus import CraftItemAction [as 别名]
# 或者: from system.makemenus.CraftItemAction import processnode [as 别名]
def processnode(self, node, menu):
if node.name == "needoven":
self.needoven = True
elif node.name == "needheat":
self.needheat = True
elif node.name == "water":
self.water = True
elif node.name == "nomark":
self.markable = 0
elif node.name == "useallres":
self.useallres = True
elif node.name == "flour":
amount = 1
if node.hasattribute("amount"):
amount = hex2dec(node.getattribute("amount", "1"))
self.flour = True
self.flouramount = amount
else:
CraftItemAction.processnode(self, node, menu)