From 915d67a261db52de8aee38d632222eba0b402486 Mon Sep 17 00:00:00 2001 From: Karl Hegbloom Date: Fri, 27 Nov 2015 18:13:32 -0700 Subject: [PATCH] Revert call dignodedef:can_dig with player of owner the api allow nil player so it is a problem that the bone mod should fix. also, if the player is offline, minetest.get_player_by_name would return nil too --- technic/machines/HV/quarry.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/technic/machines/HV/quarry.lua b/technic/machines/HV/quarry.lua index d754185..60805cc 100644 --- a/technic/machines/HV/quarry.lua +++ b/technic/machines/HV/quarry.lua @@ -128,7 +128,6 @@ local function quarry_run(pos, node) local data = vm:get_data() local c_air = minetest.get_content_id("air") local owner = meta:get_string("owner") - local player = minetest.get_player_by_name(owner) local nd = meta:get_int("dug") while nd ~= diameter*diameter * (quarry_dig_above_nodes+1+quarry_max_depth) do local ry = math.floor(nd / (diameter*diameter)) @@ -151,7 +150,7 @@ 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, player)) then + if not dignodedef.diggable or (dignodedef.can_dig and not dignodedef.can_dig(digpos, nil)) then can_dig = false end end