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

Create the Exporter super class and subclass it for Foundry #5

Open
tmcclintock opened this issue Dec 18, 2020 · 0 comments
Open

Create the Exporter super class and subclass it for Foundry #5

tmcclintock opened this issue Dec 18, 2020 · 0 comments
Labels
enhancement New feature or request FoundryVTT Deals with FoundryVTT specifics. hackathon Good for the 2020 Hackathon!

Comments

@tmcclintock
Copy link
Owner

tmcclintock commented Dec 18, 2020

The Exporter class should have the responsibility of taking the Dungeon object and the rendered image (from #3) and producing a serialized (i.e. saved to disk) file that can be ingested by an external program like Foundry VTT. This is the class that handles logic such as adding vision blocking structures (see #4) and any other information that we will be able to handle in the future.

exporter = FoundryVTTExporter()
file_path = "/some/path/to/blah.json"  # or whatever extension
exporter.export(file_path, dungeon, image)

For now we can use the dummy dungeon (from #3)

dungeon = [
    [1, 1, 1, 0, 1],
    [1, 1, 1, 0, 1],
    [1, 1, 1, 0, 0],
    [1, 1, 1, 0, 1],
    [1, 1, 1, 0, 1]
]

and it's rendering
dungeon_rendered

@tmcclintock tmcclintock added enhancement New feature or request hackathon Good for the 2020 Hackathon! FoundryVTT Deals with FoundryVTT specifics. labels Dec 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request FoundryVTT Deals with FoundryVTT specifics. hackathon Good for the 2020 Hackathon!
Projects
None yet
Development

No branches or pull requests

1 participant