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


Python Plasma.ptVaultMarkerListNode方法代码示例

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


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

示例1: ImportGames

# 需要导入模块: import Plasma [as 别名]
# 或者: from Plasma import ptVaultMarkerListNode [as 别名]
def ImportGames(args):
    "args = 'filename folder'"
    import Plasma
    import PlasmaVaultConstants
    arglist = args.split()
    if len(arglist) < 2:
        print 'ERROR - not enough arguments - ImportMarkers "filename foldername")'
        return
    filename = arglist[0]
    try:
        dfile = open(filename+'.py','r')
    except IOError:
        print "ERROR - file %d could not be found" % (filename+'.py')
        return
    dfile.close()
    argresidual = args[len(filename)+1:]
    #== find the folder where the markerfolders might be
    # search thru the age journal folders
    vault = Plasma.ptVault()
    jfolder = None
    master_agefolder = vault.getAgeJournalsFolder()
    if type(master_agefolder) != type(None):
        agefolderRefs = master_agefolder.getChildNodeRefList()
        for agefolderRef in agefolderRefs:
            agefolder = agefolderRef.getChild()
            agefolder = agefolder.upcastToFolderNode()
            if type(agefolder) != type(None):
                # might be a foldername with spaces! so see if it starts with the name
                if argresidual.startswith(agefolder.folderGetName()):
                    jfolder = agefolder
                    argresidual = argresidual[len(agefolder.folderGetName())+1:]
    if jfolder:
        exec("import %s" % (filename))
        exec("mgs = %s.mgs" % (filename))
        for mg in mgs:
            nMarkerFolder = Plasma.ptVaultMarkerListNode(PlasmaVaultConstants.PtVaultNodePermissionFlags.kDefaultPermissions)
            nMarkerFolder.folderSetName(mg[1])
            nMarkerFolder.setOwnerID(mg[0][0])
            nMarkerFolder.setOwnerName(mg[0][1])
            nMarkerFolder.setGameType(mg[0][2])
            nMarkerFolder.setRoundLength(mg[0][3])
            jfolder.addNode(nMarkerFolder)
开发者ID:Aurebesh,项目名称:moul-scripts,代码行数:44,代码来源:xCheat.py


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