From c83a17446c9ffd7f78ac748b75ce13dd8dd60967 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Mon, 24 Oct 2022 10:38:44 -0300 Subject: Merge rEvolt client data as well --- merge-client.py | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 52 insertions(+), 3 deletions(-) diff --git a/merge-client.py b/merge-client.py index a960fe0..45cf149 100755 --- a/merge-client.py +++ b/merge-client.py @@ -37,6 +37,7 @@ def hp(l): elif e.endswith(".ogg"): paths.append(e) elif e.endswith(".xml"): + ## TODO: We must also open the XML and extract paths from it paths.append(e) return @@ -103,7 +104,7 @@ with open("%s/items.xml" % MOUBOO, "r") as f: item_db.append("\n") item_db.append("\n") item_db.append("\n") - ## TODO: Follow includes instead of saving them + ## Follow includes instead of saving them if "" in item_db[-1]: item_db=item_db[:-1] -#item_db=item_db[:-1] +item_db=item_db[:-1] print("\033[32;1mLegacy/Evolved OK\033[0m") @@ -179,10 +181,57 @@ print("\033[32;1mLegacy/Evolved OK\033[0m") ## Handle copy pastes unify(EVOLVED) +################################################################################ +## rEvolt has an offset of 20k +with open("%s/items.xml" % REVOLT, "r") as f: + saving=False + for l in f: + ## FIXME: RACESPRITE + #l=l.replace(" ", "\t") + ## Fix ID offset + l=fix_id(l, 10000) + ## Follow includes instead of saving them + if "" in j: + save=True + continue + if "" in j: + break + j=fix_id(j, 10000) + item_db.append(j) + hp(j) + continue + + ## Save the line + if not saving: + if "" in l: + saving=True + continue + item_db.append(l) + hp(l) + while not "" in item_db[-1]: + item_db=item_db[:-1] +#item_db=item_db[:-1] +print("\033[32;1mrEvolt OK\033[0m") + + + +## Handle copy pastes +unify(REVOLT) + +################################################################################ ## Save the final item database with open(MYSELF+"items.xml", "w") as f: for l in item_db: -- cgit v1.2.3-70-g09d2