From 945d01fd9efe93e892a6a2be2467373e3c684300 Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Sat, 26 Nov 2011 03:20:19 +0200 Subject: on_newplayer and on_respawnplayer callbacks --- src/scriptapi.cpp | 93 ++++++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 81 insertions(+), 12 deletions(-) (limited to 'src/scriptapi.cpp') diff --git a/src/scriptapi.cpp b/src/scriptapi.cpp index 4a746c8f4..fd9d10195 100644 --- a/src/scriptapi.cpp +++ b/src/scriptapi.cpp @@ -41,9 +41,8 @@ extern "C" { /* TODO: -- Node definition - Random node triggers (like grass growth) -- Deterministic node triggers (like falling sand) +- All kinds of callbacks - Object visual client-side stuff - Blink effect - Spritesheets and animation @@ -848,6 +847,20 @@ static int l_register_on_punchnode(lua_State *L) return register_lua_callback(L, "registered_on_punchnodes"); } +// register_on_newplayer(function) +static int l_register_on_newplayer(lua_State *L) +{ + infostream<<"register_on_newplayer"<