From 391916f685afe93d9afb021b81f8d5b5789822bc Mon Sep 17 00:00:00 2001 From: Thorbjørn Lindeijer Date: Sun, 6 Nov 2011 21:02:23 +0100 Subject: Merged three global script states into one These scripts could trivially share one script state, since the methods called on them from the server are not overlapping. This does leave them open to access each other's global variables, but that's the problem with global variables. The one remaining global script file name is now configurable, so that it may also be set to a script in a different scripting language. The two related script options are: script_mainFile (default: scripts/main.lua) script_defaultEngine (default: lua) - renamed from defaultScriptEngine Reviewed-by: jurkan Reviewed-by: Yohann Ferreira --- src/scripting/luascript.h | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'src/scripting/luascript.h') diff --git a/src/scripting/luascript.h b/src/scripting/luascript.h index b9bde2d8..0d59703c 100644 --- a/src/scripting/luascript.h +++ b/src/scripting/luascript.h @@ -31,7 +31,7 @@ extern "C" { /** * Implementation of the Script class for Lua. */ -class LuaScript: public Script +class LuaScript : public Script { public: /** @@ -66,13 +66,6 @@ class LuaScript: public Script void processRemoveEvent(Thing *thing); - /** - * Loads the global event script file - */ - static bool loadGlobalEventScript(const std::string &file); - static bool loadSpecialActionsScript(const std::string &file); - static bool loadCraftScript(const std::string &file); - private: lua_State *mState; int nbArgs; -- cgit v1.2.3-60-g2f50