mirror of
https://github.com/joe7575/techpack.git
synced 2024-11-22 23:33:44 +01:00
Harvester can_dig now checks that fuel is empty
This commit is contained in:
parent
931bc0a128
commit
7c8988ffbf
@ -350,7 +350,7 @@ minetest.register_node("tubelib_addons1:harvester_base", {
|
|||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
local inv = M(pos):get_inventory()
|
local inv = M(pos):get_inventory()
|
||||||
return inv:is_empty("main")
|
return inv:is_empty("main") and inv:is_empty("fuel")
|
||||||
end,
|
end,
|
||||||
|
|
||||||
on_dig = function(pos, node, player)
|
on_dig = function(pos, node, player)
|
||||||
@ -410,7 +410,7 @@ minetest.register_node("tubelib_addons1:harvester_defect", {
|
|||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
local inv = M(pos):get_inventory()
|
local inv = M(pos):get_inventory()
|
||||||
return inv:is_empty("main")
|
return inv:is_empty("main") and inv:is_empty("fuel")
|
||||||
end,
|
end,
|
||||||
|
|
||||||
after_dig_node = function(pos, oldnode, oldmetadata, digger)
|
after_dig_node = function(pos, oldnode, oldmetadata, digger)
|
||||||
|
Loading…
Reference in New Issue
Block a user