hxp
2026-01-29 b30b110fc4e5901fde2cd4e4e6444bbd32980d86
PySysDB/Éú³ÉIpyGameDataPY/IpyGameDataPYTemp.py
@@ -11,6 +11,8 @@
#
# è¯¦ç»†æè¿°: è¯»å–PY表
#
# @note: æœ¬è„šæœ¬ç”± \PySysDB\生成IpyGameDataPY ç”Ÿæˆ
#
#-------------------------------------------------------------------------------
#"""Version = 2018-05-10 12:00"""
#-------------------------------------------------------------------------------
@@ -106,10 +108,12 @@
    
    def __LoadFileData(self, tableName, onlyCheck=False):
        # @param onlyCheck: æ˜¯å¦ä»…检查格式,一般启动时用
        curPath = "<%LoadStructPath%>" + "\\PySysDB\\tag" + tableName + ".txt"
        curPath = "<%LoadStructPath%>" + "\\PySysDB\\" + tableName + ".txt"
        if not os.path.isfile(curPath):
            ErrLog("can not find file = %s,%s" % (tableName, curPath))
            raise Exception("can not find file = %s,%s" % (tableName, curPath))
            curPath = "<%LoadStructPath%>" + "\\PySysDB\\tag" + tableName + ".txt"
            if not os.path.isfile(curPath):
                ErrLog("can not find file = %s,%s" % (tableName, curPath))
                raise Exception("can not find file = %s,%s" % (tableName, curPath))
        
        if not onlyCheck:
            if not hasattr(self, "ipy%sLen" % tableName):
@@ -287,19 +291,26 @@
    
    def __StrToList(self, strValue):
        setList = []
        if ("[" in strValue and "]" in strValue) or ("(" in strValue and ")" in strValue):
        if ChConfig.Def_Str_Montant in strValue: # |分割的优先
            for value in strValue.split(ChConfig.Def_Str_Montant):
                if value.isdigit():
                    value = int(value)
                elif (value.startswith("[") and value.endswith("]")) or (value.startswith("(") and value.endswith(")")):
                    value = eval(value)
                else:
                    try:
                        value = float(value)
                    except:
                        pass
                setList.append(value)
            if setList:
                setList = tuple(setList)
        elif (strValue.startswith("[") and strValue.endswith("]")) or (strValue.startswith("(") and strValue.endswith(")")):
            setList = eval(strValue)
        elif strValue in ["0", "-", ""]:
            pass
        elif strValue.isdigit():
            setList = (int(strValue),)
        else:
            for value in strValue.split(ChConfig.Def_Str_Montant):
                if value.isdigit():
                    value = int(value)
                setList.append(value)
            if setList:
                setList = tuple(setList)
        return setList
    
#<%Ipy_Cache_Func%>