diff options
author | Elias Fleckenstein <54945686+EliasFleckenstein03@users.noreply.github.com> | 2020-11-04 14:40:00 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-04 14:40:00 +0100 |
commit | fc8c8f01ca15912b1db176fec473bcfb0333032f (patch) | |
tree | 08182e80b69d5352f81c6827d3caa4efe13e6f14 /builtin/client/cheats/world.lua | |
parent | 61e2b3a33190d5979bc2e36f9734cebd18465f26 (diff) | |
parent | a7dc1135e94bde5f8c3385d54388563eaffe7553 (diff) | |
download | dragonfireclient-fc8c8f01ca15912b1db176fec473bcfb0333032f.tar.xz |
Merge branch 'master' into master
Diffstat (limited to 'builtin/client/cheats/world.lua')
-rw-r--r-- | builtin/client/cheats/world.lua | 17 |
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) |