local function capacitor_pathfind(source,mem_map)
- --redstone and torch
for _,order in pairs(order) do
i = add_vec(source,order)
if temp_pool then
temp_pool.capacitor = 1
if capacitor_table[temp_pool.name] then
- --print("doing")
swap_node(new_vec(x,y,z),{name=capacitor_table[temp_pool.name].on})
redstone.update(new_vec(x,y,z))
end
if temp_pool then
temp_pool.capacitor = 0
if capacitor_table[temp_pool.name] then
- --print(temp_pool.name)
swap_node(new_vec(x,y,z),{name=capacitor_table[temp_pool.name].off})
redstone.update(new_vec(x,y,z))
end
if space == true and next(move_index) then
if table.getn(move_index) == 1 and minetest.get_item_group(move_index[1].name, "falling_node") > 0 then
for i = 1,table.getn(move_index) do
- print("trying")
move_index[i].pos = vector.add(move_index[i].pos,dir)
minetest.set_node(move_index[i].pos,{name="air"})
]]
local function sticky_piston_pull_nodes(pos,dir)
- print("test")
local move_index = {}
local index_pos = vector.add(pos,dir)
local param2 = node.param2
local def = minetest.registered_nodes[node.name]
local name = node.name
- print(name)
local pull = ((excluded_mods[def.mod_origin] ~= true) and (excluded_nodes[name] ~= true))
--if it can be pulled pull it
if pull and name ~= "air" then