1
0
mirror of https://github.com/minetest/minetest_game.git synced 2024-11-16 15:00:18 +01:00
Commit Graph

66 Commits

Author SHA1 Message Date
Auke Kok
8cd049c224 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
12d5ca2f48 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
36d18cb161 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
b47a556472 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
7d2dfe4101 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
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