Virtual Tabletop for playing roleplaying games with remote players or face to face.
GNU Affero General Public License v3.0
787
stars
259
forks
source link
Bind getBar, setBar isBarVisible and setBarVisible to javascript #4899
Closed
fishface60 closed 2 weeks ago
Identify the Bug or Feature request
resolves #4898
Description of the Change
Add
token.getBar
,token.setBar
,token.isBarVisible
andtoken.setBarVisible
functions to the JavaScript macro context.See https://richardmaw.gitlab.io/maptool-bar-test/ for example campaign properties and add-on demonstrating the change.
Possible Drawbacks
This may stabilise an API with problems.
Documentation Notes
token.isBarVisible() Function
• Introduced in version 1.15.1
Returns true if the named bar is visible, false if it is not.
Usage
See isBarVisible() for MTScript equivalent.
token.setBarVisible() Function
Note: Using this function on tokens you do not own is only possible in a Trusted Macro
• Introduced in version 1.15.1
Changes bar visibility.
Usage
See setBarVisible() for MTScript equivalent.
token.getBar() Function
• Introduced in version 1.15.1
Returns the current value of the named bar, or 0 if it is not visible.
Usage
See getBar() for MTScript equivalent.
token.setBar() Function
Note: Using this function on tokens you do not own is only possible in a Trusted Macro
• Introduced in version 1.15.1
Set the value of the named bar, enabling it if it was hidden.
Usage
See setBar() for MTScript equivalent.
Release Notes
token.getBar
,token.setBar
,token.isBarVisible
andtoken.setBarVisible
functions to the JavaScript macro context.This change is