summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorroot <root@mirzakhani.gpcf.eu>2018-05-31 11:18:20 +0200
committerroot <root@mirzakhani.gpcf.eu>2018-05-31 11:18:20 +0200
commit98382c0815d2e48485a49498f487f165cd721287 (patch)
treea321200886d622921a263305ca3ea959fd93b4c9
parent64b8b8c861ac493e5415a5e65bc64e3b48a72910 (diff)
parentc93bfefd9fb66cab4a766b4e6a4d361a85503685 (diff)
Merge branch 'master' of https://github.com/minetest-technic/technic
-rw-r--r--technic/machines/HV/quarry.lua12
1 files changed, 11 insertions, 1 deletions
diff --git a/technic/machines/HV/quarry.lua b/technic/machines/HV/quarry.lua
index 9060b70..86ca395 100644
--- a/technic/machines/HV/quarry.lua
+++ b/technic/machines/HV/quarry.lua
@@ -145,7 +145,17 @@ local function quarry_run(pos, node)
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