-
Notifications
You must be signed in to change notification settings - Fork 579
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 wrong behaviors when explode_center = false
#2916
base: master
Are you sure you want to change the base?
Conversation
explode_center is needed when counting tnt blocks so that the radius of the explosion can be set properly, it isn't needed when tnt.boom is used on it's own for things like mobs and lucky blocks. |
Hm. I suppose that means my fix doubles the power of a single TNT block. I can resolve that by still starting the count at 1, and ignoring whatever's at the center. |
Instead, I just replaced the center node with air, if it is tnt. I suppose I didn't notice this because |
To clarify why this parameter exists: What exactly is the buggy behaviour that this PR tries to fix? I see some problems with the PR as it is now, ie. the missing |
Oh, that's the purpose of the
My proposal for
Currently, there is no way to trigger an explosion without TNT that doesn't also remove nodes from protected areas. See the pseudocode above. |
Hm. Apparently I'm a bit confused; the issue is actually not what I was describing, which was the behavior with a botched modification of the tnt mod. There is still an issue. Give me a moment to change the description. |
I updated the description with a table that highlights the unexpected behaviors. |
Is this still applicable? |
absolutely, on your-land we've switched to using a fork of the tnt mod that i created. |
I don't think we can remove this feature without breaking backwards compatibility - even if it's poorly designed - especially as it does see use in the wild (for the use case mentioned by Desour). That said, your table shows some behaviors which are indeed bugs, and those should be fixed. |
how so? with this PR, the code does the correct thing whether there's a TNT node at the center of the explosion or not, unless you think there's someone out there that wants to create an explosion around a TNT node without destroying it? |
Is this
handled correctly? Currently it looks like you'll first be setting the TNT node to air, so you won't explode it. |
6539835
to
7e597c9
Compare
oh, i finally understand the purpose of after re-adding it, there's still several problems that need to be addressed regarding explosions in protected areas, or of supposedly un-explodable nodes, when |
explode_center = false
explode_center = false
explode_center = false
alright, i think it's good now, with no API change. |
Sorry. I'm not motivated to review this after all. |
EDIT: I botched the description of the bug originally; included is a table highlighting the unexpected behaviors.
I am not entirely sure what the intended use of this feature is, but it is currently quite broken, at least in the use cases I see in the wild.
I see that it as added in #1844 to address #1825. I can't make sense of what exactly the issue there was. When using this (my) PR, I verified that "on_blast()" is being called for every node in the explosion, including the center.
The current behavior of
tnt.boom
, when triggered on a non-tnt node, is as follows:Here, "unblastable" means that the node defines
onblast = function() end
, i.e. that it should never be broken by explosions.I also made a mod for making it easier to test the behavior of explosions:
https://github.com/fluxionary/minetest-boomstick
I might be missing something, but to me, it makes the most sense to just remove the feature.