Add files via upload

This commit is contained in:
loosewheel
2022-02-24 08:28:38 +10:00
committed by GitHub
parent 9a118751e4
commit 493167998d
19 changed files with 1306 additions and 151 deletions

View File

@@ -101,6 +101,21 @@ end
-- check for pipeworks
if minetest.global_exists ("pipeworks") then
utils.pipeworks_supported = true
utils.pipeworks_after_place = pipeworks.after_place
utils.pipeworks_after_dig = pipeworks.after_dig
else
utils.pipeworks_supported = false
utils.pipeworks_after_place = function (pos)
end
utils.pipeworks_after_dig = function (pos)
end
end
function utils.on_destroy (itemstack)
local stack = ItemStack (itemstack)
@@ -210,6 +225,22 @@ end
function utils.is_same_item (item1, item2)
local copy1 = ItemStack (stack1)
local copy2 = ItemStack (stack2)
if copy1 and copy2 then
copy1:set_count (1)
copy2:set_count (1)
return copy1:to_string () == copy2:to_string ()
end
return false
end
function utils.destroy_node (pos)
local node = utils.get_far_node (pos)