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

Simplify Butterfly and Firefly codes #3125

Conversation

Emojigit
Copy link
Contributor

@Emojigit Emojigit commented Jun 3, 2024

This PR simplifies the code of butterflies and fireflies. Changes are listed below:

  1. The engine now handles the placement of butterflies and fireflies. An on_construct callback is added to handle node timers.
  2. The bug nest now uses the engine tool_capabilities field to handle bug-catching. As a side effect, the capabilities of the bare hands are inherited.

As the typical node placing and digging routines are used, placements are logged and protection violation callbacks are called.

This PR conflicts with #3116. That PR still uses custom code, and this PR replaces those with the engine's routines.

Fixes #2987 by using the engine's routine. Unlike #3116, this PR does not fix ​#3102 as it is another unrelated issue.

This PR is ready for review.

@JoseDouglas26
Copy link
Contributor

This is what I was told when I tried this: #3093 (comment)

@Emojigit
Copy link
Contributor Author

Emojigit commented Jun 3, 2024

This is what I was told when I tried this: #3093 (comment)

I started the timer in an on_construct callback.

@JoseDouglas26
Copy link
Contributor

I will close my PR

Copy link
Member

@sfan5 sfan5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works

Copy link
Member

@SmallJoker SmallJoker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@SmallJoker SmallJoker merged commit 2ce8ff3 into minetest:master Aug 31, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Butterflies don't respect other nodes on_rightclick
4 participants