From b9ac8ed0dc8eabe11616596c5f17fd2ce4156127 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Mon, 24 Oct 2022 11:33:30 -0300 Subject: Bugfixes and minor refactoring --- merge-client.py | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/merge-client.py b/merge-client.py index 10c8083..50c0a45 100755 --- a/merge-client.py +++ b/merge-client.py @@ -25,10 +25,12 @@ def fix_id(l, offset): l="\"".join(tmp) return l +## This is to find misc files and copy them over, but +## We probably could just c/p one over the other >.> def hp(l, WHERE): global paths if "" in j: break - hp(j, MOUBOO) + j=hp(j, MOUBOO) item_db.append(j) continue ## Save the line - hp(l, MOUBOO) + l=hp(l, MOUBOO) item_db.append(l) while not "" in item_db[-1]: item_db=item_db[:-1] @@ -181,8 +184,8 @@ with open("%s/items.xml" % EVOLVED, "r") as f: if "" in j: break j=fix_id(j, 10000) + j=hp(j, EVOLVED) item_db.append(j) - hp(j, EVOLVED) continue ## Save the line @@ -190,8 +193,8 @@ with open("%s/items.xml" % EVOLVED, "r") as f: if "" in l: saving=True continue + l=hp(l, EVOLVED) item_db.append(l) - hp(l, EVOLVED) while not "" in item_db[-1]: item_db=item_db[:-1] item_db=item_db[:-1] @@ -210,7 +213,7 @@ with open("%s/items.xml" % REVOLT, "r") as f: ## FIXME: RACESPRITE #l=l.replace(" ", "\t") ## Fix ID offset - l=fix_id(l, 10000) + l=fix_id(l, 20000) ## Follow includes instead of saving them if "" in j: break - j=fix_id(j, 10000) + j=fix_id(j, 20000) + j=hp(j, REVOLT) item_db.append(j) - hp(j, REVOLT) continue ## Save the line @@ -236,8 +239,8 @@ with open("%s/items.xml" % REVOLT, "r") as f: if "" in l: saving=True continue + l=hp(l, REVOLT) item_db.append(l) - hp(l, REVOLT) while not "" in item_db[-1]: item_db=item_db[:-1] #item_db=item_db[:-1] -- cgit v1.2.3-70-g09d2