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

Dungeon Draw sometimes doesn't write 3D canvas flags. #100

Open
mcglincy opened this issue Jul 23, 2022 · 2 comments
Open

Dungeon Draw sometimes doesn't write 3D canvas flags. #100

mcglincy opened this issue Jul 23, 2022 · 2 comments

Comments

@mcglincy
Copy link
Owner

mcglincy commented Jul 23, 2022

so when you create a dungeon and then change its material to a custom theme that has 3d wall and door textures enabled, for the first time it does not populate the textures

if you have changed to the new theme and then create new rooms with the generator or otherwise it correctly populates the textures

this might be a feature request but 3d canvas also has an additional flag "wallSidesTexture" for the edge of walls, it would be pretty nice to have an option to specify that separately for doors and walls in dungeon draw
rn it uses the same texture for the side which makes it a bit weird

@mcglincy
Copy link
Owner Author

mcglincy commented Jul 26, 2022

Changing the config should trigger a re-save, and with it a re-making of the walls (configsheet._updateObject => dungeon.setConfig() => dungeon.pushState() => state.saveToJournalEntry() => makeWalls()).

I tested that this works as expected, and scene.db and the wall flags get updated properly.

The next thing to check will be custom theme changing, and whether that triggers the same config update etc.

@mcglincy
Copy link
Owner Author

mcglincy commented Jul 26, 2022

Repro'd the bug - choosing custom theme doesn't update scene.db / walls / etc.

After digging further, it looks like wallmaker's wallDataEqual() method doesn't consider 3dcanvas flags when deciding if a wall already exists and doesn't need to be created (or updated). Seems like we need to update walls when the flag data has changed (or consider that for wall inequality).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant