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


Python Plasma.ptVaultChronicleNode方法代码示例

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


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

示例1: GenerateCleftSolution

# 需要导入模块: import Plasma [as 别名]
# 或者: from Plasma import ptVaultChronicleNode [as 别名]
def GenerateCleftSolution(args):
    import Plasma
    import xRandom
    solutionlist = [3,2,5,0]
    cleftSolList = [3,2,5,0]

    while _AreListsEquiv(solutionlist, cleftSolList):
        solutionlist = []
        while len(solutionlist) < 4:
            newint = xRandom.randint(0,6)
            if not newint in solutionlist:
                solutionlist.append(newint)

    vault = Plasma.ptVault()
    entry = vault.findChronicleEntry("BahroCave")
    entry.removeAllNodes()
    if entry != None:
        agelist = ["Teledahn", "Garrison", "Garden", "Kadish"]
        for v in range(len(agelist)):
            newnode = Plasma.ptVaultChronicleNode(0)
            newnode.chronicleSetName(agelist[v])
            ageVal = str(solutionlist[v])            
            newnode.chronicleSetValue("1," + ageVal + "," + str(v + 1))
            #newnode.chronicleSetValue("1," + str(solutionlist[v]) + "," + str(v + 1))
            entry.addNode(newnode)
            print "%s solution is %s" % (agelist[v], ageVal)
开发者ID:Aurebesh,项目名称:moul-scripts,代码行数:28,代码来源:xCheat.py

示例2: GetAgeJourneyCloths

# 需要导入模块: import Plasma [as 别名]
# 或者: from Plasma import ptVaultChronicleNode [as 别名]
def GetAgeJourneyCloths(args):
    import Plasma

    ageChronNode = None
    ageName = Plasma.PtGetAgeName()
    if ageName == "Gira" or ageName == "Garden":
        ageName = "Eder"
    elif ageName == "Teledahn" or ageName == "Garrison" or ageName == "Kadish" or ageName == "Cleft":
        pass
    else:
        return

    vault = Plasma.ptVault()
    chron = vault.findChronicleEntry("JourneyClothProgress")
    ageChronRefList = chron.getChildNodeRefList()
    
    for ageChron in ageChronRefList:
        ageChild = ageChron.getChild()

        ageChild = ageChild.upcastToChronicleNode()

        if ageChild.chronicleGetName() == ageName:
            ageChronNode = ageChild
            break

    if type(ageChronNode) == type(None):
        newNode = Plasma.ptVaultChronicleNode(0)
        newNode.chronicleSetName(ageName)
        newNode.chronicleSetValue("abcdefg")
        chron.addNode(newNode)
    else:
        ageChronNode.chronicleSetValue("abcdefg")
        ageChronNode.save()
开发者ID:Aurebesh,项目名称:moul-scripts,代码行数:35,代码来源:xCheat.py

示例3: _GetChron

# 需要导入模块: import Plasma [as 别名]
# 或者: from Plasma import ptVaultChronicleNode [as 别名]
 def _GetChron(needle, haystack):
     for i in haystack.getChildNodeRefList():
         child = i.getChild().upcastToChronicleNode()
         if child is None:
             continue
         if child.getName() == needle:
             return child
     else:
         chron = Plasma.ptVaultChronicleNode()
         chron.setName(needle)
         if default is not None:
             chron.setValue(str(default))
         haystack.addNode(chron)
         return chron
开发者ID:Deledrius,项目名称:moul-scripts,代码行数:16,代码来源:PlasmaKITypes.py


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