-
Notifications
You must be signed in to change notification settings - Fork 258
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
Add macro function getIllumination() #4267
Add macro function getIllumination() #4267
Commits on Aug 28, 2023
-
Until now, a `PlayerView` with an empty token list and a `PlayerView` with a `null` token list were the same, and both would return `true` for `isUsingTokenView()`. We now distinguish these cases to allow token views that happen to not have any tokens, which is useful for excluding illumination contributions from personal lights and sight magnifiers. Existing callers that would pass an empty token list to the `PlayerView(Role, List<Token>)` constructor now call the `PlayerView(Role)` in order to keep the same behaviour.
Configuration menu - View commit details
-
Copy full SHA for c7dab12 - Browse repository at this point
Copy the full SHA c7dab12View commit details -
Fix FunctionUtil.getZoneRendererFromParam() to not return null
In rare cases, the current zone renderer can be `null`, and `FunctionUtil.getZoneRendererFromParam()` was not handling this case despite promising never to return `null` itself.
Configuration menu - View commit details
-
Copy full SHA for 3bb3729 - Browse repository at this point
Copy the full SHA 3bb3729View commit details -
Configuration menu - View commit details
-
Copy full SHA for cf76bbf - Browse repository at this point
Copy the full SHA cf76bbfView commit details -
Add macro function getIllummination()
Usage: `getIllumination(x, y)` This basic form of the function uses the current `PlayerView` for the map, so the lumens value returned will match what the lumens overlay shows on the client at the given point. Personal lights and sight magnifiers will be accounted for if they are in the current view.
Configuration menu - View commit details
-
Copy full SHA for 55fefc3 - Browse repository at this point
Copy the full SHA 55fefc3View commit details -
Add optional map parameter to getIllumination()
New usage: `getIllumination(x, y, mapNameOrId)` If `mapNameOrId` is provided, the result will be returned for a point on the provided map. If not provided, the result will be for the current map.
Configuration menu - View commit details
-
Copy full SHA for 3e71a1b - Browse repository at this point
Copy the full SHA 3e71a1bView commit details -
Add optional token list parameter to getIllumination()
New usage: `getIllumination(x, y, mapNameOrId, tokenIds)` The token list controls allows the player view to be customized. It must be a JSON array of tokens IDs for the current zone, with any unknown tokens resulting in an error. If not provided, the player view will be the current player view for the map. If the list of token IDs is empty, the `PlayerView` will use a token view but with no tokens involved, i.e., no token sight will be accounted for.
Configuration menu - View commit details
-
Copy full SHA for c768212 - Browse repository at this point
Copy the full SHA c768212View commit details -
Support json.null for the token list in getIllumination()
New usage: `getIllumination(x, y, mapNameOrId, json.null)` Using `json.null` for this parameter will indicate that a token view will not be used. I.e., the behaviour will match the lighting seen when no tokens are selected on the map.
Configuration menu - View commit details
-
Copy full SHA for c8408e2 - Browse repository at this point
Copy the full SHA c8408e2View commit details -
Configuration menu - View commit details
-
Copy full SHA for d1ecf4e - Browse repository at this point
Copy the full SHA d1ecf4eView commit details