Refactor GTTools ui logic and add tree felling switch for axes #2857
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What
Refactor the tools gui logic to a new behavior type.
Add sneak + r-click action to tree fellers to allow toggling the behavior.
Implementation Details
Created a subtype of IToolBehavior specifically for handling the gui logic on right click.
Removed default gui opening operation and added a behavior for configuring aoe which I added to all tools with aoe.
Added right click action to the tree felling behavior.
To maintain expected behaviour the default state is to not disable tree felling.
It should be noted that the previous system wasn't good for configuring the gui of all derived tools (mining hammers, chainsaws, drills etc.)
Outcome
Among other things resolves #2845
Additional Information
Switch mode message:

Potential Compatibility Issues
Any addon that implemented a gui the old way should move it to a behavior. (it's almost a 1-1 conversion but it is a breaking change)