Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to parse map from already loaded files #63

Open
Cleptomania opened this issue Oct 1, 2022 · 1 comment
Open

Ability to parse map from already loaded files #63

Cleptomania opened this issue Oct 1, 2022 · 1 comment
Labels
enhancement New feature or request good first issue Good for newcomers
Milestone

Comments

@Cleptomania
Copy link
Member

Currently we are only capable of accepting a file path to parse the map. Instead we should add the ability to pass an already parsed JSON, or a raw JSON string for example. This may have some implications for how we find the tileset files for external tilesets. What is likely is that the user will have to define any external tilesets to the parse function, in a dictionary that maps the tileset to whatever it’s filepath in the map object is.

Tiled stores the reference to tileset and image objects as relative to the map file, so one solution is to also accept a filepath alongside this and use that instead of deriving the parent directory of the map file.

@Cleptomania Cleptomania added the enhancement New feature or request label Oct 1, 2022
@Cleptomania Cleptomania added this to the Version 2.3 milestone Oct 1, 2022
@Cleptomania
Copy link
Member Author

The approach of accepting a filepath alongside the JSON dict or XML etree is probably the way to go and should be fairly easy to implement.

@Cleptomania Cleptomania added the good first issue Good for newcomers label Apr 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant