Commit graph

13 commits

Author SHA1 Message Date
Auke Kok
42dc2ed99c 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-01-28 19:53:01 -08:00
Auke Kok
41a51a6678 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-01-28 19:53:01 -08:00
ShadowNinja
c76a91943c Fix TNT drops being placed inside nodes 2016-01-05 23:28:59 +00:00
paramat
e15fde1624 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
0aebf864d1 Add gunpowder trails
Uses group “connect_to_raillike”
2015-06-07 14:27:18 +02:00
Novatux
aaa6c260cd 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
4bd1094619 Fix problems with TNT 2015-05-12 16:53:04 +02:00
Wuzzy
8bc8dd64c5 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
c654c9fd11 Remove weird constants in default 2015-01-10 15:47:30 +01:00
Gabriel Huber
6967232619 Fix TNT init for undefined enable_tnt setting 2014-07-25 23:29:44 -04:00
ShadowNinja
0ca4520cc2 Rewrite TNT 2014-07-22 12:05:40 -04:00
BlockMen
3180bdfe6c Add protection to TNT (by @tenplus1) 2014-07-13 19:24:57 +02:00
BlockMen
1e628ed92a Add tnt mod (freeminer version) 2014-07-05 16:02:58 +02:00