1
0
mirror of https://github.com/mt-mods/pipeworks.git synced 2025-06-28 22:36:31 +02:00

4 Commits

Author SHA1 Message Date
ef5d30c92d Merge branch 'rotate-metadata-fix' into 'master'
fix metadata loss on rotate

See merge request VanessaE/pipeworks!6
2018-11-27 19:53:40 +00:00
f2fff77e90 fix metadata loss on rotate
use swap_node() instead of set_node() so locked chests can be used again after rotation
2018-11-27 20:47:37 +01:00
f37b21e632 fix autocrafter recipe 2018-11-15 03:51:56 +03:00
c9a951c2e8 improving connectivity 2018-11-14 07:07:33 +03:00
4 changed files with 28 additions and 5 deletions

View File

@ -407,7 +407,7 @@ minetest.register_craft( {
output = "pipeworks:autocrafter 2",
recipe = {
{ "default:steel_ingot", "default:mese_crystal", "default:steel_ingot" },
{ "basic_materials:plastic_sheeting", "default:steel_ingot", "basic_materials:plastic_sheeting" },
{ "basic_materials:plastic_sheet", "default:steel_ingot", "basic_materials:plastic_sheet" },
{ "default:steel_ingot", "default:mese_crystal", "default:steel_ingot" }
},
})

View File

@ -122,7 +122,7 @@ end
-- when they are updated.
function pipeworks.on_rotate(pos, node, user, mode, new_param2)
node.param2 = new_param2
minetest.set_node(pos, node)
minetest.swap_node(pos, node)
pipeworks.scan_for_tube_objects(pos)
return true
end

View File

@ -37,6 +37,23 @@ local rules = {
white = {x = 0, y = 0, z = 1, name = "white"},
}
local digiline_rules_luatube = {
{x=0, y=0, z=-1},
{x=1, y=0, z=0},
{x=-1, y=0, z=0},
{x=0, y=0, z=1},
{x=1, y=1, z=0},
{x=1, y=-1, z=0},
{x=-1, y=1, z=0},
{x=-1, y=-1, z=0},
{x=0, y=1, z=1},
{x=0, y=-1, z=1},
{x=0, y=1, z=-1},
{x=0, y=-1, z=-1},
-- vertical connectivity
{x=0, y=1, z=0},
{x=0, y=-1, z=0},
}
------------------
-- Action stuff --
@ -303,7 +320,7 @@ local function get_digiline_send(pos)
end
minetest.after(0, function()
digilines.receptor_send(pos, digiline.rules.default, channel, msg)
digilines.receptor_send(pos, digiline_rules_luatube, channel, msg)
end)
return true
end
@ -540,7 +557,10 @@ local digiline = {
action = function(pos, node, channel, msg)
run(pos, {type = "digiline", channel = channel, msg = msg})
end
}
},
wire = {
rules = pipeworks.digilines_rules
},
}
local function on_receive_fields(pos, form_name, fields, sender)
if not fields.program then

View File

@ -102,7 +102,10 @@ if digiline_enabled and pipeworks.enable_digiline_detector_tube then
receptor = {},
effector = {
action = function(pos,node,channel,msg) end
}
},
wire = {
rules = pipeworks.digilines_rules
},
},
},
})