minor fix
parent
751cb12ea0
commit
420799bc80
|
@ -62,17 +62,7 @@ local function dig_node(pos, quarrypos)
|
|||
local quarry = minetest.get_meta(quarrypos)
|
||||
local quarry_inv = quarry:get_inventory()
|
||||
|
||||
local drops = minetest.get_node_drops(node.name);
|
||||
local drops_added = 0
|
||||
for _, item in pairs(drops) do
|
||||
if quarry_inv:add_item("quarry", item) then
|
||||
drops_added = drops_added + 1
|
||||
end
|
||||
end
|
||||
if drops_added ~= 0 or #drops == 0 then
|
||||
minetest.set_node(pos, {name = "air"})
|
||||
end
|
||||
|
||||
sparktech.dig_node(pos, quarry_inv, "quarry", nil)
|
||||
end
|
||||
|
||||
return node.name ~= "air"
|
||||
|
@ -122,7 +112,7 @@ end
|
|||
local function place_strut(position, quarrypos)
|
||||
if minetest.get_node(position).name == "air" then
|
||||
local placed = false
|
||||
if sparktech.can_drain_energy(quarrypos, ENERGYCOST.static_strut) then
|
||||
if try_drain_energy(quarrypos, ENERGYCOST.static_strut) then
|
||||
if try_remove_item(quarrypos, "quarry", NAME .. ":static_strut") then
|
||||
minetest.set_node(position, { name = NAME .. ":static_strut"})
|
||||
placed = true
|
||||
|
|
Loading…
Reference in New Issue