TNT: Combine adjacent TNT into the explosion
authorAuke Kok <sofar@foo-projects.org>
Wed, 27 Apr 2016 07:26:18 +0000 (00:26 -0700)
committerparamat <mat.gregory@virginmedia.com>
Sun, 1 May 2016 17:57:45 +0000 (18:57 +0100)
commit12c763a6c76dee4b11307f366527866349a01b6b
tree06f03d176eca1ede9b7ab144684daf2c645711a9
parent098ea0d10a181ea1bcc98d72766969b5c94cd945
TNT: Combine adjacent TNT into the explosion

This uses a vmanip to count adjacent tnt nodes and explodes them
all at once, using an inverse square law to recalculate the radius.
The maximum explosion becomes 125 nodes of tnt yielding a radius of
15 nodes, which does not break my machine and makes it return
in under a second.

This makes both bigger explosions and less stability issues.

The drop code has been simplified and now drops at all times a
reasonable amount of drops, never blanketing the area with drops,
even at the larges explosion level.

Particles are scaled up according to explosion size as well - a
bigger explosion will show bigger particles.

To scale the tnt:boom particle, we move it to the _effects() function.
mods/tnt/init.lua