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

[Feature]: Add lumens to getInfo() #3572

Closed
Lector opened this issue Aug 30, 2022 · 2 comments
Closed

[Feature]: Add lumens to getInfo() #3572

Lector opened this issue Aug 30, 2022 · 2 comments
Assignees
Labels
feature Adding functionality that adds value

Comments

@Lector
Copy link

Lector commented Aug 30, 2022

Feature Request

Hi. I have a pretty complicated lighting-system. When attacking a token im calculating a modifier depending on how bright the target is illuminated. Thats worked fine so far. Now im going to add support for magical darkness. I mentioned that this is possible my adding a lumens-property to all my light-sources and it all works well for the visuals. But how do i get the lumens of a light in my script? I used getInfo() by now to determine the max range of the lightsource but now i need the lumens to differ between light and dark.
https://wiki.rptools.info/index.php/getInfo

I have lumens in the light definition. It also works well in the visuals with negative lumens for magical darkness. When printing the lumens to the output i have no entry for lumens. thats what i get:

{"name":"Darkness QS1 1","max range":2,"type":"NORMAL","light segments":[{"paint":{"color":-11513776},"facingOffset":0,"radius":2,"arcAngle":90,"shape":"CIRCLE","isGM":false,"ownerOnly":false}]}

And that is my entry in the light-settings
Darkness QS1 1: circle 2#505050 lumens=-1

The Solution you'd like

Add a field "lumens" to the data getInfo() generates for every lightsource.

Alternatives that you've considered.

The only alternative i can imagine is to determine the lumens in code manually by checking the name of the lightsource. But i do not like this solution because i have to change my code every time i add an additional source of light or darkness.

Additional Context

No response

@Lector Lector added the feature Adding functionality that adds value label Aug 30, 2022
@bubblobill bubblobill self-assigned this Feb 14, 2023
@bubblobill
Copy link
Collaborator

PR #3835 addresses this issue, also added other missing light settings shape and scale

@Lector
Copy link
Author

Lector commented Apr 7, 2023

I just tested the current testversion of the new version and it seems like this issue has been resolved. Thanky very much for your work. I appreciate you effort.

@Lector Lector closed this as completed Apr 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Adding functionality that adds value
Projects
Status: Done
Development

No branches or pull requests

2 participants