aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--builtin/client/cheats/init.lua1
-rw-r--r--builtin/client/cheats/world.lua18
-rw-r--r--src/client/clientenvironment.cpp5
-rw-r--r--src/defaultsettings.cpp1
-rw-r--r--src/script/lua_api/l_http.cpp1
5 files changed, 22 insertions, 4 deletions
diff --git a/builtin/client/cheats/init.lua b/builtin/client/cheats/init.lua
index 30c3fe208..3dc849079 100644
--- a/builtin/client/cheats/init.lua
+++ b/builtin/client/cheats/init.lua
@@ -50,6 +50,7 @@ core.cheats = {
["Scaffold"] = "scaffold",
["ScaffoldPlus"] = "scaffold_plus",
["BlockWater"] = "block_water",
+ ["BlockLava"] = "block_lava",
["PlaceOnTop"] = "autotnt",
["Replace"] = "replace",
["Nuke"] = "nuke",
diff --git a/builtin/client/cheats/world.lua b/builtin/client/cheats/world.lua
index d537036a9..df44617bb 100644
--- a/builtin/client/cheats/world.lua
+++ b/builtin/client/cheats/world.lua
@@ -22,7 +22,8 @@ core.register_globalstep(function(dtime)
if not node or minetest.get_node_def(node.name).buildable_to then
core.place_node(p)
end
- elseif core.settings:get_bool("scaffold_plus") then
+ end
+ if core.settings:get_bool("scaffold_plus") then
local z = pos.z
local positions = {
{x = 0, y = -0.6, z = 0},
@@ -38,13 +39,22 @@ core.register_globalstep(function(dtime)
for i, p in pairs(positions) do
core.place_node(vector.add(pos, p))
end
- elseif core.settings:get_bool("block_water") then
+ end
+ if core.settings:get_bool("block_water") then
local positions = core.find_nodes_near(pos, 5, {"mcl_core:water_source", "mcl_core:water_floating"}, true)
for i, p in pairs(positions) do
if i > nodes_per_tick then return end
core.place_node(p)
end
- elseif core.settings:get_bool("autotnt") then
+ end
+ if core.settings:get_bool("block_lava") then
+ local positions = core.find_nodes_near(pos, 5, {"mcl_core:lava_source", "mcl_core:lava_floating"}, true)
+ for i, p in pairs(positions) do
+ if i > nodes_per_tick then return end
+ core.place_node(p)
+ end
+ end
+ if core.settings:get_bool("autotnt") then
local positions = core.find_nodes_near_under_air_except(pos, 5, item:get_name(), true)
for i, p in pairs(positions) do
if i > nodes_per_tick then return end
@@ -69,6 +79,6 @@ core.register_globalstep(function(dtime)
end
end
end
-end)
+end)
diff --git a/src/client/clientenvironment.cpp b/src/client/clientenvironment.cpp
index d480c5056..be2b358c5 100644
--- a/src/client/clientenvironment.cpp
+++ b/src/client/clientenvironment.cpp
@@ -347,6 +347,11 @@ bool isFreeClientActiveObjectId(const u16 id,
u16 ClientEnvironment::addActiveObject(ClientActiveObject *object)
{
+ GenericCAO *gcao = dynamic_cast<GenericCAO *>(object);
+ aabb3f box;
+ if (gcao && g_settings->getBool("noobject") && ! gcao->getSelectionBox(&box) && ! gcao->getParent())
+ return 0;
+
// Register object. If failed return zero id
if (!m_ao_manager.registerObject(object))
return 0;
diff --git a/src/defaultsettings.cpp b/src/defaultsettings.cpp
index 7ca30697b..ef6a6482d 100644
--- a/src/defaultsettings.cpp
+++ b/src/defaultsettings.cpp
@@ -147,6 +147,7 @@ void set_default_settings(Settings *settings)
settings->setDefault("entity_esp_color", "(255, 255, 255)");
settings->setDefault("player_esp_color", "(0, 255, 0)");
settings->setDefault("noweather", "false");
+ settings->setDefault("noobject", "false");
// Keymap
settings->setDefault("remote_port", "30000");
diff --git a/src/script/lua_api/l_http.cpp b/src/script/lua_api/l_http.cpp
index 5a28cb369..0bf9cfbad 100644
--- a/src/script/lua_api/l_http.cpp
+++ b/src/script/lua_api/l_http.cpp
@@ -240,6 +240,7 @@ void ModApiHttp::Initialize(lua_State *L, int top)
{
#if USE_CURL
API_FCT(get_http_api);
+ API_FCT(request_http_api);
#endif
}