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

Allow extension of the canvas layers classes without breaking Hooks. #8129

Closed
1 of 6 tasks
dev7355608 opened this issue Sep 7, 2022 · 0 comments
Closed
1 of 6 tasks
Assignees
Labels
api Issues related to the API used by Mod Devs bug Functionality which is not working as intended

Comments

@dev7355608
Copy link

What happened?

https://discord.com/channels/170995199584108546/811676497965613117/1016842132880900146

class MyLightingLayer extends LightingLayer { /* ... */ }

CONFIG.Canvas.layers.lighting.layerClass = MyLightingLayer;

drawLightingLayer/tearDownLightingLayer becomes drawMyLightingLayer/tearDownMyLightingLayer. Any module that depends on those hooks is broken if the system or another module extends the canvas layer in this manner.

What ways of accessing Foundry can you encounter this issue in?

  • Native App (Electron)
  • Chrome
  • Firefox
  • Safari
  • Other

Reproduction Steps

.

What core version are you reporting this for?

Version 10 Stable 1 (build 284)

Relevant log output

No response

Bug Checklist

  • The issue occurs while all Modules are disabled
@dev7355608 dev7355608 added the bug Functionality which is not working as intended label Sep 7, 2022
@aaclayton aaclayton added the api Issues related to the API used by Mod Devs label Sep 7, 2022
@Feu-Secret Feu-Secret self-assigned this Nov 10, 2022
@Feu-Secret Feu-Secret changed the title Extending canvas layers breaks draw and tearDown hooks Allow extension of the canvas layers classes without breaking Hooks. Nov 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Issues related to the API used by Mod Devs bug Functionality which is not working as intended
Projects
No open projects
Development

No branches or pull requests

4 participants