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

Make bugs only pointable with Bug Net #3099

Merged
merged 2 commits into from
Mar 10, 2024
Merged

Conversation

cx384
Copy link
Contributor

@cx384 cx384 commented Jan 27, 2024

Problem

Sometimes a firefly or a butterfly is in your way when you want to dig something, and it can't be destroyed by punching it.
It basically behaves like punching stone with a bare hand. This is unreasonable and annoying.

What does this PR do?

This PR makes fireflies and butterflies only pointable using a bug net.
It utilizes the new pointabilities feature.

Alternatives

  • Make fireflies and butterflies digable without dropping anything.
  • Move fireflies and butterflies to an adjacent position if someone tries to punch them.

Copy link
Contributor

@appgurueu appgurueu left a comment

Choose a reason for hiding this comment

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

I don't think the "legacy compatibility" works if an old client connects to a new server: The server will set pointable = false for the fireflies and butterflies. The old client will not be able to point at them, since it doesn't understand the pointabilities.

I'm not sure what to do about this however. I currently see three options:

  • Using the current API, we could let fireflies remain pointable, but add pointabilities = false to all tools by default (for example by monkey-patching minetest.register_tool). This is quite hacky, however.
  • Perhaps we could adapt the pointabilities API to allow specifying a fallback for backwards-compatibility or similar?
  • Just ignore it. Not all that bad, actually. New clients on new servers will be fine. Old servers will be fine to (and just not take advantage of this). And this is a pretty minor feature anyways.

@cx384
Copy link
Contributor Author

cx384 commented Jan 27, 2024

Yeah, the compatibility is only for old Minetest versions which use a new MTG version.
I don't know how compatibility issues are typically handled in Minetest, but the first two solutions you suggested are too much imo, considering how insignificant the problem is.
I'm not even sure if the legacy support I added is needed, since a new MTG version may depend on Minetest 5.9.0 anyway.

The only good way I see to solve this is to add a feature to Minetest which allows sending different item definitions to clients depending on the client version. However, this would be a huge effort and it will rarely be used. So I think it is reasonable to just ignore it, in case this PR gets merged.

@sfan5
Copy link
Member

sfan5 commented Jan 27, 2024

To be clear (in the past) MTG did require the server to be up-to-date but we still couldn't use something (e.g. formspecs) that flat-out did not work on older clients.

Copy link
Contributor

@appgurueu appgurueu left a comment

Choose a reason for hiding this comment

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

I can live with older clients being unable to catch bugs. (And since bugs have buildable_to = true, it's not like they are indestructible for older clients.)

@sfan5 sfan5 merged commit ef788d0 into minetest:master Mar 10, 2024
1 check passed
mckaygerhard added a commit to minenux/minetest-game-minetest that referenced this pull request Apr 18, 2024
* Add legacy compatibility making to work with older clients
* backported minetest/minetest_game#3099
* backported commit minetest/minetest_game@ef788d0
MoNTE48 pushed a commit to MoNTE48/minetest_game that referenced this pull request Jun 2, 2024
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.

3 participants