From f8c9b703798873c6e958560341105069dca8f86c Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Sat, 12 Nov 2011 19:19:58 +0200 Subject: Scripting: Allow multiple global step callbacks and improve documentation --- src/scriptapi.cpp | 52 ++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 46 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/scriptapi.cpp b/src/scriptapi.cpp index 6d0522000..27f46a8ac 100644 --- a/src/scriptapi.cpp +++ b/src/scriptapi.cpp @@ -170,8 +170,35 @@ static int l_register_entity(lua_State *L) return 0; /* number of results */ } +// Register a global step function +// register_globalstep(function) +static int l_register_globalstep(lua_State *L) +{ + luaL_checktype(L, 1, LUA_TFUNCTION); + infostream<<"register_globalstep"<