World Cheats improvements; Add BlockLava; Readd minetest.request_http_api for Compatibility
This commit is contained in:
parent
56d536ea5e
commit
a1e61e561f
@ -50,6 +50,7 @@ core.cheats = {
|
||||
["Scaffold"] = "scaffold",
|
||||
["ScaffoldPlus"] = "scaffold_plus",
|
||||
["BlockWater"] = "block_water",
|
||||
["BlockLava"] = "block_lava",
|
||||
["PlaceOnTop"] = "autotnt",
|
||||
["Replace"] = "replace",
|
||||
["Nuke"] = "nuke",
|
||||
|
@ -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)
|
||||
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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");
|
||||
|
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user