aboutsummaryrefslogtreecommitdiff
path: root/src/strfnd.h
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2011-04-06 01:42:37 +0300
committerPerttu Ahola <celeron55@gmail.com>2011-04-06 01:42:37 +0300
commit212f34db82c0a3ce5ee6dad3c45c3cc3ec9f8890 (patch)
tree7f3ab1029d50ba7fdad7c7238bc5096c0df4f490 /src/strfnd.h
parent5b72b224092eec3d839cd337ad9fbb3c2683a6c6 (diff)
downloadminetest-212f34db82c0a3ce5ee6dad3c45c3cc3ec9f8890.tar.gz
minetest-212f34db82c0a3ce5ee6dad3c45c3cc3ec9f8890.tar.bz2
minetest-212f34db82c0a3ce5ee6dad3c45c3cc3ec9f8890.zip
fixed the bug of disabled removal of empty chests
Diffstat (limited to 'src/strfnd.h')
0 files changed, 0 insertions, 0 deletions
l ppc">#define L_BASE_H_ #include "common/c_types.h" #include "common/c_internal.h" extern "C" { #include <lua.h> #include <lauxlib.h> } class ScriptApiBase; class Server; class Environment; class GUIEngine; class ModApiBase { public: static ScriptApiBase* getScriptApiBase(lua_State *L); static Server* getServer(lua_State *L); static Environment* getEnv(lua_State *L); static GUIEngine* getGuiEngine(lua_State *L); // When we are not loading the mod, this function returns "." static std::string getCurrentModPath(lua_State *L); // Get an arbitrary subclass of ScriptApiBase // by using dynamic_cast<> on getScriptApiBase() template<typename T> static T* getScriptApi(lua_State *L) { ScriptApiBase *scriptIface = getScriptApiBase(L); T *scriptIfaceDowncast = dynamic_cast<T*>(scriptIface); if (!scriptIfaceDowncast) { throw LuaError("Requested unavailable ScriptApi - core engine bug!"); } return scriptIfaceDowncast; } static bool registerFunction(lua_State *L, const char* name, lua_CFunction fct, int top ); }; #endif /* L_BASE_H_ */