1
0
mirror of https://github.com/minetest/minetest_game.git synced 2025-06-30 13:50:23 +02:00

Add TNT API.

This commit is contained in:
red-001
2016-01-01 22:49:32 +00:00
committed by paramat
parent 8556dd30e2
commit cfef21f4d9
2 changed files with 130 additions and 64 deletions

View File

@ -209,6 +209,42 @@ Fire API
* Called when fire attempts to remove a burning node.
* `pos` Position of the burning node.
#TNT API
----------
tnt.register_tnt(definition)
^ Register a new type of tnt.
* `name` The name of the node. If no prefix is given `tnt` is used.
* `description` A description for your TNT.
* `radius` The radius within which the TNT can destroy nodes. The default is 3.
* `damage_radius` The radius within which the TNT can damage players and mobs. By default it is twice the `radius`.
* `disable_drops` Disable drops. By default it is set to false.
* `ignore_protection` Don't check `minetest.is_protected` before removing a node.
* `ignore_on_blast` Don't call `on_blast` even if a node has one.
* `tiles` Textures for node
* `side` Side tiles. By default the name of the tnt with a suffix of `_side.png`.
* `top` Top tile. By default the name of the tnt with a suffix of `_top.png`.
* `bottom` Bottom tile. By default the name of the tnt with a suffix of `_bottom.png`.
* `burning` Top tile when lit. By default the name of the tnt with a suffix of `_top_burning_animated.png".
`tnt.boom(position, radius, damage_radius, disable_drops) `
^ Create an explosion.
* `position` The center of explosion.
* `radius` The radius within which nodes can be destroyed.
* `damage_radius` The distance from the center that players and mobs can get damaged in.
* `disable_drops` Disable drops.
* `ignore_protection` Don't check `minetest.is_protected` before removing a node.
* `ignore_on_blast` Don't call `on_blast` even if a node has one.
`tnt.burn(pos)`
^ Ignite TNT at position
Screwdriver API
---------------