1
0
mirror of https://github.com/minetest/minetest_game.git synced 2024-09-30 07:30:20 +02:00
minetest_game/mods
Auke Kok 098ea0d10a TNT: Allow mods to override entity physics.
Introduces an `on_blast(luaobj, damage)` callback that mods can attach
to an entity def. The function will get called with the damage that
TNT would make.

The function should return three values:

  bool do_damage, bool do_knockback, table drops

do_damage allows the mod to tell the TNT code to perform damage on
the entity for the mod. The mod code should not do anything with
the entity HP. The entity should not be immortal. If false, then
the entity will not be damaged by the TNT mod.

do_knockback allows the mod to tell the TNT mod to perform an
entity knockback effect. If false, no knockback effect is applied
to the entity.

the drops table is a list of items to drop. It may be nil. E.g. {
"wool:red" }.

I've documented both on_blast() API methods in game_api.txt. It is
a better place than lua_api.txt.
2016-04-30 20:47:21 +01:00
..
beds Beds: Quicker saves with tidy output 2016-04-29 23:18:05 +01:00
boats Boats: Increase maximum velocity to 5n/s 2016-04-16 19:27:47 +01:00
bones TNT: Add on_blast to all nodes with an inventory 2016-04-26 22:33:59 +01:00
bucket Rename to Minetest Game 2015-09-30 23:33:12 +01:00
creative Creative: Add myself in credits 2016-04-04 05:39:29 +01:00
default Default: Add function 'node_sound_gravel_defaults()' 2016-04-29 23:19:30 +01:00
doors Doors: Use LBM instead of ABM to convert doors. 2016-04-19 02:57:54 +01:00
dye Dye: Add global table of dye names and descriptions 2016-03-13 04:49:03 +00:00
farming Farming: Add quiet sounds to seeds 2016-04-23 20:09:04 +01:00
fire Fire: Higher chance of removing flammable nodes 2016-04-19 05:33:13 +01:00
flowers Flowers: Fix waterlily node's duplication with stack of 1 2016-04-23 20:08:43 +01:00
give_initial_stuff Remove / replace all print() calls 2013-11-17 11:55:46 +01:00
screwdriver Changes to Screwdriver to add new drivers. 2016-03-22 15:45:39 +00:00
sethome Fix some undeclared global variables 2014-11-30 18:02:33 +01:00
stairs Consolidate ABMs 2016-02-14 05:22:20 +00:00
tnt TNT: Allow mods to override entity physics. 2016-04-30 20:47:21 +01:00
vessels TNT: Add on_blast to all nodes with an inventory 2016-04-26 22:33:59 +01:00
walls Walls: Don't connect to group:cracky 2016-03-18 02:35:28 +00:00
wool ability to dye coloured wool white 2016-01-29 03:50:07 +00:00
xpanes Add steel ladder 2016-03-06 01:31:36 +00:00