diff options
author | ShadowNinja <shadowninja@minetest.net> | 2014-12-12 14:49:19 -0500 |
---|---|---|
committer | ShadowNinja <shadowninja@minetest.net> | 2017-05-06 15:33:19 -0400 |
commit | 43d1f375d18a2fbc547a9b4f23d1354d645856ca (patch) | |
tree | 15de6977737b440b9d265f85dc1fe3c71e996a45 /src/script/scripting_server.cpp | |
parent | a024042bf5ad487685e952da7b96ffa845cd7731 (diff) | |
download | minetest-43d1f375d18a2fbc547a9b4f23d1354d645856ca.tar.gz minetest-43d1f375d18a2fbc547a9b4f23d1354d645856ca.tar.bz2 minetest-43d1f375d18a2fbc547a9b4f23d1354d645856ca.zip |
Use a settings object for the main settings
This unifies the settings APIs.
This also unifies the sync and async registration APIs, since the async
registration API did not support adding non-functions to the API table.
Diffstat (limited to 'src/script/scripting_server.cpp')
-rw-r--r-- | src/script/scripting_server.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/script/scripting_server.cpp b/src/script/scripting_server.cpp index ce56fcf19..cd01b0773 100644 --- a/src/script/scripting_server.cpp +++ b/src/script/scripting_server.cpp @@ -82,19 +82,6 @@ ServerScripting::ServerScripting(Server* server) void ServerScripting::InitializeModApi(lua_State *L, int top) { - // Initialize mod api modules - ModApiCraft::Initialize(L, top); - ModApiEnvMod::Initialize(L, top); - ModApiInventory::Initialize(L, top); - ModApiItemMod::Initialize(L, top); - ModApiMapgen::Initialize(L, top); - ModApiParticles::Initialize(L, top); - ModApiRollback::Initialize(L, top); - ModApiServer::Initialize(L, top); - ModApiUtil::Initialize(L, top); - ModApiHttp::Initialize(L, top); - ModApiStorage::Initialize(L, top); - // Register reference classes (userdata) InvRef::Register(L); ItemStackMetaRef::Register(L); @@ -111,6 +98,19 @@ void ServerScripting::InitializeModApi(lua_State *L, int top) ObjectRef::Register(L); LuaSettings::Register(L); StorageRef::Register(L); + + // Initialize mod api modules + ModApiCraft::Initialize(L, top); + ModApiEnvMod::Initialize(L, top); + ModApiInventory::Initialize(L, top); + ModApiItemMod::Initialize(L, top); + ModApiMapgen::Initialize(L, top); + ModApiParticles::Initialize(L, top); + ModApiRollback::Initialize(L, top); + ModApiServer::Initialize(L, top); + ModApiUtil::Initialize(L, top); + ModApiHttp::Initialize(L, top); + ModApiStorage::Initialize(L, top); } void log_deprecated(const std::string &message) |