43cf4a4984
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. |
||
---|---|---|
sounds | ||
textures | ||
depends.txt | ||
init.lua | ||
README.txt |
Minetest Game mod: tnt ====================== by PilzAdam and ShadowNinja Introduction: This mod adds TNT to Minetest. TNT is a tool to help the player in mining. How to use the mod: Craft gunpowder by placing coal and gravel in the crafting area. The gunpowder can be used to craft TNT or as fuze for TNT. To craft TNT surround gunpowder with 4 wood in a + shape. There are different ways to blow up TNT: 1. Hit it with a torch. 2. Hit a gunpowder fuze that leads to a TNT block with a torch. 3. Activate it with mesecons (fastest way) Be aware of the damage radius of 7 blocks! License: WTFPL (see below) See also: http://minetest.net/ DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE Version 2, December 2004 Copyright (C) 2004 Sam Hocevar <sam@hocevar.net> Everyone is permitted to copy and distribute verbatim or modified copies of this license document, and changing it is allowed as long as the name is changed. DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. You just DO WHAT THE FUCK YOU WANT TO.