xlxin 1 рік тому
батько
коміт
88972086b5
2 змінених файлів з 5 додано та 2 видалено
  1. 2 0
      .gitignore
  2. 3 2
      TileFamily/TileLevelScript/jsonToProto.py

+ 2 - 0
.gitignore

@@ -1 +1,3 @@
 .DS_Store
+TileFamily/TileLevelScript/loadable
+*.pyc

+ 3 - 2
TileFamily/TileLevelScript/jsonToProto.py

@@ -204,6 +204,7 @@ def mergeLeveldata3(group = None):
             with open(binFile, "rb") as f:
                 binary_data = f.read()
                 my_message.ParseFromString(binary_data)
+            os.remove(binFile)
             with open(protoDataTrunk, 'ab') as f:
                 f.write(binary_data)
             lvelsIndex.LevelsIndex[os.path.splitext(filename)[0]].len = len(binary_data)
@@ -249,7 +250,7 @@ if __name__ == '__main__':
             lv_stat[k]["dda_para"] = v["DDA 参数"]
             lv_stat[k]["模板 id"] = templateId
     # 关卡与模版的对应关系,以及关卡本身的一些控制参数
-    with open("levelInfo.csv", 'w+') as f:
+    with open("./loadable/levelInfo.csv", 'w+') as f:
         fieldnames = ["lvid","lvinst","type(normal=0,hard=1,superHard=2)","dda_type","dda_para"]
         writer = csv.DictWriter(f, fieldnames=fieldnames)
         writer.writeheader()
@@ -261,7 +262,7 @@ if __name__ == '__main__':
             d["dda_para"] = lv_stat[lvid]["dda_para"]
             writer.writerow(d)
     # 模版的信息
-    with open("levelInstInfo.csv", 'w+') as f:
+    with open("./loadable/levelInstInfo.csv", 'w+') as f:
         all_insts = set()
         fieldnames = ["lvinst","template",
                       "try1(tileA|tileB|tileVar|indexTop3|indexPlusByZ|seed)",