Abt to update mapcompile into files

This commit is contained in:
2025-06-23 09:26:42 -05:00
parent 5d92f54f52
commit 344aaa7e4f
7 changed files with 77 additions and 44 deletions

View File

@ -185,7 +185,6 @@ for layerIndex, layer in enumerate(tileLayers):
# Pre generate entity data
nextEntityId = 100
for obIndex, ob in enumerate(objectLayer['objects']):
if 'x' not in ob or 'y' not in ob:
print(f"Error: Object in object layer does not contain 'x' or 'y' key.")
@ -200,8 +199,6 @@ for obIndex, ob in enumerate(objectLayer['objects']):
# Round off the coordinates
ob['x'] = round(ob['x'])
ob['y'] = round(ob['y'])
ob['id'] = nextEntityId
nextEntityId += 1
objectLayer['objects'][obIndex] = ob