| | |
| | | minetest.register_craft({ |
| | | recipe = { |
| | | {"technic:carbon_plate", "pipeworks:filter", "technic:composite_plate"}, |
| | | {"technic:motor", "technic:machine_casing", "technic:diamond_drill_head"}, |
| | | {"basic_materials:motor", "technic:machine_casing", "technic:diamond_drill_head"}, |
| | | {"technic:carbon_steel_block", "technic:hv_cable", "technic:carbon_steel_block"}}, |
| | | output = "technic:quarry", |
| | | }) |
| | |
| | | if can_dig then |
| | | dignode = technic.get_or_load_node(digpos) or minetest.get_node(digpos) |
| | | local dignodedef = minetest.registered_nodes[dignode.name] or {diggable=false} |
| | | if not dignodedef.diggable or (dignodedef.can_dig and not dignodedef.can_dig(digpos, nil)) then |
| | | -- doors mod among other thing does NOT like a nil digger... |
| | | local fakedigger = { |
| | | get_player_name = function() |
| | | return "!technic_quarry_fake_digger" |
| | | end, |
| | | is_player = function() return false end, |
| | | get_wielded_item = function() |
| | | return ItemStack("air") |
| | | end, |
| | | } |
| | | if not dignodedef.diggable or (dignodedef.can_dig and not dignodedef.can_dig(digpos, fakedigger)) then |
| | | can_dig = false |
| | | end |
| | | end |