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
Fix object:punch(puncher, ... should allow nil for puncher #14319
Conversation
2562deb
to
8ef15fb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just some minor stuff, looks good otherwise
Why do we need a Discussed in the meeting: https://irc.minetest.net/minetest-dev/2024-03-03#i_6156874
|
Why do we need a In #3837 is said: "The API clearly states in several places that nil is allowed. And this would be useful for mods to add "environment" damage that isn't attributable to objects." |
I agree that we want to support a |
This might sound obvious, but this only causes problems if some mod uses a nil puncher. So I think it's not that bad. |
It's not as bad as mods that outright crash, yes. It requires another mod to use the feature. But once mods start using this feature, there will be worse cross-mod compatibility. I've opened an issue on the 3d armor repo to notify them - I think they're probably the most popular, potentially affected mod - and additionally asked for a zipgrep of I'm fine with merging this for 5.9. I will make an effort to notify at least the maintainers of a couple of the most popular mods. As far as this PR goes, I think it should make clear that Do we have some kind of place to advertise such changes that may lead to (in this case cross-mod) compatibility issues in the future? Add another section to the changelog? |
There's so many issues that it's hard to keep track of whether they're still valid.
(from the issue)
Whenever something's not documented, I'd assume that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sfence could you please also document that hitter
may be nil
in register_on_punchplayer
now?
I think we should merge this and
- Keep an eye out for potential issues;
- Highlight this change in the release notes
At least in 3d_armor this should be addressed now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested with the provided entity, works.
437cdd6
to
ead0257
Compare
Fix object:punch(puncher, ... should allow nil for puncher #3837
Add support or nil puncher.
Fix object:punch(puncher, ... should allow nil for puncher #3837
To do
This PR is a Ready for Review.
How to test
Add entity
callback:callback_puncher
and punch it.