Commit Graph

16 Commits

Author SHA1 Message Date
Auke Kok
91856fb3fb Make TNT a bit more fun.
But not too much.

TNT is a bit underwhelming at the moment. We can make it a bit
more interesting by ejecting not just one or two itemstacks,
but a bunch of them. This code splits up the drops into
separate itemstacks that are 2-5 items together, which
results in generally roughly 10 itemstacks being ejected.

Since now we have multiple ejecta, it makes sense to tune
the ejecta velocities a bit better to get the appearance of
an actual explosion better. The items will not all start
with the same vertical velocity, since that would look
like fireworks. Instead we give them all a different vertical
speed.
2016-04-16 19:27:16 +01:00
Auke Kok
c09ed8b394 Allow the on_blast API to pass an itemstack.
If the node is special and has an on_blast() handler, we need
to call it instead of getting node drops manually. However, we
do want to know if drops should be added for the special nodes,
so we modify the on_blast() handler code to allow the nodedef
handlers to pass back itemstacks. This could be used by e.g.
the doors mod to drop door items after a blast.

Since this API is documented in lua_api.txt, a separate PR will
be incoming to update the on_blast() documentation.
2016-04-16 19:27:16 +01:00
tenplus1
d96aef50c4 added timer to tnt:tnt_burning for explosions
By adding the timer to the tnt:tnt_burning node it will help mods add the block and cause an explosion after 4 seconds instead of doing nothing like in it's current state.
2016-02-18 13:56:57 +00:00
Craig Davison
14331d4575 Remove log_mods from TNT
This option is not documented nor is it used with any other mod in Minetest Game so why should it be used in TNT?
2016-02-18 13:56:50 +00:00
paramat
a075fcf2ff Consolidate ABMs
Spread ABM intervals evenly across 1 to 16 seconds
16s ensures no nodes are missed when player walks past
Adjust chance values to compensate, for identical action rates
Combine lavacooling ABMs into one, return to chance = 1
Grass growth: add 'neighbors = "air"' to avoid
processing the thousands of underground dirt nodes
Grass death: Reduce action rate to that of grass growth
Fire: Use chance = 1 for flame extinguishing
and flame removal when mod is disabled
2016-02-14 05:22:20 +00:00
ShadowNinja
7903bc1342 Fix TNT drops being placed inside nodes 2016-01-05 23:28:59 +00:00
paramat
7fe9ca538b Fix is_ground_content settings for nodes
Remove line if set to the default of 'true'
2015-06-18 02:25:02 +01:00
Wuzzy
a2ce7629aa Add gunpowder trails
Uses group “connect_to_raillike”
2015-06-07 14:27:18 +02:00
Novatux
a7bf161875 Copy pos before giving it to on_blast because it can modify it; also remove a debug print that had nothing to do here 2015-05-12 21:03:02 +02:00
Novatux
87fc2aac60 Fix problems with TNT 2015-05-12 16:53:04 +02:00
Wuzzy
f81820203d Make TNT respect on_blast, implement on_blast for some nodes
Implemented nodes:
- Steel Door: Ignores explosion
- Locked Chest: Ignores explosion
- Fire: Ignores explosion
- TNT: Starts burning
- Burning TNT: Explodes immediately
- Gunpowder: Starts burning
- Burning Gunpowder: Ignores explosion
2015-05-12 16:32:52 +02:00
PilzAdam
6aec1811eb Remove weird constants in default 2015-01-10 15:47:30 +01:00
Gabriel Huber
02a033714d Fix TNT init for undefined enable_tnt setting 2014-07-25 23:29:44 -04:00
ShadowNinja
0822a3df13 Rewrite TNT 2014-07-22 12:05:40 -04:00
BlockMen
c7330eb153 Add protection to TNT (by @tenplus1) 2014-07-13 19:24:57 +02:00
BlockMen
3f39ab523f Add tnt mod (freeminer version) 2014-07-05 16:02:58 +02:00