Skip interact check for fake players

Fixes crash related to pipeworks
default.can_interact_with_node is not official part of the API yet. Using it anyway..
This commit is contained in:
SmallJoker 2018-06-28 19:49:04 +02:00
parent c93bfefd9f
commit 6664714313
1 changed files with 3 additions and 1 deletions

View File

@ -28,7 +28,9 @@ technic.chests.can_dig = function(pos, player)
end
local function inv_change(pos, count, player)
if not default.can_interact_with_node(player, pos) then
-- Skip check for pipeworks (fake player)
if minetest.is_player(player) and
not default.can_interact_with_node(player, pos) then
return 0
end
return count