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

Better object value support for other modules #150

Open
kaelad02 opened this issue Dec 18, 2023 · 0 comments
Open

Better object value support for other modules #150

kaelad02 opened this issue Dec 18, 2023 · 0 comments

Comments

@kaelad02
Copy link
Collaborator

Is your feature request related to a problem? Please describe.
There is a module that stores some data in flags on a token that would like to replace the entire object via an active effect instead of listing it's properties individually. For example, you could create an active effect like:

ATL.flags.levels-3d-preview | Custom | {particleType: "fire", intensity: 1}

that would replace the entire 3d-preview object instead setting the particleType and intensity properties separately. That would also ensure if there was an existing object there on the token, it'd be entirely overwritten rather than just changing those two properties (in case there were extra properties already there).

Describe the solution you'd like
I'd like to set that key as an object just like you can set ATL.light.animation. Somehow make that specific object solution generic so it can be used by other 3rd-party keys. Not sure if the best way is to have a list of them in the switchType function or check the value to see if it's an object to determine that so we don't need a "pre-approved" list.

Describe alternatives you've considered
Setting the properties individually works when the object isn't already there, but if it is and other properties in the object might be set, they'd survive.

Additional context
This was a request from @theripper93 over Discord.

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