diff options
Diffstat (limited to 'src/exporter.py')
-rw-r--r-- | src/exporter.py | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/exporter.py b/src/exporter.py index ce87a12..23484c3 100644 --- a/src/exporter.py +++ b/src/exporter.py @@ -367,7 +367,7 @@ class KPMapExporter: data += zero32 # isNew data += zero32 # Extra pointer - elif node.worldDefID: + elif node.worldDefID != None: # i i i b b b b: node type, isNew, Extra pointer, world def ID, padding data += struct.pack('>iiibbbb', 4, 0, 0, node.worldDefID, 0, 0, 0) @@ -416,7 +416,12 @@ class KPMapExporter: ht1,ht2 = world.hudTextColours htf = world.hudHintTransform - data += struct.pack('>BBBB BBBB BBBB BBBB BBBB BBBB hhh BB', + try: + convertedWorldID = int(world.worldID) + except ValueError: + convertedWorldID = ord(world.worldID) - ord('A') + 10 + + data += struct.pack('>BBBB BBBB BBBB BBBB BBBB BBBB Bbb BBB BB', fst1[0],fst1[1],fst1[2],fst1[3], fst2[0],fst2[1],fst2[2],fst2[3], fsh1[0],fsh1[1],fsh1[2],fsh1[3], @@ -424,7 +429,9 @@ class KPMapExporter: ht1[0],ht1[1],ht1[2],ht1[3], ht2[0],ht2[1],ht2[2],ht2[3], htf[0],htf[1],htf[2], - world.uniqueKey, world.musicTrackID + world.uniqueKey, world.musicTrackID, + convertedWorldID, + 0, 0 ) # now that we're almost done... pack the strings |