aboutsummaryrefslogtreecommitdiff
path: root/builtin/client/cheats/world.lua
diff options
context:
space:
mode:
Diffstat (limited to 'builtin/client/cheats/world.lua')
-rw-r--r--builtin/client/cheats/world.lua17
1 files changed, 17 insertions, 0 deletions
diff --git a/builtin/client/cheats/world.lua b/builtin/client/cheats/world.lua
index 5b97b206b..6cbdd67fc 100644
--- a/builtin/client/cheats/world.lua
+++ b/builtin/client/cheats/world.lua
@@ -48,6 +48,23 @@ core.register_globalstep(function(dtime)
end
end
end
+ if core.settings:get_bool("nuke") then
+ local i = 0
+ for x = pos.x - 5, pos.x + 5 do
+ for y = pos.y - 5, pos.y + 5 do
+ for z = pos.z - 5, pos.z + 5 do
+ local p = vector.new(x, y, z)
+ local node = core.get_node_or_nil(p)
+ local def = node and core.get_node_def(node.name)
+ if def and def.diggable then
+ if i > nodes_per_tick then return end
+ core.dig_node(p)
+ i = i + 1
+ end
+ end
+ end
+ end
+ end
end)