diff options
author | Elias Fleckenstein <eliasfleckenstein@web.de> | 2020-07-31 19:23:29 +0200 |
---|---|---|
committer | Elias Fleckenstein <eliasfleckenstein@web.de> | 2020-07-31 19:23:29 +0200 |
commit | 2675bcca1a3e8c59475ccb29d1afa9e19489a686 (patch) | |
tree | d12d7db86a4d6180e8da5555d2782e169f0ba89b /clientmods/worldhacks/init.lua | |
parent | 3d980cf5756aee9fc619e4d667f1427967dda53b (diff) | |
download | dragonfireclient-2675bcca1a3e8c59475ccb29d1afa9e19489a686.tar.xz |
Added more cheats
Diffstat (limited to 'clientmods/worldhacks/init.lua')
-rw-r--r-- | clientmods/worldhacks/init.lua | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/clientmods/worldhacks/init.lua b/clientmods/worldhacks/init.lua new file mode 100644 index 000000000..e9b79bfd7 --- /dev/null +++ b/clientmods/worldhacks/init.lua @@ -0,0 +1,24 @@ +minetest.register_globalstep(function() + if not minetest.localplayer then return end + if minetest.settings:get_bool("scaffold") then + minetest.place_node(vector.add(minetest.localplayer:get_pos(), {x = 0, y = -0.6, z = 0})) + end + if minetest.settings:get_bool("highway") and minetest.localplayer:get_wielded_item() then + local z = minetest.localplayer:get_pos().z + local positions = { + {x = 0, y = 0, z = z}, + {x = 1, y = 0, z = z}, + {x = 2, y = 1, z = z}, + {x = -2, y = 1, z = z}, + {x = -2, y = 0, z = z}, + {x = -1, y = 0, z = z}, + {x = 2, y = 0, z = z} + } + for _, p in pairs(positions) do + local node = minetest.get_node_or_nil(p) + if node and not minetest.get_node_def(node.name).walkable then + minetest.place_node(p) + end + end + end +end) |