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


Python ItemGlobals.getVersion方法代码示例

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


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

示例1: getHandHeldPropsDict

# 需要导入模块: from pirates.inventory import ItemGlobals [as 别名]
# 或者: from pirates.inventory.ItemGlobals import getVersion [as 别名]
def getHandHeldPropsDict(
    versionFilter=None,
    rarityFilter=None,
    isFromLoot=True,
    isFromShop=True,
    isFromQuest=True,
    isFromPromo=True,
    isFromPVP=True,
    isFromNPC=True,
):
    resultDict = {}
    for weaponId in ItemGlobals.getHumanWeaponTypes():
        toBeAdded = True
        name = ItemGlobals.getModel(weaponId)
        if versionFilter is not None:
            toBeAdded = ItemGlobals.getVersion(weaponId) == versionFilter

        if toBeAdded and rarityFilter is not None:
            toBeAdded = ItemGlobals.getRarity(weaponId) == rarityFilter

        if not isFromLoot or ItemGlobals.isFromLoot(weaponId):
            if not isFromShop or ItemGlobals.isFromShop(weaponId):
                if not isFromQuest or ItemGlobals.isFromQuest(weaponId):
                    if not isFromPromo or ItemGlobals.isFromPromo(weaponId):
                        if (isFromPVP or ItemGlobals.isFromPVP(weaponId)) and isFromNPC:
                            pass
        toBeAdded &= ItemGlobals.isFromNPC(weaponId)
        if toBeAdded:
            if ItemGlobals.getType(weaponId) == ItemGlobals.GRENADE:
                resultDict[name] = "models/ammunition/%s" % name
            else:
                resultDict[name] = "models/handheld/%s" % name
        ItemGlobals.getType(weaponId) == ItemGlobals.GRENADE

    if not versionFilter is not None and rarityFilter is not None:
        if isFromLoot == True and isFromShop == True and isFromQuest == True and isFromPromo == True:
            pass
        if not (isFromPVP == True):
            return resultDict

    for key in INTERACT_ANIMS.keys():
        allIdles = INTERACT_ANIMS[key].get("idles")
        if allIdles:
            if type(allIdles) is type({}):
                props = allIdles.get(3003).get("props")
            else:
                props = INTERACT_ANIMS[key].get("props")
            if props:
                if isinstance(props[0], list):
                    prop = props[0][0]
                else:
                    prop = props[0]
                if prop:
                    name = prop[prop.rfind("/") + 1 :]
                    resultDict[name] = prop

    return resultDict
开发者ID:Puggyblue999,项目名称:PiratesOfTheCarribeanOnline,代码行数:59,代码来源:CustomAnims.py


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