Map saving first pass
This commit is contained in:
@@ -6,6 +6,7 @@ import os
|
||||
import datetime
|
||||
from args import args
|
||||
from xml.etree import ElementTree
|
||||
from assetcache import assetGetCache, assetCache
|
||||
|
||||
def loadTilesetFromTSX(asset):
|
||||
# Load the TSX file
|
||||
@@ -99,8 +100,11 @@ def loadTilesetFromArgs(asset):
|
||||
}
|
||||
|
||||
def processTileset(asset):
|
||||
print(f"Processing tileset: {asset['path']}")
|
||||
cache = assetGetCache(asset['path'])
|
||||
if cache is not None:
|
||||
return cache
|
||||
|
||||
print(f"Processing tileset: {asset['path']}")
|
||||
tilesetData = None
|
||||
if asset['path'].endswith('.tsx'):
|
||||
tilesetData = loadTilesetFromTSX(asset)
|
||||
@@ -135,9 +139,9 @@ def processTileset(asset):
|
||||
with open(outputFile, 'w') as f:
|
||||
f.write(data)
|
||||
|
||||
outTileset = {
|
||||
return assetCache(asset['path'], {
|
||||
"files": [],
|
||||
"image": tilesetData['image'],
|
||||
"headerFile": outputFile,
|
||||
"files": tilesetData['image']['files'],
|
||||
}
|
||||
return outTileset
|
||||
})
|
Reference in New Issue
Block a user