]> git.lizzy.rs Git - dragonfireclient.git/blobdiff - doc/lua_api.txt
Merge pull request #243 from xyzz/liquid_renewable
[dragonfireclient.git] / doc / lua_api.txt
index 36dd6b2aab3c55223c1bafecab7f53fdd2eab2bd..3018326189f3d9c9f07f37e60853cd974927c19c 100644 (file)
@@ -456,6 +456,7 @@ Special groups
 - disable_jump: Player (and possibly other things) cannot jump from node
 - fall_damage_add_percent: damage speed = speed * (1 + value/100)
 - bouncy: value is bounce speed in percent
+- falling_node: if there is no walkable block under the node it will fall
 
 Known damage and digging time defining groups
 ----------------------------------------------
@@ -1087,6 +1088,7 @@ methods:
 - punch(puncher, time_from_last_punch, tool_capabilities, direction)
   ^ puncher = an another ObjectRef,
   ^ time_from_last_punch = time since last punch action of the puncher
+  ^ direction: can be nil
 - right_click(clicker); clicker = an another ObjectRef
 - get_hp(): returns number of hitpoints (2 * number of hearts)
 - set_hp(hp): set number of hitpoints (2 * number of hearts)
@@ -1236,7 +1238,7 @@ Entity definition (register_entity)
     
     initial_properties = <initial object properties>,
 
-    on_activate = function(self, staticdata),
+    on_activate = function(self, staticdata, dtime_s),
     on_step = function(self, dtime),
     on_punch = function(self, hitter),
     on_rightclick = function(self, clicker),
@@ -1422,6 +1424,11 @@ Node definition (register_node)
        on_metadata_inventory_take = func(pos, listname, index, stack, player),
        ^ Called after the actual action has happened, according to what was allowed.
        ^ No return value
+    
+       on_blast = func(pos, intensity),
+       ^ intensity: 1.0 = mid range of regular TNT
+       ^ If defined, called when an explosion touches the node, instead of
+         removing the node
 }
 
 Recipe for register_craft: (shaped)