Merge pull request #9 from AntumDeluge/pipeworks_fixes

Test for global 'pipeworks' before calling
This commit is contained in:
Vanessa Ezekowitz 2017-05-18 15:57:58 -04:00 committed by GitHub
commit 3ee673da21

@ -37,6 +37,8 @@ default.shop.formspec = {
end,
}
local have_pipeworks = minetest.global_exists("pipeworks")
default.shop.check_privilege = function(listname,playername,meta)
--[[if listname == "pl1" then
if playername ~= meta:get_string("pl1") then
@ -108,9 +110,9 @@ minetest.register_node("currency:shop", {
inv:set_size("stock", 3*2)
inv:set_size("owner_wants", 3*2)
inv:set_size("owner_gives", 3*2)
if minetest.get_modpath("pipeworks") then pipeworks.after_place(pos) end
if have_pipeworks then pipeworks.after_place(pos) end
end,
after_dig_node = (pipeworks and pipeworks.after_dig),
after_dig_node = (have_pipeworks and pipeworks and pipeworks.after_dig),
tube = {
insert_object = function(pos, node, stack, direction)
local meta = minetest.get_meta(pos)