summaryrefslogtreecommitdiff
path: root/init.lua
diff options
context:
space:
mode:
authorFaceDeer <derksenmobile@gmail.com>2016-12-31 21:19:52 -0700
committerFaceDeer <derksenmobile@gmail.com>2016-12-31 21:19:52 -0700
commit68e0ca21c6ff335d1b27c3bebc796de56cb2a49b (patch)
tree773926f57c8ec78f628d1620800f081a48404324 /init.lua
parent70803f1f44febe19da436194d36afe85e983d473 (diff)
Changed sand digger to a more generic soft material digger, added more sophisticated traction, made structure climbable, added infotexts
Diffstat (limited to 'init.lua')
-rw-r--r--init.lua17
1 files changed, 14 insertions, 3 deletions
diff --git a/init.lua b/init.lua
index 92e0a88..f30643f 100644
--- a/init.lua
+++ b/init.lua
@@ -9,6 +9,7 @@ dofile( minetest.get_modpath( "digtron" ) .. "/node_controllers.lua" ) -- contro
dofile( minetest.get_modpath( "digtron" ) .."/recipes.lua" )
digtron.refractory = 1.0 -- How long a digtron waits between cycles.
+digtron.traction_factor = 3.0 -- How many digtron nodes can be moved for each adjacent solid node that the digtron has traction against
-- digtron group numbers:
-- 1 - generic digtron node, nothing special is done with these. They're just dragged along.
@@ -17,6 +18,16 @@ digtron.refractory = 1.0 -- How long a digtron waits between cycles.
-- 4 - builder head, has a "test_build" and "execute_build" method in its definition
-
-
-
+minetest.register_lbm({
+ name = "digtron:sand_digger_upgrade",
+ nodenames = {"digtron:sand_digger"},
+ action = function(pos, node)
+ local meta = minetest.get_meta(pos)
+ local offset = meta:get_string("offset")
+ local period = meta:get_string("period")
+ minetest.set_node(pos, {name = "digtron:soft_digger",
+ param2 = node.param2})
+ meta:set_string("offset", offset)
+ meta:set_string("period", period)
+ end
+}) \ No newline at end of file