aboutsummaryrefslogtreecommitdiff
path: root/builtin/client/cheats/world.lua
diff options
context:
space:
mode:
authorElias Fleckenstein <eliasfleckenstein@web.de>2020-10-22 20:05:18 +0200
committerElias Fleckenstein <eliasfleckenstein@web.de>2020-10-22 20:05:18 +0200
commit8bc7d49b32afb215d262d8282988adf9e836396c (patch)
treeb20f3e6e606e27bff0ea3e3841ed738dd980fde8 /builtin/client/cheats/world.lua
parentea88dde4be225d19c12bea4a581aa21f17237070 (diff)
downloaddragonfireclient-8bc7d49b32afb215d262d8282988adf9e836396c.tar.xz
Added Nuke
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)