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

Refactor GTTools ui logic and add tree felling switch for axes #2857

Open
wants to merge 4 commits into
base: 1.20.1
Choose a base branch
from

Conversation

omergunr100
Copy link
Contributor

@omergunr100 omergunr100 commented Feb 12, 2025

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:
image

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)

@omergunr100 omergunr100 added type: feature New feature or request type: refactor Suggestion to refactor a section of code Merge on Major Release Breaking changes, must be bundled into an 1.X.0 Update labels Feb 12, 2025
@omergunr100 omergunr100 requested a review from a team as a code owner February 12, 2025 02:29
@omergunr100 omergunr100 removed the type: feature New feature or request label Feb 12, 2025
added the right click action to toggle to the tree felling behaviour.
@omergunr100 omergunr100 changed the title Refactor GTTools ui logic and add gui to axes Refactor GTTools ui logic and add tree felling switch for axes Feb 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Merge on Major Release Breaking changes, must be bundled into an 1.X.0 Update type: refactor Suggestion to refactor a section of code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Config option to disable GregTech axe's timber functionality
1 participant