diff options
author | Perttu Ahola <celeron55@gmail.com> | 2012-01-06 00:12:33 +0200 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2012-01-06 00:12:33 +0200 |
commit | 4f2c1e36a10ee00c6779a02dd4441fa680fb3497 (patch) | |
tree | 5987efecaf095260f72e91b69a3d215b699db205 /data | |
parent | bc743ca7ced997e75ee72b8f493f6ffb14879aad (diff) | |
download | minetest-4f2c1e36a10ee00c6779a02dd4441fa680fb3497.tar.gz minetest-4f2c1e36a10ee00c6779a02dd4441fa680fb3497.tar.bz2 minetest-4f2c1e36a10ee00c6779a02dd4441fa680fb3497.zip |
Implement minetest.register_on_dieplayer()
Diffstat (limited to 'data')
-rw-r--r-- | data/builtin.lua | 1 | ||||
-rw-r--r-- | data/mods/default/init.lua | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/data/builtin.lua b/data/builtin.lua index b2ce96881..1046e934e 100644 --- a/data/builtin.lua +++ b/data/builtin.lua @@ -435,6 +435,7 @@ minetest.registered_on_dignodes, minetest.register_on_dignode = make_registratio minetest.registered_on_punchnodes, minetest.register_on_punchnode = make_registration() minetest.registered_on_generateds, minetest.register_on_generated = make_registration() minetest.registered_on_newplayers, minetest.register_on_newplayer = make_registration() +minetest.registered_on_dieplayers, minetest.register_on_dieplayer = make_registration() minetest.registered_on_respawnplayers, minetest.register_on_respawnplayer = make_registration() -- END diff --git a/data/mods/default/init.lua b/data/mods/default/init.lua index 8de651efa..aa03eabe8 100644 --- a/data/mods/default/init.lua +++ b/data/mods/default/init.lua @@ -101,8 +101,10 @@ -- minetest.register_on_punchnode(func(pos, node, puncher)) -- minetest.register_on_generated(func(minp, maxp)) -- minetest.register_on_newplayer(func(ObjectRef)) +-- minetest.register_on_dieplayer(func(ObjectRef)) -- minetest.register_on_respawnplayer(func(ObjectRef)) -- ^ return true in func to disable regular player placement +-- ^ currently called _before_ repositioning of player occurs -- minetest.register_on_chat_message(func(name, message)) -- minetest.add_to_creative_inventory(itemstring) -- minetest.setting_get(name) -> string or nil |