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


Python BugDll.decode方法代码示例

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


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

示例1: resolveDll

# 需要导入模块: import BugDll [as 别名]
# 或者: from BugDll import decode [as 别名]
	def resolveDll(self, element, dll):
		dll = BugDll.decode(dll)
		inherited = element.getState("dll")
		if dll is None:
			return inherited
		if inherited is None:
			return dll
		if inherited > dll:
			BugUtil.warn("BugConfig - element <%s>.dll attribute %s overrides newer inherited dll attribute %s" % (element.tag, dll, inherited))
		return dll
开发者ID:AP-ML,项目名称:DTM,代码行数:12,代码来源:BugConfig.py

示例2: handle

# 需要导入模块: import BugDll [as 别名]
# 或者: from BugDll import decode [as 别名]
	def handle(self, element, module, function, immediate, dll):
		immediate = self.isTrue(immediate)
		dll = BugDll.decode(dll)
		if self.isDllOkay(element, dll):
			func = BugUtil.getFunction(module, function, True, *element.args, **element.kwargs)
			if immediate:
				func()
			else:
				BugInit.addInit(module, func)
		else:
			BugUtil.info("BugConfig - ignoring <%s> %s.%s, requires dll version %s", element.tag, module, function, self.resolveDll(element, dll))
开发者ID:AP-ML,项目名称:DTM,代码行数:13,代码来源:BugConfig.py

示例3: handle

# 需要导入模块: import BugDll [as 别名]
# 或者: from BugDll import decode [as 别名]
 def handle(self, element, how, module, function, toModule, asName, dll):
     dll = BugDll.decode(dll)
     if self.isDllOkay(element, dll):
         BugUtil.extendFunction(module, function, toModule, asName, how)
     else:
         BugUtil.info(
             "BugConfig - ignoring <%s> %s.%s, requires dll version %s",
             element.tag,
             module,
             function,
             self.resolveDll(element, dll),
         )
开发者ID:DC123456789,项目名称:Dawn-of-Civilization,代码行数:14,代码来源:BugConfig.py

示例4: __init__

# 需要导入模块: import BugDll [as 别名]
# 或者: from BugDll import decode [as 别名]
	def __init__(self, mod, id, andId=None, dll=None):
		self.mod = mod
		self.id = id
		self.andId = andId
		self.andOption = None
		self.dll = BugDll.decode(dll)
		if self.dll is not None and self.dll <= 0:
			BugUtil.warn("BugOptions - %s has invalid dll value %r, ignoring", id, dll)
			self.dll = None
		self.enabled = True
		if self.dll > 0:
			if not BugDll.isVersion(self.dll):
				self.enabled = False
开发者ID:AP-ML,项目名称:DTM,代码行数:15,代码来源:BugOptions.py

示例5: handle

# 需要导入模块: import BugDll [as 别名]
# 或者: from BugDll import decode [as 别名]
	def handle(self, element, id, name, fromKey, offset, dll):
		dll = BugDll.decode(dll)
		if self.isDllOkay(element, dll):
			if not fromKey:
				if not self.lastSymbol:
					raise BugUtil.ConfigError("<%s> %s requires an offset symbol" % (element.tag, id))
				fromKey = self.lastSymbol
			if offset is None:
				offset = 1
			else:
				offset = int(offset)
			self.lastSymbol = addOffsetSymbol(id, fromKey, offset, name)
		else:
			BugUtil.info("FontUtil - ignoring <%s> %s, requires dll version %s", element.tag, id, self.resolveDll(element, dll))
开发者ID:DC123456789,项目名称:Dawn-of-Civilization,代码行数:16,代码来源:FontUtil.py

示例6: handle

# 需要导入模块: import BugDll [as 别名]
# 或者: from BugDll import decode [as 别名]
	def handle(self, element, name, type, default, module, handler, listener, log, dll):
		dll = BugDll.decode(dll)
		if self.isDllOkay(element, dll):
			utils = element.getState("gameutils")
			if utils:
				func = BugUtil.bindFunction(utils, handler)
				if listener:
					listenerFunc = BugUtil.bindFunction(utils, listener)
			elif not module:
				raise BugUtil.ConfigError("Element <%s> requires attribute module or be enclosed in <gameutils> that defines a class", element.tag)
			else:
				func = BugUtil.lookupFunction(module, handler)
				if listener:
					listenerFunc = BugUtil.lookupFunction(module, listener)
			createCallback(name, func, self.createValue(type, default), log)
			if listener:
				addNamedListener(name, listenerFunc, log)
		else:
			BugUtil.info("BugGameUtils - ignoring <%s> %s, requires dll version %s", element.tag, name, self.resolveDll(element, dll))
开发者ID:DarkLunaPhantom,项目名称:civ4ffplus,代码行数:21,代码来源:BugGameUtils.py

示例7: handle

# 需要导入模块: import BugDll [as 别名]
# 或者: from BugDll import decode [as 别名]
	def handle(self, element, keys, module, function, dll):
		dll = BugDll.decode(dll)
		if self.isDllOkay(element, dll):
			CvEventInterface.getEventManager().addShortcutHandler(keys, BugUtil.getFunction(module, function, *element.args, **element.kwargs))
		else:
			BugUtil.info("InputUtil - ignoring <%s> %s, requires dll version %s", element.tag, keys, self.resolveDll(element, dll))
开发者ID:DC123456789,项目名称:Dawn-of-Civilization,代码行数:8,代码来源:InputUtil.py


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