mirror of
https://github.com/minetest-mods/technic.git
synced 2024-11-18 08:10:48 +01:00
Merge branch 'fix-fake-digger' into pandorabox
This commit is contained in:
commit
ce904d72b5
@ -10,3 +10,4 @@ digiline_remote?
|
|||||||
intllib?
|
intllib?
|
||||||
unified_inventory?
|
unified_inventory?
|
||||||
vector_extras?
|
vector_extras?
|
||||||
|
dye?
|
||||||
|
@ -146,15 +146,9 @@ local function quarry_run(pos, node)
|
|||||||
dignode = technic.get_or_load_node(digpos) or minetest.get_node(digpos)
|
dignode = technic.get_or_load_node(digpos) or minetest.get_node(digpos)
|
||||||
local dignodedef = minetest.registered_nodes[dignode.name] or {diggable=false}
|
local dignodedef = minetest.registered_nodes[dignode.name] or {diggable=false}
|
||||||
-- doors mod among other thing does NOT like a nil digger...
|
-- doors mod among other thing does NOT like a nil digger...
|
||||||
local fakedigger = {
|
local fakedigger = pipeworks.create_fake_player({
|
||||||
get_player_name = function()
|
name = owner
|
||||||
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
|
if not dignodedef.diggable or (dignodedef.can_dig and not dignodedef.can_dig(digpos, fakedigger)) then
|
||||||
can_dig = false
|
can_dig = false
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user