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

MetaMacro Functionality for GM & Campaign Panel Buttons #4531

Merged
merged 4 commits into from
Dec 7, 2023

Conversation

bubblobill
Copy link
Collaborator

@bubblobill bubblobill commented Dec 6, 2023

Identify the Bug or Feature request

resolves #2926

Description of the Change

Added CAMPAIGN_PANEL & GM_PANEL to variable resolver for new constants panel.campaign & panel.gm.
Did a little code refactoring consolidation to make life easier.
Created versions of macro functions that accept above constants in place of Token Id allowing macro control over campaign and gm panel macro buttons;

  • createMacro
  • getMacroCommand
  • getMacroGroup
  • getMacroIndexes
  • getMacroProps
  • getMacros
  • hasMacro
  • removeMacro
  • setMacroCommand
  • setMacroProps

Also added alias for getMacroIndexes -> getMacroIndices because I'm a little language OCD

Possible Drawbacks

Too much power placed in the hands of fools.
That and I may have done things incorrectly, even though it works.

Documentation Notes

Added constants panel.campaign & panel.gm for use in macros.
The following functions now accept panel.campaign and panel.gm in place of the Token Id as a source or destination;

  • createMacro
  • getMacroCommand
  • getMacroGroup
  • getMacroIndexes
  • getMacroIndices
  • getMacroProps
  • getMacros
  • hasMacro
  • removeMacro
  • setMacroCommand
  • setMacroProps

Release Notes

These macro functions now accept "panel.campaign" and "panel.gm" in place of the Token Id allowing macro control over the Campaign and GM panel macro buttons;

  • createMacro
  • getMacroCommand
  • getMacroGroup
  • getMacroIndexes
  • getMacroProps
  • getMacros
  • hasMacro
  • removeMacro
  • setMacroCommand
  • setMacroProps

This change is Reviewable

bubblobill and others added 4 commits December 6, 2023 18:22
…s panel.campaign & panel.gm.

Created versions of macro functions that accept above constants in place of Token Id for use in relevant panels.
Seems to test clean.
@cwisniew cwisniew added this pull request to the merge queue Dec 7, 2023
@cwisniew cwisniew added the feature Adding functionality that adds value label Dec 7, 2023
Merged via the queue into RPTools:develop with commit 4165ec9 Dec 7, 2023
4 checks passed
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
Development

Successfully merging this pull request may close these issues.

Ability to read/write/create/delete/etc. GM, Campaign, and possibly Global macro properties
2 participants