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


Python CraftItemAction.make方法代码示例

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


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

示例1: make

# 需要导入模块: from system.makemenus import CraftItemAction [as 别名]
# 或者: from system.makemenus.CraftItemAction import make [as 别名]
	def make(self, player, arguments, nodelay=0):
		assert(len(arguments) > 0, 'Arguments has to contain a tool reference.')

		if not checktool(player, wolfpack.finditem(arguments[0])):
			return False

		return CraftItemAction.make(self, player, arguments, nodelay)
开发者ID:BackupTheBerlios,项目名称:wolfpack-svn,代码行数:9,代码来源:carpentry.py

示例2: make

# 需要导入模块: from system.makemenus import CraftItemAction [as 别名]
# 或者: from system.makemenus.CraftItemAction import make [as 别名]
	def make(self, player, arguments, nodelay=0, clothitem = None):
		global CLOTH

		# We have not been passed a cloth reference.
		# Try to statisfy it automatically
		if self.cloth > 0:
			if not clothitem:
				backpack = player.getbackpack()
				count = 0 # Valid piles of cloth
				for item in backpack.content:
					if item.baseid in CLOTH and item.amount >= self.cloth:
						clothitem = item
						count += 1
	
				# This makes the user select a pile of cloth
				if count > 1:
					player.socket.clilocmessage(502928) # Which material would you like to work ...
					player.socket.attachtarget('skills.tailoring.ClothSelectResponse', [self, arguments])
					return
				elif count < 1:
					player.socket.clilocmessage(1044456) # You don't have any ready cloth
					return

			# Pass the clothitem on to the next function as an argument
			if len(arguments) < 2:
				arguments.append(clothitem.serial)
			else:
				arguments[1] = clothitem.serial

		return CraftItemAction.make(self, player, arguments, nodelay)
开发者ID:BackupTheBerlios,项目名称:wolfpack-svn,代码行数:32,代码来源:tailoring.py

示例3: make

# 需要导入模块: from system.makemenus import CraftItemAction [as 别名]
# 或者: from system.makemenus.CraftItemAction import make [as 别名]
    def make(self, player, arguments, nodelay=0):
        if self.useallres:
            found = False
            for item in player.getbackpack().content:
                if item.baseid == self.materials[0][0][0]:
                    found = True
                    nodelay = True
                    # stop if making fails
                    if not CraftItemAction.make(self, player, arguments, nodelay):
                        break

            if not found:
                # we have no material, but call make method do display error message
                # and reopen the crafting dialog
                return CraftItemAction.make(self, player, arguments, nodelay)

        else:
            return CraftItemAction.make(self, player, arguments, nodelay)
开发者ID:BackupTheBerlios,项目名称:wolfpack-svn,代码行数:20,代码来源:cooking.py

示例4: make

# 需要导入模块: from system.makemenus import CraftItemAction [as 别名]
# 或者: from system.makemenus.CraftItemAction import make [as 别名]
	def make(self, player, arguments, nodelay=0):
		assert(len(arguments) > 0, 'Arguments has to contain a tool reference.')

		# Look for forge and anvil
		if not checkanvilandforge(player):
			player.socket.clilocmessage(1044267)
			return False

		if not checktool(player, wolfpack.finditem(arguments[0])):
			return False

		return CraftItemAction.make(self, player, arguments, nodelay)
开发者ID:BackupTheBerlios,项目名称:wolfpack-svn,代码行数:14,代码来源:blacksmithing.py

示例5: make

# 需要导入模块: from system.makemenus import CraftItemAction [as 别名]
# 或者: from system.makemenus.CraftItemAction import make [as 别名]
	def make(self, player, arguments, nodelay=0):
		assert(len(arguments) > 0, 'Arguments has to contain a tool reference.')

		return CraftItemAction.make(self, player, arguments, nodelay)
开发者ID:BackupTheBerlios,项目名称:wolfpack-svn,代码行数:6,代码来源:carpentry.py


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