Fix bug when diging appliance without pipeworks mod loaded.

This commit is contained in:
SFENCE 2021-03-27 08:53:09 +01:00
parent 7e41f7e492
commit ba8e1cdf12

View File

@ -716,8 +716,14 @@ function appliance:cb_can_dig(pos)
end
function appliance:cb_after_dig_node(pos, oldnode, oldmetadata, digger)
pipeworks.scan_for_pipe_objects(pos);
pipeworks.scan_for_tube_objects(pos);
if appliances.have_pipeworks then
if self.need_water then
pipeworks.scan_for_pipe_objects(pos);
end
if self.have_tube then
pipeworks.scan_for_tube_objects(pos);
end
end
if self.have_usage then
local stack = oldmetadata.inventory[self.use_stack][1];