diff options
| author | Elias Fleckenstein <eliasfleckenstein@web.de> | 2020-12-11 16:38:49 +0100 |
|---|---|---|
| committer | Elias Fleckenstein <eliasfleckenstein@web.de> | 2020-12-11 16:38:49 +0100 |
| commit | a1e61e561fdc6f37e1b7547203796a9b4ac4f8e1 (patch) | |
| tree | 8969d9df3d559d2184996d2512da72f073bcac0d /builtin/client | |
| parent | 56d536ea5e1f98c760d7c78a4584df043fb7f0f8 (diff) | |
| download | dragonfireclient-a1e61e561fdc6f37e1b7547203796a9b4ac4f8e1.tar.xz | |
World Cheats improvements; Add BlockLava; Readd minetest.request_http_api for Compatibility
Diffstat (limited to 'builtin/client')
| -rw-r--r-- | builtin/client/cheats/init.lua | 1 | ||||
| -rw-r--r-- | builtin/client/cheats/world.lua | 18 |
2 files changed, 15 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) |
