minetest / minetest_game

Minetest Game - A lightweight and well-maintained base for modding [https://github.com/minetest/minetest/]
http://minetest.net/
Other
1.42k stars 577 forks source link

Make burning TNT an entity #1514

Closed bigfoot547 closed 6 years ago

bigfoot547 commented 7 years ago

Burning TNT should be an entity like a falling node. This is so tnt cannons could be made. I made a tnt cannon, but I had to repair it every use.

paramat commented 7 years ago

Ignited TNT is a falling node and auto-updates to make it fall as an entity when ignited.

bigfoot547 commented 7 years ago

But then it changes back to a block when it lands. I think it would be cool to have it like in the other game Minceraft.

Desour commented 7 years ago

@bigfoot547 The nuke mod does with its explosives exactly what you want, right?

bigfoot547 commented 7 years ago

@DS-Minetest Yes, that is exactly what I want.

sofar commented 7 years ago

It's possible to do this, and the thought had crossed my mind when I added the falling node stuff. Maybe in a future release.

octacian commented 7 years ago

A check would also have to be added to TNT nodes so that they wouldn't blow up other nodes if surrounded by water. I don't think it'd be too hard to do, just one of the things that would need to be considered.

sofar commented 7 years ago

TNT explodes normally in water, so we should just ignore water sources and explode nodes as normal.

paramat commented 7 years ago

Yes i prefer that TNT destroys water just like any other node.

Desour commented 7 years ago

It would be nice if explosions wouldn't destroy nodes with a specific group and furthermore would destroy nothing if the explosion is inside such a node. Then a mod could easily add a liquid with this group for players that want to build a cannon using explosives. Also some mods have nodes that aren't wanted to be destroyed by an explosion, eg. cloud, the barrier nodes from ctf or every else node that should be indestructible.

sofar commented 7 years ago

@DS-Minetest There is already a way to prevent blocks from explosions, and it is documented.

jhcole commented 7 years ago

You can already build a reusable cannon based on two existing features. First, take advantage of a falling node colliding with an over-sized collision_box and make the falling node get stuck. This falling node will be the ammo. I like to drop sand on the out stretched edge of a castle:tapestry_top. Second, use a protection mod like landrush to protect the cannon and drop a TNT behind the ammo from above.

On a side note, the reason I have the TNT drop is to wipe its owner metadata. This is necessary because I'm using #1070 to allow an owner to blast their own area. However, due to minetest/minetest#4087 once the TNT falls, the owner meta is wiped and the TNT can no longer damage any protected area.

VIDEO

cannon

Also note that another TNT can be used as the ammo in place of the sand for even more interesting results!

paramat commented 7 years ago

That's cool, so by using a collisionbox you can keep TNT an entity. Can this issue be closed then?

bigfoot547 commented 7 years ago

Wake up and smell the potatoes! Sorry, I just had to say that. :laughing: My point is that you remove tnt:tnt_burning and replace it with an entity, making it so that the tnt will explode in entity form.

sofar commented 7 years ago

It can all be done, but it will require modifications to the builtin falling entity (not really that difficult). It's just code that someone needs to write. Just not on my radar now, so someone else should look into it.

beyondlimits commented 6 years ago

Chances is it done already? My TNT's are falling!

paramat commented 6 years ago

No, the request is for ignited TNT to stay an entity even after it has landed.

paramat commented 6 years ago

Any core dev support?

sfan5 commented 6 years ago

I don't even know why minetest_game needs TNT so I'm very much fine with having it be simple (not an entity) and leaving "complex" things up to mods.

paramat commented 6 years ago

^ Closing, see thumbs up.