aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLoic Blot <loic.blot@unix-experience.fr>2017-01-28 18:31:23 +0100
committerLoïc Blot <nerzhul@users.noreply.github.com>2017-03-13 23:56:05 +0100
commitba66fce8339f818a638f97679bd29da064a8c1c6 (patch)
treead770bd6129be5f1b9058aaca8f773f09631e323 /src
parenta50d07d39a76053328846d82a32bac61468bb16f (diff)
downloadminetest-ba66fce8339f818a638f97679bd29da064a8c1c6.tar.gz
minetest-ba66fce8339f818a638f97679bd29da064a8c1c6.tar.bz2
minetest-ba66fce8339f818a638f97679bd29da064a8c1c6.zip
[CSM] storage + fixes
Diffstat (limited to 'src')
-rw-r--r--src/script/clientscripting.cpp2
-rw-r--r--src/script/lua_api/CMakeLists.txt1
-rw-r--r--src/script/lua_api/l_client.h3
-rw-r--r--src/script/lua_api/l_util.cpp6
-rw-r--r--src/server.cpp2
-rw-r--r--src/server.h2
6 files changed, 6 insertions, 10 deletions
diff --git a/src/script/clientscripting.cpp b/src/script/clientscripting.cpp
index 390d21a3a..aaed2865d 100644
--- a/src/script/clientscripting.cpp
+++ b/src/script/clientscripting.cpp
@@ -22,6 +22,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "client.h"
#include "cpp_api/s_internal.h"
#include "lua_api/l_client.h"
+#include "lua_api/l_storage.h"
#include "lua_api/l_sound.h"
#include "lua_api/l_util.h"
@@ -53,4 +54,5 @@ void ClientScripting::InitializeModApi(lua_State *L, int top)
ModApiUtil::InitializeClient(L, top);
ModApiClient::Initialize(L, top);
ModApiSound::Initialize(L, top);
+ ModApiStorage::Initialize(L, top);
}
diff --git a/src/script/lua_api/CMakeLists.txt b/src/script/lua_api/CMakeLists.txt
index 17bcdde4c..2d25d845c 100644
--- a/src/script/lua_api/CMakeLists.txt
+++ b/src/script/lua_api/CMakeLists.txt
@@ -25,5 +25,6 @@ set(common_SCRIPT_LUA_API_SRCS
set(client_SCRIPT_LUA_API_SRCS
${CMAKE_CURRENT_SOURCE_DIR}/l_client.cpp
${CMAKE_CURRENT_SOURCE_DIR}/l_mainmenu.cpp
+ ${CMAKE_CURRENT_SOURCE_DIR}/l_storage.cpp
${CMAKE_CURRENT_SOURCE_DIR}/l_sound.cpp
PARENT_SCOPE)
diff --git a/src/script/lua_api/l_client.h b/src/script/lua_api/l_client.h
index 14ef5aecc..d0e230630 100644
--- a/src/script/lua_api/l_client.h
+++ b/src/script/lua_api/l_client.h
@@ -23,8 +23,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "lua_api/l_base.h"
-class ModApiClient:
- public ModApiBase
+class ModApiClient: public ModApiBase
{
private:
// get_current_modname()
diff --git a/src/script/lua_api/l_util.cpp b/src/script/lua_api/l_util.cpp
index b9c334121..809a2eb68 100644
--- a/src/script/lua_api/l_util.cpp
+++ b/src/script/lua_api/l_util.cpp
@@ -532,12 +532,6 @@ void ModApiUtil::InitializeClient(lua_State *L, int top)
API_FCT(get_us_time);
- API_FCT(setting_set);
- API_FCT(setting_get);
- API_FCT(setting_setbool);
- API_FCT(setting_getbool);
- API_FCT(setting_save);
-
API_FCT(parse_json);
API_FCT(write_json);
diff --git a/src/server.cpp b/src/server.cpp
index dd6c9a418..293b32a81 100644
--- a/src/server.cpp
+++ b/src/server.cpp
@@ -3400,7 +3400,7 @@ void Server::getModNames(std::vector<std::string> &modlist)
modlist.push_back(it->name);
}
-const std::string Server::getBuiltinLuaPath()
+std::string Server::getBuiltinLuaPath()
{
return porting::path_share + DIR_DELIM + "builtin";
}
diff --git a/src/server.h b/src/server.h
index 417d31bd8..f0bab1bbf 100644
--- a/src/server.h
+++ b/src/server.h
@@ -299,7 +299,7 @@ public:
virtual const ModSpec* getModSpec(const std::string &modname) const;
void getModNames(std::vector<std::string> &modlist);
std::string getBuiltinLuaPath();
- inline const std::string &getWorldPath() const { return m_path_world; }
+ std::string getWorldPath() const { return m_path_world; }
std::string getModStoragePath() const;
inline bool isSingleplayer()