Try adding this to the code,
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
- Code: Select all
minetest.register_on_punchnode = function (pos, node, puncher)
if node.name == 'computer:comp1_on' then
local dir = node["param2"]
minetest.env:add_node(pos, {name="computer:comp1_off", paramtype2='none', param2=dir})
nodeupdate(pos)
elseif node.name == 'computer:comp1_off' then
local dir = node["param2"]
minetest.env:add_node(pos, {name="computer:comp1_on", paramtype2='none', param2=dir})
nodeupdate(pos)
end
end
It probably won't work, because I can't test it.