Environment* getEnv() { return m_environment; }
void setEnv(Environment* env) { m_environment = env; }
+#ifndef SERVER
GUIEngine* getGuiEngine() { return m_guiengine; }
void setGuiEngine(GUIEngine* guiengine) { m_guiengine = guiengine; }
+#endif
void objectrefGetOrCreate(lua_State *L, ServerActiveObject *cobj);
IGameDef *m_gamedef = nullptr;
Environment *m_environment = nullptr;
+#ifndef SERVER
GUIEngine *m_guiengine = nullptr;
+#endif
ScriptingType m_type;
};
return getScriptApiBase(L)->getEnv();
}
+#ifndef SERVER
GUIEngine *ModApiBase::getGuiEngine(lua_State *L)
{
return getScriptApiBase(L)->getGuiEngine();
}
+#endif
std::string ModApiBase::getCurrentModPath(lua_State *L)
{
#ifndef SERVER
class Client;
+class GUIEngine;
#endif
class ScriptApiBase;
class Server;
class Environment;
-class GUIEngine;
class ModApiBase : protected LuaHelper {
static Server* getServer(lua_State *L);
#ifndef SERVER
static Client* getClient(lua_State *L);
+ static GUIEngine* getGuiEngine(lua_State *L);
#endif // !SERVER
static IGameDef* getGameDef(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);